From 0c14f3282281eba72c774700d419004c0edf9785 Mon Sep 17 00:00:00 2001
From: Gani Georgiev <gani.georgiev@gmail.com>
Date: Mon, 11 Jul 2022 10:30:20 +0300
Subject: [PATCH] added additional info about the @expand query parameter

---
 ...js => FilterAutocompleteInput.477fd505.js} |   2 +-
 ...PageAdminConfirmPasswordReset.f104bea1.js} |   2 +-
 ...PageAdminRequestPasswordReset.aecae2cf.js} |   2 +-
 ...=> PageUserConfirmEmailChange.d9c73d4b.js} |   2 +-
 ... PageUserConfirmPasswordReset.90fa6cdc.js} |   2 +-
 ...> PageUserConfirmVerification.9c23f768.js} |   2 +-
 ui/dist/assets/index.15552609.js              | 364 -----------------
 ui/dist/assets/index.6f2d3c23.js              | 366 ++++++++++++++++++
 ui/dist/index.html                            |   2 +-
 .../collections/docs/ListApiDocs.svelte       |   3 +-
 .../collections/docs/ViewApiDocs.svelte       |   3 +-
 11 files changed, 377 insertions(+), 373 deletions(-)
 rename ui/dist/assets/{FilterAutocompleteInput.e18b080c.js => FilterAutocompleteInput.477fd505.js} (99%)
 rename ui/dist/assets/{PageAdminConfirmPasswordReset.2dff19bf.js => PageAdminConfirmPasswordReset.f104bea1.js} (98%)
 rename ui/dist/assets/{PageAdminRequestPasswordReset.1fb439b8.js => PageAdminRequestPasswordReset.aecae2cf.js} (98%)
 rename ui/dist/assets/{PageUserConfirmEmailChange.148a0ba6.js => PageUserConfirmEmailChange.d9c73d4b.js} (98%)
 rename ui/dist/assets/{PageUserConfirmPasswordReset.365d89fa.js => PageUserConfirmPasswordReset.90fa6cdc.js} (98%)
 rename ui/dist/assets/{PageUserConfirmVerification.062420a1.js => PageUserConfirmVerification.9c23f768.js} (97%)
 delete mode 100644 ui/dist/assets/index.15552609.js
 create mode 100644 ui/dist/assets/index.6f2d3c23.js

diff --git a/ui/dist/assets/FilterAutocompleteInput.e18b080c.js b/ui/dist/assets/FilterAutocompleteInput.477fd505.js
similarity index 99%
rename from ui/dist/assets/FilterAutocompleteInput.e18b080c.js
rename to ui/dist/assets/FilterAutocompleteInput.477fd505.js
index 8750d71f..06ec7c9e 100644
--- a/ui/dist/assets/FilterAutocompleteInput.e18b080c.js
+++ b/ui/dist/assets/FilterAutocompleteInput.477fd505.js
@@ -1,4 +1,4 @@
-import{S as Sa,i as va,s as Ca,e as Aa,f as Ma,g as Da,y as xn,o as Oa,G as Ta,H as Ba,I as Ra,P as Pa,J as La,C as kn,K as Ea}from"./index.15552609.js";class z{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ve.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),Ve.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Zt(this),r=new Zt(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zt(this,e)}iterRange(e,t=this.length){return new zo(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new qo(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?z.empty:e.length<=32?new Q(e):Ve.from(Q.split(e,[]))}}class Q extends z{constructor(e,t=Ia(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Na(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Q(hr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Pi(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Q(l,o.length+r.length));else{let h=l.length>>1;i.push(new Q(l.slice(0,h)),new Q(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Q))return super.replace(e,t,i);let s=Pi(this.text,Pi(i.text,hr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new Q(s,r):Ve.from(Q.split(s,[]),r)}sliceString(e,t=this.length,i=`
+import{S as Sa,i as va,s as Ca,e as Aa,f as Ma,g as Da,y as xn,o as Oa,G as Ta,H as Ba,I as Ra,P as Pa,J as La,C as kn,K as Ea}from"./index.6f2d3c23.js";class z{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ve.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),Ve.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Zt(this),r=new Zt(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zt(this,e)}iterRange(e,t=this.length){return new zo(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new qo(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?z.empty:e.length<=32?new Q(e):Ve.from(Q.split(e,[]))}}class Q extends z{constructor(e,t=Ia(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Na(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Q(hr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Pi(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Q(l,o.length+r.length));else{let h=l.length>>1;i.push(new Q(l.slice(0,h)),new Q(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Q))return super.replace(e,t,i);let s=Pi(this.text,Pi(i.text,hr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new Q(s,r):Ve.from(Q.split(s,[]),r)}sliceString(e,t=this.length,i=`
 `){let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],h=r+l.length;r>e&&o&&(s+=i),e<h&&t>r&&(s+=l.slice(Math.max(0,e-r),t-r)),r=h+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new Q(i,s)),i=[],s=-1);return s>-1&&t.push(new Q(i,s)),t}}class Ve extends z{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,h=i+o.lines-1;if((t?h:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=h+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let l=this.children[r],h=o+l.length;if(e<=h&&t>=o){let a=s&((o<=e?1:0)|(h>=t?2:0));o>=e&&h<=t&&!a?i.push(l):l.decompose(e-o,t-o,i,a)}o=h+1}}replace(e,t,i){if(i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines<a>>5-1&&h.lines>a>>5+1){let c=this.children.slice();return c[s]=h,new Ve(c,this.length-(t-e)+i.length)}return super.replace(r,l,h)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
 `){let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let l=this.children[r],h=o+l.length;o>e&&r&&(s+=i),e<h&&t>o&&(s+=l.sliceString(e-o,t-o,i)),o=h+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ve))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let h=this.children[s],a=e.children[r];if(h!=a)return i+h.scanIdentical(a,t);i+=h.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new Q(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],h=0,a=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof Ve)for(let g of d.children)f(g);else d.lines>o&&(h>o||!h)?(u(),l.push(d)):d instanceof Q&&h&&(p=c[c.length-1])instanceof Q&&d.lines+p.lines<=32?(h+=d.lines,a+=d.length+1,c[c.length-1]=new Q(p.text.concat(d.text),p.length+1+d.length)):(h+d.lines>s&&u(),h+=d.lines,a+=d.length+1,c.push(d))}function u(){h!=0&&(l.push(c.length==1?c[0]:Ve.from(c,a)),a=-1,h=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new Ve(l,t)}}z.empty=new Q([""],0);function Ia(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Pi(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],h=s+l.length;h>=t&&(h>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=h+1}return e}function hr(n,e,t){return Pi(n,[""],e,t)}class Zt{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Q?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof Q?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
 `,this;e--}else if(s instanceof Q){let h=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=s.children[o+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof Q?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class zo{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Zt(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class qo{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol!="undefined"&&(z.prototype[Symbol.iterator]=function(){return this.iter()},Zt.prototype[Symbol.iterator]=zo.prototype[Symbol.iterator]=qo.prototype[Symbol.iterator]=function(){return this});class Na{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}let Dt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;n<Dt.length;n++)Dt[n]+=Dt[n-1];function Va(n){for(let e=1;e<Dt.length;e+=2)if(Dt[e]>n)return Dt[e-1]<=n;return!1}function ar(n){return n>=127462&&n<=127487}const cr=8205;function Ae(n,e,t=!0,i=!0){return(t?Ko:Fa)(n,e,i)}function Ko(n,e,t){if(e==n.length)return e;e&&Uo(n.charCodeAt(e))&&jo(n.charCodeAt(e-1))&&e--;let i=re(n,e);for(e+=ve(i);e<n.length;){let s=re(n,e);if(i==cr||s==cr||t&&Va(s))e+=ve(s),i=s;else if(ar(s)){let r=0,o=e-2;for(;o>=0&&ar(re(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Fa(n,e,t){for(;e>0;){let i=Ko(n,e-2,t);if(i<e)return i;e--}return 0}function Uo(n){return n>=56320&&n<57344}function jo(n){return n>=55296&&n<56320}function re(n,e){let t=n.charCodeAt(e);if(!jo(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Uo(i)?(t-55296<<10)+(i-56320)+65536:t}function Rs(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ve(n){return n<65536?1:2}const Kn=/\r\n?|\n/;var me=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(me||(me={}));class We{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){Un(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s,i)}return new We(e)}composeDesc(e){return this.empty?e:e.empty?this:Go(this,e)}mapDesc(e,t=!1){return e.empty?this:jn(this,e,t)}mapPos(e,t=-1,i=me.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],h=this.sections[o++],a=s+l;if(h<0){if(a>e)return r+(e-s);r+=l}else{if(i!=me.Simple&&a>=e&&(i==me.TrackDel&&s<e&&a>e||i==me.TrackBefore&&s<e||i==me.TrackAfter&&a>e))return null;if(a>e||a==e&&t<0&&!l)return e==s||t<0?r:r+h;r+=h}s=a}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i<this.sections.length&&s<=t;){let r=this.sections[i++],o=this.sections[i++],l=s+r;if(o>=0&&s<=t&&l>=e)return s<e&&l>t?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+i+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new We(e)}static create(e){return new We(e)}}class ee extends We{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Un(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return jn(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],l=t[s+1];if(l>=0){t[s]=l,t[s+1]=o;let h=s>>1;for(;i.length<h;)i.push(z.empty);i.push(o?e.slice(r,r+o):z.empty)}r+=o}return new ee(t,i)}compose(e){return this.empty?e:e.empty?this:Go(this,e,!0)}map(e,t=!1){return e.empty?this:jn(this,e,t,!0)}iterChanges(e,t=!1){Un(this,e,t)}get desc(){return We.create(this.sections)}filter(e){let t=[],i=[],s=[],r=new si(this);e:for(let o=0,l=0;;){let h=o==e.length?1e9:e[o++];for(;l<h||l==h&&r.len==0;){if(r.done)break e;let c=Math.min(r.len,h-l);he(s,c,-1);let f=r.ins==-1?-1:r.off==0?r.ins:0;he(t,c,f),f>0&&Ye(i,t,r.text),r.forward(c),l+=c}let a=e[o++];for(;l<a;){if(r.done)break e;let c=Math.min(r.len,a-l);he(t,c,-1),he(s,c,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(c),l+=c}}return{changes:new ee(t,i),filtered:We.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],s=this.sections[t+1];s<0?e.push(i):s==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function h(c=!1){if(!c&&!s.length)return;o<t&&he(s,t-o,-1);let f=new ee(s,r);l=l?l.compose(f.map(l)):f,s=[],r=[],o=0}function a(c){if(Array.isArray(c))for(let f of c)a(f);else if(c instanceof ee){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);h(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:u=f,insert:d}=c;if(f>u||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let p=d?typeof d=="string"?z.of(d.split(i||Kn)):d:z.empty,g=p.length;if(f==u&&g==0)return;f<o&&h(),f>o&&he(s,f-o,-1),he(s,u-f,g),Ye(r,s,p),o=u}}return a(e),h(!l),l}static empty(e){return new ee(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;s<e.length;s++){let r=e[s];if(typeof r=="number")t.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length<s;)i.push(z.empty);i[s]=z.of(r.slice(1)),t.push(r[0],i[s].length)}}}return new ee(t,i)}static createSet(e,t){return new ee(e,t)}}function he(n,e,t,i=!1){if(e==0&&t<=0)return;let s=n.length-2;s>=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function Ye(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(z.empty);n.push(t)}}function Un(n,e,t){let i=n.inserted;for(let s=0,r=0,o=0;o<n.sections.length;){let l=n.sections[o++],h=n.sections[o++];if(h<0)s+=l,r+=l;else{let a=s,c=r,f=z.empty;for(;a+=l,c+=h,h&&i&&(f=f.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],h=n.sections[o++];e(s,a,r,c,f),s=a,r=c}}}function jn(n,e,t,i=!1){let s=[],r=i?[]:null,o=new si(n),l=new si(e);for(let h=-1;;)if(o.ins==-1&&l.ins==-1){let a=Math.min(o.len,l.len);he(s,a,-1),o.forward(a),l.forward(a)}else if(l.ins>=0&&(o.ins<0||h==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let a=l.len;for(he(s,l.ins,-1);a;){let c=Math.min(o.len,a);o.ins>=0&&h<o.i&&o.len<=c&&(he(s,0,o.ins),r&&Ye(r,s,o.text),h=o.i),o.forward(c),a-=c}l.next()}else if(o.ins>=0){let a=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);a+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;he(s,a,h<o.i?o.ins:0),r&&h<o.i&&Ye(r,s,o.text),h=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return r?ee.createSet(s,r):We.create(s);throw new Error("Mismatched change set lengths")}}function Go(n,e,t=!1){let i=[],s=t?[]:null,r=new si(n),o=new si(e);for(let l=!1;;){if(r.done&&o.done)return s?ee.createSet(i,s):We.create(i);if(r.ins==0)he(i,r.len,0,l),r.next();else if(o.len==0&&!o.done)he(i,0,o.ins,l),s&&Ye(s,i,o.text),o.next();else{if(r.done||o.done)throw new Error("Mismatched change set lengths");{let h=Math.min(r.len2,o.len),a=i.length;if(r.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;he(i,h,c,l),s&&c&&Ye(s,i,o.text)}else o.ins==-1?(he(i,r.off?0:r.len,h,l),s&&Ye(s,i,r.textBit(h))):(he(i,r.off?0:r.len,o.off?0:o.ins,l),s&&!o.off&&Ye(s,i,o.text));l=(r.ins>h||o.ins>=0&&o.len>h)&&(l||i.length>a),r.forward2(h),o.forward(h)}}}}class si{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?z.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?z.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ct{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new ct(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return m.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return m.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return m.range(e.anchor,e.head)}static create(e,t,i){return new ct(e,t,i)}}class m{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:m.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;t<this.ranges.length;t++)if(!this.ranges[t].eq(e.ranges[t]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new m([this.main],0)}addRange(e,t=!0){return m.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,m.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new m(e.ranges.map(t=>ct.fromJSON(t)),e.main)}static single(e,t=e){return new m([m.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;s<e.length;s++){let r=e[s];if(r.empty?r.from<=i:r.from<i)return m.normalized(e.slice(),t);i=r.to}return new m(e,t)}static cursor(e,t=0,i,s){return ct.create(e,e,(t==0?0:t<0?4:8)|(i==null?3:Math.min(2,i))|(s!=null?s:33554431)<<5)}static range(e,t,i){let s=(i!=null?i:33554431)<<5;return t<e?ct.create(t,e,16|s|8):ct.create(e,t,s|(t>e?4:0))}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;s<e.length;s++){let r=e[s],o=e[s-1];if(r.empty?r.from<=o.to:r.from<o.to){let l=o.from,h=Math.max(r.to,o.to);s<=t&&t--,e.splice(--s,2,r.anchor>r.head?m.range(h,l):m.range(l,h))}}return new m(e,t)}}function Jo(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Ps=0;class T{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=Ps++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}static define(e={}){return new T(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Ls),!!e.static,e.enables)}of(e){return new Li([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Li(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Li(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Ls(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Li{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=Ps++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,h=!1,a=!1,c=[];for(let f of this.dependencies)f=="doc"?h=!0:f=="selection"?a=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(h&&u.docChanged||a&&(u.docChanged||u.selection)||Gn(f,c)){let d=i(f);if(l?!fr(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d=i(f),p=u.config.address[r];if(p!=null){let g=Fi(u,p);if(this.dependencies.every(y=>y instanceof T?u.facet(y)===f.facet(y):y instanceof ke?u.field(y,!1)==f.field(y,!1):!0)||(l?fr(d,g,s):s(d,g)))return f.values[o]=g,0}return f.values[o]=d,1}}}}function fr(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function Gn(n,e){let t=!1;for(let i of e)ei(n,i)&1&&(t=!0);return t}function Ha(n,e,t){let i=t.map(h=>n[h.id]),s=t.map(h=>h.type),r=i.filter(h=>!(h&1)),o=n[e.id]>>1;function l(h){let a=[];for(let c=0;c<i.length;c++){let f=Fi(h,i[c]);if(s[c]==2)for(let u of f)a.push(u);else a.push(f)}return e.combine(a)}return{create(h){for(let a of i)ei(h,a);return h.values[o]=l(h),1},update(h,a){if(!Gn(h,r))return 0;let c=l(h);return e.compare(c,h.values[o])?0:(h.values[o]=c,1)},reconfigure(h,a){let c=Gn(h,i),f=a.config.facets[e.id],u=a.facet(e);if(f&&!c&&Ls(t,f))return h.values[o]=u,0;let d=l(h);return e.compare(d,u)?(h.values[o]=u,0):(h.values[o]=d,1)}}}const ur=T.define({static:!0});class ke{constructor(e,t,i,s,r){this.id=e,this.createF=t,this.updateF=i,this.compareF=s,this.spec=r,this.provides=void 0}static define(e){let t=new ke(Ps++,e.create,e.update,e.compare||((i,s)=>i===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(ur).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,ur.of({field:this,create:e})]}get extension(){return this}}const Ct={lowest:4,low:3,default:2,high:1,highest:0};function Kt(n){return e=>new $o(e,n)}const Wt={highest:Kt(Ct.highest),high:Kt(Ct.high),default:Kt(Ct.default),low:Kt(Ct.low),lowest:Kt(Ct.lowest)};class $o{constructor(e,t){this.inner=e,this.prec=t}}class _e{of(e){return new Jn(this,e)}reconfigure(e){return _e.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Jn{constructor(e,t){this.compartment=e,this.inner=t}}class Vi{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of Wa(e,t,o))u instanceof ke?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),h=[],a=[];for(let u of s)l[u.id]=a.length<<1,a.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],p=d[0].facet,g=c&&c[u]||[];if(d.every(y=>y.type==0))if(l[p.id]=h.length<<1|1,Ls(g,d))h.push(i.facet(p));else{let y=p.combine(d.map(b=>b.value));h.push(i&&p.compare(y,i.facet(p))?i.facet(p):y)}else{for(let y of d)y.type==0?(l[y.id]=h.length<<1|1,h.push(y.value)):(l[y.id]=a.length<<1,a.push(b=>y.dynamicSlot(b)));l[p.id]=a.length<<1,a.push(y=>Ha(y,p,d))}}let f=a.map(u=>u(l));return new Vi(e,o,f,l,h,r)}}function Wa(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let h=s.get(o);if(h!=null){if(h<=l)return;let a=i[h].indexOf(o);a>-1&&i[h].splice(a,1),o instanceof Jn&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let a of o)r(a,l);else if(o instanceof Jn){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let a=e.get(o.compartment)||o.inner;t.set(o.compartment,a),r(a,l)}else if(o instanceof $o)r(o.inner,o.prec);else if(o instanceof ke)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof Li)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,l);else{let a=o.extension;if(!a)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(a,l)}}return r(n,Ct.default),i.reduce((o,l)=>o.concat(l))}function ei(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Fi(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Xo=T.define(),Yo=T.define({combine:n=>n.some(e=>e),static:!0}),_o=T.define({combine:n=>n.length?n[0]:void 0,static:!0}),Qo=T.define(),Zo=T.define(),el=T.define(),tl=T.define({combine:n=>n.length?n[0]:!1});class wt{constructor(e,t){this.type=e,this.value=t}static define(){return new za}}class za{of(e){return new wt(this,e)}}class qa{constructor(e){this.map=e}of(e){return new H(this,e)}}class H{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new H(this.type,t)}is(e){return this.type==e}static define(e={}){return new qa(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}H.reconfigure=H.define();H.appendConfig=H.define();class te{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Jo(i,t.newLength),r.some(l=>l.type==te.time)||(this.annotations=r.concat(te.time.of(Date.now())))}static create(e,t,i,s,r,o){return new te(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(te.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}te.time=wt.define();te.userEvent=wt.define();te.addToHistory=wt.define();te.remote=wt.define();function Ka(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i<n.length&&(s==e.length||e[s]>=n[i]))r=n[i++],o=n[i++];else if(s<e.length)r=e[s++],o=e[s++];else return t;!t.length||t[t.length-1]<r?t.push(r,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function il(n,e,t){var i;let s,r,o;return t?(s=e.changes,r=ee.empty(e.changes.length),o=n.changes.compose(e.changes)):(s=e.changes.map(n.changes),r=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(s)),{changes:o,selection:e.selection?e.selection.map(r):(i=n.selection)===null||i===void 0?void 0:i.map(s),effects:H.mapEffects(n.effects,s).concat(H.mapEffects(e.effects,r)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function $n(n,e,t){let i=e.selection,s=Ot(e.annotations);return e.userEvent&&(s=s.concat(te.userEvent.of(e.userEvent))),{changes:e.changes instanceof ee?e.changes:ee.of(e.changes||[],t,n.facet(_o)),selection:i&&(i instanceof m?i:m.single(i.anchor,i.head)),effects:Ot(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function nl(n,e,t){let i=$n(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let r=1;r<e.length;r++){e[r].filter===!1&&(t=!1);let o=!!e[r].sequential;i=il(i,$n(n,e[r],o?i.changes.newLength:n.doc.length),o)}let s=te.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return ja(t?Ua(s):s)}function Ua(n){let e=n.startState,t=!0;for(let s of e.facet(Qo)){let r=s(n);if(r===!1){t=!1;break}Array.isArray(r)&&(t=t===!0?r:Ka(t,r))}if(t!==!0){let s,r;if(t===!1)r=n.changes.invertedDesc,s=ee.empty(e.doc.length);else{let o=n.changes.filter(t);s=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}n=te.create(e,s,n.selection&&n.selection.map(r),H.mapEffects(n.effects,r),n.annotations,n.scrollIntoView)}let i=e.facet(Zo);for(let s=i.length-1;s>=0;s--){let r=i[s](n);r instanceof te?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof te?n=r[0]:n=nl(e,Ot(r),!1)}return n}function ja(n){let e=n.startState,t=e.facet(el),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=il(n,$n(e,r,n.changes.newLength),!0))}return i==n?n:te.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Ga=[];function Ot(n){return n==null?Ga:Array.isArray(n)?n:[n]}var ce=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(ce||(ce={}));const Ja=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Xn;try{Xn=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function $a(n){if(Xn)return Xn.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||Ja.test(t)))return!0}return!1}function Xa(n){return e=>{if(!/\S/.test(e))return ce.Space;if($a(e))return ce.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return ce.Word;return ce.Other}}class V{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)ei(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return ei(this,i),Fi(this,i)}update(...e){return nl(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:s}=t;for(let o of e.effects)o.is(_e.reconfigure)?(t&&(s=new Map,t.compartments.forEach((l,h)=>s.set(h,l)),t=null),s.set(o.value.compartment,o.value.extension)):o.is(H.reconfigure)?(t=null,i=o.value):o.is(H.appendConfig)&&(t=null,i=Ot(i).concat(o.value));let r;t?r=e.startState.values.slice():(t=Vi.resolve(i,s,this),r=new V(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,h)=>h.reconfigure(l,this),null).values),new V(t,e.newDoc,e.newSelection,r,(o,l)=>l.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:m.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=Ot(i.effects);for(let l=1;l<t.ranges.length;l++){let h=e(t.ranges[l]),a=this.changes(h.changes),c=a.map(s);for(let u=0;u<l;u++)r[u]=r[u].map(c);let f=s.mapDesc(a,!0);r.push(h.range.map(f)),s=s.compose(c),o=H.mapEffects(o,c).concat(H.mapEffects(Ot(h.effects),f))}return{changes:s,selection:m.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof ee?e:ee.of(e,this.doc.length,this.facet(V.lineSeparator))}toText(e){return z.of(e.split(this.facet(V.lineSeparator)||Kn))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(ei(this,t),Fi(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let s=e[i];s instanceof ke&&this.config.address[s.id]!=null&&(t[i]=s.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(i){for(let r in i)if(Object.prototype.hasOwnProperty.call(e,r)){let o=i[r],l=e[r];s.push(o.init(h=>o.spec.fromJSON(l,h)))}}return V.create({doc:e.doc,selection:m.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Vi.resolve(e.extensions||[],new Map),i=e.doc instanceof z?e.doc:z.of((e.doc||"").split(t.staticFacet(V.lineSeparator)||Kn)),s=e.selection?e.selection instanceof m?e.selection:m.single(e.selection.anchor,e.selection.head):m.single(0);return Jo(s,i.length),t.staticFacet(Yo)||(s=s.asSingle()),new V(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(V.tabSize)}get lineBreak(){return this.facet(V.lineSeparator)||`
diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset.2dff19bf.js b/ui/dist/assets/PageAdminConfirmPasswordReset.f104bea1.js
similarity index 98%
rename from ui/dist/assets/PageAdminConfirmPasswordReset.2dff19bf.js
rename to ui/dist/assets/PageAdminConfirmPasswordReset.f104bea1.js
index 2147bca5..4fe52f16 100644
--- a/ui/dist/assets/PageAdminConfirmPasswordReset.2dff19bf.js
+++ b/ui/dist/assets/PageAdminConfirmPasswordReset.f104bea1.js
@@ -1,2 +1,2 @@
-import{S as E,i as G,s as I,F as K,c as F,m as B,t as H,a as N,d as T,C as M,w as q,e as c,f as u,g as b,h as _,x as O,o as w,q as J,b as k,r as L,u as h,v as Q,j as U,l as V,A as X,p as W,B as Y,D as Z,z as S}from"./index.15552609.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&&O(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=k(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=k(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,C,v,P,A,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 F,m as B,t as H,a as N,d as T,C as M,w as q,e as c,f as u,g as b,h as _,x as O,o as w,q as J,b as k,r as L,u as h,v as Q,j as U,l as V,A as X,p as W,B as Y,D as Z,z as S}from"./index.6f2d3c23.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&&O(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=k(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=k(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,C,v,P,A,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password
                 `),m&&m.c(),t=k(),F(r.$$.fragment),p=k(),F(d.$$.fragment),n=k(),i=c("button"),g=c("span"),g.textContent="Set new password",R=k(),C=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],L(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(C,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,C,$),_(C,v),P=!0,A||(j=[h(e,"submit",Q(f[4])),U(V.call(null,v))],A=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:a}),r.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:a}),d.$set(D),(!P||$&4)&&(i.disabled=a[2]),$&4&&L(i,"btn-loading",a[2])},i(a){P||(H(r.$$.fragment,a),H(d.$$.fragment,a),P=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),P=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(C),A=!1,X(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){F(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),Y("Successfully set a new admin password."),Z("/")}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.1fb439b8.js b/ui/dist/assets/PageAdminRequestPasswordReset.aecae2cf.js
similarity index 98%
rename from ui/dist/assets/PageAdminRequestPasswordReset.1fb439b8.js
rename to ui/dist/assets/PageAdminRequestPasswordReset.aecae2cf.js
index 4eafa1b1..65b5b391 100644
--- a/ui/dist/assets/PageAdminRequestPasswordReset.1fb439b8.js
+++ b/ui/dist/assets/PageAdminRequestPasswordReset.aecae2cf.js
@@ -1,2 +1,2 @@
-import{S as E,i as M,s as T,F as j,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 z,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as A,v as I,w as h,x as J,y as P,z as R}from"./index.15552609.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`<h4 class="m-b-xs">Forgotten admin password</h4> 
+import{S as E,i as M,s as T,F as j,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 z,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as A,v as I,w as h,x as J,y as P,z as R}from"./index.6f2d3c23.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`<h4 class="m-b-xs">Forgotten admin password</h4> 
                 <p>Enter the email associated with your account and we\u2019ll send you a recovery link:</p>`,n=g(),H(l.$$.fragment),t=g(),o=_("button"),f=_("i"),m=g(),i=_("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(f,"class","ri-mail-send-line"),p(i,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=c[1],F(o,"btn-loading",c[1]),p(e,"class","m-b-base")},m(r,$){k(r,e,$),d(e,s),d(e,n),L(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=A(e,"submit",I(c[3])),b=!0)},p(r,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:r}),l.$set(q),(!a||$&2)&&(o.disabled=r[1]),$&2&&F(o,"btn-loading",r[1])},i(r){a||(w(l.$$.fragment,r),a=!0)},o(r){y(l.$$.fragment,r),a=!1},d(r){r&&v(e),S(l),b=!1,u()}}}function O(c){let e,s,n,l,t,o,f,m,i;return{c(){e=_("div"),s=_("div"),s.innerHTML='<i class="ri-checkbox-circle-line"></i>',n=g(),l=_("div"),t=_("p"),o=h("Check "),f=_("strong"),m=h(c[0]),i=h(" for the recovery link."),p(s,"class","icon"),p(f,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){k(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,f),d(f,m),d(t,i)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&v(e)}}}function Q(c){let e,s,n,l,t,o,f,m;return{c(){e=_("label"),s=h("Email"),l=g(),t=_("input"),p(e,"for",n=c[5]),p(t,"type","email"),p(t,"id",o=c[5]),t.required=!0,t.autofocus=!0},m(i,a){k(i,e,a),d(e,s),k(i,l,a),k(i,t,a),R(t,c[0]),t.focus(),f||(m=A(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=z(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 j({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 E{constructor(e){super(),M(this,e,W,V,T,{})}}export{Y as default};
diff --git a/ui/dist/assets/PageUserConfirmEmailChange.148a0ba6.js b/ui/dist/assets/PageUserConfirmEmailChange.d9c73d4b.js
similarity index 98%
rename from ui/dist/assets/PageUserConfirmEmailChange.148a0ba6.js
rename to ui/dist/assets/PageUserConfirmEmailChange.d9c73d4b.js
index e98aa2b8..258a9be2 100644
--- a/ui/dist/assets/PageUserConfirmEmailChange.148a0ba6.js
+++ b/ui/dist/assets/PageUserConfirmEmailChange.d9c73d4b.js
@@ -1,4 +1,4 @@
-import{S as J,i as M,s as N,F as R,c as S,m as U,t as $,a as v,d as z,C as W,E as Y,g as _,k as j,n as A,o as b,p as F,w as y,e as m,f as d,h as k,x as B,q as D,b as C,r as H,u as E,v as G,y as h,z as T}from"./index.15552609.js";function I(r){let e,s,t,l,n,o,c,a,i,u,g,q,p=r[3]&&L(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[O,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),s=m("div"),t=m("h4"),l=y(`Type your password to confirm changing your email address
+import{S as J,i as M,s as N,F as R,c as S,m as U,t as $,a as v,d as z,C as W,E as Y,g as _,k as j,n as A,o as b,p as F,w as y,e as m,f as d,h as k,x as B,q as D,b as C,r as H,u as E,v as G,y as h,z as T}from"./index.6f2d3c23.js";function I(r){let e,s,t,l,n,o,c,a,i,u,g,q,p=r[3]&&L(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[O,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),s=m("div"),t=m("h4"),l=y(`Type your password to confirm changing your email address
                     `),p&&p.c(),n=C(),S(o.$$.fragment),c=C(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","m-b-xs"),d(s,"class","content txt-center m-b-sm"),d(i,"class","txt"),d(a,"type","submit"),d(a,"class","btn btn-lg btn-block"),a.disabled=r[1],H(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,s),k(s,t),k(t,l),p&&p.m(t,null),k(e,n),U(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||(q=E(e,"submit",G(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=L(f),p.c(),p.m(t,null)):p&&(p.d(1),p=null);const P={};w&769&&(P.$$scope={dirty:w,ctx:f}),o.$set(P),(!u||w&2)&&(a.disabled=f[1]),w&2&&H(a,"btn-loading",f[1])},i(f){u||($(o.$$.fragment,f),u=!0)},o(f){v(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),z(o),g=!1,q()}}}function K(r){let e,s,t,l,n;return{c(){e=m("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div> 
             <div class="content txt-bold"><p>Email address changed</p> 
                 <p>You can now sign in with your new email address.</p></div>`,s=C(),t=m("button"),t.textContent="Close",d(e,"class","alert alert-success"),d(t,"type","button"),d(t,"class","btn btn-secondary btn-block")},m(o,c){_(o,e,c),_(o,s,c),_(o,t,c),l||(n=E(t,"click",r[6]),l=!0)},p:h,i:h,o:h,d(o){o&&b(e),o&&b(s),o&&b(t),l=!1,n()}}}function L(r){let e,s,t;return{c(){e=y("to "),s=m("strong"),t=y(r[3]),d(s,"class","txt-nowrap")},m(l,n){_(l,e,n),_(l,s,n),k(s,t)},p(l,n){n&8&&B(t,l[3])},d(l){l&&b(e),l&&b(s)}}}function O(r){let e,s,t,l,n,o,c,a;return{c(){e=m("label"),s=y("Password"),l=C(),n=m("input"),d(e,"for",t=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(i,u){_(i,e,u),k(e,s),_(i,l,u),_(i,n,u),T(n,r[0]),n.focus(),c||(a=E(n,"input",r[7]),c=!0)},p(i,u){u&256&&t!==(t=i[8])&&d(e,"for",t),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&T(n,i[0])},d(i){i&&b(e),i&&b(l),i&&b(n),c=!1,a()}}}function Q(r){let e,s,t,l;const n=[K,I],o=[];function c(a,i){return a[2]?0:1}return e=c(r),s=o[e]=n[e](r),{c(){s.c(),t=Y()},m(a,i){o[e].m(a,i),_(a,t,i),l=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(j(),v(o[u],1,1,()=>{o[u]=null}),A(),s=o[e],s?s.p(a,i):(s=o[e]=n[e](a),s.c()),$(s,1),s.m(t.parentNode,t))},i(a){l||($(s),l=!0)},o(a){v(s),l=!1},d(a){o[e].d(a),a&&b(t)}}}function V(r){let e,s;return e=new R({props:{nobranding:!0,$$slots:{default:[Q]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(t,l){U(e,t,l),s=!0},p(t,[l]){const n={};l&527&&(n.$$scope={dirty:l,ctx:t}),e.$set(n)},i(t){s||($(e.$$.fragment,t),s=!0)},o(t){v(e.$$.fragment,t),s=!1},d(t){z(e,t)}}}function X(r,e,s){let t,{params:l}=e,n="",o=!1,c=!1;async function a(){if(!o){s(1,o=!0);try{await F.Users.confirmEmailChange(l==null?void 0:l.token,n),s(2,c=!0)}catch(g){F.errorResponseHandler(g)}s(1,o=!1)}}const i=()=>window.close();function u(){n=this.value,s(0,n)}return r.$$set=g=>{"params"in g&&s(5,l=g.params)},r.$$.update=()=>{r.$$.dirty&32&&s(3,t=W.getJWTPayload(l==null?void 0:l.token).newEmail||"")},[n,o,c,t,a,l,i,u]}class x extends J{constructor(e){super(),M(this,e,X,V,N,{params:5})}}export{x as default};
diff --git a/ui/dist/assets/PageUserConfirmPasswordReset.365d89fa.js b/ui/dist/assets/PageUserConfirmPasswordReset.90fa6cdc.js
similarity index 98%
rename from ui/dist/assets/PageUserConfirmPasswordReset.365d89fa.js
rename to ui/dist/assets/PageUserConfirmPasswordReset.90fa6cdc.js
index 5b69f9f9..4227c17e 100644
--- a/ui/dist/assets/PageUserConfirmPasswordReset.365d89fa.js
+++ b/ui/dist/assets/PageUserConfirmPasswordReset.90fa6cdc.js
@@ -1,4 +1,4 @@
-import{S as W,i as Y,s as j,F as A,c as H,m as N,t as P,a as q,d as S,C as B,E as D,g as _,k as G,n as I,o as m,p as z,w as y,e as b,h as w,x as K,q as E,b as C,f as c,r as J,u as h,v as O,y as F,z as R}from"./index.15552609.js";function Q(i){let e,l,t,n,s,o,p,a,r,u,v,g,k,L,d=i[4]&&M(i);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[X,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Z,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),{c(){e=b("form"),l=b("div"),t=b("h4"),n=y(`Reset your user password
+import{S as W,i as Y,s as j,F as A,c as H,m as N,t as P,a as q,d as S,C as B,E as D,g as _,k as G,n as I,o as m,p as z,w as y,e as b,h as w,x as K,q as E,b as C,f as c,r as J,u as h,v as O,y as F,z as R}from"./index.6f2d3c23.js";function Q(i){let e,l,t,n,s,o,p,a,r,u,v,g,k,L,d=i[4]&&M(i);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[X,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Z,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),{c(){e=b("form"),l=b("div"),t=b("h4"),n=y(`Reset your user password
                     `),d&&d.c(),s=C(),H(o.$$.fragment),p=C(),H(a.$$.fragment),r=C(),u=b("button"),v=b("span"),v.textContent="Set new password",c(t,"class","m-b-xs"),c(l,"class","content txt-center m-b-sm"),c(v,"class","txt"),c(u,"type","submit"),c(u,"class","btn btn-lg btn-block"),u.disabled=i[2],J(u,"btn-loading",i[2])},m(f,$){_(f,e,$),w(e,l),w(l,t),w(t,n),d&&d.m(t,null),w(e,s),N(o,e,null),w(e,p),N(a,e,null),w(e,r),w(e,u),w(u,v),g=!0,k||(L=h(e,"submit",O(i[5])),k=!0)},p(f,$){f[4]?d?d.p(f,$):(d=M(f),d.c(),d.m(t,null)):d&&(d.d(1),d=null);const T={};$&3073&&(T.$$scope={dirty:$,ctx:f}),o.$set(T);const U={};$&3074&&(U.$$scope={dirty:$,ctx:f}),a.$set(U),(!g||$&4)&&(u.disabled=f[2]),$&4&&J(u,"btn-loading",f[2])},i(f){g||(P(o.$$.fragment,f),P(a.$$.fragment,f),g=!0)},o(f){q(o.$$.fragment,f),q(a.$$.fragment,f),g=!1},d(f){f&&m(e),d&&d.d(),S(o),S(a),k=!1,L()}}}function V(i){let e,l,t,n,s;return{c(){e=b("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div> 
             <div class="content txt-bold"><p>Password changed</p> 
                 <p>You can now sign in with your new password.</p></div>`,l=C(),t=b("button"),t.textContent="Close",c(e,"class","alert alert-success"),c(t,"type","button"),c(t,"class","btn btn-secondary btn-block")},m(o,p){_(o,e,p),_(o,l,p),_(o,t,p),n||(s=h(t,"click",i[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(t),n=!1,s()}}}function M(i){let e,l,t;return{c(){e=y("for "),l=b("strong"),t=y(i[4])},m(n,s){_(n,e,s),_(n,l,s),w(l,t)},p(n,s){s&16&&K(t,n[4])},d(n){n&&m(e),n&&m(l)}}}function X(i){let e,l,t,n,s,o,p,a;return{c(){e=b("label"),l=y("New password"),n=C(),s=b("input"),c(e,"for",t=i[10]),c(s,"type","password"),c(s,"id",o=i[10]),s.required=!0,s.autofocus=!0},m(r,u){_(r,e,u),w(e,l),_(r,n,u),_(r,s,u),R(s,i[0]),s.focus(),p||(a=h(s,"input",i[8]),p=!0)},p(r,u){u&1024&&t!==(t=r[10])&&c(e,"for",t),u&1024&&o!==(o=r[10])&&c(s,"id",o),u&1&&s.value!==r[0]&&R(s,r[0])},d(r){r&&m(e),r&&m(n),r&&m(s),p=!1,a()}}}function Z(i){let e,l,t,n,s,o,p,a;return{c(){e=b("label"),l=y("New password confirm"),n=C(),s=b("input"),c(e,"for",t=i[10]),c(s,"type","password"),c(s,"id",o=i[10]),s.required=!0},m(r,u){_(r,e,u),w(e,l),_(r,n,u),_(r,s,u),R(s,i[1]),p||(a=h(s,"input",i[9]),p=!0)},p(r,u){u&1024&&t!==(t=r[10])&&c(e,"for",t),u&1024&&o!==(o=r[10])&&c(s,"id",o),u&2&&s.value!==r[1]&&R(s,r[1])},d(r){r&&m(e),r&&m(n),r&&m(s),p=!1,a()}}}function x(i){let e,l,t,n;const s=[V,Q],o=[];function p(a,r){return a[3]?0:1}return e=p(i),l=o[e]=s[e](i),{c(){l.c(),t=D()},m(a,r){o[e].m(a,r),_(a,t,r),n=!0},p(a,r){let u=e;e=p(a),e===u?o[e].p(a,r):(G(),q(o[u],1,1,()=>{o[u]=null}),I(),l=o[e],l?l.p(a,r):(l=o[e]=s[e](a),l.c()),P(l,1),l.m(t.parentNode,t))},i(a){n||(P(l),n=!0)},o(a){q(l),n=!1},d(a){o[e].d(a),a&&m(t)}}}function ee(i){let e,l;return e=new A({props:{nobranding:!0,$$slots:{default:[x]},$$scope:{ctx:i}}}),{c(){H(e.$$.fragment)},m(t,n){N(e,t,n),l=!0},p(t,[n]){const s={};n&2079&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){l||(P(e.$$.fragment,t),l=!0)},o(t){q(e.$$.fragment,t),l=!1},d(t){S(e,t)}}}function te(i,e,l){let t,{params:n}=e,s="",o="",p=!1,a=!1;async function r(){if(!p){l(2,p=!0);try{await z.Users.confirmPasswordReset(n==null?void 0:n.token,s,o),l(3,a=!0)}catch(k){z.errorResponseHandler(k)}l(2,p=!1)}}const u=()=>window.close();function v(){s=this.value,l(0,s)}function g(){o=this.value,l(1,o)}return i.$$set=k=>{"params"in k&&l(6,n=k.params)},i.$$.update=()=>{i.$$.dirty&64&&l(4,t=B.getJWTPayload(n==null?void 0:n.token).email||"")},[s,o,p,a,t,r,n,u,v,g]}class le extends W{constructor(e){super(),Y(this,e,te,ee,j,{params:6})}}export{le as default};
diff --git a/ui/dist/assets/PageUserConfirmVerification.062420a1.js b/ui/dist/assets/PageUserConfirmVerification.9c23f768.js
similarity index 97%
rename from ui/dist/assets/PageUserConfirmVerification.062420a1.js
rename to ui/dist/assets/PageUserConfirmVerification.9c23f768.js
index 2eb2832a..90ed2816 100644
--- a/ui/dist/assets/PageUserConfirmVerification.062420a1.js
+++ b/ui/dist/assets/PageUserConfirmVerification.9c23f768.js
@@ -1,3 +1,3 @@
-import{S as k,i as v,s as y,F as w,c as x,m as C,t as g,a as $,d as L,p as H,E as M,g as r,o as a,e as u,b as m,f,u as _,y as p}from"./index.15552609.js";function P(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div> 
+import{S as k,i as v,s as y,F as w,c as x,m as C,t as g,a as $,d as L,p as H,E as M,g as r,o as a,e as u,b as m,f,u as _,y as p}from"./index.6f2d3c23.js";function P(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div> 
             <div class="content txt-bold"><p>Invalid or expired verification token.</p></div>`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-danger"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(l,c){r(l,t,c),r(l,s,c),r(l,e,c),n||(i=_(e,"click",o[4]),n=!0)},p,d(l){l&&a(t),l&&a(s),l&&a(e),n=!1,i()}}}function S(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div> 
             <div class="content txt-bold"><p>Successfully verified email address.</p></div>`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(l,c){r(l,t,c),r(l,s,c),r(l,e,c),n||(i=_(e,"click",o[3]),n=!0)},p,d(l){l&&a(t),l&&a(s),l&&a(e),n=!1,i()}}}function T(o){let t;return{c(){t=u("div"),t.innerHTML='<div class="loader loader-lg"><em>Please wait...</em></div>',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function F(o){let t;function s(i,l){return i[1]?T:i[0]?S:P}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(i,l){n.m(i,l),r(i,t,l)},p(i,l){e===(e=s(i))&&n?n.p(i,l):(n.d(1),n=e(i),n&&(n.c(),n.m(t.parentNode,t)))},d(i){n.d(i),i&&a(t)}}}function U(o){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[F]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(t,e,n),s=!0},p(e,[n]){const i={};n&67&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){s||(g(t.$$.fragment,e),s=!0)},o(e){$(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function V(o,t,s){let{params:e}=t,n=!1,i=!1;l();async function l(){s(1,i=!0);try{await H.Users.confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch(d){console.warn(d),s(0,n=!1)}s(1,i=!1)}const c=()=>window.close(),b=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,i,e,c,b]}class E extends k{constructor(t){super(),v(this,t,V,U,y,{params:2})}}export{E as default};
diff --git a/ui/dist/assets/index.15552609.js b/ui/dist/assets/index.15552609.js
deleted file mode 100644
index c43b5a10..00000000
--- a/ui/dist/assets/index.15552609.js
+++ /dev/null
@@ -1,364 +0,0 @@
-const Hb=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 r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).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)}};Hb();function re(){}const Ul=n=>n;function ct(n,e){for(const t in e)n[t]=e[t];return n}function Rg(n){return n()}function gf(){return Object.create(null)}function rt(n){n.forEach(Rg)}function Jn(n){return typeof n=="function"}function Ae(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let rr;function ei(n,e){return rr||(rr=document.createElement("a")),rr.href=e,n===rr.href}function qb(n){return Object.keys(n).length===0}function jg(n,...e){if(n==null)return re;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function hn(n,e,t){n.$$.on_destroy.push(jg(e,t))}function Tn(n,e,t,i){if(n){const s=Hg(n,e,t,i);return n[0](s)}}function Hg(n,e,t,i){return n[1]&&i?ct(t.ctx.slice(),n[1](i(e))):t.ctx}function Dn(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=[],r=Math.max(e.dirty.length,s.length);for(let o=0;o<r;o+=1)l[o]=e.dirty[o]|s[o];return l}return e.dirty|s}return e.dirty}function An(n,e,t,i,s,l){if(s){const r=Hg(e,t,i,l);n.p(r,s)}}function En(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function di(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function Yt(n,e){const t={};e=new Set(e);for(const i in n)!e.has(i)&&i[0]!=="$"&&(t[i]=n[i]);return t}function _f(n){return n==null?"":n}function qg(n,e,t){return n.set(t),e}function Xe(n){return n&&Jn(n.destroy)?n.destroy:re}const Vg=typeof window!="undefined";let ko=Vg?()=>window.performance.now():()=>Date.now(),_u=Vg?n=>requestAnimationFrame(n):re;const Is=new Set;function zg(n){Is.forEach(e=>{e.c(n)||(Is.delete(e),e.f())}),Is.size!==0&&_u(zg)}function wo(n){let e;return Is.size===0&&_u(zg),{promise:new Promise(t=>{Is.add(e={c:n,f:t})}),abort(){Is.delete(e)}}}function m(n,e){n.appendChild(e)}function Bg(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function Vb(n){const e=_("style");return zb(Bg(n),e),e.sheet}function zb(n,e){m(n.head||n,e)}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode.removeChild(n)}function Bn(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function _(n){return document.createElement(n)}function H(n){return document.createTextNode(n)}function O(){return H(" ")}function lt(){return H("")}function X(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Kt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Un(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Ug(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 ci(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 Tt(n){return n===""?null:+n}function Bb(n){return Array.from(n.childNodes)}function _e(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function $e(n,e){n.value=e==null?"":e}function bf(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function Q(n,e,t){n.classList[t?"add":"remove"](e)}function Wg(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}const Zr=new Map;let xr=0;function Ub(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Wb(n,e){const t={stylesheet:Vb(e),rules:{}};return Zr.set(n,t),t}function Ll(n,e,t,i,s,l,r,o=0){const a=16.666/i;let u=`{
-`;for(let b=0;b<=1;b+=a){const v=e+(t-e)*l(b);u+=b*100+`%{${r(v,1-v)}}
-`}const f=u+`100% {${r(t,1-t)}}
-}`,c=`__svelte_${Ub(f)}_${o}`,d=Bg(n),{stylesheet:h,rules:g}=Zr.get(d)||Wb(d,n);g[c]||(g[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const y=n.style.animation||"";return n.style.animation=`${y?`${y}, `:""}${c} ${i}ms linear ${s}ms 1 both`,xr+=1,c}function Fl(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(", "),xr-=s,xr||Yb())}function Yb(){_u(()=>{xr||(Zr.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),Zr.clear())})}function Kb(n,e,t,i){if(!e)return re;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return re;const{delay:l=0,duration:r=300,easing:o=Ul,start:a=ko()+l,end:u=a+r,tick:f=re,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,g;function y(){c&&(g=Ll(n,0,1,r,l,o,c)),l||(h=!0)}function b(){c&&Fl(n,g),d=!1}return wo(v=>{if(!h&&v>=a&&(h=!0),h&&v>=u&&(f(1,0),b()),!d)return!1;if(h){const S=v-a,$=0+1*o(S/r);f($,1-$)}return!0}),y(),f(0,1),b}function Jb(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,Yg(n,s)}}function Yg(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 Il;function Sl(n){Il=n}function So(){if(!Il)throw new Error("Function called outside component initialization");return Il}function pi(n){So().$$.on_mount.push(n)}function Gb(n){So().$$.after_update.push(n)}function Zb(n){So().$$.on_destroy.push(n)}function _n(){const n=So();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Wg(e,t,{cancelable:i});return s.slice().forEach(r=>{r.call(n,l)}),!l.defaultPrevented}return!0}}function ut(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const _l=[],he=[],jr=[],Aa=[],Kg=Promise.resolve();let Ea=!1;function Jg(){Ea||(Ea=!0,Kg.then(Gg))}function Mi(){return Jg(),Kg}function Dt(n){jr.push(n)}function je(n){Aa.push(n)}const Ro=new Set;let or=0;function Gg(){const n=Il;do{for(;or<_l.length;){const e=_l[or];or++,Sl(e),xb(e.$$)}for(Sl(null),_l.length=0,or=0;he.length;)he.pop()();for(let e=0;e<jr.length;e+=1){const t=jr[e];Ro.has(t)||(Ro.add(t),t())}jr.length=0}while(_l.length);for(;Aa.length;)Aa.pop()();Ea=!1,Ro.clear(),Sl(n)}function xb(n){if(n.fragment!==null){n.update(),rt(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Dt)}}let nl;function bu(){return nl||(nl=Promise.resolve(),nl.then(()=>{nl=null})),nl}function fs(n,e,t){n.dispatchEvent(Wg(`${e?"intro":"outro"}${t}`))}const Hr=new Set;let ai;function Oe(){ai={r:0,c:[],p:ai}}function Te(){ai.r||rt(ai.c),ai=ai.p}function A(n,e){n&&n.i&&(Hr.delete(n),n.i(e))}function F(n,e,t,i){if(n&&n.o){if(Hr.has(n))return;Hr.add(n),ai.c.push(()=>{Hr.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const yu={duration:0};function vu(n,e,t){let i=e(n,t),s=!1,l,r,o=0;function a(){l&&Fl(n,l)}function u(){const{delay:c=0,duration:d=300,easing:h=Ul,tick:g=re,css:y}=i||yu;y&&(l=Ll(n,0,1,d,c,h,y,o++)),g(0,1);const b=ko()+c,v=b+d;r&&r.abort(),s=!0,Dt(()=>fs(n,!0,"start")),r=wo(S=>{if(s){if(S>=v)return g(1,0),fs(n,!0,"end"),a(),s=!1;if(S>=b){const $=h((S-b)/d);g($,1-$)}}return s})}let f=!1;return{start(){f||(f=!0,Fl(n),Jn(i)?(i=i(),bu().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function Zg(n,e,t){let i=e(n,t),s=!0,l;const r=ai;r.r+=1;function o(){const{delay:a=0,duration:u=300,easing:f=Ul,tick:c=re,css:d}=i||yu;d&&(l=Ll(n,1,0,u,a,f,d));const h=ko()+a,g=h+u;Dt(()=>fs(n,!1,"start")),wo(y=>{if(s){if(y>=g)return c(0,1),fs(n,!1,"end"),--r.r||rt(r.c),!1;if(y>=h){const b=f((y-h)/u);c(1-b,b)}}return s})}return Jn(i)?bu().then(()=>{i=i(),o()}):o(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&Fl(n,l),s=!1)}}}function ft(n,e,t,i){let s=e(n,t),l=i?0:1,r=null,o=null,a=null;function u(){a&&Fl(n,a)}function f(d,h){const g=d.b-l;return h*=Math.abs(g),{a:l,b:d.b,d:g,duration:h,start:d.start,end:d.start+h,group:d.group}}function c(d){const{delay:h=0,duration:g=300,easing:y=Ul,tick:b=re,css:v}=s||yu,S={start:ko()+h,b:d};d||(S.group=ai,ai.r+=1),r||o?o=S:(v&&(u(),a=Ll(n,l,d,g,h,y,v)),d&&b(0,1),r=f(S,g),Dt(()=>fs(n,d,"start")),wo($=>{if(o&&$>o.start&&(r=f(o,g),o=null,fs(n,r.b,"start"),v&&(u(),a=Ll(n,l,r.b,r.duration,0,y,s.css))),r){if($>=r.end)b(l=r.b,1-l),fs(n,r.b,"end"),o||(r.b?u():--r.group.r||rt(r.group.c)),r=null;else if($>=r.start){const C=$-r.start;l=r.a+r.d*y(C/r.duration),b(l,1-l)}}return!!(r||o)}))}return{run(d){Jn(s)?bu().then(()=>{s=s(),c(d)}):c(d)},end(){u(),r=o=null}}}function an(n,e){n.d(1),e.delete(n.key)}function Lt(n,e){F(n,1,1,()=>{e.delete(n.key)})}function Xb(n,e){n.f(),Lt(n,e)}function ot(n,e,t,i,s,l,r,o,a,u,f,c){let d=n.length,h=l.length,g=d;const y={};for(;g--;)y[n[g].key]=g;const b=[],v=new Map,S=new Map;for(g=h;g--;){const T=c(s,l,g),E=t(T);let D=r.get(E);D?i&&D.p(T,e):(D=u(E,T),D.c()),v.set(E,b[g]=D),E in y&&S.set(E,Math.abs(g-y[E]))}const $=new Set,C=new Set;function M(T){A(T,1),T.m(o,f),r.set(T.key,T),f=T.first,h--}for(;d&&h;){const T=b[h-1],E=n[d-1],D=T.key,P=E.key;T===E?(f=T.first,d--,h--):v.has(P)?!r.has(D)||$.has(D)?M(T):C.has(P)?d--:S.get(D)>S.get(P)?(C.add(D),M(T)):($.add(P),d--):(a(E,r),d--)}for(;d--;){const T=n[d];v.has(T.key)||a(T,r)}for(;h;)M(b[h-1]);return b}function bn(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const r=n[l],o=e[l];if(o){for(const a in r)a in o||(i[a]=1);for(const a in o)s[a]||(t[a]=o[a],s[a]=1);n[l]=o}else for(const a in r)s[a]=1}for(const r in i)r in t||(t[r]=void 0);return t}function hi(n){return typeof n=="object"&&n!==null?n:{}}function Re(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function B(n){n&&n.c()}function V(n,e,t,i){const{fragment:s,on_mount:l,on_destroy:r,after_update:o}=n.$$;s&&s.m(e,t),i||Dt(()=>{const a=l.map(Rg).filter(Jn);r?r.push(...a):rt(a),n.$$.on_mount=[]}),o.forEach(Dt)}function z(n,e){const t=n.$$;t.fragment!==null&&(rt(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Qb(n,e){n.$$.dirty[0]===-1&&(_l.push(n),Jg(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function Le(n,e,t,i,s,l,r,o=[-1]){const a=Il;Sl(n);const u=n.$$={fragment:null,ctx:null,props:l,update:re,not_equal:s,bound:gf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:gf(),dirty:o,skip_bound:!1,root:e.target||a.$$.root};r&&r(u.root);let f=!1;if(u.ctx=t?t(n,e.props||{},(c,d,...h)=>{const g=h.length?h[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=g)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](g),f&&Qb(n,c)),d}):[],u.update(),f=!0,rt(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=Bb(e.target);u.fragment&&u.fragment.l(c),c.forEach(k)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),V(n,e.target,e.anchor,e.customElement),Gg()}Sl(a)}class Fe{$destroy(){z(this,1),this.$destroy=re}$on(e,t){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&&!qb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function nn(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<n.conditions.length;t++)if(!n.conditions[t]||typeof n.conditions[t]!="function")throw Error("Invalid parameter conditions["+t+"]")}return n.loadingComponent&&(n.asyncComponent.loading=n.loadingComponent,n.asyncComponent.loadingParams=n.loadingParams||void 0),{component:n.asyncComponent,userData:n.userData,conditions:n.conditions&&n.conditions.length?n.conditions:void 0,props:n.props&&Object.keys(n.props).length?n.props:{},_sveltesparouter:!0}}const Cs=[];function xg(n,e){return{subscribe:Oi(n,e).subscribe}}function Oi(n,e=re){let t;const i=new Set;function s(o){if(Ae(n,o)&&(n=o,t)){const a=!Cs.length;for(const u of i)u[1](),Cs.push(u,n);if(a){for(let u=0;u<Cs.length;u+=2)Cs[u][0](Cs[u+1]);Cs.length=0}}}function l(o){s(o(n))}function r(o,a=re){const u=[o,a];return i.add(u),i.size===1&&(t=e(s)||re),o(n),()=>{i.delete(u),i.size===0&&(t(),t=null)}}return{set:s,update:l,subscribe:r}}function Xg(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return xg(t,r=>{let o=!1;const a=[];let u=0,f=re;const c=()=>{if(u)return;f();const h=e(i?a[0]:a,r);l?r(h):f=Jn(h)?h:re},d=s.map((h,g)=>jg(h,y=>{a[g]=y,u&=~(1<<g),o&&c()},()=>{u|=1<<g}));return o=!0,c(),function(){rt(d),f()}})}function Qg(n,e){if(n instanceof RegExp)return{keys:!1,pattern:n};var t,i,s,l,r=[],o="",a=n.split("/");for(a[0]||a.shift();s=a.shift();)t=s[0],t==="*"?(r.push("wild"),o+="/(.*)"):t===":"?(i=s.indexOf("?",1),l=s.indexOf(".",1),r.push(s.substring(1,~i?i:~l?l:s.length)),o+=!!~i&&!~l?"(?:/([^/]+?))?":"/([^/]+?)",~l&&(o+=(~i?"?":"")+"\\"+s.substring(l))):o+="/"+s;return{keys:r,pattern:new RegExp("^"+o+(e?"(?=$|/)":"/?$"),"i")}}function e1(n){let e,t,i;const s=[n[2]];var l=n[0];function r(o){let a={};for(let u=0;u<s.length;u+=1)a=ct(a,s[u]);return{props:a}}return l&&(e=new l(r()),e.$on("routeEvent",n[7])),{c(){e&&B(e.$$.fragment),t=lt()},m(o,a){e&&V(e,o,a),w(o,t,a),i=!0},p(o,a){const u=a&4?bn(s,[hi(o[2])]):{};if(l!==(l=o[0])){if(e){Oe();const f=e;F(f.$$.fragment,1,0,()=>{z(f,1)}),Te()}l?(e=new l(r()),e.$on("routeEvent",o[7]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&F(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&z(e,o)}}}function t1(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function r(o){let a={};for(let u=0;u<s.length;u+=1)a=ct(a,s[u]);return{props:a}}return l&&(e=new l(r()),e.$on("routeEvent",n[6])),{c(){e&&B(e.$$.fragment),t=lt()},m(o,a){e&&V(e,o,a),w(o,t,a),i=!0},p(o,a){const u=a&6?bn(s,[a&2&&{params:o[1]},a&4&&hi(o[2])]):{};if(l!==(l=o[0])){if(e){Oe();const f=e;F(f.$$.fragment,1,0,()=>{z(f,1)}),Te()}l?(e=new l(r()),e.$on("routeEvent",o[6]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&F(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&z(e,o)}}}function n1(n){let e,t,i,s;const l=[t1,e1],r=[];function o(a,u){return a[1]?0:1}return e=o(n),t=r[e]=l[e](n),{c(){t.c(),i=lt()},m(a,u){r[e].m(a,u),w(a,i,u),s=!0},p(a,[u]){let f=e;e=o(a),e===f?r[e].p(a,u):(Oe(),F(r[f],1,1,()=>{r[f]=null}),Te(),t=r[e],t?t.p(a,u):(t=r[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){F(t),s=!1},d(a){r[e].d(a),a&&k(i)}}}function yf(){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 $o=xg(null,function(e){e(yf());const t=()=>{e(yf())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});Xg($o,n=>n.location);Xg($o,n=>n.querystring);const vf=Oi(void 0);async function Gs(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await Mi();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 Mn(n,e){if(e=wf(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with <a> tags');return kf(n,e),{update(t){t=wf(t),kf(n,t)}}}function kf(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||i1(i.currentTarget.getAttribute("href"))})}function wf(n){return n&&typeof n=="string"?{href:n}:n||{}}function i1(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0,void 0),window.location.hash=n}function s1(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class r{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:E,keys:D}=Qg(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=E,this._keys=D}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 E={};let D=0;for(;D<this._keys.length;){try{E[this._keys[D]]=decodeURIComponent(T[D+1]||"")||null}catch{E[this._keys[D]]=null}D++}return E}async checkConditions(M){for(let T=0;T<this.conditions.length;T++)if(!await this.conditions[T](M))return!1;return!0}}const o=[];i instanceof Map?i.forEach((C,M)=>{o.push(new r(M,C))}):Object.keys(i).forEach(C=>{o.push(new r(C,i[C]))});let a=null,u=null,f={};const c=_n();async function d(C,M){await Mi(),c(C,M)}let h=null,g=null;l&&(g=C=>{C.state&&C.state.__svelte_spa_router_scrollY?h=C.state:h=null},window.addEventListener("popstate",g),Gb(()=>{h?window.scrollTo(h.__svelte_spa_router_scrollX,h.__svelte_spa_router_scrollY):window.scrollTo(0,0)}));let y=null,b=null;const v=$o.subscribe(async C=>{y=C;let M=0;for(;M<o.length;){const T=o[M].match(C.location);if(!T){M++;continue}const E={route:o[M].path,location:C.location,querystring:C.querystring,userData:o[M].userData,params:T&&typeof T=="object"&&Object.keys(T).length?T:null};if(!await o[M].checkConditions(E)){t(0,a=null),b=null,d("conditionsFailed",E);return}d("routeLoading",Object.assign({},E));const D=o[M].component;if(b!=D){D.loading?(t(0,a=D.loading),b=D,t(1,u=D.loadingParams),t(2,f={}),d("routeLoaded",Object.assign({},E,{component:a,name:a.name,params:u}))):(t(0,a=null),b=null);const P=await D();if(C!=y)return;t(0,a=P&&P.default||P),b=D}T&&typeof T=="object"&&Object.keys(T).length?t(1,u=T):t(1,u=null),t(2,f=o[M].props),d("routeLoaded",Object.assign({},E,{component:a,name:a.name,params:u})).then(()=>{vf.set(u)});return}t(0,a=null),b=null,vf.set(void 0)});Zb(()=>{v(),g&&window.removeEventListener("popstate",g)});function S(C){ut.call(this,n,C)}function $(C){ut.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,S,$]}class l1 extends Fe{constructor(e){super(),Le(this,e,s1,n1,Ae,{routes:3,prefix:4,restoreScrollState:5})}}const qr=[];let e_;function t_(n){const e=n.pattern.test(e_);Sf(n,n.className,e),Sf(n,n.inactiveClassName,!e)}function Sf(n,e,t){(e||"").split(" ").forEach(i=>{!i||(n.node.classList.remove(i),t&&n.node.classList.add(i))})}$o.subscribe(n=>{e_=n.location+(n.querystring?"?"+n.querystring:""),qr.map(t_)});function oi(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"?Qg(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return qr.push(i),t_(i),{destroy(){qr.splice(qr.indexOf(i),1)}}}const r1="modulepreload",$f={},o1="/_/",rs=function(e,t){return!t||t.length===0?e():Promise.all(t.map(i=>{if(i=`${o1}${i}`,i in $f)return;$f[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${l}`))return;const r=document.createElement("link");if(r.rel=s?"stylesheet":r1,s||(r.as="script",r.crossOrigin=""),r.href=i,document.head.appendChild(r),s)return new Promise((o,a)=>{r.addEventListener("load",o),r.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())};function a1(n){if(n.__esModule)return n;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(n).forEach(function(t){var i=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:function(){return n[t]}})}),e}var Pa={exports:{}},n_=function(n,e){return function(){for(var t=new Array(arguments.length),i=0;i<t.length;i++)t[i]=arguments[i];return n.apply(e,t)}},u1=n_,as=Object.prototype.toString;function La(n){return as.call(n)==="[object Array]"}function jo(n){return n===void 0}function Cf(n){return n!==null&&typeof n=="object"}function ar(n){if(as.call(n)!=="[object Object]")return!1;var e=Object.getPrototypeOf(n);return e===null||e===Object.prototype}function Mf(n){return as.call(n)==="[object Function]"}function Ho(n,e){if(n!=null)if(typeof n!="object"&&(n=[n]),La(n))for(var t=0,i=n.length;t<i;t++)e.call(null,n[t],t,n);else for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.call(null,n[s],s,n)}var Fn={isArray:La,isArrayBuffer:function(n){return as.call(n)==="[object ArrayBuffer]"},isBuffer:function(n){return n!==null&&!jo(n)&&n.constructor!==null&&!jo(n.constructor)&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)},isFormData:function(n){return typeof FormData!="undefined"&&n instanceof FormData},isArrayBufferView:function(n){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer&&n.buffer instanceof ArrayBuffer},isString:function(n){return typeof n=="string"},isNumber:function(n){return typeof n=="number"},isObject:Cf,isPlainObject:ar,isUndefined:jo,isDate:function(n){return as.call(n)==="[object Date]"},isFile:function(n){return as.call(n)==="[object File]"},isBlob:function(n){return as.call(n)==="[object Blob]"},isFunction:Mf,isStream:function(n){return Cf(n)&&Mf(n.pipe)},isURLSearchParams:function(n){return typeof URLSearchParams!="undefined"&&n instanceof URLSearchParams},isStandardBrowserEnv:function(){return(typeof navigator=="undefined"||navigator.product!=="ReactNative"&&navigator.product!=="NativeScript"&&navigator.product!=="NS")&&typeof window!="undefined"&&typeof document!="undefined"},forEach:Ho,merge:function n(){var e={};function t(l,r){ar(e[r])&&ar(l)?e[r]=n(e[r],l):ar(l)?e[r]=n({},l):La(l)?e[r]=l.slice():e[r]=l}for(var i=0,s=arguments.length;i<s;i++)Ho(arguments[i],t);return e},extend:function(n,e,t){return Ho(e,function(i,s){n[s]=t&&typeof i=="function"?u1(i,t):i}),n},trim:function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")},stripBOM:function(n){return n.charCodeAt(0)===65279&&(n=n.slice(1)),n}},Ms=Fn;function Of(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i_=function(n,e,t){if(!e)return n;var i;if(t)i=t(e);else if(Ms.isURLSearchParams(e))i=e.toString();else{var s=[];Ms.forEach(e,function(r,o){r!=null&&(Ms.isArray(r)?o+="[]":r=[r],Ms.forEach(r,function(a){Ms.isDate(a)?a=a.toISOString():Ms.isObject(a)&&(a=JSON.stringify(a)),s.push(Of(o)+"="+Of(a))}))}),i=s.join("&")}if(i){var l=n.indexOf("#");l!==-1&&(n=n.slice(0,l)),n+=(n.indexOf("?")===-1?"?":"&")+i}return n},f1=Fn;function Vr(){this.handlers=[]}Vr.prototype.use=function(n,e,t){return this.handlers.push({fulfilled:n,rejected:e,synchronous:!!t&&t.synchronous,runWhen:t?t.runWhen:null}),this.handlers.length-1},Vr.prototype.eject=function(n){this.handlers[n]&&(this.handlers[n]=null)},Vr.prototype.forEach=function(n){f1.forEach(this.handlers,function(e){e!==null&&n(e)})};var c1=Vr,d1=Fn,s_=function(n,e,t,i,s){return n.config=e,t&&(n.code=t),n.request=i,n.response=s,n.isAxiosError=!0,n.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},n},p1=s_,l_=function(n,e,t,i,s){var l=new Error(n);return p1(l,e,t,i,s)},h1=l_,ur=Fn,m1=ur.isStandardBrowserEnv()?{write:function(n,e,t,i,s,l){var r=[];r.push(n+"="+encodeURIComponent(e)),ur.isNumber(t)&&r.push("expires="+new Date(t).toGMTString()),ur.isString(i)&&r.push("path="+i),ur.isString(s)&&r.push("domain="+s),l===!0&&r.push("secure"),document.cookie=r.join("; ")},read:function(n){var e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},g1=function(n){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(n)},_1=function(n,e){return e?n.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):n},qo=Fn,b1=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Tf=Fn,y1=Tf.isStandardBrowserEnv()?function(){var n,e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");function i(s){var l=s;return e&&(t.setAttribute("href",l),l=t.href),t.setAttribute("href",l),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=i(window.location.href),function(s){var l=Tf.isString(s)?i(s):s;return l.protocol===n.protocol&&l.host===n.host}}():function(){return!0},fr=Fn,v1=function(n,e,t){var i=t.config.validateStatus;t.status&&i&&!i(t.status)?e(h1("Request failed with status code "+t.status,t.config,null,t.request,t)):n(t)},k1=m1,w1=i_,S1=function(n,e){return n&&!g1(e)?_1(n,e):e},$1=function(n){var e,t,i,s={};return n&&qo.forEach(n.split(`
-`),function(l){if(i=l.indexOf(":"),e=qo.trim(l.substr(0,i)).toLowerCase(),t=qo.trim(l.substr(i+1)),e){if(s[e]&&b1.indexOf(e)>=0)return;s[e]=e==="set-cookie"?(s[e]?s[e]:[]).concat([t]):s[e]?s[e]+", "+t:t}}),s},C1=y1,Vo=l_,M1=function(n){return new Promise(function(e,t){var i=n.data,s=n.headers,l=n.responseType;fr.isFormData(i)&&delete s["Content-Type"];var r=new XMLHttpRequest;if(n.auth){var o=n.auth.username||"",a=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";s.Authorization="Basic "+btoa(o+":"+a)}var u=S1(n.baseURL,n.url);function f(){if(r){var d="getAllResponseHeaders"in r?$1(r.getAllResponseHeaders()):null,h={data:l&&l!=="text"&&l!=="json"?r.response:r.responseText,status:r.status,statusText:r.statusText,headers:d,config:n,request:r};v1(e,t,h),r=null}}if(r.open(n.method.toUpperCase(),w1(u,n.params,n.paramsSerializer),!0),r.timeout=n.timeout,"onloadend"in r?r.onloadend=f:r.onreadystatechange=function(){r&&r.readyState===4&&(r.status!==0||r.responseURL&&r.responseURL.indexOf("file:")===0)&&setTimeout(f)},r.onabort=function(){r&&(t(Vo("Request aborted",n,"ECONNABORTED",r)),r=null)},r.onerror=function(){t(Vo("Network Error",n,null,r)),r=null},r.ontimeout=function(){var d="timeout of "+n.timeout+"ms exceeded";n.timeoutErrorMessage&&(d=n.timeoutErrorMessage),t(Vo(d,n,n.transitional&&n.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",r)),r=null},fr.isStandardBrowserEnv()){var c=(n.withCredentials||C1(u))&&n.xsrfCookieName?k1.read(n.xsrfCookieName):void 0;c&&(s[n.xsrfHeaderName]=c)}"setRequestHeader"in r&&fr.forEach(s,function(d,h){i===void 0&&h.toLowerCase()==="content-type"?delete s[h]:r.setRequestHeader(h,d)}),fr.isUndefined(n.withCredentials)||(r.withCredentials=!!n.withCredentials),l&&l!=="json"&&(r.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&r.addEventListener("progress",n.onDownloadProgress),typeof n.onUploadProgress=="function"&&r.upload&&r.upload.addEventListener("progress",n.onUploadProgress),n.cancelToken&&n.cancelToken.promise.then(function(d){r&&(r.abort(),t(d),r=null)}),i||(i=null),r.send(i)})},Xt=Fn,Df=function(n,e){d1.forEach(n,function(t,i){i!==e&&i.toUpperCase()===e.toUpperCase()&&(n[e]=t,delete n[i])})},O1=s_,T1={"Content-Type":"application/x-www-form-urlencoded"};function Af(n,e){!Xt.isUndefined(n)&&Xt.isUndefined(n["Content-Type"])&&(n["Content-Type"]=e)}var Ef,zr={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:((typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(Ef=M1),Ef),transformRequest:[function(n,e){return Df(e,"Accept"),Df(e,"Content-Type"),Xt.isFormData(n)||Xt.isArrayBuffer(n)||Xt.isBuffer(n)||Xt.isStream(n)||Xt.isFile(n)||Xt.isBlob(n)?n:Xt.isArrayBufferView(n)?n.buffer:Xt.isURLSearchParams(n)?(Af(e,"application/x-www-form-urlencoded;charset=utf-8"),n.toString()):Xt.isObject(n)||e&&e["Content-Type"]==="application/json"?(Af(e,"application/json"),function(t,i,s){if(Xt.isString(t))try{return(i||JSON.parse)(t),Xt.trim(t)}catch(l){if(l.name!=="SyntaxError")throw l}return(s||JSON.stringify)(t)}(n)):n}],transformResponse:[function(n){var e=this.transitional,t=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,s=!t&&this.responseType==="json";if(s||i&&Xt.isString(n)&&n.length)try{return JSON.parse(n)}catch(l){if(s)throw l.name==="SyntaxError"?O1(l,this,"E_JSON_PARSE"):l}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(n){return n>=200&&n<300}};zr.headers={common:{Accept:"application/json, text/plain, */*"}},Xt.forEach(["delete","get","head"],function(n){zr.headers[n]={}}),Xt.forEach(["post","put","patch"],function(n){zr.headers[n]=Xt.merge(T1)});var ku=zr,D1=Fn,A1=ku,r_=function(n){return!(!n||!n.__CANCEL__)},Pf=Fn,zo=function(n,e,t){var i=this||A1;return D1.forEach(t,function(s){n=s.call(i,n,e)}),n},E1=r_,P1=ku;function Bo(n){n.cancelToken&&n.cancelToken.throwIfRequested()}var sn=Fn,o_=function(n,e){e=e||{};var t={},i=["url","method","data"],s=["headers","auth","proxy","params"],l=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],r=["validateStatus"];function o(c,d){return sn.isPlainObject(c)&&sn.isPlainObject(d)?sn.merge(c,d):sn.isPlainObject(d)?sn.merge({},d):sn.isArray(d)?d.slice():d}function a(c){sn.isUndefined(e[c])?sn.isUndefined(n[c])||(t[c]=o(void 0,n[c])):t[c]=o(n[c],e[c])}sn.forEach(i,function(c){sn.isUndefined(e[c])||(t[c]=o(void 0,e[c]))}),sn.forEach(s,a),sn.forEach(l,function(c){sn.isUndefined(e[c])?sn.isUndefined(n[c])||(t[c]=o(void 0,n[c])):t[c]=o(void 0,e[c])}),sn.forEach(r,function(c){c in e?t[c]=o(n[c],e[c]):c in n&&(t[c]=o(void 0,n[c]))});var u=i.concat(s).concat(l).concat(r),f=Object.keys(n).concat(Object.keys(e)).filter(function(c){return u.indexOf(c)===-1});return sn.forEach(f,a),t},a_={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]},wu={};["object","boolean","number","function","string","symbol"].forEach(function(n,e){wu[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});var Lf={},L1=a_.version.split(".");function u_(n,e){for(var t=e?e.split("."):L1,i=n.split("."),s=0;s<3;s++){if(t[s]>i[s])return!0;if(t[s]<i[s])return!1}return!1}wu.transitional=function(n,e,t){var i=e&&u_(e);function s(l,r){return"[Axios v"+a_.version+"] Transitional option '"+l+"'"+r+(t?". "+t:"")}return function(l,r,o){if(n===!1)throw new Error(s(r," has been removed in "+e));return i&&!Lf[r]&&(Lf[r]=!0,console.warn(s(r," has been deprecated since v"+e+" and will be removed in the near future"))),!n||n(l,r,o)}};var F1={isOlderVersion:u_,assertOptions:function(n,e,t){if(typeof n!="object")throw new TypeError("options must be an object");for(var i=Object.keys(n),s=i.length;s-- >0;){var l=i[s],r=e[l];if(r){var o=n[l],a=o===void 0||r(o,l,n);if(a!==!0)throw new TypeError("option "+l+" must be "+a)}else if(t!==!0)throw Error("Unknown option "+l)}},validators:wu},Ff=Fn,I1=i_,If=c1,Nf=function(n){return Bo(n),n.headers=n.headers||{},n.data=zo.call(n,n.data,n.headers,n.transformRequest),n.headers=Pf.merge(n.headers.common||{},n.headers[n.method]||{},n.headers),Pf.forEach(["delete","get","head","post","put","patch","common"],function(e){delete n.headers[e]}),(n.adapter||P1.adapter)(n).then(function(e){return Bo(n),e.data=zo.call(n,e.data,e.headers,n.transformResponse),e},function(e){return E1(e)||(Bo(n),e&&e.response&&(e.response.data=zo.call(n,e.response.data,e.response.headers,n.transformResponse))),Promise.reject(e)})},cr=o_,f_=F1,Os=f_.validators;function bl(n){this.defaults=n,this.interceptors={request:new If,response:new If}}bl.prototype.request=function(n){typeof n=="string"?(n=arguments[1]||{}).url=arguments[0]:n=n||{},(n=cr(this.defaults,n)).method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var e=n.transitional;e!==void 0&&f_.assertOptions(e,{silentJSONParsing:Os.transitional(Os.boolean,"1.0.0"),forcedJSONParsing:Os.transitional(Os.boolean,"1.0.0"),clarifyTimeoutError:Os.transitional(Os.boolean,"1.0.0")},!1);var t=[],i=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(n)===!1||(i=i&&f.synchronous,t.unshift(f.fulfilled,f.rejected))});var s,l=[];if(this.interceptors.response.forEach(function(f){l.push(f.fulfilled,f.rejected)}),!i){var r=[Nf,void 0];for(Array.prototype.unshift.apply(r,t),r=r.concat(l),s=Promise.resolve(n);r.length;)s=s.then(r.shift(),r.shift());return s}for(var o=n;t.length;){var a=t.shift(),u=t.shift();try{o=a(o)}catch(f){u(f);break}}try{s=Nf(o)}catch(f){return Promise.reject(f)}for(;l.length;)s=s.then(l.shift(),l.shift());return s},bl.prototype.getUri=function(n){return n=cr(this.defaults,n),I1(n.url,n.params,n.paramsSerializer).replace(/^\?/,"")},Ff.forEach(["delete","get","head","options"],function(n){bl.prototype[n]=function(e,t){return this.request(cr(t||{},{method:n,url:e,data:(t||{}).data}))}}),Ff.forEach(["post","put","patch"],function(n){bl.prototype[n]=function(e,t,i){return this.request(cr(i||{},{method:n,url:e,data:t}))}});var N1=bl;function Fa(n){this.message=n}Fa.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Fa.prototype.__CANCEL__=!0;var c_=Fa,R1=c_;function Br(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(i){e=i});var t=this;n(function(i){t.reason||(t.reason=new R1(i),e(t.reason))})}Br.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Br.source=function(){var n;return{token:new Br(function(e){n=e}),cancel:n}};var j1=Br,Rf=Fn,H1=n_,Ur=N1,q1=o_;function d_(n){var e=new Ur(n),t=H1(Ur.prototype.request,e);return Rf.extend(t,Ur.prototype,e),Rf.extend(t,e),t}var Gn=d_(ku);Gn.Axios=Ur,Gn.create=function(n){return d_(q1(Gn.defaults,n))},Gn.Cancel=c_,Gn.CancelToken=j1,Gn.isCancel=r_,Gn.all=function(n){return Promise.all(n)},Gn.spread=function(n){return function(e){return n.apply(null,e)}},Gn.isAxiosError=function(n){return typeof n=="object"&&n.isAxiosError===!0},Pa.exports=Gn,Pa.exports.default=Gn;var Uo=Pa.exports,jf=typeof Symbol!="undefined"&&Symbol,V1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},e=Symbol("test"),t=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(t)!=="[object Symbol]")return!1;for(e in n[e]=42,n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var i=Object.getOwnPropertySymbols(n);if(i.length!==1||i[0]!==e||!Object.prototype.propertyIsEnumerable.call(n,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(n,e);if(s.value!==42||s.enumerable!==!0)return!1}return!0},z1="Function.prototype.bind called on incompatible ",Wo=Array.prototype.slice,B1=Object.prototype.toString,U1=function(n){var e=this;if(typeof e!="function"||B1.call(e)!=="[object Function]")throw new TypeError(z1+e);for(var t,i=Wo.call(arguments,1),s=function(){if(this instanceof t){var u=e.apply(this,i.concat(Wo.call(arguments)));return Object(u)===u?u:this}return e.apply(n,i.concat(Wo.call(arguments)))},l=Math.max(0,e.length-i.length),r=[],o=0;o<l;o++)r.push("$"+o);if(t=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")(s),e.prototype){var a=function(){};a.prototype=e.prototype,t.prototype=new a,a.prototype=null}return t},Su=Function.prototype.bind||U1,W1=Su.call(Function.call,Object.prototype.hasOwnProperty),zs=SyntaxError,p_=Function,Ns=TypeError,Yo=function(n){try{return p_('"use strict"; return ('+n+").constructor;")()}catch{}},cs=Object.getOwnPropertyDescriptor;if(cs)try{cs({},"")}catch{cs=null}var Ko=function(){throw new Ns},Y1=cs?function(){try{return Ko}catch{try{return cs(arguments,"callee").get}catch{return Ko}}}():Ko,Ts=typeof jf=="function"&&typeof Symbol=="function"&&typeof jf("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&V1(),Pi=Object.getPrototypeOf||function(n){return n.__proto__},Ls={},K1=typeof Uint8Array=="undefined"?void 0:Pi(Uint8Array),Rs={"%AggregateError%":typeof AggregateError=="undefined"?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":Ts?Pi([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":Ls,"%AsyncGenerator%":Ls,"%AsyncGeneratorFunction%":Ls,"%AsyncIteratorPrototype%":Ls,"%Atomics%":typeof Atomics=="undefined"?void 0:Atomics,"%BigInt%":typeof BigInt=="undefined"?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?void 0:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?void 0:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?void 0:FinalizationRegistry,"%Function%":p_,"%GeneratorFunction%":Ls,"%Int8Array%":typeof Int8Array=="undefined"?void 0:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?void 0:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ts?Pi(Pi([][Symbol.iterator]())):void 0,"%JSON%":typeof JSON=="object"?JSON:void 0,"%Map%":typeof Map=="undefined"?void 0:Map,"%MapIteratorPrototype%":typeof Map!="undefined"&&Ts?Pi(new Map()[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?void 0:Promise,"%Proxy%":typeof Proxy=="undefined"?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?void 0:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?void 0:Set,"%SetIteratorPrototype%":typeof Set!="undefined"&&Ts?Pi(new Set()[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ts?Pi(""[Symbol.iterator]()):void 0,"%Symbol%":Ts?Symbol:void 0,"%SyntaxError%":zs,"%ThrowTypeError%":Y1,"%TypedArray%":K1,"%TypeError%":Ns,"%Uint8Array%":typeof Uint8Array=="undefined"?void 0:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?void 0:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?void 0:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?void 0:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?void 0:WeakSet},J1=function n(e){var t;if(e==="%AsyncFunction%")t=Yo("async function () {}");else if(e==="%GeneratorFunction%")t=Yo("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Yo("async function* () {}");else if(e==="%AsyncGenerator%"){var i=n("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&(t=Pi(s.prototype))}return Rs[e]=t,t},Hf={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Wl=Su,Xr=W1,G1=Wl.call(Function.call,Array.prototype.concat),Z1=Wl.call(Function.apply,Array.prototype.splice),qf=Wl.call(Function.call,String.prototype.replace),Qr=Wl.call(Function.call,String.prototype.slice),x1=Wl.call(Function.call,RegExp.prototype.exec),X1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q1=/\\(\\)?/g,ey=function(n){var e=Qr(n,0,1),t=Qr(n,-1);if(e==="%"&&t!=="%")throw new zs("invalid intrinsic syntax, expected closing `%`");if(t==="%"&&e!=="%")throw new zs("invalid intrinsic syntax, expected opening `%`");var i=[];return qf(n,X1,function(s,l,r,o){i[i.length]=r?qf(o,Q1,"$1"):l||s}),i},ty=function(n,e){var t,i=n;if(Xr(Hf,i)&&(i="%"+(t=Hf[i])[0]+"%"),Xr(Rs,i)){var s=Rs[i];if(s===Ls&&(s=J1(i)),s===void 0&&!e)throw new Ns("intrinsic "+n+" exists, but is not available. Please file an issue!");return{alias:t,name:i,value:s}}throw new zs("intrinsic "+n+" does not exist!")},$u=function(n,e){if(typeof n!="string"||n.length===0)throw new Ns("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Ns('"allowMissing" argument must be a boolean');if(x1(/^%?[^%]*%?$/g,n)===null)throw new zs("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=ey(n),i=t.length>0?t[0]:"",s=ty("%"+i+"%",e),l=s.name,r=s.value,o=!1,a=s.alias;a&&(i=a[0],Z1(t,G1([0,1],a)));for(var u=1,f=!0;u<t.length;u+=1){var c=t[u],d=Qr(c,0,1),h=Qr(c,-1);if((d==='"'||d==="'"||d==="`"||h==='"'||h==="'"||h==="`")&&d!==h)throw new zs("property names with quotes must have matching quotes");if(c!=="constructor"&&f||(o=!0),Xr(Rs,l="%"+(i+="."+c)+"%"))r=Rs[l];else if(r!=null){if(!(c in r)){if(!e)throw new Ns("base intrinsic for "+n+" exists, but the property is not available.");return}if(cs&&u+1>=t.length){var g=cs(r,c);r=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:r[c]}else f=Xr(r,c),r=r[c];f&&!o&&(Rs[l]=r)}}return r},h_={exports:{}};(function(n){var e=Su,t=$u,i=t("%Function.prototype.apply%"),s=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(s,i),r=t("%Object.getOwnPropertyDescriptor%",!0),o=t("%Object.defineProperty%",!0),a=t("%Math.max%");if(o)try{o({},"a",{value:1})}catch{o=null}n.exports=function(f){var c=l(e,s,arguments);if(r&&o){var d=r(c,"length");d.configurable&&o(c,"length",{value:1+a(0,f.length-(arguments.length-1))})}return c};var u=function(){return l(e,i,arguments)};o?o(n.exports,"apply",{value:u}):n.exports.apply=u})(h_);var m_=$u,g_=h_.exports,ny=g_(m_("String.prototype.indexOf")),iy=a1(Object.freeze({__proto__:null,default:{}})),Cu=typeof Map=="function"&&Map.prototype,Jo=Object.getOwnPropertyDescriptor&&Cu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,dr=Cu&&Jo&&typeof Jo.get=="function"?Jo.get:null,sy=Cu&&Map.prototype.forEach,Mu=typeof Set=="function"&&Set.prototype,Go=Object.getOwnPropertyDescriptor&&Mu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,pr=Mu&&Go&&typeof Go.get=="function"?Go.get:null,ly=Mu&&Set.prototype.forEach,il=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,sl=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,Vf=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,ry=Boolean.prototype.valueOf,oy=Object.prototype.toString,ay=Function.prototype.toString,uy=String.prototype.match,Ou=String.prototype.slice,ji=String.prototype.replace,fy=String.prototype.toUpperCase,zf=String.prototype.toLowerCase,__=RegExp.prototype.test,Bf=Array.prototype.concat,ri=Array.prototype.join,cy=Array.prototype.slice,Uf=Math.floor,Zo=typeof BigInt=="function"?BigInt.prototype.valueOf:null,xo=Object.getOwnPropertySymbols,Ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Bs=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ln=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Bs||"symbol")?Symbol.toStringTag:null,b_=Object.prototype.propertyIsEnumerable,Wf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function Yf(n,e){if(n===1/0||n===-1/0||n!=n||n&&n>-1e3&&n<1e3||__.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var i=n<0?-Uf(-n):Uf(n);if(i!==n){var s=String(i),l=Ou.call(e,s.length+1);return ji.call(s,t,"$&_")+"."+ji.call(ji.call(l,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ji.call(e,t,"$&_")}var Na=iy,Kf=Na.custom,Jf=v_(Kf)?Kf:null;function y_(n,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+n+i}function dy(n){return ji.call(String(n),/"/g,"&quot;")}function Ra(n){return!(Fi(n)!=="[object Array]"||ln&&typeof n=="object"&&ln in n)}function Gf(n){return!(Fi(n)!=="[object RegExp]"||ln&&typeof n=="object"&&ln in n)}function v_(n){if(Bs)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!Ia)return!1;try{return Ia.call(n),!0}catch{}return!1}var py=Object.prototype.hasOwnProperty||function(n){return n in this};function Li(n,e){return py.call(n,e)}function Fi(n){return oy.call(n)}function Zf(n,e){if(n.indexOf)return n.indexOf(e);for(var t=0,i=n.length;t<i;t++)if(n[t]===e)return t;return-1}function k_(n,e){if(n.length>e.maxStringLength){var t=n.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return k_(Ou.call(n,0,e.maxStringLength),e)+i}return y_(ji.call(ji.call(n,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,hy),"single",e)}function hy(n){var e=n.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+fy.call(e.toString(16))}function ll(n){return"Object("+n+")"}function Xo(n){return n+" { ? }"}function xf(n,e,t,i){return n+" ("+e+") {"+(i?ja(t,i):ri.call(t,", "))+"}"}function ja(n,e){if(n.length===0)return"";var t=`
-`+e.prev+e.base;return t+ri.call(n,","+t)+`
-`+e.prev}function hr(n,e){var t=Ra(n),i=[];if(t){i.length=n.length;for(var s=0;s<n.length;s++)i[s]=Li(n,s)?e(n[s],n):""}var l,r=typeof xo=="function"?xo(n):[];if(Bs){l={};for(var o=0;o<r.length;o++)l["$"+r[o]]=r[o]}for(var a in n)Li(n,a)&&(t&&String(Number(a))===a&&a<n.length||Bs&&l["$"+a]instanceof Symbol||(__.call(/[^\w$]/,a)?i.push(e(a,n)+": "+e(n[a],n)):i.push(a+": "+e(n[a],n))));if(typeof xo=="function")for(var u=0;u<r.length;u++)b_.call(n,r[u])&&i.push("["+e(r[u])+"]: "+e(n[r[u]],n));return i}var w_,Tu=$u,Zs=function(n,e){var t=m_(n,!!e);return typeof t=="function"&&ny(n,".prototype.")>-1?g_(t):t},my=function n(e,t,i,s){var l=t||{};if(Li(l,"quoteStyle")&&l.quoteStyle!=="single"&&l.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Li(l,"maxStringLength")&&(typeof l.maxStringLength=="number"?l.maxStringLength<0&&l.maxStringLength!==1/0:l.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var r=!Li(l,"customInspect")||l.customInspect;if(typeof r!="boolean"&&r!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Li(l,"indent")&&l.indent!==null&&l.indent!=="	"&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Li(l,"numericSeparator")&&typeof l.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=l.numericSeparator;if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return k_(e,l);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var a=String(e);return o?Yf(e,a):a}if(typeof e=="bigint"){var u=String(e)+"n";return o?Yf(e,u):u}var f=l.depth===void 0?5:l.depth;if(i===void 0&&(i=0),i>=f&&f>0&&typeof e=="object")return Ra(e)?"[Array]":"[Object]";var c=function(R,J){var W;if(R.indent==="	")W="	";else{if(!(typeof R.indent=="number"&&R.indent>0))return null;W=ri.call(Array(R.indent+1)," ")}return{base:W,prev:ri.call(Array(J+1),W)}}(l,i);if(s===void 0)s=[];else if(Zf(s,e)>=0)return"[Circular]";function d(R,J,W){if(J&&(s=cy.call(s)).push(J),W){var q={depth:l.depth};return Li(l,"quoteStyle")&&(q.quoteStyle=l.quoteStyle),n(R,q,i+1,s)}return n(R,l,i+1,s)}if(typeof e=="function"&&!Gf(e)){var h=function(R){if(R.name)return R.name;var J=uy.call(ay.call(R),/^function\s*([\w$]+)/);return J?J[1]:null}(e),g=hr(e,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(g.length>0?" { "+ri.call(g,", ")+" }":"")}if(v_(e)){var y=Bs?ji.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ia.call(e);return typeof e!="object"||Bs?y:ll(y)}if(function(R){return!R||typeof R!="object"?!1:typeof HTMLElement!="undefined"&&R instanceof HTMLElement?!0:typeof R.nodeName=="string"&&typeof R.getAttribute=="function"}(e)){for(var b="<"+zf.call(String(e.nodeName)),v=e.attributes||[],S=0;S<v.length;S++)b+=" "+v[S].name+"="+y_(dy(v[S].value),"double",l);return b+=">",e.childNodes&&e.childNodes.length&&(b+="..."),b+="</"+zf.call(String(e.nodeName))+">"}if(Ra(e)){if(e.length===0)return"[]";var $=hr(e,d);return c&&!function(R){for(var J=0;J<R.length;J++)if(Zf(R[J],`
-`)>=0)return!1;return!0}($)?"["+ja($,c)+"]":"[ "+ri.call($,", ")+" ]"}if(function(R){return!(Fi(R)!=="[object Error]"||ln&&typeof R=="object"&&ln in R)}(e)){var C=hr(e,d);return"cause"in Error.prototype||!("cause"in e)||b_.call(e,"cause")?C.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+ri.call(C,", ")+" }":"{ ["+String(e)+"] "+ri.call(Bf.call("[cause]: "+d(e.cause),C),", ")+" }"}if(typeof e=="object"&&r){if(Jf&&typeof e[Jf]=="function"&&Na)return Na(e,{depth:f-i});if(r!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(function(R){if(!dr||!R||typeof R!="object")return!1;try{dr.call(R);try{pr.call(R)}catch{return!0}return R instanceof Map}catch{}return!1}(e)){var M=[];return sy.call(e,function(R,J){M.push(d(J,e,!0)+" => "+d(R,e))}),xf("Map",dr.call(e),M,c)}if(function(R){if(!pr||!R||typeof R!="object")return!1;try{pr.call(R);try{dr.call(R)}catch{return!0}return R instanceof Set}catch{}return!1}(e)){var T=[];return ly.call(e,function(R){T.push(d(R,e))}),xf("Set",pr.call(e),T,c)}if(function(R){if(!il||!R||typeof R!="object")return!1;try{il.call(R,il);try{sl.call(R,sl)}catch{return!0}return R instanceof WeakMap}catch{}return!1}(e))return Xo("WeakMap");if(function(R){if(!sl||!R||typeof R!="object")return!1;try{sl.call(R,sl);try{il.call(R,il)}catch{return!0}return R instanceof WeakSet}catch{}return!1}(e))return Xo("WeakSet");if(function(R){if(!Vf||!R||typeof R!="object")return!1;try{return Vf.call(R),!0}catch{}return!1}(e))return Xo("WeakRef");if(function(R){return!(Fi(R)!=="[object Number]"||ln&&typeof R=="object"&&ln in R)}(e))return ll(d(Number(e)));if(function(R){if(!R||typeof R!="object"||!Zo)return!1;try{return Zo.call(R),!0}catch{}return!1}(e))return ll(d(Zo.call(e)));if(function(R){return!(Fi(R)!=="[object Boolean]"||ln&&typeof R=="object"&&ln in R)}(e))return ll(ry.call(e));if(function(R){return!(Fi(R)!=="[object String]"||ln&&typeof R=="object"&&ln in R)}(e))return ll(d(String(e)));if(!function(R){return!(Fi(R)!=="[object Date]"||ln&&typeof R=="object"&&ln in R)}(e)&&!Gf(e)){var E=hr(e,d),D=Wf?Wf(e)===Object.prototype:e instanceof Object||e.constructor===Object,P=e instanceof Object?"":"null prototype",L=!D&&ln&&Object(e)===e&&ln in e?Ou.call(Fi(e),8,-1):P?"Object":"",N=(D||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"")+(L||P?"["+ri.call(Bf.call([],L||[],P||[]),": ")+"] ":"");return E.length===0?N+"{}":c?N+"{"+ja(E,c)+"}":N+"{ "+ri.call(E,", ")+" }"}return String(e)},gy=Tu("%TypeError%"),mr=Tu("%WeakMap%",!0),gr=Tu("%Map%",!0),_y=Zs("WeakMap.prototype.get",!0),by=Zs("WeakMap.prototype.set",!0),yy=Zs("WeakMap.prototype.has",!0),vy=Zs("Map.prototype.get",!0),ky=Zs("Map.prototype.set",!0),wy=Zs("Map.prototype.has",!0),Qo=function(n,e){for(var t,i=n;(t=i.next)!==null;i=t)if(t.key===e)return i.next=t.next,t.next=n.next,n.next=t,t},Sy=String.prototype.replace,$y=/%20/g,Xf="RFC3986",Du={default:Xf,formatters:{RFC1738:function(n){return Sy.call(n,$y,"+")},RFC3986:function(n){return String(n)}},RFC1738:"RFC1738",RFC3986:Xf},Cy=Du,ea=Object.prototype.hasOwnProperty,Zi=Array.isArray,si=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),Qf=function(n,e){for(var t=e&&e.plainObjects?Object.create(null):{},i=0;i<n.length;++i)n[i]!==void 0&&(t[i]=n[i]);return t},S_={arrayToObject:Qf,assign:function(n,e){return Object.keys(e).reduce(function(t,i){return t[i]=e[i],t},n)},combine:function(n,e){return[].concat(n,e)},compact:function(n){for(var e=[{obj:{o:n},prop:"o"}],t=[],i=0;i<e.length;++i)for(var s=e[i],l=s.obj[s.prop],r=Object.keys(l),o=0;o<r.length;++o){var a=r[o],u=l[a];typeof u=="object"&&u!==null&&t.indexOf(u)===-1&&(e.push({obj:l,prop:a}),t.push(u))}return function(f){for(;f.length>1;){var c=f.pop(),d=c.obj[c.prop];if(Zi(d)){for(var h=[],g=0;g<d.length;++g)d[g]!==void 0&&h.push(d[g]);c.obj[c.prop]=h}}}(e),n},decode:function(n,e,t){var i=n.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},encode:function(n,e,t,i,s){if(n.length===0)return n;var l=n;if(typeof n=="symbol"?l=Symbol.prototype.toString.call(n):typeof n!="string"&&(l=String(n)),t==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var r="",o=0;o<l.length;++o){var a=l.charCodeAt(o);a===45||a===46||a===95||a===126||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||s===Cy.RFC1738&&(a===40||a===41)?r+=l.charAt(o):a<128?r+=si[a]:a<2048?r+=si[192|a>>6]+si[128|63&a]:a<55296||a>=57344?r+=si[224|a>>12]+si[128|a>>6&63]+si[128|63&a]:(o+=1,a=65536+((1023&a)<<10|1023&l.charCodeAt(o)),r+=si[240|a>>18]+si[128|a>>12&63]+si[128|a>>6&63]+si[128|63&a])}return r},isBuffer:function(n){return!(!n||typeof n!="object")&&!!(n.constructor&&n.constructor.isBuffer&&n.constructor.isBuffer(n))},isRegExp:function(n){return Object.prototype.toString.call(n)==="[object RegExp]"},maybeMap:function(n,e){if(Zi(n)){for(var t=[],i=0;i<n.length;i+=1)t.push(e(n[i]));return t}return e(n)},merge:function n(e,t,i){if(!t)return e;if(typeof t!="object"){if(Zi(e))e.push(t);else{if(!e||typeof e!="object")return[e,t];(i&&(i.plainObjects||i.allowPrototypes)||!ea.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||typeof e!="object")return[e].concat(t);var s=e;return Zi(e)&&!Zi(t)&&(s=Qf(e,i)),Zi(e)&&Zi(t)?(t.forEach(function(l,r){if(ea.call(e,r)){var o=e[r];o&&typeof o=="object"&&l&&typeof l=="object"?e[r]=n(o,l,i):e.push(l)}else e[r]=l}),e):Object.keys(t).reduce(function(l,r){var o=t[r];return ea.call(l,r)?l[r]=n(l[r],o,i):l[r]=o,l},s)}},$_=function(){var n,e,t,i={assert:function(s){if(!i.has(s))throw new gy("Side channel does not contain "+my(s))},get:function(s){if(mr&&s&&(typeof s=="object"||typeof s=="function")){if(n)return _y(n,s)}else if(gr){if(e)return vy(e,s)}else if(t)return function(l,r){var o=Qo(l,r);return o&&o.value}(t,s)},has:function(s){if(mr&&s&&(typeof s=="object"||typeof s=="function")){if(n)return yy(n,s)}else if(gr){if(e)return wy(e,s)}else if(t)return function(l,r){return!!Qo(l,r)}(t,s);return!1},set:function(s,l){mr&&s&&(typeof s=="object"||typeof s=="function")?(n||(n=new mr),by(n,s,l)):gr?(e||(e=new gr),ky(e,s,l)):(t||(t={key:{},next:null}),function(r,o,a){var u=Qo(r,o);u?u.value=a:r.next={key:o,next:r.next,value:a}}(t,s,l))}};return i},Ha=S_,$l=Du,My=Object.prototype.hasOwnProperty,ec={brackets:function(n){return n+"[]"},comma:"comma",indices:function(n,e){return n+"["+e+"]"},repeat:function(n){return n}},yi=Array.isArray,Oy=String.prototype.split,Ty=Array.prototype.push,C_=function(n,e){Ty.apply(n,yi(e)?e:[e])},Dy=Date.prototype.toISOString,tc=$l.default,xt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Ha.encode,encodeValuesOnly:!1,format:tc,formatter:$l.formatters[tc],indices:!1,serializeDate:function(n){return Dy.call(n)},skipNulls:!1,strictNullHandling:!1},ta={},Ay=function n(e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b){for(var v,S=e,$=b,C=0,M=!1;($=$.get(ta))!==void 0&&!M;){var T=$.get(e);if(C+=1,T!==void 0){if(T===C)throw new RangeError("Cyclic object value");M=!0}$.get(ta)===void 0&&(C=0)}if(typeof a=="function"?S=a(t,S):S instanceof Date?S=c(S):i==="comma"&&yi(S)&&(S=Ha.maybeMap(S,function(fe){return fe instanceof Date?c(fe):fe})),S===null){if(l)return o&&!g?o(t,xt.encoder,y,"key",d):t;S=""}if(typeof(v=S)=="string"||typeof v=="number"||typeof v=="boolean"||typeof v=="symbol"||typeof v=="bigint"||Ha.isBuffer(S)){if(o){var E=g?t:o(t,xt.encoder,y,"key",d);if(i==="comma"&&g){for(var D=Oy.call(String(S),","),P="",L=0;L<D.length;++L)P+=(L===0?"":",")+h(o(D[L],xt.encoder,y,"value",d));return[h(E)+(s&&yi(S)&&D.length===1?"[]":"")+"="+P]}return[h(E)+"="+h(o(S,xt.encoder,y,"value",d))]}return[h(t)+"="+h(String(S))]}var N,R=[];if(S===void 0)return R;if(i==="comma"&&yi(S))N=[{value:S.length>0?S.join(",")||null:void 0}];else if(yi(a))N=a;else{var J=Object.keys(S);N=u?J.sort(u):J}for(var W=s&&yi(S)&&S.length===1?t+"[]":t,q=0;q<N.length;++q){var G=N[q],K=typeof G=="object"&&G.value!==void 0?G.value:S[G];if(!r||K!==null){var Y=yi(S)?typeof i=="function"?i(W,G):W:W+(f?"."+G:"["+G+"]");b.set(e,C);var ne=$_();ne.set(ta,b),C_(R,n(K,Y,i,s,l,r,o,a,u,f,c,d,h,g,y,ne))}}return R},Fs=S_,qa=Object.prototype.hasOwnProperty,Ey=Array.isArray,Zt={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Fs.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Py=function(n){return n.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},M_=function(n,e){return n&&typeof n=="string"&&e.comma&&n.indexOf(",")>-1?n.split(","):n},Ly=function(n,e,t,i){if(n){var s=t.allowDots?n.replace(/\.([^.[]+)/g,"[$1]"):n,l=/(\[[^[\]]*])/g,r=t.depth>0&&/(\[[^[\]]*])/.exec(s),o=r?s.slice(0,r.index):s,a=[];if(o){if(!t.plainObjects&&qa.call(Object.prototype,o)&&!t.allowPrototypes)return;a.push(o)}for(var u=0;t.depth>0&&(r=l.exec(s))!==null&&u<t.depth;){if(u+=1,!t.plainObjects&&qa.call(Object.prototype,r[1].slice(1,-1))&&!t.allowPrototypes)return;a.push(r[1])}return r&&a.push("["+s.slice(r.index)+"]"),function(f,c,d,h){for(var g=h?c:M_(c,d),y=f.length-1;y>=0;--y){var b,v=f[y];if(v==="[]"&&d.parseArrays)b=[].concat(g);else{b=d.plainObjects?Object.create(null):{};var S=v.charAt(0)==="["&&v.charAt(v.length-1)==="]"?v.slice(1,-1):v,$=parseInt(S,10);d.parseArrays||S!==""?!isNaN($)&&v!==S&&String($)===S&&$>=0&&d.parseArrays&&$<=d.arrayLimit?(b=[])[$]=g:S!=="__proto__"&&(b[S]=g):b={0:g}}g=b}return g}(a,e,t,i)}},Fy=function(n,e){var t,i=n,s=function(g){if(!g)return xt;if(g.encoder!==null&&g.encoder!==void 0&&typeof g.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=g.charset||xt.charset;if(g.charset!==void 0&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=$l.default;if(g.format!==void 0){if(!My.call($l.formatters,g.format))throw new TypeError("Unknown format option provided.");b=g.format}var v=$l.formatters[b],S=xt.filter;return(typeof g.filter=="function"||yi(g.filter))&&(S=g.filter),{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:xt.addQueryPrefix,allowDots:g.allowDots===void 0?xt.allowDots:!!g.allowDots,charset:y,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:xt.charsetSentinel,delimiter:g.delimiter===void 0?xt.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:xt.encode,encoder:typeof g.encoder=="function"?g.encoder:xt.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:xt.encodeValuesOnly,filter:S,format:b,formatter:v,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:xt.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:xt.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:xt.strictNullHandling}}(e);typeof s.filter=="function"?i=(0,s.filter)("",i):yi(s.filter)&&(t=s.filter);var l,r=[];if(typeof i!="object"||i===null)return"";l=e&&e.arrayFormat in ec?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var o=ec[l];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=o==="comma"&&e&&e.commaRoundTrip;t||(t=Object.keys(i)),s.sort&&t.sort(s.sort);for(var u=$_(),f=0;f<t.length;++f){var c=t[f];s.skipNulls&&i[c]===null||C_(r,Ay(i[c],c,o,a,s.strictNullHandling,s.skipNulls,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset,u))}var d=r.join(s.delimiter),h=s.addQueryPrefix===!0?"?":"";return s.charsetSentinel&&(s.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},Iy={formats:Du,parse:function(n,e){var t=function(u){if(!u)return Zt;if(u.decoder!==null&&u.decoder!==void 0&&typeof u.decoder!="function")throw new TypeError("Decoder has to be a function.");if(u.charset!==void 0&&u.charset!=="utf-8"&&u.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var f=u.charset===void 0?Zt.charset:u.charset;return{allowDots:u.allowDots===void 0?Zt.allowDots:!!u.allowDots,allowPrototypes:typeof u.allowPrototypes=="boolean"?u.allowPrototypes:Zt.allowPrototypes,allowSparse:typeof u.allowSparse=="boolean"?u.allowSparse:Zt.allowSparse,arrayLimit:typeof u.arrayLimit=="number"?u.arrayLimit:Zt.arrayLimit,charset:f,charsetSentinel:typeof u.charsetSentinel=="boolean"?u.charsetSentinel:Zt.charsetSentinel,comma:typeof u.comma=="boolean"?u.comma:Zt.comma,decoder:typeof u.decoder=="function"?u.decoder:Zt.decoder,delimiter:typeof u.delimiter=="string"||Fs.isRegExp(u.delimiter)?u.delimiter:Zt.delimiter,depth:typeof u.depth=="number"||u.depth===!1?+u.depth:Zt.depth,ignoreQueryPrefix:u.ignoreQueryPrefix===!0,interpretNumericEntities:typeof u.interpretNumericEntities=="boolean"?u.interpretNumericEntities:Zt.interpretNumericEntities,parameterLimit:typeof u.parameterLimit=="number"?u.parameterLimit:Zt.parameterLimit,parseArrays:u.parseArrays!==!1,plainObjects:typeof u.plainObjects=="boolean"?u.plainObjects:Zt.plainObjects,strictNullHandling:typeof u.strictNullHandling=="boolean"?u.strictNullHandling:Zt.strictNullHandling}}(e);if(n===""||n==null)return t.plainObjects?Object.create(null):{};for(var i=typeof n=="string"?function(u,f){var c,d={},h=f.ignoreQueryPrefix?u.replace(/^\?/,""):u,g=f.parameterLimit===1/0?void 0:f.parameterLimit,y=h.split(f.delimiter,g),b=-1,v=f.charset;if(f.charsetSentinel)for(c=0;c<y.length;++c)y[c].indexOf("utf8=")===0&&(y[c]==="utf8=%E2%9C%93"?v="utf-8":y[c]==="utf8=%26%2310003%3B"&&(v="iso-8859-1"),b=c,c=y.length);for(c=0;c<y.length;++c)if(c!==b){var S,$,C=y[c],M=C.indexOf("]="),T=M===-1?C.indexOf("="):M+1;T===-1?(S=f.decoder(C,Zt.decoder,v,"key"),$=f.strictNullHandling?null:""):(S=f.decoder(C.slice(0,T),Zt.decoder,v,"key"),$=Fs.maybeMap(M_(C.slice(T+1),f),function(E){return f.decoder(E,Zt.decoder,v,"value")})),$&&f.interpretNumericEntities&&v==="iso-8859-1"&&($=Py($)),C.indexOf("[]=")>-1&&($=Ey($)?[$]:$),qa.call(d,S)?d[S]=Fs.combine(d[S],$):d[S]=$}return d}(n,t):n,s=t.plainObjects?Object.create(null):{},l=Object.keys(i),r=0;r<l.length;++r){var o=l[r],a=Ly(o,i[o],t,typeof n=="string");s=Fs.merge(s,a,t)}return t.allowSparse===!0?s:Fs.compact(s)},stringify:Fy};w_=typeof atob=="function"?atob:function(n){return Buffer.from(n,"base64").toString("binary")};var Ny=function(){function n(){}return n.getPayload=function(e){if(e)try{var t=decodeURIComponent(w_(e.split(".")[1]).split("").map(function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}},n.isExpired=function(e,t){t===void 0&&(t=0);var i=n.getPayload(e);return!(Object.keys(i).length>0&&(!i.exp||i.exp-t>Date.now()/1e3))},n}(),Va=function(n,e){return Va=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])},Va(n,e)};function gn(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}Va(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Wr(n,e,t,i){return new(t||(t=Promise))(function(s,l){function r(u){try{a(i.next(u))}catch(f){l(f)}}function o(u){try{a(i.throw(u))}catch(f){l(f)}}function a(u){var f;u.done?s(u.value):(f=u.value,f instanceof t?f:new t(function(c){c(f)})).then(r,o)}a((i=i.apply(n,e||[])).next())})}function Yr(n,e){var t,i,s,l,r={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return l={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(a){return function(u){return function(f){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,i&&(s=2&f[0]?i.return:f[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,f[1])).done)return s;switch(i=0,s&&(f=[2&f[0],s.value]),f[0]){case 0:case 1:s=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!((s=s.length>0&&s[s.length-1])||f[0]!==6&&f[0]!==2)){r=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]<s[3])){r.label=f[1];break}if(f[0]===6&&r.label<s[1]){r.label=s[1],s=f;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(f);break}s[2]&&r.ops.pop(),r.trys.pop();continue}f=e.call(n,r)}catch(c){f=[6,c],i=0}finally{t=s=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}([a,u])}}}var Yl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){this.id=e.id!==void 0?e.id:"",this.created=e.created!==void 0?e.created:"",this.updated=e.updated!==void 0?e.updated:""},Object.defineProperty(n.prototype,"isNew",{get:function(){return!this.id||this.id==="00000000-0000-0000-0000-000000000000"},enumerable:!1,configurable:!0}),n.prototype.clone=function(){return new this.constructor(JSON.parse(JSON.stringify(this)))},n.prototype.export=function(){return Object.assign({},this)},n}(),eo=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t);for(var i=0,s=Object.entries(t);i<s.length;i++){var l=s[i],r=l[0],o=l[1];this[r]=o}this["@collectionId"]=t["@collectionId"]!==void 0?t["@collectionId"]:"",this["@collectionName"]=t["@collectionName"]!==void 0?t["@collectionName"]:"",this["@expand"]=t["@expand"]!==void 0?t["@expand"]:{}},e}(Yl),to=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t),this.email=typeof t.email=="string"?t.email:"",this.verified=!!t.verified,this.lastResetSentAt=typeof t.lastResetSentAt=="string"?t.lastResetSentAt:"",this.lastVerificationSentAt=typeof t.lastVerificationSentAt=="string"?t.lastVerificationSentAt:"",this.profile=t.profile?new eo(t.profile):null},e}(Yl),Us=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t),this.avatar=typeof t.avatar=="number"?t.avatar:0,this.email=typeof t.email=="string"?t.email:"",this.lastResetSentAt=typeof t.lastResetSentAt=="string"?t.lastResetSentAt:""},e}(Yl),O_=function(){function n(e){e===void 0&&(e="pocketbase_auth"),this.fallback={},this.storageKey=e}return Object.defineProperty(n.prototype,"token",{get:function(){return(this._storageGet(this.storageKey)||{}).token||""},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"model",{get:function(){var e,t=this._storageGet(this.storageKey)||{};return t===null||typeof t!="object"||t.model===null||typeof t.model!="object"?{}:((e=t.model)===null||e===void 0?void 0:e.verified)!==void 0?new to(t.model):new Us(t.model)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isValid",{get:function(){return!Ny.isExpired(this.token)},enumerable:!1,configurable:!0}),n.prototype.save=function(e,t){this._storageSet(this.storageKey,{token:e,model:t})},n.prototype.clear=function(){return this._storageRemove(this.storageKey)},n.prototype._storageGet=function(e){var t;if(typeof window!="undefined"&&(window==null?void 0:window.localStorage)){var i=((t=window==null?void 0:window.localStorage)===null||t===void 0?void 0:t.getItem(e))||"";try{return JSON.parse(i)}catch{return i}}return this.fallback[e]},n.prototype._storageSet=function(e,t){var i;if(typeof window!="undefined"&&(window==null?void 0:window.localStorage)){var s=t;typeof t!="string"&&(s=JSON.stringify(t)),(i=window==null?void 0:window.localStorage)===null||i===void 0||i.setItem(e,s)}else this.fallback[e]=t},n.prototype._storageRemove=function(e){var t;typeof window!="undefined"&&((t=window==null?void 0:window.localStorage)===null||t===void 0||t.removeItem(e)),delete this.fallback[e]},n}(),Co=function(n){this.client=n},Ry=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.getAll=function(t){return t===void 0&&(t={}),this.client.send({method:"get",url:"/api/settings",params:t}).then(function(i){return(i==null?void 0:i.data)||{}})},e.prototype.update=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send({method:"patch",url:"/api/settings",params:i,data:t}).then(function(s){return(s==null?void 0:s.data)||{}})},e}(Co),T_=function(n,e,t,i){this.page=n>0?n:1,this.perPage=e>=0?e:0,this.totalItems=t>=0?t:0,this.items=i||[]},D_=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=100),s===void 0&&(s={});var r=[],o=function(a){return Wr(l,void 0,void 0,function(){return Yr(this,function(u){return[2,this._getList(t,a,i,s).then(function(f){var c=f,d=c.items,h=c.totalItems;return r=r.concat(d),d.length&&h>r.length?o(a+1):r})]})})};return o(1)},e.prototype._getList=function(t,i,s,l){var r=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({method:"get",url:t,params:l}).then(function(o){var a,u,f,c,d,h=[];if(!((a=o==null?void 0:o.data)===null||a===void 0)&&a.items){o.data.items=((u=o==null?void 0:o.data)===null||u===void 0?void 0:u.items)||[];for(var g=0,y=o.data.items;g<y.length;g++){var b=y[g];h.push(r.decode(b))}}return new T_(((f=o==null?void 0:o.data)===null||f===void 0?void 0:f.page)||1,((c=o==null?void 0:o.data)===null||c===void 0?void 0:c.perPage)||0,((d=o==null?void 0:o.data)===null||d===void 0?void 0:d.totalItems)||0,h)})},e.prototype._getOne=function(t,i,s){var l=this;return s===void 0&&(s={}),this.client.send({method:"get",url:t+"/"+encodeURIComponent(i),params:s}).then(function(r){return l.decode(r==null?void 0:r.data)})},e.prototype._create=function(t,i,s){var l=this;return i===void 0&&(i={}),s===void 0&&(s={}),this.client.send({method:"post",url:t,params:s,data:i}).then(function(r){return l.decode(r==null?void 0:r.data)})},e.prototype._update=function(t,i,s,l){var r=this;return s===void 0&&(s={}),l===void 0&&(l={}),this.client.send({method:"patch",url:t+"/"+encodeURIComponent(i),params:l,data:s}).then(function(o){return r.decode(o==null?void 0:o.data)})},e.prototype._delete=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),this.client.send({method:"delete",url:t+"/"+encodeURIComponent(i),params:l,data:s}).then(function(){return!0})},e}(Co),Au=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.getFullList=function(t,i){return t===void 0&&(t=100),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.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,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._delete(this.baseCrudPath(),t,i,s)},e}(D_),jy=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.decode=function(t){return new Us(t)},e.prototype.baseCrudPath=function(){return"/api/admins"},e.prototype.authResponse=function(t){var i,s,l,r,o=this.decode(((i=t==null?void 0:t.data)===null||i===void 0?void 0:i.admin)||{});return((s=t==null?void 0:t.data)===null||s===void 0?void 0:s.token)&&((l=t==null?void 0:t.data)===null||l===void 0?void 0:l.admin)&&this.client.AuthStore.save(t.data.token,o),Object.assign({},t==null?void 0:t.data,{token:((r=t==null?void 0:t.data)===null||r===void 0?void 0:r.token)||"",admin:o})},e.prototype.authViaEmail=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({email:t,password:i},s),this.client.send({method:"post",url:this.baseCrudPath()+"/auth-via-email",params:l,data:s,headers:{Authorization:""}}).then(this.authResponse.bind(this))},e.prototype.refresh=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send({method:"post",url:this.baseCrudPath()+"/refresh",params:i,data:t}).then(this.authResponse.bind(this))},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send({method:"post",url:this.baseCrudPath()+"/request-password-reset",params:s,data:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,r){return l===void 0&&(l={}),r===void 0&&(r={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send({method:"post",url:this.baseCrudPath()+"/confirm-password-reset",params:r,data:l}).then(this.authResponse.bind(this))},e}(Au),Hy=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.decode=function(t){return new to(t)},e.prototype.baseCrudPath=function(){return"/api/users"},e.prototype.authResponse=function(t){var i,s,l,r,o=this.decode(((i=t==null?void 0:t.data)===null||i===void 0?void 0:i.user)||{});return((s=t==null?void 0:t.data)===null||s===void 0?void 0:s.token)&&((l=t==null?void 0:t.data)===null||l===void 0?void 0:l.user)&&this.client.AuthStore.save(t.data.token,o),Object.assign({},t==null?void 0:t.data,{token:((r=t==null?void 0:t.data)===null||r===void 0?void 0:r.token)||"",user:o})},e.prototype.listAuthMethods=function(t){return t===void 0&&(t={}),this.client.send({method:"get",url:this.baseCrudPath()+"/auth-methods",params:t}).then(function(i){var s,l,r;return Object.assign({},i==null?void 0:i.data,{emailPassword:!!(!((s=i==null?void 0:i.data)===null||s===void 0)&&s.emailPassword),authProviders:Array.isArray((l=i==null?void 0:i.data)===null||l===void 0?void 0:l.authProviders)?(r=i==null?void 0:i.data)===null||r===void 0?void 0:r.authProviders:[]})})},e.prototype.authViaEmail=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({email:t,password:i},s),this.client.send({method:"post",url:this.baseCrudPath()+"/auth-via-email",params:l,data:s,headers:{Authorization:""}}).then(this.authResponse.bind(this))},e.prototype.authViaOAuth2=function(t,i,s,l,r,o){return r===void 0&&(r={}),o===void 0&&(o={}),r=Object.assign({provider:t,code:i,codeVerifier:s,redirectUrl:l},r),this.client.send({method:"post",url:this.baseCrudPath()+"/auth-via-oauth2",params:o,data:r,headers:{Authorization:""}}).then(this.authResponse.bind(this))},e.prototype.refresh=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send({method:"post",url:this.baseCrudPath()+"/refresh",params:i,data:t}).then(this.authResponse.bind(this))},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send({method:"post",url:this.baseCrudPath()+"/request-password-reset",params:s,data:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,r){return l===void 0&&(l={}),r===void 0&&(r={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send({method:"post",url:this.baseCrudPath()+"/confirm-password-reset",params:r,data:l}).then(this.authResponse.bind(this))},e.prototype.requestVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send({method:"post",url:this.baseCrudPath()+"/request-verification",params:s,data:i}).then(function(){return!0})},e.prototype.confirmVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({token:t},i),this.client.send({method:"post",url:this.baseCrudPath()+"/confirm-verification",params:s,data:i}).then(this.authResponse.bind(this))},e.prototype.requestEmailChange=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({newEmail:t},i),this.client.send({method:"post",url:this.baseCrudPath()+"/request-email-change",params:s,data:i}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({token:t,password:i},s),this.client.send({method:"post",url:this.baseCrudPath()+"/confirm-email-change",params:l,data:s}).then(this.authResponse.bind(this))},e}(Au),wn=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){this.id=e.id!==void 0?e.id:"",this.name=e.name!==void 0?e.name:"",this.type=e.type!==void 0?e.type:"text",this.system=!!e.system,this.required=!!e.required,this.unique=!!e.unique,this.options=typeof e.options=="object"&&e.options!==null?e.options:{}},n}(),Ln=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t),this.name=typeof t.name=="string"?t.name:"",this.system=!!t.system,this.listRule=typeof t.listRule=="string"?t.listRule:null,this.viewRule=typeof t.viewRule=="string"?t.viewRule:null,this.createRule=typeof t.createRule=="string"?t.createRule:null,this.updateRule=typeof t.updateRule=="string"?t.updateRule:null,this.deleteRule=typeof t.deleteRule=="string"?t.deleteRule:null,t.schema=Array.isArray(t.schema)?t.schema:[],this.schema=[];for(var i=0,s=t.schema;i<s.length;i++){var l=s[i];this.schema.push(new wn(l))}},e}(Yl),qy=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.decode=function(t){return new Ln(t)},e.prototype.baseCrudPath=function(){return"/api/collections"},e}(Au),Vy=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.decode=function(t){return new eo(t)},e.prototype.baseCrudPath=function(t){return"/api/collections/"+encodeURIComponent(t)+"/records"},e.prototype.getFileUrl=function(t,i,s){s===void 0&&(s={});var l=[];l.push(this.client.baseUrl.replace(/\/+$/gm,"")),l.push("api"),l.push("files"),l.push(t["@collectionId"]),l.push(t.id),l.push(i);var r=l.join("/");if(Object.keys(s).length){var o=new URLSearchParams(s);r+=(r.includes("?")?"&":"?")+o}return r},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.getFullList=function(t,i,s){return i===void 0&&(i=100),s===void 0&&(s={}),this._getFullList(this.baseCrudPath(t),i,s)},e.prototype.getList=function(t,i,s,l){return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),this._getList(this.baseCrudPath(t),i,s,l)},e.prototype.getOne=function(t,i,s){return s===void 0&&(s={}),this._getOne(this.baseCrudPath(t),i,s)},e.prototype.create=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._create(this.baseCrudPath(t),i,s)},e.prototype.update=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),this._update(this.baseCrudPath(t),i,s,l)},e.prototype.delete=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),this._delete(this.baseCrudPath(t),i,s,l)},e}(D_)),za=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t),this.url=typeof t.url=="string"?t.url:"",this.method=typeof t.method=="string"?t.method:"GET",this.status=typeof t.status=="number"?t.status:200,this.auth=typeof t.auth=="string"?t.auth:"guest",this.ip=typeof t.ip=="string"?t.ip:"",this.referer=typeof t.referer=="string"?t.referer:"",this.userAgent=typeof t.userAgent=="string"?t.userAgent:"",this.meta=typeof t.meta=="object"&&t.meta!==null?t.meta:{}},e}(Yl),zy=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.getRequestsList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),s=Object.assign({page:t,perPage:i},s),this.client.send({method:"get",url:"/api/logs/requests",params:s}).then(function(l){var r,o,a,u,f,c=[];if(!((r=l==null?void 0:l.data)===null||r===void 0)&&r.items){l.data.items=((o=l==null?void 0:l.data)===null||o===void 0?void 0:o.items)||[];for(var d=0,h=l.data.items;d<h.length;d++){var g=h[d];c.push(new za(g))}}return new T_(((a=l==null?void 0:l.data)===null||a===void 0?void 0:a.page)||1,((u=l==null?void 0:l.data)===null||u===void 0?void 0:u.perPage)||0,((f=l==null?void 0:l.data)===null||f===void 0?void 0:f.totalItems)||0,c)})},e.prototype.getRequest=function(t,i){return i===void 0&&(i={}),this.client.send({method:"get",url:"/api/logs/requests/"+encodeURIComponent(t),params:i}).then(function(s){return new za(s==null?void 0:s.data)})},e.prototype.getRequestsStats=function(t){return t===void 0&&(t={}),this.client.send({method:"get",url:"/api/logs/requests/stats",params:t}).then(function(i){return i==null?void 0:i.data})},e}(Co),By=function(n){function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.clientId="",t.eventSource=null,t.subscriptions={},t}return gn(e,n),e.prototype.subscribe=function(t,i){var s;return Wr(this,void 0,void 0,function(){return Yr(this,function(l){switch(l.label){case 0:if(!t)throw new Error("subscription must be set.");return this.subscriptions[t]&&((s=this.eventSource)===null||s===void 0||s.removeEventListener(t,this.subscriptions[t])),this.subscriptions[t]=function(r){var o,a=r;try{o=JSON.parse(a==null?void 0:a.data)}catch{}i(o||{})},this.eventSource?[3,1]:(this.connect(),[3,3]);case 1:return this.clientId?[4,this.submitSubscriptions()]:[3,3];case 2:l.sent(),l.label=3;case 3:return[2]}})})},e.prototype.unsubscribe=function(t){var i;return Wr(this,void 0,void 0,function(){return Yr(this,function(s){switch(s.label){case 0:if(t){if(!this.subscriptions[t])return[2];(i=this.eventSource)===null||i===void 0||i.removeEventListener(t,this.subscriptions[t]),delete this.subscriptions[t]}else this.removeSubscriptionListeners(),this.subscriptions={};return this.clientId?[4,this.submitSubscriptions()]:[3,2];case 1:s.sent(),s.label=2;case 2:return Object.keys(this.subscriptions).length||this.disconnect(),[2]}})})},e.prototype.submitSubscriptions=function(){return Wr(this,void 0,void 0,function(){return Yr(this,function(t){return this.addSubscriptionListeners(),[2,this.client.send({method:"post",url:"/api/realtime",data:{clientId:this.clientId,subscriptions:Object.keys(this.subscriptions)}}).then(function(){return!0})]})})},e.prototype.addSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeSubscriptionListeners(),this.subscriptions)this.eventSource.addEventListener(t,this.subscriptions[t])},e.prototype.removeSubscriptionListeners=function(){if(this.eventSource)for(var t in this.subscriptions)this.eventSource.removeEventListener(t,this.subscriptions[t])},e.prototype.connectHandler=function(t){var i=t;this.clientId=i==null?void 0:i.lastEventId,this.submitSubscriptions()},e.prototype.connect=function(){var t=this;this.disconnect(),this.eventSource=new EventSource(this.client.baseUrl+"/api/realtime"),this.eventSource.addEventListener("PB_CONNECT",function(i){return t.connectHandler(i)})},e.prototype.disconnect=function(){var t,i,s=this;this.removeSubscriptionListeners(),(t=this.eventSource)===null||t===void 0||t.removeEventListener("PB_CONNECT",function(l){return s.connectHandler(l)}),(i=this.eventSource)===null||i===void 0||i.close(),this.eventSource=null,this.clientId=""},e}(Co),Eu=function(){function n(e,t,i,s){e===void 0&&(e="/"),t===void 0&&(t="en-US");var l=this;this.cancelSource={},this.defaultAuthStore=new O_,this.http=Uo.create(Object.assign({paramsSerializer:function(r){var o={};for(var a in r)r[a]!==null&&(o[a]=r[a]);return Iy.stringify(o,{arrayFormat:"repeat",serializeDate:function(u){return u.toISOString()}})}},s||{})),this.http.interceptors.request.use(function(r){var o,a,u,f;if(!r.cancelToken&&((o=r==null?void 0:r.params)===null||o===void 0?void 0:o.$autoCancel)!==!1){var c=((a=r==null?void 0:r.params)===null||a===void 0?void 0:a.$cancelKey)||(r.method||"get")+r.url;l.cancelRequest(c),l.cancelSource[c]=Uo.CancelToken.source(),r.cancelToken=l.cancelSource[c].token}return(u=r==null?void 0:r.params)===null||u===void 0||delete u.$autoCancel,(f=r==null?void 0:r.params)===null||f===void 0||delete f.$cancelKey,r}),this.http.interceptors.response.use(function(r){return r},function(r){return Uo.isCancel(r)?Promise.reject(null):Promise.reject(r)}),this.baseUrl=e,this.language=t,this.AuthStore=i||this.defaultAuthStore,this.Settings=new Ry(this),this.Admins=new jy(this),this.Users=new Hy(this),this.Collections=new qy(this),this.Records=new Vy(this),this.Logs=new zy(this),this.Realtime=new By(this)}return Object.defineProperty(n.prototype,"baseUrl",{get:function(){return this.http.defaults.baseURL||""},set:function(e){this.http.defaults.baseURL=e.replace(/\/+$/,"")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"language",{set:function(e){e?this.http.defaults.headers.common["Accept-Language"]=e:delete this.http.defaults.headers.common["Accept-Language"]},enumerable:!1,configurable:!0}),n.prototype.cancelRequest=function(e){return this.cancelSource[e]&&(this.cancelSource[e].cancel(),delete this.cancelSource[e]),this},n.prototype.cancelAllRequests=function(){for(var e in this.cancelSource)this.cancelSource[e].cancel();return this},n.prototype.send=function(e){var t,i,s,l=Object.assign({},e);if(((t=this.AuthStore)===null||t===void 0?void 0:t.token)&&((i=l==null?void 0:l.headers)===null||i===void 0?void 0:i.Authorization)===void 0){var r="Admin";((s=this.AuthStore.model)===null||s===void 0?void 0:s.verified)!==void 0&&(r="User"),l.headers=Object.assign({},l.headers,{Authorization:r+" "+this.AuthStore.token})}return this.http.request(l)},n}();class gs extends Error{}class Uy extends gs{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Wy extends gs{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Yy extends gs{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class yl extends gs{}class A_ extends gs{constructor(e){super(`Invalid unit ${e}`)}}class qn extends gs{}class Ai extends gs{constructor(){super("Zone is an abstract class")}}const Ue="numeric",ti="short",Pn="long",Ba={year:Ue,month:Ue,day:Ue},E_={year:Ue,month:ti,day:Ue},Ky={year:Ue,month:ti,day:Ue,weekday:ti},P_={year:Ue,month:Pn,day:Ue},L_={year:Ue,month:Pn,day:Ue,weekday:Pn},F_={hour:Ue,minute:Ue},I_={hour:Ue,minute:Ue,second:Ue},N_={hour:Ue,minute:Ue,second:Ue,timeZoneName:ti},R_={hour:Ue,minute:Ue,second:Ue,timeZoneName:Pn},j_={hour:Ue,minute:Ue,hourCycle:"h23"},H_={hour:Ue,minute:Ue,second:Ue,hourCycle:"h23"},q_={hour:Ue,minute:Ue,second:Ue,hourCycle:"h23",timeZoneName:ti},V_={hour:Ue,minute:Ue,second:Ue,hourCycle:"h23",timeZoneName:Pn},z_={year:Ue,month:Ue,day:Ue,hour:Ue,minute:Ue},B_={year:Ue,month:Ue,day:Ue,hour:Ue,minute:Ue,second:Ue},U_={year:Ue,month:ti,day:Ue,hour:Ue,minute:Ue},W_={year:Ue,month:ti,day:Ue,hour:Ue,minute:Ue,second:Ue},Jy={year:Ue,month:ti,day:Ue,weekday:ti,hour:Ue,minute:Ue},Y_={year:Ue,month:Pn,day:Ue,hour:Ue,minute:Ue,timeZoneName:ti},K_={year:Ue,month:Pn,day:Ue,hour:Ue,minute:Ue,second:Ue,timeZoneName:ti},J_={year:Ue,month:Pn,day:Ue,weekday:Pn,hour:Ue,minute:Ue,timeZoneName:Pn},G_={year:Ue,month:Pn,day:Ue,weekday:Pn,hour:Ue,minute:Ue,second:Ue,timeZoneName:Pn};function pt(n){return typeof n=="undefined"}function ds(n){return typeof n=="number"}function Mo(n){return typeof n=="number"&&n%1===0}function Gy(n){return typeof n=="string"}function Zy(n){return Object.prototype.toString.call(n)==="[object Date]"}function Z_(){try{return typeof Intl!="undefined"&&!!Intl.RelativeTimeFormat}catch{return!1}}function xy(n){return Array.isArray(n)?n:[n]}function nc(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 Xy(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ws(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function ki(n,e,t){return Mo(n)&&n>=e&&n<=t}function Qy(n,e){return n-e*Math.floor(n/e)}function Ut(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Ii(n){if(!(pt(n)||n===null||n===""))return parseInt(n,10)}function xi(n){if(!(pt(n)||n===null||n===""))return parseFloat(n)}function Pu(n){if(!(pt(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Lu(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 Cl(n){return Kl(n)?366:365}function no(n,e){const t=Qy(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 Fu(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 io(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 Ua(n){return n>99?n:n>60?1900+n:2e3+n}function x_(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 r={timeZoneName:e,...l},o=new Intl.DateTimeFormat(t,r).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return o?o.value:null}function Oo(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 X_(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new qn(`Invalid unit value ${n}`);return e}function so(n,e){const t={};for(const i in n)if(Ws(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=X_(s)}return t}function Ml(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}${Ut(t,2)}:${Ut(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ut(t,2)}${Ut(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function To(n){return Xy(n,["hour","minute","second","millisecond"])}const Q_=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,ev=["January","February","March","April","May","June","July","August","September","October","November","December"],e0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tv=["J","F","M","A","M","J","J","A","S","O","N","D"];function t0(n){switch(n){case"narrow":return[...tv];case"short":return[...e0];case"long":return[...ev];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 n0=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],i0=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],nv=["M","T","W","T","F","S","S"];function s0(n){switch(n){case"narrow":return[...nv];case"short":return[...i0];case"long":return[...n0];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const l0=["AM","PM"],iv=["Before Christ","Anno Domini"],sv=["BC","AD"],lv=["B","A"];function r0(n){switch(n){case"narrow":return[...lv];case"short":return[...sv];case"long":return[...iv];default:return null}}function rv(n){return l0[n.hour<12?0:1]}function ov(n,e){return s0(e)[n.weekday-1]}function av(n,e){return t0(e)[n.month-1]}function uv(n,e){return r0(e)[n.year<0?0:1]}function fv(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 r=Object.is(e,-0)||e<0,o=Math.abs(e),a=o===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return r?`${o} ${f} ago`:`in ${o} ${f}`}function ic(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const cv={D:Ba,DD:E_,DDD:P_,DDDD:L_,t:F_,tt:I_,ttt:N_,tttt:R_,T:j_,TT:H_,TTT:q_,TTTT:V_,f:z_,ff:U_,fff:Y_,ffff:J_,F:B_,FF:W_,FFF:K_,FFFF:G_};class kn{static create(e,t={}){return new kn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let r=0;r<e.length;r++){const o=e.charAt(r);o==="'"?(i.length>0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||o===t?i+=o:(i.length>0&&l.push({literal:!1,val:i}),i=o,t=o)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return cv[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 Ut(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,g)=>this.loc.extract(e,h,g),r=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",o=()=>i?rv(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(h,g)=>i?av(e,h):l(g?{month:h}:{month:h,day:"numeric"},"month"),u=(h,g)=>i?ov(e,h):l(g?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const g=kn.macroTokenToFormatOpts(h);return g?this.formatWithSystemDefault(e,g):h},c=h=>i?uv(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 r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({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 o();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 ic(kn.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=kn.parseFormat(t),r=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),o=e.shiftTo(...r.map(i).filter(a=>a));return ic(l,s(o))}}class Xn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Jl{get type(){throw new Ai}get name(){throw new Ai}get ianaName(){return this.name}get isUniversal(){throw new Ai}offsetName(e,t){throw new Ai}formatOffset(e,t){throw new Ai}offset(e){throw new Ai}equals(e){throw new Ai}get isValid(){throw new Ai}}let na=null;class Iu extends Jl{static get instance(){return na===null&&(na=new Iu),na}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return x_(e,t,i)}formatOffset(e,t){return Ml(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let Kr={};function dv(n){return Kr[n]||(Kr[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"})),Kr[n]}const pv={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function hv(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,r,o,a,u,f]=i;return[r,s,l,o,a,u,f]}function mv(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s<t.length;s++){const{type:l,value:r}=t[s],o=pv[l];l==="era"?i[o]=r:pt(o)||(i[o]=parseInt(r,10))}return i}let _r={};class Si extends Jl{static create(e){return _r[e]||(_r[e]=new Si(e)),_r[e]}static resetCache(){_r={},Kr={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=Si.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return x_(e,t,i,this.name)}formatOffset(e,t){return Ml(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const i=dv(this.name);let[s,l,r,o,a,u,f]=i.formatToParts?mv(i,t):hv(i,t);o==="BC"&&(s=-Math.abs(s)+1);const d=Fu({year:s,month:l,day:r,hour:a===24?0:a,minute:u,second:f,millisecond:0});let h=+t;const g=h%1e3;return h-=g>=0?g:1e3+g,(d-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let ia=null;class pn extends Jl{static get utcInstance(){return ia===null&&(ia=new pn(0)),ia}static instance(e){return e===0?pn.utcInstance:new pn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new pn(Oo(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ml(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ml(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Ml(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 gv extends Jl{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 Ni(n,e){if(pt(n)||n===null)return e;if(n instanceof Jl)return n;if(Gy(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?pn.utcInstance:pn.parseSpecifier(t)||Si.create(n)}else return ds(n)?pn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new gv(n)}let sc=()=>Date.now(),lc="system",rc=null,oc=null,ac=null,uc;class Jt{static get now(){return sc}static set now(e){sc=e}static set defaultZone(e){lc=e}static get defaultZone(){return Ni(lc,Iu.instance)}static get defaultLocale(){return rc}static set defaultLocale(e){rc=e}static get defaultNumberingSystem(){return oc}static set defaultNumberingSystem(e){oc=e}static get defaultOutputCalendar(){return ac}static set defaultOutputCalendar(e){ac=e}static get throwOnInvalid(){return uc}static set throwOnInvalid(e){uc=e}static resetCaches(){It.resetCache(),Si.resetCache()}}let fc={};function _v(n,e={}){const t=JSON.stringify([n,e]);let i=fc[t];return i||(i=new Intl.ListFormat(n,e),fc[t]=i),i}let Wa={};function Ya(n,e={}){const t=JSON.stringify([n,e]);let i=Wa[t];return i||(i=new Intl.DateTimeFormat(n,e),Wa[t]=i),i}let Ka={};function bv(n,e={}){const t=JSON.stringify([n,e]);let i=Ka[t];return i||(i=new Intl.NumberFormat(n,e),Ka[t]=i),i}let Ja={};function yv(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Ja[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Ja[s]=l),l}let vl=null;function vv(){return vl||(vl=new Intl.DateTimeFormat().resolvedOptions().locale,vl)}function kv(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Ya(n).resolvedOptions()}catch{t=Ya(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function wv(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function Sv(n){const e=[];for(let t=1;t<=12;t++){const i=Qe.utc(2016,t,1);e.push(n(i))}return e}function $v(n){const e=[];for(let t=1;t<=7;t++){const i=Qe.utc(2016,11,13+t);e.push(n(i))}return e}function br(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function Cv(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 Mv{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...r}=i;if(!t||Object.keys(r).length>0){const o={useGrouping:!1,...i};i.padTo>0&&(o.minimumIntegerDigits=i.padTo),this.inf=bv(e,o)}}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):Lu(e,3);return Ut(t,this.padTo)}}}class Ov{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const r=-1*(e.offset/60),o=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;e.offset!==0&&Si.create(o).valid?(s=o,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:Qe.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=Ya(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class Tv{constructor(e,t,i){this.opts={style:"long",...i},!t&&Z_()&&(this.rtf=yv(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):fv(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class It{static fromOpts(e){return It.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Jt.defaultLocale,r=l||(s?"en-US":vv()),o=t||Jt.defaultNumberingSystem,a=i||Jt.defaultOutputCalendar;return new It(r,o,a,l)}static resetCache(){vl=null,Wa={},Ka={},Ja={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return It.create(e,t,i)}constructor(e,t,i,s){const[l,r,o]=kv(e);this.locale=l,this.numberingSystem=t||r||null,this.outputCalendar=i||o||null,this.intl=wv(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=Cv(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:It.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 br(this,e,i,t0,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=Sv(r=>this.extract(r,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return br(this,e,i,s0,()=>{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]=$v(r=>this.extract(r,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return br(this,void 0,e,()=>l0,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Qe.utc(2016,11,13,9),Qe.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return br(this,e,t,r0,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Qe.utc(-40,1,1),Qe.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(),r=l.find(o=>o.type.toLowerCase()===i);return r?r.value:null}numberFormatter(e={}){return new Mv(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Ov(e,this.intl,t)}relFormatter(e={}){return new Tv(this.intl,this.isEnglish(),e)}listFormatter(e={}){return _v(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 xs(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Xs(...n){return e=>n.reduce(([t,i,s],l)=>{const[r,o,a]=l(e,s);return[{...t,...r},o||i,a]},[{},null,1]).slice(0,2)}function Qs(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function o0(...n){return(e,t)=>{const i={};let s;for(s=0;s<n.length;s++)i[n[s]]=Ii(e[t+s]);return[i,null,t+s]}}const a0=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Dv=`(?:${a0.source}?(?:\\[(${Q_.source})\\])?)?`,Nu=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,u0=RegExp(`${Nu.source}${Dv}`),Ru=RegExp(`(?:T${u0.source})?`),Av=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ev=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Pv=/(\d{4})-?(\d{3})/,Lv=o0("weekYear","weekNumber","weekDay"),Fv=o0("year","ordinal"),Iv=/(\d{4})-(\d\d)-(\d\d)/,f0=RegExp(`${Nu.source} ?(?:${a0.source}|(${Q_.source}))?`),Nv=RegExp(`(?: ${f0.source})?`);function js(n,e,t){const i=n[e];return pt(i)?t:Ii(i)}function Rv(n,e){return[{year:js(n,e),month:js(n,e+1,1),day:js(n,e+2,1)},null,e+3]}function el(n,e){return[{hours:js(n,e,0),minutes:js(n,e+1,0),seconds:js(n,e+2,0),milliseconds:Pu(n[e+3])},null,e+4]}function Gl(n,e){const t=!n[e]&&!n[e+1],i=Oo(n[e+1],n[e+2]),s=t?null:pn.instance(i);return[{},s,e+3]}function Zl(n,e){const t=n[e]?Si.create(n[e]):null;return[{},t,e+1]}const jv=RegExp(`^T?${Nu.source}$`),Hv=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function qv(n){const[e,t,i,s,l,r,o,a,u]=n,f=e[0]==="-",c=a&&a[0]==="-",d=(h,g=!1)=>h!==void 0&&(g||h&&f)?-h:h;return[{years:d(xi(t)),months:d(xi(i)),weeks:d(xi(s)),days:d(xi(l)),hours:d(xi(r)),minutes:d(xi(o)),seconds:d(xi(a),a==="-0"),milliseconds:d(Pu(u),c)}]}const Vv={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 ju(n,e,t,i,s,l,r){const o={year:e.length===2?Ua(Ii(e)):Ii(e),month:e0.indexOf(t)+1,day:Ii(i),hour:Ii(s),minute:Ii(l)};return r&&(o.second=Ii(r)),n&&(o.weekday=n.length>3?n0.indexOf(n)+1:i0.indexOf(n)+1),o}const zv=/^(?:(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 Bv(n){const[,e,t,i,s,l,r,o,a,u,f,c]=n,d=ju(e,s,i,t,l,r,o);let h;return a?h=Vv[a]:u?h=0:h=Oo(f,c),[d,new pn(h)]}function Uv(n){return n.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Wv=/^(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$/,Yv=/^(Monday|Tuesday|Wedsday|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$/,Kv=/^(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 cc(n){const[,e,t,i,s,l,r,o]=n;return[ju(e,s,i,t,l,r,o),pn.utcInstance]}function Jv(n){const[,e,t,i,s,l,r,o]=n;return[ju(e,o,t,i,s,l,r),pn.utcInstance]}const Gv=xs(Av,Ru),Zv=xs(Ev,Ru),xv=xs(Pv,Ru),Xv=xs(u0),c0=Xs(Rv,el,Gl,Zl),Qv=Xs(Lv,el,Gl,Zl),ek=Xs(Fv,el,Gl,Zl),tk=Xs(el,Gl,Zl);function nk(n){return Qs(n,[Gv,c0],[Zv,Qv],[xv,ek],[Xv,tk])}function ik(n){return Qs(Uv(n),[zv,Bv])}function sk(n){return Qs(n,[Wv,cc],[Yv,cc],[Kv,Jv])}function lk(n){return Qs(n,[Hv,qv])}const rk=Xs(el);function ok(n){return Qs(n,[jv,rk])}const ak=xs(Iv,Nv),uk=xs(f0),fk=Xs(el,Gl,Zl);function ck(n){return Qs(n,[ak,c0],[uk,fk])}const dk="Invalid Duration",d0={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}},pk={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},...d0},Nn=146097/400,Ds=146097/4800,hk={years:{quarters:4,months:12,weeks:Nn/7,days:Nn,hours:Nn*24,minutes:Nn*24*60,seconds:Nn*24*60*60,milliseconds:Nn*24*60*60*1e3},quarters:{months:3,weeks:Nn/28,days:Nn/4,hours:Nn*24/4,minutes:Nn*24*60/4,seconds:Nn*24*60*60/4,milliseconds:Nn*24*60*60*1e3/4},months:{weeks:Ds/7,days:Ds,hours:Ds*24,minutes:Ds*24*60,seconds:Ds*24*60*60,milliseconds:Ds*24*60*60*1e3},...d0},is=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],mk=is.slice(0).reverse();function Xi(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 bt(i)}function gk(n){return n<0?Math.floor(n):Math.ceil(n)}function p0(n,e,t,i,s){const l=n[s][t],r=e[t]/l,o=Math.sign(r)===Math.sign(i[s]),a=!o&&i[s]!==0&&Math.abs(r)<=1?gk(r):Math.trunc(r);i[s]+=a,e[t]-=a*l}function _k(n,e){mk.reduce((t,i)=>pt(e[i])?t:(t&&p0(n,e,t,e,i),i),null)}class bt{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||It.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?hk:pk,this.isLuxonDuration=!0}static fromMillis(e,t){return bt.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new qn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new bt({values:so(e,bt.normalizeUnit),loc:It.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ds(e))return bt.fromMillis(e);if(bt.isDuration(e))return e;if(typeof e=="object")return bt.fromObject(e);throw new qn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=lk(e);return i?bt.fromObject(i,t):bt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=ok(e);return i?bt.fromObject(i,t):bt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new qn("need to specify a reason the Duration is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Jt.throwOnInvalid)throw new Yy(i);return new bt({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 A_(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?kn.create(this.loc,i).formatDurationFromString(this,e):dk}toHuman(e={}){const t=is.map(i=>{const s=this.values[i];return pt(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+=Lu(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=bt.fromDurationLike(e),i={};for(const s of is)(Ws(t.values,s)||Ws(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Xi(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=bt.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]=X_(e(this.values[i],i));return Xi(this,{values:t},!0)}get(e){return this[bt.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...so(e,bt.normalizeUnit)};return Xi(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),Xi(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return _k(this.matrix,e),Xi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(r=>bt.normalizeUnit(r));const t={},i={},s=this.toObject();let l;for(const r of is)if(e.indexOf(r)>=0){l=r;let o=0;for(const u in i)o+=this.matrix[u][r]*i[u],i[u]=0;ds(s[r])&&(o+=s[r]);const a=Math.trunc(o);t[r]=a,i[r]=(o*1e3-a*1e3)/1e3;for(const u in s)is.indexOf(u)>is.indexOf(r)&&p0(this.matrix,s,u,t,r)}else ds(s[r])&&(i[r]=s[r]);for(const r in i)i[r]!==0&&(t[l]+=r===l?i[r]:i[r]/this.matrix[l][r]);return Xi(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 Xi(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 is)if(!t(this.values[i],e.values[i]))return!1;return!0}}const rl="Invalid Interval";function bk(n,e){return!n||!n.isValid?Nt.invalid("missing or invalid start"):!e||!e.isValid?Nt.invalid("missing or invalid end"):e<n?Nt.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${e.toISO()}`):null}class Nt{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new qn("need to specify a reason the Interval is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Jt.throwOnInvalid)throw new Wy(i);return new Nt({invalid:i})}static fromDateTimes(e,t){const i=ul(e),s=ul(t),l=bk(i,s);return l==null?new Nt({start:i,end:s}):l}static after(e,t){const i=bt.fromDurationLike(t),s=ul(e);return Nt.fromDateTimes(s,s.plus(i))}static before(e,t){const i=bt.fromDurationLike(t),s=ul(e);return Nt.fromDateTimes(s.minus(i),s)}static fromISO(e,t){const[i,s]=(e||"").split("/",2);if(i&&s){let l,r;try{l=Qe.fromISO(i,t),r=l.isValid}catch{r=!1}let o,a;try{o=Qe.fromISO(s,t),a=o.isValid}catch{a=!1}if(r&&a)return Nt.fromDateTimes(l,o);if(r){const u=bt.fromISO(s,t);if(u.isValid)return Nt.after(l,u)}else if(a){const u=bt.fromISO(i,t);if(u.isValid)return Nt.before(o,u)}}return Nt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds"){if(!this.isValid)return NaN;const t=this.start.startOf(e),i=this.end.startOf(e);return Math.floor(i.diff(t,e).get(e))+1}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!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?Nt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ul).filter(r=>this.contains(r)).sort(),i=[];let{s}=this,l=0;for(;s<this.e;){const r=t[l]||this.e,o=+r>+this.e?this.e:r;i.push(Nt.fromDateTimes(s,o)),s=o,l+=1}return i}splitBy(e){const t=bt.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const r=[];for(;i<this.e;){const o=this.start.plus(t.mapUnits(a=>a*s));l=+o>+this.e?this.e:o,r.push(Nt.fromDateTimes(i,l)),i=l,s+=1}return r}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=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<e.e?this.e:e.e;return t>=i?null:Nt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return Nt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],r)=>l?l.overlaps(r)||l.abutsStart(r)?[s,l.union(r)]:[s.concat([l]),r]:[s,r],[[],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"}]),r=Array.prototype.concat(...l),o=r.sort((a,u)=>a.time-u.time);for(const a of o)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(Nt.fromDateTimes(t,a.time)),t=null);return Nt.merge(s)}difference(...e){return Nt.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()})`:rl}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:rl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:rl}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:rl}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:rl}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):bt.invalid(this.invalidReason)}mapEndpoints(e){return Nt.fromDateTimes(e(this.s),e(this.e))}}class yr{static hasDST(e=Jt.defaultZone){const t=Qe.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 Ni(e,Jt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||It.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||It.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||It.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||It.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return It.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return It.create(t,null,"gregory").eras(e)}static features(){return{relative:Z_()}}}function dc(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(bt.fromMillis(i).as("days"))}function yk(n,e,t){const i=[["years",(o,a)=>a.year-o.year],["quarters",(o,a)=>a.quarter-o.quarter],["months",(o,a)=>a.month-o.month+(a.year-o.year)*12],["weeks",(o,a)=>{const u=dc(o,a);return(u-u%7)/7}],["days",dc]],s={};let l,r;for(const[o,a]of i)if(t.indexOf(o)>=0){l=o;let u=a(n,e);r=n.plus({[o]:u}),r>e?(n=n.plus({[o]:u-1}),u-=1):n=r,s[o]=u}return[n,s,r,l]}function vk(n,e,t,i){let[s,l,r,o]=yk(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(r<e&&(r=s.plus({[o]:1})),r!==s&&(l[o]=(l[o]||0)+a/(r-s)));const f=bt.fromObject(l,i);return u.length>0?bt.fromMillis(a,i).shiftTo(...u).plus(f):f}const Hu={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"},pc={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]},kk=Hu.hanidec.replace(/[\[|\]]/g,"").split("");function wk(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t<n.length;t++){const i=n.charCodeAt(t);if(n[t].search(Hu.hanidec)!==-1)e+=kk.indexOf(n[t]);else for(const s in pc){const[l,r]=pc[s];i>=l&&i<=r&&(e+=i-l)}}return parseInt(e,10)}else return e}function Zn({numberingSystem:n},e=""){return new RegExp(`${Hu[n||"latn"]}${e}`)}const Sk="missing Intl.DateTimeFormat.formatToParts support";function kt(n,e=t=>t){return{regex:n,deser:([t])=>e(wk(t))}}const $k=String.fromCharCode(160),h0=`[ ${$k}]`,m0=new RegExp(h0,"g");function Ck(n){return n.replace(/\./g,"\\.?").replace(m0,h0)}function hc(n){return n.replace(/\./g,"").replace(m0," ").toLowerCase()}function xn(n,e){return n===null?null:{regex:RegExp(n.map(Ck).join("|")),deser:([t])=>n.findIndex(i=>hc(t)===hc(i))+e}}function mc(n,e){return{regex:n,deser:([,t,i])=>Oo(t,i),groups:e}}function sa(n){return{regex:n,deser:([e])=>e}}function Mk(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ok(n,e){const t=Zn(e),i=Zn(e,"{2}"),s=Zn(e,"{3}"),l=Zn(e,"{4}"),r=Zn(e,"{6}"),o=Zn(e,"{1,2}"),a=Zn(e,"{1,3}"),u=Zn(e,"{1,6}"),f=Zn(e,"{1,9}"),c=Zn(e,"{2,4}"),d=Zn(e,"{4,6}"),h=b=>({regex:RegExp(Mk(b.val)),deser:([v])=>v,literal:!0}),y=(b=>{if(n.literal)return h(b);switch(b.val){case"G":return xn(e.eras("short",!1),0);case"GG":return xn(e.eras("long",!1),0);case"y":return kt(u);case"yy":return kt(c,Ua);case"yyyy":return kt(l);case"yyyyy":return kt(d);case"yyyyyy":return kt(r);case"M":return kt(o);case"MM":return kt(i);case"MMM":return xn(e.months("short",!0,!1),1);case"MMMM":return xn(e.months("long",!0,!1),1);case"L":return kt(o);case"LL":return kt(i);case"LLL":return xn(e.months("short",!1,!1),1);case"LLLL":return xn(e.months("long",!1,!1),1);case"d":return kt(o);case"dd":return kt(i);case"o":return kt(a);case"ooo":return kt(s);case"HH":return kt(i);case"H":return kt(o);case"hh":return kt(i);case"h":return kt(o);case"mm":return kt(i);case"m":return kt(o);case"q":return kt(o);case"qq":return kt(i);case"s":return kt(o);case"ss":return kt(i);case"S":return kt(a);case"SSS":return kt(s);case"u":return sa(f);case"uu":return sa(o);case"uuu":return kt(t);case"a":return xn(e.meridiems(),0);case"kkkk":return kt(l);case"kk":return kt(c,Ua);case"W":return kt(o);case"WW":return kt(i);case"E":case"c":return kt(t);case"EEE":return xn(e.weekdays("short",!1,!1),1);case"EEEE":return xn(e.weekdays("long",!1,!1),1);case"ccc":return xn(e.weekdays("short",!0,!1),1);case"cccc":return xn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return mc(new RegExp(`([+-]${o.source})(?::(${i.source}))?`),2);case"ZZZ":return mc(new RegExp(`([+-]${o.source})(${i.source})?`),2);case"z":return sa(/[a-z_+-/]{1,256}?/i);default:return h(b)}})(n)||{invalidReason:Sk};return y.token=n,y}const Tk={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 Dk(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let r=Tk[i];if(typeof r=="object"&&(r=r[l]),r)return{literal:!1,val:r}}function Ak(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function Ek(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const r in t)if(Ws(t,r)){const o=t[r],a=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function Pk(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 pt(n.z)||(t=Si.create(n.z)),pt(n.Z)||(t||(t=new pn(n.Z)),i=n.Z),pt(n.q)||(n.M=(n.q-1)*3+1),pt(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),pt(n.u)||(n.S=Pu(n.u)),[Object.keys(n).reduce((l,r)=>{const o=e(r);return o&&(l[o]=n[r]),l},{}),t,i]}let la=null;function Lk(){return la||(la=Qe.fromMillis(1555555555555)),la}function Fk(n,e){if(n.literal)return n;const t=kn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=kn.create(e,t).formatDateTimeParts(Lk()).map(r=>Dk(r,e,t));return l.includes(void 0)?n:l}function Ik(n,e){return Array.prototype.concat(...n.map(t=>Fk(t,e)))}function g0(n,e,t){const i=Ik(kn.parseFormat(t),n),s=i.map(r=>Ok(r,n)),l=s.find(r=>r.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[r,o]=Ak(s),a=RegExp(r,"i"),[u,f]=Ek(e,a,o),[c,d,h]=f?Pk(f):[null,null,void 0];if(Ws(f,"a")&&Ws(f,"H"))throw new yl("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 Nk(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:r}=g0(n,e,t);return[i,s,l,r]}const _0=[0,31,59,90,120,151,181,212,243,273,304,334],b0=[0,31,60,91,121,152,182,213,244,274,305,335];function zn(n,e){return new Xn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function y0(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 v0(n,e,t){return t+(Kl(n)?b0:_0)[e-1]}function k0(n,e){const t=Kl(n)?b0:_0,i=t.findIndex(l=>l<e),s=e-t[i];return{month:i+1,day:s}}function Ga(n){const{year:e,month:t,day:i}=n,s=v0(e,t,i),l=y0(e,t,i);let r=Math.floor((s-l+10)/7),o;return r<1?(o=e-1,r=io(o)):r>io(e)?(o=e+1,r=1):o=e,{weekYear:o,weekNumber:r,weekday:l,...To(n)}}function gc(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=y0(e,1,4),l=Cl(e);let r=t*7+i-s-3,o;r<1?(o=e-1,r+=Cl(o)):r>l?(o=e+1,r-=Cl(e)):o=e;const{month:a,day:u}=k0(o,r);return{year:o,month:a,day:u,...To(n)}}function ra(n){const{year:e,month:t,day:i}=n,s=v0(e,t,i);return{year:e,ordinal:s,...To(n)}}function _c(n){const{year:e,ordinal:t}=n,{month:i,day:s}=k0(e,t);return{year:e,month:i,day:s,...To(n)}}function Rk(n){const e=Mo(n.weekYear),t=ki(n.weekNumber,1,io(n.weekYear)),i=ki(n.weekday,1,7);return e?t?i?!1:zn("weekday",n.weekday):zn("week",n.week):zn("weekYear",n.weekYear)}function jk(n){const e=Mo(n.year),t=ki(n.ordinal,1,Cl(n.year));return e?t?!1:zn("ordinal",n.ordinal):zn("year",n.year)}function w0(n){const e=Mo(n.year),t=ki(n.month,1,12),i=ki(n.day,1,no(n.year,n.month));return e?t?i?!1:zn("day",n.day):zn("month",n.month):zn("year",n.year)}function S0(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=ki(e,0,23)||e===24&&t===0&&i===0&&s===0,r=ki(t,0,59),o=ki(i,0,59),a=ki(s,0,999);return l?r?o?a?!1:zn("millisecond",s):zn("second",i):zn("minute",t):zn("hour",e)}const oa="Invalid DateTime",bc=864e13;function vr(n){return new Xn("unsupported zone",`the zone "${n.name}" is not supported`)}function aa(n){return n.weekData===null&&(n.weekData=Ga(n.c)),n.weekData}function ol(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Qe({...t,...e,old:t})}function $0(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 yc(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 Jr(n,e,t){return $0(Fu(n),e,t)}function vc(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,no(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},r=bt.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"),o=Fu(l);let[a,u]=$0(o,t,n.zone);return r!==0&&(a+=r,u=n.zone.offset(a)),{ts:a,o:u}}function al(n,e,t,i,s,l){const{setZone:r,zone:o}=t;if(n&&Object.keys(n).length!==0){const a=e||o,u=Qe.fromObject(n,{...t,zone:a,specificOffset:l});return r?u:u.setZone(o)}else return Qe.invalid(new Xn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function kr(n,e,t=!0){return n.isValid?kn.create(It.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function ua(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Ut(n.c.year,t?6:4),e?(i+="-",i+=Ut(n.c.month),i+="-",i+=Ut(n.c.day)):(i+=Ut(n.c.month),i+=Ut(n.c.day)),i}function kc(n,e,t,i,s,l){let r=Ut(n.c.hour);return e?(r+=":",r+=Ut(n.c.minute),(n.c.second!==0||!t)&&(r+=":")):r+=Ut(n.c.minute),(n.c.second!==0||!t)&&(r+=Ut(n.c.second),(n.c.millisecond!==0||!i)&&(r+=".",r+=Ut(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?r+="Z":n.o<0?(r+="-",r+=Ut(Math.trunc(-n.o/60)),r+=":",r+=Ut(Math.trunc(-n.o%60))):(r+="+",r+=Ut(Math.trunc(n.o/60)),r+=":",r+=Ut(Math.trunc(n.o%60)))),l&&(r+="["+n.zone.ianaName+"]"),r}const C0={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Hk={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},qk={ordinal:1,hour:0,minute:0,second:0,millisecond:0},M0=["year","month","day","hour","minute","second","millisecond"],Vk=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],zk=["year","ordinal","hour","minute","second","millisecond"];function wc(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 A_(n);return e}function Sc(n,e){const t=Ni(e.zone,Jt.defaultZone),i=It.fromObject(e),s=Jt.now();let l,r;if(pt(n.year))l=s;else{for(const u of M0)pt(n[u])&&(n[u]=C0[u]);const o=w0(n)||S0(n);if(o)return Qe.invalid(o);const a=t.offset(s);[l,r]=Jr(n,a,t)}return new Qe({ts:l,zone:t,loc:i,o:r})}function $c(n,e,t){const i=pt(t.round)?!0:t.round,s=(r,o)=>(r=Lu(r,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(r,o)),l=r=>t.calendary?e.hasSame(n,r)?0:e.startOf(r).diff(n.startOf(r),r).get(r):e.diff(n,r).get(r);if(t.unit)return s(l(t.unit),t.unit);for(const r of t.units){const o=l(r);if(Math.abs(o)>=1)return s(o,r)}return s(n>e?-0:0,t.units[t.units.length-1])}function Cc(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 Qe{constructor(e){const t=e.zone||Jt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Xn("invalid input"):null)||(t.isValid?null:vr(t));this.ts=pt(e.ts)?Jt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const o=t.offset(this.ts);s=yc(this.ts,o),i=Number.isNaN(s.year)?new Xn("invalid input"):null,s=i?null:s,l=i?null:o}this._zone=t,this.loc=e.loc||It.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Qe({})}static local(){const[e,t]=Cc(arguments),[i,s,l,r,o,a,u]=t;return Sc({year:i,month:s,day:l,hour:r,minute:o,second:a,millisecond:u},e)}static utc(){const[e,t]=Cc(arguments),[i,s,l,r,o,a,u]=t;return e.zone=pn.utcInstance,Sc({year:i,month:s,day:l,hour:r,minute:o,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=Zy(e)?e.valueOf():NaN;if(Number.isNaN(i))return Qe.invalid("invalid input");const s=Ni(t.zone,Jt.defaultZone);return s.isValid?new Qe({ts:i,zone:s,loc:It.fromObject(t)}):Qe.invalid(vr(s))}static fromMillis(e,t={}){if(ds(e))return e<-bc||e>bc?Qe.invalid("Timestamp out of range"):new Qe({ts:e,zone:Ni(t.zone,Jt.defaultZone),loc:It.fromObject(t)});throw new qn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ds(e))return new Qe({ts:e*1e3,zone:Ni(t.zone,Jt.defaultZone),loc:It.fromObject(t)});throw new qn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Ni(t.zone,Jt.defaultZone);if(!i.isValid)return Qe.invalid(vr(i));const s=Jt.now(),l=pt(t.specificOffset)?i.offset(s):t.specificOffset,r=so(e,wc),o=!pt(r.ordinal),a=!pt(r.year),u=!pt(r.month)||!pt(r.day),f=a||u,c=r.weekYear||r.weekNumber,d=It.fromObject(t);if((f||o)&&c)throw new yl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new yl("Can't mix ordinal dates with month/day");const h=c||r.weekday&&!f;let g,y,b=yc(s,l);h?(g=Vk,y=Hk,b=Ga(b)):o?(g=zk,y=qk,b=ra(b)):(g=M0,y=C0);let v=!1;for(const D of g){const P=r[D];pt(P)?v?r[D]=y[D]:r[D]=b[D]:v=!0}const S=h?Rk(r):o?jk(r):w0(r),$=S||S0(r);if($)return Qe.invalid($);const C=h?gc(r):o?_c(r):r,[M,T]=Jr(C,l,i),E=new Qe({ts:M,zone:i,o:T,loc:d});return r.weekday&&f&&e.weekday!==E.weekday?Qe.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${E.toISO()}`):E}static fromISO(e,t={}){const[i,s]=nk(e);return al(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=ik(e);return al(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=sk(e);return al(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(pt(e)||pt(t))throw new qn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,r=It.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[o,a,u,f]=Nk(r,e,t);return f?Qe.invalid(f):al(o,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Qe.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=ck(e);return al(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new qn("need to specify a reason the DateTime is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Jt.throwOnInvalid)throw new Uy(i);return new Qe({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?aa(this).weekYear:NaN}get weekNumber(){return this.isValid?aa(this).weekNumber:NaN}get weekday(){return this.isValid?aa(this).weekday:NaN}get ordinal(){return this.isValid?ra(this.c).ordinal:NaN}get monthShort(){return this.isValid?yr.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?yr.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?yr.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?yr.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 no(this.year,this.month)}get daysInYear(){return this.isValid?Cl(this.year):NaN}get weeksInWeekYear(){return this.isValid?io(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=kn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(pn.instance(e),t)}toLocal(){return this.setZone(Jt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Ni(e,Jt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),r=this.toObject();[s]=Jr(r,l,e)}return ol(this,{ts:s,zone:e})}else return Qe.invalid(vr(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return ol(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=so(e,wc),i=!pt(t.weekYear)||!pt(t.weekNumber)||!pt(t.weekday),s=!pt(t.ordinal),l=!pt(t.year),r=!pt(t.month)||!pt(t.day),o=l||r,a=t.weekYear||t.weekNumber;if((o||s)&&a)throw new yl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(r&&s)throw new yl("Can't mix ordinal dates with month/day");let u;i?u=gc({...Ga(this.c),...t}):pt(t.ordinal)?(u={...this.toObject(),...t},pt(t.day)&&(u.day=Math.min(no(u.year,u.month),u.day))):u=_c({...ra(this.c),...t});const[f,c]=Jr(u,this.o,this.zone);return ol(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=bt.fromDurationLike(e);return ol(this,vc(this,t))}minus(e){if(!this.isValid)return this;const t=bt.fromDurationLike(e).negate();return ol(this,vc(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=bt.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?kn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):oa}toLocaleString(e=Ba,t={}){return this.isValid?kn.create(this.loc.clone(t),e).formatDateTime(this):oa}toLocaleParts(e={}){return this.isValid?kn.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 r=e==="extended";let o=ua(this,r);return o+="T",o+=kc(this,r,t,i,s,l),o}toISODate({format:e="extended"}={}){return this.isValid?ua(this,e==="extended"):null}toISOWeekDate(){return kr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:r="extended"}={}){return this.isValid?(s?"T":"")+kc(this,r==="extended",t,e,i,l):null}toRFC2822(){return kr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return kr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ua(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")),kr(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():oa}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 bt.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=xy(t).map(bt.normalizeUnit),r=e.valueOf()>this.valueOf(),o=r?this:e,a=r?e:this,u=vk(o,a,l,s);return r?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Qe.now(),e,t)}until(e){return this.isValid?Nt.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||Qe.fromObject({},{zone:this.zone}),i=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],l=e.unit;return Array.isArray(e.unit)&&(s=e.unit,l=void 0),$c(t,this.plus(i),{...e,numeric:"always",units:s,unit:l})}toRelativeCalendar(e={}){return this.isValid?$c(e.base||Qe.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Qe.isDateTime))throw new qn("min requires all arguments be DateTimes");return nc(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(Qe.isDateTime))throw new qn("max requires all arguments be DateTimes");return nc(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,r=It.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return g0(r,e,t)}static fromStringExplain(e,t,i={}){return Qe.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Ba}static get DATE_MED(){return E_}static get DATE_MED_WITH_WEEKDAY(){return Ky}static get DATE_FULL(){return P_}static get DATE_HUGE(){return L_}static get TIME_SIMPLE(){return F_}static get TIME_WITH_SECONDS(){return I_}static get TIME_WITH_SHORT_OFFSET(){return N_}static get TIME_WITH_LONG_OFFSET(){return R_}static get TIME_24_SIMPLE(){return j_}static get TIME_24_WITH_SECONDS(){return H_}static get TIME_24_WITH_SHORT_OFFSET(){return q_}static get TIME_24_WITH_LONG_OFFSET(){return V_}static get DATETIME_SHORT(){return z_}static get DATETIME_SHORT_WITH_SECONDS(){return B_}static get DATETIME_MED(){return U_}static get DATETIME_MED_WITH_SECONDS(){return W_}static get DATETIME_MED_WITH_WEEKDAY(){return Jy}static get DATETIME_FULL(){return Y_}static get DATETIME_FULL_WITH_SECONDS(){return K_}static get DATETIME_HUGE(){return J_}static get DATETIME_HUGE_WITH_SECONDS(){return G_}}function ul(n){if(Qe.isDateTime(n))return n;if(n&&n.valueOf&&ds(n.valueOf()))return Qe.fromJSDate(n);if(n&&typeof n=="object")return Qe.fromObject(n);throw new qn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}class U{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-01T00:00:00Z"||e==="0001-01-01"||typeof e=="undefined"||Array.isArray(e)&&e.length===0||U.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 U.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!U.isEmpty(e[t]))return!0;return!1}static isObjectArrayWithKeys(e,t){if(!Array.isArray(e)||typeof e[0]!="object")return!1;if(e.length==0)return!0;let i=U.toArray(t);for(let s of i)if(!(s in e[0]))return!1;return!0}static toArray(e,t=!1){return Array.isArray(e)?e:(t||e!==null)&&typeof e!="undefined"?[e]:[]}static inArray(e,t){for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){U.inArray(e,t)||e.push(t)}static findByKey(e,t,i){for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){let 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"){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]=U.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},r=t.split(s);for(const o of r){if(!U.isObject(l)&&!Array.isArray(l)||typeof l[o]=="undefined")return i;l=l[o]}return l}static setByPath(e,t,i,s="."){if(!U.isObject(e)&&!Array.isArray(e)){console.warn("setByPath: data not an object or array.");return}let l=e,r=t.split(s),o=r.pop();for(const a of r)(!U.isObject(l)&&!Array.isArray(l)||!U.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[o]=i}static deleteByPath(e,t,i="."){let s=e||{},l=t.split(i),r=l.pop();for(const o of l)(!U.isObject(s)&&!Array.isArray(s)||!U.isObject(s[o])&&!Array.isArray(s[o]))&&(s[o]={}),s=s[o];Array.isArray(s)?s.splice(r,1):U.isObject(s)&&delete s[r],l.length>0&&(Array.isArray(s)&&!s.length||U.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||U.isObject(e)&&Object.keys(e).length>0)&&U.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s<e;s++)t+=i.charAt(Math.floor(Math.random()*i.length));return t}static sentenize(e,t=!0){if(typeof e!="string")return"";if(e=e.trim().split("_").join(" "),e==="")return e;if(e=e[0].toUpperCase()+e.substring(1),t){let i=e[e.length-1];i!=="."&&i!=="?"&&i!=="!"&&(e+=".")}return e}static slugify(e,t="_",i=[".","=","-"]){if(e==="")return"";const s={a:/а|à|á|å|â/gi,b:/б/gi,c:/ц|ç/gi,d:/д/gi,e:/е|è|é|ê|ẽ|ë/gi,f:/ф/gi,g:/г/gi,h:/х/gi,i:/й|и|ì|í|î/gi,j:/ж/gi,k:/к/gi,l:/л/gi,m:/м/gi,n:/н|ñ/gi,o:/о|ò|ó|ô|ø/gi,p:/п/gi,q:/я/gi,r:/р/gi,s:/с/gi,t:/т/gi,u:/ю|ù|ú|ů|û/gi,v:/в/gi,w:/в/gi,x:/ь/gi,y:/ъ/gi,z:/з/gi,ae:/ä|æ/gi,oe:/ö/gi,ue:/ü/gi,Ae:/Ä/gi,Ue:/Ü/gi,Oe:/Ö/gi,ss:/ß/gi,and:/&/gi};for(let r in s)e=e.replace(s[r],r);const l=e.replace(new RegExp("["+i.join("")+"]","g")," ").replace(/[^\w\ ]/gi,"").replace(/\s+/g,t);return l.charAt(0).toLowerCase()+l.slice(1)}static escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static splitNonEmpty(e,t=","){const i=(e||"").split(t),s=[];for(let l of i)l=l.trim(),U.isEmpty(l)||s.push(l);return s}static joinNonEmpty(e,t=", "){const i=[];for(let s of e)s=typeof s=="string"?s.trim():"",U.isEmpty(s)||i.push(s);return i.join(t)}static getDateTime(e){if(typeof e=="string"){const t="yyyy-MM-dd HH:mm:ss",i="yyyy-MM-dd HH:mm:ss.SSS",s=e.length===i.length?i:t;return Qe.fromFormat(e,s,{zone:"UTC"})}return Qe.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return U.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return U.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{console.warn("Failed to copy.",i)})}static openInWindow(e,t,i,s){t=t||1024,i=i||768,s=s||"popup";let l=window.innerWidth,r=window.innerHeight;t=t>l?l:t,i=i>r?r:i;let o=l/2-t/2,a=r/2-i/2;return window.open(e,s,"width="+t+",height="+i+",top="+a+",left="+o+",resizable,menubar=no")}static getQueryString(e){let t=e.indexOf("?");if(t<0)return"";let i=e.indexOf("#");return e.substring(t+1,i>t?i:e.length)}static getQueryParams(e){let t={},i=U.getQueryString(e).split("&");for(let s in i){let l=i[s].split("=");if(l.length===2){let r=decodeURIComponent(l[1]);if(r.startsWith("{")||r.startsWith("["))try{r=JSON.parse(r)}catch{}t[decodeURIComponent(l[0])]=r}}return t}static setQueryParams(e,t,i=!0){let s=U.getQueryString(e),l=i&&s?U.getQueryParams(e):{},r=Object.assign(l,t),o="";for(let a in r)U.isEmpty(r[a])||(o&&(o+="&"),o+=encodeURIComponent(a)+"=",U.isObject(r[a])?o+=encodeURIComponent(JSON.stringify(r[a])):o+=encodeURIComponent(r[a]));return o=o?"?"+o:"",U.isEmpty(s)?e+o:e.replace("?"+s,o)}static replaceClientQueryParams(e){let t=U.setQueryParams(window.location.href,e);window.location.replace(t)}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return/\.jpg|\.jpeg|\.png|\.svg|\.webp|\.avif$/.test(e)}static checkImageUrl(e){return new Promise((t,i)=>{const s=new Image;s.onload=function(){return t(!0)},s.onerror=function(l){return i(l)},s.src=e})}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(r){let o=new Image;o.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=o.width,c=o.height;return a.width=t,a.height=i,u.drawImage(o,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},o.src=r.target.result},l.readAsDataURL(e)})}static setDocumentTitle(e,t="PocketBase"){let i=[];U.isEmpty(e)||i.push(e.trim()),U.isEmpty(t)||i.push(t.trim()),document.title=i.join(" - ")}static addValueToFormData(e,t,i){if(typeof i!="undefined")if(U.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)U.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):U.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,r,o,a;const t=(e==null?void 0:e.schema)||[],i={"@collectionId":e==null?void 0:e.id,"@collectionName":e==null?void 0:e.name,id:"RECORD_ID",created:"2022-01-01 01:00:00",updated:"2022-01-01 23:59:59"};for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON (array/object)":u.type==="file"?(f="filename.jpg",((s=u.options)==null?void 0:s.maxSelect)>1&&(f=[f])):u.type==="select"?(f=(r=(l=u.options)==null?void 0:l.values)==null?void 0:r[0],((o=u.options)==null?void 0:o.maxSelect)>1&&(f=[f])):u.type==="relation"||u.type==="user"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)>1&&(f=[f])):f="test",i[u.name]=f}return i}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=e||{},e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":case"user":return((t=e.options)==null?void 0:t.maxSelect)>1?"Array<String>":"String";default:return"String"}}}const qu=Oi([]);function mn(n,e=3e3){return T0(n,"success",e)}function O0(n,e=4500){return T0(n,"error",e)}function T0(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{D0(i)},t)};qu.update(s=>(A0(s,i.message),U.pushOrReplaceByKey(s,i,"message"),s))}function D0(n){qu.update(e=>(A0(e,n),e))}function A0(n,e){let t;typeof e=="string"?t=U.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),U.removeByKey(n,"message",t.message))}const _s=Oi({});function Wi(n){_s.set(n||{})}function E0(n){_s.update(e=>(U.deleteByPath(e,n),e))}const Vu=Oi({});function Za(n){Vu.set(n||{})}Eu.prototype.logout=function(n=!0){this.AuthStore.clear(),n&&Gs("/login")};Eu.prototype.errorResponseHandler=function(n,e=!0,t=""){var l,r;if(!n||!(n instanceof Error))return;const i=((l=n==null?void 0:n.response)==null?void 0:l.status)<<0||400,s=((r=n==null?void 0:n.response)==null?void 0:r.data)||{};if(e&&i!==404){let o=s.message||n.message||t;o&&O0(o)}if(U.isEmpty(s.data)||Wi(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Gs("/")};class Bk extends O_{save(e,t){super.save(e,t),t instanceof Us&&Za(t)}clear(){super.clear(),Za(null)}}const we=new Eu("/","en-US",new Bk("pb_admin_auth"));we.AuthStore.model instanceof Us&&Za(we.AuthStore.model);function Mc(n){let e,t,i;return{c(){e=_("div"),e.innerHTML=`<figure class="logo"><img src="/_/images/logo.svg" alt="PocketBase logo" width="40" height="40"/> 
-                    <span class="txt">Pocket<strong>Base</strong></span></figure>`,t=O(),i=_("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function Uk(n){let e,t,i,s,l,r,o,a,u=!n[0]&&Mc();const f=n[2].default,c=Tn(f,n,n[1],null);return{c(){e=_("div"),t=_("div"),i=O(),s=_("div"),u&&u.c(),l=O(),c&&c.c(),r=O(),o=_("div"),p(t,"class","flex-fill"),p(s,"class","wrapper wrapper-sm m-b-xl svelte-1wbawr2"),p(o,"class","flex-fill"),p(e,"class","page-wrapper full-page-panel svelte-1wbawr2")},m(d,h){w(d,e,h),m(e,t),m(e,i),m(e,s),u&&u.m(s,null),m(s,l),c&&c.m(s,null),m(e,r),m(e,o),a=!0},p(d,[h]){d[0]?u&&(u.d(1),u=null):u||(u=Mc(),u.c(),u.m(s,l)),c&&c.p&&(!a||h&2)&&An(c,f,d,d[1],a?Dn(f,d[1],h,null):En(d[1]),null)},i(d){a||(A(c,d),a=!0)},o(d){F(c,d),a=!1},d(d){d&&k(e),u&&u.d(),c&&c.d(d)}}}function Wk(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=r=>{"nobranding"in r&&t(0,l=r.nobranding),"$$scope"in r&&t(1,s=r.$$scope)},[l,s,i]}class P0 extends Fe{constructor(e){super(),Le(this,e,Wk,Uk,Ae,{nobranding:0})}}function Oc(n,e,t){const i=n.slice();return i[11]=e[t],i}const Yk=n=>({}),Tc=n=>({uniqueId:n[3]});function Kk(n){let e=(n[11]||lo)+"",t;return{c(){t=H(e)},m(i,s){w(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||lo)+"")&&_e(t,e)},d(i){i&&k(t)}}}function Jk(n){var i,s;let e=(((i=n[11])==null?void 0:i.message)||((s=n[11])==null?void 0:s.code)||lo)+"",t;return{c(){t=H(e)},m(l,r){w(l,t,r)},p(l,r){var o,a;r&4&&e!==(e=(((o=l[11])==null?void 0:o.message)||((a=l[11])==null?void 0:a.code)||lo)+"")&&_e(t,e)},d(l){l&&k(t)}}}function Dc(n){let e,t;function i(r,o){return typeof r[11]=="object"?Jk:Kk}let s=i(n),l=s(n);return{c(){e=_("div"),l.c(),t=O(),p(e,"class","help-block help-block-error")},m(r,o){w(r,e,o),l.m(e,null),m(e,t)},p(r,o){s===(s=i(r))&&l?l.p(r,o):(l.d(1),l=s(r),l&&(l.c(),l.m(e,t)))},d(r){r&&k(e),l.d()}}}function Gk(n){let e,t,i,s,l;const r=n[7].default,o=Tn(r,n,n[6],Tc);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=Dc(Oc(n,a,f));return{c(){e=_("div"),o&&o.c(),t=O();for(let f=0;f<u.length;f+=1)u[f].c();p(e,"class",n[0]),Q(e,"error",n[2].length)},m(f,c){w(f,e,c),o&&o.m(e,null),m(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=X(e,"click",n[8]),s=!0)},p(f,[c]){if(o&&o.p&&(!i||c&64)&&An(o,r,f,f[6],i?Dn(r,f[6],c,Yk):En(f[6]),Tc),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const h=Oc(f,a,d);u[d]?u[d].p(h,c):(u[d]=Dc(h),u[d].c(),u[d].m(e,null))}for(;d<u.length;d+=1)u[d].d(1);u.length=a.length}(!i||c&1)&&p(e,"class",f[0]),c&5&&Q(e,"error",f[2].length)},i(f){i||(A(o,f),i=!0)},o(f){F(o,f),i=!1},d(f){f&&k(e),o&&o.d(f),Bn(u,f),n[9](null),s=!1,l()}}}const lo="Invalid value";function Zk(n,e,t){let i;hn(n,_s,g=>t(5,i=g));let{$$slots:s={},$$scope:l}=e;const r="field_"+U.randomString(7);let{name:o=""}=e,{class:a=void 0}=e,u,f=[];function c(){E0(o)}pi(()=>(u.addEventListener("change",c),()=>{u.removeEventListener("change",c)}));function d(g){ut.call(this,n,g)}function h(g){he[g?"unshift":"push"](()=>{u=g,t(1,u)})}return n.$$set=g=>{"name"in g&&t(4,o=g.name),"class"in g&&t(0,a=g.class),"$$scope"in g&&t(6,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=U.toArray(U.getNestedVal(i,o)))},[a,u,f,r,o,i,l,s,d,h]}class Ne extends Fe{constructor(e){super(),Le(this,e,Zk,Gk,Ae,{name:4,class:0})}}function xk(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Email"),s=O(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",r=n[9]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0]),l.focus(),o||(a=X(l,"input",n[5]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&1&&l.value!==u[0]&&$e(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function Xk(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=H("Password"),s=O(),l=_("input"),o=O(),a=_("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",r=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),$e(l,n[1]),w(c,o,d),w(c,a,d),u||(f=X(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&r!==(r=c[9])&&p(l,"id",r),d&2&&l.value!==c[1]&&$e(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function Qk(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Password confirm"),s=O(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",r=n[9]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[2]),o||(a=X(l,"input",n[7]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&4&&l.value!==u[2]&&$e(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function e2(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;return s=new Ne({props:{class:"form-field required",name:"email",$$slots:{default:[xk,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"password",$$slots:{default:[Xk,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),a=new Ne({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Qk,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),{c(){e=_("form"),t=_("div"),t.innerHTML="<h4>Create your first admin account in order to continue</h4>",i=O(),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment),u=O(),f=_("button"),f.innerHTML=`<span class="txt">Create and login</span> 
-        <i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),Q(f,"btn-disabled",n[3]),Q(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(g,y){w(g,e,y),m(e,t),m(e,i),V(s,e,null),m(e,l),V(r,e,null),m(e,o),V(a,e,null),m(e,u),m(e,f),c=!0,d||(h=X(e,"submit",Kt(n[4])),d=!0)},p(g,[y]){const b={};y&1537&&(b.$$scope={dirty:y,ctx:g}),s.$set(b);const v={};y&1538&&(v.$$scope={dirty:y,ctx:g}),r.$set(v);const S={};y&1540&&(S.$$scope={dirty:y,ctx:g}),a.$set(S),y&8&&Q(f,"btn-disabled",g[3]),y&8&&Q(f,"btn-loading",g[3])},i(g){c||(A(s.$$.fragment,g),A(r.$$.fragment,g),A(a.$$.fragment,g),c=!0)},o(g){F(s.$$.fragment,g),F(r.$$.fragment,g),F(a.$$.fragment,g),c=!1},d(g){g&&k(e),z(s),z(r),z(a),d=!1,h()}}}function t2(n,e,t){const i=_n();let s="",l="",r="",o=!1;async function a(){if(!o){t(3,o=!0);try{await we.Admins.create({email:s,password:l,passwordConfirm:r}),await we.Admins.authViaEmail(s,l),i("submit")}catch(d){we.errorResponseHandler(d)}t(3,o=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){r=this.value,t(2,r)}return[s,l,r,o,a,u,f,c]}class n2 extends Fe{constructor(e){super(),Le(this,e,t2,e2,Ae,{})}}function Ac(n){let e,t;return e=new P0({props:{$$slots:{default:[i2]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function i2(n){let e,t;return e=new n2({}),e.$on("submit",n[1]),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p:re,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function s2(n){let e,t,i=n[0]&&Ac(n);return{c(){i&&i.c(),e=lt()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Ac(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(Oe(),F(i,1,1,()=>{i=null}),Te())},i(s){t||(A(i),t=!0)},o(s){F(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function l2(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){we.logout(!1),t(0,i=!0);return}we.AuthStore.isValid?Gs("/collections"):we.logout()}return[i,async()=>{t(0,i=!1),await Mi(),window.location.search=""}]}class r2 extends Fe{constructor(e){super(),Le(this,e,l2,s2,Ae,{})}}let xa,Qi;const Xa="app-tooltip";function Ec(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Vi(){return Qi=Qi||document.querySelector("."+Xa),Qi||(Qi=document.createElement("div"),Qi.classList.add(Xa),document.body.appendChild(Qi)),Qi}function L0(n,e){let t=Vi();if(!t.classList.contains("active")||!(e!=null&&e.text)){Qa();return}t.textContent=e.text,t.className=Xa+" active",e.class&&t.classList.add(e.class),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),r=0,o=0,a=5;e.position=="left"?(r=l.top+l.height/2-i/2,o=l.left-s-a):e.position=="right"?(r=l.top+l.height/2-i/2,o=l.right+a):e.position=="top"?(r=l.top-i-a,o=l.left+l.width/2-s/2):e.position=="top-left"?(r=l.top-i-a,o=l.left):e.position=="top-right"?(r=l.top-i-a,o=l.right-s):e.position=="bottom-left"?(r=l.top+l.height+a,o=l.left):e.position=="bottom-right"?(r=l.top+l.height+a,o=l.right-s):(r=l.top+l.height+a,o=l.left+l.width/2-s/2),o+s>document.documentElement.clientWidth&&(o=document.documentElement.clientWidth-s),o=o>=0?o:0,r+i>document.documentElement.clientHeight&&(r=document.documentElement.clientHeight-i),r=r>=0?r:0,t.style.top=r+"px",t.style.left=o+"px"}function Qa(){clearTimeout(xa),Vi().classList.remove("active"),Vi().activeNode=void 0}function o2(n,e){Vi().activeNode=n,clearTimeout(xa),xa=setTimeout(()=>{Vi().classList.add("active"),L0(n,e)},isNaN(e.delay)?250:e.delay)}function St(n,e){let t=Ec(e);function i(){o2(n,t)}function s(){Qa()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&U.isFocusable(n))&&n.addEventListener("click",s),Vi(),{update(l){var r,o;t=Ec(l),(o=(r=Vi())==null?void 0:r.activeNode)!=null&&o.contains(n)&&L0(n,t)},destroy(){var l,r;(r=(l=Vi())==null?void 0:l.activeNode)!=null&&r.contains(n)&&Qa(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Do(n){const e=n-1;return e*e*e+1}function ro(n,{delay:e=0,duration:t=400,easing:i=Ul}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function ni(n,{delay:e=0,duration:t=400,easing:i=Do,x:s=0,y:l=0,opacity:r=0}={}){const o=getComputedStyle(n),a=+o.opacity,u=o.transform==="none"?"":o.transform,f=a*(1-r);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 un(n,{delay:e=0,duration:t=400,easing:i=Do}={}){const s=getComputedStyle(n),l=+s.opacity,r=parseFloat(s.height),o=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*r}px;padding-top: ${h*o}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 Wn(n,{delay:e=0,duration:t=400,easing:i=Do,start:s=0,opacity:l=0}={}){const r=getComputedStyle(n),o=+r.opacity,a=r.transform==="none"?"":r.transform,u=1-s,f=o*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>`
-			transform: ${a} scale(${1-u*d});
-			opacity: ${o-f*d}
-		`}}function a2(n){let e,t,i,s;return{c(){e=_("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,r){w(l,e,r),n[13](e),$e(e,n[7]),i||(s=X(e,"input",n[14]),i=!0)},p(l,r){r&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),r&128&&e.value!==l[7]&&$e(e,l[7])},i:re,o:re,d(l){l&&k(e),n[13](null),i=!1,s()}}}function u2(n){let e,t,i,s;function l(a){n[12](a)}var r=n[4];function o(a){let u={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 r&&(e=new r(o(n)),he.push(()=>Re(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=lt()},m(a,u){e&&V(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],je(()=>t=!1)),r!==(r=a[4])){if(e){Oe();const c=e;F(c.$$.fragment,1,0,()=>{z(c,1)}),Te()}r?(e=new r(o(a)),he.push(()=>Re(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else r&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&F(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&z(e,a)}}}function Pc(n){let e,t,i,s,l,r,o=n[7]!==n[0]&&Lc();return{c(){o&&o.c(),e=O(),t=_("button"),t.innerHTML='<span class="txt">Clear</span>',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){o&&o.m(a,u),w(a,e,u),w(a,t,u),s=!0,l||(r=X(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?o?u&129&&A(o,1):(o=Lc(),o.c(),A(o,1),o.m(e.parentNode,e)):o&&(Oe(),F(o,1,1,()=>{o=null}),Te())},i(a){s||(A(o),Dt(()=>{i||(i=ft(t,ni,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){F(o),i||(i=ft(t,ni,{duration:150,x:5},!1)),i.run(0),s=!1},d(a){o&&o.d(a),a&&k(e),a&&k(t),a&&i&&i.end(),l=!1,r()}}}function Lc(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Search</span>',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(Dt(()=>{t||(t=ft(e,ni,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=ft(e,ni,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function f2(n){let e,t,i,s,l,r,o,a,u,f,c;const d=[u2,a2],h=[];function g(b,v){return b[4]&&!b[5]?0:1}r=g(n),o=h[r]=d[r](n);let y=(n[0].length||n[7].length)&&Pc(n);return{c(){e=_("div"),t=_("form"),i=_("label"),s=_("i"),l=O(),o.c(),a=O(),y&&y.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(b,v){w(b,e,v),m(e,t),m(t,i),m(i,s),m(t,l),h[r].m(t,null),m(t,a),y&&y.m(t,null),u=!0,f||(c=[X(t,"submit",Kt(n[10])),X(e,"click",Un(n[11]))],f=!0)},p(b,[v]){let S=r;r=g(b),r===S?h[r].p(b,v):(Oe(),F(h[S],1,1,()=>{h[S]=null}),Te(),o=h[r],o?o.p(b,v):(o=h[r]=d[r](b),o.c()),A(o,1),o.m(t,a)),b[0].length||b[7].length?y?(y.p(b,v),v&129&&A(y,1)):(y=Pc(b),y.c(),A(y,1),y.m(t,null)):y&&(Oe(),F(y,1,1,()=>{y=null}),Te())},i(b){u||(A(o),A(y),u=!0)},o(b){F(o),F(y),u=!1},d(b){b&&k(e),h[r].d(),y&&y.d(),f=!1,rt(c)}}}function c2(n,e,t){const i=_n(),s="search_"+U.randomString(7);let{value:l=""}=e,{placeholder:r='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:o=new Ln}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function y(){u||f||(t(5,f=!0),t(4,u=(await rs(()=>import("./FilterAutocompleteInput.e18b080c.js"),[])).default),t(5,f=!1))}pi(()=>{y()});function b(M){ut.call(this,n,M)}function v(M){d=M,t(7,d),t(0,l)}function S(M){he[M?"unshift":"push"](()=>{c=M,t(6,c)})}function $(){d=this.value,t(7,d),t(0,l)}const C=()=>{h(!1),g()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,r=M.placeholder),"autocompleteCollection"in M&&t(2,o=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,r,o,a,u,f,c,d,s,h,g,b,v,S,$,C]}class Ao extends Fe{constructor(e){super(),Le(this,e,c2,f2,Ae,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function d2(n){let e,t,i,s,l;const r=n[6].default,o=Tn(r,n,n[5],null);return{c(){e=_("th"),o&&o.c(),p(e,"tabindex","0"),p(e,"class",t="col-sort "+n[1]),Q(e,"col-sort-disabled",n[3]),Q(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),Q(e,"sort-desc",n[0]==="-"+n[2]),Q(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){w(a,e,u),o&&o.m(e,null),i=!0,s||(l=[X(e,"click",n[7]),X(e,"keydown",n[8])],s=!0)},p(a,[u]){o&&o.p&&(!i||u&32)&&An(o,r,a,a[5],i?Dn(r,a[5],u,null):En(a[5]),null),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),u&10&&Q(e,"col-sort-disabled",a[3]),u&7&&Q(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),u&7&&Q(e,"sort-desc",a[0]==="-"+a[2]),u&7&&Q(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(o,a),i=!0)},o(a){F(o,a),i=!1},d(a){a&&k(e),o&&o.d(a),s=!1,rt(l)}}}function p2(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:r}=e,{sort:o=""}=e,{disable:a=!1}=e;function u(){a||("-"+r===o?t(0,o="+"+r):t(0,o="-"+r))}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,r=d.name),"sort"in d&&t(0,o=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[o,l,r,a,u,s,i,f,c]}class Qt extends Fe{constructor(e){super(),Le(this,e,p2,d2,Ae,{class:1,name:2,sort:0,disable:3})}}function h2(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function m2(n){let e,t=U.formatToUTCDate(n[0])+"",i,s,l,r,o;return{c(){e=_("span"),i=H(t),s=H(" UTC"),p(e,"class","txt")},m(a,u){w(a,e,u),m(e,i),m(e,s),r||(o=Xe(l=St.call(null,e,U.formatToLocalDate(n[0])+" Local")),r=!0)},p(a,u){u&1&&t!==(t=U.formatToUTCDate(a[0])+"")&&_e(i,t),l&&Jn(l.update)&&u&1&&l.update.call(null,U.formatToLocalDate(a[0])+" Local")},d(a){a&&k(e),r=!1,o()}}}function g2(n){let e;function t(l,r){return l[0]?m2:h2}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function _2(n,e,t){let{date:i=""}=e;return n.$$set=s=>{"date"in s&&t(0,i=s.date)},[i]}class $i extends Fe{constructor(e){super(),Le(this,e,_2,g2,Ae,{date:0})}}function Fc(n,e,t){const i=n.slice();return i[21]=e[t],i}function b2(n){let e;return{c(){e=_("div"),e.innerHTML=`<i class="ri-global-line"></i> 
-                        <span class="txt">method</span>`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function y2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="url",p(t,"class",U.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function v2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="referer",p(t,"class",U.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function k2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="status",p(t,"class",U.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function w2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="created",p(t,"class",U.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function Ic(n){let e;function t(l,r){return l[6]?$2:S2}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function S2(n){var o;let e,t,i,s,l,r=((o=n[0])==null?void 0:o.length)&&Nc(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No logs found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?r?r.p(a,u):(r=Nc(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function $2(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td> 
-                    `},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function Nc(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[18]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function Rc(n){let e;return{c(){e=_("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function jc(n,e){var se,Z,De;let t,i,s,l=((se=e[21].method)==null?void 0:se.toUpperCase())+"",r,o,a,u,f,c=e[21].url+"",d,h,g,y,b,v,S=(e[21].referer||"N/A")+"",$,C,M,T,E,D=e[21].status+"",P,L,N,R,J,W,q,G,K,Y,ne=(((Z=e[21].meta)==null?void 0:Z.errorMessage)||((De=e[21].meta)==null?void 0:De.errorData))&&Rc();R=new $i({props:{date:e[21].created}});function fe(){return e[16](e[21])}function ye(...te){return e[17](e[21],...te)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("span"),r=H(l),a=O(),u=_("td"),f=_("span"),d=H(c),g=O(),ne&&ne.c(),y=O(),b=_("td"),v=_("span"),$=H(S),M=O(),T=_("td"),E=_("span"),P=H(D),L=O(),N=_("td"),B(R.$$.fragment),J=O(),W=_("td"),W.innerHTML='<i class="ri-arrow-right-line"></i>',q=O(),p(s,"class",o="label txt-uppercase "+e[9][e[21].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[21].url),p(u,"class","col-type-text col-field-url"),p(v,"class","txt txt-ellipsis"),p(v,"title",C=e[21].referer),Q(v,"txt-hint",!e[21].referer),p(b,"class","col-type-text col-field-referer"),p(E,"class","label"),Q(E,"label-danger",e[21].status>=400),p(T,"class","col-type-number col-field-status"),p(N,"class","col-type-date col-field-created"),p(W,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(te,be){w(te,t,be),m(t,i),m(i,s),m(s,r),m(t,a),m(t,u),m(u,f),m(f,d),m(u,g),ne&&ne.m(u,null),m(t,y),m(t,b),m(b,v),m(v,$),m(t,M),m(t,T),m(T,E),m(E,P),m(t,L),m(t,N),V(R,N,null),m(t,J),m(t,W),m(t,q),G=!0,K||(Y=[X(t,"click",fe),X(t,"keydown",ye)],K=!0)},p(te,be){var ie,ve,He;e=te,(!G||be&8)&&l!==(l=((ie=e[21].method)==null?void 0:ie.toUpperCase())+"")&&_e(r,l),(!G||be&8&&o!==(o="label txt-uppercase "+e[9][e[21].method.toLowerCase()]))&&p(s,"class",o),(!G||be&8)&&c!==(c=e[21].url+"")&&_e(d,c),(!G||be&8&&h!==(h=e[21].url))&&p(f,"title",h),((ve=e[21].meta)==null?void 0:ve.errorMessage)||((He=e[21].meta)==null?void 0:He.errorData)?ne||(ne=Rc(),ne.c(),ne.m(u,null)):ne&&(ne.d(1),ne=null),(!G||be&8)&&S!==(S=(e[21].referer||"N/A")+"")&&_e($,S),(!G||be&8&&C!==(C=e[21].referer))&&p(v,"title",C),be&8&&Q(v,"txt-hint",!e[21].referer),(!G||be&8)&&D!==(D=e[21].status+"")&&_e(P,D),be&8&&Q(E,"label-danger",e[21].status>=400);const ue={};be&8&&(ue.date=e[21].created),R.$set(ue)},i(te){G||(A(R.$$.fragment,te),G=!0)},o(te){F(R.$$.fragment,te),G=!1},d(te){te&&k(t),ne&&ne.d(),z(R),K=!1,rt(Y)}}}function Hc(n){let e,t,i=n[3].length+"",s,l,r;return{c(){e=_("small"),t=H("Showing "),s=H(i),l=H(" of "),r=H(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(o,a){w(o,e,a),m(e,t),m(e,s),m(e,l),m(e,r)},p(o,a){a&8&&i!==(i=o[3].length+"")&&_e(s,i),a&16&&_e(r,o[4])},d(o){o&&k(e)}}}function qc(n){let e,t,i,s,l=n[4]-n[3].length+"",r,o,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=H("Load more ("),r=H(l),o=H(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),Q(t,"btn-loading",n[6]),Q(t,"btn-disabled",n[6]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,r),m(i,o),a||(u=X(t,"click",n[19]),a=!0)},p(f,c){c&24&&l!==(l=f[4]-f[3].length+"")&&_e(r,l),c&64&&Q(t,"btn-loading",f[6]),c&64&&Q(t,"btn-disabled",f[6])},d(f){f&&k(e),a=!1,u()}}}function C2(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E=[],D=new Map,P,L,N,R;function J(ie){n[11](ie)}let W={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[b2]},$$scope:{ctx:n}};n[1]!==void 0&&(W.sort=n[1]),l=new Qt({props:W}),he.push(()=>Re(l,"sort",J));function q(ie){n[12](ie)}let G={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[y2]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),a=new Qt({props:G}),he.push(()=>Re(a,"sort",q));function K(ie){n[13](ie)}let Y={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[v2]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),c=new Qt({props:Y}),he.push(()=>Re(c,"sort",K));function ne(ie){n[14](ie)}let fe={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[k2]},$$scope:{ctx:n}};n[1]!==void 0&&(fe.sort=n[1]),g=new Qt({props:fe}),he.push(()=>Re(g,"sort",ne));function ye(ie){n[15](ie)}let se={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[w2]},$$scope:{ctx:n}};n[1]!==void 0&&(se.sort=n[1]),v=new Qt({props:se}),he.push(()=>Re(v,"sort",ye));let Z=n[3];const De=ie=>ie[21].id;for(let ie=0;ie<Z.length;ie+=1){let ve=Fc(n,Z,ie),He=De(ve);D.set(He,E[ie]=jc(He,ve))}let te=null;Z.length||(te=Ic(n));let be=n[3].length&&Hc(n),ue=n[3].length&&n[7]&&qc(n);return{c(){e=_("div"),t=_("table"),i=_("thead"),s=_("tr"),B(l.$$.fragment),o=O(),B(a.$$.fragment),f=O(),B(c.$$.fragment),h=O(),B(g.$$.fragment),b=O(),B(v.$$.fragment),$=O(),C=_("th"),M=O(),T=_("tbody");for(let ie=0;ie<E.length;ie+=1)E[ie].c();te&&te.c(),P=O(),be&&be.c(),L=O(),ue&&ue.c(),N=lt(),p(C,"class","col-type-action min-width"),p(t,"class","table"),Q(t,"table-loading",n[6]),p(e,"class","table-wrapper")},m(ie,ve){w(ie,e,ve),m(e,t),m(t,i),m(i,s),V(l,s,null),m(s,o),V(a,s,null),m(s,f),V(c,s,null),m(s,h),V(g,s,null),m(s,b),V(v,s,null),m(s,$),m(s,C),m(t,M),m(t,T);for(let He=0;He<E.length;He+=1)E[He].m(T,null);te&&te.m(T,null),w(ie,P,ve),be&&be.m(ie,ve),w(ie,L,ve),ue&&ue.m(ie,ve),w(ie,N,ve),R=!0},p(ie,[ve]){const He={};ve&16777216&&(He.$$scope={dirty:ve,ctx:ie}),!r&&ve&2&&(r=!0,He.sort=ie[1],je(()=>r=!1)),l.$set(He);const Ie={};ve&16777216&&(Ie.$$scope={dirty:ve,ctx:ie}),!u&&ve&2&&(u=!0,Ie.sort=ie[1],je(()=>u=!1)),a.$set(Ie);const qe={};ve&16777216&&(qe.$$scope={dirty:ve,ctx:ie}),!d&&ve&2&&(d=!0,qe.sort=ie[1],je(()=>d=!1)),c.$set(qe);const oe={};ve&16777216&&(oe.$$scope={dirty:ve,ctx:ie}),!y&&ve&2&&(y=!0,oe.sort=ie[1],je(()=>y=!1)),g.$set(oe);const le={};ve&16777216&&(le.$$scope={dirty:ve,ctx:ie}),!S&&ve&2&&(S=!0,le.sort=ie[1],je(()=>S=!1)),v.$set(le),ve&841&&(Z=ie[3],Oe(),E=ot(E,ve,De,1,ie,Z,D,T,Lt,jc,null,Fc),Te(),!Z.length&&te?te.p(ie,ve):Z.length?te&&(te.d(1),te=null):(te=Ic(ie),te.c(),te.m(T,null))),ve&64&&Q(t,"table-loading",ie[6]),ie[3].length?be?be.p(ie,ve):(be=Hc(ie),be.c(),be.m(L.parentNode,L)):be&&(be.d(1),be=null),ie[3].length&&ie[7]?ue?ue.p(ie,ve):(ue=qc(ie),ue.c(),ue.m(N.parentNode,N)):ue&&(ue.d(1),ue=null)},i(ie){if(!R){A(l.$$.fragment,ie),A(a.$$.fragment,ie),A(c.$$.fragment,ie),A(g.$$.fragment,ie),A(v.$$.fragment,ie);for(let ve=0;ve<Z.length;ve+=1)A(E[ve]);R=!0}},o(ie){F(l.$$.fragment,ie),F(a.$$.fragment,ie),F(c.$$.fragment,ie),F(g.$$.fragment,ie),F(v.$$.fragment,ie);for(let ve=0;ve<E.length;ve+=1)F(E[ve]);R=!1},d(ie){ie&&k(e),z(l),z(a),z(c),z(g),z(v);for(let ve=0;ve<E.length;ve+=1)E[ve].d();te&&te.d(),ie&&k(P),be&&be.d(ie),ie&&k(L),ue&&ue.d(ie),ie&&k(N)}}}function M2(n,e,t){let i;const s=_n(),l={get:"label-info",post:"label-success",patch:"label-warning",delete:"label-danger"};let{filter:r=""}=e,{presets:o=""}=e,{sort:a="-rowid"}=e,u=[],f=1,c=0,d=!1;async function h(D=1){return t(6,d=!0),we.Logs.getRequestsList(D,40,{sort:a,filter:[o,r].filter(Boolean).join("&&")}).then(P=>{D<=1&&g(),t(6,d=!1),t(3,u=u.concat(P.items)),t(5,f=P.page),t(4,c=P.totalItems),s("load",u)}).catch(P=>{P!==null&&(t(6,d=!1),console.warn(P),g(),we.errorResponseHandler(P,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,c=0)}function y(D){a=D,t(1,a)}function b(D){a=D,t(1,a)}function v(D){a=D,t(1,a)}function S(D){a=D,t(1,a)}function $(D){a=D,t(1,a)}const C=D=>s("select",D),M=(D,P)=>{P.code==="Enter"&&(P.preventDefault(),s("select",D))},T=()=>t(0,r=""),E=()=>h(f+1);return n.$$set=D=>{"filter"in D&&t(0,r=D.filter),"presets"in D&&t(10,o=D.presets),"sort"in D&&t(1,a=D.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a!="undefined"||typeof r!="undefined"||typeof o!="undefined")&&(g(),h(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[r,a,h,u,c,f,d,i,s,l,o,y,b,v,S,$,C,M,T,E]}class O2 extends Fe{constructor(e){super(),Le(this,e,M2,C2,Ae,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*!
- * Chart.js v3.8.0
- * https://www.chartjs.org
- * (c) 2022 Chart.js Contributors
- * Released under the MIT License
- */const F0=function(){return typeof window=="undefined"?function(n){return n()}:window.requestAnimationFrame}();function I0(n,e,t){const i=t||(r=>Array.prototype.slice.call(r));let s=!1,l=[];return function(...r){l=i(r),s||(s=!0,F0.call(window,()=>{s=!1,n.apply(e,l)}))}}function T2(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const D2=n=>n==="start"?"left":n==="end"?"right":"center",Vc=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function gi(){}const A2=function(){let n=0;return function(){return n++}}();function Ct(n){return n===null||typeof n=="undefined"}function Pt(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 dt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Vt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function jn(n,e){return Vt(n)?n:e}function ht(n,e){return typeof n=="undefined"?e:n}const E2=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,N0=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Rt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function $t(n,e,t,i){let s,l,r;if(Pt(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;s<l;s++)e.call(t,n[s],s);else if(dt(n))for(r=Object.keys(n),l=r.length,s=0;s<l;s++)e.call(t,n[r[s]],r[s])}function oo(n,e){let t,i,s,l;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],l=e[t],s.datasetIndex!==l.datasetIndex||s.index!==l.index)return!1;return!0}function ao(n){if(Pt(n))return n.map(ao);if(dt(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=ao(n[t[s]]);return e}return n}function R0(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function P2(n,e,t,i){if(!R0(n))return;const s=e[n],l=t[n];dt(s)&&dt(l)?Nl(s,l,i):e[n]=ao(l)}function Nl(n,e,t){const i=Pt(e)?e:[e],s=i.length;if(!dt(n))return n;t=t||{};const l=t.merger||P2;for(let r=0;r<s;++r){if(e=i[r],!dt(e))continue;const o=Object.keys(e);for(let a=0,u=o.length;a<u;++a)l(o[a],n,e,t)}return n}function Ol(n,e){return Nl(n,e,{merger:L2})}function L2(n,e,t){if(!R0(n))return;const i=e[n],s=t[n];dt(i)&&dt(s)?Ol(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=ao(s))}const F2="",I2=".";function zc(n,e){const t=n.indexOf(I2,e);return t===-1?n.length:t}function Bi(n,e){if(e===F2)return n;let t=0,i=zc(e,t);for(;n&&i>t;)n=n[e.slice(t,i)],t=i+1,i=zc(e,t);return n}function zu(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Yn=n=>typeof n!="undefined",Ui=n=>typeof n=="function",Bc=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function N2(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Ht=Math.PI,Et=2*Ht,R2=Et+Ht,uo=Number.POSITIVE_INFINITY,j2=Ht/180,jt=Ht/2,fl=Ht/4,Uc=Ht*2/3,Vn=Math.log10,ui=Math.sign;function Wc(n){const e=Math.round(n);n=Tl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Vn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function H2(n){const e=[],t=Math.sqrt(n);let i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((s,l)=>s-l).pop(),e}function Rl(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Tl(n,e,t){return Math.abs(n-e)<t}function q2(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function j0(n,e,t){let i,s,l;for(i=0,s=n.length;i<s;i++)l=n[i][t],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function Qn(n){return n*(Ht/180)}function Bu(n){return n*(180/Ht)}function Yc(n){if(!Vt(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function H0(n,e){const t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i);let l=Math.atan2(i,t);return l<-.5*Ht&&(l+=Et),{angle:l,distance:s}}function eu(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function V2(n,e){return(n-e+R2)%Et-Ht}function Cn(n){return(n%Et+Et)%Et}function jl(n,e,t,i){const s=Cn(n),l=Cn(e),r=Cn(t),o=Cn(l-s),a=Cn(r-s),u=Cn(s-l),f=Cn(s-r);return s===l||s===r||i&&l===r||o>a&&u<f}function on(n,e,t){return Math.max(e,Math.min(t,n))}function z2(n){return on(n,-32768,32767)}function Hl(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}const wr=n=>n===0||n===1,Kc=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*Et/t)),Jc=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*Et/t)+1,Dl={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*jt)+1,easeOutSine:n=>Math.sin(n*jt),easeInOutSine:n=>-.5*(Math.cos(Ht*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=>wr(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=>wr(n)?n:Kc(n,.075,.3),easeOutElastic:n=>wr(n)?n:Jc(n,.075,.3),easeInOutElastic(n){return wr(n)?n:n<.5?.5*Kc(n*2,.1125,.45):.5+.5*Jc(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-Dl.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?Dl.easeInBounce(n*2)*.5:Dl.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 xl(n){return n+.5|0}const Hi=(n,e,t)=>Math.max(Math.min(n,t),e);function kl(n){return Hi(xl(n*2.55),0,255)}function zi(n){return Hi(xl(n*255),0,255)}function vi(n){return Hi(xl(n/2.55)/100,0,1)}function Gc(n){return Hi(xl(n*100),0,100)}const Rn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},tu=[..."0123456789ABCDEF"],B2=n=>tu[n&15],U2=n=>tu[(n&240)>>4]+tu[n&15],Sr=n=>(n&240)>>4===(n&15),W2=n=>Sr(n.r)&&Sr(n.g)&&Sr(n.b)&&Sr(n.a);function Y2(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Rn[n[1]]*17,g:255&Rn[n[2]]*17,b:255&Rn[n[3]]*17,a:e===5?Rn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Rn[n[1]]<<4|Rn[n[2]],g:Rn[n[3]]<<4|Rn[n[4]],b:Rn[n[5]]<<4|Rn[n[6]],a:e===9?Rn[n[7]]<<4|Rn[n[8]]:255})),t}const K2=(n,e)=>n<255?e(n):"";function J2(n){var e=W2(n)?B2:U2;return n?"#"+e(n.r)+e(n.g)+e(n.b)+K2(n.a,e):void 0}const G2=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function q0(n,e,t){const i=e*Math.min(t,1-t),s=(l,r=(l+n/30)%12)=>t-i*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function Z2(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 x2(n,e,t){const i=q0(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 X2(n,e,t,i,s){return n===s?(e-t)/i+(e<t?6:0):e===s?(t-n)/i+2:(n-e)/i+4}function Uu(n){const t=n.r/255,i=n.g/255,s=n.b/255,l=Math.max(t,i,s),r=Math.min(t,i,s),o=(l+r)/2;let a,u,f;return l!==r&&(f=l-r,u=o>.5?f/(2-l-r):f/(l+r),a=X2(t,i,s,f,l),a=a*60+.5),[a|0,u||0,o]}function Wu(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(zi)}function Yu(n,e,t){return Wu(q0,n,e,t)}function Q2(n,e,t){return Wu(x2,n,e,t)}function ew(n,e,t){return Wu(Z2,n,e,t)}function V0(n){return(n%360+360)%360}function tw(n){const e=G2.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?kl(+e[5]):zi(+e[5]));const s=V0(+e[2]),l=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?i=Q2(s,l,r):e[1]==="hsv"?i=ew(s,l,r):i=Yu(s,l,r),{r:i[0],g:i[1],b:i[2],a:t}}function nw(n,e){var t=Uu(n);t[0]=V0(t[0]+e),t=Yu(t),n.r=t[0],n.g=t[1],n.b=t[2]}function iw(n){if(!n)return;const e=Uu(n),t=e[0],i=Gc(e[1]),s=Gc(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${vi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Zc={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"},xc={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 sw(){const n={},e=Object.keys(xc),t=Object.keys(Zc);let i,s,l,r,o;for(i=0;i<e.length;i++){for(r=o=e[i],s=0;s<t.length;s++)l=t[s],o=o.replace(l,Zc[l]);l=parseInt(xc[r],16),n[o]=[l>>16&255,l>>8&255,l&255]}return n}let $r;function lw(n){$r||($r=sw(),$r.transparent=[0,0,0,0]);const e=$r[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const rw=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ow(n){const e=rw.exec(n);let t=255,i,s,l;if(!!e){if(e[7]!==i){const r=+e[7];t=e[8]?kl(r):Hi(r*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?kl(i):Hi(i,0,255)),s=255&(e[4]?kl(s):Hi(s,0,255)),l=255&(e[6]?kl(l):Hi(l,0,255)),{r:i,g:s,b:l,a:t}}}function aw(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${vi(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const fa=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,As=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function uw(n,e,t){const i=As(vi(n.r)),s=As(vi(n.g)),l=As(vi(n.b));return{r:zi(fa(i+t*(As(vi(e.r))-i))),g:zi(fa(s+t*(As(vi(e.g))-s))),b:zi(fa(l+t*(As(vi(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Cr(n,e,t){if(n){let i=Uu(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Yu(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function z0(n,e){return n&&Object.assign(e||{},n)}function Xc(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=zi(n[3]))):(e=z0(n,{r:0,g:0,b:0,a:1}),e.a=zi(e.a)),e}function fw(n){return n.charAt(0)==="r"?ow(n):tw(n)}class fo{constructor(e){if(e instanceof fo)return e;const t=typeof e;let i;t==="object"?i=Xc(e):t==="string"&&(i=Y2(e)||lw(e)||fw(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=z0(this._rgb);return e&&(e.a=vi(e.a)),e}set rgb(e){this._rgb=Xc(e)}rgbString(){return this._valid?aw(this._rgb):void 0}hexString(){return this._valid?J2(this._rgb):void 0}hslString(){return this._valid?iw(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const r=t===l?.5:t,o=2*r-1,a=i.a-s.a,u=((o*a===-1?o:(o+a)/(1+o*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=r*i.a+(1-r)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=uw(this._rgb,e._rgb,t)),this}clone(){return new fo(this.rgb)}alpha(e){return this._rgb.a=zi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=xl(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 Cr(this._rgb,2,e),this}darken(e){return Cr(this._rgb,2,-e),this}saturate(e){return Cr(this._rgb,1,e),this}desaturate(e){return Cr(this._rgb,1,-e),this}rotate(e){return nw(this._rgb,e),this}}function B0(n){return new fo(n)}function U0(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Qc(n){return U0(n)?n:B0(n)}function ca(n){return U0(n)?n:B0(n).saturate(.5).darken(.1).hexString()}const ms=Object.create(null),nu=Object.create(null);function Al(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;i<s;++i){const l=t[i];n=n[l]||(n[l]=Object.create(null))}return n}function da(n,e,t){return typeof e=="string"?Nl(Al(n,e),t):Nl(Al(n,""),e)}class cw{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.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)=>ca(i.backgroundColor),this.hoverBorderColor=(t,i)=>ca(i.borderColor),this.hoverColor=(t,i)=>ca(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 da(this,e,t)}get(e){return Al(this,e)}describe(e,t){return da(nu,e,t)}override(e,t){return da(ms,e,t)}route(e,t,i,s){const l=Al(this,e),r=Al(this,i),o="_"+t;Object.defineProperties(l,{[o]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[o],u=r[s];return dt(a)?Object.assign({},u,a):ht(a,u)},set(a){this[o]=a}}})}}var mt=new cw({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function dw(n){return!n||Ct(n.size)||Ct(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function co(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 pw(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 r=0;const o=t.length;let a,u,f,c,d;for(a=0;a<o;a++)if(c=t[a],c!=null&&Pt(c)!==!0)r=co(n,s,l,r,c);else if(Pt(c))for(u=0,f=c.length;u<f;u++)d=c[u],d!=null&&!Pt(d)&&(r=co(n,s,l,r,d));n.restore();const h=l.length/2;if(h>t.length){for(a=0;a<h;a++)delete s[l[a]];l.splice(0,h)}return r}function es(n,e,t){const i=n.currentDevicePixelRatio,s=t!==0?Math.max(t/2,.5):0;return Math.round((e-s)*i)/i+s}function ed(n,e){e=e||n.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,n.width,n.height),e.restore()}function iu(n,e,t,i){let s,l,r,o,a;const u=e.pointStyle,f=e.rotation,c=e.radius;let d=(f||0)*j2;if(u&&typeof u=="object"&&(s=u.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){n.save(),n.translate(t,i),n.rotate(d),n.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),n.restore();return}if(!(isNaN(c)||c<=0)){switch(n.beginPath(),u){default:n.arc(t,i,c,0,Et),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(d)*c,i-Math.cos(d)*c),d+=Uc,n.lineTo(t+Math.sin(d)*c,i-Math.cos(d)*c),d+=Uc,n.lineTo(t+Math.sin(d)*c,i-Math.cos(d)*c),n.closePath();break;case"rectRounded":a=c*.516,o=c-a,l=Math.cos(d+fl)*o,r=Math.sin(d+fl)*o,n.arc(t-l,i-r,a,d-Ht,d-jt),n.arc(t+r,i-l,a,d-jt,d),n.arc(t+l,i+r,a,d,d+jt),n.arc(t-r,i+l,a,d+jt,d+Ht),n.closePath();break;case"rect":if(!f){o=Math.SQRT1_2*c,n.rect(t-o,i-o,2*o,2*o);break}d+=fl;case"rectRot":l=Math.cos(d)*c,r=Math.sin(d)*c,n.moveTo(t-l,i-r),n.lineTo(t+r,i-l),n.lineTo(t+l,i+r),n.lineTo(t-r,i+l),n.closePath();break;case"crossRot":d+=fl;case"cross":l=Math.cos(d)*c,r=Math.sin(d)*c,n.moveTo(t-l,i-r),n.lineTo(t+l,i+r),n.moveTo(t+r,i-l),n.lineTo(t-r,i+l);break;case"star":l=Math.cos(d)*c,r=Math.sin(d)*c,n.moveTo(t-l,i-r),n.lineTo(t+l,i+r),n.moveTo(t+r,i-l),n.lineTo(t-r,i+l),d+=fl,l=Math.cos(d)*c,r=Math.sin(d)*c,n.moveTo(t-l,i-r),n.lineTo(t+l,i+r),n.moveTo(t+r,i-l),n.lineTo(t-r,i+l);break;case"line":l=Math.cos(d)*c,r=Math.sin(d)*c,n.moveTo(t-l,i-r),n.lineTo(t+l,i+r);break;case"dash":n.moveTo(t,i),n.lineTo(t+Math.cos(d)*c,i+Math.sin(d)*c);break}n.fill(),e.borderWidth>0&&n.stroke()}}function ql(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.x<e.right+t&&n.y>e.top-t&&n.y<e.bottom+t}function Ku(n,e){n.save(),n.beginPath(),n.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),n.clip()}function Ju(n){n.restore()}function hw(n,e,t,i,s){if(!e)return n.lineTo(t.x,t.y);if(s==="middle"){const l=(e.x+t.x)/2;n.lineTo(l,e.y),n.lineTo(l,t.y)}else s==="after"!=!!i?n.lineTo(e.x,t.y):n.lineTo(t.x,e.y);n.lineTo(t.x,t.y)}function mw(n,e,t,i){if(!e)return n.lineTo(t.x,t.y);n.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?t.cp2x:t.cp1x,i?t.cp2y:t.cp1y,t.x,t.y)}function po(n,e,t,i,s,l={}){const r=Pt(e)?e:[e],o=l.strokeWidth>0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,gw(n,l),a=0;a<r.length;++a)u=r[a],o&&(l.strokeColor&&(n.strokeStyle=l.strokeColor),Ct(l.strokeWidth)||(n.lineWidth=l.strokeWidth),n.strokeText(u,t,i,l.maxWidth)),n.fillText(u,t,i,l.maxWidth),_w(n,t,i,u,l),i+=s.lineHeight;n.restore()}function gw(n,e){e.translation&&n.translate(e.translation[0],e.translation[1]),Ct(e.rotation)||n.rotate(e.rotation),e.color&&(n.fillStyle=e.color),e.textAlign&&(n.textAlign=e.textAlign),e.textBaseline&&(n.textBaseline=e.textBaseline)}function _w(n,e,t,i,s){if(s.strikethrough||s.underline){const l=n.measureText(i),r=e-l.actualBoundingBoxLeft,o=e+l.actualBoundingBoxRight,a=t-l.actualBoundingBoxAscent,u=t+l.actualBoundingBoxDescent,f=s.strikethrough?(a+u)/2:u;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(r,f),n.lineTo(o,f),n.stroke()}}function ho(n,e){const{x:t,y:i,w:s,h:l,radius:r}=e;n.arc(t+r.topLeft,i+r.topLeft,r.topLeft,-jt,Ht,!0),n.lineTo(t,i+l-r.bottomLeft),n.arc(t+r.bottomLeft,i+l-r.bottomLeft,r.bottomLeft,Ht,jt,!0),n.lineTo(t+s-r.bottomRight,i+l),n.arc(t+s-r.bottomRight,i+l-r.bottomRight,r.bottomRight,jt,0,!0),n.lineTo(t+s,i+r.topRight),n.arc(t+s-r.topRight,i+r.topRight,r.topRight,0,-jt,!0),n.lineTo(t+r.topLeft,i)}const bw=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),yw=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function vw(n,e){const t=(""+n).match(bw);if(!t||t[1]==="normal")return e*1.2;switch(n=+t[2],t[3]){case"px":return n;case"%":n/=100;break}return e*n}const kw=n=>+n||0;function Gu(n,e){const t={},i=dt(e),s=i?Object.keys(e):e,l=dt(n)?i?r=>ht(n[r],n[e[r]]):r=>n[r]:()=>n;for(const r of s)t[r]=kw(l(r));return t}function W0(n){return Gu(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Hs(n){return Gu(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Kn(n){const e=W0(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function On(n,e){n=n||{},e=e||mt.font;let t=ht(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=ht(n.style,e.style);i&&!(""+i).match(yw)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:ht(n.family,e.family),lineHeight:vw(ht(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:ht(n.weight,e.weight),string:""};return s.string=dw(s),s}function Mr(n,e,t,i){let s=!0,l,r,o;for(l=0,r=n.length;l<r;++l)if(o=n[l],o!==void 0&&(e!==void 0&&typeof o=="function"&&(o=o(e),s=!1),t!==void 0&&Pt(o)&&(o=o[t%o.length],s=!1),o!==void 0))return i&&!s&&(i.cacheable=!1),o}function ww(n,e,t){const{min:i,max:s}=n,l=N0(e,(s-i)/2),r=(o,a)=>t&&o===0?0:o+a;return{min:r(i,-Math.abs(l)),max:r(s,l)}}function Yi(n,e){return Object.assign(Object.create(n),e)}function Zu(n,e,t){t=t||(r=>n[r]<e);let i=n.length-1,s=0,l;for(;i-s>1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const us=(n,e,t)=>Zu(n,t,i=>n[i][e]<t),Sw=(n,e,t)=>Zu(n,t,i=>n[i][e]>=t);function $w(n,e,t){let i=0,s=n.length;for(;i<s&&n[i]<e;)i++;for(;s>i&&n[s-1]>t;)s--;return i>0||s<n.length?n.slice(i,s):n}const Y0=["push","pop","shift","splice","unshift"];function Cw(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Y0.forEach(t=>{const i="_onData"+zu(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const r=s.apply(this,l);return n._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...l)}),r}})})}function td(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)&&(Y0.forEach(l=>{delete n[l]}),delete n._chartjs)}function K0(n){const e=new Set;let t,i;for(t=0,i=n.length;t<i;++t)e.add(n[t]);return e.size===i?n:Array.from(e)}function xu(n,e=[""],t=n,i,s=()=>n[0]){Yn(i)||(i=x0("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:r=>xu([r,...n],e,t,i)};return new Proxy(l,{deleteProperty(r,o){return delete r[o],delete r._keys,delete n[0][o],!0},get(r,o){return G0(r,o,()=>Lw(o,e,n,r))},getOwnPropertyDescriptor(r,o){return Reflect.getOwnPropertyDescriptor(r._scopes[0],o)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(r,o){return id(r).includes(o)},ownKeys(r){return id(r)},set(r,o,a){const u=r._storage||(r._storage=s());return r[o]=u[o]=a,delete r._keys,!0}})}function Ys(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:J0(n,i),setContext:l=>Ys(n,l,t,i),override:l=>Ys(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,r){return delete l[r],delete n[r],!0},get(l,r,o){return G0(l,r,()=>Ow(l,r,o))},getOwnPropertyDescriptor(l,r){return l._descriptors.allKeys?Reflect.has(n,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,r)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,r){return Reflect.has(n,r)},ownKeys(){return Reflect.ownKeys(n)},set(l,r,o){return n[r]=o,delete l[r],!0}})}function J0(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:Ui(t)?t:()=>t,isIndexable:Ui(i)?i:()=>i}}const Mw=(n,e)=>n?n+zu(e):e,Xu=(n,e)=>dt(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function G0(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function Ow(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:r}=n;let o=i[e];return Ui(o)&&r.isScriptable(e)&&(o=Tw(e,o,n,t)),Pt(o)&&o.length&&(o=Dw(e,o,n,r.isIndexable)),Xu(e,o)&&(o=Ys(o,s,l&&l[e],r)),o}function Tw(n,e,t,i){const{_proxy:s,_context:l,_subProxy:r,_stack:o}=t;if(o.has(n))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+n);return o.add(n),e=e(l,r||i),o.delete(n),Xu(n,e)&&(e=Qu(s._scopes,s,n,e)),e}function Dw(n,e,t,i){const{_proxy:s,_context:l,_subProxy:r,_descriptors:o}=t;if(Yn(l.index)&&i(n))e=e[l.index%e.length];else if(dt(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=Qu(u,s,n,f);e.push(Ys(c,l,r&&r[n],o))}}return e}function Z0(n,e,t){return Ui(n)?n(e,t):n}const Aw=(n,e)=>n===!0?e:typeof n=="string"?Bi(e,n):void 0;function Ew(n,e,t,i,s){for(const l of e){const r=Aw(t,l);if(r){n.add(r);const o=Z0(r._fallback,t,s);if(Yn(o)&&o!==t&&o!==i)return o}else if(r===!1&&Yn(i)&&t!==i)return null}return!1}function Qu(n,e,t,i){const s=e._rootScopes,l=Z0(e._fallback,t,i),r=[...n,...s],o=new Set;o.add(i);let a=nd(o,r,t,l||t,i);return a===null||Yn(l)&&l!==t&&(a=nd(o,r,l,a,i),a===null)?!1:xu(Array.from(o),[""],s,l,()=>Pw(e,t,i))}function nd(n,e,t,i,s){for(;t;)t=Ew(n,e,t,i,s);return t}function Pw(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return Pt(s)&&dt(t)?t:s}function Lw(n,e,t,i){let s;for(const l of e)if(s=x0(Mw(l,n),t),Yn(s))return Xu(n,s)?Qu(t,i,n,s):s}function x0(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Yn(i))return i}}function id(n){let e=n._keys;return e||(e=n._keys=Fw(n._scopes)),e}function Fw(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 X0(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,r=new Array(i);let o,a,u,f;for(o=0,a=i;o<a;++o)u=o+t,f=e[u],r[o]={r:s.parse(Bi(f,l),u)};return r}const Iw=Number.EPSILON||1e-14,Ks=(n,e)=>e<n.length&&!n[e].skip&&n[e],Q0=n=>n==="x"?"y":"x";function Nw(n,e,t,i){const s=n.skip?e:n,l=e,r=t.skip?e:t,o=eu(l,s),a=eu(r,l);let u=o/(o+a),f=a/(o+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const c=i*u,d=i*f;return{previous:{x:l.x-c*(r.x-s.x),y:l.y-c*(r.y-s.y)},next:{x:l.x+d*(r.x-s.x),y:l.y+d*(r.y-s.y)}}}function Rw(n,e,t){const i=n.length;let s,l,r,o,a,u=Ks(n,0);for(let f=0;f<i-1;++f)if(a=u,u=Ks(n,f+1),!(!a||!u)){if(Tl(e[f],0,Iw)){t[f]=t[f+1]=0;continue}s=t[f]/e[f],l=t[f+1]/e[f],o=Math.pow(s,2)+Math.pow(l,2),!(o<=9)&&(r=3/Math.sqrt(o),t[f]=s*r*e[f],t[f+1]=l*r*e[f])}}function jw(n,e,t="x"){const i=Q0(t),s=n.length;let l,r,o,a=Ks(n,0);for(let u=0;u<s;++u){if(r=o,o=a,a=Ks(n,u+1),!o)continue;const f=o[t],c=o[i];r&&(l=(f-r[t])/3,o[`cp1${t}`]=f-l,o[`cp1${i}`]=c-l*e[u]),a&&(l=(a[t]-f)/3,o[`cp2${t}`]=f+l,o[`cp2${i}`]=c+l*e[u])}}function Hw(n,e="x"){const t=Q0(e),i=n.length,s=Array(i).fill(0),l=Array(i);let r,o,a,u=Ks(n,0);for(r=0;r<i;++r)if(o=a,a=u,u=Ks(n,r+1),!!a){if(u){const f=u[e]-a[e];s[r]=f!==0?(u[t]-a[t])/f:0}l[r]=o?u?ui(s[r-1])!==ui(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}Rw(n,s,l),jw(n,l,e)}function Or(n,e,t){return Math.max(Math.min(n,t),e)}function qw(n,e){let t,i,s,l,r,o=ql(n[0],e);for(t=0,i=n.length;t<i;++t)r=l,l=o,o=t<i-1&&ql(n[t+1],e),l&&(s=n[t],r&&(s.cp1x=Or(s.cp1x,e.left,e.right),s.cp1y=Or(s.cp1y,e.top,e.bottom)),o&&(s.cp2x=Or(s.cp2x,e.left,e.right),s.cp2y=Or(s.cp2y,e.top,e.bottom)))}function Vw(n,e,t,i,s){let l,r,o,a;if(e.spanGaps&&(n=n.filter(u=>!u.skip)),e.cubicInterpolationMode==="monotone")Hw(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,r=n.length;l<r;++l)o=n[l],a=Nw(u,o,n[Math.min(l+1,r-(i?0:1))%r],e.tension),o.cp1x=a.previous.x,o.cp1y=a.previous.y,o.cp2x=a.next.x,o.cp2y=a.next.y,u=o}e.capBezierPoints&&qw(n,t)}function eb(){return typeof window!="undefined"&&typeof document!="undefined"}function ef(n){let e=n.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function mo(n,e,t){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*e.parentNode[t])):i=n,i}const Eo=n=>window.getComputedStyle(n,null);function zw(n,e){return Eo(n).getPropertyValue(e)}const Bw=["top","right","bottom","left"];function ps(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=Bw[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Uw=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Ww(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let r=!1,o,a;if(Uw(s,l,n.target))o=s,a=l;else{const u=e.getBoundingClientRect();o=i.clientX-u.left,a=i.clientY-u.top,r=!0}return{x:o,y:a,box:r}}function ss(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Eo(t),l=s.boxSizing==="border-box",r=ps(s,"padding"),o=ps(s,"border","width"),{x:a,y:u,box:f}=Ww(n,t),c=r.left+(f&&o.left),d=r.top+(f&&o.top);let{width:h,height:g}=e;return l&&(h-=r.width+o.width,g-=r.height+o.height),{x:Math.round((a-c)/h*t.width/i),y:Math.round((u-d)/g*t.height/i)}}function Yw(n,e,t){let i,s;if(e===void 0||t===void 0){const l=ef(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const r=l.getBoundingClientRect(),o=Eo(l),a=ps(o,"border","width"),u=ps(o,"padding");e=r.width-u.width-a.width,t=r.height-u.height-a.height,i=mo(o.maxWidth,l,"clientWidth"),s=mo(o.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||uo,maxHeight:s||uo}}const pa=n=>Math.round(n*10)/10;function Kw(n,e,t,i){const s=Eo(n),l=ps(s,"margin"),r=mo(s.maxWidth,n,"clientWidth")||uo,o=mo(s.maxHeight,n,"clientHeight")||uo,a=Yw(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=ps(s,"border","width"),d=ps(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=pa(Math.min(u,r,a.maxWidth)),f=pa(Math.min(f,o,a.maxHeight)),u&&!f&&(f=pa(u/2)),{width:u,height:f}}function sd(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 r=n.canvas;return r.style&&(t||!r.style.height&&!r.style.width)&&(r.style.height=`${n.height}px`,r.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||r.height!==s||r.width!==l?(n.currentDevicePixelRatio=i,r.height=s,r.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Jw=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 ld(n,e){const t=zw(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function ls(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function Gw(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 Zw(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},r=ls(n,s,t),o=ls(s,l,t),a=ls(l,e,t),u=ls(r,o,t),f=ls(o,a,t);return ls(u,f,t)}const rd=new Map;function xw(n,e){e=e||{};const t=n+JSON.stringify(e);let i=rd.get(t);return i||(i=new Intl.NumberFormat(n,e),rd.set(t,i)),i}function Xl(n,e,t){return xw(e,t).format(n)}const Xw=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}}},Qw=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function ha(n,e,t){return n?Xw(e,t):Qw()}function eS(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 tS(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function tb(n){return n==="angle"?{between:jl,compare:V2,normalize:Cn}:{between:Hl,compare:(e,t)=>e-t,normalize:e=>e}}function od({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 nS(n,e,t){const{property:i,start:s,end:l}=t,{between:r,normalize:o}=tb(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;d<h&&r(o(e[u%a][i]),s,l);++d)u--,f--;u%=a,f%=a}return f<u&&(f+=a),{start:u,end:f,loop:c,style:n.style}}function nb(n,e,t){if(!t)return[n];const{property:i,start:s,end:l}=t,r=e.length,{compare:o,between:a,normalize:u}=tb(i),{start:f,end:c,loop:d,style:h}=nS(n,e,t),g=[];let y=!1,b=null,v,S,$;const C=()=>a(s,$,v)&&o(s,$)!==0,M=()=>o(l,v)===0||a(l,$,v),T=()=>y||C(),E=()=>!y||M();for(let D=f,P=f;D<=c;++D)S=e[D%r],!S.skip&&(v=u(S[i]),v!==$&&(y=a(v,s,l),b===null&&T()&&(b=o(v,s)===0?D:P),b!==null&&E()&&(g.push(od({start:b,end:D,loop:d,count:r,style:h})),b=null),P=D,$=v));return b!==null&&g.push(od({start:b,end:c,loop:d,count:r,style:h})),g}function ib(n,e){const t=[],i=n.segments;for(let s=0;s<i.length;s++){const l=nb(i[s],n.points,e);l.length&&t.push(...l)}return t}function iS(n,e,t,i){let s=0,l=e-1;if(t&&!i)for(;s<e&&!n[s].skip;)s++;for(;s<e&&n[s].skip;)s++;for(s%=e,t&&(l+=s);l>s&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function sS(n,e,t,i){const s=n.length,l=[];let r=e,o=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?o.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=r=u.stop?a:null):(r=a,o.skip&&(e=a)),o=u}return r!==null&&l.push({start:e%s,end:r%s,loop:i}),l}function lS(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:r,end:o}=iS(t,s,l,i);if(i===!0)return ad(n,[{start:r,end:o,loop:l}],t,e);const a=o<r?o+s:o,u=!!n._fullLoop&&r===0&&o===s-1;return ad(n,sS(t,r,a,u),t,e)}function ad(n,e,t,i){return!i||!i.setContext||!t?e:rS(n,e,t,i)}function rS(n,e,t,i){const s=n._chart.getContext(),l=ud(n.options),{_datasetIndex:r,options:{spanGaps:o}}=n,a=t.length,u=[];let f=l,c=e[0].start,d=c;function h(g,y,b,v){const S=o?-1:1;if(g!==y){for(g+=a;t[g%a].skip;)g-=S;for(;t[y%a].skip;)y+=S;g%a!==y%a&&(u.push({start:g%a,end:y%a,loop:b,style:v}),f=v,c=y%a)}}for(const g of e){c=o?c:g.start;let y=t[c%a],b;for(d=c+1;d<=g.end;d++){const v=t[d%a];b=ud(i.setContext(Yi(s,{type:"segment",p0:y,p1:v,p0DataIndex:(d-1)%a,p1DataIndex:d%a,datasetIndex:r}))),oS(b,f)&&h(c,d-1,g.loop,f),y=v,f=b}c<d-1&&h(c,d-1,g.loop,f)}return u}function ud(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function oS(n,e){return e&&JSON.stringify(n)!==JSON.stringify(e)}/*!
- * Chart.js v3.8.0
- * https://www.chartjs.org
- * (c) 2022 Chart.js Contributors
- * Released under the MIT License
- */class aS{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const l=t.listeners[s],r=t.duration;l.forEach(o=>o({chart:e,initial:t.initial,numSteps:r,currentStep:Math.min(i-t.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=F0.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 r=l.length-1,o=!1,a;for(;r>=0;--r)a=l[r],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),o=!0):(l[r]=l[l.length-1],l.pop());o&&(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 _i=new aS;const fd="transparent",uS={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=Qc(n||fd),s=i.valid&&Qc(e||fd);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class fS{constructor(e,t,i,s){const l=t[i];s=Mr([e.to,s,l,e.from]);const r=Mr([e.from,l,s]);this._active=!0,this._fn=e.fn||uS[e.type||typeof r],this._easing=Dl[e.easing]||Dl.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=r,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,r=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Mr([e.to,t,s,e.from]),this._from=Mr([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,r=this._loop,o=this._to;let a;if(this._active=l!==o&&(r||t<i),!this._active){this._target[s]=o,this._notify(!0);return}if(t<0){this._target[s]=l;return}a=t/i%2,a=r&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,o,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][t]()}}const cS=["x","y","borderWidth","radius","tension"],dS=["color","borderColor","backgroundColor"];mt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const pS=Object.keys(mt.animation);mt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});mt.set("animations",{colors:{type:"color",properties:dS},numbers:{type:"number",properties:cS}});mt.describe("animations",{_fallback:"animation"});mt.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 sb{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!dt(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!dt(s))return;const l={};for(const r of pS)l[r]=s[r];(Pt(s.properties)&&s.properties||[i]).forEach(r=>{(r===i||!t.has(r))&&t.set(r,l)})})}_animateOptions(e,t){const i=t.options,s=mS(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&hS(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),r=Object.keys(t),o=Date.now();let a;for(a=r.length-1;a>=0;--a){const u=r[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,o);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new fS(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 _i.add(this._chart,i),!0}}function hS(n,e){const t=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const l=n[i[s]];l&&l.active()&&t.push(l.wait())}return Promise.all(t)}function mS(n,e){if(!e)return;let t=n.options;if(!t){n.options=e;return}return t.$shared&&(n.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function cd(n,e){const t=n&&n.options||{},i=t.reverse,s=t.min===void 0?e:0,l=t.max===void 0?e:0;return{start:i?l:s,end:i?s:l}}function gS(n,e,t){if(t===!1)return!1;const i=cd(n,t),s=cd(e,t);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function _S(n){let e,t,i,s;return dt(n)?(e=n.top,t=n.right,i=n.bottom,s=n.left):e=t=i=s=n,{top:e,right:t,bottom:i,left:s,disabled:n===!1}}function lb(n,e){const t=[],i=n._getSortedDatasetMetas(e);let s,l;for(s=0,l=i.length;s<l;++s)t.push(i[s].index);return t}function dd(n,e,t,i={}){const s=n.keys,l=i.mode==="single";let r,o,a,u;if(e!==null){for(r=0,o=s.length;r<o;++r){if(a=+s[r],a===t){if(i.all)continue;break}u=n.values[a],Vt(u)&&(l||e===0||ui(e)===ui(u))&&(e+=u)}return e}}function bS(n){const e=Object.keys(n),t=new Array(e.length);let i,s,l;for(i=0,s=e.length;i<s;++i)l=e[i],t[i]={x:l,y:n[l]};return t}function pd(n,e){const t=n&&n.options.stacked;return t||t===void 0&&e.stack!==void 0}function yS(n,e,t){return`${n.id}.${e.id}.${t.stack||t.type}`}function vS(n){const{min:e,max:t,minDefined:i,maxDefined:s}=n.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}function kS(n,e,t){const i=n[e]||(n[e]={});return i[t]||(i[t]={})}function hd(n,e,t,i){for(const s of e.getMatchingVisibleMetas(i).reverse()){const l=n[s.index];if(t&&l>0||!t&&l<0)return s.index}return null}function md(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:r,index:o}=i,a=l.axis,u=r.axis,f=yS(l,r,i),c=e.length;let d;for(let h=0;h<c;++h){const g=e[h],{[a]:y,[u]:b}=g,v=g._stacks||(g._stacks={});d=v[u]=kS(s,f,y),d[o]=b,d._top=hd(d,r,!0,i.type),d._bottom=hd(d,r,!1,i.type)}}function ma(n,e){const t=n.scales;return Object.keys(t).filter(i=>t[i].axis===e).shift()}function wS(n,e){return Yi(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function SS(n,e,t){return Yi(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function cl(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 ga=n=>n==="reset"||n==="none",gd=(n,e)=>e?n:Object.assign({},n),$S=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:lb(t,!0),values:null};class mi{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=pd(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&cl(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(c,d,h,g)=>c==="x"?d:c==="r"?g:h,l=t.xAxisID=ht(i.xAxisID,ma(e,"x")),r=t.yAxisID=ht(i.yAxisID,ma(e,"y")),o=t.rAxisID=ht(i.rAxisID,ma(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,r,o),f=t.vAxisID=s(a,r,l,o);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(r),t.rScale=this.getScaleForId(o),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&&td(this._data,this),e._stacked&&cl(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(dt(t))this._data=bS(t);else if(i!==t){if(i){td(i,this);const s=this._cachedMeta;cl(s),s._parsed=[]}t&&Object.isExtensible(t)&&Cw(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=pd(t.vScale,t),t.stack!==i.stack&&(s=!0,cl(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&md(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:r}=i,o=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{Pt(s[e])?d=this.parseArrayData(i,s,e,t):dt(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const h=()=>c[o]===null||u&&c[o]<u[o];for(f=0;f<t;++f)i._parsed[f+e]=c=d[f],a&&(h()&&(a=!1),u=c);i._sorted=a}r&&md(this,d)}parsePrimitiveData(e,t,i,s){const{iScale:l,vScale:r}=e,o=l.axis,a=r.axis,u=l.getLabels(),f=l===r,c=new Array(s);let d,h,g;for(d=0,h=s;d<h;++d)g=d+i,c[d]={[o]:f||l.parse(u[g],g),[a]:r.parse(t[g],g)};return c}parseArrayData(e,t,i,s){const{xScale:l,yScale:r}=e,o=new Array(s);let a,u,f,c;for(a=0,u=s;a<u;++a)f=a+i,c=t[f],o[a]={x:l.parse(c[0],f),y:r.parse(c[1],f)};return o}parseObjectData(e,t,i,s){const{xScale:l,yScale:r}=e,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,u=new Array(s);let f,c,d,h;for(f=0,c=s;f<c;++f)d=f+i,h=t[d],u[f]={x:l.parse(Bi(h,o),d),y:r.parse(Bi(h,a),d)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,i){const s=this.chart,l=this._cachedMeta,r=t[e.axis],o={keys:lb(s,!0),values:t._stacks[e.axis]};return dd(o,r,l.index,{mode:i})}updateRangeFromParsed(e,t,i,s){const l=i[t.axis];let r=l===null?NaN:l;const o=s&&i._stacks[t.axis];s&&o&&(s.values=o,r=dd(s,l,this._cachedMeta.index)),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r)}getMinMax(e,t){const i=this._cachedMeta,s=i._parsed,l=i._sorted&&e===i.iScale,r=s.length,o=this._getOtherScale(e),a=$S(t,i,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:c}=vS(o);let d,h;function g(){h=s[d];const y=h[o.axis];return!Vt(h[e.axis])||f>y||c<y}for(d=0;d<r&&!(!g()&&(this.updateRangeFromParsed(u,e,h,a),l));++d);if(l){for(d=r-1;d>=0;--d)if(!g()){this.updateRangeFromParsed(u,e,h,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,r;for(s=0,l=t.length;s<l;++s)r=t[s][e.axis],Vt(r)&&i.push(r);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,i=t.iScale,s=t.vScale,l=this.getParsed(e);return{label:i?""+i.getLabelForValue(l[i.axis]):"",value:s?""+s.getLabelForValue(l[s.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=_S(ht(this.options.clip,gS(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,i=this._cachedMeta,s=i.data||[],l=t.chartArea,r=[],o=this._drawStart||0,a=this._drawCount||s.length-o,u=this.options.drawActiveElementsOnTop;let f;for(i.dataset&&i.dataset.draw(e,l,o,a),f=o;f<o+a;++f){const c=s[f];c.hidden||(c.active&&u?r.push(c):c.draw(e,l))}for(f=0;f<r.length;++f)r[f].draw(e,l)}getStyle(e,t){const i=t?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,t,i){const s=this.getDataset();let l;if(e>=0&&e<this._cachedMeta.data.length){const r=this._cachedMeta.data[e];l=r.$context||(r.$context=SS(this.getContext(),e,r)),l.parsed=this.getParsed(e),l.raw=s.data[e],l.index=l.dataIndex=e}else l=this.$context||(this.$context=wS(this.chart.getContext(),this.index)),l.dataset=s,l.index=l.datasetIndex=this.index;return l.active=!!t,l.mode=i,l}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",i){const s=t==="active",l=this._cachedDataOpts,r=e+"-"+t,o=l[r],a=this.enableOptionSharing&&Yn(i);if(o)return gd(o,a);const u=this.chart.config,f=u.datasetElementScopeKeys(this._type,e),c=s?[`${e}Hover`,"hover",e,""]:[e,""],d=u.getOptionScopes(this.getDataset(),f),h=Object.keys(mt.elements[e]),g=()=>this.getContext(i,s),y=u.resolveNamedOptions(d,h,g,c);return y.$shared&&(y.$shared=a,l[r]=Object.freeze(gd(y,a))),y}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,r=`animation-${t}`,o=l[r];if(o)return o;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 sb(s,a&&a.animations);return a&&a._cacheable&&(l[r]=Object.freeze(u)),u}getSharedOptions(e){if(!!e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||ga(e)||this.chart._animationsDisabled}updateElement(e,t,i,s){ga(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!ga(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[o,a,u]of this._syncList)this[o](a,u);this._syncList=[];const s=i.length,l=t.length,r=Math.min(l,s);r&&this.parse(0,r),l>s?this._insertElements(s,l-s,e):l<s&&this._removeElements(l,s-l)}_insertElements(e,t,i=!0){const s=this._cachedMeta,l=s.data,r=e+t;let o;const a=u=>{for(u.length+=t,o=u.length-1;o>=r;o--)u[o]=u[o-t]};for(a(l),o=e;o<r;++o)l[o]=new this.dataElementType;this._parsing&&a(s._parsed),this.parse(e,t),i&&this.updateElements(l,e,t,"reset")}updateElements(e,t,i,s){}_removeElements(e,t){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(e,t);i._stacked&&cl(i,s)}i.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,i,s]=e;this[t](i,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}mi.defaults={};mi.prototype.datasetElementType=null;mi.prototype.dataElementType=null;function CS(n,e){if(!n._cache.$bar){const t=n.getMatchingVisibleMetas(e);let i=[];for(let s=0,l=t.length;s<l;s++)i=i.concat(t[s].controller.getAllParsedValues(n));n._cache.$bar=K0(i.sort((s,l)=>s-l))}return n._cache.$bar}function MS(n){const e=n.iScale,t=CS(e,n.type);let i=e._length,s,l,r,o;const a=()=>{r===32767||r===-32768||(Yn(o)&&(i=Math.min(i,Math.abs(r-o)||i)),o=r)};for(s=0,l=t.length;s<l;++s)r=e.getPixelForValue(t[s]),a();for(o=void 0,s=0,l=e.ticks.length;s<l;++s)r=e.getPixelForTick(s),a();return i}function OS(n,e,t,i){const s=t.barThickness;let l,r;return Ct(s)?(l=e.min*t.categoryPercentage,r=t.barPercentage):(l=s*i,r=1),{chunk:l/i,ratio:r,start:e.pixels[n]-l/2}}function TS(n,e,t,i){const s=e.pixels,l=s[n];let r=n>0?s[n-1]:null,o=n<s.length-1?s[n+1]:null;const a=t.categoryPercentage;r===null&&(r=l-(o===null?e.end-e.start:o-l)),o===null&&(o=l+l-r);const u=l-(l-Math.min(r,o))/2*a;return{chunk:Math.abs(o-r)/2*a/i,ratio:t.barPercentage,start:u}}function DS(n,e,t,i){const s=t.parse(n[0],i),l=t.parse(n[1],i),r=Math.min(s,l),o=Math.max(s,l);let a=r,u=o;Math.abs(r)>Math.abs(o)&&(a=o,u=r),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:r,max:o}}function rb(n,e,t,i){return Pt(n)?DS(n,e,t,i):e[t.axis]=t.parse(n,i),e}function _d(n,e,t,i){const s=n.iScale,l=n.vScale,r=s.getLabels(),o=s===l,a=[];let u,f,c,d;for(u=t,f=t+i;u<f;++u)d=e[u],c={},c[s.axis]=o||s.parse(r[u],u),a.push(rb(d,c,l,u));return a}function _a(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function AS(n,e,t){return n!==0?ui(n):(e.isHorizontal()?1:-1)*(e.min>=t?1:-1)}function ES(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.base<n.y,t="bottom",i="top"),e?(s="end",l="start"):(s="start",l="end"),{start:t,end:i,reverse:e,top:s,bottom:l}}function PS(n,e,t,i){let s=e.borderSkipped;const l={};if(!s){n.borderSkipped=l;return}const{start:r,end:o,reverse:a,top:u,bottom:f}=ES(n);s==="middle"&&t&&(n.enableBorderRadius=!0,(t._top||0)===i?s=u:(t._bottom||0)===i?s=f:(l[bd(f,r,o,a)]=!0,s=u)),l[bd(s,r,o,a)]=!0,n.borderSkipped=l}function bd(n,e,t,i){return i?(n=LS(n,e,t),n=yd(n,t,e)):n=yd(n,e,t),n}function LS(n,e,t){return n===e?t:n===t?e:n}function yd(n,e,t){return n==="start"?e:n==="end"?t:n}function FS(n,{inflateAmount:e},t){n.inflateAmount=e==="auto"?t===1?.33:0:e}class tf extends mi{parsePrimitiveData(e,t,i,s){return _d(e,t,i,s)}parseArrayData(e,t,i,s){return _d(e,t,i,s)}parseObjectData(e,t,i,s){const{iScale:l,vScale:r}=e,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,u=l.axis==="x"?o:a,f=r.axis==="x"?o:a,c=[];let d,h,g,y;for(d=i,h=i+s;d<h;++d)y=t[d],g={},g[l.axis]=l.parse(Bi(y,u),d),c.push(rb(Bi(y,f),g,r,d));return c}updateRangeFromParsed(e,t,i,s){super.updateRangeFromParsed(e,t,i,s);const l=i._custom;l&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,l.min),e.max=Math.max(e.max,l.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:i,vScale:s}=t,l=this.getParsed(e),r=l._custom,o=_a(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(l[s.axis]);return{label:""+i.getLabelForValue(l[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,i,s){const l=s==="reset",{index:r,_cachedMeta:{vScale:o}}=this,a=o.getBasePixel(),u=o.isHorizontal(),f=this._getRuler(),c=this.resolveDataElementOptions(t,s),d=this.getSharedOptions(c),h=this.includeOptions(s,d);this.updateSharedOptions(d,s,c);for(let g=t;g<t+i;g++){const y=this.getParsed(g),b=l||Ct(y[o.axis])?{base:a,head:a}:this._calculateBarValuePixels(g),v=this._calculateBarIndexPixels(g,f),S=(y._stacks||{})[o.axis],$={horizontal:u,base:b.base,enableBorderRadius:!S||_a(y._custom)||r===S._top||r===S._bottom,x:u?b.head:v.center,y:u?v.center:b.head,height:u?v.size:Math.abs(b.size),width:u?Math.abs(b.size):v.size};h&&($.options=d||this.resolveDataElementOptions(g,e[g].active?"active":s));const C=$.options||e[g].options;PS($,C,S,r),FS($,C,f.ratio),this.updateElement(e[g],g,$,s)}}_getStacks(e,t){const s=this._cachedMeta.iScale,l=s.getMatchingVisibleMetas(this._type),r=s.options.stacked,o=l.length,a=[];let u,f;for(u=0;u<o;++u)if(f=l[u],!!f.controller.options.grouped){if(typeof t!="undefined"){const c=f.controller.getParsed(t)[f.controller._cachedMeta.vScale.axis];if(Ct(c)||isNaN(c))continue}if((r===!1||a.indexOf(f.stack)===-1||r===void 0&&f.stack===void 0)&&a.push(f.stack),f.index===e)break}return a.length||a.push(void 0),a}_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,r;for(l=0,r=t.data.length;l<r;++l)s.push(i.getPixelForValue(this.getParsed(l)[i.axis],l));const o=e.barThickness;return{min:o||MS(t),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:o?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:i},options:{base:s,minBarLength:l}}=this,r=s||0,o=this.getParsed(e),a=o._custom,u=_a(a);let f=o[t.axis],c=0,d=i?this.applyStack(t,o,i):f,h,g;d!==f&&(c=d-f,d=f),u&&(f=a.barStart,d=a.barEnd-a.barStart,f!==0&&ui(f)!==ui(a.barEnd)&&(c=0),c+=f);const y=!Ct(s)&&!u?s:c;let b=t.getPixelForValue(y);if(this.chart.getDataVisibility(e)?h=t.getPixelForValue(c+d):h=b,g=h-b,Math.abs(g)<l){g=AS(g,t,r)*l,f===r&&(b-=g/2);const v=t.getPixelForDecimal(0),S=t.getPixelForDecimal(1),$=Math.min(v,S),C=Math.max(v,S);b=Math.max(Math.min(b,C),$),h=b+g}if(b===t.getPixelForValue(r)){const v=ui(g)*t.getLineWidthForValue(r)/2;b+=v,g-=v}return{size:g,base:b,head:h,center:h+g/2}}_calculateBarIndexPixels(e,t){const i=t.scale,s=this.options,l=s.skipNull,r=ht(s.maxBarThickness,1/0);let o,a;if(t.grouped){const u=l?this._getStackCount(e):t.stackCount,f=s.barThickness==="flex"?TS(e,t,s,u):OS(e,t,s,u),c=this._getStackIndex(this.index,this._cachedMeta.stack,l?e:void 0);o=f.start+f.chunk*c+f.chunk/2,a=Math.min(r,f.chunk*f.ratio)}else o=i.getPixelForValue(this.getParsed(e)[i.axis],e),a=Math.min(r,t.min*t.ratio);return{base:o-a/2,head:o+a/2,center:o,size:a}}draw(){const e=this._cachedMeta,t=e.vScale,i=e.data,s=i.length;let l=0;for(;l<s;++l)this.getParsed(l)[t.axis]!==null&&i[l].draw(this._ctx)}}tf.id="bar";tf.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};tf.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class nf extends mi{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,i,s){const l=super.parsePrimitiveData(e,t,i,s);for(let r=0;r<l.length;r++)l[r]._custom=this.resolveDataElementOptions(r+i).radius;return l}parseArrayData(e,t,i,s){const l=super.parseArrayData(e,t,i,s);for(let r=0;r<l.length;r++){const o=t[i+r];l[r]._custom=ht(o[2],this.resolveDataElementOptions(r+i).radius)}return l}parseObjectData(e,t,i,s){const l=super.parseObjectData(e,t,i,s);for(let r=0;r<l.length;r++){const o=t[i+r];l[r]._custom=ht(o&&o.r&&+o.r,this.resolveDataElementOptions(r+i).radius)}return l}getMaxOverflow(){const e=this._cachedMeta.data;let t=0;for(let i=e.length-1;i>=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),r=i.getLabelForValue(l.x),o=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+r+", "+o+(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:r,vScale:o}=this._cachedMeta,a=this.resolveDataElementOptions(t,s),u=this.getSharedOptions(a),f=this.includeOptions(s,u),c=r.axis,d=o.axis;for(let h=t;h<t+i;h++){const g=e[h],y=!l&&this.getParsed(h),b={},v=b[c]=l?r.getPixelForDecimal(.5):r.getPixelForValue(y[c]),S=b[d]=l?o.getBasePixel():o.getPixelForValue(y[d]);b.skip=isNaN(v)||isNaN(S),f&&(b.options=this.resolveDataElementOptions(h,g.active?"active":s),l&&(b.options.radius=0)),this.updateElement(g,h,b,s)}this.updateSharedOptions(u,s,a)}resolveDataElementOptions(e,t){const i=this.getParsed(e);let s=super.resolveDataElementOptions(e,t);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const l=s.radius;return t!=="active"&&(s.radius=0),s.radius+=ht(i&&i._custom,l),s}}nf.id="bubble";nf.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};nf.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function IS(n,e,t){let i=1,s=1,l=0,r=0;if(e<Et){const o=n,a=o+e,u=Math.cos(o),f=Math.sin(o),c=Math.cos(a),d=Math.sin(a),h=($,C,M)=>jl($,o,a,!0)?1:Math.max(C,C*t,M,M*t),g=($,C,M)=>jl($,o,a,!0)?-1:Math.min(C,C*t,M,M*t),y=h(0,u,c),b=h(jt,f,d),v=g(Ht,u,c),S=g(Ht+jt,f,d);i=(y-v)/2,s=(b-S)/2,l=-(y+v)/2,r=-(b+S)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:r}}class Ql extends mi{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(dt(i[e])){const{key:a="value"}=this._parsing;l=u=>+Bi(i[u],a)}let r,o;for(r=e,o=e+t;r<o;++r)s._parsed[r]=l(r)}}_getRotation(){return Qn(this.options.rotation-90)}_getCircumference(){return Qn(this.options.circumference)}_getRotationExtents(){let e=Et,t=-Et;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const s=this.chart.getDatasetMeta(i).controller,l=s._getRotation(),r=s._getCircumference();e=Math.min(e,l),t=Math.max(t,l+r)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:i}=t,s=this._cachedMeta,l=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(l)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-r)/2,0),a=Math.min(E2(this.options.cutout,o),1),u=this._getRingWeight(this.index),{circumference:f,rotation:c}=this._getRotationExtents(),{ratioX:d,ratioY:h,offsetX:g,offsetY:y}=IS(c,f,a),b=(i.width-r)/d,v=(i.height-r)/h,S=Math.max(Math.min(b,v)/2,0),$=N0(this.options.radius,S),C=Math.max($*a,0),M=($-C)/this._getVisibleDatasetWeightTotal();this.offsetX=g*$,this.offsetY=y*$,s.total=this.calculateTotal(),this.outerRadius=$-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*u,0),this.updateElements(l,0,l.length,e)}_circumference(e,t){const i=this.options,s=this._cachedMeta,l=this._getCircumference();return t&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*l/Et)}updateElements(e,t,i,s){const l=s==="reset",r=this.chart,o=r.chartArea,u=r.options.animation,f=(o.left+o.right)/2,c=(o.top+o.bottom)/2,d=l&&u.animateScale,h=d?0:this.innerRadius,g=d?0:this.outerRadius,y=this.resolveDataElementOptions(t,s),b=this.getSharedOptions(y),v=this.includeOptions(s,b);let S=this._getRotation(),$;for($=0;$<t;++$)S+=this._circumference($,l);for($=t;$<t+i;++$){const C=this._circumference($,l),M=e[$],T={x:f+this.offsetX,y:c+this.offsetY,startAngle:S,endAngle:S+C,circumference:C,outerRadius:g,innerRadius:h};v&&(T.options=b||this.resolveDataElementOptions($,M.active?"active":s)),S+=C,this.updateElement(M,$,T,s)}this.updateSharedOptions(b,s,y)}calculateTotal(){const e=this._cachedMeta,t=e.data;let i=0,s;for(s=0;s<t.length;s++){const l=e._parsed[s];l!==null&&!isNaN(l)&&this.chart.getDataVisibility(s)&&!t[s].hidden&&(i+=Math.abs(l))}return i}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?Et*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Xl(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,r,o,a;if(!e){for(s=0,l=i.data.datasets.length;s<l;++s)if(i.isDatasetVisible(s)){r=i.getDatasetMeta(s),e=r.data,o=r.controller;break}}if(!e)return 0;for(s=0,l=e.length;s<l;++s)a=o.resolveDataElementOptions(s),a.borderAlign!=="inner"&&(t=Math.max(t,a.borderWidth||0,a.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let i=0,s=e.length;i<s;++i){const l=this.resolveDataElementOptions(i);t=Math.max(t,l.offset||0,l.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(t+=this._getRingWeight(i));return t}_getRingWeight(e){return Math.max(ht(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Ql.id="doughnut";Ql.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};Ql.descriptors={_scriptable:n=>n!=="spacing",_indexable:n=>n!=="spacing"};Ql.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 r=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.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 Pt(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class er extends mi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,r=this.chart._animationsDisabled;let{start:o,count:a}=NS(t,s,r);this._drawStart=o,this._drawCount=a,RS(t)&&(o=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:!r,options:u},e),this.updateElements(s,o,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:r,vScale:o,_stacked:a,_dataset:u}=this._cachedMeta,f=this.resolveDataElementOptions(t,s),c=this.getSharedOptions(f),d=this.includeOptions(s,c),h=r.axis,g=o.axis,{spanGaps:y,segment:b}=this.options,v=Rl(y)?y:Number.POSITIVE_INFINITY,S=this.chart._animationsDisabled||l||s==="none";let $=t>0&&this.getParsed(t-1);for(let C=t;C<t+i;++C){const M=e[C],T=this.getParsed(C),E=S?M:{},D=Ct(T[g]),P=E[h]=r.getPixelForValue(T[h],C),L=E[g]=l||D?o.getBasePixel():o.getPixelForValue(a?this.applyStack(o,T,a):T[g],C);E.skip=isNaN(P)||isNaN(L)||D,E.stop=C>0&&Math.abs(T[h]-$[h])>v,b&&(E.parsed=T,E.raw=u.data[C]),d&&(E.options=c||this.resolveDataElementOptions(C,M.active?"active":s)),S||this.updateElement(M,C,E,s),$=T}this.updateSharedOptions(c,s,f)}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)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,r)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}er.id="line";er.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};er.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};function NS(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:r,_parsed:o}=n,a=r.axis,{min:u,max:f,minDefined:c,maxDefined:d}=r.getUserBounds();c&&(s=on(Math.min(us(o,r.axis,u).lo,t?i:us(e,a,r.getPixelForValue(u)).lo),0,i-1)),d?l=on(Math.max(us(o,r.axis,f).hi+1,t?0:us(e,a,r.getPixelForValue(f)).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function RS(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}class sf extends mi{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=Xl(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return X0.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)&&(l<t.min&&(t.min=l),l>t.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),r=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),o=(l-r)/e.getVisibleDatasetCount();this.outerRadius=l-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(e,t,i,s){const l=s==="reset",r=this.chart,a=r.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,c=u.yCenter,d=u.getIndexAngle(0)-.5*Ht;let h=d,g;const y=360/this.countVisibleElements();for(g=0;g<t;++g)h+=this._computeAngle(g,s,y);for(g=t;g<t+i;g++){const b=e[g];let v=h,S=h+this._computeAngle(g,s,y),$=r.getDataVisibility(g)?u.getDistanceFromCenterForValue(this.getParsed(g).r):0;h=S,l&&(a.animateScale&&($=0),a.animateRotate&&(v=S=d));const C={x:f,y:c,innerRadius:0,outerRadius:$,startAngle:v,endAngle:S,options:this.resolveDataElementOptions(g,b.active?"active":s)};this.updateElement(b,g,C,s)}}countVisibleElements(){const e=this._cachedMeta;let t=0;return e.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?Qn(this.resolveDataElementOptions(e,t).angle||i):0}}sf.id="polarArea";sf.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};sf.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 r=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.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 ob extends Ql{}ob.id="pie";ob.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class lf extends mi{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 X0.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 r=this.resolveDatasetElementOptions(e);this.options.showLine||(r.borderWidth=0);const o={_loop:!0,_fullLoop:l.length===s.length,options:r};this.updateElement(i,void 0,o,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,r=s==="reset";for(let o=t;o<t+i;o++){const a=e[o],u=this.resolveDataElementOptions(o,a.active?"active":s),f=l.getPointPositionForValue(o,this.getParsed(o).r),c=r?l.xCenter:f.x,d=r?l.yCenter:f.y,h={x:c,y:d,angle:f.angle,skip:isNaN(c)||isNaN(d),options:u};this.updateElement(a,o,h,s)}}}lf.id="radar";lf.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};lf.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class rf extends er{}rf.id="scatter";rf.defaults={showLine:!1,fill:!1};rf.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function ts(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class su{constructor(e){this.options=e||{}}formats(){return ts()}parse(e,t){return ts()}format(e,t){return ts()}add(e,t,i){return ts()}diff(e,t,i){return ts()}startOf(e,t,i){return ts()}endOf(e,t){return ts()}}su.override=function(n){Object.assign(su.prototype,n)};var ab={_date:su};function jS(n,e,t,i){const{controller:s,data:l,_sorted:r}=n,o=s._cachedMeta.iScale;if(o&&e===o.axis&&e!=="r"&&r&&l.length){const a=o._reversePixels?Sw:us;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 tr(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),r=t[e];for(let o=0,a=l.length;o<a;++o){const{index:u,data:f}=l[o],{lo:c,hi:d}=jS(l[o],e,r,s);for(let h=c;h<=d;++h){const g=f[h];g.skip||i(g,u,h)}}}function HS(n){const e=n.indexOf("x")!==-1,t=n.indexOf("y")!==-1;return function(i,s){const l=e?Math.abs(i.x-s.x):0,r=t?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(l,2)+Math.pow(r,2))}}function ba(n,e,t,i,s){const l=[];return!s&&!n.isPointInArea(e)||tr(n,t,e,function(o,a,u){!s&&!ql(o,n.chartArea,0)||o.inRange(e.x,e.y,i)&&l.push({element:o,datasetIndex:a,index:u})},!0),l}function qS(n,e,t,i){let s=[];function l(r,o,a){const{startAngle:u,endAngle:f}=r.getProps(["startAngle","endAngle"],i),{angle:c}=H0(r,{x:e.x,y:e.y});jl(c,u,f)&&s.push({element:r,datasetIndex:o,index:a})}return tr(n,t,e,l),s}function VS(n,e,t,i,s,l){let r=[];const o=HS(t);let a=Number.POSITIVE_INFINITY;function u(f,c,d){const h=f.inRange(e.x,e.y,s);if(i&&!h)return;const g=f.getCenterPoint(s);if(!(!!l||n.isPointInArea(g))&&!h)return;const b=o(e,g);b<a?(r=[{element:f,datasetIndex:c,index:d}],a=b):b===a&&r.push({element:f,datasetIndex:c,index:d})}return tr(n,t,e,u),r}function ya(n,e,t,i,s,l){return!l&&!n.isPointInArea(e)?[]:t==="r"&&!i?qS(n,e,t,s):VS(n,e,t,i,s,l)}function vd(n,e,t,i,s){const l=[],r=t==="x"?"inXRange":"inYRange";let o=!1;return tr(n,t,e,(a,u,f)=>{a[r](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),o=o||a.inRange(e.x,e.y,s))}),i&&!o?[]:l}var zS={evaluateInteractionItems:tr,modes:{index(n,e,t,i){const s=ss(e,n),l=t.axis||"x",r=t.includeInvisible||!1,o=t.intersect?ba(n,s,l,i,r):ya(n,s,l,!1,i,r),a=[];return o.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=o[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=ss(e,n),l=t.axis||"xy",r=t.includeInvisible||!1;let o=t.intersect?ba(n,s,l,i,r):ya(n,s,l,!1,i,r);if(o.length>0){const a=o[0].datasetIndex,u=n.getDatasetMeta(a).data;o=[];for(let f=0;f<u.length;++f)o.push({element:u[f],datasetIndex:a,index:f})}return o},point(n,e,t,i){const s=ss(e,n),l=t.axis||"xy",r=t.includeInvisible||!1;return ba(n,s,l,i,r)},nearest(n,e,t,i){const s=ss(e,n),l=t.axis||"xy",r=t.includeInvisible||!1;return ya(n,s,l,t.intersect,i,r)},x(n,e,t,i){const s=ss(e,n);return vd(n,s,"x",t.intersect,i)},y(n,e,t,i){const s=ss(e,n);return vd(n,s,"y",t.intersect,i)}}};const ub=["left","top","right","bottom"];function dl(n,e){return n.filter(t=>t.pos===e)}function kd(n,e){return n.filter(t=>ub.indexOf(t.pos)===-1&&t.box.axis===e)}function pl(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 BS(n){const e=[];let t,i,s,l,r,o;for(t=0,i=(n||[]).length;t<i;++t)s=n[t],{position:l,options:{stack:r,stackWeight:o=1}}=s,e.push({index:t,box:s,pos:l,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&l+r,stackWeight:o});return e}function US(n){const e={};for(const t of n){const{stack:i,pos:s,stackWeight:l}=t;if(!i||!ub.includes(s))continue;const r=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=l}return e}function WS(n,e){const t=US(n),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e;let l,r,o;for(l=0,r=n.length;l<r;++l){o=n[l];const{fullSize:a}=o.box,u=t[o.stack],f=u&&o.stackWeight/u.weight;o.horizontal?(o.width=f?f*i:a&&e.availableWidth,o.height=s):(o.width=i,o.height=f?f*s:a&&e.availableHeight)}return t}function YS(n){const e=BS(n),t=pl(e.filter(u=>u.box.fullSize),!0),i=pl(dl(e,"left"),!0),s=pl(dl(e,"right")),l=pl(dl(e,"top"),!0),r=pl(dl(e,"bottom")),o=kd(e,"x"),a=kd(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(r).concat(o),chartArea:dl(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(r).concat(o)}}function wd(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function fb(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 KS(n,e,t,i){const{pos:s,box:l}=t,r=n.maxPadding;if(!dt(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&&fb(r,l.getPadding());const o=Math.max(0,e.outerWidth-wd(r,n,"left","right")),a=Math.max(0,e.outerHeight-wd(r,n,"top","bottom")),u=o!==n.w,f=a!==n.h;return n.w=o,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function JS(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 GS(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{l[r]=Math.max(e[r],t[r])}),l}return i(n?["left","right"]:["top","bottom"])}function wl(n,e,t,i){const s=[];let l,r,o,a,u,f;for(l=0,r=n.length,u=0;l<r;++l){o=n[l],a=o.box,a.update(o.width||e.w,o.height||e.h,GS(o.horizontal,e));const{same:c,other:d}=KS(e,t,o,i);u|=c&&s.length,f=f||d,a.fullSize||s.push(o)}return u&&wl(s,e,t,i)||f}function Tr(n,e,t,i,s){n.top=t,n.left=e,n.right=e+i,n.bottom=t+s,n.width=i,n.height=s}function Sd(n,e,t,i){const s=t.padding;let{x:l,y:r}=e;for(const o of n){const a=o.box,u=i[o.stack]||{count:1,placed:0,weight:1},f=o.stackWeight/u.weight||1;if(o.horizontal){const c=e.w*f,d=u.size||a.height;Yn(u.start)&&(r=u.start),a.fullSize?Tr(a,s.left,r,t.outerWidth-s.right-s.left,d):Tr(a,e.left+u.placed,r,c,d),u.start=r,u.placed+=c,r=a.bottom}else{const c=e.h*f,d=u.size||a.width;Yn(u.start)&&(l=u.start),a.fullSize?Tr(a,l,s.top,d,t.outerHeight-s.bottom-s.top):Tr(a,l,e.top+u.placed,d,c),u.start=l,u.placed+=c,l=a.right}}e.x=l,e.y=r}mt.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Dr={addBox(n,e){n.boxes||(n.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},n.boxes.push(e)},removeBox(n,e){const t=n.boxes?n.boxes.indexOf(e):-1;t!==-1&&n.boxes.splice(t,1)},configure(n,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(n,e,t,i){if(!n)return;const s=Kn(n.options.layout.padding),l=Math.max(e-s.width,0),r=Math.max(t-s.height,0),o=YS(n.boxes),a=o.vertical,u=o.horizontal;$t(n.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=a.reduce((y,b)=>b.box.options&&b.box.options.display===!1?y:y+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:r,vBoxMaxWidth:l/2/f,hBoxMaxHeight:r/2}),d=Object.assign({},s);fb(d,Kn(i));const h=Object.assign({maxPadding:d,w:l,h:r,x:s.left,y:s.top},s),g=WS(a.concat(u),c);wl(o.fullSize,h,c,g),wl(a,h,c,g),wl(u,h,c,g)&&wl(a,h,c,g),JS(h),Sd(o.leftAndTop,h,c,g),h.x+=h.w,h.y+=h.h,Sd(o.rightAndBottom,h,c,g),n.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},$t(o.chartArea,y=>{const b=y.box;Object.assign(b,n.chartArea),b.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class cb{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 ZS extends cb{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Gr="$chartjs",xS={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},$d=n=>n===null||n==="";function XS(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[Gr]={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",$d(s)){const l=ld(n,"width");l!==void 0&&(n.width=l)}if($d(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=ld(n,"height");l!==void 0&&(n.height=l)}return n}const db=Jw?{passive:!0}:!1;function QS(n,e,t){n.addEventListener(e,t,db)}function e$(n,e,t){n.canvas.removeEventListener(e,t,db)}function t$(n,e){const t=xS[n.type]||n.type,{x:i,y:s}=ss(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function go(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function n$(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let r=!1;for(const o of l)r=r||go(o.addedNodes,i),r=r&&!go(o.removedNodes,i);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function i$(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let r=!1;for(const o of l)r=r||go(o.removedNodes,i),r=r&&!go(o.addedNodes,i);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const Vl=new Map;let Cd=0;function pb(){const n=window.devicePixelRatio;n!==Cd&&(Cd=n,Vl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function s$(n,e){Vl.size||window.addEventListener("resize",pb),Vl.set(n,e)}function l$(n){Vl.delete(n),Vl.size||window.removeEventListener("resize",pb)}function r$(n,e,t){const i=n.canvas,s=i&&ef(i);if(!s)return;const l=I0((o,a)=>{const u=s.clientWidth;t(o,a),u<s.clientWidth&&t()},window),r=new ResizeObserver(o=>{const a=o[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return r.observe(s),s$(n,l),r}function va(n,e,t){t&&t.disconnect(),e==="resize"&&l$(n)}function o$(n,e,t){const i=n.canvas,s=I0(l=>{n.ctx!==null&&t(t$(l,n))},n,l=>{const r=l[0];return[r,r.offsetX,r.offsetY]});return QS(i,e,s),s}class a$ extends cb{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(XS(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[Gr])return!1;const i=t[Gr].initial;["height","width"].forEach(l=>{const r=i[l];Ct(r)?t.removeAttribute(l):t.setAttribute(l,r)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[Gr],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),r={attach:n$,detach:i$,resize:r$}[t]||o$;s[t]=r(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:va,detach:va,resize:va}[t]||e$)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Kw(e,t,i,s)}isAttached(e){const t=ef(e);return!!(t&&t.isConnected)}}function u$(n){return!eb()||typeof OffscreenCanvas!="undefined"&&n instanceof OffscreenCanvas?ZS:a$}class Ti{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){const{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}hasValue(){return Rl(this.x)&&Rl(this.y)}getProps(e,t){const i=this.$animations;if(!t||!i)return this;const s={};return e.forEach(l=>{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}}Ti.defaults={};Ti.defaultRoutes=void 0;const hb={values(n){return Pt(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=f$(n,t)}const r=Vn(Math.abs(l)),o=Math.max(Math.min(-1*Math.floor(r),20),0),a={notation:s,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(a,this.options.ticks.format),Xl(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Vn(n)));return i===1||i===2||i===5?hb.numeric.call(this,n,e,t):""}};function f$(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 Po={formatters:hb};mt.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:Po.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});mt.route("scale.ticks","color","","color");mt.route("scale.grid","color","","borderColor");mt.route("scale.grid","borderColor","","borderColor");mt.route("scale.title","color","","color");mt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});mt.describe("scales",{_fallback:"scale"});mt.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function c$(n,e){const t=n.options.ticks,i=t.maxTicksLimit||d$(n),s=t.major.enabled?h$(e):[],l=s.length,r=s[0],o=s[l-1],a=[];if(l>i)return m$(e,a,s,l/i),a;const u=p$(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((o-r)/(l-1)):null;for(Ar(e,a,u,Ct(d)?0:r-d,r),f=0,c=l-1;f<c;f++)Ar(e,a,u,s[f],s[f+1]);return Ar(e,a,u,o,Ct(d)?e.length:o+d),a}return Ar(e,a,u),a}function d$(n){const e=n.options.offset,t=n._tickSize(),i=n._length/t+(e?0:1),s=n._maxLength/t;return Math.floor(Math.min(i,s))}function p$(n,e,t){const i=g$(n),s=e.length/t;if(!i)return Math.max(s,1);const l=H2(i);for(let r=0,o=l.length-1;r<o;r++){const a=l[r];if(a>s)return a}return Math.max(s,1)}function h$(n){const e=[];let t,i;for(t=0,i=n.length;t<i;t++)n[t].major&&e.push(t);return e}function m$(n,e,t,i){let s=0,l=t[0],r;for(i=Math.ceil(i),r=0;r<n.length;r++)r===l&&(e.push(n[r]),s++,l=t[s*i])}function Ar(n,e,t,i,s){const l=ht(i,0),r=Math.min(ht(s,n.length),n.length);let o=0,a,u,f;for(t=Math.ceil(t),s&&(a=s-i,t=a/Math.floor(a/t)),f=l;f<0;)o++,f=Math.round(l+o*t);for(u=Math.max(l,0);u<r;u++)u===f&&(e.push(n[u]),o++,f=Math.round(l+o*t))}function g$(n){const e=n.length;let t,i;if(e<2)return!1;for(i=n[0],t=1;t<e;++t)if(n[t]-n[t-1]!==i)return!1;return i}const _$=n=>n==="left"?"right":n==="right"?"left":n,Md=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Od(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;l<s;l+=i)t.push(n[Math.floor(l)]);return t}function b$(n,e,t){const i=n.ticks.length,s=Math.min(e,i-1),l=n._startPixel,r=n._endPixel,o=1e-6;let a=n.getPixelForTick(s),u;if(!(t&&(i===1?u=Math.max(a-l,r-a):e===0?u=(n.getPixelForTick(1)-a)/2:u=(a-n.getPixelForTick(s-1))/2,a+=s<e?u:-u,a<l-o||a>r+o)))return a}function y$(n,e){$t(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;l<s;++l)delete t.data[i[l]];i.splice(0,s)}})}function hl(n){return n.drawTicks?n.tickLength:0}function Td(n,e){if(!n.display)return 0;const t=On(n.font,e),i=Kn(n.padding);return(Pt(n.text)?n.text.length:1)*t.lineHeight+i.height}function v$(n,e){return Yi(n,{scale:e,type:"scale"})}function k$(n,e,t){return Yi(n,{tick:t,index:e,type:"tick"})}function w$(n,e,t){let i=D2(n);return(t&&e!=="right"||!t&&e==="right")&&(i=_$(i)),i}function S$(n,e,t,i){const{top:s,left:l,bottom:r,right:o,chart:a}=n,{chartArea:u,scales:f}=a;let c=0,d,h,g;const y=r-s,b=o-l;if(n.isHorizontal()){if(h=Vc(i,l,o),dt(t)){const v=Object.keys(t)[0],S=t[v];g=f[v].getPixelForValue(S)+y-e}else t==="center"?g=(u.bottom+u.top)/2+y-e:g=Md(n,t,e);d=o-l}else{if(dt(t)){const v=Object.keys(t)[0],S=t[v];h=f[v].getPixelForValue(S)-b+e}else t==="center"?h=(u.left+u.right)/2-b+e:h=Md(n,t,e);g=Vc(i,r,s),c=t==="left"?-jt:jt}return{titleX:h,titleY:g,maxWidth:d,rotation:c}}class bs extends Ti{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:i,_suggestedMax:s}=this;return e=jn(e,Number.POSITIVE_INFINITY),t=jn(t,Number.NEGATIVE_INFINITY),i=jn(i,Number.POSITIVE_INFINITY),s=jn(s,Number.NEGATIVE_INFINITY),{min:jn(e,i),max:jn(t,s),minDefined:Vt(e),maxDefined:Vt(t)}}getMinMax(e){let{min:t,max:i,minDefined:s,maxDefined:l}=this.getUserBounds(),r;if(s&&l)return{min:t,max:i};const o=this.getMatchingVisibleMetas();for(let a=0,u=o.length;a<u;++a)r=o[a].controller.getMinMax(this,e),s||(t=Math.min(t,r.min)),l||(i=Math.max(i,r.max));return t=l&&t>i?i:t,i=s&&t>i?t:i,{min:jn(t,jn(i,t)),max:jn(i,jn(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(){Rt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:r}=this.options,o=r.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=ww(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=o<this.ticks.length;this._convertTicksToLabels(a?Od(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=c$(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,i;this.isHorizontal()?(t=this.left,i=this.right):(t=this.top,i=this.bottom,e=!e),this._startPixel=t,this._endPixel=i,this._reversePixels=e,this._length=i-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Rt(this.options.afterUpdate,[this])}beforeSetDimensions(){Rt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Rt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Rt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Rt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let i,s,l;for(i=0,s=e.length;i<s;i++)l=e[i],l.label=Rt(t.callback,[l.value,i,e],this)}afterTickToLabelConversion(){Rt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Rt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,i=this.ticks.length,s=t.minRotation||0,l=t.maxRotation;let r=s,o,a,u;if(!this._isVisible()||!t.display||s>=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),c=f.widest.width,d=f.highest.height,h=on(this.chart.width-c,0,this.maxWidth);o=e.offset?this.maxWidth/i:h/(i-1),c+6>o&&(o=h/(i-(e.offset?.5:1)),a=this.maxHeight-hl(e.grid)-t.padding-Td(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),r=Bu(Math.min(Math.asin(on((f.highest.height+6)/o,-1,1)),Math.asin(on(a/u,-1,1))-Math.asin(on(d/u,-1,1)))),r=Math.max(s,Math.min(l,r))),this.labelRotation=r}afterCalculateLabelRotation(){Rt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Rt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,r=this._isVisible(),o=this.isHorizontal();if(r){const a=Td(s,t.options.font);if(o?(e.width=this.maxWidth,e.height=hl(l)+a):(e.height=this.maxHeight,e.width=hl(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),h=i.padding*2,g=Qn(this.labelRotation),y=Math.cos(g),b=Math.sin(g);if(o){const v=i.mirror?0:b*c.width+y*d.height;e.height=Math.min(this.maxHeight,e.height+v+h)}else{const v=i.mirror?0:y*c.width+b*d.height;e.width=Math.min(this.maxWidth,e.width+v+h)}this._calculatePadding(u,f,b,y)}}this._handleMargins(),o?(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:r},position:o}=this.options,a=this.labelRotation!==0,u=o!=="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+r)*this.width/(this.width-f),0),this.paddingRight=Math.max((h-c+r)*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+r,this.paddingBottom=c+r}}_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(){Rt(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<i;t++)Ct(e[t].label)&&(e.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let i=this.ticks;t<i.length&&(i=Od(i,t)),this._labelSizes=e=this._computeLabelSizes(i,i.length)}return e}_computeLabelSizes(e,t){const{ctx:i,_longestTextCache:s}=this,l=[],r=[];let o=0,a=0,u,f,c,d,h,g,y,b,v,S,$;for(u=0;u<t;++u){if(d=e[u].label,h=this._resolveTickFontOptions(u),i.font=g=h.string,y=s[g]=s[g]||{data:{},gc:[]},b=h.lineHeight,v=S=0,!Ct(d)&&!Pt(d))v=co(i,y.data,y.gc,v,d),S=b;else if(Pt(d))for(f=0,c=d.length;f<c;++f)$=d[f],!Ct($)&&!Pt($)&&(v=co(i,y.data,y.gc,v,$),S+=b);l.push(v),r.push(S),o=Math.max(v,o),a=Math.max(S,a)}y$(s,t);const C=l.indexOf(o),M=r.indexOf(a),T=E=>({width:l[E]||0,height:r[E]||0});return{first:T(0),last:T(t-1),widest:T(C),highest:T(M),widths:l,heights:r}}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 z2(this._alignToPixels?es(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&&e<t.length){const i=t[e];return i.$context||(i.$context=k$(this.getContext(),e,i))}return this.$context||(this.$context=v$(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=Qn(this.labelRotation),i=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),l=this._getLabelSizes(),r=e.autoSkipPadding||0,o=l?l.widest.width+r:0,a=l?l.highest.height+r:0;return this.isHorizontal()?a*i>o*s?o/i:a/s:a*s<o*i?a/i:o/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:r}=s,o=l.offset,a=this.isHorizontal(),f=this.ticks.length+(o?1:0),c=hl(l),d=[],h=l.setContext(this.getContext()),g=h.drawBorder?h.borderWidth:0,y=g/2,b=function(q){return es(i,q,g)};let v,S,$,C,M,T,E,D,P,L,N,R;if(r==="top")v=b(this.bottom),T=this.bottom-c,D=v-y,L=b(e.top)+y,R=e.bottom;else if(r==="bottom")v=b(this.top),L=e.top,R=b(e.bottom)-y,T=v+y,D=this.top+c;else if(r==="left")v=b(this.right),M=this.right-c,E=v-y,P=b(e.left)+y,N=e.right;else if(r==="right")v=b(this.left),P=e.left,N=b(e.right)-y,M=v+y,E=this.left+c;else if(t==="x"){if(r==="center")v=b((e.top+e.bottom)/2+.5);else if(dt(r)){const q=Object.keys(r)[0],G=r[q];v=b(this.chart.scales[q].getPixelForValue(G))}L=e.top,R=e.bottom,T=v+y,D=T+c}else if(t==="y"){if(r==="center")v=b((e.left+e.right)/2);else if(dt(r)){const q=Object.keys(r)[0],G=r[q];v=b(this.chart.scales[q].getPixelForValue(G))}M=v-y,E=M-c,P=e.left,N=e.right}const J=ht(s.ticks.maxTicksLimit,f),W=Math.max(1,Math.ceil(f/J));for(S=0;S<f;S+=W){const q=l.setContext(this.getContext(S)),G=q.lineWidth,K=q.color,Y=l.borderDash||[],ne=q.borderDashOffset,fe=q.tickWidth,ye=q.tickColor,se=q.tickBorderDash||[],Z=q.tickBorderDashOffset;$=b$(this,S,o),$!==void 0&&(C=es(i,$,G),a?M=E=P=N=C:T=D=L=R=C,d.push({tx1:M,ty1:T,tx2:E,ty2:D,x1:P,y1:L,x2:N,y2:R,width:G,color:K,borderDash:Y,borderDashOffset:ne,tickWidth:fe,tickColor:ye,tickBorderDash:se,tickBorderDashOffset:Z}))}return this._ticksLength=f,this._borderValue=v,d}_computeLabelItems(e){const t=this.axis,i=this.options,{position:s,ticks:l}=i,r=this.isHorizontal(),o=this.ticks,{align:a,crossAlign:u,padding:f,mirror:c}=l,d=hl(i.grid),h=d+f,g=c?-f:h,y=-Qn(this.labelRotation),b=[];let v,S,$,C,M,T,E,D,P,L,N,R,J="middle";if(s==="top")T=this.bottom-g,E=this._getXAxisLabelAlignment();else if(s==="bottom")T=this.top+g,E=this._getXAxisLabelAlignment();else if(s==="left"){const q=this._getYAxisLabelAlignment(d);E=q.textAlign,M=q.x}else if(s==="right"){const q=this._getYAxisLabelAlignment(d);E=q.textAlign,M=q.x}else if(t==="x"){if(s==="center")T=(e.top+e.bottom)/2+h;else if(dt(s)){const q=Object.keys(s)[0],G=s[q];T=this.chart.scales[q].getPixelForValue(G)+h}E=this._getXAxisLabelAlignment()}else if(t==="y"){if(s==="center")M=(e.left+e.right)/2-h;else if(dt(s)){const q=Object.keys(s)[0],G=s[q];M=this.chart.scales[q].getPixelForValue(G)}E=this._getYAxisLabelAlignment(d).textAlign}t==="y"&&(a==="start"?J="top":a==="end"&&(J="bottom"));const W=this._getLabelSizes();for(v=0,S=o.length;v<S;++v){$=o[v],C=$.label;const q=l.setContext(this.getContext(v));D=this.getPixelForTick(v)+l.labelOffset,P=this._resolveTickFontOptions(v),L=P.lineHeight,N=Pt(C)?C.length:1;const G=N/2,K=q.color,Y=q.textStrokeColor,ne=q.textStrokeWidth;let fe=E;r?(M=D,E==="inner"&&(v===S-1?fe=this.options.reverse?"left":"right":v===0?fe=this.options.reverse?"right":"left":fe="center"),s==="top"?u==="near"||y!==0?R=-N*L+L/2:u==="center"?R=-W.highest.height/2-G*L+L:R=-W.highest.height+L/2:u==="near"||y!==0?R=L/2:u==="center"?R=W.highest.height/2-G*L:R=W.highest.height-N*L,c&&(R*=-1)):(T=D,R=(1-N)*L/2);let ye;if(q.showLabelBackdrop){const se=Kn(q.backdropPadding),Z=W.heights[v],De=W.widths[v];let te=T+R-se.top,be=M-se.left;switch(J){case"middle":te-=Z/2;break;case"bottom":te-=Z;break}switch(E){case"center":be-=De/2;break;case"right":be-=De;break}ye={left:be,top:te,width:De+se.width,height:Z+se.height,color:q.backdropColor}}b.push({rotation:y,label:C,font:P,color:K,strokeColor:Y,strokeWidth:ne,textOffset:R,textAlign:fe,textBaseline:J,translation:[M,T],backdrop:ye})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-Qn(this.labelRotation))return e==="top"?"left":"right";let s="center";return t.align==="start"?s="left":t.align==="end"?s="right":t.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:i,mirror:s,padding:l}}=this.options,r=this._getLabelSizes(),o=e+l,a=r.widest.width;let u,f;return t==="left"?s?(f=this.right+l,i==="near"?u="left":i==="center"?(u="center",f+=a/2):(u="right",f+=a)):(f=this.right-o,i==="near"?u="right":i==="center"?(u="center",f-=a/2):(u="left",f=this.left)):t==="right"?s?(f=this.left+l,i==="near"?u="right":i==="center"?(u="center",f-=a/2):(u="left",f-=a)):(f=this.left+o,i==="near"?u="left":i==="center"?(u="center",f+=a/2):(u="right",f=this.right)):u="right",{textAlign:u,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:i,top:s,width:l,height:r}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(i,s,l,r),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks.findIndex(l=>l.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,r;const o=(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,r=s.length;l<r;++l){const a=s[l];t.drawOnChartArea&&o({x:a.x1,y:a.y1},{x:a.x2,y:a.y2},a),t.drawTicks&&o({x:a.tx1,y:a.ty1},{x:a.tx2,y:a.ty2},{color:a.tickColor,width:a.tickWidth,borderDash:a.tickBorderDash,borderDashOffset:a.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{grid:i}}=this,s=i.setContext(this.getContext()),l=i.drawBorder?s.borderWidth:0;if(!l)return;const r=i.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let a,u,f,c;this.isHorizontal()?(a=es(e,this.left,l)-l/2,u=es(e,this.right,r)+r/2,f=c=o):(f=es(e,this.top,l)-l/2,c=es(e,this.bottom,r)+r/2,a=u=o),t.save(),t.lineWidth=s.borderWidth,t.strokeStyle=s.borderColor,t.beginPath(),t.moveTo(a,f),t.lineTo(u,c),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&Ku(i,s);const l=this._labelItems||(this._labelItems=this._computeLabelItems(e));let r,o;for(r=0,o=l.length;r<o;++r){const a=l[r],u=a.font,f=a.label;a.backdrop&&(i.fillStyle=a.backdrop.color,i.fillRect(a.backdrop.left,a.backdrop.top,a.backdrop.width,a.backdrop.height));let c=a.textOffset;po(i,f,0,c,u,a)}s&&Ju(i)}drawTitle(){const{ctx:e,options:{position:t,title:i,reverse:s}}=this;if(!i.display)return;const l=On(i.font),r=Kn(i.padding),o=i.align;let a=l.lineHeight/2;t==="bottom"||t==="center"||dt(t)?(a+=r.bottom,Pt(i.text)&&(a+=l.lineHeight*(i.text.length-1))):a+=r.top;const{titleX:u,titleY:f,maxWidth:c,rotation:d}=S$(this,a,t,o);po(e,i.text,0,0,l,{color:i.color,maxWidth:c,rotation:d,textAlign:w$(o,t,s),textBaseline:"middle",translation:[u,f]})}draw(e){!this._isVisible()||(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,i=ht(e.grid&&e.grid.z,-1);return!this._isVisible()||this.draw!==bs.prototype.draw?[{z:t,draw:s=>{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,r;for(l=0,r=t.length;l<r;++l){const o=t[l];o[i]===this.id&&(!e||o.type===e)&&s.push(o)}return s}_resolveTickFontOptions(e){const t=this.options.ticks.setContext(this.getContext(e));return On(t.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Er{constructor(e,t,i){this.type=e,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let i;M$(t)&&(i=this.register(t));const s=this.items,l=e.id,r=this.scope+"."+l;if(!l)throw new Error("class does not have id: "+e);return l in s||(s[l]=e,$$(e,r,i),this.override&&mt.override(e.id,e.overrides)),r}get(e){return this.items[e]}unregister(e){const t=this.items,i=e.id,s=this.scope;i in t&&delete t[i],s&&i in mt[s]&&(delete mt[s][i],this.override&&delete ms[i])}}function $$(n,e,t){const i=Nl(Object.create(null),[t?mt.get(t):{},mt.get(e),n.defaults]);mt.set(e,i),n.defaultRoutes&&C$(e,n.defaultRoutes),n.descriptors&&mt.describe(e,n.descriptors)}function C$(n,e){Object.keys(e).forEach(t=>{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),r=e[t].split("."),o=r.pop(),a=r.join(".");mt.route(l,s,a,o)})}function M$(n){return"id"in n&&"defaults"in n}class O${constructor(){this.controllers=new Er(mi,"datasets",!0),this.elements=new Er(Ti,"elements"),this.plugins=new Er(Object,"plugins"),this.scales=new Er(bs,"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):$t(s,r=>{const o=i||this._getRegistryForType(r);this._exec(e,o,r)})})}_exec(e,t,i){const s=zu(e);Rt(i["before"+s],[],i),t[e](i),Rt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(e,t,i){const s=t.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return s}}var wi=new O$;class T${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),r=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),r}_notify(e,t,i,s){s=s||{};for(const l of e){const r=l.plugin,o=r[i],a=[t,s,l.options];if(Rt(o,a,r)===!1&&s.cancelable)return!1}return!0}invalidate(){Ct(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=ht(i.options&&i.options.plugins,{}),l=D$(i);return s===!1&&!t?[]:E$(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,r)=>l.filter(o=>!r.some(a=>o.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function D$(n){const e=[],t=Object.keys(wi.plugins.items);for(let s=0;s<t.length;s++)e.push(wi.getPlugin(t[s]));const i=n.plugins||[];for(let s=0;s<i.length;s++){const l=i[s];e.indexOf(l)===-1&&e.push(l)}return e}function A$(n,e){return!e&&n===!1?null:n===!0?{}:n}function E$(n,e,t,i){const s=[],l=n.getContext();for(let r=0;r<e.length;r++){const o=e[r],a=o.id,u=A$(t[a],i);u!==null&&s.push({plugin:o,options:P$(n.config,o,u,l)})}return s}function P$(n,e,t,i){const s=n.pluginScopeKeys(e),l=n.getOptionScopes(t,s);return n.createResolver(l,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function lu(n,e){const t=mt.datasets[n]||{};return((e.datasets||{})[n]||{}).indexAxis||e.indexAxis||t.indexAxis||"x"}function L$(n,e){let t=n;return n==="_index_"?t=e:n==="_value_"&&(t=e==="x"?"y":"x"),t}function F$(n,e){return n===e?"_index_":"_value_"}function I$(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function ru(n,e){return n==="x"||n==="y"?n:e.axis||I$(e.position)||n.charAt(0).toLowerCase()}function N$(n,e){const t=ms[n.type]||{scales:{}},i=e.scales||{},s=lu(n.type,e),l=Object.create(null),r=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!dt(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const u=ru(o,a),f=F$(u,s),c=t.scales||{};l[u]=l[u]||o,r[o]=Ol(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(o=>{const a=o.type||n.type,u=o.indexAxis||lu(a,e),c=(ms[a]||{}).scales||{};Object.keys(c).forEach(d=>{const h=L$(d,u),g=o[h+"AxisID"]||l[h]||h;r[g]=r[g]||Object.create(null),Ol(r[g],[{axis:h},i[g],c[d]])})}),Object.keys(r).forEach(o=>{const a=r[o];Ol(a,[mt.scales[a.type],mt.scale])}),r}function mb(n){const e=n.options||(n.options={});e.plugins=ht(e.plugins,{}),e.scales=N$(n,e)}function gb(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function R$(n){return n=n||{},n.data=gb(n.data),mb(n),n}const Dd=new Map,_b=new Set;function Pr(n,e){let t=Dd.get(n);return t||(t=e(),Dd.set(n,t),_b.add(t)),t}const ml=(n,e,t)=>{const i=Bi(e,t);i!==void 0&&n.add(i)};class j${constructor(e){this._config=R$(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=gb(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(),mb(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Pr(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Pr(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Pr(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return Pr(`${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,r=this._cachedScopes(e,i),o=r.get(t);if(o)return o;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(c=>ml(a,e,c))),f.forEach(c=>ml(a,s,c)),f.forEach(c=>ml(a,ms[l]||{},c)),f.forEach(c=>ml(a,mt,c)),f.forEach(c=>ml(a,nu,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),_b.has(t)&&r.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,ms[t]||{},mt.datasets[t]||{},{type:t},mt,nu]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:r,subPrefixes:o}=Ad(this._resolverCache,e,s);let a=r;if(q$(r,t)){l.$shared=!1,i=Ui(i)?i():i;const u=this.createResolver(e,i,o);a=Ys(r,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=Ad(this._resolverCache,e,i);return dt(t)?Ys(l,t,void 0,s):l}}function Ad(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:xu(e,t),subPrefixes:t.filter(o=>!o.toLowerCase().includes("hover"))},i.set(s,l)),l}const H$=n=>dt(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||Ui(n[t]),!1);function q$(n,e){const{isScriptable:t,isIndexable:i}=J0(n);for(const s of e){const l=t(s),r=i(s),o=(r||l)&&n[s];if(l&&(Ui(o)||H$(o))||r&&Pt(o))return!0}return!1}var V$="3.8.0";const z$=["top","bottom","left","right","chartArea"];function Ed(n,e){return n==="top"||n==="bottom"||z$.indexOf(n)===-1&&e==="x"}function Pd(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function Ld(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Rt(t&&t.onComplete,[n],e)}function B$(n){const e=n.chart,t=e.options.animation;Rt(t&&t.onProgress,[n],e)}function bb(n){return eb()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const _o={},yb=n=>{const e=bb(n);return Object.values(_o).filter(t=>t.canvas===e).pop()};function U$(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const r=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=r)}}}function W$(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class bo{constructor(e,t){const i=this.config=new j$(t),s=bb(e),l=yb(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||u$(s)),this.platform.updateConfig(i);const o=this.platform.acquireContext(s,r.aspectRatio),a=o&&o.canvas,u=a&&a.height,f=a&&a.width;if(this.id=A2(),this.ctx=o,this.canvas=a,this.width=f,this.height=u,this._options=r,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 T$,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=T2(c=>this.update(c),r.resizeDelay||0),this._dataChanges=[],_o[this.id]=this,!o||!a){console.error("Failed to create chart: can't acquire context from the given item");return}_i.listen(this,"complete",Ld),_i.listen(this,"progress",B$),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return Ct(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():sd(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ed(this.canvas,this.ctx),this}stop(){return _i.stop(this),this}resize(e,t){_i.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,r=this.platform.getMaximumSize(s,e,t,l),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,sd(this,o,!0)&&(this.notifyPlugins("resize",{size:r}),Rt(i.onResize,[this,r],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};$t(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((r,o)=>(r[o]=!1,r),{});let l=[];t&&(l=l.concat(Object.keys(t).map(r=>{const o=t[r],a=ru(r,o),u=a==="r",f=a==="x";return{options:o,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),$t(l,r=>{const o=r.options,a=o.id,u=ru(a,o),f=ht(o.type,r.dtype);(o.position===void 0||Ed(o.position,u)!==Ed(r.dposition))&&(o.position=r.dposition),s[a]=!0;let c=null;if(a in i&&i[a].type===f)c=i[a];else{const d=wi.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(o,e)}),$t(s,(r,o)=>{r||delete i[o]}),$t(i,r=>{Dr.configure(this,r,r.options),Dr.addBox(this,r)})}_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;s<i;++s)this._destroyDatasetMeta(s);e.splice(t,i-t)}this._sortedMetasets=e.slice(0).sort(Pd("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.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<s;i++){const l=t[i];let r=this.getDatasetMeta(i);const o=l.type||this.config.type;if(r.type&&r.type!==o&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=o,r.indexAxis=l.indexAxis||lu(o,this.options),r.order=l.order||0,r.index=i,r.label=""+l.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const a=wi.getController(o),{datasetElementType:u,dataElementType:f}=mt.datasets[o];Object.assign(a.prototype,{dataElementType:wi.getElement(f),datasetElementType:u&&wi.getElement(u)}),r.controller=new a(this,i),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){$t(this.data.datasets,(e,t)=>{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 r=0;for(let u=0,f=this.data.datasets.length;u<f;u++){const{controller:c}=this.getDatasetMeta(u),d=!s&&l.indexOf(c)===-1;c.buildOrUpdateElements(d),r=Math.max(+c.getMaxOverflow(),r)}r=this._minPadding=i.layout.autoPadding?r:0,this._updateLayout(r),s||$t(l,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Pd("z","_idx"));const{_active:o,_lastEvent:a}=this;a?this._eventHandler(a,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){$t(this.scales,e=>{Dr.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Bc(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 r=i==="_removeElements"?-l:l;U$(e,s,r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(r=>r[0]===l).map((r,o)=>o+","+r.splice(1).join(","))),s=i(0);for(let l=1;l<t;l++)if(!Bc(s,i(l)))return;return Array.from(s).map(l=>l.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Dr.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],$t(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<i;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,i=this.data.datasets.length;t<i;++t)this._updateDataset(t,Ui(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const i=this.getDatasetMeta(e),s={meta:i,index:e,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(t),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(_i.has(this)?this.attached&&!_i.running(this)&&_i.start(this):(this.draw(),Ld({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resize(i,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,i=[];let s,l;for(s=0,l=t.length;s<l;++s){const r=t[s];(!e||r.visible)&&i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;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,r={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&Ku(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&&Ju(t),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return ql(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=zS.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=Yi(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),r=l.controller._resolveAnimations(void 0,s);Yn(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),r.update(l,{visible:i}),this.update(o=>o.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(),_i.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),ed(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete _o[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,i=(l,r)=>{t.addEventListener(this,l,r),e[l]=r},s=(l,r,o)=>{l.offsetX=r,l.offsetY=o,this._eventHandler(l)};$t(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 r;const o=()=>{s("attach",o),this.attached=!0,this.resize(),i("resize",l),i("detach",r)};r=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",o)},t.isAttached(this.canvas)?o():r()}unbindEvents(){$t(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},$t(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,r,o,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),o=0,a=e.length;o<a;++o){r=e[o];const u=r&&this.getDatasetMeta(r.datasetIndex).controller;u&&u[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],i=e.map(({datasetIndex:l,index:r})=>{const o=this.getDatasetMeta(l);if(!o)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:o.data[r],index:r}});!oo(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)),r=l(t,e),o=i?e:l(e,t);r.length&&this.updateHoverStyle(r,s.mode,!1),o.length&&s.mode&&this.updateHoverStyle(o,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=r=>(r.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,r=t,o=this._getActiveElements(e,s,i,r),a=N2(e),u=W$(e,this._lastEvent,i,a);i&&(this._lastEvent=null,Rt(l.onHover,[e,o,this],this),a&&Rt(l.onClick,[e,o,this],this));const f=!oo(o,s);return(f||t)&&(this._active=o,this._updateHoverStyles(o,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 Fd=()=>$t(bo.instances,n=>n._plugins.invalidate()),Ei=!0;Object.defineProperties(bo,{defaults:{enumerable:Ei,value:mt},instances:{enumerable:Ei,value:_o},overrides:{enumerable:Ei,value:ms},registry:{enumerable:Ei,value:wi},version:{enumerable:Ei,value:V$},getChart:{enumerable:Ei,value:yb},register:{enumerable:Ei,value:(...n)=>{wi.add(...n),Fd()}},unregister:{enumerable:Ei,value:(...n)=>{wi.remove(...n),Fd()}}});function vb(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:r,outerRadius:o,innerRadius:a}=e;let u=s/o;n.beginPath(),n.arc(l,r,o,i-u,t+u),a>s?(u=s/a,n.arc(l,r,a,t+u,i-u,!0)):n.arc(l,r,s,t+jt,i-jt),n.closePath(),n.clip()}function Y$(n){return Gu(n,["outerStart","outerEnd","innerStart","innerEnd"])}function K$(n,e,t,i){const s=Y$(n.options.borderRadius),l=(t-e)/2,r=Math.min(l,i*e/2),o=a=>{const u=(t-Math.min(l,a))*i/2;return on(a,0,Math.min(l,u))};return{outerStart:o(s.outerStart),outerEnd:o(s.outerEnd),innerStart:on(s.innerStart,0,r),innerEnd:on(s.innerEnd,0,r)}}function Es(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function ou(n,e,t,i,s){const{x:l,y:r,startAngle:o,pixelMargin:a,innerRadius:u}=e,f=Math.max(e.outerRadius+i+t-a,0),c=u>0?u+i+t+a:0;let d=0;const h=s-o;if(i){const G=u>0?u-i:0,K=f>0?f-i:0,Y=(G+K)/2,ne=Y!==0?h*Y/(Y+i):h;d=(h-ne)/2}const g=Math.max(.001,h*f-t/Ht)/f,y=(h-g)/2,b=o+y+d,v=s-y-d,{outerStart:S,outerEnd:$,innerStart:C,innerEnd:M}=K$(e,c,f,v-b),T=f-S,E=f-$,D=b+S/T,P=v-$/E,L=c+C,N=c+M,R=b+C/L,J=v-M/N;if(n.beginPath(),n.arc(l,r,f,D,P),$>0){const G=Es(E,P,l,r);n.arc(G.x,G.y,$,P,v+jt)}const W=Es(N,v,l,r);if(n.lineTo(W.x,W.y),M>0){const G=Es(N,J,l,r);n.arc(G.x,G.y,M,v+jt,J+Math.PI)}if(n.arc(l,r,c,v-M/c,b+C/c,!0),C>0){const G=Es(L,R,l,r);n.arc(G.x,G.y,C,R+Math.PI,b-jt)}const q=Es(T,b,l,r);if(n.lineTo(q.x,q.y),S>0){const G=Es(T,D,l,r);n.arc(G.x,G.y,S,b-jt,D)}n.closePath()}function J$(n,e,t,i){const{fullCircles:s,startAngle:l,circumference:r}=e;let o=e.endAngle;if(s){ou(n,e,t,i,l+Et);for(let a=0;a<s;++a)n.fill();isNaN(r)||(o=l+r%Et,r%Et===0&&(o+=Et))}return ou(n,e,t,i,o),n.fill(),o}function G$(n,e,t){const{x:i,y:s,startAngle:l,pixelMargin:r,fullCircles:o}=e,a=Math.max(e.outerRadius-r,0),u=e.innerRadius+r;let f;for(t&&vb(n,e,l+Et),n.beginPath(),n.arc(i,s,u,l+Et,l,!0),f=0;f<o;++f)n.stroke();for(n.beginPath(),n.arc(i,s,a,l,l+Et),f=0;f<o;++f)n.stroke()}function Z$(n,e,t,i,s){const{options:l}=e,{borderWidth:r,borderJoinStyle:o}=l,a=l.borderAlign==="inner";!r||(a?(n.lineWidth=r*2,n.lineJoin=o||"round"):(n.lineWidth=r,n.lineJoin=o||"bevel"),e.fullCircles&&G$(n,e,a),a&&vb(n,e,s),ou(n,e,t,i,s),n.stroke())}class of extends Ti{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,i){const s=this.getProps(["x","y"],i),{angle:l,distance:r}=H0(s,{x:e,y:t}),{startAngle:o,endAngle:a,innerRadius:u,outerRadius:f,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,g=ht(c,a-o)>=Et||jl(l,o,a),y=Hl(r,u+d,f+d);return g&&y}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:r,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,c=(r+o+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;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>Et?Math.floor(i/Et):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*r,Math.sin(a)*r),this.circumference>=Ht&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const o=J$(e,this,r,l);Z$(e,this,r,l,o),e.restore()}}of.id="arc";of.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0};of.defaultRoutes={backgroundColor:"backgroundColor"};function kb(n,e,t=e){n.lineCap=ht(t.borderCapStyle,e.borderCapStyle),n.setLineDash(ht(t.borderDash,e.borderDash)),n.lineDashOffset=ht(t.borderDashOffset,e.borderDashOffset),n.lineJoin=ht(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=ht(t.borderWidth,e.borderWidth),n.strokeStyle=ht(t.borderColor,e.borderColor)}function x$(n,e,t){n.lineTo(t.x,t.y)}function X$(n){return n.stepped?hw:n.tension||n.cubicInterpolationMode==="monotone"?mw:x$}function wb(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:r,end:o}=e,a=Math.max(s,r),u=Math.min(l,o),f=s<r&&l<r||s>o&&l>o;return{count:i,start:a,loop:e.loop,ilen:u<a&&!f?i+u-a:u-a}}function Q$(n,e,t,i){const{points:s,options:l}=e,{count:r,start:o,loop:a,ilen:u}=wb(s,t,i),f=X$(l);let{move:c=!0,reverse:d}=i||{},h,g,y;for(h=0;h<=u;++h)g=s[(o+(d?u-h:h))%r],!g.skip&&(c?(n.moveTo(g.x,g.y),c=!1):f(n,y,g,d,l.stepped),y=g);return a&&(g=s[(o+(d?u:0))%r],f(n,y,g,d,l.stepped)),!!a}function eC(n,e,t,i){const s=e.points,{count:l,start:r,ilen:o}=wb(s,t,i),{move:a=!0,reverse:u}=i||{};let f=0,c=0,d,h,g,y,b,v;const S=C=>(r+(u?o-C:C))%l,$=()=>{y!==b&&(n.lineTo(f,b),n.lineTo(f,y),n.lineTo(f,v))};for(a&&(h=s[S(0)],n.moveTo(h.x,h.y)),d=0;d<=o;++d){if(h=s[S(d)],h.skip)continue;const C=h.x,M=h.y,T=C|0;T===g?(M<y?y=M:M>b&&(b=M),f=(c*f+C)/++c):($(),n.lineTo(C,M),g=T,c=0,y=b=M),v=M}$()}function au(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?eC:Q$}function tC(n){return n.stepped?Gw:n.tension||n.cubicInterpolationMode==="monotone"?Zw:ls}function nC(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),kb(n,e.options),n.stroke(s)}function iC(n,e,t,i){const{segments:s,options:l}=e,r=au(e);for(const o of s)kb(n,l,o.style),n.beginPath(),r(n,e,o,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const sC=typeof Path2D=="function";function lC(n,e,t,i){sC&&!e.options.segment?nC(n,e,t,i):iC(n,e,t,i)}class Ki extends Ti{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;Vw(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=lS(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,r=ib(this,{property:t,start:s,end:s});if(!r.length)return;const o=[],a=tC(i);let u,f;for(u=0,f=r.length;u<f;++u){const{start:c,end:d}=r[u],h=l[c],g=l[d];if(h===g){o.push(h);continue}const y=Math.abs((s-h[t])/(g[t]-h[t])),b=a(h,g,y,i.stepped);b[t]=e[t],o.push(b)}return o.length===1?o[0]:o}pathSegment(e,t,i){return au(this)(e,this,t,i)}path(e,t,i){const s=this.segments,l=au(this);let r=this._loop;t=t||0,i=i||this.points.length-t;for(const o of s)r&=l(e,this,o,{start:t,end:t+i-1});return!!r}draw(e,t,i,s){const l=this.options||{};(this.points||[]).length&&l.borderWidth&&(e.save(),lC(e,this,i,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Ki.id="line";Ki.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};Ki.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};Ki.descriptors={_scriptable:!0,_indexable:n=>n!=="borderDash"&&n!=="fill"};function Id(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l)<s.radius+s.hitRadius}class Lo extends Ti{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,i){const s=this.options,{x:l,y:r}=this.getProps(["x","y"],i);return Math.pow(e-l,2)+Math.pow(t-r,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(e,t){return Id(this,e,"x",t)}inYRange(e,t){return Id(this,e,"y",t)}getCenterPoint(e){const{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}size(e){e=e||this.options||{};let t=e.radius||0;t=Math.max(t,t&&e.hoverRadius||0);const i=t&&e.borderWidth||0;return(t+i)*2}draw(e,t){const i=this.options;this.skip||i.radius<.1||!ql(this,t,this.size(i)/2)||(e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.fillStyle=i.backgroundColor,iu(e,i,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}Lo.id="point";Lo.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};Lo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Sb(n,e){const{x:t,y:i,base:s,width:l,height:r}=n.getProps(["x","y","base","width","height"],e);let o,a,u,f,c;return n.horizontal?(c=r/2,o=Math.min(t,s),a=Math.max(t,s),u=i-c,f=i+c):(c=l/2,o=t-c,a=t+c,u=Math.min(i,s),f=Math.max(i,s)),{left:o,top:u,right:a,bottom:f}}function qi(n,e,t,i){return n?0:on(e,t,i)}function rC(n,e,t){const i=n.options.borderWidth,s=n.borderSkipped,l=W0(i);return{t:qi(s.top,l.top,0,t),r:qi(s.right,l.right,0,e),b:qi(s.bottom,l.bottom,0,t),l:qi(s.left,l.left,0,e)}}function oC(n,e,t){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,l=Hs(s),r=Math.min(e,t),o=n.borderSkipped,a=i||dt(s);return{topLeft:qi(!a||o.top||o.left,l.topLeft,0,r),topRight:qi(!a||o.top||o.right,l.topRight,0,r),bottomLeft:qi(!a||o.bottom||o.left,l.bottomLeft,0,r),bottomRight:qi(!a||o.bottom||o.right,l.bottomRight,0,r)}}function aC(n){const e=Sb(n),t=e.right-e.left,i=e.bottom-e.top,s=rC(n,t/2,i/2),l=oC(n,t/2,i/2);return{outer:{x:e.left,y:e.top,w:t,h:i,radius:l},inner:{x:e.left+s.l,y:e.top+s.t,w:t-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,l.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,l.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,l.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,l.bottomRight-Math.max(s.b,s.r))}}}}function ka(n,e,t,i){const s=e===null,l=t===null,o=n&&!(s&&l)&&Sb(n,i);return o&&(s||Hl(e,o.left,o.right))&&(l||Hl(t,o.top,o.bottom))}function uC(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function fC(n,e){n.rect(e.x,e.y,e.w,e.h)}function wa(n,e,t={}){const i=n.x!==t.x?-e:0,s=n.y!==t.y?-e:0,l=(n.x+n.w!==t.x+t.w?e:0)-i,r=(n.y+n.h!==t.y+t.h?e:0)-s;return{x:n.x+i,y:n.y+s,w:n.w+l,h:n.h+r,radius:n.radius}}class af extends Ti{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:i,backgroundColor:s}}=this,{inner:l,outer:r}=aC(this),o=uC(r.radius)?ho:fC;e.save(),(r.w!==l.w||r.h!==l.h)&&(e.beginPath(),o(e,wa(r,t,l)),e.clip(),o(e,wa(l,-t,r)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),o(e,wa(l,t)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,t,i){return ka(this,e,t,i)}inXRange(e,t){return ka(this,e,null,t)}inYRange(e,t){return ka(this,null,e,t)}getCenterPoint(e){const{x:t,y:i,base:s,horizontal:l}=this.getProps(["x","y","base","horizontal"],e);return{x:l?(t+s)/2:t,y:l?i:(i+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}af.id="bar";af.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};af.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function cC(n,e,t){const i=n.segments,s=n.points,l=e.points,r=[];for(const o of i){let{start:a,end:u}=o;u=uf(a,u,s);const f=uu(t,s[a],s[u],o.loop);if(!e.segments){r.push({source:o,target:f,start:s[a],end:s[u]});continue}const c=ib(e,f);for(const d of c){const h=uu(t,l[d.start],l[d.end],d.loop),g=nb(o,s,h);for(const y of g)r.push({source:y,target:d,start:{[t]:Nd(f,h,"start",Math.max)},end:{[t]:Nd(f,h,"end",Math.min)}})}}return r}function uu(n,e,t,i){if(i)return;let s=e[n],l=t[n];return n==="angle"&&(s=Cn(s),l=Cn(l)),{property:n,start:s,end:l}}function dC(n,e){const{x:t=null,y:i=null}=n||{},s=e.points,l=[];return e.segments.forEach(({start:r,end:o})=>{o=uf(r,o,s);const a=s[r],u=s[o];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 uf(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Nd(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function $b(n,e){let t=[],i=!1;return Pt(n)?(i=!0,t=n):t=dC(n,e),t.length?new Ki({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function pC(n,e,t){let s=n[e].fill;const l=[e];let r;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!Vt(s))return s;if(r=n[s],!r)return!1;if(r.visible)return s;l.push(s),s=r.fill}return!1}function hC(n,e,t){const i=bC(n);if(dt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Vt(s)&&Math.floor(s)===s?mC(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function mC(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function gC(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:dt(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function _C(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:dt(n)?i=n.value:i=e.getBaseValue(),i}function bC(n){const e=n.options,t=e.fill;let i=ht(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function yC(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,r=i.points,o=vC(e,t);o.push($b({x:null,y:e.bottom},i));for(let a=0;a<l.length;a++){const u=l[a];for(let f=u.start;f<=u.end;f++)kC(s,r[f],o)}return new Ki({points:s,options:{}})}function vC(n,e){const t=[],i=n.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const l=i[s];if(l.index===e)break;l.hidden||t.unshift(l.dataset)}return t}function kC(n,e,t){const i=[];for(let s=0;s<t.length;s++){const l=t[s],{first:r,last:o,point:a}=wC(l,e,"x");if(!(!a||r&&o)){if(r)i.unshift(a);else if(n.push(a),!o)break}}n.push(...i)}function wC(n,e,t){const i=n.interpolate(e,t);if(!i)return{};const s=i[t],l=n.segments,r=n.points;let o=!1,a=!1;for(let u=0;u<l.length;u++){const f=l[u],c=r[f.start][t],d=r[f.end][t];if(Hl(s,c,d)){o=s===c,a=s===d;break}}return{first:o,last:a,point:i}}class Cb{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,i){const{x:s,y:l,radius:r}=this;return t=t||{start:0,end:Et},e.arc(s,l,r,t.end,t.start,!0),!i.bounds}interpolate(e){const{x:t,y:i,radius:s}=this,l=e.angle;return{x:t+Math.cos(l)*s,y:i+Math.sin(l)*s,angle:l}}}function SC(n){const{chart:e,fill:t,line:i}=n;if(Vt(t))return $C(e,t);if(t==="stack")return yC(n);if(t==="shape")return!0;const s=CC(n);return s instanceof Cb?s:$b(s,i)}function $C(n,e){const t=n.getDatasetMeta(e);return t&&n.isDatasetVisible(e)?t.dataset:null}function CC(n){return(n.scale||{}).getPointPositionForValue?OC(n):MC(n)}function MC(n){const{scale:e={},fill:t}=n,i=gC(t,e);if(Vt(i)){const s=e.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function OC(n){const{scale:e,fill:t}=n,i=e.options,s=e.getLabels().length,l=i.reverse?e.max:e.min,r=_C(t,e,l),o=[];if(i.grid.circular){const a=e.getPointPositionForValue(0,l);return new Cb({x:a.x,y:a.y,radius:e.getDistanceFromCenterForValue(r)})}for(let a=0;a<s;++a)o.push(e.getPointPositionForValue(a,r));return o}function Sa(n,e,t){const i=SC(e),{line:s,scale:l,axis:r}=e,o=s.options,a=o.fill,u=o.backgroundColor,{above:f=u,below:c=u}=a||{};i&&s.points.length&&(Ku(n,t),TC(n,{line:s,target:i,above:f,below:c,area:t,scale:l,axis:r}),Ju(n))}function TC(n,e){const{line:t,target:i,above:s,below:l,area:r,scale:o}=e,a=t._loop?"angle":e.axis;n.save(),a==="x"&&l!==s&&(Rd(n,i,r.top),jd(n,{line:t,target:i,color:s,scale:o,property:a}),n.restore(),n.save(),Rd(n,i,r.bottom)),jd(n,{line:t,target:i,color:l,scale:o,property:a}),n.restore()}function Rd(n,e,t){const{segments:i,points:s}=e;let l=!0,r=!1;n.beginPath();for(const o of i){const{start:a,end:u}=o,f=s[a],c=s[uf(a,u,s)];l?(n.moveTo(f.x,f.y),l=!1):(n.lineTo(f.x,t),n.lineTo(f.x,f.y)),r=!!e.pathSegment(n,o,{move:r}),r?n.closePath():n.lineTo(c.x,t)}n.lineTo(e.first().x,t),n.closePath(),n.clip()}function jd(n,e){const{line:t,target:i,property:s,color:l,scale:r}=e,o=cC(t,i,s);for(const{source:a,target:u,start:f,end:c}of o){const{style:{backgroundColor:d=l}={}}=a,h=i!==!0;n.save(),n.fillStyle=d,DC(n,r,h&&uu(s,f,c)),n.beginPath();const g=!!t.pathSegment(n,a);let y;if(h){g?n.closePath():Hd(n,i,c,s);const b=!!i.pathSegment(n,u,{move:g,reverse:!0});y=g&&b,y||Hd(n,i,f,s)}n.closePath(),n.fill(y?"evenodd":"nonzero"),n.restore()}}function DC(n,e,t){const{top:i,bottom:s}=e.chart.chartArea,{property:l,start:r,end:o}=t||{};l==="x"&&(n.beginPath(),n.rect(r,i,o-r,s-i),n.clip())}function Hd(n,e,t,i){const s=e.interpolate(t,i);s&&n.lineTo(s.x,s.y)}var AC={id:"filler",afterDatasetsUpdate(n,e,t){const i=(n.data.datasets||[]).length,s=[];let l,r,o,a;for(r=0;r<i;++r)l=n.getDatasetMeta(r),o=l.dataset,a=null,o&&o.options&&o instanceof Ki&&(a={visible:n.isDatasetVisible(r),index:r,fill:hC(o,r,i),chart:n,axis:l.controller.options.indexAxis,scale:l.vScale,line:o}),l.$filler=a,s.push(a);for(r=0;r<i;++r)a=s[r],!(!a||a.fill===!1)&&(a.fill=pC(s,r,t.propagate))},beforeDraw(n,e,t){const i=t.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),l=n.chartArea;for(let r=s.length-1;r>=0;--r){const o=s[r].$filler;!o||(o.line.updateControlPoints(l,o.axis),i&&Sa(n.ctx,o,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;l&&Sa(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!i||i.fill===!1||t.drawTime!=="beforeDatasetDraw"||Sa(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const El={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;e<t;++e){const r=n[e].element;if(r&&r.hasValue()){const o=r.tooltipPosition();i+=o.x,s+=o.y,++l}}return{x:i/l,y:s/l}},nearest(n,e){if(!n.length)return!1;let t=e.x,i=e.y,s=Number.POSITIVE_INFINITY,l,r,o;for(l=0,r=n.length;l<r;++l){const a=n[l].element;if(a&&a.hasValue()){const u=a.getCenterPoint(),f=eu(e,u);f<s&&(s=f,o=a)}}if(o){const a=o.tooltipPosition();t=a.x,i=a.y}return{x:t,y:i}}};function li(n,e){return e&&(Pt(e)?Array.prototype.push.apply(n,e):n.push(e)),n}function bi(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
-`)>-1?n.split(`
-`):n}function EC(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:r,value:o}=l.getLabelAndValue(s);return{chart:n,label:r,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:o,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function qd(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:r,boxHeight:o}=e,a=On(e.bodyFont),u=On(e.titleFont),f=On(e.footerFont),c=l.length,d=s.length,h=i.length,g=Kn(e.padding);let y=g.height,b=0,v=i.reduce((C,M)=>C+M.before.length+M.lines.length+M.after.length,0);if(v+=n.beforeBody.length+n.afterBody.length,c&&(y+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),v){const C=e.displayColors?Math.max(o,a.lineHeight):a.lineHeight;y+=h*C+(v-h)*a.lineHeight+(v-1)*e.bodySpacing}d&&(y+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let S=0;const $=function(C){b=Math.max(b,t.measureText(C).width+S)};return t.save(),t.font=u.string,$t(n.title,$),t.font=a.string,$t(n.beforeBody.concat(n.afterBody),$),S=e.displayColors?r+2+e.boxPadding:0,$t(i,C=>{$t(C.before,$),$t(C.lines,$),$t(C.after,$)}),S=0,t.font=f.string,$t(n.footer,$),t.restore(),b+=g.width,{width:b,height:y}}function PC(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function LC(n,e,t,i){const{x:s,width:l}=i,r=t.caretSize+t.caretPadding;if(n==="left"&&s+l+r>e.width||n==="right"&&s-l-r<0)return!0}function FC(n,e,t,i){const{x:s,width:l}=t,{width:r,chartArea:{left:o,right:a}}=n;let u="center";return i==="center"?u=s<=(o+a)/2?"left":"right":s<=l/2?u="left":s>=r-l/2&&(u="right"),LC(u,n,e,t)&&(u="center"),u}function Vd(n,e,t){const i=t.yAlign||e.yAlign||PC(n,t);return{xAlign:t.xAlign||e.xAlign||FC(n,e,t,i),yAlign:i}}function IC(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function NC(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function zd(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:r}=n,{xAlign:o,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:h}=Hs(r);let g=IC(e,o);const y=NC(e,a,u);return a==="center"?o==="left"?g+=u:o==="right"&&(g-=u):o==="left"?g-=Math.max(f,d)+s:o==="right"&&(g+=Math.max(c,h)+s),{x:on(g,0,i.width-e.width),y:on(y,0,i.height-e.height)}}function Lr(n,e,t){const i=Kn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function Bd(n){return li([],bi(n))}function RC(n,e,t){return Yi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function Ud(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class fu extends Ti{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 sb(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=RC(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]),r=i.afterTitle.apply(this,[e]);let o=[];return o=li(o,bi(s)),o=li(o,bi(l)),o=li(o,bi(r)),o}getBeforeBody(e,t){return Bd(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return $t(e,l=>{const r={before:[],lines:[],after:[]},o=Ud(i,l);li(r.before,bi(o.beforeLabel.call(this,l))),li(r.lines,o.label.call(this,l)),li(r.after,bi(o.afterLabel.call(this,l))),s.push(r)}),s}getAfterBody(e,t){return Bd(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]),r=i.afterFooter.apply(this,[e]);let o=[];return o=li(o,bi(s)),o=li(o,bi(l)),o=li(o,bi(r)),o}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],r=[];let o=[],a,u;for(a=0,u=t.length;a<u;++a)o.push(EC(this.chart,t[a]));return e.filter&&(o=o.filter((f,c,d)=>e.filter(f,c,d,i))),e.itemSort&&(o=o.sort((f,c)=>e.itemSort(f,c,i))),$t(o,f=>{const c=Ud(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),r.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=r,this.dataPoints=o,o}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,r=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const o=El[i.position].call(this,s,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const a=this._size=qd(this,i),u=Object.assign({},o,a),f=Vd(this.chart,i,u),c=zd(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:o.x,caretY:o.y}}this._tooltipItems=r,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:r,cornerRadius:o}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:c}=Hs(o),{x:d,y:h}=e,{width:g,height:y}=t;let b,v,S,$,C,M;return l==="center"?(C=h+y/2,s==="left"?(b=d,v=b-r,$=C+r,M=C-r):(b=d+g,v=b+r,$=C-r,M=C+r),S=b):(s==="left"?v=d+Math.max(a,f)+r:s==="right"?v=d+g-Math.max(u,c)-r:v=this.caretX,l==="top"?($=h,C=$-r,b=v-r,S=v+r):($=h+y,C=$+r,b=v+r,S=v-r),M=$),{x1:b,x2:v,x3:S,y1:$,y2:C,y3:M}}drawTitle(e,t,i){const s=this.title,l=s.length;let r,o,a;if(l){const u=ha(i.rtl,this.x,this.width);for(e.x=Lr(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",r=On(i.titleFont),o=i.titleSpacing,t.fillStyle=i.titleColor,t.font=r.string,a=0;a<l;++a)t.fillText(s[a],u.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+o,a+1===l&&(e.y+=i.titleMarginBottom-o)}}_drawColorBox(e,t,i,s,l){const r=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:a,boxWidth:u,boxPadding:f}=l,c=On(l.bodyFont),d=Lr(this,"left",l),h=s.x(d),g=a<c.lineHeight?(c.lineHeight-a)/2:0,y=t.y+g;if(l.usePointStyle){const b={radius:Math.min(u,a)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},v=s.leftForLtr(h,u)+u/2,S=y+a/2;e.strokeStyle=l.multiKeyBackground,e.fillStyle=l.multiKeyBackground,iu(e,b,v,S),e.strokeStyle=r.borderColor,e.fillStyle=r.backgroundColor,iu(e,b,v,S)}else{e.lineWidth=r.borderWidth||1,e.strokeStyle=r.borderColor,e.setLineDash(r.borderDash||[]),e.lineDashOffset=r.borderDashOffset||0;const b=s.leftForLtr(h,u-f),v=s.leftForLtr(s.xPlus(h,1),u-f-2),S=Hs(r.borderRadius);Object.values(S).some($=>$!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,ho(e,{x:b,y,w:u,h:a,radius:S}),e.fill(),e.stroke(),e.fillStyle=r.backgroundColor,e.beginPath(),ho(e,{x:v,y:y+1,w:u-2,h:a-2,radius:S}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,y,u,a),e.strokeRect(b,y,u,a),e.fillStyle=r.backgroundColor,e.fillRect(v,y+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:r,displayColors:o,boxHeight:a,boxWidth:u,boxPadding:f}=i,c=On(i.bodyFont);let d=c.lineHeight,h=0;const g=ha(i.rtl,this.x,this.width),y=function(D){t.fillText(D,g.x(e.x+h),e.y+d/2),e.y+=d+l},b=g.textAlign(r);let v,S,$,C,M,T,E;for(t.textAlign=r,t.textBaseline="middle",t.font=c.string,e.x=Lr(this,b,i),t.fillStyle=i.bodyColor,$t(this.beforeBody,y),h=o&&b!=="right"?r==="center"?u/2+f:u+2+f:0,C=0,T=s.length;C<T;++C){for(v=s[C],S=this.labelTextColors[C],t.fillStyle=S,$t(v.before,y),$=v.lines,o&&$.length&&(this._drawColorBox(t,e,C,g,i),d=Math.max(c.lineHeight,a)),M=0,E=$.length;M<E;++M)y($[M]),d=c.lineHeight;$t(v.after,y)}h=0,d=c.lineHeight,$t(this.afterBody,y),e.y-=l}drawFooter(e,t,i){const s=this.footer,l=s.length;let r,o;if(l){const a=ha(i.rtl,this.x,this.width);for(e.x=Lr(this,i.footerAlign,i),e.y+=i.footerMarginTop,t.textAlign=a.textAlign(i.footerAlign),t.textBaseline="middle",r=On(i.footerFont),t.fillStyle=i.footerColor,t.font=r.string,o=0;o<l;++o)t.fillText(s[o],a.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+i.footerSpacing}}drawBackground(e,t,i,s){const{xAlign:l,yAlign:r}=this,{x:o,y:a}=e,{width:u,height:f}=i,{topLeft:c,topRight:d,bottomLeft:h,bottomRight:g}=Hs(s.cornerRadius);t.fillStyle=s.backgroundColor,t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.beginPath(),t.moveTo(o+c,a),r==="top"&&this.drawCaret(e,t,i,s),t.lineTo(o+u-d,a),t.quadraticCurveTo(o+u,a,o+u,a+d),r==="center"&&l==="right"&&this.drawCaret(e,t,i,s),t.lineTo(o+u,a+f-g),t.quadraticCurveTo(o+u,a+f,o+u-g,a+f),r==="bottom"&&this.drawCaret(e,t,i,s),t.lineTo(o+h,a+f),t.quadraticCurveTo(o,a+f,o,a+f-h),r==="center"&&l==="left"&&this.drawCaret(e,t,i,s),t.lineTo(o,a+c),t.quadraticCurveTo(o,a,o+c,a),t.closePath(),t.fill(),s.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const r=El[e.position].call(this,this._active,this._eventPosition);if(!r)return;const o=this._size=qd(this,e),a=Object.assign({},r,this._size),u=Vd(t,e,a),f=zd(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=o.width,this.height=o.height,this.caretX=r.x,this.caretY=r.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 r=Kn(t.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&o&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),eS(e,t.textDirection),l.y+=r.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),tS(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:o,index:a})=>{const u=this.chart.getDatasetMeta(o);if(!u)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:u.data[a],index:a}}),l=!oo(i,s),r=this._positionChanged(s,t);(l||r)&&(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||[],r=this._getActiveElements(e,l,t,i),o=this._positionChanged(r,e),a=t||!oo(r,l)||o;return a&&(this._active=r,(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 r=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&r.reverse(),r}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,r=El[l.position].call(this,e,t);return r!==!1&&(i!==r.x||s!==r.y)}}fu.positioners=El;var jC={id:"tooltip",_element:fu,positioners:El,afterInit(n,e,t){t&&(n.tooltip=new fu({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:gi,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.dataIndex<i)return t[e.dataIndex]}return""},afterTitle:gi,beforeBody:gi,beforeLabel:gi,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let e=n.dataset.label||"";e&&(e+=": ");const t=n.formattedValue;return Ct(t)||(e+=t),e},labelColor(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:gi,afterBody:gi,beforeFooter:gi,footer:gi,afterFooter:gi}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const HC=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function qC(n,e,t,i){const s=n.indexOf(e);if(s===-1)return HC(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const VC=(n,e)=>n===null?null:on(Math.round(n),0,e);class cu extends bs{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(Ct(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:qC(i,e,ht(t,e),this._addedLabels),VC(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 r=e;r<=t;r++)s.push({value:r});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}cu.id="category";cu.defaults={ticks:{callback:cu.prototype.getLabelForValue}};function zC(n,e){const t=[],{bounds:s,step:l,min:r,max:o,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,h=l||1,g=f-1,{min:y,max:b}=e,v=!Ct(r),S=!Ct(o),$=!Ct(u),C=(b-y)/(c+1);let M=Wc((b-y)/g/h)*h,T,E,D,P;if(M<1e-14&&!v&&!S)return[{value:y},{value:b}];P=Math.ceil(b/M)-Math.floor(y/M),P>g&&(M=Wc(P*M/g/h)*h),Ct(a)||(T=Math.pow(10,a),M=Math.ceil(M*T)/T),s==="ticks"?(E=Math.floor(y/M)*M,D=Math.ceil(b/M)*M):(E=y,D=b),v&&S&&l&&q2((o-r)/l,M/1e3)?(P=Math.round(Math.min((o-r)/M,f)),M=(o-r)/P,E=r,D=o):$?(E=v?r:E,D=S?o:D,P=u-1,M=(D-E)/P):(P=(D-E)/M,Tl(P,Math.round(P),M/1e3)?P=Math.round(P):P=Math.ceil(P));const L=Math.max(Yc(M),Yc(E));T=Math.pow(10,Ct(a)?L:a),E=Math.round(E*T)/T,D=Math.round(D*T)/T;let N=0;for(v&&(d&&E!==r?(t.push({value:r}),E<r&&N++,Tl(Math.round((E+N*M)*T)/T,r,Wd(r,C,n))&&N++):E<r&&N++);N<P;++N)t.push({value:Math.round((E+N*M)*T)/T});return S&&d&&D!==o?t.length&&Tl(t[t.length-1].value,o,Wd(o,C,n))?t[t.length-1].value=o:t.push({value:o}):(!S||D===o)&&t.push({value:D}),t}function Wd(n,e,{horizontal:t,minRotation:i}){const s=Qn(i),l=(t?Math.sin(s):Math.cos(s))||.001,r=.75*e*(""+n).length;return Math.min(e/l,r)}class yo extends bs{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return Ct(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:s,max:l}=this;const r=a=>s=t?s:a,o=a=>l=i?l:a;if(e){const a=ui(s),u=ui(l);a<0&&u<0?o(0):a>0&&u>0&&r(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),o(l+a),e||r(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,r=zC(s,l);return e.bounds==="ticks"&&j0(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}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 Xl(e,this.chart.options.locale,this.options.ticks.format)}}class ff extends yo{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Vt(e)?e:0,this.max=Vt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=Qn(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}}ff.id="linear";ff.defaults={ticks:{callback:Po.formatters.numeric}};function Yd(n){return n/Math.pow(10,Math.floor(Vn(n)))===1}function BC(n,e){const t=Math.floor(Vn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=jn(n.min,Math.pow(10,Math.floor(Vn(e.min)))),r=Math.floor(Vn(l)),o=Math.floor(l/Math.pow(10,r)),a=r<0?Math.pow(10,Math.abs(r)):1;do s.push({value:l,major:Yd(l)}),++o,o===10&&(o=1,++r,a=r>=0?1:a),l=Math.round(o*Math.pow(10,r)*a)/a;while(r<t||r===t&&o<i);const u=jn(n.max,l);return s.push({value:u,major:Yd(l)}),s}class Mb extends bs{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const i=yo.prototype.parse.apply(this,[e,t]);if(i===0){this._zero=!0;return}return Vt(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Vt(e)?Math.max(0,e):null,this.max=Vt(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,r=a=>s=t?s:a,o=(a,u)=>Math.pow(10,Math.floor(Vn(a))+u);i===s&&(i<=0?(l(1),r(10)):(l(o(i,-1)),r(o(s,1)))),i<=0&&l(o(s,-1)),s<=0&&r(o(i,1)),this._zero&&this.min!==this._suggestedMin&&i===o(this.min,0)&&l(o(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=BC(t,this);return e.bounds==="ticks"&&j0(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":Xl(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Vn(e),this._valueRange=Vn(this.max)-Vn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Vn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}Mb.id="logarithmic";Mb.defaults={ticks:{callback:Po.formatters.logarithmic,major:{enabled:!0}}};function du(n){const e=n.ticks;if(e.display&&n.display){const t=Kn(e.backdropPadding);return ht(e.font&&e.font.size,mt.font.size)+t.height}return 0}function UC(n,e,t){return t=Pt(t)?t:[t],{w:pw(n,e.string,t),h:t.length*e.lineHeight}}function Kd(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:n<i||n>s?{start:e-t,end:e}:{start:e,end:e+t}}function WC(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,r=n.options.pointLabels,o=r.centerPointLabels?Ht/l:0;for(let a=0;a<l;a++){const u=r.setContext(n.getPointLabelContext(a));s[a]=u.padding;const f=n.getPointPosition(a,n.drawingArea+s[a],o),c=On(u.font),d=UC(n.ctx,c,n._pointLabels[a]);i[a]=d;const h=Cn(n.getIndexAngle(a)+o),g=Math.round(Bu(h)),y=Kd(g,f.x,d.w,0,180),b=Kd(g,f.y,d.h,90,270);YC(t,e,h,y,b)}n.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),n._pointLabelItems=KC(n,i,s)}function YC(n,e,t,i,s){const l=Math.abs(Math.sin(t)),r=Math.abs(Math.cos(t));let o=0,a=0;i.start<e.l?(o=(e.l-i.start)/l,n.l=Math.min(n.l,e.l-o)):i.end>e.r&&(o=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+o)),s.start<e.t?(a=(e.t-s.start)/r,n.t=Math.min(n.t,e.t-a)):s.end>e.b&&(a=(s.end-e.b)/r,n.b=Math.max(n.b,e.b+a))}function KC(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,r=du(l)/2,o=n.drawingArea,a=l.pointLabels.centerPointLabels?Ht/s:0;for(let u=0;u<s;u++){const f=n.getPointPosition(u,o+r+t[u],a),c=Math.round(Bu(Cn(f.angle+jt))),d=e[u],h=ZC(f.y,d.h,c),g=JC(c),y=GC(f.x,d.w,g);i.push({x:f.x,y:h,textAlign:g,left:y,top:h,right:y+d.w,bottom:h+d.h})}return i}function JC(n){return n===0||n===180?"center":n<180?"left":"right"}function GC(n,e,t){return t==="right"?n-=e:t==="center"&&(n-=e/2),n}function ZC(n,e,t){return t===90||t===270?n-=e/2:(t>270||t<90)&&(n-=e),n}function xC(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),r=On(l.font),{x:o,y:a,textAlign:u,left:f,top:c,right:d,bottom:h}=n._pointLabelItems[s],{backdropColor:g}=l;if(!Ct(g)){const y=Hs(l.borderRadius),b=Kn(l.backdropPadding);t.fillStyle=g;const v=f-b.left,S=c-b.top,$=d-f+b.width,C=h-c+b.height;Object.values(y).some(M=>M!==0)?(t.beginPath(),ho(t,{x:v,y:S,w:$,h:C,radius:y}),t.fill()):t.fillRect(v,S,$,C)}po(t,n._pointLabels[s],o,a+r.lineHeight/2,r,{color:l.color,textAlign:u,textBaseline:"middle"})}}function Ob(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,Et);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let r=1;r<i;r++)l=n.getPointPosition(r,e),s.lineTo(l.x,l.y)}}function XC(n,e,t,i){const s=n.ctx,l=e.circular,{color:r,lineWidth:o}=e;!l&&!i||!r||!o||t<0||(s.save(),s.strokeStyle=r,s.lineWidth=o,s.setLineDash(e.borderDash),s.lineDashOffset=e.borderDashOffset,s.beginPath(),Ob(n,t,l,i),s.closePath(),s.stroke(),s.restore())}function QC(n,e,t){return Yi(n,{label:t,index:e,type:"pointLabel"})}class Fo extends yo{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Kn(du(this.options)/2),t=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(t,i)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=Vt(e)&&!isNaN(e)?e:0,this.max=Vt(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/du(this.options))}generateTickLabels(e){yo.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,i)=>{const s=Rt(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?WC(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=Et/(this._pointLabels.length||1),i=this.options.startAngle||0;return Cn(e*t+Qn(i))}getDistanceFromCenterForValue(e){if(Ct(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(Ct(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const i=t[e];return QC(this.getContext(),e,i)}}getPointPosition(e,t,i=0){const s=this.getIndexAngle(e)-jt+i;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:i,right:s,bottom:l}=this._pointLabelItems[e];return{left:t,top:i,right:s,bottom:l}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),Ob(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:i,grid:s}=t,l=this._pointLabels.length;let r,o,a;if(t.pointLabels.display&&xC(this,l),s.display&&this.ticks.forEach((u,f)=>{if(f!==0){o=this.getDistanceFromCenterForValue(u.value);const c=s.setContext(this.getContext(f-1));XC(this,c,o,l)}}),i.display){for(e.save(),r=l-1;r>=0;r--){const u=i.setContext(this.getPointLabelContext(r)),{color:f,lineWidth:c}=u;!c||!f||(e.lineWidth=c,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,o=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(r,o),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,r;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((o,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=On(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,r=e.measureText(o.label).width,e.fillStyle=u.backdropColor;const c=Kn(u.backdropPadding);e.fillRect(-r/2-c.left,-l-f.size/2-c.top,r+c.width,f.size+c.height)}po(e,o.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Fo.id="radialLinear";Fo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Po.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Fo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Fo.descriptors={angleLines:{_fallback:"grid"}};const Io={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}},vn=Object.keys(Io);function e3(n,e){return n-e}function Jd(n,e){if(Ct(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let r=e;return typeof i=="function"&&(r=i(r)),Vt(r)||(r=typeof i=="string"?t.parse(r,i):t.parse(r)),r===null?null:(s&&(r=s==="week"&&(Rl(l)||l===!0)?t.startOf(r,"isoWeek",l):t.startOf(r,s)),+r)}function Gd(n,e,t,i){const s=vn.length;for(let l=vn.indexOf(n);l<s-1;++l){const r=Io[vn[l]],o=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((t-e)/(o*r.size))<=i)return vn[l]}return vn[s-1]}function t3(n,e,t,i,s){for(let l=vn.length-1;l>=vn.indexOf(t);l--){const r=vn[l];if(Io[r].common&&n._adapter.diff(s,i,r)>=e-1)return r}return vn[t?vn.indexOf(t):0]}function n3(n){for(let e=vn.indexOf(n)+1,t=vn.length;e<t;++e)if(Io[vn[e]].common)return vn[e]}function Zd(n,e,t){if(!t)n[e]=!0;else if(t.length){const{lo:i,hi:s}=Zu(t,e),l=t[i]>=e?t[i]:t[s];n[l]=!0}}function i3(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),r=e[e.length-1].value;let o,a;for(o=l;o<=r;o=+s.add(o,1,i))a=t[o],a>=0&&(e[a].major=!0);return e}function xd(n,e,t){const i=[],s={},l=e.length;let r,o;for(r=0;r<l;++r)o=e[r],s[o]=r,i.push({value:o,major:!1});return l===0||!t?i:i3(n,i,s,t)}class nr extends bs{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t){const i=e.time||(e.time={}),s=this._adapter=new ab._date(e.adapters.date);Ol(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return e===void 0?null:Jd(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,i=e.time.unit||"day";let{min:s,max:l,minDefined:r,maxDefined:o}=this.getUserBounds();function a(u){!r&&!isNaN(u.min)&&(s=Math.min(s,u.min)),!o&&!isNaN(u.max)&&(l=Math.max(l,u.max))}(!r||!o)&&(a(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&a(this.getMinMax(!1))),s=Vt(s)&&!isNaN(s)?s:+t.startOf(Date.now(),i),l=Vt(l)&&!isNaN(l)?l:+t.endOf(Date.now(),i)+1,this.min=Math.min(s,l-1),this.max=Math.max(s+1,l)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],i=e[e.length-1]),{min:t,max:i}}buildTicks(){const e=this.options,t=e.time,i=e.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const l=this.min,r=this.max,o=$w(s,l,r);return this._unit=t.unit||(i.autoSkip?Gd(t.minUnit,this.min,this.max,this._getLabelCapacity(l)):t3(this,o.length,t.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:n3(this._unit),this.initOffsets(s),e.reverse&&o.reverse(),xd(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+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 r=e.length<3?.5:.25;t=on(t,0,r),i=on(i,0,r),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,r=l.unit||Gd(l.minUnit,t,i,this._getLabelCapacity(t)),o=ht(l.stepSize,1),a=r==="week"?l.isoWeekday:!1,u=Rl(a)||a===!0,f={};let c=t,d,h;if(u&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,u?"day":r),e.diff(i,t,r)>1e5*o)throw new Error(t+" and "+i+" are too far apart with stepSize of "+o+" "+r);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,h=0;d<i;d=+e.add(d,o,r),h++)Zd(f,d,g);return(d===i||s.bounds==="ticks"||h===1)&&Zd(f,d,g),Object.keys(f).sort((y,b)=>y-b).map(y=>+y)}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,r=l.time.displayFormats,o=this._unit,a=this._majorUnit,u=o&&r[o],f=a&&r[a],c=i[t],d=a&&f&&c&&c.major,h=this._adapter.format(e,s||(d?f:u)),g=l.ticks.callback;return g?Rt(g,[h,t,i],this):h}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t<i;++t)s=e[t],s.label=this._tickFormatFunction(s.value,t,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+i)*t.factor)}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,i=this.ctx.measureText(e).width,s=Qn(this.isHorizontal()?t.maxRotation:t.minRotation),l=Math.cos(s),r=Math.sin(s),o=this._resolveTickFontOptions(0).size;return{w:i*l+o*r,h:i*r+o*l}}_getLabelCapacity(e){const t=this.options.time,i=t.displayFormats,s=i[t.unit]||i.millisecond,l=this._tickFormatFunction(e,0,xd(this,[e],this._majorUnit),s),r=this._getLabelSize(l),o=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return o>0?o: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<i;++t)e=e.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let t,i;if(e.length)return e;const s=this.getLabels();for(t=0,i=s.length;t<i;++t)e.push(Jd(this,s[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return K0(e.sort(e3))}}nr.id="time";nr.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function Fr(n,e,t){let i=0,s=n.length-1,l,r,o,a;t?(e>=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=us(n,"pos",e)),{pos:l,time:o}=n[i],{pos:r,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=us(n,"time",e)),{time:l,pos:o}=n[i],{time:r,pos:a}=n[s]);const u=r-l;return u?o+(a-o)*(e-l)/u:o}class Tb extends nr{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=Fr(t,this.min),this._tableRange=Fr(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let r,o,a,u,f;for(r=0,o=e.length;r<o;++r)u=e[r],u>=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(r=0,o=s.length;r<o;++r)f=s[r+1],a=s[r-1],u=s[r],Math.round((f+a)/2)!==u&&l.push({time:u,pos:r/(o-1)});return l}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),i=this.getLabelTimestamps();return t.length&&i.length?e=this.normalize(t.concat(i)):e=t.length?t:i,e=this._cache.all=e,e}getDecimalForValue(e){return(Fr(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return Fr(this._table,i*this._tableRange+this._minPos,!0)}}Tb.id="timeseries";Tb.defaults=nr.defaults;/*!
- * chartjs-adapter-luxon v1.1.0
- * https://www.chartjs.org
- * (c) 2021 chartjs-adapter-luxon Contributors
- * Released under the MIT license
- */const s3={datetime:Qe.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Qe.TIME_WITH_SECONDS,minute:Qe.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};ab._date.override({_id:"luxon",_create:function(n){return Qe.fromMillis(n,this.options)},formats:function(){return s3},parse:function(n,e){const t=this.options;if(n===null||typeof n=="undefined")return null;const i=typeof n;return i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=Qe.fromFormat(n,e,t):n=Qe.fromISO(n,t):n instanceof Date?n=Qe.fromJSDate(n,t):i==="object"&&!(n instanceof Qe)&&(n=Qe.fromObject(n)),n.isValid?n.valueOf():null},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e,this.options):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 Xd(n){let e,t,i;return{c(){e=_("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){w(s,e,l),i=!0},i(s){i||(Dt(()=>{t||(t=ft(e,Wn,{duration:150},!0)),t.run(1)}),i=!0)},o(s){t||(t=ft(e,Wn,{duration:150},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function l3(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=H(n[1]),t=O(),s=H(i)},m(l,r){w(l,e,r),w(l,t,r),w(l,s,r)},p(l,r){r&2&&_e(e,l[1]),r&2&&i!==(i=l[1]===1?"log":"logs")&&_e(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function r3(n){let e;return{c(){e=H("Loading...")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function o3(n){let e,t,i,s,l,r,o=n[2]&&Xd();function a(c,d){return c[2]?r3:l3}let u=a(n),f=u(n);return{c(){e=_("div"),o&&o.c(),t=O(),i=_("canvas"),s=O(),l=_("div"),f.c(),p(i,"class","chart-canvas svelte-vh4sl8"),bf(i,"height","250px"),bf(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),Q(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(c,d){w(c,e,d),o&&o.m(e,null),m(e,t),m(e,i),n[8](i),w(c,s,d),w(c,l,d),f.m(l,null),r=!0},p(c,[d]){c[2]?o?d&4&&A(o,1):(o=Xd(),o.c(),A(o,1),o.m(e,t)):o&&(Oe(),F(o,1,1,()=>{o=null}),Te()),d&4&&Q(e,"loading",c[2]),u===(u=a(c))&&f?f.p(c,d):(f.d(1),f=u(c),f&&(f.c(),f.m(l,null)))},i(c){r||(A(o),r=!0)},o(c){F(o),r=!1},d(c){c&&k(e),o&&o.d(),n[8](null),c&&k(s),c&&k(l),f.d()}}}function a3(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,r,o=[],a=0,u=!1;async function f(){return t(2,u=!0),we.Logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let g of h)o.push({x:U.getDateTime(g.date).toLocal().toJSDate(),y:g.total}),t(1,a+=g.total);o.push({x:new Date,y:void 0})}).catch(h=>{h!==null&&(c(),console.warn(h),we.errorResponseHandler(h,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,o=[])}pi(()=>(bo.register(Ki,Lo,er,ff,nr,AC,jC),t(6,r=new bo(l,{type:"line",data:{datasets:[{label:"Total requests",data:o,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,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}}}})),()=>r==null?void 0:r.destroy()));function d(h){he[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!="undefined"||typeof s!="undefined")&&f(),n.$$.dirty&192&&typeof o!="undefined"&&r&&(t(6,r.data.datasets[0].data=o,r),r.update())},[l,a,u,i,s,f,r,o,d]}class u3 extends Fe{constructor(e){super(),Le(this,e,a3,o3,Ae,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var Qd=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Db={exports:{}};(function(n){var e=typeof window!="undefined"?window:typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope?self:{};/**
- * Prism: Lightweight, robust, elegant syntax highlighting
- *
- * @license MIT <https://opensource.org/licenses/MIT>
- * @author Lea Verou <https://lea.verou.me>
- * @namespace
- * @public
- */var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,r={},o={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function S($){return $ instanceof a?new a($.type,S($.content),$.alias):Array.isArray($)?$.map(S):$.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(S){return Object.prototype.toString.call(S).slice(8,-1)},objId:function(S){return S.__id||Object.defineProperty(S,"__id",{value:++l}),S.__id},clone:function S($,C){C=C||{};var M,T;switch(o.util.type($)){case"Object":if(T=o.util.objId($),C[T])return C[T];M={},C[T]=M;for(var E in $)$.hasOwnProperty(E)&&(M[E]=S($[E],C));return M;case"Array":return T=o.util.objId($),C[T]?C[T]:(M=[],C[T]=M,$.forEach(function(D,P){M[P]=S(D,C)}),M);default:return $}},getLanguage:function(S){for(;S;){var $=s.exec(S.className);if($)return $[1].toLowerCase();S=S.parentElement}return"none"},setLanguage:function(S,$){S.className=S.className.replace(RegExp(s,"gi"),""),S.classList.add("language-"+$)},currentScript:function(){if(typeof document=="undefined")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(S){var $=document.getElementsByTagName("script");for(var C in $)if($[C].src==S)return $[C]}return null}},isActive:function(S,$,C){for(var M="no-"+$;S;){var T=S.classList;if(T.contains($))return!0;if(T.contains(M))return!1;S=S.parentElement}return!!C}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(S,$){var C=o.util.clone(o.languages[S]);for(var M in $)C[M]=$[M];return C},insertBefore:function(S,$,C,M){M=M||o.languages;var T=M[S],E={};for(var D in T)if(T.hasOwnProperty(D)){if(D==$)for(var P in C)C.hasOwnProperty(P)&&(E[P]=C[P]);C.hasOwnProperty(D)||(E[D]=T[D])}var L=M[S];return M[S]=E,o.languages.DFS(o.languages,function(N,R){R===L&&N!=S&&(this[N]=E)}),E},DFS:function S($,C,M,T){T=T||{};var E=o.util.objId;for(var D in $)if($.hasOwnProperty(D)){C.call($,D,$[D],M||D);var P=$[D],L=o.util.type(P);L==="Object"&&!T[E(P)]?(T[E(P)]=!0,S(P,C,null,T)):L==="Array"&&!T[E(P)]&&(T[E(P)]=!0,S(P,C,D,T))}}},plugins:{},highlightAll:function(S,$){o.highlightAllUnder(document,S,$)},highlightAllUnder:function(S,$,C){var M={callback:C,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),o.hooks.run("before-all-elements-highlight",M);for(var T=0,E;E=M.elements[T++];)o.highlightElement(E,$===!0,M.callback)},highlightElement:function(S,$,C){var M=o.util.getLanguage(S),T=o.languages[M];o.util.setLanguage(S,M);var E=S.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(E,M);var D=S.textContent,P={element:S,language:M,grammar:T,code:D};function L(R){P.highlightedCode=R,o.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,o.hooks.run("after-highlight",P),o.hooks.run("complete",P),C&&C.call(P.element)}if(o.hooks.run("before-sanity-check",P),E=P.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!P.code){o.hooks.run("complete",P),C&&C.call(P.element);return}if(o.hooks.run("before-highlight",P),!P.grammar){L(o.util.encode(P.code));return}if($&&i.Worker){var N=new Worker(o.filename);N.onmessage=function(R){L(R.data)},N.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else L(o.highlight(P.code,P.grammar,P.language))},highlight:function(S,$,C){var M={code:S,grammar:$,language:C};if(o.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=o.tokenize(M.code,M.grammar),o.hooks.run("after-tokenize",M),a.stringify(o.util.encode(M.tokens),M.language)},tokenize:function(S,$){var C=$.rest;if(C){for(var M in C)$[M]=C[M];delete $.rest}var T=new c;return d(T,T.head,S),f(S,T,$,T.head,0),g(T)},hooks:{all:{},add:function(S,$){var C=o.hooks.all;C[S]=C[S]||[],C[S].push($)},run:function(S,$){var C=o.hooks.all[S];if(!(!C||!C.length))for(var M=0,T;T=C[M++];)T($)}},Token:a};i.Prism=o;function a(S,$,C,M){this.type=S,this.content=$,this.alias=C,this.length=(M||"").length|0}a.stringify=function S($,C){if(typeof $=="string")return $;if(Array.isArray($)){var M="";return $.forEach(function(L){M+=S(L,C)}),M}var T={type:$.type,content:S($.content,C),tag:"span",classes:["token",$.type],attributes:{},language:C},E=$.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(T.classes,E):T.classes.push(E)),o.hooks.run("wrap",T);var D="";for(var P in T.attributes)D+=" "+P+'="'+(T.attributes[P]||"").replace(/"/g,"&quot;")+'"';return"<"+T.tag+' class="'+T.classes.join(" ")+'"'+D+">"+T.content+"</"+T.tag+">"};function u(S,$,C,M){S.lastIndex=$;var T=S.exec(C);if(T&&M&&T[1]){var E=T[1].length;T.index+=E,T[0]=T[0].slice(E)}return T}function f(S,$,C,M,T,E){for(var D in C)if(!(!C.hasOwnProperty(D)||!C[D])){var P=C[D];P=Array.isArray(P)?P:[P];for(var L=0;L<P.length;++L){if(E&&E.cause==D+","+L)return;var N=P[L],R=N.inside,J=!!N.lookbehind,W=!!N.greedy,q=N.alias;if(W&&!N.pattern.global){var G=N.pattern.toString().match(/[imsuy]*$/)[0];N.pattern=RegExp(N.pattern.source,G+"g")}for(var K=N.pattern||N,Y=M.next,ne=T;Y!==$.tail&&!(E&&ne>=E.reach);ne+=Y.value.length,Y=Y.next){var fe=Y.value;if($.length>S.length)return;if(!(fe instanceof a)){var ye=1,se;if(W){if(se=u(K,ne,S,J),!se||se.index>=S.length)break;var be=se.index,Z=se.index+se[0].length,De=ne;for(De+=Y.value.length;be>=De;)Y=Y.next,De+=Y.value.length;if(De-=Y.value.length,ne=De,Y.value instanceof a)continue;for(var te=Y;te!==$.tail&&(De<Z||typeof te.value=="string");te=te.next)ye++,De+=te.value.length;ye--,fe=S.slice(ne,De),se.index-=ne}else if(se=u(K,0,fe,J),!se)continue;var be=se.index,ue=se[0],ie=fe.slice(0,be),ve=fe.slice(be+ue.length),He=ne+fe.length;E&&He>E.reach&&(E.reach=He);var Ie=Y.prev;ie&&(Ie=d($,Ie,ie),ne+=ie.length),h($,Ie,ye);var qe=new a(D,R?o.tokenize(ue,R):ue,q,ue);if(Y=d($,Ie,qe),ve&&d($,Y,ve),ye>1){var oe={cause:D+","+L,reach:He};f(S,$,C,Y.prev,ne,oe),E&&oe.reach>E.reach&&(E.reach=oe.reach)}}}}}}function c(){var S={value:null,prev:null,next:null},$={value:null,prev:S,next:null};S.next=$,this.head=S,this.tail=$,this.length=0}function d(S,$,C){var M=$.next,T={value:C,prev:$,next:M};return $.next=T,M.prev=T,S.length++,T}function h(S,$,C){for(var M=$.next,T=0;T<C&&M!==S.tail;T++)M=M.next;$.next=M,M.prev=$,S.length-=T}function g(S){for(var $=[],C=S.head.next;C!==S.tail;)$.push(C.value),C=C.next;return $}if(!i.document)return i.addEventListener&&(o.disableWorkerMessageHandler||i.addEventListener("message",function(S){var $=JSON.parse(S.data),C=$.language,M=$.code,T=$.immediateClose;i.postMessage(o.highlight(M,o.languages[C],C)),T&&i.close()},!1)),o;var y=o.util.currentScript();y&&(o.filename=y.src,y.hasAttribute("data-manual")&&(o.manual=!0));function b(){o.manual||o.highlightAll()}if(!o.manual){var v=document.readyState;v==="loading"||v==="interactive"&&y&&y.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return o}(e);n.exports&&(n.exports=t),typeof Qd!="undefined"&&(Qd.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\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:/<!\[CDATA\[[\s\S]*?\]\]>/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"},/"|'/]}},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(/&amp;/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var r={};r["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[l]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:o},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:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,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=="undefined"||typeof document=="undefined")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading\u2026",s=function(y,b){return"\u2716 Error "+y+" while fetching file: "+b},l="\u2716 Error: File does not exist or is empty",r={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",a="loading",u="loaded",f="failed",c="pre[data-src]:not(["+o+'="'+u+'"]):not(['+o+'="'+a+'"])';function d(y,b,v){var S=new XMLHttpRequest;S.open("GET",y,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?b(S.responseText):S.status>=400?v(s(S.status,S.statusText)):v(l))},S.send(null)}function h(y){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(y||"");if(b){var v=Number(b[1]),S=b[2],$=b[3];return S?$?[v,Number($)]:[v,void 0]:[v,v]}}t.hooks.add("before-highlightall",function(y){y.selector+=", "+c}),t.hooks.add("before-sanity-check",function(y){var b=y.element;if(b.matches(c)){y.code="",b.setAttribute(o,a);var v=b.appendChild(document.createElement("CODE"));v.textContent=i;var S=b.getAttribute("data-src"),$=y.language;if($==="none"){var C=(/\.(\w+)$/.exec(S)||[,"none"])[1];$=r[C]||C}t.util.setLanguage(v,$),t.util.setLanguage(b,$);var M=t.plugins.autoloader;M&&M.loadLanguages($),d(S,function(T){b.setAttribute(o,u);var E=h(b.getAttribute("data-range"));if(E){var D=T.split(/\r\n?|\n/g),P=E[0],L=E[1]==null?D.length:E[1];P<0&&(P+=D.length),P=Math.max(0,Math.min(P-1,D.length)),L<0&&(L+=D.length),L=Math.max(0,Math.min(L,D.length)),T=D.slice(P,L).join(`
-`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(P+1))}v.textContent=T,t.highlightElement(v)},function(T){b.setAttribute(o,f),v.textContent=T})}}),t.plugins.fileHighlight={highlight:function(b){for(var v=(b||document).querySelectorAll(c),S=0,$;$=v[S++];)t.highlightElement($)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Db);var gl=Db.exports,f3={exports:{}};(function(n){(function(){if(typeof Prism=="undefined")return;var e=Object.assign||function(l,r){for(var o in r)r.hasOwnProperty(o)&&(l[o]=r[o]);return l};function t(l){this.defaults=e({},l)}function i(l){return l.replace(/-(\w)/g,function(r,o){return o.toUpperCase()})}function s(l){for(var r=0,o=0;o<l.length;++o)l.charCodeAt(o)=="	".charCodeAt(0)&&(r+=3);return l.length+r}t.prototype={setDefaults:function(l){this.defaults=e(this.defaults,l)},normalize:function(l,r){r=e(this.defaults,r);for(var o in r){var a=i(o);o!=="normalize"&&a!=="setDefaults"&&r[o]&&this[a]&&(l=this[a].call(this,l,r[o]))}return l},leftTrim:function(l){return l.replace(/^\s+/,"")},rightTrim:function(l){return l.replace(/\s+$/,"")},tabsToSpaces:function(l,r){return r=r|0||4,l.replace(/\t/g,new Array(++r).join(" "))},spacesToTabs:function(l,r){return r=r|0||4,l.replace(RegExp(" {"+r+"}","g"),"	")},removeTrailing:function(l){return l.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(l){return l.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(l){var r=l.match(/^[^\S\n\r]*(?=\S)/gm);return!r||!r[0].length||(r.sort(function(o,a){return o.length-a.length}),!r[0].length)?l:l.replace(RegExp("^"+r[0],"gm"),"")},indent:function(l,r){return l.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++r).join("	")+"$&")},breakLines:function(l,r){r=r===!0?80:r|0||80;for(var o=l.split(`
-`),a=0;a<o.length;++a)if(!(s(o[a])<=r)){for(var u=o[a].split(/(\s+)/g),f=0,c=0;c<u.length;++c){var d=s(u[c]);f+=d,f>r&&(u[c]=`
-`+u[c],f=d)}o[a]=u.join("")}return o.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(l){var r=Prism.plugins.NormalizeWhitespace;if(!(l.settings&&l.settings["whitespace-normalization"]===!1)&&!!Prism.util.isActive(l.element,"whitespace-normalization",!0)){if((!l.element||!l.element.parentNode)&&l.code){l.code=r.normalize(l.code,l.settings);return}var o=l.element.parentNode;if(!(!l.code||!o||o.nodeName.toLowerCase()!=="pre")){for(var a=o.childNodes,u="",f="",c=!1,d=0;d<a.length;++d){var h=a[d];h==l.element?c=!0:h.nodeName==="#text"&&(c?f+=h.nodeValue:u+=h.nodeValue,o.removeChild(h),--d)}if(!l.element.children.length||!Prism.plugins.KeepMarkup)l.code=u+l.code+f,l.code=r.normalize(l.code,l.settings);else{var g=u+l.element.innerHTML+f;l.element.innerHTML=r.normalize(g,l.settings),l.code=l.element.textContent}}}})})()})(f3);function c3(n){let e,t;return{c(){e=_("div"),t=_("code"),p(t,"class","svelte-tv7jme"),p(e,"class","code-wrapper prism-light svelte-tv7jme")},m(i,s){w(i,e,s),m(e,t),t.innerHTML=n[0]},p(i,[s]){s&1&&(t.innerHTML=i[0])},i:re,o:re,d(i){i&&k(e)}}}function d3(n,e,t){let{content:i=""}=e,{language:s="javascript"}=e,l="";function r(o){return o=typeof o=="string"?o:"",o=gl.plugins.NormalizeWhitespace.normalize(o,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),gl.highlight(o,gl.languages[s]||gl.languages.javascript,s)}return n.$$set=o=>{"content"in o&&t(1,i=o.content),"language"in o&&t(2,s=o.language)},n.$$.update=()=>{n.$$.dirty&2&&typeof gl!="undefined"&&i&&t(0,l=r(i))},[l,i,s]}class en extends Fe{constructor(e){super(),Le(this,e,d3,c3,Ae,{content:1,language:2})}}const p3=n=>({}),ep=n=>({}),h3=n=>({}),tp=n=>({});function np(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$=n[4]&&!n[2]&&ip(n);const C=n[18].header,M=Tn(C,n,n[17],tp);let T=n[4]&&n[2]&&sp(n);const E=n[18].default,D=Tn(E,n,n[17],null),P=n[18].footer,L=Tn(P,n,n[17],ep);return{c(){e=_("div"),t=_("div"),s=O(),l=_("div"),r=_("div"),$&&$.c(),o=O(),M&&M.c(),a=O(),T&&T.c(),u=O(),f=_("div"),D&&D.c(),c=O(),d=_("div"),L&&L.c(),p(t,"class","overlay"),p(r,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",h="overlay-panel "+n[1]+" "+n[8]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(N,R){w(N,e,R),m(e,t),m(e,s),m(e,l),m(l,r),$&&$.m(r,null),m(r,o),M&&M.m(r,null),m(r,a),T&&T.m(r,null),m(l,u),m(l,f),D&&D.m(f,null),n[20](f),m(l,c),m(l,d),L&&L.m(d,null),b=!0,v||(S=[X(t,"click",Kt(n[19])),X(f,"scroll",n[21])],v=!0)},p(N,R){n=N,n[4]&&!n[2]?$?$.p(n,R):($=ip(n),$.c(),$.m(r,o)):$&&($.d(1),$=null),M&&M.p&&(!b||R&131072)&&An(M,C,n,n[17],b?Dn(C,n[17],R,h3):En(n[17]),tp),n[4]&&n[2]?T?T.p(n,R):(T=sp(n),T.c(),T.m(r,null)):T&&(T.d(1),T=null),D&&D.p&&(!b||R&131072)&&An(D,E,n,n[17],b?Dn(E,n[17],R,null):En(n[17]),null),L&&L.p&&(!b||R&131072)&&An(L,P,n,n[17],b?Dn(P,n[17],R,p3):En(n[17]),ep),(!b||R&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),R&262&&Q(l,"popup",n[2]),R&4&&Q(e,"padded",n[2]),R&1&&Q(e,"active",n[0])},i(N){b||(Dt(()=>{i||(i=ft(t,ro,{duration:Ps,opacity:0},!0)),i.run(1)}),A(M,N),A(D,N),A(L,N),Dt(()=>{y&&y.end(1),g=vu(l,ni,n[2]?{duration:Ps,y:-10}:{duration:Ps,x:50}),g.start()}),b=!0)},o(N){i||(i=ft(t,ro,{duration:Ps,opacity:0},!1)),i.run(0),F(M,N),F(D,N),F(L,N),g&&g.invalidate(),y=Zg(l,ni,n[2]?{duration:Ps,y:10}:{duration:Ps,x:50}),b=!1},d(N){N&&k(e),N&&i&&i.end(),$&&$.d(),M&&M.d(N),T&&T.d(),D&&D.d(N),n[20](null),L&&L.d(N),N&&y&&y.end(),v=!1,rt(S)}}}function ip(n){let e,t,i;return{c(){e=_("div"),e.innerHTML='<i class="ri-close-line"></i>',p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=X(e,"click",Kt(n[5])),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function sp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<i class="ri-close-line txt-lg"></i>',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-secondary btn-close m-l-auto")},m(s,l){w(s,e,l),t||(i=X(e,"click",Kt(n[5])),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function m3(n){let e,t,i,s,l=n[0]&&np(n);return{c(){e=_("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper")},m(r,o){w(r,e,o),l&&l.m(e,null),n[22](e),t=!0,i||(s=[X(window,"resize",n[10]),X(window,"keydown",n[9])],i=!0)},p(r,[o]){r[0]?l?(l.p(r,o),o&1&&A(l,1)):(l=np(r),l.c(),A(l,1),l.m(e,null)):l&&(Oe(),F(l,1,1,()=>{l=null}),Te())},i(r){t||(A(l),t=!0)},o(r){F(l),t=!1},d(r){r&&k(e),l&&l.d(),n[22](null),i=!1,rt(s)}}}let ns;function Ab(){return ns=ns||document.querySelector(".overlays"),ns||(ns=document.createElement("div"),ns.classList.add("overlays"),document.body.appendChild(ns)),ns}let Ps=150;function lp(){return 1e3+Ab().querySelectorAll(".overlay-panel-container.active").length}function g3(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:r=!1}=e,{popup:o=!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=_n();let g,y,b,v,S="";function $(){typeof c=="function"&&c()===!1||t(0,r=!0)}function C(){typeof d=="function"&&d()===!1||t(0,r=!1)}function M(){return r}async function T(q){q?(b=document.activeElement,g==null||g.focus(),h("show")):(clearTimeout(v),b==null||b.focus(),h("hide")),await Mi(),E()}function E(){!g||(r?t(6,g.style.zIndex=lp(),g):t(6,g.style="",g))}function D(q){r&&f&&q.code=="Escape"&&!U.isInput(q.target)&&g&&g.style.zIndex==lp()&&(q.preventDefault(),C())}function P(q){r&&L(y)}function L(q,G){G&&t(8,S=""),q&&(v||(v=setTimeout(()=>{if(clearTimeout(v),v=null,!q)return;if(q.scrollHeight-q.offsetHeight>0)t(8,S="scrollable");else{t(8,S="");return}q.scrollTop==0?t(8,S+=" scroll-top-reached"):q.scrollTop+q.offsetHeight==q.scrollHeight&&t(8,S+=" scroll-bottom-reached")},100)))}pi(()=>(Ab().appendChild(g),()=>{var q;clearTimeout(v),(q=g==null?void 0:g.classList)==null||q.add("hidden")}));const N=()=>a?C():!0;function R(q){he[q?"unshift":"push"](()=>{y=q,t(7,y)})}const J=q=>L(q.target);function W(q){he[q?"unshift":"push"](()=>{g=q,t(6,g)})}return n.$$set=q=>{"class"in q&&t(1,l=q.class),"active"in q&&t(0,r=q.active),"popup"in q&&t(2,o=q.popup),"overlayClose"in q&&t(3,a=q.overlayClose),"btnClose"in q&&t(4,u=q.btnClose),"escClose"in q&&t(12,f=q.escClose),"beforeOpen"in q&&t(13,c=q.beforeOpen),"beforeHide"in q&&t(14,d=q.beforeHide),"$$scope"in q&&t(17,s=q.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&T(r),n.$$.dirty&128&&L(y,!0),n.$$.dirty&64&&g&&E()},[r,l,o,a,u,C,g,y,S,D,P,L,f,c,d,$,M,s,i,N,R,J,W]}class Di extends Fe{constructor(e){super(),Le(this,e,g3,m3,Ae,{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 _3(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function b3(n){let e,t=n[2].referer+"",i,s;return{c(){e=_("a"),i=H(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,r){w(l,e,r),m(e,i)},p(l,r){r&4&&t!==(t=l[2].referer+"")&&_e(i,t),r&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&k(e)}}}function y3(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function v3(n){let e,t;return e=new en({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){B(e.$$.fragment)},m(i,s){V(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||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function k3(n){var ii;let e,t,i,s,l,r,o=n[2].id+"",a,u,f,c,d,h,g,y=n[2].status+"",b,v,S,$,C,M,T=((ii=n[2].method)==null?void 0:ii.toUpperCase())+"",E,D,P,L,N,R,J=n[2].auth+"",W,q,G,K,Y,ne,fe=n[2].url+"",ye,se,Z,De,te,be,ue,ie,ve,He,Ie,qe=n[2].ip+"",oe,le,ke,Ve,ze,Ze,ge=n[2].userAgent+"",Ee,x,ae,Be,vt,it,gt,at,yt,zt,Mt,Ot,me,Ce,Ke,st;function fn(pe,I){return pe[2].referer?b3:_3}let ce=fn(n),Se=ce(n);const xe=[v3,y3],Gt=[];function qt(pe,I){return I&4&&(gt=null),gt==null&&(gt=!U.isEmpty(pe[2].meta)),gt?0:1}return at=qt(n,-1),yt=Gt[at]=xe[at](n),Ke=new $i({props:{date:n[2].created}}),{c(){e=_("table"),t=_("tbody"),i=_("tr"),s=_("td"),s.textContent="ID",l=O(),r=_("td"),a=H(o),u=O(),f=_("tr"),c=_("td"),c.textContent="Status",d=O(),h=_("td"),g=_("span"),b=H(y),v=O(),S=_("tr"),$=_("td"),$.textContent="Method",C=O(),M=_("td"),E=H(T),D=O(),P=_("tr"),L=_("td"),L.textContent="Auth",N=O(),R=_("td"),W=H(J),q=O(),G=_("tr"),K=_("td"),K.textContent="URL",Y=O(),ne=_("td"),ye=H(fe),se=O(),Z=_("tr"),De=_("td"),De.textContent="Referer",te=O(),be=_("td"),Se.c(),ue=O(),ie=_("tr"),ve=_("td"),ve.textContent="IP",He=O(),Ie=_("td"),oe=H(qe),le=O(),ke=_("tr"),Ve=_("td"),Ve.textContent="UserAgent",ze=O(),Ze=_("td"),Ee=H(ge),x=O(),ae=_("tr"),Be=_("td"),Be.textContent="Meta",vt=O(),it=_("td"),yt.c(),zt=O(),Mt=_("tr"),Ot=_("td"),Ot.textContent="Created",me=O(),Ce=_("td"),B(Ke.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(g,"class","label"),Q(g,"label-danger",n[2].status>=400),p($,"class","min-width txt-hint txt-bold"),p(L,"class","min-width txt-hint txt-bold"),p(K,"class","min-width txt-hint txt-bold"),p(De,"class","min-width txt-hint txt-bold"),p(ve,"class","min-width txt-hint txt-bold"),p(Ve,"class","min-width txt-hint txt-bold"),p(Be,"class","min-width txt-hint txt-bold"),p(Ot,"class","min-width txt-hint txt-bold"),p(e,"class","table-compact table-border")},m(pe,I){w(pe,e,I),m(e,t),m(t,i),m(i,s),m(i,l),m(i,r),m(r,a),m(t,u),m(t,f),m(f,c),m(f,d),m(f,h),m(h,g),m(g,b),m(t,v),m(t,S),m(S,$),m(S,C),m(S,M),m(M,E),m(t,D),m(t,P),m(P,L),m(P,N),m(P,R),m(R,W),m(t,q),m(t,G),m(G,K),m(G,Y),m(G,ne),m(ne,ye),m(t,se),m(t,Z),m(Z,De),m(Z,te),m(Z,be),Se.m(be,null),m(t,ue),m(t,ie),m(ie,ve),m(ie,He),m(ie,Ie),m(Ie,oe),m(t,le),m(t,ke),m(ke,Ve),m(ke,ze),m(ke,Ze),m(Ze,Ee),m(t,x),m(t,ae),m(ae,Be),m(ae,vt),m(ae,it),Gt[at].m(it,null),m(t,zt),m(t,Mt),m(Mt,Ot),m(Mt,me),m(Mt,Ce),V(Ke,Ce,null),st=!0},p(pe,I){var de;(!st||I&4)&&o!==(o=pe[2].id+"")&&_e(a,o),(!st||I&4)&&y!==(y=pe[2].status+"")&&_e(b,y),I&4&&Q(g,"label-danger",pe[2].status>=400),(!st||I&4)&&T!==(T=((de=pe[2].method)==null?void 0:de.toUpperCase())+"")&&_e(E,T),(!st||I&4)&&J!==(J=pe[2].auth+"")&&_e(W,J),(!st||I&4)&&fe!==(fe=pe[2].url+"")&&_e(ye,fe),ce===(ce=fn(pe))&&Se?Se.p(pe,I):(Se.d(1),Se=ce(pe),Se&&(Se.c(),Se.m(be,null))),(!st||I&4)&&qe!==(qe=pe[2].ip+"")&&_e(oe,qe),(!st||I&4)&&ge!==(ge=pe[2].userAgent+"")&&_e(Ee,ge);let j=at;at=qt(pe,I),at===j?Gt[at].p(pe,I):(Oe(),F(Gt[j],1,1,()=>{Gt[j]=null}),Te(),yt=Gt[at],yt?yt.p(pe,I):(yt=Gt[at]=xe[at](pe),yt.c()),A(yt,1),yt.m(it,null));const ee={};I&4&&(ee.date=pe[2].created),Ke.$set(ee)},i(pe){st||(A(yt),A(Ke.$$.fragment,pe),st=!0)},o(pe){F(yt),F(Ke.$$.fragment,pe),st=!1},d(pe){pe&&k(e),Se.d(),Gt[at].d(),z(Ke)}}}function w3(n){let e;return{c(){e=_("h4"),e.textContent="Request log"},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function S3(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Close</span>',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[4]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function $3(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[S3],header:[w3],default:[k3]},$$scope:{ctx:n}};return e=new Di({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&260&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[5](null),z(e,s)}}}function C3(n,e,t){let i,s=new za;function l(c){return t(2,s=c),i==null?void 0:i.show()}function r(){return i==null?void 0:i.hide()}const o=()=>r();function a(c){he[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){ut.call(this,n,c)}function f(c){ut.call(this,n,c)}return[r,i,s,l,o,a,u,f]}class M3 extends Fe{constructor(e){super(),Le(this,e,C3,$3,Ae,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function O3(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",r=n[12])},m(u,f){w(u,e,f),e.checked=n[0],w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[6]),o=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0]),f&4096&&r!==(r=u[12])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function rp(n){let e,t,i;function s(r){n[8](r)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new u3({props:l}),he.push(()=>Re(e,"filter",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o&16&&(a.presets=r[4]),!t&&o&4&&(t=!0,a.filter=r[2],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function op(n){let e,t,i;function s(r){n[9](r)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new O2({props:l}),he.push(()=>Re(e,"filter",s)),e.$on("select",n[10]),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o&16&&(a.presets=r[4]),!t&&o&4&&(t=!0,a.filter=r[2],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function T3(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v=n[3],S,$=n[3],C,M,T,E,D;c=new Ne({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[O3,({uniqueId:R})=>({12:R}),({uniqueId:R})=>R?4096:0]},$$scope:{ctx:n}}}),h=new Ao({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","ip","referer","status","auth","userAgent"]}}),h.$on("submit",n[7]);let P=rp(n),L=op(n),N={};return M=new M3({props:N}),n[11](M),{c(){e=_("main"),t=_("div"),i=_("header"),s=_("nav"),s.innerHTML='<div class="breadcrumb-item">Request logs</div>',l=O(),r=_("button"),r.innerHTML='<i class="ri-refresh-line"></i>',o=O(),a=_("div"),u=O(),f=_("div"),B(c.$$.fragment),d=O(),B(h.$$.fragment),g=O(),y=_("div"),b=O(),P.c(),S=O(),L.c(),C=O(),B(M.$$.fragment),p(s,"class","breadcrumbs"),p(r,"type","button"),p(r,"class","btn btn-circle btn-secondary"),p(a,"class","flex-fill"),p(f,"class","inline-flex"),p(i,"class","page-header"),p(y,"class","clearfix m-b-xs"),p(t,"class","page-header-wrapper m-b-0"),p(e,"class","page-wrapper")},m(R,J){w(R,e,J),m(e,t),m(t,i),m(i,s),m(i,l),m(i,r),m(i,o),m(i,a),m(i,u),m(i,f),V(c,f,null),m(t,d),V(h,t,null),m(t,g),m(t,y),m(t,b),P.m(t,null),m(e,S),L.m(e,null),w(R,C,J),V(M,R,J),T=!0,E||(D=[Xe(St.call(null,r,{text:"Refresh",position:"right"})),X(r,"click",n[5])],E=!0)},p(R,[J]){const W={};J&12289&&(W.$$scope={dirty:J,ctx:R}),c.$set(W);const q={};J&4&&(q.value=R[2]),h.$set(q),J&8&&Ae(v,v=R[3])?(Oe(),F(P,1,1,re),Te(),P=rp(R),P.c(),A(P,1),P.m(t,null)):P.p(R,J),J&8&&Ae($,$=R[3])?(Oe(),F(L,1,1,re),Te(),L=op(R),L.c(),A(L,1),L.m(e,null)):L.p(R,J);const G={};M.$set(G)},i(R){T||(A(c.$$.fragment,R),A(h.$$.fragment,R),A(P),A(L),A(M.$$.fragment,R),T=!0)},o(R){F(c.$$.fragment,R),F(h.$$.fragment,R),F(P),F(L),F(M.$$.fragment,R),T=!1},d(R){R&&k(e),z(c),z(h),P.d(R),L.d(R),R&&k(C),n[11](null),z(M,R),E=!1,rt(D)}}}const ap="includeAdminLogs";function D3(n,e,t){var y;let i,s,l="",r=((y=window.localStorage)==null?void 0:y.getItem(ap))<<0,o=1;function a(){t(3,o++,o)}U.setDocumentTitle("Request logs");function u(){r=this.checked,t(0,r)}const f=b=>t(2,l=b.detail);function c(b){l=b,t(2,l)}function d(b){l=b,t(2,l)}const h=b=>s==null?void 0:s.show(b==null?void 0:b.detail);function g(b){he[b?"unshift":"push"](()=>{s=b,t(1,s)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r!="undefined"&&window.localStorage&&window.localStorage.setItem(ap,r<<0)},[r,s,l,o,i,a,u,f,c,d,h,g]}class A3 extends Fe{constructor(e){super(),Le(this,e,D3,T3,Ae,{})}}const Js=Oi([]),fi=Oi({}),pu=Oi(!1);function E3(n){fi.update(e=>U.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),Js.update(e=>(U.pushOrReplaceByKey(e,n,"id"),e))}function P3(n){Js.update(e=>(U.removeByKey(e,"id",n.id),fi.update(t=>t.id===n.id?e.find(i=>i.name!="profiles")||{}:t),e))}async function L3(n=null){return pu.set(!0),fi.set({}),Js.set([]),we.Collections.getFullList(200,{sort:"+created"}).then(e=>{Js.set(e);const t=n&&U.findByKey(e,"id",n);if(t)fi.set(t);else if(e.length){const i=e.find(s=>s.name!="profiles");i&&fi.set(i)}}).catch(e=>{we.errorResponseHandler(e)}).finally(()=>{pu.set(!1)})}const cf=Oi({});function Ci(n,e,t){cf.set({text:n,yesCallback:e,noCallback:t})}function Eb(){cf.set({})}function up(n){let e,t,i,s;const l=n[13].default,r=Tn(l,n,n[12],null);return{c(){e=_("div"),r&&r.c(),p(e,"class",n[1]),Q(e,"active",n[0])},m(o,a){w(o,e,a),r&&r.m(e,null),s=!0},p(o,a){r&&r.p&&(!s||a&4096)&&An(r,l,o,o[12],s?Dn(l,o[12],a,null):En(o[12]),null),(!s||a&2)&&p(e,"class",o[1]),a&3&&Q(e,"active",o[0])},i(o){s||(A(r,o),o&&Dt(()=>{i&&i.end(1),t=vu(e,ni,{duration:150,y:-5}),t.start()}),s=!0)},o(o){F(r,o),t&&t.invalidate(),o&&(i=Zg(e,ni,{duration:150,y:2})),s=!1},d(o){o&&k(e),r&&r.d(o),o&&i&&i.end()}}}function F3(n){let e,t,i,s,l=n[0]&&up(n);return{c(){e=_("div"),l&&l.c(),p(e,"class","toggler-container")},m(r,o){w(r,e,o),l&&l.m(e,null),n[14](e),t=!0,i||(s=[X(window,"click",n[3]),X(window,"keydown",n[4]),X(window,"focusin",n[5])],i=!0)},p(r,[o]){r[0]?l?(l.p(r,o),o&1&&A(l,1)):(l=up(r),l.c(),A(l,1),l.m(e,null)):l&&(Oe(),F(l,1,1,()=>{l=null}),Te())},i(r){t||(A(l),t=!0)},o(r){F(l),t=!1},d(r){r&&k(e),l&&l.d(),n[14](null),i=!1,rt(s)}}}function I3(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:r=!1}=e,{escClose:o=!0}=e,{closableClass:a="closable"}=e,{class:u=""}=e,f;const c=_n();function d(){t(0,r=!1)}function h(){t(0,r=!0)}function g(){r?d():h()}function y(T){return!f||T.classList.contains(a)||(l==null?void 0:l.contains(T))&&!f.contains(T)||f.contains(T)&&T.closest&&T.closest("."+a)}function b(T){(!r||y(T.target))&&(T.preventDefault(),g())}function v(T){(T.code==="Enter"||T.code==="Space")&&(!r||y(T.target))&&(T.preventDefault(),T.stopPropagation(),g())}function S(T){r&&!(f!=null&&f.contains(T.target))&&!(l!=null&&l.contains(T.target))&&d()}function $(T){r&&o&&T.code=="Escape"&&(T.preventDefault(),d())}function C(T){return S(T)}pi(()=>(t(6,l=l||f.parentNode),l.addEventListener("click",b),l.addEventListener("keydown",v),()=>{l.removeEventListener("click",b),l.removeEventListener("keydown",v)}));function M(T){he[T?"unshift":"push"](()=>{f=T,t(2,f)})}return n.$$set=T=>{"trigger"in T&&t(6,l=T.trigger),"active"in T&&t(0,r=T.active),"escClose"in T&&t(7,o=T.escClose),"closableClass"in T&&t(8,a=T.closableClass),"class"in T&&t(1,u=T.class),"$$scope"in T&&t(12,s=T.$$scope)},n.$$.update=()=>{var T,E;n.$$.dirty&65&&(r?((T=l==null?void 0:l.classList)==null||T.add("active"),c("show")):((E=l==null?void 0:l.classList)==null||E.remove("active"),c("hide")))},[r,u,f,S,$,C,l,o,a,d,h,g,s,i,M]}class ys extends Fe{constructor(e){super(),Le(this,e,I3,F3,Ae,{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 N3=n=>({active:n&1}),fp=n=>({active:n[0]});function cp(n){let e,t,i;const s=n[12].default,l=Tn(s,n,n[11],null);return{c(){e=_("div"),l&&l.c(),p(e,"class","accordion-content")},m(r,o){w(r,e,o),l&&l.m(e,null),i=!0},p(r,o){l&&l.p&&(!i||o&2048)&&An(l,s,r,r[11],i?Dn(s,r[11],o,null):En(r[11]),null)},i(r){i||(A(l,r),r&&Dt(()=>{t||(t=ft(e,un,{duration:150},!0)),t.run(1)}),i=!0)},o(r){F(l,r),r&&(t||(t=ft(e,un,{duration:150},!1)),t.run(0)),i=!1},d(r){r&&k(e),l&&l.d(r),r&&t&&t.end()}}}function R3(n){let e,t,i,s,l,r,o,a;const u=n[12].header,f=Tn(u,n,n[11],fp);let c=n[0]&&cp(n);return{c(){e=_("div"),t=_("header"),f&&f.c(),i=O(),c&&c.c(),p(t,"class","accordion-header"),Q(t,"interactive",n[2]),p(e,"tabindex",s=n[2]?0:-1),p(e,"class",l="accordion "+n[1]),Q(e,"active",n[0])},m(d,h){w(d,e,h),m(e,t),f&&f.m(t,null),m(e,i),c&&c.m(e,null),n[14](e),r=!0,o||(a=[X(t,"click",Kt(n[13])),X(e,"keydown",Ug(n[5]))],o=!0)},p(d,[h]){f&&f.p&&(!r||h&2049)&&An(f,u,d,d[11],r?Dn(u,d[11],h,N3):En(d[11]),fp),h&4&&Q(t,"interactive",d[2]),d[0]?c?(c.p(d,h),h&1&&A(c,1)):(c=cp(d),c.c(),A(c,1),c.m(e,null)):c&&(Oe(),F(c,1,1,()=>{c=null}),Te()),(!r||h&4&&s!==(s=d[2]?0:-1))&&p(e,"tabindex",s),(!r||h&2&&l!==(l="accordion "+d[1]))&&p(e,"class",l),h&3&&Q(e,"active",d[0])},i(d){r||(A(f,d),A(c),r=!0)},o(d){F(f,d),F(c),r=!1},d(d){d&&k(e),f&&f.d(d),c&&c.d(),n[14](null),o=!1,rt(a)}}}function j3(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=_n();let r,o,{class:a=""}=e,{active:u=!1}=e,{interactive:f=!0}=e,{single:c=!1}=e;function d(){y(),t(0,u=!0),l("expand")}function h(){t(0,u=!1),clearTimeout(o),l("collapse")}function g(){l("toggle"),u?h():d()}function y(){if(c&&r.parentElement){const $=r.parentElement.querySelectorAll(".accordion.active .accordion-header.interactive");for(const C of $)C.click()}}function b($){!f||($.code==="Enter"||$.code==="Space")&&($.preventDefault(),g())}pi(()=>()=>clearTimeout(o));const v=()=>f&&g();function S($){he[$?"unshift":"push"](()=>{r=$,t(4,r)})}return n.$$set=$=>{"class"in $&&t(1,a=$.class),"active"in $&&t(0,u=$.active),"interactive"in $&&t(2,f=$.interactive),"single"in $&&t(6,c=$.single),"$$scope"in $&&t(11,s=$.$$scope)},n.$$.update=()=>{n.$$.dirty&1041&&u&&(clearTimeout(o),t(10,o=setTimeout(()=>{r!=null&&r.scrollIntoView&&r.scrollIntoView({behavior:"smooth",block:"nearest"})},250)))},[u,a,f,g,r,b,c,d,h,y,o,s,i,v,S]}class df extends Fe{constructor(e){super(),Le(this,e,j3,R3,Ae,{class:1,active:0,interactive:2,single:6,expand:7,collapse:8,toggle:3,collapseSiblings:9})}get expand(){return this.$$.ctx[7]}get collapse(){return this.$$.ctx[8]}get toggle(){return this.$$.ctx[3]}get collapseSiblings(){return this.$$.ctx[9]}}const H3=n=>({}),dp=n=>({});function pp(n,e,t){const i=n.slice();return i[46]=e[t],i}function hp(n,e,t){const i=n.slice();return i[49]=e[t],i}const q3=n=>({}),mp=n=>({});function gp(n,e,t){const i=n.slice();return i[49]=e[t],i}function _p(n){let e,t;return{c(){e=_("div"),t=H(n[2]),p(e,"class","txt-placeholder")},m(i,s){w(i,e,s),m(e,t)},p(i,s){s[0]&4&&_e(t,i[2])},d(i){i&&k(e)}}}function V3(n){let e,t=n[49]+"",i;return{c(){e=_("span"),i=H(t),p(e,"class","txt")},m(s,l){w(s,e,l),m(e,i)},p(s,l){l[0]&1&&t!==(t=s[49]+"")&&_e(i,t)},i:re,o:re,d(s){s&&k(e)}}}function z3(n){let e,t,i;const s=[{item:n[49]},n[8]];var l=n[7];function r(o){let a={};for(let u=0;u<s.length;u+=1)a=ct(a,s[u]);return{props:a}}return l&&(e=new l(r())),{c(){e&&B(e.$$.fragment),t=lt()},m(o,a){e&&V(e,o,a),w(o,t,a),i=!0},p(o,a){const u=a[0]&257?bn(s,[a[0]&1&&{item:o[49]},a[0]&256&&hi(o[8])]):{};if(l!==(l=o[7])){if(e){Oe();const f=e;F(f.$$.fragment,1,0,()=>{z(f,1)}),Te()}l?(e=new l(r()),B(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&F(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&z(e,o)}}}function bp(n){let e,t,i;function s(){return n[34](n[49])}return{c(){e=_("span"),e.innerHTML='<i class="ri-close-line"></i>',p(e,"class","clear")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Clear")),X(e,"click",Un(Kt(s)))],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,rt(i)}}}function yp(n){let e,t,i,s,l,r;const o=[z3,V3],a=[];function u(c,d){return c[7]?0:1}t=u(n),i=a[t]=o[t](n);let f=(n[4]||n[6])&&bp(n);return{c(){e=_("div"),i.c(),s=O(),f&&f.c(),l=O(),p(e,"class","option")},m(c,d){w(c,e,d),a[t].m(e,null),m(e,s),f&&f.m(e,null),m(e,l),r=!0},p(c,d){let h=t;t=u(c),t===h?a[t].p(c,d):(Oe(),F(a[h],1,1,()=>{a[h]=null}),Te(),i=a[t],i?i.p(c,d):(i=a[t]=o[t](c),i.c()),A(i,1),i.m(e,s)),c[4]||c[6]?f?f.p(c,d):(f=bp(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){r||(A(i),r=!0)},o(c){F(i),r=!1},d(c){c&&k(e),a[t].d(),f&&f.d()}}}function vp(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[17],$$slots:{default:[W3]},$$scope:{ctx:n}};return e=new ys({props:i}),n[39](e),e.$on("show",n[23]),e.$on("hide",n[40]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&131072&&(r.trigger=s[17]),l[0]&806410|l[1]&2048&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[39](null),z(e,s)}}}function kp(n){let e,t,i,s,l,r,o,a,u=n[14].length&&wp(n);return{c(){e=_("div"),t=_("label"),i=_("div"),i.innerHTML='<i class="ri-search-line"></i>',s=O(),l=_("input"),r=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){w(f,e,c),m(e,t),m(t,i),m(t,s),m(t,l),$e(l,n[14]),m(t,r),u&&u.m(t,null),l.focus(),o||(a=X(l,"input",n[36]),o=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&16384&&l.value!==f[14]&&$e(l,f[14]),f[14].length?u?u.p(f,c):(u=wp(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&k(e),u&&u.d(),o=!1,a()}}}function wp(n){let e,t,i,s;return{c(){e=_("div"),t=_("button"),t.innerHTML='<i class="ri-close-line"></i>',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,r){w(l,e,r),m(e,t),i||(s=X(t,"click",Un(Kt(n[20]))),i=!0)},p:re,d(l){l&&k(e),i=!1,s()}}}function Sp(n){let e,t=n[1]&&$p(n);return{c(){t&&t.c(),e=lt()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=$p(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function $p(n){let e,t;return{c(){e=_("div"),t=H(n[1]),p(e,"class","txt-missing")},m(i,s){w(i,e,s),m(e,t)},p(i,s){s[0]&2&&_e(t,i[1])},d(i){i&&k(e)}}}function Cp(n){let e,t=n[46].group+"",i;return{c(){e=_("div"),i=H(t),p(e,"class","dropdown-item separator")},m(s,l){w(s,e,l),m(e,i)},p(s,l){l[0]&524288&&t!==(t=s[46].group+"")&&_e(i,t)},d(s){s&&k(e)}}}function B3(n){let e=n[49]+"",t;return{c(){t=H(e)},m(i,s){w(i,t,s)},p(i,s){s[0]&524288&&e!==(e=i[49]+"")&&_e(t,e)},i:re,o:re,d(i){i&&k(t)}}}function U3(n){let e,t,i;const s=[{item:n[49]},n[10]];var l=n[9];function r(o){let a={};for(let u=0;u<s.length;u+=1)a=ct(a,s[u]);return{props:a}}return l&&(e=new l(r())),{c(){e&&B(e.$$.fragment),t=lt()},m(o,a){e&&V(e,o,a),w(o,t,a),i=!0},p(o,a){const u=a[0]&525312?bn(s,[a[0]&524288&&{item:o[49]},a[0]&1024&&hi(o[10])]):{};if(l!==(l=o[9])){if(e){Oe();const f=e;F(f.$$.fragment,1,0,()=>{z(f,1)}),Te()}l?(e=new l(r()),B(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&F(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&z(e,o)}}}function Mp(n){let e,t,i,s,l,r,o;const a=[U3,B3],u=[];function f(h,g){return h[9]?0:1}t=f(n),i=u[t]=a[t](n);function c(...h){return n[37](n[49],...h)}function d(...h){return n[38](n[49],...h)}return{c(){e=_("div"),i.c(),s=O(),p(e,"tabindex","0"),p(e,"class","dropdown-item option closable"),Q(e,"selected",n[18](n[49]))},m(h,g){w(h,e,g),u[t].m(e,null),m(e,s),l=!0,r||(o=[X(e,"click",c),X(e,"keydown",d)],r=!0)},p(h,g){n=h;let y=t;t=f(n),t===y?u[t].p(n,g):(Oe(),F(u[y],1,1,()=>{u[y]=null}),Te(),i=u[t],i?i.p(n,g):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),g[0]&786432&&Q(e,"selected",n[18](n[49]))},i(h){l||(A(i),l=!0)},o(h){F(i),l=!1},d(h){h&&k(e),u[t].d(),r=!1,rt(o)}}}function Op(n){let e,t,i,s=n[46].group!=hu&&Cp(n),l=n[46].items,r=[];for(let a=0;a<l.length;a+=1)r[a]=Mp(hp(n,l,a));const o=a=>F(r[a],1,1,()=>{r[a]=null});return{c(){s&&s.c(),e=O();for(let a=0;a<r.length;a+=1)r[a].c();t=lt()},m(a,u){s&&s.m(a,u),w(a,e,u);for(let f=0;f<r.length;f+=1)r[f].m(a,u);w(a,t,u),i=!0},p(a,u){if(a[46].group!=hu?s?s.p(a,u):(s=Cp(a),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),u[0]&7079424){l=a[46].items;let f;for(f=0;f<l.length;f+=1){const c=hp(a,l,f);r[f]?(r[f].p(c,u),A(r[f],1)):(r[f]=Mp(c),r[f].c(),A(r[f],1),r[f].m(t.parentNode,t))}for(Oe(),f=l.length;f<r.length;f+=1)o(f);Te()}},i(a){if(!i){for(let u=0;u<l.length;u+=1)A(r[u]);i=!0}},o(a){r=r.filter(Boolean);for(let u=0;u<r.length;u+=1)F(r[u]);i=!1},d(a){s&&s.d(a),a&&k(e),Bn(r,a),a&&k(t)}}}function W3(n){let e,t,i,s,l,r=n[11]&&kp(n);const o=n[33].beforeOptions,a=Tn(o,n,n[42],mp);let u=n[19],f=[];for(let y=0;y<u.length;y+=1)f[y]=Op(pp(n,u,y));const c=y=>F(f[y],1,1,()=>{f[y]=null});let d=null;u.length||(d=Sp(n));const h=n[33].afterOptions,g=Tn(h,n,n[42],dp);return{c(){r&&r.c(),e=O(),a&&a.c(),t=O(),i=_("div");for(let y=0;y<f.length;y+=1)f[y].c();d&&d.c(),s=O(),g&&g.c(),p(i,"class","options-list")},m(y,b){r&&r.m(y,b),w(y,e,b),a&&a.m(y,b),w(y,t,b),w(y,i,b);for(let v=0;v<f.length;v+=1)f[v].m(i,null);d&&d.m(i,null),w(y,s,b),g&&g.m(y,b),l=!0},p(y,b){if(y[11]?r?r.p(y,b):(r=kp(y),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),a&&a.p&&(!l||b[1]&2048)&&An(a,o,y,y[42],l?Dn(o,y[42],b,q3):En(y[42]),mp),b[0]&7079426){u=y[19];let v;for(v=0;v<u.length;v+=1){const S=pp(y,u,v);f[v]?(f[v].p(S,b),A(f[v],1)):(f[v]=Op(S),f[v].c(),A(f[v],1),f[v].m(i,null))}for(Oe(),v=u.length;v<f.length;v+=1)c(v);Te(),!u.length&&d?d.p(y,b):u.length?d&&(d.d(1),d=null):(d=Sp(y),d.c(),d.m(i,null))}g&&g.p&&(!l||b[1]&2048)&&An(g,h,y,y[42],l?Dn(h,y[42],b,H3):En(y[42]),dp)},i(y){if(!l){A(a,y);for(let b=0;b<u.length;b+=1)A(f[b]);A(g,y),l=!0}},o(y){F(a,y),f=f.filter(Boolean);for(let b=0;b<f.length;b+=1)F(f[b]);F(g,y),l=!1},d(y){r&&r.d(y),y&&k(e),a&&a.d(y),y&&k(t),y&&k(i),Bn(f,y),d&&d.d(),y&&k(s),g&&g.d(y)}}}function Y3(n){let e,t,i,s,l,r,o=U.toArray(n[0]),a=[];for(let d=0;d<o.length;d+=1)a[d]=yp(gp(n,o,d));const u=d=>F(a[d],1,1,()=>{a[d]=null});let f=null;o.length||(f=_p(n));let c=!n[5]&&vp(n);return{c(){e=_("div"),t=_("div");for(let d=0;d<a.length;d+=1)a[d].c();f&&f.c(),s=O(),c&&c.c(),p(t,"tabindex",i=n[5]?"-1":"0"),p(t,"class","selected-container"),Q(t,"disabled",n[5]),p(e,"class",l="select "+n[12]),Q(e,"multiple",n[4]),Q(e,"disabled",n[5])},m(d,h){w(d,e,h),m(e,t);for(let g=0;g<a.length;g+=1)a[g].m(t,null);f&&f.m(t,null),n[35](t),m(e,s),c&&c.m(e,null),n[41](e),r=!0},p(d,h){if(h[0]&8661){o=U.toArray(d[0]);let g;for(g=0;g<o.length;g+=1){const y=gp(d,o,g);a[g]?(a[g].p(y,h),A(a[g],1)):(a[g]=yp(y),a[g].c(),A(a[g],1),a[g].m(t,null))}for(Oe(),g=o.length;g<a.length;g+=1)u(g);Te(),!o.length&&f?f.p(d,h):o.length?f&&(f.d(1),f=null):(f=_p(d),f.c(),f.m(t,null))}(!r||h[0]&32&&i!==(i=d[5]?"-1":"0"))&&p(t,"tabindex",i),h[0]&32&&Q(t,"disabled",d[5]),d[5]?c&&(Oe(),F(c,1,1,()=>{c=null}),Te()):c?(c.p(d,h),h[0]&32&&A(c,1)):(c=vp(d),c.c(),A(c,1),c.m(e,null)),(!r||h[0]&4096&&l!==(l="select "+d[12]))&&p(e,"class",l),h[0]&4112&&Q(e,"multiple",d[4]),h[0]&4128&&Q(e,"disabled",d[5])},i(d){if(!r){for(let h=0;h<o.length;h+=1)A(a[h]);A(c),r=!0}},o(d){a=a.filter(Boolean);for(let h=0;h<a.length;h+=1)F(a[h]);F(c),r=!1},d(d){d&&k(e),Bn(a,d),f&&f.d(),n[35](null),c&&c.d(),n[41](null)}}}const hu="_base_";function K3(n,e){let t=(""+e).replace(/\s+/g,"").toLowerCase(),i=n;try{typeof n=="object"&&n!==null&&(i=JSON.stringify(n))}catch{}return(""+i).replace(/\s+/g,"").toLowerCase().includes(t)}function J3(n,e,t){let i,s,l,{$$slots:r={},$$scope:o}=e,{id:a=""}=e,{noOptionsText:u="No options found"}=e,{selectPlaceholder:f="- Select -"}=e,{searchPlaceholder:c="Search..."}=e,{items:d=[]}=e,{multiple:h=!1}=e,{disabled:g=!1}=e,{selected:y=h?[]:void 0}=e,{toggle:b=!1}=e,{labelComponent:v=void 0}=e,{labelComponentProps:S={}}=e,{optionComponent:$=void 0}=e,{optionComponentProps:C={}}=e,{searchable:M=!1}=e,{searchFunc:T=void 0}=e,{class:E=""}=e,D,P="",L,N;function R(oe){if(U.isEmpty(y))return;let le=U.toArray(y);U.inArray(le,oe)&&(U.removeByValue(le,oe),t(0,y=le)),L==null||L.dispatchEvent(new CustomEvent("change",{detail:y,bubbles:!0}))}function J(oe){if(h){let le=U.toArray(y);U.inArray(le,oe)||t(0,y=[...le,oe])}else t(0,y=oe);L==null||L.dispatchEvent(new CustomEvent("change",{detail:y,bubbles:!0}))}function W(oe){return l(oe)?R(oe):J(oe)}function q(){t(0,y=h?[]:void 0)}function G(){D!=null&&D.show&&(D==null||D.show())}function K(){D!=null&&D.hide&&(D==null||D.hide())}function Y(){if(U.isEmpty(y)||U.isEmpty(i))return;let oe=U.toArray(y),le=[];for(const ke of oe){let Ve=!1;for(const ze of i)if(U.inArray(ze.items,ke)){Ve=!0;break}Ve||le.push(ke)}if(le.length){for(const ke of le)U.removeByValue(oe,ke);t(0,y=h?oe:oe[0])}}function ne(){t(14,P="")}function fe(oe,le){var ze;const ke=[],Ve=T||K3;for(const Ze of oe){let ge;typeof le=="string"&&le.length?ge=((ze=Ze.items)==null?void 0:ze.filter(Ee=>Ve(Ee,le)))||[]:ge=Ze.items||[],ge.length&&ke.push({group:Ze.group,items:ge})}return ke}function ye(oe,le){oe.preventDefault(),b&&h?W(le):J(le)}function se(oe,le){(oe.code==="Enter"||oe.code==="Space")&&ye(oe,le)}function Z(){ne(),setTimeout(()=>{const oe=L==null?void 0:L.querySelector(".dropdown-item.option.selected");oe&&(oe.focus(),oe.scrollIntoView({block:"nearest"}))},0)}function De(oe){oe.stopPropagation(),!g&&(D==null||D.toggle())}pi(()=>{const oe=document.querySelectorAll(`label[for="${a}"]`);for(const le of oe)le.addEventListener("click",De);return()=>{for(const le of oe)le.removeEventListener("click",De)}});const te=oe=>R(oe);function be(oe){he[oe?"unshift":"push"](()=>{N=oe,t(17,N)})}function ue(){P=this.value,t(14,P)}const ie=(oe,le)=>ye(le,oe),ve=(oe,le)=>se(le,oe);function He(oe){he[oe?"unshift":"push"](()=>{D=oe,t(15,D)})}function Ie(oe){ut.call(this,n,oe)}function qe(oe){he[oe?"unshift":"push"](()=>{L=oe,t(16,L)})}return n.$$set=oe=>{"id"in oe&&t(24,a=oe.id),"noOptionsText"in oe&&t(1,u=oe.noOptionsText),"selectPlaceholder"in oe&&t(2,f=oe.selectPlaceholder),"searchPlaceholder"in oe&&t(3,c=oe.searchPlaceholder),"items"in oe&&t(25,d=oe.items),"multiple"in oe&&t(4,h=oe.multiple),"disabled"in oe&&t(5,g=oe.disabled),"selected"in oe&&t(0,y=oe.selected),"toggle"in oe&&t(6,b=oe.toggle),"labelComponent"in oe&&t(7,v=oe.labelComponent),"labelComponentProps"in oe&&t(8,S=oe.labelComponentProps),"optionComponent"in oe&&t(9,$=oe.optionComponent),"optionComponentProps"in oe&&t(10,C=oe.optionComponentProps),"searchable"in oe&&t(11,M=oe.searchable),"searchFunc"in oe&&t(26,T=oe.searchFunc),"class"in oe&&t(12,E=oe.class),"$$scope"in oe&&t(42,o=oe.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&33554432&&t(32,i=U.isObjectArrayWithKeys(d,["group"])?d:[{group:hu,items:d}]),n.$$.dirty[0]&33554432&&d&&(Y(),ne()),n.$$.dirty[0]&16384|n.$$.dirty[1]&2&&t(19,s=fe(i,P)),n.$$.dirty[0]&1&&t(18,l=function(oe){let le=U.toArray(y);return U.inArray(le,oe)})},[y,u,f,c,h,g,b,v,S,$,C,M,E,R,P,D,L,N,l,s,ne,ye,se,Z,a,d,T,J,W,q,G,K,i,r,te,be,ue,ie,ve,He,Ie,qe,o]}class Pb extends Fe{constructor(e){super(),Le(this,e,J3,Y3,Ae,{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 Tp(n){let e,t;return{c(){e=_("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&k(e)}}}function G3(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&&Tp(n);return{c(){l&&l.c(),e=O(),t=_("span"),s=H(i),p(t,"class","txt")},m(r,o){l&&l.m(r,o),w(r,e,o),w(r,t,o),m(t,s)},p(r,[o]){r[0].icon?l?l.p(r,o):(l=Tp(r),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),o&1&&i!==(i=(r[0].label||r[0].name||r[0].title||r[0].id||r[0].value)+"")&&_e(s,i)},i:re,o:re,d(r){l&&l.d(r),r&&k(e),r&&k(t)}}}function Z3(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Dp extends Fe{constructor(e){super(),Le(this,e,Z3,G3,Ae,{item:0})}}const x3=n=>({}),Ap=n=>({});function X3(n){let e;const t=n[8].afterOptions,i=Tn(t,n,n[12],Ap);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&An(i,t,s,s[12],e?Dn(t,s[12],l,x3):En(s[12]),Ap)},i(s){e||(A(i,s),e=!0)},o(s){F(i,s),e=!1},d(s){i&&i.d(s)}}}function Q3(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(o){n[9](o)}let r={$$slots:{afterOptions:[X3]},$$scope:{ctx:n}};for(let o=0;o<s.length;o+=1)r=ct(r,s[o]);return n[0]!==void 0&&(r.selected=n[0]),e=new Pb({props:r}),he.push(()=>Re(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){B(e.$$.fragment)},m(o,a){V(e,o,a),i=!0},p(o,[a]){const u=a&62?bn(s,[a&2&&{items:o[1]},a&4&&{multiple:o[2]},a&8&&{labelComponent:o[3]},a&16&&{optionComponent:o[4]},a&32&&hi(o[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:o}),!t&&a&1&&(t=!0,u.selected=o[0],je(()=>t=!1)),e.$set(u)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){F(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function e4(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=Yt(e,i),{$$slots:l={},$$scope:r}=e,{items:o=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=Dp}=e,{optionComponent:c=Dp}=e,{selectionKey:d="value"}=e,{keyOfSelected:h=a?[]:void 0}=e;function g(C){C=U.toArray(C,!0);let M=[],T=b();for(let E of T)U.inArray(C,E[d])&&M.push(E);C.length&&!M.length||t(0,u=a?M:M[0])}async function y(C){let M=U.toArray(C,!0).map(T=>T[d]);!o.length||t(6,h=a?M:M[0])}function b(){if(!U.isObjectArrayWithKeys(o,["group","items"]))return o;let C=[];for(const M of o)C=C.concat(M.items);return C}function v(C){u=C,t(0,u)}function S(C){ut.call(this,n,C)}function $(C){ut.call(this,n,C)}return n.$$set=C=>{e=ct(ct({},e),di(C)),t(5,s=Yt(e,i)),"items"in C&&t(1,o=C.items),"multiple"in C&&t(2,a=C.multiple),"selected"in C&&t(0,u=C.selected),"labelComponent"in C&&t(3,f=C.labelComponent),"optionComponent"in C&&t(4,c=C.optionComponent),"selectionKey"in C&&t(7,d=C.selectionKey),"keyOfSelected"in C&&t(6,h=C.keyOfSelected),"$$scope"in C&&t(12,r=C.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&o&&g(h),n.$$.dirty&1&&y(u)},[u,o,a,f,c,s,h,d,l,v,S,$,r]}class vs extends Fe{constructor(e){super(),Le(this,e,e4,Q3,Ae,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function t4(n){let e,t,i;const s=[{class:"field-type-select "+n[1]},{searchable:!0},{items:n[2]},n[3]];function l(o){n[4](o)}let r={};for(let o=0;o<s.length;o+=1)r=ct(r,s[o]);return n[0]!==void 0&&(r.keyOfSelected=n[0]),e=new vs({props:r}),he.push(()=>Re(e,"keyOfSelected",l)),{c(){B(e.$$.fragment)},m(o,a){V(e,o,a),i=!0},p(o,[a]){const u=a&14?bn(s,[a&2&&{class:"field-type-select "+o[1]},s[1],a&4&&{items:o[2]},a&8&&hi(o[3])]):{};!t&&a&1&&(t=!0,u.keyOfSelected=o[0],je(()=>t=!1)),e.$set(u)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){F(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function n4(n,e,t){const i=["value","class"];let s=Yt(e,i),{value:l="text"}=e,{class:r=""}=e;const o=[{label:"Text",value:"text",icon:U.getFieldTypeIcon("text")},{label:"Number",value:"number",icon:U.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:U.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:U.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:U.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:U.getFieldTypeIcon("date")},{label:"Multiple choices",value:"select",icon:U.getFieldTypeIcon("select")},{label:"JSON",value:"json",icon:U.getFieldTypeIcon("json")},{label:"File",value:"file",icon:U.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:U.getFieldTypeIcon("relation")},{label:"User",value:"user",icon:U.getFieldTypeIcon("user")}];function a(u){l=u,t(0,l)}return n.$$set=u=>{e=ct(ct({},e),di(u)),t(3,s=Yt(e,i)),"value"in u&&t(0,l=u.value),"class"in u&&t(1,r=u.class)},[l,r,o,s,a]}class i4 extends Fe{constructor(e){super(),Le(this,e,n4,t4,Ae,{value:0,class:1})}}function s4(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Min length"),s=O(),l=_("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",r=n[5]),p(l,"step","1"),p(l,"min","0")},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].min),o||(a=X(l,"input",n[2]),o=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&r!==(r=u[5])&&p(l,"id",r),f&1&&Tt(l.value)!==u[0].min&&$e(l,u[0].min)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function l4(n){let e,t,i,s,l,r,o,a,u;return{c(){e=_("label"),t=H("Max length"),s=O(),l=_("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",r=n[5]),p(l,"step","1"),p(l,"min",o=n[0].min||0)},m(f,c){w(f,e,c),m(e,t),w(f,s,c),w(f,l,c),$e(l,n[0].max),a||(u=X(l,"input",n[3]),a=!0)},p(f,c){c&32&&i!==(i=f[5])&&p(e,"for",i),c&32&&r!==(r=f[5])&&p(l,"id",r),c&1&&o!==(o=f[0].min||0)&&p(l,"min",o),c&1&&Tt(l.value)!==f[0].max&&$e(l,f[0].max)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function r4(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=H("Regex pattern"),s=O(),l=_("input"),o=O(),a=_("div"),a.innerHTML="Valid Go regular expression, eg. <code>^\\w+$</code>.",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",r=n[5]),p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].pattern),w(c,o,d),w(c,a,d),u||(f=X(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&r!==(r=c[5])&&p(l,"id",r),d&1&&l.value!==c[0].pattern&&$e(l,c[0].pattern)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function o4(n){let e,t,i,s,l,r,o,a,u,f;return i=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[s4,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[l4,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[r4,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(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){w(c,e,d),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(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 g={};d&2&&(g.name="schema."+c[1]+".options.max"),d&97&&(g.$$scope={dirty:d,ctx:c}),r.$set(g);const y={};d&2&&(y.name="schema."+c[1]+".options.pattern"),d&97&&(y.$$scope={dirty:d,ctx:c}),u.$set(y)},i(c){f||(A(i.$$.fragment,c),A(r.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){F(i.$$.fragment,c),F(r.$$.fragment,c),F(u.$$.fragment,c),f=!1},d(c){c&&k(e),z(i),z(r),z(u)}}}function a4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=Tt(this.value),t(0,s)}function r(){s.max=Tt(this.value),t(0,s)}function o(){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,r,o]}class u4 extends Fe{constructor(e){super(),Le(this,e,a4,o4,Ae,{key:1,options:0})}}function f4(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Min"),s=O(),l=_("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",r=n[4])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].min),o||(a=X(l,"input",n[2]),o=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&r!==(r=u[4])&&p(l,"id",r),f&1&&Tt(l.value)!==u[0].min&&$e(l,u[0].min)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function c4(n){let e,t,i,s,l,r,o,a,u;return{c(){e=_("label"),t=H("Max"),s=O(),l=_("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",r=n[4]),p(l,"min",o=n[0].min)},m(f,c){w(f,e,c),m(e,t),w(f,s,c),w(f,l,c),$e(l,n[0].max),a||(u=X(l,"input",n[3]),a=!0)},p(f,c){c&16&&i!==(i=f[4])&&p(e,"for",i),c&16&&r!==(r=f[4])&&p(l,"id",r),c&1&&o!==(o=f[0].min)&&p(l,"min",o),c&1&&Tt(l.value)!==f[0].max&&$e(l,f[0].max)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function d4(n){let e,t,i,s,l,r,o;return i=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[f4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[c4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!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}),r.$set(c)},i(a){o||(A(i.$$.fragment,a),A(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function p4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=Tt(this.value),t(0,s)}function r(){s.max=Tt(this.value),t(0,s)}return n.$$set=o=>{"key"in o&&t(1,i=o.key),"options"in o&&t(0,s=o.options)},[s,i,l,r]}class h4 extends Fe{constructor(e){super(),Le(this,e,p4,d4,Ae,{key:1,options:0})}}function m4(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 g4 extends Fe{constructor(e){super(),Le(this,e,m4,null,Ae,{key:0,options:1})}}function _4(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],r={};for(let o=0;o<l.length;o+=1)r=ct(r,l[o]);return{c(){e=_("input"),ci(e,r)},m(o,a){w(o,e,a),e.value=r.value,e.autofocus&&e.focus(),i||(s=X(e,"input",n[4]),i=!0)},p(o,[a]){ci(e,r=bn(l,[a&8&&t!==(t=o[3].type||"text")&&{type:t},a&4&&e.value!==o[2]&&{value:o[2]},a&8&&o[3]])),"value"in r&&(e.value=r.value)},i:re,o:re,d(o){o&&k(e),i=!1,s()}}}function b4(n,e,t){let i;const s=["value","separator"];let l=Yt(e,s),{value:r=[]}=e,{separator:o=","}=e;const a=u=>{t(0,r=U.splitNonEmpty(u.target.value,o))};return n.$$set=u=>{e=ct(ct({},e),di(u)),t(3,l=Yt(e,s)),"value"in u&&t(0,r=u.value),"separator"in u&&t(1,o=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(r||[]).join(","))},[r,o,i,l,a]}class ks extends Fe{constructor(e){super(),Le(this,e,b4,_4,Ae,{value:0,separator:1})}}function y4(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(b){n[2](b)}let y={id:n[4],disabled:!U.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(y.value=n[0].exceptDomains),o=new ks({props:y}),he.push(()=>Re(o,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Except domains",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),w(b,r,v),V(o,b,v),w(b,u,v),w(b,f,v),c=!0,d||(h=Xe(St.call(null,s,{text:`Domains that are NOT allowed as value. 
- This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,v){(!c||v&16&&l!==(l=b[4]))&&p(e,"for",l);const S={};v&16&&(S.id=b[4]),v&1&&(S.disabled=!U.isEmpty(b[0].onlyDomains)),!a&&v&1&&(a=!0,S.value=b[0].exceptDomains,je(()=>a=!1)),o.$set(S)},i(b){c||(A(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function v4(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(b){n[3](b)}let y={id:n[4]+".options.onlyDomains",disabled:!U.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(y.value=n[0].onlyDomains),o=new ks({props:y}),he.push(()=>Re(o,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),w(b,r,v),V(o,b,v),w(b,u,v),w(b,f,v),c=!0,d||(h=Xe(St.call(null,s,{text:`Domains that are ONLY allowed as value. 
- This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,v){(!c||v&16&&l!==(l=b[4]+".options.onlyDomains"))&&p(e,"for",l);const S={};v&16&&(S.id=b[4]+".options.onlyDomains"),v&1&&(S.disabled=!U.isEmpty(b[0].exceptDomains)),!a&&v&1&&(a=!0,S.value=b[0].onlyDomains,je(()=>a=!1)),o.$set(S)},i(b){c||(A(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function k4(n){let e,t,i,s,l,r,o;return i=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[y4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[v4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!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}),r.$set(c)},i(a){o||(A(i.$$.fragment,a),A(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function w4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(o){n.$$.not_equal(s.exceptDomains,o)&&(s.exceptDomains=o,t(0,s))}function r(o){n.$$.not_equal(s.onlyDomains,o)&&(s.onlyDomains=o,t(0,s))}return n.$$set=o=>{"key"in o&&t(1,i=o.key),"options"in o&&t(0,s=o.options)},[s,i,l,r]}class Lb extends Fe{constructor(e){super(),Le(this,e,w4,k4,Ae,{key:1,options:0})}}function S4(n){let e,t,i,s;function l(a){n[2](a)}function r(a){n[3](a)}let o={};return n[0]!==void 0&&(o.key=n[0]),n[1]!==void 0&&(o.options=n[1]),e=new Lb({props:o}),he.push(()=>Re(e,"key",l)),he.push(()=>Re(e,"options",r)),{c(){B(e.$$.fragment)},m(a,u){V(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],je(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],je(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){F(e.$$.fragment,a),s=!1},d(a){z(e,a)}}}function $4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(o){i=o,t(0,i)}function r(o){s=o,t(1,s)}return n.$$set=o=>{"key"in o&&t(0,i=o.key),"options"in o&&t(1,s=o.options)},[i,s,l,r]}class C4 extends Fe{constructor(e){super(),Le(this,e,$4,S4,Ae,{key:0,options:1})}}var $a=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],qs={_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!="undefined"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},zl={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},yn=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Hn=function(n){return n===!0?1:0};function Ep(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Ca=function(n){return n instanceof Array?n:[n]};function cn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function wt(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 Ir(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Fb(n,e){if(e(n))return n;if(n.parentNode)return Fb(n.parentNode,e)}function Nr(n,e){var t=wt("div","numInputWrapper"),i=wt("input","numInput "+n),s=wt("span","arrowUp"),l=wt("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var r in e)i.setAttribute(r,e[r]);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 Ma=function(){},vo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},M4={D:Ma,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*Hn(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:Ma,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:Ma,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},os={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})"},Pl={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[Pl.w(n,e,t)]},F:function(n,e,t){return vo(Pl.n(n,e,t)-1,!1,e)},G:function(n,e,t){return yn(Pl.h(n,e,t))},H:function(n){return yn(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[Hn(n.getHours()>11)]},M:function(n,e){return vo(n.getMonth(),!0,e)},S:function(n){return yn(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return yn(n.getFullYear(),4)},d:function(n){return yn(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return yn(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return yn(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)}},Ib=function(n){var e=n.config,t=e===void 0?qs:e,i=n.l10n,s=i===void 0?zl:i,l=n.isMobile,r=l===void 0?!1:l;return function(o,a,u){var f=u||s;return t.formatDate!==void 0&&!r?t.formatDate(o,a,f):a.split("").map(function(c,d,h){return Pl[c]&&h[d-1]!=="\\"?Pl[c](o,f,t):c!=="\\"?c:""}).join("")}},mu=function(n){var e=n.config,t=e===void 0?qs:e,i=n.l10n,s=i===void 0?zl:i;return function(l,r,o,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=r||(t||qs).dateFormat,h=String(l).trim();if(h==="today")f=new Date,o=!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 g=void 0,y=[],b=0,v=0,S="";b<d.length;b++){var $=d[b],C=$==="\\",M=d[b-1]==="\\"||C;if(os[$]&&!M){S+=os[$];var T=new RegExp(S).exec(l);T&&(g=!0)&&y[$!=="Y"?"push":"unshift"]({fn:M4[$],val:T[++v]})}else C||(S+=".")}f=!t||!t.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),y.forEach(function(E){var D=E.fn,P=E.val;return f=D(f,P,u)||f}),f=g?f:void 0}}if(!(f instanceof Date&&!isNaN(f.getTime()))){t.errorHandler(new Error("Invalid date provided: "+c));return}return o===!0&&f.setHours(0,0,0,0),f}}};function $n(n,e,t){return t===void 0&&(t=!0),t!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):n.getTime()-e.getTime()}var O4=function(n,e,t){return n>Math.min(e,t)&&n<Math.max(e,t)},Oa=function(n,e,t){return n*3600+e*60+t},T4=function(n){var e=Math.floor(n/3600),t=(n-e*3600)/60;return[e,t,n-e*3600-t*60]},D4={DAY:864e5};function Ta(n){var e=n.defaultHour,t=n.defaultMinute,i=n.defaultSeconds;if(n.minDate!==void 0){var s=n.minDate.getHours(),l=n.minDate.getMinutes(),r=n.minDate.getSeconds();e<s&&(e=s),e===s&&t<l&&(t=l),e===s&&t===l&&i<r&&(i=n.minDate.getSeconds())}if(n.maxDate!==void 0){var o=n.maxDate.getHours(),a=n.maxDate.getMinutes();e=Math.min(e,o),e===o&&(t=Math.min(a,t)),e===o&&t===a&&(i=n.maxDate.getSeconds())}return{hours:e,minutes:t,seconds:i}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var i=function(o){o&&Object.keys(o).forEach(function(a){return n[a]=o[a]})},s=0,l=e;s<l.length;s++){var r=l[s];i(r)}return n});var rn=globalThis&&globalThis.__assign||function(){return rn=Object.assign||function(n){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s])}return n},rn.apply(this,arguments)},Pp=globalThis&&globalThis.__spreadArrays||function(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var i=Array(n),s=0,e=0;e<t;e++)for(var l=arguments[e],r=0,o=l.length;r<o;r++,s++)i[s]=l[r];return i},A4=300;function E4(n,e){var t={config:rn(rn({},qs),Wt.defaultConfig),l10n:zl};t.parseDate=mu({config:t.config,l10n:t.l10n}),t._handlers=[],t.pluginElements=[],t.loadedPlugins=[],t._bind=y,t._setHoursFromDate=d,t._positionCalendar=ge,t.changeMonth=ye,t.changeYear=ue,t.clear=se,t.close=Z,t.onMouseOver=qe,t._createElement=wt,t.createDay=T,t.destroy=De,t.isEnabled=ie,t.jumpToDate=S,t.updateValue=qt,t.open=le,t.redraw=ae,t.set=gt,t.setDate=yt,t.toggle=Ke;function i(){t.utils={getDaysInMonth:function(I,j){return I===void 0&&(I=t.currentMonth),j===void 0&&(j=t.currentYear),I===1&&(j%4===0&&j%100!==0||j%400===0)?29:t.l10n.daysInMonth[I]}}}function s(){t.element=t.input=n,t.isOpen=!1,Ve(),Ze(),Ot(),Mt(),i(),t.isMobile||M(),v(),(t.selectedDates.length||t.config.noCalendar)&&(t.config.enableTime&&d(t.config.noCalendar?t.latestSelectedDateObj:void 0),qt(!1)),o();var I=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!t.isMobile&&I&&ge(),st("onReady")}function l(){var I;return((I=t.calendarContainer)===null||I===void 0?void 0:I.getRootNode()).activeElement||document.activeElement}function r(I){return I.bind(t)}function o(){var I=t.config;I.weekNumbers===!1&&I.showMonths===1||I.noCalendar!==!0&&window.requestAnimationFrame(function(){if(t.calendarContainer!==void 0&&(t.calendarContainer.style.visibility="hidden",t.calendarContainer.style.display="block"),t.daysContainer!==void 0){var j=(t.days.offsetWidth+1)*I.showMonths;t.daysContainer.style.width=j+"px",t.calendarContainer.style.width=j+(t.weekWrapper!==void 0?t.weekWrapper.offsetWidth:0)+"px",t.calendarContainer.style.removeProperty("visibility"),t.calendarContainer.style.removeProperty("display")}})}function a(I){if(t.selectedDates.length===0){var j=t.config.minDate===void 0||$n(new Date,t.config.minDate)>=0?new Date:new Date(t.config.minDate.getTime()),ee=Ta(t.config);j.setHours(ee.hours,ee.minutes,ee.seconds,j.getMilliseconds()),t.selectedDates=[j],t.latestSelectedDateObj=j}I!==void 0&&I.type!=="blur"&&pe(I);var de=t._input.value;c(),qt(),t._input.value!==de&&t._debouncedChange()}function u(I,j){return I%12+12*Hn(j===t.l10n.amPM[1])}function f(I){switch(I%24){case 0:case 12:return 12;default:return I%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var I=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,j=(parseInt(t.minuteElement.value,10)||0)%60,ee=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(I=u(I,t.amPM.textContent));var de=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&$n(t.latestSelectedDateObj,t.config.minDate,!0)===0,Pe=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&$n(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 We=Oa(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),tt=Oa(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Je=Oa(I,j,ee);if(Je>tt&&Je<We){var nt=T4(We);I=nt[0],j=nt[1],ee=nt[2]}}else{if(Pe){var Ge=t.config.maxTime!==void 0?t.config.maxTime:t.config.maxDate;I=Math.min(I,Ge.getHours()),I===Ge.getHours()&&(j=Math.min(j,Ge.getMinutes())),j===Ge.getMinutes()&&(ee=Math.min(ee,Ge.getSeconds()))}if(de){var et=t.config.minTime!==void 0?t.config.minTime:t.config.minDate;I=Math.max(I,et.getHours()),I===et.getHours()&&j<et.getMinutes()&&(j=et.getMinutes()),j===et.getMinutes()&&(ee=Math.max(ee,et.getSeconds()))}}h(I,j,ee)}}function d(I){var j=I||t.latestSelectedDateObj;j&&j instanceof Date&&h(j.getHours(),j.getMinutes(),j.getSeconds())}function h(I,j,ee){t.latestSelectedDateObj!==void 0&&t.latestSelectedDateObj.setHours(I%24,j,ee||0,0),!(!t.hourElement||!t.minuteElement||t.isMobile)&&(t.hourElement.value=yn(t.config.time_24hr?I:(12+I)%12+12*Hn(I%12===0)),t.minuteElement.value=yn(j),t.amPM!==void 0&&(t.amPM.textContent=t.l10n.amPM[Hn(I>=12)]),t.secondElement!==void 0&&(t.secondElement.value=yn(ee)))}function g(I){var j=Sn(I),ee=parseInt(j.value)+(I.delta||0);(ee/1e3>1||I.key==="Enter"&&!/[^\d]/.test(ee.toString()))&&ue(ee)}function y(I,j,ee,de){if(j instanceof Array)return j.forEach(function(Pe){return y(I,Pe,ee,de)});if(I instanceof Array)return I.forEach(function(Pe){return y(Pe,j,ee,de)});I.addEventListener(j,ee,de),t._handlers.push({remove:function(){return I.removeEventListener(j,ee,de)}})}function b(){st("onChange")}function v(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ee){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ee+"]"),function(de){return y(de,"click",t[ee])})}),t.isMobile){Ce();return}var I=Ep(oe,50);if(t._debouncedChange=Ep(b,A4),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&y(t.daysContainer,"mouseover",function(ee){t.config.mode==="range"&&qe(Sn(ee))}),y(t._input,"keydown",Ie),t.calendarContainer!==void 0&&y(t.calendarContainer,"keydown",Ie),!t.config.inline&&!t.config.static&&y(window,"resize",I),window.ontouchstart!==void 0?y(window.document,"touchstart",be):y(window.document,"mousedown",be),y(window.document,"focus",be,{capture:!0}),t.config.clickOpens===!0&&(y(t._input,"focus",t.open),y(t._input,"click",t.open)),t.daysContainer!==void 0&&(y(t.monthNav,"click",ii),y(t.monthNav,["keyup","increment"],g),y(t.daysContainer,"click",vt)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var j=function(ee){return Sn(ee).select()};y(t.timeContainer,["increment"],a),y(t.timeContainer,"blur",a,{capture:!0}),y(t.timeContainer,"click",$),y([t.hourElement,t.minuteElement],["focus","click"],j),t.secondElement!==void 0&&y(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&y(t.amPM,"click",function(ee){a(ee)})}t.config.allowInput&&y(t._input,"blur",He)}function S(I,j){var ee=I!==void 0?t.parseDate(I):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate<t.now?t.config.maxDate:t.now),de=t.currentYear,Pe=t.currentMonth;try{ee!==void 0&&(t.currentYear=ee.getFullYear(),t.currentMonth=ee.getMonth())}catch(We){We.message="Invalid date supplied: "+ee,t.config.errorHandler(We)}j&&t.currentYear!==de&&(st("onYearChange"),J()),j&&(t.currentYear!==de||t.currentMonth!==Pe)&&st("onMonthChange"),t.redraw()}function $(I){var j=Sn(I);~j.className.indexOf("arrow")&&C(I,j.classList.contains("arrowUp")?1:-1)}function C(I,j,ee){var de=I&&Sn(I),Pe=ee||de&&de.parentNode&&de.parentNode.firstChild,We=fn("increment");We.delta=j,Pe&&Pe.dispatchEvent(We)}function M(){var I=window.document.createDocumentFragment();if(t.calendarContainer=wt("div","flatpickr-calendar"),t.calendarContainer.tabIndex=-1,!t.config.noCalendar){if(I.appendChild(G()),t.innerContainer=wt("div","flatpickr-innerContainer"),t.config.weekNumbers){var j=fe(),ee=j.weekWrapper,de=j.weekNumbers;t.innerContainer.appendChild(ee),t.weekNumbers=de,t.weekWrapper=ee}t.rContainer=wt("div","flatpickr-rContainer"),t.rContainer.appendChild(Y()),t.daysContainer||(t.daysContainer=wt("div","flatpickr-days"),t.daysContainer.tabIndex=-1),R(),t.rContainer.appendChild(t.daysContainer),t.innerContainer.appendChild(t.rContainer),I.appendChild(t.innerContainer)}t.config.enableTime&&I.appendChild(K()),cn(t.calendarContainer,"rangeMode",t.config.mode==="range"),cn(t.calendarContainer,"animate",t.config.animate===!0),cn(t.calendarContainer,"multiMonth",t.config.showMonths>1),t.calendarContainer.appendChild(I);var Pe=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&&(!Pe&&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 We=wt("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(We,t.element),We.appendChild(t.element),t.altInput&&We.appendChild(t.altInput),We.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(I,j,ee,de){var Pe=ie(j,!0),We=wt("span",I,j.getDate().toString());return We.dateObj=j,We.$i=de,We.setAttribute("aria-label",t.formatDate(j,t.config.ariaDateFormat)),I.indexOf("hidden")===-1&&$n(j,t.now)===0&&(t.todayDateElem=We,We.classList.add("today"),We.setAttribute("aria-current","date")),Pe?(We.tabIndex=-1,ce(j)&&(We.classList.add("selected"),t.selectedDateElem=We,t.config.mode==="range"&&(cn(We,"startRange",t.selectedDates[0]&&$n(j,t.selectedDates[0],!0)===0),cn(We,"endRange",t.selectedDates[1]&&$n(j,t.selectedDates[1],!0)===0),I==="nextMonthDay"&&We.classList.add("inRange")))):We.classList.add("flatpickr-disabled"),t.config.mode==="range"&&Se(j)&&!ce(j)&&We.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&I!=="prevMonthDay"&&de%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+t.config.getWeek(j)+"</span>"),st("onDayCreate",We),We}function E(I){I.focus(),t.config.mode==="range"&&qe(I)}function D(I){for(var j=I>0?0:t.config.showMonths-1,ee=I>0?t.config.showMonths:-1,de=j;de!=ee;de+=I)for(var Pe=t.daysContainer.children[de],We=I>0?0:Pe.children.length-1,tt=I>0?Pe.children.length:-1,Je=We;Je!=tt;Je+=I){var nt=Pe.children[Je];if(nt.className.indexOf("hidden")===-1&&ie(nt.dateObj))return nt}}function P(I,j){for(var ee=I.className.indexOf("Month")===-1?I.dateObj.getMonth():t.currentMonth,de=j>0?t.config.showMonths:-1,Pe=j>0?1:-1,We=ee-t.currentMonth;We!=de;We+=Pe)for(var tt=t.daysContainer.children[We],Je=ee-t.currentMonth===We?I.$i+j:j<0?tt.children.length-1:0,nt=tt.children.length,Ge=Je;Ge>=0&&Ge<nt&&Ge!=(j>0?nt:-1);Ge+=Pe){var et=tt.children[Ge];if(et.className.indexOf("hidden")===-1&&ie(et.dateObj)&&Math.abs(I.$i-Ge)>=Math.abs(j))return E(et)}t.changeMonth(Pe),L(D(Pe),0)}function L(I,j){var ee=l(),de=ve(ee||document.body),Pe=I!==void 0?I:de?ee:t.selectedDateElem!==void 0&&ve(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&ve(t.todayDateElem)?t.todayDateElem:D(j>0?1:-1);Pe===void 0?t._input.focus():de?P(Pe,j):E(Pe)}function N(I,j){for(var ee=(new Date(I,j,1).getDay()-t.l10n.firstDayOfWeek+7)%7,de=t.utils.getDaysInMonth((j-1+12)%12,I),Pe=t.utils.getDaysInMonth(j,I),We=window.document.createDocumentFragment(),tt=t.config.showMonths>1,Je=tt?"prevMonthDay hidden":"prevMonthDay",nt=tt?"nextMonthDay hidden":"nextMonthDay",Ge=de+1-ee,et=0;Ge<=de;Ge++,et++)We.appendChild(T("flatpickr-day "+Je,new Date(I,j-1,Ge),Ge,et));for(Ge=1;Ge<=Pe;Ge++,et++)We.appendChild(T("flatpickr-day",new Date(I,j,Ge),Ge,et));for(var _t=Pe+1;_t<=42-ee&&(t.config.showMonths===1||et%7!==0);_t++,et++)We.appendChild(T("flatpickr-day "+nt,new Date(I,j+1,_t%Pe),_t,et));var Ft=wt("div","dayContainer");return Ft.appendChild(We),Ft}function R(){if(t.daysContainer!==void 0){Ir(t.daysContainer),t.weekNumbers&&Ir(t.weekNumbers);for(var I=document.createDocumentFragment(),j=0;j<t.config.showMonths;j++){var ee=new Date(t.currentYear,t.currentMonth,1);ee.setMonth(t.currentMonth+j),I.appendChild(N(ee.getFullYear(),ee.getMonth()))}t.daysContainer.appendChild(I),t.days=t.daysContainer.firstChild,t.config.mode==="range"&&t.selectedDates.length===1&&qe()}}function J(){if(!(t.config.showMonths>1||t.config.monthSelectorType!=="dropdown")){var I=function(de){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&de<t.config.minDate.getMonth()?!1:!(t.config.maxDate!==void 0&&t.currentYear===t.config.maxDate.getFullYear()&&de>t.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var j=0;j<12;j++)if(!!I(j)){var ee=wt("option","flatpickr-monthDropdown-month");ee.value=new Date(t.currentYear,j).getMonth().toString(),ee.textContent=vo(j,t.config.shorthandCurrentMonth,t.l10n),ee.tabIndex=-1,t.currentMonth===j&&(ee.selected=!0),t.monthsDropdownContainer.appendChild(ee)}}}function W(){var I=wt("div","flatpickr-month"),j=window.document.createDocumentFragment(),ee;t.config.showMonths>1||t.config.monthSelectorType==="static"?ee=wt("span","cur-month"):(t.monthsDropdownContainer=wt("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),y(t.monthsDropdownContainer,"change",function(tt){var Je=Sn(tt),nt=parseInt(Je.value,10);t.changeMonth(nt-t.currentMonth),st("onMonthChange")}),J(),ee=t.monthsDropdownContainer);var de=Nr("cur-year",{tabindex:"-1"}),Pe=de.getElementsByTagName("input")[0];Pe.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Pe.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Pe.setAttribute("max",t.config.maxDate.getFullYear().toString()),Pe.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var We=wt("div","flatpickr-current-month");return We.appendChild(ee),We.appendChild(de),j.appendChild(We),I.appendChild(j),{container:I,yearElement:Pe,monthElement:ee}}function q(){Ir(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var I=t.config.showMonths;I--;){var j=W();t.yearElements.push(j.yearElement),t.monthElements.push(j.monthElement),t.monthNav.appendChild(j.container)}t.monthNav.appendChild(t.nextMonthNav)}function G(){return t.monthNav=wt("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=wt("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=wt("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,q(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(I){t.__hidePrevMonthArrow!==I&&(cn(t.prevMonthNav,"flatpickr-disabled",I),t.__hidePrevMonthArrow=I)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(I){t.__hideNextMonthArrow!==I&&(cn(t.nextMonthNav,"flatpickr-disabled",I),t.__hideNextMonthArrow=I)}}),t.currentYearElement=t.yearElements[0],xe(),t.monthNav}function K(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var I=Ta(t.config);t.timeContainer=wt("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var j=wt("span","flatpickr-time-separator",":"),ee=Nr("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ee.getElementsByTagName("input")[0];var de=Nr("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=de.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=yn(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?I.hours:f(I.hours)),t.minuteElement.value=yn(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():I.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(ee),t.timeContainer.appendChild(j),t.timeContainer.appendChild(de),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Pe=Nr("flatpickr-second");t.secondElement=Pe.getElementsByTagName("input")[0],t.secondElement.value=yn(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():I.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(wt("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Pe)}return t.config.time_24hr||(t.amPM=wt("span","flatpickr-am-pm",t.l10n.amPM[Hn((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 Y(){t.weekdayContainer?Ir(t.weekdayContainer):t.weekdayContainer=wt("div","flatpickr-weekdays");for(var I=t.config.showMonths;I--;){var j=wt("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(j)}return ne(),t.weekdayContainer}function ne(){if(!!t.weekdayContainer){var I=t.l10n.firstDayOfWeek,j=Pp(t.l10n.weekdays.shorthand);I>0&&I<j.length&&(j=Pp(j.splice(I,j.length),j.splice(0,I)));for(var ee=t.config.showMonths;ee--;)t.weekdayContainer.children[ee].innerHTML=`
-      <span class='flatpickr-weekday'>
-        `+j.join("</span><span class='flatpickr-weekday'>")+`
-      </span>
-      `}}function fe(){t.calendarContainer.classList.add("hasWeeks");var I=wt("div","flatpickr-weekwrapper");I.appendChild(wt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var j=wt("div","flatpickr-weeks");return I.appendChild(j),{weekWrapper:I,weekNumbers:j}}function ye(I,j){j===void 0&&(j=!0);var ee=j?I:I-t.currentMonth;ee<0&&t._hidePrevMonthArrow===!0||ee>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ee,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,st("onYearChange"),J()),R(),st("onMonthChange"),xe())}function se(I,j){if(I===void 0&&(I=!0),j===void 0&&(j=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,j===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ee=Ta(t.config),de=ee.hours,Pe=ee.minutes,We=ee.seconds;h(de,Pe,We)}t.redraw(),I&&st("onChange")}function Z(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),st("onClose")}function De(){t.config!==void 0&&st("onDestroy");for(var I=t._handlers.length;I--;)t._handlers[I].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 j=t.calendarContainer.parentNode;if(j.lastChild&&j.removeChild(j.lastChild),j.parentNode){for(;j.firstChild;)j.parentNode.insertBefore(j.firstChild,j);j.parentNode.removeChild(j)}}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(ee){try{delete t[ee]}catch{}})}function te(I){return t.calendarContainer.contains(I)}function be(I){if(t.isOpen&&!t.config.inline){var j=Sn(I),ee=te(j),de=j===t.input||j===t.altInput||t.element.contains(j)||I.path&&I.path.indexOf&&(~I.path.indexOf(t.input)||~I.path.indexOf(t.altInput)),Pe=!de&&!ee&&!te(I.relatedTarget),We=!t.config.ignoredFocusElements.some(function(tt){return tt.contains(j)});Pe&&We&&(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 ue(I){if(!(!I||t.config.minDate&&I<t.config.minDate.getFullYear()||t.config.maxDate&&I>t.config.maxDate.getFullYear())){var j=I,ee=t.currentYear!==j;t.currentYear=j||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)),ee&&(t.redraw(),st("onYearChange"),J())}}function ie(I,j){var ee;j===void 0&&(j=!0);var de=t.parseDate(I,void 0,j);if(t.config.minDate&&de&&$n(de,t.config.minDate,j!==void 0?j:!t.minDateHasTime)<0||t.config.maxDate&&de&&$n(de,t.config.maxDate,j!==void 0?j:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(de===void 0)return!1;for(var Pe=!!t.config.enable,We=(ee=t.config.enable)!==null&&ee!==void 0?ee:t.config.disable,tt=0,Je=void 0;tt<We.length;tt++){if(Je=We[tt],typeof Je=="function"&&Je(de))return Pe;if(Je instanceof Date&&de!==void 0&&Je.getTime()===de.getTime())return Pe;if(typeof Je=="string"){var nt=t.parseDate(Je,void 0,!0);return nt&&nt.getTime()===de.getTime()?Pe:!Pe}else if(typeof Je=="object"&&de!==void 0&&Je.from&&Je.to&&de.getTime()>=Je.from.getTime()&&de.getTime()<=Je.to.getTime())return Pe}return!Pe}function ve(I){return t.daysContainer!==void 0?I.className.indexOf("hidden")===-1&&I.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(I):!1}function He(I){var j=I.target===t._input,ee=t._input.value.trimEnd()!==Gt();j&&ee&&!(I.relatedTarget&&te(I.relatedTarget))&&t.setDate(t._input.value,!0,I.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Ie(I){var j=Sn(I),ee=t.config.wrap?n.contains(j):j===t._input,de=t.config.allowInput,Pe=t.isOpen&&(!de||!ee),We=t.config.inline&&ee&&!de;if(I.keyCode===13&&ee){if(de)return t.setDate(t._input.value,!0,j===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),j.blur();t.open()}else if(te(j)||Pe||We){var tt=!!t.timeContainer&&t.timeContainer.contains(j);switch(I.keyCode){case 13:tt?(I.preventDefault(),a(),Be()):vt(I);break;case 27:I.preventDefault(),Be();break;case 8:case 46:ee&&!t.config.allowInput&&(I.preventDefault(),t.clear());break;case 37:case 39:if(!tt&&!ee){I.preventDefault();var Je=l();if(t.daysContainer!==void 0&&(de===!1||Je&&ve(Je))){var nt=I.keyCode===39?1:-1;I.ctrlKey?(I.stopPropagation(),ye(nt),L(D(1),0)):L(void 0,nt)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:I.preventDefault();var Ge=I.keyCode===40?1:-1;t.daysContainer&&j.$i!==void 0||j===t.input||j===t.altInput?I.ctrlKey?(I.stopPropagation(),ue(t.currentYear-Ge),L(D(1),0)):tt||L(void 0,Ge*7):j===t.currentYearElement?ue(t.currentYear-Ge):t.config.enableTime&&(!tt&&t.hourElement&&t.hourElement.focus(),a(I),t._debouncedChange());break;case 9:if(tt){var et=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(tn){return tn}),_t=et.indexOf(j);if(_t!==-1){var Ft=et[_t+(I.shiftKey?-1:1)];I.preventDefault(),(Ft||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(j)&&I.shiftKey&&(I.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&j===t.amPM)switch(I.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),qt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),qt();break}(ee||te(j))&&st("onKeyDown",I)}function qe(I,j){if(j===void 0&&(j="flatpickr-day"),!(t.selectedDates.length!==1||I&&(!I.classList.contains(j)||I.classList.contains("flatpickr-disabled")))){for(var ee=I?I.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),de=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Pe=Math.min(ee,t.selectedDates[0].getTime()),We=Math.max(ee,t.selectedDates[0].getTime()),tt=!1,Je=0,nt=0,Ge=Pe;Ge<We;Ge+=D4.DAY)ie(new Date(Ge),!0)||(tt=tt||Ge>Pe&&Ge<We,Ge<de&&(!Je||Ge>Je)?Je=Ge:Ge>de&&(!nt||Ge<nt)&&(nt=Ge));var et=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+j));et.forEach(function(_t){var Ft=_t.dateObj,tn=Ft.getTime(),In=Je>0&&tn<Je||nt>0&&tn>nt;if(In){_t.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Bt){_t.classList.remove(Bt)});return}else if(tt&&!In)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Bt){_t.classList.remove(Bt)}),I!==void 0&&(I.classList.add(ee<=t.selectedDates[0].getTime()?"startRange":"endRange"),de<ee&&tn===de?_t.classList.add("startRange"):de>ee&&tn===de&&_t.classList.add("endRange"),tn>=Je&&(nt===0||tn<=nt)&&O4(tn,de,ee)&&_t.classList.add("inRange"))})}}function oe(){t.isOpen&&!t.config.static&&!t.config.inline&&ge()}function le(I,j){if(j===void 0&&(j=t._positionElement),t.isMobile===!0){if(I){I.preventDefault();var ee=Sn(I);ee&&ee.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),st("onOpen");return}else if(t._input.disabled||t.config.inline)return;var de=t.isOpen;t.isOpen=!0,de||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),st("onOpen"),ge(j)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(I===void 0||!t.timeContainer.contains(I.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function ke(I){return function(j){var ee=t.config["_"+I+"Date"]=t.parseDate(j,t.config.dateFormat),de=t.config["_"+(I==="min"?"max":"min")+"Date"];ee!==void 0&&(t[I==="min"?"minDateHasTime":"maxDateHasTime"]=ee.getHours()>0||ee.getMinutes()>0||ee.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Pe){return ie(Pe)}),!t.selectedDates.length&&I==="min"&&d(ee),qt()),t.daysContainer&&(ae(),ee!==void 0?t.currentYearElement[I]=ee.getFullYear().toString():t.currentYearElement.removeAttribute(I),t.currentYearElement.disabled=!!de&&ee!==void 0&&de.getFullYear()===ee.getFullYear())}}function Ve(){var I=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],j=rn(rn({},JSON.parse(JSON.stringify(n.dataset||{}))),e),ee={};t.config.parseDate=j.parseDate,t.config.formatDate=j.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(et){t.config._enable=zt(et)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(et){t.config._disable=zt(et)}});var de=j.mode==="time";if(!j.dateFormat&&(j.enableTime||de)){var Pe=Wt.defaultConfig.dateFormat||qs.dateFormat;ee.dateFormat=j.noCalendar||de?"H:i"+(j.enableSeconds?":S":""):Pe+" H:i"+(j.enableSeconds?":S":"")}if(j.altInput&&(j.enableTime||de)&&!j.altFormat){var We=Wt.defaultConfig.altFormat||qs.altFormat;ee.altFormat=j.noCalendar||de?"h:i"+(j.enableSeconds?":S K":" K"):We+(" h:i"+(j.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:ke("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:ke("max")});var tt=function(et){return function(_t){t.config[et==="min"?"_minTime":"_maxTime"]=t.parseDate(_t,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:tt("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:tt("max")}),j.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ee,j);for(var Je=0;Je<I.length;Je++)t.config[I[Je]]=t.config[I[Je]]===!0||t.config[I[Je]]==="true";$a.filter(function(et){return t.config[et]!==void 0}).forEach(function(et){t.config[et]=Ca(t.config[et]||[]).map(r)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var Je=0;Je<t.config.plugins.length;Je++){var nt=t.config.plugins[Je](t)||{};for(var Ge in nt)$a.indexOf(Ge)>-1?t.config[Ge]=Ca(nt[Ge]).map(r).concat(t.config[Ge]):typeof j[Ge]=="undefined"&&(t.config[Ge]=nt[Ge])}j.altInputClass||(t.config.altInputClass=ze().className+" "+t.config.altInputClass),st("onParseConfig")}function ze(){return t.config.wrap?n.querySelector("[data-input]"):n}function Ze(){typeof t.config.locale!="object"&&typeof Wt.l10ns[t.config.locale]=="undefined"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=rn(rn({},Wt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Wt.l10ns[t.config.locale]:void 0),os.D="("+t.l10n.weekdays.shorthand.join("|")+")",os.l="("+t.l10n.weekdays.longhand.join("|")+")",os.M="("+t.l10n.months.shorthand.join("|")+")",os.F="("+t.l10n.months.longhand.join("|")+")",os.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var I=rn(rn({},e),JSON.parse(JSON.stringify(n.dataset||{})));I.time_24hr===void 0&&Wt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=Ib(t),t.parseDate=mu({config:t.config,l10n:t.l10n})}function ge(I){if(typeof t.config.position=="function")return void t.config.position(t,I);if(t.calendarContainer!==void 0){st("onPreCalendarPosition");var j=I||t._positionElement,ee=Array.prototype.reduce.call(t.calendarContainer.children,function(Me,Ye){return Me+Ye.offsetHeight},0),de=t.calendarContainer.offsetWidth,Pe=t.config.position.split(" "),We=Pe[0],tt=Pe.length>1?Pe[1]:null,Je=j.getBoundingClientRect(),nt=window.innerHeight-Je.bottom,Ge=We==="above"||We!=="below"&&nt<ee&&Je.top>ee,et=window.pageYOffset+Je.top+(Ge?-ee-2:j.offsetHeight+2);if(cn(t.calendarContainer,"arrowTop",!Ge),cn(t.calendarContainer,"arrowBottom",Ge),!t.config.inline){var _t=window.pageXOffset+Je.left,Ft=!1,tn=!1;tt==="center"?(_t-=(de-Je.width)/2,Ft=!0):tt==="right"&&(_t-=de-Je.width,tn=!0),cn(t.calendarContainer,"arrowLeft",!Ft&&!tn),cn(t.calendarContainer,"arrowCenter",Ft),cn(t.calendarContainer,"arrowRight",tn);var In=window.document.body.offsetWidth-(window.pageXOffset+Je.right),Bt=_t+de>window.document.body.offsetWidth,ws=In+de>window.document.body.offsetWidth;if(cn(t.calendarContainer,"rightMost",Bt),!t.config.static)if(t.calendarContainer.style.top=et+"px",!Bt)t.calendarContainer.style.left=_t+"px",t.calendarContainer.style.right="auto";else if(!ws)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=In+"px";else{var Ss=Ee();if(Ss===void 0)return;var Ji=window.document.body.offsetWidth,ir=Math.max(0,Ji/2-de/2),$s=".flatpickr-calendar.centerMost:before",sr=".flatpickr-calendar.centerMost:after",Gi=Ss.cssRules.length,lr="{left:"+Je.left+"px;right:auto;}";cn(t.calendarContainer,"rightMost",!1),cn(t.calendarContainer,"centerMost",!0),Ss.insertRule($s+","+sr+lr,Gi),t.calendarContainer.style.left=ir+"px",t.calendarContainer.style.right="auto"}}}}function Ee(){for(var I=null,j=0;j<document.styleSheets.length;j++){var ee=document.styleSheets[j];if(!!ee.cssRules){try{ee.cssRules}catch{continue}I=ee;break}}return I!=null?I:x()}function x(){var I=document.createElement("style");return document.head.appendChild(I),I.sheet}function ae(){t.config.noCalendar||t.isMobile||(J(),xe(),R())}function Be(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function vt(I){I.preventDefault(),I.stopPropagation();var j=function(et){return et.classList&&et.classList.contains("flatpickr-day")&&!et.classList.contains("flatpickr-disabled")&&!et.classList.contains("notAllowed")},ee=Fb(Sn(I),j);if(ee!==void 0){var de=ee,Pe=t.latestSelectedDateObj=new Date(de.dateObj.getTime()),We=(Pe.getMonth()<t.currentMonth||Pe.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=de,t.config.mode==="single")t.selectedDates=[Pe];else if(t.config.mode==="multiple"){var tt=ce(Pe);tt?t.selectedDates.splice(parseInt(tt),1):t.selectedDates.push(Pe)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Pe,t.selectedDates.push(Pe),$n(Pe,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(et,_t){return et.getTime()-_t.getTime()}));if(c(),We){var Je=t.currentYear!==Pe.getFullYear();t.currentYear=Pe.getFullYear(),t.currentMonth=Pe.getMonth(),Je&&(st("onYearChange"),J()),st("onMonthChange")}if(xe(),R(),qt(),!We&&t.config.mode!=="range"&&t.config.showMonths===1?E(de):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 nt=t.config.mode==="single"&&!t.config.enableTime,Ge=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(nt||Ge)&&Be()}b()}}var it={locale:[Ze,ne],showMonths:[q,o,Y],minDate:[S],maxDate:[S],positionElement:[me],clickOpens:[function(){t.config.clickOpens===!0?(y(t._input,"focus",t.open),y(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function gt(I,j){if(I!==null&&typeof I=="object"){Object.assign(t.config,I);for(var ee in I)it[ee]!==void 0&&it[ee].forEach(function(de){return de()})}else t.config[I]=j,it[I]!==void 0?it[I].forEach(function(de){return de()}):$a.indexOf(I)>-1&&(t.config[I]=Ca(j));t.redraw(),qt(!0)}function at(I,j){var ee=[];if(I instanceof Array)ee=I.map(function(de){return t.parseDate(de,j)});else if(I instanceof Date||typeof I=="number")ee=[t.parseDate(I,j)];else if(typeof I=="string")switch(t.config.mode){case"single":case"time":ee=[t.parseDate(I,j)];break;case"multiple":ee=I.split(t.config.conjunction).map(function(de){return t.parseDate(de,j)});break;case"range":ee=I.split(t.l10n.rangeSeparator).map(function(de){return t.parseDate(de,j)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(I)));t.selectedDates=t.config.allowInvalidPreload?ee:ee.filter(function(de){return de instanceof Date&&ie(de,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(de,Pe){return de.getTime()-Pe.getTime()})}function yt(I,j,ee){if(j===void 0&&(j=!1),ee===void 0&&(ee=t.config.dateFormat),I!==0&&!I||I instanceof Array&&I.length===0)return t.clear(j);at(I,ee),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),S(void 0,j),d(),t.selectedDates.length===0&&t.clear(!1),qt(j),j&&st("onChange")}function zt(I){return I.slice().map(function(j){return typeof j=="string"||typeof j=="number"||j instanceof Date?t.parseDate(j,void 0,!0):j&&typeof j=="object"&&j.from&&j.to?{from:t.parseDate(j.from,void 0),to:t.parseDate(j.to,void 0)}:j}).filter(function(j){return j})}function Mt(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var I=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);I&&at(I,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()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>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 Ot(){if(t.input=ze(),!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=wt(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"),me()}function me(){t._positionElement=t.config.positionElement||t._input}function Ce(){var I=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=wt("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=I,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=I==="datetime-local"?"Y-m-d\\TH:i:S":I==="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{}y(t.mobileInput,"change",function(j){t.setDate(Sn(j).value,!1,t.mobileFormatStr),st("onChange"),st("onClose")})}function Ke(I){if(t.isOpen===!0)return t.close();t.open(I)}function st(I,j){if(t.config!==void 0){var ee=t.config[I];if(ee!==void 0&&ee.length>0)for(var de=0;ee[de]&&de<ee.length;de++)ee[de](t.selectedDates,t.input.value,t,j);I==="onChange"&&(t.input.dispatchEvent(fn("change")),t.input.dispatchEvent(fn("input")))}}function fn(I){var j=document.createEvent("Event");return j.initEvent(I,!0,!0),j}function ce(I){for(var j=0;j<t.selectedDates.length;j++){var ee=t.selectedDates[j];if(ee instanceof Date&&$n(ee,I)===0)return""+j}return!1}function Se(I){return t.config.mode!=="range"||t.selectedDates.length<2?!1:$n(I,t.selectedDates[0])>=0&&$n(I,t.selectedDates[1])<=0}function xe(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(I,j){var ee=new Date(t.currentYear,t.currentMonth,1);ee.setMonth(t.currentMonth+j),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[j].textContent=vo(ee.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ee.getMonth().toString(),I.value=ee.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Gt(I){var j=I||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ee){return t.formatDate(ee,j)}).filter(function(ee,de,Pe){return t.config.mode!=="range"||t.config.enableTime||Pe.indexOf(ee)===de}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function qt(I){I===void 0&&(I=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Gt(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Gt(t.config.altFormat)),I!==!1&&st("onValueUpdate")}function ii(I){var j=Sn(I),ee=t.prevMonthNav.contains(j),de=t.nextMonthNav.contains(j);ee||de?ye(ee?-1:1):t.yearElements.indexOf(j)>=0?j.select():j.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):j.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function pe(I){I.preventDefault();var j=I.type==="keydown",ee=Sn(I),de=ee;t.amPM!==void 0&&ee===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Hn(t.amPM.textContent===t.l10n.amPM[0])]);var Pe=parseFloat(de.getAttribute("min")),We=parseFloat(de.getAttribute("max")),tt=parseFloat(de.getAttribute("step")),Je=parseInt(de.value,10),nt=I.delta||(j?I.which===38?1:-1:0),Ge=Je+tt*nt;if(typeof de.value!="undefined"&&de.value.length===2){var et=de===t.hourElement,_t=de===t.minuteElement;Ge<Pe?(Ge=We+Ge+Hn(!et)+(Hn(et)&&Hn(!t.amPM)),_t&&C(void 0,-1,t.hourElement)):Ge>We&&(Ge=de===t.hourElement?Ge-We-Hn(!t.amPM):Pe,_t&&C(void 0,1,t.hourElement)),t.amPM&&et&&(tt===1?Ge+Je===23:Math.abs(Ge-Je)>tt)&&(t.amPM.textContent=t.l10n.amPM[Hn(t.amPM.textContent===t.l10n.amPM[0])]),de.value=yn(Ge)}}return s(),t}function Vs(n,e){for(var t=Array.prototype.slice.call(n).filter(function(r){return r instanceof HTMLElement}),i=[],s=0;s<t.length;s++){var l=t[s];try{if(l.getAttribute("data-fp-omit")!==null)continue;l._flatpickr!==void 0&&(l._flatpickr.destroy(),l._flatpickr=void 0),l._flatpickr=E4(l,e||{}),i.push(l._flatpickr)}catch(r){console.error(r)}}return i.length===1?i[0]:i}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return Vs(this,n)},HTMLElement.prototype.flatpickr=function(n){return Vs([this],n)});var Wt=function(n,e){return typeof n=="string"?Vs(window.document.querySelectorAll(n),e):n instanceof Node?Vs([n],e):Vs(n,e)};Wt.defaultConfig={};Wt.l10ns={en:rn({},zl),default:rn({},zl)};Wt.localize=function(n){Wt.l10ns.default=rn(rn({},Wt.l10ns.default),n)};Wt.setDefaults=function(n){Wt.defaultConfig=rn(rn({},Wt.defaultConfig),n)};Wt.parseDate=mu({});Wt.formatDate=Ib({});Wt.compareDates=$n;typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(n){return Vs(this,n)});Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))};typeof window!="undefined"&&(window.flatpickr=Wt);function P4(n){let e,t=[n[1]],i={};for(let s=0;s<t.length;s+=1)i=ct(i,t[s]);return{c(){e=_("input"),ci(e,i)},m(s,l){w(s,e,l),e.autofocus&&e.focus(),n[11](e)},p(s,l){ci(e,i=bn(t,[l&2&&s[1]]))},d(s){s&&k(e),n[11](null)}}}function L4(n){let e;const t=n[10].default,i=Tn(t,n,n[9],null),s=i||P4(n);return{c(){s&&s.c()},m(l,r){s&&s.m(l,r),e=!0},p(l,[r]){i?i.p&&(!e||r&512)&&An(i,t,l,l[9],e?Dn(t,l[9],r,null):En(l[9]),null):s&&s.p&&(!e||r&3)&&s.p(l,e?r:-1)},i(l){e||(A(s,l),e=!0)},o(l){F(s,l),e=!1},d(l){s&&s.d(l)}}}function F4(n){return n.charAt(2).toLowerCase()+n.substring(3)}function I4(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=Yt(e,i),{$$slots:l={},$$scope:r}=e;const o=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a="",formattedValue:u="",element:f=null,dateFormat:c=null}=e,{options:d={}}=e,h=!1,{input:g=void 0,flatpickr:y=void 0}=e;pi(()=>{const C=f||g,M=v(d);return M.onReady.push(()=>{t(8,h=!0)}),t(3,y=Wt(C,Object.assign(M,f?{wrap:!0}:{}))),()=>{y.destroy()}});const b=_n();function v(C={}){C=Object.assign({},C);for(const M of o){const T=(E,D,P)=>{b(F4(M),[E,D,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(S)&&C.onChange.push(S),C}function S(C,M,T){var D,P;const E=(P=(D=T==null?void 0:T.config)==null?void 0:D.mode)!=null?P:"single";t(2,a=E==="single"?C[0]:C),t(4,u=M)}function $(C){he[C?"unshift":"push"](()=>{g=C,t(0,g)})}return n.$$set=C=>{e=ct(ct({},e),di(C)),t(1,s=Yt(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,g=C.input),"flatpickr"in C&&t(3,y=C.flatpickr),"$$scope"in C&&t(9,r=C.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&y&&h&&y.setDate(a,!1,c),n.$$.dirty&392&&y&&h)for(const[C,M]of Object.entries(v(d)))y.set(C,M)},[g,s,a,y,u,f,c,d,h,r,l,$]}class pf extends Fe{constructor(e){super(),Le(this,e,I4,L4,Ae,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function N4(n){let e,t,i,s,l,r,o;function a(f){n[2](f)}let u={id:n[4],options:U.defaultFlatpickrOptions(),value:n[0].min};return n[0].min!==void 0&&(u.formattedValue=n[0].min),l=new pf({props:u}),he.push(()=>Re(l,"formattedValue",a)),{c(){e=_("label"),t=H("Min date (UTC)"),s=O(),B(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||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),!r&&c&1&&(r=!0,d.formattedValue=f[0].min,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function R4(n){let e,t,i,s,l,r,o;function a(f){n[3](f)}let u={id:n[4],options:U.defaultFlatpickrOptions(),value:n[0].max};return n[0].max!==void 0&&(u.formattedValue=n[0].max),l=new pf({props:u}),he.push(()=>Re(l,"formattedValue",a)),{c(){e=_("label"),t=H("Max date (UTC)"),s=O(),B(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||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),!r&&c&1&&(r=!0,d.formattedValue=f[0].max,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function j4(n){let e,t,i,s,l,r,o;return i=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[N4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[R4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!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}),r.$set(c)},i(a){o||(A(i.$$.fragment,a),A(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function H4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(o){n.$$.not_equal(s.min,o)&&(s.min=o,t(0,s))}function r(o){n.$$.not_equal(s.max,o)&&(s.max=o,t(0,s))}return n.$$set=o=>{"key"in o&&t(1,i=o.key),"options"in o&&t(0,s=o.options)},[s,i,l,r]}class q4 extends Fe{constructor(e){super(),Le(this,e,H4,j4,Ae,{key:1,options:0})}}function V4(n){let e,t,i,s,l,r,o,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 ks({props:c}),he.push(()=>Re(l,"value",f)),{c(){e=_("label"),t=H("Choices"),s=O(),B(l.$$.fragment),o=O(),a=_("div"),a.textContent="Use comma as separator.",p(e,"for",i=n[4]),p(a,"class","help-block")},m(d,h){w(d,e,h),m(e,t),w(d,s,h),V(l,d,h),w(d,o,h),w(d,a,h),u=!0},p(d,h){(!u||h&16&&i!==(i=d[4]))&&p(e,"for",i);const g={};h&16&&(g.id=d[4]),!r&&h&1&&(r=!0,g.value=d[0].values,je(()=>r=!1)),l.$set(g)},i(d){u||(A(l.$$.fragment,d),u=!0)},o(d){F(l.$$.fragment,d),u=!1},d(d){d&&k(e),d&&k(s),z(l,d),d&&k(o),d&&k(a)}}}function z4(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Max select"),s=O(),l=_("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",r=n[4]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].maxSelect),o||(a=X(l,"input",n[3]),o=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&r!==(r=u[4])&&p(l,"id",r),f&1&&Tt(l.value)!==u[0].maxSelect&&$e(l,u[0].maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function B4(n){let e,t,i,s,l,r,o;return i=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.values",$$slots:{default:[V4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[z4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!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}),r.$set(c)},i(a){o||(A(i.$$.fragment,a),A(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function U4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(o){n.$$.not_equal(s.values,o)&&(s.values=o,t(0,s))}function r(){s.maxSelect=Tt(this.value),t(0,s)}return n.$$set=o=>{"key"in o&&t(1,i=o.key),"options"in o&&t(0,s=o.options)},n.$$.update=()=>{n.$$.dirty&1&&U.isEmpty(s)&&t(0,s={maxSelect:1,values:[]})},[s,i,l,r]}class W4 extends Fe{constructor(e){super(),Le(this,e,U4,B4,Ae,{key:1,options:0})}}function Y4(n,e,t){return["",{}]}class K4 extends Fe{constructor(e){super(),Le(this,e,Y4,null,Ae,{key:0,options:1})}get key(){return this.$$.ctx[0]}get options(){return this.$$.ctx[1]}}function J4(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Max file size (bytes)"),s=O(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",r=n[9]),p(l,"step","1"),p(l,"min","0")},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].maxSize),o||(a=X(l,"input",n[2]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&1&&Tt(l.value)!==u[0].maxSize&&$e(l,u[0].maxSize)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function G4(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Max files"),s=O(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",r=n[9]),p(l,"step","1"),p(l,"min",""),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].maxSelect),o||(a=X(l,"input",n[3]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&1&&Tt(l.value)!==u[0].maxSelect&&$e(l,u[0].maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function Z4(n){let e,t,i,s,l,r,o;return{c(){e=_("div"),e.innerHTML='<span class="txt">Images (jpg, png, svg, gif)</span>',t=O(),i=_("div"),i.innerHTML='<span class="txt">Documents (pdf, doc/docx, xls/xlsx)</span>',s=O(),l=_("div"),l.innerHTML='<span class="txt">Archives (zip, 7zip, rar)</span>',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")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),r||(o=[X(e,"click",n[5]),X(i,"click",n[6]),X(l,"click",n[7])],r=!0)},p:re,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),r=!1,rt(o)}}}function x4(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S;function $(M){n[4](M)}let C={id:n[9],placeholder:"eg. image/png, application/pdf..."};return n[0].mimeTypes!==void 0&&(C.value=n[0].mimeTypes),o=new ks({props:C}),he.push(()=>Re(o,"value",$)),y=new ys({props:{class:"dropdown dropdown-sm dropdown-nowrap",$$slots:{default:[Z4]},$$scope:{ctx:n}}}),{c(){e=_("label"),t=_("span"),t.textContent="Mime types",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),c=H(`Use comma as separator.
-                `),d=_("span"),h=_("span"),h.textContent="Choose presets",g=O(),B(y.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[9]),p(h,"class","txt link-primary"),p(d,"class","inline-flex"),p(f,"class","help-block")},m(M,T){w(M,e,T),m(e,t),m(e,i),m(e,s),w(M,r,T),V(o,M,T),w(M,u,T),w(M,f,T),m(f,c),m(f,d),m(d,h),m(d,g),V(y,d,null),b=!0,v||(S=Xe(St.call(null,s,{text:`Allow uploading files ONLY with the listed mime types. 
- Leave empty for no restriction.`,position:"top"})),v=!0)},p(M,T){(!b||T&512&&l!==(l=M[9]))&&p(e,"for",l);const E={};T&512&&(E.id=M[9]),!a&&T&1&&(a=!0,E.value=M[0].mimeTypes,je(()=>a=!1)),o.$set(E);const D={};T&1025&&(D.$$scope={dirty:T,ctx:M}),y.$set(D)},i(M){b||(A(o.$$.fragment,M),A(y.$$.fragment,M),b=!0)},o(M){F(o.$$.fragment,M),F(y.$$.fragment,M),b=!1},d(M){M&&k(e),M&&k(r),z(o,M),M&&k(u),M&&k(f),z(y),v=!1,S()}}}function X4(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(b){n[8](b)}let y={id:n[9],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(y.value=n[0].thumbs),o=new ks({props:y}),he.push(()=>Re(o,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Thumb sizes",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[9]),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),w(b,r,v),V(o,b,v),w(b,u,v),w(b,f,v),c=!0,d||(h=Xe(St.call(null,s,{text:"List of thumb sizes for image files. The thumbs will be generated lazily on first access.",position:"top"})),d=!0)},p(b,v){(!c||v&512&&l!==(l=b[9]))&&p(e,"for",l);const S={};v&512&&(S.id=b[9]),!a&&v&1&&(a=!0,S.value=b[0].thumbs,je(()=>a=!1)),o.$set(S)},i(b){c||(A(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function Q4(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;return i=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[J4,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[G4,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[x4,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[X4,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),f=O(),c=_("div"),B(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(g,y){w(g,e,y),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),h=!0},p(g,[y]){const b={};y&2&&(b.name="schema."+g[1]+".options.maxSize"),y&1537&&(b.$$scope={dirty:y,ctx:g}),i.$set(b);const v={};y&2&&(v.name="schema."+g[1]+".options.maxSelect"),y&1537&&(v.$$scope={dirty:y,ctx:g}),r.$set(v);const S={};y&2&&(S.name="schema."+g[1]+".options.mimeTypes"),y&1537&&(S.$$scope={dirty:y,ctx:g}),u.$set(S);const $={};y&2&&($.name="schema."+g[1]+".options.thumbs"),y&1537&&($.$$scope={dirty:y,ctx:g}),d.$set($)},i(g){h||(A(i.$$.fragment,g),A(r.$$.fragment,g),A(u.$$.fragment,g),A(d.$$.fragment,g),h=!0)},o(g){F(i.$$.fragment,g),F(r.$$.fragment,g),F(u.$$.fragment,g),F(d.$$.fragment,g),h=!1},d(g){g&&k(e),z(i),z(r),z(u),z(d)}}}function eM(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=Tt(this.value),t(0,s)}function r(){s.maxSelect=Tt(this.value),t(0,s)}function o(d){n.$$.not_equal(s.mimeTypes,d)&&(s.mimeTypes=d,t(0,s))}const a=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},u=()=>{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)},f=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function c(d){n.$$.not_equal(s.thumbs,d)&&(s.thumbs=d,t(0,s))}return n.$$set=d=>{"key"in d&&t(1,i=d.key),"options"in d&&t(0,s=d.options)},n.$$.update=()=>{n.$$.dirty&1&&U.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,r,o,a,u,f,c]}class tM extends Fe{constructor(e){super(),Le(this,e,eM,Q4,Ae,{key:1,options:0})}}function nM(n){let e,t,i,s,l,r,o;function a(f){n[5](f)}let u={searchable:n[3].length>5,selectPlaceholder:n[2]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[3]};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new vs({props:u}),he.push(()=>Re(l,"keyOfSelected",a)),{c(){e=_("label"),t=H("Collection"),s=O(),B(l.$$.fragment),p(e,"for",i=n[9])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&512&&i!==(i=f[9]))&&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]),!r&&c&1&&(r=!0,d.keyOfSelected=f[0].collectionId,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function iM(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Max select"),s=O(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",r=n[9]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].maxSelect),o||(a=X(l,"input",n[6]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&1&&Tt(l.value)!==u[0].maxSelect&&$e(l,u[0].maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function sM(n){let e,t,i,s,l,r,o;function a(f){n[7](f)}let u={id:n[9],items:n[4]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new vs({props:u}),he.push(()=>Re(l,"keyOfSelected",a)),{c(){e=_("label"),t=H("Delete record on relation delete"),s=O(),B(l.$$.fragment),p(e,"for",i=n[9])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&512&&i!==(i=f[9]))&&p(e,"for",i);const d={};c&512&&(d.id=f[9]),!r&&c&1&&(r=!0,d.keyOfSelected=f[0].cascadeDelete,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function lM(n){let e,t,i,s,l,r,o,a,u,f;return i=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[nM,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[iM,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[sM,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(c,d){w(c,e,d),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),f=!0},p(c,[d]){const h={};d&2&&(h.name="schema."+c[1]+".options.collectionId"),d&1549&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const g={};d&2&&(g.name="schema."+c[1]+".options.maxSelect"),d&1537&&(g.$$scope={dirty:d,ctx:c}),r.$set(g);const y={};d&2&&(y.name="schema."+c[1]+".options.cascadeDelete"),d&1537&&(y.$$scope={dirty:d,ctx:c}),u.$set(y)},i(c){f||(A(i.$$.fragment,c),A(r.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){F(i.$$.fragment,c),F(r.$$.fragment,c),F(u.$$.fragment,c),f=!1},d(c){c&&k(e),z(i),z(r),z(u)}}}function rM(n,e,t){let{key:i=""}=e,{options:s={}}=e;const l=[{label:"False",value:!1},{label:"True",value:!0}];let r=!1,o=[];a();function a(){t(2,r=!0),we.Collections.getFullList(200,{sort:"-created"}).then(d=>{t(3,o=d)}).catch(d=>{we.errorResponseHandler(d)}).finally(()=>{t(2,r=!1)})}function u(d){n.$$.not_equal(s.collectionId,d)&&(s.collectionId=d,t(0,s))}function f(){s.maxSelect=Tt(this.value),t(0,s)}function c(d){n.$$.not_equal(s.cascadeDelete,d)&&(s.cascadeDelete=d,t(0,s))}return n.$$set=d=>{"key"in d&&t(1,i=d.key),"options"in d&&t(0,s=d.options)},n.$$.update=()=>{n.$$.dirty&1&&U.isEmpty(s)&&t(0,s={maxSelect:1,collectionId:null,cascadeDelete:!1})},[s,i,r,o,l,u,f,c]}class oM extends Fe{constructor(e){super(),Le(this,e,rM,lM,Ae,{key:1,options:0})}}function aM(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Max select"),s=O(),l=_("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",r=n[5]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].maxSelect),o||(a=X(l,"input",n[3]),o=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&r!==(r=u[5])&&p(l,"id",r),f&1&&Tt(l.value)!==u[0].maxSelect&&$e(l,u[0].maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function uM(n){let e,t,i,s,l,r,o;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 vs({props:u}),he.push(()=>Re(l,"keyOfSelected",a)),{c(){e=_("label"),t=H("Delete record on user delete"),s=O(),B(l.$$.fragment),p(e,"for",i=n[5])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&32&&i!==(i=f[5]))&&p(e,"for",i);const d={};c&32&&(d.id=f[5]),!r&&c&1&&(r=!0,d.keyOfSelected=f[0].cascadeDelete,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function fM(n){let e,t,i,s,l,r,o;return i=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[aM,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[uM,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!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}),r.$set(c)},i(a){o||(A(i.$$.fragment,a),A(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function cM(n,e,t){const i=[{label:"False",value:!1},{label:"True",value:!0}];let{key:s=""}=e,{options:l={}}=e;function r(){l.maxSelect=Tt(this.value),t(0,l)}function o(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&&U.isEmpty(l)&&t(0,l={maxSelect:1,cascadeDelete:!1})},[l,s,i,r,o]}class dM extends Fe{constructor(e){super(),Le(this,e,cM,fM,Ae,{key:1,options:0})}}function pM(n){let e,t,i,s,l,r,o;function a(f){n[15](f)}let u={id:n[37],disabled:n[0].id};return n[0].type!==void 0&&(u.value=n[0].type),l=new i4({props:u}),he.push(()=>Re(l,"value",a)),{c(){e=_("label"),t=H("Type"),s=O(),B(l.$$.fragment),p(e,"for",i=n[37])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c[1]&64&&i!==(i=f[37]))&&p(e,"for",i);const d={};c[1]&64&&(d.id=f[37]),c[0]&1&&(d.disabled=f[0].id),!r&&c[0]&1&&(r=!0,d.value=f[0].type,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function hM(n){let e,t,i,s,l,r,o,a,u,f,c;return{c(){e=_("label"),t=H("Name"),s=O(),l=_("input"),p(e,"for",i=n[37]),p(l,"type","text"),p(l,"id",r=n[37]),l.required=!0,l.disabled=o=n[0].id&&n[0].system,p(l,"spellcheck","false"),l.autofocus=a=!n[0].id,l.value=u=n[0].name},m(d,h){w(d,e,h),m(e,t),w(d,s,h),w(d,l,h),n[0].id||l.focus(),f||(c=X(l,"input",n[16]),f=!0)},p(d,h){h[1]&64&&i!==(i=d[37])&&p(e,"for",i),h[1]&64&&r!==(r=d[37])&&p(l,"id",r),h[0]&1&&o!==(o=d[0].id&&d[0].system)&&(l.disabled=o),h[0]&1&&a!==(a=!d[0].id)&&(l.autofocus=a),h[0]&1&&u!==(u=d[0].name)&&l.value!==u&&(l.value=u)},d(d){d&&k(e),d&&k(s),d&&k(l),f=!1,c()}}}function mM(n){let e,t,i;function s(r){n[27](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new dM({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function gM(n){let e,t,i;function s(r){n[26](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new oM({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function _M(n){let e,t,i;function s(r){n[25](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new tM({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function bM(n){let e,t,i;function s(r){n[24](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new K4({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function yM(n){let e,t,i;function s(r){n[23](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new W4({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function vM(n){let e,t,i;function s(r){n[22](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new q4({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function kM(n){let e,t,i;function s(r){n[21](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new C4({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function wM(n){let e,t,i;function s(r){n[20](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new Lb({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function SM(n){let e,t,i;function s(r){n[19](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new g4({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function $M(n){let e,t,i;function s(r){n[18](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new h4({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function CM(n){let e,t,i;function s(r){n[17](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new u4({props:l}),he.push(()=>Re(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function MM(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Required"),p(e,"type","checkbox"),p(e,"id",t=n[37]),p(s,"for",r=n[37])},m(u,f){w(u,e,f),e.checked=n[0].required,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[28]),o=!0)},p(u,f){f[1]&64&&t!==(t=u[37])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].required),f[1]&64&&r!==(r=u[37])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Lp(n){let e,t;return e=new Ne({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[OM,({uniqueId:i})=>({37:i}),({uniqueId:i})=>[0,i?64:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&192&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function OM(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[37]),p(s,"for",r=n[37])},m(u,f){w(u,e,f),e.checked=n[0].unique,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[29]),o=!0)},p(u,f){f[1]&64&&t!==(t=u[37])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&64&&r!==(r=u[37])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function TM(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M;s=new Ne({props:{class:"form-field required "+(n[0].id?"disabled":""),name:"schema."+n[1]+".type",$$slots:{default:[pM,({uniqueId:L})=>({37:L}),({uniqueId:L})=>[0,L?64:0]]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required "+(n[0].id&&n[0].system?"disabled":""),name:"schema."+n[1]+".name",$$slots:{default:[hM,({uniqueId:L})=>({37:L}),({uniqueId:L})=>[0,L?64:0]]},$$scope:{ctx:n}}});const T=[CM,$M,SM,wM,kM,vM,yM,bM,_M,gM,mM],E=[];function D(L,N){return L[0].type==="text"?0:L[0].type==="number"?1:L[0].type==="bool"?2:L[0].type==="email"?3:L[0].type==="url"?4:L[0].type==="date"?5:L[0].type==="select"?6:L[0].type==="json"?7:L[0].type==="file"?8:L[0].type==="relation"?9:L[0].type==="user"?10:-1}~(f=D(n))&&(c=E[f]=T[f](n)),g=new Ne({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[MM,({uniqueId:L})=>({37:L}),({uniqueId:L})=>[0,L?64:0]]},$$scope:{ctx:n}}});let P=n[0].type!=="file"&&Lp(n);return{c(){e=_("form"),t=_("div"),i=_("div"),B(s.$$.fragment),l=O(),r=_("div"),B(o.$$.fragment),a=O(),u=_("div"),c&&c.c(),d=O(),h=_("div"),B(g.$$.fragment),y=O(),b=_("div"),P&&P.c(),v=O(),S=_("input"),p(i,"class","col-sm-6"),p(r,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(h,"class","col-4"),p(b,"class","col-4"),p(t,"class","grid"),p(S,"type","submit"),p(S,"class","hidden"),p(S,"tabindex","-1"),p(e,"class","field-form")},m(L,N){w(L,e,N),m(e,t),m(t,i),V(s,i,null),m(t,l),m(t,r),V(o,r,null),m(t,a),m(t,u),~f&&E[f].m(u,null),m(t,d),m(t,h),V(g,h,null),m(t,y),m(t,b),P&&P.m(b,null),m(e,v),m(e,S),$=!0,C||(M=X(e,"submit",Kt(n[30])),C=!0)},p(L,N){const R={};N[0]&1&&(R.class="form-field required "+(L[0].id?"disabled":"")),N[0]&2&&(R.name="schema."+L[1]+".type"),N[0]&1|N[1]&192&&(R.$$scope={dirty:N,ctx:L}),s.$set(R);const J={};N[0]&1&&(J.class="form-field required "+(L[0].id&&L[0].system?"disabled":"")),N[0]&2&&(J.name="schema."+L[1]+".name"),N[0]&1|N[1]&192&&(J.$$scope={dirty:N,ctx:L}),o.$set(J);let W=f;f=D(L),f===W?~f&&E[f].p(L,N):(c&&(Oe(),F(E[W],1,1,()=>{E[W]=null}),Te()),~f?(c=E[f],c?c.p(L,N):(c=E[f]=T[f](L),c.c()),A(c,1),c.m(u,null)):c=null);const q={};N[0]&1|N[1]&192&&(q.$$scope={dirty:N,ctx:L}),g.$set(q),L[0].type!=="file"?P?(P.p(L,N),N[0]&1&&A(P,1)):(P=Lp(L),P.c(),A(P,1),P.m(b,null)):P&&(Oe(),F(P,1,1,()=>{P=null}),Te())},i(L){$||(A(s.$$.fragment,L),A(o.$$.fragment,L),A(c),A(g.$$.fragment,L),A(P),$=!0)},o(L){F(s.$$.fragment,L),F(o.$$.fragment,L),F(c),F(g.$$.fragment,L),F(P),$=!1},d(L){L&&k(e),z(s),z(o),~f&&E[f].d(),z(g),P&&P.d(),C=!1,M()}}}function Fp(n){let e,t,i,s,l=n[0].system&&Ip(),r=!n[0].id&&Np(n),o=n[0].required&&Rp(),a=n[0].unique&&jp();return{c(){e=_("div"),l&&l.c(),t=O(),r&&r.c(),i=O(),o&&o.c(),s=O(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){w(u,e,f),l&&l.m(e,null),m(e,t),r&&r.m(e,null),m(e,i),o&&o.m(e,null),m(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Ip(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?r&&(r.d(1),r=null):r?r.p(u,f):(r=Np(u),r.c(),r.m(e,i)),u[0].required?o||(o=Rp(),o.c(),o.m(e,s)):o&&(o.d(1),o=null),u[0].unique?a||(a=jp(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),l&&l.d(),r&&r.d(),o&&o.d(),a&&a.d()}}}function Ip(n){let e;return{c(){e=_("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Np(n){let e;return{c(){e=_("span"),e.textContent="New",p(e,"class","label"),Q(e,"label-warning",n[7]&&!n[0].toDelete)},m(t,i){w(t,e,i)},p(t,i){i[0]&129&&Q(e,"label-warning",t[7]&&!t[0].toDelete)},d(t){t&&k(e)}}}function Rp(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function jp(n){let e;return{c(){e=_("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Hp(n){let e,t,i,s,l,r;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=St.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){s||(Dt(()=>{i||(i=ft(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){i||(i=ft(e,Wn,{duration:150,start:.7},!1)),i.run(0),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function qp(n){let e,t,i,s,l,r,o=n[7]&&Vp(n);return{c(){e=_("div"),t=_("button"),t.innerHTML='<span class="txt">Remove</span>',i=O(),o&&o.c(),p(t,"type","button"),p(t,"class","btn btn-sm fade p-l-0 p-r-0"),p(e,"class","inline-flex flex-gap-sm flex-nowrap")},m(a,u){w(a,e,u),m(e,t),m(e,i),o&&o.m(e,null),l||(r=X(t,"click",Un(n[8])),l=!0)},p(a,u){a[7]?o?o.p(a,u):(o=Vp(a),o.c(),o.m(e,null)):o&&(o.d(1),o=null)},i(a){s||Dt(()=>{s=vu(e,ni,{duration:200,x:20,opacity:0}),s.start()})},o:re,d(a){a&&k(e),o&&o.d(),l=!1,r()}}}function Vp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Done</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",Un(n[3])),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function zp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Restore</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){w(s,e,l),t||(i=X(e,"click",Un(n[14])),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function DM(n){let e,t,i,s,l,r,o=(n[0].name||"-")+"",a,u,f,c,d,h,g,y,b,v,S=!n[0].toDelete&&Fp(n),$=n[6]&&Hp(),C=n[36]&&!n[0].toDelete&&qp(n),M=n[0].toDelete&&zp(n);return{c(){e=_("div"),t=_("span"),i=_("i"),l=O(),r=_("strong"),a=H(o),f=O(),S&&S.c(),c=O(),d=_("div"),h=O(),$&&$.c(),g=O(),C&&C.c(),y=O(),M&&M.c(),b=lt(),p(i,"class",s=_f(U.getFieldTypeIcon(n[0].type))+" svelte-162uq6"),p(t,"class","icon field-type"),p(r,"class","title field-name svelte-162uq6"),p(r,"title",u=n[0].name),Q(r,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(T,E){w(T,e,E),m(e,t),m(t,i),m(e,l),m(e,r),m(r,a),w(T,f,E),S&&S.m(T,E),w(T,c,E),w(T,d,E),w(T,h,E),$&&$.m(T,E),w(T,g,E),C&&C.m(T,E),w(T,y,E),M&&M.m(T,E),w(T,b,E),v=!0},p(T,E){(!v||E[0]&1&&s!==(s=_f(U.getFieldTypeIcon(T[0].type))+" svelte-162uq6"))&&p(i,"class",s),(!v||E[0]&1)&&o!==(o=(T[0].name||"-")+"")&&_e(a,o),(!v||E[0]&1&&u!==(u=T[0].name))&&p(r,"title",u),E[0]&1&&Q(r,"txt-strikethrough",T[0].toDelete),T[0].toDelete?S&&(S.d(1),S=null):S?S.p(T,E):(S=Fp(T),S.c(),S.m(c.parentNode,c)),T[6]?$?E[0]&64&&A($,1):($=Hp(),$.c(),A($,1),$.m(g.parentNode,g)):$&&(Oe(),F($,1,1,()=>{$=null}),Te()),T[36]&&!T[0].toDelete?C?(C.p(T,E),E[0]&1|E[1]&32&&A(C,1)):(C=qp(T),C.c(),A(C,1),C.m(y.parentNode,y)):C&&(C.d(1),C=null),T[0].toDelete?M?M.p(T,E):(M=zp(T),M.c(),M.m(b.parentNode,b)):M&&(M.d(1),M=null)},i(T){v||(A($),A(C),v=!0)},o(T){F($),v=!1},d(T){T&&k(e),T&&k(f),S&&S.d(T),T&&k(c),T&&k(d),T&&k(h),$&&$.d(T),T&&k(g),C&&C.d(T),T&&k(y),M&&M.d(T),T&&k(b)}}}function AM(n){let e,t,i={single:!0,interactive:n[7],class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion",$$slots:{header:[DM,({active:s})=>({36:s}),({active:s})=>[0,s?32:0]],default:[TM]},$$scope:{ctx:n}};return e=new df({props:i}),n[31](e),e.$on("expand",n[32]),e.$on("collapse",n[33]),e.$on("toggle",n[34]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&128&&(r.interactive=s[7]),l[0]&5&&(r.class=s[2]||s[0].toDelete||s[0].system?"field-accordion disabled":"field-accordion"),l[0]&227|l[1]&160&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[31](null),z(e,s)}}}function EM(n,e,t){let i,s,l,r;hn(n,_s,Z=>t(13,r=Z));const o=_n();let{key:a="0"}=e,{field:u=new wn}=e,{disabled:f=!1}=e,{excludeNames:c=[]}=e,d,h=u.type;function g(){d==null||d.expand()}function y(){d==null||d.collapse()}function b(){u.id?t(0,u.toDelete=!0,u):(y(),o("remove"))}function v(Z){Z=U.slugify(Z);let De="";for(;c.includes(Z+De);)++De;return Z+De}pi(()=>{u.id||g()});const S=()=>{t(0,u.toDelete=!1,u)};function $(Z){n.$$.not_equal(u.type,Z)&&(u.type=Z,t(0,u),t(12,h),t(10,c),t(4,d))}const C=Z=>{t(0,u.name=v(Z.target.value),u),Z.target.value=u.name};function M(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function T(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function E(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function D(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function P(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function L(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function N(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function R(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function J(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function W(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function q(Z){n.$$.not_equal(u.options,Z)&&(u.options=Z,t(0,u),t(12,h),t(10,c),t(4,d))}function G(){u.required=this.checked,t(0,u),t(12,h),t(10,c),t(4,d)}function K(){u.unique=this.checked,t(0,u),t(12,h),t(10,c),t(4,d)}const Y=()=>{i&&y()};function ne(Z){he[Z?"unshift":"push"](()=>{d=Z,t(4,d)})}function fe(Z){ut.call(this,n,Z)}function ye(Z){ut.call(this,n,Z)}function se(Z){ut.call(this,n,Z)}return n.$$set=Z=>{"key"in Z&&t(1,a=Z.key),"field"in Z&&t(0,u=Z.field),"disabled"in Z&&t(2,f=Z.disabled),"excludeNames"in Z&&t(10,c=Z.excludeNames)},n.$$.update=()=>{if(n.$$.dirty[0]&4097&&h!=u.type&&(t(12,h=u.type),t(0,u.options={},u),t(0,u.unique=!1,u)),n.$$.dirty[0]&1025&&c.length){const Z=v(u.name);u.name!==Z&&t(0,u.name=Z,u)}n.$$.dirty[0]&17&&u.toDelete&&(d&&y(),!u.name&&u.originalName&&t(0,u.name=u.originalName,u)),n.$$.dirty[0]&1&&!u.originalName&&u.name&&t(0,u.originalName=u.name,u),n.$$.dirty[0]&1&&typeof u.toDelete=="undefined"&&t(0,u.toDelete=!1,u),n.$$.dirty[0]&1&&t(5,i=!U.isEmpty(u.name)&&u.type),n.$$.dirty[0]&48&&(i||d&&g()),n.$$.dirty[0]&37&&t(7,s=!f&&!u.system&&!u.toDelete&&i),n.$$.dirty[0]&8194&&t(6,l=!U.isEmpty(U.getNestedVal(r,`schema.${a}`)))},[u,a,f,y,d,i,l,s,b,v,c,g,h,r,S,$,C,M,T,E,D,P,L,N,R,J,W,q,G,K,Y,ne,fe,ye,se]}class PM extends Fe{constructor(e){super(),Le(this,e,EM,AM,Ae,{key:1,field:0,disabled:2,excludeNames:10,expand:11,collapse:3},null,[-1,-1])}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[3]}}function Bp(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Up(n,e){let t,i,s,l;function r(u){e[5](u,e[9],e[10],e[11])}function o(){return e[6](e[11])}let a={key:e[11],excludeNames:e[1].concat(e[4](e[9]))};return e[9]!==void 0&&(a.field=e[9]),i=new PM({props:a}),he.push(()=>Re(i,"field",r)),i.$on("remove",o),{key:n,first:null,c(){t=lt(),B(i.$$.fragment),this.first=t},m(u,f){w(u,t,f),V(i,u,f),l=!0},p(u,f){e=u;const c={};f&1&&(c.key=e[11]),f&1&&(c.excludeNames=e[1].concat(e[4](e[9]))),!s&&f&1&&(s=!0,c.field=e[9],je(()=>s=!1)),i.$set(c)},i(u){l||(A(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&k(t),z(i,u)}}}function LM(n){let e,t=[],i=new Map,s,l,r,o,a,u,f,c,d,h,g,y=n[0].schema;const b=v=>v[11];for(let v=0;v<y.length;v+=1){let S=Bp(n,y,v),$=b(S);i.set($,t[v]=Up($,S))}return{c(){var v;e=_("div");for(let S=0;S<t.length;S+=1)t[S].c();s=O(),l=_("div"),r=O(),o=_("button"),a=_("i"),u=O(),f=_("span"),f.textContent="New field",p(e,"class","accordions"),p(l,"class","clearfix m-t-xs"),p(a,"class","ri-add-line"),p(f,"class","txt"),p(o,"type","button"),p(o,"class",c="btn btn-block "+((v=n[0].schema)!=null&&v.length?"btn-secondary":"btn-success"))},m(v,S){w(v,e,S);for(let $=0;$<t.length;$+=1)t[$].m(e,null);w(v,s,S),w(v,l,S),w(v,r,S),w(v,o,S),m(o,a),m(o,u),m(o,f),d=!0,h||(g=X(o,"click",n[3]),h=!0)},p(v,[S]){var $;S&23&&(y=v[0].schema,Oe(),t=ot(t,S,b,1,v,y,i,e,Lt,Up,null,Bp),Te()),(!d||S&1&&c!==(c="btn btn-block "+(($=v[0].schema)!=null&&$.length?"btn-secondary":"btn-success")))&&p(o,"class",c)},i(v){if(!d){for(let S=0;S<y.length;S+=1)A(t[S]);d=!0}},o(v){for(let S=0;S<t.length;S+=1)F(t[S]);d=!1},d(v){v&&k(e);for(let S=0;S<t.length;S+=1)t[S].d();v&&k(s),v&&k(l),v&&k(r),v&&k(o),h=!1,g()}}}function FM(n,e,t){const i=["id","created","updated"];let{collection:s={}}=e;function l(d){s.schema[d]&&(s.schema.splice(d,1),t(0,s))}function r(){const d=new wn({name:o()});s.schema.push(d),t(0,s)}function o(d="field"){let h="";for(;a(d+h);)++h;return d+h}function a(d){return!!s.schema.find(h=>h.name===d)}function u(d){let h=[];for(let g of s.schema)g!==d&&(h.push(g.name),g.id&&g.originalName!==""&&g.originalName!==g.name&&h.push(g.originalName));return h}function f(d,h,g,y){g[y]=d,t(0,s)}const c=d=>l(d);return n.$$set=d=>{"collection"in d&&t(0,s=d.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof(s==null?void 0:s.schema)=="undefined"&&(t(0,s=s||{}),t(0,s.schema=[],s))},[s,i,l,r,u,f,c]}class IM extends Fe{constructor(e){super(),Le(this,e,FM,LM,Ae,{collection:0})}}function Wp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[16]=e,i[17]=t,i}function Yp(n,e,t){const i=n.slice();return i[19]=e[t],i}function Kp(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L,N,R,J,W,q=n[0].schema,G=[];for(let K=0;K<q.length;K+=1)G[K]=Jp(Yp(n,q,K));return{c(){e=_("div"),t=_("div"),i=_("div"),s=_("p"),s.textContent="The following record fields are available:",l=O(),r=_("div"),o=_("code"),o.textContent="id",a=O(),u=_("code"),u.textContent="created",f=O(),c=_("code"),c.textContent="updated",d=O();for(let K=0;K<G.length;K+=1)G[K].c();h=O(),g=_("hr"),y=O(),b=_("p"),b.innerHTML="The request fields could be accessed with the special <em>@request</em> filter:",v=O(),S=_("div"),S.innerHTML=`<code>@request.method</code> 
-                        <code>@request.query.*</code> 
-                        <code>@request.data.*</code> 
-                        <code>@request.user.*</code>`,$=O(),C=_("hr"),M=O(),T=_("p"),T.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",E=O(),D=_("div"),D.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",P=O(),L=_("hr"),N=O(),R=_("p"),R.innerHTML=`Example rule:
-                        <br/> 
-                        <code>@request.user.id!=null &amp;&amp; created&gt;&quot;2022-01-01 00:00:00&quot;</code>`,p(s,"class","m-b-0"),p(r,"class","inline-flex flex-gap-5"),p(g,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(S,"class","inline-flex flex-gap-5"),p(C,"class","m-t-10 m-b-5"),p(T,"class","m-b-0"),p(D,"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(K,Y){w(K,e,Y),m(e,t),m(t,i),m(i,s),m(i,l),m(i,r),m(r,o),m(r,a),m(r,u),m(r,f),m(r,c),m(r,d);for(let ne=0;ne<G.length;ne+=1)G[ne].m(r,null);m(i,h),m(i,g),m(i,y),m(i,b),m(i,v),m(i,S),m(i,$),m(i,C),m(i,M),m(i,T),m(i,E),m(i,D),m(i,P),m(i,L),m(i,N),m(i,R),W=!0},p(K,Y){if(Y&1){q=K[0].schema;let ne;for(ne=0;ne<q.length;ne+=1){const fe=Yp(K,q,ne);G[ne]?G[ne].p(fe,Y):(G[ne]=Jp(fe),G[ne].c(),G[ne].m(r,null))}for(;ne<G.length;ne+=1)G[ne].d(1);G.length=q.length}},i(K){W||(K&&Dt(()=>{J||(J=ft(e,un,{duration:150},!0)),J.run(1)}),W=!0)},o(K){K&&(J||(J=ft(e,un,{duration:150},!1)),J.run(0)),W=!1},d(K){K&&k(e),Bn(G,K),K&&J&&J.end()}}}function NM(n){let e,t=n[19].name+"",i;return{c(){e=_("code"),i=H(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&1&&t!==(t=s[19].name+"")&&_e(i,t)},d(s){s&&k(e)}}}function RM(n){let e,t=n[19].name+"",i,s;return{c(){e=_("code"),i=H(t),s=H(".*")},m(l,r){w(l,e,r),m(e,i),m(e,s)},p(l,r){r&1&&t!==(t=l[19].name+"")&&_e(i,t)},d(l){l&&k(e)}}}function Jp(n){let e;function t(l,r){return l[19].type==="relation"||l[19].type==="user"?RM:NM}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function jM(n){let e=[],t=new Map,i,s,l=Object.entries(n[6]);const r=o=>o[14];for(let o=0;o<l.length;o+=1){let a=Wp(n,l,o),u=r(a);t.set(u,e[o]=Gp(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=lt()},m(o,a){for(let u=0;u<e.length;u+=1)e[u].m(o,a);w(o,i,a),s=!0},p(o,a){a&262235&&(l=Object.entries(o[6]),Oe(),e=ot(e,a,r,1,o,l,t,i.parentNode,Lt,Gp,i,Wp),Te())},i(o){if(!s){for(let a=0;a<l.length;a+=1)A(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)F(e[a]);s=!1},d(o){for(let a=0;a<e.length;a+=1)e[a].d(o);o&&k(i)}}}function HM(n){let e;return{c(){e=_("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function qM(n){let e,t,i;function s(){return n[9](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Lock and set to Admins only")),X(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,rt(i)}}}function VM(n){let e,t,i;function s(){return n[8](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-unlock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Unlock and set custom rule")),X(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,rt(i)}}}function zM(n){let e;return{c(){e=H("Leave empty to grant everyone access")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function BM(n){let e;return{c(){e=H("Only admins will be able to access (unlock to change)")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function UM(n){let e,t=n[15]+"",i,s,l=Ri(n[0][n[14]])?"Admins only":"Custom rule",r,o,a,u,f=n[14],c,d,h,g,y,b,v;function S(){return n[10](n[14])}const $=()=>n[11](u,f),C=()=>n[11](null,f);function M(N){n[12](N,n[14])}var T=n[4];function E(N){let R={baseCollection:N[0],disabled:Ri(N[0][N[14]])};return N[0][N[14]]!==void 0&&(R.value=N[0][N[14]]),{props:R}}T&&(u=new T(E(n)),$(),he.push(()=>Re(u,"value",M)));function D(N,R){return R&1&&(g=null),g==null&&(g=!!Ri(N[0][N[14]])),g?BM:zM}let P=D(n,-1),L=P(n);return{c(){e=_("label"),i=H(t),s=H(" - "),r=H(l),a=O(),u&&B(u.$$.fragment),d=O(),h=_("div"),L.c(),p(e,"for",o=n[18]),p(h,"class","help-block")},m(N,R){w(N,e,R),m(e,i),m(e,s),m(e,r),w(N,a,R),u&&V(u,N,R),w(N,d,R),w(N,h,R),L.m(h,null),y=!0,b||(v=X(e,"click",S),b=!0)},p(N,R){n=N,(!y||R&1)&&l!==(l=Ri(n[0][n[14]])?"Admins only":"Custom rule")&&_e(r,l),(!y||R&262144&&o!==(o=n[18]))&&p(e,"for",o),f!==n[14]&&(C(),f=n[14],$());const J={};if(R&1&&(J.baseCollection=n[0]),R&1&&(J.disabled=Ri(n[0][n[14]])),!c&&R&65&&(c=!0,J.value=n[0][n[14]],je(()=>c=!1)),T!==(T=n[4])){if(u){Oe();const W=u;F(W.$$.fragment,1,0,()=>{z(W,1)}),Te()}T?(u=new T(E(n)),$(),he.push(()=>Re(u,"value",M)),B(u.$$.fragment),A(u.$$.fragment,1),V(u,d.parentNode,d)):u=null}else T&&u.$set(J);P!==(P=D(n,R))&&(L.d(1),L=P(n),L&&(L.c(),L.m(h,null)))},i(N){y||(u&&A(u.$$.fragment,N),y=!0)},o(N){u&&F(u.$$.fragment,N),y=!1},d(N){N&&k(e),N&&k(a),C(),u&&z(u,N),N&&k(d),N&&k(h),L.d(),b=!1,v()}}}function Gp(n,e){let t,i,s,l,r,o,a,u;function f(h,g){return g&1&&(l=null),l==null&&(l=!!Ri(h[0][h[14]])),l?VM:qM}let c=f(e,-1),d=c(e);return o=new Ne({props:{class:"form-field rule-field m-0 "+(Ri(e[0][e[14]])?"disabled":""),name:e[14],$$slots:{default:[UM,({uniqueId:h})=>({18:h}),({uniqueId:h})=>h?262144:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=_("hr"),i=O(),s=_("div"),d.c(),r=O(),B(o.$$.fragment),a=O(),p(t,"class","m-t-sm m-b-sm"),p(s,"class","rule-block svelte-fjxz7k"),this.first=t},m(h,g){w(h,t,g),w(h,i,g),w(h,s,g),d.m(s,null),m(s,r),V(o,s,null),m(s,a),u=!0},p(h,g){e=h,c===(c=f(e,g))&&d?d.p(e,g):(d.d(1),d=c(e),d&&(d.c(),d.m(s,r)));const y={};g&1&&(y.class="form-field rule-field m-0 "+(Ri(e[0][e[14]])?"disabled":"")),g&4456473&&(y.$$scope={dirty:g,ctx:e}),o.$set(y)},i(h){u||(A(o.$$.fragment,h),u=!0)},o(h){F(o.$$.fragment,h),u=!1},d(h){h&&k(t),h&&k(i),h&&k(s),d.d(),z(o)}}}function WM(n){let e,t,i,s,l,r=n[2]?"Hide available fields":"Show available fields",o,a,u,f,c,d,h,g,y,b=n[2]&&Kp(n);const v=[HM,jM],S=[];function $(C,M){return C[5]?0:1}return f=$(n),c=S[f]=v[f](n),{c(){e=_("div"),t=_("div"),i=_("p"),i.innerHTML=`All rules follow the
-            <a href="https://pocketbase.io/docs/manage-collections#rules-filters-syntax" target="_blank" rel="noopener">PocketBase filter syntax and operators
-            </a>.`,s=O(),l=_("span"),o=H(r),a=O(),b&&b.c(),u=O(),c.c(),d=lt(),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex"),p(e,"class","block m-b-base")},m(C,M){w(C,e,M),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(e,a),b&&b.m(e,null),w(C,u,M),S[f].m(C,M),w(C,d,M),h=!0,g||(y=X(l,"click",n[7]),g=!0)},p(C,[M]){(!h||M&4)&&r!==(r=C[2]?"Hide available fields":"Show available fields")&&_e(o,r),C[2]?b?(b.p(C,M),M&4&&A(b,1)):(b=Kp(C),b.c(),A(b,1),b.m(e,null)):b&&(Oe(),F(b,1,1,()=>{b=null}),Te());let T=f;f=$(C),f===T?S[f].p(C,M):(Oe(),F(S[T],1,1,()=>{S[T]=null}),Te(),c=S[f],c?c.p(C,M):(c=S[f]=v[f](C),c.c()),A(c,1),c.m(d.parentNode,d))},i(C){h||(A(b),A(c),h=!0)},o(C){F(b),F(c),h=!1},d(C){C&&k(e),b&&b.d(),C&&k(u),S[f].d(C),C&&k(d),g=!1,y()}}}function Ri(n){return n===null}function YM(n,e,t){let{collection:i=new Ln}=e,s={},l=!1,r={},o,a=!1;const u={listRule:"List Action",viewRule:"View Action",createRule:"Create Action",updateRule:"Update Action",deleteRule:"Delete Action"};async function f(){t(5,a=!0);try{t(4,o=(await rs(()=>import("./FilterAutocompleteInput.e18b080c.js"),[])).default)}catch(v){console.warn(v),t(4,o=null)}t(5,a=!1)}pi(()=>{f()});const c=()=>t(2,l=!l),d=async v=>{var S;t(0,i[v]=s[v]||"",i),await Mi(),(S=r[v])==null||S.focus()},h=v=>{t(1,s[v]=i[v],s),t(0,i[v]=null,i)},g=v=>{var S;return(S=r[v])==null?void 0:S.focus()};function y(v,S){he[v?"unshift":"push"](()=>{r[S]=v,t(3,r)})}function b(v,S){n.$$.not_equal(i[S],v)&&(i[S]=v,t(0,i))}return n.$$set=v=>{"collection"in v&&t(0,i=v.collection)},[i,s,l,r,o,a,u,c,d,h,g,y,b]}class KM extends Fe{constructor(e){super(),Le(this,e,YM,WM,Ae,{collection:0})}}function Zp(n,e,t){const i=n.slice();return i[14]=e[t],i}function xp(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xp(n){let e;return{c(){e=_("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Qp(n){let e,t,i,s,l=n[1].originalName+"",r,o,a,u,f,c=n[1].name+"",d;return{c(){e=_("li"),t=_("div"),i=H(`Renamed collection
-                    `),s=_("strong"),r=H(l),o=O(),a=_("i"),u=O(),f=_("strong"),d=H(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,g){w(h,e,g),m(e,t),m(t,i),m(t,s),m(s,r),m(t,o),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&2&&l!==(l=h[1].originalName+"")&&_e(r,l),g&2&&c!==(c=h[1].name+"")&&_e(d,c)},d(h){h&&k(e)}}}function eh(n){let e,t,i,s,l=n[14].originalName+"",r,o,a,u,f,c=n[14].name+"",d;return{c(){e=_("li"),t=_("div"),i=H(`Renamed field
-                    `),s=_("strong"),r=H(l),o=O(),a=_("i"),u=O(),f=_("strong"),d=H(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,g){w(h,e,g),m(e,t),m(t,i),m(t,s),m(s,r),m(t,o),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&16&&l!==(l=h[14].originalName+"")&&_e(r,l),g&16&&c!==(c=h[14].name+"")&&_e(d,c)},d(h){h&&k(e)}}}function th(n){let e,t,i,s=n[14].name+"",l,r;return{c(){e=_("li"),t=H("Removed field "),i=_("span"),l=H(s),r=O(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(o,a){w(o,e,a),m(e,t),m(e,i),m(i,l),m(e,r)},p(o,a){a&8&&s!==(s=o[14].name+"")&&_e(l,s)},d(o){o&&k(e)}}}function JM(n){let e,t,i,s,l,r,o,a,u,f,c,d,h=n[3].length&&Xp(),g=n[5]&&Qp(n),y=n[4],b=[];for(let $=0;$<y.length;$+=1)b[$]=eh(xp(n,y,$));let v=n[3],S=[];for(let $=0;$<v.length;$+=1)S[$]=th(Zp(n,v,$));return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=O(),s=_("div"),l=_("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to
-                update it manually!`,r=O(),h&&h.c(),o=O(),a=_("h6"),a.textContent="Changes:",u=O(),f=_("ul"),g&&g.c(),c=O();for(let $=0;$<b.length;$+=1)b[$].c();d=O();for(let $=0;$<S.length;$+=1)S[$].c();p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning"),p(f,"class","changes-list svelte-1ghly2p")},m($,C){w($,e,C),m(e,t),m(e,i),m(e,s),m(s,l),m(s,r),h&&h.m(s,null),w($,o,C),w($,a,C),w($,u,C),w($,f,C),g&&g.m(f,null),m(f,c);for(let M=0;M<b.length;M+=1)b[M].m(f,null);m(f,d);for(let M=0;M<S.length;M+=1)S[M].m(f,null)},p($,C){if($[3].length?h||(h=Xp(),h.c(),h.m(s,null)):h&&(h.d(1),h=null),$[5]?g?g.p($,C):(g=Qp($),g.c(),g.m(f,c)):g&&(g.d(1),g=null),C&16){y=$[4];let M;for(M=0;M<y.length;M+=1){const T=xp($,y,M);b[M]?b[M].p(T,C):(b[M]=eh(T),b[M].c(),b[M].m(f,d))}for(;M<b.length;M+=1)b[M].d(1);b.length=y.length}if(C&8){v=$[3];let M;for(M=0;M<v.length;M+=1){const T=Zp($,v,M);S[M]?S[M].p(T,C):(S[M]=th(T),S[M].c(),S[M].m(f,null))}for(;M<S.length;M+=1)S[M].d(1);S.length=v.length}},d($){$&&k(e),h&&h.d(),$&&k(o),$&&k(a),$&&k(u),$&&k(f),g&&g.d(),Bn(b,$),Bn(S,$)}}}function GM(n){let e;return{c(){e=_("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function ZM(n){let e,t,i,s,l;return{c(){e=_("button"),e.innerHTML='<span class="txt">Cancel</span>',t=O(),i=_("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(r,o){w(r,e,o),w(r,t,o),w(r,i,o),e.focus(),s||(l=[X(e,"click",n[8]),X(i,"click",n[9])],s=!0)},p:re,d(r){r&&k(e),r&&k(t),r&&k(i),s=!1,rt(l)}}}function xM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[ZM],header:[GM],default:[JM]},$$scope:{ctx:n}};return e=new Di({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&524346&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[10](null),z(e,s)}}}function XM(n,e,t){let i,s,l;const r=_n();let o,a;async function u(v){t(1,a=v),await Mi(),!i&&!s.length&&!l.length?c():o==null||o.show()}function f(){o==null||o.hide()}function c(){f(),r("confirm")}const d=()=>f(),h=()=>c();function g(v){he[v?"unshift":"push"](()=>{o=v,t(2,o)})}function y(v){ut.call(this,n,v)}function b(v){ut.call(this,n,v)}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(v=>v.id&&!v.toDelete&&v.originalName!=v.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(v=>v.id&&v.toDelete))||[])},[f,a,o,l,s,i,c,u,d,h,g,y,b]}class QM extends Fe{constructor(e){super(),Le(this,e,XM,xM,Ae,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function nh(n){let e,t,i,s;function l(o){n[26](o)}let r={};return n[2]!==void 0&&(r.collection=n[2]),t=new KM({props:r}),he.push(()=>Re(t,"collection",l)),{c(){e=_("div"),B(t.$$.fragment),p(e,"class","tab-item active")},m(o,a){w(o,e,a),V(t,e,null),s=!0},p(o,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=o[2],je(()=>i=!1)),t.$set(u)},i(o){s||(A(t.$$.fragment,o),s=!0)},o(o){F(t.$$.fragment,o),s=!1},d(o){o&&k(e),z(t)}}}function eO(n){let e,t,i,s,l,r;function o(f){n[25](f)}let a={};n[2]!==void 0&&(a.collection=n[2]),i=new IM({props:a}),he.push(()=>Re(i,"collection",o));let u=n[9]===Bl&&nh(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),l=O(),u&&u.c(),p(t,"class","tab-item"),Q(t,"active",n[9]===hs),p(e,"class","tabs-content svelte-b10vi")},m(f,c){w(f,e,c),m(e,t),V(i,t,null),m(e,l),u&&u.m(e,null),r=!0},p(f,c){const d={};!s&&c[0]&4&&(s=!0,d.collection=f[2],je(()=>s=!1)),i.$set(d),c[0]&512&&Q(t,"active",f[9]===hs),f[9]===Bl?u?(u.p(f,c),c[0]&512&&A(u,1)):(u=nh(f),u.c(),A(u,1),u.m(e,null)):u&&(Oe(),F(u,1,1,()=>{u=null}),Te())},i(f){r||(A(i.$$.fragment,f),A(u),r=!0)},o(f){F(i.$$.fragment,f),F(u),r=!1},d(f){f&&k(e),z(i),u&&u.d()}}}function ih(n){let e,t,i,s,l,r,o;return r=new ys({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[tO]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=O(),i=_("button"),s=_("i"),l=O(),B(r.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),m(i,s),m(i,l),V(r,i,null),o=!0},p(a,u){const f={};u[1]&256&&(f.$$scope={dirty:u,ctx:a}),r.$set(f)},i(a){o||(A(r.$$.fragment,a),o=!0)},o(a){F(r.$$.fragment,a),o=!1},d(a){a&&k(e),a&&k(t),a&&k(i),z(r)}}}function tO(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i> 
-                        <span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[20]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function sh(n){let e;return{c(){e=_("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function nO(n){let e,t,i,s,l,r,o,a,u,f,c,d,h=n[2].system&&sh();return{c(){e=_("label"),t=H("Name"),s=O(),l=_("input"),u=O(),h&&h.c(),f=lt(),p(e,"for",i=n[38]),p(l,"type","text"),p(l,"id",r=n[38]),l.required=!0,l.disabled=n[11],p(l,"spellcheck","false"),l.autofocus=o=n[2].isNew,p(l,"placeholder",'eg. "posts"'),l.value=a=n[2].name},m(g,y){w(g,e,y),m(e,t),w(g,s,y),w(g,l,y),w(g,u,y),h&&h.m(g,y),w(g,f,y),n[2].isNew&&l.focus(),c||(d=X(l,"input",n[21]),c=!0)},p(g,y){y[1]&128&&i!==(i=g[38])&&p(e,"for",i),y[1]&128&&r!==(r=g[38])&&p(l,"id",r),y[0]&2048&&(l.disabled=g[11]),y[0]&4&&o!==(o=g[2].isNew)&&(l.autofocus=o),y[0]&4&&a!==(a=g[2].name)&&l.value!==a&&(l.value=a),g[2].system?h||(h=sh(),h.c(),h.m(f.parentNode,f)):h&&(h.d(1),h=null)},d(g){g&&k(e),g&&k(s),g&&k(l),g&&k(u),h&&h.d(g),g&&k(f),c=!1,d()}}}function lh(n){let e,t,i,s,l,r;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=St.call(null,e,n[12])),l=!0)},p(o,a){t&&Jn(t.update)&&a[0]&4096&&t.update.call(null,o[12])},i(o){s||(o&&Dt(()=>{i||(i=ft(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){o&&(i||(i=ft(e,Wn,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function rh(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,o){w(r,e,o),i=!0,s||(l=Xe(St.call(null,e,"Has errors")),s=!0)},i(r){i||(r&&Dt(()=>{t||(t=ft(e,Wn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(r){r&&(t||(t=ft(e,Wn,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(r){r&&k(e),r&&t&&t.end(),s=!1,l()}}}function iO(n){var N,R,J,W,q,G;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,r,o,a,u,f,c,d,h,g,y=!U.isEmpty((N=n[4])==null?void 0:N.schema),b,v,S,$,C=!U.isEmpty((R=n[4])==null?void 0:R.listRule)||!U.isEmpty((J=n[4])==null?void 0:J.viewRule)||!U.isEmpty((W=n[4])==null?void 0:W.createRule)||!U.isEmpty((q=n[4])==null?void 0:q.updateRule)||!U.isEmpty((G=n[4])==null?void 0:G.deleteRule),M,T,E,D=!n[2].isNew&&!n[2].system&&ih(n);o=new Ne({props:{class:"form-field required m-b-0 "+(n[11]?"disabled":""),name:"name",$$slots:{default:[nO,({uniqueId:K})=>({38:K}),({uniqueId:K})=>[0,K?128:0]]},$$scope:{ctx:n}}});let P=y&&lh(n),L=C&&rh();return{c(){e=_("h4"),i=H(t),s=O(),D&&D.c(),l=O(),r=_("form"),B(o.$$.fragment),a=O(),u=_("input"),f=O(),c=_("div"),d=_("button"),h=_("span"),h.textContent="Fields",g=O(),P&&P.c(),b=O(),v=_("button"),S=_("span"),S.textContent="API Rules",$=O(),L&&L.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(r,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),Q(d,"active",n[9]===hs),p(S,"class","txt"),p(v,"type","button"),p(v,"class","tab-item"),Q(v,"active",n[9]===Bl),p(c,"class","tabs-header stretched")},m(K,Y){w(K,e,Y),m(e,i),w(K,s,Y),D&&D.m(K,Y),w(K,l,Y),w(K,r,Y),V(o,r,null),m(r,a),m(r,u),w(K,f,Y),w(K,c,Y),m(c,d),m(d,h),m(d,g),P&&P.m(d,null),m(c,b),m(c,v),m(v,S),m(v,$),L&&L.m(v,null),M=!0,T||(E=[X(r,"submit",Kt(n[22])),X(d,"click",n[23]),X(v,"click",n[24])],T=!0)},p(K,Y){var fe,ye,se,Z,De,te;(!M||Y[0]&4)&&t!==(t=K[2].isNew?"New collection":"Edit collection")&&_e(i,t),!K[2].isNew&&!K[2].system?D?(D.p(K,Y),Y[0]&4&&A(D,1)):(D=ih(K),D.c(),A(D,1),D.m(l.parentNode,l)):D&&(Oe(),F(D,1,1,()=>{D=null}),Te());const ne={};Y[0]&2048&&(ne.class="form-field required m-b-0 "+(K[11]?"disabled":"")),Y[0]&2052|Y[1]&384&&(ne.$$scope={dirty:Y,ctx:K}),o.$set(ne),Y[0]&16&&(y=!U.isEmpty((fe=K[4])==null?void 0:fe.schema)),y?P?(P.p(K,Y),Y[0]&16&&A(P,1)):(P=lh(K),P.c(),A(P,1),P.m(d,null)):P&&(Oe(),F(P,1,1,()=>{P=null}),Te()),Y[0]&512&&Q(d,"active",K[9]===hs),Y[0]&16&&(C=!U.isEmpty((ye=K[4])==null?void 0:ye.listRule)||!U.isEmpty((se=K[4])==null?void 0:se.viewRule)||!U.isEmpty((Z=K[4])==null?void 0:Z.createRule)||!U.isEmpty((De=K[4])==null?void 0:De.updateRule)||!U.isEmpty((te=K[4])==null?void 0:te.deleteRule)),C?L?Y[0]&16&&A(L,1):(L=rh(),L.c(),A(L,1),L.m(v,null)):L&&(Oe(),F(L,1,1,()=>{L=null}),Te()),Y[0]&512&&Q(v,"active",K[9]===Bl)},i(K){M||(A(D),A(o.$$.fragment,K),A(P),A(L),M=!0)},o(K){F(D),F(o.$$.fragment,K),F(P),F(L),M=!1},d(K){K&&k(e),K&&k(s),D&&D.d(K),K&&k(l),K&&k(r),z(o),K&&k(f),K&&k(c),P&&P.d(),L&&L.d(),T=!1,rt(E)}}}function sO(n){let e,t,i,s,l,r=n[2].isNew?"Create":"Save changes",o,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=O(),s=_("button"),l=_("span"),o=H(r),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[7],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],Q(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,o),u||(f=[X(e,"click",n[18]),X(s,"click",n[19])],u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&r!==(r=c[2].isNew?"Create":"Save changes")&&_e(o,r),d[0]&1152&&a!==(a=!c[10]||c[7])&&(s.disabled=a),d[0]&128&&Q(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,rt(f)}}}function lO(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",beforeHide:n[27],$$slots:{footer:[sO],header:[iO],default:[eO]},$$scope:{ctx:n}};e=new Di({props:l}),n[28](e),e.$on("hide",n[29]),e.$on("show",n[30]);let r={};return i=new QM({props:r}),n[31](i),i.$on("confirm",n[32]),{c(){B(e.$$.fragment),t=O(),B(i.$$.fragment)},m(o,a){V(e,o,a),w(o,t,a),V(i,o,a),s=!0},p(o,a){const u={};a[0]&264&&(u.beforeHide=o[27]),a[0]&7828|a[1]&256&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};i.$set(f)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){F(e.$$.fragment,o),F(i.$$.fragment,o),s=!1},d(o){n[28](null),z(e,o),o&&k(t),n[31](null),z(i,o)}}}const hs="fields",Bl="api_rules";function Da(n){return JSON.stringify(n)}function rO(n,e,t){let i,s,l,r,o,a;hn(n,fi,te=>t(34,o=te)),hn(n,_s,te=>t(4,a=te));const u=_n();let f,c,d=null,h=new Ln,g=!1,y=!1,b=hs,v=Da(h);function S(te){t(9,b=te)}function $(te){return M(te),t(8,y=!0),S(hs),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(te){Wi({}),typeof te!="undefined"?(d=te,t(2,h=te==null?void 0:te.clone())):(d=null,t(2,h=new Ln)),t(2,h.schema=h.schema||[],h),t(2,h.originalName=h.name||"",h),await Mi(),t(17,v=Da(h))}function T(){if(h.isNew)return E();c==null||c.show(h)}function E(){if(g)return;t(7,g=!0);const te=D();let be;h.isNew?be=we.Collections.create(te):be=we.Collections.update(h.id,te),be.then(ue=>{t(8,y=!1),C(),mn(h.isNew?"Successfully created collection.":"Successfully updated collection."),E3(ue),h.isNew&&qg(fi,o=ue,o),u("save",ue)}).catch(ue=>{we.errorResponseHandler(ue)}).finally(()=>{t(7,g=!1)})}function D(){const te=h.export();te.schema=te.schema.slice(0);for(let be=te.schema.length-1;be>=0;be--)te.schema[be].toDelete&&te.schema.splice(be,1);return te}function P(){!(d!=null&&d.id)||Ci(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>we.Collections.delete(d==null?void 0:d.id).then(()=>{C(),mn(`Successfully deleted collection "${d==null?void 0:d.name}".`),u("delete",d),P3(d)}).catch(te=>{we.errorResponseHandler(te)}))}const L=()=>C(),N=()=>T(),R=()=>P(),J=te=>{t(2,h.name=U.slugify(te.target.value),h),te.target.value=h.name},W=()=>{r&&T()},q=()=>S(hs),G=()=>S(Bl);function K(te){h=te,t(2,h)}function Y(te){h=te,t(2,h)}const ne=()=>l&&y?(Ci("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,y=!1),C()}),!1):!0;function fe(te){he[te?"unshift":"push"](()=>{f=te,t(5,f)})}function ye(te){ut.call(this,n,te)}function se(te){ut.call(this,n,te)}function Z(te){he[te?"unshift":"push"](()=>{c=te,t(6,c)})}const De=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&16&&t(12,i=typeof U.getNestedVal(a,"schema.message",null)=="string"?U.getNestedVal(a,"schema.message"):"Has errors"),n.$$.dirty[0]&4&&t(11,s=!h.isNew&&h.system),n.$$.dirty[0]&131076&&t(3,l=v!=Da(h)),n.$$.dirty[0]&12&&t(10,r=h.isNew||l)},[S,C,h,l,a,f,c,g,y,b,r,s,i,T,E,P,$,v,L,N,R,J,W,q,G,K,Y,ne,fe,ye,se,Z,De]}class hf extends Fe{constructor(e){super(),Le(this,e,rO,lO,Ae,{changeTab:0,show:16,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[16]}get hide(){return this.$$.ctx[1]}}function oh(n,e,t){const i=n.slice();return i[13]=e[t],i}function ah(n){let e,t=n[1].length&&uh();return{c(){t&&t.c(),e=lt()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1].length?t||(t=uh(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function uh(n){let e;return{c(){e=_("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function oO(n){let e;return{c(){e=_("i"),p(e,"class","ri-folder-2-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function aO(n){let e;return{c(){e=_("i"),p(e,"class","ri-folder-open-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function fh(n,e){let t,i,s,l=e[13].name+"",r,o,a,u;function f(g,y){var b;return((b=g[5])==null?void 0:b.id)===g[13].id?aO:oO}let c=f(e),d=c(e);function h(){return e[10](e[13])}return{key:n,first:null,c(){var g;t=_("div"),d.c(),i=O(),s=_("span"),r=H(l),o=O(),p(s,"class","txt"),p(t,"tabindex","0"),p(t,"class","sidebar-list-item"),Q(t,"active",((g=e[5])==null?void 0:g.id)===e[13].id),this.first=t},m(g,y){w(g,t,y),d.m(t,null),m(t,i),m(t,s),m(s,r),m(t,o),a||(u=X(t,"click",h),a=!0)},p(g,y){var b;e=g,c!==(c=f(e))&&(d.d(1),d=c(e),d&&(d.c(),d.m(t,i))),y&8&&l!==(l=e[13].name+"")&&_e(r,l),y&40&&Q(t,"active",((b=e[5])==null?void 0:b.id)===e[13].id)},d(g){g&&k(t),d.d(),a=!1,u()}}}function uO(n){let e,t,i,s,l,r,o,a,u,f,c,d=[],h=new Map,g,y,b,v,S,$,C,M,T=n[3];const E=L=>L[13].id;for(let L=0;L<T.length;L+=1){let N=oh(n,T,L),R=E(N);h.set(R,d[L]=fh(R,N))}let D=null;T.length||(D=ah(n));let P={};return S=new hf({props:P}),n[12](S),{c(){e=_("aside"),t=_("header"),i=_("div"),s=_("div"),l=_("button"),l.innerHTML='<i class="ri-close-line"></i>',r=O(),o=_("input"),a=O(),u=_("hr"),f=O(),c=_("div");for(let L=0;L<d.length;L+=1)d[L].c();D&&D.c(),g=O(),y=_("footer"),b=_("button"),b.innerHTML=`<i class="ri-add-line"></i> 
-            <span class="txt">New collection</span>`,v=O(),B(S.$$.fragment),p(l,"type","button"),p(l,"class","btn btn-xs btn-secondary btn-circle btn-clear"),Q(l,"hidden",!n[4]),p(s,"class","form-field-addon"),p(o,"type","text"),p(o,"placeholder","Search collections..."),p(i,"class","form-field search"),Q(i,"active",n[4]),p(t,"class","sidebar-header"),p(u,"class","m-t-5 m-b-xs"),p(c,"class","sidebar-content"),p(b,"type","button"),p(b,"class","btn btn-block btn-outline"),p(y,"class","sidebar-footer"),p(e,"class","page-sidebar collection-sidebar")},m(L,N){w(L,e,N),m(e,t),m(t,i),m(i,s),m(s,l),m(i,r),m(i,o),$e(o,n[0]),m(e,a),m(e,u),m(e,f),m(e,c);for(let R=0;R<d.length;R+=1)d[R].m(c,null);D&&D.m(c,null),m(e,g),m(e,y),m(y,b),w(L,v,N),V(S,L,N),$=!0,C||(M=[X(l,"click",n[8]),X(o,"input",n[9]),X(b,"click",n[11])],C=!0)},p(L,[N]){N&16&&Q(l,"hidden",!L[4]),N&1&&o.value!==L[0]&&$e(o,L[0]),N&16&&Q(i,"active",L[4]),N&106&&(T=L[3],d=ot(d,N,E,1,L,T,h,c,an,fh,null,oh),!T.length&&D?D.p(L,N):T.length?D&&(D.d(1),D=null):(D=ah(L),D.c(),D.m(c,null)));const R={};S.$set(R)},i(L){$||(A(S.$$.fragment,L),$=!0)},o(L){F(S.$$.fragment,L),$=!1},d(L){L&&k(e);for(let N=0;N<d.length;N+=1)d[N].d();D&&D.d(),L&&k(v),n[12](null),z(S,L),C=!1,rt(M)}}}function fO(n,e,t){let i,s,l,r,o;hn(n,fi,b=>t(5,r=b)),hn(n,Js,b=>t(7,o=b));let a,u="";function f(b){qg(fi,r=b,r)}const c=()=>t(0,u="");function d(){u=this.value,t(0,u)}const h=b=>f(b),g=()=>a==null?void 0:a.show();function y(b){he[b?"unshift":"push"](()=>{a=b,t(2,a)})}return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=u.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=u!==""),n.$$.dirty&131&&t(3,l=o.filter(b=>b.name!="profiles"&&(b.id==u||b.name.replace(/\s+/g,"").toLowerCase().includes(i))))},[u,i,a,l,s,r,f,o,c,d,h,g,y]}class cO extends Fe{constructor(e){super(),Le(this,e,fO,uO,Ae,{})}}function dO(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L,N,R,J,W,q,G,K,Y,ne,fe,ye,se,Z,De,te,be,ue,ie,ve,He,Ie,qe,oe,le,ke,Ve;return{c(){e=_("p"),e.innerHTML=`The syntax basically follows the format
-    <code><span class="txt-success">OPERAND</span> 
-        <span class="txt-danger">OPERATOR</span> 
-        <span class="txt-success">OPERAND</span></code>, where:`,t=O(),i=_("ul"),s=_("li"),s.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single or double
-        quoted), number, null, true, false`,l=O(),r=_("li"),o=_("code"),o.textContent="OPERATOR",a=H(` - is one of:
-        `),u=_("br"),f=O(),c=_("ul"),d=_("li"),h=_("code"),h.textContent="=",g=O(),y=_("span"),y.textContent="Equal",b=O(),v=_("li"),S=_("code"),S.textContent="!=",$=O(),C=_("span"),C.textContent="NOT equal",M=O(),T=_("li"),E=_("code"),E.textContent=">",D=O(),P=_("span"),P.textContent="Greater than",L=O(),N=_("li"),R=_("code"),R.textContent=">=",J=O(),W=_("span"),W.textContent="Greater than or equal",q=O(),G=_("li"),K=_("code"),K.textContent="<",Y=O(),ne=_("span"),ne.textContent="Less than or equal",fe=O(),ye=_("li"),se=_("code"),se.textContent="<=",Z=O(),De=_("span"),De.textContent="Less than or equal",te=O(),be=_("li"),ue=_("code"),ue.textContent="~",ie=O(),ve=_("span"),ve.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard
-                    match)`,He=O(),Ie=_("li"),qe=_("code"),qe.textContent="!~",oe=O(),le=_("span"),le.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
-                    wildcard match)`,ke=O(),Ve=_("p"),Ve.innerHTML=`To group and combine several expressions you could use brackets
-    <code>(...)</code>, <code>&amp;&amp;</code> (AND) and <code>||</code> (OR) tokens.`,p(o,"class","txt-danger"),p(h,"class","filter-op svelte-1w7s5nw"),p(y,"class","txt-hint"),p(S,"class","filter-op svelte-1w7s5nw"),p(C,"class","txt-hint"),p(E,"class","filter-op svelte-1w7s5nw"),p(P,"class","txt-hint"),p(R,"class","filter-op svelte-1w7s5nw"),p(W,"class","txt-hint"),p(K,"class","filter-op svelte-1w7s5nw"),p(ne,"class","txt-hint"),p(se,"class","filter-op svelte-1w7s5nw"),p(De,"class","txt-hint"),p(ue,"class","filter-op svelte-1w7s5nw"),p(ve,"class","txt-hint"),p(qe,"class","filter-op svelte-1w7s5nw"),p(le,"class","txt-hint")},m(ze,Ze){w(ze,e,Ze),w(ze,t,Ze),w(ze,i,Ze),m(i,s),m(i,l),m(i,r),m(r,o),m(r,a),m(r,u),m(r,f),m(r,c),m(c,d),m(d,h),m(d,g),m(d,y),m(c,b),m(c,v),m(v,S),m(v,$),m(v,C),m(c,M),m(c,T),m(T,E),m(T,D),m(T,P),m(c,L),m(c,N),m(N,R),m(N,J),m(N,W),m(c,q),m(c,G),m(G,K),m(G,Y),m(G,ne),m(c,fe),m(c,ye),m(ye,se),m(ye,Z),m(ye,De),m(c,te),m(c,be),m(be,ue),m(be,ie),m(be,ve),m(c,He),m(c,Ie),m(Ie,qe),m(Ie,oe),m(Ie,le),w(ze,ke,Ze),w(ze,Ve,Ze)},p:re,i:re,o:re,d(ze){ze&&k(e),ze&&k(t),ze&&k(i),ze&&k(ke),ze&&k(Ve)}}}class pO extends Fe{constructor(e){super(),Le(this,e,null,dO,Ae,{})}}function ch(n,e,t){const i=n.slice();return i[8]=e[t],i}function dh(n,e,t){const i=n.slice();return i[8]=e[t],i}function ph(n,e,t){const i=n.slice();return i[13]=e[t],i}function hh(n,e,t){const i=n.slice();return i[13]=e[t],i}function mh(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function gh(n,e){let t,i=e[13].lang+"",s,l,r,o;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&_e(s,i),f&24&&Q(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),r=!1,o()}}}function _h(n,e){let t,i,s,l;return i=new en({props:{content:e[13].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[3]===e[13].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[13].code),i.$set(a),o&24&&Q(t,"active",e[3]===e[13].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function bh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("div"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&36&&Q(t,"active",e[2]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function yh(n,e){let t,i,s,l;return i=new en({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[2]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r,o&36&&Q(t,"active",e[2]===e[8].code)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function hO(n){let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,b,v=n[0].name+"",S,$,C,M,T,E,D,P=[],L=new Map,N,R,J=[],W=new Map,q,G,K,Y,ne,fe,ye,se,Z,De,te,be,ue,ie,ve,He,Ie,qe,oe,le,ke,Ve,ze,Ze,ge,Ee,x,ae,Be,vt,it,gt,at,yt,zt,Mt,Ot,me,Ce,Ke,st,fn,ce,Se,xe,Gt,qt,ii,pe,I,j,ee,de,Pe,We,tt,Je,nt=[],Ge=new Map,et,_t,Ft=[],tn=new Map,In,Bt=n[1]&&mh(),ws=n[4];const Ss=Me=>Me[13].lang;for(let Me=0;Me<ws.length;Me+=1){let Ye=hh(n,ws,Me),At=Ss(Ye);L.set(At,P[Me]=gh(At,Ye))}let Ji=n[4];const ir=Me=>Me[13].lang;for(let Me=0;Me<Ji.length;Me+=1){let Ye=ph(n,Ji,Me),At=ir(Ye);W.set(At,J[Me]=_h(At,Ye))}ge=new en({props:{content:`
-                        // DESC by created and ASC by id
-                        ?sort=-created,id
-                    `}}),yt=new en({props:{content:`
-                        ?filter=(id='abc' && created>'2022-01-01')
-                    `}}),Mt=new pO({}),xe=new en({props:{content:`
-                        ?expand=rel1,rel2.subrel21.subrel22
-                    `}});let $s=n[5];const sr=Me=>Me[8].code;for(let Me=0;Me<$s.length;Me+=1){let Ye=dh(n,$s,Me),At=sr(Ye);Ge.set(At,nt[Me]=bh(At,Ye))}let Gi=n[5];const lr=Me=>Me[8].code;for(let Me=0;Me<Gi.length;Me+=1){let Ye=ch(n,Gi,Me),At=lr(Ye);tn.set(At,Ft[Me]=yh(At,Ye))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=O(),s=_("div"),l=_("p"),r=H("/api/collections/"),o=_("strong"),u=H(a),f=H("/records"),c=O(),Bt&&Bt.c(),d=O(),h=_("div"),g=_("p"),y=H("Fetch a paginated "),b=_("strong"),S=H(v),$=H(" records list."),C=O(),M=_("div"),M.textContent="Client SDKs example",T=O(),E=_("div"),D=_("div");for(let Me=0;Me<P.length;Me+=1)P[Me].c();N=O(),R=_("div");for(let Me=0;Me<J.length;Me+=1)J[Me].c();q=O(),G=_("div"),G.textContent="Query parameters",K=O(),Y=_("table"),ne=_("thead"),ne.innerHTML=`<tr><th>Param</th> 
-            <th>Type</th> 
-            <th width="60%">Description</th></tr>`,fe=O(),ye=_("tbody"),se=_("tr"),se.innerHTML=`<td>page</td> 
-            <td><span class="label">Number</span></td> 
-            <td>The page (aka. offset) of the paginated list (default to 1).</td>`,Z=O(),De=_("tr"),De.innerHTML=`<td>perPage</td> 
-            <td><span class="label">Number</span></td> 
-            <td>Specify the max returned records per page (default to 30).</td>`,te=O(),be=_("tr"),ue=_("td"),ue.textContent="sort",ie=O(),ve=_("td"),ve.innerHTML='<span class="label">String</span>',He=O(),Ie=_("td"),qe=H("Specify the records order attribute(s). "),oe=_("br"),le=H(`
-                Add `),ke=_("code"),ke.textContent="-",Ve=H(" / "),ze=_("code"),ze.textContent="+",Ze=H(` (default) in front of the attribute for DESC / ASC order.
-                Ex.:
-                `),B(ge.$$.fragment),Ee=O(),x=_("tr"),ae=_("td"),ae.textContent="filter",Be=O(),vt=_("td"),vt.innerHTML='<span class="label">String</span>',it=O(),gt=_("td"),at=H(`Filter the returned records. Ex.:
-                `),B(yt.$$.fragment),zt=O(),B(Mt.$$.fragment),Ot=O(),me=_("tr"),Ce=_("td"),Ce.textContent="expand",Ke=O(),st=_("td"),st.innerHTML='<span class="label">String</span>',fn=O(),ce=_("td"),Se=H(`Auto expand nested record relations. Ex.:
-                `),B(xe.$$.fragment),Gt=H(`
-                Supports up to 6-levels depth nested relations expansion. `),qt=_("br"),ii=H(`
-                The expanded relations will be appended to each individual record under the
-                `),pe=_("code"),pe.textContent="@expand",I=H(" property (eg. "),j=_("code"),j.textContent='"@expand": {"rel1": {...}, ...}',ee=H(")."),de=O(),Pe=_("div"),Pe.textContent="Responses",We=O(),tt=_("div"),Je=_("div");for(let Me=0;Me<nt.length;Me+=1)nt[Me].c();et=O(),_t=_("div");for(let Me=0;Me<Ft.length;Me+=1)Ft[Me].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(h,"class","content m-b-base"),p(M,"class","section-title"),p(D,"class","tabs-header compact left"),p(R,"class","tabs-content"),p(E,"class","tabs m-b-lg"),p(G,"class","section-title"),p(Y,"class","table-compact table-border m-b-lg"),p(Pe,"class","section-title"),p(Je,"class","tabs-header compact left"),p(_t,"class","tabs-content"),p(tt,"class","tabs")},m(Me,Ye){w(Me,e,Ye),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(e,c),Bt&&Bt.m(e,null),w(Me,d,Ye),w(Me,h,Ye),m(h,g),m(g,y),m(g,b),m(b,S),m(g,$),w(Me,C,Ye),w(Me,M,Ye),w(Me,T,Ye),w(Me,E,Ye),m(E,D);for(let At=0;At<P.length;At+=1)P[At].m(D,null);m(E,N),m(E,R);for(let At=0;At<J.length;At+=1)J[At].m(R,null);w(Me,q,Ye),w(Me,G,Ye),w(Me,K,Ye),w(Me,Y,Ye),m(Y,ne),m(Y,fe),m(Y,ye),m(ye,se),m(ye,Z),m(ye,De),m(ye,te),m(ye,be),m(be,ue),m(be,ie),m(be,ve),m(be,He),m(be,Ie),m(Ie,qe),m(Ie,oe),m(Ie,le),m(Ie,ke),m(Ie,Ve),m(Ie,ze),m(Ie,Ze),V(ge,Ie,null),m(ye,Ee),m(ye,x),m(x,ae),m(x,Be),m(x,vt),m(x,it),m(x,gt),m(gt,at),V(yt,gt,null),m(gt,zt),V(Mt,gt,null),m(ye,Ot),m(ye,me),m(me,Ce),m(me,Ke),m(me,st),m(me,fn),m(me,ce),m(ce,Se),V(xe,ce,null),m(ce,Gt),m(ce,qt),m(ce,ii),m(ce,pe),m(ce,I),m(ce,j),m(ce,ee),w(Me,de,Ye),w(Me,Pe,Ye),w(Me,We,Ye),w(Me,tt,Ye),m(tt,Je);for(let At=0;At<nt.length;At+=1)nt[At].m(Je,null);m(tt,et),m(tt,_t);for(let At=0;At<Ft.length;At+=1)Ft[At].m(_t,null);In=!0},p(Me,[Ye]){(!In||Ye&1)&&a!==(a=Me[0].name+"")&&_e(u,a),Me[1]?Bt||(Bt=mh(),Bt.c(),Bt.m(e,null)):Bt&&(Bt.d(1),Bt=null),(!In||Ye&1)&&v!==(v=Me[0].name+"")&&_e(S,v),Ye&24&&(ws=Me[4],P=ot(P,Ye,Ss,1,Me,ws,L,D,an,gh,null,hh)),Ye&24&&(Ji=Me[4],Oe(),J=ot(J,Ye,ir,1,Me,Ji,W,R,Lt,_h,null,ph),Te()),Ye&36&&($s=Me[5],nt=ot(nt,Ye,sr,1,Me,$s,Ge,Je,an,bh,null,dh)),Ye&36&&(Gi=Me[5],Oe(),Ft=ot(Ft,Ye,lr,1,Me,Gi,tn,_t,Lt,yh,null,ch),Te())},i(Me){if(!In){for(let Ye=0;Ye<Ji.length;Ye+=1)A(J[Ye]);A(ge.$$.fragment,Me),A(yt.$$.fragment,Me),A(Mt.$$.fragment,Me),A(xe.$$.fragment,Me);for(let Ye=0;Ye<Gi.length;Ye+=1)A(Ft[Ye]);In=!0}},o(Me){for(let Ye=0;Ye<J.length;Ye+=1)F(J[Ye]);F(ge.$$.fragment,Me),F(yt.$$.fragment,Me),F(Mt.$$.fragment,Me),F(xe.$$.fragment,Me);for(let Ye=0;Ye<Ft.length;Ye+=1)F(Ft[Ye]);In=!1},d(Me){Me&&k(e),Bt&&Bt.d(),Me&&k(d),Me&&k(h),Me&&k(C),Me&&k(M),Me&&k(T),Me&&k(E);for(let Ye=0;Ye<P.length;Ye+=1)P[Ye].d();for(let Ye=0;Ye<J.length;Ye+=1)J[Ye].d();Me&&k(q),Me&&k(G),Me&&k(K),Me&&k(Y),z(ge),z(yt),z(Mt),z(xe),Me&&k(de),Me&&k(Pe),Me&&k(We),Me&&k(tt);for(let Ye=0;Ye<nt.length;Ye+=1)nt[Ye].d();for(let Ye=0;Ye<Ft.length;Ye+=1)Ft[Ye].d()}}}function mO(n,e,t){let i,{collection:s=new Ln}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(3,r=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.listRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(o.push({code:200,body:JSON.stringify({page:1,perPage:30,totalItems:2,items:[U.dummyCollectionRecord(s),U.dummyCollectionRecord(s)]},null,2)}),o.push({code:400,body:`
-                {
-                  "code": 400,
-                  "message": "Something went wrong while processing your request. Invalid filter.",
-                  "data": {}
-                }
-            `}),i&&o.push({code:403,body:`
-                    {
-                      "code": 403,
-                      "message": "Only admins can access this action.",
-                      "data": {}
-                    }
-                `}),o.push({code:404,body:`
-                {
-                  "code": 404,
-                  "message": "The requested resource wasn't found.",
-                  "data": {}
-                }
-            `})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
-                import PocketBase from 'pocketbase';
-
-                const client = new PocketBase("${we.baseUrl}");
-
-                client.Records.getList("${s==null?void 0:s.name}", { page: 2 })
-                    .then(function (list) {
-                        // success...
-                    }).catch(function (error) {
-                        // error...
-                    });
-
-                // alternatively you can also fetch all records at once via getFullList:
-                client.Records.getFullList("${s==null?void 0:s.name}", 200 /* batch size */)
-                    .then(function (records) {
-                        // success...
-                    }).catch(function (error) {
-                        // error...
-                    });
-            `}])},[s,i,l,r,a,o,u,f]}class gO extends Fe{constructor(e){super(),Le(this,e,mO,hO,Ae,{collection:0})}}function vh(n,e,t){const i=n.slice();return i[8]=e[t],i}function kh(n,e,t){const i=n.slice();return i[8]=e[t],i}function wh(n,e,t){const i=n.slice();return i[13]=e[t],i}function Sh(n,e,t){const i=n.slice();return i[13]=e[t],i}function $h(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ch(n,e){let t,i=e[13].lang+"",s,l,r,o;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&_e(s,i),f&24&&Q(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),r=!1,o()}}}function Mh(n,e){let t,i,s,l;return i=new en({props:{content:e[13].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[3]===e[13].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[13].code),i.$set(a),o&24&&Q(t,"active",e[3]===e[13].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function Oh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&36&&Q(t,"active",e[2]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function Th(n,e){let t,i,s,l;return i=new en({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[2]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r,o&36&&Q(t,"active",e[2]===e[8].code)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function _O(n){let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,b,v,S=n[0].name+"",$,C,M,T,E,D,P,L=[],N=new Map,R,J,W=[],q=new Map,G,K,Y,ne,fe,ye,se,Z,De,te,be,ue,ie,ve,He,Ie,qe,oe,le,ke,Ve,ze,Ze,ge,Ee,x,ae,Be,vt,it,gt,at=[],yt=new Map,zt,Mt,Ot=[],me=new Map,Ce,Ke=n[1]&&$h(),st=n[4];const fn=pe=>pe[13].lang;for(let pe=0;pe<st.length;pe+=1){let I=Sh(n,st,pe),j=fn(I);N.set(j,L[pe]=Ch(j,I))}let ce=n[4];const Se=pe=>pe[13].lang;for(let pe=0;pe<ce.length;pe+=1){let I=wh(n,ce,pe),j=Se(I);q.set(j,W[pe]=Mh(j,I))}le=new en({props:{content:`
-                        ?expand=rel1,rel2.subrel21.subrel22
-                    `}});let xe=n[5];const Gt=pe=>pe[8].code;for(let pe=0;pe<xe.length;pe+=1){let I=kh(n,xe,pe),j=Gt(I);yt.set(j,at[pe]=Oh(j,I))}let qt=n[5];const ii=pe=>pe[8].code;for(let pe=0;pe<qt.length;pe+=1){let I=vh(n,qt,pe),j=ii(I);me.set(j,Ot[pe]=Th(j,I))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=O(),s=_("div"),l=_("p"),r=H("/api/collections/"),o=_("strong"),u=H(a),f=H("/records/"),c=_("strong"),c.textContent=":id",d=O(),Ke&&Ke.c(),h=O(),g=_("div"),y=_("p"),b=H("Fetch a single "),v=_("strong"),$=H(S),C=H(" record."),M=O(),T=_("div"),T.textContent="Client SDKs example",E=O(),D=_("div"),P=_("div");for(let pe=0;pe<L.length;pe+=1)L[pe].c();R=O(),J=_("div");for(let pe=0;pe<W.length;pe+=1)W[pe].c();G=O(),K=_("div"),K.textContent="Path Parameters",Y=O(),ne=_("table"),ne.innerHTML=`<thead><tr><th>Param</th> 
-            <th>Type</th> 
-            <th width="60%">Description</th></tr></thead> 
-    <tbody><tr><td>id</td> 
-            <td><span class="label">String</span></td> 
-            <td>ID of the record to view.</td></tr></tbody>`,fe=O(),ye=_("div"),ye.textContent="Query parameters",se=O(),Z=_("table"),De=_("thead"),De.innerHTML=`<tr><th>Param</th> 
-            <th>Type</th> 
-            <th width="60%">Description</th></tr>`,te=O(),be=_("tbody"),ue=_("tr"),ie=_("td"),ie.textContent="expand",ve=O(),He=_("td"),He.innerHTML='<span class="label">String</span>',Ie=O(),qe=_("td"),oe=H(`Auto expand nested record relations. Ex.:
-                `),B(le.$$.fragment),ke=H(`
-                Supports up to 6-levels depth nested relations expansion. `),Ve=_("br"),ze=H(`
-                The expanded relations will be appended to the record under the
-                `),Ze=_("code"),Ze.textContent="@expand",ge=H(" property (eg. "),Ee=_("code"),Ee.textContent='"@expand": {"rel1": {...}, ...}',x=H(")."),ae=O(),Be=_("div"),Be.textContent="Responses",vt=O(),it=_("div"),gt=_("div");for(let pe=0;pe<at.length;pe+=1)at[pe].c();zt=O(),Mt=_("div");for(let pe=0;pe<Ot.length;pe+=1)Ot[pe].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(g,"class","content m-b-base"),p(T,"class","section-title"),p(P,"class","tabs-header compact left"),p(J,"class","tabs-content"),p(D,"class","tabs m-b-lg"),p(K,"class","section-title"),p(ne,"class","table-compact table-border m-b-lg"),p(ye,"class","section-title"),p(Z,"class","table-compact table-border m-b-lg"),p(Be,"class","section-title"),p(gt,"class","tabs-header compact left"),p(Mt,"class","tabs-content"),p(it,"class","tabs")},m(pe,I){w(pe,e,I),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(l,c),m(e,d),Ke&&Ke.m(e,null),w(pe,h,I),w(pe,g,I),m(g,y),m(y,b),m(y,v),m(v,$),m(y,C),w(pe,M,I),w(pe,T,I),w(pe,E,I),w(pe,D,I),m(D,P);for(let j=0;j<L.length;j+=1)L[j].m(P,null);m(D,R),m(D,J);for(let j=0;j<W.length;j+=1)W[j].m(J,null);w(pe,G,I),w(pe,K,I),w(pe,Y,I),w(pe,ne,I),w(pe,fe,I),w(pe,ye,I),w(pe,se,I),w(pe,Z,I),m(Z,De),m(Z,te),m(Z,be),m(be,ue),m(ue,ie),m(ue,ve),m(ue,He),m(ue,Ie),m(ue,qe),m(qe,oe),V(le,qe,null),m(qe,ke),m(qe,Ve),m(qe,ze),m(qe,Ze),m(qe,ge),m(qe,Ee),m(qe,x),w(pe,ae,I),w(pe,Be,I),w(pe,vt,I),w(pe,it,I),m(it,gt);for(let j=0;j<at.length;j+=1)at[j].m(gt,null);m(it,zt),m(it,Mt);for(let j=0;j<Ot.length;j+=1)Ot[j].m(Mt,null);Ce=!0},p(pe,[I]){(!Ce||I&1)&&a!==(a=pe[0].name+"")&&_e(u,a),pe[1]?Ke||(Ke=$h(),Ke.c(),Ke.m(e,null)):Ke&&(Ke.d(1),Ke=null),(!Ce||I&1)&&S!==(S=pe[0].name+"")&&_e($,S),I&24&&(st=pe[4],L=ot(L,I,fn,1,pe,st,N,P,an,Ch,null,Sh)),I&24&&(ce=pe[4],Oe(),W=ot(W,I,Se,1,pe,ce,q,J,Lt,Mh,null,wh),Te()),I&36&&(xe=pe[5],at=ot(at,I,Gt,1,pe,xe,yt,gt,an,Oh,null,kh)),I&36&&(qt=pe[5],Oe(),Ot=ot(Ot,I,ii,1,pe,qt,me,Mt,Lt,Th,null,vh),Te())},i(pe){if(!Ce){for(let I=0;I<ce.length;I+=1)A(W[I]);A(le.$$.fragment,pe);for(let I=0;I<qt.length;I+=1)A(Ot[I]);Ce=!0}},o(pe){for(let I=0;I<W.length;I+=1)F(W[I]);F(le.$$.fragment,pe);for(let I=0;I<Ot.length;I+=1)F(Ot[I]);Ce=!1},d(pe){pe&&k(e),Ke&&Ke.d(),pe&&k(h),pe&&k(g),pe&&k(M),pe&&k(T),pe&&k(E),pe&&k(D);for(let I=0;I<L.length;I+=1)L[I].d();for(let I=0;I<W.length;I+=1)W[I].d();pe&&k(G),pe&&k(K),pe&&k(Y),pe&&k(ne),pe&&k(fe),pe&&k(ye),pe&&k(se),pe&&k(Z),z(le),pe&&k(ae),pe&&k(Be),pe&&k(vt),pe&&k(it);for(let I=0;I<at.length;I+=1)at[I].d();for(let I=0;I<Ot.length;I+=1)Ot[I].d()}}}function bO(n,e,t){let i,{collection:s=new Ln}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(3,r=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.viewRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(o.push({code:200,body:JSON.stringify(U.dummyCollectionRecord(s),null,2)}),i&&o.push({code:403,body:`
-                    {
-                      "code": 403,
-                      "message": "Only admins can access this action.",
-                      "data": {}
-                    }
-                `}),o.push({code:404,body:`
-                {
-                  "code": 404,
-                  "message": "The requested resource wasn't found.",
-                  "data": {}
-                }
-            `})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
-                import PocketBase from 'pocketbase';
-
-                const client = new PocketBase("${we.baseUrl}");
-
-                client.Records.getOne("${s==null?void 0:s.name}", "RECORD_ID")
-                    .then(function (record) {
-                        // success...
-                    }).catch(function (error) {
-                        // error...
-                    });
-            `}])},[s,i,l,r,a,o,u,f]}class yO extends Fe{constructor(e){super(),Le(this,e,bO,_O,Ae,{collection:0})}}function Dh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Ah(n,e,t){const i=n.slice();return i[8]=e[t],i}function Eh(n,e,t){const i=n.slice();return i[13]=e[t],i}function Ph(n,e,t){const i=n.slice();return i[16]=e[t],i}function Lh(n,e,t){const i=n.slice();return i[16]=e[t],i}function Fh(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ih(n,e){let t,i=e[16].lang+"",s,l,r,o;function a(){return e[6](e[16])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[2]===e[16].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[16].lang+"")&&_e(s,i),f&20&&Q(t,"active",e[2]===e[16].lang)},d(u){u&&k(t),r=!1,o()}}}function Nh(n,e){let t,i,s,l;return i=new en({props:{content:e[16].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[2]===e[16].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[16].code),i.$set(a),o&20&&Q(t,"active",e[2]===e[16].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function vO(n){let e;return{c(){e=_("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function kO(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function wO(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=H("User "),i=H(t),s=H(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&_e(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function SO(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=H("Relation record "),i=H(t),s=H(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&_e(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function $O(n){let e,t,i,s,l;return{c(){e=H("FormData object."),t=_("br"),i=H(`
-                        Set to `),s=_("code"),s.textContent="null",l=H(" to delete already uploaded file(s).")},m(r,o){w(r,e,o),w(r,t,o),w(r,i,o),w(r,s,o),w(r,l,o)},p:re,d(r){r&&k(e),r&&k(t),r&&k(i),r&&k(s),r&&k(l)}}}function CO(n){let e;return{c(){e=H("URL address.")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function MO(n){let e;return{c(){e=H("Email address.")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function OO(n){let e;return{c(){e=H("JSON array or object.")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function TO(n){let e;return{c(){e=H("Number value.")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function DO(n){let e;return{c(){e=H("Plain text value.")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function Rh(n,e){let t,i,s,l,r,o=e[13].name+"",a,u,f,c,d=U.getFieldValueType(e[13])+"",h,g,y,b;function v(E,D){return E[13].required?kO:vO}let S=v(e),$=S(e);function C(E,D){if(E[13].type==="text")return DO;if(E[13].type==="number")return TO;if(E[13].type==="json")return OO;if(E[13].type==="email")return MO;if(E[13].type==="url")return CO;if(E[13].type==="file")return $O;if(E[13].type==="relation")return SO;if(E[13].type==="user")return wO}let M=C(e),T=M&&M(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),$.c(),l=O(),r=_("span"),a=H(o),u=O(),f=_("td"),c=_("span"),h=H(d),g=O(),y=_("td"),T&&T.c(),b=O(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(E,D){w(E,t,D),m(t,i),m(i,s),$.m(s,null),m(s,l),m(s,r),m(r,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,y),T&&T.m(y,null),m(t,b)},p(E,D){e=E,S!==(S=v(e))&&($.d(1),$=S(e),$&&($.c(),$.m(s,l))),D&1&&o!==(o=e[13].name+"")&&_e(a,o),D&1&&d!==(d=U.getFieldValueType(e[13])+"")&&_e(h,d),M===(M=C(e))&&T?T.p(e,D):(T&&T.d(1),T=M&&M(e),T&&(T.c(),T.m(y,null)))},d(E){E&&k(t),$.d(),T&&T.d()}}}function jh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[1]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&8&&i!==(i=e[8].code+"")&&_e(s,i),f&10&&Q(t,"active",e[1]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function Hh(n,e){let t,i,s,l;return i=new en({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[1]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&8&&(a.content=e[8].body),i.$set(a),o&10&&Q(t,"active",e[1]===e[8].code)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function AO(n){var Ot;let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,b,v=n[0].name+"",S,$,C,M,T,E,D,P,L,N,R,J=[],W=new Map,q,G,K=[],Y=new Map,ne,fe,ye,se,Z,De,te,be=[],ue=new Map,ie,ve,He,Ie,qe,oe=[],le=new Map,ke,Ve,ze=[],Ze=new Map,ge,Ee=n[5]&&Fh(),x=n[4];const ae=me=>me[16].lang;for(let me=0;me<x.length;me+=1){let Ce=Lh(n,x,me),Ke=ae(Ce);W.set(Ke,J[me]=Ih(Ke,Ce))}let Be=n[4];const vt=me=>me[16].lang;for(let me=0;me<Be.length;me+=1){let Ce=Ph(n,Be,me),Ke=vt(Ce);Y.set(Ke,K[me]=Nh(Ke,Ce))}let it=(Ot=n[0])==null?void 0:Ot.schema;const gt=me=>me[13].name;for(let me=0;me<it.length;me+=1){let Ce=Eh(n,it,me),Ke=gt(Ce);ue.set(Ke,be[me]=Rh(Ke,Ce))}let at=n[3];const yt=me=>me[8].code;for(let me=0;me<at.length;me+=1){let Ce=Ah(n,at,me),Ke=yt(Ce);le.set(Ke,oe[me]=jh(Ke,Ce))}let zt=n[3];const Mt=me=>me[8].code;for(let me=0;me<zt.length;me+=1){let Ce=Dh(n,zt,me),Ke=Mt(Ce);Ze.set(Ke,ze[me]=Hh(Ke,Ce))}return{c(){e=_("div"),t=_("strong"),t.textContent="POST",i=O(),s=_("div"),l=_("p"),r=H("/api/collections/"),o=_("strong"),u=H(a),f=H("/records"),c=O(),Ee&&Ee.c(),d=O(),h=_("div"),g=_("p"),y=H("Create a new "),b=_("strong"),S=H(v),$=H(" record."),C=O(),M=_("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
-        <code>multipart/form-data</code>.`,T=O(),E=_("p"),E.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",D=O(),P=_("div"),P.textContent="Client SDKs example",L=O(),N=_("div"),R=_("div");for(let me=0;me<J.length;me+=1)J[me].c();q=O(),G=_("div");for(let me=0;me<K.length;me+=1)K[me].c();ne=O(),fe=_("div"),fe.textContent="Body Parameters",ye=O(),se=_("table"),Z=_("thead"),Z.innerHTML=`<tr><th>Param</th> 
-            <th>Type</th> 
-            <th width="50%">Description</th></tr>`,De=O(),te=_("tbody");for(let me=0;me<be.length;me+=1)be[me].c();ie=O(),ve=_("div"),ve.textContent="Responses",He=O(),Ie=_("div"),qe=_("div");for(let me=0;me<oe.length;me+=1)oe[me].c();ke=O(),Ve=_("div");for(let me=0;me<ze.length;me+=1)ze[me].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-success"),p(h,"class","content m-b-base"),p(P,"class","section-title"),p(R,"class","tabs-header compact left"),p(G,"class","tabs-content"),p(N,"class","tabs m-b-lg"),p(fe,"class","section-title"),p(se,"class","table-compact table-border m-b-lg"),p(ve,"class","section-title"),p(qe,"class","tabs-header compact left"),p(Ve,"class","tabs-content"),p(Ie,"class","tabs")},m(me,Ce){w(me,e,Ce),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(e,c),Ee&&Ee.m(e,null),w(me,d,Ce),w(me,h,Ce),m(h,g),m(g,y),m(g,b),m(b,S),m(g,$),m(h,C),m(h,M),m(h,T),m(h,E),w(me,D,Ce),w(me,P,Ce),w(me,L,Ce),w(me,N,Ce),m(N,R);for(let Ke=0;Ke<J.length;Ke+=1)J[Ke].m(R,null);m(N,q),m(N,G);for(let Ke=0;Ke<K.length;Ke+=1)K[Ke].m(G,null);w(me,ne,Ce),w(me,fe,Ce),w(me,ye,Ce),w(me,se,Ce),m(se,Z),m(se,De),m(se,te);for(let Ke=0;Ke<be.length;Ke+=1)be[Ke].m(te,null);w(me,ie,Ce),w(me,ve,Ce),w(me,He,Ce),w(me,Ie,Ce),m(Ie,qe);for(let Ke=0;Ke<oe.length;Ke+=1)oe[Ke].m(qe,null);m(Ie,ke),m(Ie,Ve);for(let Ke=0;Ke<ze.length;Ke+=1)ze[Ke].m(Ve,null);ge=!0},p(me,[Ce]){var Ke;(!ge||Ce&1)&&a!==(a=me[0].name+"")&&_e(u,a),me[5]?Ee||(Ee=Fh(),Ee.c(),Ee.m(e,null)):Ee&&(Ee.d(1),Ee=null),(!ge||Ce&1)&&v!==(v=me[0].name+"")&&_e(S,v),Ce&20&&(x=me[4],J=ot(J,Ce,ae,1,me,x,W,R,an,Ih,null,Lh)),Ce&20&&(Be=me[4],Oe(),K=ot(K,Ce,vt,1,me,Be,Y,G,Lt,Nh,null,Ph),Te()),Ce&1&&(it=(Ke=me[0])==null?void 0:Ke.schema,be=ot(be,Ce,gt,1,me,it,ue,te,an,Rh,null,Eh)),Ce&10&&(at=me[3],oe=ot(oe,Ce,yt,1,me,at,le,qe,an,jh,null,Ah)),Ce&10&&(zt=me[3],Oe(),ze=ot(ze,Ce,Mt,1,me,zt,Ze,Ve,Lt,Hh,null,Dh),Te())},i(me){if(!ge){for(let Ce=0;Ce<Be.length;Ce+=1)A(K[Ce]);for(let Ce=0;Ce<zt.length;Ce+=1)A(ze[Ce]);ge=!0}},o(me){for(let Ce=0;Ce<K.length;Ce+=1)F(K[Ce]);for(let Ce=0;Ce<ze.length;Ce+=1)F(ze[Ce]);ge=!1},d(me){me&&k(e),Ee&&Ee.d(),me&&k(d),me&&k(h),me&&k(D),me&&k(P),me&&k(L),me&&k(N);for(let Ce=0;Ce<J.length;Ce+=1)J[Ce].d();for(let Ce=0;Ce<K.length;Ce+=1)K[Ce].d();me&&k(ne),me&&k(fe),me&&k(ye),me&&k(se);for(let Ce=0;Ce<be.length;Ce+=1)be[Ce].d();me&&k(ie),me&&k(ve),me&&k(He),me&&k(Ie);for(let Ce=0;Ce<oe.length;Ce+=1)oe[Ce].d();for(let Ce=0;Ce<ze.length;Ce+=1)ze[Ce].d()}}}function EO(n,e,t){let i,{collection:s=new Ln}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(2,r=c.lang),f=c=>t(1,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{var c,d;n.$$.dirty&1&&t(5,i=(s==null?void 0:s.createRule)===null),n.$$.dirty&1&&t(3,o=[{code:200,body:JSON.stringify(U.dummyCollectionRecord(s),null,2)},{code:400,body:`
-                {
-                  "code": 400,
-                  "message": "Failed to create record.",
-                  "data": {
-                    "${(d=(c=s==null?void 0:s.schema)==null?void 0:c[0])==null?void 0:d.name}": {
-                      "code": "validation_required",
-                      "message": "Missing required value."
-                    }
-                  }
-                }
-            `},{code:403,body:`
-                {
-                  "code": 403,
-                  "message": "You are not allowed to perform this request.",
-                  "data": {}
-                }
-            `}]),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
-                import PocketBase from 'pocketbase';
-
-                const client = new PocketBase("${we.baseUrl}");
-
-                const data = { ... };
-
-                client.Records.create("${s==null?void 0:s.name}", data)
-                    .then(function (record) {
-                        // success...
-                    }).catch(function (error) {
-                        // error...
-                    });
-            `}])},[s,l,r,o,a,i,u,f]}class PO extends Fe{constructor(e){super(),Le(this,e,EO,AO,Ae,{collection:0})}}function qh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Vh(n,e,t){const i=n.slice();return i[8]=e[t],i}function zh(n,e,t){const i=n.slice();return i[13]=e[t],i}function Bh(n,e,t){const i=n.slice();return i[16]=e[t],i}function Uh(n,e,t){const i=n.slice();return i[16]=e[t],i}function Wh(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Yh(n,e){let t,i=e[16].lang+"",s,l,r,o;function a(){return e[6](e[16])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[2]===e[16].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[16].lang+"")&&_e(s,i),f&20&&Q(t,"active",e[2]===e[16].lang)},d(u){u&&k(t),r=!1,o()}}}function Kh(n,e){let t,i,s,l;return i=new en({props:{content:e[16].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[2]===e[16].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[16].code),i.$set(a),o&20&&Q(t,"active",e[2]===e[16].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function LO(n){let e;return{c(){e=_("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function FO(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function IO(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=H("User "),i=H(t),s=H(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&_e(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function NO(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=H("Relation record "),i=H(t),s=H(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&_e(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function RO(n){let e,t,i,s,l;return{c(){e=H("FormData object."),t=_("br"),i=H(`
-                        Set to `),s=_("code"),s.textContent="null",l=H(" to delete already uploaded file(s).")},m(r,o){w(r,e,o),w(r,t,o),w(r,i,o),w(r,s,o),w(r,l,o)},p:re,d(r){r&&k(e),r&&k(t),r&&k(i),r&&k(s),r&&k(l)}}}function jO(n){let e;return{c(){e=H("URL address.")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function HO(n){let e;return{c(){e=H("Email address.")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function qO(n){let e;return{c(){e=H("JSON array or object.")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function VO(n){let e;return{c(){e=H("Number value.")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function zO(n){let e;return{c(){e=H("Plain text value.")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function Jh(n,e){let t,i,s,l,r,o=e[13].name+"",a,u,f,c,d=U.getFieldValueType(e[13])+"",h,g,y,b;function v(E,D){return E[13].required?FO:LO}let S=v(e),$=S(e);function C(E,D){if(E[13].type==="text")return zO;if(E[13].type==="number")return VO;if(E[13].type==="json")return qO;if(E[13].type==="email")return HO;if(E[13].type==="url")return jO;if(E[13].type==="file")return RO;if(E[13].type==="relation")return NO;if(E[13].type==="user")return IO}let M=C(e),T=M&&M(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),$.c(),l=O(),r=_("span"),a=H(o),u=O(),f=_("td"),c=_("span"),h=H(d),g=O(),y=_("td"),T&&T.c(),b=O(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(E,D){w(E,t,D),m(t,i),m(i,s),$.m(s,null),m(s,l),m(s,r),m(r,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,y),T&&T.m(y,null),m(t,b)},p(E,D){e=E,S!==(S=v(e))&&($.d(1),$=S(e),$&&($.c(),$.m(s,l))),D&1&&o!==(o=e[13].name+"")&&_e(a,o),D&1&&d!==(d=U.getFieldValueType(e[13])+"")&&_e(h,d),M===(M=C(e))&&T?T.p(e,D):(T&&T.d(1),T=M&&M(e),T&&(T.c(),T.m(y,null)))},d(E){E&&k(t),$.d(),T&&T.d()}}}function Gh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[1]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&8&&i!==(i=e[8].code+"")&&_e(s,i),f&10&&Q(t,"active",e[1]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function Zh(n,e){let t,i,s,l;return i=new en({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[1]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&8&&(a.content=e[8].body),i.$set(a),o&10&&Q(t,"active",e[1]===e[8].code)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function BO(n){var fn;let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,b,v,S=n[0].name+"",$,C,M,T,E,D,P,L,N,R,J,W=[],q=new Map,G,K,Y=[],ne=new Map,fe,ye,se,Z,De,te,be,ue,ie,ve,He,Ie=[],qe=new Map,oe,le,ke,Ve,ze,Ze=[],ge=new Map,Ee,x,ae=[],Be=new Map,vt,it=n[5]&&Wh(),gt=n[4];const at=ce=>ce[16].lang;for(let ce=0;ce<gt.length;ce+=1){let Se=Uh(n,gt,ce),xe=at(Se);q.set(xe,W[ce]=Yh(xe,Se))}let yt=n[4];const zt=ce=>ce[16].lang;for(let ce=0;ce<yt.length;ce+=1){let Se=Bh(n,yt,ce),xe=zt(Se);ne.set(xe,Y[ce]=Kh(xe,Se))}let Mt=(fn=n[0])==null?void 0:fn.schema;const Ot=ce=>ce[13].name;for(let ce=0;ce<Mt.length;ce+=1){let Se=zh(n,Mt,ce),xe=Ot(Se);qe.set(xe,Ie[ce]=Jh(xe,Se))}let me=n[3];const Ce=ce=>ce[8].code;for(let ce=0;ce<me.length;ce+=1){let Se=Vh(n,me,ce),xe=Ce(Se);ge.set(xe,Ze[ce]=Gh(xe,Se))}let Ke=n[3];const st=ce=>ce[8].code;for(let ce=0;ce<Ke.length;ce+=1){let Se=qh(n,Ke,ce),xe=st(Se);Be.set(xe,ae[ce]=Zh(xe,Se))}return{c(){e=_("div"),t=_("strong"),t.textContent="PATCH",i=O(),s=_("div"),l=_("p"),r=H("/api/collections/"),o=_("strong"),u=H(a),f=H("/records/"),c=_("strong"),c.textContent=":id",d=O(),it&&it.c(),h=O(),g=_("div"),y=_("p"),b=H("Update a single "),v=_("strong"),$=H(S),C=H(" record."),M=O(),T=_("p"),T.innerHTML=`Body parameters could be sent as <code>application/json</code> or
-        <code>multipart/form-data</code>.`,E=O(),D=_("p"),D.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",P=O(),L=_("div"),L.textContent="Client SDKs example",N=O(),R=_("div"),J=_("div");for(let ce=0;ce<W.length;ce+=1)W[ce].c();G=O(),K=_("div");for(let ce=0;ce<Y.length;ce+=1)Y[ce].c();fe=O(),ye=_("div"),ye.textContent="Path parameters",se=O(),Z=_("table"),Z.innerHTML=`<thead><tr><th>Param</th> 
-            <th>Type</th> 
-            <th width="60%">Description</th></tr></thead> 
-    <tbody><tr><td>id</td> 
-            <td><span class="label">String</span></td> 
-            <td>ID of the record to update.</td></tr></tbody>`,De=O(),te=_("div"),te.textContent="Body Parameters",be=O(),ue=_("table"),ie=_("thead"),ie.innerHTML=`<tr><th>Param</th> 
-            <th width="60%">Type</th> 
-            <th width="50%">Description</th></tr>`,ve=O(),He=_("tbody");for(let ce=0;ce<Ie.length;ce+=1)Ie[ce].c();oe=O(),le=_("div"),le.textContent="Responses",ke=O(),Ve=_("div"),ze=_("div");for(let ce=0;ce<Ze.length;ce+=1)Ze[ce].c();Ee=O(),x=_("div");for(let ce=0;ce<ae.length;ce+=1)ae[ce].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-warning"),p(g,"class","content m-b-base"),p(L,"class","section-title"),p(J,"class","tabs-header compact left"),p(K,"class","tabs-content"),p(R,"class","tabs m-b-lg"),p(ye,"class","section-title"),p(Z,"class","table-compact table-border m-b-lg"),p(te,"class","section-title"),p(ue,"class","table-compact table-border m-b-lg"),p(le,"class","section-title"),p(ze,"class","tabs-header compact left"),p(x,"class","tabs-content"),p(Ve,"class","tabs")},m(ce,Se){w(ce,e,Se),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(l,c),m(e,d),it&&it.m(e,null),w(ce,h,Se),w(ce,g,Se),m(g,y),m(y,b),m(y,v),m(v,$),m(y,C),m(g,M),m(g,T),m(g,E),m(g,D),w(ce,P,Se),w(ce,L,Se),w(ce,N,Se),w(ce,R,Se),m(R,J);for(let xe=0;xe<W.length;xe+=1)W[xe].m(J,null);m(R,G),m(R,K);for(let xe=0;xe<Y.length;xe+=1)Y[xe].m(K,null);w(ce,fe,Se),w(ce,ye,Se),w(ce,se,Se),w(ce,Z,Se),w(ce,De,Se),w(ce,te,Se),w(ce,be,Se),w(ce,ue,Se),m(ue,ie),m(ue,ve),m(ue,He);for(let xe=0;xe<Ie.length;xe+=1)Ie[xe].m(He,null);w(ce,oe,Se),w(ce,le,Se),w(ce,ke,Se),w(ce,Ve,Se),m(Ve,ze);for(let xe=0;xe<Ze.length;xe+=1)Ze[xe].m(ze,null);m(Ve,Ee),m(Ve,x);for(let xe=0;xe<ae.length;xe+=1)ae[xe].m(x,null);vt=!0},p(ce,[Se]){var xe;(!vt||Se&1)&&a!==(a=ce[0].name+"")&&_e(u,a),ce[5]?it||(it=Wh(),it.c(),it.m(e,null)):it&&(it.d(1),it=null),(!vt||Se&1)&&S!==(S=ce[0].name+"")&&_e($,S),Se&20&&(gt=ce[4],W=ot(W,Se,at,1,ce,gt,q,J,an,Yh,null,Uh)),Se&20&&(yt=ce[4],Oe(),Y=ot(Y,Se,zt,1,ce,yt,ne,K,Lt,Kh,null,Bh),Te()),Se&1&&(Mt=(xe=ce[0])==null?void 0:xe.schema,Ie=ot(Ie,Se,Ot,1,ce,Mt,qe,He,an,Jh,null,zh)),Se&10&&(me=ce[3],Ze=ot(Ze,Se,Ce,1,ce,me,ge,ze,an,Gh,null,Vh)),Se&10&&(Ke=ce[3],Oe(),ae=ot(ae,Se,st,1,ce,Ke,Be,x,Lt,Zh,null,qh),Te())},i(ce){if(!vt){for(let Se=0;Se<yt.length;Se+=1)A(Y[Se]);for(let Se=0;Se<Ke.length;Se+=1)A(ae[Se]);vt=!0}},o(ce){for(let Se=0;Se<Y.length;Se+=1)F(Y[Se]);for(let Se=0;Se<ae.length;Se+=1)F(ae[Se]);vt=!1},d(ce){ce&&k(e),it&&it.d(),ce&&k(h),ce&&k(g),ce&&k(P),ce&&k(L),ce&&k(N),ce&&k(R);for(let Se=0;Se<W.length;Se+=1)W[Se].d();for(let Se=0;Se<Y.length;Se+=1)Y[Se].d();ce&&k(fe),ce&&k(ye),ce&&k(se),ce&&k(Z),ce&&k(De),ce&&k(te),ce&&k(be),ce&&k(ue);for(let Se=0;Se<Ie.length;Se+=1)Ie[Se].d();ce&&k(oe),ce&&k(le),ce&&k(ke),ce&&k(Ve);for(let Se=0;Se<Ze.length;Se+=1)Ze[Se].d();for(let Se=0;Se<ae.length;Se+=1)ae[Se].d()}}}function UO(n,e,t){let i,{collection:s=new Ln}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(2,r=c.lang),f=c=>t(1,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{var c,d;n.$$.dirty&1&&t(5,i=(s==null?void 0:s.updateRule)===null),n.$$.dirty&1&&t(3,o=[{code:200,body:JSON.stringify(U.dummyCollectionRecord(s),null,2)},{code:400,body:`
-                {
-                  "code": 400,
-                  "message": "Failed to update record.",
-                  "data": {
-                    "${(d=(c=s==null?void 0:s.schema)==null?void 0:c[0])==null?void 0:d.name}": {
-                      "code": "validation_required",
-                      "message": "Missing required value."
-                    }
-                  }
-                }
-            `},{code:403,body:`
-                {
-                  "code": 403,
-                  "message": "You are not allowed to perform this request.",
-                  "data": {}
-                }
-            `},{code:404,body:`
-                {
-                  "code": 404,
-                  "message": "The requested resource wasn't found.",
-                  "data": {}
-                }
-            `}]),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
-                import PocketBase from 'pocketbase';
-
-                const client = new PocketBase("${we.baseUrl}");
-
-                const data = { ... };
-
-                client.Records.update("${s==null?void 0:s.name}", "RECORD_ID", data)
-                    .then(function (record) {
-                        // success...
-                    }).catch(function (error) {
-                        // error...
-                    });
-            `}])},[s,l,r,o,a,i,u,f]}class WO extends Fe{constructor(e){super(),Le(this,e,UO,BO,Ae,{collection:0})}}function xh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Xh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Qh(n,e,t){const i=n.slice();return i[13]=e[t],i}function em(n,e,t){const i=n.slice();return i[13]=e[t],i}function tm(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function nm(n,e){let t,i=e[13].lang+"",s,l,r,o;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&_e(s,i),f&24&&Q(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),r=!1,o()}}}function im(n,e){let t,i,s,l;return i=new en({props:{content:e[13].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[3]===e[13].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[13].code),i.$set(a),o&24&&Q(t,"active",e[3]===e[13].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function sm(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&36&&Q(t,"active",e[2]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function lm(n,e){let t,i,s,l;return i=new en({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[2]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r,o&36&&Q(t,"active",e[2]===e[8].code)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function YO(n){let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,b,v,S=n[0].name+"",$,C,M,T,E,D,P,L=[],N=new Map,R,J,W=[],q=new Map,G,K,Y,ne,fe,ye,se,Z,De,te=[],be=new Map,ue,ie,ve=[],He=new Map,Ie,qe=n[1]&&tm(),oe=n[4];const le=x=>x[13].lang;for(let x=0;x<oe.length;x+=1){let ae=em(n,oe,x),Be=le(ae);N.set(Be,L[x]=nm(Be,ae))}let ke=n[4];const Ve=x=>x[13].lang;for(let x=0;x<ke.length;x+=1){let ae=Qh(n,ke,x),Be=Ve(ae);q.set(Be,W[x]=im(Be,ae))}let ze=n[5];const Ze=x=>x[8].code;for(let x=0;x<ze.length;x+=1){let ae=Xh(n,ze,x),Be=Ze(ae);be.set(Be,te[x]=sm(Be,ae))}let ge=n[5];const Ee=x=>x[8].code;for(let x=0;x<ge.length;x+=1){let ae=xh(n,ge,x),Be=Ee(ae);He.set(Be,ve[x]=lm(Be,ae))}return{c(){e=_("div"),t=_("strong"),t.textContent="DELETE",i=O(),s=_("div"),l=_("p"),r=H("/api/collections/"),o=_("strong"),u=H(a),f=H("/records/"),c=_("strong"),c.textContent=":id",d=O(),qe&&qe.c(),h=O(),g=_("div"),y=_("p"),b=H("Delete a single "),v=_("strong"),$=H(S),C=H(" record."),M=O(),T=_("div"),T.textContent="Client SDKs example",E=O(),D=_("div"),P=_("div");for(let x=0;x<L.length;x+=1)L[x].c();R=O(),J=_("div");for(let x=0;x<W.length;x+=1)W[x].c();G=O(),K=_("div"),K.textContent="Path parameters",Y=O(),ne=_("table"),ne.innerHTML=`<thead><tr><th>Param</th> 
-            <th>Type</th> 
-            <th width="60%">Description</th></tr></thead> 
-    <tbody><tr><td>id</td> 
-            <td><span class="label">String</span></td> 
-            <td>ID of the record to delete.</td></tr></tbody>`,fe=O(),ye=_("div"),ye.textContent="Responses",se=O(),Z=_("div"),De=_("div");for(let x=0;x<te.length;x+=1)te[x].c();ue=O(),ie=_("div");for(let x=0;x<ve.length;x+=1)ve[x].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-danger"),p(g,"class","content m-b-base"),p(T,"class","section-title"),p(P,"class","tabs-header compact left"),p(J,"class","tabs-content"),p(D,"class","tabs m-b-lg"),p(K,"class","section-title"),p(ne,"class","table-compact table-border m-b-lg"),p(ye,"class","section-title"),p(De,"class","tabs-header compact left"),p(ie,"class","tabs-content"),p(Z,"class","tabs")},m(x,ae){w(x,e,ae),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(l,c),m(e,d),qe&&qe.m(e,null),w(x,h,ae),w(x,g,ae),m(g,y),m(y,b),m(y,v),m(v,$),m(y,C),w(x,M,ae),w(x,T,ae),w(x,E,ae),w(x,D,ae),m(D,P);for(let Be=0;Be<L.length;Be+=1)L[Be].m(P,null);m(D,R),m(D,J);for(let Be=0;Be<W.length;Be+=1)W[Be].m(J,null);w(x,G,ae),w(x,K,ae),w(x,Y,ae),w(x,ne,ae),w(x,fe,ae),w(x,ye,ae),w(x,se,ae),w(x,Z,ae),m(Z,De);for(let Be=0;Be<te.length;Be+=1)te[Be].m(De,null);m(Z,ue),m(Z,ie);for(let Be=0;Be<ve.length;Be+=1)ve[Be].m(ie,null);Ie=!0},p(x,[ae]){(!Ie||ae&1)&&a!==(a=x[0].name+"")&&_e(u,a),x[1]?qe||(qe=tm(),qe.c(),qe.m(e,null)):qe&&(qe.d(1),qe=null),(!Ie||ae&1)&&S!==(S=x[0].name+"")&&_e($,S),ae&24&&(oe=x[4],L=ot(L,ae,le,1,x,oe,N,P,an,nm,null,em)),ae&24&&(ke=x[4],Oe(),W=ot(W,ae,Ve,1,x,ke,q,J,Lt,im,null,Qh),Te()),ae&36&&(ze=x[5],te=ot(te,ae,Ze,1,x,ze,be,De,an,sm,null,Xh)),ae&36&&(ge=x[5],Oe(),ve=ot(ve,ae,Ee,1,x,ge,He,ie,Lt,lm,null,xh),Te())},i(x){if(!Ie){for(let ae=0;ae<ke.length;ae+=1)A(W[ae]);for(let ae=0;ae<ge.length;ae+=1)A(ve[ae]);Ie=!0}},o(x){for(let ae=0;ae<W.length;ae+=1)F(W[ae]);for(let ae=0;ae<ve.length;ae+=1)F(ve[ae]);Ie=!1},d(x){x&&k(e),qe&&qe.d(),x&&k(h),x&&k(g),x&&k(M),x&&k(T),x&&k(E),x&&k(D);for(let ae=0;ae<L.length;ae+=1)L[ae].d();for(let ae=0;ae<W.length;ae+=1)W[ae].d();x&&k(G),x&&k(K),x&&k(Y),x&&k(ne),x&&k(fe),x&&k(ye),x&&k(se),x&&k(Z);for(let ae=0;ae<te.length;ae+=1)te[ae].d();for(let ae=0;ae<ve.length;ae+=1)ve[ae].d()}}}function KO(n,e,t){let i,{collection:s=new Ln}=e,l=204,r="JavaScript",o=[],a=[];const u=c=>t(3,r=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.deleteRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(o.push({code:204,body:`
-                null
-            `}),o.push({code:400,body:`
-                {
-                  "code": 400,
-                  "message": "Failed to delete record. Make sure that the record is not part of a required relation reference.",
-                  "data": {}
-                }
-            `}),i&&o.push({code:403,body:`
-                    {
-                      "code": 403,
-                      "message": "Only admins can access this action.",
-                      "data": {}
-                    }
-                `}),o.push({code:404,body:`
-                {
-                  "code": 404,
-                  "message": "The requested resource wasn't found.",
-                  "data": {}
-                }
-            `})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
-                import PocketBase from 'pocketbase';
-
-                const client = new PocketBase("${we.baseUrl}");
-
-                client.Records.delete("${s==null?void 0:s.name}", "RECORD_ID")
-                    .then(function () {
-                        // success...
-                    }).catch(function (error) {
-                        // error...
-                    });
-            `}])},[s,i,l,r,a,o,u,f]}class JO extends Fe{constructor(e){super(),Le(this,e,KO,YO,Ae,{collection:0})}}function rm(n,e,t){const i=n.slice();return i[4]=e[t],i}function om(n,e,t){const i=n.slice();return i[4]=e[t],i}function am(n,e){let t,i=e[4].lang+"",s,l,r,o;function a(){return e[3](e[4])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),Q(t,"active",e[1]===e[4].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&4&&i!==(i=e[4].lang+"")&&_e(s,i),f&6&&Q(t,"active",e[1]===e[4].lang)},d(u){u&&k(t),r=!1,o()}}}function um(n,e){let t,i,s,l;return i=new en({props:{content:e[4].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),Q(t,"active",e[1]===e[4].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&4&&(a.content=e[4].code),i.$set(a),o&6&&Q(t,"active",e[1]===e[4].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function GO(n){let e,t,i,s,l,r,o,a,u=[],f=new Map,c,d,h=[],g=new Map,y,b,v,S,$,C=n[2];const M=D=>D[4].lang;for(let D=0;D<C.length;D+=1){let P=om(n,C,D),L=M(P);f.set(L,u[D]=am(L,P))}let T=n[2];const E=D=>D[4].lang;for(let D=0;D<T.length;D+=1){let P=rm(n,T,D),L=E(P);g.set(L,h[D]=um(L,P))}return S=new en({props:{content:JSON.stringify({action:"create",record:U.dummyCollectionRecord(n[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){e=_("div"),e.innerHTML=`<strong class="label label-primary">SSE</strong> 
-    <div class="content"><p>/api/realtime</p></div>`,t=O(),i=_("div"),i.innerHTML=`<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p> 
-    <p>Events are send for <strong>create</strong>, <strong>update</strong>
-        and <strong>delete</strong> record operations (see &quot;Event data format&quot; section below).</p> 
-    <div class="alert alert-info m-t-10"><div class="icon"><i class="ri-information-line"></i></div> 
-        <div class="contet"><p><strong>You could subscribe to a single record or to an entire collection.</strong></p> 
-            <p>When you subscribe to a <strong>single record</strong>, the collection&#39;s
-                <strong>ViewRule</strong> will be used to determine whether the subscriber has access to receive
-                the event message.</p> 
-            <p>When you subscribe to an <strong>entire collection</strong>, the collection&#39;s
-                <strong>ListRule</strong> will be used to determine whether the subscriber has access to receive
-                the event message.</p></div></div>`,s=O(),l=_("div"),l.textContent="Client SDKs example",r=O(),o=_("div"),a=_("div");for(let D=0;D<u.length;D+=1)u[D].c();c=O(),d=_("div");for(let D=0;D<h.length;D+=1)h[D].c();y=O(),b=_("div"),b.textContent="Event data format",v=O(),B(S.$$.fragment),p(e,"class","alert"),p(i,"class","content m-b-base"),p(l,"class","section-title"),p(a,"class","tabs-header compact left"),p(d,"class","tabs-content"),p(o,"class","tabs m-b-base"),p(b,"class","section-title")},m(D,P){w(D,e,P),w(D,t,P),w(D,i,P),w(D,s,P),w(D,l,P),w(D,r,P),w(D,o,P),m(o,a);for(let L=0;L<u.length;L+=1)u[L].m(a,null);m(o,c),m(o,d);for(let L=0;L<h.length;L+=1)h[L].m(d,null);w(D,y,P),w(D,b,P),w(D,v,P),V(S,D,P),$=!0},p(D,[P]){P&6&&(C=D[2],u=ot(u,P,M,1,D,C,f,a,an,am,null,om)),P&6&&(T=D[2],Oe(),h=ot(h,P,E,1,D,T,g,d,Lt,um,null,rm),Te());const L={};P&1&&(L.content=JSON.stringify({action:"create",record:U.dummyCollectionRecord(D[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),S.$set(L)},i(D){if(!$){for(let P=0;P<T.length;P+=1)A(h[P]);A(S.$$.fragment,D),$=!0}},o(D){for(let P=0;P<h.length;P+=1)F(h[P]);F(S.$$.fragment,D),$=!1},d(D){D&&k(e),D&&k(t),D&&k(i),D&&k(s),D&&k(l),D&&k(r),D&&k(o);for(let P=0;P<u.length;P+=1)u[P].d();for(let P=0;P<h.length;P+=1)h[P].d();D&&k(y),D&&k(b),D&&k(v),z(S,D)}}}function ZO(n,e,t){let{collection:i=new Ln}=e,s="JavaScript",l=[];const r=o=>t(1,s=o.lang);return n.$$set=o=>{"collection"in o&&t(0,i=o.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,l=[{lang:"JavaScript",code:`
-                import PocketBase from 'pocketbase';
-
-                const client = new PocketBase("${we.baseUrl}");
-
-                // (Optionally) authenticate
-                client.Users.authViaEmail("test@example.com", "123456");
-
-                // Subscribe to changes in any record from the collection
-                client.Realtime.subscribe("${i==null?void 0:i.name}", function (e) {
-                    console.log(e.record);
-                });
-
-                // Subscribe to changes in a single record
-                client.Realtime.subscribe("${i==null?void 0:i.name}/RECORD_ID", function (e) {
-                    console.log(e.record);
-                });
-
-                // Unsubscribe
-                client.Realtime.unsubscribe() // remove all subscriptions
-                client.Realtime.unsubscribe("${i==null?void 0:i.name}") // remove the collection subscription
-                client.Realtime.unsubscribe("${i==null?void 0:i.name}/RECORD_ID") // remove the record subscription
-            `}])},[i,s,l,r]}class xO extends Fe{constructor(e){super(),Le(this,e,ZO,GO,Ae,{collection:0})}}function fm(n,e,t){const i=n.slice();return i[14]=e[t],i}function cm(n,e,t){const i=n.slice();return i[14]=e[t],i}function dm(n){let e,t,i,s;var l=n[14].component;function r(o){return{props:{collection:o[3]}}}return l&&(t=new l(r(n))),{c(){e=_("div"),t&&B(t.$$.fragment),i=O(),p(e,"class","tab-item active")},m(o,a){w(o,e,a),t&&V(t,e,null),m(e,i),s=!0},p(o,a){const u={};if(a&8&&(u.collection=o[3]),l!==(l=o[14].component)){if(t){Oe();const f=t;F(f.$$.fragment,1,0,()=>{z(f,1)}),Te()}l?(t=new l(r(o)),B(t.$$.fragment),A(t.$$.fragment,1),V(t,e,i)):t=null}else l&&t.$set(u)},i(o){s||(t&&A(t.$$.fragment,o),s=!0)},o(o){t&&F(t.$$.fragment,o),s=!1},d(o){o&&k(e),t&&z(t)}}}function pm(n,e){let t,i,s,l=e[4]===e[14].id&&dm(e);return{key:n,first:null,c(){t=lt(),l&&l.c(),i=lt(),this.first=t},m(r,o){w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){e=r,e[4]===e[14].id?l?(l.p(e,o),o&16&&A(l,1)):(l=dm(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Oe(),F(l,1,1,()=>{l=null}),Te())},i(r){s||(A(l),s=!0)},o(r){F(l),s=!1},d(r){r&&k(t),l&&l.d(r),r&&k(i)}}}function XO(n){let e,t=[],i=new Map,s,l=n[5];const r=o=>o[14].id;for(let o=0;o<l.length;o+=1){let a=fm(n,l,o),u=r(a);i.set(u,t[o]=pm(u,a))}return{c(){e=_("div");for(let o=0;o<t.length;o+=1)t[o].c();p(e,"class","tabs-content")},m(o,a){w(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(o,a){a&56&&(l=o[5],Oe(),t=ot(t,a,r,1,o,l,i,e,Lt,pm,null,fm),Te())},i(o){if(!s){for(let a=0;a<l.length;a+=1)A(t[a]);s=!0}},o(o){for(let a=0;a<t.length;a+=1)F(t[a]);s=!1},d(o){o&&k(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function hm(n,e){let t,i,s=e[14].label+"",l,r,o,a;function u(){return e[9](e[14])}function f(...c){return e[10](e[14],...c)}return{key:n,first:null,c(){t=_("button"),i=_("span"),l=H(s),r=O(),p(i,"class","txt"),p(t,"tabindex","0"),p(t,"class","tab-item"),Q(t,"active",e[4]===e[14].id),this.first=t},m(c,d){w(c,t,d),m(t,i),m(i,l),m(t,r),o||(a=[X(t,"click",u),X(t,"keydown",Ug(f))],o=!0)},p(c,d){e=c,d&48&&Q(t,"active",e[4]===e[14].id)},d(c){c&&k(t),o=!1,rt(a)}}}function QO(n){let e,t,i=n[3].name+"",s,l,r,o,a=[],u=new Map,f=n[5];const c=d=>d[14].id;for(let d=0;d<f.length;d+=1){let h=cm(n,f,d),g=c(h);u.set(g,a[d]=hm(g,h))}return{c(){e=_("h4"),t=_("strong"),s=H(i),l=H(" records API"),r=O(),o=_("div");for(let d=0;d<a.length;d+=1)a[d].c();p(o,"class","tabs-header stretched")},m(d,h){w(d,e,h),m(e,t),m(t,s),m(e,l),w(d,r,h),w(d,o,h);for(let g=0;g<a.length;g+=1)a[g].m(o,null)},p(d,h){h&8&&i!==(i=d[3].name+"")&&_e(s,i),h&114&&(f=d[5],a=ot(a,h,c,1,d,f,u,o,an,hm,null,cm))},d(d){d&&k(e),d&&k(r),d&&k(o);for(let h=0;h<a.length;h+=1)a[h].d()}}}function eT(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Close</span>',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[8]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function tT(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[eT],header:[QO],default:[XO]},$$scope:{ctx:n}};return e=new Di({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&524312&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[11](null),z(e,s)}}}function nT(n,e,t){const i=[{id:"list",label:"List",component:gO},{id:"view",label:"View",component:yO},{id:"create",label:"Create",component:PO},{id:"update",label:"Update",component:WO},{id:"delete",label:"Delete",component:JO},{id:"realtime",label:"Realtime",component:xO}];let s,l=new Ln,r=i[0].id;function o(v){return t(3,l=v),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(v){t(4,r=v)}function f(v,S){(v.code==="Enter"||v.code==="Space")&&(v.preventDefault(),u(S))}const c=()=>a(),d=v=>u(v.id),h=(v,S)=>f(S,v.id);function g(v){he[v?"unshift":"push"](()=>{s=v,t(2,s)})}function y(v){ut.call(this,n,v)}function b(v){ut.call(this,n,v)}return[a,u,s,l,r,i,f,o,c,d,h,g,y,b]}class iT extends Fe{constructor(e){super(),Le(this,e,nT,tT,Ae,{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 sT(n){let e,t,i,s=[n[3]],l={};for(let r=0;r<s.length;r+=1)l=ct(l,s[r]);return{c(){e=_("textarea"),ci(e,l),Q(e,"svelte-1x1pbts",!0)},m(r,o){w(r,e,o),e.autofocus&&e.focus(),n[5](e),$e(e,n[0]),t||(i=[X(e,"input",n[6]),X(e,"keydown",n[2])],t=!0)},p(r,[o]){ci(e,l=bn(s,[o&8&&r[3]])),o&1&&$e(e,r[0]),Q(e,"svelte-1x1pbts",!0)},i:re,o:re,d(r){r&&k(e),n[5](null),t=!1,rt(i)}}}function lT(n,e,t){const i=["value","maxHeight"];let s=Yt(e,i),{value:l=""}=e,{maxHeight:r=200}=e,o,a;function u(){clearTimeout(a),a=setTimeout(()=>{o&&(t(1,o.style.height="",o),t(1,o.style.height=Math.min(o.scrollHeight+2,r)+"px",o))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)){h.preventDefault();const g=o.closest("form");g!=null&&g.requestSubmit&&g.requestSubmit()}}function c(h){he[h?"unshift":"push"](()=>{o=h,t(1,o)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=ct(ct({},e),di(h)),t(3,s=Yt(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,r=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&3&&o&&typeof l!==void 0&&u()},[l,o,f,s,r,c,d]}class rT extends Fe{constructor(e){super(),Le(this,e,lT,sT,Ae,{value:0,maxHeight:4})}}function oT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d;function h(y){n[2](y)}let g={id:n[3],required:n[1].required};return n[0]!==void 0&&(g.value=n[0]),f=new rT({props:g}),he.push(()=>Re(f,"value",h)),{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),V(f,y,b),d=!0},p(y,b){(!d||b&2&&i!==(i=U.getFieldTypeIcon(y[1].type)))&&p(t,"class",i),(!d||b&2)&&r!==(r=y[1].name+"")&&_e(o,r),(!d||b&8&&a!==(a=y[3]))&&p(e,"for",a);const v={};b&8&&(v.id=y[3]),b&2&&(v.required=y[1].required),!c&&b&1&&(c=!0,v.value=y[0],je(()=>c=!1)),f.$set(v)},i(y){d||(A(f.$$.fragment,y),d=!0)},o(y){F(f.$$.fragment,y),d=!1},d(y){y&&k(e),y&&k(u),z(f,y)}}}function aT(n){let e,t;return e=new Ne({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[oT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function uT(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(r){s=r,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class fT extends Fe{constructor(e){super(),Le(this,e,uT,aT,Ae,{field:1,value:0})}}function cT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g,y,b;return{c(){var v,S;e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=U.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=(v=n[1].options)==null?void 0:v.min),p(f,"max",g=(S=n[1].options)==null?void 0:S.max),p(f,"step","any")},m(v,S){w(v,e,S),m(e,t),m(e,s),m(e,l),m(l,o),w(v,u,S),w(v,f,S),$e(f,n[0]),y||(b=X(f,"input",n[2]),y=!0)},p(v,S){var $,C;S&2&&i!==(i=U.getFieldTypeIcon(v[1].type))&&p(t,"class",i),S&2&&r!==(r=v[1].name+"")&&_e(o,r),S&8&&a!==(a=v[3])&&p(e,"for",a),S&8&&c!==(c=v[3])&&p(f,"id",c),S&2&&d!==(d=v[1].required)&&(f.required=d),S&2&&h!==(h=($=v[1].options)==null?void 0:$.min)&&p(f,"min",h),S&2&&g!==(g=(C=v[1].options)==null?void 0:C.max)&&p(f,"max",g),S&1&&Tt(f.value)!==v[0]&&$e(f,v[0])},d(v){v&&k(e),v&&k(u),v&&k(f),y=!1,b()}}}function dT(n){let e,t;return e=new Ne({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[cT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function pT(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=Tt(this.value),t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class hT extends Fe{constructor(e){super(),Le(this,e,pT,dT,Ae,{field:1,value:0})}}function mT(n){let e,t,i,s,l=n[1].name+"",r,o,a,u;return{c(){e=_("input"),i=O(),s=_("label"),r=H(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",o=n[3])},m(f,c){w(f,e,c),e.checked=n[0],w(f,i,c),w(f,s,c),m(s,r),a||(u=X(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+"")&&_e(r,l),c&8&&o!==(o=f[3])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),a=!1,u()}}}function gT(n){let e,t;return e=new Ne({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[mT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function _T(n,e,t){let{field:i=new wn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class bT extends Fe{constructor(e){super(),Le(this,e,_T,gT,Ae,{field:1,value:0})}}function yT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=U.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(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=X(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=U.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&_e(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&f.value!==y[0]&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function vT(n){let e,t;return e=new Ne({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[yT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function kT(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class wT extends Fe{constructor(e){super(),Le(this,e,kT,vT,Ae,{field:1,value:0})}}function ST(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=U.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(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=X(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=U.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&_e(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function $T(n){let e,t;return e=new Ne({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[ST,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function CT(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class MT extends Fe{constructor(e){super(),Le(this,e,CT,$T,Ae,{field:1,value:0})}}function OT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h;function g(b){n[2](b)}let y={id:n[3],options:U.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(y.formattedValue=n[0]),c=new pf({props:y}),he.push(()=>Re(c,"formattedValue",g)),{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),a=H(" (UTC)"),f=O(),B(c.$$.fragment),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",u=n[3])},m(b,v){w(b,e,v),m(e,t),m(e,s),m(e,l),m(l,o),m(l,a),w(b,f,v),V(c,b,v),h=!0},p(b,v){(!h||v&2&&i!==(i=U.getFieldTypeIcon(b[1].type)))&&p(t,"class",i),(!h||v&2)&&r!==(r=b[1].name+"")&&_e(o,r),(!h||v&8&&u!==(u=b[3]))&&p(e,"for",u);const S={};v&8&&(S.id=b[3]),v&1&&(S.value=b[0]),!d&&v&1&&(d=!0,S.formattedValue=b[0],je(()=>d=!1)),c.$set(S)},i(b){h||(A(c.$$.fragment,b),h=!0)},o(b){F(c.$$.fragment,b),h=!1},d(b){b&&k(e),b&&k(f),z(c,b)}}}function TT(n){let e,t;return e=new Ne({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[OT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function DT(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(r){s=r,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class AT extends Fe{constructor(e){super(),Le(this,e,DT,TT,Ae,{field:1,value:0})}}function mm(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=_("div"),t=H("Select up to "),s=H(i),l=H(" items."),p(e,"class","help-block")},m(r,o){w(r,e,o),m(e,t),m(e,s),m(e,l)},p(r,o){o&2&&i!==(i=r[1].options.maxSelect+"")&&_e(s,i)},d(r){r&&k(e)}}}function ET(n){var S,$,C;let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;function y(M){n[3](M)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],items:(S=n[1].options)==null?void 0:S.values,searchable:(($=n[1].options)==null?void 0:$.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new Pb({props:b}),he.push(()=>Re(f,"selected",y));let v=((C=n[1].options)==null?void 0:C.maxSelect)>1&&mm(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),d=O(),v&&v.c(),h=lt(),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,T){w(M,e,T),m(e,t),m(e,s),m(e,l),m(l,o),w(M,u,T),V(f,M,T),w(M,d,T),v&&v.m(M,T),w(M,h,T),g=!0},p(M,T){var D,P,L;(!g||T&2&&i!==(i=U.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!g||T&2)&&r!==(r=M[1].name+"")&&_e(o,r),(!g||T&16&&a!==(a=M[4]))&&p(e,"for",a);const E={};T&16&&(E.id=M[4]),T&6&&(E.toggle=!M[1].required||M[2]),T&4&&(E.multiple=M[2]),T&2&&(E.items=(D=M[1].options)==null?void 0:D.values),T&2&&(E.searchable=((P=M[1].options)==null?void 0:P.values)>5),!c&&T&1&&(c=!0,E.selected=M[0],je(()=>c=!1)),f.$set(E),((L=M[1].options)==null?void 0:L.maxSelect)>1?v?v.p(M,T):(v=mm(M),v.c(),v.m(h.parentNode,h)):v&&(v.d(1),v=null)},i(M){g||(A(f.$$.fragment,M),g=!0)},o(M){F(f.$$.fragment,M),g=!1},d(M){M&&k(e),M&&k(u),z(f,M),M&&k(d),v&&v.d(M),M&&k(h)}}}function PT(n){let e,t;return e=new Ne({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[ET,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function LT(n,e,t){let i,{field:s=new wn}=e,{value:l=void 0}=e;function r(o){l=o,t(0,l),t(2,i),t(1,s)}return n.$$set=o=>{"field"in o&&t(1,s=o.field),"value"in o&&t(0,l=o.value)},n.$$.update=()=>{var o;n.$$.dirty&2&&t(2,i=((o=s.options)==null?void 0:o.maxSelect)>1),n.$$.dirty&5&&typeof l=="undefined"&&t(0,l=i?[]:null),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,r]}class FT extends Fe{constructor(e){super(),Le(this,e,LT,PT,Ae,{field:1,value:0})}}function IT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("textarea"),p(t,"class",i=U.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 txt-sm")},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=X(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=U.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&_e(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function NT(n){let e,t;return e=new Ne({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[IT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function RT(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s!="undefined"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class jT extends Fe{constructor(e){super(),Le(this,e,RT,NT,Ae,{field:1,value:0})}}function HT(n){let e,t;return{c(){e=_("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&k(e)}}}function qT(n){let e,t,i;return{c(){e=_("img"),ei(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){w(s,e,l)},p(s,l){l&4&&!ei(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&k(e)}}}function VT(n){let e;function t(l,r){return l[2]?qT:HT}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function zT(n,e,t){let i,{file:s}=e,{size:l=50}=e;function r(){t(2,i=""),U.hasImageExtension(s==null?void 0:s.name)&&U.generateThumb(s,l,l).then(o=>{t(2,i=o)}).catch(o=>{console.warn("Unable to generate thumb: ",o)})}return n.$$set=o=>{"file"in o&&t(0,s=o.file),"size"in o&&t(1,l=o.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s!="undefined"&&r()},t(2,i=""),[s,l,i]}class BT extends Fe{constructor(e){super(),Le(this,e,zT,VT,Ae,{file:0,size:1})}}function UT(n){let e,t;return{c(){e=_("img"),ei(e.src,t=n[2])||p(e,"src",t),p(e,"alt","Preview")},m(i,s){w(i,e,s)},p(i,s){s&4&&!ei(e.src,t=i[2])&&p(e,"src",t)},d(i){i&&k(e)}}}function WT(n){let e,t,i=n[2].substring(n[2].lastIndexOf("/")+1)+"",s,l,r,o,a,u,f;return{c(){e=_("a"),t=H("/../"),s=H(i),l=O(),r=_("div"),o=O(),a=_("button"),a.textContent="Close",p(e,"href",n[2]),p(e,"class","link-hint txt-ellipsis"),p(r,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-secondary")},m(c,d){w(c,e,d),m(e,t),m(e,s),w(c,l,d),w(c,r,d),w(c,o,d),w(c,a,d),u||(f=X(a,"click",n[0]),u=!0)},p(c,d){d&4&&i!==(i=c[2].substring(c[2].lastIndexOf("/")+1)+"")&&_e(s,i),d&4&&p(e,"href",c[2])},d(c){c&&k(e),c&&k(l),c&&k(r),c&&k(o),c&&k(a),u=!1,f()}}}function YT(n){let e,t,i={class:"image-preview",popup:!0,$$slots:{footer:[WT],default:[UT]},$$scope:{ctx:n}};return e=new Di({props:i}),n[4](e),e.$on("show",n[5]),e.$on("hide",n[6]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&132&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[4](null),z(e,s)}}}function KT(n,e,t){let i,s="";function l(f){f!==""&&U.checkImageUrl(f).then(()=>{t(2,s=f),i==null||i.show()}).catch(()=>{console.warn("Invalid image preview url: ",f),r()})}function r(){return i==null?void 0:i.hide()}function o(f){he[f?"unshift":"push"](()=>{i=f,t(1,i)})}function a(f){ut.call(this,n,f)}function u(f){ut.call(this,n,f)}return[r,i,s,l,o,a,u]}class JT extends Fe{constructor(e){super(),Le(this,e,KT,YT,Ae,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function GT(n){let e;return{c(){e=_("i"),p(e,"class","ri-file-line")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function ZT(n){let e,t,i,s;return{c(){e=_("img"),ei(e.src,t=n[1])||p(e,"src",t),p(e,"alt",n[0])},m(l,r){w(l,e,r),i||(s=X(e,"error",n[2]),i=!0)},p(l,r){r&2&&!ei(e.src,t=l[1])&&p(e,"src",t),r&1&&p(e,"alt",l[0])},d(l){l&&k(e),i=!1,s()}}}function xT(n){let e;function t(l,r){return l[1]?ZT:GT}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function XT(n,e,t){let{record:i}=e,{filename:s}=e,l="";function r(){t(1,l="")}return n.$$set=o=>{"record"in o&&t(3,i=o.record),"filename"in o&&t(0,s=o.filename)},n.$$.update=()=>{n.$$.dirty&9&&U.hasImageExtension(s)&&t(1,l=we.Records.getFileUrl(i,`${s}?thumb=100x100`))},[s,l,r,i]}class Nb extends Fe{constructor(e){super(),Le(this,e,XT,xT,Ae,{record:3,filename:0})}}function gm(n,e,t){const i=n.slice();return i[25]=e[t],i[27]=t,i}function _m(n,e,t){const i=n.slice();return i[28]=e[t],i[27]=t,i}function QT(n){let e,t,i;function s(){return n[16](n[27])}return{c(){e=_("button"),e.innerHTML='<i class="ri-close-line"></i>',p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-circle btn-remove txt-hint")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Remove file")),X(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,rt(i)}}}function eD(n){let e,t,i;function s(){return n[15](n[27])}return{c(){e=_("button"),e.innerHTML='<span class="txt">Restore</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(l,r){w(l,e,r),t||(i=X(e,"click",s),t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,i()}}}function bm(n,e){let t,i,s,l,r,o,a,u=e[28]+"",f,c,d,h,g,y,b,v;s=new Nb({props:{record:e[2],filename:e[28]}});function S(){return e[14](e[28])}function $(T,E){return E&18&&(g=null),g==null&&(g=!!T[1].includes(T[27])),g?eD:QT}let C=$(e,-1),M=C(e);return{key:n,first:null,c(){t=_("div"),i=_("figute"),B(s.$$.fragment),r=O(),o=_("a"),a=H("/.../"),f=H(u),h=O(),M.c(),p(i,"class","thumb"),p(i,"title",l=U.hasImageExtension(e[28])?"Preview":""),Q(i,"fade",e[1].includes(e[27])),Q(i,"link-fade",U.hasImageExtension(e[28])),p(o,"href",c=we.Records.getFileUrl(e[2],e[28])),p(o,"class","filename"),p(o,"title",d="Download "+e[28]),p(o,"target","_blank"),p(o,"rel","noopener"),p(o,"download",""),Q(o,"txt-strikethrough",e[1].includes(e[27])),p(t,"class","list-item"),this.first=t},m(T,E){w(T,t,E),m(t,i),V(s,i,null),m(t,r),m(t,o),m(o,a),m(o,f),m(t,h),M.m(t,null),y=!0,b||(v=X(i,"click",S),b=!0)},p(T,E){e=T;const D={};E&4&&(D.record=e[2]),E&16&&(D.filename=e[28]),s.$set(D),(!y||E&16&&l!==(l=U.hasImageExtension(e[28])?"Preview":""))&&p(i,"title",l),E&18&&Q(i,"fade",e[1].includes(e[27])),E&16&&Q(i,"link-fade",U.hasImageExtension(e[28])),(!y||E&16)&&u!==(u=e[28]+"")&&_e(f,u),(!y||E&20&&c!==(c=we.Records.getFileUrl(e[2],e[28])))&&p(o,"href",c),(!y||E&16&&d!==(d="Download "+e[28]))&&p(o,"title",d),E&18&&Q(o,"txt-strikethrough",e[1].includes(e[27])),C===(C=$(e,E))&&M?M.p(e,E):(M.d(1),M=C(e),M&&(M.c(),M.m(t,null)))},i(T){y||(A(s.$$.fragment,T),y=!0)},o(T){F(s.$$.fragment,T),y=!1},d(T){T&&k(t),z(s),M.d(),b=!1,v()}}}function ym(n){let e,t,i,s,l,r,o,a,u=n[25].name+"",f,c,d,h,g,y,b,v;i=new BT({props:{file:n[25]}});function S(){return n[17](n[27])}return{c(){e=_("div"),t=_("figute"),B(i.$$.fragment),s=O(),l=_("div"),r=_("small"),r.textContent="New",o=O(),a=_("span"),f=H(u),d=O(),h=_("button"),h.innerHTML='<i class="ri-close-line"></i>',p(t,"class","thumb"),p(r,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[25].name),p(h,"type","button"),p(h,"class","btn btn-secondary btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m($,C){w($,e,C),m(e,t),V(i,t,null),m(e,s),m(e,l),m(l,r),m(l,o),m(l,a),m(a,f),m(e,d),m(e,h),y=!0,b||(v=[Xe(g=St.call(null,h,"Remove file")),X(h,"click",S)],b=!0)},p($,C){n=$;const M={};C&1&&(M.file=n[25]),i.$set(M),(!y||C&1)&&u!==(u=n[25].name+"")&&_e(f,u),(!y||C&1&&c!==(c=n[25].name))&&p(l,"title",c)},i($){y||(A(i.$$.fragment,$),y=!0)},o($){F(i.$$.fragment,$),y=!1},d($){$&&k(e),z(i),b=!1,rt(v)}}}function vm(n){let e,t,i,s,l,r;return{c(){e=_("div"),t=_("input"),i=O(),s=_("button"),s.innerHTML=`<i class="ri-upload-cloud-line"></i> 
-                    <span class="txt">Upload new file</span>`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(o,a){w(o,e,a),m(e,t),n[18](t),m(e,i),m(e,s),l||(r=[X(t,"change",n[19]),X(s,"click",n[20])],l=!0)},p(o,a){a&32&&(t.multiple=o[5])},d(o){o&&k(e),n[18](null),l=!1,rt(r)}}}function tD(n){let e,t,i,s,l,r=n[3].name+"",o,a,u,f,c=[],d=new Map,h,g,y,b=n[4];const v=T=>T[28];for(let T=0;T<b.length;T+=1){let E=_m(n,b,T),D=v(E);d.set(D,c[T]=bm(D,E))}let S=n[0],$=[];for(let T=0;T<S.length;T+=1)$[T]=ym(gm(n,S,T));const C=T=>F($[T],1,1,()=>{$[T]=null});let M=!n[9]&&vm(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("div");for(let T=0;T<c.length;T+=1)c[T].c();h=O();for(let T=0;T<$.length;T+=1)$[T].c();g=O(),M&&M.c(),p(t,"class",i=U.getFieldTypeIcon(n[3].type)),p(l,"class","txt"),p(e,"for",a=n[24]),p(f,"class","files-list")},m(T,E){w(T,e,E),m(e,t),m(e,s),m(e,l),m(l,o),w(T,u,E),w(T,f,E);for(let D=0;D<c.length;D+=1)c[D].m(f,null);m(f,h);for(let D=0;D<$.length;D+=1)$[D].m(f,null);m(f,g),M&&M.m(f,null),n[21](f),y=!0},p(T,E){if((!y||E&8&&i!==(i=U.getFieldTypeIcon(T[3].type)))&&p(t,"class",i),(!y||E&8)&&r!==(r=T[3].name+"")&&_e(o,r),(!y||E&16777216&&a!==(a=T[24]))&&p(e,"for",a),E&3222&&(b=T[4],Oe(),c=ot(c,E,v,1,T,b,d,f,Lt,bm,h,_m),Te()),E&4097){S=T[0];let D;for(D=0;D<S.length;D+=1){const P=gm(T,S,D);$[D]?($[D].p(P,E),A($[D],1)):($[D]=ym(P),$[D].c(),A($[D],1),$[D].m(f,g))}for(Oe(),D=S.length;D<$.length;D+=1)C(D);Te()}T[9]?M&&(M.d(1),M=null):M?M.p(T,E):(M=vm(T),M.c(),M.m(f,null))},i(T){if(!y){for(let E=0;E<b.length;E+=1)A(c[E]);for(let E=0;E<S.length;E+=1)A($[E]);y=!0}},o(T){for(let E=0;E<c.length;E+=1)F(c[E]);$=$.filter(Boolean);for(let E=0;E<$.length;E+=1)F($[E]);y=!1},d(T){T&&k(e),T&&k(u),T&&k(f);for(let E=0;E<c.length;E+=1)c[E].d();Bn($,T),M&&M.d(),n[21](null)}}}function nD(n){let e,t,i,s;e=new Ne({props:{class:"form-field form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[tD,({uniqueId:r})=>({24:r}),({uniqueId:r})=>r?16777216:0]},$$scope:{ctx:n}}});let l={};return i=new JT({props:l}),n[22](i),{c(){B(e.$$.fragment),t=O(),B(i.$$.fragment)},m(r,o){V(e,r,o),w(r,t,o),V(i,r,o),s=!0},p(r,[o]){const a={};o&8&&(a.class="form-field form-field-file "+(r[3].required?"required":"")),o&8&&(a.name=r[3].name),o&1090520063&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};i.$set(u)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){F(e.$$.fragment,r),F(i.$$.fragment,r),s=!1},d(r){z(e,r),r&&k(t),n[22](null),z(i,r)}}}function iD(n,e,t){let i,s,l,{record:r}=e,{value:o=null}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new wn}=e,c,d,h;function g(N){U.removeByValue(u,N),t(1,u)}function y(N){U.pushUnique(u,N),t(1,u)}function b(N){U.isEmpty(a[N])||a.splice(N,1),t(0,a)}function v(){h==null||h.dispatchEvent(new CustomEvent("change",{detail:{value:o,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const S=N=>U.hasImageExtension(N)?d==null?void 0:d.show(we.Records.getFileUrl(r,N)):!1,$=N=>g(N),C=N=>y(N),M=N=>b(N);function T(N){he[N?"unshift":"push"](()=>{c=N,t(6,c)})}const E=()=>{for(let N of c.files)a.push(N);t(0,a),t(6,c.value=null,c)},D=()=>c==null?void 0:c.click();function P(N){he[N?"unshift":"push"](()=>{h=N,t(8,h)})}function L(N){he[N?"unshift":"push"](()=>{d=N,t(7,d)})}return n.$$set=N=>{"record"in N&&t(2,r=N.record),"value"in N&&t(13,o=N.value),"uploadedFiles"in N&&t(0,a=N.uploadedFiles),"deletedFileIndexes"in N&&t(1,u=N.deletedFileIndexes),"field"in N&&t(3,f=N.field)},n.$$.update=()=>{var N,R;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=U.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=U.toArray(u))),n.$$.dirty&8&&t(5,i=((N=f.options)==null?void 0:N.maxSelect)>1),n.$$.dirty&8224&&(typeof o=="undefined"||o===null)&&t(13,o=i?[]:null),n.$$.dirty&8192&&t(4,s=U.toArray(o)),n.$$.dirty&27&&t(9,l=(s.length||a.length)&&((R=f.options)==null?void 0:R.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&v()},[a,u,r,f,s,i,c,d,h,l,g,y,b,o,S,$,C,M,T,E,D,P,L]}class sD extends Fe{constructor(e){super(),Le(this,e,iD,nD,Ae,{record:2,value:13,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function km(n){let e,t;return{c(){e=_("small"),t=H(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){w(i,e,s),m(e,t)},p(i,s){s&2&&_e(t,i[1])},d(i){i&&k(e)}}}function lD(n){let e,t,i,s,l,r=n[0].id+"",o,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&km(n);return{c(){e=_("i"),i=O(),s=_("div"),l=_("div"),o=H(r),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){w(d,e,h),w(d,i,h),w(d,s,h),m(s,l),m(l,o),m(s,a),c&&c.m(s,null),u||(f=Xe(t=St.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Jn(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&r!==(r=d[0].id+"")&&_e(o,r),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=km(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:re,o:re,d(d){d&&k(e),d&&k(i),d&&k(s),c&&c.d(),u=!1,f()}}}function rD(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function r(o){o=o||{};const a=["name","title","label","key","email","heading","content",...Object.keys(o)];for(const u of a)if(typeof o[u]=="string"&&!U.isEmpty(o[u])&&!s.includes(u))return u+": "+o[u];return""}return n.$$set=o=>{"item"in o&&t(0,l=o.item)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=r(l))},[l,i]}class oD extends Fe{constructor(e){super(),Le(this,e,rD,lD,Ae,{item:0})}}function wm(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Load more</span>',p(e,"type","button"),p(e,"class","btn btn-block btn-sm"),Q(e,"btn-loading",n[6]),Q(e,"btn-disabled",n[6])},m(s,l){w(s,e,l),t||(i=X(e,"click",Un(n[14])),t=!0)},p(s,l){l&64&&Q(e,"btn-loading",s[6]),l&64&&Q(e,"btn-disabled",s[6])},d(s){s&&k(e),t=!1,i()}}}function aD(n){let e,t=n[7]&&wm(n);return{c(){t&&t.c(),e=lt()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[7]?t?t.p(i,s):(t=wm(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function uD(n){let e,t,i,s;const l=[{selectPlaceholder:n[8]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:n[4]},{optionComponent:n[4]},{multiple:n[2]},{class:"records-select block-options"},n[10]];function r(u){n[15](u)}function o(u){n[16](u)}let a={$$slots:{afterOptions:[aD]},$$scope:{ctx:n}};for(let u=0;u<l.length;u+=1)a=ct(a,l[u]);return n[1]!==void 0&&(a.keyOfSelected=n[1]),n[0]!==void 0&&(a.selected=n[0]),e=new vs({props:a}),he.push(()=>Re(e,"keyOfSelected",r)),he.push(()=>Re(e,"selected",o)),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){B(e.$$.fragment)},m(u,f){V(e,u,f),s=!0},p(u,[f]){const c=f&1340?bn(l,[f&264&&{selectPlaceholder:u[8]?"Loading...":u[3]},f&32&&{items:u[5]},f&32&&{searchable:u[5].length>5},l[3],f&16&&{labelComponent:u[4]},f&16&&{optionComponent:u[4]},f&4&&{multiple:u[2]},l[7],f&1024&&hi(u[10])]):{};f&4194496&&(c.$$scope={dirty:f,ctx:u}),!t&&f&2&&(t=!0,c.keyOfSelected=u[1],je(()=>t=!1)),!i&&f&1&&(i=!0,c.selected=u[0],je(()=>i=!1)),e.$set(c)},i(u){s||(A(e.$$.fragment,u),s=!0)},o(u){F(e.$$.fragment,u),s=!1},d(u){z(e,u)}}}function fD(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent","collectionId"];let r=Yt(e,l);const o="select_"+U.randomString(5);let{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=oD}=e,{collectionId:h}=e,g=[],y=1,b=0,v=!1,S=!1;$();async function $(){const L=U.toArray(f);if(!(!h||!L.length)){t(13,S=!0);try{const N=[];for(const R of L)N.push(`id="${R}"`);t(0,u=await we.Records.getFullList(h,200,{sort:"-created",filter:N.join("||"),$cancelKey:o+"loadSelected"})),t(5,g=U.filterDuplicatesByKey(g.concat(u)))}catch(N){we.errorResponseHandler(N)}t(13,S=!1)}}async function C(L=!1){if(!!h){t(6,v=!0);try{const N=L?1:y+1,R=await we.Records.getList(h,N,200,{sort:"-created",$cancelKey:o+"loadList"});L&&t(5,g=[]),t(5,g=U.filterDuplicatesByKey(g.concat(R.items))),y=R.page,t(12,b=R.totalItems)}catch(N){we.errorResponseHandler(N)}t(6,v=!1)}}const M=()=>C();function T(L){f=L,t(1,f)}function E(L){u=L,t(0,u)}function D(L){ut.call(this,n,L)}function P(L){ut.call(this,n,L)}return n.$$set=L=>{e=ct(ct({},e),di(L)),t(10,r=Yt(e,l)),"multiple"in L&&t(2,a=L.multiple),"selected"in L&&t(0,u=L.selected),"keyOfSelected"in L&&t(1,f=L.keyOfSelected),"selectPlaceholder"in L&&t(3,c=L.selectPlaceholder),"optionComponent"in L&&t(4,d=L.optionComponent),"collectionId"in L&&t(11,h=L.collectionId)},n.$$.update=()=>{n.$$.dirty&2048&&h&&C(),n.$$.dirty&8256&&t(8,i=v||S),n.$$.dirty&4128&&t(7,s=b>g.length)},[u,f,a,c,d,g,v,s,i,C,r,h,b,S,M,T,E,D,P]}class cD extends Fe{constructor(e){super(),Le(this,e,fD,uD,Ae,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4,collectionId:11})}}function Sm(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=_("div"),t=H("Select up to "),s=H(i),l=H(" items."),p(e,"class","help-block")},m(r,o){w(r,e,o),m(e,t),m(e,s),m(e,l)},p(r,o){o&2&&i!==(i=r[1].options.maxSelect+"")&&_e(s,i)},d(r){r&&k(e)}}}function dD(n){var S,$;let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;function y(C){n[3](C)}let b={toggle:!0,id:n[4],multiple:n[2],collectionId:(S=n[1].options)==null?void 0:S.collectionId};n[0]!==void 0&&(b.keyOfSelected=n[0]),f=new cD({props:b}),he.push(()=>Re(f,"keyOfSelected",y));let v=(($=n[1].options)==null?void 0:$.maxSelect)>1&&Sm(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),d=O(),v&&v.c(),h=lt(),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(C,M){w(C,e,M),m(e,t),m(e,s),m(e,l),m(l,o),w(C,u,M),V(f,C,M),w(C,d,M),v&&v.m(C,M),w(C,h,M),g=!0},p(C,M){var E,D;(!g||M&2&&i!==(i=U.getFieldTypeIcon(C[1].type)))&&p(t,"class",i),(!g||M&2)&&r!==(r=C[1].name+"")&&_e(o,r),(!g||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=(E=C[1].options)==null?void 0:E.collectionId),!c&&M&1&&(c=!0,T.keyOfSelected=C[0],je(()=>c=!1)),f.$set(T),((D=C[1].options)==null?void 0:D.maxSelect)>1?v?v.p(C,M):(v=Sm(C),v.c(),v.m(h.parentNode,h)):v&&(v.d(1),v=null)},i(C){g||(A(f.$$.fragment,C),g=!0)},o(C){F(f.$$.fragment,C),g=!1},d(C){C&&k(e),C&&k(u),z(f,C),C&&k(d),v&&v.d(C),C&&k(h)}}}function pD(n){let e,t;return e=new Ne({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[dD,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function hD(n,e,t){let i,{field:s=new wn}=e,{value:l=void 0}=e;function r(o){l=o,t(0,l),t(2,i),t(1,s)}return n.$$set=o=>{"field"in o&&t(1,s=o.field),"value"in o&&t(0,l=o.value)},n.$$.update=()=>{var o;n.$$.dirty&2&&t(2,i=((o=s.options)==null?void 0:o.maxSelect)>1),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(s.options.maxSelect-1))},[l,s,i,r]}class mD extends Fe{constructor(e){super(),Le(this,e,hD,pD,Ae,{field:1,value:0})}}function gD(n){let e,t,i,s,l,r=n[0].id+"",o,a,u,f=n[0].email+"",c,d,h;return{c(){e=_("i"),i=O(),s=_("div"),l=_("div"),o=H(r),a=O(),u=_("small"),c=H(f),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(u,"class","block txt-hint txt-ellipsis"),p(s,"class","content")},m(g,y){w(g,e,y),w(g,i,y),w(g,s,y),m(s,l),m(l,o),m(s,a),m(s,u),m(u,c),d||(h=Xe(t=St.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),d=!0)},p(g,[y]){t&&Jn(t.update)&&y&1&&t.update.call(null,{text:JSON.stringify(g[0],null,2),position:"left",class:"code"}),y&1&&r!==(r=g[0].id+"")&&_e(o,r),y&1&&f!==(f=g[0].email+"")&&_e(c,f)},i:re,o:re,d(g){g&&k(e),g&&k(i),g&&k(s),d=!1,h()}}}function _D(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class gu extends Fe{constructor(e){super(),Le(this,e,_D,gD,Ae,{item:0})}}function $m(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Load more</span>',p(e,"type","button"),p(e,"class","btn btn-block btn-sm"),Q(e,"btn-loading",n[6]),Q(e,"btn-disabled",n[6])},m(s,l){w(s,e,l),t||(i=X(e,"click",Un(n[13])),t=!0)},p(s,l){l&64&&Q(e,"btn-loading",s[6]),l&64&&Q(e,"btn-disabled",s[6])},d(s){s&&k(e),t=!1,i()}}}function bD(n){let e,t=n[7]&&$m(n);return{c(){t&&t.c(),e=lt()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[7]?t?t.p(i,s):(t=$m(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function yD(n){let e,t,i,s;const l=[{selectPlaceholder:n[8]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:gu},{optionComponent:n[4]},{multiple:n[2]},{class:"users-select block-options"},n[10]];function r(u){n[14](u)}function o(u){n[15](u)}let a={$$slots:{afterOptions:[bD]},$$scope:{ctx:n}};for(let u=0;u<l.length;u+=1)a=ct(a,l[u]);return n[1]!==void 0&&(a.keyOfSelected=n[1]),n[0]!==void 0&&(a.selected=n[0]),e=new vs({props:a}),he.push(()=>Re(e,"keyOfSelected",r)),he.push(()=>Re(e,"selected",o)),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){B(e.$$.fragment)},m(u,f){V(e,u,f),s=!0},p(u,[f]){const c=f&1340?bn(l,[f&264&&{selectPlaceholder:u[8]?"Loading...":u[3]},f&32&&{items:u[5]},f&32&&{searchable:u[5].length>5},l[3],f&0&&{labelComponent:gu},f&16&&{optionComponent:u[4]},f&4&&{multiple:u[2]},l[7],f&1024&&hi(u[10])]):{};f&2097344&&(c.$$scope={dirty:f,ctx:u}),!t&&f&2&&(t=!0,c.keyOfSelected=u[1],je(()=>t=!1)),!i&&f&1&&(i=!0,c.selected=u[0],je(()=>i=!1)),e.$set(c)},i(u){s||(A(e.$$.fragment,u),s=!0)},o(u){F(e.$$.fragment,u),s=!1},d(u){z(e,u)}}}function vD(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent"];let r=Yt(e,l);const o="select_"+U.randomString(5);let{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=gu}=e,h=[],g=1,y=0,b=!1,v=!1;$(),S();async function S(){const P=U.toArray(f);if(!!P.length){t(12,v=!0);try{const L=[];for(const N of P)L.push(`id="${N}"`);t(0,u=await we.Users.getFullList(100,{sort:"-created",filter:L.join("||"),$cancelKey:o+"loadSelected"})),t(5,h=U.filterDuplicatesByKey(h.concat(u)))}catch(L){we.errorResponseHandler(L)}t(12,v=!1)}}async function $(P=!1){t(6,b=!0);try{const L=P?1:g+1,N=await we.Users.getList(L,200,{sort:"-created",$cancelKey:o+"loadList"});P&&t(5,h=[]),t(5,h=U.filterDuplicatesByKey(h.concat(N.items))),g=N.page,t(11,y=N.totalItems)}catch(L){we.errorResponseHandler(L)}t(6,b=!1)}const C=()=>$();function M(P){f=P,t(1,f)}function T(P){u=P,t(0,u)}function E(P){ut.call(this,n,P)}function D(P){ut.call(this,n,P)}return n.$$set=P=>{e=ct(ct({},e),di(P)),t(10,r=Yt(e,l)),"multiple"in P&&t(2,a=P.multiple),"selected"in P&&t(0,u=P.selected),"keyOfSelected"in P&&t(1,f=P.keyOfSelected),"selectPlaceholder"in P&&t(3,c=P.selectPlaceholder),"optionComponent"in P&&t(4,d=P.optionComponent)},n.$$.update=()=>{n.$$.dirty&4160&&t(8,i=b||v),n.$$.dirty&2080&&t(7,s=y>h.length)},[u,f,a,c,d,h,b,s,i,$,r,y,v,C,M,T,E,D]}class kD extends Fe{constructor(e){super(),Le(this,e,vD,yD,Ae,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4})}}function Cm(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=_("div"),t=H("Select up to "),s=H(i),l=H(" users."),p(e,"class","help-block")},m(r,o){w(r,e,o),m(e,t),m(e,s),m(e,l)},p(r,o){o&2&&i!==(i=r[1].options.maxSelect+"")&&_e(s,i)},d(r){r&&k(e)}}}function wD(n){var S;let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;function y($){n[4]($)}let b={toggle:!0,id:n[5],multiple:n[2],disabled:n[3]};n[0]!==void 0&&(b.keyOfSelected=n[0]),f=new kD({props:b}),he.push(()=>Re(f,"keyOfSelected",y));let v=((S=n[1].options)==null?void 0:S.maxSelect)>1&&Cm(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),d=O(),v&&v.c(),h=lt(),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[5])},m($,C){w($,e,C),m(e,t),m(e,s),m(e,l),m(l,o),w($,u,C),V(f,$,C),w($,d,C),v&&v.m($,C),w($,h,C),g=!0},p($,C){var T;(!g||C&2&&i!==(i=U.getFieldTypeIcon($[1].type)))&&p(t,"class",i),(!g||C&2)&&r!==(r=$[1].name+"")&&_e(o,r),(!g||C&32&&a!==(a=$[5]))&&p(e,"for",a);const M={};C&32&&(M.id=$[5]),C&4&&(M.multiple=$[2]),C&8&&(M.disabled=$[3]),!c&&C&1&&(c=!0,M.keyOfSelected=$[0],je(()=>c=!1)),f.$set(M),((T=$[1].options)==null?void 0:T.maxSelect)>1?v?v.p($,C):(v=Cm($),v.c(),v.m(h.parentNode,h)):v&&(v.d(1),v=null)},i($){g||(A(f.$$.fragment,$),g=!0)},o($){F(f.$$.fragment,$),g=!1},d($){$&&k(e),$&&k(u),z(f,$),$&&k(d),v&&v.d($),$&&k(h)}}}function SD(n){let e,t;return e=new Ne({props:{class:"form-field "+(n[1].required?"required":"")+" "+(n[3]?"disabled":""),name:n[1].name,$$slots:{default:[wD,({uniqueId:i})=>({5:i}),({uniqueId:i})=>i?32:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&10&&(l.class="form-field "+(i[1].required?"required":"")+" "+(i[3]?"disabled":"")),s&2&&(l.name=i[1].name),s&111&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function $D(n,e,t){let i,s,{field:l=new wn}=e,{value:r=void 0}=e;function o(a){r=a,t(0,r),t(2,s),t(1,l)}return n.$$set=a=>{"field"in a&&t(1,l=a.field),"value"in a&&t(0,r=a.value)},n.$$.update=()=>{var a;n.$$.dirty&2&&t(2,s=((a=l.options)==null?void 0:a.maxSelect)>1),n.$$.dirty&7&&s&&Array.isArray(r)&&r.length>l.options.maxSelect&&t(0,r=r.slice(l.options.maxSelect-1)),n.$$.dirty&3&&t(3,i=!U.isEmpty(r)&&l.system)},[r,l,s,i,o]}class CD extends Fe{constructor(e){super(),Le(this,e,$D,SD,Ae,{field:1,value:0})}}function Mm(n,e,t){const i=n.slice();return i[40]=e[t],i[41]=e,i[42]=t,i}function Om(n){let e,t;return e=new Ne({props:{class:"form-field disabled",name:"id",$$slots:{default:[MD,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&12288&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function MD(n){let e,t,i,s,l,r,o,a,u,f,c;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="id",l=O(),r=_("span"),a=O(),u=_("input"),p(t,"class",U.getFieldTypeIcon("primary")),p(s,"class","txt"),p(r,"class","flex-fill"),p(e,"for",o=n[43]),p(u,"type","text"),p(u,"id",f=n[43]),u.value=c=n[2].id,u.disabled=!0},m(d,h){w(d,e,h),m(e,t),m(e,i),m(e,s),m(e,l),m(e,r),w(d,a,h),w(d,u,h)},p(d,h){h[1]&4096&&o!==(o=d[43])&&p(e,"for",o),h[1]&4096&&f!==(f=d[43])&&p(u,"id",f),h[0]&4&&c!==(c=d[2].id)&&u.value!==c&&(u.value=c)},d(d){d&&k(e),d&&k(a),d&&k(u)}}}function Tm(n){let e;return{c(){e=_("div"),e.innerHTML=`<h5>No custom fields to be set</h5> 
-            `,p(e,"class","block txt-center txt-disabled")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function OD(n){let e,t,i;function s(r){n[31](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new CD({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function TD(n){let e,t,i;function s(r){n[30](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new mD({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function DD(n){let e,t,i,s,l;function r(f){n[27](f,n[40])}function o(f){n[28](f,n[40])}function a(f){n[29](f,n[40])}let u={field:n[40],record:n[2]};return n[2][n[40].name]!==void 0&&(u.value=n[2][n[40].name]),n[3][n[40].name]!==void 0&&(u.uploadedFiles=n[3][n[40].name]),n[4][n[40].name]!==void 0&&(u.deletedFileIndexes=n[4][n[40].name]),e=new sD({props:u}),he.push(()=>Re(e,"value",r)),he.push(()=>Re(e,"uploadedFiles",o)),he.push(()=>Re(e,"deletedFileIndexes",a)),{c(){B(e.$$.fragment)},m(f,c){V(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[40]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[40].name],je(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[40].name],je(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[40].name],je(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){F(e.$$.fragment,f),l=!1},d(f){z(e,f)}}}function AD(n){let e,t,i;function s(r){n[26](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new jT({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function ED(n){let e,t,i;function s(r){n[25](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new FT({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function PD(n){let e,t,i;function s(r){n[24](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new AT({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function LD(n){let e,t,i;function s(r){n[23](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new MT({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function FD(n){let e,t,i;function s(r){n[22](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new wT({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function ID(n){let e,t,i;function s(r){n[21](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new bT({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function ND(n){let e,t,i;function s(r){n[20](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new hT({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function RD(n){let e,t,i;function s(r){n[19](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new fT({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function Dm(n,e){let t,i,s,l,r;const o=[RD,ND,ID,FD,LD,PD,ED,AD,DD,TD,OD],a=[];function u(f,c){return f[40].type==="text"?0:f[40].type==="number"?1:f[40].type==="bool"?2:f[40].type==="email"?3:f[40].type==="url"?4:f[40].type==="date"?5:f[40].type==="select"?6:f[40].type==="json"?7:f[40].type==="file"?8:f[40].type==="relation"?9:f[40].type==="user"?10:-1}return~(i=u(e))&&(s=a[i]=o[i](e)),{key:n,first:null,c(){t=lt(),s&&s.c(),l=lt(),this.first=t},m(f,c){w(f,t,c),~i&&a[i].m(f,c),w(f,l,c),r=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(Oe(),F(a[d],1,1,()=>{a[d]=null}),Te()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=o[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){r||(A(s),r=!0)},o(f){F(s),r=!1},d(f){f&&k(t),~i&&a[i].d(f),f&&k(l)}}}function jD(n){var d;let e,t,i=[],s=new Map,l,r,o,a=!n[2].isNew&&Om(n),u=((d=n[0])==null?void 0:d.schema)||[];const f=h=>h[40].name;for(let h=0;h<u.length;h+=1){let g=Mm(n,u,h),y=f(g);s.set(y,i[h]=Dm(y,g))}let c=null;return u.length||(c=Tm()),{c(){e=_("form"),a&&a.c(),t=O();for(let h=0;h<i.length;h+=1)i[h].c();c&&c.c(),p(e,"id",n[11]),p(e,"class","block")},m(h,g){w(h,e,g),a&&a.m(e,null),m(e,t);for(let y=0;y<i.length;y+=1)i[y].m(e,null);c&&c.m(e,null),l=!0,r||(o=X(e,"submit",Kt(n[12])),r=!0)},p(h,g){var y;h[2].isNew?a&&(Oe(),F(a,1,1,()=>{a=null}),Te()):a?(a.p(h,g),g[0]&4&&A(a,1)):(a=Om(h),a.c(),A(a,1),a.m(e,t)),g[0]&29&&(u=((y=h[0])==null?void 0:y.schema)||[],Oe(),i=ot(i,g,f,1,h,u,s,e,Lt,Dm,null,Mm),Te(),!u.length&&c?c.p(h,g):u.length?c&&(c.d(1),c=null):(c=Tm(),c.c(),c.m(e,null)))},i(h){if(!l){A(a);for(let g=0;g<u.length;g+=1)A(i[g]);l=!0}},o(h){F(a);for(let g=0;g<i.length;g+=1)F(i[g]);l=!1},d(h){h&&k(e),a&&a.d();for(let g=0;g<i.length;g+=1)i[g].d();c&&c.d(),r=!1,o()}}}function Am(n){let e,t,i,s,l,r,o,a;return o=new ys({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[HD]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=O(),i=_("button"),s=_("div"),l=_("i"),r=O(),B(o.$$.fragment),p(e,"class","flex-fill"),p(l,"class","ri-more-line"),p(s,"class","content"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),m(i,s),m(s,l),m(s,r),V(o,s,null),a=!0},p(u,f){const c={};f[1]&8192&&(c.$$scope={dirty:f,ctx:u}),o.$set(c)},i(u){a||(A(o.$$.fragment,u),a=!0)},o(u){F(o.$$.fragment,u),a=!1},d(u){u&&k(e),u&&k(t),u&&k(i),z(o)}}}function HD(n){let e,t,i;return{c(){e=_("div"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i> 
-                            <span class="txt">Delete</span>`,p(e,"tabindex","0"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[18]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function qD(n){let e,t=n[2].isNew?"New":"Edit",i,s,l=n[0].name+"",r,o,a,u,f,c=!n[2].isNew&&n[9]&&Am(n);return{c(){e=_("h4"),i=H(t),s=O(),r=H(l),o=H(" record"),a=O(),c&&c.c(),u=lt()},m(d,h){w(d,e,h),m(e,i),m(e,s),m(e,r),m(e,o),w(d,a,h),c&&c.m(d,h),w(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&t!==(t=d[2].isNew?"New":"Edit")&&_e(i,t),(!f||h[0]&1)&&l!==(l=d[0].name+"")&&_e(r,l),!d[2].isNew&&d[9]?c?(c.p(d,h),h[0]&516&&A(c,1)):(c=Am(d),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(Oe(),F(c,1,1,()=>{c=null}),Te())},i(d){f||(A(c),f=!0)},o(d){F(c),f=!1},d(d){d&&k(e),d&&k(a),c&&c.d(d),d&&k(u)}}}function VD(n){let e,t,i,s,l,r=n[2].isNew?"Create":"Save changes",o,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=O(),s=_("button"),l=_("span"),o=H(r),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[7],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[11]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],Q(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,o),u||(f=X(e,"click",n[17]),u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&r!==(r=c[2].isNew?"Create":"Save changes")&&_e(o,r),d[0]&1152&&a!==(a=!c[10]||c[7])&&(s.disabled=a),d[0]&128&&Q(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function zD(n){let e,t,i={class:"overlay-panel-lg record-panel",beforeHide:n[32],$$slots:{footer:[VD],header:[qD],default:[jD]},$$scope:{ctx:n}};return e=new Di({props:i}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&288&&(r.beforeHide=s[32]),l[0]&1693|l[1]&8192&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[33](null),z(e,s)}}}function Em(n){return JSON.stringify(n)}function BD(n,e,t){let i,s,l,r;const o=_n(),a="record_"+U.randomString(5);let{collection:u}=e,f,c=null,d=new eo,h=!1,g=!1,y={},b={},v="";function S(ue){return C(ue),t(8,g=!0),f==null?void 0:f.show()}function $(){return f==null?void 0:f.hide()}function C(ue){Wi({}),c=ue||{},t(2,d=ue!=null&&ue.clone?ue.clone():new eo),t(3,y={}),t(4,b={}),t(15,v=Em(d))}function M(){if(h||!s)return;t(7,h=!0);const ue=E();let ie;d.isNew?ie=we.Records.create(u==null?void 0:u.id,ue):ie=we.Records.update(u==null?void 0:u.id,d.id,ue),ie.then(async ve=>{mn(d.isNew?"Successfully created record.":"Successfully updated record."),t(8,g=!1),$(),o("save",ve)}).catch(ve=>{we.errorResponseHandler(ve)}).finally(()=>{t(7,h=!1)})}function T(){!(c!=null&&c.id)||Ci("Do you really want to delete the selected record?",()=>we.Records.delete(c["@collectionId"],c.id).then(()=>{$(),mn("Successfully deleted record."),o("delete",c)}).catch(ue=>{we.errorResponseHandler(ue)}))}function E(){const ue=(d==null?void 0:d.export())||{},ie=new FormData,ve={};for(const He of(u==null?void 0:u.schema)||[])ve[He.name]=He;for(const He in ue)!ve[He]||(typeof ue[He]=="undefined"&&(ue[He]=null),U.addValueToFormData(ie,He,ue[He]));for(const He in y){const Ie=U.toArray(y[He]);for(const qe of Ie)ie.append(He,qe)}for(const He in b){const Ie=U.toArray(b[He]);for(const qe of Ie)ie.append(He+"."+qe,"")}return ie}const D=()=>$(),P=()=>T();function L(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function N(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function R(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function J(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function W(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function q(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function G(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function K(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function Y(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function ne(ue,ie){n.$$.not_equal(y[ie.name],ue)&&(y[ie.name]=ue,t(3,y))}function fe(ue,ie){n.$$.not_equal(b[ie.name],ue)&&(b[ie.name]=ue,t(4,b))}function ye(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function se(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}const Z=()=>s&&g?(Ci("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,g=!1),$()}),!1):!0;function De(ue){he[ue?"unshift":"push"](()=>{f=ue,t(6,f)})}function te(ue){ut.call(this,n,ue)}function be(ue){ut.call(this,n,ue)}return n.$$set=ue=>{"collection"in ue&&t(0,u=ue.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(16,i=U.hasNonEmptyProps(y)||U.hasNonEmptyProps(b)),n.$$.dirty[0]&98308&&t(5,s=i||v!=Em(d)),n.$$.dirty[0]&36&&t(10,l=d.isNew||s),n.$$.dirty[0]&1&&t(9,r=(u==null?void 0:u.name)!=="profiles")},[u,$,d,y,b,s,f,h,g,r,l,a,M,T,S,v,i,D,P,L,N,R,J,W,q,G,K,Y,ne,fe,ye,se,Z,De,te,be]}class Rb extends Fe{constructor(e){super(),Le(this,e,BD,zD,Ae,{collection:0,show:14,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[1]}}function UD(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function WD(n){let e,t;return{c(){e=_("span"),t=H(n[1]),p(e,"class","label txt-base txt-mono"),p(e,"title",n[0])},m(i,s){w(i,e,s),m(e,t)},p(i,s){s&2&&_e(t,i[1]),s&1&&p(e,"title",i[0])},d(i){i&&k(e)}}}function YD(n){let e;function t(l,r){return l[0]?WD:UD}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function KD(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 No extends Fe{constructor(e){super(),Le(this,e,KD,YD,Ae,{id:0})}}function Pm(n,e,t){const i=n.slice();return i[8]=e[t],i}function Lm(n,e,t){const i=n.slice();return i[3]=e[t],i}function Fm(n,e,t){const i=n.slice();return i[3]=e[t],i}function JD(n){let e,t=n[0][n[1].name]+"",i,s;return{c(){e=_("span"),i=H(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[0][n[1].name])},m(l,r){w(l,e,r),m(e,i)},p(l,r){r&3&&t!==(t=l[0][l[1].name]+"")&&_e(i,t),r&3&&s!==(s=l[0][l[1].name])&&p(e,"title",s)},i:re,o:re,d(l){l&&k(e)}}}function GD(n){let e,t,i=U.toArray(n[0][n[1].name]),s=[];for(let r=0;r<i.length;r+=1)s[r]=Im(Pm(n,i,r));const l=r=>F(s[r],1,1,()=>{s[r]=null});return{c(){e=_("div");for(let r=0;r<s.length;r+=1)s[r].c();p(e,"class","inline-flex")},m(r,o){w(r,e,o);for(let a=0;a<s.length;a+=1)s[a].m(e,null);t=!0},p(r,o){if(o&3){i=U.toArray(r[0][r[1].name]);let a;for(a=0;a<i.length;a+=1){const u=Pm(r,i,a);s[a]?(s[a].p(u,o),A(s[a],1)):(s[a]=Im(u),s[a].c(),A(s[a],1),s[a].m(e,null))}for(Oe(),a=i.length;a<s.length;a+=1)l(a);Te()}},i(r){if(!t){for(let o=0;o<i.length;o+=1)A(s[o]);t=!0}},o(r){s=s.filter(Boolean);for(let o=0;o<s.length;o+=1)F(s[o]);t=!1},d(r){r&&k(e),Bn(s,r)}}}function ZD(n){let e,t,i=U.toArray(n[0][n[1].name]),s=[];for(let r=0;r<i.length;r+=1)s[r]=Nm(Lm(n,i,r));const l=r=>F(s[r],1,1,()=>{s[r]=null});return{c(){e=_("div");for(let r=0;r<s.length;r+=1)s[r].c();p(e,"class","inline-flex")},m(r,o){w(r,e,o);for(let a=0;a<s.length;a+=1)s[a].m(e,null);t=!0},p(r,o){if(o&3){i=U.toArray(r[0][r[1].name]);let a;for(a=0;a<i.length;a+=1){const u=Lm(r,i,a);s[a]?(s[a].p(u,o),A(s[a],1)):(s[a]=Nm(u),s[a].c(),A(s[a],1),s[a].m(e,null))}for(Oe(),a=i.length;a<s.length;a+=1)l(a);Te()}},i(r){if(!t){for(let o=0;o<i.length;o+=1)A(s[o]);t=!0}},o(r){s=s.filter(Boolean);for(let o=0;o<s.length;o+=1)F(s[o]);t=!1},d(r){r&&k(e),Bn(s,r)}}}function xD(n){let e,t=U.toArray(n[0][n[1].name]),i=[];for(let s=0;s<t.length;s+=1)i[s]=Rm(Fm(n,t,s));return{c(){e=_("div");for(let s=0;s<i.length;s+=1)i[s].c();p(e,"class","inline-flex")},m(s,l){w(s,e,l);for(let r=0;r<i.length;r+=1)i[r].m(e,null)},p(s,l){if(l&3){t=U.toArray(s[0][s[1].name]);let r;for(r=0;r<t.length;r+=1){const o=Fm(s,t,r);i[r]?i[r].p(o,l):(i[r]=Rm(o),i[r].c(),i[r].m(e,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=t.length}},i:re,o:re,d(s){s&&k(e),Bn(i,s)}}}function XD(n){let e,t=JSON.stringify(n[0][n[1].name])+"",i;return{c(){e=_("span"),i=H(t),p(e,"class","txt txt-ellipsis")},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&3&&t!==(t=JSON.stringify(s[0][s[1].name])+"")&&_e(i,t)},i:re,o:re,d(s){s&&k(e)}}}function QD(n){let e,t;return e=new $i({props:{date:n[0][n[1].name]}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&3&&(l.date=i[0][i[1].name]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function eA(n){let e,t=n[0][n[1].name]+"",i,s,l,r;return{c(){e=_("a"),i=H(t),p(e,"class","txt-ellipsis"),p(e,"href",s=n[0][n[1].name]),p(e,"target","_blank"),p(e,"rel","noopener")},m(o,a){w(o,e,a),m(e,i),l||(r=[Xe(St.call(null,e,"Open in new tab")),X(e,"click",Un(n[2]))],l=!0)},p(o,a){a&3&&t!==(t=o[0][o[1].name]+"")&&_e(i,t),a&3&&s!==(s=o[0][o[1].name])&&p(e,"href",s)},i:re,o:re,d(o){o&&k(e),l=!1,rt(r)}}}function tA(n){let e,t=n[0][n[1].name]?"True":"False",i;return{c(){e=_("span"),i=H(t),p(e,"class","txt")},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&3&&t!==(t=s[0][s[1].name]?"True":"False")&&_e(i,t)},i:re,o:re,d(s){s&&k(e)}}}function nA(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function Im(n){let e,t,i,s,l,r,o;return t=new Nb({props:{record:n[0],filename:n[8]}}),{c(){e=_("figure"),B(t.$$.fragment),i=O(),p(e,"class","thumb thumb-sm")},m(a,u){w(a,e,u),V(t,e,null),m(e,i),l=!0,r||(o=Xe(s=St.call(null,e,n[8])),r=!0)},p(a,u){n=a;const f={};u&1&&(f.record=n[0]),u&3&&(f.filename=n[8]),t.$set(f),s&&Jn(s.update)&&u&3&&s.update.call(null,n[8])},i(a){l||(A(t.$$.fragment,a),l=!0)},o(a){F(t.$$.fragment,a),l=!1},d(a){a&&k(e),z(t),r=!1,o()}}}function Nm(n){let e,t;return e=new No({props:{id:n[3]}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&3&&(l.id=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function Rm(n){let e,t=n[3]+"",i;return{c(){e=_("span"),i=H(t),p(e,"class","label")},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&3&&t!==(t=s[3]+"")&&_e(i,t)},d(s){s&&k(e)}}}function iA(n){let e,t,i,s,l,r;const o=[nA,tA,eA,QD,XD,xD,ZD,GD,JD],a=[];function u(f,c){return c&3&&(t=null),t==null&&(t=!!U.isEmpty(f[0][f[1].name])),t?0:f[1].type==="bool"?1:f[1].type==="url"?2:f[1].type==="date"?3:f[1].type==="json"?4:f[1].type==="select"?5:f[1].type==="relation"||f[1].type==="user"?6:f[1].type==="file"?7:8}return i=u(n,-1),s=a[i]=o[i](n),{c(){e=_("td"),s.c(),p(e,"class",l="col-type-"+n[1].type+" col-field-"+n[1].name)},m(f,c){w(f,e,c),a[i].m(e,null),r=!0},p(f,[c]){let d=i;i=u(f,c),i===d?a[i].p(f,c):(Oe(),F(a[d],1,1,()=>{a[d]=null}),Te(),s=a[i],s?s.p(f,c):(s=a[i]=o[i](f),s.c()),A(s,1),s.m(e,null)),(!r||c&2&&l!==(l="col-type-"+f[1].type+" col-field-"+f[1].name))&&p(e,"class",l)},i(f){r||(A(s),r=!0)},o(f){F(s),r=!1},d(f){f&&k(e),a[i].d()}}}function sA(n,e,t){let{record:i}=e,{field:s}=e;function l(r){ut.call(this,n,r)}return n.$$set=r=>{"record"in r&&t(0,i=r.record),"field"in r&&t(1,s=r.field)},[i,s,l]}class jb extends Fe{constructor(e){super(),Le(this,e,sA,iA,Ae,{record:0,field:1})}}function jm(n,e,t){const i=n.slice();return i[35]=e[t],i}function Hm(n,e,t){const i=n.slice();return i[38]=e[t],i}function qm(n,e,t){const i=n.slice();return i[38]=e[t],i}function lA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="id",p(t,"class",U.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function rA(n){let e,t,i,s,l,r=n[38].name+"",o;return{c(){e=_("div"),t=_("i"),s=O(),l=_("span"),o=H(r),p(t,"class",i=U.getFieldTypeIcon(n[38].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){w(a,e,u),m(e,t),m(e,s),m(e,l),m(l,o)},p(a,u){u[0]&2048&&i!==(i=U.getFieldTypeIcon(a[38].type))&&p(t,"class",i),u[0]&2048&&r!==(r=a[38].name+"")&&_e(o,r)},d(a){a&&k(e)}}}function Vm(n,e){let t,i,s,l;function r(a){e[22](a)}let o={class:"col-type-"+e[38].type+" col-field-"+e[38].name,name:e[38].name,$$slots:{default:[rA]},$$scope:{ctx:e}};return e[0]!==void 0&&(o.sort=e[0]),i=new Qt({props:o}),he.push(()=>Re(i,"sort",r)),{key:n,first:null,c(){t=lt(),B(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),V(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&2048&&(f.class="col-type-"+e[38].type+" col-field-"+e[38].name),u[0]&2048&&(f.name=e[38].name),u[0]&2048|u[1]&4096&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],je(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){F(i.$$.fragment,a),l=!1},d(a){a&&k(t),z(i,a)}}}function oA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="created",p(t,"class",U.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function aA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="updated",p(t,"class",U.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function zm(n){let e;function t(l,r){return l[8]?fA:uA}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function uA(n){var o;let e,t,i,s,l,r=((o=n[1])==null?void 0:o.length)&&Bm(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No records found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?r?r.p(a,u):(r=Bm(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function fA(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td> 
-                    `},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function Bm(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[28]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function Um(n,e){let t,i,s;return i=new jb({props:{record:e[35],field:e[38]}}),{key:n,first:null,c(){t=lt(),B(i.$$.fragment),this.first=t},m(l,r){w(l,t,r),V(i,l,r),s=!0},p(l,r){e=l;const o={};r[0]&8&&(o.record=e[35]),r[0]&2048&&(o.field=e[38]),i.$set(o)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){F(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function Wm(n,e){let t,i,s,l,r,o,a,u,f,c,d,h,g,y=[],b=new Map,v,S,$,C,M,T,E,D,P,L,N,R;function J(){return e[25](e[35])}h=new No({props:{id:e[35].id}});let W=e[11];const q=Y=>Y[38].name;for(let Y=0;Y<W.length;Y+=1){let ne=Hm(e,W,Y),fe=q(ne);b.set(fe,y[Y]=Um(fe,ne))}$=new $i({props:{date:e[35].created}}),T=new $i({props:{date:e[35].updated}});function G(){return e[26](e[35])}function K(...Y){return e[27](e[35],...Y)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),l=_("input"),a=O(),u=_("label"),c=O(),d=_("td"),B(h.$$.fragment),g=O();for(let Y=0;Y<y.length;Y+=1)y[Y].c();v=O(),S=_("td"),B($.$$.fragment),C=O(),M=_("td"),B(T.$$.fragment),E=O(),D=_("td"),D.innerHTML='<i class="ri-arrow-right-line"></i>',P=O(),p(l,"type","checkbox"),p(l,"id",r="checkbox_"+e[35].id),l.checked=o=e[5][e[35].id],p(u,"for",f="checkbox_"+e[35].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(d,"class","col-type-text col-field-id"),p(S,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(D,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Y,ne){w(Y,t,ne),m(t,i),m(i,s),m(s,l),m(s,a),m(s,u),m(t,c),m(t,d),V(h,d,null),m(t,g);for(let fe=0;fe<y.length;fe+=1)y[fe].m(t,null);m(t,v),m(t,S),V($,S,null),m(t,C),m(t,M),V(T,M,null),m(t,E),m(t,D),m(t,P),L=!0,N||(R=[X(l,"change",J),X(s,"click",Un(e[19])),X(t,"click",G),X(t,"keydown",K)],N=!0)},p(Y,ne){e=Y,(!L||ne[0]&8&&r!==(r="checkbox_"+e[35].id))&&p(l,"id",r),(!L||ne[0]&40&&o!==(o=e[5][e[35].id]))&&(l.checked=o),(!L||ne[0]&8&&f!==(f="checkbox_"+e[35].id))&&p(u,"for",f);const fe={};ne[0]&8&&(fe.id=e[35].id),h.$set(fe),ne[0]&2056&&(W=e[11],Oe(),y=ot(y,ne,q,1,e,W,b,t,Lt,Um,v,Hm),Te());const ye={};ne[0]&8&&(ye.date=e[35].created),$.$set(ye);const se={};ne[0]&8&&(se.date=e[35].updated),T.$set(se)},i(Y){if(!L){A(h.$$.fragment,Y);for(let ne=0;ne<W.length;ne+=1)A(y[ne]);A($.$$.fragment,Y),A(T.$$.fragment,Y),L=!0}},o(Y){F(h.$$.fragment,Y);for(let ne=0;ne<y.length;ne+=1)F(y[ne]);F($.$$.fragment,Y),F(T.$$.fragment,Y),L=!1},d(Y){Y&&k(t),z(h);for(let ne=0;ne<y.length;ne+=1)y[ne].d();z($),z(T),N=!1,rt(R)}}}function Ym(n){let e,t,i=n[3].length+"",s,l,r;return{c(){e=_("small"),t=H("Showing "),s=H(i),l=H(" of "),r=H(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(o,a){w(o,e,a),m(e,t),m(e,s),m(e,l),m(e,r)},p(o,a){a[0]&8&&i!==(i=o[3].length+"")&&_e(s,i),a[0]&16&&_e(r,o[4])},d(o){o&&k(e)}}}function Km(n){let e,t,i,s,l=n[4]-n[3].length+"",r,o,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=H("Load more ("),r=H(l),o=H(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),Q(t,"btn-loading",n[8]),Q(t,"btn-disabled",n[8]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,r),m(i,o),a||(u=X(t,"click",n[29]),a=!0)},p(f,c){c[0]&24&&l!==(l=f[4]-f[3].length+"")&&_e(r,l),c[0]&256&&Q(t,"btn-loading",f[8]),c[0]&256&&Q(t,"btn-disabled",f[8])},d(f){f&&k(e),a=!1,u()}}}function Jm(n){let e,t,i,s,l,r,o=n[6]===1?"record":"records",a,u,f,c,d,h,g,y,b,v,S;return{c(){e=_("div"),t=_("div"),i=H("Selected "),s=_("strong"),l=H(n[6]),r=O(),a=H(o),u=O(),f=_("button"),f.innerHTML='<span class="txt">Reset</span>',c=O(),d=_("div"),h=O(),g=_("button"),g.innerHTML='<span class="txt">Delete selected</span>',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),Q(f,"btn-disabled",n[9]),p(d,"class","flex-fill"),p(g,"type","button"),p(g,"class","btn btn-sm btn-secondary btn-danger"),Q(g,"btn-loading",n[9]),Q(g,"btn-disabled",n[9]),p(e,"class","bulkbar")},m($,C){w($,e,C),m(e,t),m(t,i),m(t,s),m(s,l),m(t,r),m(t,a),m(e,u),m(e,f),m(e,c),m(e,d),m(e,h),m(e,g),b=!0,v||(S=[X(f,"click",n[30]),X(g,"click",n[31])],v=!0)},p($,C){(!b||C[0]&64)&&_e(l,$[6]),(!b||C[0]&64)&&o!==(o=$[6]===1?"record":"records")&&_e(a,o),C[0]&512&&Q(f,"btn-disabled",$[9]),C[0]&512&&Q(g,"btn-loading",$[9]),C[0]&512&&Q(g,"btn-disabled",$[9])},i($){b||($&&Dt(()=>{y||(y=ft(e,ni,{duration:150,y:5},!0)),y.run(1)}),b=!0)},o($){$&&(y||(y=ft(e,ni,{duration:150,y:5},!1)),y.run(0)),b=!1},d($){$&&k(e),$&&y&&y.end(),v=!1,rt(S)}}}function cA(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y=[],b=new Map,v,S,$,C,M,T,E,D,P,L,N=[],R=new Map,J,W,q,G,K,Y,ne;function fe(le){n[21](le)}let ye={class:"col-type-text col-field-id",name:"id",$$slots:{default:[lA]},$$scope:{ctx:n}};n[0]!==void 0&&(ye.sort=n[0]),d=new Qt({props:ye}),he.push(()=>Re(d,"sort",fe));let se=n[11];const Z=le=>le[38].name;for(let le=0;le<se.length;le+=1){let ke=qm(n,se,le),Ve=Z(ke);b.set(Ve,y[le]=Vm(Ve,ke))}function De(le){n[23](le)}let te={class:"col-type-date col-field-created",name:"created",$$slots:{default:[oA]},$$scope:{ctx:n}};n[0]!==void 0&&(te.sort=n[0]),S=new Qt({props:te}),he.push(()=>Re(S,"sort",De));function be(le){n[24](le)}let ue={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[aA]},$$scope:{ctx:n}};n[0]!==void 0&&(ue.sort=n[0]),M=new Qt({props:ue}),he.push(()=>Re(M,"sort",be));let ie=n[3];const ve=le=>le[35].id;for(let le=0;le<ie.length;le+=1){let ke=jm(n,ie,le),Ve=ve(ke);R.set(Ve,N[le]=Wm(Ve,ke))}let He=null;ie.length||(He=zm(n));let Ie=n[3].length&&Ym(n),qe=n[3].length&&n[12]&&Km(n),oe=n[6]&&Jm(n);return{c(){e=_("div"),t=_("table"),i=_("thead"),s=_("tr"),l=_("th"),r=_("div"),o=_("input"),u=O(),f=_("label"),c=O(),B(d.$$.fragment),g=O();for(let le=0;le<y.length;le+=1)y[le].c();v=O(),B(S.$$.fragment),C=O(),B(M.$$.fragment),E=O(),D=_("th"),P=O(),L=_("tbody");for(let le=0;le<N.length;le+=1)N[le].c();He&&He.c(),J=O(),Ie&&Ie.c(),W=O(),qe&&qe.c(),q=O(),oe&&oe.c(),G=lt(),p(o,"type","checkbox"),p(o,"id","checkbox_0"),o.disabled=a=!n[3].length,o.checked=n[10],p(f,"for","checkbox_0"),p(r,"class","form-field"),p(l,"class","bulk-select-col min-width"),p(D,"class","col-type-action min-width"),p(t,"class","table"),Q(t,"table-loading",n[8]),p(e,"class","table-wrapper")},m(le,ke){w(le,e,ke),m(e,t),m(t,i),m(i,s),m(s,l),m(l,r),m(r,o),m(r,u),m(r,f),m(s,c),V(d,s,null),m(s,g);for(let Ve=0;Ve<y.length;Ve+=1)y[Ve].m(s,null);m(s,v),V(S,s,null),m(s,C),V(M,s,null),m(s,E),m(s,D),m(t,P),m(t,L);for(let Ve=0;Ve<N.length;Ve+=1)N[Ve].m(L,null);He&&He.m(L,null),w(le,J,ke),Ie&&Ie.m(le,ke),w(le,W,ke),qe&&qe.m(le,ke),w(le,q,ke),oe&&oe.m(le,ke),w(le,G,ke),K=!0,Y||(ne=X(o,"change",n[20]),Y=!0)},p(le,ke){(!K||ke[0]&8&&a!==(a=!le[3].length))&&(o.disabled=a),(!K||ke[0]&1024)&&(o.checked=le[10]);const Ve={};ke[1]&4096&&(Ve.$$scope={dirty:ke,ctx:le}),!h&&ke[0]&1&&(h=!0,Ve.sort=le[0],je(()=>h=!1)),d.$set(Ve),ke[0]&2049&&(se=le[11],Oe(),y=ot(y,ke,Z,1,le,se,b,s,Lt,Vm,v,qm),Te());const ze={};ke[1]&4096&&(ze.$$scope={dirty:ke,ctx:le}),!$&&ke[0]&1&&($=!0,ze.sort=le[0],je(()=>$=!1)),S.$set(ze);const Ze={};ke[1]&4096&&(Ze.$$scope={dirty:ke,ctx:le}),!T&&ke[0]&1&&(T=!0,Ze.sort=le[0],je(()=>T=!1)),M.$set(Ze),ke[0]&76074&&(ie=le[3],Oe(),N=ot(N,ke,ve,1,le,ie,R,L,Lt,Wm,null,jm),Te(),!ie.length&&He?He.p(le,ke):ie.length?He&&(He.d(1),He=null):(He=zm(le),He.c(),He.m(L,null))),ke[0]&256&&Q(t,"table-loading",le[8]),le[3].length?Ie?Ie.p(le,ke):(Ie=Ym(le),Ie.c(),Ie.m(W.parentNode,W)):Ie&&(Ie.d(1),Ie=null),le[3].length&&le[12]?qe?qe.p(le,ke):(qe=Km(le),qe.c(),qe.m(q.parentNode,q)):qe&&(qe.d(1),qe=null),le[6]?oe?(oe.p(le,ke),ke[0]&64&&A(oe,1)):(oe=Jm(le),oe.c(),A(oe,1),oe.m(G.parentNode,G)):oe&&(Oe(),F(oe,1,1,()=>{oe=null}),Te())},i(le){if(!K){A(d.$$.fragment,le);for(let ke=0;ke<se.length;ke+=1)A(y[ke]);A(S.$$.fragment,le),A(M.$$.fragment,le);for(let ke=0;ke<ie.length;ke+=1)A(N[ke]);A(oe),K=!0}},o(le){F(d.$$.fragment,le);for(let ke=0;ke<y.length;ke+=1)F(y[ke]);F(S.$$.fragment,le),F(M.$$.fragment,le);for(let ke=0;ke<N.length;ke+=1)F(N[ke]);F(oe),K=!1},d(le){le&&k(e),z(d);for(let ke=0;ke<y.length;ke+=1)y[ke].d();z(S),z(M);for(let ke=0;ke<N.length;ke+=1)N[ke].d();He&&He.d(),le&&k(J),Ie&&Ie.d(le),le&&k(W),qe&&qe.d(le),le&&k(q),oe&&oe.d(le),le&&k(G),Y=!1,ne()}}}function dA(n,e,t){let i,s,l,r;const o=_n();let{collection:a}=e,{sort:u=""}=e,{filter:f=""}=e,c=[],d=1,h=0,g={},y=!0,b=!1;async function v(se=1){if(!!(a!=null&&a.id))return t(8,y=!0),we.Records.getList(a.id,se,50,{sort:u,filter:f}).then(Z=>{se<=1&&S(),t(8,y=!1),t(3,c=c.concat(Z.items)),t(7,d=Z.page),t(4,h=Z.totalItems),o("load",c)}).catch(Z=>{Z!==null&&(t(8,y=!1),console.warn(Z),S(),we.errorResponseHandler(Z,!1))})}function S(){t(3,c=[]),t(7,d=1),t(4,h=0),t(5,g={})}function $(){r?C():M()}function C(){t(5,g={})}function M(){for(const se of c)t(5,g[se.id]=se,g);t(5,g)}function T(se){g[se.id]?delete g[se.id]:t(5,g[se.id]=se,g),t(5,g)}function E(){Ci(`Do you really want to delete the selected ${l===1?"record":"records"}?`,D)}async function D(){if(b||!l)return;let se=[];for(const Z of Object.keys(g))se.push(we.Records.delete(a==null?void 0:a.id,Z));return t(9,b=!0),Promise.all(se).then(()=>{mn(`Successfully deleted the selected ${l===1?"record":"records"}.`),C()}).catch(Z=>{we.errorResponseHandler(Z)}).finally(()=>(t(9,b=!1),v()))}function P(se){ut.call(this,n,se)}const L=()=>$();function N(se){u=se,t(0,u)}function R(se){u=se,t(0,u)}function J(se){u=se,t(0,u)}function W(se){u=se,t(0,u)}const q=se=>T(se),G=se=>o("select",se),K=(se,Z)=>{Z.code==="Enter"&&(Z.preventDefault(),o("select",se))},Y=()=>t(1,f=""),ne=()=>v(d+1),fe=()=>C(),ye=()=>E();return n.$$set=se=>{"collection"in se&&t(18,a=se.collection),"sort"in se&&t(0,u=se.sort),"filter"in se&&t(1,f=se.filter)},n.$$.update=()=>{n.$$.dirty[0]&262147&&a&&a.id&&u!==-1&&f!==-1&&(S(),v(1)),n.$$.dirty[0]&24&&t(12,i=h>c.length),n.$$.dirty[0]&262144&&t(11,s=(a==null?void 0:a.schema)||[]),n.$$.dirty[0]&32&&t(6,l=Object.keys(g).length),n.$$.dirty[0]&72&&t(10,r=c.length&&l===c.length)},[u,f,v,c,h,g,l,d,y,b,r,s,i,o,$,C,T,E,a,P,L,N,R,J,W,q,G,K,Y,ne,fe,ye]}class pA extends Fe{constructor(e){super(),Le(this,e,dA,cA,Ae,{collection:18,sort:0,filter:1,load:2},null,[-1,-1])}get load(){return this.$$.ctx[2]}}function hA(n){let e,t,i,s,l,r,o,a,u=n[2].name+"",f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L;e=new cO({}),$=new Ao({props:{value:n[0],autocompleteCollection:n[2]}}),$.$on("submit",n[15]);function N(W){n[17](W)}function R(W){n[18](W)}let J={collection:n[2]};return n[0]!==void 0&&(J.filter=n[0]),n[1]!==void 0&&(J.sort=n[1]),M=new pA({props:J}),n[16](M),he.push(()=>Re(M,"filter",N)),he.push(()=>Re(M,"sort",R)),M.$on("select",n[19]),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),l=_("nav"),r=_("div"),r.textContent="Collections",o=O(),a=_("div"),f=H(u),c=O(),d=_("button"),d.innerHTML='<i class="ri-settings-4-line"></i>',h=O(),g=_("div"),y=_("button"),y.innerHTML=`<i class="ri-code-s-slash-line"></i> 
-                    <span class="txt">API Preview</span>`,b=O(),v=_("button"),v.innerHTML=`<i class="ri-add-line"></i> 
-                    <span class="txt">New record</span>`,S=O(),B($.$$.fragment),C=O(),B(M.$$.fragment),p(r,"class","breadcrumb-item"),p(a,"class","breadcrumb-item"),p(l,"class","breadcrumbs"),p(d,"type","button"),p(d,"class","btn btn-secondary btn-circle"),p(y,"type","button"),p(y,"class","btn btn-outline"),p(v,"type","button"),p(v,"class","btn btn-expanded"),p(g,"class","btns-group"),p(s,"class","page-header"),p(i,"class","page-wrapper")},m(W,q){V(e,W,q),w(W,t,q),w(W,i,q),m(i,s),m(s,l),m(l,r),m(l,o),m(l,a),m(a,f),m(s,c),m(s,d),m(s,h),m(s,g),m(g,y),m(g,b),m(g,v),m(i,S),V($,i,null),m(i,C),V(M,i,null),D=!0,P||(L=[Xe(St.call(null,d,{text:"Edit collection",position:"right"})),X(d,"click",n[12]),X(y,"click",n[13]),X(v,"click",n[14])],P=!0)},p(W,q){(!D||q&4)&&u!==(u=W[2].name+"")&&_e(f,u);const G={};q&1&&(G.value=W[0]),q&4&&(G.autocompleteCollection=W[2]),$.$set(G);const K={};q&4&&(K.collection=W[2]),!T&&q&1&&(T=!0,K.filter=W[0],je(()=>T=!1)),!E&&q&2&&(E=!0,K.sort=W[1],je(()=>E=!1)),M.$set(K)},i(W){D||(A(e.$$.fragment,W),A($.$$.fragment,W),A(M.$$.fragment,W),D=!0)},o(W){F(e.$$.fragment,W),F($.$$.fragment,W),F(M.$$.fragment,W),D=!1},d(W){z(e,W),W&&k(t),W&&k(i),z($),n[16](null),z(M),P=!1,rt(L)}}}function mA(n){let e,t,i,s,l,r,o,a;return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-database-2-line"></i>',i=O(),s=_("h1"),s.textContent="Create your first collection to add records!",l=O(),r=_("button"),r.innerHTML=`<i class="ri-add-line"></i> 
-            <span class="txt">Create new collection</span>`,p(t,"class","icon"),p(s,"class","m-b-10"),p(r,"type","button"),p(r,"class","btn btn-expanded-lg btn-lg"),p(e,"class","placeholder-section m-b-base")},m(u,f){w(u,e,f),m(e,t),m(e,i),m(e,s),m(e,l),m(e,r),o||(a=X(r,"click",n[11]),o=!0)},p:re,i:re,o:re,d(u){u&&k(e),o=!1,a()}}}function gA(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span> 
-        <h1>Loading collections...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function _A(n){let e,t,i,s,l,r,o,a,u;const f=[gA,mA,hA],c=[];function d(b,v){return b[8]?0:b[7].length?2:1}e=d(n),t=c[e]=f[e](n);let h={};s=new hf({props:h}),n[20](s);let g={};r=new iT({props:g}),n[21](r);let y={collection:n[2]};return a=new Rb({props:y}),n[22](a),a.$on("save",n[23]),a.$on("delete",n[24]),{c(){t.c(),i=O(),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment)},m(b,v){c[e].m(b,v),w(b,i,v),V(s,b,v),w(b,l,v),V(r,b,v),w(b,o,v),V(a,b,v),u=!0},p(b,[v]){let S=e;e=d(b),e===S?c[e].p(b,v):(Oe(),F(c[S],1,1,()=>{c[S]=null}),Te(),t=c[e],t?t.p(b,v):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const $={};s.$set($);const C={};r.$set(C);const M={};v&4&&(M.collection=b[2]),a.$set(M)},i(b){u||(A(t),A(s.$$.fragment,b),A(r.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){F(t),F(s.$$.fragment,b),F(r.$$.fragment,b),F(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[20](null),z(s,b),b&&k(l),n[21](null),z(r,b),b&&k(o),n[22](null),z(a,b)}}}function bA(n,e,t){var J;let i,s,l,r;hn(n,fi,W=>t(2,s=W)),hn(n,Js,W=>t(10,l=W)),hn(n,pu,W=>t(8,r=W));const o=U.getQueryParams((J=window.location)==null?void 0:J.href);let a,u,f,c,d=o.filter||"",h=o.sort||"-created",g=o.collectionId;U.setDocumentTitle("Collections"),L3(g);const y=()=>a==null?void 0:a.show(),b=()=>a==null?void 0:a.show(s),v=()=>u==null?void 0:u.show(s),S=()=>f==null?void 0:f.show(),$=W=>t(0,d=W.detail);function C(W){he[W?"unshift":"push"](()=>{c=W,t(6,c)})}function M(W){d=W,t(0,d),t(2,s),t(9,g)}function T(W){h=W,t(1,h),t(2,s),t(9,g)}const E=W=>f==null?void 0:f.show(W==null?void 0:W.detail);function D(W){he[W?"unshift":"push"](()=>{a=W,t(3,a)})}function P(W){he[W?"unshift":"push"](()=>{u=W,t(4,u)})}function L(W){he[W?"unshift":"push"](()=>{f=W,t(5,f)})}const N=()=>c==null?void 0:c.load(),R=()=>c==null?void 0:c.load();return n.$$.update=()=>{n.$$.dirty&1024&&t(7,i=l.filter(W=>W.name!="profiles")),n.$$.dirty&516&&(s==null?void 0:s.id)&&g!=s.id&&(t(9,g=s.id),t(1,h="-created"),t(0,d="")),n.$$.dirty&7&&(h||d||(s==null?void 0:s.id))&&U.replaceClientQueryParams({collectionId:s==null?void 0:s.id,filter:d,sort:h})},[d,h,s,a,u,f,c,i,r,g,l,y,b,v,S,$,C,M,T,E,D,P,L,N,R]}class yA extends Fe{constructor(e){super(),Le(this,e,bA,_A,Ae,{})}}function Gm(n){let e,t;return e=new Ne({props:{class:"form-field disabled",name:"id",$$slots:{default:[vA,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&2|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function vA(n){let e,t,i,s,l,r,o,a,u;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="ID",r=O(),o=_("input"),p(t,"class",U.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[31]),p(o,"type","text"),p(o,"id",a=n[31]),o.value=u=n[1].id,o.disabled=!0},m(f,c){w(f,e,c),m(e,t),m(e,i),m(e,s),w(f,r,c),w(f,o,c)},p(f,c){c[1]&1&&l!==(l=f[31])&&p(e,"for",l),c[1]&1&&a!==(a=f[31])&&p(o,"id",a),c[0]&2&&u!==(u=f[1].id)&&o.value!==u&&(o.value=u)},d(f){f&&k(e),f&&k(r),f&&k(o)}}}function Zm(n){let e,t,i,s;return{c(){e=_("div"),e.innerHTML='<i class="ri-shield-check-line"></i>',p(e,"class","form-field-addon txt-success")},m(l,r){w(l,e,r),i||(s=Xe(t=St.call(null,e,"Verified")),i=!0)},d(l){l&&k(e),i=!1,s()}}}function kA(n){let e,t,i,s,l,r,o,a,u,f,c,d=n[1].verified&&Zm();return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Email",r=O(),d&&d.c(),o=O(),a=_("input"),p(t,"class",U.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[31]),p(a,"type","email"),p(a,"autocomplete","off"),p(a,"id",u=n[31]),a.required=!0},m(h,g){w(h,e,g),m(e,t),m(e,i),m(e,s),w(h,r,g),d&&d.m(h,g),w(h,o,g),w(h,a,g),$e(a,n[2]),f||(c=X(a,"input",n[19]),f=!0)},p(h,g){g[1]&1&&l!==(l=h[31])&&p(e,"for",l),h[1].verified?d||(d=Zm(),d.c(),d.m(o.parentNode,o)):d&&(d.d(1),d=null),g[1]&1&&u!==(u=h[31])&&p(a,"id",u),g[0]&4&&a.value!==h[2]&&$e(a,h[2])},d(h){h&&k(e),h&&k(r),d&&d.d(h),h&&k(o),h&&k(a),f=!1,c()}}}function xm(n){let e,t;return e=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[wA,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&8|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function wA(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[31]),p(s,"for",r=n[31])},m(u,f){w(u,e,f),e.checked=n[3],w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[20]),o=!0)},p(u,f){f[1]&1&&t!==(t=u[31])&&p(e,"id",t),f[0]&8&&(e.checked=u[3]),f[1]&1&&r!==(r=u[31])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Xm(n){let e,t,i,s,l,r,o,a,u;return s=new Ne({props:{class:"form-field required",name:"password",$$slots:{default:[SA,({uniqueId:f})=>({31:f}),({uniqueId:f})=>[0,f?1:0]]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[$A,({uniqueId:f})=>({31:f}),({uniqueId:f})=>[0,f?1:0]]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),i=_("div"),B(s.$$.fragment),l=O(),r=_("div"),B(o.$$.fragment),p(i,"class","col-sm-6"),p(r,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){w(f,e,c),m(e,t),m(t,i),V(s,i,null),m(t,l),m(t,r),V(o,r,null),u=!0},p(f,c){const d={};c[0]&128|c[1]&3&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c[0]&256|c[1]&3&&(h.$$scope={dirty:c,ctx:f}),o.$set(h)},i(f){u||(A(s.$$.fragment,f),A(o.$$.fragment,f),Dt(()=>{a||(a=ft(t,un,{duration:150},!0)),a.run(1)}),u=!0)},o(f){F(s.$$.fragment,f),F(o.$$.fragment,f),a||(a=ft(t,un,{duration:150},!1)),a.run(0),u=!1},d(f){f&&k(e),z(s),z(o),f&&a&&a.end()}}}function SA(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Password",r=O(),o=_("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[31]),p(o,"type","password"),p(o,"autocomplete","new-password"),p(o,"id",a=n[31]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),$e(o,n[7]),u||(f=X(o,"input",n[21]),u=!0)},p(c,d){d[1]&1&&l!==(l=c[31])&&p(e,"for",l),d[1]&1&&a!==(a=c[31])&&p(o,"id",a),d[0]&128&&o.value!==c[7]&&$e(o,c[7])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function $A(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Password confirm",r=O(),o=_("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[31]),p(o,"type","password"),p(o,"autocomplete","new-password"),p(o,"id",a=n[31]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),$e(o,n[8]),u||(f=X(o,"input",n[22]),u=!0)},p(c,d){d[1]&1&&l!==(l=c[31])&&p(e,"for",l),d[1]&1&&a!==(a=c[31])&&p(o,"id",a),d[0]&256&&o.value!==c[8]&&$e(o,c[8])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function Qm(n){let e,t;return e=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[CA,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&512|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function CA(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Send verification email"),p(e,"type","checkbox"),p(e,"id",t=n[31]),p(s,"for",r=n[31])},m(u,f){w(u,e,f),e.checked=n[9],w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[23]),o=!0)},p(u,f){f[1]&1&&t!==(t=u[31])&&p(e,"id",t),f[0]&512&&(e.checked=u[9]),f[1]&1&&r!==(r=u[31])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function MA(n){let e,t,i,s,l,r,o,a,u,f=!n[1].isNew&&Gm(n);i=new Ne({props:{class:"form-field required",name:"email",$$slots:{default:[kA,({uniqueId:g})=>({31:g}),({uniqueId:g})=>[0,g?1:0]]},$$scope:{ctx:n}}});let c=!n[1].isNew&&xm(n),d=(n[1].isNew||n[3])&&Xm(n),h=n[1].isNew&&Qm(n);return{c(){e=_("form"),f&&f.c(),t=O(),B(i.$$.fragment),s=O(),c&&c.c(),l=O(),d&&d.c(),r=O(),h&&h.c(),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(g,y){w(g,e,y),f&&f.m(e,null),m(e,t),V(i,e,null),m(e,s),c&&c.m(e,null),m(e,l),d&&d.m(e,null),m(e,r),h&&h.m(e,null),o=!0,a||(u=X(e,"submit",Kt(n[12])),a=!0)},p(g,y){g[1].isNew?f&&(Oe(),F(f,1,1,()=>{f=null}),Te()):f?(f.p(g,y),y[0]&2&&A(f,1)):(f=Gm(g),f.c(),A(f,1),f.m(e,t));const b={};y[0]&6|y[1]&3&&(b.$$scope={dirty:y,ctx:g}),i.$set(b),g[1].isNew?c&&(Oe(),F(c,1,1,()=>{c=null}),Te()):c?(c.p(g,y),y[0]&2&&A(c,1)):(c=xm(g),c.c(),A(c,1),c.m(e,l)),g[1].isNew||g[3]?d?(d.p(g,y),y[0]&10&&A(d,1)):(d=Xm(g),d.c(),A(d,1),d.m(e,r)):d&&(Oe(),F(d,1,1,()=>{d=null}),Te()),g[1].isNew?h?(h.p(g,y),y[0]&2&&A(h,1)):(h=Qm(g),h.c(),A(h,1),h.m(e,null)):h&&(Oe(),F(h,1,1,()=>{h=null}),Te())},i(g){o||(A(f),A(i.$$.fragment,g),A(c),A(d),A(h),o=!0)},o(g){F(f),F(i.$$.fragment,g),F(c),F(d),F(h),o=!1},d(g){g&&k(e),f&&f.d(),z(i),c&&c.d(),d&&d.d(),h&&h.d(),a=!1,u()}}}function OA(n){let e,t=n[1].isNew?"New user":"Edit user",i;return{c(){e=_("h4"),i=H(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New user":"Edit user")&&_e(i,t)},d(s){s&&k(e)}}}function eg(n){let e,t,i,s,l,r,o,a,u;return r=new ys({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[TA]},$$scope:{ctx:n}}}),{c(){e=_("button"),t=_("span"),i=O(),s=_("i"),l=O(),B(r.$$.fragment),o=O(),a=_("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){w(f,e,c),m(e,t),m(e,i),m(e,s),m(e,l),V(r,e,null),w(f,o,c),w(f,a,c),u=!0},p(f,c){const d={};c[0]&2|c[1]&2&&(d.$$scope={dirty:c,ctx:f}),r.$set(d)},i(f){u||(A(r.$$.fragment,f),u=!0)},o(f){F(r.$$.fragment,f),u=!1},d(f){f&&k(e),z(r),f&&k(o),f&&k(a)}}}function tg(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-mail-check-line"></i> 
-                            <span class="txt">Send verification email</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[16]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function TA(n){let e,t,i,s,l=!n[1].verified&&tg(n);return{c(){l&&l.c(),e=O(),t=_("button"),t.innerHTML=`<i class="ri-delete-bin-7-line"></i> 
-                        <span class="txt">Delete</span>`,p(t,"type","button"),p(t,"class","dropdown-item")},m(r,o){l&&l.m(r,o),w(r,e,o),w(r,t,o),i||(s=X(t,"click",n[17]),i=!0)},p(r,o){r[1].verified?l&&(l.d(1),l=null):l?l.p(r,o):(l=tg(r),l.c(),l.m(e.parentNode,e))},d(r){l&&l.d(r),r&&k(e),r&&k(t),i=!1,s()}}}function DA(n){let e,t,i,s,l,r,o=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&eg(n);return{c(){h&&h.c(),e=O(),t=_("button"),i=_("span"),i.textContent="Cancel",s=O(),l=_("button"),r=_("span"),a=H(o),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[5],p(r,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[5],Q(l,"btn-loading",n[5])},m(g,y){h&&h.m(g,y),w(g,e,y),w(g,t,y),m(t,i),w(g,s,y),w(g,l,y),m(l,r),m(r,a),f=!0,c||(d=X(t,"click",n[18]),c=!0)},p(g,y){g[1].isNew?h&&(Oe(),F(h,1,1,()=>{h=null}),Te()):h?(h.p(g,y),y[0]&2&&A(h,1)):(h=eg(g),h.c(),A(h,1),h.m(e.parentNode,e)),(!f||y[0]&32)&&(t.disabled=g[5]),(!f||y[0]&2)&&o!==(o=g[1].isNew?"Create":"Save changes")&&_e(a,o),(!f||y[0]&1056&&u!==(u=!g[10]||g[5]))&&(l.disabled=u),y[0]&32&&Q(l,"btn-loading",g[5])},i(g){f||(A(h),f=!0)},o(g){F(h),f=!1},d(g){h&&h.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function AA(n){let e,t,i={popup:!0,class:"user-panel",beforeHide:n[24],$$slots:{footer:[DA],header:[OA],default:[MA]},$$scope:{ctx:n}};return e=new Di({props:i}),n[25](e),e.$on("hide",n[26]),e.$on("show",n[27]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&1088&&(r.beforeHide=s[24]),l[0]&1966|l[1]&2&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[25](null),z(e,s)}}}function EA(n,e,t){let i;const s=_n(),l="user_"+U.randomString(5);let r,o=new to,a=!1,u=!1,f="",c="",d="",h=!1,g=!0;function y(Y){return v(Y),t(6,u=!0),r==null?void 0:r.show()}function b(){return r==null?void 0:r.hide()}function v(Y){Wi({}),t(1,o=Y!=null&&Y.clone?Y.clone():new to),S()}function S(){t(3,h=!1),t(9,g=!0),t(2,f=(o==null?void 0:o.email)||""),t(7,c=""),t(8,d="")}function $(){if(a||!i)return;t(5,a=!0);const Y={email:f};(o.isNew||h)&&(Y.password=c,Y.passwordConfirm=d);let ne;o.isNew?ne=we.Users.create(Y):ne=we.Users.update(o.id,Y),ne.then(async fe=>{g&&M(!1),t(6,u=!1),b(),mn(o.isNew?"Successfully created user.":"Successfully updated user."),s("save",fe)}).catch(fe=>{we.errorResponseHandler(fe)}).finally(()=>{t(5,a=!1)})}function C(){!(o!=null&&o.id)||Ci("Do you really want to delete the selected user?",()=>we.Users.delete(o.id).then(()=>{t(6,u=!1),b(),mn("Successfully deleted user."),s("delete",o)}).catch(Y=>{we.errorResponseHandler(Y)}))}function M(Y=!0){return we.Users.requestVerification(o.isNew?f:o.email).then(()=>{t(6,u=!1),b(),Y&&mn(`Successfully sent verification email to ${o.email}.`)}).catch(ne=>{we.errorResponseHandler(ne)})}const T=()=>M(),E=()=>C(),D=()=>b();function P(){f=this.value,t(2,f)}function L(){h=this.checked,t(3,h)}function N(){c=this.value,t(7,c)}function R(){d=this.value,t(8,d)}function J(){g=this.checked,t(9,g)}const W=()=>i&&u?(Ci("You have unsaved changes. Do you really want to close the panel?",()=>{t(6,u=!1),b()}),!1):!0;function q(Y){he[Y?"unshift":"push"](()=>{r=Y,t(4,r)})}function G(Y){ut.call(this,n,Y)}function K(Y){ut.call(this,n,Y)}return n.$$.update=()=>{n.$$.dirty[0]&14&&t(10,i=o.isNew&&f!=""||h||f!==o.email)},[b,o,f,h,r,a,u,c,d,g,i,l,$,C,M,y,T,E,D,P,L,N,R,J,W,q,G,K]}class PA extends Fe{constructor(e){super(),Le(this,e,EA,AA,Ae,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function ng(n,e,t){const i=n.slice();return i[37]=e[t],i}function ig(n,e,t){const i=n.slice();return i[40]=e[t],i}function sg(n,e,t){const i=n.slice();return i[40]=e[t],i}function LA(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E=[],D=new Map,P,L,N,R,J,W,q,G,K,Y,ne=[],fe=new Map,ye,se,Z,De,te;c=new Ao({props:{value:n[3],placeholder:"Search filter, eg. verified=1",extraAutocompleteKeys:["verified","email"]}}),c.$on("submit",n[17]);function be(x){n[18](x)}let ue={class:"col-type-text col-field-id",name:"id",$$slots:{default:[IA]},$$scope:{ctx:n}};n[4]!==void 0&&(ue.sort=n[4]),v=new Qt({props:ue}),he.push(()=>Re(v,"sort",be));function ie(x){n[19](x)}let ve={class:"col-type-email col-field-email",name:"email",$$slots:{default:[NA]},$$scope:{ctx:n}};n[4]!==void 0&&(ve.sort=n[4]),C=new Qt({props:ve}),he.push(()=>Re(C,"sort",ie));let He=n[12];const Ie=x=>x[40].name;for(let x=0;x<He.length;x+=1){let ae=sg(n,He,x),Be=Ie(ae);D.set(Be,E[x]=lg(Be,ae))}function qe(x){n[20](x)}let oe={class:"col-type-date col-field-created",name:"created",$$slots:{default:[RA]},$$scope:{ctx:n}};n[4]!==void 0&&(oe.sort=n[4]),L=new Qt({props:oe}),he.push(()=>Re(L,"sort",qe));function le(x){n[21](x)}let ke={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[jA]},$$scope:{ctx:n}};n[4]!==void 0&&(ke.sort=n[4]),J=new Qt({props:ke}),he.push(()=>Re(J,"sort",le));let Ve=n[1];const ze=x=>x[37].id;for(let x=0;x<Ve.length;x+=1){let ae=ng(n,Ve,x),Be=ze(ae);fe.set(Be,ne[x]=ug(Be,ae))}let Ze=null;Ve.length||(Ze=rg(n));let ge=n[1].length&&fg(n),Ee=n[1].length&&n[13]&&cg(n);return{c(){e=_("main"),t=_("header"),i=_("nav"),i.innerHTML='<div class="breadcrumb-item">Users</div>',s=O(),l=_("button"),l.innerHTML='<i class="ri-settings-4-line"></i>',r=O(),o=_("div"),a=O(),u=_("button"),u.innerHTML=`<i class="ri-add-line"></i> 
-                <span class="txt">New user</span>`,f=O(),B(c.$$.fragment),d=O(),h=_("div"),g=_("table"),y=_("thead"),b=_("tr"),B(v.$$.fragment),$=O(),B(C.$$.fragment),T=O();for(let x=0;x<E.length;x+=1)E[x].c();P=O(),B(L.$$.fragment),R=O(),B(J.$$.fragment),q=O(),G=_("th"),K=O(),Y=_("tbody");for(let x=0;x<ne.length;x+=1)ne[x].c();Ze&&Ze.c(),ye=O(),ge&&ge.c(),se=O(),Ee&&Ee.c(),p(i,"class","breadcrumbs"),p(l,"type","button"),p(l,"class","btn btn-secondary btn-circle"),p(o,"class","flex-fill"),p(u,"type","button"),p(u,"class","btn btn-expanded"),p(t,"class","page-header"),p(G,"class","col-type-action min-width"),p(g,"class","table"),Q(g,"table-loading",n[10]),p(h,"class","table-wrapper"),p(e,"class","page-wrapper")},m(x,ae){w(x,e,ae),m(e,t),m(t,i),m(t,s),m(t,l),m(t,r),m(t,o),m(t,a),m(t,u),m(e,f),V(c,e,null),m(e,d),m(e,h),m(h,g),m(g,y),m(y,b),V(v,b,null),m(b,$),V(C,b,null),m(b,T);for(let Be=0;Be<E.length;Be+=1)E[Be].m(b,null);m(b,P),V(L,b,null),m(b,R),V(J,b,null),m(b,q),m(b,G),m(g,K),m(g,Y);for(let Be=0;Be<ne.length;Be+=1)ne[Be].m(Y,null);Ze&&Ze.m(Y,null),m(e,ye),ge&&ge.m(e,null),m(e,se),Ee&&Ee.m(e,null),Z=!0,De||(te=[Xe(St.call(null,l,{text:"Edit profile collection",position:"right"})),X(l,"click",n[15]),X(u,"click",n[16])],De=!0)},p(x,ae){const Be={};ae[0]&8&&(Be.value=x[3]),c.$set(Be);const vt={};ae[1]&16384&&(vt.$$scope={dirty:ae,ctx:x}),!S&&ae[0]&16&&(S=!0,vt.sort=x[4],je(()=>S=!1)),v.$set(vt);const it={};ae[1]&16384&&(it.$$scope={dirty:ae,ctx:x}),!M&&ae[0]&16&&(M=!0,it.sort=x[4],je(()=>M=!1)),C.$set(it),ae[0]&4096&&(He=x[12],E=ot(E,ae,Ie,1,x,He,D,b,an,lg,P,sg));const gt={};ae[1]&16384&&(gt.$$scope={dirty:ae,ctx:x}),!N&&ae[0]&16&&(N=!0,gt.sort=x[4],je(()=>N=!1)),L.$set(gt);const at={};ae[1]&16384&&(at.$$scope={dirty:ae,ctx:x}),!W&&ae[0]&16&&(W=!0,at.sort=x[4],je(()=>W=!1)),J.$set(at),ae[0]&5450&&(Ve=x[1],Oe(),ne=ot(ne,ae,ze,1,x,Ve,fe,Y,Lt,ug,null,ng),Te(),!Ve.length&&Ze?Ze.p(x,ae):Ve.length?Ze&&(Ze.d(1),Ze=null):(Ze=rg(x),Ze.c(),Ze.m(Y,null))),ae[0]&1024&&Q(g,"table-loading",x[10]),x[1].length?ge?ge.p(x,ae):(ge=fg(x),ge.c(),ge.m(e,se)):ge&&(ge.d(1),ge=null),x[1].length&&x[13]?Ee?Ee.p(x,ae):(Ee=cg(x),Ee.c(),Ee.m(e,null)):Ee&&(Ee.d(1),Ee=null)},i(x){if(!Z){A(c.$$.fragment,x),A(v.$$.fragment,x),A(C.$$.fragment,x),A(L.$$.fragment,x),A(J.$$.fragment,x);for(let ae=0;ae<Ve.length;ae+=1)A(ne[ae]);Z=!0}},o(x){F(c.$$.fragment,x),F(v.$$.fragment,x),F(C.$$.fragment,x),F(L.$$.fragment,x),F(J.$$.fragment,x);for(let ae=0;ae<ne.length;ae+=1)F(ne[ae]);Z=!1},d(x){x&&k(e),z(c),z(v),z(C);for(let ae=0;ae<E.length;ae+=1)E[ae].d();z(L),z(J);for(let ae=0;ae<ne.length;ae+=1)ne[ae].d();Ze&&Ze.d(),ge&&ge.d(),Ee&&Ee.d(),De=!1,rt(te)}}}function FA(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span> 
-        <h1>Loading users...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function IA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="id",p(t,"class",U.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function NA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="email",p(t,"class",U.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function lg(n,e){let t,i,s,l,r,o,a,u=e[40].name+"",f,c,d;return{key:n,first:null,c(){t=_("th"),i=_("div"),s=_("i"),r=O(),o=_("span"),a=H("profile."),f=H(u),p(s,"class",l=U.getFieldTypeIcon(e[40].type)),p(o,"class","txt"),p(i,"class","col-header-content"),p(t,"class",c="col-type-"+e[40].type+" col-field-"+e[40].name),p(t,"name",d=e[40].name),this.first=t},m(h,g){w(h,t,g),m(t,i),m(i,s),m(i,r),m(i,o),m(o,a),m(o,f)},p(h,g){e=h,g[0]&4096&&l!==(l=U.getFieldTypeIcon(e[40].type))&&p(s,"class",l),g[0]&4096&&u!==(u=e[40].name+"")&&_e(f,u),g[0]&4096&&c!==(c="col-type-"+e[40].type+" col-field-"+e[40].name)&&p(t,"class",c),g[0]&4096&&d!==(d=e[40].name)&&p(t,"name",d)},d(h){h&&k(t)}}}function RA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="created",p(t,"class",U.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function jA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="updated",p(t,"class",U.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function rg(n){let e;function t(l,r){return l[10]?qA:HA}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function HA(n){var o;let e,t,i,s,l,r=((o=n[3])==null?void 0:o.length)&&og(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No users found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[3])!=null&&f.length?r?r.p(a,u):(r=og(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function qA(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td> 
-                            `},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function og(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[24]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function ag(n,e){let t,i,s;return i=new jb({props:{field:e[40],record:e[37].profile||{}}}),{key:n,first:null,c(){t=lt(),B(i.$$.fragment),this.first=t},m(l,r){w(l,t,r),V(i,l,r),s=!0},p(l,r){e=l;const o={};r[0]&4096&&(o.field=e[40]),r[0]&2&&(o.record=e[37].profile||{}),i.$set(o)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){F(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function ug(n,e){let t,i,s,l,r,o,a,u=e[37].email+"",f,c,d,h,g=e[37].verified?"Verified":"Unverified",y,b,v=[],S=new Map,$,C,M,T,E,D,P,L,N,R,J,W,q,G,K;s=new No({props:{id:e[37].id}});let Y=e[12];const ne=se=>se[40].name;for(let se=0;se<Y.length;se+=1){let Z=ig(e,Y,se),De=ne(Z);S.set(De,v[se]=ag(De,Z))}M=new $i({props:{date:e[37].created}}),D=new $i({props:{date:e[37].updated}});function fe(){return e[22](e[37])}function ye(){return e[23](e[37])}return{key:n,first:null,c(){t=_("tr"),i=_("td"),B(s.$$.fragment),l=O(),r=_("td"),o=_("div"),a=_("span"),f=H(u),d=O(),h=_("span"),y=H(g),b=O();for(let se=0;se<v.length;se+=1)v[se].c();$=O(),C=_("td"),B(M.$$.fragment),T=O(),E=_("td"),B(D.$$.fragment),P=O(),L=_("td"),N=_("button"),N.innerHTML=`<i class="ri-user-settings-line"></i> 
-                                    <span class="txt">Edit user</span>`,R=O(),J=_("button"),J.innerHTML=`<i class="ri-profile-line"></i> 
-                                    <span class="txt">Edit profile</span>`,W=O(),p(i,"class","col-type-text col-field-id"),p(a,"class","txt"),p(a,"title",c=e[37].email),p(h,"class","label"),Q(h,"label-success",e[37].verified),Q(h,"label-warning",!e[37].verified),p(o,"class","inline-flex"),p(r,"class","col-type-email col-field-email"),p(C,"class","col-type-date col-field-created"),p(E,"class","col-type-date col-field-updated"),p(N,"type","button"),p(N,"class","btn btn-sm btn-outline"),p(J,"type","button"),p(J,"class","btn btn-sm m-l-10"),p(L,"class","col-type-action min-width"),this.first=t},m(se,Z){w(se,t,Z),m(t,i),V(s,i,null),m(t,l),m(t,r),m(r,o),m(o,a),m(a,f),m(o,d),m(o,h),m(h,y),m(t,b);for(let De=0;De<v.length;De+=1)v[De].m(t,null);m(t,$),m(t,C),V(M,C,null),m(t,T),m(t,E),V(D,E,null),m(t,P),m(t,L),m(L,N),m(L,R),m(L,J),m(t,W),q=!0,G||(K=[X(N,"click",Un(fe)),X(J,"click",Un(ye))],G=!0)},p(se,Z){e=se;const De={};Z[0]&2&&(De.id=e[37].id),s.$set(De),(!q||Z[0]&2)&&u!==(u=e[37].email+"")&&_e(f,u),(!q||Z[0]&2&&c!==(c=e[37].email))&&p(a,"title",c),(!q||Z[0]&2)&&g!==(g=e[37].verified?"Verified":"Unverified")&&_e(y,g),Z[0]&2&&Q(h,"label-success",e[37].verified),Z[0]&2&&Q(h,"label-warning",!e[37].verified),Z[0]&4098&&(Y=e[12],Oe(),v=ot(v,Z,ne,1,e,Y,S,t,Lt,ag,$,ig),Te());const te={};Z[0]&2&&(te.date=e[37].created),M.$set(te);const be={};Z[0]&2&&(be.date=e[37].updated),D.$set(be)},i(se){if(!q){A(s.$$.fragment,se);for(let Z=0;Z<Y.length;Z+=1)A(v[Z]);A(M.$$.fragment,se),A(D.$$.fragment,se),q=!0}},o(se){F(s.$$.fragment,se);for(let Z=0;Z<v.length;Z+=1)F(v[Z]);F(M.$$.fragment,se),F(D.$$.fragment,se),q=!1},d(se){se&&k(t),z(s);for(let Z=0;Z<v.length;Z+=1)v[Z].d();z(M),z(D),G=!1,rt(K)}}}function fg(n){let e,t,i=n[1].length+"",s,l,r;return{c(){e=_("small"),t=H("Showing "),s=H(i),l=H(" of "),r=H(n[2]),p(e,"class","block txt-hint txt-right m-t-sm")},m(o,a){w(o,e,a),m(e,t),m(e,s),m(e,l),m(e,r)},p(o,a){a[0]&2&&i!==(i=o[1].length+"")&&_e(s,i),a[0]&4&&_e(r,o[2])},d(o){o&&k(e)}}}function cg(n){let e,t,i,s,l=n[2]-n[1].length+"",r,o,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=H("Load more ("),r=H(l),o=H(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),Q(t,"btn-loading",n[10]),Q(t,"btn-disabled",n[10]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,r),m(i,o),a||(u=X(t,"click",n[25]),a=!0)},p(f,c){c[0]&6&&l!==(l=f[2]-f[1].length+"")&&_e(r,l),c[0]&1024&&Q(t,"btn-loading",f[10]),c[0]&1024&&Q(t,"btn-disabled",f[10])},d(f){f&&k(e),a=!1,u()}}}function VA(n){let e,t,i,s,l,r,o,a,u;const f=[FA,LA],c=[];function d(b,v){return b[11]?0:1}e=d(n),t=c[e]=f[e](n);let h={};s=new PA({props:h}),n[26](s),s.$on("save",n[27]),s.$on("delete",n[28]);let g={};r=new hf({props:g}),n[29](r),r.$on("save",n[30]);let y={collection:n[5]};return a=new Rb({props:y}),n[31](a),a.$on("save",n[32]),{c(){t.c(),i=O(),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment)},m(b,v){c[e].m(b,v),w(b,i,v),V(s,b,v),w(b,l,v),V(r,b,v),w(b,o,v),V(a,b,v),u=!0},p(b,v){let S=e;e=d(b),e===S?c[e].p(b,v):(Oe(),F(c[S],1,1,()=>{c[S]=null}),Te(),t=c[e],t?t.p(b,v):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const $={};s.$set($);const C={};r.$set(C);const M={};v[0]&32&&(M.collection=b[5]),a.$set(M)},i(b){u||(A(t),A(s.$$.fragment,b),A(r.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){F(t),F(s.$$.fragment,b),F(r.$$.fragment,b),F(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[26](null),z(s,b),b&&k(l),n[29](null),z(r,b),b&&k(o),n[31](null),z(a,b)}}}function zA(n,e,t){var De;let i,s;const l=U.getQueryParams((De=window.location)==null?void 0:De.href),r=["id","userId","created","updated"];let o,a,u,f=[],c=1,d=0,h=!1,g=l.filter||"",y=l.sort||"-created",b=new Ln,v=!1;U.setDocumentTitle("Users"),M();async function S(te=1){return t(10,h=!0),we.Users.getList(te,50,{sort:y||"-created",filter:g}).then(be=>{te<=1&&$(),t(10,h=!1),t(1,f=f.concat(be.items)),t(9,c=be.page),t(2,d=be.totalItems)}).catch(be=>{be!==null&&(t(10,h=!1),console.warn(be),$(),we.errorResponseHandler(be,!1))})}function $(){t(1,f=[]),t(9,c=1),t(2,d=0)}function C(te){const be=f.find(ue=>ue.id===(te==null?void 0:te.userId));be&&(be.profile=te),t(1,f)}async function M(){t(11,v=!0);try{t(5,b=await we.Collections.getOne("profiles"))}catch(te){we.errorResponseHandler(te)}t(11,v=!1)}const T=()=>a==null?void 0:a.show(b),E=()=>o==null?void 0:o.show(),D=te=>t(3,g=te.detail);function P(te){y=te,t(4,y)}function L(te){y=te,t(4,y)}function N(te){y=te,t(4,y)}function R(te){y=te,t(4,y)}const J=te=>o==null?void 0:o.show(te),W=te=>u==null?void 0:u.show(te.profile),q=()=>t(3,g=""),G=()=>S(c+1);function K(te){he[te?"unshift":"push"](()=>{o=te,t(6,o)})}const Y=()=>S(),ne=()=>S();function fe(te){he[te?"unshift":"push"](()=>{a=te,t(7,a)})}const ye=te=>t(5,b=te.detail);function se(te){he[te?"unshift":"push"](()=>{u=te,t(8,u)})}const Z=te=>C(te.detail);return n.$$.update=()=>{var te;n.$$.dirty[0]&24&&y!==-1&&g!==-1&&(U.replaceClientQueryParams({filter:g,sort:y}),S()),n.$$.dirty[0]&6&&t(13,i=d>f.length),n.$$.dirty[0]&32&&t(12,s=(te=b==null?void 0:b.schema)==null?void 0:te.filter(be=>!r.includes(be.name)))},[S,f,d,g,y,b,o,a,u,c,h,v,s,i,C,T,E,D,P,L,N,R,J,W,q,G,K,Y,ne,fe,ye,se,Z]}class BA extends Fe{constructor(e){super(),Le(this,e,zA,VA,Ae,{loadUsers:0},null,[-1,-1])}get loadUsers(){return this.$$.ctx[0]}}function UA(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$;return{c(){e=_("aside"),t=_("div"),i=_("div"),i.textContent="System",s=O(),l=_("a"),l.innerHTML=`<i class="ri-home-gear-line"></i> 
-            <span class="txt">Application</span>`,r=O(),o=_("a"),o.innerHTML=`<i class="ri-send-plane-2-line"></i> 
-            <span class="txt">Mail settings</span>`,a=O(),u=_("a"),u.innerHTML=`<i class="ri-archive-drawer-line"></i> 
-            <span class="txt">Files storage</span>`,f=O(),c=_("div"),c.textContent="Authentication",d=O(),h=_("a"),h.innerHTML=`<i class="ri-lock-password-line"></i> 
-            <span class="txt">Auth providers</span>`,g=O(),y=_("a"),y.innerHTML=`<i class="ri-key-line"></i> 
-            <span class="txt">Token options</span>`,b=O(),v=_("a"),v.innerHTML=`<i class="ri-shield-user-line"></i> 
-            <span class="txt">Admins</span>`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(o,"href","/settings/mail"),p(o,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(h,"href","/settings/auth-providers"),p(h,"class","sidebar-list-item"),p(y,"href","/settings/tokens"),p(y,"class","sidebar-list-item"),p(v,"href","/settings/admins"),p(v,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(C,M){w(C,e,M),m(e,t),m(t,i),m(t,s),m(t,l),m(t,r),m(t,o),m(t,a),m(t,u),m(t,f),m(t,c),m(t,d),m(t,h),m(t,g),m(t,y),m(t,b),m(t,v),S||($=[Xe(oi.call(null,l,{path:"/settings"})),Xe(Mn.call(null,l)),Xe(oi.call(null,o,{path:"/settings/mail/?.*"})),Xe(Mn.call(null,o)),Xe(oi.call(null,u,{path:"/settings/storage/?.*"})),Xe(Mn.call(null,u)),Xe(oi.call(null,h,{path:"/settings/auth-providers/?.*"})),Xe(Mn.call(null,h)),Xe(oi.call(null,y,{path:"/settings/tokens/?.*"})),Xe(Mn.call(null,y)),Xe(oi.call(null,v,{path:"/settings/admins/?.*"})),Xe(Mn.call(null,v))],S=!0)},p:re,i:re,o:re,d(C){C&&k(e),S=!1,rt($)}}}class tl extends Fe{constructor(e){super(),Le(this,e,null,UA,Ae,{})}}function dg(n,e,t){const i=n.slice();return i[31]=e[t],i}function pg(n){let e,t;return e=new Ne({props:{class:"form-field disabled",name:"id",$$slots:{default:[WA,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function WA(n){let e,t,i,s,l,r,o,a,u;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="ID",r=O(),o=_("input"),p(t,"class",U.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[30]),p(o,"type","text"),p(o,"id",a=n[30]),o.value=u=n[1].id,o.disabled=!0},m(f,c){w(f,e,c),m(e,t),m(e,i),m(e,s),w(f,r,c),w(f,o,c)},p(f,c){c[0]&1073741824&&l!==(l=f[30])&&p(e,"for",l),c[0]&1073741824&&a!==(a=f[30])&&p(o,"id",a),c[0]&2&&u!==(u=f[1].id)&&o.value!==u&&(o.value=u)},d(f){f&&k(e),f&&k(r),f&&k(o)}}}function hg(n){let e,t,i,s,l,r,o,a;function u(){return n[17](n[31])}function f(...c){return n[18](n[31],...c)}return{c(){e=_("figure"),t=_("img"),l=O(),ei(t.src,i="/_/images/avatars/avatar"+n[31]+".svg")||p(t,"src",i),p(t,"alt",s="Avatar "+n[31]),p(e,"tabindex","0"),p(e,"class",r="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))},m(c,d){w(c,e,d),m(e,t),m(e,l),o||(a=[X(e,"click",u),X(e,"keydown",f)],o=!0)},p(c,d){n=c,d[0]&4&&r!==(r="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",r)},d(c){c&&k(e),o=!1,rt(a)}}}function YA(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Email",r=O(),o=_("input"),p(t,"class",U.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[30]),p(o,"type","email"),p(o,"autocomplete","off"),p(o,"id",a=n[30]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),$e(o,n[3]),u||(f=X(o,"input",n[19]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(o,"id",a),d[0]&8&&o.value!==c[3]&&$e(o,c[3])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function mg(n){let e,t;return e=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[KA,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function KA(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[30]),p(s,"for",r=n[30])},m(u,f){w(u,e,f),e.checked=n[4],w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[20]),o=!0)},p(u,f){f[0]&1073741824&&t!==(t=u[30])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&1073741824&&r!==(r=u[30])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function gg(n){let e,t,i,s,l,r,o,a,u;return s=new Ne({props:{class:"form-field required",name:"password",$$slots:{default:[JA,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[GA,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),i=_("div"),B(s.$$.fragment),l=O(),r=_("div"),B(o.$$.fragment),p(i,"class","col-sm-6"),p(r,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){w(f,e,c),m(e,t),m(t,i),V(s,i,null),m(t,l),m(t,r),V(o,r,null),u=!0},p(f,c){const d={};c[0]&1073742080|c[1]&8&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c[0]&1073742336|c[1]&8&&(h.$$scope={dirty:c,ctx:f}),o.$set(h)},i(f){u||(A(s.$$.fragment,f),A(o.$$.fragment,f),Dt(()=>{a||(a=ft(t,un,{duration:150},!0)),a.run(1)}),u=!0)},o(f){F(s.$$.fragment,f),F(o.$$.fragment,f),a||(a=ft(t,un,{duration:150},!1)),a.run(0),u=!1},d(f){f&&k(e),z(s),z(o),f&&a&&a.end()}}}function JA(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Password",r=O(),o=_("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[30]),p(o,"type","password"),p(o,"autocomplete","new-password"),p(o,"id",a=n[30]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),$e(o,n[8]),u||(f=X(o,"input",n[21]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(o,"id",a),d[0]&256&&o.value!==c[8]&&$e(o,c[8])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function GA(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Password confirm",r=O(),o=_("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[30]),p(o,"type","password"),p(o,"autocomplete","new-password"),p(o,"id",a=n[30]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),$e(o,n[9]),u||(f=X(o,"input",n[22]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(o,"id",a),d[0]&512&&o.value!==c[9]&&$e(o,c[9])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function ZA(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g=!n[1].isNew&&pg(n),y=[0,1,2,3,4,5,6,7,8,9],b=[];for(let $=0;$<10;$+=1)b[$]=hg(dg(n,y,$));a=new Ne({props:{class:"form-field required",name:"email",$$slots:{default:[YA,({uniqueId:$})=>({30:$}),({uniqueId:$})=>[$?1073741824:0]]},$$scope:{ctx:n}}});let v=!n[1].isNew&&mg(n),S=(n[1].isNew||n[4])&&gg(n);return{c(){e=_("form"),g&&g.c(),t=O(),i=_("div"),s=_("p"),s.textContent="Avatar",l=O(),r=_("div");for(let $=0;$<10;$+=1)b[$].c();o=O(),B(a.$$.fragment),u=O(),v&&v.c(),f=O(),S&&S.c(),p(s,"class","section-title"),p(r,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m($,C){w($,e,C),g&&g.m(e,null),m(e,t),m(e,i),m(i,s),m(i,l),m(i,r);for(let M=0;M<10;M+=1)b[M].m(r,null);m(e,o),V(a,e,null),m(e,u),v&&v.m(e,null),m(e,f),S&&S.m(e,null),c=!0,d||(h=X(e,"submit",Kt(n[12])),d=!0)},p($,C){if($[1].isNew?g&&(Oe(),F(g,1,1,()=>{g=null}),Te()):g?(g.p($,C),C[0]&2&&A(g,1)):(g=pg($),g.c(),A(g,1),g.m(e,t)),C[0]&4){y=[0,1,2,3,4,5,6,7,8,9];let T;for(T=0;T<10;T+=1){const E=dg($,y,T);b[T]?b[T].p(E,C):(b[T]=hg(E),b[T].c(),b[T].m(r,null))}for(;T<10;T+=1)b[T].d(1)}const M={};C[0]&1073741832|C[1]&8&&(M.$$scope={dirty:C,ctx:$}),a.$set(M),$[1].isNew?v&&(Oe(),F(v,1,1,()=>{v=null}),Te()):v?(v.p($,C),C[0]&2&&A(v,1)):(v=mg($),v.c(),A(v,1),v.m(e,f)),$[1].isNew||$[4]?S?(S.p($,C),C[0]&18&&A(S,1)):(S=gg($),S.c(),A(S,1),S.m(e,null)):S&&(Oe(),F(S,1,1,()=>{S=null}),Te())},i($){c||(A(g),A(a.$$.fragment,$),A(v),A(S),c=!0)},o($){F(g),F(a.$$.fragment,$),F(v),F(S),c=!1},d($){$&&k(e),g&&g.d(),Bn(b,$),z(a),v&&v.d(),S&&S.d(),d=!1,h()}}}function xA(n){let e,t=n[1].isNew?"New admin":"Edit admin",i;return{c(){e=_("h4"),i=H(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New admin":"Edit admin")&&_e(i,t)},d(s){s&&k(e)}}}function _g(n){let e,t,i,s,l,r,o,a,u;return r=new ys({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[XA]},$$scope:{ctx:n}}}),{c(){e=_("button"),t=_("span"),i=O(),s=_("i"),l=O(),B(r.$$.fragment),o=O(),a=_("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){w(f,e,c),m(e,t),m(e,i),m(e,s),m(e,l),V(r,e,null),w(f,o,c),w(f,a,c),u=!0},p(f,c){const d={};c[1]&8&&(d.$$scope={dirty:c,ctx:f}),r.$set(d)},i(f){u||(A(r.$$.fragment,f),u=!0)},o(f){F(r.$$.fragment,f),u=!1},d(f){f&&k(e),z(r),f&&k(o),f&&k(a)}}}function XA(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i> 
-                        <span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[15]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function QA(n){let e,t,i,s,l,r,o=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&_g(n);return{c(){h&&h.c(),e=O(),t=_("button"),i=_("span"),i.textContent="Cancel",s=O(),l=_("button"),r=_("span"),a=H(o),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[6],p(r,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],Q(l,"btn-loading",n[6])},m(g,y){h&&h.m(g,y),w(g,e,y),w(g,t,y),m(t,i),w(g,s,y),w(g,l,y),m(l,r),m(r,a),f=!0,c||(d=X(t,"click",n[16]),c=!0)},p(g,y){g[1].isNew?h&&(Oe(),F(h,1,1,()=>{h=null}),Te()):h?(h.p(g,y),y[0]&2&&A(h,1)):(h=_g(g),h.c(),A(h,1),h.m(e.parentNode,e)),(!f||y[0]&64)&&(t.disabled=g[6]),(!f||y[0]&2)&&o!==(o=g[1].isNew?"Create":"Save changes")&&_e(a,o),(!f||y[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),y[0]&64&&Q(l,"btn-loading",g[6])},i(g){f||(A(h),f=!0)},o(g){F(h),f=!1},d(g){h&&h.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function eE(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[QA],header:[xA],default:[ZA]},$$scope:{ctx:n}};return e=new Di({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&1152&&(r.beforeHide=s[23]),l[0]&1886|l[1]&8&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[24](null),z(e,s)}}}function tE(n,e,t){let i;const s=_n(),l="admin_"+U.randomString(5);let r,o=new Us,a=!1,u=!1,f=0,c="",d="",h="",g=!1;function y(K){return v(K),t(7,u=!0),r==null?void 0:r.show()}function b(){return r==null?void 0:r.hide()}function v(K){Wi({}),t(1,o=K!=null&&K.clone?K.clone():new Us),S()}function S(){t(4,g=!1),t(3,c=(o==null?void 0:o.email)||""),t(2,f=(o==null?void 0:o.avatar)||0),t(8,d=""),t(9,h="")}function $(){if(a||!i)return;t(6,a=!0);const K={email:c,avatar:f};(o.isNew||g)&&(K.password=d,K.passwordConfirm=h);let Y;o.isNew?Y=we.Admins.create(K):Y=we.Admins.update(o.id,K),Y.then(async ne=>{var fe;t(7,u=!1),b(),mn(o.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",ne),((fe=we.AuthStore.model)==null?void 0:fe.id)===ne.id&&we.AuthStore.save(we.AuthStore.token,ne)}).catch(ne=>{we.errorResponseHandler(ne)}).finally(()=>{t(6,a=!1)})}function C(){!(o!=null&&o.id)||Ci("Do you really want to delete the selected admin?",()=>we.Admins.delete(o.id).then(()=>{t(7,u=!1),b(),mn("Successfully deleted admin."),s("delete",o)}).catch(K=>{we.errorResponseHandler(K)}))}const M=()=>C(),T=()=>b(),E=K=>t(2,f=K),D=(K,Y)=>{(Y.code==="Enter"||Y.code==="Space")&&(Y.preventDefault(),t(2,f=K))};function P(){c=this.value,t(3,c)}function L(){g=this.checked,t(4,g)}function N(){d=this.value,t(8,d)}function R(){h=this.value,t(9,h)}const J=()=>i&&u?(Ci("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function W(K){he[K?"unshift":"push"](()=>{r=K,t(5,r)})}function q(K){ut.call(this,n,K)}function G(K){ut.call(this,n,K)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=o.isNew&&c!=""||g||c!==o.email||f!==o.avatar)},[b,o,f,c,g,r,a,u,d,h,i,l,$,C,y,M,T,E,D,P,L,N,R,J,W,q,G]}class nE extends Fe{constructor(e){super(),Le(this,e,tE,eE,Ae,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function bg(n,e,t){const i=n.slice();return i[21]=e[t],i}function iE(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="id",p(t,"class",U.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function sE(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="email",p(t,"class",U.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function lE(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="created",p(t,"class",U.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function rE(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="updated",p(t,"class",U.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function yg(n){let e;function t(l,r){return l[5]?aE:oE}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function oE(n){var o;let e,t,i,s,l,r=((o=n[1])==null?void 0:o.length)&&vg(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No admins found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?r?r.p(a,u):(r=vg(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function aE(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td> 
-                        `},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function vg(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[15]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function kg(n){let e;return{c(){e=_("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function wg(n,e){let t,i,s,l,r,o,a,u,f,c,d,h,g=e[21].email+"",y,b,v,S,$,C,M,T,E,D,P,L,N,R;u=new No({props:{id:e[21].id}});let J=e[21].id===e[6].id&&kg();$=new $i({props:{date:e[21].created}}),T=new $i({props:{date:e[21].updated}});function W(){return e[13](e[21])}function q(...G){return e[14](e[21],...G)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("figure"),l=_("img"),o=O(),a=_("td"),B(u.$$.fragment),f=O(),J&&J.c(),c=O(),d=_("td"),h=_("span"),y=H(g),v=O(),S=_("td"),B($.$$.fragment),C=O(),M=_("td"),B(T.$$.fragment),E=O(),D=_("td"),D.innerHTML='<i class="ri-arrow-right-line"></i>',P=O(),ei(l.src,r="/_/images/avatars/avatar"+(e[21].avatar||0)+".svg")||p(l,"src",r),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(a,"class","col-type-text col-field-id"),p(h,"class","txt txt-ellipsis"),p(h,"title",b=e[21].email),p(d,"class","col-type-email col-field-email"),p(S,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(D,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(G,K){w(G,t,K),m(t,i),m(i,s),m(s,l),m(t,o),m(t,a),V(u,a,null),m(a,f),J&&J.m(a,null),m(t,c),m(t,d),m(d,h),m(h,y),m(t,v),m(t,S),V($,S,null),m(t,C),m(t,M),V(T,M,null),m(t,E),m(t,D),m(t,P),L=!0,N||(R=[X(t,"click",W),X(t,"keydown",q)],N=!0)},p(G,K){e=G,(!L||K&16&&!ei(l.src,r="/_/images/avatars/avatar"+(e[21].avatar||0)+".svg"))&&p(l,"src",r);const Y={};K&16&&(Y.id=e[21].id),u.$set(Y),e[21].id===e[6].id?J||(J=kg(),J.c(),J.m(a,null)):J&&(J.d(1),J=null),(!L||K&16)&&g!==(g=e[21].email+"")&&_e(y,g),(!L||K&16&&b!==(b=e[21].email))&&p(h,"title",b);const ne={};K&16&&(ne.date=e[21].created),$.$set(ne);const fe={};K&16&&(fe.date=e[21].updated),T.$set(fe)},i(G){L||(A(u.$$.fragment,G),A($.$$.fragment,G),A(T.$$.fragment,G),L=!0)},o(G){F(u.$$.fragment,G),F($.$$.fragment,G),F(T.$$.fragment,G),L=!1},d(G){G&&k(t),z(u),J&&J.d(),z($),z(T),N=!1,rt(R)}}}function Sg(n){let e,t,i=n[4].length+"",s,l,r=n[4].length+"",o;return{c(){e=_("small"),t=H("Showing "),s=H(i),l=H(" of "),o=H(r),p(e,"class","block txt-hint txt-right m-t-sm")},m(a,u){w(a,e,u),m(e,t),m(e,s),m(e,l),m(e,o)},p(a,u){u&16&&i!==(i=a[4].length+"")&&_e(s,i),u&16&&r!==(r=a[4].length+"")&&_e(o,r)},d(a){a&&k(e)}}}function uE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L,N,R,J,W,q,G,K,Y=[],ne=new Map,fe,ye,se,Z,De,te;e=new tl({}),c=new Ao({props:{value:n[1],placeholder:"Search filter, eg. email='test@example.com'",extraAutocompleteKeys:["email"]}}),c.$on("submit",n[8]);function be(ge){n[9](ge)}let ue={class:"col-type-text",name:"id",$$slots:{default:[iE]},$$scope:{ctx:n}};n[2]!==void 0&&(ue.sort=n[2]),$=new Qt({props:ue}),he.push(()=>Re($,"sort",be));function ie(ge){n[10](ge)}let ve={class:"col-type-email col-field-email",name:"email",$$slots:{default:[sE]},$$scope:{ctx:n}};n[2]!==void 0&&(ve.sort=n[2]),T=new Qt({props:ve}),he.push(()=>Re(T,"sort",ie));function He(ge){n[11](ge)}let Ie={class:"col-type-date col-field-created",name:"created",$$slots:{default:[lE]},$$scope:{ctx:n}};n[2]!==void 0&&(Ie.sort=n[2]),P=new Qt({props:Ie}),he.push(()=>Re(P,"sort",He));function qe(ge){n[12](ge)}let oe={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[rE]},$$scope:{ctx:n}};n[2]!==void 0&&(oe.sort=n[2]),R=new Qt({props:oe}),he.push(()=>Re(R,"sort",qe));let le=n[4];const ke=ge=>ge[21].id;for(let ge=0;ge<le.length;ge+=1){let Ee=bg(n,le,ge),x=ke(Ee);ne.set(x,Y[ge]=wg(x,Ee))}let Ve=null;le.length||(Ve=yg(n));let ze=n[4].length&&Sg(n),Ze={};return se=new nE({props:Ze}),n[16](se),se.$on("save",n[17]),se.$on("delete",n[18]),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),l=_("nav"),l.innerHTML=`<div class="breadcrumb-item">Settings</div> 
-            <div class="breadcrumb-item">Admins</div>`,r=O(),o=_("div"),a=O(),u=_("button"),u.innerHTML=`<i class="ri-add-line"></i> 
-            <span class="txt">New admin</span>`,f=O(),B(c.$$.fragment),d=O(),h=_("div"),g=_("table"),y=_("thead"),b=_("tr"),v=_("th"),S=O(),B($.$$.fragment),M=O(),B(T.$$.fragment),D=O(),B(P.$$.fragment),N=O(),B(R.$$.fragment),W=O(),q=_("th"),G=O(),K=_("tbody");for(let ge=0;ge<Y.length;ge+=1)Y[ge].c();Ve&&Ve.c(),fe=O(),ze&&ze.c(),ye=O(),B(se.$$.fragment),p(l,"class","breadcrumbs"),p(o,"class","flex-fill"),p(u,"type","button"),p(u,"class","btn btn-expanded"),p(s,"class","page-header"),p(v,"class","min-width"),p(q,"class","col-type-action min-width"),p(g,"class","table"),Q(g,"table-loading",n[5]),p(h,"class","table-wrapper"),p(i,"class","page-wrapper")},m(ge,Ee){V(e,ge,Ee),w(ge,t,Ee),w(ge,i,Ee),m(i,s),m(s,l),m(s,r),m(s,o),m(s,a),m(s,u),m(i,f),V(c,i,null),m(i,d),m(i,h),m(h,g),m(g,y),m(y,b),m(b,v),m(b,S),V($,b,null),m(b,M),V(T,b,null),m(b,D),V(P,b,null),m(b,N),V(R,b,null),m(b,W),m(b,q),m(g,G),m(g,K);for(let x=0;x<Y.length;x+=1)Y[x].m(K,null);Ve&&Ve.m(K,null),m(i,fe),ze&&ze.m(i,null),w(ge,ye,Ee),V(se,ge,Ee),Z=!0,De||(te=X(u,"click",n[7]),De=!0)},p(ge,[Ee]){const x={};Ee&2&&(x.value=ge[1]),c.$set(x);const ae={};Ee&16777216&&(ae.$$scope={dirty:Ee,ctx:ge}),!C&&Ee&4&&(C=!0,ae.sort=ge[2],je(()=>C=!1)),$.$set(ae);const Be={};Ee&16777216&&(Be.$$scope={dirty:Ee,ctx:ge}),!E&&Ee&4&&(E=!0,Be.sort=ge[2],je(()=>E=!1)),T.$set(Be);const vt={};Ee&16777216&&(vt.$$scope={dirty:Ee,ctx:ge}),!L&&Ee&4&&(L=!0,vt.sort=ge[2],je(()=>L=!1)),P.$set(vt);const it={};Ee&16777216&&(it.$$scope={dirty:Ee,ctx:ge}),!J&&Ee&4&&(J=!0,it.sort=ge[2],je(()=>J=!1)),R.$set(it),Ee&122&&(le=ge[4],Oe(),Y=ot(Y,Ee,ke,1,ge,le,ne,K,Lt,wg,null,bg),Te(),!le.length&&Ve?Ve.p(ge,Ee):le.length?Ve&&(Ve.d(1),Ve=null):(Ve=yg(ge),Ve.c(),Ve.m(K,null))),Ee&32&&Q(g,"table-loading",ge[5]),ge[4].length?ze?ze.p(ge,Ee):(ze=Sg(ge),ze.c(),ze.m(i,null)):ze&&(ze.d(1),ze=null);const gt={};se.$set(gt)},i(ge){if(!Z){A(e.$$.fragment,ge),A(c.$$.fragment,ge),A($.$$.fragment,ge),A(T.$$.fragment,ge),A(P.$$.fragment,ge),A(R.$$.fragment,ge);for(let Ee=0;Ee<le.length;Ee+=1)A(Y[Ee]);A(se.$$.fragment,ge),Z=!0}},o(ge){F(e.$$.fragment,ge),F(c.$$.fragment,ge),F($.$$.fragment,ge),F(T.$$.fragment,ge),F(P.$$.fragment,ge),F(R.$$.fragment,ge);for(let Ee=0;Ee<Y.length;Ee+=1)F(Y[Ee]);F(se.$$.fragment,ge),Z=!1},d(ge){z(e,ge),ge&&k(t),ge&&k(i),z(c),z($),z(T),z(P),z(R);for(let Ee=0;Ee<Y.length;Ee+=1)Y[Ee].d();Ve&&Ve.d(),ze&&ze.d(),ge&&k(ye),n[16](null),z(se,ge),De=!1,te()}}}function fE(n,e,t){var D;let i;hn(n,Vu,P=>t(6,i=P));const s=U.getQueryParams((D=window.location)==null?void 0:D.href);let l,r=[],o=!1,a=s.filter||"",u=s.sort||"-created";U.setDocumentTitle("Admins");function f(){return t(5,o=!0),t(4,r=[]),we.Admins.getFullList(100,{sort:u||"-created",filter:a}).then(P=>{t(4,r=P),t(5,o=!1)}).catch(P=>{P!==null&&(t(5,o=!1),console.warn(P),c(),we.errorResponseHandler(P,!1))})}function c(){t(4,r=[])}const d=()=>l==null?void 0:l.show(),h=P=>t(1,a=P.detail);function g(P){u=P,t(2,u)}function y(P){u=P,t(2,u)}function b(P){u=P,t(2,u)}function v(P){u=P,t(2,u)}const S=P=>l==null?void 0:l.show(P),$=(P,L)=>{(L.code==="Enter"||L.code==="Space")&&(L.preventDefault(),l==null||l.show(P))},C=()=>t(1,a="");function M(P){he[P?"unshift":"push"](()=>{l=P,t(3,l)})}const T=()=>f(),E=()=>f();return n.$$.update=()=>{n.$$.dirty&6&&u!==-1&&a!==-1&&(U.replaceClientQueryParams({filter:a,sort:u}),f())},[f,a,u,l,r,o,i,d,h,g,y,b,v,S,$,C,M,T,E]}class cE extends Fe{constructor(e){super(),Le(this,e,fE,uE,Ae,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function dE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Email"),s=O(),l=_("input"),p(e,"for",i=n[7]),p(l,"type","email"),p(l,"id",r=n[7]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0]),l.focus(),o||(a=X(l,"input",n[4]),o=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&r!==(r=u[7])&&p(l,"id",r),f&1&&l.value!==u[0]&&$e(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function pE(n){let e,t,i,s,l,r,o,a,u,f,c;return{c(){e=_("label"),t=H("Password"),s=O(),l=_("input"),o=O(),a=_("div"),u=_("a"),u.textContent="Forgotten password?",p(e,"for",i=n[7]),p(l,"type","password"),p(l,"id",r=n[7]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,h){w(d,e,h),m(e,t),w(d,s,h),w(d,l,h),$e(l,n[1]),w(d,o,h),w(d,a,h),m(a,u),f||(c=[X(l,"input",n[5]),Xe(Mn.call(null,u))],f=!0)},p(d,h){h&128&&i!==(i=d[7])&&p(e,"for",i),h&128&&r!==(r=d[7])&&p(l,"id",r),h&2&&l.value!==d[1]&&$e(l,d[1])},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(o),d&&k(a),f=!1,rt(c)}}}function hE(n){let e,t,i,s,l,r,o,a,u,f,c;return s=new Ne({props:{class:"form-field required",name:"email",$$slots:{default:[dE,({uniqueId:d})=>({7:d}),({uniqueId:d})=>d?128:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"password",$$slots:{default:[pE,({uniqueId:d})=>({7:d}),({uniqueId:d})=>d?128:0]},$$scope:{ctx:n}}}),{c(){e=_("form"),t=_("div"),t.innerHTML="<h4>Admin sign in</h4>",i=O(),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),a=_("button"),a.innerHTML=`<span class="txt">Login</span> 
-            <i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),Q(a,"btn-disabled",n[2]),Q(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){w(d,e,h),m(e,t),m(e,i),V(s,e,null),m(e,l),V(r,e,null),m(e,o),m(e,a),u=!0,f||(c=X(e,"submit",Kt(n[3])),f=!0)},p(d,h){const g={};h&385&&(g.$$scope={dirty:h,ctx:d}),s.$set(g);const y={};h&386&&(y.$$scope={dirty:h,ctx:d}),r.$set(y),h&4&&Q(a,"btn-disabled",d[2]),h&4&&Q(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(r.$$.fragment,d),u=!0)},o(d){F(s.$$.fragment,d),F(r.$$.fragment,d),u=!1},d(d){d&&k(e),z(s),z(r),f=!1,c()}}}function mE(n){let e,t;return e=new P0({props:{$$slots:{default:[hE]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&263&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function gE(n,e,t){var f;const i=U.getQueryParams((f=window.location)==null?void 0:f.href);let s=i.demoEmail||"",l=i.demoPassword||"",r=!1;function o(){if(!r)return t(2,r=!0),we.Admins.authViaEmail(s,l).then(()=>{Gs("/")}).catch(()=>{O0("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function a(){s=this.value,t(0,s)}function u(){l=this.value,t(1,l)}return[s,l,r,o,a,u]}class _E extends Fe{constructor(e){super(),Le(this,e,gE,mE,Ae,{})}}function bE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S;return i=new Ne({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[vE,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[kE,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),a=new Ne({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[wE,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),B(a.$$.fragment),u=O(),f=_("div"),c=_("div"),d=O(),h=_("button"),g=_("span"),g.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(c,"class","flex-fill"),p(g,"class","txt"),p(h,"type","submit"),p(h,"class","btn btn-expanded"),h.disabled=y=!n[3]||n[2],Q(h,"btn-loading",n[2]),p(f,"class","col-lg-12 flex"),p(e,"class","grid")},m($,C){w($,e,C),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),V(a,e,null),m(e,u),m(e,f),m(f,c),m(f,d),m(f,h),m(h,g),b=!0,v||(S=X(h,"click",n[9]),v=!0)},p($,C){const M={};C&12289&&(M.$$scope={dirty:C,ctx:$}),i.$set(M);const T={};C&12289&&(T.$$scope={dirty:C,ctx:$}),r.$set(T);const E={};C&12289&&(E.$$scope={dirty:C,ctx:$}),a.$set(E),(!b||C&12&&y!==(y=!$[3]||$[2]))&&(h.disabled=y),C&4&&Q(h,"btn-loading",$[2])},i($){b||(A(i.$$.fragment,$),A(r.$$.fragment,$),A(a.$$.fragment,$),b=!0)},o($){F(i.$$.fragment,$),F(r.$$.fragment,$),F(a.$$.fragment,$),b=!1},d($){$&&k(e),z(i),z(r),z(a),v=!1,S()}}}function yE(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function vE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Application name"),s=O(),l=_("input"),p(e,"for",i=n[12]),p(l,"type","text"),p(l,"id",r=n[12]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.appName),o||(a=X(l,"input",n[6]),o=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&r!==(r=u[12])&&p(l,"id",r),f&1&&l.value!==u[0].meta.appName&&$e(l,u[0].meta.appName)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function kE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Application url"),s=O(),l=_("input"),p(e,"for",i=n[12]),p(l,"type","text"),p(l,"id",r=n[12]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.appUrl),o||(a=X(l,"input",n[7]),o=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&r!==(r=u[12])&&p(l,"id",r),f&1&&l.value!==u[0].meta.appUrl&&$e(l,u[0].meta.appUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function wE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Logs max days retention"),s=O(),l=_("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",r=n[12]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].logs.maxDays),o||(a=X(l,"input",n[8]),o=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&r!==(r=u[12])&&p(l,"id",r),f&1&&Tt(l.value)!==u[0].logs.maxDays&&$e(l,u[0].logs.maxDays)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function SE(n){let e,t,i,s,l,r,o,a,u,f,c,d;e=new tl({});const h=[yE,bE],g=[];function y(b,v){return b[1]?0:1}return a=y(n),u=g[a]=h[a](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div> 
-            <div class="breadcrumb-item">Application</div></nav>`,l=O(),r=_("div"),o=_("form"),u.c(),p(s,"class","page-header"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(b,v){V(e,b,v),w(b,t,v),w(b,i,v),m(i,s),m(i,l),m(i,r),m(r,o),g[a].m(o,null),f=!0,c||(d=X(o,"submit",Kt(n[4])),c=!0)},p(b,[v]){let S=a;a=y(b),a===S?g[a].p(b,v):(Oe(),F(g[S],1,1,()=>{g[S]=null}),Te(),u=g[a],u?u.p(b,v):(u=g[a]=h[a](b),u.c()),A(u,1),u.m(o,null))},i(b){f||(A(e.$$.fragment,b),A(u),f=!0)},o(b){F(e.$$.fragment,b),F(u),f=!1},d(b){z(e,b),b&&k(t),b&&k(i),g[a].d(),c=!1,d()}}}function $E(n,e,t){let i,s={},l=!1,r=!1,o="";U.setDocumentTitle("Application settings"),a();async function a(){t(1,l=!0);try{const y=await we.Settings.getAll()||{};f(y)}catch(y){we.errorResponseHandler(y)}t(1,l=!1)}async function u(){if(!(r||!i)){t(2,r=!0);try{const y=await we.Settings.update(U.filterRedactedProps(s));f(y),mn("Successfully saved application settings.")}catch(y){we.errorResponseHandler(y)}t(2,r=!1)}}function f(y={}){t(0,s={meta:(y==null?void 0:y.meta)||{},logs:(y==null?void 0:y.logs)||{}}),t(5,o=JSON.stringify(s))}function c(){s.meta.appName=this.value,t(0,s)}function d(){s.meta.appUrl=this.value,t(0,s)}function h(){s.logs.maxDays=Tt(this.value),t(0,s)}const g=()=>u();return n.$$.update=()=>{n.$$.dirty&33&&t(3,i=o!=JSON.stringify(s))},[s,l,r,i,u,o,c,d,h,g]}class CE extends Fe{constructor(e){super(),Le(this,e,$E,SE,Ae,{})}}function ME(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let r=0;r<s.length;r+=1)l=ct(l,s[r]);return{c(){e=_("input"),ci(e,l)},m(r,o){w(r,e,o),e.autofocus&&e.focus(),n[7](e),$e(e,n[0]),t||(i=X(e,"input",n[8]),t=!0)},p(r,o){ci(e,l=bn(s,[{type:"password"},{autocomplete:"new-password"},o&32&&r[5]])),o&1&&e.value!==r[0]&&$e(e,r[0])},d(r){r&&k(e),n[7](null),t=!1,i()}}}function OE(n){let e,t,i,s,l,r,o=[{readOnly:!0},{type:"text"},{placeholder:n[1]},n[5]],a={};for(let u=0;u<o.length;u+=1)a=ct(a,o[u]);return{c(){e=_("div"),t=_("button"),t.innerHTML='<i class="ri-key-line"></i>',i=O(),s=_("input"),p(t,"type","button"),p(t,"class","btn btn-secondary btn-circle"),p(e,"class","form-field-addon"),ci(s,a)},m(u,f){w(u,e,f),m(e,t),w(u,i,f),w(u,s,f),s.autofocus&&s.focus(),l||(r=[Xe(St.call(null,t,{position:"left",text:"Set new value"})),X(t,"click",n[6])],l=!0)},p(u,f){ci(s,a=bn(o,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&k(e),u&&k(i),u&&k(s),l=!1,rt(r)}}}function TE(n){let e;function t(l,r){return l[3]?OE:ME}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function DE(n,e,t){const i=["value","mask"];let s=Yt(e,i),{value:l=""}=e,{mask:r="******"}=e,o,a=!1;async function u(){t(0,l=""),t(3,a=!1),await Mi(),o==null||o.focus()}const f=()=>u();function c(h){he[h?"unshift":"push"](()=>{o=h,t(2,o)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=ct(ct({},e),di(h)),t(5,s=Yt(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,r=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===r&&t(3,a=!0)},[l,r,o,a,u,s,f,c,d]}class mf extends Fe{constructor(e){super(),Le(this,e,DE,TE,Ae,{value:0,mask:1})}}function AE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L,N,R,J;i=new Ne({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[PE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[LE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}}),a=new Ne({props:{class:"form-field required",name:"meta.userVerificationUrl",$$slots:{default:[FE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}}),f=new Ne({props:{class:"form-field required",name:"meta.userResetPasswordUrl",$$slots:{default:[IE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field required",name:"meta.userConfirmEmailChangeUrl",$$slots:{default:[NE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}}),S=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[RE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}});let W=n[0].smtp.enabled&&$g(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),B(a.$$.fragment),u=O(),B(f.$$.fragment),c=O(),B(d.$$.fragment),h=O(),g=_("hr"),y=O(),b=_("div"),b.innerHTML=`<p>By default PocketBase uses the OS <code>sendmail</code> command for sending emails.
-                        <br/> 
-                        <strong class="txt-bold">For better emails deliverability it is recommended to enable the SMTP settings
-                            below.</strong></p>`,v=O(),B(S.$$.fragment),$=O(),W&&W.c(),C=O(),M=_("div"),T=_("div"),E=O(),D=_("button"),P=_("span"),P.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid"),p(b,"class","content m-b-sm"),p(T,"class","flex-fill"),p(P,"class","txt"),p(D,"type","submit"),p(D,"class","btn btn-expanded"),D.disabled=L=!n[3]||n[2],Q(D,"btn-loading",n[2]),p(M,"class","flex")},m(q,G){w(q,e,G),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),V(a,e,null),m(e,u),V(f,e,null),m(e,c),V(d,e,null),w(q,h,G),w(q,g,G),w(q,y,G),w(q,b,G),w(q,v,G),V(S,q,G),w(q,$,G),W&&W.m(q,G),w(q,C,G),w(q,M,G),m(M,T),m(M,E),m(M,D),m(D,P),N=!0,R||(J=X(D,"click",n[18]),R=!0)},p(q,G){const K={};G&12582913&&(K.$$scope={dirty:G,ctx:q}),i.$set(K);const Y={};G&12582913&&(Y.$$scope={dirty:G,ctx:q}),r.$set(Y);const ne={};G&12582913&&(ne.$$scope={dirty:G,ctx:q}),a.$set(ne);const fe={};G&12582913&&(fe.$$scope={dirty:G,ctx:q}),f.$set(fe);const ye={};G&12582913&&(ye.$$scope={dirty:G,ctx:q}),d.$set(ye);const se={};G&12582913&&(se.$$scope={dirty:G,ctx:q}),S.$set(se),q[0].smtp.enabled?W?(W.p(q,G),G&1&&A(W,1)):(W=$g(q),W.c(),A(W,1),W.m(C.parentNode,C)):W&&(Oe(),F(W,1,1,()=>{W=null}),Te()),(!N||G&12&&L!==(L=!q[3]||q[2]))&&(D.disabled=L),G&4&&Q(D,"btn-loading",q[2])},i(q){N||(A(i.$$.fragment,q),A(r.$$.fragment,q),A(a.$$.fragment,q),A(f.$$.fragment,q),A(d.$$.fragment,q),A(S.$$.fragment,q),A(W),N=!0)},o(q){F(i.$$.fragment,q),F(r.$$.fragment,q),F(a.$$.fragment,q),F(f.$$.fragment,q),F(d.$$.fragment,q),F(S.$$.fragment,q),F(W),N=!1},d(q){q&&k(e),z(i),z(r),z(a),z(f),z(d),q&&k(h),q&&k(g),q&&k(y),q&&k(b),q&&k(v),z(S,q),q&&k($),W&&W.d(q),q&&k(C),q&&k(M),R=!1,J()}}}function EE(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function PE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Sender name"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.senderName),o||(a=X(l,"input",n[7]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].meta.senderName&&$e(l,u[0].meta.senderName)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function LE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Sender address"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","email"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.senderAddress),o||(a=X(l,"input",n[8]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].meta.senderAddress&&$e(l,u[0].meta.senderAddress)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function FE(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=H("User verification page url"),s=O(),l=_("input"),o=O(),a=_("div"),a.innerHTML=`Used in the user verification email. Available placeholder parameters:
-                            <code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].meta.userVerificationUrl),w(c,o,d),w(c,a,d),u||(f=X(l,"input",n[9]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&r!==(r=c[22])&&p(l,"id",r),d&1&&l.value!==c[0].meta.userVerificationUrl&&$e(l,c[0].meta.userVerificationUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function IE(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=H("User reset password page url"),s=O(),l=_("input"),o=O(),a=_("div"),a.innerHTML=`Used in the user password reset email. Available placeholder parameters:
-                            <code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].meta.userResetPasswordUrl),w(c,o,d),w(c,a,d),u||(f=X(l,"input",n[10]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&r!==(r=c[22])&&p(l,"id",r),d&1&&l.value!==c[0].meta.userResetPasswordUrl&&$e(l,c[0].meta.userResetPasswordUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function NE(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=H("User confirm email change page url"),s=O(),l=_("input"),o=O(),a=_("div"),a.innerHTML=`Used in the user email change confirmation email. Available placeholder
-                            parameters:
-                            <code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].meta.userConfirmEmailChangeUrl),w(c,o,d),w(c,a,d),u||(f=X(l,"input",n[11]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&r!==(r=c[22])&&p(l,"id",r),d&1&&l.value!==c[0].meta.userConfirmEmailChangeUrl&&$e(l,c[0].meta.userConfirmEmailChangeUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function RE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Use SMTP mail server"),p(e,"type","checkbox"),p(e,"id",t=n[22]),e.required=!0,p(s,"for",r=n[22])},m(u,f){w(u,e,f),e.checked=n[0].smtp.enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[12]),o=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].smtp.enabled),f&4194304&&r!==(r=u[22])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function $g(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$;return i=new Ne({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[jE,({uniqueId:C})=>({22:C}),({uniqueId:C})=>C?4194304:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[HE,({uniqueId:C})=>({22:C}),({uniqueId:C})=>C?4194304:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[qE,({uniqueId:C})=>({22:C}),({uniqueId:C})=>C?4194304:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field",name:"smtp.username",$$slots:{default:[VE,({uniqueId:C})=>({22:C}),({uniqueId:C})=>C?4194304:0]},$$scope:{ctx:n}}}),y=new Ne({props:{class:"form-field",name:"smtp.password",$$slots:{default:[zE,({uniqueId:C})=>({22:C}),({uniqueId:C})=>C?4194304:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),f=O(),c=_("div"),B(d.$$.fragment),h=O(),g=_("div"),B(y.$$.fragment),b=O(),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(g,"class","col-lg-6"),p(v,"class","col-lg-12"),p(e,"class","grid")},m(C,M){w(C,e,M),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),m(e,h),m(e,g),V(y,g,null),m(e,b),m(e,v),$=!0},p(C,M){const T={};M&12582913&&(T.$$scope={dirty:M,ctx:C}),i.$set(T);const E={};M&12582913&&(E.$$scope={dirty:M,ctx:C}),r.$set(E);const D={};M&12582913&&(D.$$scope={dirty:M,ctx:C}),u.$set(D);const P={};M&12582913&&(P.$$scope={dirty:M,ctx:C}),d.$set(P);const L={};M&12582913&&(L.$$scope={dirty:M,ctx:C}),y.$set(L)},i(C){$||(A(i.$$.fragment,C),A(r.$$.fragment,C),A(u.$$.fragment,C),A(d.$$.fragment,C),A(y.$$.fragment,C),C&&Dt(()=>{S||(S=ft(e,un,{duration:150},!0)),S.run(1)}),$=!0)},o(C){F(i.$$.fragment,C),F(r.$$.fragment,C),F(u.$$.fragment,C),F(d.$$.fragment,C),F(y.$$.fragment,C),C&&(S||(S=ft(e,un,{duration:150},!1)),S.run(0)),$=!1},d(C){C&&k(e),z(i),z(r),z(u),z(d),z(y),C&&S&&S.end()}}}function jE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("SMTP server host"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].smtp.host),o||(a=X(l,"input",n[13]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].smtp.host&&$e(l,u[0].smtp.host)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function HE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Port"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","number"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].smtp.port),o||(a=X(l,"input",n[14]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&Tt(l.value)!==u[0].smtp.port&&$e(l,u[0].smtp.port)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function qE(n){let e,t,i,s,l,r,o;function a(f){n[15](f)}let u={id:n[22],items:n[4]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new vs({props:u}),he.push(()=>Re(l,"keyOfSelected",a)),{c(){e=_("label"),t=H("TLS Encryption"),s=O(),B(l.$$.fragment),p(e,"for",i=n[22])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&4194304&&i!==(i=f[22]))&&p(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!r&&c&1&&(r=!0,d.keyOfSelected=f[0].smtp.tls,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function VE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Username"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].smtp.username),o||(a=X(l,"input",n[16]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].smtp.username&&$e(l,u[0].smtp.username)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function zE(n){let e,t,i,s,l,r,o;function a(f){n[17](f)}let u={id:n[22]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new mf({props:u}),he.push(()=>Re(l,"value",a)),{c(){e=_("label"),t=H("Password"),s=O(),B(l.$$.fragment),p(e,"for",i=n[22])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&4194304&&i!==(i=f[22]))&&p(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!r&&c&1&&(r=!0,d.value=f[0].smtp.password,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function BE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;e=new tl({});const y=[EE,AE],b=[];function v(S,$){return S[1]?0:1}return f=v(n),c=b[f]=y[f](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div> 
-            <div class="breadcrumb-item">Mail settings</div></nav>`,l=O(),r=_("div"),o=_("form"),a=_("div"),a.innerHTML="<p>Configure common settings for sending emails.</p>",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content txt-xl m-b-base"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,$){V(e,S,$),w(S,t,$),w(S,i,$),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=X(o,"submit",Kt(n[19])),h=!0)},p(S,[$]){let C=f;f=v(S),f===C?b[f].p(S,$):(Oe(),F(b[C],1,1,()=>{b[C]=null}),Te(),c=b[f],c?c.p(S,$):(c=b[f]=y[f](S),c.c()),A(c,1),c.m(o,null))},i(S){d||(A(e.$$.fragment,S),A(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function UE(n,e,t){let i;const s=[{label:"Optional (StartTLS)",value:!1},{label:"Always",value:!0}];let l={},r=!1,o=!1,a="";U.setDocumentTitle("Mail settings"),u();async function u(){t(1,r=!0);try{const P=await we.Settings.getAll()||{};c(P)}catch(P){we.errorResponseHandler(P)}t(1,r=!1)}async function f(){if(!(o||!i)){t(2,o=!0);try{const P=await we.Settings.update(U.filterRedactedProps(l));c(P),mn("Successfully saved mail settings.")}catch(P){we.errorResponseHandler(P)}t(2,o=!1)}}function c(P={}){t(0,l={meta:(P==null?void 0:P.meta)||{},smtp:(P==null?void 0:P.smtp)||{}}),t(6,a=JSON.stringify(l))}function d(){l.meta.senderName=this.value,t(0,l)}function h(){l.meta.senderAddress=this.value,t(0,l)}function g(){l.meta.userVerificationUrl=this.value,t(0,l)}function y(){l.meta.userResetPasswordUrl=this.value,t(0,l)}function b(){l.meta.userConfirmEmailChangeUrl=this.value,t(0,l)}function v(){l.smtp.enabled=this.checked,t(0,l)}function S(){l.smtp.host=this.value,t(0,l)}function $(){l.smtp.port=Tt(this.value),t(0,l)}function C(P){n.$$.not_equal(l.smtp.tls,P)&&(l.smtp.tls=P,t(0,l))}function M(){l.smtp.username=this.value,t(0,l)}function T(P){n.$$.not_equal(l.smtp.password,P)&&(l.smtp.password=P,t(0,l))}const E=()=>f(),D=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(3,i=a!=JSON.stringify(l))},[l,r,o,i,s,f,a,d,h,g,y,b,v,S,$,C,M,T,E,D]}class WE extends Fe{constructor(e){super(),Le(this,e,UE,BE,Ae,{})}}function YE(n){let e,t,i,s,l,r,o,a,u,f,c,d;e=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[JE,({uniqueId:g})=>({15:g}),({uniqueId:g})=>g?32768:0]},$$scope:{ctx:n}}});let h=n[0].enabled&&Cg(n);return{c(){B(e.$$.fragment),t=O(),h&&h.c(),i=O(),s=_("div"),l=_("div"),r=O(),o=_("button"),a=_("span"),a.textContent="Save changes",p(l,"class","flex-fill"),p(a,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-expanded"),o.disabled=u=!n[3]||n[2],Q(o,"btn-loading",n[2]),p(s,"class","flex")},m(g,y){V(e,g,y),w(g,t,y),h&&h.m(g,y),w(g,i,y),w(g,s,y),m(s,l),m(s,r),m(s,o),m(o,a),f=!0,c||(d=X(o,"click",n[12]),c=!0)},p(g,y){const b={};y&98305&&(b.$$scope={dirty:y,ctx:g}),e.$set(b),g[0].enabled?h?(h.p(g,y),y&1&&A(h,1)):(h=Cg(g),h.c(),A(h,1),h.m(i.parentNode,i)):h&&(Oe(),F(h,1,1,()=>{h=null}),Te()),(!f||y&12&&u!==(u=!g[3]||g[2]))&&(o.disabled=u),y&4&&Q(o,"btn-loading",g[2])},i(g){f||(A(e.$$.fragment,g),A(h),f=!0)},o(g){F(e.$$.fragment,g),F(h),f=!1},d(g){z(e,g),g&&k(t),h&&h.d(g),g&&k(i),g&&k(s),c=!1,d()}}}function KE(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function JE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[15]),e.required=!0,p(s,"for",r=n[15])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[6]),o=!0)},p(u,f){f&32768&&t!==(t=u[15])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&32768&&r!==(r=u[15])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Cg(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$;return i=new Ne({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[GE,({uniqueId:C})=>({15:C}),({uniqueId:C})=>C?32768:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[ZE,({uniqueId:C})=>({15:C}),({uniqueId:C})=>C?32768:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field required",name:"s3.region",$$slots:{default:[xE,({uniqueId:C})=>({15:C}),({uniqueId:C})=>C?32768:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[XE,({uniqueId:C})=>({15:C}),({uniqueId:C})=>C?32768:0]},$$scope:{ctx:n}}}),y=new Ne({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[QE,({uniqueId:C})=>({15:C}),({uniqueId:C})=>C?32768:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),f=O(),c=_("div"),B(d.$$.fragment),h=O(),g=_("div"),B(y.$$.fragment),b=O(),v=_("div"),p(t,"class","col-lg-12"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(c,"class","col-lg-6"),p(g,"class","col-lg-6"),p(v,"class","col-lg-12"),p(e,"class","grid")},m(C,M){w(C,e,M),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),m(e,h),m(e,g),V(y,g,null),m(e,b),m(e,v),$=!0},p(C,M){const T={};M&98305&&(T.$$scope={dirty:M,ctx:C}),i.$set(T);const E={};M&98305&&(E.$$scope={dirty:M,ctx:C}),r.$set(E);const D={};M&98305&&(D.$$scope={dirty:M,ctx:C}),u.$set(D);const P={};M&98305&&(P.$$scope={dirty:M,ctx:C}),d.$set(P);const L={};M&98305&&(L.$$scope={dirty:M,ctx:C}),y.$set(L)},i(C){$||(A(i.$$.fragment,C),A(r.$$.fragment,C),A(u.$$.fragment,C),A(d.$$.fragment,C),A(y.$$.fragment,C),C&&Dt(()=>{S||(S=ft(e,un,{duration:150},!0)),S.run(1)}),$=!0)},o(C){F(i.$$.fragment,C),F(r.$$.fragment,C),F(u.$$.fragment,C),F(d.$$.fragment,C),F(y.$$.fragment,C),C&&(S||(S=ft(e,un,{duration:150},!1)),S.run(0)),$=!1},d(C){C&&k(e),z(i),z(r),z(u),z(d),z(y),C&&S&&S.end()}}}function GE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Endpoint"),s=O(),l=_("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",r=n[15]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].endpoint),o||(a=X(l,"input",n[7]),o=!0)},p(u,f){f&32768&&i!==(i=u[15])&&p(e,"for",i),f&32768&&r!==(r=u[15])&&p(l,"id",r),f&1&&l.value!==u[0].endpoint&&$e(l,u[0].endpoint)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function ZE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Bucket"),s=O(),l=_("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",r=n[15]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].bucket),o||(a=X(l,"input",n[8]),o=!0)},p(u,f){f&32768&&i!==(i=u[15])&&p(e,"for",i),f&32768&&r!==(r=u[15])&&p(l,"id",r),f&1&&l.value!==u[0].bucket&&$e(l,u[0].bucket)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function xE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Region"),s=O(),l=_("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",r=n[15]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].region),o||(a=X(l,"input",n[9]),o=!0)},p(u,f){f&32768&&i!==(i=u[15])&&p(e,"for",i),f&32768&&r!==(r=u[15])&&p(l,"id",r),f&1&&l.value!==u[0].region&&$e(l,u[0].region)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function XE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Access key"),s=O(),l=_("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",r=n[15]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].accessKey),o||(a=X(l,"input",n[10]),o=!0)},p(u,f){f&32768&&i!==(i=u[15])&&p(e,"for",i),f&32768&&r!==(r=u[15])&&p(l,"id",r),f&1&&l.value!==u[0].accessKey&&$e(l,u[0].accessKey)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function QE(n){let e,t,i,s,l,r,o;function a(f){n[11](f)}let u={id:n[15],required:!0};return n[0].secret!==void 0&&(u.value=n[0].secret),l=new mf({props:u}),he.push(()=>Re(l,"value",a)),{c(){e=_("label"),t=H("Secret"),s=O(),B(l.$$.fragment),p(e,"for",i=n[15])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&32768&&i!==(i=f[15]))&&p(e,"for",i);const d={};c&32768&&(d.id=f[15]),!r&&c&1&&(r=!0,d.value=f[0].secret,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function eP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;e=new tl({});const y=[KE,YE],b=[];function v(S,$){return S[1]?0:1}return f=v(n),c=b[f]=y[f](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div> 
-            <div class="breadcrumb-item">Files storage</div></nav>`,l=O(),r=_("div"),o=_("form"),a=_("div"),a.innerHTML=`<p>By default PocketBase uses the local file system to store uploaded files.</p> 
-                <p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content txt-xl m-b-base"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,$){V(e,S,$),w(S,t,$),w(S,i,$),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=X(o,"submit",Kt(n[4])),h=!0)},p(S,[$]){let C=f;f=v(S),f===C?b[f].p(S,$):(Oe(),F(b[C],1,1,()=>{b[C]=null}),Te(),c=b[f],c?c.p(S,$):(c=b[f]=y[f](S),c.c()),A(c,1),c.m(o,null))},i(S){d||(A(e.$$.fragment,S),A(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function tP(n,e,t){let i,s={},l=!1,r=!1,o="";U.setDocumentTitle("Files storage"),a();async function a(){t(1,l=!0);try{const S=await we.Settings.getAll()||{};f(S)}catch(S){we.errorResponseHandler(S)}t(1,l=!1)}async function u(){if(!(r||!i)){t(2,r=!0);try{const S=await we.Settings.update(U.filterRedactedProps({s3:s}));f(S),Wi({}),mn("Successfully saved Files storage settings.")}catch(S){we.errorResponseHandler(S)}t(2,r=!1)}}function f(S={}){t(0,s=(S==null?void 0:S.s3)||{}),t(5,o=JSON.stringify(s))}function c(){s.enabled=this.checked,t(0,s)}function d(){s.endpoint=this.value,t(0,s)}function h(){s.bucket=this.value,t(0,s)}function g(){s.region=this.value,t(0,s)}function y(){s.accessKey=this.value,t(0,s)}function b(S){n.$$.not_equal(s.secret,S)&&(s.secret=S,t(0,s))}const v=()=>u();return n.$$.update=()=>{n.$$.dirty&33&&t(3,i=o!=JSON.stringify(s))},[s,l,r,i,u,o,c,d,h,g,y,b,v]}class nP extends Fe{constructor(e){super(),Le(this,e,tP,eP,Ae,{})}}function iP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[16]),p(s,"for",r=n[16])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[8]),o=!0)},p(u,f){f&65536&&t!==(t=u[16])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&65536&&r!==(r=u[16])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Mg(n){let e,t,i,s,l,r,o,a,u,f,c;return i=new Ne({props:{class:"form-field required",name:"emailPassword.minPasswordLength",$$slots:{default:[sP,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field "+(U.isEmpty(n[0].onlyDomains)?"":"disabled"),name:"emailPassword.exceptDomains",$$slots:{default:[lP,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field "+(U.isEmpty(n[0].exceptDomains)?"":"disabled"),name:"emailPassword.onlyDomains",$$slots:{default:[rP,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),p(t,"class","col-sm-12 m-t-sm"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(e,"class","grid")},m(d,h){w(d,e,h),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),c=!0},p(d,h){const g={};h&196609&&(g.$$scope={dirty:h,ctx:d}),i.$set(g);const y={};h&1&&(y.class="form-field "+(U.isEmpty(d[0].onlyDomains)?"":"disabled")),h&196609&&(y.$$scope={dirty:h,ctx:d}),r.$set(y);const b={};h&1&&(b.class="form-field "+(U.isEmpty(d[0].exceptDomains)?"":"disabled")),h&196609&&(b.$$scope={dirty:h,ctx:d}),u.$set(b)},i(d){c||(A(i.$$.fragment,d),A(r.$$.fragment,d),A(u.$$.fragment,d),d&&Dt(()=>{f||(f=ft(e,un,{duration:150},!0)),f.run(1)}),c=!0)},o(d){F(i.$$.fragment,d),F(r.$$.fragment,d),F(u.$$.fragment,d),d&&(f||(f=ft(e,un,{duration:150},!1)),f.run(0)),c=!1},d(d){d&&k(e),z(i),z(r),z(u),d&&f&&f.end()}}}function sP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Minimum password length"),s=O(),l=_("input"),p(e,"for",i=n[16]),p(l,"type","number"),p(l,"id",r=n[16]),l.required=!0,p(l,"min","5"),p(l,"max","200")},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].minPasswordLength),o||(a=X(l,"input",n[9]),o=!0)},p(u,f){f&65536&&i!==(i=u[16])&&p(e,"for",i),f&65536&&r!==(r=u[16])&&p(l,"id",r),f&1&&Tt(l.value)!==u[0].minPasswordLength&&$e(l,u[0].minPasswordLength)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function lP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(b){n[10](b)}let y={id:n[16],disabled:!U.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(y.value=n[0].exceptDomains),o=new ks({props:y}),he.push(()=>Re(o,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Except domains",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[16]),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),w(b,r,v),V(o,b,v),w(b,u,v),w(b,f,v),c=!0,d||(h=Xe(St.call(null,s,{text:`Email domains that are NOT allowed to sign up. 
- This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,v){(!c||v&65536&&l!==(l=b[16]))&&p(e,"for",l);const S={};v&65536&&(S.id=b[16]),v&1&&(S.disabled=!U.isEmpty(b[0].onlyDomains)),!a&&v&1&&(a=!0,S.value=b[0].exceptDomains,je(()=>a=!1)),o.$set(S)},i(b){c||(A(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function rP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(b){n[11](b)}let y={id:n[16]+".config.onlyDomains",disabled:!U.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(y.value=n[0].onlyDomains),o=new ks({props:y}),he.push(()=>Re(o,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[16]+".config.onlyDomains"),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),w(b,r,v),V(o,b,v),w(b,u,v),w(b,f,v),c=!0,d||(h=Xe(St.call(null,s,{text:`Email domains that are ONLY allowed to sign up. 
- This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,v){(!c||v&65536&&l!==(l=b[16]+".config.onlyDomains"))&&p(e,"for",l);const S={};v&65536&&(S.id=b[16]+".config.onlyDomains"),v&1&&(S.disabled=!U.isEmpty(b[0].exceptDomains)),!a&&v&1&&(a=!0,S.value=b[0].onlyDomains,je(()=>a=!1)),o.$set(S)},i(b){c||(A(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function oP(n){let e,t,i,s;e=new Ne({props:{class:"form-field form-field-toggle m-b-0",name:"emailPassword.enabled",$$slots:{default:[iP,({uniqueId:r})=>({16:r}),({uniqueId:r})=>r?65536:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&Mg(n);return{c(){B(e.$$.fragment),t=O(),l&&l.c(),i=lt()},m(r,o){V(e,r,o),w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){const a={};o&196609&&(a.$$scope={dirty:o,ctx:r}),e.$set(a),r[0].enabled?l?(l.p(r,o),o&1&&A(l,1)):(l=Mg(r),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Oe(),F(l,1,1,()=>{l=null}),Te())},i(r){s||(A(e.$$.fragment,r),A(l),s=!0)},o(r){F(e.$$.fragment,r),F(l),s=!1},d(r){z(e,r),r&&k(t),l&&l.d(r),r&&k(i)}}}function aP(n){let e;return{c(){e=_("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function uP(n){let e;return{c(){e=_("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Og(n){let e,t,i,s,l,r;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=St.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){s||(Dt(()=>{i||(i=ft(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){i||(i=ft(e,Wn,{duration:150,start:.7},!1)),i.run(0),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function fP(n){let e,t,i,s,l,r,o;function a(d,h){return d[0].enabled?uP:aP}let u=a(n),f=u(n),c=n[2]&&Og();return{c(){e=_("div"),e.innerHTML=`<i class="ri-mail-lock-line"></i> 
-            <span class="txt">Email/Password</span>`,t=O(),f.c(),i=O(),s=_("div"),l=O(),c&&c.c(),r=lt(),p(e,"class","inline-flex"),p(s,"class","flex-fill")},m(d,h){w(d,e,h),w(d,t,h),f.m(d,h),w(d,i,h),w(d,s,h),w(d,l,h),c&&c.m(d,h),w(d,r,h),o=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(i.parentNode,i))),d[2]?c?h&4&&A(c,1):(c=Og(),c.c(),A(c,1),c.m(r.parentNode,r)):c&&(Oe(),F(c,1,1,()=>{c=null}),Te())},i(d){o||(A(c),o=!0)},o(d){F(c),o=!1},d(d){d&&k(e),d&&k(t),f.d(d),d&&k(i),d&&k(s),d&&k(l),c&&c.d(d),d&&k(r)}}}function cP(n){let e,t;const i=[n[3]];let s={$$slots:{header:[fP],default:[oP]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ct(s,i[l]);return e=new df({props:s}),n[12](e),e.$on("expand",n[13]),e.$on("collapse",n[14]),e.$on("toggle",n[15]),{c(){B(e.$$.fragment)},m(l,r){V(e,l,r),t=!0},p(l,[r]){const o=r&8?bn(i,[hi(l[3])]):{};r&131077&&(o.$$scope={dirty:r,ctx:l}),e.$set(o)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){F(e.$$.fragment,l),t=!1},d(l){n[12](null),z(e,l)}}}function dP(n,e,t){let i;const s=["config","expand","collapse","collapseSiblings"];let l=Yt(e,s),r;hn(n,_s,C=>t(7,r=C));let{config:o={}}=e,a;function u(){a==null||a.expand()}function f(){a==null||a.collapse()}function c(){a==null||a.collapseSiblings()}function d(){o.enabled=this.checked,t(0,o)}function h(){o.minPasswordLength=Tt(this.value),t(0,o)}function g(C){n.$$.not_equal(o.exceptDomains,C)&&(o.exceptDomains=C,t(0,o))}function y(C){n.$$.not_equal(o.onlyDomains,C)&&(o.onlyDomains=C,t(0,o))}function b(C){he[C?"unshift":"push"](()=>{a=C,t(1,a)})}function v(C){ut.call(this,n,C)}function S(C){ut.call(this,n,C)}function $(C){ut.call(this,n,C)}return n.$$set=C=>{e=ct(ct({},e),di(C)),t(3,l=Yt(e,s)),"config"in C&&t(0,o=C.config)},n.$$.update=()=>{n.$$.dirty&128&&t(2,i=!U.isEmpty(r==null?void 0:r.emailPassword))},[o,a,i,l,u,f,c,r,d,h,g,y,b,v,S,$]}class pP extends Fe{constructor(e){super(),Le(this,e,dP,cP,Ae,{config:0,expand:4,collapse:5,collapseSiblings:6})}get expand(){return this.$$.ctx[4]}get collapse(){return this.$$.ctx[5]}get collapseSiblings(){return this.$$.ctx[6]}}function hP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[22]),p(s,"for",r=n[22])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[11]),o=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&4194304&&r!==(r=u[22])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Tg(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;l=new Ne({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[mP,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),a=new Ne({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[gP,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),c=new Ne({props:{class:"form-field",name:n[1]+".allowRegistrations",$$slots:{default:[_P,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}});let y=n[4]&&Dg(n);return{c(){e=_("div"),t=_("div"),i=O(),s=_("div"),B(l.$$.fragment),r=O(),o=_("div"),B(a.$$.fragment),u=O(),f=_("div"),B(c.$$.fragment),d=O(),y&&y.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(o,"class","col-lg-6"),p(f,"class","col-lg-12"),p(e,"class","grid")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),V(l,s,null),m(e,r),m(e,o),V(a,o,null),m(e,u),m(e,f),V(c,f,null),m(e,d),y&&y.m(e,null),g=!0},p(b,v){const S={};v&2&&(S.name=b[1]+".clientId"),v&12582913&&(S.$$scope={dirty:v,ctx:b}),l.$set(S);const $={};v&2&&($.name=b[1]+".clientSecret"),v&12582913&&($.$$scope={dirty:v,ctx:b}),a.$set($);const C={};v&2&&(C.name=b[1]+".allowRegistrations"),v&12582913&&(C.$$scope={dirty:v,ctx:b}),c.$set(C),b[4]?y?(y.p(b,v),v&16&&A(y,1)):(y=Dg(b),y.c(),A(y,1),y.m(e,null)):y&&(Oe(),F(y,1,1,()=>{y=null}),Te())},i(b){g||(A(l.$$.fragment,b),A(a.$$.fragment,b),A(c.$$.fragment,b),A(y),b&&Dt(()=>{h||(h=ft(e,un,{duration:200},!0)),h.run(1)}),g=!0)},o(b){F(l.$$.fragment,b),F(a.$$.fragment,b),F(c.$$.fragment,b),F(y),b&&(h||(h=ft(e,un,{duration:200},!1)),h.run(0)),g=!1},d(b){b&&k(e),z(l),z(a),z(c),y&&y.d(),b&&h&&h.end()}}}function mP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Client ID"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].clientId),o||(a=X(l,"input",n[12]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].clientId&&$e(l,u[0].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function gP(n){let e,t,i,s,l,r,o;function a(f){n[13](f)}let u={id:n[22],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new mf({props:u}),he.push(()=>Re(l,"value",a)),{c(){e=_("label"),t=H("Client Secret"),s=O(),B(l.$$.fragment),p(e,"for",i=n[22])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&4194304&&i!==(i=f[22]))&&p(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!r&&c&1&&(r=!0,d.value=f[0].clientSecret,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function _P(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Allow registration for new users"),p(e,"type","checkbox"),p(e,"id",t=n[22]),p(s,"for",r=n[22])},m(u,f){w(u,e,f),e.checked=n[0].allowRegistrations,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[14]),o=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].allowRegistrations),f&4194304&&r!==(r=u[22])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Dg(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;return r=new Ne({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[bP,({uniqueId:g})=>({22:g}),({uniqueId:g})=>g?4194304:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[yP,({uniqueId:g})=>({22:g}),({uniqueId:g})=>g?4194304:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[vP,({uniqueId:g})=>({22:g}),({uniqueId:g})=>g?4194304:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),t.textContent="Optional endpoints (if you self host the OAUTH2 service)",i=O(),s=_("div"),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),f=O(),c=_("div"),B(d.$$.fragment),p(t,"class","section-title"),p(l,"class","col-lg-4"),p(a,"class","col-lg-4"),p(c,"class","col-lg-4"),p(s,"class","grid"),p(e,"class","col-lg-12")},m(g,y){w(g,e,y),m(e,t),m(e,i),m(e,s),m(s,l),V(r,l,null),m(s,o),m(s,a),V(u,a,null),m(s,f),m(s,c),V(d,c,null),h=!0},p(g,y){const b={};y&2&&(b.name=g[1]+".authUrl"),y&12582913&&(b.$$scope={dirty:y,ctx:g}),r.$set(b);const v={};y&2&&(v.name=g[1]+".tokenUrl"),y&12582913&&(v.$$scope={dirty:y,ctx:g}),u.$set(v);const S={};y&2&&(S.name=g[1]+".userApiUrl"),y&12582913&&(S.$$scope={dirty:y,ctx:g}),d.$set(S)},i(g){h||(A(r.$$.fragment,g),A(u.$$.fragment,g),A(d.$$.fragment,g),h=!0)},o(g){F(r.$$.fragment,g),F(u.$$.fragment,g),F(d.$$.fragment,g),h=!1},d(g){g&&k(e),z(r),z(u),z(d)}}}function bP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Custom Auth URL"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","url"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].authUrl),o||(a=X(l,"input",n[15]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&$e(l,u[0].authUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function yP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Custom Token URL"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].tokenUrl),o||(a=X(l,"input",n[16]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].tokenUrl&&$e(l,u[0].tokenUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function vP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Custom User API URL"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].userApiUrl),o||(a=X(l,"input",n[17]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].userApiUrl&&$e(l,u[0].userApiUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function kP(n){let e,t,i,s;e=new Ne({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[hP,({uniqueId:r})=>({22:r}),({uniqueId:r})=>r?4194304:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&Tg(n);return{c(){B(e.$$.fragment),t=O(),l&&l.c(),i=lt()},m(r,o){V(e,r,o),w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){const a={};o&2&&(a.name=r[1]+".enabled"),o&12582913&&(a.$$scope={dirty:o,ctx:r}),e.$set(a),r[0].enabled?l?(l.p(r,o),o&1&&A(l,1)):(l=Tg(r),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Oe(),F(l,1,1,()=>{l=null}),Te())},i(r){s||(A(e.$$.fragment,r),A(l),s=!0)},o(r){F(e.$$.fragment,r),F(l),s=!1},d(r){z(e,r),r&&k(t),l&&l.d(r),r&&k(i)}}}function Ag(n){let e;return{c(){e=_("i"),p(e,"class",n[3])},m(t,i){w(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&k(e)}}}function wP(n){let e;return{c(){e=_("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function SP(n){let e;return{c(){e=_("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Eg(n){let e,t,i,s,l,r;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=St.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){s||(Dt(()=>{i||(i=ft(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){i||(i=ft(e,Wn,{duration:150,start:.7},!1)),i.run(0),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function $P(n){let e,t,i,s,l,r,o,a,u,f,c=n[3]&&Ag(n);function d(b,v){return b[0].enabled?SP:wP}let h=d(n),g=h(n),y=n[6]&&Eg();return{c(){e=_("div"),c&&c.c(),t=O(),i=_("span"),s=H(n[2]),l=O(),g.c(),r=O(),o=_("div"),a=O(),y&&y.c(),u=lt(),p(i,"class","txt"),p(e,"class","inline-flex"),p(o,"class","flex-fill")},m(b,v){w(b,e,v),c&&c.m(e,null),m(e,t),m(e,i),m(i,s),w(b,l,v),g.m(b,v),w(b,r,v),w(b,o,v),w(b,a,v),y&&y.m(b,v),w(b,u,v),f=!0},p(b,v){b[3]?c?c.p(b,v):(c=Ag(b),c.c(),c.m(e,t)):c&&(c.d(1),c=null),(!f||v&4)&&_e(s,b[2]),h!==(h=d(b))&&(g.d(1),g=h(b),g&&(g.c(),g.m(r.parentNode,r))),b[6]?y?v&64&&A(y,1):(y=Eg(),y.c(),A(y,1),y.m(u.parentNode,u)):y&&(Oe(),F(y,1,1,()=>{y=null}),Te())},i(b){f||(A(y),f=!0)},o(b){F(y),f=!1},d(b){b&&k(e),c&&c.d(),b&&k(l),g.d(b),b&&k(r),b&&k(o),b&&k(a),y&&y.d(b),b&&k(u)}}}function CP(n){let e,t;const i=[n[7]];let s={$$slots:{header:[$P],default:[kP]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ct(s,i[l]);return e=new df({props:s}),n[18](e),e.$on("expand",n[19]),e.$on("collapse",n[20]),e.$on("toggle",n[21]),{c(){B(e.$$.fragment)},m(l,r){V(e,l,r),t=!0},p(l,[r]){const o=r&128?bn(i,[hi(l[7])]):{};r&8388703&&(o.$$scope={dirty:r,ctx:l}),e.$set(o)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){F(e.$$.fragment,l),t=!1},d(l){n[18](null),z(e,l)}}}function MP(n,e,t){let i;const s=["key","title","icon","config","showSelfHostedFields","expand","collapse"];let l=Yt(e,s),r;hn(n,_s,L=>t(10,r=L));let{key:o}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{showSelfHostedFields:c=!1}=e,d;function h(){d==null||d.expand()}function g(){d==null||d.collapse()}function y(){f.enabled=this.checked,t(0,f)}function b(){f.clientId=this.value,t(0,f)}function v(L){n.$$.not_equal(f.clientSecret,L)&&(f.clientSecret=L,t(0,f))}function S(){f.allowRegistrations=this.checked,t(0,f)}function $(){f.authUrl=this.value,t(0,f)}function C(){f.tokenUrl=this.value,t(0,f)}function M(){f.userApiUrl=this.value,t(0,f)}function T(L){he[L?"unshift":"push"](()=>{d=L,t(5,d)})}function E(L){ut.call(this,n,L)}function D(L){ut.call(this,n,L)}function P(L){ut.call(this,n,L)}return n.$$set=L=>{e=ct(ct({},e),di(L)),t(7,l=Yt(e,s)),"key"in L&&t(1,o=L.key),"title"in L&&t(2,a=L.title),"icon"in L&&t(3,u=L.icon),"config"in L&&t(0,f=L.config),"showSelfHostedFields"in L&&t(4,c=L.showSelfHostedFields)},n.$$.update=()=>{n.$$.dirty&1026&&t(6,i=!U.isEmpty(U.getNestedVal(r,o))),n.$$.dirty&3&&(f.enabled||E0(o))},[f,o,a,u,c,d,i,l,h,g,r,y,b,v,S,$,C,M,T,E,D,P]}class Rr extends Fe{constructor(e){super(),Le(this,e,MP,CP,Ae,{key:1,title:2,icon:3,config:0,showSelfHostedFields:4,expand:8,collapse:9})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}}function OP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P;function L(fe){n[8](fe)}let N={single:!0};n[0].emailAuth!==void 0&&(N.config=n[0].emailAuth),t=new pP({props:N}),n[7](t),he.push(()=>Re(t,"config",L));function R(fe){n[9](fe)}let J={single:!0,key:"googleAuth",title:"Google",icon:"ri-google-line"};n[0].googleAuth!==void 0&&(J.config=n[0].googleAuth),l=new Rr({props:J}),he.push(()=>Re(l,"config",R));function W(fe){n[10](fe)}let q={single:!0,key:"facebookAuth",title:"Facebook",icon:"ri-facebook-line"};n[0].facebookAuth!==void 0&&(q.config=n[0].facebookAuth),a=new Rr({props:q}),he.push(()=>Re(a,"config",W));function G(fe){n[11](fe)}let K={single:!0,key:"githubAuth",title:"GitHub",icon:"ri-github-line"};n[0].githubAuth!==void 0&&(K.config=n[0].githubAuth),c=new Rr({props:K}),he.push(()=>Re(c,"config",G));function Y(fe){n[12](fe)}let ne={single:!0,key:"gitlabAuth",title:"GitLab",icon:"ri-gitlab-line",showSelfHostedFields:!0};return n[0].gitlabAuth!==void 0&&(ne.config=n[0].gitlabAuth),g=new Rr({props:ne}),he.push(()=>Re(g,"config",Y)),{c(){e=_("div"),B(t.$$.fragment),s=O(),B(l.$$.fragment),o=O(),B(a.$$.fragment),f=O(),B(c.$$.fragment),h=O(),B(g.$$.fragment),b=O(),v=_("div"),S=_("div"),$=O(),C=_("button"),M=_("span"),M.textContent="Save changes",p(e,"class","accordions"),p(S,"class","flex-fill"),p(M,"class","txt"),p(C,"type","submit"),p(C,"class","btn btn-expanded"),C.disabled=T=!n[4]||n[3],Q(C,"btn-loading",n[3]),p(v,"class","flex m-t-base")},m(fe,ye){w(fe,e,ye),V(t,e,null),m(e,s),V(l,e,null),m(e,o),V(a,e,null),m(e,f),V(c,e,null),m(e,h),V(g,e,null),w(fe,b,ye),w(fe,v,ye),m(v,S),m(v,$),m(v,C),m(C,M),E=!0,D||(P=X(C,"click",n[13]),D=!0)},p(fe,ye){const se={};!i&&ye&1&&(i=!0,se.config=fe[0].emailAuth,je(()=>i=!1)),t.$set(se);const Z={};!r&&ye&1&&(r=!0,Z.config=fe[0].googleAuth,je(()=>r=!1)),l.$set(Z);const De={};!u&&ye&1&&(u=!0,De.config=fe[0].facebookAuth,je(()=>u=!1)),a.$set(De);const te={};!d&&ye&1&&(d=!0,te.config=fe[0].githubAuth,je(()=>d=!1)),c.$set(te);const be={};!y&&ye&1&&(y=!0,be.config=fe[0].gitlabAuth,je(()=>y=!1)),g.$set(be),(!E||ye&24&&T!==(T=!fe[4]||fe[3]))&&(C.disabled=T),ye&8&&Q(C,"btn-loading",fe[3])},i(fe){E||(A(t.$$.fragment,fe),A(l.$$.fragment,fe),A(a.$$.fragment,fe),A(c.$$.fragment,fe),A(g.$$.fragment,fe),E=!0)},o(fe){F(t.$$.fragment,fe),F(l.$$.fragment,fe),F(a.$$.fragment,fe),F(c.$$.fragment,fe),F(g.$$.fragment,fe),E=!1},d(fe){fe&&k(e),n[7](null),z(t),z(l),z(a),z(c),z(g),fe&&k(b),fe&&k(v),D=!1,P()}}}function TP(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function DP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;e=new tl({});const y=[TP,OP],b=[];function v(S,$){return S[2]?0:1}return f=v(n),c=b[f]=y[f](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div> 
-            <div class="breadcrumb-item">Auth providers</div></nav>`,l=O(),r=_("div"),o=_("form"),a=_("h6"),a.textContent="Manage the allowed users sign-in/sign-up methods.",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","m-b-base"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,$){V(e,S,$),w(S,t,$),w(S,i,$),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=X(o,"submit",Kt(n[5])),h=!0)},p(S,[$]){let C=f;f=v(S),f===C?b[f].p(S,$):(Oe(),F(b[C],1,1,()=>{b[C]=null}),Te(),c=b[f],c?c.p(S,$):(c=b[f]=y[f](S),c.c()),A(c,1),c.m(o,null))},i(S){d||(A(e.$$.fragment,S),A(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function AP(n,e,t){let i,s,l={},r=!1,o=!1,a="";U.setDocumentTitle("Auth providers"),u();async function u(){t(2,r=!0);try{const $=await we.Settings.getAll()||{};c($)}catch($){we.errorResponseHandler($)}t(2,r=!1)}async function f(){if(!(o||!i)){t(3,o=!0);try{const $=await we.Settings.update(U.filterRedactedProps(l));c($),Wi({}),s==null||s.collapseSiblings(),mn("Successfully updated auth providers.")}catch($){we.errorResponseHandler($)}t(3,o=!1)}}function c($){$=$||{},t(0,l={}),t(0,l.emailAuth=Object.assign({enabled:!0},$.emailAuth),l);const C=["googleAuth","facebookAuth","githubAuth","gitlabAuth"];for(const M of C)t(0,l[M]=Object.assign({enabled:!1,allowRegistrations:!0},$[M]),l);t(6,a=JSON.stringify(l))}function d($){he[$?"unshift":"push"](()=>{s=$,t(1,s)})}function h($){n.$$.not_equal(l.emailAuth,$)&&(l.emailAuth=$,t(0,l))}function g($){n.$$.not_equal(l.googleAuth,$)&&(l.googleAuth=$,t(0,l))}function y($){n.$$.not_equal(l.facebookAuth,$)&&(l.facebookAuth=$,t(0,l))}function b($){n.$$.not_equal(l.githubAuth,$)&&(l.githubAuth=$,t(0,l))}function v($){n.$$.not_equal(l.gitlabAuth,$)&&(l.gitlabAuth=$,t(0,l))}const S=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(4,i=a!=JSON.stringify(l))},[l,s,r,o,i,f,a,d,h,g,y,b,v,S]}class EP extends Fe{constructor(e){super(),Le(this,e,AP,DP,Ae,{})}}function Pg(n,e,t){const i=n.slice();return i[12]=e[t],i[13]=e,i[14]=t,i}function PP(n){let e=[],t=new Map,i,s,l,r,o,a,u,f,c,d,h=n[4];const g=y=>y[12].key;for(let y=0;y<h.length;y+=1){let b=Pg(n,h,y),v=g(b);t.set(v,e[y]=Lg(v,b))}return{c(){for(let y=0;y<e.length;y+=1)e[y].c();i=O(),s=_("div"),l=_("div"),r=O(),o=_("button"),a=_("span"),a.textContent="Save changes",p(l,"class","flex-fill"),p(a,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-expanded"),o.disabled=u=!n[3]||n[2],Q(o,"btn-loading",n[2]),p(s,"class","flex")},m(y,b){for(let v=0;v<e.length;v+=1)e[v].m(y,b);w(y,i,b),w(y,s,b),m(s,l),m(s,r),m(s,o),m(o,a),f=!0,c||(d=X(o,"click",n[9]),c=!0)},p(y,b){b&32785&&(h=y[4],Oe(),e=ot(e,b,g,1,y,h,t,i.parentNode,Lt,Lg,i,Pg),Te()),(!f||b&12&&u!==(u=!y[3]||y[2]))&&(o.disabled=u),b&4&&Q(o,"btn-loading",y[2])},i(y){if(!f){for(let b=0;b<h.length;b+=1)A(e[b]);f=!0}},o(y){for(let b=0;b<e.length;b+=1)F(e[b]);f=!1},d(y){for(let b=0;b<e.length;b+=1)e[b].d(y);y&&k(i),y&&k(s),c=!1,d()}}}function LP(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function FP(n){let e,t=n[12].label+"",i,s,l,r,o,a,u,f,c,d,h;function g(){n[7].call(o,n[12])}function y(){return n[8](n[12])}return{c(){e=_("label"),i=H(t),s=H(" duration (in seconds)"),r=O(),o=_("input"),u=O(),f=_("div"),c=_("span"),c.textContent="Invalidate all previously issued tokens",p(e,"for",l=n[15]),p(o,"type","number"),p(o,"id",a=n[15]),o.required=!0,p(c,"class","link-primary"),Q(c,"txt-success",n[0][n[12].key].secret),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,i),m(e,s),w(b,r,v),w(b,o,v),$e(o,n[0][n[12].key].duration),w(b,u,v),w(b,f,v),m(f,c),d||(h=[X(o,"input",g),X(c,"click",y)],d=!0)},p(b,v){n=b,v&32768&&l!==(l=n[15])&&p(e,"for",l),v&32768&&a!==(a=n[15])&&p(o,"id",a),v&17&&Tt(o.value)!==n[0][n[12].key].duration&&$e(o,n[0][n[12].key].duration),v&17&&Q(c,"txt-success",n[0][n[12].key].secret)},d(b){b&&k(e),b&&k(r),b&&k(o),b&&k(u),b&&k(f),d=!1,rt(h)}}}function Lg(n,e){let t,i,s;return i=new Ne({props:{class:"form-field required",name:e[12].key+".duration",$$slots:{default:[FP,({uniqueId:l})=>({15:l}),({uniqueId:l})=>l?32768:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=lt(),B(i.$$.fragment),this.first=t},m(l,r){w(l,t,r),V(i,l,r),s=!0},p(l,r){e=l;const o={};r&98305&&(o.$$scope={dirty:r,ctx:e}),i.$set(o)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){F(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function IP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;e=new tl({});const y=[LP,PP],b=[];function v(S,$){return S[1]?0:1}return f=v(n),c=b[f]=y[f](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div> 
-            <div class="breadcrumb-item">Token options</div></nav>`,l=O(),r=_("div"),o=_("form"),a=_("div"),a.innerHTML="<p>Adjust common token options.</p>",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content m-b-sm txt-xl"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,$){V(e,S,$),w(S,t,$),w(S,i,$),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=X(o,"submit",Kt(n[5])),h=!0)},p(S,[$]){let C=f;f=v(S),f===C?b[f].p(S,$):(Oe(),F(b[C],1,1,()=>{b[C]=null}),Te(),c=b[f],c?c.p(S,$):(c=b[f]=y[f](S),c.c()),A(c,1),c.m(o,null))},i(S){d||(A(e.$$.fragment,S),A(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function NP(n,e,t){let i;const s=[{key:"userAuthToken",label:"Users auth token"},{key:"userVerificationToken",label:"Users email verification token"},{key:"userPasswordResetToken",label:"Users password reset token"},{key:"userEmailChangeToken",label:"Users email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];let l={},r=!1,o=!1,a="";U.setDocumentTitle("Token options"),u();async function u(){t(1,r=!0);try{const y=await we.Settings.getAll()||{};c(y)}catch(y){we.errorResponseHandler(y)}t(1,r=!1)}async function f(){if(!(o||!i)){t(2,o=!0);try{const y=await we.Settings.update(U.filterRedactedProps(l));c(y),mn("Successfully saved tokens options.")}catch(y){we.errorResponseHandler(y)}t(2,o=!1)}}function c(y){var b;y=y||{},t(0,l={});for(const v of s)t(0,l[v.key]={duration:((b=y[v.key])==null?void 0:b.duration)||0},l);t(6,a=JSON.stringify(l))}function d(y){l[y.key].duration=Tt(this.value),t(0,l)}const h=y=>{l[y.key].secret?(delete l[y.key].secret,t(0,l)):t(0,l[y.key].secret=U.randomString(50),l)},g=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(3,i=a!=JSON.stringify(l))},[l,r,o,i,s,f,a,d,h,g]}class RP extends Fe{constructor(e){super(),Le(this,e,NP,IP,Ae,{})}}const dn=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Gs("/"):!0}],jP={"/login":nn({component:_E,conditions:dn.concat([n=>!we.AuthStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":nn({asyncComponent:()=>rs(()=>import("./PageAdminRequestPasswordReset.1fb439b8.js"),[]),conditions:dn.concat([n=>!we.AuthStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":nn({asyncComponent:()=>rs(()=>import("./PageAdminConfirmPasswordReset.2dff19bf.js"),[]),conditions:dn.concat([n=>!we.AuthStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":nn({component:yA,conditions:dn.concat([n=>we.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":nn({component:A3,conditions:dn.concat([n=>we.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/users":nn({component:BA,conditions:dn.concat([n=>we.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":nn({asyncComponent:()=>rs(()=>import("./PageUserConfirmPasswordReset.365d89fa.js"),[]),conditions:dn.concat([()=>(we.logout(!1),!0)]),userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":nn({asyncComponent:()=>rs(()=>import("./PageUserConfirmVerification.062420a1.js"),[]),conditions:dn.concat([()=>(we.logout(!1),!0)]),userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":nn({asyncComponent:()=>rs(()=>import("./PageUserConfirmEmailChange.148a0ba6.js"),[]),conditions:dn.concat([()=>(we.logout(!1),!0)]),userData:{showAppSidebar:!1}}),"/settings":nn({component:CE,conditions:dn.concat([n=>we.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":nn({component:cE,conditions:dn.concat([n=>we.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":nn({component:WE,conditions:dn.concat([n=>we.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":nn({component:nP,conditions:dn.concat([n=>we.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":nn({component:EP,conditions:dn.concat([n=>we.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":nn({component:RP,conditions:dn.concat([n=>we.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"*":nn({component:r2,userData:{showAppSidebar:!1}})};function HP(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[r,o]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*r/t.width-(t.left+r),u=e.top+e.height*o/t.height-(t.top+o),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=Do}=i;return{delay:f,duration:Jn(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,g)=>{const y=g*a,b=g*u,v=h+g*e.width/t.width,S=h+g*e.height/t.height;return`transform: ${l} translate(${y}px, ${b}px) scale(${v}, ${S});`}}}function Fg(n,e,t){const i=n.slice();return i[2]=e[t],i}function qP(n){let e;return{c(){e=_("i"),p(e,"class","ri-alert-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function VP(n){let e;return{c(){e=_("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function zP(n){let e;return{c(){e=_("i"),p(e,"class","ri-information-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ig(n,e){let t,i,s,l,r=e[2].message+"",o,a,u,f,c,d,h=re,g,y,b;function v(M,T){return M[2].type==="info"?zP:M[2].type==="success"?VP:qP}let S=v(e),$=S(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=_("div"),i=_("div"),$.c(),s=O(),l=_("div"),o=H(r),a=O(),u=_("div"),u.innerHTML='<i class="ri-close-line"></i>',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"class","close"),p(t,"class","alert txt-break"),Q(t,"alert-info",e[2].type=="info"),Q(t,"alert-success",e[2].type=="success"),Q(t,"alert-danger",e[2].type=="error"),Q(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,T){w(M,t,T),m(t,i),$.m(i,null),m(t,s),m(t,l),m(l,o),m(t,a),m(t,u),m(t,f),g=!0,y||(b=X(u,"click",Kt(C)),y=!0)},p(M,T){e=M,S!==(S=v(e))&&($.d(1),$=S(e),$&&($.c(),$.m(i,null))),(!g||T&1)&&r!==(r=e[2].message+"")&&_e(o,r),T&1&&Q(t,"alert-info",e[2].type=="info"),T&1&&Q(t,"alert-success",e[2].type=="success"),T&1&&Q(t,"alert-danger",e[2].type=="error"),T&1&&Q(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){Jb(t),h(),Yg(t,d)},a(){h(),h=Kb(t,d,HP,{duration:150})},i(M){g||(Dt(()=>{c||(c=ft(t,ro,{duration:150},!0)),c.run(1)}),g=!0)},o(M){c||(c=ft(t,ro,{duration:150},!1)),c.run(0),g=!1},d(M){M&&k(t),$.d(),M&&c&&c.end(),y=!1,b()}}}function BP(n){let e,t=[],i=new Map,s,l=n[0];const r=o=>o[2].message;for(let o=0;o<l.length;o+=1){let a=Fg(n,l,o),u=r(a);i.set(u,t[o]=Ig(u,a))}return{c(){e=_("div");for(let o=0;o<t.length;o+=1)t[o].c();p(e,"class","toasts-wrapper")},m(o,a){w(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(o,[a]){if(a&1){l=o[0],Oe();for(let u=0;u<t.length;u+=1)t[u].r();t=ot(t,a,r,1,o,l,i,e,Xb,Ig,null,Fg);for(let u=0;u<t.length;u+=1)t[u].a();Te()}},i(o){if(!s){for(let a=0;a<l.length;a+=1)A(t[a]);s=!0}},o(o){for(let a=0;a<t.length;a+=1)F(t[a]);s=!1},d(o){o&&k(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function UP(n,e,t){let i;return hn(n,qu,l=>t(0,i=l)),[i,l=>D0(l)]}class WP extends Fe{constructor(e){super(),Le(this,e,UP,BP,Ae,{})}}function YP(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=_("h4"),i=H(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,r){w(l,e,r),m(e,i)},p(l,r){var o;r&2&&t!==(t=((o=l[1])==null?void 0:o.text)+"")&&_e(i,t)},d(l){l&&k(e)}}}function KP(n){let e,t,i,s,l,r,o;return{c(){e=_("button"),t=_("span"),t.textContent="No",i=O(),s=_("button"),l=_("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],Q(s,"btn-loading",n[2])},m(a,u){w(a,e,u),m(e,t),w(a,i,u),w(a,s,u),m(s,l),e.focus(),r||(o=[X(e,"click",n[3]),X(s,"click",n[4])],r=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&Q(s,"btn-loading",a[2])},d(a){a&&k(e),a&&k(i),a&&k(s),r=!1,rt(o)}}}function JP(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:[KP],header:[YP]},$$scope:{ctx:n}};return e=new Di({props:i}),n[5](e),e.$on("hide",n[6]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&4&&(r.overlayClose=!s[2]),l&4&&(r.escClose=!s[2]),l&135&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[5](null),z(e,s)}}}function GP(n,e,t){let i;hn(n,cf,f=>t(1,i=f));let s,l=!1;const r=()=>{i!=null&&i.noCallback&&i.noCallback(),s==null||s.hide()},o=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),s==null||s.hide()};function a(f){he[f?"unshift":"push"](()=>{s=f,t(0,s)})}const u=async()=>{i!=null&&i.noCallback&&i.noCallback(),await Mi(),Eb()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(s==null||s.show())},[s,i,l,r,o,a,u]}class ZP extends Fe{constructor(e){super(),Le(this,e,GP,JP,Ae,{})}}function Ng(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L,N,R,J,W,q,G,K;return W=new ys({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[xP]},$$scope:{ctx:n}}}),{c(){var Y;e=_("aside"),t=_("a"),t.innerHTML='<img src="/_/images/logo.svg" alt="PocketBase logo" width="40" height="40"/>',s=O(),l=_("nav"),r=_("a"),r.innerHTML='<i class="ri-database-2-line"></i>',f=O(),c=_("a"),c.innerHTML='<i class="ri-group-line"></i>',y=O(),b=_("a"),b.innerHTML='<i class="ri-line-chart-line"></i>',C=O(),M=_("a"),M.innerHTML='<i class="ri-tools-line"></i>',P=O(),L=_("figure"),N=_("img"),J=O(),B(W.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(r,"href","/collections"),p(r,"class","menu-item"),p(r,"aria-label","Collections"),p(c,"href","/users"),p(c,"class","menu-item"),p(c,"aria-label","Users"),p(b,"href","/logs"),p(b,"class","menu-item"),p(b,"aria-label","Logs"),p(M,"href","/settings"),p(M,"class","menu-item"),p(M,"aria-label","Settings"),p(l,"class","main-menu"),ei(N.src,R="/_/images/avatars/avatar"+(((Y=n[1])==null?void 0:Y.avatar)||0)+".svg")||p(N,"src",R),p(N,"alt","Avatar"),p(L,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(Y,ne){w(Y,e,ne),m(e,t),m(e,s),m(e,l),m(l,r),m(l,f),m(l,c),m(l,y),m(l,b),m(l,C),m(l,M),m(e,P),m(e,L),m(L,N),m(L,J),V(W,L,null),q=!0,G||(K=[Xe(i=Mn.call(null,t)),Xe(o=Mn.call(null,r)),Xe(a=oi.call(null,r,{path:"/collections/?.*",className:"current-route"})),Xe(u=St.call(null,r,{text:"Collections",position:"right"})),Xe(d=Mn.call(null,c)),Xe(h=oi.call(null,c,{path:"/users/?.*",className:"current-route"})),Xe(g=St.call(null,c,{text:"Users",position:"right"})),Xe(v=Mn.call(null,b)),Xe(S=oi.call(null,b,{path:"/logs/?.*",className:"current-route"})),Xe($=St.call(null,b,{text:"Logs",position:"right"})),Xe(T=Mn.call(null,M)),Xe(E=oi.call(null,M,{path:"/settings/?.*",className:"current-route"})),Xe(D=St.call(null,M,{text:"Settings",position:"right"}))],G=!0)},p(Y,ne){var ye;(!q||ne&2&&!ei(N.src,R="/_/images/avatars/avatar"+(((ye=Y[1])==null?void 0:ye.avatar)||0)+".svg"))&&p(N,"src",R);const fe={};ne&64&&(fe.$$scope={dirty:ne,ctx:Y}),W.$set(fe)},i(Y){q||(A(W.$$.fragment,Y),q=!0)},o(Y){F(W.$$.fragment,Y),q=!1},d(Y){Y&&k(e),z(W),G=!1,rt(K)}}}function xP(n){let e,t,i,s,l,r,o;return{c(){e=_("a"),e.innerHTML=`<i class="ri-shield-user-line"></i> 
-                        <span class="txt">Manage admins</span>`,t=O(),i=_("hr"),s=O(),l=_("div"),l.innerHTML=`<i class="ri-logout-circle-line"></i> 
-                        <span class="txt">Logout</span>`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),r||(o=[Xe(Mn.call(null,e)),X(l,"click",n[4])],r=!0)},p:re,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),r=!1,rt(o)}}}function XP(n){var c;let e,t,i,s,l,r,o,a,u,f=((c=n[1])==null?void 0:c.id)&&n[0]&&Ng(n);return s=new l1({props:{routes:jP}}),s.$on("routeLoading",n[2]),s.$on("conditionsFailed",n[3]),r=new WP({}),a=new ZP({}),{c(){e=_("div"),f&&f.c(),t=O(),i=_("div"),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment),p(i,"class","app-body"),p(e,"class","app-layout")},m(d,h){w(d,e,h),f&&f.m(e,null),m(e,t),m(e,i),V(s,i,null),w(d,l,h),V(r,d,h),w(d,o,h),V(a,d,h),u=!0},p(d,[h]){var g;((g=d[1])==null?void 0:g.id)&&d[0]?f?(f.p(d,h),h&3&&A(f,1)):(f=Ng(d),f.c(),A(f,1),f.m(e,t)):f&&(Oe(),F(f,1,1,()=>{f=null}),Te())},i(d){u||(A(f),A(s.$$.fragment,d),A(r.$$.fragment,d),A(a.$$.fragment,d),u=!0)},o(d){F(f),F(s.$$.fragment,d),F(r.$$.fragment,d),F(a.$$.fragment,d),u=!1},d(d){d&&k(e),f&&f.d(),z(s),d&&k(l),z(r,d),d&&k(o),z(a,d)}}}function QP(n,e,t){let i;hn(n,Vu,u=>t(1,i=u));let s,l=!1;function r(u){var f,c,d,h;((f=u==null?void 0:u.detail)==null?void 0:f.location)!==s&&(t(0,l=!!((d=(c=u==null?void 0:u.detail)==null?void 0:c.userData)!=null&&d.showAppSidebar)),s=(h=u==null?void 0:u.detail)==null?void 0:h.location,U.setDocumentTitle(""),Wi({}),Eb())}function o(){Gs("/")}function a(){we.logout()}return[l,i,r,o,a]}class eL extends Fe{constructor(e){super(),Le(this,e,QP,XP,Ae,{})}}new eL({target:document.getElementById("app")});export{rt as A,mn as B,U as C,Gs as D,lt as E,P0 as F,hn as G,Js as H,_n as I,pi as J,he as K,Ln as P,Fe as S,F as a,O as b,B as c,z as d,_ as e,p as f,w as g,m as h,Le as i,Xe as j,Oe as k,Mn as l,V as m,Te as n,k as o,we as p,Ne as q,Q as r,Ae as s,A as t,X as u,Kt as v,H as w,_e as x,re as y,$e as z};
diff --git a/ui/dist/assets/index.6f2d3c23.js b/ui/dist/assets/index.6f2d3c23.js
new file mode 100644
index 00000000..69cf9a84
--- /dev/null
+++ b/ui/dist/assets/index.6f2d3c23.js
@@ -0,0 +1,366 @@
+const Vb=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 r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).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)}};Vb();function oe(){}const Wl=n=>n;function ct(n,e){for(const t in e)n[t]=e[t];return n}function Hg(n){return n()}function bf(){return Object.create(null)}function lt(n){n.forEach(Hg)}function Jn(n){return typeof n=="function"}function De(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let ar;function ei(n,e){return ar||(ar=document.createElement("a")),ar.href=e,n===ar.href}function zb(n){return Object.keys(n).length===0}function qg(n,...e){if(n==null)return oe;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function hn(n,e,t){n.$$.on_destroy.push(qg(e,t))}function Dn(n,e,t,i){if(n){const s=Vg(n,e,t,i);return n[0](s)}}function Vg(n,e,t,i){return n[1]&&i?ct(t.ctx.slice(),n[1](i(e))):t.ctx}function An(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=[],r=Math.max(e.dirty.length,s.length);for(let o=0;o<r;o+=1)l[o]=e.dirty[o]|s[o];return l}return e.dirty|s}return e.dirty}function En(n,e,t,i,s,l){if(s){const r=Vg(e,t,i,l);n.p(r,s)}}function Pn(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function di(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function Ut(n,e){const t={};e=new Set(e);for(const i in n)!e.has(i)&&i[0]!=="$"&&(t[i]=n[i]);return t}function yf(n){return n==null?"":n}function zg(n,e,t){return n.set(t),e}function Xe(n){return n&&Jn(n.destroy)?n.destroy:oe}const Bg=typeof window!="undefined";let So=Bg?()=>window.performance.now():()=>Date.now(),yu=Bg?n=>requestAnimationFrame(n):oe;const Ns=new Set;function Ug(n){Ns.forEach(e=>{e.c(n)||(Ns.delete(e),e.f())}),Ns.size!==0&&yu(Ug)}function $o(n){let e;return Ns.size===0&&yu(Ug),{promise:new Promise(t=>{Ns.add(e={c:n,f:t})}),abort(){Ns.delete(e)}}}function m(n,e){n.appendChild(e)}function Wg(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function Bb(n){const e=_("style");return Ub(Wg(n),e),e.sheet}function Ub(n,e){m(n.head||n,e)}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode.removeChild(n)}function Bn(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function _(n){return document.createElement(n)}function H(n){return document.createTextNode(n)}function O(){return H(" ")}function st(){return H("")}function Q(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Wt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Un(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Yg(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 ci(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 Mt(n){return n===""?null:+n}function Wb(n){return Array.from(n.childNodes)}function ge(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function $e(n,e){n.value=e==null?"":e}function vf(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 Kg(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}const Xr=new Map;let Qr=0;function Yb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Kb(n,e){const t={stylesheet:Bb(e),rules:{}};return Xr.set(n,t),t}function Fl(n,e,t,i,s,l,r,o=0){const a=16.666/i;let u=`{
+`;for(let b=0;b<=1;b+=a){const v=e+(t-e)*l(b);u+=b*100+`%{${r(v,1-v)}}
+`}const f=u+`100% {${r(t,1-t)}}
+}`,c=`__svelte_${Yb(f)}_${o}`,d=Wg(n),{stylesheet:h,rules:g}=Xr.get(d)||Kb(d,n);g[c]||(g[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const y=n.style.animation||"";return n.style.animation=`${y?`${y}, `:""}${c} ${i}ms linear ${s}ms 1 both`,Qr+=1,c}function Il(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(", "),Qr-=s,Qr||Jb())}function Jb(){yu(()=>{Qr||(Xr.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),Xr.clear())})}function Gb(n,e,t,i){if(!e)return oe;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return oe;const{delay:l=0,duration:r=300,easing:o=Wl,start:a=So()+l,end:u=a+r,tick:f=oe,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,g;function y(){c&&(g=Fl(n,0,1,r,l,o,c)),l||(h=!0)}function b(){c&&Il(n,g),d=!1}return $o(v=>{if(!h&&v>=a&&(h=!0),h&&v>=u&&(f(1,0),b()),!d)return!1;if(h){const S=v-a,$=0+1*o(S/r);f($,1-$)}return!0}),y(),f(0,1),b}function Zb(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,Jg(n,s)}}function Jg(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 Nl;function $l(n){Nl=n}function Co(){if(!Nl)throw new Error("Function called outside component initialization");return Nl}function pi(n){Co().$$.on_mount.push(n)}function xb(n){Co().$$.after_update.push(n)}function Xb(n){Co().$$.on_destroy.push(n)}function _n(){const n=Co();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Kg(e,t,{cancelable:i});return s.slice().forEach(r=>{r.call(n,l)}),!l.defaultPrevented}return!0}}function ut(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const bl=[],pe=[],qr=[],Pa=[],Gg=Promise.resolve();let La=!1;function Zg(){La||(La=!0,Gg.then(xg))}function Oi(){return Zg(),Gg}function Ot(n){qr.push(n)}function je(n){Pa.push(n)}const Ho=new Set;let ur=0;function xg(){const n=Nl;do{for(;ur<bl.length;){const e=bl[ur];ur++,$l(e),Qb(e.$$)}for($l(null),bl.length=0,ur=0;pe.length;)pe.pop()();for(let e=0;e<qr.length;e+=1){const t=qr[e];Ho.has(t)||(Ho.add(t),t())}qr.length=0}while(bl.length);for(;Pa.length;)Pa.pop()();La=!1,Ho.clear(),$l(n)}function Qb(n){if(n.fragment!==null){n.update(),lt(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Ot)}}let il;function vu(){return il||(il=Promise.resolve(),il.then(()=>{il=null})),il}function ds(n,e,t){n.dispatchEvent(Kg(`${e?"intro":"outro"}${t}`))}const Vr=new Set;let ai;function Me(){ai={r:0,c:[],p:ai}}function Oe(){ai.r||lt(ai.c),ai=ai.p}function A(n,e){n&&n.i&&(Vr.delete(n),n.i(e))}function F(n,e,t,i){if(n&&n.o){if(Vr.has(n))return;Vr.add(n),ai.c.push(()=>{Vr.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ku={duration:0};function wu(n,e,t){let i=e(n,t),s=!1,l,r,o=0;function a(){l&&Il(n,l)}function u(){const{delay:c=0,duration:d=300,easing:h=Wl,tick:g=oe,css:y}=i||ku;y&&(l=Fl(n,0,1,d,c,h,y,o++)),g(0,1);const b=So()+c,v=b+d;r&&r.abort(),s=!0,Ot(()=>ds(n,!0,"start")),r=$o(S=>{if(s){if(S>=v)return g(1,0),ds(n,!0,"end"),a(),s=!1;if(S>=b){const $=h((S-b)/d);g($,1-$)}}return s})}let f=!1;return{start(){f||(f=!0,Il(n),Jn(i)?(i=i(),vu().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function Xg(n,e,t){let i=e(n,t),s=!0,l;const r=ai;r.r+=1;function o(){const{delay:a=0,duration:u=300,easing:f=Wl,tick:c=oe,css:d}=i||ku;d&&(l=Fl(n,1,0,u,a,f,d));const h=So()+a,g=h+u;Ot(()=>ds(n,!1,"start")),$o(y=>{if(s){if(y>=g)return c(0,1),ds(n,!1,"end"),--r.r||lt(r.c),!1;if(y>=h){const b=f((y-h)/u);c(1-b,b)}}return s})}return Jn(i)?vu().then(()=>{i=i(),o()}):o(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&Il(n,l),s=!1)}}}function ft(n,e,t,i){let s=e(n,t),l=i?0:1,r=null,o=null,a=null;function u(){a&&Il(n,a)}function f(d,h){const g=d.b-l;return h*=Math.abs(g),{a:l,b:d.b,d:g,duration:h,start:d.start,end:d.start+h,group:d.group}}function c(d){const{delay:h=0,duration:g=300,easing:y=Wl,tick:b=oe,css:v}=s||ku,S={start:So()+h,b:d};d||(S.group=ai,ai.r+=1),r||o?o=S:(v&&(u(),a=Fl(n,l,d,g,h,y,v)),d&&b(0,1),r=f(S,g),Ot(()=>ds(n,d,"start")),$o($=>{if(o&&$>o.start&&(r=f(o,g),o=null,ds(n,r.b,"start"),v&&(u(),a=Fl(n,l,r.b,r.duration,0,y,s.css))),r){if($>=r.end)b(l=r.b,1-l),ds(n,r.b,"end"),o||(r.b?u():--r.group.r||lt(r.group.c)),r=null;else if($>=r.start){const C=$-r.start;l=r.a+r.d*y(C/r.duration),b(l,1-l)}}return!!(r||o)}))}return{run(d){Jn(s)?vu().then(()=>{s=s(),c(d)}):c(d)},end(){u(),r=o=null}}}function un(n,e){n.d(1),e.delete(n.key)}function Ft(n,e){F(n,1,1,()=>{e.delete(n.key)})}function e1(n,e){n.f(),Ft(n,e)}function rt(n,e,t,i,s,l,r,o,a,u,f,c){let d=n.length,h=l.length,g=d;const y={};for(;g--;)y[n[g].key]=g;const b=[],v=new Map,S=new Map;for(g=h;g--;){const T=c(s,l,g),E=t(T);let D=r.get(E);D?i&&D.p(T,e):(D=u(E,T),D.c()),v.set(E,b[g]=D),E in y&&S.set(E,Math.abs(g-y[E]))}const $=new Set,C=new Set;function M(T){A(T,1),T.m(o,f),r.set(T.key,T),f=T.first,h--}for(;d&&h;){const T=b[h-1],E=n[d-1],D=T.key,P=E.key;T===E?(f=T.first,d--,h--):v.has(P)?!r.has(D)||$.has(D)?M(T):C.has(P)?d--:S.get(D)>S.get(P)?(C.add(D),M(T)):($.add(P),d--):(a(E,r),d--)}for(;d--;){const T=n[d];v.has(T.key)||a(T,r)}for(;h;)M(b[h-1]);return b}function bn(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const r=n[l],o=e[l];if(o){for(const a in r)a in o||(i[a]=1);for(const a in o)s[a]||(t[a]=o[a],s[a]=1);n[l]=o}else for(const a in r)s[a]=1}for(const r in i)r in t||(t[r]=void 0);return t}function hi(n){return typeof n=="object"&&n!==null?n:{}}function Ie(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function B(n){n&&n.c()}function V(n,e,t,i){const{fragment:s,on_mount:l,on_destroy:r,after_update:o}=n.$$;s&&s.m(e,t),i||Ot(()=>{const a=l.map(Hg).filter(Jn);r?r.push(...a):lt(a),n.$$.on_mount=[]}),o.forEach(Ot)}function z(n,e){const t=n.$$;t.fragment!==null&&(lt(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function t1(n,e){n.$$.dirty[0]===-1&&(bl.push(n),Zg(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function Ee(n,e,t,i,s,l,r,o=[-1]){const a=Nl;$l(n);const u=n.$$={fragment:null,ctx:null,props:l,update:oe,not_equal:s,bound:bf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:bf(),dirty:o,skip_bound:!1,root:e.target||a.$$.root};r&&r(u.root);let f=!1;if(u.ctx=t?t(n,e.props||{},(c,d,...h)=>{const g=h.length?h[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=g)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](g),f&&t1(n,c)),d}):[],u.update(),f=!0,lt(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=Wb(e.target);u.fragment&&u.fragment.l(c),c.forEach(k)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),V(n,e.target,e.anchor,e.customElement),xg()}$l(a)}class Pe{$destroy(){z(this,1),this.$destroy=oe}$on(e,t){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&&!zb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function sn(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<n.conditions.length;t++)if(!n.conditions[t]||typeof n.conditions[t]!="function")throw Error("Invalid parameter conditions["+t+"]")}return n.loadingComponent&&(n.asyncComponent.loading=n.loadingComponent,n.asyncComponent.loadingParams=n.loadingParams||void 0),{component:n.asyncComponent,userData:n.userData,conditions:n.conditions&&n.conditions.length?n.conditions:void 0,props:n.props&&Object.keys(n.props).length?n.props:{},_sveltesparouter:!0}}const Ms=[];function Qg(n,e){return{subscribe:Ti(n,e).subscribe}}function Ti(n,e=oe){let t;const i=new Set;function s(o){if(De(n,o)&&(n=o,t)){const a=!Ms.length;for(const u of i)u[1](),Ms.push(u,n);if(a){for(let u=0;u<Ms.length;u+=2)Ms[u][0](Ms[u+1]);Ms.length=0}}}function l(o){s(o(n))}function r(o,a=oe){const u=[o,a];return i.add(u),i.size===1&&(t=e(s)||oe),o(n),()=>{i.delete(u),i.size===0&&(t(),t=null)}}return{set:s,update:l,subscribe:r}}function e_(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return Qg(t,r=>{let o=!1;const a=[];let u=0,f=oe;const c=()=>{if(u)return;f();const h=e(i?a[0]:a,r);l?r(h):f=Jn(h)?h:oe},d=s.map((h,g)=>qg(h,y=>{a[g]=y,u&=~(1<<g),o&&c()},()=>{u|=1<<g}));return o=!0,c(),function(){lt(d),f()}})}function t_(n,e){if(n instanceof RegExp)return{keys:!1,pattern:n};var t,i,s,l,r=[],o="",a=n.split("/");for(a[0]||a.shift();s=a.shift();)t=s[0],t==="*"?(r.push("wild"),o+="/(.*)"):t===":"?(i=s.indexOf("?",1),l=s.indexOf(".",1),r.push(s.substring(1,~i?i:~l?l:s.length)),o+=!!~i&&!~l?"(?:/([^/]+?))?":"/([^/]+?)",~l&&(o+=(~i?"?":"")+"\\"+s.substring(l))):o+="/"+s;return{keys:r,pattern:new RegExp("^"+o+(e?"(?=$|/)":"/?$"),"i")}}function n1(n){let e,t,i;const s=[n[2]];var l=n[0];function r(o){let a={};for(let u=0;u<s.length;u+=1)a=ct(a,s[u]);return{props:a}}return l&&(e=new l(r()),e.$on("routeEvent",n[7])),{c(){e&&B(e.$$.fragment),t=st()},m(o,a){e&&V(e,o,a),w(o,t,a),i=!0},p(o,a){const u=a&4?bn(s,[hi(o[2])]):{};if(l!==(l=o[0])){if(e){Me();const f=e;F(f.$$.fragment,1,0,()=>{z(f,1)}),Oe()}l?(e=new l(r()),e.$on("routeEvent",o[7]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&F(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&z(e,o)}}}function i1(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function r(o){let a={};for(let u=0;u<s.length;u+=1)a=ct(a,s[u]);return{props:a}}return l&&(e=new l(r()),e.$on("routeEvent",n[6])),{c(){e&&B(e.$$.fragment),t=st()},m(o,a){e&&V(e,o,a),w(o,t,a),i=!0},p(o,a){const u=a&6?bn(s,[a&2&&{params:o[1]},a&4&&hi(o[2])]):{};if(l!==(l=o[0])){if(e){Me();const f=e;F(f.$$.fragment,1,0,()=>{z(f,1)}),Oe()}l?(e=new l(r()),e.$on("routeEvent",o[6]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&F(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&z(e,o)}}}function s1(n){let e,t,i,s;const l=[i1,n1],r=[];function o(a,u){return a[1]?0:1}return e=o(n),t=r[e]=l[e](n),{c(){t.c(),i=st()},m(a,u){r[e].m(a,u),w(a,i,u),s=!0},p(a,[u]){let f=e;e=o(a),e===f?r[e].p(a,u):(Me(),F(r[f],1,1,()=>{r[f]=null}),Oe(),t=r[e],t?t.p(a,u):(t=r[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){F(t),s=!1},d(a){r[e].d(a),a&&k(i)}}}function kf(){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 Mo=Qg(null,function(e){e(kf());const t=()=>{e(kf())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});e_(Mo,n=>n.location);e_(Mo,n=>n.querystring);const wf=Ti(void 0);async function Zs(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await Oi();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function On(n,e){if(e=$f(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with <a> tags');return Sf(n,e),{update(t){t=$f(t),Sf(n,t)}}}function Sf(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||l1(i.currentTarget.getAttribute("href"))})}function $f(n){return n&&typeof n=="string"?{href:n}:n||{}}function l1(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0,void 0),window.location.hash=n}function r1(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class r{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:E,keys:D}=t_(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=E,this._keys=D}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 E={};let D=0;for(;D<this._keys.length;){try{E[this._keys[D]]=decodeURIComponent(T[D+1]||"")||null}catch{E[this._keys[D]]=null}D++}return E}async checkConditions(M){for(let T=0;T<this.conditions.length;T++)if(!await this.conditions[T](M))return!1;return!0}}const o=[];i instanceof Map?i.forEach((C,M)=>{o.push(new r(M,C))}):Object.keys(i).forEach(C=>{o.push(new r(C,i[C]))});let a=null,u=null,f={};const c=_n();async function d(C,M){await Oi(),c(C,M)}let h=null,g=null;l&&(g=C=>{C.state&&C.state.__svelte_spa_router_scrollY?h=C.state:h=null},window.addEventListener("popstate",g),xb(()=>{h?window.scrollTo(h.__svelte_spa_router_scrollX,h.__svelte_spa_router_scrollY):window.scrollTo(0,0)}));let y=null,b=null;const v=Mo.subscribe(async C=>{y=C;let M=0;for(;M<o.length;){const T=o[M].match(C.location);if(!T){M++;continue}const E={route:o[M].path,location:C.location,querystring:C.querystring,userData:o[M].userData,params:T&&typeof T=="object"&&Object.keys(T).length?T:null};if(!await o[M].checkConditions(E)){t(0,a=null),b=null,d("conditionsFailed",E);return}d("routeLoading",Object.assign({},E));const D=o[M].component;if(b!=D){D.loading?(t(0,a=D.loading),b=D,t(1,u=D.loadingParams),t(2,f={}),d("routeLoaded",Object.assign({},E,{component:a,name:a.name,params:u}))):(t(0,a=null),b=null);const P=await D();if(C!=y)return;t(0,a=P&&P.default||P),b=D}T&&typeof T=="object"&&Object.keys(T).length?t(1,u=T):t(1,u=null),t(2,f=o[M].props),d("routeLoaded",Object.assign({},E,{component:a,name:a.name,params:u})).then(()=>{wf.set(u)});return}t(0,a=null),b=null,wf.set(void 0)});Xb(()=>{v(),g&&window.removeEventListener("popstate",g)});function S(C){ut.call(this,n,C)}function $(C){ut.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,S,$]}class o1 extends Pe{constructor(e){super(),Ee(this,e,r1,s1,De,{routes:3,prefix:4,restoreScrollState:5})}}const zr=[];let n_;function i_(n){const e=n.pattern.test(n_);Cf(n,n.className,e),Cf(n,n.inactiveClassName,!e)}function Cf(n,e,t){(e||"").split(" ").forEach(i=>{!i||(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Mo.subscribe(n=>{n_=n.location+(n.querystring?"?"+n.querystring:""),zr.map(i_)});function oi(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"?t_(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return zr.push(i),i_(i),{destroy(){zr.splice(zr.indexOf(i),1)}}}const a1="modulepreload",Mf={},u1="/_/",as=function(e,t){return!t||t.length===0?e():Promise.all(t.map(i=>{if(i=`${u1}${i}`,i in Mf)return;Mf[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${l}`))return;const r=document.createElement("link");if(r.rel=s?"stylesheet":a1,s||(r.as="script",r.crossOrigin=""),r.href=i,document.head.appendChild(r),s)return new Promise((o,a)=>{r.addEventListener("load",o),r.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())};function f1(n){if(n.__esModule)return n;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(n).forEach(function(t){var i=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:function(){return n[t]}})}),e}var Fa={exports:{}},s_=function(n,e){return function(){for(var t=new Array(arguments.length),i=0;i<t.length;i++)t[i]=arguments[i];return n.apply(e,t)}},c1=s_,fs=Object.prototype.toString;function Ia(n){return fs.call(n)==="[object Array]"}function qo(n){return n===void 0}function Of(n){return n!==null&&typeof n=="object"}function fr(n){if(fs.call(n)!=="[object Object]")return!1;var e=Object.getPrototypeOf(n);return e===null||e===Object.prototype}function Tf(n){return fs.call(n)==="[object Function]"}function Vo(n,e){if(n!=null)if(typeof n!="object"&&(n=[n]),Ia(n))for(var t=0,i=n.length;t<i;t++)e.call(null,n[t],t,n);else for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.call(null,n[s],s,n)}var In={isArray:Ia,isArrayBuffer:function(n){return fs.call(n)==="[object ArrayBuffer]"},isBuffer:function(n){return n!==null&&!qo(n)&&n.constructor!==null&&!qo(n.constructor)&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)},isFormData:function(n){return typeof FormData!="undefined"&&n instanceof FormData},isArrayBufferView:function(n){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer&&n.buffer instanceof ArrayBuffer},isString:function(n){return typeof n=="string"},isNumber:function(n){return typeof n=="number"},isObject:Of,isPlainObject:fr,isUndefined:qo,isDate:function(n){return fs.call(n)==="[object Date]"},isFile:function(n){return fs.call(n)==="[object File]"},isBlob:function(n){return fs.call(n)==="[object Blob]"},isFunction:Tf,isStream:function(n){return Of(n)&&Tf(n.pipe)},isURLSearchParams:function(n){return typeof URLSearchParams!="undefined"&&n instanceof URLSearchParams},isStandardBrowserEnv:function(){return(typeof navigator=="undefined"||navigator.product!=="ReactNative"&&navigator.product!=="NativeScript"&&navigator.product!=="NS")&&typeof window!="undefined"&&typeof document!="undefined"},forEach:Vo,merge:function n(){var e={};function t(l,r){fr(e[r])&&fr(l)?e[r]=n(e[r],l):fr(l)?e[r]=n({},l):Ia(l)?e[r]=l.slice():e[r]=l}for(var i=0,s=arguments.length;i<s;i++)Vo(arguments[i],t);return e},extend:function(n,e,t){return Vo(e,function(i,s){n[s]=t&&typeof i=="function"?c1(i,t):i}),n},trim:function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")},stripBOM:function(n){return n.charCodeAt(0)===65279&&(n=n.slice(1)),n}},Os=In;function Df(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var l_=function(n,e,t){if(!e)return n;var i;if(t)i=t(e);else if(Os.isURLSearchParams(e))i=e.toString();else{var s=[];Os.forEach(e,function(r,o){r!=null&&(Os.isArray(r)?o+="[]":r=[r],Os.forEach(r,function(a){Os.isDate(a)?a=a.toISOString():Os.isObject(a)&&(a=JSON.stringify(a)),s.push(Df(o)+"="+Df(a))}))}),i=s.join("&")}if(i){var l=n.indexOf("#");l!==-1&&(n=n.slice(0,l)),n+=(n.indexOf("?")===-1?"?":"&")+i}return n},d1=In;function Br(){this.handlers=[]}Br.prototype.use=function(n,e,t){return this.handlers.push({fulfilled:n,rejected:e,synchronous:!!t&&t.synchronous,runWhen:t?t.runWhen:null}),this.handlers.length-1},Br.prototype.eject=function(n){this.handlers[n]&&(this.handlers[n]=null)},Br.prototype.forEach=function(n){d1.forEach(this.handlers,function(e){e!==null&&n(e)})};var p1=Br,h1=In,r_=function(n,e,t,i,s){return n.config=e,t&&(n.code=t),n.request=i,n.response=s,n.isAxiosError=!0,n.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},n},m1=r_,o_=function(n,e,t,i,s){var l=new Error(n);return m1(l,e,t,i,s)},g1=o_,cr=In,_1=cr.isStandardBrowserEnv()?{write:function(n,e,t,i,s,l){var r=[];r.push(n+"="+encodeURIComponent(e)),cr.isNumber(t)&&r.push("expires="+new Date(t).toGMTString()),cr.isString(i)&&r.push("path="+i),cr.isString(s)&&r.push("domain="+s),l===!0&&r.push("secure"),document.cookie=r.join("; ")},read:function(n){var e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},b1=function(n){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(n)},y1=function(n,e){return e?n.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):n},zo=In,v1=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Af=In,k1=Af.isStandardBrowserEnv()?function(){var n,e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");function i(s){var l=s;return e&&(t.setAttribute("href",l),l=t.href),t.setAttribute("href",l),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=i(window.location.href),function(s){var l=Af.isString(s)?i(s):s;return l.protocol===n.protocol&&l.host===n.host}}():function(){return!0},dr=In,w1=function(n,e,t){var i=t.config.validateStatus;t.status&&i&&!i(t.status)?e(g1("Request failed with status code "+t.status,t.config,null,t.request,t)):n(t)},S1=_1,$1=l_,C1=function(n,e){return n&&!b1(e)?y1(n,e):e},M1=function(n){var e,t,i,s={};return n&&zo.forEach(n.split(`
+`),function(l){if(i=l.indexOf(":"),e=zo.trim(l.substr(0,i)).toLowerCase(),t=zo.trim(l.substr(i+1)),e){if(s[e]&&v1.indexOf(e)>=0)return;s[e]=e==="set-cookie"?(s[e]?s[e]:[]).concat([t]):s[e]?s[e]+", "+t:t}}),s},O1=k1,Bo=o_,T1=function(n){return new Promise(function(e,t){var i=n.data,s=n.headers,l=n.responseType;dr.isFormData(i)&&delete s["Content-Type"];var r=new XMLHttpRequest;if(n.auth){var o=n.auth.username||"",a=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";s.Authorization="Basic "+btoa(o+":"+a)}var u=C1(n.baseURL,n.url);function f(){if(r){var d="getAllResponseHeaders"in r?M1(r.getAllResponseHeaders()):null,h={data:l&&l!=="text"&&l!=="json"?r.response:r.responseText,status:r.status,statusText:r.statusText,headers:d,config:n,request:r};w1(e,t,h),r=null}}if(r.open(n.method.toUpperCase(),$1(u,n.params,n.paramsSerializer),!0),r.timeout=n.timeout,"onloadend"in r?r.onloadend=f:r.onreadystatechange=function(){r&&r.readyState===4&&(r.status!==0||r.responseURL&&r.responseURL.indexOf("file:")===0)&&setTimeout(f)},r.onabort=function(){r&&(t(Bo("Request aborted",n,"ECONNABORTED",r)),r=null)},r.onerror=function(){t(Bo("Network Error",n,null,r)),r=null},r.ontimeout=function(){var d="timeout of "+n.timeout+"ms exceeded";n.timeoutErrorMessage&&(d=n.timeoutErrorMessage),t(Bo(d,n,n.transitional&&n.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",r)),r=null},dr.isStandardBrowserEnv()){var c=(n.withCredentials||O1(u))&&n.xsrfCookieName?S1.read(n.xsrfCookieName):void 0;c&&(s[n.xsrfHeaderName]=c)}"setRequestHeader"in r&&dr.forEach(s,function(d,h){i===void 0&&h.toLowerCase()==="content-type"?delete s[h]:r.setRequestHeader(h,d)}),dr.isUndefined(n.withCredentials)||(r.withCredentials=!!n.withCredentials),l&&l!=="json"&&(r.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&r.addEventListener("progress",n.onDownloadProgress),typeof n.onUploadProgress=="function"&&r.upload&&r.upload.addEventListener("progress",n.onUploadProgress),n.cancelToken&&n.cancelToken.promise.then(function(d){r&&(r.abort(),t(d),r=null)}),i||(i=null),r.send(i)})},en=In,Ef=function(n,e){h1.forEach(n,function(t,i){i!==e&&i.toUpperCase()===e.toUpperCase()&&(n[e]=t,delete n[i])})},D1=r_,A1={"Content-Type":"application/x-www-form-urlencoded"};function Pf(n,e){!en.isUndefined(n)&&en.isUndefined(n["Content-Type"])&&(n["Content-Type"]=e)}var Lf,Ur={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:((typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(Lf=T1),Lf),transformRequest:[function(n,e){return Ef(e,"Accept"),Ef(e,"Content-Type"),en.isFormData(n)||en.isArrayBuffer(n)||en.isBuffer(n)||en.isStream(n)||en.isFile(n)||en.isBlob(n)?n:en.isArrayBufferView(n)?n.buffer:en.isURLSearchParams(n)?(Pf(e,"application/x-www-form-urlencoded;charset=utf-8"),n.toString()):en.isObject(n)||e&&e["Content-Type"]==="application/json"?(Pf(e,"application/json"),function(t,i,s){if(en.isString(t))try{return(i||JSON.parse)(t),en.trim(t)}catch(l){if(l.name!=="SyntaxError")throw l}return(s||JSON.stringify)(t)}(n)):n}],transformResponse:[function(n){var e=this.transitional,t=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,s=!t&&this.responseType==="json";if(s||i&&en.isString(n)&&n.length)try{return JSON.parse(n)}catch(l){if(s)throw l.name==="SyntaxError"?D1(l,this,"E_JSON_PARSE"):l}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(n){return n>=200&&n<300}};Ur.headers={common:{Accept:"application/json, text/plain, */*"}},en.forEach(["delete","get","head"],function(n){Ur.headers[n]={}}),en.forEach(["post","put","patch"],function(n){Ur.headers[n]=en.merge(A1)});var Su=Ur,E1=In,P1=Su,a_=function(n){return!(!n||!n.__CANCEL__)},Ff=In,Uo=function(n,e,t){var i=this||P1;return E1.forEach(t,function(s){n=s.call(i,n,e)}),n},L1=a_,F1=Su;function Wo(n){n.cancelToken&&n.cancelToken.throwIfRequested()}var ln=In,u_=function(n,e){e=e||{};var t={},i=["url","method","data"],s=["headers","auth","proxy","params"],l=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],r=["validateStatus"];function o(c,d){return ln.isPlainObject(c)&&ln.isPlainObject(d)?ln.merge(c,d):ln.isPlainObject(d)?ln.merge({},d):ln.isArray(d)?d.slice():d}function a(c){ln.isUndefined(e[c])?ln.isUndefined(n[c])||(t[c]=o(void 0,n[c])):t[c]=o(n[c],e[c])}ln.forEach(i,function(c){ln.isUndefined(e[c])||(t[c]=o(void 0,e[c]))}),ln.forEach(s,a),ln.forEach(l,function(c){ln.isUndefined(e[c])?ln.isUndefined(n[c])||(t[c]=o(void 0,n[c])):t[c]=o(void 0,e[c])}),ln.forEach(r,function(c){c in e?t[c]=o(n[c],e[c]):c in n&&(t[c]=o(void 0,n[c]))});var u=i.concat(s).concat(l).concat(r),f=Object.keys(n).concat(Object.keys(e)).filter(function(c){return u.indexOf(c)===-1});return ln.forEach(f,a),t},f_={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]},$u={};["object","boolean","number","function","string","symbol"].forEach(function(n,e){$u[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});var If={},I1=f_.version.split(".");function c_(n,e){for(var t=e?e.split("."):I1,i=n.split("."),s=0;s<3;s++){if(t[s]>i[s])return!0;if(t[s]<i[s])return!1}return!1}$u.transitional=function(n,e,t){var i=e&&c_(e);function s(l,r){return"[Axios v"+f_.version+"] Transitional option '"+l+"'"+r+(t?". "+t:"")}return function(l,r,o){if(n===!1)throw new Error(s(r," has been removed in "+e));return i&&!If[r]&&(If[r]=!0,console.warn(s(r," has been deprecated since v"+e+" and will be removed in the near future"))),!n||n(l,r,o)}};var N1={isOlderVersion:c_,assertOptions:function(n,e,t){if(typeof n!="object")throw new TypeError("options must be an object");for(var i=Object.keys(n),s=i.length;s-- >0;){var l=i[s],r=e[l];if(r){var o=n[l],a=o===void 0||r(o,l,n);if(a!==!0)throw new TypeError("option "+l+" must be "+a)}else if(t!==!0)throw Error("Unknown option "+l)}},validators:$u},Nf=In,R1=l_,Rf=p1,jf=function(n){return Wo(n),n.headers=n.headers||{},n.data=Uo.call(n,n.data,n.headers,n.transformRequest),n.headers=Ff.merge(n.headers.common||{},n.headers[n.method]||{},n.headers),Ff.forEach(["delete","get","head","post","put","patch","common"],function(e){delete n.headers[e]}),(n.adapter||F1.adapter)(n).then(function(e){return Wo(n),e.data=Uo.call(n,e.data,e.headers,n.transformResponse),e},function(e){return L1(e)||(Wo(n),e&&e.response&&(e.response.data=Uo.call(n,e.response.data,e.response.headers,n.transformResponse))),Promise.reject(e)})},pr=u_,d_=N1,Ts=d_.validators;function yl(n){this.defaults=n,this.interceptors={request:new Rf,response:new Rf}}yl.prototype.request=function(n){typeof n=="string"?(n=arguments[1]||{}).url=arguments[0]:n=n||{},(n=pr(this.defaults,n)).method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var e=n.transitional;e!==void 0&&d_.assertOptions(e,{silentJSONParsing:Ts.transitional(Ts.boolean,"1.0.0"),forcedJSONParsing:Ts.transitional(Ts.boolean,"1.0.0"),clarifyTimeoutError:Ts.transitional(Ts.boolean,"1.0.0")},!1);var t=[],i=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(n)===!1||(i=i&&f.synchronous,t.unshift(f.fulfilled,f.rejected))});var s,l=[];if(this.interceptors.response.forEach(function(f){l.push(f.fulfilled,f.rejected)}),!i){var r=[jf,void 0];for(Array.prototype.unshift.apply(r,t),r=r.concat(l),s=Promise.resolve(n);r.length;)s=s.then(r.shift(),r.shift());return s}for(var o=n;t.length;){var a=t.shift(),u=t.shift();try{o=a(o)}catch(f){u(f);break}}try{s=jf(o)}catch(f){return Promise.reject(f)}for(;l.length;)s=s.then(l.shift(),l.shift());return s},yl.prototype.getUri=function(n){return n=pr(this.defaults,n),R1(n.url,n.params,n.paramsSerializer).replace(/^\?/,"")},Nf.forEach(["delete","get","head","options"],function(n){yl.prototype[n]=function(e,t){return this.request(pr(t||{},{method:n,url:e,data:(t||{}).data}))}}),Nf.forEach(["post","put","patch"],function(n){yl.prototype[n]=function(e,t,i){return this.request(pr(i||{},{method:n,url:e,data:t}))}});var j1=yl;function Na(n){this.message=n}Na.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Na.prototype.__CANCEL__=!0;var p_=Na,H1=p_;function Wr(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(i){e=i});var t=this;n(function(i){t.reason||(t.reason=new H1(i),e(t.reason))})}Wr.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Wr.source=function(){var n;return{token:new Wr(function(e){n=e}),cancel:n}};var q1=Wr,Hf=In,V1=s_,Yr=j1,z1=u_;function h_(n){var e=new Yr(n),t=V1(Yr.prototype.request,e);return Hf.extend(t,Yr.prototype,e),Hf.extend(t,e),t}var Gn=h_(Su);Gn.Axios=Yr,Gn.create=function(n){return h_(z1(Gn.defaults,n))},Gn.Cancel=p_,Gn.CancelToken=q1,Gn.isCancel=a_,Gn.all=function(n){return Promise.all(n)},Gn.spread=function(n){return function(e){return n.apply(null,e)}},Gn.isAxiosError=function(n){return typeof n=="object"&&n.isAxiosError===!0},Fa.exports=Gn,Fa.exports.default=Gn;var Yo=Fa.exports,qf=typeof Symbol!="undefined"&&Symbol,B1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},e=Symbol("test"),t=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(t)!=="[object Symbol]")return!1;for(e in n[e]=42,n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var i=Object.getOwnPropertySymbols(n);if(i.length!==1||i[0]!==e||!Object.prototype.propertyIsEnumerable.call(n,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(n,e);if(s.value!==42||s.enumerable!==!0)return!1}return!0},U1="Function.prototype.bind called on incompatible ",Ko=Array.prototype.slice,W1=Object.prototype.toString,Y1=function(n){var e=this;if(typeof e!="function"||W1.call(e)!=="[object Function]")throw new TypeError(U1+e);for(var t,i=Ko.call(arguments,1),s=function(){if(this instanceof t){var u=e.apply(this,i.concat(Ko.call(arguments)));return Object(u)===u?u:this}return e.apply(n,i.concat(Ko.call(arguments)))},l=Math.max(0,e.length-i.length),r=[],o=0;o<l;o++)r.push("$"+o);if(t=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")(s),e.prototype){var a=function(){};a.prototype=e.prototype,t.prototype=new a,a.prototype=null}return t},Cu=Function.prototype.bind||Y1,K1=Cu.call(Function.call,Object.prototype.hasOwnProperty),Bs=SyntaxError,m_=Function,Rs=TypeError,Jo=function(n){try{return m_('"use strict"; return ('+n+").constructor;")()}catch{}},ps=Object.getOwnPropertyDescriptor;if(ps)try{ps({},"")}catch{ps=null}var Go=function(){throw new Rs},J1=ps?function(){try{return Go}catch{try{return ps(arguments,"callee").get}catch{return Go}}}():Go,Ds=typeof qf=="function"&&typeof Symbol=="function"&&typeof qf("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&B1(),Fi=Object.getPrototypeOf||function(n){return n.__proto__},Fs={},G1=typeof Uint8Array=="undefined"?void 0:Fi(Uint8Array),js={"%AggregateError%":typeof AggregateError=="undefined"?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":Ds?Fi([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":Fs,"%AsyncGenerator%":Fs,"%AsyncGeneratorFunction%":Fs,"%AsyncIteratorPrototype%":Fs,"%Atomics%":typeof Atomics=="undefined"?void 0:Atomics,"%BigInt%":typeof BigInt=="undefined"?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?void 0:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?void 0:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?void 0:FinalizationRegistry,"%Function%":m_,"%GeneratorFunction%":Fs,"%Int8Array%":typeof Int8Array=="undefined"?void 0:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?void 0:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ds?Fi(Fi([][Symbol.iterator]())):void 0,"%JSON%":typeof JSON=="object"?JSON:void 0,"%Map%":typeof Map=="undefined"?void 0:Map,"%MapIteratorPrototype%":typeof Map!="undefined"&&Ds?Fi(new Map()[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?void 0:Promise,"%Proxy%":typeof Proxy=="undefined"?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?void 0:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?void 0:Set,"%SetIteratorPrototype%":typeof Set!="undefined"&&Ds?Fi(new Set()[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ds?Fi(""[Symbol.iterator]()):void 0,"%Symbol%":Ds?Symbol:void 0,"%SyntaxError%":Bs,"%ThrowTypeError%":J1,"%TypedArray%":G1,"%TypeError%":Rs,"%Uint8Array%":typeof Uint8Array=="undefined"?void 0:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?void 0:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?void 0:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?void 0:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?void 0:WeakSet},Z1=function n(e){var t;if(e==="%AsyncFunction%")t=Jo("async function () {}");else if(e==="%GeneratorFunction%")t=Jo("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Jo("async function* () {}");else if(e==="%AsyncGenerator%"){var i=n("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&(t=Fi(s.prototype))}return js[e]=t,t},Vf={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Yl=Cu,eo=K1,x1=Yl.call(Function.call,Array.prototype.concat),X1=Yl.call(Function.apply,Array.prototype.splice),zf=Yl.call(Function.call,String.prototype.replace),to=Yl.call(Function.call,String.prototype.slice),Q1=Yl.call(Function.call,RegExp.prototype.exec),ey=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ty=/\\(\\)?/g,ny=function(n){var e=to(n,0,1),t=to(n,-1);if(e==="%"&&t!=="%")throw new Bs("invalid intrinsic syntax, expected closing `%`");if(t==="%"&&e!=="%")throw new Bs("invalid intrinsic syntax, expected opening `%`");var i=[];return zf(n,ey,function(s,l,r,o){i[i.length]=r?zf(o,ty,"$1"):l||s}),i},iy=function(n,e){var t,i=n;if(eo(Vf,i)&&(i="%"+(t=Vf[i])[0]+"%"),eo(js,i)){var s=js[i];if(s===Fs&&(s=Z1(i)),s===void 0&&!e)throw new Rs("intrinsic "+n+" exists, but is not available. Please file an issue!");return{alias:t,name:i,value:s}}throw new Bs("intrinsic "+n+" does not exist!")},Mu=function(n,e){if(typeof n!="string"||n.length===0)throw new Rs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Rs('"allowMissing" argument must be a boolean');if(Q1(/^%?[^%]*%?$/g,n)===null)throw new Bs("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=ny(n),i=t.length>0?t[0]:"",s=iy("%"+i+"%",e),l=s.name,r=s.value,o=!1,a=s.alias;a&&(i=a[0],X1(t,x1([0,1],a)));for(var u=1,f=!0;u<t.length;u+=1){var c=t[u],d=to(c,0,1),h=to(c,-1);if((d==='"'||d==="'"||d==="`"||h==='"'||h==="'"||h==="`")&&d!==h)throw new Bs("property names with quotes must have matching quotes");if(c!=="constructor"&&f||(o=!0),eo(js,l="%"+(i+="."+c)+"%"))r=js[l];else if(r!=null){if(!(c in r)){if(!e)throw new Rs("base intrinsic for "+n+" exists, but the property is not available.");return}if(ps&&u+1>=t.length){var g=ps(r,c);r=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:r[c]}else f=eo(r,c),r=r[c];f&&!o&&(js[l]=r)}}return r},g_={exports:{}};(function(n){var e=Cu,t=Mu,i=t("%Function.prototype.apply%"),s=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(s,i),r=t("%Object.getOwnPropertyDescriptor%",!0),o=t("%Object.defineProperty%",!0),a=t("%Math.max%");if(o)try{o({},"a",{value:1})}catch{o=null}n.exports=function(f){var c=l(e,s,arguments);if(r&&o){var d=r(c,"length");d.configurable&&o(c,"length",{value:1+a(0,f.length-(arguments.length-1))})}return c};var u=function(){return l(e,i,arguments)};o?o(n.exports,"apply",{value:u}):n.exports.apply=u})(g_);var __=Mu,b_=g_.exports,sy=b_(__("String.prototype.indexOf")),ly=f1(Object.freeze({__proto__:null,default:{}})),Ou=typeof Map=="function"&&Map.prototype,Zo=Object.getOwnPropertyDescriptor&&Ou?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,hr=Ou&&Zo&&typeof Zo.get=="function"?Zo.get:null,ry=Ou&&Map.prototype.forEach,Tu=typeof Set=="function"&&Set.prototype,xo=Object.getOwnPropertyDescriptor&&Tu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,mr=Tu&&xo&&typeof xo.get=="function"?xo.get:null,oy=Tu&&Set.prototype.forEach,sl=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,ll=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,Bf=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,ay=Boolean.prototype.valueOf,uy=Object.prototype.toString,fy=Function.prototype.toString,cy=String.prototype.match,Du=String.prototype.slice,qi=String.prototype.replace,dy=String.prototype.toUpperCase,Uf=String.prototype.toLowerCase,y_=RegExp.prototype.test,Wf=Array.prototype.concat,ri=Array.prototype.join,py=Array.prototype.slice,Yf=Math.floor,Xo=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Qo=Object.getOwnPropertySymbols,Ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Us=typeof Symbol=="function"&&typeof Symbol.iterator=="object",rn=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Us||"symbol")?Symbol.toStringTag:null,v_=Object.prototype.propertyIsEnumerable,Kf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function Jf(n,e){if(n===1/0||n===-1/0||n!=n||n&&n>-1e3&&n<1e3||y_.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var i=n<0?-Yf(-n):Yf(n);if(i!==n){var s=String(i),l=Du.call(e,s.length+1);return qi.call(s,t,"$&_")+"."+qi.call(qi.call(l,/([0-9]{3})/g,"$&_"),/_$/,"")}}return qi.call(e,t,"$&_")}var ja=ly,Gf=ja.custom,Zf=w_(Gf)?Gf:null;function k_(n,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+n+i}function hy(n){return qi.call(String(n),/"/g,"&quot;")}function Ha(n){return!(Ni(n)!=="[object Array]"||rn&&typeof n=="object"&&rn in n)}function xf(n){return!(Ni(n)!=="[object RegExp]"||rn&&typeof n=="object"&&rn in n)}function w_(n){if(Us)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!Ra)return!1;try{return Ra.call(n),!0}catch{}return!1}var my=Object.prototype.hasOwnProperty||function(n){return n in this};function Ii(n,e){return my.call(n,e)}function Ni(n){return uy.call(n)}function Xf(n,e){if(n.indexOf)return n.indexOf(e);for(var t=0,i=n.length;t<i;t++)if(n[t]===e)return t;return-1}function S_(n,e){if(n.length>e.maxStringLength){var t=n.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return S_(Du.call(n,0,e.maxStringLength),e)+i}return k_(qi.call(qi.call(n,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,gy),"single",e)}function gy(n){var e=n.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+dy.call(e.toString(16))}function rl(n){return"Object("+n+")"}function ea(n){return n+" { ? }"}function Qf(n,e,t,i){return n+" ("+e+") {"+(i?qa(t,i):ri.call(t,", "))+"}"}function qa(n,e){if(n.length===0)return"";var t=`
+`+e.prev+e.base;return t+ri.call(n,","+t)+`
+`+e.prev}function gr(n,e){var t=Ha(n),i=[];if(t){i.length=n.length;for(var s=0;s<n.length;s++)i[s]=Ii(n,s)?e(n[s],n):""}var l,r=typeof Qo=="function"?Qo(n):[];if(Us){l={};for(var o=0;o<r.length;o++)l["$"+r[o]]=r[o]}for(var a in n)Ii(n,a)&&(t&&String(Number(a))===a&&a<n.length||Us&&l["$"+a]instanceof Symbol||(y_.call(/[^\w$]/,a)?i.push(e(a,n)+": "+e(n[a],n)):i.push(a+": "+e(n[a],n))));if(typeof Qo=="function")for(var u=0;u<r.length;u++)v_.call(n,r[u])&&i.push("["+e(r[u])+"]: "+e(n[r[u]],n));return i}var $_,Au=Mu,xs=function(n,e){var t=__(n,!!e);return typeof t=="function"&&sy(n,".prototype.")>-1?b_(t):t},_y=function n(e,t,i,s){var l=t||{};if(Ii(l,"quoteStyle")&&l.quoteStyle!=="single"&&l.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ii(l,"maxStringLength")&&(typeof l.maxStringLength=="number"?l.maxStringLength<0&&l.maxStringLength!==1/0:l.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var r=!Ii(l,"customInspect")||l.customInspect;if(typeof r!="boolean"&&r!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ii(l,"indent")&&l.indent!==null&&l.indent!=="	"&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ii(l,"numericSeparator")&&typeof l.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=l.numericSeparator;if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return S_(e,l);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var a=String(e);return o?Jf(e,a):a}if(typeof e=="bigint"){var u=String(e)+"n";return o?Jf(e,u):u}var f=l.depth===void 0?5:l.depth;if(i===void 0&&(i=0),i>=f&&f>0&&typeof e=="object")return Ha(e)?"[Array]":"[Object]";var c=function(j,G){var Y;if(j.indent==="	")Y="	";else{if(!(typeof j.indent=="number"&&j.indent>0))return null;Y=ri.call(Array(j.indent+1)," ")}return{base:Y,prev:ri.call(Array(G+1),Y)}}(l,i);if(s===void 0)s=[];else if(Xf(s,e)>=0)return"[Circular]";function d(j,G,Y){if(G&&(s=py.call(s)).push(G),Y){var q={depth:l.depth};return Ii(l,"quoteStyle")&&(q.quoteStyle=l.quoteStyle),n(j,q,i+1,s)}return n(j,l,i+1,s)}if(typeof e=="function"&&!xf(e)){var h=function(j){if(j.name)return j.name;var G=cy.call(fy.call(j),/^function\s*([\w$]+)/);return G?G[1]:null}(e),g=gr(e,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(g.length>0?" { "+ri.call(g,", ")+" }":"")}if(w_(e)){var y=Us?qi.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ra.call(e);return typeof e!="object"||Us?y:rl(y)}if(function(j){return!j||typeof j!="object"?!1:typeof HTMLElement!="undefined"&&j instanceof HTMLElement?!0:typeof j.nodeName=="string"&&typeof j.getAttribute=="function"}(e)){for(var b="<"+Uf.call(String(e.nodeName)),v=e.attributes||[],S=0;S<v.length;S++)b+=" "+v[S].name+"="+k_(hy(v[S].value),"double",l);return b+=">",e.childNodes&&e.childNodes.length&&(b+="..."),b+="</"+Uf.call(String(e.nodeName))+">"}if(Ha(e)){if(e.length===0)return"[]";var $=gr(e,d);return c&&!function(j){for(var G=0;G<j.length;G++)if(Xf(j[G],`
+`)>=0)return!1;return!0}($)?"["+qa($,c)+"]":"[ "+ri.call($,", ")+" ]"}if(function(j){return!(Ni(j)!=="[object Error]"||rn&&typeof j=="object"&&rn in j)}(e)){var C=gr(e,d);return"cause"in Error.prototype||!("cause"in e)||v_.call(e,"cause")?C.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+ri.call(C,", ")+" }":"{ ["+String(e)+"] "+ri.call(Wf.call("[cause]: "+d(e.cause),C),", ")+" }"}if(typeof e=="object"&&r){if(Zf&&typeof e[Zf]=="function"&&ja)return ja(e,{depth:f-i});if(r!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(function(j){if(!hr||!j||typeof j!="object")return!1;try{hr.call(j);try{mr.call(j)}catch{return!0}return j instanceof Map}catch{}return!1}(e)){var M=[];return ry.call(e,function(j,G){M.push(d(G,e,!0)+" => "+d(j,e))}),Qf("Map",hr.call(e),M,c)}if(function(j){if(!mr||!j||typeof j!="object")return!1;try{mr.call(j);try{hr.call(j)}catch{return!0}return j instanceof Set}catch{}return!1}(e)){var T=[];return oy.call(e,function(j){T.push(d(j,e))}),Qf("Set",mr.call(e),T,c)}if(function(j){if(!sl||!j||typeof j!="object")return!1;try{sl.call(j,sl);try{ll.call(j,ll)}catch{return!0}return j instanceof WeakMap}catch{}return!1}(e))return ea("WeakMap");if(function(j){if(!ll||!j||typeof j!="object")return!1;try{ll.call(j,ll);try{sl.call(j,sl)}catch{return!0}return j instanceof WeakSet}catch{}return!1}(e))return ea("WeakSet");if(function(j){if(!Bf||!j||typeof j!="object")return!1;try{return Bf.call(j),!0}catch{}return!1}(e))return ea("WeakRef");if(function(j){return!(Ni(j)!=="[object Number]"||rn&&typeof j=="object"&&rn in j)}(e))return rl(d(Number(e)));if(function(j){if(!j||typeof j!="object"||!Xo)return!1;try{return Xo.call(j),!0}catch{}return!1}(e))return rl(d(Xo.call(e)));if(function(j){return!(Ni(j)!=="[object Boolean]"||rn&&typeof j=="object"&&rn in j)}(e))return rl(ay.call(e));if(function(j){return!(Ni(j)!=="[object String]"||rn&&typeof j=="object"&&rn in j)}(e))return rl(d(String(e)));if(!function(j){return!(Ni(j)!=="[object Date]"||rn&&typeof j=="object"&&rn in j)}(e)&&!xf(e)){var E=gr(e,d),D=Kf?Kf(e)===Object.prototype:e instanceof Object||e.constructor===Object,P=e instanceof Object?"":"null prototype",L=!D&&rn&&Object(e)===e&&rn in e?Du.call(Ni(e),8,-1):P?"Object":"",R=(D||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"")+(L||P?"["+ri.call(Wf.call([],L||[],P||[]),": ")+"] ":"");return E.length===0?R+"{}":c?R+"{"+qa(E,c)+"}":R+"{ "+ri.call(E,", ")+" }"}return String(e)},by=Au("%TypeError%"),_r=Au("%WeakMap%",!0),br=Au("%Map%",!0),yy=xs("WeakMap.prototype.get",!0),vy=xs("WeakMap.prototype.set",!0),ky=xs("WeakMap.prototype.has",!0),wy=xs("Map.prototype.get",!0),Sy=xs("Map.prototype.set",!0),$y=xs("Map.prototype.has",!0),ta=function(n,e){for(var t,i=n;(t=i.next)!==null;i=t)if(t.key===e)return i.next=t.next,t.next=n.next,n.next=t,t},Cy=String.prototype.replace,My=/%20/g,ec="RFC3986",Eu={default:ec,formatters:{RFC1738:function(n){return Cy.call(n,My,"+")},RFC3986:function(n){return String(n)}},RFC1738:"RFC1738",RFC3986:ec},Oy=Eu,na=Object.prototype.hasOwnProperty,Xi=Array.isArray,si=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),tc=function(n,e){for(var t=e&&e.plainObjects?Object.create(null):{},i=0;i<n.length;++i)n[i]!==void 0&&(t[i]=n[i]);return t},C_={arrayToObject:tc,assign:function(n,e){return Object.keys(e).reduce(function(t,i){return t[i]=e[i],t},n)},combine:function(n,e){return[].concat(n,e)},compact:function(n){for(var e=[{obj:{o:n},prop:"o"}],t=[],i=0;i<e.length;++i)for(var s=e[i],l=s.obj[s.prop],r=Object.keys(l),o=0;o<r.length;++o){var a=r[o],u=l[a];typeof u=="object"&&u!==null&&t.indexOf(u)===-1&&(e.push({obj:l,prop:a}),t.push(u))}return function(f){for(;f.length>1;){var c=f.pop(),d=c.obj[c.prop];if(Xi(d)){for(var h=[],g=0;g<d.length;++g)d[g]!==void 0&&h.push(d[g]);c.obj[c.prop]=h}}}(e),n},decode:function(n,e,t){var i=n.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},encode:function(n,e,t,i,s){if(n.length===0)return n;var l=n;if(typeof n=="symbol"?l=Symbol.prototype.toString.call(n):typeof n!="string"&&(l=String(n)),t==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var r="",o=0;o<l.length;++o){var a=l.charCodeAt(o);a===45||a===46||a===95||a===126||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||s===Oy.RFC1738&&(a===40||a===41)?r+=l.charAt(o):a<128?r+=si[a]:a<2048?r+=si[192|a>>6]+si[128|63&a]:a<55296||a>=57344?r+=si[224|a>>12]+si[128|a>>6&63]+si[128|63&a]:(o+=1,a=65536+((1023&a)<<10|1023&l.charCodeAt(o)),r+=si[240|a>>18]+si[128|a>>12&63]+si[128|a>>6&63]+si[128|63&a])}return r},isBuffer:function(n){return!(!n||typeof n!="object")&&!!(n.constructor&&n.constructor.isBuffer&&n.constructor.isBuffer(n))},isRegExp:function(n){return Object.prototype.toString.call(n)==="[object RegExp]"},maybeMap:function(n,e){if(Xi(n)){for(var t=[],i=0;i<n.length;i+=1)t.push(e(n[i]));return t}return e(n)},merge:function n(e,t,i){if(!t)return e;if(typeof t!="object"){if(Xi(e))e.push(t);else{if(!e||typeof e!="object")return[e,t];(i&&(i.plainObjects||i.allowPrototypes)||!na.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||typeof e!="object")return[e].concat(t);var s=e;return Xi(e)&&!Xi(t)&&(s=tc(e,i)),Xi(e)&&Xi(t)?(t.forEach(function(l,r){if(na.call(e,r)){var o=e[r];o&&typeof o=="object"&&l&&typeof l=="object"?e[r]=n(o,l,i):e.push(l)}else e[r]=l}),e):Object.keys(t).reduce(function(l,r){var o=t[r];return na.call(l,r)?l[r]=n(l[r],o,i):l[r]=o,l},s)}},M_=function(){var n,e,t,i={assert:function(s){if(!i.has(s))throw new by("Side channel does not contain "+_y(s))},get:function(s){if(_r&&s&&(typeof s=="object"||typeof s=="function")){if(n)return yy(n,s)}else if(br){if(e)return wy(e,s)}else if(t)return function(l,r){var o=ta(l,r);return o&&o.value}(t,s)},has:function(s){if(_r&&s&&(typeof s=="object"||typeof s=="function")){if(n)return ky(n,s)}else if(br){if(e)return $y(e,s)}else if(t)return function(l,r){return!!ta(l,r)}(t,s);return!1},set:function(s,l){_r&&s&&(typeof s=="object"||typeof s=="function")?(n||(n=new _r),vy(n,s,l)):br?(e||(e=new br),Sy(e,s,l)):(t||(t={key:{},next:null}),function(r,o,a){var u=ta(r,o);u?u.value=a:r.next={key:o,next:r.next,value:a}}(t,s,l))}};return i},Va=C_,Cl=Eu,Ty=Object.prototype.hasOwnProperty,nc={brackets:function(n){return n+"[]"},comma:"comma",indices:function(n,e){return n+"["+e+"]"},repeat:function(n){return n}},vi=Array.isArray,Dy=String.prototype.split,Ay=Array.prototype.push,O_=function(n,e){Ay.apply(n,vi(e)?e:[e])},Ey=Date.prototype.toISOString,ic=Cl.default,Qt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Va.encode,encodeValuesOnly:!1,format:ic,formatter:Cl.formatters[ic],indices:!1,serializeDate:function(n){return Ey.call(n)},skipNulls:!1,strictNullHandling:!1},ia={},Py=function n(e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b){for(var v,S=e,$=b,C=0,M=!1;($=$.get(ia))!==void 0&&!M;){var T=$.get(e);if(C+=1,T!==void 0){if(T===C)throw new RangeError("Cyclic object value");M=!0}$.get(ia)===void 0&&(C=0)}if(typeof a=="function"?S=a(t,S):S instanceof Date?S=c(S):i==="comma"&&vi(S)&&(S=Va.maybeMap(S,function(ce){return ce instanceof Date?c(ce):ce})),S===null){if(l)return o&&!g?o(t,Qt.encoder,y,"key",d):t;S=""}if(typeof(v=S)=="string"||typeof v=="number"||typeof v=="boolean"||typeof v=="symbol"||typeof v=="bigint"||Va.isBuffer(S)){if(o){var E=g?t:o(t,Qt.encoder,y,"key",d);if(i==="comma"&&g){for(var D=Dy.call(String(S),","),P="",L=0;L<D.length;++L)P+=(L===0?"":",")+h(o(D[L],Qt.encoder,y,"value",d));return[h(E)+(s&&vi(S)&&D.length===1?"[]":"")+"="+P]}return[h(E)+"="+h(o(S,Qt.encoder,y,"value",d))]}return[h(t)+"="+h(String(S))]}var R,j=[];if(S===void 0)return j;if(i==="comma"&&vi(S))R=[{value:S.length>0?S.join(",")||null:void 0}];else if(vi(a))R=a;else{var G=Object.keys(S);R=u?G.sort(u):G}for(var Y=s&&vi(S)&&S.length===1?t+"[]":t,q=0;q<R.length;++q){var Z=R[q],J=typeof Z=="object"&&Z.value!==void 0?Z.value:S[Z];if(!r||J!==null){var K=vi(S)?typeof i=="function"?i(Y,Z):Y:Y+(f?"."+Z:"["+Z+"]");b.set(e,C);var ne=M_();ne.set(ia,b),O_(j,n(J,K,i,s,l,r,o,a,u,f,c,d,h,g,y,ne))}}return j},Is=C_,za=Object.prototype.hasOwnProperty,Ly=Array.isArray,xt={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Is.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Fy=function(n){return n.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},T_=function(n,e){return n&&typeof n=="string"&&e.comma&&n.indexOf(",")>-1?n.split(","):n},Iy=function(n,e,t,i){if(n){var s=t.allowDots?n.replace(/\.([^.[]+)/g,"[$1]"):n,l=/(\[[^[\]]*])/g,r=t.depth>0&&/(\[[^[\]]*])/.exec(s),o=r?s.slice(0,r.index):s,a=[];if(o){if(!t.plainObjects&&za.call(Object.prototype,o)&&!t.allowPrototypes)return;a.push(o)}for(var u=0;t.depth>0&&(r=l.exec(s))!==null&&u<t.depth;){if(u+=1,!t.plainObjects&&za.call(Object.prototype,r[1].slice(1,-1))&&!t.allowPrototypes)return;a.push(r[1])}return r&&a.push("["+s.slice(r.index)+"]"),function(f,c,d,h){for(var g=h?c:T_(c,d),y=f.length-1;y>=0;--y){var b,v=f[y];if(v==="[]"&&d.parseArrays)b=[].concat(g);else{b=d.plainObjects?Object.create(null):{};var S=v.charAt(0)==="["&&v.charAt(v.length-1)==="]"?v.slice(1,-1):v,$=parseInt(S,10);d.parseArrays||S!==""?!isNaN($)&&v!==S&&String($)===S&&$>=0&&d.parseArrays&&$<=d.arrayLimit?(b=[])[$]=g:S!=="__proto__"&&(b[S]=g):b={0:g}}g=b}return g}(a,e,t,i)}},Ny=function(n,e){var t,i=n,s=function(g){if(!g)return Qt;if(g.encoder!==null&&g.encoder!==void 0&&typeof g.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=g.charset||Qt.charset;if(g.charset!==void 0&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=Cl.default;if(g.format!==void 0){if(!Ty.call(Cl.formatters,g.format))throw new TypeError("Unknown format option provided.");b=g.format}var v=Cl.formatters[b],S=Qt.filter;return(typeof g.filter=="function"||vi(g.filter))&&(S=g.filter),{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:Qt.addQueryPrefix,allowDots:g.allowDots===void 0?Qt.allowDots:!!g.allowDots,charset:y,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:Qt.charsetSentinel,delimiter:g.delimiter===void 0?Qt.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:Qt.encode,encoder:typeof g.encoder=="function"?g.encoder:Qt.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:Qt.encodeValuesOnly,filter:S,format:b,formatter:v,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:Qt.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:Qt.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:Qt.strictNullHandling}}(e);typeof s.filter=="function"?i=(0,s.filter)("",i):vi(s.filter)&&(t=s.filter);var l,r=[];if(typeof i!="object"||i===null)return"";l=e&&e.arrayFormat in nc?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var o=nc[l];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=o==="comma"&&e&&e.commaRoundTrip;t||(t=Object.keys(i)),s.sort&&t.sort(s.sort);for(var u=M_(),f=0;f<t.length;++f){var c=t[f];s.skipNulls&&i[c]===null||O_(r,Py(i[c],c,o,a,s.strictNullHandling,s.skipNulls,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset,u))}var d=r.join(s.delimiter),h=s.addQueryPrefix===!0?"?":"";return s.charsetSentinel&&(s.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},Ry={formats:Eu,parse:function(n,e){var t=function(u){if(!u)return xt;if(u.decoder!==null&&u.decoder!==void 0&&typeof u.decoder!="function")throw new TypeError("Decoder has to be a function.");if(u.charset!==void 0&&u.charset!=="utf-8"&&u.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var f=u.charset===void 0?xt.charset:u.charset;return{allowDots:u.allowDots===void 0?xt.allowDots:!!u.allowDots,allowPrototypes:typeof u.allowPrototypes=="boolean"?u.allowPrototypes:xt.allowPrototypes,allowSparse:typeof u.allowSparse=="boolean"?u.allowSparse:xt.allowSparse,arrayLimit:typeof u.arrayLimit=="number"?u.arrayLimit:xt.arrayLimit,charset:f,charsetSentinel:typeof u.charsetSentinel=="boolean"?u.charsetSentinel:xt.charsetSentinel,comma:typeof u.comma=="boolean"?u.comma:xt.comma,decoder:typeof u.decoder=="function"?u.decoder:xt.decoder,delimiter:typeof u.delimiter=="string"||Is.isRegExp(u.delimiter)?u.delimiter:xt.delimiter,depth:typeof u.depth=="number"||u.depth===!1?+u.depth:xt.depth,ignoreQueryPrefix:u.ignoreQueryPrefix===!0,interpretNumericEntities:typeof u.interpretNumericEntities=="boolean"?u.interpretNumericEntities:xt.interpretNumericEntities,parameterLimit:typeof u.parameterLimit=="number"?u.parameterLimit:xt.parameterLimit,parseArrays:u.parseArrays!==!1,plainObjects:typeof u.plainObjects=="boolean"?u.plainObjects:xt.plainObjects,strictNullHandling:typeof u.strictNullHandling=="boolean"?u.strictNullHandling:xt.strictNullHandling}}(e);if(n===""||n==null)return t.plainObjects?Object.create(null):{};for(var i=typeof n=="string"?function(u,f){var c,d={},h=f.ignoreQueryPrefix?u.replace(/^\?/,""):u,g=f.parameterLimit===1/0?void 0:f.parameterLimit,y=h.split(f.delimiter,g),b=-1,v=f.charset;if(f.charsetSentinel)for(c=0;c<y.length;++c)y[c].indexOf("utf8=")===0&&(y[c]==="utf8=%E2%9C%93"?v="utf-8":y[c]==="utf8=%26%2310003%3B"&&(v="iso-8859-1"),b=c,c=y.length);for(c=0;c<y.length;++c)if(c!==b){var S,$,C=y[c],M=C.indexOf("]="),T=M===-1?C.indexOf("="):M+1;T===-1?(S=f.decoder(C,xt.decoder,v,"key"),$=f.strictNullHandling?null:""):(S=f.decoder(C.slice(0,T),xt.decoder,v,"key"),$=Is.maybeMap(T_(C.slice(T+1),f),function(E){return f.decoder(E,xt.decoder,v,"value")})),$&&f.interpretNumericEntities&&v==="iso-8859-1"&&($=Fy($)),C.indexOf("[]=")>-1&&($=Ly($)?[$]:$),za.call(d,S)?d[S]=Is.combine(d[S],$):d[S]=$}return d}(n,t):n,s=t.plainObjects?Object.create(null):{},l=Object.keys(i),r=0;r<l.length;++r){var o=l[r],a=Iy(o,i[o],t,typeof n=="string");s=Is.merge(s,a,t)}return t.allowSparse===!0?s:Is.compact(s)},stringify:Ny};$_=typeof atob=="function"?atob:function(n){return Buffer.from(n,"base64").toString("binary")};var jy=function(){function n(){}return n.getPayload=function(e){if(e)try{var t=decodeURIComponent($_(e.split(".")[1]).split("").map(function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}},n.isExpired=function(e,t){t===void 0&&(t=0);var i=n.getPayload(e);return!(Object.keys(i).length>0&&(!i.exp||i.exp-t>Date.now()/1e3))},n}(),Ba=function(n,e){return Ba=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])},Ba(n,e)};function gn(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}Ba(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Kr(n,e,t,i){return new(t||(t=Promise))(function(s,l){function r(u){try{a(i.next(u))}catch(f){l(f)}}function o(u){try{a(i.throw(u))}catch(f){l(f)}}function a(u){var f;u.done?s(u.value):(f=u.value,f instanceof t?f:new t(function(c){c(f)})).then(r,o)}a((i=i.apply(n,e||[])).next())})}function Jr(n,e){var t,i,s,l,r={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return l={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(a){return function(u){return function(f){if(t)throw new TypeError("Generator is already executing.");for(;r;)try{if(t=1,i&&(s=2&f[0]?i.return:f[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,f[1])).done)return s;switch(i=0,s&&(f=[2&f[0],s.value]),f[0]){case 0:case 1:s=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!((s=s.length>0&&s[s.length-1])||f[0]!==6&&f[0]!==2)){r=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]<s[3])){r.label=f[1];break}if(f[0]===6&&r.label<s[1]){r.label=s[1],s=f;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(f);break}s[2]&&r.ops.pop(),r.trys.pop();continue}f=e.call(n,r)}catch(c){f=[6,c],i=0}finally{t=s=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}([a,u])}}}var Kl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){this.id=e.id!==void 0?e.id:"",this.created=e.created!==void 0?e.created:"",this.updated=e.updated!==void 0?e.updated:""},Object.defineProperty(n.prototype,"isNew",{get:function(){return!this.id||this.id==="00000000-0000-0000-0000-000000000000"},enumerable:!1,configurable:!0}),n.prototype.clone=function(){return new this.constructor(JSON.parse(JSON.stringify(this)))},n.prototype.export=function(){return Object.assign({},this)},n}(),no=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t);for(var i=0,s=Object.entries(t);i<s.length;i++){var l=s[i],r=l[0],o=l[1];this[r]=o}this["@collectionId"]=t["@collectionId"]!==void 0?t["@collectionId"]:"",this["@collectionName"]=t["@collectionName"]!==void 0?t["@collectionName"]:"",this["@expand"]=t["@expand"]!==void 0?t["@expand"]:{}},e}(Kl),io=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t),this.email=typeof t.email=="string"?t.email:"",this.verified=!!t.verified,this.lastResetSentAt=typeof t.lastResetSentAt=="string"?t.lastResetSentAt:"",this.lastVerificationSentAt=typeof t.lastVerificationSentAt=="string"?t.lastVerificationSentAt:"",this.profile=t.profile?new no(t.profile):null},e}(Kl),Ws=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t),this.avatar=typeof t.avatar=="number"?t.avatar:0,this.email=typeof t.email=="string"?t.email:"",this.lastResetSentAt=typeof t.lastResetSentAt=="string"?t.lastResetSentAt:""},e}(Kl),D_=function(){function n(e){e===void 0&&(e="pocketbase_auth"),this.fallback={},this.storageKey=e}return Object.defineProperty(n.prototype,"token",{get:function(){return(this._storageGet(this.storageKey)||{}).token||""},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"model",{get:function(){var e,t=this._storageGet(this.storageKey)||{};return t===null||typeof t!="object"||t.model===null||typeof t.model!="object"?{}:((e=t.model)===null||e===void 0?void 0:e.verified)!==void 0?new io(t.model):new Ws(t.model)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isValid",{get:function(){return!jy.isExpired(this.token)},enumerable:!1,configurable:!0}),n.prototype.save=function(e,t){this._storageSet(this.storageKey,{token:e,model:t})},n.prototype.clear=function(){return this._storageRemove(this.storageKey)},n.prototype._storageGet=function(e){var t;if(typeof window!="undefined"&&(window==null?void 0:window.localStorage)){var i=((t=window==null?void 0:window.localStorage)===null||t===void 0?void 0:t.getItem(e))||"";try{return JSON.parse(i)}catch{return i}}return this.fallback[e]},n.prototype._storageSet=function(e,t){var i;if(typeof window!="undefined"&&(window==null?void 0:window.localStorage)){var s=t;typeof t!="string"&&(s=JSON.stringify(t)),(i=window==null?void 0:window.localStorage)===null||i===void 0||i.setItem(e,s)}else this.fallback[e]=t},n.prototype._storageRemove=function(e){var t;typeof window!="undefined"&&((t=window==null?void 0:window.localStorage)===null||t===void 0||t.removeItem(e)),delete this.fallback[e]},n}(),Oo=function(n){this.client=n},Hy=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.getAll=function(t){return t===void 0&&(t={}),this.client.send({method:"get",url:"/api/settings",params:t}).then(function(i){return(i==null?void 0:i.data)||{}})},e.prototype.update=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send({method:"patch",url:"/api/settings",params:i,data:t}).then(function(s){return(s==null?void 0:s.data)||{}})},e}(Oo),A_=function(n,e,t,i){this.page=n>0?n:1,this.perPage=e>=0?e:0,this.totalItems=t>=0?t:0,this.items=i||[]},E_=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=100),s===void 0&&(s={});var r=[],o=function(a){return Kr(l,void 0,void 0,function(){return Jr(this,function(u){return[2,this._getList(t,a,i,s).then(function(f){var c=f,d=c.items,h=c.totalItems;return r=r.concat(d),d.length&&h>r.length?o(a+1):r})]})})};return o(1)},e.prototype._getList=function(t,i,s,l){var r=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({method:"get",url:t,params:l}).then(function(o){var a,u,f,c,d,h=[];if(!((a=o==null?void 0:o.data)===null||a===void 0)&&a.items){o.data.items=((u=o==null?void 0:o.data)===null||u===void 0?void 0:u.items)||[];for(var g=0,y=o.data.items;g<y.length;g++){var b=y[g];h.push(r.decode(b))}}return new A_(((f=o==null?void 0:o.data)===null||f===void 0?void 0:f.page)||1,((c=o==null?void 0:o.data)===null||c===void 0?void 0:c.perPage)||0,((d=o==null?void 0:o.data)===null||d===void 0?void 0:d.totalItems)||0,h)})},e.prototype._getOne=function(t,i,s){var l=this;return s===void 0&&(s={}),this.client.send({method:"get",url:t+"/"+encodeURIComponent(i),params:s}).then(function(r){return l.decode(r==null?void 0:r.data)})},e.prototype._create=function(t,i,s){var l=this;return i===void 0&&(i={}),s===void 0&&(s={}),this.client.send({method:"post",url:t,params:s,data:i}).then(function(r){return l.decode(r==null?void 0:r.data)})},e.prototype._update=function(t,i,s,l){var r=this;return s===void 0&&(s={}),l===void 0&&(l={}),this.client.send({method:"patch",url:t+"/"+encodeURIComponent(i),params:l,data:s}).then(function(o){return r.decode(o==null?void 0:o.data)})},e.prototype._delete=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),this.client.send({method:"delete",url:t+"/"+encodeURIComponent(i),params:l,data:s}).then(function(){return!0})},e}(Oo),Pu=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.getFullList=function(t,i){return t===void 0&&(t=100),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.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,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._delete(this.baseCrudPath(),t,i,s)},e}(E_),qy=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.decode=function(t){return new Ws(t)},e.prototype.baseCrudPath=function(){return"/api/admins"},e.prototype.authResponse=function(t){var i,s,l,r,o=this.decode(((i=t==null?void 0:t.data)===null||i===void 0?void 0:i.admin)||{});return((s=t==null?void 0:t.data)===null||s===void 0?void 0:s.token)&&((l=t==null?void 0:t.data)===null||l===void 0?void 0:l.admin)&&this.client.AuthStore.save(t.data.token,o),Object.assign({},t==null?void 0:t.data,{token:((r=t==null?void 0:t.data)===null||r===void 0?void 0:r.token)||"",admin:o})},e.prototype.authViaEmail=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({email:t,password:i},s),this.client.send({method:"post",url:this.baseCrudPath()+"/auth-via-email",params:l,data:s,headers:{Authorization:""}}).then(this.authResponse.bind(this))},e.prototype.refresh=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send({method:"post",url:this.baseCrudPath()+"/refresh",params:i,data:t}).then(this.authResponse.bind(this))},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send({method:"post",url:this.baseCrudPath()+"/request-password-reset",params:s,data:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,r){return l===void 0&&(l={}),r===void 0&&(r={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send({method:"post",url:this.baseCrudPath()+"/confirm-password-reset",params:r,data:l}).then(this.authResponse.bind(this))},e}(Pu),Vy=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.decode=function(t){return new io(t)},e.prototype.baseCrudPath=function(){return"/api/users"},e.prototype.authResponse=function(t){var i,s,l,r,o=this.decode(((i=t==null?void 0:t.data)===null||i===void 0?void 0:i.user)||{});return((s=t==null?void 0:t.data)===null||s===void 0?void 0:s.token)&&((l=t==null?void 0:t.data)===null||l===void 0?void 0:l.user)&&this.client.AuthStore.save(t.data.token,o),Object.assign({},t==null?void 0:t.data,{token:((r=t==null?void 0:t.data)===null||r===void 0?void 0:r.token)||"",user:o})},e.prototype.listAuthMethods=function(t){return t===void 0&&(t={}),this.client.send({method:"get",url:this.baseCrudPath()+"/auth-methods",params:t}).then(function(i){var s,l,r;return Object.assign({},i==null?void 0:i.data,{emailPassword:!!(!((s=i==null?void 0:i.data)===null||s===void 0)&&s.emailPassword),authProviders:Array.isArray((l=i==null?void 0:i.data)===null||l===void 0?void 0:l.authProviders)?(r=i==null?void 0:i.data)===null||r===void 0?void 0:r.authProviders:[]})})},e.prototype.authViaEmail=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({email:t,password:i},s),this.client.send({method:"post",url:this.baseCrudPath()+"/auth-via-email",params:l,data:s,headers:{Authorization:""}}).then(this.authResponse.bind(this))},e.prototype.authViaOAuth2=function(t,i,s,l,r,o){return r===void 0&&(r={}),o===void 0&&(o={}),r=Object.assign({provider:t,code:i,codeVerifier:s,redirectUrl:l},r),this.client.send({method:"post",url:this.baseCrudPath()+"/auth-via-oauth2",params:o,data:r,headers:{Authorization:""}}).then(this.authResponse.bind(this))},e.prototype.refresh=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send({method:"post",url:this.baseCrudPath()+"/refresh",params:i,data:t}).then(this.authResponse.bind(this))},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send({method:"post",url:this.baseCrudPath()+"/request-password-reset",params:s,data:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,r){return l===void 0&&(l={}),r===void 0&&(r={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send({method:"post",url:this.baseCrudPath()+"/confirm-password-reset",params:r,data:l}).then(this.authResponse.bind(this))},e.prototype.requestVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send({method:"post",url:this.baseCrudPath()+"/request-verification",params:s,data:i}).then(function(){return!0})},e.prototype.confirmVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({token:t},i),this.client.send({method:"post",url:this.baseCrudPath()+"/confirm-verification",params:s,data:i}).then(this.authResponse.bind(this))},e.prototype.requestEmailChange=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({newEmail:t},i),this.client.send({method:"post",url:this.baseCrudPath()+"/request-email-change",params:s,data:i}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({token:t,password:i},s),this.client.send({method:"post",url:this.baseCrudPath()+"/confirm-email-change",params:l,data:s}).then(this.authResponse.bind(this))},e}(Pu),wn=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){this.id=e.id!==void 0?e.id:"",this.name=e.name!==void 0?e.name:"",this.type=e.type!==void 0?e.type:"text",this.system=!!e.system,this.required=!!e.required,this.unique=!!e.unique,this.options=typeof e.options=="object"&&e.options!==null?e.options:{}},n}(),Fn=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t),this.name=typeof t.name=="string"?t.name:"",this.system=!!t.system,this.listRule=typeof t.listRule=="string"?t.listRule:null,this.viewRule=typeof t.viewRule=="string"?t.viewRule:null,this.createRule=typeof t.createRule=="string"?t.createRule:null,this.updateRule=typeof t.updateRule=="string"?t.updateRule:null,this.deleteRule=typeof t.deleteRule=="string"?t.deleteRule:null,t.schema=Array.isArray(t.schema)?t.schema:[],this.schema=[];for(var i=0,s=t.schema;i<s.length;i++){var l=s[i];this.schema.push(new wn(l))}},e}(Kl),zy=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.decode=function(t){return new Fn(t)},e.prototype.baseCrudPath=function(){return"/api/collections"},e}(Pu),By=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.decode=function(t){return new no(t)},e.prototype.baseCrudPath=function(t){return"/api/collections/"+encodeURIComponent(t)+"/records"},e.prototype.getFileUrl=function(t,i,s){s===void 0&&(s={});var l=[];l.push(this.client.baseUrl.replace(/\/+$/gm,"")),l.push("api"),l.push("files"),l.push(t["@collectionId"]),l.push(t.id),l.push(i);var r=l.join("/");if(Object.keys(s).length){var o=new URLSearchParams(s);r+=(r.includes("?")?"&":"?")+o}return r},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.getFullList=function(t,i,s){return i===void 0&&(i=100),s===void 0&&(s={}),this._getFullList(this.baseCrudPath(t),i,s)},e.prototype.getList=function(t,i,s,l){return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),this._getList(this.baseCrudPath(t),i,s,l)},e.prototype.getOne=function(t,i,s){return s===void 0&&(s={}),this._getOne(this.baseCrudPath(t),i,s)},e.prototype.create=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._create(this.baseCrudPath(t),i,s)},e.prototype.update=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),this._update(this.baseCrudPath(t),i,s,l)},e.prototype.delete=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),this._delete(this.baseCrudPath(t),i,s,l)},e}(E_)),Ua=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t),this.url=typeof t.url=="string"?t.url:"",this.method=typeof t.method=="string"?t.method:"GET",this.status=typeof t.status=="number"?t.status:200,this.auth=typeof t.auth=="string"?t.auth:"guest",this.ip=typeof t.ip=="string"?t.ip:"",this.referer=typeof t.referer=="string"?t.referer:"",this.userAgent=typeof t.userAgent=="string"?t.userAgent:"",this.meta=typeof t.meta=="object"&&t.meta!==null?t.meta:{}},e}(Kl),Uy=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return gn(e,n),e.prototype.getRequestsList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),s=Object.assign({page:t,perPage:i},s),this.client.send({method:"get",url:"/api/logs/requests",params:s}).then(function(l){var r,o,a,u,f,c=[];if(!((r=l==null?void 0:l.data)===null||r===void 0)&&r.items){l.data.items=((o=l==null?void 0:l.data)===null||o===void 0?void 0:o.items)||[];for(var d=0,h=l.data.items;d<h.length;d++){var g=h[d];c.push(new Ua(g))}}return new A_(((a=l==null?void 0:l.data)===null||a===void 0?void 0:a.page)||1,((u=l==null?void 0:l.data)===null||u===void 0?void 0:u.perPage)||0,((f=l==null?void 0:l.data)===null||f===void 0?void 0:f.totalItems)||0,c)})},e.prototype.getRequest=function(t,i){return i===void 0&&(i={}),this.client.send({method:"get",url:"/api/logs/requests/"+encodeURIComponent(t),params:i}).then(function(s){return new Ua(s==null?void 0:s.data)})},e.prototype.getRequestsStats=function(t){return t===void 0&&(t={}),this.client.send({method:"get",url:"/api/logs/requests/stats",params:t}).then(function(i){return i==null?void 0:i.data})},e}(Oo),Wy=function(n){function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.clientId="",t.eventSource=null,t.subscriptions={},t}return gn(e,n),e.prototype.subscribe=function(t,i){var s;return Kr(this,void 0,void 0,function(){return Jr(this,function(l){switch(l.label){case 0:if(!t)throw new Error("subscription must be set.");return this.subscriptions[t]&&((s=this.eventSource)===null||s===void 0||s.removeEventListener(t,this.subscriptions[t])),this.subscriptions[t]=function(r){var o,a=r;try{o=JSON.parse(a==null?void 0:a.data)}catch{}i(o||{})},this.eventSource?[3,1]:(this.connect(),[3,3]);case 1:return this.clientId?[4,this.submitSubscriptions()]:[3,3];case 2:l.sent(),l.label=3;case 3:return[2]}})})},e.prototype.unsubscribe=function(t){var i;return Kr(this,void 0,void 0,function(){return Jr(this,function(s){switch(s.label){case 0:if(t){if(!this.subscriptions[t])return[2];(i=this.eventSource)===null||i===void 0||i.removeEventListener(t,this.subscriptions[t]),delete this.subscriptions[t]}else this.removeSubscriptionListeners(),this.subscriptions={};return this.clientId?[4,this.submitSubscriptions()]:[3,2];case 1:s.sent(),s.label=2;case 2:return Object.keys(this.subscriptions).length||this.disconnect(),[2]}})})},e.prototype.submitSubscriptions=function(){return Kr(this,void 0,void 0,function(){return Jr(this,function(t){return this.addSubscriptionListeners(),[2,this.client.send({method:"post",url:"/api/realtime",data:{clientId:this.clientId,subscriptions:Object.keys(this.subscriptions)}}).then(function(){return!0})]})})},e.prototype.addSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeSubscriptionListeners(),this.subscriptions)this.eventSource.addEventListener(t,this.subscriptions[t])},e.prototype.removeSubscriptionListeners=function(){if(this.eventSource)for(var t in this.subscriptions)this.eventSource.removeEventListener(t,this.subscriptions[t])},e.prototype.connectHandler=function(t){var i=t;this.clientId=i==null?void 0:i.lastEventId,this.submitSubscriptions()},e.prototype.connect=function(){var t=this;this.disconnect(),this.eventSource=new EventSource(this.client.baseUrl+"/api/realtime"),this.eventSource.addEventListener("PB_CONNECT",function(i){return t.connectHandler(i)})},e.prototype.disconnect=function(){var t,i,s=this;this.removeSubscriptionListeners(),(t=this.eventSource)===null||t===void 0||t.removeEventListener("PB_CONNECT",function(l){return s.connectHandler(l)}),(i=this.eventSource)===null||i===void 0||i.close(),this.eventSource=null,this.clientId=""},e}(Oo),Lu=function(){function n(e,t,i,s){e===void 0&&(e="/"),t===void 0&&(t="en-US");var l=this;this.cancelSource={},this.defaultAuthStore=new D_,this.http=Yo.create(Object.assign({paramsSerializer:function(r){var o={};for(var a in r)r[a]!==null&&(o[a]=r[a]);return Ry.stringify(o,{arrayFormat:"repeat",serializeDate:function(u){return u.toISOString()}})}},s||{})),this.http.interceptors.request.use(function(r){var o,a,u,f;if(!r.cancelToken&&((o=r==null?void 0:r.params)===null||o===void 0?void 0:o.$autoCancel)!==!1){var c=((a=r==null?void 0:r.params)===null||a===void 0?void 0:a.$cancelKey)||(r.method||"get")+r.url;l.cancelRequest(c),l.cancelSource[c]=Yo.CancelToken.source(),r.cancelToken=l.cancelSource[c].token}return(u=r==null?void 0:r.params)===null||u===void 0||delete u.$autoCancel,(f=r==null?void 0:r.params)===null||f===void 0||delete f.$cancelKey,r}),this.http.interceptors.response.use(function(r){return r},function(r){return Yo.isCancel(r)?Promise.reject(null):Promise.reject(r)}),this.baseUrl=e,this.language=t,this.AuthStore=i||this.defaultAuthStore,this.Settings=new Hy(this),this.Admins=new qy(this),this.Users=new Vy(this),this.Collections=new zy(this),this.Records=new By(this),this.Logs=new Uy(this),this.Realtime=new Wy(this)}return Object.defineProperty(n.prototype,"baseUrl",{get:function(){return this.http.defaults.baseURL||""},set:function(e){this.http.defaults.baseURL=e.replace(/\/+$/,"")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"language",{set:function(e){e?this.http.defaults.headers.common["Accept-Language"]=e:delete this.http.defaults.headers.common["Accept-Language"]},enumerable:!1,configurable:!0}),n.prototype.cancelRequest=function(e){return this.cancelSource[e]&&(this.cancelSource[e].cancel(),delete this.cancelSource[e]),this},n.prototype.cancelAllRequests=function(){for(var e in this.cancelSource)this.cancelSource[e].cancel();return this},n.prototype.send=function(e){var t,i,s,l=Object.assign({},e);if(((t=this.AuthStore)===null||t===void 0?void 0:t.token)&&((i=l==null?void 0:l.headers)===null||i===void 0?void 0:i.Authorization)===void 0){var r="Admin";((s=this.AuthStore.model)===null||s===void 0?void 0:s.verified)!==void 0&&(r="User"),l.headers=Object.assign({},l.headers,{Authorization:r+" "+this.AuthStore.token})}return this.http.request(l)},n}();class bs extends Error{}class Yy extends bs{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Ky extends bs{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Jy extends bs{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class vl extends bs{}class P_ extends bs{constructor(e){super(`Invalid unit ${e}`)}}class qn extends bs{}class Pi extends bs{constructor(){super("Zone is an abstract class")}}const ze="numeric",ti="short",Ln="long",Wa={year:ze,month:ze,day:ze},L_={year:ze,month:ti,day:ze},Gy={year:ze,month:ti,day:ze,weekday:ti},F_={year:ze,month:Ln,day:ze},I_={year:ze,month:Ln,day:ze,weekday:Ln},N_={hour:ze,minute:ze},R_={hour:ze,minute:ze,second:ze},j_={hour:ze,minute:ze,second:ze,timeZoneName:ti},H_={hour:ze,minute:ze,second:ze,timeZoneName:Ln},q_={hour:ze,minute:ze,hourCycle:"h23"},V_={hour:ze,minute:ze,second:ze,hourCycle:"h23"},z_={hour:ze,minute:ze,second:ze,hourCycle:"h23",timeZoneName:ti},B_={hour:ze,minute:ze,second:ze,hourCycle:"h23",timeZoneName:Ln},U_={year:ze,month:ze,day:ze,hour:ze,minute:ze},W_={year:ze,month:ze,day:ze,hour:ze,minute:ze,second:ze},Y_={year:ze,month:ti,day:ze,hour:ze,minute:ze},K_={year:ze,month:ti,day:ze,hour:ze,minute:ze,second:ze},Zy={year:ze,month:ti,day:ze,weekday:ti,hour:ze,minute:ze},J_={year:ze,month:Ln,day:ze,hour:ze,minute:ze,timeZoneName:ti},G_={year:ze,month:Ln,day:ze,hour:ze,minute:ze,second:ze,timeZoneName:ti},Z_={year:ze,month:Ln,day:ze,weekday:Ln,hour:ze,minute:ze,timeZoneName:Ln},x_={year:ze,month:Ln,day:ze,weekday:Ln,hour:ze,minute:ze,second:ze,timeZoneName:Ln};function ht(n){return typeof n=="undefined"}function hs(n){return typeof n=="number"}function To(n){return typeof n=="number"&&n%1===0}function xy(n){return typeof n=="string"}function Xy(n){return Object.prototype.toString.call(n)==="[object Date]"}function X_(){try{return typeof Intl!="undefined"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Qy(n){return Array.isArray(n)?n:[n]}function sc(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 ev(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ys(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function wi(n,e,t){return To(n)&&n>=e&&n<=t}function tv(n,e){return n-e*Math.floor(n/e)}function zt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Ri(n){if(!(ht(n)||n===null||n===""))return parseInt(n,10)}function Qi(n){if(!(ht(n)||n===null||n===""))return parseFloat(n)}function Fu(n){if(!(ht(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Iu(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Jl(n){return n%4===0&&(n%100!==0||n%400===0)}function Ml(n){return Jl(n)?366:365}function so(n,e){const t=tv(e-1,12)+1,i=n+(e-t)/12;return t===2?Jl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Nu(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 lo(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 Ya(n){return n>99?n:n>60?1900+n:2e3+n}function Q_(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 r={timeZoneName:e,...l},o=new Intl.DateTimeFormat(t,r).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return o?o.value:null}function Do(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 e0(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new qn(`Invalid unit value ${n}`);return e}function ro(n,e){const t={};for(const i in n)if(Ys(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=e0(s)}return t}function Ol(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}${zt(t,2)}:${zt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${zt(t,2)}${zt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ao(n){return ev(n,["hour","minute","second","millisecond"])}const t0=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,nv=["January","February","March","April","May","June","July","August","September","October","November","December"],n0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],iv=["J","F","M","A","M","J","J","A","S","O","N","D"];function i0(n){switch(n){case"narrow":return[...iv];case"short":return[...n0];case"long":return[...nv];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 s0=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],l0=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],sv=["M","T","W","T","F","S","S"];function r0(n){switch(n){case"narrow":return[...sv];case"short":return[...l0];case"long":return[...s0];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const o0=["AM","PM"],lv=["Before Christ","Anno Domini"],rv=["BC","AD"],ov=["B","A"];function a0(n){switch(n){case"narrow":return[...ov];case"short":return[...rv];case"long":return[...lv];default:return null}}function av(n){return o0[n.hour<12?0:1]}function uv(n,e){return r0(e)[n.weekday-1]}function fv(n,e){return i0(e)[n.month-1]}function cv(n,e){return a0(e)[n.year<0?0:1]}function dv(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 r=Object.is(e,-0)||e<0,o=Math.abs(e),a=o===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return r?`${o} ${f} ago`:`in ${o} ${f}`}function lc(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const pv={D:Wa,DD:L_,DDD:F_,DDDD:I_,t:N_,tt:R_,ttt:j_,tttt:H_,T:q_,TT:V_,TTT:z_,TTTT:B_,f:U_,ff:Y_,fff:J_,ffff:Z_,F:W_,FF:K_,FFF:G_,FFFF:x_};class kn{static create(e,t={}){return new kn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let r=0;r<e.length;r++){const o=e.charAt(r);o==="'"?(i.length>0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||o===t?i+=o:(i.length>0&&l.push({literal:!1,val:i}),i=o,t=o)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return pv[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 zt(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,g)=>this.loc.extract(e,h,g),r=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",o=()=>i?av(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(h,g)=>i?fv(e,h):l(g?{month:h}:{month:h,day:"numeric"},"month"),u=(h,g)=>i?uv(e,h):l(g?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const g=kn.macroTokenToFormatOpts(h);return g?this.formatWithSystemDefault(e,g):h},c=h=>i?cv(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 r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({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 o();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 lc(kn.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=kn.parseFormat(t),r=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),o=e.shiftTo(...r.map(i).filter(a=>a));return lc(l,s(o))}}class Xn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Gl{get type(){throw new Pi}get name(){throw new Pi}get ianaName(){return this.name}get isUniversal(){throw new Pi}offsetName(e,t){throw new Pi}formatOffset(e,t){throw new Pi}offset(e){throw new Pi}equals(e){throw new Pi}get isValid(){throw new Pi}}let sa=null;class Ru extends Gl{static get instance(){return sa===null&&(sa=new Ru),sa}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Q_(e,t,i)}formatOffset(e,t){return Ol(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let Gr={};function hv(n){return Gr[n]||(Gr[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"})),Gr[n]}const mv={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function gv(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,r,o,a,u,f]=i;return[r,s,l,o,a,u,f]}function _v(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s<t.length;s++){const{type:l,value:r}=t[s],o=mv[l];l==="era"?i[o]=r:ht(o)||(i[o]=parseInt(r,10))}return i}let yr={};class $i extends Gl{static create(e){return yr[e]||(yr[e]=new $i(e)),yr[e]}static resetCache(){yr={},Gr={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=$i.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Q_(e,t,i,this.name)}formatOffset(e,t){return Ol(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const i=hv(this.name);let[s,l,r,o,a,u,f]=i.formatToParts?_v(i,t):gv(i,t);o==="BC"&&(s=-Math.abs(s)+1);const d=Nu({year:s,month:l,day:r,hour:a===24?0:a,minute:u,second:f,millisecond:0});let h=+t;const g=h%1e3;return h-=g>=0?g:1e3+g,(d-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let la=null;class pn extends Gl{static get utcInstance(){return la===null&&(la=new pn(0)),la}static instance(e){return e===0?pn.utcInstance:new pn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new pn(Do(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ol(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ol(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Ol(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 bv extends Gl{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 ji(n,e){if(ht(n)||n===null)return e;if(n instanceof Gl)return n;if(xy(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?pn.utcInstance:pn.parseSpecifier(t)||$i.create(n)}else return hs(n)?pn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new bv(n)}let rc=()=>Date.now(),oc="system",ac=null,uc=null,fc=null,cc;class Kt{static get now(){return rc}static set now(e){rc=e}static set defaultZone(e){oc=e}static get defaultZone(){return ji(oc,Ru.instance)}static get defaultLocale(){return ac}static set defaultLocale(e){ac=e}static get defaultNumberingSystem(){return uc}static set defaultNumberingSystem(e){uc=e}static get defaultOutputCalendar(){return fc}static set defaultOutputCalendar(e){fc=e}static get throwOnInvalid(){return cc}static set throwOnInvalid(e){cc=e}static resetCaches(){It.resetCache(),$i.resetCache()}}let dc={};function yv(n,e={}){const t=JSON.stringify([n,e]);let i=dc[t];return i||(i=new Intl.ListFormat(n,e),dc[t]=i),i}let Ka={};function Ja(n,e={}){const t=JSON.stringify([n,e]);let i=Ka[t];return i||(i=new Intl.DateTimeFormat(n,e),Ka[t]=i),i}let Ga={};function vv(n,e={}){const t=JSON.stringify([n,e]);let i=Ga[t];return i||(i=new Intl.NumberFormat(n,e),Ga[t]=i),i}let Za={};function kv(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Za[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Za[s]=l),l}let kl=null;function wv(){return kl||(kl=new Intl.DateTimeFormat().resolvedOptions().locale,kl)}function Sv(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Ja(n).resolvedOptions()}catch{t=Ja(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function $v(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function Cv(n){const e=[];for(let t=1;t<=12;t++){const i=Qe.utc(2016,t,1);e.push(n(i))}return e}function Mv(n){const e=[];for(let t=1;t<=7;t++){const i=Qe.utc(2016,11,13+t);e.push(n(i))}return e}function vr(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function Ov(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class Tv{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...r}=i;if(!t||Object.keys(r).length>0){const o={useGrouping:!1,...i};i.padTo>0&&(o.minimumIntegerDigits=i.padTo),this.inf=vv(e,o)}}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):Iu(e,3);return zt(t,this.padTo)}}}class Dv{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const r=-1*(e.offset/60),o=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;e.offset!==0&&$i.create(o).valid?(s=o,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:Qe.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=Ja(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class Av{constructor(e,t,i){this.opts={style:"long",...i},!t&&X_()&&(this.rtf=kv(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):dv(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class It{static fromOpts(e){return It.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Kt.defaultLocale,r=l||(s?"en-US":wv()),o=t||Kt.defaultNumberingSystem,a=i||Kt.defaultOutputCalendar;return new It(r,o,a,l)}static resetCache(){kl=null,Ka={},Ga={},Za={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return It.create(e,t,i)}constructor(e,t,i,s){const[l,r,o]=Sv(e);this.locale=l,this.numberingSystem=t||r||null,this.outputCalendar=i||o||null,this.intl=$v(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ov(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:It.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 vr(this,e,i,i0,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=Cv(r=>this.extract(r,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return vr(this,e,i,r0,()=>{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]=Mv(r=>this.extract(r,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return vr(this,void 0,e,()=>o0,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Qe.utc(2016,11,13,9),Qe.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return vr(this,e,t,a0,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Qe.utc(-40,1,1),Qe.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(),r=l.find(o=>o.type.toLowerCase()===i);return r?r.value:null}numberFormatter(e={}){return new Tv(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Dv(e,this.intl,t)}relFormatter(e={}){return new Av(this.intl,this.isEnglish(),e)}listFormatter(e={}){return yv(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 Xs(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Qs(...n){return e=>n.reduce(([t,i,s],l)=>{const[r,o,a]=l(e,s);return[{...t,...r},o||i,a]},[{},null,1]).slice(0,2)}function el(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 u0(...n){return(e,t)=>{const i={};let s;for(s=0;s<n.length;s++)i[n[s]]=Ri(e[t+s]);return[i,null,t+s]}}const f0=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Ev=`(?:${f0.source}?(?:\\[(${t0.source})\\])?)?`,ju=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,c0=RegExp(`${ju.source}${Ev}`),Hu=RegExp(`(?:T${c0.source})?`),Pv=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Lv=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Fv=/(\d{4})-?(\d{3})/,Iv=u0("weekYear","weekNumber","weekDay"),Nv=u0("year","ordinal"),Rv=/(\d{4})-(\d\d)-(\d\d)/,d0=RegExp(`${ju.source} ?(?:${f0.source}|(${t0.source}))?`),jv=RegExp(`(?: ${d0.source})?`);function Hs(n,e,t){const i=n[e];return ht(i)?t:Ri(i)}function Hv(n,e){return[{year:Hs(n,e),month:Hs(n,e+1,1),day:Hs(n,e+2,1)},null,e+3]}function tl(n,e){return[{hours:Hs(n,e,0),minutes:Hs(n,e+1,0),seconds:Hs(n,e+2,0),milliseconds:Fu(n[e+3])},null,e+4]}function Zl(n,e){const t=!n[e]&&!n[e+1],i=Do(n[e+1],n[e+2]),s=t?null:pn.instance(i);return[{},s,e+3]}function xl(n,e){const t=n[e]?$i.create(n[e]):null;return[{},t,e+1]}const qv=RegExp(`^T?${ju.source}$`),Vv=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function zv(n){const[e,t,i,s,l,r,o,a,u]=n,f=e[0]==="-",c=a&&a[0]==="-",d=(h,g=!1)=>h!==void 0&&(g||h&&f)?-h:h;return[{years:d(Qi(t)),months:d(Qi(i)),weeks:d(Qi(s)),days:d(Qi(l)),hours:d(Qi(r)),minutes:d(Qi(o)),seconds:d(Qi(a),a==="-0"),milliseconds:d(Fu(u),c)}]}const Bv={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 qu(n,e,t,i,s,l,r){const o={year:e.length===2?Ya(Ri(e)):Ri(e),month:n0.indexOf(t)+1,day:Ri(i),hour:Ri(s),minute:Ri(l)};return r&&(o.second=Ri(r)),n&&(o.weekday=n.length>3?s0.indexOf(n)+1:l0.indexOf(n)+1),o}const Uv=/^(?:(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 Wv(n){const[,e,t,i,s,l,r,o,a,u,f,c]=n,d=qu(e,s,i,t,l,r,o);let h;return a?h=Bv[a]:u?h=0:h=Do(f,c),[d,new pn(h)]}function Yv(n){return n.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Kv=/^(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$/,Jv=/^(Monday|Tuesday|Wedsday|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$/,Gv=/^(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 pc(n){const[,e,t,i,s,l,r,o]=n;return[qu(e,s,i,t,l,r,o),pn.utcInstance]}function Zv(n){const[,e,t,i,s,l,r,o]=n;return[qu(e,o,t,i,s,l,r),pn.utcInstance]}const xv=Xs(Pv,Hu),Xv=Xs(Lv,Hu),Qv=Xs(Fv,Hu),ek=Xs(c0),p0=Qs(Hv,tl,Zl,xl),tk=Qs(Iv,tl,Zl,xl),nk=Qs(Nv,tl,Zl,xl),ik=Qs(tl,Zl,xl);function sk(n){return el(n,[xv,p0],[Xv,tk],[Qv,nk],[ek,ik])}function lk(n){return el(Yv(n),[Uv,Wv])}function rk(n){return el(n,[Kv,pc],[Jv,pc],[Gv,Zv])}function ok(n){return el(n,[Vv,zv])}const ak=Qs(tl);function uk(n){return el(n,[qv,ak])}const fk=Xs(Rv,jv),ck=Xs(d0),dk=Qs(tl,Zl,xl);function pk(n){return el(n,[fk,p0],[ck,dk])}const hk="Invalid Duration",h0={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}},mk={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},...h0},Nn=146097/400,As=146097/4800,gk={years:{quarters:4,months:12,weeks:Nn/7,days:Nn,hours:Nn*24,minutes:Nn*24*60,seconds:Nn*24*60*60,milliseconds:Nn*24*60*60*1e3},quarters:{months:3,weeks:Nn/28,days:Nn/4,hours:Nn*24/4,minutes:Nn*24*60/4,seconds:Nn*24*60*60/4,milliseconds:Nn*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},...h0},ls=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],_k=ls.slice(0).reverse();function es(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 _t(i)}function bk(n){return n<0?Math.floor(n):Math.ceil(n)}function m0(n,e,t,i,s){const l=n[s][t],r=e[t]/l,o=Math.sign(r)===Math.sign(i[s]),a=!o&&i[s]!==0&&Math.abs(r)<=1?bk(r):Math.trunc(r);i[s]+=a,e[t]-=a*l}function yk(n,e){_k.reduce((t,i)=>ht(e[i])?t:(t&&m0(n,e,t,e,i),i),null)}class _t{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||It.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?gk:mk,this.isLuxonDuration=!0}static fromMillis(e,t){return _t.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new qn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new _t({values:ro(e,_t.normalizeUnit),loc:It.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(hs(e))return _t.fromMillis(e);if(_t.isDuration(e))return e;if(typeof e=="object")return _t.fromObject(e);throw new qn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=ok(e);return i?_t.fromObject(i,t):_t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=uk(e);return i?_t.fromObject(i,t):_t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new qn("need to specify a reason the Duration is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Kt.throwOnInvalid)throw new Jy(i);return new _t({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 P_(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?kn.create(this.loc,i).formatDurationFromString(this,e):hk}toHuman(e={}){const t=ls.map(i=>{const s=this.values[i];return ht(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+=Iu(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=_t.fromDurationLike(e),i={};for(const s of ls)(Ys(t.values,s)||Ys(this.values,s))&&(i[s]=t.get(s)+this.get(s));return es(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=_t.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]=e0(e(this.values[i],i));return es(this,{values:t},!0)}get(e){return this[_t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...ro(e,_t.normalizeUnit)};return es(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),es(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return yk(this.matrix,e),es(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(r=>_t.normalizeUnit(r));const t={},i={},s=this.toObject();let l;for(const r of ls)if(e.indexOf(r)>=0){l=r;let o=0;for(const u in i)o+=this.matrix[u][r]*i[u],i[u]=0;hs(s[r])&&(o+=s[r]);const a=Math.trunc(o);t[r]=a,i[r]=(o*1e3-a*1e3)/1e3;for(const u in s)ls.indexOf(u)>ls.indexOf(r)&&m0(this.matrix,s,u,t,r)}else hs(s[r])&&(i[r]=s[r]);for(const r in i)i[r]!==0&&(t[l]+=r===l?i[r]:i[r]/this.matrix[l][r]);return es(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 es(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 ls)if(!t(this.values[i],e.values[i]))return!1;return!0}}const ol="Invalid Interval";function vk(n,e){return!n||!n.isValid?Nt.invalid("missing or invalid start"):!e||!e.isValid?Nt.invalid("missing or invalid end"):e<n?Nt.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${e.toISO()}`):null}class Nt{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new qn("need to specify a reason the Interval is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Kt.throwOnInvalid)throw new Ky(i);return new Nt({invalid:i})}static fromDateTimes(e,t){const i=fl(e),s=fl(t),l=vk(i,s);return l==null?new Nt({start:i,end:s}):l}static after(e,t){const i=_t.fromDurationLike(t),s=fl(e);return Nt.fromDateTimes(s,s.plus(i))}static before(e,t){const i=_t.fromDurationLike(t),s=fl(e);return Nt.fromDateTimes(s.minus(i),s)}static fromISO(e,t){const[i,s]=(e||"").split("/",2);if(i&&s){let l,r;try{l=Qe.fromISO(i,t),r=l.isValid}catch{r=!1}let o,a;try{o=Qe.fromISO(s,t),a=o.isValid}catch{a=!1}if(r&&a)return Nt.fromDateTimes(l,o);if(r){const u=_t.fromISO(s,t);if(u.isValid)return Nt.after(l,u)}else if(a){const u=_t.fromISO(i,t);if(u.isValid)return Nt.before(o,u)}}return Nt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds"){if(!this.isValid)return NaN;const t=this.start.startOf(e),i=this.end.startOf(e);return Math.floor(i.diff(t,e).get(e))+1}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!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?Nt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(fl).filter(r=>this.contains(r)).sort(),i=[];let{s}=this,l=0;for(;s<this.e;){const r=t[l]||this.e,o=+r>+this.e?this.e:r;i.push(Nt.fromDateTimes(s,o)),s=o,l+=1}return i}splitBy(e){const t=_t.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const r=[];for(;i<this.e;){const o=this.start.plus(t.mapUnits(a=>a*s));l=+o>+this.e?this.e:o,r.push(Nt.fromDateTimes(i,l)),i=l,s+=1}return r}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=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<e.e?this.e:e.e;return t>=i?null:Nt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return Nt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],r)=>l?l.overlaps(r)||l.abutsStart(r)?[s,l.union(r)]:[s.concat([l]),r]:[s,r],[[],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"}]),r=Array.prototype.concat(...l),o=r.sort((a,u)=>a.time-u.time);for(const a of o)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(Nt.fromDateTimes(t,a.time)),t=null);return Nt.merge(s)}difference(...e){return Nt.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()})`:ol}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:ol}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ol}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:ol}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:ol}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):_t.invalid(this.invalidReason)}mapEndpoints(e){return Nt.fromDateTimes(e(this.s),e(this.e))}}class kr{static hasDST(e=Kt.defaultZone){const t=Qe.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return $i.isValidZone(e)}static normalizeZone(e){return ji(e,Kt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||It.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||It.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||It.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||It.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return It.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return It.create(t,null,"gregory").eras(e)}static features(){return{relative:X_()}}}function hc(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(_t.fromMillis(i).as("days"))}function kk(n,e,t){const i=[["years",(o,a)=>a.year-o.year],["quarters",(o,a)=>a.quarter-o.quarter],["months",(o,a)=>a.month-o.month+(a.year-o.year)*12],["weeks",(o,a)=>{const u=hc(o,a);return(u-u%7)/7}],["days",hc]],s={};let l,r;for(const[o,a]of i)if(t.indexOf(o)>=0){l=o;let u=a(n,e);r=n.plus({[o]:u}),r>e?(n=n.plus({[o]:u-1}),u-=1):n=r,s[o]=u}return[n,s,r,l]}function wk(n,e,t,i){let[s,l,r,o]=kk(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(r<e&&(r=s.plus({[o]:1})),r!==s&&(l[o]=(l[o]||0)+a/(r-s)));const f=_t.fromObject(l,i);return u.length>0?_t.fromMillis(a,i).shiftTo(...u).plus(f):f}const Vu={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"},mc={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]},Sk=Vu.hanidec.replace(/[\[|\]]/g,"").split("");function $k(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t<n.length;t++){const i=n.charCodeAt(t);if(n[t].search(Vu.hanidec)!==-1)e+=Sk.indexOf(n[t]);else for(const s in mc){const[l,r]=mc[s];i>=l&&i<=r&&(e+=i-l)}}return parseInt(e,10)}else return e}function Zn({numberingSystem:n},e=""){return new RegExp(`${Vu[n||"latn"]}${e}`)}const Ck="missing Intl.DateTimeFormat.formatToParts support";function vt(n,e=t=>t){return{regex:n,deser:([t])=>e($k(t))}}const Mk=String.fromCharCode(160),g0=`[ ${Mk}]`,_0=new RegExp(g0,"g");function Ok(n){return n.replace(/\./g,"\\.?").replace(_0,g0)}function gc(n){return n.replace(/\./g,"").replace(_0," ").toLowerCase()}function xn(n,e){return n===null?null:{regex:RegExp(n.map(Ok).join("|")),deser:([t])=>n.findIndex(i=>gc(t)===gc(i))+e}}function _c(n,e){return{regex:n,deser:([,t,i])=>Do(t,i),groups:e}}function ra(n){return{regex:n,deser:([e])=>e}}function Tk(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Dk(n,e){const t=Zn(e),i=Zn(e,"{2}"),s=Zn(e,"{3}"),l=Zn(e,"{4}"),r=Zn(e,"{6}"),o=Zn(e,"{1,2}"),a=Zn(e,"{1,3}"),u=Zn(e,"{1,6}"),f=Zn(e,"{1,9}"),c=Zn(e,"{2,4}"),d=Zn(e,"{4,6}"),h=b=>({regex:RegExp(Tk(b.val)),deser:([v])=>v,literal:!0}),y=(b=>{if(n.literal)return h(b);switch(b.val){case"G":return xn(e.eras("short",!1),0);case"GG":return xn(e.eras("long",!1),0);case"y":return vt(u);case"yy":return vt(c,Ya);case"yyyy":return vt(l);case"yyyyy":return vt(d);case"yyyyyy":return vt(r);case"M":return vt(o);case"MM":return vt(i);case"MMM":return xn(e.months("short",!0,!1),1);case"MMMM":return xn(e.months("long",!0,!1),1);case"L":return vt(o);case"LL":return vt(i);case"LLL":return xn(e.months("short",!1,!1),1);case"LLLL":return xn(e.months("long",!1,!1),1);case"d":return vt(o);case"dd":return vt(i);case"o":return vt(a);case"ooo":return vt(s);case"HH":return vt(i);case"H":return vt(o);case"hh":return vt(i);case"h":return vt(o);case"mm":return vt(i);case"m":return vt(o);case"q":return vt(o);case"qq":return vt(i);case"s":return vt(o);case"ss":return vt(i);case"S":return vt(a);case"SSS":return vt(s);case"u":return ra(f);case"uu":return ra(o);case"uuu":return vt(t);case"a":return xn(e.meridiems(),0);case"kkkk":return vt(l);case"kk":return vt(c,Ya);case"W":return vt(o);case"WW":return vt(i);case"E":case"c":return vt(t);case"EEE":return xn(e.weekdays("short",!1,!1),1);case"EEEE":return xn(e.weekdays("long",!1,!1),1);case"ccc":return xn(e.weekdays("short",!0,!1),1);case"cccc":return xn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return _c(new RegExp(`([+-]${o.source})(?::(${i.source}))?`),2);case"ZZZ":return _c(new RegExp(`([+-]${o.source})(${i.source})?`),2);case"z":return ra(/[a-z_+-/]{1,256}?/i);default:return h(b)}})(n)||{invalidReason:Ck};return y.token=n,y}const Ak={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 Ek(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let r=Ak[i];if(typeof r=="object"&&(r=r[l]),r)return{literal:!1,val:r}}function Pk(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function Lk(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const r in t)if(Ys(t,r)){const o=t[r],a=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function Fk(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 ht(n.z)||(t=$i.create(n.z)),ht(n.Z)||(t||(t=new pn(n.Z)),i=n.Z),ht(n.q)||(n.M=(n.q-1)*3+1),ht(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),ht(n.u)||(n.S=Fu(n.u)),[Object.keys(n).reduce((l,r)=>{const o=e(r);return o&&(l[o]=n[r]),l},{}),t,i]}let oa=null;function Ik(){return oa||(oa=Qe.fromMillis(1555555555555)),oa}function Nk(n,e){if(n.literal)return n;const t=kn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=kn.create(e,t).formatDateTimeParts(Ik()).map(r=>Ek(r,e,t));return l.includes(void 0)?n:l}function Rk(n,e){return Array.prototype.concat(...n.map(t=>Nk(t,e)))}function b0(n,e,t){const i=Rk(kn.parseFormat(t),n),s=i.map(r=>Dk(r,n)),l=s.find(r=>r.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[r,o]=Pk(s),a=RegExp(r,"i"),[u,f]=Lk(e,a,o),[c,d,h]=f?Fk(f):[null,null,void 0];if(Ys(f,"a")&&Ys(f,"H"))throw new vl("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 jk(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:r}=b0(n,e,t);return[i,s,l,r]}const y0=[0,31,59,90,120,151,181,212,243,273,304,334],v0=[0,31,60,91,121,152,182,213,244,274,305,335];function zn(n,e){return new Xn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function k0(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 w0(n,e,t){return t+(Jl(n)?v0:y0)[e-1]}function S0(n,e){const t=Jl(n)?v0:y0,i=t.findIndex(l=>l<e),s=e-t[i];return{month:i+1,day:s}}function xa(n){const{year:e,month:t,day:i}=n,s=w0(e,t,i),l=k0(e,t,i);let r=Math.floor((s-l+10)/7),o;return r<1?(o=e-1,r=lo(o)):r>lo(e)?(o=e+1,r=1):o=e,{weekYear:o,weekNumber:r,weekday:l,...Ao(n)}}function bc(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=k0(e,1,4),l=Ml(e);let r=t*7+i-s-3,o;r<1?(o=e-1,r+=Ml(o)):r>l?(o=e+1,r-=Ml(e)):o=e;const{month:a,day:u}=S0(o,r);return{year:o,month:a,day:u,...Ao(n)}}function aa(n){const{year:e,month:t,day:i}=n,s=w0(e,t,i);return{year:e,ordinal:s,...Ao(n)}}function yc(n){const{year:e,ordinal:t}=n,{month:i,day:s}=S0(e,t);return{year:e,month:i,day:s,...Ao(n)}}function Hk(n){const e=To(n.weekYear),t=wi(n.weekNumber,1,lo(n.weekYear)),i=wi(n.weekday,1,7);return e?t?i?!1:zn("weekday",n.weekday):zn("week",n.week):zn("weekYear",n.weekYear)}function qk(n){const e=To(n.year),t=wi(n.ordinal,1,Ml(n.year));return e?t?!1:zn("ordinal",n.ordinal):zn("year",n.year)}function $0(n){const e=To(n.year),t=wi(n.month,1,12),i=wi(n.day,1,so(n.year,n.month));return e?t?i?!1:zn("day",n.day):zn("month",n.month):zn("year",n.year)}function C0(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=wi(e,0,23)||e===24&&t===0&&i===0&&s===0,r=wi(t,0,59),o=wi(i,0,59),a=wi(s,0,999);return l?r?o?a?!1:zn("millisecond",s):zn("second",i):zn("minute",t):zn("hour",e)}const ua="Invalid DateTime",vc=864e13;function wr(n){return new Xn("unsupported zone",`the zone "${n.name}" is not supported`)}function fa(n){return n.weekData===null&&(n.weekData=xa(n.c)),n.weekData}function al(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Qe({...t,...e,old:t})}function M0(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 kc(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 Zr(n,e,t){return M0(Nu(n),e,t)}function wc(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,so(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},r=_t.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"),o=Nu(l);let[a,u]=M0(o,t,n.zone);return r!==0&&(a+=r,u=n.zone.offset(a)),{ts:a,o:u}}function ul(n,e,t,i,s,l){const{setZone:r,zone:o}=t;if(n&&Object.keys(n).length!==0){const a=e||o,u=Qe.fromObject(n,{...t,zone:a,specificOffset:l});return r?u:u.setZone(o)}else return Qe.invalid(new Xn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Sr(n,e,t=!0){return n.isValid?kn.create(It.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function ca(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=zt(n.c.year,t?6:4),e?(i+="-",i+=zt(n.c.month),i+="-",i+=zt(n.c.day)):(i+=zt(n.c.month),i+=zt(n.c.day)),i}function Sc(n,e,t,i,s,l){let r=zt(n.c.hour);return e?(r+=":",r+=zt(n.c.minute),(n.c.second!==0||!t)&&(r+=":")):r+=zt(n.c.minute),(n.c.second!==0||!t)&&(r+=zt(n.c.second),(n.c.millisecond!==0||!i)&&(r+=".",r+=zt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?r+="Z":n.o<0?(r+="-",r+=zt(Math.trunc(-n.o/60)),r+=":",r+=zt(Math.trunc(-n.o%60))):(r+="+",r+=zt(Math.trunc(n.o/60)),r+=":",r+=zt(Math.trunc(n.o%60)))),l&&(r+="["+n.zone.ianaName+"]"),r}const O0={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Vk={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},zk={ordinal:1,hour:0,minute:0,second:0,millisecond:0},T0=["year","month","day","hour","minute","second","millisecond"],Bk=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Uk=["year","ordinal","hour","minute","second","millisecond"];function $c(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 P_(n);return e}function Cc(n,e){const t=ji(e.zone,Kt.defaultZone),i=It.fromObject(e),s=Kt.now();let l,r;if(ht(n.year))l=s;else{for(const u of T0)ht(n[u])&&(n[u]=O0[u]);const o=$0(n)||C0(n);if(o)return Qe.invalid(o);const a=t.offset(s);[l,r]=Zr(n,a,t)}return new Qe({ts:l,zone:t,loc:i,o:r})}function Mc(n,e,t){const i=ht(t.round)?!0:t.round,s=(r,o)=>(r=Iu(r,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(r,o)),l=r=>t.calendary?e.hasSame(n,r)?0:e.startOf(r).diff(n.startOf(r),r).get(r):e.diff(n,r).get(r);if(t.unit)return s(l(t.unit),t.unit);for(const r of t.units){const o=l(r);if(Math.abs(o)>=1)return s(o,r)}return s(n>e?-0:0,t.units[t.units.length-1])}function Oc(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 Qe{constructor(e){const t=e.zone||Kt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Xn("invalid input"):null)||(t.isValid?null:wr(t));this.ts=ht(e.ts)?Kt.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 o=t.offset(this.ts);s=kc(this.ts,o),i=Number.isNaN(s.year)?new Xn("invalid input"):null,s=i?null:s,l=i?null:o}this._zone=t,this.loc=e.loc||It.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Qe({})}static local(){const[e,t]=Oc(arguments),[i,s,l,r,o,a,u]=t;return Cc({year:i,month:s,day:l,hour:r,minute:o,second:a,millisecond:u},e)}static utc(){const[e,t]=Oc(arguments),[i,s,l,r,o,a,u]=t;return e.zone=pn.utcInstance,Cc({year:i,month:s,day:l,hour:r,minute:o,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=Xy(e)?e.valueOf():NaN;if(Number.isNaN(i))return Qe.invalid("invalid input");const s=ji(t.zone,Kt.defaultZone);return s.isValid?new Qe({ts:i,zone:s,loc:It.fromObject(t)}):Qe.invalid(wr(s))}static fromMillis(e,t={}){if(hs(e))return e<-vc||e>vc?Qe.invalid("Timestamp out of range"):new Qe({ts:e,zone:ji(t.zone,Kt.defaultZone),loc:It.fromObject(t)});throw new qn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(hs(e))return new Qe({ts:e*1e3,zone:ji(t.zone,Kt.defaultZone),loc:It.fromObject(t)});throw new qn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=ji(t.zone,Kt.defaultZone);if(!i.isValid)return Qe.invalid(wr(i));const s=Kt.now(),l=ht(t.specificOffset)?i.offset(s):t.specificOffset,r=ro(e,$c),o=!ht(r.ordinal),a=!ht(r.year),u=!ht(r.month)||!ht(r.day),f=a||u,c=r.weekYear||r.weekNumber,d=It.fromObject(t);if((f||o)&&c)throw new vl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new vl("Can't mix ordinal dates with month/day");const h=c||r.weekday&&!f;let g,y,b=kc(s,l);h?(g=Bk,y=Vk,b=xa(b)):o?(g=Uk,y=zk,b=aa(b)):(g=T0,y=O0);let v=!1;for(const D of g){const P=r[D];ht(P)?v?r[D]=y[D]:r[D]=b[D]:v=!0}const S=h?Hk(r):o?qk(r):$0(r),$=S||C0(r);if($)return Qe.invalid($);const C=h?bc(r):o?yc(r):r,[M,T]=Zr(C,l,i),E=new Qe({ts:M,zone:i,o:T,loc:d});return r.weekday&&f&&e.weekday!==E.weekday?Qe.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${E.toISO()}`):E}static fromISO(e,t={}){const[i,s]=sk(e);return ul(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=lk(e);return ul(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=rk(e);return ul(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(ht(e)||ht(t))throw new qn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,r=It.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[o,a,u,f]=jk(r,e,t);return f?Qe.invalid(f):ul(o,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Qe.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=pk(e);return ul(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new qn("need to specify a reason the DateTime is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Kt.throwOnInvalid)throw new Yy(i);return new Qe({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?fa(this).weekYear:NaN}get weekNumber(){return this.isValid?fa(this).weekNumber:NaN}get weekday(){return this.isValid?fa(this).weekday:NaN}get ordinal(){return this.isValid?aa(this.c).ordinal:NaN}get monthShort(){return this.isValid?kr.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?kr.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?kr.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?kr.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 Jl(this.year)}get daysInMonth(){return so(this.year,this.month)}get daysInYear(){return this.isValid?Ml(this.year):NaN}get weeksInWeekYear(){return this.isValid?lo(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=kn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(pn.instance(e),t)}toLocal(){return this.setZone(Kt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=ji(e,Kt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),r=this.toObject();[s]=Zr(r,l,e)}return al(this,{ts:s,zone:e})}else return Qe.invalid(wr(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return al(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=ro(e,$c),i=!ht(t.weekYear)||!ht(t.weekNumber)||!ht(t.weekday),s=!ht(t.ordinal),l=!ht(t.year),r=!ht(t.month)||!ht(t.day),o=l||r,a=t.weekYear||t.weekNumber;if((o||s)&&a)throw new vl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(r&&s)throw new vl("Can't mix ordinal dates with month/day");let u;i?u=bc({...xa(this.c),...t}):ht(t.ordinal)?(u={...this.toObject(),...t},ht(t.day)&&(u.day=Math.min(so(u.year,u.month),u.day))):u=yc({...aa(this.c),...t});const[f,c]=Zr(u,this.o,this.zone);return al(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=_t.fromDurationLike(e);return al(this,wc(this,t))}minus(e){if(!this.isValid)return this;const t=_t.fromDurationLike(e).negate();return al(this,wc(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=_t.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?kn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ua}toLocaleString(e=Wa,t={}){return this.isValid?kn.create(this.loc.clone(t),e).formatDateTime(this):ua}toLocaleParts(e={}){return this.isValid?kn.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 r=e==="extended";let o=ca(this,r);return o+="T",o+=Sc(this,r,t,i,s,l),o}toISODate({format:e="extended"}={}){return this.isValid?ca(this,e==="extended"):null}toISOWeekDate(){return Sr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:r="extended"}={}){return this.isValid?(s?"T":"")+Sc(this,r==="extended",t,e,i,l):null}toRFC2822(){return Sr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Sr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ca(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")),Sr(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():ua}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 _t.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=Qy(t).map(_t.normalizeUnit),r=e.valueOf()>this.valueOf(),o=r?this:e,a=r?e:this,u=wk(o,a,l,s);return r?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Qe.now(),e,t)}until(e){return this.isValid?Nt.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||Qe.fromObject({},{zone:this.zone}),i=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],l=e.unit;return Array.isArray(e.unit)&&(s=e.unit,l=void 0),Mc(t,this.plus(i),{...e,numeric:"always",units:s,unit:l})}toRelativeCalendar(e={}){return this.isValid?Mc(e.base||Qe.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Qe.isDateTime))throw new qn("min requires all arguments be DateTimes");return sc(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(Qe.isDateTime))throw new qn("max requires all arguments be DateTimes");return sc(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,r=It.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return b0(r,e,t)}static fromStringExplain(e,t,i={}){return Qe.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Wa}static get DATE_MED(){return L_}static get DATE_MED_WITH_WEEKDAY(){return Gy}static get DATE_FULL(){return F_}static get DATE_HUGE(){return I_}static get TIME_SIMPLE(){return N_}static get TIME_WITH_SECONDS(){return R_}static get TIME_WITH_SHORT_OFFSET(){return j_}static get TIME_WITH_LONG_OFFSET(){return H_}static get TIME_24_SIMPLE(){return q_}static get TIME_24_WITH_SECONDS(){return V_}static get TIME_24_WITH_SHORT_OFFSET(){return z_}static get TIME_24_WITH_LONG_OFFSET(){return B_}static get DATETIME_SHORT(){return U_}static get DATETIME_SHORT_WITH_SECONDS(){return W_}static get DATETIME_MED(){return Y_}static get DATETIME_MED_WITH_SECONDS(){return K_}static get DATETIME_MED_WITH_WEEKDAY(){return Zy}static get DATETIME_FULL(){return J_}static get DATETIME_FULL_WITH_SECONDS(){return G_}static get DATETIME_HUGE(){return Z_}static get DATETIME_HUGE_WITH_SECONDS(){return x_}}function fl(n){if(Qe.isDateTime(n))return n;if(n&&n.valueOf&&hs(n.valueOf()))return Qe.fromJSDate(n);if(n&&typeof n=="object")return Qe.fromObject(n);throw new qn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}class W{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-01T00:00:00Z"||e==="0001-01-01"||typeof e=="undefined"||Array.isArray(e)&&e.length===0||W.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 W.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!W.isEmpty(e[t]))return!0;return!1}static isObjectArrayWithKeys(e,t){if(!Array.isArray(e)||typeof e[0]!="object")return!1;if(e.length==0)return!0;let i=W.toArray(t);for(let s of i)if(!(s in e[0]))return!1;return!0}static toArray(e,t=!1){return Array.isArray(e)?e:(t||e!==null)&&typeof e!="undefined"?[e]:[]}static inArray(e,t){for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){W.inArray(e,t)||e.push(t)}static findByKey(e,t,i){for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){let 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"){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]=W.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},r=t.split(s);for(const o of r){if(!W.isObject(l)&&!Array.isArray(l)||typeof l[o]=="undefined")return i;l=l[o]}return l}static setByPath(e,t,i,s="."){if(!W.isObject(e)&&!Array.isArray(e)){console.warn("setByPath: data not an object or array.");return}let l=e,r=t.split(s),o=r.pop();for(const a of r)(!W.isObject(l)&&!Array.isArray(l)||!W.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[o]=i}static deleteByPath(e,t,i="."){let s=e||{},l=t.split(i),r=l.pop();for(const o of l)(!W.isObject(s)&&!Array.isArray(s)||!W.isObject(s[o])&&!Array.isArray(s[o]))&&(s[o]={}),s=s[o];Array.isArray(s)?s.splice(r,1):W.isObject(s)&&delete s[r],l.length>0&&(Array.isArray(s)&&!s.length||W.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||W.isObject(e)&&Object.keys(e).length>0)&&W.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s<e;s++)t+=i.charAt(Math.floor(Math.random()*i.length));return t}static sentenize(e,t=!0){if(typeof e!="string")return"";if(e=e.trim().split("_").join(" "),e==="")return e;if(e=e[0].toUpperCase()+e.substring(1),t){let i=e[e.length-1];i!=="."&&i!=="?"&&i!=="!"&&(e+=".")}return e}static slugify(e,t="_",i=[".","=","-"]){if(e==="")return"";const s={a:/а|à|á|å|â/gi,b:/б/gi,c:/ц|ç/gi,d:/д/gi,e:/е|è|é|ê|ẽ|ë/gi,f:/ф/gi,g:/г/gi,h:/х/gi,i:/й|и|ì|í|î/gi,j:/ж/gi,k:/к/gi,l:/л/gi,m:/м/gi,n:/н|ñ/gi,o:/о|ò|ó|ô|ø/gi,p:/п/gi,q:/я/gi,r:/р/gi,s:/с/gi,t:/т/gi,u:/ю|ù|ú|ů|û/gi,v:/в/gi,w:/в/gi,x:/ь/gi,y:/ъ/gi,z:/з/gi,ae:/ä|æ/gi,oe:/ö/gi,ue:/ü/gi,Ae:/Ä/gi,Ue:/Ü/gi,Oe:/Ö/gi,ss:/ß/gi,and:/&/gi};for(let r in s)e=e.replace(s[r],r);const l=e.replace(new RegExp("["+i.join("")+"]","g")," ").replace(/[^\w\ ]/gi,"").replace(/\s+/g,t);return l.charAt(0).toLowerCase()+l.slice(1)}static escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static splitNonEmpty(e,t=","){const i=(e||"").split(t),s=[];for(let l of i)l=l.trim(),W.isEmpty(l)||s.push(l);return s}static joinNonEmpty(e,t=", "){const i=[];for(let s of e)s=typeof s=="string"?s.trim():"",W.isEmpty(s)||i.push(s);return i.join(t)}static getDateTime(e){if(typeof e=="string"){const t="yyyy-MM-dd HH:mm:ss",i="yyyy-MM-dd HH:mm:ss.SSS",s=e.length===i.length?i:t;return Qe.fromFormat(e,s,{zone:"UTC"})}return Qe.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return W.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return W.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{console.warn("Failed to copy.",i)})}static openInWindow(e,t,i,s){t=t||1024,i=i||768,s=s||"popup";let l=window.innerWidth,r=window.innerHeight;t=t>l?l:t,i=i>r?r:i;let o=l/2-t/2,a=r/2-i/2;return window.open(e,s,"width="+t+",height="+i+",top="+a+",left="+o+",resizable,menubar=no")}static getQueryString(e){let t=e.indexOf("?");if(t<0)return"";let i=e.indexOf("#");return e.substring(t+1,i>t?i:e.length)}static getQueryParams(e){let t={},i=W.getQueryString(e).split("&");for(let s in i){let l=i[s].split("=");if(l.length===2){let r=decodeURIComponent(l[1]);if(r.startsWith("{")||r.startsWith("["))try{r=JSON.parse(r)}catch{}t[decodeURIComponent(l[0])]=r}}return t}static setQueryParams(e,t,i=!0){let s=W.getQueryString(e),l=i&&s?W.getQueryParams(e):{},r=Object.assign(l,t),o="";for(let a in r)W.isEmpty(r[a])||(o&&(o+="&"),o+=encodeURIComponent(a)+"=",W.isObject(r[a])?o+=encodeURIComponent(JSON.stringify(r[a])):o+=encodeURIComponent(r[a]));return o=o?"?"+o:"",W.isEmpty(s)?e+o:e.replace("?"+s,o)}static replaceClientQueryParams(e){let t=W.setQueryParams(window.location.href,e);window.location.replace(t)}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return/\.jpg|\.jpeg|\.png|\.svg|\.webp|\.avif$/.test(e)}static checkImageUrl(e){return new Promise((t,i)=>{const s=new Image;s.onload=function(){return t(!0)},s.onerror=function(l){return i(l)},s.src=e})}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(r){let o=new Image;o.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=o.width,c=o.height;return a.width=t,a.height=i,u.drawImage(o,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},o.src=r.target.result},l.readAsDataURL(e)})}static setDocumentTitle(e,t="PocketBase"){let i=[];W.isEmpty(e)||i.push(e.trim()),W.isEmpty(t)||i.push(t.trim()),document.title=i.join(" - ")}static addValueToFormData(e,t,i){if(typeof i!="undefined")if(W.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)W.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):W.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,r,o,a;const t=(e==null?void 0:e.schema)||[],i={"@collectionId":e==null?void 0:e.id,"@collectionName":e==null?void 0:e.name,id:"RECORD_ID",created:"2022-01-01 01:00:00",updated:"2022-01-01 23:59:59"};for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON (array/object)":u.type==="file"?(f="filename.jpg",((s=u.options)==null?void 0:s.maxSelect)>1&&(f=[f])):u.type==="select"?(f=(r=(l=u.options)==null?void 0:l.values)==null?void 0:r[0],((o=u.options)==null?void 0:o.maxSelect)>1&&(f=[f])):u.type==="relation"||u.type==="user"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)>1&&(f=[f])):f="test",i[u.name]=f}return i}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=e||{},e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":case"user":return((t=e.options)==null?void 0:t.maxSelect)>1?"Array<String>":"String";default:return"String"}}}const zu=Ti([]);function mn(n,e=3e3){return A0(n,"success",e)}function D0(n,e=4500){return A0(n,"error",e)}function A0(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{E0(i)},t)};zu.update(s=>(P0(s,i.message),W.pushOrReplaceByKey(s,i,"message"),s))}function E0(n){zu.update(e=>(P0(e,n),e))}function P0(n,e){let t;typeof e=="string"?t=W.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),W.removeByKey(n,"message",t.message))}const ys=Ti({});function Ki(n){ys.set(n||{})}function L0(n){ys.update(e=>(W.deleteByPath(e,n),e))}const Bu=Ti({});function Xa(n){Bu.set(n||{})}Lu.prototype.logout=function(n=!0){this.AuthStore.clear(),n&&Zs("/login")};Lu.prototype.errorResponseHandler=function(n,e=!0,t=""){var l,r;if(!n||!(n instanceof Error))return;const i=((l=n==null?void 0:n.response)==null?void 0:l.status)<<0||400,s=((r=n==null?void 0:n.response)==null?void 0:r.data)||{};if(e&&i!==404){let o=s.message||n.message||t;o&&D0(o)}if(W.isEmpty(s.data)||Ki(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Zs("/")};class Wk extends D_{save(e,t){super.save(e,t),t instanceof Ws&&Xa(t)}clear(){super.clear(),Xa(null)}}const ke=new Lu("/","en-US",new Wk("pb_admin_auth"));ke.AuthStore.model instanceof Ws&&Xa(ke.AuthStore.model);function Tc(n){let e,t,i;return{c(){e=_("div"),e.innerHTML=`<figure class="logo"><img src="/_/images/logo.svg" alt="PocketBase logo" width="40" height="40"/> 
+                    <span class="txt">Pocket<strong>Base</strong></span></figure>`,t=O(),i=_("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function Yk(n){let e,t,i,s,l,r,o,a,u=!n[0]&&Tc();const f=n[2].default,c=Dn(f,n,n[1],null);return{c(){e=_("div"),t=_("div"),i=O(),s=_("div"),u&&u.c(),l=O(),c&&c.c(),r=O(),o=_("div"),p(t,"class","flex-fill"),p(s,"class","wrapper wrapper-sm m-b-xl svelte-1wbawr2"),p(o,"class","flex-fill"),p(e,"class","page-wrapper full-page-panel svelte-1wbawr2")},m(d,h){w(d,e,h),m(e,t),m(e,i),m(e,s),u&&u.m(s,null),m(s,l),c&&c.m(s,null),m(e,r),m(e,o),a=!0},p(d,[h]){d[0]?u&&(u.d(1),u=null):u||(u=Tc(),u.c(),u.m(s,l)),c&&c.p&&(!a||h&2)&&En(c,f,d,d[1],a?An(f,d[1],h,null):Pn(d[1]),null)},i(d){a||(A(c,d),a=!0)},o(d){F(c,d),a=!1},d(d){d&&k(e),u&&u.d(),c&&c.d(d)}}}function Kk(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=r=>{"nobranding"in r&&t(0,l=r.nobranding),"$$scope"in r&&t(1,s=r.$$scope)},[l,s,i]}class F0 extends Pe{constructor(e){super(),Ee(this,e,Kk,Yk,De,{nobranding:0})}}function Dc(n,e,t){const i=n.slice();return i[11]=e[t],i}const Jk=n=>({}),Ac=n=>({uniqueId:n[3]});function Gk(n){let e=(n[11]||oo)+"",t;return{c(){t=H(e)},m(i,s){w(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||oo)+"")&&ge(t,e)},d(i){i&&k(t)}}}function Zk(n){var i,s;let e=(((i=n[11])==null?void 0:i.message)||((s=n[11])==null?void 0:s.code)||oo)+"",t;return{c(){t=H(e)},m(l,r){w(l,t,r)},p(l,r){var o,a;r&4&&e!==(e=(((o=l[11])==null?void 0:o.message)||((a=l[11])==null?void 0:a.code)||oo)+"")&&ge(t,e)},d(l){l&&k(t)}}}function Ec(n){let e,t;function i(r,o){return typeof r[11]=="object"?Zk:Gk}let s=i(n),l=s(n);return{c(){e=_("div"),l.c(),t=O(),p(e,"class","help-block help-block-error")},m(r,o){w(r,e,o),l.m(e,null),m(e,t)},p(r,o){s===(s=i(r))&&l?l.p(r,o):(l.d(1),l=s(r),l&&(l.c(),l.m(e,t)))},d(r){r&&k(e),l.d()}}}function xk(n){let e,t,i,s,l;const r=n[7].default,o=Dn(r,n,n[6],Ac);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=Ec(Dc(n,a,f));return{c(){e=_("div"),o&&o.c(),t=O();for(let f=0;f<u.length;f+=1)u[f].c();p(e,"class",n[0]),ee(e,"error",n[2].length)},m(f,c){w(f,e,c),o&&o.m(e,null),m(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=Q(e,"click",n[8]),s=!0)},p(f,[c]){if(o&&o.p&&(!i||c&64)&&En(o,r,f,f[6],i?An(r,f[6],c,Jk):Pn(f[6]),Ac),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const h=Dc(f,a,d);u[d]?u[d].p(h,c):(u[d]=Ec(h),u[d].c(),u[d].m(e,null))}for(;d<u.length;d+=1)u[d].d(1);u.length=a.length}(!i||c&1)&&p(e,"class",f[0]),c&5&&ee(e,"error",f[2].length)},i(f){i||(A(o,f),i=!0)},o(f){F(o,f),i=!1},d(f){f&&k(e),o&&o.d(f),Bn(u,f),n[9](null),s=!1,l()}}}const oo="Invalid value";function Xk(n,e,t){let i;hn(n,ys,g=>t(5,i=g));let{$$slots:s={},$$scope:l}=e;const r="field_"+W.randomString(7);let{name:o=""}=e,{class:a=void 0}=e,u,f=[];function c(){L0(o)}pi(()=>(u.addEventListener("change",c),()=>{u.removeEventListener("change",c)}));function d(g){ut.call(this,n,g)}function h(g){pe[g?"unshift":"push"](()=>{u=g,t(1,u)})}return n.$$set=g=>{"name"in g&&t(4,o=g.name),"class"in g&&t(0,a=g.class),"$$scope"in g&&t(6,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=W.toArray(W.getNestedVal(i,o)))},[a,u,f,r,o,i,l,s,d,h]}class Fe extends Pe{constructor(e){super(),Ee(this,e,Xk,xk,De,{name:4,class:0})}}function Qk(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Email"),s=O(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",r=n[9]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0]),l.focus(),o||(a=Q(l,"input",n[5]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&1&&l.value!==u[0]&&$e(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function e2(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=H("Password"),s=O(),l=_("input"),o=O(),a=_("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",r=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),$e(l,n[1]),w(c,o,d),w(c,a,d),u||(f=Q(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&r!==(r=c[9])&&p(l,"id",r),d&2&&l.value!==c[1]&&$e(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function t2(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Password confirm"),s=O(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",r=n[9]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[2]),o||(a=Q(l,"input",n[7]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&4&&l.value!==u[2]&&$e(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function n2(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;return s=new Fe({props:{class:"form-field required",name:"email",$$slots:{default:[Qk,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"password",$$slots:{default:[e2,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),a=new Fe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[t2,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),{c(){e=_("form"),t=_("div"),t.innerHTML="<h4>Create your first admin account in order to continue</h4>",i=O(),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment),u=O(),f=_("button"),f.innerHTML=`<span class="txt">Create and login</span> 
+        <i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),ee(f,"btn-disabled",n[3]),ee(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(g,y){w(g,e,y),m(e,t),m(e,i),V(s,e,null),m(e,l),V(r,e,null),m(e,o),V(a,e,null),m(e,u),m(e,f),c=!0,d||(h=Q(e,"submit",Wt(n[4])),d=!0)},p(g,[y]){const b={};y&1537&&(b.$$scope={dirty:y,ctx:g}),s.$set(b);const v={};y&1538&&(v.$$scope={dirty:y,ctx:g}),r.$set(v);const S={};y&1540&&(S.$$scope={dirty:y,ctx:g}),a.$set(S),y&8&&ee(f,"btn-disabled",g[3]),y&8&&ee(f,"btn-loading",g[3])},i(g){c||(A(s.$$.fragment,g),A(r.$$.fragment,g),A(a.$$.fragment,g),c=!0)},o(g){F(s.$$.fragment,g),F(r.$$.fragment,g),F(a.$$.fragment,g),c=!1},d(g){g&&k(e),z(s),z(r),z(a),d=!1,h()}}}function i2(n,e,t){const i=_n();let s="",l="",r="",o=!1;async function a(){if(!o){t(3,o=!0);try{await ke.Admins.create({email:s,password:l,passwordConfirm:r}),await ke.Admins.authViaEmail(s,l),i("submit")}catch(d){ke.errorResponseHandler(d)}t(3,o=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){r=this.value,t(2,r)}return[s,l,r,o,a,u,f,c]}class s2 extends Pe{constructor(e){super(),Ee(this,e,i2,n2,De,{})}}function Pc(n){let e,t;return e=new F0({props:{$$slots:{default:[l2]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function l2(n){let e,t;return e=new s2({}),e.$on("submit",n[1]),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p:oe,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function r2(n){let e,t,i=n[0]&&Pc(n);return{c(){i&&i.c(),e=st()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Pc(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(Me(),F(i,1,1,()=>{i=null}),Oe())},i(s){t||(A(i),t=!0)},o(s){F(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function o2(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ke.logout(!1),t(0,i=!0);return}ke.AuthStore.isValid?Zs("/collections"):ke.logout()}return[i,async()=>{t(0,i=!1),await Oi(),window.location.search=""}]}class a2 extends Pe{constructor(e){super(),Ee(this,e,o2,r2,De,{})}}let Qa,ts;const eu="app-tooltip";function Lc(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Bi(){return ts=ts||document.querySelector("."+eu),ts||(ts=document.createElement("div"),ts.classList.add(eu),document.body.appendChild(ts)),ts}function I0(n,e){let t=Bi();if(!t.classList.contains("active")||!(e!=null&&e.text)){tu();return}t.textContent=e.text,t.className=eu+" active",e.class&&t.classList.add(e.class),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),r=0,o=0,a=5;e.position=="left"?(r=l.top+l.height/2-i/2,o=l.left-s-a):e.position=="right"?(r=l.top+l.height/2-i/2,o=l.right+a):e.position=="top"?(r=l.top-i-a,o=l.left+l.width/2-s/2):e.position=="top-left"?(r=l.top-i-a,o=l.left):e.position=="top-right"?(r=l.top-i-a,o=l.right-s):e.position=="bottom-left"?(r=l.top+l.height+a,o=l.left):e.position=="bottom-right"?(r=l.top+l.height+a,o=l.right-s):(r=l.top+l.height+a,o=l.left+l.width/2-s/2),o+s>document.documentElement.clientWidth&&(o=document.documentElement.clientWidth-s),o=o>=0?o:0,r+i>document.documentElement.clientHeight&&(r=document.documentElement.clientHeight-i),r=r>=0?r:0,t.style.top=r+"px",t.style.left=o+"px"}function tu(){clearTimeout(Qa),Bi().classList.remove("active"),Bi().activeNode=void 0}function u2(n,e){Bi().activeNode=n,clearTimeout(Qa),Qa=setTimeout(()=>{Bi().classList.add("active"),I0(n,e)},isNaN(e.delay)?250:e.delay)}function St(n,e){let t=Lc(e);function i(){u2(n,t)}function s(){tu()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&W.isFocusable(n))&&n.addEventListener("click",s),Bi(),{update(l){var r,o;t=Lc(l),(o=(r=Bi())==null?void 0:r.activeNode)!=null&&o.contains(n)&&I0(n,t)},destroy(){var l,r;(r=(l=Bi())==null?void 0:l.activeNode)!=null&&r.contains(n)&&tu(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Eo(n){const e=n-1;return e*e*e+1}function ao(n,{delay:e=0,duration:t=400,easing:i=Wl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function ni(n,{delay:e=0,duration:t=400,easing:i=Eo,x:s=0,y:l=0,opacity:r=0}={}){const o=getComputedStyle(n),a=+o.opacity,u=o.transform==="none"?"":o.transform,f=a*(1-r);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 fn(n,{delay:e=0,duration:t=400,easing:i=Eo}={}){const s=getComputedStyle(n),l=+s.opacity,r=parseFloat(s.height),o=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*r}px;padding-top: ${h*o}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 Wn(n,{delay:e=0,duration:t=400,easing:i=Eo,start:s=0,opacity:l=0}={}){const r=getComputedStyle(n),o=+r.opacity,a=r.transform==="none"?"":r.transform,u=1-s,f=o*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>`
+			transform: ${a} scale(${1-u*d});
+			opacity: ${o-f*d}
+		`}}function f2(n){let e,t,i,s;return{c(){e=_("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,r){w(l,e,r),n[13](e),$e(e,n[7]),i||(s=Q(e,"input",n[14]),i=!0)},p(l,r){r&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),r&128&&e.value!==l[7]&&$e(e,l[7])},i:oe,o:oe,d(l){l&&k(e),n[13](null),i=!1,s()}}}function c2(n){let e,t,i,s;function l(a){n[12](a)}var r=n[4];function o(a){let u={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 r&&(e=new r(o(n)),pe.push(()=>Ie(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=st()},m(a,u){e&&V(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],je(()=>t=!1)),r!==(r=a[4])){if(e){Me();const c=e;F(c.$$.fragment,1,0,()=>{z(c,1)}),Oe()}r?(e=new r(o(a)),pe.push(()=>Ie(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else r&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&F(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&z(e,a)}}}function Fc(n){let e,t,i,s,l,r,o=n[7]!==n[0]&&Ic();return{c(){o&&o.c(),e=O(),t=_("button"),t.innerHTML='<span class="txt">Clear</span>',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){o&&o.m(a,u),w(a,e,u),w(a,t,u),s=!0,l||(r=Q(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?o?u&129&&A(o,1):(o=Ic(),o.c(),A(o,1),o.m(e.parentNode,e)):o&&(Me(),F(o,1,1,()=>{o=null}),Oe())},i(a){s||(A(o),Ot(()=>{i||(i=ft(t,ni,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){F(o),i||(i=ft(t,ni,{duration:150,x:5},!1)),i.run(0),s=!1},d(a){o&&o.d(a),a&&k(e),a&&k(t),a&&i&&i.end(),l=!1,r()}}}function Ic(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Search</span>',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(Ot(()=>{t||(t=ft(e,ni,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=ft(e,ni,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function d2(n){let e,t,i,s,l,r,o,a,u,f,c;const d=[c2,f2],h=[];function g(b,v){return b[4]&&!b[5]?0:1}r=g(n),o=h[r]=d[r](n);let y=(n[0].length||n[7].length)&&Fc(n);return{c(){e=_("div"),t=_("form"),i=_("label"),s=_("i"),l=O(),o.c(),a=O(),y&&y.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(b,v){w(b,e,v),m(e,t),m(t,i),m(i,s),m(t,l),h[r].m(t,null),m(t,a),y&&y.m(t,null),u=!0,f||(c=[Q(t,"submit",Wt(n[10])),Q(e,"click",Un(n[11]))],f=!0)},p(b,[v]){let S=r;r=g(b),r===S?h[r].p(b,v):(Me(),F(h[S],1,1,()=>{h[S]=null}),Oe(),o=h[r],o?o.p(b,v):(o=h[r]=d[r](b),o.c()),A(o,1),o.m(t,a)),b[0].length||b[7].length?y?(y.p(b,v),v&129&&A(y,1)):(y=Fc(b),y.c(),A(y,1),y.m(t,null)):y&&(Me(),F(y,1,1,()=>{y=null}),Oe())},i(b){u||(A(o),A(y),u=!0)},o(b){F(o),F(y),u=!1},d(b){b&&k(e),h[r].d(),y&&y.d(),f=!1,lt(c)}}}function p2(n,e,t){const i=_n(),s="search_"+W.randomString(7);let{value:l=""}=e,{placeholder:r='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:o=new Fn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function y(){u||f||(t(5,f=!0),t(4,u=(await as(()=>import("./FilterAutocompleteInput.477fd505.js"),[])).default),t(5,f=!1))}pi(()=>{y()});function b(M){ut.call(this,n,M)}function v(M){d=M,t(7,d),t(0,l)}function S(M){pe[M?"unshift":"push"](()=>{c=M,t(6,c)})}function $(){d=this.value,t(7,d),t(0,l)}const C=()=>{h(!1),g()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,r=M.placeholder),"autocompleteCollection"in M&&t(2,o=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,r,o,a,u,f,c,d,s,h,g,b,v,S,$,C]}class Po extends Pe{constructor(e){super(),Ee(this,e,p2,d2,De,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function h2(n){let e,t,i,s,l;const r=n[6].default,o=Dn(r,n,n[5],null);return{c(){e=_("th"),o&&o.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){w(a,e,u),o&&o.m(e,null),i=!0,s||(l=[Q(e,"click",n[7]),Q(e,"keydown",n[8])],s=!0)},p(a,[u]){o&&o.p&&(!i||u&32)&&En(o,r,a,a[5],i?An(r,a[5],u,null):Pn(a[5]),null),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),u&10&&ee(e,"col-sort-disabled",a[3]),u&7&&ee(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),u&7&&ee(e,"sort-desc",a[0]==="-"+a[2]),u&7&&ee(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(o,a),i=!0)},o(a){F(o,a),i=!1},d(a){a&&k(e),o&&o.d(a),s=!1,lt(l)}}}function m2(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:r}=e,{sort:o=""}=e,{disable:a=!1}=e;function u(){a||("-"+r===o?t(0,o="+"+r):t(0,o="-"+r))}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,r=d.name),"sort"in d&&t(0,o=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[o,l,r,a,u,s,i,f,c]}class tn extends Pe{constructor(e){super(),Ee(this,e,m2,h2,De,{class:1,name:2,sort:0,disable:3})}}function g2(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function _2(n){let e,t=W.formatToUTCDate(n[0])+"",i,s,l,r,o;return{c(){e=_("span"),i=H(t),s=H(" UTC"),p(e,"class","txt")},m(a,u){w(a,e,u),m(e,i),m(e,s),r||(o=Xe(l=St.call(null,e,W.formatToLocalDate(n[0])+" Local")),r=!0)},p(a,u){u&1&&t!==(t=W.formatToUTCDate(a[0])+"")&&ge(i,t),l&&Jn(l.update)&&u&1&&l.update.call(null,W.formatToLocalDate(a[0])+" Local")},d(a){a&&k(e),r=!1,o()}}}function b2(n){let e;function t(l,r){return l[0]?_2:g2}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:oe,o:oe,d(l){s.d(l),l&&k(e)}}}function y2(n,e,t){let{date:i=""}=e;return n.$$set=s=>{"date"in s&&t(0,i=s.date)},[i]}class Ci extends Pe{constructor(e){super(),Ee(this,e,y2,b2,De,{date:0})}}function Nc(n,e,t){const i=n.slice();return i[21]=e[t],i}function v2(n){let e;return{c(){e=_("div"),e.innerHTML=`<i class="ri-global-line"></i> 
+                        <span class="txt">method</span>`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function k2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="url",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function w2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="referer",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function S2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="status",p(t,"class",W.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function $2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function Rc(n){let e;function t(l,r){return l[6]?M2:C2}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function C2(n){var o;let e,t,i,s,l,r=((o=n[0])==null?void 0:o.length)&&jc(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No logs found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?r?r.p(a,u):(r=jc(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function M2(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td> 
+                    `},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function jc(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[18]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function Hc(n){let e;return{c(){e=_("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function qc(n,e){var se,x,Te;let t,i,s,l=((se=e[21].method)==null?void 0:se.toUpperCase())+"",r,o,a,u,f,c=e[21].url+"",d,h,g,y,b,v,S=(e[21].referer||"N/A")+"",$,C,M,T,E,D=e[21].status+"",P,L,R,j,G,Y,q,Z,J,K,ne=(((x=e[21].meta)==null?void 0:x.errorMessage)||((Te=e[21].meta)==null?void 0:Te.errorData))&&Hc();j=new Ci({props:{date:e[21].created}});function ce(){return e[16](e[21])}function be(...te){return e[17](e[21],...te)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("span"),r=H(l),a=O(),u=_("td"),f=_("span"),d=H(c),g=O(),ne&&ne.c(),y=O(),b=_("td"),v=_("span"),$=H(S),M=O(),T=_("td"),E=_("span"),P=H(D),L=O(),R=_("td"),B(j.$$.fragment),G=O(),Y=_("td"),Y.innerHTML='<i class="ri-arrow-right-line"></i>',q=O(),p(s,"class",o="label txt-uppercase "+e[9][e[21].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[21].url),p(u,"class","col-type-text col-field-url"),p(v,"class","txt txt-ellipsis"),p(v,"title",C=e[21].referer),ee(v,"txt-hint",!e[21].referer),p(b,"class","col-type-text col-field-referer"),p(E,"class","label"),ee(E,"label-danger",e[21].status>=400),p(T,"class","col-type-number col-field-status"),p(R,"class","col-type-date col-field-created"),p(Y,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(te,_e){w(te,t,_e),m(t,i),m(i,s),m(s,r),m(t,a),m(t,u),m(u,f),m(f,d),m(u,g),ne&&ne.m(u,null),m(t,y),m(t,b),m(b,v),m(v,$),m(t,M),m(t,T),m(T,E),m(E,P),m(t,L),m(t,R),V(j,R,null),m(t,G),m(t,Y),m(t,q),Z=!0,J||(K=[Q(t,"click",ce),Q(t,"keydown",be)],J=!0)},p(te,_e){var ie,ye,He;e=te,(!Z||_e&8)&&l!==(l=((ie=e[21].method)==null?void 0:ie.toUpperCase())+"")&&ge(r,l),(!Z||_e&8&&o!==(o="label txt-uppercase "+e[9][e[21].method.toLowerCase()]))&&p(s,"class",o),(!Z||_e&8)&&c!==(c=e[21].url+"")&&ge(d,c),(!Z||_e&8&&h!==(h=e[21].url))&&p(f,"title",h),((ye=e[21].meta)==null?void 0:ye.errorMessage)||((He=e[21].meta)==null?void 0:He.errorData)?ne||(ne=Hc(),ne.c(),ne.m(u,null)):ne&&(ne.d(1),ne=null),(!Z||_e&8)&&S!==(S=(e[21].referer||"N/A")+"")&&ge($,S),(!Z||_e&8&&C!==(C=e[21].referer))&&p(v,"title",C),_e&8&&ee(v,"txt-hint",!e[21].referer),(!Z||_e&8)&&D!==(D=e[21].status+"")&&ge(P,D),_e&8&&ee(E,"label-danger",e[21].status>=400);const fe={};_e&8&&(fe.date=e[21].created),j.$set(fe)},i(te){Z||(A(j.$$.fragment,te),Z=!0)},o(te){F(j.$$.fragment,te),Z=!1},d(te){te&&k(t),ne&&ne.d(),z(j),J=!1,lt(K)}}}function Vc(n){let e,t,i=n[3].length+"",s,l,r;return{c(){e=_("small"),t=H("Showing "),s=H(i),l=H(" of "),r=H(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(o,a){w(o,e,a),m(e,t),m(e,s),m(e,l),m(e,r)},p(o,a){a&8&&i!==(i=o[3].length+"")&&ge(s,i),a&16&&ge(r,o[4])},d(o){o&&k(e)}}}function zc(n){let e,t,i,s,l=n[4]-n[3].length+"",r,o,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=H("Load more ("),r=H(l),o=H(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ee(t,"btn-loading",n[6]),ee(t,"btn-disabled",n[6]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,r),m(i,o),a||(u=Q(t,"click",n[19]),a=!0)},p(f,c){c&24&&l!==(l=f[4]-f[3].length+"")&&ge(r,l),c&64&&ee(t,"btn-loading",f[6]),c&64&&ee(t,"btn-disabled",f[6])},d(f){f&&k(e),a=!1,u()}}}function O2(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E=[],D=new Map,P,L,R,j;function G(ie){n[11](ie)}let Y={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[v2]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),l=new tn({props:Y}),pe.push(()=>Ie(l,"sort",G));function q(ie){n[12](ie)}let Z={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[k2]},$$scope:{ctx:n}};n[1]!==void 0&&(Z.sort=n[1]),a=new tn({props:Z}),pe.push(()=>Ie(a,"sort",q));function J(ie){n[13](ie)}let K={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[w2]},$$scope:{ctx:n}};n[1]!==void 0&&(K.sort=n[1]),c=new tn({props:K}),pe.push(()=>Ie(c,"sort",J));function ne(ie){n[14](ie)}let ce={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[S2]},$$scope:{ctx:n}};n[1]!==void 0&&(ce.sort=n[1]),g=new tn({props:ce}),pe.push(()=>Ie(g,"sort",ne));function be(ie){n[15](ie)}let se={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[$2]},$$scope:{ctx:n}};n[1]!==void 0&&(se.sort=n[1]),v=new tn({props:se}),pe.push(()=>Ie(v,"sort",be));let x=n[3];const Te=ie=>ie[21].id;for(let ie=0;ie<x.length;ie+=1){let ye=Nc(n,x,ie),He=Te(ye);D.set(He,E[ie]=qc(He,ye))}let te=null;x.length||(te=Rc(n));let _e=n[3].length&&Vc(n),fe=n[3].length&&n[7]&&zc(n);return{c(){e=_("div"),t=_("table"),i=_("thead"),s=_("tr"),B(l.$$.fragment),o=O(),B(a.$$.fragment),f=O(),B(c.$$.fragment),h=O(),B(g.$$.fragment),b=O(),B(v.$$.fragment),$=O(),C=_("th"),M=O(),T=_("tbody");for(let ie=0;ie<E.length;ie+=1)E[ie].c();te&&te.c(),P=O(),_e&&_e.c(),L=O(),fe&&fe.c(),R=st(),p(C,"class","col-type-action min-width"),p(t,"class","table"),ee(t,"table-loading",n[6]),p(e,"class","table-wrapper")},m(ie,ye){w(ie,e,ye),m(e,t),m(t,i),m(i,s),V(l,s,null),m(s,o),V(a,s,null),m(s,f),V(c,s,null),m(s,h),V(g,s,null),m(s,b),V(v,s,null),m(s,$),m(s,C),m(t,M),m(t,T);for(let He=0;He<E.length;He+=1)E[He].m(T,null);te&&te.m(T,null),w(ie,P,ye),_e&&_e.m(ie,ye),w(ie,L,ye),fe&&fe.m(ie,ye),w(ie,R,ye),j=!0},p(ie,[ye]){const He={};ye&16777216&&(He.$$scope={dirty:ye,ctx:ie}),!r&&ye&2&&(r=!0,He.sort=ie[1],je(()=>r=!1)),l.$set(He);const Le={};ye&16777216&&(Le.$$scope={dirty:ye,ctx:ie}),!u&&ye&2&&(u=!0,Le.sort=ie[1],je(()=>u=!1)),a.$set(Le);const Re={};ye&16777216&&(Re.$$scope={dirty:ye,ctx:ie}),!d&&ye&2&&(d=!0,Re.sort=ie[1],je(()=>d=!1)),c.$set(Re);const ae={};ye&16777216&&(ae.$$scope={dirty:ye,ctx:ie}),!y&&ye&2&&(y=!0,ae.sort=ie[1],je(()=>y=!1)),g.$set(ae);const re={};ye&16777216&&(re.$$scope={dirty:ye,ctx:ie}),!S&&ye&2&&(S=!0,re.sort=ie[1],je(()=>S=!1)),v.$set(re),ye&841&&(x=ie[3],Me(),E=rt(E,ye,Te,1,ie,x,D,T,Ft,qc,null,Nc),Oe(),!x.length&&te?te.p(ie,ye):x.length?te&&(te.d(1),te=null):(te=Rc(ie),te.c(),te.m(T,null))),ye&64&&ee(t,"table-loading",ie[6]),ie[3].length?_e?_e.p(ie,ye):(_e=Vc(ie),_e.c(),_e.m(L.parentNode,L)):_e&&(_e.d(1),_e=null),ie[3].length&&ie[7]?fe?fe.p(ie,ye):(fe=zc(ie),fe.c(),fe.m(R.parentNode,R)):fe&&(fe.d(1),fe=null)},i(ie){if(!j){A(l.$$.fragment,ie),A(a.$$.fragment,ie),A(c.$$.fragment,ie),A(g.$$.fragment,ie),A(v.$$.fragment,ie);for(let ye=0;ye<x.length;ye+=1)A(E[ye]);j=!0}},o(ie){F(l.$$.fragment,ie),F(a.$$.fragment,ie),F(c.$$.fragment,ie),F(g.$$.fragment,ie),F(v.$$.fragment,ie);for(let ye=0;ye<E.length;ye+=1)F(E[ye]);j=!1},d(ie){ie&&k(e),z(l),z(a),z(c),z(g),z(v);for(let ye=0;ye<E.length;ye+=1)E[ye].d();te&&te.d(),ie&&k(P),_e&&_e.d(ie),ie&&k(L),fe&&fe.d(ie),ie&&k(R)}}}function T2(n,e,t){let i;const s=_n(),l={get:"label-info",post:"label-success",patch:"label-warning",delete:"label-danger"};let{filter:r=""}=e,{presets:o=""}=e,{sort:a="-rowid"}=e,u=[],f=1,c=0,d=!1;async function h(D=1){return t(6,d=!0),ke.Logs.getRequestsList(D,40,{sort:a,filter:[o,r].filter(Boolean).join("&&")}).then(P=>{D<=1&&g(),t(6,d=!1),t(3,u=u.concat(P.items)),t(5,f=P.page),t(4,c=P.totalItems),s("load",u)}).catch(P=>{P!==null&&(t(6,d=!1),console.warn(P),g(),ke.errorResponseHandler(P,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,c=0)}function y(D){a=D,t(1,a)}function b(D){a=D,t(1,a)}function v(D){a=D,t(1,a)}function S(D){a=D,t(1,a)}function $(D){a=D,t(1,a)}const C=D=>s("select",D),M=(D,P)=>{P.code==="Enter"&&(P.preventDefault(),s("select",D))},T=()=>t(0,r=""),E=()=>h(f+1);return n.$$set=D=>{"filter"in D&&t(0,r=D.filter),"presets"in D&&t(10,o=D.presets),"sort"in D&&t(1,a=D.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a!="undefined"||typeof r!="undefined"||typeof o!="undefined")&&(g(),h(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[r,a,h,u,c,f,d,i,s,l,o,y,b,v,S,$,C,M,T,E]}class D2 extends Pe{constructor(e){super(),Ee(this,e,T2,O2,De,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*!
+ * Chart.js v3.8.0
+ * https://www.chartjs.org
+ * (c) 2022 Chart.js Contributors
+ * Released under the MIT License
+ */const N0=function(){return typeof window=="undefined"?function(n){return n()}:window.requestAnimationFrame}();function R0(n,e,t){const i=t||(r=>Array.prototype.slice.call(r));let s=!1,l=[];return function(...r){l=i(r),s||(s=!0,N0.call(window,()=>{s=!1,n.apply(e,l)}))}}function A2(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const E2=n=>n==="start"?"left":n==="end"?"right":"center",Bc=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function _i(){}const P2=function(){let n=0;return function(){return n++}}();function Ct(n){return n===null||typeof n=="undefined"}function Lt(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 pt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const qt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function jn(n,e){return qt(n)?n:e}function mt(n,e){return typeof n=="undefined"?e:n}const L2=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,j0=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Rt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function $t(n,e,t,i){let s,l,r;if(Lt(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;s<l;s++)e.call(t,n[s],s);else if(pt(n))for(r=Object.keys(n),l=r.length,s=0;s<l;s++)e.call(t,n[r[s]],r[s])}function uo(n,e){let t,i,s,l;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],l=e[t],s.datasetIndex!==l.datasetIndex||s.index!==l.index)return!1;return!0}function fo(n){if(Lt(n))return n.map(fo);if(pt(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=fo(n[t[s]]);return e}return n}function H0(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function F2(n,e,t,i){if(!H0(n))return;const s=e[n],l=t[n];pt(s)&&pt(l)?Rl(s,l,i):e[n]=fo(l)}function Rl(n,e,t){const i=Lt(e)?e:[e],s=i.length;if(!pt(n))return n;t=t||{};const l=t.merger||F2;for(let r=0;r<s;++r){if(e=i[r],!pt(e))continue;const o=Object.keys(e);for(let a=0,u=o.length;a<u;++a)l(o[a],n,e,t)}return n}function Tl(n,e){return Rl(n,e,{merger:I2})}function I2(n,e,t){if(!H0(n))return;const i=e[n],s=t[n];pt(i)&&pt(s)?Tl(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=fo(s))}const N2="",R2=".";function Uc(n,e){const t=n.indexOf(R2,e);return t===-1?n.length:t}function Wi(n,e){if(e===N2)return n;let t=0,i=Uc(e,t);for(;n&&i>t;)n=n[e.slice(t,i)],t=i+1,i=Uc(e,t);return n}function Uu(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Yn=n=>typeof n!="undefined",Yi=n=>typeof n=="function",Wc=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function j2(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Ht=Math.PI,At=2*Ht,H2=At+Ht,co=Number.POSITIVE_INFINITY,q2=Ht/180,jt=Ht/2,cl=Ht/4,Yc=Ht*2/3,Vn=Math.log10,ui=Math.sign;function Kc(n){const e=Math.round(n);n=Dl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Vn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function V2(n){const e=[],t=Math.sqrt(n);let i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((s,l)=>s-l).pop(),e}function jl(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Dl(n,e,t){return Math.abs(n-e)<t}function z2(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function q0(n,e,t){let i,s,l;for(i=0,s=n.length;i<s;i++)l=n[i][t],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function Qn(n){return n*(Ht/180)}function Wu(n){return n*(180/Ht)}function Jc(n){if(!qt(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function V0(n,e){const t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i);let l=Math.atan2(i,t);return l<-.5*Ht&&(l+=At),{angle:l,distance:s}}function nu(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function B2(n,e){return(n-e+H2)%At-Ht}function Mn(n){return(n%At+At)%At}function Hl(n,e,t,i){const s=Mn(n),l=Mn(e),r=Mn(t),o=Mn(l-s),a=Mn(r-s),u=Mn(s-l),f=Mn(s-r);return s===l||s===r||i&&l===r||o>a&&u<f}function an(n,e,t){return Math.max(e,Math.min(t,n))}function U2(n){return an(n,-32768,32767)}function ql(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}const $r=n=>n===0||n===1,Gc=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*At/t)),Zc=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*At/t)+1,Al={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*jt)+1,easeOutSine:n=>Math.sin(n*jt),easeInOutSine:n=>-.5*(Math.cos(Ht*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=>$r(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=>$r(n)?n:Gc(n,.075,.3),easeOutElastic:n=>$r(n)?n:Zc(n,.075,.3),easeInOutElastic(n){return $r(n)?n:n<.5?.5*Gc(n*2,.1125,.45):.5+.5*Zc(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-Al.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?Al.easeInBounce(n*2)*.5:Al.easeOutBounce(n*2-1)*.5+.5};/*!
+ * @kurkle/color v0.2.1
+ * https://github.com/kurkle/color#readme
+ * (c) 2022 Jukka Kurkela
+ * Released under the MIT License
+ */function Xl(n){return n+.5|0}const Vi=(n,e,t)=>Math.max(Math.min(n,t),e);function wl(n){return Vi(Xl(n*2.55),0,255)}function Ui(n){return Vi(Xl(n*255),0,255)}function ki(n){return Vi(Xl(n/2.55)/100,0,1)}function xc(n){return Vi(Xl(n*100),0,100)}const Rn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},iu=[..."0123456789ABCDEF"],W2=n=>iu[n&15],Y2=n=>iu[(n&240)>>4]+iu[n&15],Cr=n=>(n&240)>>4===(n&15),K2=n=>Cr(n.r)&&Cr(n.g)&&Cr(n.b)&&Cr(n.a);function J2(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Rn[n[1]]*17,g:255&Rn[n[2]]*17,b:255&Rn[n[3]]*17,a:e===5?Rn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Rn[n[1]]<<4|Rn[n[2]],g:Rn[n[3]]<<4|Rn[n[4]],b:Rn[n[5]]<<4|Rn[n[6]],a:e===9?Rn[n[7]]<<4|Rn[n[8]]:255})),t}const G2=(n,e)=>n<255?e(n):"";function Z2(n){var e=K2(n)?W2:Y2;return n?"#"+e(n.r)+e(n.g)+e(n.b)+G2(n.a,e):void 0}const x2=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function z0(n,e,t){const i=e*Math.min(t,1-t),s=(l,r=(l+n/30)%12)=>t-i*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function X2(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 Q2(n,e,t){const i=z0(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 ew(n,e,t,i,s){return n===s?(e-t)/i+(e<t?6:0):e===s?(t-n)/i+2:(n-e)/i+4}function Yu(n){const t=n.r/255,i=n.g/255,s=n.b/255,l=Math.max(t,i,s),r=Math.min(t,i,s),o=(l+r)/2;let a,u,f;return l!==r&&(f=l-r,u=o>.5?f/(2-l-r):f/(l+r),a=ew(t,i,s,f,l),a=a*60+.5),[a|0,u||0,o]}function Ku(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Ui)}function Ju(n,e,t){return Ku(z0,n,e,t)}function tw(n,e,t){return Ku(Q2,n,e,t)}function nw(n,e,t){return Ku(X2,n,e,t)}function B0(n){return(n%360+360)%360}function iw(n){const e=x2.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?wl(+e[5]):Ui(+e[5]));const s=B0(+e[2]),l=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?i=tw(s,l,r):e[1]==="hsv"?i=nw(s,l,r):i=Ju(s,l,r),{r:i[0],g:i[1],b:i[2],a:t}}function sw(n,e){var t=Yu(n);t[0]=B0(t[0]+e),t=Ju(t),n.r=t[0],n.g=t[1],n.b=t[2]}function lw(n){if(!n)return;const e=Yu(n),t=e[0],i=xc(e[1]),s=xc(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${ki(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Xc={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"},Qc={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 rw(){const n={},e=Object.keys(Qc),t=Object.keys(Xc);let i,s,l,r,o;for(i=0;i<e.length;i++){for(r=o=e[i],s=0;s<t.length;s++)l=t[s],o=o.replace(l,Xc[l]);l=parseInt(Qc[r],16),n[o]=[l>>16&255,l>>8&255,l&255]}return n}let Mr;function ow(n){Mr||(Mr=rw(),Mr.transparent=[0,0,0,0]);const e=Mr[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const aw=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function uw(n){const e=aw.exec(n);let t=255,i,s,l;if(!!e){if(e[7]!==i){const r=+e[7];t=e[8]?wl(r):Vi(r*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?wl(i):Vi(i,0,255)),s=255&(e[4]?wl(s):Vi(s,0,255)),l=255&(e[6]?wl(l):Vi(l,0,255)),{r:i,g:s,b:l,a:t}}}function fw(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${ki(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const da=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Es=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function cw(n,e,t){const i=Es(ki(n.r)),s=Es(ki(n.g)),l=Es(ki(n.b));return{r:Ui(da(i+t*(Es(ki(e.r))-i))),g:Ui(da(s+t*(Es(ki(e.g))-s))),b:Ui(da(l+t*(Es(ki(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Or(n,e,t){if(n){let i=Yu(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Ju(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function U0(n,e){return n&&Object.assign(e||{},n)}function ed(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=Ui(n[3]))):(e=U0(n,{r:0,g:0,b:0,a:1}),e.a=Ui(e.a)),e}function dw(n){return n.charAt(0)==="r"?uw(n):iw(n)}class po{constructor(e){if(e instanceof po)return e;const t=typeof e;let i;t==="object"?i=ed(e):t==="string"&&(i=J2(e)||ow(e)||dw(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=U0(this._rgb);return e&&(e.a=ki(e.a)),e}set rgb(e){this._rgb=ed(e)}rgbString(){return this._valid?fw(this._rgb):void 0}hexString(){return this._valid?Z2(this._rgb):void 0}hslString(){return this._valid?lw(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const r=t===l?.5:t,o=2*r-1,a=i.a-s.a,u=((o*a===-1?o:(o+a)/(1+o*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=r*i.a+(1-r)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=cw(this._rgb,e._rgb,t)),this}clone(){return new po(this.rgb)}alpha(e){return this._rgb.a=Ui(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Xl(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 Or(this._rgb,2,e),this}darken(e){return Or(this._rgb,2,-e),this}saturate(e){return Or(this._rgb,1,e),this}desaturate(e){return Or(this._rgb,1,-e),this}rotate(e){return sw(this._rgb,e),this}}function W0(n){return new po(n)}function Y0(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function td(n){return Y0(n)?n:W0(n)}function pa(n){return Y0(n)?n:W0(n).saturate(.5).darken(.1).hexString()}const _s=Object.create(null),su=Object.create(null);function El(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;i<s;++i){const l=t[i];n=n[l]||(n[l]=Object.create(null))}return n}function ha(n,e,t){return typeof e=="string"?Rl(El(n,e),t):Rl(El(n,""),e)}class pw{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.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)=>pa(i.backgroundColor),this.hoverBorderColor=(t,i)=>pa(i.borderColor),this.hoverColor=(t,i)=>pa(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 ha(this,e,t)}get(e){return El(this,e)}describe(e,t){return ha(su,e,t)}override(e,t){return ha(_s,e,t)}route(e,t,i,s){const l=El(this,e),r=El(this,i),o="_"+t;Object.defineProperties(l,{[o]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[o],u=r[s];return pt(a)?Object.assign({},u,a):mt(a,u)},set(a){this[o]=a}}})}}var gt=new pw({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function hw(n){return!n||Ct(n.size)||Ct(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function ho(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 mw(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 r=0;const o=t.length;let a,u,f,c,d;for(a=0;a<o;a++)if(c=t[a],c!=null&&Lt(c)!==!0)r=ho(n,s,l,r,c);else if(Lt(c))for(u=0,f=c.length;u<f;u++)d=c[u],d!=null&&!Lt(d)&&(r=ho(n,s,l,r,d));n.restore();const h=l.length/2;if(h>t.length){for(a=0;a<h;a++)delete s[l[a]];l.splice(0,h)}return r}function ns(n,e,t){const i=n.currentDevicePixelRatio,s=t!==0?Math.max(t/2,.5):0;return Math.round((e-s)*i)/i+s}function nd(n,e){e=e||n.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,n.width,n.height),e.restore()}function lu(n,e,t,i){let s,l,r,o,a;const u=e.pointStyle,f=e.rotation,c=e.radius;let d=(f||0)*q2;if(u&&typeof u=="object"&&(s=u.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){n.save(),n.translate(t,i),n.rotate(d),n.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),n.restore();return}if(!(isNaN(c)||c<=0)){switch(n.beginPath(),u){default:n.arc(t,i,c,0,At),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(d)*c,i-Math.cos(d)*c),d+=Yc,n.lineTo(t+Math.sin(d)*c,i-Math.cos(d)*c),d+=Yc,n.lineTo(t+Math.sin(d)*c,i-Math.cos(d)*c),n.closePath();break;case"rectRounded":a=c*.516,o=c-a,l=Math.cos(d+cl)*o,r=Math.sin(d+cl)*o,n.arc(t-l,i-r,a,d-Ht,d-jt),n.arc(t+r,i-l,a,d-jt,d),n.arc(t+l,i+r,a,d,d+jt),n.arc(t-r,i+l,a,d+jt,d+Ht),n.closePath();break;case"rect":if(!f){o=Math.SQRT1_2*c,n.rect(t-o,i-o,2*o,2*o);break}d+=cl;case"rectRot":l=Math.cos(d)*c,r=Math.sin(d)*c,n.moveTo(t-l,i-r),n.lineTo(t+r,i-l),n.lineTo(t+l,i+r),n.lineTo(t-r,i+l),n.closePath();break;case"crossRot":d+=cl;case"cross":l=Math.cos(d)*c,r=Math.sin(d)*c,n.moveTo(t-l,i-r),n.lineTo(t+l,i+r),n.moveTo(t+r,i-l),n.lineTo(t-r,i+l);break;case"star":l=Math.cos(d)*c,r=Math.sin(d)*c,n.moveTo(t-l,i-r),n.lineTo(t+l,i+r),n.moveTo(t+r,i-l),n.lineTo(t-r,i+l),d+=cl,l=Math.cos(d)*c,r=Math.sin(d)*c,n.moveTo(t-l,i-r),n.lineTo(t+l,i+r),n.moveTo(t+r,i-l),n.lineTo(t-r,i+l);break;case"line":l=Math.cos(d)*c,r=Math.sin(d)*c,n.moveTo(t-l,i-r),n.lineTo(t+l,i+r);break;case"dash":n.moveTo(t,i),n.lineTo(t+Math.cos(d)*c,i+Math.sin(d)*c);break}n.fill(),e.borderWidth>0&&n.stroke()}}function Vl(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.x<e.right+t&&n.y>e.top-t&&n.y<e.bottom+t}function Gu(n,e){n.save(),n.beginPath(),n.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),n.clip()}function Zu(n){n.restore()}function gw(n,e,t,i,s){if(!e)return n.lineTo(t.x,t.y);if(s==="middle"){const l=(e.x+t.x)/2;n.lineTo(l,e.y),n.lineTo(l,t.y)}else s==="after"!=!!i?n.lineTo(e.x,t.y):n.lineTo(t.x,e.y);n.lineTo(t.x,t.y)}function _w(n,e,t,i){if(!e)return n.lineTo(t.x,t.y);n.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?t.cp2x:t.cp1x,i?t.cp2y:t.cp1y,t.x,t.y)}function mo(n,e,t,i,s,l={}){const r=Lt(e)?e:[e],o=l.strokeWidth>0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,bw(n,l),a=0;a<r.length;++a)u=r[a],o&&(l.strokeColor&&(n.strokeStyle=l.strokeColor),Ct(l.strokeWidth)||(n.lineWidth=l.strokeWidth),n.strokeText(u,t,i,l.maxWidth)),n.fillText(u,t,i,l.maxWidth),yw(n,t,i,u,l),i+=s.lineHeight;n.restore()}function bw(n,e){e.translation&&n.translate(e.translation[0],e.translation[1]),Ct(e.rotation)||n.rotate(e.rotation),e.color&&(n.fillStyle=e.color),e.textAlign&&(n.textAlign=e.textAlign),e.textBaseline&&(n.textBaseline=e.textBaseline)}function yw(n,e,t,i,s){if(s.strikethrough||s.underline){const l=n.measureText(i),r=e-l.actualBoundingBoxLeft,o=e+l.actualBoundingBoxRight,a=t-l.actualBoundingBoxAscent,u=t+l.actualBoundingBoxDescent,f=s.strikethrough?(a+u)/2:u;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(r,f),n.lineTo(o,f),n.stroke()}}function go(n,e){const{x:t,y:i,w:s,h:l,radius:r}=e;n.arc(t+r.topLeft,i+r.topLeft,r.topLeft,-jt,Ht,!0),n.lineTo(t,i+l-r.bottomLeft),n.arc(t+r.bottomLeft,i+l-r.bottomLeft,r.bottomLeft,Ht,jt,!0),n.lineTo(t+s-r.bottomRight,i+l),n.arc(t+s-r.bottomRight,i+l-r.bottomRight,r.bottomRight,jt,0,!0),n.lineTo(t+s,i+r.topRight),n.arc(t+s-r.topRight,i+r.topRight,r.topRight,0,-jt,!0),n.lineTo(t+r.topLeft,i)}const vw=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),kw=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function ww(n,e){const t=(""+n).match(vw);if(!t||t[1]==="normal")return e*1.2;switch(n=+t[2],t[3]){case"px":return n;case"%":n/=100;break}return e*n}const Sw=n=>+n||0;function xu(n,e){const t={},i=pt(e),s=i?Object.keys(e):e,l=pt(n)?i?r=>mt(n[r],n[e[r]]):r=>n[r]:()=>n;for(const r of s)t[r]=Sw(l(r));return t}function K0(n){return xu(n,{top:"y",right:"x",bottom:"y",left:"x"})}function qs(n){return xu(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Kn(n){const e=K0(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Tn(n,e){n=n||{},e=e||gt.font;let t=mt(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=mt(n.style,e.style);i&&!(""+i).match(kw)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:mt(n.family,e.family),lineHeight:ww(mt(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:mt(n.weight,e.weight),string:""};return s.string=hw(s),s}function Tr(n,e,t,i){let s=!0,l,r,o;for(l=0,r=n.length;l<r;++l)if(o=n[l],o!==void 0&&(e!==void 0&&typeof o=="function"&&(o=o(e),s=!1),t!==void 0&&Lt(o)&&(o=o[t%o.length],s=!1),o!==void 0))return i&&!s&&(i.cacheable=!1),o}function $w(n,e,t){const{min:i,max:s}=n,l=j0(e,(s-i)/2),r=(o,a)=>t&&o===0?0:o+a;return{min:r(i,-Math.abs(l)),max:r(s,l)}}function Ji(n,e){return Object.assign(Object.create(n),e)}function Xu(n,e,t){t=t||(r=>n[r]<e);let i=n.length-1,s=0,l;for(;i-s>1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const cs=(n,e,t)=>Xu(n,t,i=>n[i][e]<t),Cw=(n,e,t)=>Xu(n,t,i=>n[i][e]>=t);function Mw(n,e,t){let i=0,s=n.length;for(;i<s&&n[i]<e;)i++;for(;s>i&&n[s-1]>t;)s--;return i>0||s<n.length?n.slice(i,s):n}const J0=["push","pop","shift","splice","unshift"];function Ow(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),J0.forEach(t=>{const i="_onData"+Uu(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const r=s.apply(this,l);return n._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...l)}),r}})})}function id(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)&&(J0.forEach(l=>{delete n[l]}),delete n._chartjs)}function G0(n){const e=new Set;let t,i;for(t=0,i=n.length;t<i;++t)e.add(n[t]);return e.size===i?n:Array.from(e)}function Qu(n,e=[""],t=n,i,s=()=>n[0]){Yn(i)||(i=Q0("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:r=>Qu([r,...n],e,t,i)};return new Proxy(l,{deleteProperty(r,o){return delete r[o],delete r._keys,delete n[0][o],!0},get(r,o){return x0(r,o,()=>Iw(o,e,n,r))},getOwnPropertyDescriptor(r,o){return Reflect.getOwnPropertyDescriptor(r._scopes[0],o)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(r,o){return ld(r).includes(o)},ownKeys(r){return ld(r)},set(r,o,a){const u=r._storage||(r._storage=s());return r[o]=u[o]=a,delete r._keys,!0}})}function Ks(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:Z0(n,i),setContext:l=>Ks(n,l,t,i),override:l=>Ks(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,r){return delete l[r],delete n[r],!0},get(l,r,o){return x0(l,r,()=>Dw(l,r,o))},getOwnPropertyDescriptor(l,r){return l._descriptors.allKeys?Reflect.has(n,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,r)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,r){return Reflect.has(n,r)},ownKeys(){return Reflect.ownKeys(n)},set(l,r,o){return n[r]=o,delete l[r],!0}})}function Z0(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 Tw=(n,e)=>n?n+Uu(e):e,ef=(n,e)=>pt(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function x0(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function Dw(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:r}=n;let o=i[e];return Yi(o)&&r.isScriptable(e)&&(o=Aw(e,o,n,t)),Lt(o)&&o.length&&(o=Ew(e,o,n,r.isIndexable)),ef(e,o)&&(o=Ks(o,s,l&&l[e],r)),o}function Aw(n,e,t,i){const{_proxy:s,_context:l,_subProxy:r,_stack:o}=t;if(o.has(n))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+n);return o.add(n),e=e(l,r||i),o.delete(n),ef(n,e)&&(e=tf(s._scopes,s,n,e)),e}function Ew(n,e,t,i){const{_proxy:s,_context:l,_subProxy:r,_descriptors:o}=t;if(Yn(l.index)&&i(n))e=e[l.index%e.length];else if(pt(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=tf(u,s,n,f);e.push(Ks(c,l,r&&r[n],o))}}return e}function X0(n,e,t){return Yi(n)?n(e,t):n}const Pw=(n,e)=>n===!0?e:typeof n=="string"?Wi(e,n):void 0;function Lw(n,e,t,i,s){for(const l of e){const r=Pw(t,l);if(r){n.add(r);const o=X0(r._fallback,t,s);if(Yn(o)&&o!==t&&o!==i)return o}else if(r===!1&&Yn(i)&&t!==i)return null}return!1}function tf(n,e,t,i){const s=e._rootScopes,l=X0(e._fallback,t,i),r=[...n,...s],o=new Set;o.add(i);let a=sd(o,r,t,l||t,i);return a===null||Yn(l)&&l!==t&&(a=sd(o,r,l,a,i),a===null)?!1:Qu(Array.from(o),[""],s,l,()=>Fw(e,t,i))}function sd(n,e,t,i,s){for(;t;)t=Lw(n,e,t,i,s);return t}function Fw(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return Lt(s)&&pt(t)?t:s}function Iw(n,e,t,i){let s;for(const l of e)if(s=Q0(Tw(l,n),t),Yn(s))return ef(n,s)?tf(t,i,n,s):s}function Q0(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Yn(i))return i}}function ld(n){let e=n._keys;return e||(e=n._keys=Nw(n._scopes)),e}function Nw(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 eb(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,r=new Array(i);let o,a,u,f;for(o=0,a=i;o<a;++o)u=o+t,f=e[u],r[o]={r:s.parse(Wi(f,l),u)};return r}const Rw=Number.EPSILON||1e-14,Js=(n,e)=>e<n.length&&!n[e].skip&&n[e],tb=n=>n==="x"?"y":"x";function jw(n,e,t,i){const s=n.skip?e:n,l=e,r=t.skip?e:t,o=nu(l,s),a=nu(r,l);let u=o/(o+a),f=a/(o+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const c=i*u,d=i*f;return{previous:{x:l.x-c*(r.x-s.x),y:l.y-c*(r.y-s.y)},next:{x:l.x+d*(r.x-s.x),y:l.y+d*(r.y-s.y)}}}function Hw(n,e,t){const i=n.length;let s,l,r,o,a,u=Js(n,0);for(let f=0;f<i-1;++f)if(a=u,u=Js(n,f+1),!(!a||!u)){if(Dl(e[f],0,Rw)){t[f]=t[f+1]=0;continue}s=t[f]/e[f],l=t[f+1]/e[f],o=Math.pow(s,2)+Math.pow(l,2),!(o<=9)&&(r=3/Math.sqrt(o),t[f]=s*r*e[f],t[f+1]=l*r*e[f])}}function qw(n,e,t="x"){const i=tb(t),s=n.length;let l,r,o,a=Js(n,0);for(let u=0;u<s;++u){if(r=o,o=a,a=Js(n,u+1),!o)continue;const f=o[t],c=o[i];r&&(l=(f-r[t])/3,o[`cp1${t}`]=f-l,o[`cp1${i}`]=c-l*e[u]),a&&(l=(a[t]-f)/3,o[`cp2${t}`]=f+l,o[`cp2${i}`]=c+l*e[u])}}function Vw(n,e="x"){const t=tb(e),i=n.length,s=Array(i).fill(0),l=Array(i);let r,o,a,u=Js(n,0);for(r=0;r<i;++r)if(o=a,a=u,u=Js(n,r+1),!!a){if(u){const f=u[e]-a[e];s[r]=f!==0?(u[t]-a[t])/f:0}l[r]=o?u?ui(s[r-1])!==ui(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}Hw(n,s,l),qw(n,l,e)}function Dr(n,e,t){return Math.max(Math.min(n,t),e)}function zw(n,e){let t,i,s,l,r,o=Vl(n[0],e);for(t=0,i=n.length;t<i;++t)r=l,l=o,o=t<i-1&&Vl(n[t+1],e),l&&(s=n[t],r&&(s.cp1x=Dr(s.cp1x,e.left,e.right),s.cp1y=Dr(s.cp1y,e.top,e.bottom)),o&&(s.cp2x=Dr(s.cp2x,e.left,e.right),s.cp2y=Dr(s.cp2y,e.top,e.bottom)))}function Bw(n,e,t,i,s){let l,r,o,a;if(e.spanGaps&&(n=n.filter(u=>!u.skip)),e.cubicInterpolationMode==="monotone")Vw(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,r=n.length;l<r;++l)o=n[l],a=jw(u,o,n[Math.min(l+1,r-(i?0:1))%r],e.tension),o.cp1x=a.previous.x,o.cp1y=a.previous.y,o.cp2x=a.next.x,o.cp2y=a.next.y,u=o}e.capBezierPoints&&zw(n,t)}function nb(){return typeof window!="undefined"&&typeof document!="undefined"}function nf(n){let e=n.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function _o(n,e,t){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*e.parentNode[t])):i=n,i}const Lo=n=>window.getComputedStyle(n,null);function Uw(n,e){return Lo(n).getPropertyValue(e)}const Ww=["top","right","bottom","left"];function ms(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=Ww[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Yw=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Kw(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let r=!1,o,a;if(Yw(s,l,n.target))o=s,a=l;else{const u=e.getBoundingClientRect();o=i.clientX-u.left,a=i.clientY-u.top,r=!0}return{x:o,y:a,box:r}}function rs(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Lo(t),l=s.boxSizing==="border-box",r=ms(s,"padding"),o=ms(s,"border","width"),{x:a,y:u,box:f}=Kw(n,t),c=r.left+(f&&o.left),d=r.top+(f&&o.top);let{width:h,height:g}=e;return l&&(h-=r.width+o.width,g-=r.height+o.height),{x:Math.round((a-c)/h*t.width/i),y:Math.round((u-d)/g*t.height/i)}}function Jw(n,e,t){let i,s;if(e===void 0||t===void 0){const l=nf(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const r=l.getBoundingClientRect(),o=Lo(l),a=ms(o,"border","width"),u=ms(o,"padding");e=r.width-u.width-a.width,t=r.height-u.height-a.height,i=_o(o.maxWidth,l,"clientWidth"),s=_o(o.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||co,maxHeight:s||co}}const ma=n=>Math.round(n*10)/10;function Gw(n,e,t,i){const s=Lo(n),l=ms(s,"margin"),r=_o(s.maxWidth,n,"clientWidth")||co,o=_o(s.maxHeight,n,"clientHeight")||co,a=Jw(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=ms(s,"border","width"),d=ms(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=ma(Math.min(u,r,a.maxWidth)),f=ma(Math.min(f,o,a.maxHeight)),u&&!f&&(f=ma(u/2)),{width:u,height:f}}function rd(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 r=n.canvas;return r.style&&(t||!r.style.height&&!r.style.width)&&(r.style.height=`${n.height}px`,r.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||r.height!==s||r.width!==l?(n.currentDevicePixelRatio=i,r.height=s,r.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Zw=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 od(n,e){const t=Uw(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function os(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function xw(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 Xw(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},r=os(n,s,t),o=os(s,l,t),a=os(l,e,t),u=os(r,o,t),f=os(o,a,t);return os(u,f,t)}const ad=new Map;function Qw(n,e){e=e||{};const t=n+JSON.stringify(e);let i=ad.get(t);return i||(i=new Intl.NumberFormat(n,e),ad.set(t,i)),i}function Ql(n,e,t){return Qw(e,t).format(n)}const eS=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}}},tS=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function ga(n,e,t){return n?eS(e,t):tS()}function nS(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 iS(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function ib(n){return n==="angle"?{between:Hl,compare:B2,normalize:Mn}:{between:ql,compare:(e,t)=>e-t,normalize:e=>e}}function ud({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 sS(n,e,t){const{property:i,start:s,end:l}=t,{between:r,normalize:o}=ib(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;d<h&&r(o(e[u%a][i]),s,l);++d)u--,f--;u%=a,f%=a}return f<u&&(f+=a),{start:u,end:f,loop:c,style:n.style}}function sb(n,e,t){if(!t)return[n];const{property:i,start:s,end:l}=t,r=e.length,{compare:o,between:a,normalize:u}=ib(i),{start:f,end:c,loop:d,style:h}=sS(n,e,t),g=[];let y=!1,b=null,v,S,$;const C=()=>a(s,$,v)&&o(s,$)!==0,M=()=>o(l,v)===0||a(l,$,v),T=()=>y||C(),E=()=>!y||M();for(let D=f,P=f;D<=c;++D)S=e[D%r],!S.skip&&(v=u(S[i]),v!==$&&(y=a(v,s,l),b===null&&T()&&(b=o(v,s)===0?D:P),b!==null&&E()&&(g.push(ud({start:b,end:D,loop:d,count:r,style:h})),b=null),P=D,$=v));return b!==null&&g.push(ud({start:b,end:c,loop:d,count:r,style:h})),g}function lb(n,e){const t=[],i=n.segments;for(let s=0;s<i.length;s++){const l=sb(i[s],n.points,e);l.length&&t.push(...l)}return t}function lS(n,e,t,i){let s=0,l=e-1;if(t&&!i)for(;s<e&&!n[s].skip;)s++;for(;s<e&&n[s].skip;)s++;for(s%=e,t&&(l+=s);l>s&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function rS(n,e,t,i){const s=n.length,l=[];let r=e,o=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?o.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=r=u.stop?a:null):(r=a,o.skip&&(e=a)),o=u}return r!==null&&l.push({start:e%s,end:r%s,loop:i}),l}function oS(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:r,end:o}=lS(t,s,l,i);if(i===!0)return fd(n,[{start:r,end:o,loop:l}],t,e);const a=o<r?o+s:o,u=!!n._fullLoop&&r===0&&o===s-1;return fd(n,rS(t,r,a,u),t,e)}function fd(n,e,t,i){return!i||!i.setContext||!t?e:aS(n,e,t,i)}function aS(n,e,t,i){const s=n._chart.getContext(),l=cd(n.options),{_datasetIndex:r,options:{spanGaps:o}}=n,a=t.length,u=[];let f=l,c=e[0].start,d=c;function h(g,y,b,v){const S=o?-1:1;if(g!==y){for(g+=a;t[g%a].skip;)g-=S;for(;t[y%a].skip;)y+=S;g%a!==y%a&&(u.push({start:g%a,end:y%a,loop:b,style:v}),f=v,c=y%a)}}for(const g of e){c=o?c:g.start;let y=t[c%a],b;for(d=c+1;d<=g.end;d++){const v=t[d%a];b=cd(i.setContext(Ji(s,{type:"segment",p0:y,p1:v,p0DataIndex:(d-1)%a,p1DataIndex:d%a,datasetIndex:r}))),uS(b,f)&&h(c,d-1,g.loop,f),y=v,f=b}c<d-1&&h(c,d-1,g.loop,f)}return u}function cd(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function uS(n,e){return e&&JSON.stringify(n)!==JSON.stringify(e)}/*!
+ * Chart.js v3.8.0
+ * https://www.chartjs.org
+ * (c) 2022 Chart.js Contributors
+ * Released under the MIT License
+ */class fS{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const l=t.listeners[s],r=t.duration;l.forEach(o=>o({chart:e,initial:t.initial,numSteps:r,currentStep:Math.min(i-t.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=N0.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 r=l.length-1,o=!1,a;for(;r>=0;--r)a=l[r],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),o=!0):(l[r]=l[l.length-1],l.pop());o&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var bi=new fS;const dd="transparent",cS={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=td(n||dd),s=i.valid&&td(e||dd);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class dS{constructor(e,t,i,s){const l=t[i];s=Tr([e.to,s,l,e.from]);const r=Tr([e.from,l,s]);this._active=!0,this._fn=e.fn||cS[e.type||typeof r],this._easing=Al[e.easing]||Al.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=r,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,r=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Tr([e.to,t,s,e.from]),this._from=Tr([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,r=this._loop,o=this._to;let a;if(this._active=l!==o&&(r||t<i),!this._active){this._target[s]=o,this._notify(!0);return}if(t<0){this._target[s]=l;return}a=t/i%2,a=r&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,o,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][t]()}}const pS=["x","y","borderWidth","radius","tension"],hS=["color","borderColor","backgroundColor"];gt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const mS=Object.keys(gt.animation);gt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});gt.set("animations",{colors:{type:"color",properties:hS},numbers:{type:"number",properties:pS}});gt.describe("animations",{_fallback:"animation"});gt.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 rb{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!pt(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!pt(s))return;const l={};for(const r of mS)l[r]=s[r];(Lt(s.properties)&&s.properties||[i]).forEach(r=>{(r===i||!t.has(r))&&t.set(r,l)})})}_animateOptions(e,t){const i=t.options,s=_S(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&gS(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),r=Object.keys(t),o=Date.now();let a;for(a=r.length-1;a>=0;--a){const u=r[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,o);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new dS(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return bi.add(this._chart,i),!0}}function gS(n,e){const t=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const l=n[i[s]];l&&l.active()&&t.push(l.wait())}return Promise.all(t)}function _S(n,e){if(!e)return;let t=n.options;if(!t){n.options=e;return}return t.$shared&&(n.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function pd(n,e){const t=n&&n.options||{},i=t.reverse,s=t.min===void 0?e:0,l=t.max===void 0?e:0;return{start:i?l:s,end:i?s:l}}function bS(n,e,t){if(t===!1)return!1;const i=pd(n,t),s=pd(e,t);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function yS(n){let e,t,i,s;return pt(n)?(e=n.top,t=n.right,i=n.bottom,s=n.left):e=t=i=s=n,{top:e,right:t,bottom:i,left:s,disabled:n===!1}}function ob(n,e){const t=[],i=n._getSortedDatasetMetas(e);let s,l;for(s=0,l=i.length;s<l;++s)t.push(i[s].index);return t}function hd(n,e,t,i={}){const s=n.keys,l=i.mode==="single";let r,o,a,u;if(e!==null){for(r=0,o=s.length;r<o;++r){if(a=+s[r],a===t){if(i.all)continue;break}u=n.values[a],qt(u)&&(l||e===0||ui(e)===ui(u))&&(e+=u)}return e}}function vS(n){const e=Object.keys(n),t=new Array(e.length);let i,s,l;for(i=0,s=e.length;i<s;++i)l=e[i],t[i]={x:l,y:n[l]};return t}function md(n,e){const t=n&&n.options.stacked;return t||t===void 0&&e.stack!==void 0}function kS(n,e,t){return`${n.id}.${e.id}.${t.stack||t.type}`}function wS(n){const{min:e,max:t,minDefined:i,maxDefined:s}=n.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}function SS(n,e,t){const i=n[e]||(n[e]={});return i[t]||(i[t]={})}function gd(n,e,t,i){for(const s of e.getMatchingVisibleMetas(i).reverse()){const l=n[s.index];if(t&&l>0||!t&&l<0)return s.index}return null}function _d(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:r,index:o}=i,a=l.axis,u=r.axis,f=kS(l,r,i),c=e.length;let d;for(let h=0;h<c;++h){const g=e[h],{[a]:y,[u]:b}=g,v=g._stacks||(g._stacks={});d=v[u]=SS(s,f,y),d[o]=b,d._top=gd(d,r,!0,i.type),d._bottom=gd(d,r,!1,i.type)}}function _a(n,e){const t=n.scales;return Object.keys(t).filter(i=>t[i].axis===e).shift()}function $S(n,e){return Ji(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function CS(n,e,t){return Ji(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function dl(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 ba=n=>n==="reset"||n==="none",bd=(n,e)=>e?n:Object.assign({},n),MS=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:ob(t,!0),values:null};class mi{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=md(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&dl(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(c,d,h,g)=>c==="x"?d:c==="r"?g:h,l=t.xAxisID=mt(i.xAxisID,_a(e,"x")),r=t.yAxisID=mt(i.yAxisID,_a(e,"y")),o=t.rAxisID=mt(i.rAxisID,_a(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,r,o),f=t.vAxisID=s(a,r,l,o);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(r),t.rScale=this.getScaleForId(o),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&&id(this._data,this),e._stacked&&dl(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(pt(t))this._data=vS(t);else if(i!==t){if(i){id(i,this);const s=this._cachedMeta;dl(s),s._parsed=[]}t&&Object.isExtensible(t)&&Ow(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=md(t.vScale,t),t.stack!==i.stack&&(s=!0,dl(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&_d(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:r}=i,o=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{Lt(s[e])?d=this.parseArrayData(i,s,e,t):pt(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const h=()=>c[o]===null||u&&c[o]<u[o];for(f=0;f<t;++f)i._parsed[f+e]=c=d[f],a&&(h()&&(a=!1),u=c);i._sorted=a}r&&_d(this,d)}parsePrimitiveData(e,t,i,s){const{iScale:l,vScale:r}=e,o=l.axis,a=r.axis,u=l.getLabels(),f=l===r,c=new Array(s);let d,h,g;for(d=0,h=s;d<h;++d)g=d+i,c[d]={[o]:f||l.parse(u[g],g),[a]:r.parse(t[g],g)};return c}parseArrayData(e,t,i,s){const{xScale:l,yScale:r}=e,o=new Array(s);let a,u,f,c;for(a=0,u=s;a<u;++a)f=a+i,c=t[f],o[a]={x:l.parse(c[0],f),y:r.parse(c[1],f)};return o}parseObjectData(e,t,i,s){const{xScale:l,yScale:r}=e,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,u=new Array(s);let f,c,d,h;for(f=0,c=s;f<c;++f)d=f+i,h=t[d],u[f]={x:l.parse(Wi(h,o),d),y:r.parse(Wi(h,a),d)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,i){const s=this.chart,l=this._cachedMeta,r=t[e.axis],o={keys:ob(s,!0),values:t._stacks[e.axis]};return hd(o,r,l.index,{mode:i})}updateRangeFromParsed(e,t,i,s){const l=i[t.axis];let r=l===null?NaN:l;const o=s&&i._stacks[t.axis];s&&o&&(s.values=o,r=hd(s,l,this._cachedMeta.index)),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r)}getMinMax(e,t){const i=this._cachedMeta,s=i._parsed,l=i._sorted&&e===i.iScale,r=s.length,o=this._getOtherScale(e),a=MS(t,i,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:c}=wS(o);let d,h;function g(){h=s[d];const y=h[o.axis];return!qt(h[e.axis])||f>y||c<y}for(d=0;d<r&&!(!g()&&(this.updateRangeFromParsed(u,e,h,a),l));++d);if(l){for(d=r-1;d>=0;--d)if(!g()){this.updateRangeFromParsed(u,e,h,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,r;for(s=0,l=t.length;s<l;++s)r=t[s][e.axis],qt(r)&&i.push(r);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,i=t.iScale,s=t.vScale,l=this.getParsed(e);return{label:i?""+i.getLabelForValue(l[i.axis]):"",value:s?""+s.getLabelForValue(l[s.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=yS(mt(this.options.clip,bS(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,i=this._cachedMeta,s=i.data||[],l=t.chartArea,r=[],o=this._drawStart||0,a=this._drawCount||s.length-o,u=this.options.drawActiveElementsOnTop;let f;for(i.dataset&&i.dataset.draw(e,l,o,a),f=o;f<o+a;++f){const c=s[f];c.hidden||(c.active&&u?r.push(c):c.draw(e,l))}for(f=0;f<r.length;++f)r[f].draw(e,l)}getStyle(e,t){const i=t?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,t,i){const s=this.getDataset();let l;if(e>=0&&e<this._cachedMeta.data.length){const r=this._cachedMeta.data[e];l=r.$context||(r.$context=CS(this.getContext(),e,r)),l.parsed=this.getParsed(e),l.raw=s.data[e],l.index=l.dataIndex=e}else l=this.$context||(this.$context=$S(this.chart.getContext(),this.index)),l.dataset=s,l.index=l.datasetIndex=this.index;return l.active=!!t,l.mode=i,l}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",i){const s=t==="active",l=this._cachedDataOpts,r=e+"-"+t,o=l[r],a=this.enableOptionSharing&&Yn(i);if(o)return bd(o,a);const u=this.chart.config,f=u.datasetElementScopeKeys(this._type,e),c=s?[`${e}Hover`,"hover",e,""]:[e,""],d=u.getOptionScopes(this.getDataset(),f),h=Object.keys(gt.elements[e]),g=()=>this.getContext(i,s),y=u.resolveNamedOptions(d,h,g,c);return y.$shared&&(y.$shared=a,l[r]=Object.freeze(bd(y,a))),y}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,r=`animation-${t}`,o=l[r];if(o)return o;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 rb(s,a&&a.animations);return a&&a._cacheable&&(l[r]=Object.freeze(u)),u}getSharedOptions(e){if(!!e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||ba(e)||this.chart._animationsDisabled}updateElement(e,t,i,s){ba(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!ba(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[o,a,u]of this._syncList)this[o](a,u);this._syncList=[];const s=i.length,l=t.length,r=Math.min(l,s);r&&this.parse(0,r),l>s?this._insertElements(s,l-s,e):l<s&&this._removeElements(l,s-l)}_insertElements(e,t,i=!0){const s=this._cachedMeta,l=s.data,r=e+t;let o;const a=u=>{for(u.length+=t,o=u.length-1;o>=r;o--)u[o]=u[o-t]};for(a(l),o=e;o<r;++o)l[o]=new this.dataElementType;this._parsing&&a(s._parsed),this.parse(e,t),i&&this.updateElements(l,e,t,"reset")}updateElements(e,t,i,s){}_removeElements(e,t){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(e,t);i._stacked&&dl(i,s)}i.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,i,s]=e;this[t](i,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}mi.defaults={};mi.prototype.datasetElementType=null;mi.prototype.dataElementType=null;function OS(n,e){if(!n._cache.$bar){const t=n.getMatchingVisibleMetas(e);let i=[];for(let s=0,l=t.length;s<l;s++)i=i.concat(t[s].controller.getAllParsedValues(n));n._cache.$bar=G0(i.sort((s,l)=>s-l))}return n._cache.$bar}function TS(n){const e=n.iScale,t=OS(e,n.type);let i=e._length,s,l,r,o;const a=()=>{r===32767||r===-32768||(Yn(o)&&(i=Math.min(i,Math.abs(r-o)||i)),o=r)};for(s=0,l=t.length;s<l;++s)r=e.getPixelForValue(t[s]),a();for(o=void 0,s=0,l=e.ticks.length;s<l;++s)r=e.getPixelForTick(s),a();return i}function DS(n,e,t,i){const s=t.barThickness;let l,r;return Ct(s)?(l=e.min*t.categoryPercentage,r=t.barPercentage):(l=s*i,r=1),{chunk:l/i,ratio:r,start:e.pixels[n]-l/2}}function AS(n,e,t,i){const s=e.pixels,l=s[n];let r=n>0?s[n-1]:null,o=n<s.length-1?s[n+1]:null;const a=t.categoryPercentage;r===null&&(r=l-(o===null?e.end-e.start:o-l)),o===null&&(o=l+l-r);const u=l-(l-Math.min(r,o))/2*a;return{chunk:Math.abs(o-r)/2*a/i,ratio:t.barPercentage,start:u}}function ES(n,e,t,i){const s=t.parse(n[0],i),l=t.parse(n[1],i),r=Math.min(s,l),o=Math.max(s,l);let a=r,u=o;Math.abs(r)>Math.abs(o)&&(a=o,u=r),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:r,max:o}}function ab(n,e,t,i){return Lt(n)?ES(n,e,t,i):e[t.axis]=t.parse(n,i),e}function yd(n,e,t,i){const s=n.iScale,l=n.vScale,r=s.getLabels(),o=s===l,a=[];let u,f,c,d;for(u=t,f=t+i;u<f;++u)d=e[u],c={},c[s.axis]=o||s.parse(r[u],u),a.push(ab(d,c,l,u));return a}function ya(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function PS(n,e,t){return n!==0?ui(n):(e.isHorizontal()?1:-1)*(e.min>=t?1:-1)}function LS(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.base<n.y,t="bottom",i="top"),e?(s="end",l="start"):(s="start",l="end"),{start:t,end:i,reverse:e,top:s,bottom:l}}function FS(n,e,t,i){let s=e.borderSkipped;const l={};if(!s){n.borderSkipped=l;return}const{start:r,end:o,reverse:a,top:u,bottom:f}=LS(n);s==="middle"&&t&&(n.enableBorderRadius=!0,(t._top||0)===i?s=u:(t._bottom||0)===i?s=f:(l[vd(f,r,o,a)]=!0,s=u)),l[vd(s,r,o,a)]=!0,n.borderSkipped=l}function vd(n,e,t,i){return i?(n=IS(n,e,t),n=kd(n,t,e)):n=kd(n,e,t),n}function IS(n,e,t){return n===e?t:n===t?e:n}function kd(n,e,t){return n==="start"?e:n==="end"?t:n}function NS(n,{inflateAmount:e},t){n.inflateAmount=e==="auto"?t===1?.33:0:e}class sf extends mi{parsePrimitiveData(e,t,i,s){return yd(e,t,i,s)}parseArrayData(e,t,i,s){return yd(e,t,i,s)}parseObjectData(e,t,i,s){const{iScale:l,vScale:r}=e,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,u=l.axis==="x"?o:a,f=r.axis==="x"?o:a,c=[];let d,h,g,y;for(d=i,h=i+s;d<h;++d)y=t[d],g={},g[l.axis]=l.parse(Wi(y,u),d),c.push(ab(Wi(y,f),g,r,d));return c}updateRangeFromParsed(e,t,i,s){super.updateRangeFromParsed(e,t,i,s);const l=i._custom;l&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,l.min),e.max=Math.max(e.max,l.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:i,vScale:s}=t,l=this.getParsed(e),r=l._custom,o=ya(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(l[s.axis]);return{label:""+i.getLabelForValue(l[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,i,s){const l=s==="reset",{index:r,_cachedMeta:{vScale:o}}=this,a=o.getBasePixel(),u=o.isHorizontal(),f=this._getRuler(),c=this.resolveDataElementOptions(t,s),d=this.getSharedOptions(c),h=this.includeOptions(s,d);this.updateSharedOptions(d,s,c);for(let g=t;g<t+i;g++){const y=this.getParsed(g),b=l||Ct(y[o.axis])?{base:a,head:a}:this._calculateBarValuePixels(g),v=this._calculateBarIndexPixels(g,f),S=(y._stacks||{})[o.axis],$={horizontal:u,base:b.base,enableBorderRadius:!S||ya(y._custom)||r===S._top||r===S._bottom,x:u?b.head:v.center,y:u?v.center:b.head,height:u?v.size:Math.abs(b.size),width:u?Math.abs(b.size):v.size};h&&($.options=d||this.resolveDataElementOptions(g,e[g].active?"active":s));const C=$.options||e[g].options;FS($,C,S,r),NS($,C,f.ratio),this.updateElement(e[g],g,$,s)}}_getStacks(e,t){const s=this._cachedMeta.iScale,l=s.getMatchingVisibleMetas(this._type),r=s.options.stacked,o=l.length,a=[];let u,f;for(u=0;u<o;++u)if(f=l[u],!!f.controller.options.grouped){if(typeof t!="undefined"){const c=f.controller.getParsed(t)[f.controller._cachedMeta.vScale.axis];if(Ct(c)||isNaN(c))continue}if((r===!1||a.indexOf(f.stack)===-1||r===void 0&&f.stack===void 0)&&a.push(f.stack),f.index===e)break}return a.length||a.push(void 0),a}_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,r;for(l=0,r=t.data.length;l<r;++l)s.push(i.getPixelForValue(this.getParsed(l)[i.axis],l));const o=e.barThickness;return{min:o||TS(t),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:o?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:i},options:{base:s,minBarLength:l}}=this,r=s||0,o=this.getParsed(e),a=o._custom,u=ya(a);let f=o[t.axis],c=0,d=i?this.applyStack(t,o,i):f,h,g;d!==f&&(c=d-f,d=f),u&&(f=a.barStart,d=a.barEnd-a.barStart,f!==0&&ui(f)!==ui(a.barEnd)&&(c=0),c+=f);const y=!Ct(s)&&!u?s:c;let b=t.getPixelForValue(y);if(this.chart.getDataVisibility(e)?h=t.getPixelForValue(c+d):h=b,g=h-b,Math.abs(g)<l){g=PS(g,t,r)*l,f===r&&(b-=g/2);const v=t.getPixelForDecimal(0),S=t.getPixelForDecimal(1),$=Math.min(v,S),C=Math.max(v,S);b=Math.max(Math.min(b,C),$),h=b+g}if(b===t.getPixelForValue(r)){const v=ui(g)*t.getLineWidthForValue(r)/2;b+=v,g-=v}return{size:g,base:b,head:h,center:h+g/2}}_calculateBarIndexPixels(e,t){const i=t.scale,s=this.options,l=s.skipNull,r=mt(s.maxBarThickness,1/0);let o,a;if(t.grouped){const u=l?this._getStackCount(e):t.stackCount,f=s.barThickness==="flex"?AS(e,t,s,u):DS(e,t,s,u),c=this._getStackIndex(this.index,this._cachedMeta.stack,l?e:void 0);o=f.start+f.chunk*c+f.chunk/2,a=Math.min(r,f.chunk*f.ratio)}else o=i.getPixelForValue(this.getParsed(e)[i.axis],e),a=Math.min(r,t.min*t.ratio);return{base:o-a/2,head:o+a/2,center:o,size:a}}draw(){const e=this._cachedMeta,t=e.vScale,i=e.data,s=i.length;let l=0;for(;l<s;++l)this.getParsed(l)[t.axis]!==null&&i[l].draw(this._ctx)}}sf.id="bar";sf.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};sf.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class lf extends mi{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,i,s){const l=super.parsePrimitiveData(e,t,i,s);for(let r=0;r<l.length;r++)l[r]._custom=this.resolveDataElementOptions(r+i).radius;return l}parseArrayData(e,t,i,s){const l=super.parseArrayData(e,t,i,s);for(let r=0;r<l.length;r++){const o=t[i+r];l[r]._custom=mt(o[2],this.resolveDataElementOptions(r+i).radius)}return l}parseObjectData(e,t,i,s){const l=super.parseObjectData(e,t,i,s);for(let r=0;r<l.length;r++){const o=t[i+r];l[r]._custom=mt(o&&o.r&&+o.r,this.resolveDataElementOptions(r+i).radius)}return l}getMaxOverflow(){const e=this._cachedMeta.data;let t=0;for(let i=e.length-1;i>=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),r=i.getLabelForValue(l.x),o=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+r+", "+o+(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:r,vScale:o}=this._cachedMeta,a=this.resolveDataElementOptions(t,s),u=this.getSharedOptions(a),f=this.includeOptions(s,u),c=r.axis,d=o.axis;for(let h=t;h<t+i;h++){const g=e[h],y=!l&&this.getParsed(h),b={},v=b[c]=l?r.getPixelForDecimal(.5):r.getPixelForValue(y[c]),S=b[d]=l?o.getBasePixel():o.getPixelForValue(y[d]);b.skip=isNaN(v)||isNaN(S),f&&(b.options=this.resolveDataElementOptions(h,g.active?"active":s),l&&(b.options.radius=0)),this.updateElement(g,h,b,s)}this.updateSharedOptions(u,s,a)}resolveDataElementOptions(e,t){const i=this.getParsed(e);let s=super.resolveDataElementOptions(e,t);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const l=s.radius;return t!=="active"&&(s.radius=0),s.radius+=mt(i&&i._custom,l),s}}lf.id="bubble";lf.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};lf.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function RS(n,e,t){let i=1,s=1,l=0,r=0;if(e<At){const o=n,a=o+e,u=Math.cos(o),f=Math.sin(o),c=Math.cos(a),d=Math.sin(a),h=($,C,M)=>Hl($,o,a,!0)?1:Math.max(C,C*t,M,M*t),g=($,C,M)=>Hl($,o,a,!0)?-1:Math.min(C,C*t,M,M*t),y=h(0,u,c),b=h(jt,f,d),v=g(Ht,u,c),S=g(Ht+jt,f,d);i=(y-v)/2,s=(b-S)/2,l=-(y+v)/2,r=-(b+S)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:r}}class er extends mi{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(pt(i[e])){const{key:a="value"}=this._parsing;l=u=>+Wi(i[u],a)}let r,o;for(r=e,o=e+t;r<o;++r)s._parsed[r]=l(r)}}_getRotation(){return Qn(this.options.rotation-90)}_getCircumference(){return Qn(this.options.circumference)}_getRotationExtents(){let e=At,t=-At;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const s=this.chart.getDatasetMeta(i).controller,l=s._getRotation(),r=s._getCircumference();e=Math.min(e,l),t=Math.max(t,l+r)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:i}=t,s=this._cachedMeta,l=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(l)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-r)/2,0),a=Math.min(L2(this.options.cutout,o),1),u=this._getRingWeight(this.index),{circumference:f,rotation:c}=this._getRotationExtents(),{ratioX:d,ratioY:h,offsetX:g,offsetY:y}=RS(c,f,a),b=(i.width-r)/d,v=(i.height-r)/h,S=Math.max(Math.min(b,v)/2,0),$=j0(this.options.radius,S),C=Math.max($*a,0),M=($-C)/this._getVisibleDatasetWeightTotal();this.offsetX=g*$,this.offsetY=y*$,s.total=this.calculateTotal(),this.outerRadius=$-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*u,0),this.updateElements(l,0,l.length,e)}_circumference(e,t){const i=this.options,s=this._cachedMeta,l=this._getCircumference();return t&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*l/At)}updateElements(e,t,i,s){const l=s==="reset",r=this.chart,o=r.chartArea,u=r.options.animation,f=(o.left+o.right)/2,c=(o.top+o.bottom)/2,d=l&&u.animateScale,h=d?0:this.innerRadius,g=d?0:this.outerRadius,y=this.resolveDataElementOptions(t,s),b=this.getSharedOptions(y),v=this.includeOptions(s,b);let S=this._getRotation(),$;for($=0;$<t;++$)S+=this._circumference($,l);for($=t;$<t+i;++$){const C=this._circumference($,l),M=e[$],T={x:f+this.offsetX,y:c+this.offsetY,startAngle:S,endAngle:S+C,circumference:C,outerRadius:g,innerRadius:h};v&&(T.options=b||this.resolveDataElementOptions($,M.active?"active":s)),S+=C,this.updateElement(M,$,T,s)}this.updateSharedOptions(b,s,y)}calculateTotal(){const e=this._cachedMeta,t=e.data;let i=0,s;for(s=0;s<t.length;s++){const l=e._parsed[s];l!==null&&!isNaN(l)&&this.chart.getDataVisibility(s)&&!t[s].hidden&&(i+=Math.abs(l))}return i}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?At*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Ql(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,r,o,a;if(!e){for(s=0,l=i.data.datasets.length;s<l;++s)if(i.isDatasetVisible(s)){r=i.getDatasetMeta(s),e=r.data,o=r.controller;break}}if(!e)return 0;for(s=0,l=e.length;s<l;++s)a=o.resolveDataElementOptions(s),a.borderAlign!=="inner"&&(t=Math.max(t,a.borderWidth||0,a.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let i=0,s=e.length;i<s;++i){const l=this.resolveDataElementOptions(i);t=Math.max(t,l.offset||0,l.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(t+=this._getRingWeight(i));return t}_getRingWeight(e){return Math.max(mt(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}er.id="doughnut";er.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};er.descriptors={_scriptable:n=>n!=="spacing",_indexable:n=>n!=="spacing"};er.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 r=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.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 Lt(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class tr extends mi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,r=this.chart._animationsDisabled;let{start:o,count:a}=jS(t,s,r);this._drawStart=o,this._drawCount=a,HS(t)&&(o=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:!r,options:u},e),this.updateElements(s,o,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:r,vScale:o,_stacked:a,_dataset:u}=this._cachedMeta,f=this.resolveDataElementOptions(t,s),c=this.getSharedOptions(f),d=this.includeOptions(s,c),h=r.axis,g=o.axis,{spanGaps:y,segment:b}=this.options,v=jl(y)?y:Number.POSITIVE_INFINITY,S=this.chart._animationsDisabled||l||s==="none";let $=t>0&&this.getParsed(t-1);for(let C=t;C<t+i;++C){const M=e[C],T=this.getParsed(C),E=S?M:{},D=Ct(T[g]),P=E[h]=r.getPixelForValue(T[h],C),L=E[g]=l||D?o.getBasePixel():o.getPixelForValue(a?this.applyStack(o,T,a):T[g],C);E.skip=isNaN(P)||isNaN(L)||D,E.stop=C>0&&Math.abs(T[h]-$[h])>v,b&&(E.parsed=T,E.raw=u.data[C]),d&&(E.options=c||this.resolveDataElementOptions(C,M.active?"active":s)),S||this.updateElement(M,C,E,s),$=T}this.updateSharedOptions(c,s,f)}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)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,r)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}tr.id="line";tr.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};tr.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};function jS(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:r,_parsed:o}=n,a=r.axis,{min:u,max:f,minDefined:c,maxDefined:d}=r.getUserBounds();c&&(s=an(Math.min(cs(o,r.axis,u).lo,t?i:cs(e,a,r.getPixelForValue(u)).lo),0,i-1)),d?l=an(Math.max(cs(o,r.axis,f).hi+1,t?0:cs(e,a,r.getPixelForValue(f)).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function HS(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}class rf extends mi{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=Ql(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return eb.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)&&(l<t.min&&(t.min=l),l>t.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),r=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),o=(l-r)/e.getVisibleDatasetCount();this.outerRadius=l-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(e,t,i,s){const l=s==="reset",r=this.chart,a=r.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,c=u.yCenter,d=u.getIndexAngle(0)-.5*Ht;let h=d,g;const y=360/this.countVisibleElements();for(g=0;g<t;++g)h+=this._computeAngle(g,s,y);for(g=t;g<t+i;g++){const b=e[g];let v=h,S=h+this._computeAngle(g,s,y),$=r.getDataVisibility(g)?u.getDistanceFromCenterForValue(this.getParsed(g).r):0;h=S,l&&(a.animateScale&&($=0),a.animateRotate&&(v=S=d));const C={x:f,y:c,innerRadius:0,outerRadius:$,startAngle:v,endAngle:S,options:this.resolveDataElementOptions(g,b.active?"active":s)};this.updateElement(b,g,C,s)}}countVisibleElements(){const e=this._cachedMeta;let t=0;return e.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?Qn(this.resolveDataElementOptions(e,t).angle||i):0}}rf.id="polarArea";rf.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};rf.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 r=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.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 ub extends er{}ub.id="pie";ub.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class of extends mi{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 eb.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 r=this.resolveDatasetElementOptions(e);this.options.showLine||(r.borderWidth=0);const o={_loop:!0,_fullLoop:l.length===s.length,options:r};this.updateElement(i,void 0,o,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,r=s==="reset";for(let o=t;o<t+i;o++){const a=e[o],u=this.resolveDataElementOptions(o,a.active?"active":s),f=l.getPointPositionForValue(o,this.getParsed(o).r),c=r?l.xCenter:f.x,d=r?l.yCenter:f.y,h={x:c,y:d,angle:f.angle,skip:isNaN(c)||isNaN(d),options:u};this.updateElement(a,o,h,s)}}}of.id="radar";of.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};of.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class af extends tr{}af.id="scatter";af.defaults={showLine:!1,fill:!1};af.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function is(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ru{constructor(e){this.options=e||{}}formats(){return is()}parse(e,t){return is()}format(e,t){return is()}add(e,t,i){return is()}diff(e,t,i){return is()}startOf(e,t,i){return is()}endOf(e,t){return is()}}ru.override=function(n){Object.assign(ru.prototype,n)};var fb={_date:ru};function qS(n,e,t,i){const{controller:s,data:l,_sorted:r}=n,o=s._cachedMeta.iScale;if(o&&e===o.axis&&e!=="r"&&r&&l.length){const a=o._reversePixels?Cw:cs;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 nr(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),r=t[e];for(let o=0,a=l.length;o<a;++o){const{index:u,data:f}=l[o],{lo:c,hi:d}=qS(l[o],e,r,s);for(let h=c;h<=d;++h){const g=f[h];g.skip||i(g,u,h)}}}function VS(n){const e=n.indexOf("x")!==-1,t=n.indexOf("y")!==-1;return function(i,s){const l=e?Math.abs(i.x-s.x):0,r=t?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(l,2)+Math.pow(r,2))}}function va(n,e,t,i,s){const l=[];return!s&&!n.isPointInArea(e)||nr(n,t,e,function(o,a,u){!s&&!Vl(o,n.chartArea,0)||o.inRange(e.x,e.y,i)&&l.push({element:o,datasetIndex:a,index:u})},!0),l}function zS(n,e,t,i){let s=[];function l(r,o,a){const{startAngle:u,endAngle:f}=r.getProps(["startAngle","endAngle"],i),{angle:c}=V0(r,{x:e.x,y:e.y});Hl(c,u,f)&&s.push({element:r,datasetIndex:o,index:a})}return nr(n,t,e,l),s}function BS(n,e,t,i,s,l){let r=[];const o=VS(t);let a=Number.POSITIVE_INFINITY;function u(f,c,d){const h=f.inRange(e.x,e.y,s);if(i&&!h)return;const g=f.getCenterPoint(s);if(!(!!l||n.isPointInArea(g))&&!h)return;const b=o(e,g);b<a?(r=[{element:f,datasetIndex:c,index:d}],a=b):b===a&&r.push({element:f,datasetIndex:c,index:d})}return nr(n,t,e,u),r}function ka(n,e,t,i,s,l){return!l&&!n.isPointInArea(e)?[]:t==="r"&&!i?zS(n,e,t,s):BS(n,e,t,i,s,l)}function wd(n,e,t,i,s){const l=[],r=t==="x"?"inXRange":"inYRange";let o=!1;return nr(n,t,e,(a,u,f)=>{a[r](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),o=o||a.inRange(e.x,e.y,s))}),i&&!o?[]:l}var US={evaluateInteractionItems:nr,modes:{index(n,e,t,i){const s=rs(e,n),l=t.axis||"x",r=t.includeInvisible||!1,o=t.intersect?va(n,s,l,i,r):ka(n,s,l,!1,i,r),a=[];return o.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=o[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=rs(e,n),l=t.axis||"xy",r=t.includeInvisible||!1;let o=t.intersect?va(n,s,l,i,r):ka(n,s,l,!1,i,r);if(o.length>0){const a=o[0].datasetIndex,u=n.getDatasetMeta(a).data;o=[];for(let f=0;f<u.length;++f)o.push({element:u[f],datasetIndex:a,index:f})}return o},point(n,e,t,i){const s=rs(e,n),l=t.axis||"xy",r=t.includeInvisible||!1;return va(n,s,l,i,r)},nearest(n,e,t,i){const s=rs(e,n),l=t.axis||"xy",r=t.includeInvisible||!1;return ka(n,s,l,t.intersect,i,r)},x(n,e,t,i){const s=rs(e,n);return wd(n,s,"x",t.intersect,i)},y(n,e,t,i){const s=rs(e,n);return wd(n,s,"y",t.intersect,i)}}};const cb=["left","top","right","bottom"];function pl(n,e){return n.filter(t=>t.pos===e)}function Sd(n,e){return n.filter(t=>cb.indexOf(t.pos)===-1&&t.box.axis===e)}function hl(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 WS(n){const e=[];let t,i,s,l,r,o;for(t=0,i=(n||[]).length;t<i;++t)s=n[t],{position:l,options:{stack:r,stackWeight:o=1}}=s,e.push({index:t,box:s,pos:l,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&l+r,stackWeight:o});return e}function YS(n){const e={};for(const t of n){const{stack:i,pos:s,stackWeight:l}=t;if(!i||!cb.includes(s))continue;const r=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=l}return e}function KS(n,e){const t=YS(n),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e;let l,r,o;for(l=0,r=n.length;l<r;++l){o=n[l];const{fullSize:a}=o.box,u=t[o.stack],f=u&&o.stackWeight/u.weight;o.horizontal?(o.width=f?f*i:a&&e.availableWidth,o.height=s):(o.width=i,o.height=f?f*s:a&&e.availableHeight)}return t}function JS(n){const e=WS(n),t=hl(e.filter(u=>u.box.fullSize),!0),i=hl(pl(e,"left"),!0),s=hl(pl(e,"right")),l=hl(pl(e,"top"),!0),r=hl(pl(e,"bottom")),o=Sd(e,"x"),a=Sd(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(r).concat(o),chartArea:pl(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(r).concat(o)}}function $d(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function db(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 GS(n,e,t,i){const{pos:s,box:l}=t,r=n.maxPadding;if(!pt(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&&db(r,l.getPadding());const o=Math.max(0,e.outerWidth-$d(r,n,"left","right")),a=Math.max(0,e.outerHeight-$d(r,n,"top","bottom")),u=o!==n.w,f=a!==n.h;return n.w=o,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function ZS(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 xS(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{l[r]=Math.max(e[r],t[r])}),l}return i(n?["left","right"]:["top","bottom"])}function Sl(n,e,t,i){const s=[];let l,r,o,a,u,f;for(l=0,r=n.length,u=0;l<r;++l){o=n[l],a=o.box,a.update(o.width||e.w,o.height||e.h,xS(o.horizontal,e));const{same:c,other:d}=GS(e,t,o,i);u|=c&&s.length,f=f||d,a.fullSize||s.push(o)}return u&&Sl(s,e,t,i)||f}function Ar(n,e,t,i,s){n.top=t,n.left=e,n.right=e+i,n.bottom=t+s,n.width=i,n.height=s}function Cd(n,e,t,i){const s=t.padding;let{x:l,y:r}=e;for(const o of n){const a=o.box,u=i[o.stack]||{count:1,placed:0,weight:1},f=o.stackWeight/u.weight||1;if(o.horizontal){const c=e.w*f,d=u.size||a.height;Yn(u.start)&&(r=u.start),a.fullSize?Ar(a,s.left,r,t.outerWidth-s.right-s.left,d):Ar(a,e.left+u.placed,r,c,d),u.start=r,u.placed+=c,r=a.bottom}else{const c=e.h*f,d=u.size||a.width;Yn(u.start)&&(l=u.start),a.fullSize?Ar(a,l,s.top,d,t.outerHeight-s.bottom-s.top):Ar(a,l,e.top+u.placed,d,c),u.start=l,u.placed+=c,l=a.right}}e.x=l,e.y=r}gt.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Er={addBox(n,e){n.boxes||(n.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},n.boxes.push(e)},removeBox(n,e){const t=n.boxes?n.boxes.indexOf(e):-1;t!==-1&&n.boxes.splice(t,1)},configure(n,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(n,e,t,i){if(!n)return;const s=Kn(n.options.layout.padding),l=Math.max(e-s.width,0),r=Math.max(t-s.height,0),o=JS(n.boxes),a=o.vertical,u=o.horizontal;$t(n.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=a.reduce((y,b)=>b.box.options&&b.box.options.display===!1?y:y+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:r,vBoxMaxWidth:l/2/f,hBoxMaxHeight:r/2}),d=Object.assign({},s);db(d,Kn(i));const h=Object.assign({maxPadding:d,w:l,h:r,x:s.left,y:s.top},s),g=KS(a.concat(u),c);Sl(o.fullSize,h,c,g),Sl(a,h,c,g),Sl(u,h,c,g)&&Sl(a,h,c,g),ZS(h),Cd(o.leftAndTop,h,c,g),h.x+=h.w,h.y+=h.h,Cd(o.rightAndBottom,h,c,g),n.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},$t(o.chartArea,y=>{const b=y.box;Object.assign(b,n.chartArea),b.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class pb{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 XS extends pb{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const xr="$chartjs",QS={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Md=n=>n===null||n==="";function e$(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[xr]={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",Md(s)){const l=od(n,"width");l!==void 0&&(n.width=l)}if(Md(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=od(n,"height");l!==void 0&&(n.height=l)}return n}const hb=Zw?{passive:!0}:!1;function t$(n,e,t){n.addEventListener(e,t,hb)}function n$(n,e,t){n.canvas.removeEventListener(e,t,hb)}function i$(n,e){const t=QS[n.type]||n.type,{x:i,y:s}=rs(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function bo(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function s$(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let r=!1;for(const o of l)r=r||bo(o.addedNodes,i),r=r&&!bo(o.removedNodes,i);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function l$(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let r=!1;for(const o of l)r=r||bo(o.removedNodes,i),r=r&&!bo(o.addedNodes,i);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const zl=new Map;let Od=0;function mb(){const n=window.devicePixelRatio;n!==Od&&(Od=n,zl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function r$(n,e){zl.size||window.addEventListener("resize",mb),zl.set(n,e)}function o$(n){zl.delete(n),zl.size||window.removeEventListener("resize",mb)}function a$(n,e,t){const i=n.canvas,s=i&&nf(i);if(!s)return;const l=R0((o,a)=>{const u=s.clientWidth;t(o,a),u<s.clientWidth&&t()},window),r=new ResizeObserver(o=>{const a=o[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return r.observe(s),r$(n,l),r}function wa(n,e,t){t&&t.disconnect(),e==="resize"&&o$(n)}function u$(n,e,t){const i=n.canvas,s=R0(l=>{n.ctx!==null&&t(i$(l,n))},n,l=>{const r=l[0];return[r,r.offsetX,r.offsetY]});return t$(i,e,s),s}class f$ extends pb{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(e$(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[xr])return!1;const i=t[xr].initial;["height","width"].forEach(l=>{const r=i[l];Ct(r)?t.removeAttribute(l):t.setAttribute(l,r)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[xr],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),r={attach:s$,detach:l$,resize:a$}[t]||u$;s[t]=r(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:wa,detach:wa,resize:wa}[t]||n$)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Gw(e,t,i,s)}isAttached(e){const t=nf(e);return!!(t&&t.isConnected)}}function c$(n){return!nb()||typeof OffscreenCanvas!="undefined"&&n instanceof OffscreenCanvas?XS:f$}class Di{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){const{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}hasValue(){return jl(this.x)&&jl(this.y)}getProps(e,t){const i=this.$animations;if(!t||!i)return this;const s={};return e.forEach(l=>{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}}Di.defaults={};Di.defaultRoutes=void 0;const gb={values(n){return Lt(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=d$(n,t)}const r=Vn(Math.abs(l)),o=Math.max(Math.min(-1*Math.floor(r),20),0),a={notation:s,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(a,this.options.ticks.format),Ql(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Vn(n)));return i===1||i===2||i===5?gb.numeric.call(this,n,e,t):""}};function d$(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 Fo={formatters:gb};gt.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:Fo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});gt.route("scale.ticks","color","","color");gt.route("scale.grid","color","","borderColor");gt.route("scale.grid","borderColor","","borderColor");gt.route("scale.title","color","","color");gt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});gt.describe("scales",{_fallback:"scale"});gt.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function p$(n,e){const t=n.options.ticks,i=t.maxTicksLimit||h$(n),s=t.major.enabled?g$(e):[],l=s.length,r=s[0],o=s[l-1],a=[];if(l>i)return _$(e,a,s,l/i),a;const u=m$(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((o-r)/(l-1)):null;for(Pr(e,a,u,Ct(d)?0:r-d,r),f=0,c=l-1;f<c;f++)Pr(e,a,u,s[f],s[f+1]);return Pr(e,a,u,o,Ct(d)?e.length:o+d),a}return Pr(e,a,u),a}function h$(n){const e=n.options.offset,t=n._tickSize(),i=n._length/t+(e?0:1),s=n._maxLength/t;return Math.floor(Math.min(i,s))}function m$(n,e,t){const i=b$(n),s=e.length/t;if(!i)return Math.max(s,1);const l=V2(i);for(let r=0,o=l.length-1;r<o;r++){const a=l[r];if(a>s)return a}return Math.max(s,1)}function g$(n){const e=[];let t,i;for(t=0,i=n.length;t<i;t++)n[t].major&&e.push(t);return e}function _$(n,e,t,i){let s=0,l=t[0],r;for(i=Math.ceil(i),r=0;r<n.length;r++)r===l&&(e.push(n[r]),s++,l=t[s*i])}function Pr(n,e,t,i,s){const l=mt(i,0),r=Math.min(mt(s,n.length),n.length);let o=0,a,u,f;for(t=Math.ceil(t),s&&(a=s-i,t=a/Math.floor(a/t)),f=l;f<0;)o++,f=Math.round(l+o*t);for(u=Math.max(l,0);u<r;u++)u===f&&(e.push(n[u]),o++,f=Math.round(l+o*t))}function b$(n){const e=n.length;let t,i;if(e<2)return!1;for(i=n[0],t=1;t<e;++t)if(n[t]-n[t-1]!==i)return!1;return i}const y$=n=>n==="left"?"right":n==="right"?"left":n,Td=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Dd(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;l<s;l+=i)t.push(n[Math.floor(l)]);return t}function v$(n,e,t){const i=n.ticks.length,s=Math.min(e,i-1),l=n._startPixel,r=n._endPixel,o=1e-6;let a=n.getPixelForTick(s),u;if(!(t&&(i===1?u=Math.max(a-l,r-a):e===0?u=(n.getPixelForTick(1)-a)/2:u=(a-n.getPixelForTick(s-1))/2,a+=s<e?u:-u,a<l-o||a>r+o)))return a}function k$(n,e){$t(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;l<s;++l)delete t.data[i[l]];i.splice(0,s)}})}function ml(n){return n.drawTicks?n.tickLength:0}function Ad(n,e){if(!n.display)return 0;const t=Tn(n.font,e),i=Kn(n.padding);return(Lt(n.text)?n.text.length:1)*t.lineHeight+i.height}function w$(n,e){return Ji(n,{scale:e,type:"scale"})}function S$(n,e,t){return Ji(n,{tick:t,index:e,type:"tick"})}function $$(n,e,t){let i=E2(n);return(t&&e!=="right"||!t&&e==="right")&&(i=y$(i)),i}function C$(n,e,t,i){const{top:s,left:l,bottom:r,right:o,chart:a}=n,{chartArea:u,scales:f}=a;let c=0,d,h,g;const y=r-s,b=o-l;if(n.isHorizontal()){if(h=Bc(i,l,o),pt(t)){const v=Object.keys(t)[0],S=t[v];g=f[v].getPixelForValue(S)+y-e}else t==="center"?g=(u.bottom+u.top)/2+y-e:g=Td(n,t,e);d=o-l}else{if(pt(t)){const v=Object.keys(t)[0],S=t[v];h=f[v].getPixelForValue(S)-b+e}else t==="center"?h=(u.left+u.right)/2-b+e:h=Td(n,t,e);g=Bc(i,r,s),c=t==="left"?-jt:jt}return{titleX:h,titleY:g,maxWidth:d,rotation:c}}class vs extends Di{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:i,_suggestedMax:s}=this;return e=jn(e,Number.POSITIVE_INFINITY),t=jn(t,Number.NEGATIVE_INFINITY),i=jn(i,Number.POSITIVE_INFINITY),s=jn(s,Number.NEGATIVE_INFINITY),{min:jn(e,i),max:jn(t,s),minDefined:qt(e),maxDefined:qt(t)}}getMinMax(e){let{min:t,max:i,minDefined:s,maxDefined:l}=this.getUserBounds(),r;if(s&&l)return{min:t,max:i};const o=this.getMatchingVisibleMetas();for(let a=0,u=o.length;a<u;++a)r=o[a].controller.getMinMax(this,e),s||(t=Math.min(t,r.min)),l||(i=Math.max(i,r.max));return t=l&&t>i?i:t,i=s&&t>i?t:i,{min:jn(t,jn(i,t)),max:jn(i,jn(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(){Rt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:r}=this.options,o=r.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=$w(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=o<this.ticks.length;this._convertTicksToLabels(a?Dd(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=p$(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,i;this.isHorizontal()?(t=this.left,i=this.right):(t=this.top,i=this.bottom,e=!e),this._startPixel=t,this._endPixel=i,this._reversePixels=e,this._length=i-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Rt(this.options.afterUpdate,[this])}beforeSetDimensions(){Rt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Rt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Rt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Rt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let i,s,l;for(i=0,s=e.length;i<s;i++)l=e[i],l.label=Rt(t.callback,[l.value,i,e],this)}afterTickToLabelConversion(){Rt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Rt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,i=this.ticks.length,s=t.minRotation||0,l=t.maxRotation;let r=s,o,a,u;if(!this._isVisible()||!t.display||s>=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),c=f.widest.width,d=f.highest.height,h=an(this.chart.width-c,0,this.maxWidth);o=e.offset?this.maxWidth/i:h/(i-1),c+6>o&&(o=h/(i-(e.offset?.5:1)),a=this.maxHeight-ml(e.grid)-t.padding-Ad(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),r=Wu(Math.min(Math.asin(an((f.highest.height+6)/o,-1,1)),Math.asin(an(a/u,-1,1))-Math.asin(an(d/u,-1,1)))),r=Math.max(s,Math.min(l,r))),this.labelRotation=r}afterCalculateLabelRotation(){Rt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Rt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,r=this._isVisible(),o=this.isHorizontal();if(r){const a=Ad(s,t.options.font);if(o?(e.width=this.maxWidth,e.height=ml(l)+a):(e.height=this.maxHeight,e.width=ml(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),h=i.padding*2,g=Qn(this.labelRotation),y=Math.cos(g),b=Math.sin(g);if(o){const v=i.mirror?0:b*c.width+y*d.height;e.height=Math.min(this.maxHeight,e.height+v+h)}else{const v=i.mirror?0:y*c.width+b*d.height;e.width=Math.min(this.maxWidth,e.width+v+h)}this._calculatePadding(u,f,b,y)}}this._handleMargins(),o?(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:r},position:o}=this.options,a=this.labelRotation!==0,u=o!=="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+r)*this.width/(this.width-f),0),this.paddingRight=Math.max((h-c+r)*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+r,this.paddingBottom=c+r}}_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(){Rt(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<i;t++)Ct(e[t].label)&&(e.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let i=this.ticks;t<i.length&&(i=Dd(i,t)),this._labelSizes=e=this._computeLabelSizes(i,i.length)}return e}_computeLabelSizes(e,t){const{ctx:i,_longestTextCache:s}=this,l=[],r=[];let o=0,a=0,u,f,c,d,h,g,y,b,v,S,$;for(u=0;u<t;++u){if(d=e[u].label,h=this._resolveTickFontOptions(u),i.font=g=h.string,y=s[g]=s[g]||{data:{},gc:[]},b=h.lineHeight,v=S=0,!Ct(d)&&!Lt(d))v=ho(i,y.data,y.gc,v,d),S=b;else if(Lt(d))for(f=0,c=d.length;f<c;++f)$=d[f],!Ct($)&&!Lt($)&&(v=ho(i,y.data,y.gc,v,$),S+=b);l.push(v),r.push(S),o=Math.max(v,o),a=Math.max(S,a)}k$(s,t);const C=l.indexOf(o),M=r.indexOf(a),T=E=>({width:l[E]||0,height:r[E]||0});return{first:T(0),last:T(t-1),widest:T(C),highest:T(M),widths:l,heights:r}}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 U2(this._alignToPixels?ns(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&&e<t.length){const i=t[e];return i.$context||(i.$context=S$(this.getContext(),e,i))}return this.$context||(this.$context=w$(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=Qn(this.labelRotation),i=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),l=this._getLabelSizes(),r=e.autoSkipPadding||0,o=l?l.widest.width+r:0,a=l?l.highest.height+r:0;return this.isHorizontal()?a*i>o*s?o/i:a/s:a*s<o*i?a/i:o/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:r}=s,o=l.offset,a=this.isHorizontal(),f=this.ticks.length+(o?1:0),c=ml(l),d=[],h=l.setContext(this.getContext()),g=h.drawBorder?h.borderWidth:0,y=g/2,b=function(q){return ns(i,q,g)};let v,S,$,C,M,T,E,D,P,L,R,j;if(r==="top")v=b(this.bottom),T=this.bottom-c,D=v-y,L=b(e.top)+y,j=e.bottom;else if(r==="bottom")v=b(this.top),L=e.top,j=b(e.bottom)-y,T=v+y,D=this.top+c;else if(r==="left")v=b(this.right),M=this.right-c,E=v-y,P=b(e.left)+y,R=e.right;else if(r==="right")v=b(this.left),P=e.left,R=b(e.right)-y,M=v+y,E=this.left+c;else if(t==="x"){if(r==="center")v=b((e.top+e.bottom)/2+.5);else if(pt(r)){const q=Object.keys(r)[0],Z=r[q];v=b(this.chart.scales[q].getPixelForValue(Z))}L=e.top,j=e.bottom,T=v+y,D=T+c}else if(t==="y"){if(r==="center")v=b((e.left+e.right)/2);else if(pt(r)){const q=Object.keys(r)[0],Z=r[q];v=b(this.chart.scales[q].getPixelForValue(Z))}M=v-y,E=M-c,P=e.left,R=e.right}const G=mt(s.ticks.maxTicksLimit,f),Y=Math.max(1,Math.ceil(f/G));for(S=0;S<f;S+=Y){const q=l.setContext(this.getContext(S)),Z=q.lineWidth,J=q.color,K=l.borderDash||[],ne=q.borderDashOffset,ce=q.tickWidth,be=q.tickColor,se=q.tickBorderDash||[],x=q.tickBorderDashOffset;$=v$(this,S,o),$!==void 0&&(C=ns(i,$,Z),a?M=E=P=R=C:T=D=L=j=C,d.push({tx1:M,ty1:T,tx2:E,ty2:D,x1:P,y1:L,x2:R,y2:j,width:Z,color:J,borderDash:K,borderDashOffset:ne,tickWidth:ce,tickColor:be,tickBorderDash:se,tickBorderDashOffset:x}))}return this._ticksLength=f,this._borderValue=v,d}_computeLabelItems(e){const t=this.axis,i=this.options,{position:s,ticks:l}=i,r=this.isHorizontal(),o=this.ticks,{align:a,crossAlign:u,padding:f,mirror:c}=l,d=ml(i.grid),h=d+f,g=c?-f:h,y=-Qn(this.labelRotation),b=[];let v,S,$,C,M,T,E,D,P,L,R,j,G="middle";if(s==="top")T=this.bottom-g,E=this._getXAxisLabelAlignment();else if(s==="bottom")T=this.top+g,E=this._getXAxisLabelAlignment();else if(s==="left"){const q=this._getYAxisLabelAlignment(d);E=q.textAlign,M=q.x}else if(s==="right"){const q=this._getYAxisLabelAlignment(d);E=q.textAlign,M=q.x}else if(t==="x"){if(s==="center")T=(e.top+e.bottom)/2+h;else if(pt(s)){const q=Object.keys(s)[0],Z=s[q];T=this.chart.scales[q].getPixelForValue(Z)+h}E=this._getXAxisLabelAlignment()}else if(t==="y"){if(s==="center")M=(e.left+e.right)/2-h;else if(pt(s)){const q=Object.keys(s)[0],Z=s[q];M=this.chart.scales[q].getPixelForValue(Z)}E=this._getYAxisLabelAlignment(d).textAlign}t==="y"&&(a==="start"?G="top":a==="end"&&(G="bottom"));const Y=this._getLabelSizes();for(v=0,S=o.length;v<S;++v){$=o[v],C=$.label;const q=l.setContext(this.getContext(v));D=this.getPixelForTick(v)+l.labelOffset,P=this._resolveTickFontOptions(v),L=P.lineHeight,R=Lt(C)?C.length:1;const Z=R/2,J=q.color,K=q.textStrokeColor,ne=q.textStrokeWidth;let ce=E;r?(M=D,E==="inner"&&(v===S-1?ce=this.options.reverse?"left":"right":v===0?ce=this.options.reverse?"right":"left":ce="center"),s==="top"?u==="near"||y!==0?j=-R*L+L/2:u==="center"?j=-Y.highest.height/2-Z*L+L:j=-Y.highest.height+L/2:u==="near"||y!==0?j=L/2:u==="center"?j=Y.highest.height/2-Z*L:j=Y.highest.height-R*L,c&&(j*=-1)):(T=D,j=(1-R)*L/2);let be;if(q.showLabelBackdrop){const se=Kn(q.backdropPadding),x=Y.heights[v],Te=Y.widths[v];let te=T+j-se.top,_e=M-se.left;switch(G){case"middle":te-=x/2;break;case"bottom":te-=x;break}switch(E){case"center":_e-=Te/2;break;case"right":_e-=Te;break}be={left:_e,top:te,width:Te+se.width,height:x+se.height,color:q.backdropColor}}b.push({rotation:y,label:C,font:P,color:J,strokeColor:K,strokeWidth:ne,textOffset:j,textAlign:ce,textBaseline:G,translation:[M,T],backdrop:be})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-Qn(this.labelRotation))return e==="top"?"left":"right";let s="center";return t.align==="start"?s="left":t.align==="end"?s="right":t.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:i,mirror:s,padding:l}}=this.options,r=this._getLabelSizes(),o=e+l,a=r.widest.width;let u,f;return t==="left"?s?(f=this.right+l,i==="near"?u="left":i==="center"?(u="center",f+=a/2):(u="right",f+=a)):(f=this.right-o,i==="near"?u="right":i==="center"?(u="center",f-=a/2):(u="left",f=this.left)):t==="right"?s?(f=this.left+l,i==="near"?u="right":i==="center"?(u="center",f-=a/2):(u="left",f-=a)):(f=this.left+o,i==="near"?u="left":i==="center"?(u="center",f+=a/2):(u="right",f=this.right)):u="right",{textAlign:u,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:i,top:s,width:l,height:r}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(i,s,l,r),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks.findIndex(l=>l.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,r;const o=(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,r=s.length;l<r;++l){const a=s[l];t.drawOnChartArea&&o({x:a.x1,y:a.y1},{x:a.x2,y:a.y2},a),t.drawTicks&&o({x:a.tx1,y:a.ty1},{x:a.tx2,y:a.ty2},{color:a.tickColor,width:a.tickWidth,borderDash:a.tickBorderDash,borderDashOffset:a.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{grid:i}}=this,s=i.setContext(this.getContext()),l=i.drawBorder?s.borderWidth:0;if(!l)return;const r=i.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let a,u,f,c;this.isHorizontal()?(a=ns(e,this.left,l)-l/2,u=ns(e,this.right,r)+r/2,f=c=o):(f=ns(e,this.top,l)-l/2,c=ns(e,this.bottom,r)+r/2,a=u=o),t.save(),t.lineWidth=s.borderWidth,t.strokeStyle=s.borderColor,t.beginPath(),t.moveTo(a,f),t.lineTo(u,c),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&Gu(i,s);const l=this._labelItems||(this._labelItems=this._computeLabelItems(e));let r,o;for(r=0,o=l.length;r<o;++r){const a=l[r],u=a.font,f=a.label;a.backdrop&&(i.fillStyle=a.backdrop.color,i.fillRect(a.backdrop.left,a.backdrop.top,a.backdrop.width,a.backdrop.height));let c=a.textOffset;mo(i,f,0,c,u,a)}s&&Zu(i)}drawTitle(){const{ctx:e,options:{position:t,title:i,reverse:s}}=this;if(!i.display)return;const l=Tn(i.font),r=Kn(i.padding),o=i.align;let a=l.lineHeight/2;t==="bottom"||t==="center"||pt(t)?(a+=r.bottom,Lt(i.text)&&(a+=l.lineHeight*(i.text.length-1))):a+=r.top;const{titleX:u,titleY:f,maxWidth:c,rotation:d}=C$(this,a,t,o);mo(e,i.text,0,0,l,{color:i.color,maxWidth:c,rotation:d,textAlign:$$(o,t,s),textBaseline:"middle",translation:[u,f]})}draw(e){!this._isVisible()||(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,i=mt(e.grid&&e.grid.z,-1);return!this._isVisible()||this.draw!==vs.prototype.draw?[{z:t,draw:s=>{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,r;for(l=0,r=t.length;l<r;++l){const o=t[l];o[i]===this.id&&(!e||o.type===e)&&s.push(o)}return s}_resolveTickFontOptions(e){const t=this.options.ticks.setContext(this.getContext(e));return Tn(t.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Lr{constructor(e,t,i){this.type=e,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let i;T$(t)&&(i=this.register(t));const s=this.items,l=e.id,r=this.scope+"."+l;if(!l)throw new Error("class does not have id: "+e);return l in s||(s[l]=e,M$(e,r,i),this.override&&gt.override(e.id,e.overrides)),r}get(e){return this.items[e]}unregister(e){const t=this.items,i=e.id,s=this.scope;i in t&&delete t[i],s&&i in gt[s]&&(delete gt[s][i],this.override&&delete _s[i])}}function M$(n,e,t){const i=Rl(Object.create(null),[t?gt.get(t):{},gt.get(e),n.defaults]);gt.set(e,i),n.defaultRoutes&&O$(e,n.defaultRoutes),n.descriptors&&gt.describe(e,n.descriptors)}function O$(n,e){Object.keys(e).forEach(t=>{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),r=e[t].split("."),o=r.pop(),a=r.join(".");gt.route(l,s,a,o)})}function T$(n){return"id"in n&&"defaults"in n}class D${constructor(){this.controllers=new Lr(mi,"datasets",!0),this.elements=new Lr(Di,"elements"),this.plugins=new Lr(Object,"plugins"),this.scales=new Lr(vs,"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):$t(s,r=>{const o=i||this._getRegistryForType(r);this._exec(e,o,r)})})}_exec(e,t,i){const s=Uu(e);Rt(i["before"+s],[],i),t[e](i),Rt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(e,t,i){const s=t.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return s}}var Si=new D$;class A${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),r=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),r}_notify(e,t,i,s){s=s||{};for(const l of e){const r=l.plugin,o=r[i],a=[t,s,l.options];if(Rt(o,a,r)===!1&&s.cancelable)return!1}return!0}invalidate(){Ct(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=mt(i.options&&i.options.plugins,{}),l=E$(i);return s===!1&&!t?[]:L$(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,r)=>l.filter(o=>!r.some(a=>o.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function E$(n){const e=[],t=Object.keys(Si.plugins.items);for(let s=0;s<t.length;s++)e.push(Si.getPlugin(t[s]));const i=n.plugins||[];for(let s=0;s<i.length;s++){const l=i[s];e.indexOf(l)===-1&&e.push(l)}return e}function P$(n,e){return!e&&n===!1?null:n===!0?{}:n}function L$(n,e,t,i){const s=[],l=n.getContext();for(let r=0;r<e.length;r++){const o=e[r],a=o.id,u=P$(t[a],i);u!==null&&s.push({plugin:o,options:F$(n.config,o,u,l)})}return s}function F$(n,e,t,i){const s=n.pluginScopeKeys(e),l=n.getOptionScopes(t,s);return n.createResolver(l,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ou(n,e){const t=gt.datasets[n]||{};return((e.datasets||{})[n]||{}).indexAxis||e.indexAxis||t.indexAxis||"x"}function I$(n,e){let t=n;return n==="_index_"?t=e:n==="_value_"&&(t=e==="x"?"y":"x"),t}function N$(n,e){return n===e?"_index_":"_value_"}function R$(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function au(n,e){return n==="x"||n==="y"?n:e.axis||R$(e.position)||n.charAt(0).toLowerCase()}function j$(n,e){const t=_s[n.type]||{scales:{}},i=e.scales||{},s=ou(n.type,e),l=Object.create(null),r=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!pt(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const u=au(o,a),f=N$(u,s),c=t.scales||{};l[u]=l[u]||o,r[o]=Tl(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(o=>{const a=o.type||n.type,u=o.indexAxis||ou(a,e),c=(_s[a]||{}).scales||{};Object.keys(c).forEach(d=>{const h=I$(d,u),g=o[h+"AxisID"]||l[h]||h;r[g]=r[g]||Object.create(null),Tl(r[g],[{axis:h},i[g],c[d]])})}),Object.keys(r).forEach(o=>{const a=r[o];Tl(a,[gt.scales[a.type],gt.scale])}),r}function _b(n){const e=n.options||(n.options={});e.plugins=mt(e.plugins,{}),e.scales=j$(n,e)}function bb(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function H$(n){return n=n||{},n.data=bb(n.data),_b(n),n}const Ed=new Map,yb=new Set;function Fr(n,e){let t=Ed.get(n);return t||(t=e(),Ed.set(n,t),yb.add(t)),t}const gl=(n,e,t)=>{const i=Wi(e,t);i!==void 0&&n.add(i)};class q${constructor(e){this._config=H$(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=bb(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(),_b(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Fr(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Fr(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Fr(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return Fr(`${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,r=this._cachedScopes(e,i),o=r.get(t);if(o)return o;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(c=>gl(a,e,c))),f.forEach(c=>gl(a,s,c)),f.forEach(c=>gl(a,_s[l]||{},c)),f.forEach(c=>gl(a,gt,c)),f.forEach(c=>gl(a,su,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),yb.has(t)&&r.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,_s[t]||{},gt.datasets[t]||{},{type:t},gt,su]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:r,subPrefixes:o}=Pd(this._resolverCache,e,s);let a=r;if(z$(r,t)){l.$shared=!1,i=Yi(i)?i():i;const u=this.createResolver(e,i,o);a=Ks(r,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=Pd(this._resolverCache,e,i);return pt(t)?Ks(l,t,void 0,s):l}}function Pd(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:Qu(e,t),subPrefixes:t.filter(o=>!o.toLowerCase().includes("hover"))},i.set(s,l)),l}const V$=n=>pt(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||Yi(n[t]),!1);function z$(n,e){const{isScriptable:t,isIndexable:i}=Z0(n);for(const s of e){const l=t(s),r=i(s),o=(r||l)&&n[s];if(l&&(Yi(o)||V$(o))||r&&Lt(o))return!0}return!1}var B$="3.8.0";const U$=["top","bottom","left","right","chartArea"];function Ld(n,e){return n==="top"||n==="bottom"||U$.indexOf(n)===-1&&e==="x"}function Fd(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function Id(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Rt(t&&t.onComplete,[n],e)}function W$(n){const e=n.chart,t=e.options.animation;Rt(t&&t.onProgress,[n],e)}function vb(n){return nb()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const yo={},kb=n=>{const e=vb(n);return Object.values(yo).filter(t=>t.canvas===e).pop()};function Y$(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const r=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=r)}}}function K$(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class vo{constructor(e,t){const i=this.config=new q$(t),s=vb(e),l=kb(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||c$(s)),this.platform.updateConfig(i);const o=this.platform.acquireContext(s,r.aspectRatio),a=o&&o.canvas,u=a&&a.height,f=a&&a.width;if(this.id=P2(),this.ctx=o,this.canvas=a,this.width=f,this.height=u,this._options=r,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 A$,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=A2(c=>this.update(c),r.resizeDelay||0),this._dataChanges=[],yo[this.id]=this,!o||!a){console.error("Failed to create chart: can't acquire context from the given item");return}bi.listen(this,"complete",Id),bi.listen(this,"progress",W$),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return Ct(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():rd(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return nd(this.canvas,this.ctx),this}stop(){return bi.stop(this),this}resize(e,t){bi.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,r=this.platform.getMaximumSize(s,e,t,l),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,rd(this,o,!0)&&(this.notifyPlugins("resize",{size:r}),Rt(i.onResize,[this,r],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};$t(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((r,o)=>(r[o]=!1,r),{});let l=[];t&&(l=l.concat(Object.keys(t).map(r=>{const o=t[r],a=au(r,o),u=a==="r",f=a==="x";return{options:o,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),$t(l,r=>{const o=r.options,a=o.id,u=au(a,o),f=mt(o.type,r.dtype);(o.position===void 0||Ld(o.position,u)!==Ld(r.dposition))&&(o.position=r.dposition),s[a]=!0;let c=null;if(a in i&&i[a].type===f)c=i[a];else{const d=Si.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(o,e)}),$t(s,(r,o)=>{r||delete i[o]}),$t(i,r=>{Er.configure(this,r,r.options),Er.addBox(this,r)})}_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;s<i;++s)this._destroyDatasetMeta(s);e.splice(t,i-t)}this._sortedMetasets=e.slice(0).sort(Fd("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.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<s;i++){const l=t[i];let r=this.getDatasetMeta(i);const o=l.type||this.config.type;if(r.type&&r.type!==o&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=o,r.indexAxis=l.indexAxis||ou(o,this.options),r.order=l.order||0,r.index=i,r.label=""+l.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const a=Si.getController(o),{datasetElementType:u,dataElementType:f}=gt.datasets[o];Object.assign(a.prototype,{dataElementType:Si.getElement(f),datasetElementType:u&&Si.getElement(u)}),r.controller=new a(this,i),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){$t(this.data.datasets,(e,t)=>{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 r=0;for(let u=0,f=this.data.datasets.length;u<f;u++){const{controller:c}=this.getDatasetMeta(u),d=!s&&l.indexOf(c)===-1;c.buildOrUpdateElements(d),r=Math.max(+c.getMaxOverflow(),r)}r=this._minPadding=i.layout.autoPadding?r:0,this._updateLayout(r),s||$t(l,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Fd("z","_idx"));const{_active:o,_lastEvent:a}=this;a?this._eventHandler(a,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){$t(this.scales,e=>{Er.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Wc(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 r=i==="_removeElements"?-l:l;Y$(e,s,r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(r=>r[0]===l).map((r,o)=>o+","+r.splice(1).join(","))),s=i(0);for(let l=1;l<t;l++)if(!Wc(s,i(l)))return;return Array.from(s).map(l=>l.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Er.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],$t(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<i;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,i=this.data.datasets.length;t<i;++t)this._updateDataset(t,Yi(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const i=this.getDatasetMeta(e),s={meta:i,index:e,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(t),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(bi.has(this)?this.attached&&!bi.running(this)&&bi.start(this):(this.draw(),Id({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resize(i,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,i=[];let s,l;for(s=0,l=t.length;s<l;++s){const r=t[s];(!e||r.visible)&&i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;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,r={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&Gu(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&&Zu(t),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return Vl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=US.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=Ji(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),r=l.controller._resolveAnimations(void 0,s);Yn(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),r.update(l,{visible:i}),this.update(o=>o.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(),bi.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),nd(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete yo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,i=(l,r)=>{t.addEventListener(this,l,r),e[l]=r},s=(l,r,o)=>{l.offsetX=r,l.offsetY=o,this._eventHandler(l)};$t(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 r;const o=()=>{s("attach",o),this.attached=!0,this.resize(),i("resize",l),i("detach",r)};r=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",o)},t.isAttached(this.canvas)?o():r()}unbindEvents(){$t(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},$t(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,r,o,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),o=0,a=e.length;o<a;++o){r=e[o];const u=r&&this.getDatasetMeta(r.datasetIndex).controller;u&&u[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],i=e.map(({datasetIndex:l,index:r})=>{const o=this.getDatasetMeta(l);if(!o)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:o.data[r],index:r}});!uo(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)),r=l(t,e),o=i?e:l(e,t);r.length&&this.updateHoverStyle(r,s.mode,!1),o.length&&s.mode&&this.updateHoverStyle(o,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=r=>(r.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,r=t,o=this._getActiveElements(e,s,i,r),a=j2(e),u=K$(e,this._lastEvent,i,a);i&&(this._lastEvent=null,Rt(l.onHover,[e,o,this],this),a&&Rt(l.onClick,[e,o,this],this));const f=!uo(o,s);return(f||t)&&(this._active=o,this._updateHoverStyles(o,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 Nd=()=>$t(vo.instances,n=>n._plugins.invalidate()),Li=!0;Object.defineProperties(vo,{defaults:{enumerable:Li,value:gt},instances:{enumerable:Li,value:yo},overrides:{enumerable:Li,value:_s},registry:{enumerable:Li,value:Si},version:{enumerable:Li,value:B$},getChart:{enumerable:Li,value:kb},register:{enumerable:Li,value:(...n)=>{Si.add(...n),Nd()}},unregister:{enumerable:Li,value:(...n)=>{Si.remove(...n),Nd()}}});function wb(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:r,outerRadius:o,innerRadius:a}=e;let u=s/o;n.beginPath(),n.arc(l,r,o,i-u,t+u),a>s?(u=s/a,n.arc(l,r,a,t+u,i-u,!0)):n.arc(l,r,s,t+jt,i-jt),n.closePath(),n.clip()}function J$(n){return xu(n,["outerStart","outerEnd","innerStart","innerEnd"])}function G$(n,e,t,i){const s=J$(n.options.borderRadius),l=(t-e)/2,r=Math.min(l,i*e/2),o=a=>{const u=(t-Math.min(l,a))*i/2;return an(a,0,Math.min(l,u))};return{outerStart:o(s.outerStart),outerEnd:o(s.outerEnd),innerStart:an(s.innerStart,0,r),innerEnd:an(s.innerEnd,0,r)}}function Ps(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function uu(n,e,t,i,s){const{x:l,y:r,startAngle:o,pixelMargin:a,innerRadius:u}=e,f=Math.max(e.outerRadius+i+t-a,0),c=u>0?u+i+t+a:0;let d=0;const h=s-o;if(i){const Z=u>0?u-i:0,J=f>0?f-i:0,K=(Z+J)/2,ne=K!==0?h*K/(K+i):h;d=(h-ne)/2}const g=Math.max(.001,h*f-t/Ht)/f,y=(h-g)/2,b=o+y+d,v=s-y-d,{outerStart:S,outerEnd:$,innerStart:C,innerEnd:M}=G$(e,c,f,v-b),T=f-S,E=f-$,D=b+S/T,P=v-$/E,L=c+C,R=c+M,j=b+C/L,G=v-M/R;if(n.beginPath(),n.arc(l,r,f,D,P),$>0){const Z=Ps(E,P,l,r);n.arc(Z.x,Z.y,$,P,v+jt)}const Y=Ps(R,v,l,r);if(n.lineTo(Y.x,Y.y),M>0){const Z=Ps(R,G,l,r);n.arc(Z.x,Z.y,M,v+jt,G+Math.PI)}if(n.arc(l,r,c,v-M/c,b+C/c,!0),C>0){const Z=Ps(L,j,l,r);n.arc(Z.x,Z.y,C,j+Math.PI,b-jt)}const q=Ps(T,b,l,r);if(n.lineTo(q.x,q.y),S>0){const Z=Ps(T,D,l,r);n.arc(Z.x,Z.y,S,b-jt,D)}n.closePath()}function Z$(n,e,t,i){const{fullCircles:s,startAngle:l,circumference:r}=e;let o=e.endAngle;if(s){uu(n,e,t,i,l+At);for(let a=0;a<s;++a)n.fill();isNaN(r)||(o=l+r%At,r%At===0&&(o+=At))}return uu(n,e,t,i,o),n.fill(),o}function x$(n,e,t){const{x:i,y:s,startAngle:l,pixelMargin:r,fullCircles:o}=e,a=Math.max(e.outerRadius-r,0),u=e.innerRadius+r;let f;for(t&&wb(n,e,l+At),n.beginPath(),n.arc(i,s,u,l+At,l,!0),f=0;f<o;++f)n.stroke();for(n.beginPath(),n.arc(i,s,a,l,l+At),f=0;f<o;++f)n.stroke()}function X$(n,e,t,i,s){const{options:l}=e,{borderWidth:r,borderJoinStyle:o}=l,a=l.borderAlign==="inner";!r||(a?(n.lineWidth=r*2,n.lineJoin=o||"round"):(n.lineWidth=r,n.lineJoin=o||"bevel"),e.fullCircles&&x$(n,e,a),a&&wb(n,e,s),uu(n,e,t,i,s),n.stroke())}class uf extends Di{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,i){const s=this.getProps(["x","y"],i),{angle:l,distance:r}=V0(s,{x:e,y:t}),{startAngle:o,endAngle:a,innerRadius:u,outerRadius:f,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,g=mt(c,a-o)>=At||Hl(l,o,a),y=ql(r,u+d,f+d);return g&&y}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:r,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,c=(r+o+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;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>At?Math.floor(i/At):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*r,Math.sin(a)*r),this.circumference>=Ht&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const o=Z$(e,this,r,l);X$(e,this,r,l,o),e.restore()}}uf.id="arc";uf.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0};uf.defaultRoutes={backgroundColor:"backgroundColor"};function Sb(n,e,t=e){n.lineCap=mt(t.borderCapStyle,e.borderCapStyle),n.setLineDash(mt(t.borderDash,e.borderDash)),n.lineDashOffset=mt(t.borderDashOffset,e.borderDashOffset),n.lineJoin=mt(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=mt(t.borderWidth,e.borderWidth),n.strokeStyle=mt(t.borderColor,e.borderColor)}function Q$(n,e,t){n.lineTo(t.x,t.y)}function eC(n){return n.stepped?gw:n.tension||n.cubicInterpolationMode==="monotone"?_w:Q$}function $b(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:r,end:o}=e,a=Math.max(s,r),u=Math.min(l,o),f=s<r&&l<r||s>o&&l>o;return{count:i,start:a,loop:e.loop,ilen:u<a&&!f?i+u-a:u-a}}function tC(n,e,t,i){const{points:s,options:l}=e,{count:r,start:o,loop:a,ilen:u}=$b(s,t,i),f=eC(l);let{move:c=!0,reverse:d}=i||{},h,g,y;for(h=0;h<=u;++h)g=s[(o+(d?u-h:h))%r],!g.skip&&(c?(n.moveTo(g.x,g.y),c=!1):f(n,y,g,d,l.stepped),y=g);return a&&(g=s[(o+(d?u:0))%r],f(n,y,g,d,l.stepped)),!!a}function nC(n,e,t,i){const s=e.points,{count:l,start:r,ilen:o}=$b(s,t,i),{move:a=!0,reverse:u}=i||{};let f=0,c=0,d,h,g,y,b,v;const S=C=>(r+(u?o-C:C))%l,$=()=>{y!==b&&(n.lineTo(f,b),n.lineTo(f,y),n.lineTo(f,v))};for(a&&(h=s[S(0)],n.moveTo(h.x,h.y)),d=0;d<=o;++d){if(h=s[S(d)],h.skip)continue;const C=h.x,M=h.y,T=C|0;T===g?(M<y?y=M:M>b&&(b=M),f=(c*f+C)/++c):($(),n.lineTo(C,M),g=T,c=0,y=b=M),v=M}$()}function fu(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?nC:tC}function iC(n){return n.stepped?xw:n.tension||n.cubicInterpolationMode==="monotone"?Xw:os}function sC(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),Sb(n,e.options),n.stroke(s)}function lC(n,e,t,i){const{segments:s,options:l}=e,r=fu(e);for(const o of s)Sb(n,l,o.style),n.beginPath(),r(n,e,o,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const rC=typeof Path2D=="function";function oC(n,e,t,i){rC&&!e.options.segment?sC(n,e,t,i):lC(n,e,t,i)}class Gi extends Di{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;Bw(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=oS(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,r=lb(this,{property:t,start:s,end:s});if(!r.length)return;const o=[],a=iC(i);let u,f;for(u=0,f=r.length;u<f;++u){const{start:c,end:d}=r[u],h=l[c],g=l[d];if(h===g){o.push(h);continue}const y=Math.abs((s-h[t])/(g[t]-h[t])),b=a(h,g,y,i.stepped);b[t]=e[t],o.push(b)}return o.length===1?o[0]:o}pathSegment(e,t,i){return fu(this)(e,this,t,i)}path(e,t,i){const s=this.segments,l=fu(this);let r=this._loop;t=t||0,i=i||this.points.length-t;for(const o of s)r&=l(e,this,o,{start:t,end:t+i-1});return!!r}draw(e,t,i,s){const l=this.options||{};(this.points||[]).length&&l.borderWidth&&(e.save(),oC(e,this,i,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Gi.id="line";Gi.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};Gi.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};Gi.descriptors={_scriptable:!0,_indexable:n=>n!=="borderDash"&&n!=="fill"};function Rd(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l)<s.radius+s.hitRadius}class Io extends Di{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,i){const s=this.options,{x:l,y:r}=this.getProps(["x","y"],i);return Math.pow(e-l,2)+Math.pow(t-r,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(e,t){return Rd(this,e,"x",t)}inYRange(e,t){return Rd(this,e,"y",t)}getCenterPoint(e){const{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}size(e){e=e||this.options||{};let t=e.radius||0;t=Math.max(t,t&&e.hoverRadius||0);const i=t&&e.borderWidth||0;return(t+i)*2}draw(e,t){const i=this.options;this.skip||i.radius<.1||!Vl(this,t,this.size(i)/2)||(e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.fillStyle=i.backgroundColor,lu(e,i,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}Io.id="point";Io.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};Io.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Cb(n,e){const{x:t,y:i,base:s,width:l,height:r}=n.getProps(["x","y","base","width","height"],e);let o,a,u,f,c;return n.horizontal?(c=r/2,o=Math.min(t,s),a=Math.max(t,s),u=i-c,f=i+c):(c=l/2,o=t-c,a=t+c,u=Math.min(i,s),f=Math.max(i,s)),{left:o,top:u,right:a,bottom:f}}function zi(n,e,t,i){return n?0:an(e,t,i)}function aC(n,e,t){const i=n.options.borderWidth,s=n.borderSkipped,l=K0(i);return{t:zi(s.top,l.top,0,t),r:zi(s.right,l.right,0,e),b:zi(s.bottom,l.bottom,0,t),l:zi(s.left,l.left,0,e)}}function uC(n,e,t){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,l=qs(s),r=Math.min(e,t),o=n.borderSkipped,a=i||pt(s);return{topLeft:zi(!a||o.top||o.left,l.topLeft,0,r),topRight:zi(!a||o.top||o.right,l.topRight,0,r),bottomLeft:zi(!a||o.bottom||o.left,l.bottomLeft,0,r),bottomRight:zi(!a||o.bottom||o.right,l.bottomRight,0,r)}}function fC(n){const e=Cb(n),t=e.right-e.left,i=e.bottom-e.top,s=aC(n,t/2,i/2),l=uC(n,t/2,i/2);return{outer:{x:e.left,y:e.top,w:t,h:i,radius:l},inner:{x:e.left+s.l,y:e.top+s.t,w:t-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,l.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,l.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,l.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,l.bottomRight-Math.max(s.b,s.r))}}}}function Sa(n,e,t,i){const s=e===null,l=t===null,o=n&&!(s&&l)&&Cb(n,i);return o&&(s||ql(e,o.left,o.right))&&(l||ql(t,o.top,o.bottom))}function cC(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function dC(n,e){n.rect(e.x,e.y,e.w,e.h)}function $a(n,e,t={}){const i=n.x!==t.x?-e:0,s=n.y!==t.y?-e:0,l=(n.x+n.w!==t.x+t.w?e:0)-i,r=(n.y+n.h!==t.y+t.h?e:0)-s;return{x:n.x+i,y:n.y+s,w:n.w+l,h:n.h+r,radius:n.radius}}class ff extends Di{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:i,backgroundColor:s}}=this,{inner:l,outer:r}=fC(this),o=cC(r.radius)?go:dC;e.save(),(r.w!==l.w||r.h!==l.h)&&(e.beginPath(),o(e,$a(r,t,l)),e.clip(),o(e,$a(l,-t,r)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),o(e,$a(l,t)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,t,i){return Sa(this,e,t,i)}inXRange(e,t){return Sa(this,e,null,t)}inYRange(e,t){return Sa(this,null,e,t)}getCenterPoint(e){const{x:t,y:i,base:s,horizontal:l}=this.getProps(["x","y","base","horizontal"],e);return{x:l?(t+s)/2:t,y:l?i:(i+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}ff.id="bar";ff.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};ff.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function pC(n,e,t){const i=n.segments,s=n.points,l=e.points,r=[];for(const o of i){let{start:a,end:u}=o;u=cf(a,u,s);const f=cu(t,s[a],s[u],o.loop);if(!e.segments){r.push({source:o,target:f,start:s[a],end:s[u]});continue}const c=lb(e,f);for(const d of c){const h=cu(t,l[d.start],l[d.end],d.loop),g=sb(o,s,h);for(const y of g)r.push({source:y,target:d,start:{[t]:jd(f,h,"start",Math.max)},end:{[t]:jd(f,h,"end",Math.min)}})}}return r}function cu(n,e,t,i){if(i)return;let s=e[n],l=t[n];return n==="angle"&&(s=Mn(s),l=Mn(l)),{property:n,start:s,end:l}}function hC(n,e){const{x:t=null,y:i=null}=n||{},s=e.points,l=[];return e.segments.forEach(({start:r,end:o})=>{o=cf(r,o,s);const a=s[r],u=s[o];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 cf(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function jd(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function Mb(n,e){let t=[],i=!1;return Lt(n)?(i=!0,t=n):t=hC(n,e),t.length?new Gi({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function mC(n,e,t){let s=n[e].fill;const l=[e];let r;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!qt(s))return s;if(r=n[s],!r)return!1;if(r.visible)return s;l.push(s),s=r.fill}return!1}function gC(n,e,t){const i=vC(n);if(pt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return qt(s)&&Math.floor(s)===s?_C(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function _C(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function bC(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:pt(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function yC(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:pt(n)?i=n.value:i=e.getBaseValue(),i}function vC(n){const e=n.options,t=e.fill;let i=mt(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function kC(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,r=i.points,o=wC(e,t);o.push(Mb({x:null,y:e.bottom},i));for(let a=0;a<l.length;a++){const u=l[a];for(let f=u.start;f<=u.end;f++)SC(s,r[f],o)}return new Gi({points:s,options:{}})}function wC(n,e){const t=[],i=n.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const l=i[s];if(l.index===e)break;l.hidden||t.unshift(l.dataset)}return t}function SC(n,e,t){const i=[];for(let s=0;s<t.length;s++){const l=t[s],{first:r,last:o,point:a}=$C(l,e,"x");if(!(!a||r&&o)){if(r)i.unshift(a);else if(n.push(a),!o)break}}n.push(...i)}function $C(n,e,t){const i=n.interpolate(e,t);if(!i)return{};const s=i[t],l=n.segments,r=n.points;let o=!1,a=!1;for(let u=0;u<l.length;u++){const f=l[u],c=r[f.start][t],d=r[f.end][t];if(ql(s,c,d)){o=s===c,a=s===d;break}}return{first:o,last:a,point:i}}class Ob{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,i){const{x:s,y:l,radius:r}=this;return t=t||{start:0,end:At},e.arc(s,l,r,t.end,t.start,!0),!i.bounds}interpolate(e){const{x:t,y:i,radius:s}=this,l=e.angle;return{x:t+Math.cos(l)*s,y:i+Math.sin(l)*s,angle:l}}}function CC(n){const{chart:e,fill:t,line:i}=n;if(qt(t))return MC(e,t);if(t==="stack")return kC(n);if(t==="shape")return!0;const s=OC(n);return s instanceof Ob?s:Mb(s,i)}function MC(n,e){const t=n.getDatasetMeta(e);return t&&n.isDatasetVisible(e)?t.dataset:null}function OC(n){return(n.scale||{}).getPointPositionForValue?DC(n):TC(n)}function TC(n){const{scale:e={},fill:t}=n,i=bC(t,e);if(qt(i)){const s=e.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function DC(n){const{scale:e,fill:t}=n,i=e.options,s=e.getLabels().length,l=i.reverse?e.max:e.min,r=yC(t,e,l),o=[];if(i.grid.circular){const a=e.getPointPositionForValue(0,l);return new Ob({x:a.x,y:a.y,radius:e.getDistanceFromCenterForValue(r)})}for(let a=0;a<s;++a)o.push(e.getPointPositionForValue(a,r));return o}function Ca(n,e,t){const i=CC(e),{line:s,scale:l,axis:r}=e,o=s.options,a=o.fill,u=o.backgroundColor,{above:f=u,below:c=u}=a||{};i&&s.points.length&&(Gu(n,t),AC(n,{line:s,target:i,above:f,below:c,area:t,scale:l,axis:r}),Zu(n))}function AC(n,e){const{line:t,target:i,above:s,below:l,area:r,scale:o}=e,a=t._loop?"angle":e.axis;n.save(),a==="x"&&l!==s&&(Hd(n,i,r.top),qd(n,{line:t,target:i,color:s,scale:o,property:a}),n.restore(),n.save(),Hd(n,i,r.bottom)),qd(n,{line:t,target:i,color:l,scale:o,property:a}),n.restore()}function Hd(n,e,t){const{segments:i,points:s}=e;let l=!0,r=!1;n.beginPath();for(const o of i){const{start:a,end:u}=o,f=s[a],c=s[cf(a,u,s)];l?(n.moveTo(f.x,f.y),l=!1):(n.lineTo(f.x,t),n.lineTo(f.x,f.y)),r=!!e.pathSegment(n,o,{move:r}),r?n.closePath():n.lineTo(c.x,t)}n.lineTo(e.first().x,t),n.closePath(),n.clip()}function qd(n,e){const{line:t,target:i,property:s,color:l,scale:r}=e,o=pC(t,i,s);for(const{source:a,target:u,start:f,end:c}of o){const{style:{backgroundColor:d=l}={}}=a,h=i!==!0;n.save(),n.fillStyle=d,EC(n,r,h&&cu(s,f,c)),n.beginPath();const g=!!t.pathSegment(n,a);let y;if(h){g?n.closePath():Vd(n,i,c,s);const b=!!i.pathSegment(n,u,{move:g,reverse:!0});y=g&&b,y||Vd(n,i,f,s)}n.closePath(),n.fill(y?"evenodd":"nonzero"),n.restore()}}function EC(n,e,t){const{top:i,bottom:s}=e.chart.chartArea,{property:l,start:r,end:o}=t||{};l==="x"&&(n.beginPath(),n.rect(r,i,o-r,s-i),n.clip())}function Vd(n,e,t,i){const s=e.interpolate(t,i);s&&n.lineTo(s.x,s.y)}var PC={id:"filler",afterDatasetsUpdate(n,e,t){const i=(n.data.datasets||[]).length,s=[];let l,r,o,a;for(r=0;r<i;++r)l=n.getDatasetMeta(r),o=l.dataset,a=null,o&&o.options&&o instanceof Gi&&(a={visible:n.isDatasetVisible(r),index:r,fill:gC(o,r,i),chart:n,axis:l.controller.options.indexAxis,scale:l.vScale,line:o}),l.$filler=a,s.push(a);for(r=0;r<i;++r)a=s[r],!(!a||a.fill===!1)&&(a.fill=mC(s,r,t.propagate))},beforeDraw(n,e,t){const i=t.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),l=n.chartArea;for(let r=s.length-1;r>=0;--r){const o=s[r].$filler;!o||(o.line.updateControlPoints(l,o.axis),i&&Ca(n.ctx,o,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;l&&Ca(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!i||i.fill===!1||t.drawTime!=="beforeDatasetDraw"||Ca(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Pl={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;e<t;++e){const r=n[e].element;if(r&&r.hasValue()){const o=r.tooltipPosition();i+=o.x,s+=o.y,++l}}return{x:i/l,y:s/l}},nearest(n,e){if(!n.length)return!1;let t=e.x,i=e.y,s=Number.POSITIVE_INFINITY,l,r,o;for(l=0,r=n.length;l<r;++l){const a=n[l].element;if(a&&a.hasValue()){const u=a.getCenterPoint(),f=nu(e,u);f<s&&(s=f,o=a)}}if(o){const a=o.tooltipPosition();t=a.x,i=a.y}return{x:t,y:i}}};function li(n,e){return e&&(Lt(e)?Array.prototype.push.apply(n,e):n.push(e)),n}function yi(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
+`)>-1?n.split(`
+`):n}function LC(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:r,value:o}=l.getLabelAndValue(s);return{chart:n,label:r,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:o,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function zd(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:r,boxHeight:o}=e,a=Tn(e.bodyFont),u=Tn(e.titleFont),f=Tn(e.footerFont),c=l.length,d=s.length,h=i.length,g=Kn(e.padding);let y=g.height,b=0,v=i.reduce((C,M)=>C+M.before.length+M.lines.length+M.after.length,0);if(v+=n.beforeBody.length+n.afterBody.length,c&&(y+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),v){const C=e.displayColors?Math.max(o,a.lineHeight):a.lineHeight;y+=h*C+(v-h)*a.lineHeight+(v-1)*e.bodySpacing}d&&(y+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let S=0;const $=function(C){b=Math.max(b,t.measureText(C).width+S)};return t.save(),t.font=u.string,$t(n.title,$),t.font=a.string,$t(n.beforeBody.concat(n.afterBody),$),S=e.displayColors?r+2+e.boxPadding:0,$t(i,C=>{$t(C.before,$),$t(C.lines,$),$t(C.after,$)}),S=0,t.font=f.string,$t(n.footer,$),t.restore(),b+=g.width,{width:b,height:y}}function FC(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function IC(n,e,t,i){const{x:s,width:l}=i,r=t.caretSize+t.caretPadding;if(n==="left"&&s+l+r>e.width||n==="right"&&s-l-r<0)return!0}function NC(n,e,t,i){const{x:s,width:l}=t,{width:r,chartArea:{left:o,right:a}}=n;let u="center";return i==="center"?u=s<=(o+a)/2?"left":"right":s<=l/2?u="left":s>=r-l/2&&(u="right"),IC(u,n,e,t)&&(u="center"),u}function Bd(n,e,t){const i=t.yAlign||e.yAlign||FC(n,t);return{xAlign:t.xAlign||e.xAlign||NC(n,e,t,i),yAlign:i}}function RC(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function jC(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function Ud(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:r}=n,{xAlign:o,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:h}=qs(r);let g=RC(e,o);const y=jC(e,a,u);return a==="center"?o==="left"?g+=u:o==="right"&&(g-=u):o==="left"?g-=Math.max(f,d)+s:o==="right"&&(g+=Math.max(c,h)+s),{x:an(g,0,i.width-e.width),y:an(y,0,i.height-e.height)}}function Ir(n,e,t){const i=Kn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function Wd(n){return li([],yi(n))}function HC(n,e,t){return Ji(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function Yd(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class du extends Di{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 rb(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=HC(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]),r=i.afterTitle.apply(this,[e]);let o=[];return o=li(o,yi(s)),o=li(o,yi(l)),o=li(o,yi(r)),o}getBeforeBody(e,t){return Wd(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return $t(e,l=>{const r={before:[],lines:[],after:[]},o=Yd(i,l);li(r.before,yi(o.beforeLabel.call(this,l))),li(r.lines,o.label.call(this,l)),li(r.after,yi(o.afterLabel.call(this,l))),s.push(r)}),s}getAfterBody(e,t){return Wd(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]),r=i.afterFooter.apply(this,[e]);let o=[];return o=li(o,yi(s)),o=li(o,yi(l)),o=li(o,yi(r)),o}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],r=[];let o=[],a,u;for(a=0,u=t.length;a<u;++a)o.push(LC(this.chart,t[a]));return e.filter&&(o=o.filter((f,c,d)=>e.filter(f,c,d,i))),e.itemSort&&(o=o.sort((f,c)=>e.itemSort(f,c,i))),$t(o,f=>{const c=Yd(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),r.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=r,this.dataPoints=o,o}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,r=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const o=Pl[i.position].call(this,s,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const a=this._size=zd(this,i),u=Object.assign({},o,a),f=Bd(this.chart,i,u),c=Ud(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:o.x,caretY:o.y}}this._tooltipItems=r,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:r,cornerRadius:o}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:c}=qs(o),{x:d,y:h}=e,{width:g,height:y}=t;let b,v,S,$,C,M;return l==="center"?(C=h+y/2,s==="left"?(b=d,v=b-r,$=C+r,M=C-r):(b=d+g,v=b+r,$=C-r,M=C+r),S=b):(s==="left"?v=d+Math.max(a,f)+r:s==="right"?v=d+g-Math.max(u,c)-r:v=this.caretX,l==="top"?($=h,C=$-r,b=v-r,S=v+r):($=h+y,C=$+r,b=v+r,S=v-r),M=$),{x1:b,x2:v,x3:S,y1:$,y2:C,y3:M}}drawTitle(e,t,i){const s=this.title,l=s.length;let r,o,a;if(l){const u=ga(i.rtl,this.x,this.width);for(e.x=Ir(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",r=Tn(i.titleFont),o=i.titleSpacing,t.fillStyle=i.titleColor,t.font=r.string,a=0;a<l;++a)t.fillText(s[a],u.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+o,a+1===l&&(e.y+=i.titleMarginBottom-o)}}_drawColorBox(e,t,i,s,l){const r=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:a,boxWidth:u,boxPadding:f}=l,c=Tn(l.bodyFont),d=Ir(this,"left",l),h=s.x(d),g=a<c.lineHeight?(c.lineHeight-a)/2:0,y=t.y+g;if(l.usePointStyle){const b={radius:Math.min(u,a)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},v=s.leftForLtr(h,u)+u/2,S=y+a/2;e.strokeStyle=l.multiKeyBackground,e.fillStyle=l.multiKeyBackground,lu(e,b,v,S),e.strokeStyle=r.borderColor,e.fillStyle=r.backgroundColor,lu(e,b,v,S)}else{e.lineWidth=r.borderWidth||1,e.strokeStyle=r.borderColor,e.setLineDash(r.borderDash||[]),e.lineDashOffset=r.borderDashOffset||0;const b=s.leftForLtr(h,u-f),v=s.leftForLtr(s.xPlus(h,1),u-f-2),S=qs(r.borderRadius);Object.values(S).some($=>$!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,go(e,{x:b,y,w:u,h:a,radius:S}),e.fill(),e.stroke(),e.fillStyle=r.backgroundColor,e.beginPath(),go(e,{x:v,y:y+1,w:u-2,h:a-2,radius:S}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,y,u,a),e.strokeRect(b,y,u,a),e.fillStyle=r.backgroundColor,e.fillRect(v,y+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:r,displayColors:o,boxHeight:a,boxWidth:u,boxPadding:f}=i,c=Tn(i.bodyFont);let d=c.lineHeight,h=0;const g=ga(i.rtl,this.x,this.width),y=function(D){t.fillText(D,g.x(e.x+h),e.y+d/2),e.y+=d+l},b=g.textAlign(r);let v,S,$,C,M,T,E;for(t.textAlign=r,t.textBaseline="middle",t.font=c.string,e.x=Ir(this,b,i),t.fillStyle=i.bodyColor,$t(this.beforeBody,y),h=o&&b!=="right"?r==="center"?u/2+f:u+2+f:0,C=0,T=s.length;C<T;++C){for(v=s[C],S=this.labelTextColors[C],t.fillStyle=S,$t(v.before,y),$=v.lines,o&&$.length&&(this._drawColorBox(t,e,C,g,i),d=Math.max(c.lineHeight,a)),M=0,E=$.length;M<E;++M)y($[M]),d=c.lineHeight;$t(v.after,y)}h=0,d=c.lineHeight,$t(this.afterBody,y),e.y-=l}drawFooter(e,t,i){const s=this.footer,l=s.length;let r,o;if(l){const a=ga(i.rtl,this.x,this.width);for(e.x=Ir(this,i.footerAlign,i),e.y+=i.footerMarginTop,t.textAlign=a.textAlign(i.footerAlign),t.textBaseline="middle",r=Tn(i.footerFont),t.fillStyle=i.footerColor,t.font=r.string,o=0;o<l;++o)t.fillText(s[o],a.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+i.footerSpacing}}drawBackground(e,t,i,s){const{xAlign:l,yAlign:r}=this,{x:o,y:a}=e,{width:u,height:f}=i,{topLeft:c,topRight:d,bottomLeft:h,bottomRight:g}=qs(s.cornerRadius);t.fillStyle=s.backgroundColor,t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.beginPath(),t.moveTo(o+c,a),r==="top"&&this.drawCaret(e,t,i,s),t.lineTo(o+u-d,a),t.quadraticCurveTo(o+u,a,o+u,a+d),r==="center"&&l==="right"&&this.drawCaret(e,t,i,s),t.lineTo(o+u,a+f-g),t.quadraticCurveTo(o+u,a+f,o+u-g,a+f),r==="bottom"&&this.drawCaret(e,t,i,s),t.lineTo(o+h,a+f),t.quadraticCurveTo(o,a+f,o,a+f-h),r==="center"&&l==="left"&&this.drawCaret(e,t,i,s),t.lineTo(o,a+c),t.quadraticCurveTo(o,a,o+c,a),t.closePath(),t.fill(),s.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const r=Pl[e.position].call(this,this._active,this._eventPosition);if(!r)return;const o=this._size=zd(this,e),a=Object.assign({},r,this._size),u=Bd(t,e,a),f=Ud(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=o.width,this.height=o.height,this.caretX=r.x,this.caretY=r.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 r=Kn(t.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&o&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),nS(e,t.textDirection),l.y+=r.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),iS(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:o,index:a})=>{const u=this.chart.getDatasetMeta(o);if(!u)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:u.data[a],index:a}}),l=!uo(i,s),r=this._positionChanged(s,t);(l||r)&&(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||[],r=this._getActiveElements(e,l,t,i),o=this._positionChanged(r,e),a=t||!uo(r,l)||o;return a&&(this._active=r,(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 r=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&r.reverse(),r}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,r=Pl[l.position].call(this,e,t);return r!==!1&&(i!==r.x||s!==r.y)}}du.positioners=Pl;var qC={id:"tooltip",_element:du,positioners:Pl,afterInit(n,e,t){t&&(n.tooltip=new du({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:_i,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.dataIndex<i)return t[e.dataIndex]}return""},afterTitle:_i,beforeBody:_i,beforeLabel:_i,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let e=n.dataset.label||"";e&&(e+=": ");const t=n.formattedValue;return Ct(t)||(e+=t),e},labelColor(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:_i,afterBody:_i,beforeFooter:_i,footer:_i,afterFooter:_i}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const VC=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function zC(n,e,t,i){const s=n.indexOf(e);if(s===-1)return VC(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const BC=(n,e)=>n===null?null:an(Math.round(n),0,e);class pu extends vs{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(Ct(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:zC(i,e,mt(t,e),this._addedLabels),BC(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 r=e;r<=t;r++)s.push({value:r});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}pu.id="category";pu.defaults={ticks:{callback:pu.prototype.getLabelForValue}};function UC(n,e){const t=[],{bounds:s,step:l,min:r,max:o,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,h=l||1,g=f-1,{min:y,max:b}=e,v=!Ct(r),S=!Ct(o),$=!Ct(u),C=(b-y)/(c+1);let M=Kc((b-y)/g/h)*h,T,E,D,P;if(M<1e-14&&!v&&!S)return[{value:y},{value:b}];P=Math.ceil(b/M)-Math.floor(y/M),P>g&&(M=Kc(P*M/g/h)*h),Ct(a)||(T=Math.pow(10,a),M=Math.ceil(M*T)/T),s==="ticks"?(E=Math.floor(y/M)*M,D=Math.ceil(b/M)*M):(E=y,D=b),v&&S&&l&&z2((o-r)/l,M/1e3)?(P=Math.round(Math.min((o-r)/M,f)),M=(o-r)/P,E=r,D=o):$?(E=v?r:E,D=S?o:D,P=u-1,M=(D-E)/P):(P=(D-E)/M,Dl(P,Math.round(P),M/1e3)?P=Math.round(P):P=Math.ceil(P));const L=Math.max(Jc(M),Jc(E));T=Math.pow(10,Ct(a)?L:a),E=Math.round(E*T)/T,D=Math.round(D*T)/T;let R=0;for(v&&(d&&E!==r?(t.push({value:r}),E<r&&R++,Dl(Math.round((E+R*M)*T)/T,r,Kd(r,C,n))&&R++):E<r&&R++);R<P;++R)t.push({value:Math.round((E+R*M)*T)/T});return S&&d&&D!==o?t.length&&Dl(t[t.length-1].value,o,Kd(o,C,n))?t[t.length-1].value=o:t.push({value:o}):(!S||D===o)&&t.push({value:D}),t}function Kd(n,e,{horizontal:t,minRotation:i}){const s=Qn(i),l=(t?Math.sin(s):Math.cos(s))||.001,r=.75*e*(""+n).length;return Math.min(e/l,r)}class ko extends vs{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return Ct(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:s,max:l}=this;const r=a=>s=t?s:a,o=a=>l=i?l:a;if(e){const a=ui(s),u=ui(l);a<0&&u<0?o(0):a>0&&u>0&&r(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),o(l+a),e||r(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,r=UC(s,l);return e.bounds==="ticks"&&q0(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}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 Ql(e,this.chart.options.locale,this.options.ticks.format)}}class df extends ko{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=qt(e)?e:0,this.max=qt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=Qn(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}}df.id="linear";df.defaults={ticks:{callback:Fo.formatters.numeric}};function Jd(n){return n/Math.pow(10,Math.floor(Vn(n)))===1}function WC(n,e){const t=Math.floor(Vn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=jn(n.min,Math.pow(10,Math.floor(Vn(e.min)))),r=Math.floor(Vn(l)),o=Math.floor(l/Math.pow(10,r)),a=r<0?Math.pow(10,Math.abs(r)):1;do s.push({value:l,major:Jd(l)}),++o,o===10&&(o=1,++r,a=r>=0?1:a),l=Math.round(o*Math.pow(10,r)*a)/a;while(r<t||r===t&&o<i);const u=jn(n.max,l);return s.push({value:u,major:Jd(l)}),s}class Tb extends vs{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const i=ko.prototype.parse.apply(this,[e,t]);if(i===0){this._zero=!0;return}return qt(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=qt(e)?Math.max(0,e):null,this.max=qt(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,r=a=>s=t?s:a,o=(a,u)=>Math.pow(10,Math.floor(Vn(a))+u);i===s&&(i<=0?(l(1),r(10)):(l(o(i,-1)),r(o(s,1)))),i<=0&&l(o(s,-1)),s<=0&&r(o(i,1)),this._zero&&this.min!==this._suggestedMin&&i===o(this.min,0)&&l(o(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=WC(t,this);return e.bounds==="ticks"&&q0(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":Ql(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Vn(e),this._valueRange=Vn(this.max)-Vn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Vn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}Tb.id="logarithmic";Tb.defaults={ticks:{callback:Fo.formatters.logarithmic,major:{enabled:!0}}};function hu(n){const e=n.ticks;if(e.display&&n.display){const t=Kn(e.backdropPadding);return mt(e.font&&e.font.size,gt.font.size)+t.height}return 0}function YC(n,e,t){return t=Lt(t)?t:[t],{w:mw(n,e.string,t),h:t.length*e.lineHeight}}function Gd(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:n<i||n>s?{start:e-t,end:e}:{start:e,end:e+t}}function KC(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,r=n.options.pointLabels,o=r.centerPointLabels?Ht/l:0;for(let a=0;a<l;a++){const u=r.setContext(n.getPointLabelContext(a));s[a]=u.padding;const f=n.getPointPosition(a,n.drawingArea+s[a],o),c=Tn(u.font),d=YC(n.ctx,c,n._pointLabels[a]);i[a]=d;const h=Mn(n.getIndexAngle(a)+o),g=Math.round(Wu(h)),y=Gd(g,f.x,d.w,0,180),b=Gd(g,f.y,d.h,90,270);JC(t,e,h,y,b)}n.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),n._pointLabelItems=GC(n,i,s)}function JC(n,e,t,i,s){const l=Math.abs(Math.sin(t)),r=Math.abs(Math.cos(t));let o=0,a=0;i.start<e.l?(o=(e.l-i.start)/l,n.l=Math.min(n.l,e.l-o)):i.end>e.r&&(o=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+o)),s.start<e.t?(a=(e.t-s.start)/r,n.t=Math.min(n.t,e.t-a)):s.end>e.b&&(a=(s.end-e.b)/r,n.b=Math.max(n.b,e.b+a))}function GC(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,r=hu(l)/2,o=n.drawingArea,a=l.pointLabels.centerPointLabels?Ht/s:0;for(let u=0;u<s;u++){const f=n.getPointPosition(u,o+r+t[u],a),c=Math.round(Wu(Mn(f.angle+jt))),d=e[u],h=XC(f.y,d.h,c),g=ZC(c),y=xC(f.x,d.w,g);i.push({x:f.x,y:h,textAlign:g,left:y,top:h,right:y+d.w,bottom:h+d.h})}return i}function ZC(n){return n===0||n===180?"center":n<180?"left":"right"}function xC(n,e,t){return t==="right"?n-=e:t==="center"&&(n-=e/2),n}function XC(n,e,t){return t===90||t===270?n-=e/2:(t>270||t<90)&&(n-=e),n}function QC(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),r=Tn(l.font),{x:o,y:a,textAlign:u,left:f,top:c,right:d,bottom:h}=n._pointLabelItems[s],{backdropColor:g}=l;if(!Ct(g)){const y=qs(l.borderRadius),b=Kn(l.backdropPadding);t.fillStyle=g;const v=f-b.left,S=c-b.top,$=d-f+b.width,C=h-c+b.height;Object.values(y).some(M=>M!==0)?(t.beginPath(),go(t,{x:v,y:S,w:$,h:C,radius:y}),t.fill()):t.fillRect(v,S,$,C)}mo(t,n._pointLabels[s],o,a+r.lineHeight/2,r,{color:l.color,textAlign:u,textBaseline:"middle"})}}function Db(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,At);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let r=1;r<i;r++)l=n.getPointPosition(r,e),s.lineTo(l.x,l.y)}}function e3(n,e,t,i){const s=n.ctx,l=e.circular,{color:r,lineWidth:o}=e;!l&&!i||!r||!o||t<0||(s.save(),s.strokeStyle=r,s.lineWidth=o,s.setLineDash(e.borderDash),s.lineDashOffset=e.borderDashOffset,s.beginPath(),Db(n,t,l,i),s.closePath(),s.stroke(),s.restore())}function t3(n,e,t){return Ji(n,{label:t,index:e,type:"pointLabel"})}class No extends ko{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Kn(hu(this.options)/2),t=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(t,i)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=qt(e)&&!isNaN(e)?e:0,this.max=qt(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/hu(this.options))}generateTickLabels(e){ko.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,i)=>{const s=Rt(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?KC(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=At/(this._pointLabels.length||1),i=this.options.startAngle||0;return Mn(e*t+Qn(i))}getDistanceFromCenterForValue(e){if(Ct(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(Ct(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const i=t[e];return t3(this.getContext(),e,i)}}getPointPosition(e,t,i=0){const s=this.getIndexAngle(e)-jt+i;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:i,right:s,bottom:l}=this._pointLabelItems[e];return{left:t,top:i,right:s,bottom:l}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),Db(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:i,grid:s}=t,l=this._pointLabels.length;let r,o,a;if(t.pointLabels.display&&QC(this,l),s.display&&this.ticks.forEach((u,f)=>{if(f!==0){o=this.getDistanceFromCenterForValue(u.value);const c=s.setContext(this.getContext(f-1));e3(this,c,o,l)}}),i.display){for(e.save(),r=l-1;r>=0;r--){const u=i.setContext(this.getPointLabelContext(r)),{color:f,lineWidth:c}=u;!c||!f||(e.lineWidth=c,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,o=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(r,o),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,r;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((o,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=Tn(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,r=e.measureText(o.label).width,e.fillStyle=u.backdropColor;const c=Kn(u.backdropPadding);e.fillRect(-r/2-c.left,-l-f.size/2-c.top,r+c.width,f.size+c.height)}mo(e,o.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}No.id="radialLinear";No.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Fo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};No.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};No.descriptors={angleLines:{_fallback:"grid"}};const Ro={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}},vn=Object.keys(Ro);function n3(n,e){return n-e}function Zd(n,e){if(Ct(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let r=e;return typeof i=="function"&&(r=i(r)),qt(r)||(r=typeof i=="string"?t.parse(r,i):t.parse(r)),r===null?null:(s&&(r=s==="week"&&(jl(l)||l===!0)?t.startOf(r,"isoWeek",l):t.startOf(r,s)),+r)}function xd(n,e,t,i){const s=vn.length;for(let l=vn.indexOf(n);l<s-1;++l){const r=Ro[vn[l]],o=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((t-e)/(o*r.size))<=i)return vn[l]}return vn[s-1]}function i3(n,e,t,i,s){for(let l=vn.length-1;l>=vn.indexOf(t);l--){const r=vn[l];if(Ro[r].common&&n._adapter.diff(s,i,r)>=e-1)return r}return vn[t?vn.indexOf(t):0]}function s3(n){for(let e=vn.indexOf(n)+1,t=vn.length;e<t;++e)if(Ro[vn[e]].common)return vn[e]}function Xd(n,e,t){if(!t)n[e]=!0;else if(t.length){const{lo:i,hi:s}=Xu(t,e),l=t[i]>=e?t[i]:t[s];n[l]=!0}}function l3(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),r=e[e.length-1].value;let o,a;for(o=l;o<=r;o=+s.add(o,1,i))a=t[o],a>=0&&(e[a].major=!0);return e}function Qd(n,e,t){const i=[],s={},l=e.length;let r,o;for(r=0;r<l;++r)o=e[r],s[o]=r,i.push({value:o,major:!1});return l===0||!t?i:l3(n,i,s,t)}class ir extends vs{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t){const i=e.time||(e.time={}),s=this._adapter=new fb._date(e.adapters.date);Tl(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return e===void 0?null:Zd(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,i=e.time.unit||"day";let{min:s,max:l,minDefined:r,maxDefined:o}=this.getUserBounds();function a(u){!r&&!isNaN(u.min)&&(s=Math.min(s,u.min)),!o&&!isNaN(u.max)&&(l=Math.max(l,u.max))}(!r||!o)&&(a(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&a(this.getMinMax(!1))),s=qt(s)&&!isNaN(s)?s:+t.startOf(Date.now(),i),l=qt(l)&&!isNaN(l)?l:+t.endOf(Date.now(),i)+1,this.min=Math.min(s,l-1),this.max=Math.max(s+1,l)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],i=e[e.length-1]),{min:t,max:i}}buildTicks(){const e=this.options,t=e.time,i=e.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const l=this.min,r=this.max,o=Mw(s,l,r);return this._unit=t.unit||(i.autoSkip?xd(t.minUnit,this.min,this.max,this._getLabelCapacity(l)):i3(this,o.length,t.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:s3(this._unit),this.initOffsets(s),e.reverse&&o.reverse(),Qd(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+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 r=e.length<3?.5:.25;t=an(t,0,r),i=an(i,0,r),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,r=l.unit||xd(l.minUnit,t,i,this._getLabelCapacity(t)),o=mt(l.stepSize,1),a=r==="week"?l.isoWeekday:!1,u=jl(a)||a===!0,f={};let c=t,d,h;if(u&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,u?"day":r),e.diff(i,t,r)>1e5*o)throw new Error(t+" and "+i+" are too far apart with stepSize of "+o+" "+r);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,h=0;d<i;d=+e.add(d,o,r),h++)Xd(f,d,g);return(d===i||s.bounds==="ticks"||h===1)&&Xd(f,d,g),Object.keys(f).sort((y,b)=>y-b).map(y=>+y)}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,r=l.time.displayFormats,o=this._unit,a=this._majorUnit,u=o&&r[o],f=a&&r[a],c=i[t],d=a&&f&&c&&c.major,h=this._adapter.format(e,s||(d?f:u)),g=l.ticks.callback;return g?Rt(g,[h,t,i],this):h}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t<i;++t)s=e[t],s.label=this._tickFormatFunction(s.value,t,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+i)*t.factor)}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,i=this.ctx.measureText(e).width,s=Qn(this.isHorizontal()?t.maxRotation:t.minRotation),l=Math.cos(s),r=Math.sin(s),o=this._resolveTickFontOptions(0).size;return{w:i*l+o*r,h:i*r+o*l}}_getLabelCapacity(e){const t=this.options.time,i=t.displayFormats,s=i[t.unit]||i.millisecond,l=this._tickFormatFunction(e,0,Qd(this,[e],this._majorUnit),s),r=this._getLabelSize(l),o=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return o>0?o: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<i;++t)e=e.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let t,i;if(e.length)return e;const s=this.getLabels();for(t=0,i=s.length;t<i;++t)e.push(Zd(this,s[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return G0(e.sort(n3))}}ir.id="time";ir.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function Nr(n,e,t){let i=0,s=n.length-1,l,r,o,a;t?(e>=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=cs(n,"pos",e)),{pos:l,time:o}=n[i],{pos:r,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=cs(n,"time",e)),{time:l,pos:o}=n[i],{time:r,pos:a}=n[s]);const u=r-l;return u?o+(a-o)*(e-l)/u:o}class Ab extends ir{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=Nr(t,this.min),this._tableRange=Nr(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let r,o,a,u,f;for(r=0,o=e.length;r<o;++r)u=e[r],u>=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(r=0,o=s.length;r<o;++r)f=s[r+1],a=s[r-1],u=s[r],Math.round((f+a)/2)!==u&&l.push({time:u,pos:r/(o-1)});return l}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),i=this.getLabelTimestamps();return t.length&&i.length?e=this.normalize(t.concat(i)):e=t.length?t:i,e=this._cache.all=e,e}getDecimalForValue(e){return(Nr(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return Nr(this._table,i*this._tableRange+this._minPos,!0)}}Ab.id="timeseries";Ab.defaults=ir.defaults;/*!
+ * chartjs-adapter-luxon v1.1.0
+ * https://www.chartjs.org
+ * (c) 2021 chartjs-adapter-luxon Contributors
+ * Released under the MIT license
+ */const r3={datetime:Qe.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Qe.TIME_WITH_SECONDS,minute:Qe.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};fb._date.override({_id:"luxon",_create:function(n){return Qe.fromMillis(n,this.options)},formats:function(){return r3},parse:function(n,e){const t=this.options;if(n===null||typeof n=="undefined")return null;const i=typeof n;return i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=Qe.fromFormat(n,e,t):n=Qe.fromISO(n,t):n instanceof Date?n=Qe.fromJSDate(n,t):i==="object"&&!(n instanceof Qe)&&(n=Qe.fromObject(n)),n.isValid?n.valueOf():null},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e,this.options):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 ep(n){let e,t,i;return{c(){e=_("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){w(s,e,l),i=!0},i(s){i||(Ot(()=>{t||(t=ft(e,Wn,{duration:150},!0)),t.run(1)}),i=!0)},o(s){t||(t=ft(e,Wn,{duration:150},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function o3(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=H(n[1]),t=O(),s=H(i)},m(l,r){w(l,e,r),w(l,t,r),w(l,s,r)},p(l,r){r&2&&ge(e,l[1]),r&2&&i!==(i=l[1]===1?"log":"logs")&&ge(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function a3(n){let e;return{c(){e=H("Loading...")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function u3(n){let e,t,i,s,l,r,o=n[2]&&ep();function a(c,d){return c[2]?a3:o3}let u=a(n),f=u(n);return{c(){e=_("div"),o&&o.c(),t=O(),i=_("canvas"),s=O(),l=_("div"),f.c(),p(i,"class","chart-canvas svelte-vh4sl8"),vf(i,"height","250px"),vf(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(c,d){w(c,e,d),o&&o.m(e,null),m(e,t),m(e,i),n[8](i),w(c,s,d),w(c,l,d),f.m(l,null),r=!0},p(c,[d]){c[2]?o?d&4&&A(o,1):(o=ep(),o.c(),A(o,1),o.m(e,t)):o&&(Me(),F(o,1,1,()=>{o=null}),Oe()),d&4&&ee(e,"loading",c[2]),u===(u=a(c))&&f?f.p(c,d):(f.d(1),f=u(c),f&&(f.c(),f.m(l,null)))},i(c){r||(A(o),r=!0)},o(c){F(o),r=!1},d(c){c&&k(e),o&&o.d(),n[8](null),c&&k(s),c&&k(l),f.d()}}}function f3(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,r,o=[],a=0,u=!1;async function f(){return t(2,u=!0),ke.Logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let g of h)o.push({x:W.getDateTime(g.date).toLocal().toJSDate(),y:g.total}),t(1,a+=g.total);o.push({x:new Date,y:void 0})}).catch(h=>{h!==null&&(c(),console.warn(h),ke.errorResponseHandler(h,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,o=[])}pi(()=>(vo.register(Gi,Io,tr,df,ir,PC,qC),t(6,r=new vo(l,{type:"line",data:{datasets:[{label:"Total requests",data:o,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,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}}}})),()=>r==null?void 0:r.destroy()));function d(h){pe[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!="undefined"||typeof s!="undefined")&&f(),n.$$.dirty&192&&typeof o!="undefined"&&r&&(t(6,r.data.datasets[0].data=o,r),r.update())},[l,a,u,i,s,f,r,o,d]}class c3 extends Pe{constructor(e){super(),Ee(this,e,f3,u3,De,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var tp=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Eb={exports:{}};(function(n){var e=typeof window!="undefined"?window:typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope?self:{};/**
+ * Prism: Lightweight, robust, elegant syntax highlighting
+ *
+ * @license MIT <https://opensource.org/licenses/MIT>
+ * @author Lea Verou <https://lea.verou.me>
+ * @namespace
+ * @public
+ */var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,r={},o={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function S($){return $ instanceof a?new a($.type,S($.content),$.alias):Array.isArray($)?$.map(S):$.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(S){return Object.prototype.toString.call(S).slice(8,-1)},objId:function(S){return S.__id||Object.defineProperty(S,"__id",{value:++l}),S.__id},clone:function S($,C){C=C||{};var M,T;switch(o.util.type($)){case"Object":if(T=o.util.objId($),C[T])return C[T];M={},C[T]=M;for(var E in $)$.hasOwnProperty(E)&&(M[E]=S($[E],C));return M;case"Array":return T=o.util.objId($),C[T]?C[T]:(M=[],C[T]=M,$.forEach(function(D,P){M[P]=S(D,C)}),M);default:return $}},getLanguage:function(S){for(;S;){var $=s.exec(S.className);if($)return $[1].toLowerCase();S=S.parentElement}return"none"},setLanguage:function(S,$){S.className=S.className.replace(RegExp(s,"gi"),""),S.classList.add("language-"+$)},currentScript:function(){if(typeof document=="undefined")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(S){var $=document.getElementsByTagName("script");for(var C in $)if($[C].src==S)return $[C]}return null}},isActive:function(S,$,C){for(var M="no-"+$;S;){var T=S.classList;if(T.contains($))return!0;if(T.contains(M))return!1;S=S.parentElement}return!!C}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(S,$){var C=o.util.clone(o.languages[S]);for(var M in $)C[M]=$[M];return C},insertBefore:function(S,$,C,M){M=M||o.languages;var T=M[S],E={};for(var D in T)if(T.hasOwnProperty(D)){if(D==$)for(var P in C)C.hasOwnProperty(P)&&(E[P]=C[P]);C.hasOwnProperty(D)||(E[D]=T[D])}var L=M[S];return M[S]=E,o.languages.DFS(o.languages,function(R,j){j===L&&R!=S&&(this[R]=E)}),E},DFS:function S($,C,M,T){T=T||{};var E=o.util.objId;for(var D in $)if($.hasOwnProperty(D)){C.call($,D,$[D],M||D);var P=$[D],L=o.util.type(P);L==="Object"&&!T[E(P)]?(T[E(P)]=!0,S(P,C,null,T)):L==="Array"&&!T[E(P)]&&(T[E(P)]=!0,S(P,C,D,T))}}},plugins:{},highlightAll:function(S,$){o.highlightAllUnder(document,S,$)},highlightAllUnder:function(S,$,C){var M={callback:C,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),o.hooks.run("before-all-elements-highlight",M);for(var T=0,E;E=M.elements[T++];)o.highlightElement(E,$===!0,M.callback)},highlightElement:function(S,$,C){var M=o.util.getLanguage(S),T=o.languages[M];o.util.setLanguage(S,M);var E=S.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(E,M);var D=S.textContent,P={element:S,language:M,grammar:T,code:D};function L(j){P.highlightedCode=j,o.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,o.hooks.run("after-highlight",P),o.hooks.run("complete",P),C&&C.call(P.element)}if(o.hooks.run("before-sanity-check",P),E=P.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!P.code){o.hooks.run("complete",P),C&&C.call(P.element);return}if(o.hooks.run("before-highlight",P),!P.grammar){L(o.util.encode(P.code));return}if($&&i.Worker){var R=new Worker(o.filename);R.onmessage=function(j){L(j.data)},R.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else L(o.highlight(P.code,P.grammar,P.language))},highlight:function(S,$,C){var M={code:S,grammar:$,language:C};if(o.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=o.tokenize(M.code,M.grammar),o.hooks.run("after-tokenize",M),a.stringify(o.util.encode(M.tokens),M.language)},tokenize:function(S,$){var C=$.rest;if(C){for(var M in C)$[M]=C[M];delete $.rest}var T=new c;return d(T,T.head,S),f(S,T,$,T.head,0),g(T)},hooks:{all:{},add:function(S,$){var C=o.hooks.all;C[S]=C[S]||[],C[S].push($)},run:function(S,$){var C=o.hooks.all[S];if(!(!C||!C.length))for(var M=0,T;T=C[M++];)T($)}},Token:a};i.Prism=o;function a(S,$,C,M){this.type=S,this.content=$,this.alias=C,this.length=(M||"").length|0}a.stringify=function S($,C){if(typeof $=="string")return $;if(Array.isArray($)){var M="";return $.forEach(function(L){M+=S(L,C)}),M}var T={type:$.type,content:S($.content,C),tag:"span",classes:["token",$.type],attributes:{},language:C},E=$.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(T.classes,E):T.classes.push(E)),o.hooks.run("wrap",T);var D="";for(var P in T.attributes)D+=" "+P+'="'+(T.attributes[P]||"").replace(/"/g,"&quot;")+'"';return"<"+T.tag+' class="'+T.classes.join(" ")+'"'+D+">"+T.content+"</"+T.tag+">"};function u(S,$,C,M){S.lastIndex=$;var T=S.exec(C);if(T&&M&&T[1]){var E=T[1].length;T.index+=E,T[0]=T[0].slice(E)}return T}function f(S,$,C,M,T,E){for(var D in C)if(!(!C.hasOwnProperty(D)||!C[D])){var P=C[D];P=Array.isArray(P)?P:[P];for(var L=0;L<P.length;++L){if(E&&E.cause==D+","+L)return;var R=P[L],j=R.inside,G=!!R.lookbehind,Y=!!R.greedy,q=R.alias;if(Y&&!R.pattern.global){var Z=R.pattern.toString().match(/[imsuy]*$/)[0];R.pattern=RegExp(R.pattern.source,Z+"g")}for(var J=R.pattern||R,K=M.next,ne=T;K!==$.tail&&!(E&&ne>=E.reach);ne+=K.value.length,K=K.next){var ce=K.value;if($.length>S.length)return;if(!(ce instanceof a)){var be=1,se;if(Y){if(se=u(J,ne,S,G),!se||se.index>=S.length)break;var _e=se.index,x=se.index+se[0].length,Te=ne;for(Te+=K.value.length;_e>=Te;)K=K.next,Te+=K.value.length;if(Te-=K.value.length,ne=Te,K.value instanceof a)continue;for(var te=K;te!==$.tail&&(Te<x||typeof te.value=="string");te=te.next)be++,Te+=te.value.length;be--,ce=S.slice(ne,Te),se.index-=ne}else if(se=u(J,0,ce,G),!se)continue;var _e=se.index,fe=se[0],ie=ce.slice(0,_e),ye=ce.slice(_e+fe.length),He=ne+ce.length;E&&He>E.reach&&(E.reach=He);var Le=K.prev;ie&&(Le=d($,Le,ie),ne+=ie.length),h($,Le,be);var Re=new a(D,j?o.tokenize(fe,j):fe,q,fe);if(K=d($,Le,Re),ye&&d($,K,ye),be>1){var ae={cause:D+","+L,reach:He};f(S,$,C,K.prev,ne,ae),E&&ae.reach>E.reach&&(E.reach=ae.reach)}}}}}}function c(){var S={value:null,prev:null,next:null},$={value:null,prev:S,next:null};S.next=$,this.head=S,this.tail=$,this.length=0}function d(S,$,C){var M=$.next,T={value:C,prev:$,next:M};return $.next=T,M.prev=T,S.length++,T}function h(S,$,C){for(var M=$.next,T=0;T<C&&M!==S.tail;T++)M=M.next;$.next=M,M.prev=$,S.length-=T}function g(S){for(var $=[],C=S.head.next;C!==S.tail;)$.push(C.value),C=C.next;return $}if(!i.document)return i.addEventListener&&(o.disableWorkerMessageHandler||i.addEventListener("message",function(S){var $=JSON.parse(S.data),C=$.language,M=$.code,T=$.immediateClose;i.postMessage(o.highlight(M,o.languages[C],C)),T&&i.close()},!1)),o;var y=o.util.currentScript();y&&(o.filename=y.src,y.hasAttribute("data-manual")&&(o.manual=!0));function b(){o.manual||o.highlightAll()}if(!o.manual){var v=document.readyState;v==="loading"||v==="interactive"&&y&&y.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return o}(e);n.exports&&(n.exports=t),typeof tp!="undefined"&&(tp.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\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:/<!\[CDATA\[[\s\S]*?\]\]>/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"},/"|'/]}},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(/&amp;/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var r={};r["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[l]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:o},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:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,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=="undefined"||typeof document=="undefined")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading\u2026",s=function(y,b){return"\u2716 Error "+y+" while fetching file: "+b},l="\u2716 Error: File does not exist or is empty",r={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",a="loading",u="loaded",f="failed",c="pre[data-src]:not(["+o+'="'+u+'"]):not(['+o+'="'+a+'"])';function d(y,b,v){var S=new XMLHttpRequest;S.open("GET",y,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?b(S.responseText):S.status>=400?v(s(S.status,S.statusText)):v(l))},S.send(null)}function h(y){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(y||"");if(b){var v=Number(b[1]),S=b[2],$=b[3];return S?$?[v,Number($)]:[v,void 0]:[v,v]}}t.hooks.add("before-highlightall",function(y){y.selector+=", "+c}),t.hooks.add("before-sanity-check",function(y){var b=y.element;if(b.matches(c)){y.code="",b.setAttribute(o,a);var v=b.appendChild(document.createElement("CODE"));v.textContent=i;var S=b.getAttribute("data-src"),$=y.language;if($==="none"){var C=(/\.(\w+)$/.exec(S)||[,"none"])[1];$=r[C]||C}t.util.setLanguage(v,$),t.util.setLanguage(b,$);var M=t.plugins.autoloader;M&&M.loadLanguages($),d(S,function(T){b.setAttribute(o,u);var E=h(b.getAttribute("data-range"));if(E){var D=T.split(/\r\n?|\n/g),P=E[0],L=E[1]==null?D.length:E[1];P<0&&(P+=D.length),P=Math.max(0,Math.min(P-1,D.length)),L<0&&(L+=D.length),L=Math.max(0,Math.min(L,D.length)),T=D.slice(P,L).join(`
+`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(P+1))}v.textContent=T,t.highlightElement(v)},function(T){b.setAttribute(o,f),v.textContent=T})}}),t.plugins.fileHighlight={highlight:function(b){for(var v=(b||document).querySelectorAll(c),S=0,$;$=v[S++];)t.highlightElement($)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Eb);var _l=Eb.exports,d3={exports:{}};(function(n){(function(){if(typeof Prism=="undefined")return;var e=Object.assign||function(l,r){for(var o in r)r.hasOwnProperty(o)&&(l[o]=r[o]);return l};function t(l){this.defaults=e({},l)}function i(l){return l.replace(/-(\w)/g,function(r,o){return o.toUpperCase()})}function s(l){for(var r=0,o=0;o<l.length;++o)l.charCodeAt(o)=="	".charCodeAt(0)&&(r+=3);return l.length+r}t.prototype={setDefaults:function(l){this.defaults=e(this.defaults,l)},normalize:function(l,r){r=e(this.defaults,r);for(var o in r){var a=i(o);o!=="normalize"&&a!=="setDefaults"&&r[o]&&this[a]&&(l=this[a].call(this,l,r[o]))}return l},leftTrim:function(l){return l.replace(/^\s+/,"")},rightTrim:function(l){return l.replace(/\s+$/,"")},tabsToSpaces:function(l,r){return r=r|0||4,l.replace(/\t/g,new Array(++r).join(" "))},spacesToTabs:function(l,r){return r=r|0||4,l.replace(RegExp(" {"+r+"}","g"),"	")},removeTrailing:function(l){return l.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(l){return l.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(l){var r=l.match(/^[^\S\n\r]*(?=\S)/gm);return!r||!r[0].length||(r.sort(function(o,a){return o.length-a.length}),!r[0].length)?l:l.replace(RegExp("^"+r[0],"gm"),"")},indent:function(l,r){return l.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++r).join("	")+"$&")},breakLines:function(l,r){r=r===!0?80:r|0||80;for(var o=l.split(`
+`),a=0;a<o.length;++a)if(!(s(o[a])<=r)){for(var u=o[a].split(/(\s+)/g),f=0,c=0;c<u.length;++c){var d=s(u[c]);f+=d,f>r&&(u[c]=`
+`+u[c],f=d)}o[a]=u.join("")}return o.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(l){var r=Prism.plugins.NormalizeWhitespace;if(!(l.settings&&l.settings["whitespace-normalization"]===!1)&&!!Prism.util.isActive(l.element,"whitespace-normalization",!0)){if((!l.element||!l.element.parentNode)&&l.code){l.code=r.normalize(l.code,l.settings);return}var o=l.element.parentNode;if(!(!l.code||!o||o.nodeName.toLowerCase()!=="pre")){for(var a=o.childNodes,u="",f="",c=!1,d=0;d<a.length;++d){var h=a[d];h==l.element?c=!0:h.nodeName==="#text"&&(c?f+=h.nodeValue:u+=h.nodeValue,o.removeChild(h),--d)}if(!l.element.children.length||!Prism.plugins.KeepMarkup)l.code=u+l.code+f,l.code=r.normalize(l.code,l.settings);else{var g=u+l.element.innerHTML+f;l.element.innerHTML=r.normalize(g,l.settings),l.code=l.element.textContent}}}})})()})(d3);function p3(n){let e,t;return{c(){e=_("div"),t=_("code"),p(t,"class","svelte-tv7jme"),p(e,"class","code-wrapper prism-light svelte-tv7jme")},m(i,s){w(i,e,s),m(e,t),t.innerHTML=n[0]},p(i,[s]){s&1&&(t.innerHTML=i[0])},i:oe,o:oe,d(i){i&&k(e)}}}function h3(n,e,t){let{content:i=""}=e,{language:s="javascript"}=e,l="";function r(o){return o=typeof o=="string"?o:"",o=_l.plugins.NormalizeWhitespace.normalize(o,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),_l.highlight(o,_l.languages[s]||_l.languages.javascript,s)}return n.$$set=o=>{"content"in o&&t(1,i=o.content),"language"in o&&t(2,s=o.language)},n.$$.update=()=>{n.$$.dirty&2&&typeof _l!="undefined"&&i&&t(0,l=r(i))},[l,i,s]}class nn extends Pe{constructor(e){super(),Ee(this,e,h3,p3,De,{content:1,language:2})}}const m3=n=>({}),np=n=>({}),g3=n=>({}),ip=n=>({});function sp(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$=n[4]&&!n[2]&&lp(n);const C=n[18].header,M=Dn(C,n,n[17],ip);let T=n[4]&&n[2]&&rp(n);const E=n[18].default,D=Dn(E,n,n[17],null),P=n[18].footer,L=Dn(P,n,n[17],np);return{c(){e=_("div"),t=_("div"),s=O(),l=_("div"),r=_("div"),$&&$.c(),o=O(),M&&M.c(),a=O(),T&&T.c(),u=O(),f=_("div"),D&&D.c(),c=O(),d=_("div"),L&&L.c(),p(t,"class","overlay"),p(r,"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(R,j){w(R,e,j),m(e,t),m(e,s),m(e,l),m(l,r),$&&$.m(r,null),m(r,o),M&&M.m(r,null),m(r,a),T&&T.m(r,null),m(l,u),m(l,f),D&&D.m(f,null),n[20](f),m(l,c),m(l,d),L&&L.m(d,null),b=!0,v||(S=[Q(t,"click",Wt(n[19])),Q(f,"scroll",n[21])],v=!0)},p(R,j){n=R,n[4]&&!n[2]?$?$.p(n,j):($=lp(n),$.c(),$.m(r,o)):$&&($.d(1),$=null),M&&M.p&&(!b||j&131072)&&En(M,C,n,n[17],b?An(C,n[17],j,g3):Pn(n[17]),ip),n[4]&&n[2]?T?T.p(n,j):(T=rp(n),T.c(),T.m(r,null)):T&&(T.d(1),T=null),D&&D.p&&(!b||j&131072)&&En(D,E,n,n[17],b?An(E,n[17],j,null):Pn(n[17]),null),L&&L.p&&(!b||j&131072)&&En(L,P,n,n[17],b?An(P,n[17],j,m3):Pn(n[17]),np),(!b||j&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),j&262&&ee(l,"popup",n[2]),j&4&&ee(e,"padded",n[2]),j&1&&ee(e,"active",n[0])},i(R){b||(Ot(()=>{i||(i=ft(t,ao,{duration:Ls,opacity:0},!0)),i.run(1)}),A(M,R),A(D,R),A(L,R),Ot(()=>{y&&y.end(1),g=wu(l,ni,n[2]?{duration:Ls,y:-10}:{duration:Ls,x:50}),g.start()}),b=!0)},o(R){i||(i=ft(t,ao,{duration:Ls,opacity:0},!1)),i.run(0),F(M,R),F(D,R),F(L,R),g&&g.invalidate(),y=Xg(l,ni,n[2]?{duration:Ls,y:10}:{duration:Ls,x:50}),b=!1},d(R){R&&k(e),R&&i&&i.end(),$&&$.d(),M&&M.d(R),T&&T.d(),D&&D.d(R),n[20](null),L&&L.d(R),R&&y&&y.end(),v=!1,lt(S)}}}function lp(n){let e,t,i;return{c(){e=_("div"),e.innerHTML='<i class="ri-close-line"></i>',p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=Q(e,"click",Wt(n[5])),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function rp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<i class="ri-close-line txt-lg"></i>',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-secondary btn-close m-l-auto")},m(s,l){w(s,e,l),t||(i=Q(e,"click",Wt(n[5])),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function _3(n){let e,t,i,s,l=n[0]&&sp(n);return{c(){e=_("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper")},m(r,o){w(r,e,o),l&&l.m(e,null),n[22](e),t=!0,i||(s=[Q(window,"resize",n[10]),Q(window,"keydown",n[9])],i=!0)},p(r,[o]){r[0]?l?(l.p(r,o),o&1&&A(l,1)):(l=sp(r),l.c(),A(l,1),l.m(e,null)):l&&(Me(),F(l,1,1,()=>{l=null}),Oe())},i(r){t||(A(l),t=!0)},o(r){F(l),t=!1},d(r){r&&k(e),l&&l.d(),n[22](null),i=!1,lt(s)}}}let ss;function Pb(){return ss=ss||document.querySelector(".overlays"),ss||(ss=document.createElement("div"),ss.classList.add("overlays"),document.body.appendChild(ss)),ss}let Ls=150;function op(){return 1e3+Pb().querySelectorAll(".overlay-panel-container.active").length}function b3(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:r=!1}=e,{popup:o=!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=_n();let g,y,b,v,S="";function $(){typeof c=="function"&&c()===!1||t(0,r=!0)}function C(){typeof d=="function"&&d()===!1||t(0,r=!1)}function M(){return r}async function T(q){q?(b=document.activeElement,g==null||g.focus(),h("show")):(clearTimeout(v),b==null||b.focus(),h("hide")),await Oi(),E()}function E(){!g||(r?t(6,g.style.zIndex=op(),g):t(6,g.style="",g))}function D(q){r&&f&&q.code=="Escape"&&!W.isInput(q.target)&&g&&g.style.zIndex==op()&&(q.preventDefault(),C())}function P(q){r&&L(y)}function L(q,Z){Z&&t(8,S=""),q&&(v||(v=setTimeout(()=>{if(clearTimeout(v),v=null,!q)return;if(q.scrollHeight-q.offsetHeight>0)t(8,S="scrollable");else{t(8,S="");return}q.scrollTop==0?t(8,S+=" scroll-top-reached"):q.scrollTop+q.offsetHeight==q.scrollHeight&&t(8,S+=" scroll-bottom-reached")},100)))}pi(()=>(Pb().appendChild(g),()=>{var q;clearTimeout(v),(q=g==null?void 0:g.classList)==null||q.add("hidden")}));const R=()=>a?C():!0;function j(q){pe[q?"unshift":"push"](()=>{y=q,t(7,y)})}const G=q=>L(q.target);function Y(q){pe[q?"unshift":"push"](()=>{g=q,t(6,g)})}return n.$$set=q=>{"class"in q&&t(1,l=q.class),"active"in q&&t(0,r=q.active),"popup"in q&&t(2,o=q.popup),"overlayClose"in q&&t(3,a=q.overlayClose),"btnClose"in q&&t(4,u=q.btnClose),"escClose"in q&&t(12,f=q.escClose),"beforeOpen"in q&&t(13,c=q.beforeOpen),"beforeHide"in q&&t(14,d=q.beforeHide),"$$scope"in q&&t(17,s=q.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&T(r),n.$$.dirty&128&&L(y,!0),n.$$.dirty&64&&g&&E()},[r,l,o,a,u,C,g,y,S,D,P,L,f,c,d,$,M,s,i,R,j,G,Y]}class Ai extends Pe{constructor(e){super(),Ee(this,e,b3,_3,De,{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 y3(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function v3(n){let e,t=n[2].referer+"",i,s;return{c(){e=_("a"),i=H(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,r){w(l,e,r),m(e,i)},p(l,r){r&4&&t!==(t=l[2].referer+"")&&ge(i,t),r&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&k(e)}}}function k3(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function w3(n){let e,t;return e=new nn({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){B(e.$$.fragment)},m(i,s){V(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||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function S3(n){var ii;let e,t,i,s,l,r,o=n[2].id+"",a,u,f,c,d,h,g,y=n[2].status+"",b,v,S,$,C,M,T=((ii=n[2].method)==null?void 0:ii.toUpperCase())+"",E,D,P,L,R,j,G=n[2].auth+"",Y,q,Z,J,K,ne,ce=n[2].url+"",be,se,x,Te,te,_e,fe,ie,ye,He,Le,Re=n[2].ip+"",ae,re,ve,qe,Ve,Je,me=n[2].userAgent+"",Ae,X,ue,Ue,bt,it,yt,at,dt,Tt,Pt,Jt,he,we,Ge,et;function Et(ot,N){return ot[2].referer?v3:y3}let de=Et(n),Se=de(n);const Ze=[w3,k3],Gt=[];function Vt(ot,N){return N&4&&(yt=null),yt==null&&(yt=!W.isEmpty(ot[2].meta)),yt?0:1}return at=Vt(n,-1),dt=Gt[at]=Ze[at](n),Ge=new Ci({props:{date:n[2].created}}),{c(){e=_("table"),t=_("tbody"),i=_("tr"),s=_("td"),s.textContent="ID",l=O(),r=_("td"),a=H(o),u=O(),f=_("tr"),c=_("td"),c.textContent="Status",d=O(),h=_("td"),g=_("span"),b=H(y),v=O(),S=_("tr"),$=_("td"),$.textContent="Method",C=O(),M=_("td"),E=H(T),D=O(),P=_("tr"),L=_("td"),L.textContent="Auth",R=O(),j=_("td"),Y=H(G),q=O(),Z=_("tr"),J=_("td"),J.textContent="URL",K=O(),ne=_("td"),be=H(ce),se=O(),x=_("tr"),Te=_("td"),Te.textContent="Referer",te=O(),_e=_("td"),Se.c(),fe=O(),ie=_("tr"),ye=_("td"),ye.textContent="IP",He=O(),Le=_("td"),ae=H(Re),re=O(),ve=_("tr"),qe=_("td"),qe.textContent="UserAgent",Ve=O(),Je=_("td"),Ae=H(me),X=O(),ue=_("tr"),Ue=_("td"),Ue.textContent="Meta",bt=O(),it=_("td"),dt.c(),Tt=O(),Pt=_("tr"),Jt=_("td"),Jt.textContent="Created",he=O(),we=_("td"),B(Ge.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(g,"class","label"),ee(g,"label-danger",n[2].status>=400),p($,"class","min-width txt-hint txt-bold"),p(L,"class","min-width txt-hint txt-bold"),p(J,"class","min-width txt-hint txt-bold"),p(Te,"class","min-width txt-hint txt-bold"),p(ye,"class","min-width txt-hint txt-bold"),p(qe,"class","min-width txt-hint txt-bold"),p(Ue,"class","min-width txt-hint txt-bold"),p(Jt,"class","min-width txt-hint txt-bold"),p(e,"class","table-compact table-border")},m(ot,N){w(ot,e,N),m(e,t),m(t,i),m(i,s),m(i,l),m(i,r),m(r,a),m(t,u),m(t,f),m(f,c),m(f,d),m(f,h),m(h,g),m(g,b),m(t,v),m(t,S),m(S,$),m(S,C),m(S,M),m(M,E),m(t,D),m(t,P),m(P,L),m(P,R),m(P,j),m(j,Y),m(t,q),m(t,Z),m(Z,J),m(Z,K),m(Z,ne),m(ne,be),m(t,se),m(t,x),m(x,Te),m(x,te),m(x,_e),Se.m(_e,null),m(t,fe),m(t,ie),m(ie,ye),m(ie,He),m(ie,Le),m(Le,ae),m(t,re),m(t,ve),m(ve,qe),m(ve,Ve),m(ve,Je),m(Je,Ae),m(t,X),m(t,ue),m(ue,Ue),m(ue,bt),m(ue,it),Gt[at].m(it,null),m(t,Tt),m(t,Pt),m(Pt,Jt),m(Pt,he),m(Pt,we),V(Ge,we,null),et=!0},p(ot,N){var le;(!et||N&4)&&o!==(o=ot[2].id+"")&&ge(a,o),(!et||N&4)&&y!==(y=ot[2].status+"")&&ge(b,y),N&4&&ee(g,"label-danger",ot[2].status>=400),(!et||N&4)&&T!==(T=((le=ot[2].method)==null?void 0:le.toUpperCase())+"")&&ge(E,T),(!et||N&4)&&G!==(G=ot[2].auth+"")&&ge(Y,G),(!et||N&4)&&ce!==(ce=ot[2].url+"")&&ge(be,ce),de===(de=Et(ot))&&Se?Se.p(ot,N):(Se.d(1),Se=de(ot),Se&&(Se.c(),Se.m(_e,null))),(!et||N&4)&&Re!==(Re=ot[2].ip+"")&&ge(ae,Re),(!et||N&4)&&me!==(me=ot[2].userAgent+"")&&ge(Ae,me);let I=at;at=Vt(ot,N),at===I?Gt[at].p(ot,N):(Me(),F(Gt[I],1,1,()=>{Gt[I]=null}),Oe(),dt=Gt[at],dt?dt.p(ot,N):(dt=Gt[at]=Ze[at](ot),dt.c()),A(dt,1),dt.m(it,null));const U={};N&4&&(U.date=ot[2].created),Ge.$set(U)},i(ot){et||(A(dt),A(Ge.$$.fragment,ot),et=!0)},o(ot){F(dt),F(Ge.$$.fragment,ot),et=!1},d(ot){ot&&k(e),Se.d(),Gt[at].d(),z(Ge)}}}function $3(n){let e;return{c(){e=_("h4"),e.textContent="Request log"},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function C3(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Close</span>',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[4]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function M3(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[C3],header:[$3],default:[S3]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&260&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[5](null),z(e,s)}}}function O3(n,e,t){let i,s=new Ua;function l(c){return t(2,s=c),i==null?void 0:i.show()}function r(){return i==null?void 0:i.hide()}const o=()=>r();function a(c){pe[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){ut.call(this,n,c)}function f(c){ut.call(this,n,c)}return[r,i,s,l,o,a,u,f]}class T3 extends Pe{constructor(e){super(),Ee(this,e,O3,M3,De,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function D3(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",r=n[12])},m(u,f){w(u,e,f),e.checked=n[0],w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[6]),o=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0]),f&4096&&r!==(r=u[12])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function ap(n){let e,t,i;function s(r){n[8](r)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new c3({props:l}),pe.push(()=>Ie(e,"filter",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o&16&&(a.presets=r[4]),!t&&o&4&&(t=!0,a.filter=r[2],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function up(n){let e,t,i;function s(r){n[9](r)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new D2({props:l}),pe.push(()=>Ie(e,"filter",s)),e.$on("select",n[10]),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o&16&&(a.presets=r[4]),!t&&o&4&&(t=!0,a.filter=r[2],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function A3(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v=n[3],S,$=n[3],C,M,T,E,D;c=new Fe({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[D3,({uniqueId:j})=>({12:j}),({uniqueId:j})=>j?4096:0]},$$scope:{ctx:n}}}),h=new Po({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","ip","referer","status","auth","userAgent"]}}),h.$on("submit",n[7]);let P=ap(n),L=up(n),R={};return M=new T3({props:R}),n[11](M),{c(){e=_("main"),t=_("div"),i=_("header"),s=_("nav"),s.innerHTML='<div class="breadcrumb-item">Request logs</div>',l=O(),r=_("button"),r.innerHTML='<i class="ri-refresh-line"></i>',o=O(),a=_("div"),u=O(),f=_("div"),B(c.$$.fragment),d=O(),B(h.$$.fragment),g=O(),y=_("div"),b=O(),P.c(),S=O(),L.c(),C=O(),B(M.$$.fragment),p(s,"class","breadcrumbs"),p(r,"type","button"),p(r,"class","btn btn-circle btn-secondary"),p(a,"class","flex-fill"),p(f,"class","inline-flex"),p(i,"class","page-header"),p(y,"class","clearfix m-b-xs"),p(t,"class","page-header-wrapper m-b-0"),p(e,"class","page-wrapper")},m(j,G){w(j,e,G),m(e,t),m(t,i),m(i,s),m(i,l),m(i,r),m(i,o),m(i,a),m(i,u),m(i,f),V(c,f,null),m(t,d),V(h,t,null),m(t,g),m(t,y),m(t,b),P.m(t,null),m(e,S),L.m(e,null),w(j,C,G),V(M,j,G),T=!0,E||(D=[Xe(St.call(null,r,{text:"Refresh",position:"right"})),Q(r,"click",n[5])],E=!0)},p(j,[G]){const Y={};G&12289&&(Y.$$scope={dirty:G,ctx:j}),c.$set(Y);const q={};G&4&&(q.value=j[2]),h.$set(q),G&8&&De(v,v=j[3])?(Me(),F(P,1,1,oe),Oe(),P=ap(j),P.c(),A(P,1),P.m(t,null)):P.p(j,G),G&8&&De($,$=j[3])?(Me(),F(L,1,1,oe),Oe(),L=up(j),L.c(),A(L,1),L.m(e,null)):L.p(j,G);const Z={};M.$set(Z)},i(j){T||(A(c.$$.fragment,j),A(h.$$.fragment,j),A(P),A(L),A(M.$$.fragment,j),T=!0)},o(j){F(c.$$.fragment,j),F(h.$$.fragment,j),F(P),F(L),F(M.$$.fragment,j),T=!1},d(j){j&&k(e),z(c),z(h),P.d(j),L.d(j),j&&k(C),n[11](null),z(M,j),E=!1,lt(D)}}}const fp="includeAdminLogs";function E3(n,e,t){var y;let i,s,l="",r=((y=window.localStorage)==null?void 0:y.getItem(fp))<<0,o=1;function a(){t(3,o++,o)}W.setDocumentTitle("Request logs");function u(){r=this.checked,t(0,r)}const f=b=>t(2,l=b.detail);function c(b){l=b,t(2,l)}function d(b){l=b,t(2,l)}const h=b=>s==null?void 0:s.show(b==null?void 0:b.detail);function g(b){pe[b?"unshift":"push"](()=>{s=b,t(1,s)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r!="undefined"&&window.localStorage&&window.localStorage.setItem(fp,r<<0)},[r,s,l,o,i,a,u,f,c,d,h,g]}class P3 extends Pe{constructor(e){super(),Ee(this,e,E3,A3,De,{})}}const Gs=Ti([]),fi=Ti({}),mu=Ti(!1);function L3(n){fi.update(e=>W.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),Gs.update(e=>(W.pushOrReplaceByKey(e,n,"id"),e))}function F3(n){Gs.update(e=>(W.removeByKey(e,"id",n.id),fi.update(t=>t.id===n.id?e.find(i=>i.name!="profiles")||{}:t),e))}async function I3(n=null){return mu.set(!0),fi.set({}),Gs.set([]),ke.Collections.getFullList(200,{sort:"+created"}).then(e=>{Gs.set(e);const t=n&&W.findByKey(e,"id",n);if(t)fi.set(t);else if(e.length){const i=e.find(s=>s.name!="profiles");i&&fi.set(i)}}).catch(e=>{ke.errorResponseHandler(e)}).finally(()=>{mu.set(!1)})}const pf=Ti({});function Mi(n,e,t){pf.set({text:n,yesCallback:e,noCallback:t})}function Lb(){pf.set({})}function cp(n){let e,t,i,s;const l=n[13].default,r=Dn(l,n,n[12],null);return{c(){e=_("div"),r&&r.c(),p(e,"class",n[1]),ee(e,"active",n[0])},m(o,a){w(o,e,a),r&&r.m(e,null),s=!0},p(o,a){r&&r.p&&(!s||a&4096)&&En(r,l,o,o[12],s?An(l,o[12],a,null):Pn(o[12]),null),(!s||a&2)&&p(e,"class",o[1]),a&3&&ee(e,"active",o[0])},i(o){s||(A(r,o),o&&Ot(()=>{i&&i.end(1),t=wu(e,ni,{duration:150,y:-5}),t.start()}),s=!0)},o(o){F(r,o),t&&t.invalidate(),o&&(i=Xg(e,ni,{duration:150,y:2})),s=!1},d(o){o&&k(e),r&&r.d(o),o&&i&&i.end()}}}function N3(n){let e,t,i,s,l=n[0]&&cp(n);return{c(){e=_("div"),l&&l.c(),p(e,"class","toggler-container")},m(r,o){w(r,e,o),l&&l.m(e,null),n[14](e),t=!0,i||(s=[Q(window,"click",n[3]),Q(window,"keydown",n[4]),Q(window,"focusin",n[5])],i=!0)},p(r,[o]){r[0]?l?(l.p(r,o),o&1&&A(l,1)):(l=cp(r),l.c(),A(l,1),l.m(e,null)):l&&(Me(),F(l,1,1,()=>{l=null}),Oe())},i(r){t||(A(l),t=!0)},o(r){F(l),t=!1},d(r){r&&k(e),l&&l.d(),n[14](null),i=!1,lt(s)}}}function R3(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:r=!1}=e,{escClose:o=!0}=e,{closableClass:a="closable"}=e,{class:u=""}=e,f;const c=_n();function d(){t(0,r=!1)}function h(){t(0,r=!0)}function g(){r?d():h()}function y(T){return!f||T.classList.contains(a)||(l==null?void 0:l.contains(T))&&!f.contains(T)||f.contains(T)&&T.closest&&T.closest("."+a)}function b(T){(!r||y(T.target))&&(T.preventDefault(),g())}function v(T){(T.code==="Enter"||T.code==="Space")&&(!r||y(T.target))&&(T.preventDefault(),T.stopPropagation(),g())}function S(T){r&&!(f!=null&&f.contains(T.target))&&!(l!=null&&l.contains(T.target))&&d()}function $(T){r&&o&&T.code=="Escape"&&(T.preventDefault(),d())}function C(T){return S(T)}pi(()=>(t(6,l=l||f.parentNode),l.addEventListener("click",b),l.addEventListener("keydown",v),()=>{l.removeEventListener("click",b),l.removeEventListener("keydown",v)}));function M(T){pe[T?"unshift":"push"](()=>{f=T,t(2,f)})}return n.$$set=T=>{"trigger"in T&&t(6,l=T.trigger),"active"in T&&t(0,r=T.active),"escClose"in T&&t(7,o=T.escClose),"closableClass"in T&&t(8,a=T.closableClass),"class"in T&&t(1,u=T.class),"$$scope"in T&&t(12,s=T.$$scope)},n.$$.update=()=>{var T,E;n.$$.dirty&65&&(r?((T=l==null?void 0:l.classList)==null||T.add("active"),c("show")):((E=l==null?void 0:l.classList)==null||E.remove("active"),c("hide")))},[r,u,f,S,$,C,l,o,a,d,h,g,s,i,M]}class ks extends Pe{constructor(e){super(),Ee(this,e,R3,N3,De,{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 j3=n=>({active:n&1}),dp=n=>({active:n[0]});function pp(n){let e,t,i;const s=n[12].default,l=Dn(s,n,n[11],null);return{c(){e=_("div"),l&&l.c(),p(e,"class","accordion-content")},m(r,o){w(r,e,o),l&&l.m(e,null),i=!0},p(r,o){l&&l.p&&(!i||o&2048)&&En(l,s,r,r[11],i?An(s,r[11],o,null):Pn(r[11]),null)},i(r){i||(A(l,r),r&&Ot(()=>{t||(t=ft(e,fn,{duration:150},!0)),t.run(1)}),i=!0)},o(r){F(l,r),r&&(t||(t=ft(e,fn,{duration:150},!1)),t.run(0)),i=!1},d(r){r&&k(e),l&&l.d(r),r&&t&&t.end()}}}function H3(n){let e,t,i,s,l,r,o,a;const u=n[12].header,f=Dn(u,n,n[11],dp);let c=n[0]&&pp(n);return{c(){e=_("div"),t=_("header"),f&&f.c(),i=O(),c&&c.c(),p(t,"class","accordion-header"),ee(t,"interactive",n[2]),p(e,"tabindex",s=n[2]?0:-1),p(e,"class",l="accordion "+n[1]),ee(e,"active",n[0])},m(d,h){w(d,e,h),m(e,t),f&&f.m(t,null),m(e,i),c&&c.m(e,null),n[14](e),r=!0,o||(a=[Q(t,"click",Wt(n[13])),Q(e,"keydown",Yg(n[5]))],o=!0)},p(d,[h]){f&&f.p&&(!r||h&2049)&&En(f,u,d,d[11],r?An(u,d[11],h,j3):Pn(d[11]),dp),h&4&&ee(t,"interactive",d[2]),d[0]?c?(c.p(d,h),h&1&&A(c,1)):(c=pp(d),c.c(),A(c,1),c.m(e,null)):c&&(Me(),F(c,1,1,()=>{c=null}),Oe()),(!r||h&4&&s!==(s=d[2]?0:-1))&&p(e,"tabindex",s),(!r||h&2&&l!==(l="accordion "+d[1]))&&p(e,"class",l),h&3&&ee(e,"active",d[0])},i(d){r||(A(f,d),A(c),r=!0)},o(d){F(f,d),F(c),r=!1},d(d){d&&k(e),f&&f.d(d),c&&c.d(),n[14](null),o=!1,lt(a)}}}function q3(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=_n();let r,o,{class:a=""}=e,{active:u=!1}=e,{interactive:f=!0}=e,{single:c=!1}=e;function d(){y(),t(0,u=!0),l("expand")}function h(){t(0,u=!1),clearTimeout(o),l("collapse")}function g(){l("toggle"),u?h():d()}function y(){if(c&&r.parentElement){const $=r.parentElement.querySelectorAll(".accordion.active .accordion-header.interactive");for(const C of $)C.click()}}function b($){!f||($.code==="Enter"||$.code==="Space")&&($.preventDefault(),g())}pi(()=>()=>clearTimeout(o));const v=()=>f&&g();function S($){pe[$?"unshift":"push"](()=>{r=$,t(4,r)})}return n.$$set=$=>{"class"in $&&t(1,a=$.class),"active"in $&&t(0,u=$.active),"interactive"in $&&t(2,f=$.interactive),"single"in $&&t(6,c=$.single),"$$scope"in $&&t(11,s=$.$$scope)},n.$$.update=()=>{n.$$.dirty&1041&&u&&(clearTimeout(o),t(10,o=setTimeout(()=>{r!=null&&r.scrollIntoView&&r.scrollIntoView({behavior:"smooth",block:"nearest"})},250)))},[u,a,f,g,r,b,c,d,h,y,o,s,i,v,S]}class hf extends Pe{constructor(e){super(),Ee(this,e,q3,H3,De,{class:1,active:0,interactive:2,single:6,expand:7,collapse:8,toggle:3,collapseSiblings:9})}get expand(){return this.$$.ctx[7]}get collapse(){return this.$$.ctx[8]}get toggle(){return this.$$.ctx[3]}get collapseSiblings(){return this.$$.ctx[9]}}const V3=n=>({}),hp=n=>({});function mp(n,e,t){const i=n.slice();return i[46]=e[t],i}function gp(n,e,t){const i=n.slice();return i[49]=e[t],i}const z3=n=>({}),_p=n=>({});function bp(n,e,t){const i=n.slice();return i[49]=e[t],i}function yp(n){let e,t;return{c(){e=_("div"),t=H(n[2]),p(e,"class","txt-placeholder")},m(i,s){w(i,e,s),m(e,t)},p(i,s){s[0]&4&&ge(t,i[2])},d(i){i&&k(e)}}}function B3(n){let e,t=n[49]+"",i;return{c(){e=_("span"),i=H(t),p(e,"class","txt")},m(s,l){w(s,e,l),m(e,i)},p(s,l){l[0]&1&&t!==(t=s[49]+"")&&ge(i,t)},i:oe,o:oe,d(s){s&&k(e)}}}function U3(n){let e,t,i;const s=[{item:n[49]},n[8]];var l=n[7];function r(o){let a={};for(let u=0;u<s.length;u+=1)a=ct(a,s[u]);return{props:a}}return l&&(e=new l(r())),{c(){e&&B(e.$$.fragment),t=st()},m(o,a){e&&V(e,o,a),w(o,t,a),i=!0},p(o,a){const u=a[0]&257?bn(s,[a[0]&1&&{item:o[49]},a[0]&256&&hi(o[8])]):{};if(l!==(l=o[7])){if(e){Me();const f=e;F(f.$$.fragment,1,0,()=>{z(f,1)}),Oe()}l?(e=new l(r()),B(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&F(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&z(e,o)}}}function vp(n){let e,t,i;function s(){return n[34](n[49])}return{c(){e=_("span"),e.innerHTML='<i class="ri-close-line"></i>',p(e,"class","clear")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Clear")),Q(e,"click",Un(Wt(s)))],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,lt(i)}}}function kp(n){let e,t,i,s,l,r;const o=[U3,B3],a=[];function u(c,d){return c[7]?0:1}t=u(n),i=a[t]=o[t](n);let f=(n[4]||n[6])&&vp(n);return{c(){e=_("div"),i.c(),s=O(),f&&f.c(),l=O(),p(e,"class","option")},m(c,d){w(c,e,d),a[t].m(e,null),m(e,s),f&&f.m(e,null),m(e,l),r=!0},p(c,d){let h=t;t=u(c),t===h?a[t].p(c,d):(Me(),F(a[h],1,1,()=>{a[h]=null}),Oe(),i=a[t],i?i.p(c,d):(i=a[t]=o[t](c),i.c()),A(i,1),i.m(e,s)),c[4]||c[6]?f?f.p(c,d):(f=vp(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){r||(A(i),r=!0)},o(c){F(i),r=!1},d(c){c&&k(e),a[t].d(),f&&f.d()}}}function wp(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[17],$$slots:{default:[K3]},$$scope:{ctx:n}};return e=new ks({props:i}),n[39](e),e.$on("show",n[23]),e.$on("hide",n[40]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&131072&&(r.trigger=s[17]),l[0]&806410|l[1]&2048&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[39](null),z(e,s)}}}function Sp(n){let e,t,i,s,l,r,o,a,u=n[14].length&&$p(n);return{c(){e=_("div"),t=_("label"),i=_("div"),i.innerHTML='<i class="ri-search-line"></i>',s=O(),l=_("input"),r=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){w(f,e,c),m(e,t),m(t,i),m(t,s),m(t,l),$e(l,n[14]),m(t,r),u&&u.m(t,null),l.focus(),o||(a=Q(l,"input",n[36]),o=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&16384&&l.value!==f[14]&&$e(l,f[14]),f[14].length?u?u.p(f,c):(u=$p(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&k(e),u&&u.d(),o=!1,a()}}}function $p(n){let e,t,i,s;return{c(){e=_("div"),t=_("button"),t.innerHTML='<i class="ri-close-line"></i>',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,r){w(l,e,r),m(e,t),i||(s=Q(t,"click",Un(Wt(n[20]))),i=!0)},p:oe,d(l){l&&k(e),i=!1,s()}}}function Cp(n){let e,t=n[1]&&Mp(n);return{c(){t&&t.c(),e=st()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=Mp(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function Mp(n){let e,t;return{c(){e=_("div"),t=H(n[1]),p(e,"class","txt-missing")},m(i,s){w(i,e,s),m(e,t)},p(i,s){s[0]&2&&ge(t,i[1])},d(i){i&&k(e)}}}function Op(n){let e,t=n[46].group+"",i;return{c(){e=_("div"),i=H(t),p(e,"class","dropdown-item separator")},m(s,l){w(s,e,l),m(e,i)},p(s,l){l[0]&524288&&t!==(t=s[46].group+"")&&ge(i,t)},d(s){s&&k(e)}}}function W3(n){let e=n[49]+"",t;return{c(){t=H(e)},m(i,s){w(i,t,s)},p(i,s){s[0]&524288&&e!==(e=i[49]+"")&&ge(t,e)},i:oe,o:oe,d(i){i&&k(t)}}}function Y3(n){let e,t,i;const s=[{item:n[49]},n[10]];var l=n[9];function r(o){let a={};for(let u=0;u<s.length;u+=1)a=ct(a,s[u]);return{props:a}}return l&&(e=new l(r())),{c(){e&&B(e.$$.fragment),t=st()},m(o,a){e&&V(e,o,a),w(o,t,a),i=!0},p(o,a){const u=a[0]&525312?bn(s,[a[0]&524288&&{item:o[49]},a[0]&1024&&hi(o[10])]):{};if(l!==(l=o[9])){if(e){Me();const f=e;F(f.$$.fragment,1,0,()=>{z(f,1)}),Oe()}l?(e=new l(r()),B(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&F(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&z(e,o)}}}function Tp(n){let e,t,i,s,l,r,o;const a=[Y3,W3],u=[];function f(h,g){return h[9]?0:1}t=f(n),i=u[t]=a[t](n);function c(...h){return n[37](n[49],...h)}function d(...h){return n[38](n[49],...h)}return{c(){e=_("div"),i.c(),s=O(),p(e,"tabindex","0"),p(e,"class","dropdown-item option closable"),ee(e,"selected",n[18](n[49]))},m(h,g){w(h,e,g),u[t].m(e,null),m(e,s),l=!0,r||(o=[Q(e,"click",c),Q(e,"keydown",d)],r=!0)},p(h,g){n=h;let y=t;t=f(n),t===y?u[t].p(n,g):(Me(),F(u[y],1,1,()=>{u[y]=null}),Oe(),i=u[t],i?i.p(n,g):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),g[0]&786432&&ee(e,"selected",n[18](n[49]))},i(h){l||(A(i),l=!0)},o(h){F(i),l=!1},d(h){h&&k(e),u[t].d(),r=!1,lt(o)}}}function Dp(n){let e,t,i,s=n[46].group!=gu&&Op(n),l=n[46].items,r=[];for(let a=0;a<l.length;a+=1)r[a]=Tp(gp(n,l,a));const o=a=>F(r[a],1,1,()=>{r[a]=null});return{c(){s&&s.c(),e=O();for(let a=0;a<r.length;a+=1)r[a].c();t=st()},m(a,u){s&&s.m(a,u),w(a,e,u);for(let f=0;f<r.length;f+=1)r[f].m(a,u);w(a,t,u),i=!0},p(a,u){if(a[46].group!=gu?s?s.p(a,u):(s=Op(a),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),u[0]&7079424){l=a[46].items;let f;for(f=0;f<l.length;f+=1){const c=gp(a,l,f);r[f]?(r[f].p(c,u),A(r[f],1)):(r[f]=Tp(c),r[f].c(),A(r[f],1),r[f].m(t.parentNode,t))}for(Me(),f=l.length;f<r.length;f+=1)o(f);Oe()}},i(a){if(!i){for(let u=0;u<l.length;u+=1)A(r[u]);i=!0}},o(a){r=r.filter(Boolean);for(let u=0;u<r.length;u+=1)F(r[u]);i=!1},d(a){s&&s.d(a),a&&k(e),Bn(r,a),a&&k(t)}}}function K3(n){let e,t,i,s,l,r=n[11]&&Sp(n);const o=n[33].beforeOptions,a=Dn(o,n,n[42],_p);let u=n[19],f=[];for(let y=0;y<u.length;y+=1)f[y]=Dp(mp(n,u,y));const c=y=>F(f[y],1,1,()=>{f[y]=null});let d=null;u.length||(d=Cp(n));const h=n[33].afterOptions,g=Dn(h,n,n[42],hp);return{c(){r&&r.c(),e=O(),a&&a.c(),t=O(),i=_("div");for(let y=0;y<f.length;y+=1)f[y].c();d&&d.c(),s=O(),g&&g.c(),p(i,"class","options-list")},m(y,b){r&&r.m(y,b),w(y,e,b),a&&a.m(y,b),w(y,t,b),w(y,i,b);for(let v=0;v<f.length;v+=1)f[v].m(i,null);d&&d.m(i,null),w(y,s,b),g&&g.m(y,b),l=!0},p(y,b){if(y[11]?r?r.p(y,b):(r=Sp(y),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),a&&a.p&&(!l||b[1]&2048)&&En(a,o,y,y[42],l?An(o,y[42],b,z3):Pn(y[42]),_p),b[0]&7079426){u=y[19];let v;for(v=0;v<u.length;v+=1){const S=mp(y,u,v);f[v]?(f[v].p(S,b),A(f[v],1)):(f[v]=Dp(S),f[v].c(),A(f[v],1),f[v].m(i,null))}for(Me(),v=u.length;v<f.length;v+=1)c(v);Oe(),!u.length&&d?d.p(y,b):u.length?d&&(d.d(1),d=null):(d=Cp(y),d.c(),d.m(i,null))}g&&g.p&&(!l||b[1]&2048)&&En(g,h,y,y[42],l?An(h,y[42],b,V3):Pn(y[42]),hp)},i(y){if(!l){A(a,y);for(let b=0;b<u.length;b+=1)A(f[b]);A(g,y),l=!0}},o(y){F(a,y),f=f.filter(Boolean);for(let b=0;b<f.length;b+=1)F(f[b]);F(g,y),l=!1},d(y){r&&r.d(y),y&&k(e),a&&a.d(y),y&&k(t),y&&k(i),Bn(f,y),d&&d.d(),y&&k(s),g&&g.d(y)}}}function J3(n){let e,t,i,s,l,r,o=W.toArray(n[0]),a=[];for(let d=0;d<o.length;d+=1)a[d]=kp(bp(n,o,d));const u=d=>F(a[d],1,1,()=>{a[d]=null});let f=null;o.length||(f=yp(n));let c=!n[5]&&wp(n);return{c(){e=_("div"),t=_("div");for(let d=0;d<a.length;d+=1)a[d].c();f&&f.c(),s=O(),c&&c.c(),p(t,"tabindex",i=n[5]?"-1":"0"),p(t,"class","selected-container"),ee(t,"disabled",n[5]),p(e,"class",l="select "+n[12]),ee(e,"multiple",n[4]),ee(e,"disabled",n[5])},m(d,h){w(d,e,h),m(e,t);for(let g=0;g<a.length;g+=1)a[g].m(t,null);f&&f.m(t,null),n[35](t),m(e,s),c&&c.m(e,null),n[41](e),r=!0},p(d,h){if(h[0]&8661){o=W.toArray(d[0]);let g;for(g=0;g<o.length;g+=1){const y=bp(d,o,g);a[g]?(a[g].p(y,h),A(a[g],1)):(a[g]=kp(y),a[g].c(),A(a[g],1),a[g].m(t,null))}for(Me(),g=o.length;g<a.length;g+=1)u(g);Oe(),!o.length&&f?f.p(d,h):o.length?f&&(f.d(1),f=null):(f=yp(d),f.c(),f.m(t,null))}(!r||h[0]&32&&i!==(i=d[5]?"-1":"0"))&&p(t,"tabindex",i),h[0]&32&&ee(t,"disabled",d[5]),d[5]?c&&(Me(),F(c,1,1,()=>{c=null}),Oe()):c?(c.p(d,h),h[0]&32&&A(c,1)):(c=wp(d),c.c(),A(c,1),c.m(e,null)),(!r||h[0]&4096&&l!==(l="select "+d[12]))&&p(e,"class",l),h[0]&4112&&ee(e,"multiple",d[4]),h[0]&4128&&ee(e,"disabled",d[5])},i(d){if(!r){for(let h=0;h<o.length;h+=1)A(a[h]);A(c),r=!0}},o(d){a=a.filter(Boolean);for(let h=0;h<a.length;h+=1)F(a[h]);F(c),r=!1},d(d){d&&k(e),Bn(a,d),f&&f.d(),n[35](null),c&&c.d(),n[41](null)}}}const gu="_base_";function G3(n,e){let t=(""+e).replace(/\s+/g,"").toLowerCase(),i=n;try{typeof n=="object"&&n!==null&&(i=JSON.stringify(n))}catch{}return(""+i).replace(/\s+/g,"").toLowerCase().includes(t)}function Z3(n,e,t){let i,s,l,{$$slots:r={},$$scope:o}=e,{id:a=""}=e,{noOptionsText:u="No options found"}=e,{selectPlaceholder:f="- Select -"}=e,{searchPlaceholder:c="Search..."}=e,{items:d=[]}=e,{multiple:h=!1}=e,{disabled:g=!1}=e,{selected:y=h?[]:void 0}=e,{toggle:b=!1}=e,{labelComponent:v=void 0}=e,{labelComponentProps:S={}}=e,{optionComponent:$=void 0}=e,{optionComponentProps:C={}}=e,{searchable:M=!1}=e,{searchFunc:T=void 0}=e,{class:E=""}=e,D,P="",L,R;function j(ae){if(W.isEmpty(y))return;let re=W.toArray(y);W.inArray(re,ae)&&(W.removeByValue(re,ae),t(0,y=re)),L==null||L.dispatchEvent(new CustomEvent("change",{detail:y,bubbles:!0}))}function G(ae){if(h){let re=W.toArray(y);W.inArray(re,ae)||t(0,y=[...re,ae])}else t(0,y=ae);L==null||L.dispatchEvent(new CustomEvent("change",{detail:y,bubbles:!0}))}function Y(ae){return l(ae)?j(ae):G(ae)}function q(){t(0,y=h?[]:void 0)}function Z(){D!=null&&D.show&&(D==null||D.show())}function J(){D!=null&&D.hide&&(D==null||D.hide())}function K(){if(W.isEmpty(y)||W.isEmpty(i))return;let ae=W.toArray(y),re=[];for(const ve of ae){let qe=!1;for(const Ve of i)if(W.inArray(Ve.items,ve)){qe=!0;break}qe||re.push(ve)}if(re.length){for(const ve of re)W.removeByValue(ae,ve);t(0,y=h?ae:ae[0])}}function ne(){t(14,P="")}function ce(ae,re){var Ve;const ve=[],qe=T||G3;for(const Je of ae){let me;typeof re=="string"&&re.length?me=((Ve=Je.items)==null?void 0:Ve.filter(Ae=>qe(Ae,re)))||[]:me=Je.items||[],me.length&&ve.push({group:Je.group,items:me})}return ve}function be(ae,re){ae.preventDefault(),b&&h?Y(re):G(re)}function se(ae,re){(ae.code==="Enter"||ae.code==="Space")&&be(ae,re)}function x(){ne(),setTimeout(()=>{const ae=L==null?void 0:L.querySelector(".dropdown-item.option.selected");ae&&(ae.focus(),ae.scrollIntoView({block:"nearest"}))},0)}function Te(ae){ae.stopPropagation(),!g&&(D==null||D.toggle())}pi(()=>{const ae=document.querySelectorAll(`label[for="${a}"]`);for(const re of ae)re.addEventListener("click",Te);return()=>{for(const re of ae)re.removeEventListener("click",Te)}});const te=ae=>j(ae);function _e(ae){pe[ae?"unshift":"push"](()=>{R=ae,t(17,R)})}function fe(){P=this.value,t(14,P)}const ie=(ae,re)=>be(re,ae),ye=(ae,re)=>se(re,ae);function He(ae){pe[ae?"unshift":"push"](()=>{D=ae,t(15,D)})}function Le(ae){ut.call(this,n,ae)}function Re(ae){pe[ae?"unshift":"push"](()=>{L=ae,t(16,L)})}return n.$$set=ae=>{"id"in ae&&t(24,a=ae.id),"noOptionsText"in ae&&t(1,u=ae.noOptionsText),"selectPlaceholder"in ae&&t(2,f=ae.selectPlaceholder),"searchPlaceholder"in ae&&t(3,c=ae.searchPlaceholder),"items"in ae&&t(25,d=ae.items),"multiple"in ae&&t(4,h=ae.multiple),"disabled"in ae&&t(5,g=ae.disabled),"selected"in ae&&t(0,y=ae.selected),"toggle"in ae&&t(6,b=ae.toggle),"labelComponent"in ae&&t(7,v=ae.labelComponent),"labelComponentProps"in ae&&t(8,S=ae.labelComponentProps),"optionComponent"in ae&&t(9,$=ae.optionComponent),"optionComponentProps"in ae&&t(10,C=ae.optionComponentProps),"searchable"in ae&&t(11,M=ae.searchable),"searchFunc"in ae&&t(26,T=ae.searchFunc),"class"in ae&&t(12,E=ae.class),"$$scope"in ae&&t(42,o=ae.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&33554432&&t(32,i=W.isObjectArrayWithKeys(d,["group"])?d:[{group:gu,items:d}]),n.$$.dirty[0]&33554432&&d&&(K(),ne()),n.$$.dirty[0]&16384|n.$$.dirty[1]&2&&t(19,s=ce(i,P)),n.$$.dirty[0]&1&&t(18,l=function(ae){let re=W.toArray(y);return W.inArray(re,ae)})},[y,u,f,c,h,g,b,v,S,$,C,M,E,j,P,D,L,R,l,s,ne,be,se,x,a,d,T,G,Y,q,Z,J,i,r,te,_e,fe,ie,ye,He,Le,Re,o]}class Fb extends Pe{constructor(e){super(),Ee(this,e,Z3,J3,De,{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 Ap(n){let e,t;return{c(){e=_("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&k(e)}}}function x3(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&&Ap(n);return{c(){l&&l.c(),e=O(),t=_("span"),s=H(i),p(t,"class","txt")},m(r,o){l&&l.m(r,o),w(r,e,o),w(r,t,o),m(t,s)},p(r,[o]){r[0].icon?l?l.p(r,o):(l=Ap(r),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),o&1&&i!==(i=(r[0].label||r[0].name||r[0].title||r[0].id||r[0].value)+"")&&ge(s,i)},i:oe,o:oe,d(r){l&&l.d(r),r&&k(e),r&&k(t)}}}function X3(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Ep extends Pe{constructor(e){super(),Ee(this,e,X3,x3,De,{item:0})}}const Q3=n=>({}),Pp=n=>({});function e4(n){let e;const t=n[8].afterOptions,i=Dn(t,n,n[12],Pp);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&En(i,t,s,s[12],e?An(t,s[12],l,Q3):Pn(s[12]),Pp)},i(s){e||(A(i,s),e=!0)},o(s){F(i,s),e=!1},d(s){i&&i.d(s)}}}function t4(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(o){n[9](o)}let r={$$slots:{afterOptions:[e4]},$$scope:{ctx:n}};for(let o=0;o<s.length;o+=1)r=ct(r,s[o]);return n[0]!==void 0&&(r.selected=n[0]),e=new Fb({props:r}),pe.push(()=>Ie(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){B(e.$$.fragment)},m(o,a){V(e,o,a),i=!0},p(o,[a]){const u=a&62?bn(s,[a&2&&{items:o[1]},a&4&&{multiple:o[2]},a&8&&{labelComponent:o[3]},a&16&&{optionComponent:o[4]},a&32&&hi(o[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:o}),!t&&a&1&&(t=!0,u.selected=o[0],je(()=>t=!1)),e.$set(u)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){F(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function n4(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=Ut(e,i),{$$slots:l={},$$scope:r}=e,{items:o=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=Ep}=e,{optionComponent:c=Ep}=e,{selectionKey:d="value"}=e,{keyOfSelected:h=a?[]:void 0}=e;function g(C){C=W.toArray(C,!0);let M=[],T=b();for(let E of T)W.inArray(C,E[d])&&M.push(E);C.length&&!M.length||t(0,u=a?M:M[0])}async function y(C){let M=W.toArray(C,!0).map(T=>T[d]);!o.length||t(6,h=a?M:M[0])}function b(){if(!W.isObjectArrayWithKeys(o,["group","items"]))return o;let C=[];for(const M of o)C=C.concat(M.items);return C}function v(C){u=C,t(0,u)}function S(C){ut.call(this,n,C)}function $(C){ut.call(this,n,C)}return n.$$set=C=>{e=ct(ct({},e),di(C)),t(5,s=Ut(e,i)),"items"in C&&t(1,o=C.items),"multiple"in C&&t(2,a=C.multiple),"selected"in C&&t(0,u=C.selected),"labelComponent"in C&&t(3,f=C.labelComponent),"optionComponent"in C&&t(4,c=C.optionComponent),"selectionKey"in C&&t(7,d=C.selectionKey),"keyOfSelected"in C&&t(6,h=C.keyOfSelected),"$$scope"in C&&t(12,r=C.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&o&&g(h),n.$$.dirty&1&&y(u)},[u,o,a,f,c,s,h,d,l,v,S,$,r]}class ws extends Pe{constructor(e){super(),Ee(this,e,n4,t4,De,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function i4(n){let e,t,i;const s=[{class:"field-type-select "+n[1]},{searchable:!0},{items:n[2]},n[3]];function l(o){n[4](o)}let r={};for(let o=0;o<s.length;o+=1)r=ct(r,s[o]);return n[0]!==void 0&&(r.keyOfSelected=n[0]),e=new ws({props:r}),pe.push(()=>Ie(e,"keyOfSelected",l)),{c(){B(e.$$.fragment)},m(o,a){V(e,o,a),i=!0},p(o,[a]){const u=a&14?bn(s,[a&2&&{class:"field-type-select "+o[1]},s[1],a&4&&{items:o[2]},a&8&&hi(o[3])]):{};!t&&a&1&&(t=!0,u.keyOfSelected=o[0],je(()=>t=!1)),e.$set(u)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){F(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function s4(n,e,t){const i=["value","class"];let s=Ut(e,i),{value:l="text"}=e,{class:r=""}=e;const o=[{label:"Text",value:"text",icon:W.getFieldTypeIcon("text")},{label:"Number",value:"number",icon:W.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:W.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:W.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:W.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:W.getFieldTypeIcon("date")},{label:"Multiple choices",value:"select",icon:W.getFieldTypeIcon("select")},{label:"JSON",value:"json",icon:W.getFieldTypeIcon("json")},{label:"File",value:"file",icon:W.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:W.getFieldTypeIcon("relation")},{label:"User",value:"user",icon:W.getFieldTypeIcon("user")}];function a(u){l=u,t(0,l)}return n.$$set=u=>{e=ct(ct({},e),di(u)),t(3,s=Ut(e,i)),"value"in u&&t(0,l=u.value),"class"in u&&t(1,r=u.class)},[l,r,o,s,a]}class l4 extends Pe{constructor(e){super(),Ee(this,e,s4,i4,De,{value:0,class:1})}}function r4(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Min length"),s=O(),l=_("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",r=n[5]),p(l,"step","1"),p(l,"min","0")},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].min),o||(a=Q(l,"input",n[2]),o=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&r!==(r=u[5])&&p(l,"id",r),f&1&&Mt(l.value)!==u[0].min&&$e(l,u[0].min)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function o4(n){let e,t,i,s,l,r,o,a,u;return{c(){e=_("label"),t=H("Max length"),s=O(),l=_("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",r=n[5]),p(l,"step","1"),p(l,"min",o=n[0].min||0)},m(f,c){w(f,e,c),m(e,t),w(f,s,c),w(f,l,c),$e(l,n[0].max),a||(u=Q(l,"input",n[3]),a=!0)},p(f,c){c&32&&i!==(i=f[5])&&p(e,"for",i),c&32&&r!==(r=f[5])&&p(l,"id",r),c&1&&o!==(o=f[0].min||0)&&p(l,"min",o),c&1&&Mt(l.value)!==f[0].max&&$e(l,f[0].max)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function a4(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=H("Regex pattern"),s=O(),l=_("input"),o=O(),a=_("div"),a.innerHTML="Valid Go regular expression, eg. <code>^\\w+$</code>.",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",r=n[5]),p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].pattern),w(c,o,d),w(c,a,d),u||(f=Q(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&r!==(r=c[5])&&p(l,"id",r),d&1&&l.value!==c[0].pattern&&$e(l,c[0].pattern)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function u4(n){let e,t,i,s,l,r,o,a,u,f;return i=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[r4,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[o4,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[a4,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(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){w(c,e,d),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(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 g={};d&2&&(g.name="schema."+c[1]+".options.max"),d&97&&(g.$$scope={dirty:d,ctx:c}),r.$set(g);const y={};d&2&&(y.name="schema."+c[1]+".options.pattern"),d&97&&(y.$$scope={dirty:d,ctx:c}),u.$set(y)},i(c){f||(A(i.$$.fragment,c),A(r.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){F(i.$$.fragment,c),F(r.$$.fragment,c),F(u.$$.fragment,c),f=!1},d(c){c&&k(e),z(i),z(r),z(u)}}}function f4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=Mt(this.value),t(0,s)}function r(){s.max=Mt(this.value),t(0,s)}function o(){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,r,o]}class c4 extends Pe{constructor(e){super(),Ee(this,e,f4,u4,De,{key:1,options:0})}}function d4(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Min"),s=O(),l=_("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",r=n[4])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].min),o||(a=Q(l,"input",n[2]),o=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&r!==(r=u[4])&&p(l,"id",r),f&1&&Mt(l.value)!==u[0].min&&$e(l,u[0].min)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function p4(n){let e,t,i,s,l,r,o,a,u;return{c(){e=_("label"),t=H("Max"),s=O(),l=_("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",r=n[4]),p(l,"min",o=n[0].min)},m(f,c){w(f,e,c),m(e,t),w(f,s,c),w(f,l,c),$e(l,n[0].max),a||(u=Q(l,"input",n[3]),a=!0)},p(f,c){c&16&&i!==(i=f[4])&&p(e,"for",i),c&16&&r!==(r=f[4])&&p(l,"id",r),c&1&&o!==(o=f[0].min)&&p(l,"min",o),c&1&&Mt(l.value)!==f[0].max&&$e(l,f[0].max)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function h4(n){let e,t,i,s,l,r,o;return i=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[d4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[p4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!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}),r.$set(c)},i(a){o||(A(i.$$.fragment,a),A(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function m4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=Mt(this.value),t(0,s)}function r(){s.max=Mt(this.value),t(0,s)}return n.$$set=o=>{"key"in o&&t(1,i=o.key),"options"in o&&t(0,s=o.options)},[s,i,l,r]}class g4 extends Pe{constructor(e){super(),Ee(this,e,m4,h4,De,{key:1,options:0})}}function _4(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 b4 extends Pe{constructor(e){super(),Ee(this,e,_4,null,De,{key:0,options:1})}}function y4(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],r={};for(let o=0;o<l.length;o+=1)r=ct(r,l[o]);return{c(){e=_("input"),ci(e,r)},m(o,a){w(o,e,a),e.value=r.value,e.autofocus&&e.focus(),i||(s=Q(e,"input",n[4]),i=!0)},p(o,[a]){ci(e,r=bn(l,[a&8&&t!==(t=o[3].type||"text")&&{type:t},a&4&&e.value!==o[2]&&{value:o[2]},a&8&&o[3]])),"value"in r&&(e.value=r.value)},i:oe,o:oe,d(o){o&&k(e),i=!1,s()}}}function v4(n,e,t){let i;const s=["value","separator"];let l=Ut(e,s),{value:r=[]}=e,{separator:o=","}=e;const a=u=>{t(0,r=W.splitNonEmpty(u.target.value,o))};return n.$$set=u=>{e=ct(ct({},e),di(u)),t(3,l=Ut(e,s)),"value"in u&&t(0,r=u.value),"separator"in u&&t(1,o=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(r||[]).join(","))},[r,o,i,l,a]}class Ss extends Pe{constructor(e){super(),Ee(this,e,v4,y4,De,{value:0,separator:1})}}function k4(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(b){n[2](b)}let y={id:n[4],disabled:!W.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(y.value=n[0].exceptDomains),o=new Ss({props:y}),pe.push(()=>Ie(o,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Except domains",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),w(b,r,v),V(o,b,v),w(b,u,v),w(b,f,v),c=!0,d||(h=Xe(St.call(null,s,{text:`Domains that are NOT allowed as value. 
+ This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,v){(!c||v&16&&l!==(l=b[4]))&&p(e,"for",l);const S={};v&16&&(S.id=b[4]),v&1&&(S.disabled=!W.isEmpty(b[0].onlyDomains)),!a&&v&1&&(a=!0,S.value=b[0].exceptDomains,je(()=>a=!1)),o.$set(S)},i(b){c||(A(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function w4(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(b){n[3](b)}let y={id:n[4]+".options.onlyDomains",disabled:!W.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(y.value=n[0].onlyDomains),o=new Ss({props:y}),pe.push(()=>Ie(o,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),w(b,r,v),V(o,b,v),w(b,u,v),w(b,f,v),c=!0,d||(h=Xe(St.call(null,s,{text:`Domains that are ONLY allowed as value. 
+ This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,v){(!c||v&16&&l!==(l=b[4]+".options.onlyDomains"))&&p(e,"for",l);const S={};v&16&&(S.id=b[4]+".options.onlyDomains"),v&1&&(S.disabled=!W.isEmpty(b[0].exceptDomains)),!a&&v&1&&(a=!0,S.value=b[0].onlyDomains,je(()=>a=!1)),o.$set(S)},i(b){c||(A(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function S4(n){let e,t,i,s,l,r,o;return i=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[k4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[w4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!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}),r.$set(c)},i(a){o||(A(i.$$.fragment,a),A(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function $4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(o){n.$$.not_equal(s.exceptDomains,o)&&(s.exceptDomains=o,t(0,s))}function r(o){n.$$.not_equal(s.onlyDomains,o)&&(s.onlyDomains=o,t(0,s))}return n.$$set=o=>{"key"in o&&t(1,i=o.key),"options"in o&&t(0,s=o.options)},[s,i,l,r]}class Ib extends Pe{constructor(e){super(),Ee(this,e,$4,S4,De,{key:1,options:0})}}function C4(n){let e,t,i,s;function l(a){n[2](a)}function r(a){n[3](a)}let o={};return n[0]!==void 0&&(o.key=n[0]),n[1]!==void 0&&(o.options=n[1]),e=new Ib({props:o}),pe.push(()=>Ie(e,"key",l)),pe.push(()=>Ie(e,"options",r)),{c(){B(e.$$.fragment)},m(a,u){V(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],je(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],je(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){F(e.$$.fragment,a),s=!1},d(a){z(e,a)}}}function M4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(o){i=o,t(0,i)}function r(o){s=o,t(1,s)}return n.$$set=o=>{"key"in o&&t(0,i=o.key),"options"in o&&t(1,s=o.options)},[i,s,l,r]}class O4 extends Pe{constructor(e){super(),Ee(this,e,M4,C4,De,{key:0,options:1})}}var Ma=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Vs={_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!="undefined"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},Bl={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},yn=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Hn=function(n){return n===!0?1:0};function Lp(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Oa=function(n){return n instanceof Array?n:[n]};function cn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function kt(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 Rr(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Nb(n,e){if(e(n))return n;if(n.parentNode)return Nb(n.parentNode,e)}function jr(n,e){var t=kt("div","numInputWrapper"),i=kt("input","numInput "+n),s=kt("span","arrowUp"),l=kt("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var r in e)i.setAttribute(r,e[r]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function $n(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Ta=function(){},wo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},T4={D:Ta,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*Hn(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:Ta,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:Ta,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},us={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})"},Ll={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[Ll.w(n,e,t)]},F:function(n,e,t){return wo(Ll.n(n,e,t)-1,!1,e)},G:function(n,e,t){return yn(Ll.h(n,e,t))},H:function(n){return yn(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[Hn(n.getHours()>11)]},M:function(n,e){return wo(n.getMonth(),!0,e)},S:function(n){return yn(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return yn(n.getFullYear(),4)},d:function(n){return yn(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return yn(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return yn(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)}},Rb=function(n){var e=n.config,t=e===void 0?Vs:e,i=n.l10n,s=i===void 0?Bl:i,l=n.isMobile,r=l===void 0?!1:l;return function(o,a,u){var f=u||s;return t.formatDate!==void 0&&!r?t.formatDate(o,a,f):a.split("").map(function(c,d,h){return Ll[c]&&h[d-1]!=="\\"?Ll[c](o,f,t):c!=="\\"?c:""}).join("")}},_u=function(n){var e=n.config,t=e===void 0?Vs:e,i=n.l10n,s=i===void 0?Bl:i;return function(l,r,o,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=r||(t||Vs).dateFormat,h=String(l).trim();if(h==="today")f=new Date,o=!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 g=void 0,y=[],b=0,v=0,S="";b<d.length;b++){var $=d[b],C=$==="\\",M=d[b-1]==="\\"||C;if(us[$]&&!M){S+=us[$];var T=new RegExp(S).exec(l);T&&(g=!0)&&y[$!=="Y"?"push":"unshift"]({fn:T4[$],val:T[++v]})}else C||(S+=".")}f=!t||!t.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),y.forEach(function(E){var D=E.fn,P=E.val;return f=D(f,P,u)||f}),f=g?f:void 0}}if(!(f instanceof Date&&!isNaN(f.getTime()))){t.errorHandler(new Error("Invalid date provided: "+c));return}return o===!0&&f.setHours(0,0,0,0),f}}};function Cn(n,e,t){return t===void 0&&(t=!0),t!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):n.getTime()-e.getTime()}var D4=function(n,e,t){return n>Math.min(e,t)&&n<Math.max(e,t)},Da=function(n,e,t){return n*3600+e*60+t},A4=function(n){var e=Math.floor(n/3600),t=(n-e*3600)/60;return[e,t,n-e*3600-t*60]},E4={DAY:864e5};function Aa(n){var e=n.defaultHour,t=n.defaultMinute,i=n.defaultSeconds;if(n.minDate!==void 0){var s=n.minDate.getHours(),l=n.minDate.getMinutes(),r=n.minDate.getSeconds();e<s&&(e=s),e===s&&t<l&&(t=l),e===s&&t===l&&i<r&&(i=n.minDate.getSeconds())}if(n.maxDate!==void 0){var o=n.maxDate.getHours(),a=n.maxDate.getMinutes();e=Math.min(e,o),e===o&&(t=Math.min(a,t)),e===o&&t===a&&(i=n.maxDate.getSeconds())}return{hours:e,minutes:t,seconds:i}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var i=function(o){o&&Object.keys(o).forEach(function(a){return n[a]=o[a]})},s=0,l=e;s<l.length;s++){var r=l[s];i(r)}return n});var on=globalThis&&globalThis.__assign||function(){return on=Object.assign||function(n){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s])}return n},on.apply(this,arguments)},Fp=globalThis&&globalThis.__spreadArrays||function(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var i=Array(n),s=0,e=0;e<t;e++)for(var l=arguments[e],r=0,o=l.length;r<o;r++,s++)i[s]=l[r];return i},P4=300;function L4(n,e){var t={config:on(on({},Vs),Bt.defaultConfig),l10n:Bl};t.parseDate=_u({config:t.config,l10n:t.l10n}),t._handlers=[],t.pluginElements=[],t.loadedPlugins=[],t._bind=y,t._setHoursFromDate=d,t._positionCalendar=me,t.changeMonth=be,t.changeYear=fe,t.clear=se,t.close=x,t.onMouseOver=Re,t._createElement=kt,t.createDay=T,t.destroy=Te,t.isEnabled=ie,t.jumpToDate=S,t.updateValue=Vt,t.open=re,t.redraw=ue,t.set=yt,t.setDate=dt,t.toggle=Ge;function i(){t.utils={getDaysInMonth:function(N,I){return N===void 0&&(N=t.currentMonth),I===void 0&&(I=t.currentYear),N===1&&(I%4===0&&I%100!==0||I%400===0)?29:t.l10n.daysInMonth[N]}}}function s(){t.element=t.input=n,t.isOpen=!1,qe(),Je(),Jt(),Pt(),i(),t.isMobile||M(),v(),(t.selectedDates.length||t.config.noCalendar)&&(t.config.enableTime&&d(t.config.noCalendar?t.latestSelectedDateObj:void 0),Vt(!1)),o();var N=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!t.isMobile&&N&&me(),et("onReady")}function l(){var N;return((N=t.calendarContainer)===null||N===void 0?void 0:N.getRootNode()).activeElement||document.activeElement}function r(N){return N.bind(t)}function o(){var N=t.config;N.weekNumbers===!1&&N.showMonths===1||N.noCalendar!==!0&&window.requestAnimationFrame(function(){if(t.calendarContainer!==void 0&&(t.calendarContainer.style.visibility="hidden",t.calendarContainer.style.display="block"),t.daysContainer!==void 0){var I=(t.days.offsetWidth+1)*N.showMonths;t.daysContainer.style.width=I+"px",t.calendarContainer.style.width=I+(t.weekWrapper!==void 0?t.weekWrapper.offsetWidth:0)+"px",t.calendarContainer.style.removeProperty("visibility"),t.calendarContainer.style.removeProperty("display")}})}function a(N){if(t.selectedDates.length===0){var I=t.config.minDate===void 0||Cn(new Date,t.config.minDate)>=0?new Date:new Date(t.config.minDate.getTime()),U=Aa(t.config);I.setHours(U.hours,U.minutes,U.seconds,I.getMilliseconds()),t.selectedDates=[I],t.latestSelectedDateObj=I}N!==void 0&&N.type!=="blur"&&ot(N);var le=t._input.value;c(),Vt(),t._input.value!==le&&t._debouncedChange()}function u(N,I){return N%12+12*Hn(I===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,I=(parseInt(t.minuteElement.value,10)||0)%60,U=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(N=u(N,t.amPM.textContent));var le=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&Cn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Ne=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&Cn(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 Be=Da(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),tt=Da(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Ke=Da(N,I,U);if(Ke>tt&&Ke<Be){var nt=A4(Be);N=nt[0],I=nt[1],U=nt[2]}}else{if(Ne){var Ye=t.config.maxTime!==void 0?t.config.maxTime:t.config.maxDate;N=Math.min(N,Ye.getHours()),N===Ye.getHours()&&(I=Math.min(I,Ye.getMinutes())),I===Ye.getMinutes()&&(U=Math.min(U,Ye.getSeconds()))}if(le){var xe=t.config.minTime!==void 0?t.config.minTime:t.config.minDate;N=Math.max(N,xe.getHours()),N===xe.getHours()&&I<xe.getMinutes()&&(I=xe.getMinutes()),I===xe.getMinutes()&&(U=Math.max(U,xe.getSeconds()))}}h(N,I,U)}}function d(N){var I=N||t.latestSelectedDateObj;I&&I instanceof Date&&h(I.getHours(),I.getMinutes(),I.getSeconds())}function h(N,I,U){t.latestSelectedDateObj!==void 0&&t.latestSelectedDateObj.setHours(N%24,I,U||0,0),!(!t.hourElement||!t.minuteElement||t.isMobile)&&(t.hourElement.value=yn(t.config.time_24hr?N:(12+N)%12+12*Hn(N%12===0)),t.minuteElement.value=yn(I),t.amPM!==void 0&&(t.amPM.textContent=t.l10n.amPM[Hn(N>=12)]),t.secondElement!==void 0&&(t.secondElement.value=yn(U)))}function g(N){var I=$n(N),U=parseInt(I.value)+(N.delta||0);(U/1e3>1||N.key==="Enter"&&!/[^\d]/.test(U.toString()))&&fe(U)}function y(N,I,U,le){if(I instanceof Array)return I.forEach(function(Ne){return y(N,Ne,U,le)});if(N instanceof Array)return N.forEach(function(Ne){return y(Ne,I,U,le)});N.addEventListener(I,U,le),t._handlers.push({remove:function(){return N.removeEventListener(I,U,le)}})}function b(){et("onChange")}function v(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(U){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+U+"]"),function(le){return y(le,"click",t[U])})}),t.isMobile){we();return}var N=Lp(ae,50);if(t._debouncedChange=Lp(b,P4),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&y(t.daysContainer,"mouseover",function(U){t.config.mode==="range"&&Re($n(U))}),y(t._input,"keydown",Le),t.calendarContainer!==void 0&&y(t.calendarContainer,"keydown",Le),!t.config.inline&&!t.config.static&&y(window,"resize",N),window.ontouchstart!==void 0?y(window.document,"touchstart",_e):y(window.document,"mousedown",_e),y(window.document,"focus",_e,{capture:!0}),t.config.clickOpens===!0&&(y(t._input,"focus",t.open),y(t._input,"click",t.open)),t.daysContainer!==void 0&&(y(t.monthNav,"click",ii),y(t.monthNav,["keyup","increment"],g),y(t.daysContainer,"click",bt)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var I=function(U){return $n(U).select()};y(t.timeContainer,["increment"],a),y(t.timeContainer,"blur",a,{capture:!0}),y(t.timeContainer,"click",$),y([t.hourElement,t.minuteElement],["focus","click"],I),t.secondElement!==void 0&&y(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&y(t.amPM,"click",function(U){a(U)})}t.config.allowInput&&y(t._input,"blur",He)}function S(N,I){var U=N!==void 0?t.parseDate(N):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate<t.now?t.config.maxDate:t.now),le=t.currentYear,Ne=t.currentMonth;try{U!==void 0&&(t.currentYear=U.getFullYear(),t.currentMonth=U.getMonth())}catch(Be){Be.message="Invalid date supplied: "+U,t.config.errorHandler(Be)}I&&t.currentYear!==le&&(et("onYearChange"),G()),I&&(t.currentYear!==le||t.currentMonth!==Ne)&&et("onMonthChange"),t.redraw()}function $(N){var I=$n(N);~I.className.indexOf("arrow")&&C(N,I.classList.contains("arrowUp")?1:-1)}function C(N,I,U){var le=N&&$n(N),Ne=U||le&&le.parentNode&&le.parentNode.firstChild,Be=Et("increment");Be.delta=I,Ne&&Ne.dispatchEvent(Be)}function M(){var N=window.document.createDocumentFragment();if(t.calendarContainer=kt("div","flatpickr-calendar"),t.calendarContainer.tabIndex=-1,!t.config.noCalendar){if(N.appendChild(Z()),t.innerContainer=kt("div","flatpickr-innerContainer"),t.config.weekNumbers){var I=ce(),U=I.weekWrapper,le=I.weekNumbers;t.innerContainer.appendChild(U),t.weekNumbers=le,t.weekWrapper=U}t.rContainer=kt("div","flatpickr-rContainer"),t.rContainer.appendChild(K()),t.daysContainer||(t.daysContainer=kt("div","flatpickr-days"),t.daysContainer.tabIndex=-1),j(),t.rContainer.appendChild(t.daysContainer),t.innerContainer.appendChild(t.rContainer),N.appendChild(t.innerContainer)}t.config.enableTime&&N.appendChild(J()),cn(t.calendarContainer,"rangeMode",t.config.mode==="range"),cn(t.calendarContainer,"animate",t.config.animate===!0),cn(t.calendarContainer,"multiMonth",t.config.showMonths>1),t.calendarContainer.appendChild(N);var Ne=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&&(!Ne&&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 Be=kt("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Be,t.element),Be.appendChild(t.element),t.altInput&&Be.appendChild(t.altInput),Be.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,I,U,le){var Ne=ie(I,!0),Be=kt("span",N,I.getDate().toString());return Be.dateObj=I,Be.$i=le,Be.setAttribute("aria-label",t.formatDate(I,t.config.ariaDateFormat)),N.indexOf("hidden")===-1&&Cn(I,t.now)===0&&(t.todayDateElem=Be,Be.classList.add("today"),Be.setAttribute("aria-current","date")),Ne?(Be.tabIndex=-1,de(I)&&(Be.classList.add("selected"),t.selectedDateElem=Be,t.config.mode==="range"&&(cn(Be,"startRange",t.selectedDates[0]&&Cn(I,t.selectedDates[0],!0)===0),cn(Be,"endRange",t.selectedDates[1]&&Cn(I,t.selectedDates[1],!0)===0),N==="nextMonthDay"&&Be.classList.add("inRange")))):Be.classList.add("flatpickr-disabled"),t.config.mode==="range"&&Se(I)&&!de(I)&&Be.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&N!=="prevMonthDay"&&le%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+t.config.getWeek(I)+"</span>"),et("onDayCreate",Be),Be}function E(N){N.focus(),t.config.mode==="range"&&Re(N)}function D(N){for(var I=N>0?0:t.config.showMonths-1,U=N>0?t.config.showMonths:-1,le=I;le!=U;le+=N)for(var Ne=t.daysContainer.children[le],Be=N>0?0:Ne.children.length-1,tt=N>0?Ne.children.length:-1,Ke=Be;Ke!=tt;Ke+=N){var nt=Ne.children[Ke];if(nt.className.indexOf("hidden")===-1&&ie(nt.dateObj))return nt}}function P(N,I){for(var U=N.className.indexOf("Month")===-1?N.dateObj.getMonth():t.currentMonth,le=I>0?t.config.showMonths:-1,Ne=I>0?1:-1,Be=U-t.currentMonth;Be!=le;Be+=Ne)for(var tt=t.daysContainer.children[Be],Ke=U-t.currentMonth===Be?N.$i+I:I<0?tt.children.length-1:0,nt=tt.children.length,Ye=Ke;Ye>=0&&Ye<nt&&Ye!=(I>0?nt:-1);Ye+=Ne){var xe=tt.children[Ye];if(xe.className.indexOf("hidden")===-1&&ie(xe.dateObj)&&Math.abs(N.$i-Ye)>=Math.abs(I))return E(xe)}t.changeMonth(Ne),L(D(Ne),0)}function L(N,I){var U=l(),le=ye(U||document.body),Ne=N!==void 0?N:le?U:t.selectedDateElem!==void 0&&ye(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&ye(t.todayDateElem)?t.todayDateElem:D(I>0?1:-1);Ne===void 0?t._input.focus():le?P(Ne,I):E(Ne)}function R(N,I){for(var U=(new Date(N,I,1).getDay()-t.l10n.firstDayOfWeek+7)%7,le=t.utils.getDaysInMonth((I-1+12)%12,N),Ne=t.utils.getDaysInMonth(I,N),Be=window.document.createDocumentFragment(),tt=t.config.showMonths>1,Ke=tt?"prevMonthDay hidden":"prevMonthDay",nt=tt?"nextMonthDay hidden":"nextMonthDay",Ye=le+1-U,xe=0;Ye<=le;Ye++,xe++)Be.appendChild(T("flatpickr-day "+Ke,new Date(N,I-1,Ye),Ye,xe));for(Ye=1;Ye<=Ne;Ye++,xe++)Be.appendChild(T("flatpickr-day",new Date(N,I,Ye),Ye,xe));for(var wt=Ne+1;wt<=42-U&&(t.config.showMonths===1||xe%7!==0);wt++,xe++)Be.appendChild(T("flatpickr-day "+nt,new Date(N,I+1,wt%Ne),wt,xe));var Sn=kt("div","dayContainer");return Sn.appendChild(Be),Sn}function j(){if(t.daysContainer!==void 0){Rr(t.daysContainer),t.weekNumbers&&Rr(t.weekNumbers);for(var N=document.createDocumentFragment(),I=0;I<t.config.showMonths;I++){var U=new Date(t.currentYear,t.currentMonth,1);U.setMonth(t.currentMonth+I),N.appendChild(R(U.getFullYear(),U.getMonth()))}t.daysContainer.appendChild(N),t.days=t.daysContainer.firstChild,t.config.mode==="range"&&t.selectedDates.length===1&&Re()}}function G(){if(!(t.config.showMonths>1||t.config.monthSelectorType!=="dropdown")){var N=function(le){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&le<t.config.minDate.getMonth()?!1:!(t.config.maxDate!==void 0&&t.currentYear===t.config.maxDate.getFullYear()&&le>t.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var I=0;I<12;I++)if(!!N(I)){var U=kt("option","flatpickr-monthDropdown-month");U.value=new Date(t.currentYear,I).getMonth().toString(),U.textContent=wo(I,t.config.shorthandCurrentMonth,t.l10n),U.tabIndex=-1,t.currentMonth===I&&(U.selected=!0),t.monthsDropdownContainer.appendChild(U)}}}function Y(){var N=kt("div","flatpickr-month"),I=window.document.createDocumentFragment(),U;t.config.showMonths>1||t.config.monthSelectorType==="static"?U=kt("span","cur-month"):(t.monthsDropdownContainer=kt("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),y(t.monthsDropdownContainer,"change",function(tt){var Ke=$n(tt),nt=parseInt(Ke.value,10);t.changeMonth(nt-t.currentMonth),et("onMonthChange")}),G(),U=t.monthsDropdownContainer);var le=jr("cur-year",{tabindex:"-1"}),Ne=le.getElementsByTagName("input")[0];Ne.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Ne.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Ne.setAttribute("max",t.config.maxDate.getFullYear().toString()),Ne.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Be=kt("div","flatpickr-current-month");return Be.appendChild(U),Be.appendChild(le),I.appendChild(Be),N.appendChild(I),{container:N,yearElement:Ne,monthElement:U}}function q(){Rr(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var N=t.config.showMonths;N--;){var I=Y();t.yearElements.push(I.yearElement),t.monthElements.push(I.monthElement),t.monthNav.appendChild(I.container)}t.monthNav.appendChild(t.nextMonthNav)}function Z(){return t.monthNav=kt("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=kt("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=kt("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,q(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(N){t.__hidePrevMonthArrow!==N&&(cn(t.prevMonthNav,"flatpickr-disabled",N),t.__hidePrevMonthArrow=N)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(N){t.__hideNextMonthArrow!==N&&(cn(t.nextMonthNav,"flatpickr-disabled",N),t.__hideNextMonthArrow=N)}}),t.currentYearElement=t.yearElements[0],Ze(),t.monthNav}function J(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var N=Aa(t.config);t.timeContainer=kt("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var I=kt("span","flatpickr-time-separator",":"),U=jr("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=U.getElementsByTagName("input")[0];var le=jr("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=le.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=yn(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?N.hours:f(N.hours)),t.minuteElement.value=yn(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(U),t.timeContainer.appendChild(I),t.timeContainer.appendChild(le),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Ne=jr("flatpickr-second");t.secondElement=Ne.getElementsByTagName("input")[0],t.secondElement.value=yn(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(kt("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Ne)}return t.config.time_24hr||(t.amPM=kt("span","flatpickr-am-pm",t.l10n.amPM[Hn((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function K(){t.weekdayContainer?Rr(t.weekdayContainer):t.weekdayContainer=kt("div","flatpickr-weekdays");for(var N=t.config.showMonths;N--;){var I=kt("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(I)}return ne(),t.weekdayContainer}function ne(){if(!!t.weekdayContainer){var N=t.l10n.firstDayOfWeek,I=Fp(t.l10n.weekdays.shorthand);N>0&&N<I.length&&(I=Fp(I.splice(N,I.length),I.splice(0,N)));for(var U=t.config.showMonths;U--;)t.weekdayContainer.children[U].innerHTML=`
+      <span class='flatpickr-weekday'>
+        `+I.join("</span><span class='flatpickr-weekday'>")+`
+      </span>
+      `}}function ce(){t.calendarContainer.classList.add("hasWeeks");var N=kt("div","flatpickr-weekwrapper");N.appendChild(kt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var I=kt("div","flatpickr-weeks");return N.appendChild(I),{weekWrapper:N,weekNumbers:I}}function be(N,I){I===void 0&&(I=!0);var U=I?N:N-t.currentMonth;U<0&&t._hidePrevMonthArrow===!0||U>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=U,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,et("onYearChange"),G()),j(),et("onMonthChange"),Ze())}function se(N,I){if(N===void 0&&(N=!0),I===void 0&&(I=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,I===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var U=Aa(t.config),le=U.hours,Ne=U.minutes,Be=U.seconds;h(le,Ne,Be)}t.redraw(),N&&et("onChange")}function x(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),et("onClose")}function Te(){t.config!==void 0&&et("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 I=t.calendarContainer.parentNode;if(I.lastChild&&I.removeChild(I.lastChild),I.parentNode){for(;I.firstChild;)I.parentNode.insertBefore(I.firstChild,I);I.parentNode.removeChild(I)}}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(U){try{delete t[U]}catch{}})}function te(N){return t.calendarContainer.contains(N)}function _e(N){if(t.isOpen&&!t.config.inline){var I=$n(N),U=te(I),le=I===t.input||I===t.altInput||t.element.contains(I)||N.path&&N.path.indexOf&&(~N.path.indexOf(t.input)||~N.path.indexOf(t.altInput)),Ne=!le&&!U&&!te(N.relatedTarget),Be=!t.config.ignoredFocusElements.some(function(tt){return tt.contains(I)});Ne&&Be&&(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 fe(N){if(!(!N||t.config.minDate&&N<t.config.minDate.getFullYear()||t.config.maxDate&&N>t.config.maxDate.getFullYear())){var I=N,U=t.currentYear!==I;t.currentYear=I||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)),U&&(t.redraw(),et("onYearChange"),G())}}function ie(N,I){var U;I===void 0&&(I=!0);var le=t.parseDate(N,void 0,I);if(t.config.minDate&&le&&Cn(le,t.config.minDate,I!==void 0?I:!t.minDateHasTime)<0||t.config.maxDate&&le&&Cn(le,t.config.maxDate,I!==void 0?I:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(le===void 0)return!1;for(var Ne=!!t.config.enable,Be=(U=t.config.enable)!==null&&U!==void 0?U:t.config.disable,tt=0,Ke=void 0;tt<Be.length;tt++){if(Ke=Be[tt],typeof Ke=="function"&&Ke(le))return Ne;if(Ke instanceof Date&&le!==void 0&&Ke.getTime()===le.getTime())return Ne;if(typeof Ke=="string"){var nt=t.parseDate(Ke,void 0,!0);return nt&&nt.getTime()===le.getTime()?Ne:!Ne}else if(typeof Ke=="object"&&le!==void 0&&Ke.from&&Ke.to&&le.getTime()>=Ke.from.getTime()&&le.getTime()<=Ke.to.getTime())return Ne}return!Ne}function ye(N){return t.daysContainer!==void 0?N.className.indexOf("hidden")===-1&&N.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(N):!1}function He(N){var I=N.target===t._input,U=t._input.value.trimEnd()!==Gt();I&&U&&!(N.relatedTarget&&te(N.relatedTarget))&&t.setDate(t._input.value,!0,N.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Le(N){var I=$n(N),U=t.config.wrap?n.contains(I):I===t._input,le=t.config.allowInput,Ne=t.isOpen&&(!le||!U),Be=t.config.inline&&U&&!le;if(N.keyCode===13&&U){if(le)return t.setDate(t._input.value,!0,I===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),I.blur();t.open()}else if(te(I)||Ne||Be){var tt=!!t.timeContainer&&t.timeContainer.contains(I);switch(N.keyCode){case 13:tt?(N.preventDefault(),a(),Ue()):bt(N);break;case 27:N.preventDefault(),Ue();break;case 8:case 46:U&&!t.config.allowInput&&(N.preventDefault(),t.clear());break;case 37:case 39:if(!tt&&!U){N.preventDefault();var Ke=l();if(t.daysContainer!==void 0&&(le===!1||Ke&&ye(Ke))){var nt=N.keyCode===39?1:-1;N.ctrlKey?(N.stopPropagation(),be(nt),L(D(1),0)):L(void 0,nt)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:N.preventDefault();var Ye=N.keyCode===40?1:-1;t.daysContainer&&I.$i!==void 0||I===t.input||I===t.altInput?N.ctrlKey?(N.stopPropagation(),fe(t.currentYear-Ye),L(D(1),0)):tt||L(void 0,Ye*7):I===t.currentYearElement?fe(t.currentYear-Ye):t.config.enableTime&&(!tt&&t.hourElement&&t.hourElement.focus(),a(N),t._debouncedChange());break;case 9:if(tt){var xe=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Yt){return Yt}),wt=xe.indexOf(I);if(wt!==-1){var Sn=xe[wt+(N.shiftKey?-1:1)];N.preventDefault(),(Sn||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(I)&&N.shiftKey&&(N.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&I===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(),Vt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),Vt();break}(U||te(I))&&et("onKeyDown",N)}function Re(N,I){if(I===void 0&&(I="flatpickr-day"),!(t.selectedDates.length!==1||N&&(!N.classList.contains(I)||N.classList.contains("flatpickr-disabled")))){for(var U=N?N.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),le=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Ne=Math.min(U,t.selectedDates[0].getTime()),Be=Math.max(U,t.selectedDates[0].getTime()),tt=!1,Ke=0,nt=0,Ye=Ne;Ye<Be;Ye+=E4.DAY)ie(new Date(Ye),!0)||(tt=tt||Ye>Ne&&Ye<Be,Ye<le&&(!Ke||Ye>Ke)?Ke=Ye:Ye>le&&(!nt||Ye<nt)&&(nt=Ye));var xe=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+I));xe.forEach(function(wt){var Sn=wt.dateObj,Yt=Sn.getTime(),Zt=Ke>0&&Yt<Ke||nt>0&&Yt>nt;if(Zt){wt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(gi){wt.classList.remove(gi)});return}else if(tt&&!Zt)return;["startRange","inRange","endRange","notAllowed"].forEach(function(gi){wt.classList.remove(gi)}),N!==void 0&&(N.classList.add(U<=t.selectedDates[0].getTime()?"startRange":"endRange"),le<U&&Yt===le?wt.classList.add("startRange"):le>U&&Yt===le&&wt.classList.add("endRange"),Yt>=Ke&&(nt===0||Yt<=nt)&&D4(Yt,le,U)&&wt.classList.add("inRange"))})}}function ae(){t.isOpen&&!t.config.static&&!t.config.inline&&me()}function re(N,I){if(I===void 0&&(I=t._positionElement),t.isMobile===!0){if(N){N.preventDefault();var U=$n(N);U&&U.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),et("onOpen");return}else if(t._input.disabled||t.config.inline)return;var le=t.isOpen;t.isOpen=!0,le||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),et("onOpen"),me(I)),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 ve(N){return function(I){var U=t.config["_"+N+"Date"]=t.parseDate(I,t.config.dateFormat),le=t.config["_"+(N==="min"?"max":"min")+"Date"];U!==void 0&&(t[N==="min"?"minDateHasTime":"maxDateHasTime"]=U.getHours()>0||U.getMinutes()>0||U.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Ne){return ie(Ne)}),!t.selectedDates.length&&N==="min"&&d(U),Vt()),t.daysContainer&&(ue(),U!==void 0?t.currentYearElement[N]=U.getFullYear().toString():t.currentYearElement.removeAttribute(N),t.currentYearElement.disabled=!!le&&U!==void 0&&le.getFullYear()===U.getFullYear())}}function qe(){var N=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],I=on(on({},JSON.parse(JSON.stringify(n.dataset||{}))),e),U={};t.config.parseDate=I.parseDate,t.config.formatDate=I.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(xe){t.config._enable=Tt(xe)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(xe){t.config._disable=Tt(xe)}});var le=I.mode==="time";if(!I.dateFormat&&(I.enableTime||le)){var Ne=Bt.defaultConfig.dateFormat||Vs.dateFormat;U.dateFormat=I.noCalendar||le?"H:i"+(I.enableSeconds?":S":""):Ne+" H:i"+(I.enableSeconds?":S":"")}if(I.altInput&&(I.enableTime||le)&&!I.altFormat){var Be=Bt.defaultConfig.altFormat||Vs.altFormat;U.altFormat=I.noCalendar||le?"h:i"+(I.enableSeconds?":S K":" K"):Be+(" h:i"+(I.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:ve("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:ve("max")});var tt=function(xe){return function(wt){t.config[xe==="min"?"_minTime":"_maxTime"]=t.parseDate(wt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:tt("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:tt("max")}),I.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,U,I);for(var Ke=0;Ke<N.length;Ke++)t.config[N[Ke]]=t.config[N[Ke]]===!0||t.config[N[Ke]]==="true";Ma.filter(function(xe){return t.config[xe]!==void 0}).forEach(function(xe){t.config[xe]=Oa(t.config[xe]||[]).map(r)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var Ke=0;Ke<t.config.plugins.length;Ke++){var nt=t.config.plugins[Ke](t)||{};for(var Ye in nt)Ma.indexOf(Ye)>-1?t.config[Ye]=Oa(nt[Ye]).map(r).concat(t.config[Ye]):typeof I[Ye]=="undefined"&&(t.config[Ye]=nt[Ye])}I.altInputClass||(t.config.altInputClass=Ve().className+" "+t.config.altInputClass),et("onParseConfig")}function Ve(){return t.config.wrap?n.querySelector("[data-input]"):n}function Je(){typeof t.config.locale!="object"&&typeof Bt.l10ns[t.config.locale]=="undefined"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=on(on({},Bt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Bt.l10ns[t.config.locale]:void 0),us.D="("+t.l10n.weekdays.shorthand.join("|")+")",us.l="("+t.l10n.weekdays.longhand.join("|")+")",us.M="("+t.l10n.months.shorthand.join("|")+")",us.F="("+t.l10n.months.longhand.join("|")+")",us.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var N=on(on({},e),JSON.parse(JSON.stringify(n.dataset||{})));N.time_24hr===void 0&&Bt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=Rb(t),t.parseDate=_u({config:t.config,l10n:t.l10n})}function me(N){if(typeof t.config.position=="function")return void t.config.position(t,N);if(t.calendarContainer!==void 0){et("onPreCalendarPosition");var I=N||t._positionElement,U=Array.prototype.reduce.call(t.calendarContainer.children,function(xi,or){return xi+or.offsetHeight},0),le=t.calendarContainer.offsetWidth,Ne=t.config.position.split(" "),Be=Ne[0],tt=Ne.length>1?Ne[1]:null,Ke=I.getBoundingClientRect(),nt=window.innerHeight-Ke.bottom,Ye=Be==="above"||Be!=="below"&&nt<U&&Ke.top>U,xe=window.pageYOffset+Ke.top+(Ye?-U-2:I.offsetHeight+2);if(cn(t.calendarContainer,"arrowTop",!Ye),cn(t.calendarContainer,"arrowBottom",Ye),!t.config.inline){var wt=window.pageXOffset+Ke.left,Sn=!1,Yt=!1;tt==="center"?(wt-=(le-Ke.width)/2,Sn=!0):tt==="right"&&(wt-=le-Ke.width,Yt=!0),cn(t.calendarContainer,"arrowLeft",!Sn&&!Yt),cn(t.calendarContainer,"arrowCenter",Sn),cn(t.calendarContainer,"arrowRight",Yt);var Zt=window.document.body.offsetWidth-(window.pageXOffset+Ke.right),gi=wt+le>window.document.body.offsetWidth,Ei=Zt+le>window.document.body.offsetWidth;if(cn(t.calendarContainer,"rightMost",gi),!t.config.static)if(t.calendarContainer.style.top=xe+"px",!gi)t.calendarContainer.style.left=wt+"px",t.calendarContainer.style.right="auto";else if(!Ei)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Zt+"px";else{var Xt=Ae();if(Xt===void 0)return;var $s=window.document.body.offsetWidth,sr=Math.max(0,$s/2-le/2),Zi=".flatpickr-calendar.centerMost:before",lr=".flatpickr-calendar.centerMost:after",Cs=Xt.cssRules.length,rr="{left:"+Ke.left+"px;right:auto;}";cn(t.calendarContainer,"rightMost",!1),cn(t.calendarContainer,"centerMost",!0),Xt.insertRule(Zi+","+lr+rr,Cs),t.calendarContainer.style.left=sr+"px",t.calendarContainer.style.right="auto"}}}}function Ae(){for(var N=null,I=0;I<document.styleSheets.length;I++){var U=document.styleSheets[I];if(!!U.cssRules){try{U.cssRules}catch{continue}N=U;break}}return N!=null?N:X()}function X(){var N=document.createElement("style");return document.head.appendChild(N),N.sheet}function ue(){t.config.noCalendar||t.isMobile||(G(),Ze(),j())}function Ue(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function bt(N){N.preventDefault(),N.stopPropagation();var I=function(xe){return xe.classList&&xe.classList.contains("flatpickr-day")&&!xe.classList.contains("flatpickr-disabled")&&!xe.classList.contains("notAllowed")},U=Nb($n(N),I);if(U!==void 0){var le=U,Ne=t.latestSelectedDateObj=new Date(le.dateObj.getTime()),Be=(Ne.getMonth()<t.currentMonth||Ne.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=le,t.config.mode==="single")t.selectedDates=[Ne];else if(t.config.mode==="multiple"){var tt=de(Ne);tt?t.selectedDates.splice(parseInt(tt),1):t.selectedDates.push(Ne)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Ne,t.selectedDates.push(Ne),Cn(Ne,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(xe,wt){return xe.getTime()-wt.getTime()}));if(c(),Be){var Ke=t.currentYear!==Ne.getFullYear();t.currentYear=Ne.getFullYear(),t.currentMonth=Ne.getMonth(),Ke&&(et("onYearChange"),G()),et("onMonthChange")}if(Ze(),j(),Vt(),!Be&&t.config.mode!=="range"&&t.config.showMonths===1?E(le):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 nt=t.config.mode==="single"&&!t.config.enableTime,Ye=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(nt||Ye)&&Ue()}b()}}var it={locale:[Je,ne],showMonths:[q,o,K],minDate:[S],maxDate:[S],positionElement:[he],clickOpens:[function(){t.config.clickOpens===!0?(y(t._input,"focus",t.open),y(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function yt(N,I){if(N!==null&&typeof N=="object"){Object.assign(t.config,N);for(var U in N)it[U]!==void 0&&it[U].forEach(function(le){return le()})}else t.config[N]=I,it[N]!==void 0?it[N].forEach(function(le){return le()}):Ma.indexOf(N)>-1&&(t.config[N]=Oa(I));t.redraw(),Vt(!0)}function at(N,I){var U=[];if(N instanceof Array)U=N.map(function(le){return t.parseDate(le,I)});else if(N instanceof Date||typeof N=="number")U=[t.parseDate(N,I)];else if(typeof N=="string")switch(t.config.mode){case"single":case"time":U=[t.parseDate(N,I)];break;case"multiple":U=N.split(t.config.conjunction).map(function(le){return t.parseDate(le,I)});break;case"range":U=N.split(t.l10n.rangeSeparator).map(function(le){return t.parseDate(le,I)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(N)));t.selectedDates=t.config.allowInvalidPreload?U:U.filter(function(le){return le instanceof Date&&ie(le,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(le,Ne){return le.getTime()-Ne.getTime()})}function dt(N,I,U){if(I===void 0&&(I=!1),U===void 0&&(U=t.config.dateFormat),N!==0&&!N||N instanceof Array&&N.length===0)return t.clear(I);at(N,U),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),S(void 0,I),d(),t.selectedDates.length===0&&t.clear(!1),Vt(I),I&&et("onChange")}function Tt(N){return N.slice().map(function(I){return typeof I=="string"||typeof I=="number"||I instanceof Date?t.parseDate(I,void 0,!0):I&&typeof I=="object"&&I.from&&I.to?{from:t.parseDate(I.from,void 0),to:t.parseDate(I.to,void 0)}:I}).filter(function(I){return I})}function Pt(){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&&at(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()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>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 Jt(){if(t.input=Ve(),!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=kt(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"),he()}function he(){t._positionElement=t.config.positionElement||t._input}function we(){var N=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=kt("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{}y(t.mobileInput,"change",function(I){t.setDate($n(I).value,!1,t.mobileFormatStr),et("onChange"),et("onClose")})}function Ge(N){if(t.isOpen===!0)return t.close();t.open(N)}function et(N,I){if(t.config!==void 0){var U=t.config[N];if(U!==void 0&&U.length>0)for(var le=0;U[le]&&le<U.length;le++)U[le](t.selectedDates,t.input.value,t,I);N==="onChange"&&(t.input.dispatchEvent(Et("change")),t.input.dispatchEvent(Et("input")))}}function Et(N){var I=document.createEvent("Event");return I.initEvent(N,!0,!0),I}function de(N){for(var I=0;I<t.selectedDates.length;I++){var U=t.selectedDates[I];if(U instanceof Date&&Cn(U,N)===0)return""+I}return!1}function Se(N){return t.config.mode!=="range"||t.selectedDates.length<2?!1:Cn(N,t.selectedDates[0])>=0&&Cn(N,t.selectedDates[1])<=0}function Ze(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(N,I){var U=new Date(t.currentYear,t.currentMonth,1);U.setMonth(t.currentMonth+I),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[I].textContent=wo(U.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=U.getMonth().toString(),N.value=U.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Gt(N){var I=N||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(U){return t.formatDate(U,I)}).filter(function(U,le,Ne){return t.config.mode!=="range"||t.config.enableTime||Ne.indexOf(U)===le}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Vt(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=Gt(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Gt(t.config.altFormat)),N!==!1&&et("onValueUpdate")}function ii(N){var I=$n(N),U=t.prevMonthNav.contains(I),le=t.nextMonthNav.contains(I);U||le?be(U?-1:1):t.yearElements.indexOf(I)>=0?I.select():I.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):I.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function ot(N){N.preventDefault();var I=N.type==="keydown",U=$n(N),le=U;t.amPM!==void 0&&U===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Hn(t.amPM.textContent===t.l10n.amPM[0])]);var Ne=parseFloat(le.getAttribute("min")),Be=parseFloat(le.getAttribute("max")),tt=parseFloat(le.getAttribute("step")),Ke=parseInt(le.value,10),nt=N.delta||(I?N.which===38?1:-1:0),Ye=Ke+tt*nt;if(typeof le.value!="undefined"&&le.value.length===2){var xe=le===t.hourElement,wt=le===t.minuteElement;Ye<Ne?(Ye=Be+Ye+Hn(!xe)+(Hn(xe)&&Hn(!t.amPM)),wt&&C(void 0,-1,t.hourElement)):Ye>Be&&(Ye=le===t.hourElement?Ye-Be-Hn(!t.amPM):Ne,wt&&C(void 0,1,t.hourElement)),t.amPM&&xe&&(tt===1?Ye+Ke===23:Math.abs(Ye-Ke)>tt)&&(t.amPM.textContent=t.l10n.amPM[Hn(t.amPM.textContent===t.l10n.amPM[0])]),le.value=yn(Ye)}}return s(),t}function zs(n,e){for(var t=Array.prototype.slice.call(n).filter(function(r){return r instanceof HTMLElement}),i=[],s=0;s<t.length;s++){var l=t[s];try{if(l.getAttribute("data-fp-omit")!==null)continue;l._flatpickr!==void 0&&(l._flatpickr.destroy(),l._flatpickr=void 0),l._flatpickr=L4(l,e||{}),i.push(l._flatpickr)}catch(r){console.error(r)}}return i.length===1?i[0]:i}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return zs(this,n)},HTMLElement.prototype.flatpickr=function(n){return zs([this],n)});var Bt=function(n,e){return typeof n=="string"?zs(window.document.querySelectorAll(n),e):n instanceof Node?zs([n],e):zs(n,e)};Bt.defaultConfig={};Bt.l10ns={en:on({},Bl),default:on({},Bl)};Bt.localize=function(n){Bt.l10ns.default=on(on({},Bt.l10ns.default),n)};Bt.setDefaults=function(n){Bt.defaultConfig=on(on({},Bt.defaultConfig),n)};Bt.parseDate=_u({});Bt.formatDate=Rb({});Bt.compareDates=Cn;typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(n){return zs(this,n)});Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))};typeof window!="undefined"&&(window.flatpickr=Bt);function F4(n){let e,t=[n[1]],i={};for(let s=0;s<t.length;s+=1)i=ct(i,t[s]);return{c(){e=_("input"),ci(e,i)},m(s,l){w(s,e,l),e.autofocus&&e.focus(),n[11](e)},p(s,l){ci(e,i=bn(t,[l&2&&s[1]]))},d(s){s&&k(e),n[11](null)}}}function I4(n){let e;const t=n[10].default,i=Dn(t,n,n[9],null),s=i||F4(n);return{c(){s&&s.c()},m(l,r){s&&s.m(l,r),e=!0},p(l,[r]){i?i.p&&(!e||r&512)&&En(i,t,l,l[9],e?An(t,l[9],r,null):Pn(l[9]),null):s&&s.p&&(!e||r&3)&&s.p(l,e?r:-1)},i(l){e||(A(s,l),e=!0)},o(l){F(s,l),e=!1},d(l){s&&s.d(l)}}}function N4(n){return n.charAt(2).toLowerCase()+n.substring(3)}function R4(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=Ut(e,i),{$$slots:l={},$$scope:r}=e;const o=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a="",formattedValue:u="",element:f=null,dateFormat:c=null}=e,{options:d={}}=e,h=!1,{input:g=void 0,flatpickr:y=void 0}=e;pi(()=>{const C=f||g,M=v(d);return M.onReady.push(()=>{t(8,h=!0)}),t(3,y=Bt(C,Object.assign(M,f?{wrap:!0}:{}))),()=>{y.destroy()}});const b=_n();function v(C={}){C=Object.assign({},C);for(const M of o){const T=(E,D,P)=>{b(N4(M),[E,D,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(S)&&C.onChange.push(S),C}function S(C,M,T){var D,P;const E=(P=(D=T==null?void 0:T.config)==null?void 0:D.mode)!=null?P:"single";t(2,a=E==="single"?C[0]:C),t(4,u=M)}function $(C){pe[C?"unshift":"push"](()=>{g=C,t(0,g)})}return n.$$set=C=>{e=ct(ct({},e),di(C)),t(1,s=Ut(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,g=C.input),"flatpickr"in C&&t(3,y=C.flatpickr),"$$scope"in C&&t(9,r=C.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&y&&h&&y.setDate(a,!1,c),n.$$.dirty&392&&y&&h)for(const[C,M]of Object.entries(v(d)))y.set(C,M)},[g,s,a,y,u,f,c,d,h,r,l,$]}class mf extends Pe{constructor(e){super(),Ee(this,e,R4,I4,De,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function j4(n){let e,t,i,s,l,r,o;function a(f){n[2](f)}let u={id:n[4],options:W.defaultFlatpickrOptions(),value:n[0].min};return n[0].min!==void 0&&(u.formattedValue=n[0].min),l=new mf({props:u}),pe.push(()=>Ie(l,"formattedValue",a)),{c(){e=_("label"),t=H("Min date (UTC)"),s=O(),B(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||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),!r&&c&1&&(r=!0,d.formattedValue=f[0].min,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function H4(n){let e,t,i,s,l,r,o;function a(f){n[3](f)}let u={id:n[4],options:W.defaultFlatpickrOptions(),value:n[0].max};return n[0].max!==void 0&&(u.formattedValue=n[0].max),l=new mf({props:u}),pe.push(()=>Ie(l,"formattedValue",a)),{c(){e=_("label"),t=H("Max date (UTC)"),s=O(),B(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||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),!r&&c&1&&(r=!0,d.formattedValue=f[0].max,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function q4(n){let e,t,i,s,l,r,o;return i=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[j4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[H4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!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}),r.$set(c)},i(a){o||(A(i.$$.fragment,a),A(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function V4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(o){n.$$.not_equal(s.min,o)&&(s.min=o,t(0,s))}function r(o){n.$$.not_equal(s.max,o)&&(s.max=o,t(0,s))}return n.$$set=o=>{"key"in o&&t(1,i=o.key),"options"in o&&t(0,s=o.options)},[s,i,l,r]}class z4 extends Pe{constructor(e){super(),Ee(this,e,V4,q4,De,{key:1,options:0})}}function B4(n){let e,t,i,s,l,r,o,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 Ss({props:c}),pe.push(()=>Ie(l,"value",f)),{c(){e=_("label"),t=H("Choices"),s=O(),B(l.$$.fragment),o=O(),a=_("div"),a.textContent="Use comma as separator.",p(e,"for",i=n[4]),p(a,"class","help-block")},m(d,h){w(d,e,h),m(e,t),w(d,s,h),V(l,d,h),w(d,o,h),w(d,a,h),u=!0},p(d,h){(!u||h&16&&i!==(i=d[4]))&&p(e,"for",i);const g={};h&16&&(g.id=d[4]),!r&&h&1&&(r=!0,g.value=d[0].values,je(()=>r=!1)),l.$set(g)},i(d){u||(A(l.$$.fragment,d),u=!0)},o(d){F(l.$$.fragment,d),u=!1},d(d){d&&k(e),d&&k(s),z(l,d),d&&k(o),d&&k(a)}}}function U4(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Max select"),s=O(),l=_("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",r=n[4]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].maxSelect),o||(a=Q(l,"input",n[3]),o=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&r!==(r=u[4])&&p(l,"id",r),f&1&&Mt(l.value)!==u[0].maxSelect&&$e(l,u[0].maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function W4(n){let e,t,i,s,l,r,o;return i=new Fe({props:{class:"form-field required",name:"schema."+n[1]+".options.values",$$slots:{default:[B4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[U4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!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}),r.$set(c)},i(a){o||(A(i.$$.fragment,a),A(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function Y4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(o){n.$$.not_equal(s.values,o)&&(s.values=o,t(0,s))}function r(){s.maxSelect=Mt(this.value),t(0,s)}return n.$$set=o=>{"key"in o&&t(1,i=o.key),"options"in o&&t(0,s=o.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(s)&&t(0,s={maxSelect:1,values:[]})},[s,i,l,r]}class K4 extends Pe{constructor(e){super(),Ee(this,e,Y4,W4,De,{key:1,options:0})}}function J4(n,e,t){return["",{}]}class G4 extends Pe{constructor(e){super(),Ee(this,e,J4,null,De,{key:0,options:1})}get key(){return this.$$.ctx[0]}get options(){return this.$$.ctx[1]}}function Z4(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Max file size (bytes)"),s=O(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",r=n[9]),p(l,"step","1"),p(l,"min","0")},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].maxSize),o||(a=Q(l,"input",n[2]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&1&&Mt(l.value)!==u[0].maxSize&&$e(l,u[0].maxSize)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function x4(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Max files"),s=O(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",r=n[9]),p(l,"step","1"),p(l,"min",""),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].maxSelect),o||(a=Q(l,"input",n[3]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&1&&Mt(l.value)!==u[0].maxSelect&&$e(l,u[0].maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function X4(n){let e,t,i,s,l,r,o;return{c(){e=_("div"),e.innerHTML='<span class="txt">Images (jpg, png, svg, gif)</span>',t=O(),i=_("div"),i.innerHTML='<span class="txt">Documents (pdf, doc/docx, xls/xlsx)</span>',s=O(),l=_("div"),l.innerHTML='<span class="txt">Archives (zip, 7zip, rar)</span>',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")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),r||(o=[Q(e,"click",n[5]),Q(i,"click",n[6]),Q(l,"click",n[7])],r=!0)},p:oe,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),r=!1,lt(o)}}}function Q4(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S;function $(M){n[4](M)}let C={id:n[9],placeholder:"eg. image/png, application/pdf..."};return n[0].mimeTypes!==void 0&&(C.value=n[0].mimeTypes),o=new Ss({props:C}),pe.push(()=>Ie(o,"value",$)),y=new ks({props:{class:"dropdown dropdown-sm dropdown-nowrap",$$slots:{default:[X4]},$$scope:{ctx:n}}}),{c(){e=_("label"),t=_("span"),t.textContent="Mime types",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),c=H(`Use comma as separator.
+                `),d=_("span"),h=_("span"),h.textContent="Choose presets",g=O(),B(y.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[9]),p(h,"class","txt link-primary"),p(d,"class","inline-flex"),p(f,"class","help-block")},m(M,T){w(M,e,T),m(e,t),m(e,i),m(e,s),w(M,r,T),V(o,M,T),w(M,u,T),w(M,f,T),m(f,c),m(f,d),m(d,h),m(d,g),V(y,d,null),b=!0,v||(S=Xe(St.call(null,s,{text:`Allow uploading files ONLY with the listed mime types. 
+ Leave empty for no restriction.`,position:"top"})),v=!0)},p(M,T){(!b||T&512&&l!==(l=M[9]))&&p(e,"for",l);const E={};T&512&&(E.id=M[9]),!a&&T&1&&(a=!0,E.value=M[0].mimeTypes,je(()=>a=!1)),o.$set(E);const D={};T&1025&&(D.$$scope={dirty:T,ctx:M}),y.$set(D)},i(M){b||(A(o.$$.fragment,M),A(y.$$.fragment,M),b=!0)},o(M){F(o.$$.fragment,M),F(y.$$.fragment,M),b=!1},d(M){M&&k(e),M&&k(r),z(o,M),M&&k(u),M&&k(f),z(y),v=!1,S()}}}function eM(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(b){n[8](b)}let y={id:n[9],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(y.value=n[0].thumbs),o=new Ss({props:y}),pe.push(()=>Ie(o,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Thumb sizes",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[9]),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),w(b,r,v),V(o,b,v),w(b,u,v),w(b,f,v),c=!0,d||(h=Xe(St.call(null,s,{text:"List of thumb sizes for image files. The thumbs will be generated lazily on first access.",position:"top"})),d=!0)},p(b,v){(!c||v&512&&l!==(l=b[9]))&&p(e,"for",l);const S={};v&512&&(S.id=b[9]),!a&&v&1&&(a=!0,S.value=b[0].thumbs,je(()=>a=!1)),o.$set(S)},i(b){c||(A(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function tM(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;return i=new Fe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[Z4,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[x4,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[Q4,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),d=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[eM,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),f=O(),c=_("div"),B(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(g,y){w(g,e,y),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),h=!0},p(g,[y]){const b={};y&2&&(b.name="schema."+g[1]+".options.maxSize"),y&1537&&(b.$$scope={dirty:y,ctx:g}),i.$set(b);const v={};y&2&&(v.name="schema."+g[1]+".options.maxSelect"),y&1537&&(v.$$scope={dirty:y,ctx:g}),r.$set(v);const S={};y&2&&(S.name="schema."+g[1]+".options.mimeTypes"),y&1537&&(S.$$scope={dirty:y,ctx:g}),u.$set(S);const $={};y&2&&($.name="schema."+g[1]+".options.thumbs"),y&1537&&($.$$scope={dirty:y,ctx:g}),d.$set($)},i(g){h||(A(i.$$.fragment,g),A(r.$$.fragment,g),A(u.$$.fragment,g),A(d.$$.fragment,g),h=!0)},o(g){F(i.$$.fragment,g),F(r.$$.fragment,g),F(u.$$.fragment,g),F(d.$$.fragment,g),h=!1},d(g){g&&k(e),z(i),z(r),z(u),z(d)}}}function nM(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=Mt(this.value),t(0,s)}function r(){s.maxSelect=Mt(this.value),t(0,s)}function o(d){n.$$.not_equal(s.mimeTypes,d)&&(s.mimeTypes=d,t(0,s))}const a=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},u=()=>{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)},f=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function c(d){n.$$.not_equal(s.thumbs,d)&&(s.thumbs=d,t(0,s))}return n.$$set=d=>{"key"in d&&t(1,i=d.key),"options"in d&&t(0,s=d.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,r,o,a,u,f,c]}class iM extends Pe{constructor(e){super(),Ee(this,e,nM,tM,De,{key:1,options:0})}}function sM(n){let e,t,i,s,l,r,o;function a(f){n[5](f)}let u={searchable:n[3].length>5,selectPlaceholder:n[2]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[3]};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new ws({props:u}),pe.push(()=>Ie(l,"keyOfSelected",a)),{c(){e=_("label"),t=H("Collection"),s=O(),B(l.$$.fragment),p(e,"for",i=n[9])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&512&&i!==(i=f[9]))&&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]),!r&&c&1&&(r=!0,d.keyOfSelected=f[0].collectionId,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function lM(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Max select"),s=O(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",r=n[9]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].maxSelect),o||(a=Q(l,"input",n[6]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&1&&Mt(l.value)!==u[0].maxSelect&&$e(l,u[0].maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function rM(n){let e,t,i,s,l,r,o;function a(f){n[7](f)}let u={id:n[9],items:n[4]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new ws({props:u}),pe.push(()=>Ie(l,"keyOfSelected",a)),{c(){e=_("label"),t=H("Delete record on relation delete"),s=O(),B(l.$$.fragment),p(e,"for",i=n[9])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&512&&i!==(i=f[9]))&&p(e,"for",i);const d={};c&512&&(d.id=f[9]),!r&&c&1&&(r=!0,d.keyOfSelected=f[0].cascadeDelete,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function oM(n){let e,t,i,s,l,r,o,a,u,f;return i=new Fe({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[sM,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[lM,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[rM,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(c,d){w(c,e,d),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),f=!0},p(c,[d]){const h={};d&2&&(h.name="schema."+c[1]+".options.collectionId"),d&1549&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const g={};d&2&&(g.name="schema."+c[1]+".options.maxSelect"),d&1537&&(g.$$scope={dirty:d,ctx:c}),r.$set(g);const y={};d&2&&(y.name="schema."+c[1]+".options.cascadeDelete"),d&1537&&(y.$$scope={dirty:d,ctx:c}),u.$set(y)},i(c){f||(A(i.$$.fragment,c),A(r.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){F(i.$$.fragment,c),F(r.$$.fragment,c),F(u.$$.fragment,c),f=!1},d(c){c&&k(e),z(i),z(r),z(u)}}}function aM(n,e,t){let{key:i=""}=e,{options:s={}}=e;const l=[{label:"False",value:!1},{label:"True",value:!0}];let r=!1,o=[];a();function a(){t(2,r=!0),ke.Collections.getFullList(200,{sort:"-created"}).then(d=>{t(3,o=d)}).catch(d=>{ke.errorResponseHandler(d)}).finally(()=>{t(2,r=!1)})}function u(d){n.$$.not_equal(s.collectionId,d)&&(s.collectionId=d,t(0,s))}function f(){s.maxSelect=Mt(this.value),t(0,s)}function c(d){n.$$.not_equal(s.cascadeDelete,d)&&(s.cascadeDelete=d,t(0,s))}return n.$$set=d=>{"key"in d&&t(1,i=d.key),"options"in d&&t(0,s=d.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(s)&&t(0,s={maxSelect:1,collectionId:null,cascadeDelete:!1})},[s,i,r,o,l,u,f,c]}class uM extends Pe{constructor(e){super(),Ee(this,e,aM,oM,De,{key:1,options:0})}}function fM(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Max select"),s=O(),l=_("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",r=n[5]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].maxSelect),o||(a=Q(l,"input",n[3]),o=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&r!==(r=u[5])&&p(l,"id",r),f&1&&Mt(l.value)!==u[0].maxSelect&&$e(l,u[0].maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function cM(n){let e,t,i,s,l,r,o;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 ws({props:u}),pe.push(()=>Ie(l,"keyOfSelected",a)),{c(){e=_("label"),t=H("Delete record on user delete"),s=O(),B(l.$$.fragment),p(e,"for",i=n[5])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&32&&i!==(i=f[5]))&&p(e,"for",i);const d={};c&32&&(d.id=f[5]),!r&&c&1&&(r=!0,d.keyOfSelected=f[0].cascadeDelete,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function dM(n){let e,t,i,s,l,r,o;return i=new Fe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[fM,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[cM,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!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}),r.$set(c)},i(a){o||(A(i.$$.fragment,a),A(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function pM(n,e,t){const i=[{label:"False",value:!1},{label:"True",value:!0}];let{key:s=""}=e,{options:l={}}=e;function r(){l.maxSelect=Mt(this.value),t(0,l)}function o(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&&W.isEmpty(l)&&t(0,l={maxSelect:1,cascadeDelete:!1})},[l,s,i,r,o]}class hM extends Pe{constructor(e){super(),Ee(this,e,pM,dM,De,{key:1,options:0})}}function mM(n){let e,t,i,s,l,r,o;function a(f){n[15](f)}let u={id:n[37],disabled:n[0].id};return n[0].type!==void 0&&(u.value=n[0].type),l=new l4({props:u}),pe.push(()=>Ie(l,"value",a)),{c(){e=_("label"),t=H("Type"),s=O(),B(l.$$.fragment),p(e,"for",i=n[37])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c[1]&64&&i!==(i=f[37]))&&p(e,"for",i);const d={};c[1]&64&&(d.id=f[37]),c[0]&1&&(d.disabled=f[0].id),!r&&c[0]&1&&(r=!0,d.value=f[0].type,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function gM(n){let e,t,i,s,l,r,o,a,u,f,c;return{c(){e=_("label"),t=H("Name"),s=O(),l=_("input"),p(e,"for",i=n[37]),p(l,"type","text"),p(l,"id",r=n[37]),l.required=!0,l.disabled=o=n[0].id&&n[0].system,p(l,"spellcheck","false"),l.autofocus=a=!n[0].id,l.value=u=n[0].name},m(d,h){w(d,e,h),m(e,t),w(d,s,h),w(d,l,h),n[0].id||l.focus(),f||(c=Q(l,"input",n[16]),f=!0)},p(d,h){h[1]&64&&i!==(i=d[37])&&p(e,"for",i),h[1]&64&&r!==(r=d[37])&&p(l,"id",r),h[0]&1&&o!==(o=d[0].id&&d[0].system)&&(l.disabled=o),h[0]&1&&a!==(a=!d[0].id)&&(l.autofocus=a),h[0]&1&&u!==(u=d[0].name)&&l.value!==u&&(l.value=u)},d(d){d&&k(e),d&&k(s),d&&k(l),f=!1,c()}}}function _M(n){let e,t,i;function s(r){n[27](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new hM({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function bM(n){let e,t,i;function s(r){n[26](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new uM({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function yM(n){let e,t,i;function s(r){n[25](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new iM({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function vM(n){let e,t,i;function s(r){n[24](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new G4({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function kM(n){let e,t,i;function s(r){n[23](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new K4({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function wM(n){let e,t,i;function s(r){n[22](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new z4({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function SM(n){let e,t,i;function s(r){n[21](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new O4({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function $M(n){let e,t,i;function s(r){n[20](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new Ib({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function CM(n){let e,t,i;function s(r){n[19](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new b4({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function MM(n){let e,t,i;function s(r){n[18](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new g4({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function OM(n){let e,t,i;function s(r){n[17](r)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new c4({props:l}),pe.push(()=>Ie(e,"options",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){const a={};o[0]&2&&(a.key=r[1]),!t&&o[0]&1&&(t=!0,a.options=r[0].options,je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function TM(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Required"),p(e,"type","checkbox"),p(e,"id",t=n[37]),p(s,"for",r=n[37])},m(u,f){w(u,e,f),e.checked=n[0].required,w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[28]),o=!0)},p(u,f){f[1]&64&&t!==(t=u[37])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].required),f[1]&64&&r!==(r=u[37])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Ip(n){let e,t;return e=new Fe({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[DM,({uniqueId:i})=>({37:i}),({uniqueId:i})=>[0,i?64:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&192&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function DM(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[37]),p(s,"for",r=n[37])},m(u,f){w(u,e,f),e.checked=n[0].unique,w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[29]),o=!0)},p(u,f){f[1]&64&&t!==(t=u[37])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&64&&r!==(r=u[37])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function AM(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M;s=new Fe({props:{class:"form-field required "+(n[0].id?"disabled":""),name:"schema."+n[1]+".type",$$slots:{default:[mM,({uniqueId:L})=>({37:L}),({uniqueId:L})=>[0,L?64:0]]},$$scope:{ctx:n}}}),o=new Fe({props:{class:"form-field required "+(n[0].id&&n[0].system?"disabled":""),name:"schema."+n[1]+".name",$$slots:{default:[gM,({uniqueId:L})=>({37:L}),({uniqueId:L})=>[0,L?64:0]]},$$scope:{ctx:n}}});const T=[OM,MM,CM,$M,SM,wM,kM,vM,yM,bM,_M],E=[];function D(L,R){return L[0].type==="text"?0:L[0].type==="number"?1:L[0].type==="bool"?2:L[0].type==="email"?3:L[0].type==="url"?4:L[0].type==="date"?5:L[0].type==="select"?6:L[0].type==="json"?7:L[0].type==="file"?8:L[0].type==="relation"?9:L[0].type==="user"?10:-1}~(f=D(n))&&(c=E[f]=T[f](n)),g=new Fe({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[TM,({uniqueId:L})=>({37:L}),({uniqueId:L})=>[0,L?64:0]]},$$scope:{ctx:n}}});let P=n[0].type!=="file"&&Ip(n);return{c(){e=_("form"),t=_("div"),i=_("div"),B(s.$$.fragment),l=O(),r=_("div"),B(o.$$.fragment),a=O(),u=_("div"),c&&c.c(),d=O(),h=_("div"),B(g.$$.fragment),y=O(),b=_("div"),P&&P.c(),v=O(),S=_("input"),p(i,"class","col-sm-6"),p(r,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(h,"class","col-4"),p(b,"class","col-4"),p(t,"class","grid"),p(S,"type","submit"),p(S,"class","hidden"),p(S,"tabindex","-1"),p(e,"class","field-form")},m(L,R){w(L,e,R),m(e,t),m(t,i),V(s,i,null),m(t,l),m(t,r),V(o,r,null),m(t,a),m(t,u),~f&&E[f].m(u,null),m(t,d),m(t,h),V(g,h,null),m(t,y),m(t,b),P&&P.m(b,null),m(e,v),m(e,S),$=!0,C||(M=Q(e,"submit",Wt(n[30])),C=!0)},p(L,R){const j={};R[0]&1&&(j.class="form-field required "+(L[0].id?"disabled":"")),R[0]&2&&(j.name="schema."+L[1]+".type"),R[0]&1|R[1]&192&&(j.$$scope={dirty:R,ctx:L}),s.$set(j);const G={};R[0]&1&&(G.class="form-field required "+(L[0].id&&L[0].system?"disabled":"")),R[0]&2&&(G.name="schema."+L[1]+".name"),R[0]&1|R[1]&192&&(G.$$scope={dirty:R,ctx:L}),o.$set(G);let Y=f;f=D(L),f===Y?~f&&E[f].p(L,R):(c&&(Me(),F(E[Y],1,1,()=>{E[Y]=null}),Oe()),~f?(c=E[f],c?c.p(L,R):(c=E[f]=T[f](L),c.c()),A(c,1),c.m(u,null)):c=null);const q={};R[0]&1|R[1]&192&&(q.$$scope={dirty:R,ctx:L}),g.$set(q),L[0].type!=="file"?P?(P.p(L,R),R[0]&1&&A(P,1)):(P=Ip(L),P.c(),A(P,1),P.m(b,null)):P&&(Me(),F(P,1,1,()=>{P=null}),Oe())},i(L){$||(A(s.$$.fragment,L),A(o.$$.fragment,L),A(c),A(g.$$.fragment,L),A(P),$=!0)},o(L){F(s.$$.fragment,L),F(o.$$.fragment,L),F(c),F(g.$$.fragment,L),F(P),$=!1},d(L){L&&k(e),z(s),z(o),~f&&E[f].d(),z(g),P&&P.d(),C=!1,M()}}}function Np(n){let e,t,i,s,l=n[0].system&&Rp(),r=!n[0].id&&jp(n),o=n[0].required&&Hp(),a=n[0].unique&&qp();return{c(){e=_("div"),l&&l.c(),t=O(),r&&r.c(),i=O(),o&&o.c(),s=O(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){w(u,e,f),l&&l.m(e,null),m(e,t),r&&r.m(e,null),m(e,i),o&&o.m(e,null),m(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Rp(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?r&&(r.d(1),r=null):r?r.p(u,f):(r=jp(u),r.c(),r.m(e,i)),u[0].required?o||(o=Hp(),o.c(),o.m(e,s)):o&&(o.d(1),o=null),u[0].unique?a||(a=qp(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),l&&l.d(),r&&r.d(),o&&o.d(),a&&a.d()}}}function Rp(n){let e;return{c(){e=_("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function jp(n){let e;return{c(){e=_("span"),e.textContent="New",p(e,"class","label"),ee(e,"label-warning",n[7]&&!n[0].toDelete)},m(t,i){w(t,e,i)},p(t,i){i[0]&129&&ee(e,"label-warning",t[7]&&!t[0].toDelete)},d(t){t&&k(e)}}}function Hp(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function qp(n){let e;return{c(){e=_("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Vp(n){let e,t,i,s,l,r;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=St.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){s||(Ot(()=>{i||(i=ft(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){i||(i=ft(e,Wn,{duration:150,start:.7},!1)),i.run(0),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function zp(n){let e,t,i,s,l,r,o=n[7]&&Bp(n);return{c(){e=_("div"),t=_("button"),t.innerHTML='<span class="txt">Remove</span>',i=O(),o&&o.c(),p(t,"type","button"),p(t,"class","btn btn-sm fade p-l-0 p-r-0"),p(e,"class","inline-flex flex-gap-sm flex-nowrap")},m(a,u){w(a,e,u),m(e,t),m(e,i),o&&o.m(e,null),l||(r=Q(t,"click",Un(n[8])),l=!0)},p(a,u){a[7]?o?o.p(a,u):(o=Bp(a),o.c(),o.m(e,null)):o&&(o.d(1),o=null)},i(a){s||Ot(()=>{s=wu(e,ni,{duration:200,x:20,opacity:0}),s.start()})},o:oe,d(a){a&&k(e),o&&o.d(),l=!1,r()}}}function Bp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Done</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){w(s,e,l),t||(i=Q(e,"click",Un(n[3])),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function Up(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Restore</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){w(s,e,l),t||(i=Q(e,"click",Un(n[14])),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function EM(n){let e,t,i,s,l,r,o=(n[0].name||"-")+"",a,u,f,c,d,h,g,y,b,v,S=!n[0].toDelete&&Np(n),$=n[6]&&Vp(),C=n[36]&&!n[0].toDelete&&zp(n),M=n[0].toDelete&&Up(n);return{c(){e=_("div"),t=_("span"),i=_("i"),l=O(),r=_("strong"),a=H(o),f=O(),S&&S.c(),c=O(),d=_("div"),h=O(),$&&$.c(),g=O(),C&&C.c(),y=O(),M&&M.c(),b=st(),p(i,"class",s=yf(W.getFieldTypeIcon(n[0].type))+" svelte-162uq6"),p(t,"class","icon field-type"),p(r,"class","title field-name svelte-162uq6"),p(r,"title",u=n[0].name),ee(r,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(T,E){w(T,e,E),m(e,t),m(t,i),m(e,l),m(e,r),m(r,a),w(T,f,E),S&&S.m(T,E),w(T,c,E),w(T,d,E),w(T,h,E),$&&$.m(T,E),w(T,g,E),C&&C.m(T,E),w(T,y,E),M&&M.m(T,E),w(T,b,E),v=!0},p(T,E){(!v||E[0]&1&&s!==(s=yf(W.getFieldTypeIcon(T[0].type))+" svelte-162uq6"))&&p(i,"class",s),(!v||E[0]&1)&&o!==(o=(T[0].name||"-")+"")&&ge(a,o),(!v||E[0]&1&&u!==(u=T[0].name))&&p(r,"title",u),E[0]&1&&ee(r,"txt-strikethrough",T[0].toDelete),T[0].toDelete?S&&(S.d(1),S=null):S?S.p(T,E):(S=Np(T),S.c(),S.m(c.parentNode,c)),T[6]?$?E[0]&64&&A($,1):($=Vp(),$.c(),A($,1),$.m(g.parentNode,g)):$&&(Me(),F($,1,1,()=>{$=null}),Oe()),T[36]&&!T[0].toDelete?C?(C.p(T,E),E[0]&1|E[1]&32&&A(C,1)):(C=zp(T),C.c(),A(C,1),C.m(y.parentNode,y)):C&&(C.d(1),C=null),T[0].toDelete?M?M.p(T,E):(M=Up(T),M.c(),M.m(b.parentNode,b)):M&&(M.d(1),M=null)},i(T){v||(A($),A(C),v=!0)},o(T){F($),v=!1},d(T){T&&k(e),T&&k(f),S&&S.d(T),T&&k(c),T&&k(d),T&&k(h),$&&$.d(T),T&&k(g),C&&C.d(T),T&&k(y),M&&M.d(T),T&&k(b)}}}function PM(n){let e,t,i={single:!0,interactive:n[7],class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion",$$slots:{header:[EM,({active:s})=>({36:s}),({active:s})=>[0,s?32:0]],default:[AM]},$$scope:{ctx:n}};return e=new hf({props:i}),n[31](e),e.$on("expand",n[32]),e.$on("collapse",n[33]),e.$on("toggle",n[34]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&128&&(r.interactive=s[7]),l[0]&5&&(r.class=s[2]||s[0].toDelete||s[0].system?"field-accordion disabled":"field-accordion"),l[0]&227|l[1]&160&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[31](null),z(e,s)}}}function LM(n,e,t){let i,s,l,r;hn(n,ys,x=>t(13,r=x));const o=_n();let{key:a="0"}=e,{field:u=new wn}=e,{disabled:f=!1}=e,{excludeNames:c=[]}=e,d,h=u.type;function g(){d==null||d.expand()}function y(){d==null||d.collapse()}function b(){u.id?t(0,u.toDelete=!0,u):(y(),o("remove"))}function v(x){x=W.slugify(x);let Te="";for(;c.includes(x+Te);)++Te;return x+Te}pi(()=>{u.id||g()});const S=()=>{t(0,u.toDelete=!1,u)};function $(x){n.$$.not_equal(u.type,x)&&(u.type=x,t(0,u),t(12,h),t(10,c),t(4,d))}const C=x=>{t(0,u.name=v(x.target.value),u),x.target.value=u.name};function M(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function T(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function E(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function D(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function P(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function L(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function R(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function j(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function G(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function Y(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function q(x){n.$$.not_equal(u.options,x)&&(u.options=x,t(0,u),t(12,h),t(10,c),t(4,d))}function Z(){u.required=this.checked,t(0,u),t(12,h),t(10,c),t(4,d)}function J(){u.unique=this.checked,t(0,u),t(12,h),t(10,c),t(4,d)}const K=()=>{i&&y()};function ne(x){pe[x?"unshift":"push"](()=>{d=x,t(4,d)})}function ce(x){ut.call(this,n,x)}function be(x){ut.call(this,n,x)}function se(x){ut.call(this,n,x)}return n.$$set=x=>{"key"in x&&t(1,a=x.key),"field"in x&&t(0,u=x.field),"disabled"in x&&t(2,f=x.disabled),"excludeNames"in x&&t(10,c=x.excludeNames)},n.$$.update=()=>{if(n.$$.dirty[0]&4097&&h!=u.type&&(t(12,h=u.type),t(0,u.options={},u),t(0,u.unique=!1,u)),n.$$.dirty[0]&1025&&c.length){const x=v(u.name);u.name!==x&&t(0,u.name=x,u)}n.$$.dirty[0]&17&&u.toDelete&&(d&&y(),!u.name&&u.originalName&&t(0,u.name=u.originalName,u)),n.$$.dirty[0]&1&&!u.originalName&&u.name&&t(0,u.originalName=u.name,u),n.$$.dirty[0]&1&&typeof u.toDelete=="undefined"&&t(0,u.toDelete=!1,u),n.$$.dirty[0]&1&&t(5,i=!W.isEmpty(u.name)&&u.type),n.$$.dirty[0]&48&&(i||d&&g()),n.$$.dirty[0]&37&&t(7,s=!f&&!u.system&&!u.toDelete&&i),n.$$.dirty[0]&8194&&t(6,l=!W.isEmpty(W.getNestedVal(r,`schema.${a}`)))},[u,a,f,y,d,i,l,s,b,v,c,g,h,r,S,$,C,M,T,E,D,P,L,R,j,G,Y,q,Z,J,K,ne,ce,be,se]}class FM extends Pe{constructor(e){super(),Ee(this,e,LM,PM,De,{key:1,field:0,disabled:2,excludeNames:10,expand:11,collapse:3},null,[-1,-1])}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[3]}}function Wp(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Yp(n,e){let t,i,s,l;function r(u){e[5](u,e[9],e[10],e[11])}function o(){return e[6](e[11])}let a={key:e[11],excludeNames:e[1].concat(e[4](e[9]))};return e[9]!==void 0&&(a.field=e[9]),i=new FM({props:a}),pe.push(()=>Ie(i,"field",r)),i.$on("remove",o),{key:n,first:null,c(){t=st(),B(i.$$.fragment),this.first=t},m(u,f){w(u,t,f),V(i,u,f),l=!0},p(u,f){e=u;const c={};f&1&&(c.key=e[11]),f&1&&(c.excludeNames=e[1].concat(e[4](e[9]))),!s&&f&1&&(s=!0,c.field=e[9],je(()=>s=!1)),i.$set(c)},i(u){l||(A(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&k(t),z(i,u)}}}function IM(n){let e,t=[],i=new Map,s,l,r,o,a,u,f,c,d,h,g,y=n[0].schema;const b=v=>v[11];for(let v=0;v<y.length;v+=1){let S=Wp(n,y,v),$=b(S);i.set($,t[v]=Yp($,S))}return{c(){var v;e=_("div");for(let S=0;S<t.length;S+=1)t[S].c();s=O(),l=_("div"),r=O(),o=_("button"),a=_("i"),u=O(),f=_("span"),f.textContent="New field",p(e,"class","accordions"),p(l,"class","clearfix m-t-xs"),p(a,"class","ri-add-line"),p(f,"class","txt"),p(o,"type","button"),p(o,"class",c="btn btn-block "+((v=n[0].schema)!=null&&v.length?"btn-secondary":"btn-success"))},m(v,S){w(v,e,S);for(let $=0;$<t.length;$+=1)t[$].m(e,null);w(v,s,S),w(v,l,S),w(v,r,S),w(v,o,S),m(o,a),m(o,u),m(o,f),d=!0,h||(g=Q(o,"click",n[3]),h=!0)},p(v,[S]){var $;S&23&&(y=v[0].schema,Me(),t=rt(t,S,b,1,v,y,i,e,Ft,Yp,null,Wp),Oe()),(!d||S&1&&c!==(c="btn btn-block "+(($=v[0].schema)!=null&&$.length?"btn-secondary":"btn-success")))&&p(o,"class",c)},i(v){if(!d){for(let S=0;S<y.length;S+=1)A(t[S]);d=!0}},o(v){for(let S=0;S<t.length;S+=1)F(t[S]);d=!1},d(v){v&&k(e);for(let S=0;S<t.length;S+=1)t[S].d();v&&k(s),v&&k(l),v&&k(r),v&&k(o),h=!1,g()}}}function NM(n,e,t){const i=["id","created","updated"];let{collection:s={}}=e;function l(d){s.schema[d]&&(s.schema.splice(d,1),t(0,s))}function r(){const d=new wn({name:o()});s.schema.push(d),t(0,s)}function o(d="field"){let h="";for(;a(d+h);)++h;return d+h}function a(d){return!!s.schema.find(h=>h.name===d)}function u(d){let h=[];for(let g of s.schema)g!==d&&(h.push(g.name),g.id&&g.originalName!==""&&g.originalName!==g.name&&h.push(g.originalName));return h}function f(d,h,g,y){g[y]=d,t(0,s)}const c=d=>l(d);return n.$$set=d=>{"collection"in d&&t(0,s=d.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof(s==null?void 0:s.schema)=="undefined"&&(t(0,s=s||{}),t(0,s.schema=[],s))},[s,i,l,r,u,f,c]}class RM extends Pe{constructor(e){super(),Ee(this,e,NM,IM,De,{collection:0})}}function Kp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[16]=e,i[17]=t,i}function Jp(n,e,t){const i=n.slice();return i[19]=e[t],i}function Gp(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L,R,j,G,Y,q=n[0].schema,Z=[];for(let J=0;J<q.length;J+=1)Z[J]=Zp(Jp(n,q,J));return{c(){e=_("div"),t=_("div"),i=_("div"),s=_("p"),s.textContent="The following record fields are available:",l=O(),r=_("div"),o=_("code"),o.textContent="id",a=O(),u=_("code"),u.textContent="created",f=O(),c=_("code"),c.textContent="updated",d=O();for(let J=0;J<Z.length;J+=1)Z[J].c();h=O(),g=_("hr"),y=O(),b=_("p"),b.innerHTML="The request fields could be accessed with the special <em>@request</em> filter:",v=O(),S=_("div"),S.innerHTML=`<code>@request.method</code> 
+                        <code>@request.query.*</code> 
+                        <code>@request.data.*</code> 
+                        <code>@request.user.*</code>`,$=O(),C=_("hr"),M=O(),T=_("p"),T.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",E=O(),D=_("div"),D.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",P=O(),L=_("hr"),R=O(),j=_("p"),j.innerHTML=`Example rule:
+                        <br/> 
+                        <code>@request.user.id!=null &amp;&amp; created&gt;&quot;2022-01-01 00:00:00&quot;</code>`,p(s,"class","m-b-0"),p(r,"class","inline-flex flex-gap-5"),p(g,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(S,"class","inline-flex flex-gap-5"),p(C,"class","m-t-10 m-b-5"),p(T,"class","m-b-0"),p(D,"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(J,K){w(J,e,K),m(e,t),m(t,i),m(i,s),m(i,l),m(i,r),m(r,o),m(r,a),m(r,u),m(r,f),m(r,c),m(r,d);for(let ne=0;ne<Z.length;ne+=1)Z[ne].m(r,null);m(i,h),m(i,g),m(i,y),m(i,b),m(i,v),m(i,S),m(i,$),m(i,C),m(i,M),m(i,T),m(i,E),m(i,D),m(i,P),m(i,L),m(i,R),m(i,j),Y=!0},p(J,K){if(K&1){q=J[0].schema;let ne;for(ne=0;ne<q.length;ne+=1){const ce=Jp(J,q,ne);Z[ne]?Z[ne].p(ce,K):(Z[ne]=Zp(ce),Z[ne].c(),Z[ne].m(r,null))}for(;ne<Z.length;ne+=1)Z[ne].d(1);Z.length=q.length}},i(J){Y||(J&&Ot(()=>{G||(G=ft(e,fn,{duration:150},!0)),G.run(1)}),Y=!0)},o(J){J&&(G||(G=ft(e,fn,{duration:150},!1)),G.run(0)),Y=!1},d(J){J&&k(e),Bn(Z,J),J&&G&&G.end()}}}function jM(n){let e,t=n[19].name+"",i;return{c(){e=_("code"),i=H(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&1&&t!==(t=s[19].name+"")&&ge(i,t)},d(s){s&&k(e)}}}function HM(n){let e,t=n[19].name+"",i,s;return{c(){e=_("code"),i=H(t),s=H(".*")},m(l,r){w(l,e,r),m(e,i),m(e,s)},p(l,r){r&1&&t!==(t=l[19].name+"")&&ge(i,t)},d(l){l&&k(e)}}}function Zp(n){let e;function t(l,r){return l[19].type==="relation"||l[19].type==="user"?HM:jM}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function qM(n){let e=[],t=new Map,i,s,l=Object.entries(n[6]);const r=o=>o[14];for(let o=0;o<l.length;o+=1){let a=Kp(n,l,o),u=r(a);t.set(u,e[o]=xp(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=st()},m(o,a){for(let u=0;u<e.length;u+=1)e[u].m(o,a);w(o,i,a),s=!0},p(o,a){a&262235&&(l=Object.entries(o[6]),Me(),e=rt(e,a,r,1,o,l,t,i.parentNode,Ft,xp,i,Kp),Oe())},i(o){if(!s){for(let a=0;a<l.length;a+=1)A(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)F(e[a]);s=!1},d(o){for(let a=0;a<e.length;a+=1)e[a].d(o);o&&k(i)}}}function VM(n){let e;return{c(){e=_("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function zM(n){let e,t,i;function s(){return n[9](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Lock and set to Admins only")),Q(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,lt(i)}}}function BM(n){let e,t,i;function s(){return n[8](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-unlock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Unlock and set custom rule")),Q(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,lt(i)}}}function UM(n){let e;return{c(){e=H("Leave empty to grant everyone access")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function WM(n){let e;return{c(){e=H("Only admins will be able to access (unlock to change)")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function YM(n){let e,t=n[15]+"",i,s,l=Hi(n[0][n[14]])?"Admins only":"Custom rule",r,o,a,u,f=n[14],c,d,h,g,y,b,v;function S(){return n[10](n[14])}const $=()=>n[11](u,f),C=()=>n[11](null,f);function M(R){n[12](R,n[14])}var T=n[4];function E(R){let j={baseCollection:R[0],disabled:Hi(R[0][R[14]])};return R[0][R[14]]!==void 0&&(j.value=R[0][R[14]]),{props:j}}T&&(u=new T(E(n)),$(),pe.push(()=>Ie(u,"value",M)));function D(R,j){return j&1&&(g=null),g==null&&(g=!!Hi(R[0][R[14]])),g?WM:UM}let P=D(n,-1),L=P(n);return{c(){e=_("label"),i=H(t),s=H(" - "),r=H(l),a=O(),u&&B(u.$$.fragment),d=O(),h=_("div"),L.c(),p(e,"for",o=n[18]),p(h,"class","help-block")},m(R,j){w(R,e,j),m(e,i),m(e,s),m(e,r),w(R,a,j),u&&V(u,R,j),w(R,d,j),w(R,h,j),L.m(h,null),y=!0,b||(v=Q(e,"click",S),b=!0)},p(R,j){n=R,(!y||j&1)&&l!==(l=Hi(n[0][n[14]])?"Admins only":"Custom rule")&&ge(r,l),(!y||j&262144&&o!==(o=n[18]))&&p(e,"for",o),f!==n[14]&&(C(),f=n[14],$());const G={};if(j&1&&(G.baseCollection=n[0]),j&1&&(G.disabled=Hi(n[0][n[14]])),!c&&j&65&&(c=!0,G.value=n[0][n[14]],je(()=>c=!1)),T!==(T=n[4])){if(u){Me();const Y=u;F(Y.$$.fragment,1,0,()=>{z(Y,1)}),Oe()}T?(u=new T(E(n)),$(),pe.push(()=>Ie(u,"value",M)),B(u.$$.fragment),A(u.$$.fragment,1),V(u,d.parentNode,d)):u=null}else T&&u.$set(G);P!==(P=D(n,j))&&(L.d(1),L=P(n),L&&(L.c(),L.m(h,null)))},i(R){y||(u&&A(u.$$.fragment,R),y=!0)},o(R){u&&F(u.$$.fragment,R),y=!1},d(R){R&&k(e),R&&k(a),C(),u&&z(u,R),R&&k(d),R&&k(h),L.d(),b=!1,v()}}}function xp(n,e){let t,i,s,l,r,o,a,u;function f(h,g){return g&1&&(l=null),l==null&&(l=!!Hi(h[0][h[14]])),l?BM:zM}let c=f(e,-1),d=c(e);return o=new Fe({props:{class:"form-field rule-field m-0 "+(Hi(e[0][e[14]])?"disabled":""),name:e[14],$$slots:{default:[YM,({uniqueId:h})=>({18:h}),({uniqueId:h})=>h?262144:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=_("hr"),i=O(),s=_("div"),d.c(),r=O(),B(o.$$.fragment),a=O(),p(t,"class","m-t-sm m-b-sm"),p(s,"class","rule-block svelte-fjxz7k"),this.first=t},m(h,g){w(h,t,g),w(h,i,g),w(h,s,g),d.m(s,null),m(s,r),V(o,s,null),m(s,a),u=!0},p(h,g){e=h,c===(c=f(e,g))&&d?d.p(e,g):(d.d(1),d=c(e),d&&(d.c(),d.m(s,r)));const y={};g&1&&(y.class="form-field rule-field m-0 "+(Hi(e[0][e[14]])?"disabled":"")),g&4456473&&(y.$$scope={dirty:g,ctx:e}),o.$set(y)},i(h){u||(A(o.$$.fragment,h),u=!0)},o(h){F(o.$$.fragment,h),u=!1},d(h){h&&k(t),h&&k(i),h&&k(s),d.d(),z(o)}}}function KM(n){let e,t,i,s,l,r=n[2]?"Hide available fields":"Show available fields",o,a,u,f,c,d,h,g,y,b=n[2]&&Gp(n);const v=[VM,qM],S=[];function $(C,M){return C[5]?0:1}return f=$(n),c=S[f]=v[f](n),{c(){e=_("div"),t=_("div"),i=_("p"),i.innerHTML=`All rules follow the
+            <a href="https://pocketbase.io/docs/manage-collections#rules-filters-syntax" target="_blank" rel="noopener">PocketBase filter syntax and operators
+            </a>.`,s=O(),l=_("span"),o=H(r),a=O(),b&&b.c(),u=O(),c.c(),d=st(),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex"),p(e,"class","block m-b-base")},m(C,M){w(C,e,M),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(e,a),b&&b.m(e,null),w(C,u,M),S[f].m(C,M),w(C,d,M),h=!0,g||(y=Q(l,"click",n[7]),g=!0)},p(C,[M]){(!h||M&4)&&r!==(r=C[2]?"Hide available fields":"Show available fields")&&ge(o,r),C[2]?b?(b.p(C,M),M&4&&A(b,1)):(b=Gp(C),b.c(),A(b,1),b.m(e,null)):b&&(Me(),F(b,1,1,()=>{b=null}),Oe());let T=f;f=$(C),f===T?S[f].p(C,M):(Me(),F(S[T],1,1,()=>{S[T]=null}),Oe(),c=S[f],c?c.p(C,M):(c=S[f]=v[f](C),c.c()),A(c,1),c.m(d.parentNode,d))},i(C){h||(A(b),A(c),h=!0)},o(C){F(b),F(c),h=!1},d(C){C&&k(e),b&&b.d(),C&&k(u),S[f].d(C),C&&k(d),g=!1,y()}}}function Hi(n){return n===null}function JM(n,e,t){let{collection:i=new Fn}=e,s={},l=!1,r={},o,a=!1;const u={listRule:"List Action",viewRule:"View Action",createRule:"Create Action",updateRule:"Update Action",deleteRule:"Delete Action"};async function f(){t(5,a=!0);try{t(4,o=(await as(()=>import("./FilterAutocompleteInput.477fd505.js"),[])).default)}catch(v){console.warn(v),t(4,o=null)}t(5,a=!1)}pi(()=>{f()});const c=()=>t(2,l=!l),d=async v=>{var S;t(0,i[v]=s[v]||"",i),await Oi(),(S=r[v])==null||S.focus()},h=v=>{t(1,s[v]=i[v],s),t(0,i[v]=null,i)},g=v=>{var S;return(S=r[v])==null?void 0:S.focus()};function y(v,S){pe[v?"unshift":"push"](()=>{r[S]=v,t(3,r)})}function b(v,S){n.$$.not_equal(i[S],v)&&(i[S]=v,t(0,i))}return n.$$set=v=>{"collection"in v&&t(0,i=v.collection)},[i,s,l,r,o,a,u,c,d,h,g,y,b]}class GM extends Pe{constructor(e){super(),Ee(this,e,JM,KM,De,{collection:0})}}function Xp(n,e,t){const i=n.slice();return i[14]=e[t],i}function Qp(n,e,t){const i=n.slice();return i[14]=e[t],i}function eh(n){let e;return{c(){e=_("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function th(n){let e,t,i,s,l=n[1].originalName+"",r,o,a,u,f,c=n[1].name+"",d;return{c(){e=_("li"),t=_("div"),i=H(`Renamed collection
+                    `),s=_("strong"),r=H(l),o=O(),a=_("i"),u=O(),f=_("strong"),d=H(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,g){w(h,e,g),m(e,t),m(t,i),m(t,s),m(s,r),m(t,o),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&2&&l!==(l=h[1].originalName+"")&&ge(r,l),g&2&&c!==(c=h[1].name+"")&&ge(d,c)},d(h){h&&k(e)}}}function nh(n){let e,t,i,s,l=n[14].originalName+"",r,o,a,u,f,c=n[14].name+"",d;return{c(){e=_("li"),t=_("div"),i=H(`Renamed field
+                    `),s=_("strong"),r=H(l),o=O(),a=_("i"),u=O(),f=_("strong"),d=H(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,g){w(h,e,g),m(e,t),m(t,i),m(t,s),m(s,r),m(t,o),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&16&&l!==(l=h[14].originalName+"")&&ge(r,l),g&16&&c!==(c=h[14].name+"")&&ge(d,c)},d(h){h&&k(e)}}}function ih(n){let e,t,i,s=n[14].name+"",l,r;return{c(){e=_("li"),t=H("Removed field "),i=_("span"),l=H(s),r=O(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(o,a){w(o,e,a),m(e,t),m(e,i),m(i,l),m(e,r)},p(o,a){a&8&&s!==(s=o[14].name+"")&&ge(l,s)},d(o){o&&k(e)}}}function ZM(n){let e,t,i,s,l,r,o,a,u,f,c,d,h=n[3].length&&eh(),g=n[5]&&th(n),y=n[4],b=[];for(let $=0;$<y.length;$+=1)b[$]=nh(Qp(n,y,$));let v=n[3],S=[];for(let $=0;$<v.length;$+=1)S[$]=ih(Xp(n,v,$));return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=O(),s=_("div"),l=_("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to
+                update it manually!`,r=O(),h&&h.c(),o=O(),a=_("h6"),a.textContent="Changes:",u=O(),f=_("ul"),g&&g.c(),c=O();for(let $=0;$<b.length;$+=1)b[$].c();d=O();for(let $=0;$<S.length;$+=1)S[$].c();p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning"),p(f,"class","changes-list svelte-1ghly2p")},m($,C){w($,e,C),m(e,t),m(e,i),m(e,s),m(s,l),m(s,r),h&&h.m(s,null),w($,o,C),w($,a,C),w($,u,C),w($,f,C),g&&g.m(f,null),m(f,c);for(let M=0;M<b.length;M+=1)b[M].m(f,null);m(f,d);for(let M=0;M<S.length;M+=1)S[M].m(f,null)},p($,C){if($[3].length?h||(h=eh(),h.c(),h.m(s,null)):h&&(h.d(1),h=null),$[5]?g?g.p($,C):(g=th($),g.c(),g.m(f,c)):g&&(g.d(1),g=null),C&16){y=$[4];let M;for(M=0;M<y.length;M+=1){const T=Qp($,y,M);b[M]?b[M].p(T,C):(b[M]=nh(T),b[M].c(),b[M].m(f,d))}for(;M<b.length;M+=1)b[M].d(1);b.length=y.length}if(C&8){v=$[3];let M;for(M=0;M<v.length;M+=1){const T=Xp($,v,M);S[M]?S[M].p(T,C):(S[M]=ih(T),S[M].c(),S[M].m(f,null))}for(;M<S.length;M+=1)S[M].d(1);S.length=v.length}},d($){$&&k(e),h&&h.d(),$&&k(o),$&&k(a),$&&k(u),$&&k(f),g&&g.d(),Bn(b,$),Bn(S,$)}}}function xM(n){let e;return{c(){e=_("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function XM(n){let e,t,i,s,l;return{c(){e=_("button"),e.innerHTML='<span class="txt">Cancel</span>',t=O(),i=_("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(r,o){w(r,e,o),w(r,t,o),w(r,i,o),e.focus(),s||(l=[Q(e,"click",n[8]),Q(i,"click",n[9])],s=!0)},p:oe,d(r){r&&k(e),r&&k(t),r&&k(i),s=!1,lt(l)}}}function QM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[XM],header:[xM],default:[ZM]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&524346&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[10](null),z(e,s)}}}function eO(n,e,t){let i,s,l;const r=_n();let o,a;async function u(v){t(1,a=v),await Oi(),!i&&!s.length&&!l.length?c():o==null||o.show()}function f(){o==null||o.hide()}function c(){f(),r("confirm")}const d=()=>f(),h=()=>c();function g(v){pe[v?"unshift":"push"](()=>{o=v,t(2,o)})}function y(v){ut.call(this,n,v)}function b(v){ut.call(this,n,v)}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(v=>v.id&&!v.toDelete&&v.originalName!=v.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(v=>v.id&&v.toDelete))||[])},[f,a,o,l,s,i,c,u,d,h,g,y,b]}class tO extends Pe{constructor(e){super(),Ee(this,e,eO,QM,De,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function sh(n){let e,t,i,s;function l(o){n[26](o)}let r={};return n[2]!==void 0&&(r.collection=n[2]),t=new GM({props:r}),pe.push(()=>Ie(t,"collection",l)),{c(){e=_("div"),B(t.$$.fragment),p(e,"class","tab-item active")},m(o,a){w(o,e,a),V(t,e,null),s=!0},p(o,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=o[2],je(()=>i=!1)),t.$set(u)},i(o){s||(A(t.$$.fragment,o),s=!0)},o(o){F(t.$$.fragment,o),s=!1},d(o){o&&k(e),z(t)}}}function nO(n){let e,t,i,s,l,r;function o(f){n[25](f)}let a={};n[2]!==void 0&&(a.collection=n[2]),i=new RM({props:a}),pe.push(()=>Ie(i,"collection",o));let u=n[9]===Ul&&sh(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),l=O(),u&&u.c(),p(t,"class","tab-item"),ee(t,"active",n[9]===gs),p(e,"class","tabs-content svelte-b10vi")},m(f,c){w(f,e,c),m(e,t),V(i,t,null),m(e,l),u&&u.m(e,null),r=!0},p(f,c){const d={};!s&&c[0]&4&&(s=!0,d.collection=f[2],je(()=>s=!1)),i.$set(d),c[0]&512&&ee(t,"active",f[9]===gs),f[9]===Ul?u?(u.p(f,c),c[0]&512&&A(u,1)):(u=sh(f),u.c(),A(u,1),u.m(e,null)):u&&(Me(),F(u,1,1,()=>{u=null}),Oe())},i(f){r||(A(i.$$.fragment,f),A(u),r=!0)},o(f){F(i.$$.fragment,f),F(u),r=!1},d(f){f&&k(e),z(i),u&&u.d()}}}function lh(n){let e,t,i,s,l,r,o;return r=new ks({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[iO]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=O(),i=_("button"),s=_("i"),l=O(),B(r.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),m(i,s),m(i,l),V(r,i,null),o=!0},p(a,u){const f={};u[1]&256&&(f.$$scope={dirty:u,ctx:a}),r.$set(f)},i(a){o||(A(r.$$.fragment,a),o=!0)},o(a){F(r.$$.fragment,a),o=!1},d(a){a&&k(e),a&&k(t),a&&k(i),z(r)}}}function iO(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i> 
+                        <span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[20]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function rh(n){let e;return{c(){e=_("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function sO(n){let e,t,i,s,l,r,o,a,u,f,c,d,h=n[2].system&&rh();return{c(){e=_("label"),t=H("Name"),s=O(),l=_("input"),u=O(),h&&h.c(),f=st(),p(e,"for",i=n[38]),p(l,"type","text"),p(l,"id",r=n[38]),l.required=!0,l.disabled=n[11],p(l,"spellcheck","false"),l.autofocus=o=n[2].isNew,p(l,"placeholder",'eg. "posts"'),l.value=a=n[2].name},m(g,y){w(g,e,y),m(e,t),w(g,s,y),w(g,l,y),w(g,u,y),h&&h.m(g,y),w(g,f,y),n[2].isNew&&l.focus(),c||(d=Q(l,"input",n[21]),c=!0)},p(g,y){y[1]&128&&i!==(i=g[38])&&p(e,"for",i),y[1]&128&&r!==(r=g[38])&&p(l,"id",r),y[0]&2048&&(l.disabled=g[11]),y[0]&4&&o!==(o=g[2].isNew)&&(l.autofocus=o),y[0]&4&&a!==(a=g[2].name)&&l.value!==a&&(l.value=a),g[2].system?h||(h=rh(),h.c(),h.m(f.parentNode,f)):h&&(h.d(1),h=null)},d(g){g&&k(e),g&&k(s),g&&k(l),g&&k(u),h&&h.d(g),g&&k(f),c=!1,d()}}}function oh(n){let e,t,i,s,l,r;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=St.call(null,e,n[12])),l=!0)},p(o,a){t&&Jn(t.update)&&a[0]&4096&&t.update.call(null,o[12])},i(o){s||(o&&Ot(()=>{i||(i=ft(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){o&&(i||(i=ft(e,Wn,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function ah(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,o){w(r,e,o),i=!0,s||(l=Xe(St.call(null,e,"Has errors")),s=!0)},i(r){i||(r&&Ot(()=>{t||(t=ft(e,Wn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(r){r&&(t||(t=ft(e,Wn,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(r){r&&k(e),r&&t&&t.end(),s=!1,l()}}}function lO(n){var R,j,G,Y,q,Z;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,r,o,a,u,f,c,d,h,g,y=!W.isEmpty((R=n[4])==null?void 0:R.schema),b,v,S,$,C=!W.isEmpty((j=n[4])==null?void 0:j.listRule)||!W.isEmpty((G=n[4])==null?void 0:G.viewRule)||!W.isEmpty((Y=n[4])==null?void 0:Y.createRule)||!W.isEmpty((q=n[4])==null?void 0:q.updateRule)||!W.isEmpty((Z=n[4])==null?void 0:Z.deleteRule),M,T,E,D=!n[2].isNew&&!n[2].system&&lh(n);o=new Fe({props:{class:"form-field required m-b-0 "+(n[11]?"disabled":""),name:"name",$$slots:{default:[sO,({uniqueId:J})=>({38:J}),({uniqueId:J})=>[0,J?128:0]]},$$scope:{ctx:n}}});let P=y&&oh(n),L=C&&ah();return{c(){e=_("h4"),i=H(t),s=O(),D&&D.c(),l=O(),r=_("form"),B(o.$$.fragment),a=O(),u=_("input"),f=O(),c=_("div"),d=_("button"),h=_("span"),h.textContent="Fields",g=O(),P&&P.c(),b=O(),v=_("button"),S=_("span"),S.textContent="API Rules",$=O(),L&&L.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(r,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),ee(d,"active",n[9]===gs),p(S,"class","txt"),p(v,"type","button"),p(v,"class","tab-item"),ee(v,"active",n[9]===Ul),p(c,"class","tabs-header stretched")},m(J,K){w(J,e,K),m(e,i),w(J,s,K),D&&D.m(J,K),w(J,l,K),w(J,r,K),V(o,r,null),m(r,a),m(r,u),w(J,f,K),w(J,c,K),m(c,d),m(d,h),m(d,g),P&&P.m(d,null),m(c,b),m(c,v),m(v,S),m(v,$),L&&L.m(v,null),M=!0,T||(E=[Q(r,"submit",Wt(n[22])),Q(d,"click",n[23]),Q(v,"click",n[24])],T=!0)},p(J,K){var ce,be,se,x,Te,te;(!M||K[0]&4)&&t!==(t=J[2].isNew?"New collection":"Edit collection")&&ge(i,t),!J[2].isNew&&!J[2].system?D?(D.p(J,K),K[0]&4&&A(D,1)):(D=lh(J),D.c(),A(D,1),D.m(l.parentNode,l)):D&&(Me(),F(D,1,1,()=>{D=null}),Oe());const ne={};K[0]&2048&&(ne.class="form-field required m-b-0 "+(J[11]?"disabled":"")),K[0]&2052|K[1]&384&&(ne.$$scope={dirty:K,ctx:J}),o.$set(ne),K[0]&16&&(y=!W.isEmpty((ce=J[4])==null?void 0:ce.schema)),y?P?(P.p(J,K),K[0]&16&&A(P,1)):(P=oh(J),P.c(),A(P,1),P.m(d,null)):P&&(Me(),F(P,1,1,()=>{P=null}),Oe()),K[0]&512&&ee(d,"active",J[9]===gs),K[0]&16&&(C=!W.isEmpty((be=J[4])==null?void 0:be.listRule)||!W.isEmpty((se=J[4])==null?void 0:se.viewRule)||!W.isEmpty((x=J[4])==null?void 0:x.createRule)||!W.isEmpty((Te=J[4])==null?void 0:Te.updateRule)||!W.isEmpty((te=J[4])==null?void 0:te.deleteRule)),C?L?K[0]&16&&A(L,1):(L=ah(),L.c(),A(L,1),L.m(v,null)):L&&(Me(),F(L,1,1,()=>{L=null}),Oe()),K[0]&512&&ee(v,"active",J[9]===Ul)},i(J){M||(A(D),A(o.$$.fragment,J),A(P),A(L),M=!0)},o(J){F(D),F(o.$$.fragment,J),F(P),F(L),M=!1},d(J){J&&k(e),J&&k(s),D&&D.d(J),J&&k(l),J&&k(r),z(o),J&&k(f),J&&k(c),P&&P.d(),L&&L.d(),T=!1,lt(E)}}}function rO(n){let e,t,i,s,l,r=n[2].isNew?"Create":"Save changes",o,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=O(),s=_("button"),l=_("span"),o=H(r),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[7],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],ee(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,o),u||(f=[Q(e,"click",n[18]),Q(s,"click",n[19])],u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&r!==(r=c[2].isNew?"Create":"Save changes")&&ge(o,r),d[0]&1152&&a!==(a=!c[10]||c[7])&&(s.disabled=a),d[0]&128&&ee(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,lt(f)}}}function oO(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",beforeHide:n[27],$$slots:{footer:[rO],header:[lO],default:[nO]},$$scope:{ctx:n}};e=new Ai({props:l}),n[28](e),e.$on("hide",n[29]),e.$on("show",n[30]);let r={};return i=new tO({props:r}),n[31](i),i.$on("confirm",n[32]),{c(){B(e.$$.fragment),t=O(),B(i.$$.fragment)},m(o,a){V(e,o,a),w(o,t,a),V(i,o,a),s=!0},p(o,a){const u={};a[0]&264&&(u.beforeHide=o[27]),a[0]&7828|a[1]&256&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};i.$set(f)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){F(e.$$.fragment,o),F(i.$$.fragment,o),s=!1},d(o){n[28](null),z(e,o),o&&k(t),n[31](null),z(i,o)}}}const gs="fields",Ul="api_rules";function Ea(n){return JSON.stringify(n)}function aO(n,e,t){let i,s,l,r,o,a;hn(n,fi,te=>t(34,o=te)),hn(n,ys,te=>t(4,a=te));const u=_n();let f,c,d=null,h=new Fn,g=!1,y=!1,b=gs,v=Ea(h);function S(te){t(9,b=te)}function $(te){return M(te),t(8,y=!0),S(gs),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(te){Ki({}),typeof te!="undefined"?(d=te,t(2,h=te==null?void 0:te.clone())):(d=null,t(2,h=new Fn)),t(2,h.schema=h.schema||[],h),t(2,h.originalName=h.name||"",h),await Oi(),t(17,v=Ea(h))}function T(){if(h.isNew)return E();c==null||c.show(h)}function E(){if(g)return;t(7,g=!0);const te=D();let _e;h.isNew?_e=ke.Collections.create(te):_e=ke.Collections.update(h.id,te),_e.then(fe=>{t(8,y=!1),C(),mn(h.isNew?"Successfully created collection.":"Successfully updated collection."),L3(fe),h.isNew&&zg(fi,o=fe,o),u("save",fe)}).catch(fe=>{ke.errorResponseHandler(fe)}).finally(()=>{t(7,g=!1)})}function D(){const te=h.export();te.schema=te.schema.slice(0);for(let _e=te.schema.length-1;_e>=0;_e--)te.schema[_e].toDelete&&te.schema.splice(_e,1);return te}function P(){!(d!=null&&d.id)||Mi(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>ke.Collections.delete(d==null?void 0:d.id).then(()=>{C(),mn(`Successfully deleted collection "${d==null?void 0:d.name}".`),u("delete",d),F3(d)}).catch(te=>{ke.errorResponseHandler(te)}))}const L=()=>C(),R=()=>T(),j=()=>P(),G=te=>{t(2,h.name=W.slugify(te.target.value),h),te.target.value=h.name},Y=()=>{r&&T()},q=()=>S(gs),Z=()=>S(Ul);function J(te){h=te,t(2,h)}function K(te){h=te,t(2,h)}const ne=()=>l&&y?(Mi("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,y=!1),C()}),!1):!0;function ce(te){pe[te?"unshift":"push"](()=>{f=te,t(5,f)})}function be(te){ut.call(this,n,te)}function se(te){ut.call(this,n,te)}function x(te){pe[te?"unshift":"push"](()=>{c=te,t(6,c)})}const Te=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&16&&t(12,i=typeof W.getNestedVal(a,"schema.message",null)=="string"?W.getNestedVal(a,"schema.message"):"Has errors"),n.$$.dirty[0]&4&&t(11,s=!h.isNew&&h.system),n.$$.dirty[0]&131076&&t(3,l=v!=Ea(h)),n.$$.dirty[0]&12&&t(10,r=h.isNew||l)},[S,C,h,l,a,f,c,g,y,b,r,s,i,T,E,P,$,v,L,R,j,G,Y,q,Z,J,K,ne,ce,be,se,x,Te]}class gf extends Pe{constructor(e){super(),Ee(this,e,aO,oO,De,{changeTab:0,show:16,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[16]}get hide(){return this.$$.ctx[1]}}function uh(n,e,t){const i=n.slice();return i[13]=e[t],i}function fh(n){let e,t=n[1].length&&ch();return{c(){t&&t.c(),e=st()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1].length?t||(t=ch(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function ch(n){let e;return{c(){e=_("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function uO(n){let e;return{c(){e=_("i"),p(e,"class","ri-folder-2-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function fO(n){let e;return{c(){e=_("i"),p(e,"class","ri-folder-open-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function dh(n,e){let t,i,s,l=e[13].name+"",r,o,a,u;function f(g,y){var b;return((b=g[5])==null?void 0:b.id)===g[13].id?fO:uO}let c=f(e),d=c(e);function h(){return e[10](e[13])}return{key:n,first:null,c(){var g;t=_("div"),d.c(),i=O(),s=_("span"),r=H(l),o=O(),p(s,"class","txt"),p(t,"tabindex","0"),p(t,"class","sidebar-list-item"),ee(t,"active",((g=e[5])==null?void 0:g.id)===e[13].id),this.first=t},m(g,y){w(g,t,y),d.m(t,null),m(t,i),m(t,s),m(s,r),m(t,o),a||(u=Q(t,"click",h),a=!0)},p(g,y){var b;e=g,c!==(c=f(e))&&(d.d(1),d=c(e),d&&(d.c(),d.m(t,i))),y&8&&l!==(l=e[13].name+"")&&ge(r,l),y&40&&ee(t,"active",((b=e[5])==null?void 0:b.id)===e[13].id)},d(g){g&&k(t),d.d(),a=!1,u()}}}function cO(n){let e,t,i,s,l,r,o,a,u,f,c,d=[],h=new Map,g,y,b,v,S,$,C,M,T=n[3];const E=L=>L[13].id;for(let L=0;L<T.length;L+=1){let R=uh(n,T,L),j=E(R);h.set(j,d[L]=dh(j,R))}let D=null;T.length||(D=fh(n));let P={};return S=new gf({props:P}),n[12](S),{c(){e=_("aside"),t=_("header"),i=_("div"),s=_("div"),l=_("button"),l.innerHTML='<i class="ri-close-line"></i>',r=O(),o=_("input"),a=O(),u=_("hr"),f=O(),c=_("div");for(let L=0;L<d.length;L+=1)d[L].c();D&&D.c(),g=O(),y=_("footer"),b=_("button"),b.innerHTML=`<i class="ri-add-line"></i> 
+            <span class="txt">New collection</span>`,v=O(),B(S.$$.fragment),p(l,"type","button"),p(l,"class","btn btn-xs btn-secondary btn-circle btn-clear"),ee(l,"hidden",!n[4]),p(s,"class","form-field-addon"),p(o,"type","text"),p(o,"placeholder","Search collections..."),p(i,"class","form-field search"),ee(i,"active",n[4]),p(t,"class","sidebar-header"),p(u,"class","m-t-5 m-b-xs"),p(c,"class","sidebar-content"),p(b,"type","button"),p(b,"class","btn btn-block btn-outline"),p(y,"class","sidebar-footer"),p(e,"class","page-sidebar collection-sidebar")},m(L,R){w(L,e,R),m(e,t),m(t,i),m(i,s),m(s,l),m(i,r),m(i,o),$e(o,n[0]),m(e,a),m(e,u),m(e,f),m(e,c);for(let j=0;j<d.length;j+=1)d[j].m(c,null);D&&D.m(c,null),m(e,g),m(e,y),m(y,b),w(L,v,R),V(S,L,R),$=!0,C||(M=[Q(l,"click",n[8]),Q(o,"input",n[9]),Q(b,"click",n[11])],C=!0)},p(L,[R]){R&16&&ee(l,"hidden",!L[4]),R&1&&o.value!==L[0]&&$e(o,L[0]),R&16&&ee(i,"active",L[4]),R&106&&(T=L[3],d=rt(d,R,E,1,L,T,h,c,un,dh,null,uh),!T.length&&D?D.p(L,R):T.length?D&&(D.d(1),D=null):(D=fh(L),D.c(),D.m(c,null)));const j={};S.$set(j)},i(L){$||(A(S.$$.fragment,L),$=!0)},o(L){F(S.$$.fragment,L),$=!1},d(L){L&&k(e);for(let R=0;R<d.length;R+=1)d[R].d();D&&D.d(),L&&k(v),n[12](null),z(S,L),C=!1,lt(M)}}}function dO(n,e,t){let i,s,l,r,o;hn(n,fi,b=>t(5,r=b)),hn(n,Gs,b=>t(7,o=b));let a,u="";function f(b){zg(fi,r=b,r)}const c=()=>t(0,u="");function d(){u=this.value,t(0,u)}const h=b=>f(b),g=()=>a==null?void 0:a.show();function y(b){pe[b?"unshift":"push"](()=>{a=b,t(2,a)})}return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=u.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=u!==""),n.$$.dirty&131&&t(3,l=o.filter(b=>b.name!="profiles"&&(b.id==u||b.name.replace(/\s+/g,"").toLowerCase().includes(i))))},[u,i,a,l,s,r,f,o,c,d,h,g,y]}class pO extends Pe{constructor(e){super(),Ee(this,e,dO,cO,De,{})}}function hO(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L,R,j,G,Y,q,Z,J,K,ne,ce,be,se,x,Te,te,_e,fe,ie,ye,He,Le,Re,ae,re,ve,qe;return{c(){e=_("p"),e.innerHTML=`The syntax basically follows the format
+    <code><span class="txt-success">OPERAND</span> 
+        <span class="txt-danger">OPERATOR</span> 
+        <span class="txt-success">OPERAND</span></code>, where:`,t=O(),i=_("ul"),s=_("li"),s.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single or double
+        quoted), number, null, true, false`,l=O(),r=_("li"),o=_("code"),o.textContent="OPERATOR",a=H(` - is one of:
+        `),u=_("br"),f=O(),c=_("ul"),d=_("li"),h=_("code"),h.textContent="=",g=O(),y=_("span"),y.textContent="Equal",b=O(),v=_("li"),S=_("code"),S.textContent="!=",$=O(),C=_("span"),C.textContent="NOT equal",M=O(),T=_("li"),E=_("code"),E.textContent=">",D=O(),P=_("span"),P.textContent="Greater than",L=O(),R=_("li"),j=_("code"),j.textContent=">=",G=O(),Y=_("span"),Y.textContent="Greater than or equal",q=O(),Z=_("li"),J=_("code"),J.textContent="<",K=O(),ne=_("span"),ne.textContent="Less than or equal",ce=O(),be=_("li"),se=_("code"),se.textContent="<=",x=O(),Te=_("span"),Te.textContent="Less than or equal",te=O(),_e=_("li"),fe=_("code"),fe.textContent="~",ie=O(),ye=_("span"),ye.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard
+                    match)`,He=O(),Le=_("li"),Re=_("code"),Re.textContent="!~",ae=O(),re=_("span"),re.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
+                    wildcard match)`,ve=O(),qe=_("p"),qe.innerHTML=`To group and combine several expressions you could use brackets
+    <code>(...)</code>, <code>&amp;&amp;</code> (AND) and <code>||</code> (OR) tokens.`,p(o,"class","txt-danger"),p(h,"class","filter-op svelte-1w7s5nw"),p(y,"class","txt-hint"),p(S,"class","filter-op svelte-1w7s5nw"),p(C,"class","txt-hint"),p(E,"class","filter-op svelte-1w7s5nw"),p(P,"class","txt-hint"),p(j,"class","filter-op svelte-1w7s5nw"),p(Y,"class","txt-hint"),p(J,"class","filter-op svelte-1w7s5nw"),p(ne,"class","txt-hint"),p(se,"class","filter-op svelte-1w7s5nw"),p(Te,"class","txt-hint"),p(fe,"class","filter-op svelte-1w7s5nw"),p(ye,"class","txt-hint"),p(Re,"class","filter-op svelte-1w7s5nw"),p(re,"class","txt-hint")},m(Ve,Je){w(Ve,e,Je),w(Ve,t,Je),w(Ve,i,Je),m(i,s),m(i,l),m(i,r),m(r,o),m(r,a),m(r,u),m(r,f),m(r,c),m(c,d),m(d,h),m(d,g),m(d,y),m(c,b),m(c,v),m(v,S),m(v,$),m(v,C),m(c,M),m(c,T),m(T,E),m(T,D),m(T,P),m(c,L),m(c,R),m(R,j),m(R,G),m(R,Y),m(c,q),m(c,Z),m(Z,J),m(Z,K),m(Z,ne),m(c,ce),m(c,be),m(be,se),m(be,x),m(be,Te),m(c,te),m(c,_e),m(_e,fe),m(_e,ie),m(_e,ye),m(c,He),m(c,Le),m(Le,Re),m(Le,ae),m(Le,re),w(Ve,ve,Je),w(Ve,qe,Je)},p:oe,i:oe,o:oe,d(Ve){Ve&&k(e),Ve&&k(t),Ve&&k(i),Ve&&k(ve),Ve&&k(qe)}}}class mO extends Pe{constructor(e){super(),Ee(this,e,null,hO,De,{})}}function ph(n,e,t){const i=n.slice();return i[8]=e[t],i}function hh(n,e,t){const i=n.slice();return i[8]=e[t],i}function mh(n,e,t){const i=n.slice();return i[13]=e[t],i}function gh(n,e,t){const i=n.slice();return i[13]=e[t],i}function _h(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function bh(n,e){let t,i=e[13].lang+"",s,l,r,o;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&ge(s,i),f&24&&ee(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),r=!1,o()}}}function yh(n,e){let t,i,s,l;return i=new nn({props:{content:e[13].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[13].code),i.$set(a),o&24&&ee(t,"active",e[3]===e[13].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function vh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("div"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&36&&ee(t,"active",e[2]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function kh(n,e){let t,i,s,l;return i=new nn({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r,o&36&&ee(t,"active",e[2]===e[8].code)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function gO(n){let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,b,v=n[0].name+"",S,$,C,M,T,E,D,P=[],L=new Map,R,j,G=[],Y=new Map,q,Z,J,K,ne,ce,be,se,x,Te,te,_e,fe,ie,ye,He,Le,Re,ae,re,ve,qe,Ve,Je,me,Ae,X,ue,Ue,bt,it,yt,at,dt,Tt,Pt,Jt,he,we,Ge,et,Et,de,Se,Ze,Gt,Vt,ii,ot,N,I,U,le,Ne,Be,tt,Ke,nt,Ye,xe=[],wt=new Map,Sn,Yt,Zt=[],gi=new Map,Ei,Xt=n[1]&&_h(),$s=n[4];const sr=Ce=>Ce[13].lang;for(let Ce=0;Ce<$s.length;Ce+=1){let We=gh(n,$s,Ce),Dt=sr(We);L.set(Dt,P[Ce]=bh(Dt,We))}let Zi=n[4];const lr=Ce=>Ce[13].lang;for(let Ce=0;Ce<Zi.length;Ce+=1){let We=mh(n,Zi,Ce),Dt=lr(We);Y.set(Dt,G[Ce]=yh(Dt,We))}me=new nn({props:{content:`
+                        // DESC by created and ASC by id
+                        ?sort=-created,id
+                    `}}),dt=new nn({props:{content:`
+                        ?filter=(id='abc' && created>'2022-01-01')
+                    `}}),Pt=new mO({}),Ze=new nn({props:{content:`
+                        ?expand=rel1,rel2.subrel21.subrel22
+                    `}});let Cs=n[5];const rr=Ce=>Ce[8].code;for(let Ce=0;Ce<Cs.length;Ce+=1){let We=hh(n,Cs,Ce),Dt=rr(We);wt.set(Dt,xe[Ce]=vh(Dt,We))}let xi=n[5];const or=Ce=>Ce[8].code;for(let Ce=0;Ce<xi.length;Ce+=1){let We=ph(n,xi,Ce),Dt=or(We);gi.set(Dt,Zt[Ce]=kh(Dt,We))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=O(),s=_("div"),l=_("p"),r=H("/api/collections/"),o=_("strong"),u=H(a),f=H("/records"),c=O(),Xt&&Xt.c(),d=O(),h=_("div"),g=_("p"),y=H("Fetch a paginated "),b=_("strong"),S=H(v),$=H(" records list."),C=O(),M=_("div"),M.textContent="Client SDKs example",T=O(),E=_("div"),D=_("div");for(let Ce=0;Ce<P.length;Ce+=1)P[Ce].c();R=O(),j=_("div");for(let Ce=0;Ce<G.length;Ce+=1)G[Ce].c();q=O(),Z=_("div"),Z.textContent="Query parameters",J=O(),K=_("table"),ne=_("thead"),ne.innerHTML=`<tr><th>Param</th> 
+            <th>Type</th> 
+            <th width="60%">Description</th></tr>`,ce=O(),be=_("tbody"),se=_("tr"),se.innerHTML=`<td>page</td> 
+            <td><span class="label">Number</span></td> 
+            <td>The page (aka. offset) of the paginated list (default to 1).</td>`,x=O(),Te=_("tr"),Te.innerHTML=`<td>perPage</td> 
+            <td><span class="label">Number</span></td> 
+            <td>Specify the max returned records per page (default to 30).</td>`,te=O(),_e=_("tr"),fe=_("td"),fe.textContent="sort",ie=O(),ye=_("td"),ye.innerHTML='<span class="label">String</span>',He=O(),Le=_("td"),Re=H("Specify the records order attribute(s). "),ae=_("br"),re=H(`
+                Add `),ve=_("code"),ve.textContent="-",qe=H(" / "),Ve=_("code"),Ve.textContent="+",Je=H(` (default) in front of the attribute for DESC / ASC order.
+                Ex.:
+                `),B(me.$$.fragment),Ae=O(),X=_("tr"),ue=_("td"),ue.textContent="filter",Ue=O(),bt=_("td"),bt.innerHTML='<span class="label">String</span>',it=O(),yt=_("td"),at=H(`Filter the returned records. Ex.:
+                `),B(dt.$$.fragment),Tt=O(),B(Pt.$$.fragment),Jt=O(),he=_("tr"),we=_("td"),we.textContent="expand",Ge=O(),et=_("td"),et.innerHTML='<span class="label">String</span>',Et=O(),de=_("td"),Se=H(`Auto expand nested record relations. Ex.:
+                `),B(Ze.$$.fragment),Gt=H(`
+                Supports up to 6-levels depth nested relations expansion. `),Vt=_("br"),ii=H(`
+                The expanded relations will be appended to each individual record under the
+                `),ot=_("code"),ot.textContent="@expand",N=H(" property (eg. "),I=_("code"),I.textContent='"@expand": {"rel1": {...}, ...}',U=H(`). Only the
+                relations that the user has permissions to `),le=_("strong"),le.textContent="view",Ne=H(" will be expanded."),Be=O(),tt=_("div"),tt.textContent="Responses",Ke=O(),nt=_("div"),Ye=_("div");for(let Ce=0;Ce<xe.length;Ce+=1)xe[Ce].c();Sn=O(),Yt=_("div");for(let Ce=0;Ce<Zt.length;Ce+=1)Zt[Ce].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(h,"class","content m-b-base"),p(M,"class","section-title"),p(D,"class","tabs-header compact left"),p(j,"class","tabs-content"),p(E,"class","tabs m-b-lg"),p(Z,"class","section-title"),p(K,"class","table-compact table-border m-b-lg"),p(tt,"class","section-title"),p(Ye,"class","tabs-header compact left"),p(Yt,"class","tabs-content"),p(nt,"class","tabs")},m(Ce,We){w(Ce,e,We),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(e,c),Xt&&Xt.m(e,null),w(Ce,d,We),w(Ce,h,We),m(h,g),m(g,y),m(g,b),m(b,S),m(g,$),w(Ce,C,We),w(Ce,M,We),w(Ce,T,We),w(Ce,E,We),m(E,D);for(let Dt=0;Dt<P.length;Dt+=1)P[Dt].m(D,null);m(E,R),m(E,j);for(let Dt=0;Dt<G.length;Dt+=1)G[Dt].m(j,null);w(Ce,q,We),w(Ce,Z,We),w(Ce,J,We),w(Ce,K,We),m(K,ne),m(K,ce),m(K,be),m(be,se),m(be,x),m(be,Te),m(be,te),m(be,_e),m(_e,fe),m(_e,ie),m(_e,ye),m(_e,He),m(_e,Le),m(Le,Re),m(Le,ae),m(Le,re),m(Le,ve),m(Le,qe),m(Le,Ve),m(Le,Je),V(me,Le,null),m(be,Ae),m(be,X),m(X,ue),m(X,Ue),m(X,bt),m(X,it),m(X,yt),m(yt,at),V(dt,yt,null),m(yt,Tt),V(Pt,yt,null),m(be,Jt),m(be,he),m(he,we),m(he,Ge),m(he,et),m(he,Et),m(he,de),m(de,Se),V(Ze,de,null),m(de,Gt),m(de,Vt),m(de,ii),m(de,ot),m(de,N),m(de,I),m(de,U),m(de,le),m(de,Ne),w(Ce,Be,We),w(Ce,tt,We),w(Ce,Ke,We),w(Ce,nt,We),m(nt,Ye);for(let Dt=0;Dt<xe.length;Dt+=1)xe[Dt].m(Ye,null);m(nt,Sn),m(nt,Yt);for(let Dt=0;Dt<Zt.length;Dt+=1)Zt[Dt].m(Yt,null);Ei=!0},p(Ce,[We]){(!Ei||We&1)&&a!==(a=Ce[0].name+"")&&ge(u,a),Ce[1]?Xt||(Xt=_h(),Xt.c(),Xt.m(e,null)):Xt&&(Xt.d(1),Xt=null),(!Ei||We&1)&&v!==(v=Ce[0].name+"")&&ge(S,v),We&24&&($s=Ce[4],P=rt(P,We,sr,1,Ce,$s,L,D,un,bh,null,gh)),We&24&&(Zi=Ce[4],Me(),G=rt(G,We,lr,1,Ce,Zi,Y,j,Ft,yh,null,mh),Oe()),We&36&&(Cs=Ce[5],xe=rt(xe,We,rr,1,Ce,Cs,wt,Ye,un,vh,null,hh)),We&36&&(xi=Ce[5],Me(),Zt=rt(Zt,We,or,1,Ce,xi,gi,Yt,Ft,kh,null,ph),Oe())},i(Ce){if(!Ei){for(let We=0;We<Zi.length;We+=1)A(G[We]);A(me.$$.fragment,Ce),A(dt.$$.fragment,Ce),A(Pt.$$.fragment,Ce),A(Ze.$$.fragment,Ce);for(let We=0;We<xi.length;We+=1)A(Zt[We]);Ei=!0}},o(Ce){for(let We=0;We<G.length;We+=1)F(G[We]);F(me.$$.fragment,Ce),F(dt.$$.fragment,Ce),F(Pt.$$.fragment,Ce),F(Ze.$$.fragment,Ce);for(let We=0;We<Zt.length;We+=1)F(Zt[We]);Ei=!1},d(Ce){Ce&&k(e),Xt&&Xt.d(),Ce&&k(d),Ce&&k(h),Ce&&k(C),Ce&&k(M),Ce&&k(T),Ce&&k(E);for(let We=0;We<P.length;We+=1)P[We].d();for(let We=0;We<G.length;We+=1)G[We].d();Ce&&k(q),Ce&&k(Z),Ce&&k(J),Ce&&k(K),z(me),z(dt),z(Pt),z(Ze),Ce&&k(Be),Ce&&k(tt),Ce&&k(Ke),Ce&&k(nt);for(let We=0;We<xe.length;We+=1)xe[We].d();for(let We=0;We<Zt.length;We+=1)Zt[We].d()}}}function _O(n,e,t){let i,{collection:s=new Fn}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(3,r=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.listRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(o.push({code:200,body:JSON.stringify({page:1,perPage:30,totalItems:2,items:[W.dummyCollectionRecord(s),W.dummyCollectionRecord(s)]},null,2)}),o.push({code:400,body:`
+                {
+                  "code": 400,
+                  "message": "Something went wrong while processing your request. Invalid filter.",
+                  "data": {}
+                }
+            `}),i&&o.push({code:403,body:`
+                    {
+                      "code": 403,
+                      "message": "Only admins can access this action.",
+                      "data": {}
+                    }
+                `}),o.push({code:404,body:`
+                {
+                  "code": 404,
+                  "message": "The requested resource wasn't found.",
+                  "data": {}
+                }
+            `})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
+                import PocketBase from 'pocketbase';
+
+                const client = new PocketBase("${ke.baseUrl}");
+
+                client.Records.getList("${s==null?void 0:s.name}", { page: 2 })
+                    .then(function (list) {
+                        // success...
+                    }).catch(function (error) {
+                        // error...
+                    });
+
+                // alternatively you can also fetch all records at once via getFullList:
+                client.Records.getFullList("${s==null?void 0:s.name}", 200 /* batch size */)
+                    .then(function (records) {
+                        // success...
+                    }).catch(function (error) {
+                        // error...
+                    });
+            `}])},[s,i,l,r,a,o,u,f]}class bO extends Pe{constructor(e){super(),Ee(this,e,_O,gO,De,{collection:0})}}function wh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Sh(n,e,t){const i=n.slice();return i[8]=e[t],i}function $h(n,e,t){const i=n.slice();return i[13]=e[t],i}function Ch(n,e,t){const i=n.slice();return i[13]=e[t],i}function Mh(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Oh(n,e){let t,i=e[13].lang+"",s,l,r,o;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&ge(s,i),f&24&&ee(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),r=!1,o()}}}function Th(n,e){let t,i,s,l;return i=new nn({props:{content:e[13].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[13].code),i.$set(a),o&24&&ee(t,"active",e[3]===e[13].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function Dh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&36&&ee(t,"active",e[2]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function Ah(n,e){let t,i,s,l;return i=new nn({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r,o&36&&ee(t,"active",e[2]===e[8].code)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function yO(n){let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,b,v,S=n[0].name+"",$,C,M,T,E,D,P,L=[],R=new Map,j,G,Y=[],q=new Map,Z,J,K,ne,ce,be,se,x,Te,te,_e,fe,ie,ye,He,Le,Re,ae,re,ve,qe,Ve,Je,me,Ae,X,ue,Ue,bt,it,yt,at,dt,Tt=[],Pt=new Map,Jt,he,we=[],Ge=new Map,et,Et=n[1]&&Mh(),de=n[4];const Se=I=>I[13].lang;for(let I=0;I<de.length;I+=1){let U=Ch(n,de,I),le=Se(U);R.set(le,L[I]=Oh(le,U))}let Ze=n[4];const Gt=I=>I[13].lang;for(let I=0;I<Ze.length;I+=1){let U=$h(n,Ze,I),le=Gt(U);q.set(le,Y[I]=Th(le,U))}re=new nn({props:{content:`
+                        ?expand=rel1,rel2.subrel21.subrel22
+                    `}});let Vt=n[5];const ii=I=>I[8].code;for(let I=0;I<Vt.length;I+=1){let U=Sh(n,Vt,I),le=ii(U);Pt.set(le,Tt[I]=Dh(le,U))}let ot=n[5];const N=I=>I[8].code;for(let I=0;I<ot.length;I+=1){let U=wh(n,ot,I),le=N(U);Ge.set(le,we[I]=Ah(le,U))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=O(),s=_("div"),l=_("p"),r=H("/api/collections/"),o=_("strong"),u=H(a),f=H("/records/"),c=_("strong"),c.textContent=":id",d=O(),Et&&Et.c(),h=O(),g=_("div"),y=_("p"),b=H("Fetch a single "),v=_("strong"),$=H(S),C=H(" record."),M=O(),T=_("div"),T.textContent="Client SDKs example",E=O(),D=_("div"),P=_("div");for(let I=0;I<L.length;I+=1)L[I].c();j=O(),G=_("div");for(let I=0;I<Y.length;I+=1)Y[I].c();Z=O(),J=_("div"),J.textContent="Path Parameters",K=O(),ne=_("table"),ne.innerHTML=`<thead><tr><th>Param</th> 
+            <th>Type</th> 
+            <th width="60%">Description</th></tr></thead> 
+    <tbody><tr><td>id</td> 
+            <td><span class="label">String</span></td> 
+            <td>ID of the record to view.</td></tr></tbody>`,ce=O(),be=_("div"),be.textContent="Query parameters",se=O(),x=_("table"),Te=_("thead"),Te.innerHTML=`<tr><th>Param</th> 
+            <th>Type</th> 
+            <th width="60%">Description</th></tr>`,te=O(),_e=_("tbody"),fe=_("tr"),ie=_("td"),ie.textContent="expand",ye=O(),He=_("td"),He.innerHTML='<span class="label">String</span>',Le=O(),Re=_("td"),ae=H(`Auto expand nested record relations. Ex.:
+                `),B(re.$$.fragment),ve=H(`
+                Supports up to 6-levels depth nested relations expansion. `),qe=_("br"),Ve=H(`
+                The expanded relations will be appended to the record under the
+                `),Je=_("code"),Je.textContent="@expand",me=H(" property (eg. "),Ae=_("code"),Ae.textContent='"@expand": {"rel1": {...}, ...}',X=H(`). Only the
+                relations that the user has permissions to `),ue=_("strong"),ue.textContent="view",Ue=H(" will be expanded."),bt=O(),it=_("div"),it.textContent="Responses",yt=O(),at=_("div"),dt=_("div");for(let I=0;I<Tt.length;I+=1)Tt[I].c();Jt=O(),he=_("div");for(let I=0;I<we.length;I+=1)we[I].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(g,"class","content m-b-base"),p(T,"class","section-title"),p(P,"class","tabs-header compact left"),p(G,"class","tabs-content"),p(D,"class","tabs m-b-lg"),p(J,"class","section-title"),p(ne,"class","table-compact table-border m-b-lg"),p(be,"class","section-title"),p(x,"class","table-compact table-border m-b-lg"),p(it,"class","section-title"),p(dt,"class","tabs-header compact left"),p(he,"class","tabs-content"),p(at,"class","tabs")},m(I,U){w(I,e,U),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(l,c),m(e,d),Et&&Et.m(e,null),w(I,h,U),w(I,g,U),m(g,y),m(y,b),m(y,v),m(v,$),m(y,C),w(I,M,U),w(I,T,U),w(I,E,U),w(I,D,U),m(D,P);for(let le=0;le<L.length;le+=1)L[le].m(P,null);m(D,j),m(D,G);for(let le=0;le<Y.length;le+=1)Y[le].m(G,null);w(I,Z,U),w(I,J,U),w(I,K,U),w(I,ne,U),w(I,ce,U),w(I,be,U),w(I,se,U),w(I,x,U),m(x,Te),m(x,te),m(x,_e),m(_e,fe),m(fe,ie),m(fe,ye),m(fe,He),m(fe,Le),m(fe,Re),m(Re,ae),V(re,Re,null),m(Re,ve),m(Re,qe),m(Re,Ve),m(Re,Je),m(Re,me),m(Re,Ae),m(Re,X),m(Re,ue),m(Re,Ue),w(I,bt,U),w(I,it,U),w(I,yt,U),w(I,at,U),m(at,dt);for(let le=0;le<Tt.length;le+=1)Tt[le].m(dt,null);m(at,Jt),m(at,he);for(let le=0;le<we.length;le+=1)we[le].m(he,null);et=!0},p(I,[U]){(!et||U&1)&&a!==(a=I[0].name+"")&&ge(u,a),I[1]?Et||(Et=Mh(),Et.c(),Et.m(e,null)):Et&&(Et.d(1),Et=null),(!et||U&1)&&S!==(S=I[0].name+"")&&ge($,S),U&24&&(de=I[4],L=rt(L,U,Se,1,I,de,R,P,un,Oh,null,Ch)),U&24&&(Ze=I[4],Me(),Y=rt(Y,U,Gt,1,I,Ze,q,G,Ft,Th,null,$h),Oe()),U&36&&(Vt=I[5],Tt=rt(Tt,U,ii,1,I,Vt,Pt,dt,un,Dh,null,Sh)),U&36&&(ot=I[5],Me(),we=rt(we,U,N,1,I,ot,Ge,he,Ft,Ah,null,wh),Oe())},i(I){if(!et){for(let U=0;U<Ze.length;U+=1)A(Y[U]);A(re.$$.fragment,I);for(let U=0;U<ot.length;U+=1)A(we[U]);et=!0}},o(I){for(let U=0;U<Y.length;U+=1)F(Y[U]);F(re.$$.fragment,I);for(let U=0;U<we.length;U+=1)F(we[U]);et=!1},d(I){I&&k(e),Et&&Et.d(),I&&k(h),I&&k(g),I&&k(M),I&&k(T),I&&k(E),I&&k(D);for(let U=0;U<L.length;U+=1)L[U].d();for(let U=0;U<Y.length;U+=1)Y[U].d();I&&k(Z),I&&k(J),I&&k(K),I&&k(ne),I&&k(ce),I&&k(be),I&&k(se),I&&k(x),z(re),I&&k(bt),I&&k(it),I&&k(yt),I&&k(at);for(let U=0;U<Tt.length;U+=1)Tt[U].d();for(let U=0;U<we.length;U+=1)we[U].d()}}}function vO(n,e,t){let i,{collection:s=new Fn}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(3,r=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.viewRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(o.push({code:200,body:JSON.stringify(W.dummyCollectionRecord(s),null,2)}),i&&o.push({code:403,body:`
+                    {
+                      "code": 403,
+                      "message": "Only admins can access this action.",
+                      "data": {}
+                    }
+                `}),o.push({code:404,body:`
+                {
+                  "code": 404,
+                  "message": "The requested resource wasn't found.",
+                  "data": {}
+                }
+            `})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
+                import PocketBase from 'pocketbase';
+
+                const client = new PocketBase("${ke.baseUrl}");
+
+                client.Records.getOne("${s==null?void 0:s.name}", "RECORD_ID")
+                    .then(function (record) {
+                        // success...
+                    }).catch(function (error) {
+                        // error...
+                    });
+            `}])},[s,i,l,r,a,o,u,f]}class kO extends Pe{constructor(e){super(),Ee(this,e,vO,yO,De,{collection:0})}}function Eh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Ph(n,e,t){const i=n.slice();return i[8]=e[t],i}function Lh(n,e,t){const i=n.slice();return i[13]=e[t],i}function Fh(n,e,t){const i=n.slice();return i[16]=e[t],i}function Ih(n,e,t){const i=n.slice();return i[16]=e[t],i}function Nh(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Rh(n,e){let t,i=e[16].lang+"",s,l,r,o;function a(){return e[6](e[16])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[16].lang+"")&&ge(s,i),f&20&&ee(t,"active",e[2]===e[16].lang)},d(u){u&&k(t),r=!1,o()}}}function jh(n,e){let t,i,s,l;return i=new nn({props:{content:e[16].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[16].code),i.$set(a),o&20&&ee(t,"active",e[2]===e[16].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function wO(n){let e;return{c(){e=_("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function SO(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $O(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=H("User "),i=H(t),s=H(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ge(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function CO(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=H("Relation record "),i=H(t),s=H(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ge(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function MO(n){let e,t,i,s,l;return{c(){e=H("FormData object."),t=_("br"),i=H(`
+                        Set to `),s=_("code"),s.textContent="null",l=H(" to delete already uploaded file(s).")},m(r,o){w(r,e,o),w(r,t,o),w(r,i,o),w(r,s,o),w(r,l,o)},p:oe,d(r){r&&k(e),r&&k(t),r&&k(i),r&&k(s),r&&k(l)}}}function OO(n){let e;return{c(){e=H("URL address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function TO(n){let e;return{c(){e=H("Email address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function DO(n){let e;return{c(){e=H("JSON array or object.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function AO(n){let e;return{c(){e=H("Number value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function EO(n){let e;return{c(){e=H("Plain text value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Hh(n,e){let t,i,s,l,r,o=e[13].name+"",a,u,f,c,d=W.getFieldValueType(e[13])+"",h,g,y,b;function v(E,D){return E[13].required?SO:wO}let S=v(e),$=S(e);function C(E,D){if(E[13].type==="text")return EO;if(E[13].type==="number")return AO;if(E[13].type==="json")return DO;if(E[13].type==="email")return TO;if(E[13].type==="url")return OO;if(E[13].type==="file")return MO;if(E[13].type==="relation")return CO;if(E[13].type==="user")return $O}let M=C(e),T=M&&M(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),$.c(),l=O(),r=_("span"),a=H(o),u=O(),f=_("td"),c=_("span"),h=H(d),g=O(),y=_("td"),T&&T.c(),b=O(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(E,D){w(E,t,D),m(t,i),m(i,s),$.m(s,null),m(s,l),m(s,r),m(r,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,y),T&&T.m(y,null),m(t,b)},p(E,D){e=E,S!==(S=v(e))&&($.d(1),$=S(e),$&&($.c(),$.m(s,l))),D&1&&o!==(o=e[13].name+"")&&ge(a,o),D&1&&d!==(d=W.getFieldValueType(e[13])+"")&&ge(h,d),M===(M=C(e))&&T?T.p(e,D):(T&&T.d(1),T=M&&M(e),T&&(T.c(),T.m(y,null)))},d(E){E&&k(t),$.d(),T&&T.d()}}}function qh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&8&&i!==(i=e[8].code+"")&&ge(s,i),f&10&&ee(t,"active",e[1]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function Vh(n,e){let t,i,s,l;return i=new nn({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&8&&(a.content=e[8].body),i.$set(a),o&10&&ee(t,"active",e[1]===e[8].code)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function PO(n){var Jt;let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,b,v=n[0].name+"",S,$,C,M,T,E,D,P,L,R,j,G=[],Y=new Map,q,Z,J=[],K=new Map,ne,ce,be,se,x,Te,te,_e=[],fe=new Map,ie,ye,He,Le,Re,ae=[],re=new Map,ve,qe,Ve=[],Je=new Map,me,Ae=n[5]&&Nh(),X=n[4];const ue=he=>he[16].lang;for(let he=0;he<X.length;he+=1){let we=Ih(n,X,he),Ge=ue(we);Y.set(Ge,G[he]=Rh(Ge,we))}let Ue=n[4];const bt=he=>he[16].lang;for(let he=0;he<Ue.length;he+=1){let we=Fh(n,Ue,he),Ge=bt(we);K.set(Ge,J[he]=jh(Ge,we))}let it=(Jt=n[0])==null?void 0:Jt.schema;const yt=he=>he[13].name;for(let he=0;he<it.length;he+=1){let we=Lh(n,it,he),Ge=yt(we);fe.set(Ge,_e[he]=Hh(Ge,we))}let at=n[3];const dt=he=>he[8].code;for(let he=0;he<at.length;he+=1){let we=Ph(n,at,he),Ge=dt(we);re.set(Ge,ae[he]=qh(Ge,we))}let Tt=n[3];const Pt=he=>he[8].code;for(let he=0;he<Tt.length;he+=1){let we=Eh(n,Tt,he),Ge=Pt(we);Je.set(Ge,Ve[he]=Vh(Ge,we))}return{c(){e=_("div"),t=_("strong"),t.textContent="POST",i=O(),s=_("div"),l=_("p"),r=H("/api/collections/"),o=_("strong"),u=H(a),f=H("/records"),c=O(),Ae&&Ae.c(),d=O(),h=_("div"),g=_("p"),y=H("Create a new "),b=_("strong"),S=H(v),$=H(" record."),C=O(),M=_("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
+        <code>multipart/form-data</code>.`,T=O(),E=_("p"),E.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",D=O(),P=_("div"),P.textContent="Client SDKs example",L=O(),R=_("div"),j=_("div");for(let he=0;he<G.length;he+=1)G[he].c();q=O(),Z=_("div");for(let he=0;he<J.length;he+=1)J[he].c();ne=O(),ce=_("div"),ce.textContent="Body Parameters",be=O(),se=_("table"),x=_("thead"),x.innerHTML=`<tr><th>Param</th> 
+            <th>Type</th> 
+            <th width="50%">Description</th></tr>`,Te=O(),te=_("tbody");for(let he=0;he<_e.length;he+=1)_e[he].c();ie=O(),ye=_("div"),ye.textContent="Responses",He=O(),Le=_("div"),Re=_("div");for(let he=0;he<ae.length;he+=1)ae[he].c();ve=O(),qe=_("div");for(let he=0;he<Ve.length;he+=1)Ve[he].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-success"),p(h,"class","content m-b-base"),p(P,"class","section-title"),p(j,"class","tabs-header compact left"),p(Z,"class","tabs-content"),p(R,"class","tabs m-b-lg"),p(ce,"class","section-title"),p(se,"class","table-compact table-border m-b-lg"),p(ye,"class","section-title"),p(Re,"class","tabs-header compact left"),p(qe,"class","tabs-content"),p(Le,"class","tabs")},m(he,we){w(he,e,we),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(e,c),Ae&&Ae.m(e,null),w(he,d,we),w(he,h,we),m(h,g),m(g,y),m(g,b),m(b,S),m(g,$),m(h,C),m(h,M),m(h,T),m(h,E),w(he,D,we),w(he,P,we),w(he,L,we),w(he,R,we),m(R,j);for(let Ge=0;Ge<G.length;Ge+=1)G[Ge].m(j,null);m(R,q),m(R,Z);for(let Ge=0;Ge<J.length;Ge+=1)J[Ge].m(Z,null);w(he,ne,we),w(he,ce,we),w(he,be,we),w(he,se,we),m(se,x),m(se,Te),m(se,te);for(let Ge=0;Ge<_e.length;Ge+=1)_e[Ge].m(te,null);w(he,ie,we),w(he,ye,we),w(he,He,we),w(he,Le,we),m(Le,Re);for(let Ge=0;Ge<ae.length;Ge+=1)ae[Ge].m(Re,null);m(Le,ve),m(Le,qe);for(let Ge=0;Ge<Ve.length;Ge+=1)Ve[Ge].m(qe,null);me=!0},p(he,[we]){var Ge;(!me||we&1)&&a!==(a=he[0].name+"")&&ge(u,a),he[5]?Ae||(Ae=Nh(),Ae.c(),Ae.m(e,null)):Ae&&(Ae.d(1),Ae=null),(!me||we&1)&&v!==(v=he[0].name+"")&&ge(S,v),we&20&&(X=he[4],G=rt(G,we,ue,1,he,X,Y,j,un,Rh,null,Ih)),we&20&&(Ue=he[4],Me(),J=rt(J,we,bt,1,he,Ue,K,Z,Ft,jh,null,Fh),Oe()),we&1&&(it=(Ge=he[0])==null?void 0:Ge.schema,_e=rt(_e,we,yt,1,he,it,fe,te,un,Hh,null,Lh)),we&10&&(at=he[3],ae=rt(ae,we,dt,1,he,at,re,Re,un,qh,null,Ph)),we&10&&(Tt=he[3],Me(),Ve=rt(Ve,we,Pt,1,he,Tt,Je,qe,Ft,Vh,null,Eh),Oe())},i(he){if(!me){for(let we=0;we<Ue.length;we+=1)A(J[we]);for(let we=0;we<Tt.length;we+=1)A(Ve[we]);me=!0}},o(he){for(let we=0;we<J.length;we+=1)F(J[we]);for(let we=0;we<Ve.length;we+=1)F(Ve[we]);me=!1},d(he){he&&k(e),Ae&&Ae.d(),he&&k(d),he&&k(h),he&&k(D),he&&k(P),he&&k(L),he&&k(R);for(let we=0;we<G.length;we+=1)G[we].d();for(let we=0;we<J.length;we+=1)J[we].d();he&&k(ne),he&&k(ce),he&&k(be),he&&k(se);for(let we=0;we<_e.length;we+=1)_e[we].d();he&&k(ie),he&&k(ye),he&&k(He),he&&k(Le);for(let we=0;we<ae.length;we+=1)ae[we].d();for(let we=0;we<Ve.length;we+=1)Ve[we].d()}}}function LO(n,e,t){let i,{collection:s=new Fn}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(2,r=c.lang),f=c=>t(1,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{var c,d;n.$$.dirty&1&&t(5,i=(s==null?void 0:s.createRule)===null),n.$$.dirty&1&&t(3,o=[{code:200,body:JSON.stringify(W.dummyCollectionRecord(s),null,2)},{code:400,body:`
+                {
+                  "code": 400,
+                  "message": "Failed to create record.",
+                  "data": {
+                    "${(d=(c=s==null?void 0:s.schema)==null?void 0:c[0])==null?void 0:d.name}": {
+                      "code": "validation_required",
+                      "message": "Missing required value."
+                    }
+                  }
+                }
+            `},{code:403,body:`
+                {
+                  "code": 403,
+                  "message": "You are not allowed to perform this request.",
+                  "data": {}
+                }
+            `}]),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
+                import PocketBase from 'pocketbase';
+
+                const client = new PocketBase("${ke.baseUrl}");
+
+                const data = { ... };
+
+                client.Records.create("${s==null?void 0:s.name}", data)
+                    .then(function (record) {
+                        // success...
+                    }).catch(function (error) {
+                        // error...
+                    });
+            `}])},[s,l,r,o,a,i,u,f]}class FO extends Pe{constructor(e){super(),Ee(this,e,LO,PO,De,{collection:0})}}function zh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Bh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Uh(n,e,t){const i=n.slice();return i[13]=e[t],i}function Wh(n,e,t){const i=n.slice();return i[16]=e[t],i}function Yh(n,e,t){const i=n.slice();return i[16]=e[t],i}function Kh(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Jh(n,e){let t,i=e[16].lang+"",s,l,r,o;function a(){return e[6](e[16])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[16].lang+"")&&ge(s,i),f&20&&ee(t,"active",e[2]===e[16].lang)},d(u){u&&k(t),r=!1,o()}}}function Gh(n,e){let t,i,s,l;return i=new nn({props:{content:e[16].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[16].code),i.$set(a),o&20&&ee(t,"active",e[2]===e[16].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function IO(n){let e;return{c(){e=_("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function NO(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function RO(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=H("User "),i=H(t),s=H(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ge(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function jO(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=H("Relation record "),i=H(t),s=H(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ge(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function HO(n){let e,t,i,s,l;return{c(){e=H("FormData object."),t=_("br"),i=H(`
+                        Set to `),s=_("code"),s.textContent="null",l=H(" to delete already uploaded file(s).")},m(r,o){w(r,e,o),w(r,t,o),w(r,i,o),w(r,s,o),w(r,l,o)},p:oe,d(r){r&&k(e),r&&k(t),r&&k(i),r&&k(s),r&&k(l)}}}function qO(n){let e;return{c(){e=H("URL address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function VO(n){let e;return{c(){e=H("Email address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function zO(n){let e;return{c(){e=H("JSON array or object.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function BO(n){let e;return{c(){e=H("Number value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function UO(n){let e;return{c(){e=H("Plain text value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Zh(n,e){let t,i,s,l,r,o=e[13].name+"",a,u,f,c,d=W.getFieldValueType(e[13])+"",h,g,y,b;function v(E,D){return E[13].required?NO:IO}let S=v(e),$=S(e);function C(E,D){if(E[13].type==="text")return UO;if(E[13].type==="number")return BO;if(E[13].type==="json")return zO;if(E[13].type==="email")return VO;if(E[13].type==="url")return qO;if(E[13].type==="file")return HO;if(E[13].type==="relation")return jO;if(E[13].type==="user")return RO}let M=C(e),T=M&&M(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),$.c(),l=O(),r=_("span"),a=H(o),u=O(),f=_("td"),c=_("span"),h=H(d),g=O(),y=_("td"),T&&T.c(),b=O(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(E,D){w(E,t,D),m(t,i),m(i,s),$.m(s,null),m(s,l),m(s,r),m(r,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,y),T&&T.m(y,null),m(t,b)},p(E,D){e=E,S!==(S=v(e))&&($.d(1),$=S(e),$&&($.c(),$.m(s,l))),D&1&&o!==(o=e[13].name+"")&&ge(a,o),D&1&&d!==(d=W.getFieldValueType(e[13])+"")&&ge(h,d),M===(M=C(e))&&T?T.p(e,D):(T&&T.d(1),T=M&&M(e),T&&(T.c(),T.m(y,null)))},d(E){E&&k(t),$.d(),T&&T.d()}}}function xh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&8&&i!==(i=e[8].code+"")&&ge(s,i),f&10&&ee(t,"active",e[1]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function Xh(n,e){let t,i,s,l;return i=new nn({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&8&&(a.content=e[8].body),i.$set(a),o&10&&ee(t,"active",e[1]===e[8].code)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function WO(n){var Et;let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,b,v,S=n[0].name+"",$,C,M,T,E,D,P,L,R,j,G,Y=[],q=new Map,Z,J,K=[],ne=new Map,ce,be,se,x,Te,te,_e,fe,ie,ye,He,Le=[],Re=new Map,ae,re,ve,qe,Ve,Je=[],me=new Map,Ae,X,ue=[],Ue=new Map,bt,it=n[5]&&Kh(),yt=n[4];const at=de=>de[16].lang;for(let de=0;de<yt.length;de+=1){let Se=Yh(n,yt,de),Ze=at(Se);q.set(Ze,Y[de]=Jh(Ze,Se))}let dt=n[4];const Tt=de=>de[16].lang;for(let de=0;de<dt.length;de+=1){let Se=Wh(n,dt,de),Ze=Tt(Se);ne.set(Ze,K[de]=Gh(Ze,Se))}let Pt=(Et=n[0])==null?void 0:Et.schema;const Jt=de=>de[13].name;for(let de=0;de<Pt.length;de+=1){let Se=Uh(n,Pt,de),Ze=Jt(Se);Re.set(Ze,Le[de]=Zh(Ze,Se))}let he=n[3];const we=de=>de[8].code;for(let de=0;de<he.length;de+=1){let Se=Bh(n,he,de),Ze=we(Se);me.set(Ze,Je[de]=xh(Ze,Se))}let Ge=n[3];const et=de=>de[8].code;for(let de=0;de<Ge.length;de+=1){let Se=zh(n,Ge,de),Ze=et(Se);Ue.set(Ze,ue[de]=Xh(Ze,Se))}return{c(){e=_("div"),t=_("strong"),t.textContent="PATCH",i=O(),s=_("div"),l=_("p"),r=H("/api/collections/"),o=_("strong"),u=H(a),f=H("/records/"),c=_("strong"),c.textContent=":id",d=O(),it&&it.c(),h=O(),g=_("div"),y=_("p"),b=H("Update a single "),v=_("strong"),$=H(S),C=H(" record."),M=O(),T=_("p"),T.innerHTML=`Body parameters could be sent as <code>application/json</code> or
+        <code>multipart/form-data</code>.`,E=O(),D=_("p"),D.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",P=O(),L=_("div"),L.textContent="Client SDKs example",R=O(),j=_("div"),G=_("div");for(let de=0;de<Y.length;de+=1)Y[de].c();Z=O(),J=_("div");for(let de=0;de<K.length;de+=1)K[de].c();ce=O(),be=_("div"),be.textContent="Path parameters",se=O(),x=_("table"),x.innerHTML=`<thead><tr><th>Param</th> 
+            <th>Type</th> 
+            <th width="60%">Description</th></tr></thead> 
+    <tbody><tr><td>id</td> 
+            <td><span class="label">String</span></td> 
+            <td>ID of the record to update.</td></tr></tbody>`,Te=O(),te=_("div"),te.textContent="Body Parameters",_e=O(),fe=_("table"),ie=_("thead"),ie.innerHTML=`<tr><th>Param</th> 
+            <th width="60%">Type</th> 
+            <th width="50%">Description</th></tr>`,ye=O(),He=_("tbody");for(let de=0;de<Le.length;de+=1)Le[de].c();ae=O(),re=_("div"),re.textContent="Responses",ve=O(),qe=_("div"),Ve=_("div");for(let de=0;de<Je.length;de+=1)Je[de].c();Ae=O(),X=_("div");for(let de=0;de<ue.length;de+=1)ue[de].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-warning"),p(g,"class","content m-b-base"),p(L,"class","section-title"),p(G,"class","tabs-header compact left"),p(J,"class","tabs-content"),p(j,"class","tabs m-b-lg"),p(be,"class","section-title"),p(x,"class","table-compact table-border m-b-lg"),p(te,"class","section-title"),p(fe,"class","table-compact table-border m-b-lg"),p(re,"class","section-title"),p(Ve,"class","tabs-header compact left"),p(X,"class","tabs-content"),p(qe,"class","tabs")},m(de,Se){w(de,e,Se),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(l,c),m(e,d),it&&it.m(e,null),w(de,h,Se),w(de,g,Se),m(g,y),m(y,b),m(y,v),m(v,$),m(y,C),m(g,M),m(g,T),m(g,E),m(g,D),w(de,P,Se),w(de,L,Se),w(de,R,Se),w(de,j,Se),m(j,G);for(let Ze=0;Ze<Y.length;Ze+=1)Y[Ze].m(G,null);m(j,Z),m(j,J);for(let Ze=0;Ze<K.length;Ze+=1)K[Ze].m(J,null);w(de,ce,Se),w(de,be,Se),w(de,se,Se),w(de,x,Se),w(de,Te,Se),w(de,te,Se),w(de,_e,Se),w(de,fe,Se),m(fe,ie),m(fe,ye),m(fe,He);for(let Ze=0;Ze<Le.length;Ze+=1)Le[Ze].m(He,null);w(de,ae,Se),w(de,re,Se),w(de,ve,Se),w(de,qe,Se),m(qe,Ve);for(let Ze=0;Ze<Je.length;Ze+=1)Je[Ze].m(Ve,null);m(qe,Ae),m(qe,X);for(let Ze=0;Ze<ue.length;Ze+=1)ue[Ze].m(X,null);bt=!0},p(de,[Se]){var Ze;(!bt||Se&1)&&a!==(a=de[0].name+"")&&ge(u,a),de[5]?it||(it=Kh(),it.c(),it.m(e,null)):it&&(it.d(1),it=null),(!bt||Se&1)&&S!==(S=de[0].name+"")&&ge($,S),Se&20&&(yt=de[4],Y=rt(Y,Se,at,1,de,yt,q,G,un,Jh,null,Yh)),Se&20&&(dt=de[4],Me(),K=rt(K,Se,Tt,1,de,dt,ne,J,Ft,Gh,null,Wh),Oe()),Se&1&&(Pt=(Ze=de[0])==null?void 0:Ze.schema,Le=rt(Le,Se,Jt,1,de,Pt,Re,He,un,Zh,null,Uh)),Se&10&&(he=de[3],Je=rt(Je,Se,we,1,de,he,me,Ve,un,xh,null,Bh)),Se&10&&(Ge=de[3],Me(),ue=rt(ue,Se,et,1,de,Ge,Ue,X,Ft,Xh,null,zh),Oe())},i(de){if(!bt){for(let Se=0;Se<dt.length;Se+=1)A(K[Se]);for(let Se=0;Se<Ge.length;Se+=1)A(ue[Se]);bt=!0}},o(de){for(let Se=0;Se<K.length;Se+=1)F(K[Se]);for(let Se=0;Se<ue.length;Se+=1)F(ue[Se]);bt=!1},d(de){de&&k(e),it&&it.d(),de&&k(h),de&&k(g),de&&k(P),de&&k(L),de&&k(R),de&&k(j);for(let Se=0;Se<Y.length;Se+=1)Y[Se].d();for(let Se=0;Se<K.length;Se+=1)K[Se].d();de&&k(ce),de&&k(be),de&&k(se),de&&k(x),de&&k(Te),de&&k(te),de&&k(_e),de&&k(fe);for(let Se=0;Se<Le.length;Se+=1)Le[Se].d();de&&k(ae),de&&k(re),de&&k(ve),de&&k(qe);for(let Se=0;Se<Je.length;Se+=1)Je[Se].d();for(let Se=0;Se<ue.length;Se+=1)ue[Se].d()}}}function YO(n,e,t){let i,{collection:s=new Fn}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(2,r=c.lang),f=c=>t(1,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{var c,d;n.$$.dirty&1&&t(5,i=(s==null?void 0:s.updateRule)===null),n.$$.dirty&1&&t(3,o=[{code:200,body:JSON.stringify(W.dummyCollectionRecord(s),null,2)},{code:400,body:`
+                {
+                  "code": 400,
+                  "message": "Failed to update record.",
+                  "data": {
+                    "${(d=(c=s==null?void 0:s.schema)==null?void 0:c[0])==null?void 0:d.name}": {
+                      "code": "validation_required",
+                      "message": "Missing required value."
+                    }
+                  }
+                }
+            `},{code:403,body:`
+                {
+                  "code": 403,
+                  "message": "You are not allowed to perform this request.",
+                  "data": {}
+                }
+            `},{code:404,body:`
+                {
+                  "code": 404,
+                  "message": "The requested resource wasn't found.",
+                  "data": {}
+                }
+            `}]),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
+                import PocketBase from 'pocketbase';
+
+                const client = new PocketBase("${ke.baseUrl}");
+
+                const data = { ... };
+
+                client.Records.update("${s==null?void 0:s.name}", "RECORD_ID", data)
+                    .then(function (record) {
+                        // success...
+                    }).catch(function (error) {
+                        // error...
+                    });
+            `}])},[s,l,r,o,a,i,u,f]}class KO extends Pe{constructor(e){super(),Ee(this,e,YO,WO,De,{collection:0})}}function Qh(n,e,t){const i=n.slice();return i[8]=e[t],i}function em(n,e,t){const i=n.slice();return i[8]=e[t],i}function tm(n,e,t){const i=n.slice();return i[13]=e[t],i}function nm(n,e,t){const i=n.slice();return i[13]=e[t],i}function im(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function sm(n,e){let t,i=e[13].lang+"",s,l,r,o;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&ge(s,i),f&24&&ee(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),r=!1,o()}}}function lm(n,e){let t,i,s,l;return i=new nn({props:{content:e[13].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[13].code),i.$set(a),o&24&&ee(t,"active",e[3]===e[13].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function rm(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&36&&ee(t,"active",e[2]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function om(n,e){let t,i,s,l;return i=new nn({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r,o&36&&ee(t,"active",e[2]===e[8].code)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function JO(n){let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,b,v,S=n[0].name+"",$,C,M,T,E,D,P,L=[],R=new Map,j,G,Y=[],q=new Map,Z,J,K,ne,ce,be,se,x,Te,te=[],_e=new Map,fe,ie,ye=[],He=new Map,Le,Re=n[1]&&im(),ae=n[4];const re=X=>X[13].lang;for(let X=0;X<ae.length;X+=1){let ue=nm(n,ae,X),Ue=re(ue);R.set(Ue,L[X]=sm(Ue,ue))}let ve=n[4];const qe=X=>X[13].lang;for(let X=0;X<ve.length;X+=1){let ue=tm(n,ve,X),Ue=qe(ue);q.set(Ue,Y[X]=lm(Ue,ue))}let Ve=n[5];const Je=X=>X[8].code;for(let X=0;X<Ve.length;X+=1){let ue=em(n,Ve,X),Ue=Je(ue);_e.set(Ue,te[X]=rm(Ue,ue))}let me=n[5];const Ae=X=>X[8].code;for(let X=0;X<me.length;X+=1){let ue=Qh(n,me,X),Ue=Ae(ue);He.set(Ue,ye[X]=om(Ue,ue))}return{c(){e=_("div"),t=_("strong"),t.textContent="DELETE",i=O(),s=_("div"),l=_("p"),r=H("/api/collections/"),o=_("strong"),u=H(a),f=H("/records/"),c=_("strong"),c.textContent=":id",d=O(),Re&&Re.c(),h=O(),g=_("div"),y=_("p"),b=H("Delete a single "),v=_("strong"),$=H(S),C=H(" record."),M=O(),T=_("div"),T.textContent="Client SDKs example",E=O(),D=_("div"),P=_("div");for(let X=0;X<L.length;X+=1)L[X].c();j=O(),G=_("div");for(let X=0;X<Y.length;X+=1)Y[X].c();Z=O(),J=_("div"),J.textContent="Path parameters",K=O(),ne=_("table"),ne.innerHTML=`<thead><tr><th>Param</th> 
+            <th>Type</th> 
+            <th width="60%">Description</th></tr></thead> 
+    <tbody><tr><td>id</td> 
+            <td><span class="label">String</span></td> 
+            <td>ID of the record to delete.</td></tr></tbody>`,ce=O(),be=_("div"),be.textContent="Responses",se=O(),x=_("div"),Te=_("div");for(let X=0;X<te.length;X+=1)te[X].c();fe=O(),ie=_("div");for(let X=0;X<ye.length;X+=1)ye[X].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-danger"),p(g,"class","content m-b-base"),p(T,"class","section-title"),p(P,"class","tabs-header compact left"),p(G,"class","tabs-content"),p(D,"class","tabs m-b-lg"),p(J,"class","section-title"),p(ne,"class","table-compact table-border m-b-lg"),p(be,"class","section-title"),p(Te,"class","tabs-header compact left"),p(ie,"class","tabs-content"),p(x,"class","tabs")},m(X,ue){w(X,e,ue),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(l,c),m(e,d),Re&&Re.m(e,null),w(X,h,ue),w(X,g,ue),m(g,y),m(y,b),m(y,v),m(v,$),m(y,C),w(X,M,ue),w(X,T,ue),w(X,E,ue),w(X,D,ue),m(D,P);for(let Ue=0;Ue<L.length;Ue+=1)L[Ue].m(P,null);m(D,j),m(D,G);for(let Ue=0;Ue<Y.length;Ue+=1)Y[Ue].m(G,null);w(X,Z,ue),w(X,J,ue),w(X,K,ue),w(X,ne,ue),w(X,ce,ue),w(X,be,ue),w(X,se,ue),w(X,x,ue),m(x,Te);for(let Ue=0;Ue<te.length;Ue+=1)te[Ue].m(Te,null);m(x,fe),m(x,ie);for(let Ue=0;Ue<ye.length;Ue+=1)ye[Ue].m(ie,null);Le=!0},p(X,[ue]){(!Le||ue&1)&&a!==(a=X[0].name+"")&&ge(u,a),X[1]?Re||(Re=im(),Re.c(),Re.m(e,null)):Re&&(Re.d(1),Re=null),(!Le||ue&1)&&S!==(S=X[0].name+"")&&ge($,S),ue&24&&(ae=X[4],L=rt(L,ue,re,1,X,ae,R,P,un,sm,null,nm)),ue&24&&(ve=X[4],Me(),Y=rt(Y,ue,qe,1,X,ve,q,G,Ft,lm,null,tm),Oe()),ue&36&&(Ve=X[5],te=rt(te,ue,Je,1,X,Ve,_e,Te,un,rm,null,em)),ue&36&&(me=X[5],Me(),ye=rt(ye,ue,Ae,1,X,me,He,ie,Ft,om,null,Qh),Oe())},i(X){if(!Le){for(let ue=0;ue<ve.length;ue+=1)A(Y[ue]);for(let ue=0;ue<me.length;ue+=1)A(ye[ue]);Le=!0}},o(X){for(let ue=0;ue<Y.length;ue+=1)F(Y[ue]);for(let ue=0;ue<ye.length;ue+=1)F(ye[ue]);Le=!1},d(X){X&&k(e),Re&&Re.d(),X&&k(h),X&&k(g),X&&k(M),X&&k(T),X&&k(E),X&&k(D);for(let ue=0;ue<L.length;ue+=1)L[ue].d();for(let ue=0;ue<Y.length;ue+=1)Y[ue].d();X&&k(Z),X&&k(J),X&&k(K),X&&k(ne),X&&k(ce),X&&k(be),X&&k(se),X&&k(x);for(let ue=0;ue<te.length;ue+=1)te[ue].d();for(let ue=0;ue<ye.length;ue+=1)ye[ue].d()}}}function GO(n,e,t){let i,{collection:s=new Fn}=e,l=204,r="JavaScript",o=[],a=[];const u=c=>t(3,r=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.deleteRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(o.push({code:204,body:`
+                null
+            `}),o.push({code:400,body:`
+                {
+                  "code": 400,
+                  "message": "Failed to delete record. Make sure that the record is not part of a required relation reference.",
+                  "data": {}
+                }
+            `}),i&&o.push({code:403,body:`
+                    {
+                      "code": 403,
+                      "message": "Only admins can access this action.",
+                      "data": {}
+                    }
+                `}),o.push({code:404,body:`
+                {
+                  "code": 404,
+                  "message": "The requested resource wasn't found.",
+                  "data": {}
+                }
+            `})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
+                import PocketBase from 'pocketbase';
+
+                const client = new PocketBase("${ke.baseUrl}");
+
+                client.Records.delete("${s==null?void 0:s.name}", "RECORD_ID")
+                    .then(function () {
+                        // success...
+                    }).catch(function (error) {
+                        // error...
+                    });
+            `}])},[s,i,l,r,a,o,u,f]}class ZO extends Pe{constructor(e){super(),Ee(this,e,GO,JO,De,{collection:0})}}function am(n,e,t){const i=n.slice();return i[4]=e[t],i}function um(n,e,t){const i=n.slice();return i[4]=e[t],i}function fm(n,e){let t,i=e[4].lang+"",s,l,r,o;function a(){return e[3](e[4])}return{key:n,first:null,c(){t=_("button"),s=H(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[4].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=Q(t,"click",a),r=!0)},p(u,f){e=u,f&4&&i!==(i=e[4].lang+"")&&ge(s,i),f&6&&ee(t,"active",e[1]===e[4].lang)},d(u){u&&k(t),r=!1,o()}}}function cm(n,e){let t,i,s,l;return i=new nn({props:{content:e[4].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[4].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&4&&(a.content=e[4].code),i.$set(a),o&6&&ee(t,"active",e[1]===e[4].lang)},i(r){l||(A(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function xO(n){let e,t,i,s,l,r,o,a,u=[],f=new Map,c,d,h=[],g=new Map,y,b,v,S,$,C=n[2];const M=D=>D[4].lang;for(let D=0;D<C.length;D+=1){let P=um(n,C,D),L=M(P);f.set(L,u[D]=fm(L,P))}let T=n[2];const E=D=>D[4].lang;for(let D=0;D<T.length;D+=1){let P=am(n,T,D),L=E(P);g.set(L,h[D]=cm(L,P))}return S=new nn({props:{content:JSON.stringify({action:"create",record:W.dummyCollectionRecord(n[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){e=_("div"),e.innerHTML=`<strong class="label label-primary">SSE</strong> 
+    <div class="content"><p>/api/realtime</p></div>`,t=O(),i=_("div"),i.innerHTML=`<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p> 
+    <p>Events are send for <strong>create</strong>, <strong>update</strong>
+        and <strong>delete</strong> record operations (see &quot;Event data format&quot; section below).</p> 
+    <div class="alert alert-info m-t-10"><div class="icon"><i class="ri-information-line"></i></div> 
+        <div class="contet"><p><strong>You could subscribe to a single record or to an entire collection.</strong></p> 
+            <p>When you subscribe to a <strong>single record</strong>, the collection&#39;s
+                <strong>ViewRule</strong> will be used to determine whether the subscriber has access to receive
+                the event message.</p> 
+            <p>When you subscribe to an <strong>entire collection</strong>, the collection&#39;s
+                <strong>ListRule</strong> will be used to determine whether the subscriber has access to receive
+                the event message.</p></div></div>`,s=O(),l=_("div"),l.textContent="Client SDKs example",r=O(),o=_("div"),a=_("div");for(let D=0;D<u.length;D+=1)u[D].c();c=O(),d=_("div");for(let D=0;D<h.length;D+=1)h[D].c();y=O(),b=_("div"),b.textContent="Event data format",v=O(),B(S.$$.fragment),p(e,"class","alert"),p(i,"class","content m-b-base"),p(l,"class","section-title"),p(a,"class","tabs-header compact left"),p(d,"class","tabs-content"),p(o,"class","tabs m-b-base"),p(b,"class","section-title")},m(D,P){w(D,e,P),w(D,t,P),w(D,i,P),w(D,s,P),w(D,l,P),w(D,r,P),w(D,o,P),m(o,a);for(let L=0;L<u.length;L+=1)u[L].m(a,null);m(o,c),m(o,d);for(let L=0;L<h.length;L+=1)h[L].m(d,null);w(D,y,P),w(D,b,P),w(D,v,P),V(S,D,P),$=!0},p(D,[P]){P&6&&(C=D[2],u=rt(u,P,M,1,D,C,f,a,un,fm,null,um)),P&6&&(T=D[2],Me(),h=rt(h,P,E,1,D,T,g,d,Ft,cm,null,am),Oe());const L={};P&1&&(L.content=JSON.stringify({action:"create",record:W.dummyCollectionRecord(D[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),S.$set(L)},i(D){if(!$){for(let P=0;P<T.length;P+=1)A(h[P]);A(S.$$.fragment,D),$=!0}},o(D){for(let P=0;P<h.length;P+=1)F(h[P]);F(S.$$.fragment,D),$=!1},d(D){D&&k(e),D&&k(t),D&&k(i),D&&k(s),D&&k(l),D&&k(r),D&&k(o);for(let P=0;P<u.length;P+=1)u[P].d();for(let P=0;P<h.length;P+=1)h[P].d();D&&k(y),D&&k(b),D&&k(v),z(S,D)}}}function XO(n,e,t){let{collection:i=new Fn}=e,s="JavaScript",l=[];const r=o=>t(1,s=o.lang);return n.$$set=o=>{"collection"in o&&t(0,i=o.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,l=[{lang:"JavaScript",code:`
+                import PocketBase from 'pocketbase';
+
+                const client = new PocketBase("${ke.baseUrl}");
+
+                // (Optionally) authenticate
+                client.Users.authViaEmail("test@example.com", "123456");
+
+                // Subscribe to changes in any record from the collection
+                client.Realtime.subscribe("${i==null?void 0:i.name}", function (e) {
+                    console.log(e.record);
+                });
+
+                // Subscribe to changes in a single record
+                client.Realtime.subscribe("${i==null?void 0:i.name}/RECORD_ID", function (e) {
+                    console.log(e.record);
+                });
+
+                // Unsubscribe
+                client.Realtime.unsubscribe() // remove all subscriptions
+                client.Realtime.unsubscribe("${i==null?void 0:i.name}") // remove the collection subscription
+                client.Realtime.unsubscribe("${i==null?void 0:i.name}/RECORD_ID") // remove the record subscription
+            `}])},[i,s,l,r]}class QO extends Pe{constructor(e){super(),Ee(this,e,XO,xO,De,{collection:0})}}function dm(n,e,t){const i=n.slice();return i[14]=e[t],i}function pm(n,e,t){const i=n.slice();return i[14]=e[t],i}function hm(n){let e,t,i,s;var l=n[14].component;function r(o){return{props:{collection:o[3]}}}return l&&(t=new l(r(n))),{c(){e=_("div"),t&&B(t.$$.fragment),i=O(),p(e,"class","tab-item active")},m(o,a){w(o,e,a),t&&V(t,e,null),m(e,i),s=!0},p(o,a){const u={};if(a&8&&(u.collection=o[3]),l!==(l=o[14].component)){if(t){Me();const f=t;F(f.$$.fragment,1,0,()=>{z(f,1)}),Oe()}l?(t=new l(r(o)),B(t.$$.fragment),A(t.$$.fragment,1),V(t,e,i)):t=null}else l&&t.$set(u)},i(o){s||(t&&A(t.$$.fragment,o),s=!0)},o(o){t&&F(t.$$.fragment,o),s=!1},d(o){o&&k(e),t&&z(t)}}}function mm(n,e){let t,i,s,l=e[4]===e[14].id&&hm(e);return{key:n,first:null,c(){t=st(),l&&l.c(),i=st(),this.first=t},m(r,o){w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){e=r,e[4]===e[14].id?l?(l.p(e,o),o&16&&A(l,1)):(l=hm(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Me(),F(l,1,1,()=>{l=null}),Oe())},i(r){s||(A(l),s=!0)},o(r){F(l),s=!1},d(r){r&&k(t),l&&l.d(r),r&&k(i)}}}function eT(n){let e,t=[],i=new Map,s,l=n[5];const r=o=>o[14].id;for(let o=0;o<l.length;o+=1){let a=dm(n,l,o),u=r(a);i.set(u,t[o]=mm(u,a))}return{c(){e=_("div");for(let o=0;o<t.length;o+=1)t[o].c();p(e,"class","tabs-content")},m(o,a){w(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(o,a){a&56&&(l=o[5],Me(),t=rt(t,a,r,1,o,l,i,e,Ft,mm,null,dm),Oe())},i(o){if(!s){for(let a=0;a<l.length;a+=1)A(t[a]);s=!0}},o(o){for(let a=0;a<t.length;a+=1)F(t[a]);s=!1},d(o){o&&k(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function gm(n,e){let t,i,s=e[14].label+"",l,r,o,a;function u(){return e[9](e[14])}function f(...c){return e[10](e[14],...c)}return{key:n,first:null,c(){t=_("button"),i=_("span"),l=H(s),r=O(),p(i,"class","txt"),p(t,"tabindex","0"),p(t,"class","tab-item"),ee(t,"active",e[4]===e[14].id),this.first=t},m(c,d){w(c,t,d),m(t,i),m(i,l),m(t,r),o||(a=[Q(t,"click",u),Q(t,"keydown",Yg(f))],o=!0)},p(c,d){e=c,d&48&&ee(t,"active",e[4]===e[14].id)},d(c){c&&k(t),o=!1,lt(a)}}}function tT(n){let e,t,i=n[3].name+"",s,l,r,o,a=[],u=new Map,f=n[5];const c=d=>d[14].id;for(let d=0;d<f.length;d+=1){let h=pm(n,f,d),g=c(h);u.set(g,a[d]=gm(g,h))}return{c(){e=_("h4"),t=_("strong"),s=H(i),l=H(" records API"),r=O(),o=_("div");for(let d=0;d<a.length;d+=1)a[d].c();p(o,"class","tabs-header stretched")},m(d,h){w(d,e,h),m(e,t),m(t,s),m(e,l),w(d,r,h),w(d,o,h);for(let g=0;g<a.length;g+=1)a[g].m(o,null)},p(d,h){h&8&&i!==(i=d[3].name+"")&&ge(s,i),h&114&&(f=d[5],a=rt(a,h,c,1,d,f,u,o,un,gm,null,pm))},d(d){d&&k(e),d&&k(r),d&&k(o);for(let h=0;h<a.length;h+=1)a[h].d()}}}function nT(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Close</span>',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[8]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function iT(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[nT],header:[tT],default:[eT]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&524312&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[11](null),z(e,s)}}}function sT(n,e,t){const i=[{id:"list",label:"List",component:bO},{id:"view",label:"View",component:kO},{id:"create",label:"Create",component:FO},{id:"update",label:"Update",component:KO},{id:"delete",label:"Delete",component:ZO},{id:"realtime",label:"Realtime",component:QO}];let s,l=new Fn,r=i[0].id;function o(v){return t(3,l=v),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(v){t(4,r=v)}function f(v,S){(v.code==="Enter"||v.code==="Space")&&(v.preventDefault(),u(S))}const c=()=>a(),d=v=>u(v.id),h=(v,S)=>f(S,v.id);function g(v){pe[v?"unshift":"push"](()=>{s=v,t(2,s)})}function y(v){ut.call(this,n,v)}function b(v){ut.call(this,n,v)}return[a,u,s,l,r,i,f,o,c,d,h,g,y,b]}class lT extends Pe{constructor(e){super(),Ee(this,e,sT,iT,De,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function rT(n){let e,t,i,s=[n[3]],l={};for(let r=0;r<s.length;r+=1)l=ct(l,s[r]);return{c(){e=_("textarea"),ci(e,l),ee(e,"svelte-1x1pbts",!0)},m(r,o){w(r,e,o),e.autofocus&&e.focus(),n[5](e),$e(e,n[0]),t||(i=[Q(e,"input",n[6]),Q(e,"keydown",n[2])],t=!0)},p(r,[o]){ci(e,l=bn(s,[o&8&&r[3]])),o&1&&$e(e,r[0]),ee(e,"svelte-1x1pbts",!0)},i:oe,o:oe,d(r){r&&k(e),n[5](null),t=!1,lt(i)}}}function oT(n,e,t){const i=["value","maxHeight"];let s=Ut(e,i),{value:l=""}=e,{maxHeight:r=200}=e,o,a;function u(){clearTimeout(a),a=setTimeout(()=>{o&&(t(1,o.style.height="",o),t(1,o.style.height=Math.min(o.scrollHeight+2,r)+"px",o))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)){h.preventDefault();const g=o.closest("form");g!=null&&g.requestSubmit&&g.requestSubmit()}}function c(h){pe[h?"unshift":"push"](()=>{o=h,t(1,o)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=ct(ct({},e),di(h)),t(3,s=Ut(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,r=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&3&&o&&typeof l!==void 0&&u()},[l,o,f,s,r,c,d]}class aT extends Pe{constructor(e){super(),Ee(this,e,oT,rT,De,{value:0,maxHeight:4})}}function uT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d;function h(y){n[2](y)}let g={id:n[3],required:n[1].required};return n[0]!==void 0&&(g.value=n[0]),f=new aT({props:g}),pe.push(()=>Ie(f,"value",h)),{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),V(f,y,b),d=!0},p(y,b){(!d||b&2&&i!==(i=W.getFieldTypeIcon(y[1].type)))&&p(t,"class",i),(!d||b&2)&&r!==(r=y[1].name+"")&&ge(o,r),(!d||b&8&&a!==(a=y[3]))&&p(e,"for",a);const v={};b&8&&(v.id=y[3]),b&2&&(v.required=y[1].required),!c&&b&1&&(c=!0,v.value=y[0],je(()=>c=!1)),f.$set(v)},i(y){d||(A(f.$$.fragment,y),d=!0)},o(y){F(f.$$.fragment,y),d=!1},d(y){y&&k(e),y&&k(u),z(f,y)}}}function fT(n){let e,t;return e=new Fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[uT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function cT(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(r){s=r,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class dT extends Pe{constructor(e){super(),Ee(this,e,cT,fT,De,{field:1,value:0})}}function pT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g,y,b;return{c(){var v,S;e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",h=(v=n[1].options)==null?void 0:v.min),p(f,"max",g=(S=n[1].options)==null?void 0:S.max),p(f,"step","any")},m(v,S){w(v,e,S),m(e,t),m(e,s),m(e,l),m(l,o),w(v,u,S),w(v,f,S),$e(f,n[0]),y||(b=Q(f,"input",n[2]),y=!0)},p(v,S){var $,C;S&2&&i!==(i=W.getFieldTypeIcon(v[1].type))&&p(t,"class",i),S&2&&r!==(r=v[1].name+"")&&ge(o,r),S&8&&a!==(a=v[3])&&p(e,"for",a),S&8&&c!==(c=v[3])&&p(f,"id",c),S&2&&d!==(d=v[1].required)&&(f.required=d),S&2&&h!==(h=($=v[1].options)==null?void 0:$.min)&&p(f,"min",h),S&2&&g!==(g=(C=v[1].options)==null?void 0:C.max)&&p(f,"max",g),S&1&&Mt(f.value)!==v[0]&&$e(f,v[0])},d(v){v&&k(e),v&&k(u),v&&k(f),y=!1,b()}}}function hT(n){let e,t;return e=new Fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[pT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function mT(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=Mt(this.value),t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class gT extends Pe{constructor(e){super(),Ee(this,e,mT,hT,De,{field:1,value:0})}}function _T(n){let e,t,i,s,l=n[1].name+"",r,o,a,u;return{c(){e=_("input"),i=O(),s=_("label"),r=H(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",o=n[3])},m(f,c){w(f,e,c),e.checked=n[0],w(f,i,c),w(f,s,c),m(s,r),a||(u=Q(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+"")&&ge(r,l),c&8&&o!==(o=f[3])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),a=!1,u()}}}function bT(n){let e,t;return e=new Fe({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[_T,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function yT(n,e,t){let{field:i=new wn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class vT extends Pe{constructor(e){super(),Ee(this,e,yT,bT,De,{field:1,value:0})}}function kT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=Q(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=W.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&ge(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&f.value!==y[0]&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function wT(n){let e,t;return e=new Fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[kT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function ST(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class $T extends Pe{constructor(e){super(),Ee(this,e,ST,wT,De,{field:1,value:0})}}function CT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=Q(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=W.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&ge(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function MT(n){let e,t;return e=new Fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[CT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function OT(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class TT extends Pe{constructor(e){super(),Ee(this,e,OT,MT,De,{field:1,value:0})}}function DT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h;function g(b){n[2](b)}let y={id:n[3],options:W.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(y.formattedValue=n[0]),c=new mf({props:y}),pe.push(()=>Ie(c,"formattedValue",g)),{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),a=H(" (UTC)"),f=O(),B(c.$$.fragment),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",u=n[3])},m(b,v){w(b,e,v),m(e,t),m(e,s),m(e,l),m(l,o),m(l,a),w(b,f,v),V(c,b,v),h=!0},p(b,v){(!h||v&2&&i!==(i=W.getFieldTypeIcon(b[1].type)))&&p(t,"class",i),(!h||v&2)&&r!==(r=b[1].name+"")&&ge(o,r),(!h||v&8&&u!==(u=b[3]))&&p(e,"for",u);const S={};v&8&&(S.id=b[3]),v&1&&(S.value=b[0]),!d&&v&1&&(d=!0,S.formattedValue=b[0],je(()=>d=!1)),c.$set(S)},i(b){h||(A(c.$$.fragment,b),h=!0)},o(b){F(c.$$.fragment,b),h=!1},d(b){b&&k(e),b&&k(f),z(c,b)}}}function AT(n){let e,t;return e=new Fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[DT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function ET(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(r){s=r,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class PT extends Pe{constructor(e){super(),Ee(this,e,ET,AT,De,{field:1,value:0})}}function _m(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=_("div"),t=H("Select up to "),s=H(i),l=H(" items."),p(e,"class","help-block")},m(r,o){w(r,e,o),m(e,t),m(e,s),m(e,l)},p(r,o){o&2&&i!==(i=r[1].options.maxSelect+"")&&ge(s,i)},d(r){r&&k(e)}}}function LT(n){var S,$,C;let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;function y(M){n[3](M)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],items:(S=n[1].options)==null?void 0:S.values,searchable:(($=n[1].options)==null?void 0:$.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new Fb({props:b}),pe.push(()=>Ie(f,"selected",y));let v=((C=n[1].options)==null?void 0:C.maxSelect)>1&&_m(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),d=O(),v&&v.c(),h=st(),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,T){w(M,e,T),m(e,t),m(e,s),m(e,l),m(l,o),w(M,u,T),V(f,M,T),w(M,d,T),v&&v.m(M,T),w(M,h,T),g=!0},p(M,T){var D,P,L;(!g||T&2&&i!==(i=W.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!g||T&2)&&r!==(r=M[1].name+"")&&ge(o,r),(!g||T&16&&a!==(a=M[4]))&&p(e,"for",a);const E={};T&16&&(E.id=M[4]),T&6&&(E.toggle=!M[1].required||M[2]),T&4&&(E.multiple=M[2]),T&2&&(E.items=(D=M[1].options)==null?void 0:D.values),T&2&&(E.searchable=((P=M[1].options)==null?void 0:P.values)>5),!c&&T&1&&(c=!0,E.selected=M[0],je(()=>c=!1)),f.$set(E),((L=M[1].options)==null?void 0:L.maxSelect)>1?v?v.p(M,T):(v=_m(M),v.c(),v.m(h.parentNode,h)):v&&(v.d(1),v=null)},i(M){g||(A(f.$$.fragment,M),g=!0)},o(M){F(f.$$.fragment,M),g=!1},d(M){M&&k(e),M&&k(u),z(f,M),M&&k(d),v&&v.d(M),M&&k(h)}}}function FT(n){let e,t;return e=new Fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[LT,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function IT(n,e,t){let i,{field:s=new wn}=e,{value:l=void 0}=e;function r(o){l=o,t(0,l),t(2,i),t(1,s)}return n.$$set=o=>{"field"in o&&t(1,s=o.field),"value"in o&&t(0,l=o.value)},n.$$.update=()=>{var o;n.$$.dirty&2&&t(2,i=((o=s.options)==null?void 0:o.maxSelect)>1),n.$$.dirty&5&&typeof l=="undefined"&&t(0,l=i?[]:null),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,r]}class NT extends Pe{constructor(e){super(),Ee(this,e,IT,FT,De,{field:1,value:0})}}function RT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("textarea"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"class","txt-mono txt-sm")},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=Q(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=W.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&ge(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function jT(n){let e,t;return e=new Fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[RT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function HT(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s!="undefined"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class qT extends Pe{constructor(e){super(),Ee(this,e,HT,jT,De,{field:1,value:0})}}function VT(n){let e,t;return{c(){e=_("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&k(e)}}}function zT(n){let e,t,i;return{c(){e=_("img"),ei(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){w(s,e,l)},p(s,l){l&4&&!ei(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&k(e)}}}function BT(n){let e;function t(l,r){return l[2]?zT:VT}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:oe,o:oe,d(l){s.d(l),l&&k(e)}}}function UT(n,e,t){let i,{file:s}=e,{size:l=50}=e;function r(){t(2,i=""),W.hasImageExtension(s==null?void 0:s.name)&&W.generateThumb(s,l,l).then(o=>{t(2,i=o)}).catch(o=>{console.warn("Unable to generate thumb: ",o)})}return n.$$set=o=>{"file"in o&&t(0,s=o.file),"size"in o&&t(1,l=o.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s!="undefined"&&r()},t(2,i=""),[s,l,i]}class WT extends Pe{constructor(e){super(),Ee(this,e,UT,BT,De,{file:0,size:1})}}function YT(n){let e,t;return{c(){e=_("img"),ei(e.src,t=n[2])||p(e,"src",t),p(e,"alt","Preview")},m(i,s){w(i,e,s)},p(i,s){s&4&&!ei(e.src,t=i[2])&&p(e,"src",t)},d(i){i&&k(e)}}}function KT(n){let e,t,i=n[2].substring(n[2].lastIndexOf("/")+1)+"",s,l,r,o,a,u,f;return{c(){e=_("a"),t=H("/../"),s=H(i),l=O(),r=_("div"),o=O(),a=_("button"),a.textContent="Close",p(e,"href",n[2]),p(e,"class","link-hint txt-ellipsis"),p(r,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-secondary")},m(c,d){w(c,e,d),m(e,t),m(e,s),w(c,l,d),w(c,r,d),w(c,o,d),w(c,a,d),u||(f=Q(a,"click",n[0]),u=!0)},p(c,d){d&4&&i!==(i=c[2].substring(c[2].lastIndexOf("/")+1)+"")&&ge(s,i),d&4&&p(e,"href",c[2])},d(c){c&&k(e),c&&k(l),c&&k(r),c&&k(o),c&&k(a),u=!1,f()}}}function JT(n){let e,t,i={class:"image-preview",popup:!0,$$slots:{footer:[KT],default:[YT]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[4](e),e.$on("show",n[5]),e.$on("hide",n[6]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&132&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[4](null),z(e,s)}}}function GT(n,e,t){let i,s="";function l(f){f!==""&&W.checkImageUrl(f).then(()=>{t(2,s=f),i==null||i.show()}).catch(()=>{console.warn("Invalid image preview url: ",f),r()})}function r(){return i==null?void 0:i.hide()}function o(f){pe[f?"unshift":"push"](()=>{i=f,t(1,i)})}function a(f){ut.call(this,n,f)}function u(f){ut.call(this,n,f)}return[r,i,s,l,o,a,u]}class ZT extends Pe{constructor(e){super(),Ee(this,e,GT,JT,De,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function xT(n){let e;return{c(){e=_("i"),p(e,"class","ri-file-line")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function XT(n){let e,t,i,s;return{c(){e=_("img"),ei(e.src,t=n[1])||p(e,"src",t),p(e,"alt",n[0])},m(l,r){w(l,e,r),i||(s=Q(e,"error",n[2]),i=!0)},p(l,r){r&2&&!ei(e.src,t=l[1])&&p(e,"src",t),r&1&&p(e,"alt",l[0])},d(l){l&&k(e),i=!1,s()}}}function QT(n){let e;function t(l,r){return l[1]?XT:xT}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:oe,o:oe,d(l){s.d(l),l&&k(e)}}}function eD(n,e,t){let{record:i}=e,{filename:s}=e,l="";function r(){t(1,l="")}return n.$$set=o=>{"record"in o&&t(3,i=o.record),"filename"in o&&t(0,s=o.filename)},n.$$.update=()=>{n.$$.dirty&9&&W.hasImageExtension(s)&&t(1,l=ke.Records.getFileUrl(i,`${s}?thumb=100x100`))},[s,l,r,i]}class jb extends Pe{constructor(e){super(),Ee(this,e,eD,QT,De,{record:3,filename:0})}}function bm(n,e,t){const i=n.slice();return i[25]=e[t],i[27]=t,i}function ym(n,e,t){const i=n.slice();return i[28]=e[t],i[27]=t,i}function tD(n){let e,t,i;function s(){return n[16](n[27])}return{c(){e=_("button"),e.innerHTML='<i class="ri-close-line"></i>',p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-circle btn-remove txt-hint")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Remove file")),Q(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,lt(i)}}}function nD(n){let e,t,i;function s(){return n[15](n[27])}return{c(){e=_("button"),e.innerHTML='<span class="txt">Restore</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(l,r){w(l,e,r),t||(i=Q(e,"click",s),t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,i()}}}function vm(n,e){let t,i,s,l,r,o,a,u=e[28]+"",f,c,d,h,g,y,b,v;s=new jb({props:{record:e[2],filename:e[28]}});function S(){return e[14](e[28])}function $(T,E){return E&18&&(g=null),g==null&&(g=!!T[1].includes(T[27])),g?nD:tD}let C=$(e,-1),M=C(e);return{key:n,first:null,c(){t=_("div"),i=_("figute"),B(s.$$.fragment),r=O(),o=_("a"),a=H("/.../"),f=H(u),h=O(),M.c(),p(i,"class","thumb"),p(i,"title",l=W.hasImageExtension(e[28])?"Preview":""),ee(i,"fade",e[1].includes(e[27])),ee(i,"link-fade",W.hasImageExtension(e[28])),p(o,"href",c=ke.Records.getFileUrl(e[2],e[28])),p(o,"class","filename"),p(o,"title",d="Download "+e[28]),p(o,"target","_blank"),p(o,"rel","noopener"),p(o,"download",""),ee(o,"txt-strikethrough",e[1].includes(e[27])),p(t,"class","list-item"),this.first=t},m(T,E){w(T,t,E),m(t,i),V(s,i,null),m(t,r),m(t,o),m(o,a),m(o,f),m(t,h),M.m(t,null),y=!0,b||(v=Q(i,"click",S),b=!0)},p(T,E){e=T;const D={};E&4&&(D.record=e[2]),E&16&&(D.filename=e[28]),s.$set(D),(!y||E&16&&l!==(l=W.hasImageExtension(e[28])?"Preview":""))&&p(i,"title",l),E&18&&ee(i,"fade",e[1].includes(e[27])),E&16&&ee(i,"link-fade",W.hasImageExtension(e[28])),(!y||E&16)&&u!==(u=e[28]+"")&&ge(f,u),(!y||E&20&&c!==(c=ke.Records.getFileUrl(e[2],e[28])))&&p(o,"href",c),(!y||E&16&&d!==(d="Download "+e[28]))&&p(o,"title",d),E&18&&ee(o,"txt-strikethrough",e[1].includes(e[27])),C===(C=$(e,E))&&M?M.p(e,E):(M.d(1),M=C(e),M&&(M.c(),M.m(t,null)))},i(T){y||(A(s.$$.fragment,T),y=!0)},o(T){F(s.$$.fragment,T),y=!1},d(T){T&&k(t),z(s),M.d(),b=!1,v()}}}function km(n){let e,t,i,s,l,r,o,a,u=n[25].name+"",f,c,d,h,g,y,b,v;i=new WT({props:{file:n[25]}});function S(){return n[17](n[27])}return{c(){e=_("div"),t=_("figute"),B(i.$$.fragment),s=O(),l=_("div"),r=_("small"),r.textContent="New",o=O(),a=_("span"),f=H(u),d=O(),h=_("button"),h.innerHTML='<i class="ri-close-line"></i>',p(t,"class","thumb"),p(r,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[25].name),p(h,"type","button"),p(h,"class","btn btn-secondary btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m($,C){w($,e,C),m(e,t),V(i,t,null),m(e,s),m(e,l),m(l,r),m(l,o),m(l,a),m(a,f),m(e,d),m(e,h),y=!0,b||(v=[Xe(g=St.call(null,h,"Remove file")),Q(h,"click",S)],b=!0)},p($,C){n=$;const M={};C&1&&(M.file=n[25]),i.$set(M),(!y||C&1)&&u!==(u=n[25].name+"")&&ge(f,u),(!y||C&1&&c!==(c=n[25].name))&&p(l,"title",c)},i($){y||(A(i.$$.fragment,$),y=!0)},o($){F(i.$$.fragment,$),y=!1},d($){$&&k(e),z(i),b=!1,lt(v)}}}function wm(n){let e,t,i,s,l,r;return{c(){e=_("div"),t=_("input"),i=O(),s=_("button"),s.innerHTML=`<i class="ri-upload-cloud-line"></i> 
+                    <span class="txt">Upload new file</span>`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(o,a){w(o,e,a),m(e,t),n[18](t),m(e,i),m(e,s),l||(r=[Q(t,"change",n[19]),Q(s,"click",n[20])],l=!0)},p(o,a){a&32&&(t.multiple=o[5])},d(o){o&&k(e),n[18](null),l=!1,lt(r)}}}function iD(n){let e,t,i,s,l,r=n[3].name+"",o,a,u,f,c=[],d=new Map,h,g,y,b=n[4];const v=T=>T[28];for(let T=0;T<b.length;T+=1){let E=ym(n,b,T),D=v(E);d.set(D,c[T]=vm(D,E))}let S=n[0],$=[];for(let T=0;T<S.length;T+=1)$[T]=km(bm(n,S,T));const C=T=>F($[T],1,1,()=>{$[T]=null});let M=!n[9]&&wm(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("div");for(let T=0;T<c.length;T+=1)c[T].c();h=O();for(let T=0;T<$.length;T+=1)$[T].c();g=O(),M&&M.c(),p(t,"class",i=W.getFieldTypeIcon(n[3].type)),p(l,"class","txt"),p(e,"for",a=n[24]),p(f,"class","files-list")},m(T,E){w(T,e,E),m(e,t),m(e,s),m(e,l),m(l,o),w(T,u,E),w(T,f,E);for(let D=0;D<c.length;D+=1)c[D].m(f,null);m(f,h);for(let D=0;D<$.length;D+=1)$[D].m(f,null);m(f,g),M&&M.m(f,null),n[21](f),y=!0},p(T,E){if((!y||E&8&&i!==(i=W.getFieldTypeIcon(T[3].type)))&&p(t,"class",i),(!y||E&8)&&r!==(r=T[3].name+"")&&ge(o,r),(!y||E&16777216&&a!==(a=T[24]))&&p(e,"for",a),E&3222&&(b=T[4],Me(),c=rt(c,E,v,1,T,b,d,f,Ft,vm,h,ym),Oe()),E&4097){S=T[0];let D;for(D=0;D<S.length;D+=1){const P=bm(T,S,D);$[D]?($[D].p(P,E),A($[D],1)):($[D]=km(P),$[D].c(),A($[D],1),$[D].m(f,g))}for(Me(),D=S.length;D<$.length;D+=1)C(D);Oe()}T[9]?M&&(M.d(1),M=null):M?M.p(T,E):(M=wm(T),M.c(),M.m(f,null))},i(T){if(!y){for(let E=0;E<b.length;E+=1)A(c[E]);for(let E=0;E<S.length;E+=1)A($[E]);y=!0}},o(T){for(let E=0;E<c.length;E+=1)F(c[E]);$=$.filter(Boolean);for(let E=0;E<$.length;E+=1)F($[E]);y=!1},d(T){T&&k(e),T&&k(u),T&&k(f);for(let E=0;E<c.length;E+=1)c[E].d();Bn($,T),M&&M.d(),n[21](null)}}}function sD(n){let e,t,i,s;e=new Fe({props:{class:"form-field form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[iD,({uniqueId:r})=>({24:r}),({uniqueId:r})=>r?16777216:0]},$$scope:{ctx:n}}});let l={};return i=new ZT({props:l}),n[22](i),{c(){B(e.$$.fragment),t=O(),B(i.$$.fragment)},m(r,o){V(e,r,o),w(r,t,o),V(i,r,o),s=!0},p(r,[o]){const a={};o&8&&(a.class="form-field form-field-file "+(r[3].required?"required":"")),o&8&&(a.name=r[3].name),o&1090520063&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};i.$set(u)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){F(e.$$.fragment,r),F(i.$$.fragment,r),s=!1},d(r){z(e,r),r&&k(t),n[22](null),z(i,r)}}}function lD(n,e,t){let i,s,l,{record:r}=e,{value:o=null}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new wn}=e,c,d,h;function g(R){W.removeByValue(u,R),t(1,u)}function y(R){W.pushUnique(u,R),t(1,u)}function b(R){W.isEmpty(a[R])||a.splice(R,1),t(0,a)}function v(){h==null||h.dispatchEvent(new CustomEvent("change",{detail:{value:o,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const S=R=>W.hasImageExtension(R)?d==null?void 0:d.show(ke.Records.getFileUrl(r,R)):!1,$=R=>g(R),C=R=>y(R),M=R=>b(R);function T(R){pe[R?"unshift":"push"](()=>{c=R,t(6,c)})}const E=()=>{for(let R of c.files)a.push(R);t(0,a),t(6,c.value=null,c)},D=()=>c==null?void 0:c.click();function P(R){pe[R?"unshift":"push"](()=>{h=R,t(8,h)})}function L(R){pe[R?"unshift":"push"](()=>{d=R,t(7,d)})}return n.$$set=R=>{"record"in R&&t(2,r=R.record),"value"in R&&t(13,o=R.value),"uploadedFiles"in R&&t(0,a=R.uploadedFiles),"deletedFileIndexes"in R&&t(1,u=R.deletedFileIndexes),"field"in R&&t(3,f=R.field)},n.$$.update=()=>{var R,j;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=W.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=W.toArray(u))),n.$$.dirty&8&&t(5,i=((R=f.options)==null?void 0:R.maxSelect)>1),n.$$.dirty&8224&&(typeof o=="undefined"||o===null)&&t(13,o=i?[]:null),n.$$.dirty&8192&&t(4,s=W.toArray(o)),n.$$.dirty&27&&t(9,l=(s.length||a.length)&&((j=f.options)==null?void 0:j.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&v()},[a,u,r,f,s,i,c,d,h,l,g,y,b,o,S,$,C,M,T,E,D,P,L]}class rD extends Pe{constructor(e){super(),Ee(this,e,lD,sD,De,{record:2,value:13,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function Sm(n){let e,t;return{c(){e=_("small"),t=H(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){w(i,e,s),m(e,t)},p(i,s){s&2&&ge(t,i[1])},d(i){i&&k(e)}}}function oD(n){let e,t,i,s,l,r=n[0].id+"",o,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&Sm(n);return{c(){e=_("i"),i=O(),s=_("div"),l=_("div"),o=H(r),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){w(d,e,h),w(d,i,h),w(d,s,h),m(s,l),m(l,o),m(s,a),c&&c.m(s,null),u||(f=Xe(t=St.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Jn(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&r!==(r=d[0].id+"")&&ge(o,r),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=Sm(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:oe,o:oe,d(d){d&&k(e),d&&k(i),d&&k(s),c&&c.d(),u=!1,f()}}}function aD(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function r(o){o=o||{};const a=["name","title","label","key","email","heading","content",...Object.keys(o)];for(const u of a)if(typeof o[u]=="string"&&!W.isEmpty(o[u])&&!s.includes(u))return u+": "+o[u];return""}return n.$$set=o=>{"item"in o&&t(0,l=o.item)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=r(l))},[l,i]}class uD extends Pe{constructor(e){super(),Ee(this,e,aD,oD,De,{item:0})}}function $m(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Load more</span>',p(e,"type","button"),p(e,"class","btn btn-block btn-sm"),ee(e,"btn-loading",n[6]),ee(e,"btn-disabled",n[6])},m(s,l){w(s,e,l),t||(i=Q(e,"click",Un(n[14])),t=!0)},p(s,l){l&64&&ee(e,"btn-loading",s[6]),l&64&&ee(e,"btn-disabled",s[6])},d(s){s&&k(e),t=!1,i()}}}function fD(n){let e,t=n[7]&&$m(n);return{c(){t&&t.c(),e=st()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[7]?t?t.p(i,s):(t=$m(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function cD(n){let e,t,i,s;const l=[{selectPlaceholder:n[8]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:n[4]},{optionComponent:n[4]},{multiple:n[2]},{class:"records-select block-options"},n[10]];function r(u){n[15](u)}function o(u){n[16](u)}let a={$$slots:{afterOptions:[fD]},$$scope:{ctx:n}};for(let u=0;u<l.length;u+=1)a=ct(a,l[u]);return n[1]!==void 0&&(a.keyOfSelected=n[1]),n[0]!==void 0&&(a.selected=n[0]),e=new ws({props:a}),pe.push(()=>Ie(e,"keyOfSelected",r)),pe.push(()=>Ie(e,"selected",o)),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){B(e.$$.fragment)},m(u,f){V(e,u,f),s=!0},p(u,[f]){const c=f&1340?bn(l,[f&264&&{selectPlaceholder:u[8]?"Loading...":u[3]},f&32&&{items:u[5]},f&32&&{searchable:u[5].length>5},l[3],f&16&&{labelComponent:u[4]},f&16&&{optionComponent:u[4]},f&4&&{multiple:u[2]},l[7],f&1024&&hi(u[10])]):{};f&4194496&&(c.$$scope={dirty:f,ctx:u}),!t&&f&2&&(t=!0,c.keyOfSelected=u[1],je(()=>t=!1)),!i&&f&1&&(i=!0,c.selected=u[0],je(()=>i=!1)),e.$set(c)},i(u){s||(A(e.$$.fragment,u),s=!0)},o(u){F(e.$$.fragment,u),s=!1},d(u){z(e,u)}}}function dD(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent","collectionId"];let r=Ut(e,l);const o="select_"+W.randomString(5);let{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=uD}=e,{collectionId:h}=e,g=[],y=1,b=0,v=!1,S=!1;$();async function $(){const L=W.toArray(f);if(!(!h||!L.length)){t(13,S=!0);try{const R=[];for(const j of L)R.push(`id="${j}"`);t(0,u=await ke.Records.getFullList(h,200,{sort:"-created",filter:R.join("||"),$cancelKey:o+"loadSelected"})),t(5,g=W.filterDuplicatesByKey(g.concat(u)))}catch(R){ke.errorResponseHandler(R)}t(13,S=!1)}}async function C(L=!1){if(!!h){t(6,v=!0);try{const R=L?1:y+1,j=await ke.Records.getList(h,R,200,{sort:"-created",$cancelKey:o+"loadList"});L&&t(5,g=[]),t(5,g=W.filterDuplicatesByKey(g.concat(j.items))),y=j.page,t(12,b=j.totalItems)}catch(R){ke.errorResponseHandler(R)}t(6,v=!1)}}const M=()=>C();function T(L){f=L,t(1,f)}function E(L){u=L,t(0,u)}function D(L){ut.call(this,n,L)}function P(L){ut.call(this,n,L)}return n.$$set=L=>{e=ct(ct({},e),di(L)),t(10,r=Ut(e,l)),"multiple"in L&&t(2,a=L.multiple),"selected"in L&&t(0,u=L.selected),"keyOfSelected"in L&&t(1,f=L.keyOfSelected),"selectPlaceholder"in L&&t(3,c=L.selectPlaceholder),"optionComponent"in L&&t(4,d=L.optionComponent),"collectionId"in L&&t(11,h=L.collectionId)},n.$$.update=()=>{n.$$.dirty&2048&&h&&C(),n.$$.dirty&8256&&t(8,i=v||S),n.$$.dirty&4128&&t(7,s=b>g.length)},[u,f,a,c,d,g,v,s,i,C,r,h,b,S,M,T,E,D,P]}class pD extends Pe{constructor(e){super(),Ee(this,e,dD,cD,De,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4,collectionId:11})}}function Cm(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=_("div"),t=H("Select up to "),s=H(i),l=H(" items."),p(e,"class","help-block")},m(r,o){w(r,e,o),m(e,t),m(e,s),m(e,l)},p(r,o){o&2&&i!==(i=r[1].options.maxSelect+"")&&ge(s,i)},d(r){r&&k(e)}}}function hD(n){var S,$;let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;function y(C){n[3](C)}let b={toggle:!0,id:n[4],multiple:n[2],collectionId:(S=n[1].options)==null?void 0:S.collectionId};n[0]!==void 0&&(b.keyOfSelected=n[0]),f=new pD({props:b}),pe.push(()=>Ie(f,"keyOfSelected",y));let v=(($=n[1].options)==null?void 0:$.maxSelect)>1&&Cm(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),d=O(),v&&v.c(),h=st(),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(C,M){w(C,e,M),m(e,t),m(e,s),m(e,l),m(l,o),w(C,u,M),V(f,C,M),w(C,d,M),v&&v.m(C,M),w(C,h,M),g=!0},p(C,M){var E,D;(!g||M&2&&i!==(i=W.getFieldTypeIcon(C[1].type)))&&p(t,"class",i),(!g||M&2)&&r!==(r=C[1].name+"")&&ge(o,r),(!g||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=(E=C[1].options)==null?void 0:E.collectionId),!c&&M&1&&(c=!0,T.keyOfSelected=C[0],je(()=>c=!1)),f.$set(T),((D=C[1].options)==null?void 0:D.maxSelect)>1?v?v.p(C,M):(v=Cm(C),v.c(),v.m(h.parentNode,h)):v&&(v.d(1),v=null)},i(C){g||(A(f.$$.fragment,C),g=!0)},o(C){F(f.$$.fragment,C),g=!1},d(C){C&&k(e),C&&k(u),z(f,C),C&&k(d),v&&v.d(C),C&&k(h)}}}function mD(n){let e,t;return e=new Fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[hD,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function gD(n,e,t){let i,{field:s=new wn}=e,{value:l=void 0}=e;function r(o){l=o,t(0,l),t(2,i),t(1,s)}return n.$$set=o=>{"field"in o&&t(1,s=o.field),"value"in o&&t(0,l=o.value)},n.$$.update=()=>{var o;n.$$.dirty&2&&t(2,i=((o=s.options)==null?void 0:o.maxSelect)>1),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(s.options.maxSelect-1))},[l,s,i,r]}class _D extends Pe{constructor(e){super(),Ee(this,e,gD,mD,De,{field:1,value:0})}}function bD(n){let e,t,i,s,l,r=n[0].id+"",o,a,u,f=n[0].email+"",c,d,h;return{c(){e=_("i"),i=O(),s=_("div"),l=_("div"),o=H(r),a=O(),u=_("small"),c=H(f),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(u,"class","block txt-hint txt-ellipsis"),p(s,"class","content")},m(g,y){w(g,e,y),w(g,i,y),w(g,s,y),m(s,l),m(l,o),m(s,a),m(s,u),m(u,c),d||(h=Xe(t=St.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),d=!0)},p(g,[y]){t&&Jn(t.update)&&y&1&&t.update.call(null,{text:JSON.stringify(g[0],null,2),position:"left",class:"code"}),y&1&&r!==(r=g[0].id+"")&&ge(o,r),y&1&&f!==(f=g[0].email+"")&&ge(c,f)},i:oe,o:oe,d(g){g&&k(e),g&&k(i),g&&k(s),d=!1,h()}}}function yD(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class bu extends Pe{constructor(e){super(),Ee(this,e,yD,bD,De,{item:0})}}function Mm(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Load more</span>',p(e,"type","button"),p(e,"class","btn btn-block btn-sm"),ee(e,"btn-loading",n[6]),ee(e,"btn-disabled",n[6])},m(s,l){w(s,e,l),t||(i=Q(e,"click",Un(n[13])),t=!0)},p(s,l){l&64&&ee(e,"btn-loading",s[6]),l&64&&ee(e,"btn-disabled",s[6])},d(s){s&&k(e),t=!1,i()}}}function vD(n){let e,t=n[7]&&Mm(n);return{c(){t&&t.c(),e=st()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[7]?t?t.p(i,s):(t=Mm(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function kD(n){let e,t,i,s;const l=[{selectPlaceholder:n[8]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:bu},{optionComponent:n[4]},{multiple:n[2]},{class:"users-select block-options"},n[10]];function r(u){n[14](u)}function o(u){n[15](u)}let a={$$slots:{afterOptions:[vD]},$$scope:{ctx:n}};for(let u=0;u<l.length;u+=1)a=ct(a,l[u]);return n[1]!==void 0&&(a.keyOfSelected=n[1]),n[0]!==void 0&&(a.selected=n[0]),e=new ws({props:a}),pe.push(()=>Ie(e,"keyOfSelected",r)),pe.push(()=>Ie(e,"selected",o)),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){B(e.$$.fragment)},m(u,f){V(e,u,f),s=!0},p(u,[f]){const c=f&1340?bn(l,[f&264&&{selectPlaceholder:u[8]?"Loading...":u[3]},f&32&&{items:u[5]},f&32&&{searchable:u[5].length>5},l[3],f&0&&{labelComponent:bu},f&16&&{optionComponent:u[4]},f&4&&{multiple:u[2]},l[7],f&1024&&hi(u[10])]):{};f&2097344&&(c.$$scope={dirty:f,ctx:u}),!t&&f&2&&(t=!0,c.keyOfSelected=u[1],je(()=>t=!1)),!i&&f&1&&(i=!0,c.selected=u[0],je(()=>i=!1)),e.$set(c)},i(u){s||(A(e.$$.fragment,u),s=!0)},o(u){F(e.$$.fragment,u),s=!1},d(u){z(e,u)}}}function wD(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent"];let r=Ut(e,l);const o="select_"+W.randomString(5);let{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=bu}=e,h=[],g=1,y=0,b=!1,v=!1;$(),S();async function S(){const P=W.toArray(f);if(!!P.length){t(12,v=!0);try{const L=[];for(const R of P)L.push(`id="${R}"`);t(0,u=await ke.Users.getFullList(100,{sort:"-created",filter:L.join("||"),$cancelKey:o+"loadSelected"})),t(5,h=W.filterDuplicatesByKey(h.concat(u)))}catch(L){ke.errorResponseHandler(L)}t(12,v=!1)}}async function $(P=!1){t(6,b=!0);try{const L=P?1:g+1,R=await ke.Users.getList(L,200,{sort:"-created",$cancelKey:o+"loadList"});P&&t(5,h=[]),t(5,h=W.filterDuplicatesByKey(h.concat(R.items))),g=R.page,t(11,y=R.totalItems)}catch(L){ke.errorResponseHandler(L)}t(6,b=!1)}const C=()=>$();function M(P){f=P,t(1,f)}function T(P){u=P,t(0,u)}function E(P){ut.call(this,n,P)}function D(P){ut.call(this,n,P)}return n.$$set=P=>{e=ct(ct({},e),di(P)),t(10,r=Ut(e,l)),"multiple"in P&&t(2,a=P.multiple),"selected"in P&&t(0,u=P.selected),"keyOfSelected"in P&&t(1,f=P.keyOfSelected),"selectPlaceholder"in P&&t(3,c=P.selectPlaceholder),"optionComponent"in P&&t(4,d=P.optionComponent)},n.$$.update=()=>{n.$$.dirty&4160&&t(8,i=b||v),n.$$.dirty&2080&&t(7,s=y>h.length)},[u,f,a,c,d,h,b,s,i,$,r,y,v,C,M,T,E,D]}class SD extends Pe{constructor(e){super(),Ee(this,e,wD,kD,De,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4})}}function Om(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=_("div"),t=H("Select up to "),s=H(i),l=H(" users."),p(e,"class","help-block")},m(r,o){w(r,e,o),m(e,t),m(e,s),m(e,l)},p(r,o){o&2&&i!==(i=r[1].options.maxSelect+"")&&ge(s,i)},d(r){r&&k(e)}}}function $D(n){var S;let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;function y($){n[4]($)}let b={toggle:!0,id:n[5],multiple:n[2],disabled:n[3]};n[0]!==void 0&&(b.keyOfSelected=n[0]),f=new SD({props:b}),pe.push(()=>Ie(f,"keyOfSelected",y));let v=((S=n[1].options)==null?void 0:S.maxSelect)>1&&Om(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),d=O(),v&&v.c(),h=st(),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[5])},m($,C){w($,e,C),m(e,t),m(e,s),m(e,l),m(l,o),w($,u,C),V(f,$,C),w($,d,C),v&&v.m($,C),w($,h,C),g=!0},p($,C){var T;(!g||C&2&&i!==(i=W.getFieldTypeIcon($[1].type)))&&p(t,"class",i),(!g||C&2)&&r!==(r=$[1].name+"")&&ge(o,r),(!g||C&32&&a!==(a=$[5]))&&p(e,"for",a);const M={};C&32&&(M.id=$[5]),C&4&&(M.multiple=$[2]),C&8&&(M.disabled=$[3]),!c&&C&1&&(c=!0,M.keyOfSelected=$[0],je(()=>c=!1)),f.$set(M),((T=$[1].options)==null?void 0:T.maxSelect)>1?v?v.p($,C):(v=Om($),v.c(),v.m(h.parentNode,h)):v&&(v.d(1),v=null)},i($){g||(A(f.$$.fragment,$),g=!0)},o($){F(f.$$.fragment,$),g=!1},d($){$&&k(e),$&&k(u),z(f,$),$&&k(d),v&&v.d($),$&&k(h)}}}function CD(n){let e,t;return e=new Fe({props:{class:"form-field "+(n[1].required?"required":"")+" "+(n[3]?"disabled":""),name:n[1].name,$$slots:{default:[$D,({uniqueId:i})=>({5:i}),({uniqueId:i})=>i?32:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&10&&(l.class="form-field "+(i[1].required?"required":"")+" "+(i[3]?"disabled":"")),s&2&&(l.name=i[1].name),s&111&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function MD(n,e,t){let i,s,{field:l=new wn}=e,{value:r=void 0}=e;function o(a){r=a,t(0,r),t(2,s),t(1,l)}return n.$$set=a=>{"field"in a&&t(1,l=a.field),"value"in a&&t(0,r=a.value)},n.$$.update=()=>{var a;n.$$.dirty&2&&t(2,s=((a=l.options)==null?void 0:a.maxSelect)>1),n.$$.dirty&7&&s&&Array.isArray(r)&&r.length>l.options.maxSelect&&t(0,r=r.slice(l.options.maxSelect-1)),n.$$.dirty&3&&t(3,i=!W.isEmpty(r)&&l.system)},[r,l,s,i,o]}class OD extends Pe{constructor(e){super(),Ee(this,e,MD,CD,De,{field:1,value:0})}}function Tm(n,e,t){const i=n.slice();return i[40]=e[t],i[41]=e,i[42]=t,i}function Dm(n){let e,t;return e=new Fe({props:{class:"form-field disabled",name:"id",$$slots:{default:[TD,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&12288&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function TD(n){let e,t,i,s,l,r,o,a,u,f,c;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="id",l=O(),r=_("span"),a=O(),u=_("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(r,"class","flex-fill"),p(e,"for",o=n[43]),p(u,"type","text"),p(u,"id",f=n[43]),u.value=c=n[2].id,u.disabled=!0},m(d,h){w(d,e,h),m(e,t),m(e,i),m(e,s),m(e,l),m(e,r),w(d,a,h),w(d,u,h)},p(d,h){h[1]&4096&&o!==(o=d[43])&&p(e,"for",o),h[1]&4096&&f!==(f=d[43])&&p(u,"id",f),h[0]&4&&c!==(c=d[2].id)&&u.value!==c&&(u.value=c)},d(d){d&&k(e),d&&k(a),d&&k(u)}}}function Am(n){let e;return{c(){e=_("div"),e.innerHTML=`<h5>No custom fields to be set</h5> 
+            `,p(e,"class","block txt-center txt-disabled")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function DD(n){let e,t,i;function s(r){n[31](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new OD({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function AD(n){let e,t,i;function s(r){n[30](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new _D({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function ED(n){let e,t,i,s,l;function r(f){n[27](f,n[40])}function o(f){n[28](f,n[40])}function a(f){n[29](f,n[40])}let u={field:n[40],record:n[2]};return n[2][n[40].name]!==void 0&&(u.value=n[2][n[40].name]),n[3][n[40].name]!==void 0&&(u.uploadedFiles=n[3][n[40].name]),n[4][n[40].name]!==void 0&&(u.deletedFileIndexes=n[4][n[40].name]),e=new rD({props:u}),pe.push(()=>Ie(e,"value",r)),pe.push(()=>Ie(e,"uploadedFiles",o)),pe.push(()=>Ie(e,"deletedFileIndexes",a)),{c(){B(e.$$.fragment)},m(f,c){V(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[40]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[40].name],je(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[40].name],je(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[40].name],je(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){F(e.$$.fragment,f),l=!1},d(f){z(e,f)}}}function PD(n){let e,t,i;function s(r){n[26](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new qT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function LD(n){let e,t,i;function s(r){n[25](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new NT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function FD(n){let e,t,i;function s(r){n[24](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new PT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function ID(n){let e,t,i;function s(r){n[23](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new TT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function ND(n){let e,t,i;function s(r){n[22](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new $T({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function RD(n){let e,t,i;function s(r){n[21](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new vT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function jD(n){let e,t,i;function s(r){n[20](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new gT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function HD(n){let e,t,i;function s(r){n[19](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new dT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function Em(n,e){let t,i,s,l,r;const o=[HD,jD,RD,ND,ID,FD,LD,PD,ED,AD,DD],a=[];function u(f,c){return f[40].type==="text"?0:f[40].type==="number"?1:f[40].type==="bool"?2:f[40].type==="email"?3:f[40].type==="url"?4:f[40].type==="date"?5:f[40].type==="select"?6:f[40].type==="json"?7:f[40].type==="file"?8:f[40].type==="relation"?9:f[40].type==="user"?10:-1}return~(i=u(e))&&(s=a[i]=o[i](e)),{key:n,first:null,c(){t=st(),s&&s.c(),l=st(),this.first=t},m(f,c){w(f,t,c),~i&&a[i].m(f,c),w(f,l,c),r=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(Me(),F(a[d],1,1,()=>{a[d]=null}),Oe()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=o[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){r||(A(s),r=!0)},o(f){F(s),r=!1},d(f){f&&k(t),~i&&a[i].d(f),f&&k(l)}}}function qD(n){var d;let e,t,i=[],s=new Map,l,r,o,a=!n[2].isNew&&Dm(n),u=((d=n[0])==null?void 0:d.schema)||[];const f=h=>h[40].name;for(let h=0;h<u.length;h+=1){let g=Tm(n,u,h),y=f(g);s.set(y,i[h]=Em(y,g))}let c=null;return u.length||(c=Am()),{c(){e=_("form"),a&&a.c(),t=O();for(let h=0;h<i.length;h+=1)i[h].c();c&&c.c(),p(e,"id",n[11]),p(e,"class","block")},m(h,g){w(h,e,g),a&&a.m(e,null),m(e,t);for(let y=0;y<i.length;y+=1)i[y].m(e,null);c&&c.m(e,null),l=!0,r||(o=Q(e,"submit",Wt(n[12])),r=!0)},p(h,g){var y;h[2].isNew?a&&(Me(),F(a,1,1,()=>{a=null}),Oe()):a?(a.p(h,g),g[0]&4&&A(a,1)):(a=Dm(h),a.c(),A(a,1),a.m(e,t)),g[0]&29&&(u=((y=h[0])==null?void 0:y.schema)||[],Me(),i=rt(i,g,f,1,h,u,s,e,Ft,Em,null,Tm),Oe(),!u.length&&c?c.p(h,g):u.length?c&&(c.d(1),c=null):(c=Am(),c.c(),c.m(e,null)))},i(h){if(!l){A(a);for(let g=0;g<u.length;g+=1)A(i[g]);l=!0}},o(h){F(a);for(let g=0;g<i.length;g+=1)F(i[g]);l=!1},d(h){h&&k(e),a&&a.d();for(let g=0;g<i.length;g+=1)i[g].d();c&&c.d(),r=!1,o()}}}function Pm(n){let e,t,i,s,l,r,o,a;return o=new ks({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[VD]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=O(),i=_("button"),s=_("div"),l=_("i"),r=O(),B(o.$$.fragment),p(e,"class","flex-fill"),p(l,"class","ri-more-line"),p(s,"class","content"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),m(i,s),m(s,l),m(s,r),V(o,s,null),a=!0},p(u,f){const c={};f[1]&8192&&(c.$$scope={dirty:f,ctx:u}),o.$set(c)},i(u){a||(A(o.$$.fragment,u),a=!0)},o(u){F(o.$$.fragment,u),a=!1},d(u){u&&k(e),u&&k(t),u&&k(i),z(o)}}}function VD(n){let e,t,i;return{c(){e=_("div"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i> 
+                            <span class="txt">Delete</span>`,p(e,"tabindex","0"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[18]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function zD(n){let e,t=n[2].isNew?"New":"Edit",i,s,l=n[0].name+"",r,o,a,u,f,c=!n[2].isNew&&n[9]&&Pm(n);return{c(){e=_("h4"),i=H(t),s=O(),r=H(l),o=H(" record"),a=O(),c&&c.c(),u=st()},m(d,h){w(d,e,h),m(e,i),m(e,s),m(e,r),m(e,o),w(d,a,h),c&&c.m(d,h),w(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&t!==(t=d[2].isNew?"New":"Edit")&&ge(i,t),(!f||h[0]&1)&&l!==(l=d[0].name+"")&&ge(r,l),!d[2].isNew&&d[9]?c?(c.p(d,h),h[0]&516&&A(c,1)):(c=Pm(d),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(Me(),F(c,1,1,()=>{c=null}),Oe())},i(d){f||(A(c),f=!0)},o(d){F(c),f=!1},d(d){d&&k(e),d&&k(a),c&&c.d(d),d&&k(u)}}}function BD(n){let e,t,i,s,l,r=n[2].isNew?"Create":"Save changes",o,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=O(),s=_("button"),l=_("span"),o=H(r),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[7],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[11]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],ee(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,o),u||(f=Q(e,"click",n[17]),u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&r!==(r=c[2].isNew?"Create":"Save changes")&&ge(o,r),d[0]&1152&&a!==(a=!c[10]||c[7])&&(s.disabled=a),d[0]&128&&ee(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function UD(n){let e,t,i={class:"overlay-panel-lg record-panel",beforeHide:n[32],$$slots:{footer:[BD],header:[zD],default:[qD]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&288&&(r.beforeHide=s[32]),l[0]&1693|l[1]&8192&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[33](null),z(e,s)}}}function Lm(n){return JSON.stringify(n)}function WD(n,e,t){let i,s,l,r;const o=_n(),a="record_"+W.randomString(5);let{collection:u}=e,f,c=null,d=new no,h=!1,g=!1,y={},b={},v="";function S(fe){return C(fe),t(8,g=!0),f==null?void 0:f.show()}function $(){return f==null?void 0:f.hide()}function C(fe){Ki({}),c=fe||{},t(2,d=fe!=null&&fe.clone?fe.clone():new no),t(3,y={}),t(4,b={}),t(15,v=Lm(d))}function M(){if(h||!s)return;t(7,h=!0);const fe=E();let ie;d.isNew?ie=ke.Records.create(u==null?void 0:u.id,fe):ie=ke.Records.update(u==null?void 0:u.id,d.id,fe),ie.then(async ye=>{mn(d.isNew?"Successfully created record.":"Successfully updated record."),t(8,g=!1),$(),o("save",ye)}).catch(ye=>{ke.errorResponseHandler(ye)}).finally(()=>{t(7,h=!1)})}function T(){!(c!=null&&c.id)||Mi("Do you really want to delete the selected record?",()=>ke.Records.delete(c["@collectionId"],c.id).then(()=>{$(),mn("Successfully deleted record."),o("delete",c)}).catch(fe=>{ke.errorResponseHandler(fe)}))}function E(){const fe=(d==null?void 0:d.export())||{},ie=new FormData,ye={};for(const He of(u==null?void 0:u.schema)||[])ye[He.name]=He;for(const He in fe)!ye[He]||(typeof fe[He]=="undefined"&&(fe[He]=null),W.addValueToFormData(ie,He,fe[He]));for(const He in y){const Le=W.toArray(y[He]);for(const Re of Le)ie.append(He,Re)}for(const He in b){const Le=W.toArray(b[He]);for(const Re of Le)ie.append(He+"."+Re,"")}return ie}const D=()=>$(),P=()=>T();function L(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function R(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function j(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function G(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function Y(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function q(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function Z(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function J(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function K(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function ne(fe,ie){n.$$.not_equal(y[ie.name],fe)&&(y[ie.name]=fe,t(3,y))}function ce(fe,ie){n.$$.not_equal(b[ie.name],fe)&&(b[ie.name]=fe,t(4,b))}function be(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function se(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}const x=()=>s&&g?(Mi("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,g=!1),$()}),!1):!0;function Te(fe){pe[fe?"unshift":"push"](()=>{f=fe,t(6,f)})}function te(fe){ut.call(this,n,fe)}function _e(fe){ut.call(this,n,fe)}return n.$$set=fe=>{"collection"in fe&&t(0,u=fe.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(16,i=W.hasNonEmptyProps(y)||W.hasNonEmptyProps(b)),n.$$.dirty[0]&98308&&t(5,s=i||v!=Lm(d)),n.$$.dirty[0]&36&&t(10,l=d.isNew||s),n.$$.dirty[0]&1&&t(9,r=(u==null?void 0:u.name)!=="profiles")},[u,$,d,y,b,s,f,h,g,r,l,a,M,T,S,v,i,D,P,L,R,j,G,Y,q,Z,J,K,ne,ce,be,se,x,Te,te,_e]}class Hb extends Pe{constructor(e){super(),Ee(this,e,WD,UD,De,{collection:0,show:14,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[1]}}function YD(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function KD(n){let e,t;return{c(){e=_("span"),t=H(n[1]),p(e,"class","label txt-base txt-mono"),p(e,"title",n[0])},m(i,s){w(i,e,s),m(e,t)},p(i,s){s&2&&ge(t,i[1]),s&1&&p(e,"title",i[0])},d(i){i&&k(e)}}}function JD(n){let e;function t(l,r){return l[0]?KD:YD}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:oe,o:oe,d(l){s.d(l),l&&k(e)}}}function GD(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 jo extends Pe{constructor(e){super(),Ee(this,e,GD,JD,De,{id:0})}}function Fm(n,e,t){const i=n.slice();return i[8]=e[t],i}function Im(n,e,t){const i=n.slice();return i[3]=e[t],i}function Nm(n,e,t){const i=n.slice();return i[3]=e[t],i}function ZD(n){let e,t=n[0][n[1].name]+"",i,s;return{c(){e=_("span"),i=H(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[0][n[1].name])},m(l,r){w(l,e,r),m(e,i)},p(l,r){r&3&&t!==(t=l[0][l[1].name]+"")&&ge(i,t),r&3&&s!==(s=l[0][l[1].name])&&p(e,"title",s)},i:oe,o:oe,d(l){l&&k(e)}}}function xD(n){let e,t,i=W.toArray(n[0][n[1].name]),s=[];for(let r=0;r<i.length;r+=1)s[r]=Rm(Fm(n,i,r));const l=r=>F(s[r],1,1,()=>{s[r]=null});return{c(){e=_("div");for(let r=0;r<s.length;r+=1)s[r].c();p(e,"class","inline-flex")},m(r,o){w(r,e,o);for(let a=0;a<s.length;a+=1)s[a].m(e,null);t=!0},p(r,o){if(o&3){i=W.toArray(r[0][r[1].name]);let a;for(a=0;a<i.length;a+=1){const u=Fm(r,i,a);s[a]?(s[a].p(u,o),A(s[a],1)):(s[a]=Rm(u),s[a].c(),A(s[a],1),s[a].m(e,null))}for(Me(),a=i.length;a<s.length;a+=1)l(a);Oe()}},i(r){if(!t){for(let o=0;o<i.length;o+=1)A(s[o]);t=!0}},o(r){s=s.filter(Boolean);for(let o=0;o<s.length;o+=1)F(s[o]);t=!1},d(r){r&&k(e),Bn(s,r)}}}function XD(n){let e,t,i=W.toArray(n[0][n[1].name]),s=[];for(let r=0;r<i.length;r+=1)s[r]=jm(Im(n,i,r));const l=r=>F(s[r],1,1,()=>{s[r]=null});return{c(){e=_("div");for(let r=0;r<s.length;r+=1)s[r].c();p(e,"class","inline-flex")},m(r,o){w(r,e,o);for(let a=0;a<s.length;a+=1)s[a].m(e,null);t=!0},p(r,o){if(o&3){i=W.toArray(r[0][r[1].name]);let a;for(a=0;a<i.length;a+=1){const u=Im(r,i,a);s[a]?(s[a].p(u,o),A(s[a],1)):(s[a]=jm(u),s[a].c(),A(s[a],1),s[a].m(e,null))}for(Me(),a=i.length;a<s.length;a+=1)l(a);Oe()}},i(r){if(!t){for(let o=0;o<i.length;o+=1)A(s[o]);t=!0}},o(r){s=s.filter(Boolean);for(let o=0;o<s.length;o+=1)F(s[o]);t=!1},d(r){r&&k(e),Bn(s,r)}}}function QD(n){let e,t=W.toArray(n[0][n[1].name]),i=[];for(let s=0;s<t.length;s+=1)i[s]=Hm(Nm(n,t,s));return{c(){e=_("div");for(let s=0;s<i.length;s+=1)i[s].c();p(e,"class","inline-flex")},m(s,l){w(s,e,l);for(let r=0;r<i.length;r+=1)i[r].m(e,null)},p(s,l){if(l&3){t=W.toArray(s[0][s[1].name]);let r;for(r=0;r<t.length;r+=1){const o=Nm(s,t,r);i[r]?i[r].p(o,l):(i[r]=Hm(o),i[r].c(),i[r].m(e,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=t.length}},i:oe,o:oe,d(s){s&&k(e),Bn(i,s)}}}function eA(n){let e,t=JSON.stringify(n[0][n[1].name])+"",i;return{c(){e=_("span"),i=H(t),p(e,"class","txt txt-ellipsis")},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&3&&t!==(t=JSON.stringify(s[0][s[1].name])+"")&&ge(i,t)},i:oe,o:oe,d(s){s&&k(e)}}}function tA(n){let e,t;return e=new Ci({props:{date:n[0][n[1].name]}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&3&&(l.date=i[0][i[1].name]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function nA(n){let e,t=n[0][n[1].name]+"",i,s,l,r;return{c(){e=_("a"),i=H(t),p(e,"class","txt-ellipsis"),p(e,"href",s=n[0][n[1].name]),p(e,"target","_blank"),p(e,"rel","noopener")},m(o,a){w(o,e,a),m(e,i),l||(r=[Xe(St.call(null,e,"Open in new tab")),Q(e,"click",Un(n[2]))],l=!0)},p(o,a){a&3&&t!==(t=o[0][o[1].name]+"")&&ge(i,t),a&3&&s!==(s=o[0][o[1].name])&&p(e,"href",s)},i:oe,o:oe,d(o){o&&k(e),l=!1,lt(r)}}}function iA(n){let e,t=n[0][n[1].name]?"True":"False",i;return{c(){e=_("span"),i=H(t),p(e,"class","txt")},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&3&&t!==(t=s[0][s[1].name]?"True":"False")&&ge(i,t)},i:oe,o:oe,d(s){s&&k(e)}}}function sA(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function Rm(n){let e,t,i,s,l,r,o;return t=new jb({props:{record:n[0],filename:n[8]}}),{c(){e=_("figure"),B(t.$$.fragment),i=O(),p(e,"class","thumb thumb-sm")},m(a,u){w(a,e,u),V(t,e,null),m(e,i),l=!0,r||(o=Xe(s=St.call(null,e,n[8])),r=!0)},p(a,u){n=a;const f={};u&1&&(f.record=n[0]),u&3&&(f.filename=n[8]),t.$set(f),s&&Jn(s.update)&&u&3&&s.update.call(null,n[8])},i(a){l||(A(t.$$.fragment,a),l=!0)},o(a){F(t.$$.fragment,a),l=!1},d(a){a&&k(e),z(t),r=!1,o()}}}function jm(n){let e,t;return e=new jo({props:{id:n[3]}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&3&&(l.id=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function Hm(n){let e,t=n[3]+"",i;return{c(){e=_("span"),i=H(t),p(e,"class","label")},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&3&&t!==(t=s[3]+"")&&ge(i,t)},d(s){s&&k(e)}}}function lA(n){let e,t,i,s,l,r;const o=[sA,iA,nA,tA,eA,QD,XD,xD,ZD],a=[];function u(f,c){return c&3&&(t=null),t==null&&(t=!!W.isEmpty(f[0][f[1].name])),t?0:f[1].type==="bool"?1:f[1].type==="url"?2:f[1].type==="date"?3:f[1].type==="json"?4:f[1].type==="select"?5:f[1].type==="relation"||f[1].type==="user"?6:f[1].type==="file"?7:8}return i=u(n,-1),s=a[i]=o[i](n),{c(){e=_("td"),s.c(),p(e,"class",l="col-type-"+n[1].type+" col-field-"+n[1].name)},m(f,c){w(f,e,c),a[i].m(e,null),r=!0},p(f,[c]){let d=i;i=u(f,c),i===d?a[i].p(f,c):(Me(),F(a[d],1,1,()=>{a[d]=null}),Oe(),s=a[i],s?s.p(f,c):(s=a[i]=o[i](f),s.c()),A(s,1),s.m(e,null)),(!r||c&2&&l!==(l="col-type-"+f[1].type+" col-field-"+f[1].name))&&p(e,"class",l)},i(f){r||(A(s),r=!0)},o(f){F(s),r=!1},d(f){f&&k(e),a[i].d()}}}function rA(n,e,t){let{record:i}=e,{field:s}=e;function l(r){ut.call(this,n,r)}return n.$$set=r=>{"record"in r&&t(0,i=r.record),"field"in r&&t(1,s=r.field)},[i,s,l]}class qb extends Pe{constructor(e){super(),Ee(this,e,rA,lA,De,{record:0,field:1})}}function qm(n,e,t){const i=n.slice();return i[35]=e[t],i}function Vm(n,e,t){const i=n.slice();return i[38]=e[t],i}function zm(n,e,t){const i=n.slice();return i[38]=e[t],i}function oA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function aA(n){let e,t,i,s,l,r=n[38].name+"",o;return{c(){e=_("div"),t=_("i"),s=O(),l=_("span"),o=H(r),p(t,"class",i=W.getFieldTypeIcon(n[38].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){w(a,e,u),m(e,t),m(e,s),m(e,l),m(l,o)},p(a,u){u[0]&2048&&i!==(i=W.getFieldTypeIcon(a[38].type))&&p(t,"class",i),u[0]&2048&&r!==(r=a[38].name+"")&&ge(o,r)},d(a){a&&k(e)}}}function Bm(n,e){let t,i,s,l;function r(a){e[22](a)}let o={class:"col-type-"+e[38].type+" col-field-"+e[38].name,name:e[38].name,$$slots:{default:[aA]},$$scope:{ctx:e}};return e[0]!==void 0&&(o.sort=e[0]),i=new tn({props:o}),pe.push(()=>Ie(i,"sort",r)),{key:n,first:null,c(){t=st(),B(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),V(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&2048&&(f.class="col-type-"+e[38].type+" col-field-"+e[38].name),u[0]&2048&&(f.name=e[38].name),u[0]&2048|u[1]&4096&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],je(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){F(i.$$.fragment,a),l=!1},d(a){a&&k(t),z(i,a)}}}function uA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function fA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="updated",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function Um(n){let e;function t(l,r){return l[8]?dA:cA}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function cA(n){var o;let e,t,i,s,l,r=((o=n[1])==null?void 0:o.length)&&Wm(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No records found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?r?r.p(a,u):(r=Wm(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function dA(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td> 
+                    `},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Wm(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[28]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function Ym(n,e){let t,i,s;return i=new qb({props:{record:e[35],field:e[38]}}),{key:n,first:null,c(){t=st(),B(i.$$.fragment),this.first=t},m(l,r){w(l,t,r),V(i,l,r),s=!0},p(l,r){e=l;const o={};r[0]&8&&(o.record=e[35]),r[0]&2048&&(o.field=e[38]),i.$set(o)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){F(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function Km(n,e){let t,i,s,l,r,o,a,u,f,c,d,h,g,y=[],b=new Map,v,S,$,C,M,T,E,D,P,L,R,j;function G(){return e[25](e[35])}h=new jo({props:{id:e[35].id}});let Y=e[11];const q=K=>K[38].name;for(let K=0;K<Y.length;K+=1){let ne=Vm(e,Y,K),ce=q(ne);b.set(ce,y[K]=Ym(ce,ne))}$=new Ci({props:{date:e[35].created}}),T=new Ci({props:{date:e[35].updated}});function Z(){return e[26](e[35])}function J(...K){return e[27](e[35],...K)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),l=_("input"),a=O(),u=_("label"),c=O(),d=_("td"),B(h.$$.fragment),g=O();for(let K=0;K<y.length;K+=1)y[K].c();v=O(),S=_("td"),B($.$$.fragment),C=O(),M=_("td"),B(T.$$.fragment),E=O(),D=_("td"),D.innerHTML='<i class="ri-arrow-right-line"></i>',P=O(),p(l,"type","checkbox"),p(l,"id",r="checkbox_"+e[35].id),l.checked=o=e[5][e[35].id],p(u,"for",f="checkbox_"+e[35].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(d,"class","col-type-text col-field-id"),p(S,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(D,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(K,ne){w(K,t,ne),m(t,i),m(i,s),m(s,l),m(s,a),m(s,u),m(t,c),m(t,d),V(h,d,null),m(t,g);for(let ce=0;ce<y.length;ce+=1)y[ce].m(t,null);m(t,v),m(t,S),V($,S,null),m(t,C),m(t,M),V(T,M,null),m(t,E),m(t,D),m(t,P),L=!0,R||(j=[Q(l,"change",G),Q(s,"click",Un(e[19])),Q(t,"click",Z),Q(t,"keydown",J)],R=!0)},p(K,ne){e=K,(!L||ne[0]&8&&r!==(r="checkbox_"+e[35].id))&&p(l,"id",r),(!L||ne[0]&40&&o!==(o=e[5][e[35].id]))&&(l.checked=o),(!L||ne[0]&8&&f!==(f="checkbox_"+e[35].id))&&p(u,"for",f);const ce={};ne[0]&8&&(ce.id=e[35].id),h.$set(ce),ne[0]&2056&&(Y=e[11],Me(),y=rt(y,ne,q,1,e,Y,b,t,Ft,Ym,v,Vm),Oe());const be={};ne[0]&8&&(be.date=e[35].created),$.$set(be);const se={};ne[0]&8&&(se.date=e[35].updated),T.$set(se)},i(K){if(!L){A(h.$$.fragment,K);for(let ne=0;ne<Y.length;ne+=1)A(y[ne]);A($.$$.fragment,K),A(T.$$.fragment,K),L=!0}},o(K){F(h.$$.fragment,K);for(let ne=0;ne<y.length;ne+=1)F(y[ne]);F($.$$.fragment,K),F(T.$$.fragment,K),L=!1},d(K){K&&k(t),z(h);for(let ne=0;ne<y.length;ne+=1)y[ne].d();z($),z(T),R=!1,lt(j)}}}function Jm(n){let e,t,i=n[3].length+"",s,l,r;return{c(){e=_("small"),t=H("Showing "),s=H(i),l=H(" of "),r=H(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(o,a){w(o,e,a),m(e,t),m(e,s),m(e,l),m(e,r)},p(o,a){a[0]&8&&i!==(i=o[3].length+"")&&ge(s,i),a[0]&16&&ge(r,o[4])},d(o){o&&k(e)}}}function Gm(n){let e,t,i,s,l=n[4]-n[3].length+"",r,o,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=H("Load more ("),r=H(l),o=H(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ee(t,"btn-loading",n[8]),ee(t,"btn-disabled",n[8]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,r),m(i,o),a||(u=Q(t,"click",n[29]),a=!0)},p(f,c){c[0]&24&&l!==(l=f[4]-f[3].length+"")&&ge(r,l),c[0]&256&&ee(t,"btn-loading",f[8]),c[0]&256&&ee(t,"btn-disabled",f[8])},d(f){f&&k(e),a=!1,u()}}}function Zm(n){let e,t,i,s,l,r,o=n[6]===1?"record":"records",a,u,f,c,d,h,g,y,b,v,S;return{c(){e=_("div"),t=_("div"),i=H("Selected "),s=_("strong"),l=H(n[6]),r=O(),a=H(o),u=O(),f=_("button"),f.innerHTML='<span class="txt">Reset</span>',c=O(),d=_("div"),h=O(),g=_("button"),g.innerHTML='<span class="txt">Delete selected</span>',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),ee(f,"btn-disabled",n[9]),p(d,"class","flex-fill"),p(g,"type","button"),p(g,"class","btn btn-sm btn-secondary btn-danger"),ee(g,"btn-loading",n[9]),ee(g,"btn-disabled",n[9]),p(e,"class","bulkbar")},m($,C){w($,e,C),m(e,t),m(t,i),m(t,s),m(s,l),m(t,r),m(t,a),m(e,u),m(e,f),m(e,c),m(e,d),m(e,h),m(e,g),b=!0,v||(S=[Q(f,"click",n[30]),Q(g,"click",n[31])],v=!0)},p($,C){(!b||C[0]&64)&&ge(l,$[6]),(!b||C[0]&64)&&o!==(o=$[6]===1?"record":"records")&&ge(a,o),C[0]&512&&ee(f,"btn-disabled",$[9]),C[0]&512&&ee(g,"btn-loading",$[9]),C[0]&512&&ee(g,"btn-disabled",$[9])},i($){b||($&&Ot(()=>{y||(y=ft(e,ni,{duration:150,y:5},!0)),y.run(1)}),b=!0)},o($){$&&(y||(y=ft(e,ni,{duration:150,y:5},!1)),y.run(0)),b=!1},d($){$&&k(e),$&&y&&y.end(),v=!1,lt(S)}}}function pA(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y=[],b=new Map,v,S,$,C,M,T,E,D,P,L,R=[],j=new Map,G,Y,q,Z,J,K,ne;function ce(re){n[21](re)}let be={class:"col-type-text col-field-id",name:"id",$$slots:{default:[oA]},$$scope:{ctx:n}};n[0]!==void 0&&(be.sort=n[0]),d=new tn({props:be}),pe.push(()=>Ie(d,"sort",ce));let se=n[11];const x=re=>re[38].name;for(let re=0;re<se.length;re+=1){let ve=zm(n,se,re),qe=x(ve);b.set(qe,y[re]=Bm(qe,ve))}function Te(re){n[23](re)}let te={class:"col-type-date col-field-created",name:"created",$$slots:{default:[uA]},$$scope:{ctx:n}};n[0]!==void 0&&(te.sort=n[0]),S=new tn({props:te}),pe.push(()=>Ie(S,"sort",Te));function _e(re){n[24](re)}let fe={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[fA]},$$scope:{ctx:n}};n[0]!==void 0&&(fe.sort=n[0]),M=new tn({props:fe}),pe.push(()=>Ie(M,"sort",_e));let ie=n[3];const ye=re=>re[35].id;for(let re=0;re<ie.length;re+=1){let ve=qm(n,ie,re),qe=ye(ve);j.set(qe,R[re]=Km(qe,ve))}let He=null;ie.length||(He=Um(n));let Le=n[3].length&&Jm(n),Re=n[3].length&&n[12]&&Gm(n),ae=n[6]&&Zm(n);return{c(){e=_("div"),t=_("table"),i=_("thead"),s=_("tr"),l=_("th"),r=_("div"),o=_("input"),u=O(),f=_("label"),c=O(),B(d.$$.fragment),g=O();for(let re=0;re<y.length;re+=1)y[re].c();v=O(),B(S.$$.fragment),C=O(),B(M.$$.fragment),E=O(),D=_("th"),P=O(),L=_("tbody");for(let re=0;re<R.length;re+=1)R[re].c();He&&He.c(),G=O(),Le&&Le.c(),Y=O(),Re&&Re.c(),q=O(),ae&&ae.c(),Z=st(),p(o,"type","checkbox"),p(o,"id","checkbox_0"),o.disabled=a=!n[3].length,o.checked=n[10],p(f,"for","checkbox_0"),p(r,"class","form-field"),p(l,"class","bulk-select-col min-width"),p(D,"class","col-type-action min-width"),p(t,"class","table"),ee(t,"table-loading",n[8]),p(e,"class","table-wrapper")},m(re,ve){w(re,e,ve),m(e,t),m(t,i),m(i,s),m(s,l),m(l,r),m(r,o),m(r,u),m(r,f),m(s,c),V(d,s,null),m(s,g);for(let qe=0;qe<y.length;qe+=1)y[qe].m(s,null);m(s,v),V(S,s,null),m(s,C),V(M,s,null),m(s,E),m(s,D),m(t,P),m(t,L);for(let qe=0;qe<R.length;qe+=1)R[qe].m(L,null);He&&He.m(L,null),w(re,G,ve),Le&&Le.m(re,ve),w(re,Y,ve),Re&&Re.m(re,ve),w(re,q,ve),ae&&ae.m(re,ve),w(re,Z,ve),J=!0,K||(ne=Q(o,"change",n[20]),K=!0)},p(re,ve){(!J||ve[0]&8&&a!==(a=!re[3].length))&&(o.disabled=a),(!J||ve[0]&1024)&&(o.checked=re[10]);const qe={};ve[1]&4096&&(qe.$$scope={dirty:ve,ctx:re}),!h&&ve[0]&1&&(h=!0,qe.sort=re[0],je(()=>h=!1)),d.$set(qe),ve[0]&2049&&(se=re[11],Me(),y=rt(y,ve,x,1,re,se,b,s,Ft,Bm,v,zm),Oe());const Ve={};ve[1]&4096&&(Ve.$$scope={dirty:ve,ctx:re}),!$&&ve[0]&1&&($=!0,Ve.sort=re[0],je(()=>$=!1)),S.$set(Ve);const Je={};ve[1]&4096&&(Je.$$scope={dirty:ve,ctx:re}),!T&&ve[0]&1&&(T=!0,Je.sort=re[0],je(()=>T=!1)),M.$set(Je),ve[0]&76074&&(ie=re[3],Me(),R=rt(R,ve,ye,1,re,ie,j,L,Ft,Km,null,qm),Oe(),!ie.length&&He?He.p(re,ve):ie.length?He&&(He.d(1),He=null):(He=Um(re),He.c(),He.m(L,null))),ve[0]&256&&ee(t,"table-loading",re[8]),re[3].length?Le?Le.p(re,ve):(Le=Jm(re),Le.c(),Le.m(Y.parentNode,Y)):Le&&(Le.d(1),Le=null),re[3].length&&re[12]?Re?Re.p(re,ve):(Re=Gm(re),Re.c(),Re.m(q.parentNode,q)):Re&&(Re.d(1),Re=null),re[6]?ae?(ae.p(re,ve),ve[0]&64&&A(ae,1)):(ae=Zm(re),ae.c(),A(ae,1),ae.m(Z.parentNode,Z)):ae&&(Me(),F(ae,1,1,()=>{ae=null}),Oe())},i(re){if(!J){A(d.$$.fragment,re);for(let ve=0;ve<se.length;ve+=1)A(y[ve]);A(S.$$.fragment,re),A(M.$$.fragment,re);for(let ve=0;ve<ie.length;ve+=1)A(R[ve]);A(ae),J=!0}},o(re){F(d.$$.fragment,re);for(let ve=0;ve<y.length;ve+=1)F(y[ve]);F(S.$$.fragment,re),F(M.$$.fragment,re);for(let ve=0;ve<R.length;ve+=1)F(R[ve]);F(ae),J=!1},d(re){re&&k(e),z(d);for(let ve=0;ve<y.length;ve+=1)y[ve].d();z(S),z(M);for(let ve=0;ve<R.length;ve+=1)R[ve].d();He&&He.d(),re&&k(G),Le&&Le.d(re),re&&k(Y),Re&&Re.d(re),re&&k(q),ae&&ae.d(re),re&&k(Z),K=!1,ne()}}}function hA(n,e,t){let i,s,l,r;const o=_n();let{collection:a}=e,{sort:u=""}=e,{filter:f=""}=e,c=[],d=1,h=0,g={},y=!0,b=!1;async function v(se=1){if(!!(a!=null&&a.id))return t(8,y=!0),ke.Records.getList(a.id,se,50,{sort:u,filter:f}).then(x=>{se<=1&&S(),t(8,y=!1),t(3,c=c.concat(x.items)),t(7,d=x.page),t(4,h=x.totalItems),o("load",c)}).catch(x=>{x!==null&&(t(8,y=!1),console.warn(x),S(),ke.errorResponseHandler(x,!1))})}function S(){t(3,c=[]),t(7,d=1),t(4,h=0),t(5,g={})}function $(){r?C():M()}function C(){t(5,g={})}function M(){for(const se of c)t(5,g[se.id]=se,g);t(5,g)}function T(se){g[se.id]?delete g[se.id]:t(5,g[se.id]=se,g),t(5,g)}function E(){Mi(`Do you really want to delete the selected ${l===1?"record":"records"}?`,D)}async function D(){if(b||!l)return;let se=[];for(const x of Object.keys(g))se.push(ke.Records.delete(a==null?void 0:a.id,x));return t(9,b=!0),Promise.all(se).then(()=>{mn(`Successfully deleted the selected ${l===1?"record":"records"}.`),C()}).catch(x=>{ke.errorResponseHandler(x)}).finally(()=>(t(9,b=!1),v()))}function P(se){ut.call(this,n,se)}const L=()=>$();function R(se){u=se,t(0,u)}function j(se){u=se,t(0,u)}function G(se){u=se,t(0,u)}function Y(se){u=se,t(0,u)}const q=se=>T(se),Z=se=>o("select",se),J=(se,x)=>{x.code==="Enter"&&(x.preventDefault(),o("select",se))},K=()=>t(1,f=""),ne=()=>v(d+1),ce=()=>C(),be=()=>E();return n.$$set=se=>{"collection"in se&&t(18,a=se.collection),"sort"in se&&t(0,u=se.sort),"filter"in se&&t(1,f=se.filter)},n.$$.update=()=>{n.$$.dirty[0]&262147&&a&&a.id&&u!==-1&&f!==-1&&(S(),v(1)),n.$$.dirty[0]&24&&t(12,i=h>c.length),n.$$.dirty[0]&262144&&t(11,s=(a==null?void 0:a.schema)||[]),n.$$.dirty[0]&32&&t(6,l=Object.keys(g).length),n.$$.dirty[0]&72&&t(10,r=c.length&&l===c.length)},[u,f,v,c,h,g,l,d,y,b,r,s,i,o,$,C,T,E,a,P,L,R,j,G,Y,q,Z,J,K,ne,ce,be]}class mA extends Pe{constructor(e){super(),Ee(this,e,hA,pA,De,{collection:18,sort:0,filter:1,load:2},null,[-1,-1])}get load(){return this.$$.ctx[2]}}function gA(n){let e,t,i,s,l,r,o,a,u=n[2].name+"",f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L;e=new pO({}),$=new Po({props:{value:n[0],autocompleteCollection:n[2]}}),$.$on("submit",n[15]);function R(Y){n[17](Y)}function j(Y){n[18](Y)}let G={collection:n[2]};return n[0]!==void 0&&(G.filter=n[0]),n[1]!==void 0&&(G.sort=n[1]),M=new mA({props:G}),n[16](M),pe.push(()=>Ie(M,"filter",R)),pe.push(()=>Ie(M,"sort",j)),M.$on("select",n[19]),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),l=_("nav"),r=_("div"),r.textContent="Collections",o=O(),a=_("div"),f=H(u),c=O(),d=_("button"),d.innerHTML='<i class="ri-settings-4-line"></i>',h=O(),g=_("div"),y=_("button"),y.innerHTML=`<i class="ri-code-s-slash-line"></i> 
+                    <span class="txt">API Preview</span>`,b=O(),v=_("button"),v.innerHTML=`<i class="ri-add-line"></i> 
+                    <span class="txt">New record</span>`,S=O(),B($.$$.fragment),C=O(),B(M.$$.fragment),p(r,"class","breadcrumb-item"),p(a,"class","breadcrumb-item"),p(l,"class","breadcrumbs"),p(d,"type","button"),p(d,"class","btn btn-secondary btn-circle"),p(y,"type","button"),p(y,"class","btn btn-outline"),p(v,"type","button"),p(v,"class","btn btn-expanded"),p(g,"class","btns-group"),p(s,"class","page-header"),p(i,"class","page-wrapper")},m(Y,q){V(e,Y,q),w(Y,t,q),w(Y,i,q),m(i,s),m(s,l),m(l,r),m(l,o),m(l,a),m(a,f),m(s,c),m(s,d),m(s,h),m(s,g),m(g,y),m(g,b),m(g,v),m(i,S),V($,i,null),m(i,C),V(M,i,null),D=!0,P||(L=[Xe(St.call(null,d,{text:"Edit collection",position:"right"})),Q(d,"click",n[12]),Q(y,"click",n[13]),Q(v,"click",n[14])],P=!0)},p(Y,q){(!D||q&4)&&u!==(u=Y[2].name+"")&&ge(f,u);const Z={};q&1&&(Z.value=Y[0]),q&4&&(Z.autocompleteCollection=Y[2]),$.$set(Z);const J={};q&4&&(J.collection=Y[2]),!T&&q&1&&(T=!0,J.filter=Y[0],je(()=>T=!1)),!E&&q&2&&(E=!0,J.sort=Y[1],je(()=>E=!1)),M.$set(J)},i(Y){D||(A(e.$$.fragment,Y),A($.$$.fragment,Y),A(M.$$.fragment,Y),D=!0)},o(Y){F(e.$$.fragment,Y),F($.$$.fragment,Y),F(M.$$.fragment,Y),D=!1},d(Y){z(e,Y),Y&&k(t),Y&&k(i),z($),n[16](null),z(M),P=!1,lt(L)}}}function _A(n){let e,t,i,s,l,r,o,a;return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-database-2-line"></i>',i=O(),s=_("h1"),s.textContent="Create your first collection to add records!",l=O(),r=_("button"),r.innerHTML=`<i class="ri-add-line"></i> 
+            <span class="txt">Create new collection</span>`,p(t,"class","icon"),p(s,"class","m-b-10"),p(r,"type","button"),p(r,"class","btn btn-expanded-lg btn-lg"),p(e,"class","placeholder-section m-b-base")},m(u,f){w(u,e,f),m(e,t),m(e,i),m(e,s),m(e,l),m(e,r),o||(a=Q(r,"click",n[11]),o=!0)},p:oe,i:oe,o:oe,d(u){u&&k(e),o=!1,a()}}}function bA(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span> 
+        <h1>Loading collections...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function yA(n){let e,t,i,s,l,r,o,a,u;const f=[bA,_A,gA],c=[];function d(b,v){return b[8]?0:b[7].length?2:1}e=d(n),t=c[e]=f[e](n);let h={};s=new gf({props:h}),n[20](s);let g={};r=new lT({props:g}),n[21](r);let y={collection:n[2]};return a=new Hb({props:y}),n[22](a),a.$on("save",n[23]),a.$on("delete",n[24]),{c(){t.c(),i=O(),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment)},m(b,v){c[e].m(b,v),w(b,i,v),V(s,b,v),w(b,l,v),V(r,b,v),w(b,o,v),V(a,b,v),u=!0},p(b,[v]){let S=e;e=d(b),e===S?c[e].p(b,v):(Me(),F(c[S],1,1,()=>{c[S]=null}),Oe(),t=c[e],t?t.p(b,v):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const $={};s.$set($);const C={};r.$set(C);const M={};v&4&&(M.collection=b[2]),a.$set(M)},i(b){u||(A(t),A(s.$$.fragment,b),A(r.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){F(t),F(s.$$.fragment,b),F(r.$$.fragment,b),F(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[20](null),z(s,b),b&&k(l),n[21](null),z(r,b),b&&k(o),n[22](null),z(a,b)}}}function vA(n,e,t){var G;let i,s,l,r;hn(n,fi,Y=>t(2,s=Y)),hn(n,Gs,Y=>t(10,l=Y)),hn(n,mu,Y=>t(8,r=Y));const o=W.getQueryParams((G=window.location)==null?void 0:G.href);let a,u,f,c,d=o.filter||"",h=o.sort||"-created",g=o.collectionId;W.setDocumentTitle("Collections"),I3(g);const y=()=>a==null?void 0:a.show(),b=()=>a==null?void 0:a.show(s),v=()=>u==null?void 0:u.show(s),S=()=>f==null?void 0:f.show(),$=Y=>t(0,d=Y.detail);function C(Y){pe[Y?"unshift":"push"](()=>{c=Y,t(6,c)})}function M(Y){d=Y,t(0,d),t(2,s),t(9,g)}function T(Y){h=Y,t(1,h),t(2,s),t(9,g)}const E=Y=>f==null?void 0:f.show(Y==null?void 0:Y.detail);function D(Y){pe[Y?"unshift":"push"](()=>{a=Y,t(3,a)})}function P(Y){pe[Y?"unshift":"push"](()=>{u=Y,t(4,u)})}function L(Y){pe[Y?"unshift":"push"](()=>{f=Y,t(5,f)})}const R=()=>c==null?void 0:c.load(),j=()=>c==null?void 0:c.load();return n.$$.update=()=>{n.$$.dirty&1024&&t(7,i=l.filter(Y=>Y.name!="profiles")),n.$$.dirty&516&&(s==null?void 0:s.id)&&g!=s.id&&(t(9,g=s.id),t(1,h="-created"),t(0,d="")),n.$$.dirty&7&&(h||d||(s==null?void 0:s.id))&&W.replaceClientQueryParams({collectionId:s==null?void 0:s.id,filter:d,sort:h})},[d,h,s,a,u,f,c,i,r,g,l,y,b,v,S,$,C,M,T,E,D,P,L,R,j]}class kA extends Pe{constructor(e){super(),Ee(this,e,vA,yA,De,{})}}function xm(n){let e,t;return e=new Fe({props:{class:"form-field disabled",name:"id",$$slots:{default:[wA,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&2|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function wA(n){let e,t,i,s,l,r,o,a,u;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="ID",r=O(),o=_("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[31]),p(o,"type","text"),p(o,"id",a=n[31]),o.value=u=n[1].id,o.disabled=!0},m(f,c){w(f,e,c),m(e,t),m(e,i),m(e,s),w(f,r,c),w(f,o,c)},p(f,c){c[1]&1&&l!==(l=f[31])&&p(e,"for",l),c[1]&1&&a!==(a=f[31])&&p(o,"id",a),c[0]&2&&u!==(u=f[1].id)&&o.value!==u&&(o.value=u)},d(f){f&&k(e),f&&k(r),f&&k(o)}}}function Xm(n){let e,t,i,s;return{c(){e=_("div"),e.innerHTML='<i class="ri-shield-check-line"></i>',p(e,"class","form-field-addon txt-success")},m(l,r){w(l,e,r),i||(s=Xe(t=St.call(null,e,"Verified")),i=!0)},d(l){l&&k(e),i=!1,s()}}}function SA(n){let e,t,i,s,l,r,o,a,u,f,c,d=n[1].verified&&Xm();return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Email",r=O(),d&&d.c(),o=O(),a=_("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[31]),p(a,"type","email"),p(a,"autocomplete","off"),p(a,"id",u=n[31]),a.required=!0},m(h,g){w(h,e,g),m(e,t),m(e,i),m(e,s),w(h,r,g),d&&d.m(h,g),w(h,o,g),w(h,a,g),$e(a,n[2]),f||(c=Q(a,"input",n[19]),f=!0)},p(h,g){g[1]&1&&l!==(l=h[31])&&p(e,"for",l),h[1].verified?d||(d=Xm(),d.c(),d.m(o.parentNode,o)):d&&(d.d(1),d=null),g[1]&1&&u!==(u=h[31])&&p(a,"id",u),g[0]&4&&a.value!==h[2]&&$e(a,h[2])},d(h){h&&k(e),h&&k(r),d&&d.d(h),h&&k(o),h&&k(a),f=!1,c()}}}function Qm(n){let e,t;return e=new Fe({props:{class:"form-field form-field-toggle",$$slots:{default:[$A,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&8|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function $A(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[31]),p(s,"for",r=n[31])},m(u,f){w(u,e,f),e.checked=n[3],w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[20]),o=!0)},p(u,f){f[1]&1&&t!==(t=u[31])&&p(e,"id",t),f[0]&8&&(e.checked=u[3]),f[1]&1&&r!==(r=u[31])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function eg(n){let e,t,i,s,l,r,o,a,u;return s=new Fe({props:{class:"form-field required",name:"password",$$slots:{default:[CA,({uniqueId:f})=>({31:f}),({uniqueId:f})=>[0,f?1:0]]},$$scope:{ctx:n}}}),o=new Fe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[MA,({uniqueId:f})=>({31:f}),({uniqueId:f})=>[0,f?1:0]]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),i=_("div"),B(s.$$.fragment),l=O(),r=_("div"),B(o.$$.fragment),p(i,"class","col-sm-6"),p(r,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){w(f,e,c),m(e,t),m(t,i),V(s,i,null),m(t,l),m(t,r),V(o,r,null),u=!0},p(f,c){const d={};c[0]&128|c[1]&3&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c[0]&256|c[1]&3&&(h.$$scope={dirty:c,ctx:f}),o.$set(h)},i(f){u||(A(s.$$.fragment,f),A(o.$$.fragment,f),Ot(()=>{a||(a=ft(t,fn,{duration:150},!0)),a.run(1)}),u=!0)},o(f){F(s.$$.fragment,f),F(o.$$.fragment,f),a||(a=ft(t,fn,{duration:150},!1)),a.run(0),u=!1},d(f){f&&k(e),z(s),z(o),f&&a&&a.end()}}}function CA(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Password",r=O(),o=_("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[31]),p(o,"type","password"),p(o,"autocomplete","new-password"),p(o,"id",a=n[31]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),$e(o,n[7]),u||(f=Q(o,"input",n[21]),u=!0)},p(c,d){d[1]&1&&l!==(l=c[31])&&p(e,"for",l),d[1]&1&&a!==(a=c[31])&&p(o,"id",a),d[0]&128&&o.value!==c[7]&&$e(o,c[7])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function MA(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Password confirm",r=O(),o=_("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[31]),p(o,"type","password"),p(o,"autocomplete","new-password"),p(o,"id",a=n[31]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),$e(o,n[8]),u||(f=Q(o,"input",n[22]),u=!0)},p(c,d){d[1]&1&&l!==(l=c[31])&&p(e,"for",l),d[1]&1&&a!==(a=c[31])&&p(o,"id",a),d[0]&256&&o.value!==c[8]&&$e(o,c[8])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function tg(n){let e,t;return e=new Fe({props:{class:"form-field form-field-toggle",$$slots:{default:[OA,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&512|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function OA(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Send verification email"),p(e,"type","checkbox"),p(e,"id",t=n[31]),p(s,"for",r=n[31])},m(u,f){w(u,e,f),e.checked=n[9],w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[23]),o=!0)},p(u,f){f[1]&1&&t!==(t=u[31])&&p(e,"id",t),f[0]&512&&(e.checked=u[9]),f[1]&1&&r!==(r=u[31])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function TA(n){let e,t,i,s,l,r,o,a,u,f=!n[1].isNew&&xm(n);i=new Fe({props:{class:"form-field required",name:"email",$$slots:{default:[SA,({uniqueId:g})=>({31:g}),({uniqueId:g})=>[0,g?1:0]]},$$scope:{ctx:n}}});let c=!n[1].isNew&&Qm(n),d=(n[1].isNew||n[3])&&eg(n),h=n[1].isNew&&tg(n);return{c(){e=_("form"),f&&f.c(),t=O(),B(i.$$.fragment),s=O(),c&&c.c(),l=O(),d&&d.c(),r=O(),h&&h.c(),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(g,y){w(g,e,y),f&&f.m(e,null),m(e,t),V(i,e,null),m(e,s),c&&c.m(e,null),m(e,l),d&&d.m(e,null),m(e,r),h&&h.m(e,null),o=!0,a||(u=Q(e,"submit",Wt(n[12])),a=!0)},p(g,y){g[1].isNew?f&&(Me(),F(f,1,1,()=>{f=null}),Oe()):f?(f.p(g,y),y[0]&2&&A(f,1)):(f=xm(g),f.c(),A(f,1),f.m(e,t));const b={};y[0]&6|y[1]&3&&(b.$$scope={dirty:y,ctx:g}),i.$set(b),g[1].isNew?c&&(Me(),F(c,1,1,()=>{c=null}),Oe()):c?(c.p(g,y),y[0]&2&&A(c,1)):(c=Qm(g),c.c(),A(c,1),c.m(e,l)),g[1].isNew||g[3]?d?(d.p(g,y),y[0]&10&&A(d,1)):(d=eg(g),d.c(),A(d,1),d.m(e,r)):d&&(Me(),F(d,1,1,()=>{d=null}),Oe()),g[1].isNew?h?(h.p(g,y),y[0]&2&&A(h,1)):(h=tg(g),h.c(),A(h,1),h.m(e,null)):h&&(Me(),F(h,1,1,()=>{h=null}),Oe())},i(g){o||(A(f),A(i.$$.fragment,g),A(c),A(d),A(h),o=!0)},o(g){F(f),F(i.$$.fragment,g),F(c),F(d),F(h),o=!1},d(g){g&&k(e),f&&f.d(),z(i),c&&c.d(),d&&d.d(),h&&h.d(),a=!1,u()}}}function DA(n){let e,t=n[1].isNew?"New user":"Edit user",i;return{c(){e=_("h4"),i=H(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New user":"Edit user")&&ge(i,t)},d(s){s&&k(e)}}}function ng(n){let e,t,i,s,l,r,o,a,u;return r=new ks({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[AA]},$$scope:{ctx:n}}}),{c(){e=_("button"),t=_("span"),i=O(),s=_("i"),l=O(),B(r.$$.fragment),o=O(),a=_("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){w(f,e,c),m(e,t),m(e,i),m(e,s),m(e,l),V(r,e,null),w(f,o,c),w(f,a,c),u=!0},p(f,c){const d={};c[0]&2|c[1]&2&&(d.$$scope={dirty:c,ctx:f}),r.$set(d)},i(f){u||(A(r.$$.fragment,f),u=!0)},o(f){F(r.$$.fragment,f),u=!1},d(f){f&&k(e),z(r),f&&k(o),f&&k(a)}}}function ig(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-mail-check-line"></i> 
+                            <span class="txt">Send verification email</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[16]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function AA(n){let e,t,i,s,l=!n[1].verified&&ig(n);return{c(){l&&l.c(),e=O(),t=_("button"),t.innerHTML=`<i class="ri-delete-bin-7-line"></i> 
+                        <span class="txt">Delete</span>`,p(t,"type","button"),p(t,"class","dropdown-item")},m(r,o){l&&l.m(r,o),w(r,e,o),w(r,t,o),i||(s=Q(t,"click",n[17]),i=!0)},p(r,o){r[1].verified?l&&(l.d(1),l=null):l?l.p(r,o):(l=ig(r),l.c(),l.m(e.parentNode,e))},d(r){l&&l.d(r),r&&k(e),r&&k(t),i=!1,s()}}}function EA(n){let e,t,i,s,l,r,o=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&ng(n);return{c(){h&&h.c(),e=O(),t=_("button"),i=_("span"),i.textContent="Cancel",s=O(),l=_("button"),r=_("span"),a=H(o),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[5],p(r,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[5],ee(l,"btn-loading",n[5])},m(g,y){h&&h.m(g,y),w(g,e,y),w(g,t,y),m(t,i),w(g,s,y),w(g,l,y),m(l,r),m(r,a),f=!0,c||(d=Q(t,"click",n[18]),c=!0)},p(g,y){g[1].isNew?h&&(Me(),F(h,1,1,()=>{h=null}),Oe()):h?(h.p(g,y),y[0]&2&&A(h,1)):(h=ng(g),h.c(),A(h,1),h.m(e.parentNode,e)),(!f||y[0]&32)&&(t.disabled=g[5]),(!f||y[0]&2)&&o!==(o=g[1].isNew?"Create":"Save changes")&&ge(a,o),(!f||y[0]&1056&&u!==(u=!g[10]||g[5]))&&(l.disabled=u),y[0]&32&&ee(l,"btn-loading",g[5])},i(g){f||(A(h),f=!0)},o(g){F(h),f=!1},d(g){h&&h.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function PA(n){let e,t,i={popup:!0,class:"user-panel",beforeHide:n[24],$$slots:{footer:[EA],header:[DA],default:[TA]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[25](e),e.$on("hide",n[26]),e.$on("show",n[27]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&1088&&(r.beforeHide=s[24]),l[0]&1966|l[1]&2&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[25](null),z(e,s)}}}function LA(n,e,t){let i;const s=_n(),l="user_"+W.randomString(5);let r,o=new io,a=!1,u=!1,f="",c="",d="",h=!1,g=!0;function y(K){return v(K),t(6,u=!0),r==null?void 0:r.show()}function b(){return r==null?void 0:r.hide()}function v(K){Ki({}),t(1,o=K!=null&&K.clone?K.clone():new io),S()}function S(){t(3,h=!1),t(9,g=!0),t(2,f=(o==null?void 0:o.email)||""),t(7,c=""),t(8,d="")}function $(){if(a||!i)return;t(5,a=!0);const K={email:f};(o.isNew||h)&&(K.password=c,K.passwordConfirm=d);let ne;o.isNew?ne=ke.Users.create(K):ne=ke.Users.update(o.id,K),ne.then(async ce=>{g&&M(!1),t(6,u=!1),b(),mn(o.isNew?"Successfully created user.":"Successfully updated user."),s("save",ce)}).catch(ce=>{ke.errorResponseHandler(ce)}).finally(()=>{t(5,a=!1)})}function C(){!(o!=null&&o.id)||Mi("Do you really want to delete the selected user?",()=>ke.Users.delete(o.id).then(()=>{t(6,u=!1),b(),mn("Successfully deleted user."),s("delete",o)}).catch(K=>{ke.errorResponseHandler(K)}))}function M(K=!0){return ke.Users.requestVerification(o.isNew?f:o.email).then(()=>{t(6,u=!1),b(),K&&mn(`Successfully sent verification email to ${o.email}.`)}).catch(ne=>{ke.errorResponseHandler(ne)})}const T=()=>M(),E=()=>C(),D=()=>b();function P(){f=this.value,t(2,f)}function L(){h=this.checked,t(3,h)}function R(){c=this.value,t(7,c)}function j(){d=this.value,t(8,d)}function G(){g=this.checked,t(9,g)}const Y=()=>i&&u?(Mi("You have unsaved changes. Do you really want to close the panel?",()=>{t(6,u=!1),b()}),!1):!0;function q(K){pe[K?"unshift":"push"](()=>{r=K,t(4,r)})}function Z(K){ut.call(this,n,K)}function J(K){ut.call(this,n,K)}return n.$$.update=()=>{n.$$.dirty[0]&14&&t(10,i=o.isNew&&f!=""||h||f!==o.email)},[b,o,f,h,r,a,u,c,d,g,i,l,$,C,M,y,T,E,D,P,L,R,j,G,Y,q,Z,J]}class FA extends Pe{constructor(e){super(),Ee(this,e,LA,PA,De,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function sg(n,e,t){const i=n.slice();return i[37]=e[t],i}function lg(n,e,t){const i=n.slice();return i[40]=e[t],i}function rg(n,e,t){const i=n.slice();return i[40]=e[t],i}function IA(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E=[],D=new Map,P,L,R,j,G,Y,q,Z,J,K,ne=[],ce=new Map,be,se,x,Te,te;c=new Po({props:{value:n[3],placeholder:"Search filter, eg. verified=1",extraAutocompleteKeys:["verified","email"]}}),c.$on("submit",n[17]);function _e(X){n[18](X)}let fe={class:"col-type-text col-field-id",name:"id",$$slots:{default:[RA]},$$scope:{ctx:n}};n[4]!==void 0&&(fe.sort=n[4]),v=new tn({props:fe}),pe.push(()=>Ie(v,"sort",_e));function ie(X){n[19](X)}let ye={class:"col-type-email col-field-email",name:"email",$$slots:{default:[jA]},$$scope:{ctx:n}};n[4]!==void 0&&(ye.sort=n[4]),C=new tn({props:ye}),pe.push(()=>Ie(C,"sort",ie));let He=n[12];const Le=X=>X[40].name;for(let X=0;X<He.length;X+=1){let ue=rg(n,He,X),Ue=Le(ue);D.set(Ue,E[X]=og(Ue,ue))}function Re(X){n[20](X)}let ae={class:"col-type-date col-field-created",name:"created",$$slots:{default:[HA]},$$scope:{ctx:n}};n[4]!==void 0&&(ae.sort=n[4]),L=new tn({props:ae}),pe.push(()=>Ie(L,"sort",Re));function re(X){n[21](X)}let ve={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[qA]},$$scope:{ctx:n}};n[4]!==void 0&&(ve.sort=n[4]),G=new tn({props:ve}),pe.push(()=>Ie(G,"sort",re));let qe=n[1];const Ve=X=>X[37].id;for(let X=0;X<qe.length;X+=1){let ue=sg(n,qe,X),Ue=Ve(ue);ce.set(Ue,ne[X]=cg(Ue,ue))}let Je=null;qe.length||(Je=ag(n));let me=n[1].length&&dg(n),Ae=n[1].length&&n[13]&&pg(n);return{c(){e=_("main"),t=_("header"),i=_("nav"),i.innerHTML='<div class="breadcrumb-item">Users</div>',s=O(),l=_("button"),l.innerHTML='<i class="ri-settings-4-line"></i>',r=O(),o=_("div"),a=O(),u=_("button"),u.innerHTML=`<i class="ri-add-line"></i> 
+                <span class="txt">New user</span>`,f=O(),B(c.$$.fragment),d=O(),h=_("div"),g=_("table"),y=_("thead"),b=_("tr"),B(v.$$.fragment),$=O(),B(C.$$.fragment),T=O();for(let X=0;X<E.length;X+=1)E[X].c();P=O(),B(L.$$.fragment),j=O(),B(G.$$.fragment),q=O(),Z=_("th"),J=O(),K=_("tbody");for(let X=0;X<ne.length;X+=1)ne[X].c();Je&&Je.c(),be=O(),me&&me.c(),se=O(),Ae&&Ae.c(),p(i,"class","breadcrumbs"),p(l,"type","button"),p(l,"class","btn btn-secondary btn-circle"),p(o,"class","flex-fill"),p(u,"type","button"),p(u,"class","btn btn-expanded"),p(t,"class","page-header"),p(Z,"class","col-type-action min-width"),p(g,"class","table"),ee(g,"table-loading",n[10]),p(h,"class","table-wrapper"),p(e,"class","page-wrapper")},m(X,ue){w(X,e,ue),m(e,t),m(t,i),m(t,s),m(t,l),m(t,r),m(t,o),m(t,a),m(t,u),m(e,f),V(c,e,null),m(e,d),m(e,h),m(h,g),m(g,y),m(y,b),V(v,b,null),m(b,$),V(C,b,null),m(b,T);for(let Ue=0;Ue<E.length;Ue+=1)E[Ue].m(b,null);m(b,P),V(L,b,null),m(b,j),V(G,b,null),m(b,q),m(b,Z),m(g,J),m(g,K);for(let Ue=0;Ue<ne.length;Ue+=1)ne[Ue].m(K,null);Je&&Je.m(K,null),m(e,be),me&&me.m(e,null),m(e,se),Ae&&Ae.m(e,null),x=!0,Te||(te=[Xe(St.call(null,l,{text:"Edit profile collection",position:"right"})),Q(l,"click",n[15]),Q(u,"click",n[16])],Te=!0)},p(X,ue){const Ue={};ue[0]&8&&(Ue.value=X[3]),c.$set(Ue);const bt={};ue[1]&16384&&(bt.$$scope={dirty:ue,ctx:X}),!S&&ue[0]&16&&(S=!0,bt.sort=X[4],je(()=>S=!1)),v.$set(bt);const it={};ue[1]&16384&&(it.$$scope={dirty:ue,ctx:X}),!M&&ue[0]&16&&(M=!0,it.sort=X[4],je(()=>M=!1)),C.$set(it),ue[0]&4096&&(He=X[12],E=rt(E,ue,Le,1,X,He,D,b,un,og,P,rg));const yt={};ue[1]&16384&&(yt.$$scope={dirty:ue,ctx:X}),!R&&ue[0]&16&&(R=!0,yt.sort=X[4],je(()=>R=!1)),L.$set(yt);const at={};ue[1]&16384&&(at.$$scope={dirty:ue,ctx:X}),!Y&&ue[0]&16&&(Y=!0,at.sort=X[4],je(()=>Y=!1)),G.$set(at),ue[0]&5450&&(qe=X[1],Me(),ne=rt(ne,ue,Ve,1,X,qe,ce,K,Ft,cg,null,sg),Oe(),!qe.length&&Je?Je.p(X,ue):qe.length?Je&&(Je.d(1),Je=null):(Je=ag(X),Je.c(),Je.m(K,null))),ue[0]&1024&&ee(g,"table-loading",X[10]),X[1].length?me?me.p(X,ue):(me=dg(X),me.c(),me.m(e,se)):me&&(me.d(1),me=null),X[1].length&&X[13]?Ae?Ae.p(X,ue):(Ae=pg(X),Ae.c(),Ae.m(e,null)):Ae&&(Ae.d(1),Ae=null)},i(X){if(!x){A(c.$$.fragment,X),A(v.$$.fragment,X),A(C.$$.fragment,X),A(L.$$.fragment,X),A(G.$$.fragment,X);for(let ue=0;ue<qe.length;ue+=1)A(ne[ue]);x=!0}},o(X){F(c.$$.fragment,X),F(v.$$.fragment,X),F(C.$$.fragment,X),F(L.$$.fragment,X),F(G.$$.fragment,X);for(let ue=0;ue<ne.length;ue+=1)F(ne[ue]);x=!1},d(X){X&&k(e),z(c),z(v),z(C);for(let ue=0;ue<E.length;ue+=1)E[ue].d();z(L),z(G);for(let ue=0;ue<ne.length;ue+=1)ne[ue].d();Je&&Je.d(),me&&me.d(),Ae&&Ae.d(),Te=!1,lt(te)}}}function NA(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span> 
+        <h1>Loading users...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function RA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function jA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="email",p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function og(n,e){let t,i,s,l,r,o,a,u=e[40].name+"",f,c,d;return{key:n,first:null,c(){t=_("th"),i=_("div"),s=_("i"),r=O(),o=_("span"),a=H("profile."),f=H(u),p(s,"class",l=W.getFieldTypeIcon(e[40].type)),p(o,"class","txt"),p(i,"class","col-header-content"),p(t,"class",c="col-type-"+e[40].type+" col-field-"+e[40].name),p(t,"name",d=e[40].name),this.first=t},m(h,g){w(h,t,g),m(t,i),m(i,s),m(i,r),m(i,o),m(o,a),m(o,f)},p(h,g){e=h,g[0]&4096&&l!==(l=W.getFieldTypeIcon(e[40].type))&&p(s,"class",l),g[0]&4096&&u!==(u=e[40].name+"")&&ge(f,u),g[0]&4096&&c!==(c="col-type-"+e[40].type+" col-field-"+e[40].name)&&p(t,"class",c),g[0]&4096&&d!==(d=e[40].name)&&p(t,"name",d)},d(h){h&&k(t)}}}function HA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function qA(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="updated",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function ag(n){let e;function t(l,r){return l[10]?zA:VA}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function VA(n){var o;let e,t,i,s,l,r=((o=n[3])==null?void 0:o.length)&&ug(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No users found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[3])!=null&&f.length?r?r.p(a,u):(r=ug(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function zA(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td> 
+                            `},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function ug(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[24]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function fg(n,e){let t,i,s;return i=new qb({props:{field:e[40],record:e[37].profile||{}}}),{key:n,first:null,c(){t=st(),B(i.$$.fragment),this.first=t},m(l,r){w(l,t,r),V(i,l,r),s=!0},p(l,r){e=l;const o={};r[0]&4096&&(o.field=e[40]),r[0]&2&&(o.record=e[37].profile||{}),i.$set(o)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){F(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function cg(n,e){let t,i,s,l,r,o,a,u=e[37].email+"",f,c,d,h,g=e[37].verified?"Verified":"Unverified",y,b,v=[],S=new Map,$,C,M,T,E,D,P,L,R,j,G,Y,q,Z,J;s=new jo({props:{id:e[37].id}});let K=e[12];const ne=se=>se[40].name;for(let se=0;se<K.length;se+=1){let x=lg(e,K,se),Te=ne(x);S.set(Te,v[se]=fg(Te,x))}M=new Ci({props:{date:e[37].created}}),D=new Ci({props:{date:e[37].updated}});function ce(){return e[22](e[37])}function be(){return e[23](e[37])}return{key:n,first:null,c(){t=_("tr"),i=_("td"),B(s.$$.fragment),l=O(),r=_("td"),o=_("div"),a=_("span"),f=H(u),d=O(),h=_("span"),y=H(g),b=O();for(let se=0;se<v.length;se+=1)v[se].c();$=O(),C=_("td"),B(M.$$.fragment),T=O(),E=_("td"),B(D.$$.fragment),P=O(),L=_("td"),R=_("button"),R.innerHTML=`<i class="ri-user-settings-line"></i> 
+                                    <span class="txt">Edit user</span>`,j=O(),G=_("button"),G.innerHTML=`<i class="ri-profile-line"></i> 
+                                    <span class="txt">Edit profile</span>`,Y=O(),p(i,"class","col-type-text col-field-id"),p(a,"class","txt"),p(a,"title",c=e[37].email),p(h,"class","label"),ee(h,"label-success",e[37].verified),ee(h,"label-warning",!e[37].verified),p(o,"class","inline-flex"),p(r,"class","col-type-email col-field-email"),p(C,"class","col-type-date col-field-created"),p(E,"class","col-type-date col-field-updated"),p(R,"type","button"),p(R,"class","btn btn-sm btn-outline"),p(G,"type","button"),p(G,"class","btn btn-sm m-l-10"),p(L,"class","col-type-action min-width"),this.first=t},m(se,x){w(se,t,x),m(t,i),V(s,i,null),m(t,l),m(t,r),m(r,o),m(o,a),m(a,f),m(o,d),m(o,h),m(h,y),m(t,b);for(let Te=0;Te<v.length;Te+=1)v[Te].m(t,null);m(t,$),m(t,C),V(M,C,null),m(t,T),m(t,E),V(D,E,null),m(t,P),m(t,L),m(L,R),m(L,j),m(L,G),m(t,Y),q=!0,Z||(J=[Q(R,"click",Un(ce)),Q(G,"click",Un(be))],Z=!0)},p(se,x){e=se;const Te={};x[0]&2&&(Te.id=e[37].id),s.$set(Te),(!q||x[0]&2)&&u!==(u=e[37].email+"")&&ge(f,u),(!q||x[0]&2&&c!==(c=e[37].email))&&p(a,"title",c),(!q||x[0]&2)&&g!==(g=e[37].verified?"Verified":"Unverified")&&ge(y,g),x[0]&2&&ee(h,"label-success",e[37].verified),x[0]&2&&ee(h,"label-warning",!e[37].verified),x[0]&4098&&(K=e[12],Me(),v=rt(v,x,ne,1,e,K,S,t,Ft,fg,$,lg),Oe());const te={};x[0]&2&&(te.date=e[37].created),M.$set(te);const _e={};x[0]&2&&(_e.date=e[37].updated),D.$set(_e)},i(se){if(!q){A(s.$$.fragment,se);for(let x=0;x<K.length;x+=1)A(v[x]);A(M.$$.fragment,se),A(D.$$.fragment,se),q=!0}},o(se){F(s.$$.fragment,se);for(let x=0;x<v.length;x+=1)F(v[x]);F(M.$$.fragment,se),F(D.$$.fragment,se),q=!1},d(se){se&&k(t),z(s);for(let x=0;x<v.length;x+=1)v[x].d();z(M),z(D),Z=!1,lt(J)}}}function dg(n){let e,t,i=n[1].length+"",s,l,r;return{c(){e=_("small"),t=H("Showing "),s=H(i),l=H(" of "),r=H(n[2]),p(e,"class","block txt-hint txt-right m-t-sm")},m(o,a){w(o,e,a),m(e,t),m(e,s),m(e,l),m(e,r)},p(o,a){a[0]&2&&i!==(i=o[1].length+"")&&ge(s,i),a[0]&4&&ge(r,o[2])},d(o){o&&k(e)}}}function pg(n){let e,t,i,s,l=n[2]-n[1].length+"",r,o,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=H("Load more ("),r=H(l),o=H(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ee(t,"btn-loading",n[10]),ee(t,"btn-disabled",n[10]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,r),m(i,o),a||(u=Q(t,"click",n[25]),a=!0)},p(f,c){c[0]&6&&l!==(l=f[2]-f[1].length+"")&&ge(r,l),c[0]&1024&&ee(t,"btn-loading",f[10]),c[0]&1024&&ee(t,"btn-disabled",f[10])},d(f){f&&k(e),a=!1,u()}}}function BA(n){let e,t,i,s,l,r,o,a,u;const f=[NA,IA],c=[];function d(b,v){return b[11]?0:1}e=d(n),t=c[e]=f[e](n);let h={};s=new FA({props:h}),n[26](s),s.$on("save",n[27]),s.$on("delete",n[28]);let g={};r=new gf({props:g}),n[29](r),r.$on("save",n[30]);let y={collection:n[5]};return a=new Hb({props:y}),n[31](a),a.$on("save",n[32]),{c(){t.c(),i=O(),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment)},m(b,v){c[e].m(b,v),w(b,i,v),V(s,b,v),w(b,l,v),V(r,b,v),w(b,o,v),V(a,b,v),u=!0},p(b,v){let S=e;e=d(b),e===S?c[e].p(b,v):(Me(),F(c[S],1,1,()=>{c[S]=null}),Oe(),t=c[e],t?t.p(b,v):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const $={};s.$set($);const C={};r.$set(C);const M={};v[0]&32&&(M.collection=b[5]),a.$set(M)},i(b){u||(A(t),A(s.$$.fragment,b),A(r.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){F(t),F(s.$$.fragment,b),F(r.$$.fragment,b),F(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[26](null),z(s,b),b&&k(l),n[29](null),z(r,b),b&&k(o),n[31](null),z(a,b)}}}function UA(n,e,t){var Te;let i,s;const l=W.getQueryParams((Te=window.location)==null?void 0:Te.href),r=["id","userId","created","updated"];let o,a,u,f=[],c=1,d=0,h=!1,g=l.filter||"",y=l.sort||"-created",b=new Fn,v=!1;W.setDocumentTitle("Users"),M();async function S(te=1){return t(10,h=!0),ke.Users.getList(te,50,{sort:y||"-created",filter:g}).then(_e=>{te<=1&&$(),t(10,h=!1),t(1,f=f.concat(_e.items)),t(9,c=_e.page),t(2,d=_e.totalItems)}).catch(_e=>{_e!==null&&(t(10,h=!1),console.warn(_e),$(),ke.errorResponseHandler(_e,!1))})}function $(){t(1,f=[]),t(9,c=1),t(2,d=0)}function C(te){const _e=f.find(fe=>fe.id===(te==null?void 0:te.userId));_e&&(_e.profile=te),t(1,f)}async function M(){t(11,v=!0);try{t(5,b=await ke.Collections.getOne("profiles"))}catch(te){ke.errorResponseHandler(te)}t(11,v=!1)}const T=()=>a==null?void 0:a.show(b),E=()=>o==null?void 0:o.show(),D=te=>t(3,g=te.detail);function P(te){y=te,t(4,y)}function L(te){y=te,t(4,y)}function R(te){y=te,t(4,y)}function j(te){y=te,t(4,y)}const G=te=>o==null?void 0:o.show(te),Y=te=>u==null?void 0:u.show(te.profile),q=()=>t(3,g=""),Z=()=>S(c+1);function J(te){pe[te?"unshift":"push"](()=>{o=te,t(6,o)})}const K=()=>S(),ne=()=>S();function ce(te){pe[te?"unshift":"push"](()=>{a=te,t(7,a)})}const be=te=>t(5,b=te.detail);function se(te){pe[te?"unshift":"push"](()=>{u=te,t(8,u)})}const x=te=>C(te.detail);return n.$$.update=()=>{var te;n.$$.dirty[0]&24&&y!==-1&&g!==-1&&(W.replaceClientQueryParams({filter:g,sort:y}),S()),n.$$.dirty[0]&6&&t(13,i=d>f.length),n.$$.dirty[0]&32&&t(12,s=(te=b==null?void 0:b.schema)==null?void 0:te.filter(_e=>!r.includes(_e.name)))},[S,f,d,g,y,b,o,a,u,c,h,v,s,i,C,T,E,D,P,L,R,j,G,Y,q,Z,J,K,ne,ce,be,se,x]}class WA extends Pe{constructor(e){super(),Ee(this,e,UA,BA,De,{loadUsers:0},null,[-1,-1])}get loadUsers(){return this.$$.ctx[0]}}function YA(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$;return{c(){e=_("aside"),t=_("div"),i=_("div"),i.textContent="System",s=O(),l=_("a"),l.innerHTML=`<i class="ri-home-gear-line"></i> 
+            <span class="txt">Application</span>`,r=O(),o=_("a"),o.innerHTML=`<i class="ri-send-plane-2-line"></i> 
+            <span class="txt">Mail settings</span>`,a=O(),u=_("a"),u.innerHTML=`<i class="ri-archive-drawer-line"></i> 
+            <span class="txt">Files storage</span>`,f=O(),c=_("div"),c.textContent="Authentication",d=O(),h=_("a"),h.innerHTML=`<i class="ri-lock-password-line"></i> 
+            <span class="txt">Auth providers</span>`,g=O(),y=_("a"),y.innerHTML=`<i class="ri-key-line"></i> 
+            <span class="txt">Token options</span>`,b=O(),v=_("a"),v.innerHTML=`<i class="ri-shield-user-line"></i> 
+            <span class="txt">Admins</span>`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(o,"href","/settings/mail"),p(o,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(h,"href","/settings/auth-providers"),p(h,"class","sidebar-list-item"),p(y,"href","/settings/tokens"),p(y,"class","sidebar-list-item"),p(v,"href","/settings/admins"),p(v,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(C,M){w(C,e,M),m(e,t),m(t,i),m(t,s),m(t,l),m(t,r),m(t,o),m(t,a),m(t,u),m(t,f),m(t,c),m(t,d),m(t,h),m(t,g),m(t,y),m(t,b),m(t,v),S||($=[Xe(oi.call(null,l,{path:"/settings"})),Xe(On.call(null,l)),Xe(oi.call(null,o,{path:"/settings/mail/?.*"})),Xe(On.call(null,o)),Xe(oi.call(null,u,{path:"/settings/storage/?.*"})),Xe(On.call(null,u)),Xe(oi.call(null,h,{path:"/settings/auth-providers/?.*"})),Xe(On.call(null,h)),Xe(oi.call(null,y,{path:"/settings/tokens/?.*"})),Xe(On.call(null,y)),Xe(oi.call(null,v,{path:"/settings/admins/?.*"})),Xe(On.call(null,v))],S=!0)},p:oe,i:oe,o:oe,d(C){C&&k(e),S=!1,lt($)}}}class nl extends Pe{constructor(e){super(),Ee(this,e,null,YA,De,{})}}function hg(n,e,t){const i=n.slice();return i[31]=e[t],i}function mg(n){let e,t;return e=new Fe({props:{class:"form-field disabled",name:"id",$$slots:{default:[KA,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function KA(n){let e,t,i,s,l,r,o,a,u;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="ID",r=O(),o=_("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[30]),p(o,"type","text"),p(o,"id",a=n[30]),o.value=u=n[1].id,o.disabled=!0},m(f,c){w(f,e,c),m(e,t),m(e,i),m(e,s),w(f,r,c),w(f,o,c)},p(f,c){c[0]&1073741824&&l!==(l=f[30])&&p(e,"for",l),c[0]&1073741824&&a!==(a=f[30])&&p(o,"id",a),c[0]&2&&u!==(u=f[1].id)&&o.value!==u&&(o.value=u)},d(f){f&&k(e),f&&k(r),f&&k(o)}}}function gg(n){let e,t,i,s,l,r,o,a;function u(){return n[17](n[31])}function f(...c){return n[18](n[31],...c)}return{c(){e=_("figure"),t=_("img"),l=O(),ei(t.src,i="/_/images/avatars/avatar"+n[31]+".svg")||p(t,"src",i),p(t,"alt",s="Avatar "+n[31]),p(e,"tabindex","0"),p(e,"class",r="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))},m(c,d){w(c,e,d),m(e,t),m(e,l),o||(a=[Q(e,"click",u),Q(e,"keydown",f)],o=!0)},p(c,d){n=c,d[0]&4&&r!==(r="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",r)},d(c){c&&k(e),o=!1,lt(a)}}}function JA(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Email",r=O(),o=_("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[30]),p(o,"type","email"),p(o,"autocomplete","off"),p(o,"id",a=n[30]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),$e(o,n[3]),u||(f=Q(o,"input",n[19]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(o,"id",a),d[0]&8&&o.value!==c[3]&&$e(o,c[3])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function _g(n){let e,t;return e=new Fe({props:{class:"form-field form-field-toggle",$$slots:{default:[GA,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function GA(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[30]),p(s,"for",r=n[30])},m(u,f){w(u,e,f),e.checked=n[4],w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[20]),o=!0)},p(u,f){f[0]&1073741824&&t!==(t=u[30])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&1073741824&&r!==(r=u[30])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function bg(n){let e,t,i,s,l,r,o,a,u;return s=new Fe({props:{class:"form-field required",name:"password",$$slots:{default:[ZA,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),o=new Fe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[xA,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),i=_("div"),B(s.$$.fragment),l=O(),r=_("div"),B(o.$$.fragment),p(i,"class","col-sm-6"),p(r,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){w(f,e,c),m(e,t),m(t,i),V(s,i,null),m(t,l),m(t,r),V(o,r,null),u=!0},p(f,c){const d={};c[0]&1073742080|c[1]&8&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c[0]&1073742336|c[1]&8&&(h.$$scope={dirty:c,ctx:f}),o.$set(h)},i(f){u||(A(s.$$.fragment,f),A(o.$$.fragment,f),Ot(()=>{a||(a=ft(t,fn,{duration:150},!0)),a.run(1)}),u=!0)},o(f){F(s.$$.fragment,f),F(o.$$.fragment,f),a||(a=ft(t,fn,{duration:150},!1)),a.run(0),u=!1},d(f){f&&k(e),z(s),z(o),f&&a&&a.end()}}}function ZA(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Password",r=O(),o=_("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[30]),p(o,"type","password"),p(o,"autocomplete","new-password"),p(o,"id",a=n[30]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),$e(o,n[8]),u||(f=Q(o,"input",n[21]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(o,"id",a),d[0]&256&&o.value!==c[8]&&$e(o,c[8])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function xA(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="Password confirm",r=O(),o=_("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[30]),p(o,"type","password"),p(o,"autocomplete","new-password"),p(o,"id",a=n[30]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),$e(o,n[9]),u||(f=Q(o,"input",n[22]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(o,"id",a),d[0]&512&&o.value!==c[9]&&$e(o,c[9])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function XA(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g=!n[1].isNew&&mg(n),y=[0,1,2,3,4,5,6,7,8,9],b=[];for(let $=0;$<10;$+=1)b[$]=gg(hg(n,y,$));a=new Fe({props:{class:"form-field required",name:"email",$$slots:{default:[JA,({uniqueId:$})=>({30:$}),({uniqueId:$})=>[$?1073741824:0]]},$$scope:{ctx:n}}});let v=!n[1].isNew&&_g(n),S=(n[1].isNew||n[4])&&bg(n);return{c(){e=_("form"),g&&g.c(),t=O(),i=_("div"),s=_("p"),s.textContent="Avatar",l=O(),r=_("div");for(let $=0;$<10;$+=1)b[$].c();o=O(),B(a.$$.fragment),u=O(),v&&v.c(),f=O(),S&&S.c(),p(s,"class","section-title"),p(r,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m($,C){w($,e,C),g&&g.m(e,null),m(e,t),m(e,i),m(i,s),m(i,l),m(i,r);for(let M=0;M<10;M+=1)b[M].m(r,null);m(e,o),V(a,e,null),m(e,u),v&&v.m(e,null),m(e,f),S&&S.m(e,null),c=!0,d||(h=Q(e,"submit",Wt(n[12])),d=!0)},p($,C){if($[1].isNew?g&&(Me(),F(g,1,1,()=>{g=null}),Oe()):g?(g.p($,C),C[0]&2&&A(g,1)):(g=mg($),g.c(),A(g,1),g.m(e,t)),C[0]&4){y=[0,1,2,3,4,5,6,7,8,9];let T;for(T=0;T<10;T+=1){const E=hg($,y,T);b[T]?b[T].p(E,C):(b[T]=gg(E),b[T].c(),b[T].m(r,null))}for(;T<10;T+=1)b[T].d(1)}const M={};C[0]&1073741832|C[1]&8&&(M.$$scope={dirty:C,ctx:$}),a.$set(M),$[1].isNew?v&&(Me(),F(v,1,1,()=>{v=null}),Oe()):v?(v.p($,C),C[0]&2&&A(v,1)):(v=_g($),v.c(),A(v,1),v.m(e,f)),$[1].isNew||$[4]?S?(S.p($,C),C[0]&18&&A(S,1)):(S=bg($),S.c(),A(S,1),S.m(e,null)):S&&(Me(),F(S,1,1,()=>{S=null}),Oe())},i($){c||(A(g),A(a.$$.fragment,$),A(v),A(S),c=!0)},o($){F(g),F(a.$$.fragment,$),F(v),F(S),c=!1},d($){$&&k(e),g&&g.d(),Bn(b,$),z(a),v&&v.d(),S&&S.d(),d=!1,h()}}}function QA(n){let e,t=n[1].isNew?"New admin":"Edit admin",i;return{c(){e=_("h4"),i=H(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New admin":"Edit admin")&&ge(i,t)},d(s){s&&k(e)}}}function yg(n){let e,t,i,s,l,r,o,a,u;return r=new ks({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[eE]},$$scope:{ctx:n}}}),{c(){e=_("button"),t=_("span"),i=O(),s=_("i"),l=O(),B(r.$$.fragment),o=O(),a=_("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){w(f,e,c),m(e,t),m(e,i),m(e,s),m(e,l),V(r,e,null),w(f,o,c),w(f,a,c),u=!0},p(f,c){const d={};c[1]&8&&(d.$$scope={dirty:c,ctx:f}),r.$set(d)},i(f){u||(A(r.$$.fragment,f),u=!0)},o(f){F(r.$$.fragment,f),u=!1},d(f){f&&k(e),z(r),f&&k(o),f&&k(a)}}}function eE(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i> 
+                        <span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[15]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function tE(n){let e,t,i,s,l,r,o=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&yg(n);return{c(){h&&h.c(),e=O(),t=_("button"),i=_("span"),i.textContent="Cancel",s=O(),l=_("button"),r=_("span"),a=H(o),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[6],p(r,"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(g,y){h&&h.m(g,y),w(g,e,y),w(g,t,y),m(t,i),w(g,s,y),w(g,l,y),m(l,r),m(r,a),f=!0,c||(d=Q(t,"click",n[16]),c=!0)},p(g,y){g[1].isNew?h&&(Me(),F(h,1,1,()=>{h=null}),Oe()):h?(h.p(g,y),y[0]&2&&A(h,1)):(h=yg(g),h.c(),A(h,1),h.m(e.parentNode,e)),(!f||y[0]&64)&&(t.disabled=g[6]),(!f||y[0]&2)&&o!==(o=g[1].isNew?"Create":"Save changes")&&ge(a,o),(!f||y[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),y[0]&64&&ee(l,"btn-loading",g[6])},i(g){f||(A(h),f=!0)},o(g){F(h),f=!1},d(g){h&&h.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function nE(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[tE],header:[QA],default:[XA]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&1152&&(r.beforeHide=s[23]),l[0]&1886|l[1]&8&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[24](null),z(e,s)}}}function iE(n,e,t){let i;const s=_n(),l="admin_"+W.randomString(5);let r,o=new Ws,a=!1,u=!1,f=0,c="",d="",h="",g=!1;function y(J){return v(J),t(7,u=!0),r==null?void 0:r.show()}function b(){return r==null?void 0:r.hide()}function v(J){Ki({}),t(1,o=J!=null&&J.clone?J.clone():new Ws),S()}function S(){t(4,g=!1),t(3,c=(o==null?void 0:o.email)||""),t(2,f=(o==null?void 0:o.avatar)||0),t(8,d=""),t(9,h="")}function $(){if(a||!i)return;t(6,a=!0);const J={email:c,avatar:f};(o.isNew||g)&&(J.password=d,J.passwordConfirm=h);let K;o.isNew?K=ke.Admins.create(J):K=ke.Admins.update(o.id,J),K.then(async ne=>{var ce;t(7,u=!1),b(),mn(o.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",ne),((ce=ke.AuthStore.model)==null?void 0:ce.id)===ne.id&&ke.AuthStore.save(ke.AuthStore.token,ne)}).catch(ne=>{ke.errorResponseHandler(ne)}).finally(()=>{t(6,a=!1)})}function C(){!(o!=null&&o.id)||Mi("Do you really want to delete the selected admin?",()=>ke.Admins.delete(o.id).then(()=>{t(7,u=!1),b(),mn("Successfully deleted admin."),s("delete",o)}).catch(J=>{ke.errorResponseHandler(J)}))}const M=()=>C(),T=()=>b(),E=J=>t(2,f=J),D=(J,K)=>{(K.code==="Enter"||K.code==="Space")&&(K.preventDefault(),t(2,f=J))};function P(){c=this.value,t(3,c)}function L(){g=this.checked,t(4,g)}function R(){d=this.value,t(8,d)}function j(){h=this.value,t(9,h)}const G=()=>i&&u?(Mi("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function Y(J){pe[J?"unshift":"push"](()=>{r=J,t(5,r)})}function q(J){ut.call(this,n,J)}function Z(J){ut.call(this,n,J)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=o.isNew&&c!=""||g||c!==o.email||f!==o.avatar)},[b,o,f,c,g,r,a,u,d,h,i,l,$,C,y,M,T,E,D,P,L,R,j,G,Y,q,Z]}class sE extends Pe{constructor(e){super(),Ee(this,e,iE,nE,De,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function vg(n,e,t){const i=n.slice();return i[21]=e[t],i}function lE(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function rE(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="email",p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function oE(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function aE(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="updated",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function kg(n){let e;function t(l,r){return l[5]?fE:uE}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function uE(n){var o;let e,t,i,s,l,r=((o=n[1])==null?void 0:o.length)&&wg(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No admins found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?r?r.p(a,u):(r=wg(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function fE(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td> 
+                        `},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function wg(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[15]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function Sg(n){let e;return{c(){e=_("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $g(n,e){let t,i,s,l,r,o,a,u,f,c,d,h,g=e[21].email+"",y,b,v,S,$,C,M,T,E,D,P,L,R,j;u=new jo({props:{id:e[21].id}});let G=e[21].id===e[6].id&&Sg();$=new Ci({props:{date:e[21].created}}),T=new Ci({props:{date:e[21].updated}});function Y(){return e[13](e[21])}function q(...Z){return e[14](e[21],...Z)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("figure"),l=_("img"),o=O(),a=_("td"),B(u.$$.fragment),f=O(),G&&G.c(),c=O(),d=_("td"),h=_("span"),y=H(g),v=O(),S=_("td"),B($.$$.fragment),C=O(),M=_("td"),B(T.$$.fragment),E=O(),D=_("td"),D.innerHTML='<i class="ri-arrow-right-line"></i>',P=O(),ei(l.src,r="/_/images/avatars/avatar"+(e[21].avatar||0)+".svg")||p(l,"src",r),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(a,"class","col-type-text col-field-id"),p(h,"class","txt txt-ellipsis"),p(h,"title",b=e[21].email),p(d,"class","col-type-email col-field-email"),p(S,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(D,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Z,J){w(Z,t,J),m(t,i),m(i,s),m(s,l),m(t,o),m(t,a),V(u,a,null),m(a,f),G&&G.m(a,null),m(t,c),m(t,d),m(d,h),m(h,y),m(t,v),m(t,S),V($,S,null),m(t,C),m(t,M),V(T,M,null),m(t,E),m(t,D),m(t,P),L=!0,R||(j=[Q(t,"click",Y),Q(t,"keydown",q)],R=!0)},p(Z,J){e=Z,(!L||J&16&&!ei(l.src,r="/_/images/avatars/avatar"+(e[21].avatar||0)+".svg"))&&p(l,"src",r);const K={};J&16&&(K.id=e[21].id),u.$set(K),e[21].id===e[6].id?G||(G=Sg(),G.c(),G.m(a,null)):G&&(G.d(1),G=null),(!L||J&16)&&g!==(g=e[21].email+"")&&ge(y,g),(!L||J&16&&b!==(b=e[21].email))&&p(h,"title",b);const ne={};J&16&&(ne.date=e[21].created),$.$set(ne);const ce={};J&16&&(ce.date=e[21].updated),T.$set(ce)},i(Z){L||(A(u.$$.fragment,Z),A($.$$.fragment,Z),A(T.$$.fragment,Z),L=!0)},o(Z){F(u.$$.fragment,Z),F($.$$.fragment,Z),F(T.$$.fragment,Z),L=!1},d(Z){Z&&k(t),z(u),G&&G.d(),z($),z(T),R=!1,lt(j)}}}function Cg(n){let e,t,i=n[4].length+"",s,l,r=n[4].length+"",o;return{c(){e=_("small"),t=H("Showing "),s=H(i),l=H(" of "),o=H(r),p(e,"class","block txt-hint txt-right m-t-sm")},m(a,u){w(a,e,u),m(e,t),m(e,s),m(e,l),m(e,o)},p(a,u){u&16&&i!==(i=a[4].length+"")&&ge(s,i),u&16&&r!==(r=a[4].length+"")&&ge(o,r)},d(a){a&&k(e)}}}function cE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L,R,j,G,Y,q,Z,J,K=[],ne=new Map,ce,be,se,x,Te,te;e=new nl({}),c=new Po({props:{value:n[1],placeholder:"Search filter, eg. email='test@example.com'",extraAutocompleteKeys:["email"]}}),c.$on("submit",n[8]);function _e(me){n[9](me)}let fe={class:"col-type-text",name:"id",$$slots:{default:[lE]},$$scope:{ctx:n}};n[2]!==void 0&&(fe.sort=n[2]),$=new tn({props:fe}),pe.push(()=>Ie($,"sort",_e));function ie(me){n[10](me)}let ye={class:"col-type-email col-field-email",name:"email",$$slots:{default:[rE]},$$scope:{ctx:n}};n[2]!==void 0&&(ye.sort=n[2]),T=new tn({props:ye}),pe.push(()=>Ie(T,"sort",ie));function He(me){n[11](me)}let Le={class:"col-type-date col-field-created",name:"created",$$slots:{default:[oE]},$$scope:{ctx:n}};n[2]!==void 0&&(Le.sort=n[2]),P=new tn({props:Le}),pe.push(()=>Ie(P,"sort",He));function Re(me){n[12](me)}let ae={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[aE]},$$scope:{ctx:n}};n[2]!==void 0&&(ae.sort=n[2]),j=new tn({props:ae}),pe.push(()=>Ie(j,"sort",Re));let re=n[4];const ve=me=>me[21].id;for(let me=0;me<re.length;me+=1){let Ae=vg(n,re,me),X=ve(Ae);ne.set(X,K[me]=$g(X,Ae))}let qe=null;re.length||(qe=kg(n));let Ve=n[4].length&&Cg(n),Je={};return se=new sE({props:Je}),n[16](se),se.$on("save",n[17]),se.$on("delete",n[18]),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),l=_("nav"),l.innerHTML=`<div class="breadcrumb-item">Settings</div> 
+            <div class="breadcrumb-item">Admins</div>`,r=O(),o=_("div"),a=O(),u=_("button"),u.innerHTML=`<i class="ri-add-line"></i> 
+            <span class="txt">New admin</span>`,f=O(),B(c.$$.fragment),d=O(),h=_("div"),g=_("table"),y=_("thead"),b=_("tr"),v=_("th"),S=O(),B($.$$.fragment),M=O(),B(T.$$.fragment),D=O(),B(P.$$.fragment),R=O(),B(j.$$.fragment),Y=O(),q=_("th"),Z=O(),J=_("tbody");for(let me=0;me<K.length;me+=1)K[me].c();qe&&qe.c(),ce=O(),Ve&&Ve.c(),be=O(),B(se.$$.fragment),p(l,"class","breadcrumbs"),p(o,"class","flex-fill"),p(u,"type","button"),p(u,"class","btn btn-expanded"),p(s,"class","page-header"),p(v,"class","min-width"),p(q,"class","col-type-action min-width"),p(g,"class","table"),ee(g,"table-loading",n[5]),p(h,"class","table-wrapper"),p(i,"class","page-wrapper")},m(me,Ae){V(e,me,Ae),w(me,t,Ae),w(me,i,Ae),m(i,s),m(s,l),m(s,r),m(s,o),m(s,a),m(s,u),m(i,f),V(c,i,null),m(i,d),m(i,h),m(h,g),m(g,y),m(y,b),m(b,v),m(b,S),V($,b,null),m(b,M),V(T,b,null),m(b,D),V(P,b,null),m(b,R),V(j,b,null),m(b,Y),m(b,q),m(g,Z),m(g,J);for(let X=0;X<K.length;X+=1)K[X].m(J,null);qe&&qe.m(J,null),m(i,ce),Ve&&Ve.m(i,null),w(me,be,Ae),V(se,me,Ae),x=!0,Te||(te=Q(u,"click",n[7]),Te=!0)},p(me,[Ae]){const X={};Ae&2&&(X.value=me[1]),c.$set(X);const ue={};Ae&16777216&&(ue.$$scope={dirty:Ae,ctx:me}),!C&&Ae&4&&(C=!0,ue.sort=me[2],je(()=>C=!1)),$.$set(ue);const Ue={};Ae&16777216&&(Ue.$$scope={dirty:Ae,ctx:me}),!E&&Ae&4&&(E=!0,Ue.sort=me[2],je(()=>E=!1)),T.$set(Ue);const bt={};Ae&16777216&&(bt.$$scope={dirty:Ae,ctx:me}),!L&&Ae&4&&(L=!0,bt.sort=me[2],je(()=>L=!1)),P.$set(bt);const it={};Ae&16777216&&(it.$$scope={dirty:Ae,ctx:me}),!G&&Ae&4&&(G=!0,it.sort=me[2],je(()=>G=!1)),j.$set(it),Ae&122&&(re=me[4],Me(),K=rt(K,Ae,ve,1,me,re,ne,J,Ft,$g,null,vg),Oe(),!re.length&&qe?qe.p(me,Ae):re.length?qe&&(qe.d(1),qe=null):(qe=kg(me),qe.c(),qe.m(J,null))),Ae&32&&ee(g,"table-loading",me[5]),me[4].length?Ve?Ve.p(me,Ae):(Ve=Cg(me),Ve.c(),Ve.m(i,null)):Ve&&(Ve.d(1),Ve=null);const yt={};se.$set(yt)},i(me){if(!x){A(e.$$.fragment,me),A(c.$$.fragment,me),A($.$$.fragment,me),A(T.$$.fragment,me),A(P.$$.fragment,me),A(j.$$.fragment,me);for(let Ae=0;Ae<re.length;Ae+=1)A(K[Ae]);A(se.$$.fragment,me),x=!0}},o(me){F(e.$$.fragment,me),F(c.$$.fragment,me),F($.$$.fragment,me),F(T.$$.fragment,me),F(P.$$.fragment,me),F(j.$$.fragment,me);for(let Ae=0;Ae<K.length;Ae+=1)F(K[Ae]);F(se.$$.fragment,me),x=!1},d(me){z(e,me),me&&k(t),me&&k(i),z(c),z($),z(T),z(P),z(j);for(let Ae=0;Ae<K.length;Ae+=1)K[Ae].d();qe&&qe.d(),Ve&&Ve.d(),me&&k(be),n[16](null),z(se,me),Te=!1,te()}}}function dE(n,e,t){var D;let i;hn(n,Bu,P=>t(6,i=P));const s=W.getQueryParams((D=window.location)==null?void 0:D.href);let l,r=[],o=!1,a=s.filter||"",u=s.sort||"-created";W.setDocumentTitle("Admins");function f(){return t(5,o=!0),t(4,r=[]),ke.Admins.getFullList(100,{sort:u||"-created",filter:a}).then(P=>{t(4,r=P),t(5,o=!1)}).catch(P=>{P!==null&&(t(5,o=!1),console.warn(P),c(),ke.errorResponseHandler(P,!1))})}function c(){t(4,r=[])}const d=()=>l==null?void 0:l.show(),h=P=>t(1,a=P.detail);function g(P){u=P,t(2,u)}function y(P){u=P,t(2,u)}function b(P){u=P,t(2,u)}function v(P){u=P,t(2,u)}const S=P=>l==null?void 0:l.show(P),$=(P,L)=>{(L.code==="Enter"||L.code==="Space")&&(L.preventDefault(),l==null||l.show(P))},C=()=>t(1,a="");function M(P){pe[P?"unshift":"push"](()=>{l=P,t(3,l)})}const T=()=>f(),E=()=>f();return n.$$.update=()=>{n.$$.dirty&6&&u!==-1&&a!==-1&&(W.replaceClientQueryParams({filter:a,sort:u}),f())},[f,a,u,l,r,o,i,d,h,g,y,b,v,S,$,C,M,T,E]}class pE extends Pe{constructor(e){super(),Ee(this,e,dE,cE,De,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function hE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Email"),s=O(),l=_("input"),p(e,"for",i=n[7]),p(l,"type","email"),p(l,"id",r=n[7]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0]),l.focus(),o||(a=Q(l,"input",n[4]),o=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&r!==(r=u[7])&&p(l,"id",r),f&1&&l.value!==u[0]&&$e(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function mE(n){let e,t,i,s,l,r,o,a,u,f,c;return{c(){e=_("label"),t=H("Password"),s=O(),l=_("input"),o=O(),a=_("div"),u=_("a"),u.textContent="Forgotten password?",p(e,"for",i=n[7]),p(l,"type","password"),p(l,"id",r=n[7]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,h){w(d,e,h),m(e,t),w(d,s,h),w(d,l,h),$e(l,n[1]),w(d,o,h),w(d,a,h),m(a,u),f||(c=[Q(l,"input",n[5]),Xe(On.call(null,u))],f=!0)},p(d,h){h&128&&i!==(i=d[7])&&p(e,"for",i),h&128&&r!==(r=d[7])&&p(l,"id",r),h&2&&l.value!==d[1]&&$e(l,d[1])},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(o),d&&k(a),f=!1,lt(c)}}}function gE(n){let e,t,i,s,l,r,o,a,u,f,c;return s=new Fe({props:{class:"form-field required",name:"email",$$slots:{default:[hE,({uniqueId:d})=>({7:d}),({uniqueId:d})=>d?128:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"password",$$slots:{default:[mE,({uniqueId:d})=>({7:d}),({uniqueId:d})=>d?128:0]},$$scope:{ctx:n}}}),{c(){e=_("form"),t=_("div"),t.innerHTML="<h4>Admin sign in</h4>",i=O(),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),a=_("button"),a.innerHTML=`<span class="txt">Login</span> 
+            <i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),ee(a,"btn-disabled",n[2]),ee(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){w(d,e,h),m(e,t),m(e,i),V(s,e,null),m(e,l),V(r,e,null),m(e,o),m(e,a),u=!0,f||(c=Q(e,"submit",Wt(n[3])),f=!0)},p(d,h){const g={};h&385&&(g.$$scope={dirty:h,ctx:d}),s.$set(g);const y={};h&386&&(y.$$scope={dirty:h,ctx:d}),r.$set(y),h&4&&ee(a,"btn-disabled",d[2]),h&4&&ee(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(r.$$.fragment,d),u=!0)},o(d){F(s.$$.fragment,d),F(r.$$.fragment,d),u=!1},d(d){d&&k(e),z(s),z(r),f=!1,c()}}}function _E(n){let e,t;return e=new F0({props:{$$slots:{default:[gE]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&263&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function bE(n,e,t){var f;const i=W.getQueryParams((f=window.location)==null?void 0:f.href);let s=i.demoEmail||"",l=i.demoPassword||"",r=!1;function o(){if(!r)return t(2,r=!0),ke.Admins.authViaEmail(s,l).then(()=>{Zs("/")}).catch(()=>{D0("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function a(){s=this.value,t(0,s)}function u(){l=this.value,t(1,l)}return[s,l,r,o,a,u]}class yE extends Pe{constructor(e){super(),Ee(this,e,bE,_E,De,{})}}function vE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S;return i=new Fe({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[wE,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[SE,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),a=new Fe({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[$E,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),B(a.$$.fragment),u=O(),f=_("div"),c=_("div"),d=O(),h=_("button"),g=_("span"),g.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(c,"class","flex-fill"),p(g,"class","txt"),p(h,"type","submit"),p(h,"class","btn btn-expanded"),h.disabled=y=!n[3]||n[2],ee(h,"btn-loading",n[2]),p(f,"class","col-lg-12 flex"),p(e,"class","grid")},m($,C){w($,e,C),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),V(a,e,null),m(e,u),m(e,f),m(f,c),m(f,d),m(f,h),m(h,g),b=!0,v||(S=Q(h,"click",n[9]),v=!0)},p($,C){const M={};C&12289&&(M.$$scope={dirty:C,ctx:$}),i.$set(M);const T={};C&12289&&(T.$$scope={dirty:C,ctx:$}),r.$set(T);const E={};C&12289&&(E.$$scope={dirty:C,ctx:$}),a.$set(E),(!b||C&12&&y!==(y=!$[3]||$[2]))&&(h.disabled=y),C&4&&ee(h,"btn-loading",$[2])},i($){b||(A(i.$$.fragment,$),A(r.$$.fragment,$),A(a.$$.fragment,$),b=!0)},o($){F(i.$$.fragment,$),F(r.$$.fragment,$),F(a.$$.fragment,$),b=!1},d($){$&&k(e),z(i),z(r),z(a),v=!1,S()}}}function kE(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function wE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Application name"),s=O(),l=_("input"),p(e,"for",i=n[12]),p(l,"type","text"),p(l,"id",r=n[12]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.appName),o||(a=Q(l,"input",n[6]),o=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&r!==(r=u[12])&&p(l,"id",r),f&1&&l.value!==u[0].meta.appName&&$e(l,u[0].meta.appName)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function SE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Application url"),s=O(),l=_("input"),p(e,"for",i=n[12]),p(l,"type","text"),p(l,"id",r=n[12]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.appUrl),o||(a=Q(l,"input",n[7]),o=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&r!==(r=u[12])&&p(l,"id",r),f&1&&l.value!==u[0].meta.appUrl&&$e(l,u[0].meta.appUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function $E(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Logs max days retention"),s=O(),l=_("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",r=n[12]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].logs.maxDays),o||(a=Q(l,"input",n[8]),o=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&r!==(r=u[12])&&p(l,"id",r),f&1&&Mt(l.value)!==u[0].logs.maxDays&&$e(l,u[0].logs.maxDays)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function CE(n){let e,t,i,s,l,r,o,a,u,f,c,d;e=new nl({});const h=[kE,vE],g=[];function y(b,v){return b[1]?0:1}return a=y(n),u=g[a]=h[a](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div> 
+            <div class="breadcrumb-item">Application</div></nav>`,l=O(),r=_("div"),o=_("form"),u.c(),p(s,"class","page-header"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(b,v){V(e,b,v),w(b,t,v),w(b,i,v),m(i,s),m(i,l),m(i,r),m(r,o),g[a].m(o,null),f=!0,c||(d=Q(o,"submit",Wt(n[4])),c=!0)},p(b,[v]){let S=a;a=y(b),a===S?g[a].p(b,v):(Me(),F(g[S],1,1,()=>{g[S]=null}),Oe(),u=g[a],u?u.p(b,v):(u=g[a]=h[a](b),u.c()),A(u,1),u.m(o,null))},i(b){f||(A(e.$$.fragment,b),A(u),f=!0)},o(b){F(e.$$.fragment,b),F(u),f=!1},d(b){z(e,b),b&&k(t),b&&k(i),g[a].d(),c=!1,d()}}}function ME(n,e,t){let i,s={},l=!1,r=!1,o="";W.setDocumentTitle("Application settings"),a();async function a(){t(1,l=!0);try{const y=await ke.Settings.getAll()||{};f(y)}catch(y){ke.errorResponseHandler(y)}t(1,l=!1)}async function u(){if(!(r||!i)){t(2,r=!0);try{const y=await ke.Settings.update(W.filterRedactedProps(s));f(y),mn("Successfully saved application settings.")}catch(y){ke.errorResponseHandler(y)}t(2,r=!1)}}function f(y={}){t(0,s={meta:(y==null?void 0:y.meta)||{},logs:(y==null?void 0:y.logs)||{}}),t(5,o=JSON.stringify(s))}function c(){s.meta.appName=this.value,t(0,s)}function d(){s.meta.appUrl=this.value,t(0,s)}function h(){s.logs.maxDays=Mt(this.value),t(0,s)}const g=()=>u();return n.$$.update=()=>{n.$$.dirty&33&&t(3,i=o!=JSON.stringify(s))},[s,l,r,i,u,o,c,d,h,g]}class OE extends Pe{constructor(e){super(),Ee(this,e,ME,CE,De,{})}}function TE(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let r=0;r<s.length;r+=1)l=ct(l,s[r]);return{c(){e=_("input"),ci(e,l)},m(r,o){w(r,e,o),e.autofocus&&e.focus(),n[7](e),$e(e,n[0]),t||(i=Q(e,"input",n[8]),t=!0)},p(r,o){ci(e,l=bn(s,[{type:"password"},{autocomplete:"new-password"},o&32&&r[5]])),o&1&&e.value!==r[0]&&$e(e,r[0])},d(r){r&&k(e),n[7](null),t=!1,i()}}}function DE(n){let e,t,i,s,l,r,o=[{readOnly:!0},{type:"text"},{placeholder:n[1]},n[5]],a={};for(let u=0;u<o.length;u+=1)a=ct(a,o[u]);return{c(){e=_("div"),t=_("button"),t.innerHTML='<i class="ri-key-line"></i>',i=O(),s=_("input"),p(t,"type","button"),p(t,"class","btn btn-secondary btn-circle"),p(e,"class","form-field-addon"),ci(s,a)},m(u,f){w(u,e,f),m(e,t),w(u,i,f),w(u,s,f),s.autofocus&&s.focus(),l||(r=[Xe(St.call(null,t,{position:"left",text:"Set new value"})),Q(t,"click",n[6])],l=!0)},p(u,f){ci(s,a=bn(o,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&k(e),u&&k(i),u&&k(s),l=!1,lt(r)}}}function AE(n){let e;function t(l,r){return l[3]?DE:TE}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:oe,o:oe,d(l){s.d(l),l&&k(e)}}}function EE(n,e,t){const i=["value","mask"];let s=Ut(e,i),{value:l=""}=e,{mask:r="******"}=e,o,a=!1;async function u(){t(0,l=""),t(3,a=!1),await Oi(),o==null||o.focus()}const f=()=>u();function c(h){pe[h?"unshift":"push"](()=>{o=h,t(2,o)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=ct(ct({},e),di(h)),t(5,s=Ut(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,r=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===r&&t(3,a=!0)},[l,r,o,a,u,s,f,c,d]}class _f extends Pe{constructor(e){super(),Ee(this,e,EE,AE,De,{value:0,mask:1})}}function PE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L,R,j,G;i=new Fe({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[FE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[IE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}}),a=new Fe({props:{class:"form-field required",name:"meta.userVerificationUrl",$$slots:{default:[NE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}}),f=new Fe({props:{class:"form-field required",name:"meta.userResetPasswordUrl",$$slots:{default:[RE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}}),d=new Fe({props:{class:"form-field required",name:"meta.userConfirmEmailChangeUrl",$$slots:{default:[jE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}}),S=new Fe({props:{class:"form-field form-field-toggle",$$slots:{default:[HE,({uniqueId:q})=>({22:q}),({uniqueId:q})=>q?4194304:0]},$$scope:{ctx:n}}});let Y=n[0].smtp.enabled&&Mg(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),B(a.$$.fragment),u=O(),B(f.$$.fragment),c=O(),B(d.$$.fragment),h=O(),g=_("hr"),y=O(),b=_("div"),b.innerHTML=`<p>By default PocketBase uses the OS <code>sendmail</code> command for sending emails.
+                        <br/> 
+                        <strong class="txt-bold">For better emails deliverability it is recommended to enable the SMTP settings
+                            below.</strong></p>`,v=O(),B(S.$$.fragment),$=O(),Y&&Y.c(),C=O(),M=_("div"),T=_("div"),E=O(),D=_("button"),P=_("span"),P.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid"),p(b,"class","content m-b-sm"),p(T,"class","flex-fill"),p(P,"class","txt"),p(D,"type","submit"),p(D,"class","btn btn-expanded"),D.disabled=L=!n[3]||n[2],ee(D,"btn-loading",n[2]),p(M,"class","flex")},m(q,Z){w(q,e,Z),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),V(a,e,null),m(e,u),V(f,e,null),m(e,c),V(d,e,null),w(q,h,Z),w(q,g,Z),w(q,y,Z),w(q,b,Z),w(q,v,Z),V(S,q,Z),w(q,$,Z),Y&&Y.m(q,Z),w(q,C,Z),w(q,M,Z),m(M,T),m(M,E),m(M,D),m(D,P),R=!0,j||(G=Q(D,"click",n[18]),j=!0)},p(q,Z){const J={};Z&12582913&&(J.$$scope={dirty:Z,ctx:q}),i.$set(J);const K={};Z&12582913&&(K.$$scope={dirty:Z,ctx:q}),r.$set(K);const ne={};Z&12582913&&(ne.$$scope={dirty:Z,ctx:q}),a.$set(ne);const ce={};Z&12582913&&(ce.$$scope={dirty:Z,ctx:q}),f.$set(ce);const be={};Z&12582913&&(be.$$scope={dirty:Z,ctx:q}),d.$set(be);const se={};Z&12582913&&(se.$$scope={dirty:Z,ctx:q}),S.$set(se),q[0].smtp.enabled?Y?(Y.p(q,Z),Z&1&&A(Y,1)):(Y=Mg(q),Y.c(),A(Y,1),Y.m(C.parentNode,C)):Y&&(Me(),F(Y,1,1,()=>{Y=null}),Oe()),(!R||Z&12&&L!==(L=!q[3]||q[2]))&&(D.disabled=L),Z&4&&ee(D,"btn-loading",q[2])},i(q){R||(A(i.$$.fragment,q),A(r.$$.fragment,q),A(a.$$.fragment,q),A(f.$$.fragment,q),A(d.$$.fragment,q),A(S.$$.fragment,q),A(Y),R=!0)},o(q){F(i.$$.fragment,q),F(r.$$.fragment,q),F(a.$$.fragment,q),F(f.$$.fragment,q),F(d.$$.fragment,q),F(S.$$.fragment,q),F(Y),R=!1},d(q){q&&k(e),z(i),z(r),z(a),z(f),z(d),q&&k(h),q&&k(g),q&&k(y),q&&k(b),q&&k(v),z(S,q),q&&k($),Y&&Y.d(q),q&&k(C),q&&k(M),j=!1,G()}}}function LE(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function FE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Sender name"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.senderName),o||(a=Q(l,"input",n[7]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].meta.senderName&&$e(l,u[0].meta.senderName)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function IE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Sender address"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","email"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.senderAddress),o||(a=Q(l,"input",n[8]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].meta.senderAddress&&$e(l,u[0].meta.senderAddress)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function NE(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=H("User verification page url"),s=O(),l=_("input"),o=O(),a=_("div"),a.innerHTML=`Used in the user verification email. Available placeholder parameters:
+                            <code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].meta.userVerificationUrl),w(c,o,d),w(c,a,d),u||(f=Q(l,"input",n[9]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&r!==(r=c[22])&&p(l,"id",r),d&1&&l.value!==c[0].meta.userVerificationUrl&&$e(l,c[0].meta.userVerificationUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function RE(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=H("User reset password page url"),s=O(),l=_("input"),o=O(),a=_("div"),a.innerHTML=`Used in the user password reset email. Available placeholder parameters:
+                            <code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].meta.userResetPasswordUrl),w(c,o,d),w(c,a,d),u||(f=Q(l,"input",n[10]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&r!==(r=c[22])&&p(l,"id",r),d&1&&l.value!==c[0].meta.userResetPasswordUrl&&$e(l,c[0].meta.userResetPasswordUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function jE(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=_("label"),t=H("User confirm email change page url"),s=O(),l=_("input"),o=O(),a=_("div"),a.innerHTML=`Used in the user email change confirmation email. Available placeholder
+                            parameters:
+                            <code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].meta.userConfirmEmailChangeUrl),w(c,o,d),w(c,a,d),u||(f=Q(l,"input",n[11]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&r!==(r=c[22])&&p(l,"id",r),d&1&&l.value!==c[0].meta.userConfirmEmailChangeUrl&&$e(l,c[0].meta.userConfirmEmailChangeUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function HE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Use SMTP mail server"),p(e,"type","checkbox"),p(e,"id",t=n[22]),e.required=!0,p(s,"for",r=n[22])},m(u,f){w(u,e,f),e.checked=n[0].smtp.enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[12]),o=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].smtp.enabled),f&4194304&&r!==(r=u[22])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Mg(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$;return i=new Fe({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[qE,({uniqueId:C})=>({22:C}),({uniqueId:C})=>C?4194304:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[VE,({uniqueId:C})=>({22:C}),({uniqueId:C})=>C?4194304:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[zE,({uniqueId:C})=>({22:C}),({uniqueId:C})=>C?4194304:0]},$$scope:{ctx:n}}}),d=new Fe({props:{class:"form-field",name:"smtp.username",$$slots:{default:[BE,({uniqueId:C})=>({22:C}),({uniqueId:C})=>C?4194304:0]},$$scope:{ctx:n}}}),y=new Fe({props:{class:"form-field",name:"smtp.password",$$slots:{default:[UE,({uniqueId:C})=>({22:C}),({uniqueId:C})=>C?4194304:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),f=O(),c=_("div"),B(d.$$.fragment),h=O(),g=_("div"),B(y.$$.fragment),b=O(),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(g,"class","col-lg-6"),p(v,"class","col-lg-12"),p(e,"class","grid")},m(C,M){w(C,e,M),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),m(e,h),m(e,g),V(y,g,null),m(e,b),m(e,v),$=!0},p(C,M){const T={};M&12582913&&(T.$$scope={dirty:M,ctx:C}),i.$set(T);const E={};M&12582913&&(E.$$scope={dirty:M,ctx:C}),r.$set(E);const D={};M&12582913&&(D.$$scope={dirty:M,ctx:C}),u.$set(D);const P={};M&12582913&&(P.$$scope={dirty:M,ctx:C}),d.$set(P);const L={};M&12582913&&(L.$$scope={dirty:M,ctx:C}),y.$set(L)},i(C){$||(A(i.$$.fragment,C),A(r.$$.fragment,C),A(u.$$.fragment,C),A(d.$$.fragment,C),A(y.$$.fragment,C),C&&Ot(()=>{S||(S=ft(e,fn,{duration:150},!0)),S.run(1)}),$=!0)},o(C){F(i.$$.fragment,C),F(r.$$.fragment,C),F(u.$$.fragment,C),F(d.$$.fragment,C),F(y.$$.fragment,C),C&&(S||(S=ft(e,fn,{duration:150},!1)),S.run(0)),$=!1},d(C){C&&k(e),z(i),z(r),z(u),z(d),z(y),C&&S&&S.end()}}}function qE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("SMTP server host"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].smtp.host),o||(a=Q(l,"input",n[13]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].smtp.host&&$e(l,u[0].smtp.host)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function VE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Port"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","number"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].smtp.port),o||(a=Q(l,"input",n[14]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&Mt(l.value)!==u[0].smtp.port&&$e(l,u[0].smtp.port)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function zE(n){let e,t,i,s,l,r,o;function a(f){n[15](f)}let u={id:n[22],items:n[4]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new ws({props:u}),pe.push(()=>Ie(l,"keyOfSelected",a)),{c(){e=_("label"),t=H("TLS Encryption"),s=O(),B(l.$$.fragment),p(e,"for",i=n[22])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&4194304&&i!==(i=f[22]))&&p(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!r&&c&1&&(r=!0,d.keyOfSelected=f[0].smtp.tls,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function BE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Username"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].smtp.username),o||(a=Q(l,"input",n[16]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].smtp.username&&$e(l,u[0].smtp.username)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function UE(n){let e,t,i,s,l,r,o;function a(f){n[17](f)}let u={id:n[22]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new _f({props:u}),pe.push(()=>Ie(l,"value",a)),{c(){e=_("label"),t=H("Password"),s=O(),B(l.$$.fragment),p(e,"for",i=n[22])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&4194304&&i!==(i=f[22]))&&p(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!r&&c&1&&(r=!0,d.value=f[0].smtp.password,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function WE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;e=new nl({});const y=[LE,PE],b=[];function v(S,$){return S[1]?0:1}return f=v(n),c=b[f]=y[f](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div> 
+            <div class="breadcrumb-item">Mail settings</div></nav>`,l=O(),r=_("div"),o=_("form"),a=_("div"),a.innerHTML="<p>Configure common settings for sending emails.</p>",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content txt-xl m-b-base"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,$){V(e,S,$),w(S,t,$),w(S,i,$),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=Q(o,"submit",Wt(n[19])),h=!0)},p(S,[$]){let C=f;f=v(S),f===C?b[f].p(S,$):(Me(),F(b[C],1,1,()=>{b[C]=null}),Oe(),c=b[f],c?c.p(S,$):(c=b[f]=y[f](S),c.c()),A(c,1),c.m(o,null))},i(S){d||(A(e.$$.fragment,S),A(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function YE(n,e,t){let i;const s=[{label:"Optional (StartTLS)",value:!1},{label:"Always",value:!0}];let l={},r=!1,o=!1,a="";W.setDocumentTitle("Mail settings"),u();async function u(){t(1,r=!0);try{const P=await ke.Settings.getAll()||{};c(P)}catch(P){ke.errorResponseHandler(P)}t(1,r=!1)}async function f(){if(!(o||!i)){t(2,o=!0);try{const P=await ke.Settings.update(W.filterRedactedProps(l));c(P),mn("Successfully saved mail settings.")}catch(P){ke.errorResponseHandler(P)}t(2,o=!1)}}function c(P={}){t(0,l={meta:(P==null?void 0:P.meta)||{},smtp:(P==null?void 0:P.smtp)||{}}),t(6,a=JSON.stringify(l))}function d(){l.meta.senderName=this.value,t(0,l)}function h(){l.meta.senderAddress=this.value,t(0,l)}function g(){l.meta.userVerificationUrl=this.value,t(0,l)}function y(){l.meta.userResetPasswordUrl=this.value,t(0,l)}function b(){l.meta.userConfirmEmailChangeUrl=this.value,t(0,l)}function v(){l.smtp.enabled=this.checked,t(0,l)}function S(){l.smtp.host=this.value,t(0,l)}function $(){l.smtp.port=Mt(this.value),t(0,l)}function C(P){n.$$.not_equal(l.smtp.tls,P)&&(l.smtp.tls=P,t(0,l))}function M(){l.smtp.username=this.value,t(0,l)}function T(P){n.$$.not_equal(l.smtp.password,P)&&(l.smtp.password=P,t(0,l))}const E=()=>f(),D=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(3,i=a!=JSON.stringify(l))},[l,r,o,i,s,f,a,d,h,g,y,b,v,S,$,C,M,T,E,D]}class KE extends Pe{constructor(e){super(),Ee(this,e,YE,WE,De,{})}}function JE(n){let e,t,i,s,l,r,o,a,u,f,c,d;e=new Fe({props:{class:"form-field form-field-toggle",$$slots:{default:[ZE,({uniqueId:g})=>({15:g}),({uniqueId:g})=>g?32768:0]},$$scope:{ctx:n}}});let h=n[0].enabled&&Og(n);return{c(){B(e.$$.fragment),t=O(),h&&h.c(),i=O(),s=_("div"),l=_("div"),r=O(),o=_("button"),a=_("span"),a.textContent="Save changes",p(l,"class","flex-fill"),p(a,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-expanded"),o.disabled=u=!n[3]||n[2],ee(o,"btn-loading",n[2]),p(s,"class","flex")},m(g,y){V(e,g,y),w(g,t,y),h&&h.m(g,y),w(g,i,y),w(g,s,y),m(s,l),m(s,r),m(s,o),m(o,a),f=!0,c||(d=Q(o,"click",n[12]),c=!0)},p(g,y){const b={};y&98305&&(b.$$scope={dirty:y,ctx:g}),e.$set(b),g[0].enabled?h?(h.p(g,y),y&1&&A(h,1)):(h=Og(g),h.c(),A(h,1),h.m(i.parentNode,i)):h&&(Me(),F(h,1,1,()=>{h=null}),Oe()),(!f||y&12&&u!==(u=!g[3]||g[2]))&&(o.disabled=u),y&4&&ee(o,"btn-loading",g[2])},i(g){f||(A(e.$$.fragment,g),A(h),f=!0)},o(g){F(e.$$.fragment,g),F(h),f=!1},d(g){z(e,g),g&&k(t),h&&h.d(g),g&&k(i),g&&k(s),c=!1,d()}}}function GE(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function ZE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[15]),e.required=!0,p(s,"for",r=n[15])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[6]),o=!0)},p(u,f){f&32768&&t!==(t=u[15])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&32768&&r!==(r=u[15])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Og(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$;return i=new Fe({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[xE,({uniqueId:C})=>({15:C}),({uniqueId:C})=>C?32768:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[XE,({uniqueId:C})=>({15:C}),({uniqueId:C})=>C?32768:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field required",name:"s3.region",$$slots:{default:[QE,({uniqueId:C})=>({15:C}),({uniqueId:C})=>C?32768:0]},$$scope:{ctx:n}}}),d=new Fe({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[eP,({uniqueId:C})=>({15:C}),({uniqueId:C})=>C?32768:0]},$$scope:{ctx:n}}}),y=new Fe({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[tP,({uniqueId:C})=>({15:C}),({uniqueId:C})=>C?32768:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),f=O(),c=_("div"),B(d.$$.fragment),h=O(),g=_("div"),B(y.$$.fragment),b=O(),v=_("div"),p(t,"class","col-lg-12"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(c,"class","col-lg-6"),p(g,"class","col-lg-6"),p(v,"class","col-lg-12"),p(e,"class","grid")},m(C,M){w(C,e,M),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),m(e,h),m(e,g),V(y,g,null),m(e,b),m(e,v),$=!0},p(C,M){const T={};M&98305&&(T.$$scope={dirty:M,ctx:C}),i.$set(T);const E={};M&98305&&(E.$$scope={dirty:M,ctx:C}),r.$set(E);const D={};M&98305&&(D.$$scope={dirty:M,ctx:C}),u.$set(D);const P={};M&98305&&(P.$$scope={dirty:M,ctx:C}),d.$set(P);const L={};M&98305&&(L.$$scope={dirty:M,ctx:C}),y.$set(L)},i(C){$||(A(i.$$.fragment,C),A(r.$$.fragment,C),A(u.$$.fragment,C),A(d.$$.fragment,C),A(y.$$.fragment,C),C&&Ot(()=>{S||(S=ft(e,fn,{duration:150},!0)),S.run(1)}),$=!0)},o(C){F(i.$$.fragment,C),F(r.$$.fragment,C),F(u.$$.fragment,C),F(d.$$.fragment,C),F(y.$$.fragment,C),C&&(S||(S=ft(e,fn,{duration:150},!1)),S.run(0)),$=!1},d(C){C&&k(e),z(i),z(r),z(u),z(d),z(y),C&&S&&S.end()}}}function xE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Endpoint"),s=O(),l=_("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",r=n[15]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].endpoint),o||(a=Q(l,"input",n[7]),o=!0)},p(u,f){f&32768&&i!==(i=u[15])&&p(e,"for",i),f&32768&&r!==(r=u[15])&&p(l,"id",r),f&1&&l.value!==u[0].endpoint&&$e(l,u[0].endpoint)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function XE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Bucket"),s=O(),l=_("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",r=n[15]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].bucket),o||(a=Q(l,"input",n[8]),o=!0)},p(u,f){f&32768&&i!==(i=u[15])&&p(e,"for",i),f&32768&&r!==(r=u[15])&&p(l,"id",r),f&1&&l.value!==u[0].bucket&&$e(l,u[0].bucket)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function QE(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Region"),s=O(),l=_("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",r=n[15]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].region),o||(a=Q(l,"input",n[9]),o=!0)},p(u,f){f&32768&&i!==(i=u[15])&&p(e,"for",i),f&32768&&r!==(r=u[15])&&p(l,"id",r),f&1&&l.value!==u[0].region&&$e(l,u[0].region)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function eP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Access key"),s=O(),l=_("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",r=n[15]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].accessKey),o||(a=Q(l,"input",n[10]),o=!0)},p(u,f){f&32768&&i!==(i=u[15])&&p(e,"for",i),f&32768&&r!==(r=u[15])&&p(l,"id",r),f&1&&l.value!==u[0].accessKey&&$e(l,u[0].accessKey)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function tP(n){let e,t,i,s,l,r,o;function a(f){n[11](f)}let u={id:n[15],required:!0};return n[0].secret!==void 0&&(u.value=n[0].secret),l=new _f({props:u}),pe.push(()=>Ie(l,"value",a)),{c(){e=_("label"),t=H("Secret"),s=O(),B(l.$$.fragment),p(e,"for",i=n[15])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&32768&&i!==(i=f[15]))&&p(e,"for",i);const d={};c&32768&&(d.id=f[15]),!r&&c&1&&(r=!0,d.value=f[0].secret,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function nP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;e=new nl({});const y=[GE,JE],b=[];function v(S,$){return S[1]?0:1}return f=v(n),c=b[f]=y[f](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div> 
+            <div class="breadcrumb-item">Files storage</div></nav>`,l=O(),r=_("div"),o=_("form"),a=_("div"),a.innerHTML=`<p>By default PocketBase uses the local file system to store uploaded files.</p> 
+                <p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content txt-xl m-b-base"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,$){V(e,S,$),w(S,t,$),w(S,i,$),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=Q(o,"submit",Wt(n[4])),h=!0)},p(S,[$]){let C=f;f=v(S),f===C?b[f].p(S,$):(Me(),F(b[C],1,1,()=>{b[C]=null}),Oe(),c=b[f],c?c.p(S,$):(c=b[f]=y[f](S),c.c()),A(c,1),c.m(o,null))},i(S){d||(A(e.$$.fragment,S),A(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function iP(n,e,t){let i,s={},l=!1,r=!1,o="";W.setDocumentTitle("Files storage"),a();async function a(){t(1,l=!0);try{const S=await ke.Settings.getAll()||{};f(S)}catch(S){ke.errorResponseHandler(S)}t(1,l=!1)}async function u(){if(!(r||!i)){t(2,r=!0);try{const S=await ke.Settings.update(W.filterRedactedProps({s3:s}));f(S),Ki({}),mn("Successfully saved Files storage settings.")}catch(S){ke.errorResponseHandler(S)}t(2,r=!1)}}function f(S={}){t(0,s=(S==null?void 0:S.s3)||{}),t(5,o=JSON.stringify(s))}function c(){s.enabled=this.checked,t(0,s)}function d(){s.endpoint=this.value,t(0,s)}function h(){s.bucket=this.value,t(0,s)}function g(){s.region=this.value,t(0,s)}function y(){s.accessKey=this.value,t(0,s)}function b(S){n.$$.not_equal(s.secret,S)&&(s.secret=S,t(0,s))}const v=()=>u();return n.$$.update=()=>{n.$$.dirty&33&&t(3,i=o!=JSON.stringify(s))},[s,l,r,i,u,o,c,d,h,g,y,b,v]}class sP extends Pe{constructor(e){super(),Ee(this,e,iP,nP,De,{})}}function lP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[16]),p(s,"for",r=n[16])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[8]),o=!0)},p(u,f){f&65536&&t!==(t=u[16])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&65536&&r!==(r=u[16])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Tg(n){let e,t,i,s,l,r,o,a,u,f,c;return i=new Fe({props:{class:"form-field required",name:"emailPassword.minPasswordLength",$$slots:{default:[rP,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field "+(W.isEmpty(n[0].onlyDomains)?"":"disabled"),name:"emailPassword.exceptDomains",$$slots:{default:[oP,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field "+(W.isEmpty(n[0].exceptDomains)?"":"disabled"),name:"emailPassword.onlyDomains",$$slots:{default:[aP,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=O(),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),p(t,"class","col-sm-12 m-t-sm"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(e,"class","grid")},m(d,h){w(d,e,h),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),c=!0},p(d,h){const g={};h&196609&&(g.$$scope={dirty:h,ctx:d}),i.$set(g);const y={};h&1&&(y.class="form-field "+(W.isEmpty(d[0].onlyDomains)?"":"disabled")),h&196609&&(y.$$scope={dirty:h,ctx:d}),r.$set(y);const b={};h&1&&(b.class="form-field "+(W.isEmpty(d[0].exceptDomains)?"":"disabled")),h&196609&&(b.$$scope={dirty:h,ctx:d}),u.$set(b)},i(d){c||(A(i.$$.fragment,d),A(r.$$.fragment,d),A(u.$$.fragment,d),d&&Ot(()=>{f||(f=ft(e,fn,{duration:150},!0)),f.run(1)}),c=!0)},o(d){F(i.$$.fragment,d),F(r.$$.fragment,d),F(u.$$.fragment,d),d&&(f||(f=ft(e,fn,{duration:150},!1)),f.run(0)),c=!1},d(d){d&&k(e),z(i),z(r),z(u),d&&f&&f.end()}}}function rP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Minimum password length"),s=O(),l=_("input"),p(e,"for",i=n[16]),p(l,"type","number"),p(l,"id",r=n[16]),l.required=!0,p(l,"min","5"),p(l,"max","200")},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].minPasswordLength),o||(a=Q(l,"input",n[9]),o=!0)},p(u,f){f&65536&&i!==(i=u[16])&&p(e,"for",i),f&65536&&r!==(r=u[16])&&p(l,"id",r),f&1&&Mt(l.value)!==u[0].minPasswordLength&&$e(l,u[0].minPasswordLength)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function oP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(b){n[10](b)}let y={id:n[16],disabled:!W.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(y.value=n[0].exceptDomains),o=new Ss({props:y}),pe.push(()=>Ie(o,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Except domains",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[16]),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),w(b,r,v),V(o,b,v),w(b,u,v),w(b,f,v),c=!0,d||(h=Xe(St.call(null,s,{text:`Email domains that are NOT allowed to sign up. 
+ This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,v){(!c||v&65536&&l!==(l=b[16]))&&p(e,"for",l);const S={};v&65536&&(S.id=b[16]),v&1&&(S.disabled=!W.isEmpty(b[0].onlyDomains)),!a&&v&1&&(a=!0,S.value=b[0].exceptDomains,je(()=>a=!1)),o.$set(S)},i(b){c||(A(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function aP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(b){n[11](b)}let y={id:n[16]+".config.onlyDomains",disabled:!W.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(y.value=n[0].onlyDomains),o=new Ss({props:y}),pe.push(()=>Ie(o,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=O(),s=_("i"),r=O(),B(o.$$.fragment),u=O(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[16]+".config.onlyDomains"),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),w(b,r,v),V(o,b,v),w(b,u,v),w(b,f,v),c=!0,d||(h=Xe(St.call(null,s,{text:`Email domains that are ONLY allowed to sign up. 
+ This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,v){(!c||v&65536&&l!==(l=b[16]+".config.onlyDomains"))&&p(e,"for",l);const S={};v&65536&&(S.id=b[16]+".config.onlyDomains"),v&1&&(S.disabled=!W.isEmpty(b[0].exceptDomains)),!a&&v&1&&(a=!0,S.value=b[0].onlyDomains,je(()=>a=!1)),o.$set(S)},i(b){c||(A(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function uP(n){let e,t,i,s;e=new Fe({props:{class:"form-field form-field-toggle m-b-0",name:"emailPassword.enabled",$$slots:{default:[lP,({uniqueId:r})=>({16:r}),({uniqueId:r})=>r?65536:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&Tg(n);return{c(){B(e.$$.fragment),t=O(),l&&l.c(),i=st()},m(r,o){V(e,r,o),w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){const a={};o&196609&&(a.$$scope={dirty:o,ctx:r}),e.$set(a),r[0].enabled?l?(l.p(r,o),o&1&&A(l,1)):(l=Tg(r),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Me(),F(l,1,1,()=>{l=null}),Oe())},i(r){s||(A(e.$$.fragment,r),A(l),s=!0)},o(r){F(e.$$.fragment,r),F(l),s=!1},d(r){z(e,r),r&&k(t),l&&l.d(r),r&&k(i)}}}function fP(n){let e;return{c(){e=_("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function cP(n){let e;return{c(){e=_("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Dg(n){let e,t,i,s,l,r;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=St.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){s||(Ot(()=>{i||(i=ft(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){i||(i=ft(e,Wn,{duration:150,start:.7},!1)),i.run(0),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function dP(n){let e,t,i,s,l,r,o;function a(d,h){return d[0].enabled?cP:fP}let u=a(n),f=u(n),c=n[2]&&Dg();return{c(){e=_("div"),e.innerHTML=`<i class="ri-mail-lock-line"></i> 
+            <span class="txt">Email/Password</span>`,t=O(),f.c(),i=O(),s=_("div"),l=O(),c&&c.c(),r=st(),p(e,"class","inline-flex"),p(s,"class","flex-fill")},m(d,h){w(d,e,h),w(d,t,h),f.m(d,h),w(d,i,h),w(d,s,h),w(d,l,h),c&&c.m(d,h),w(d,r,h),o=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(i.parentNode,i))),d[2]?c?h&4&&A(c,1):(c=Dg(),c.c(),A(c,1),c.m(r.parentNode,r)):c&&(Me(),F(c,1,1,()=>{c=null}),Oe())},i(d){o||(A(c),o=!0)},o(d){F(c),o=!1},d(d){d&&k(e),d&&k(t),f.d(d),d&&k(i),d&&k(s),d&&k(l),c&&c.d(d),d&&k(r)}}}function pP(n){let e,t;const i=[n[3]];let s={$$slots:{header:[dP],default:[uP]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ct(s,i[l]);return e=new hf({props:s}),n[12](e),e.$on("expand",n[13]),e.$on("collapse",n[14]),e.$on("toggle",n[15]),{c(){B(e.$$.fragment)},m(l,r){V(e,l,r),t=!0},p(l,[r]){const o=r&8?bn(i,[hi(l[3])]):{};r&131077&&(o.$$scope={dirty:r,ctx:l}),e.$set(o)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){F(e.$$.fragment,l),t=!1},d(l){n[12](null),z(e,l)}}}function hP(n,e,t){let i;const s=["config","expand","collapse","collapseSiblings"];let l=Ut(e,s),r;hn(n,ys,C=>t(7,r=C));let{config:o={}}=e,a;function u(){a==null||a.expand()}function f(){a==null||a.collapse()}function c(){a==null||a.collapseSiblings()}function d(){o.enabled=this.checked,t(0,o)}function h(){o.minPasswordLength=Mt(this.value),t(0,o)}function g(C){n.$$.not_equal(o.exceptDomains,C)&&(o.exceptDomains=C,t(0,o))}function y(C){n.$$.not_equal(o.onlyDomains,C)&&(o.onlyDomains=C,t(0,o))}function b(C){pe[C?"unshift":"push"](()=>{a=C,t(1,a)})}function v(C){ut.call(this,n,C)}function S(C){ut.call(this,n,C)}function $(C){ut.call(this,n,C)}return n.$$set=C=>{e=ct(ct({},e),di(C)),t(3,l=Ut(e,s)),"config"in C&&t(0,o=C.config)},n.$$.update=()=>{n.$$.dirty&128&&t(2,i=!W.isEmpty(r==null?void 0:r.emailPassword))},[o,a,i,l,u,f,c,r,d,h,g,y,b,v,S,$]}class mP extends Pe{constructor(e){super(),Ee(this,e,hP,pP,De,{config:0,expand:4,collapse:5,collapseSiblings:6})}get expand(){return this.$$.ctx[4]}get collapse(){return this.$$.ctx[5]}get collapseSiblings(){return this.$$.ctx[6]}}function gP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[22]),p(s,"for",r=n[22])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[11]),o=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&4194304&&r!==(r=u[22])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Ag(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;l=new Fe({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[_P,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),a=new Fe({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[bP,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),c=new Fe({props:{class:"form-field",name:n[1]+".allowRegistrations",$$slots:{default:[yP,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}});let y=n[4]&&Eg(n);return{c(){e=_("div"),t=_("div"),i=O(),s=_("div"),B(l.$$.fragment),r=O(),o=_("div"),B(a.$$.fragment),u=O(),f=_("div"),B(c.$$.fragment),d=O(),y&&y.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(o,"class","col-lg-6"),p(f,"class","col-lg-12"),p(e,"class","grid")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),V(l,s,null),m(e,r),m(e,o),V(a,o,null),m(e,u),m(e,f),V(c,f,null),m(e,d),y&&y.m(e,null),g=!0},p(b,v){const S={};v&2&&(S.name=b[1]+".clientId"),v&12582913&&(S.$$scope={dirty:v,ctx:b}),l.$set(S);const $={};v&2&&($.name=b[1]+".clientSecret"),v&12582913&&($.$$scope={dirty:v,ctx:b}),a.$set($);const C={};v&2&&(C.name=b[1]+".allowRegistrations"),v&12582913&&(C.$$scope={dirty:v,ctx:b}),c.$set(C),b[4]?y?(y.p(b,v),v&16&&A(y,1)):(y=Eg(b),y.c(),A(y,1),y.m(e,null)):y&&(Me(),F(y,1,1,()=>{y=null}),Oe())},i(b){g||(A(l.$$.fragment,b),A(a.$$.fragment,b),A(c.$$.fragment,b),A(y),b&&Ot(()=>{h||(h=ft(e,fn,{duration:200},!0)),h.run(1)}),g=!0)},o(b){F(l.$$.fragment,b),F(a.$$.fragment,b),F(c.$$.fragment,b),F(y),b&&(h||(h=ft(e,fn,{duration:200},!1)),h.run(0)),g=!1},d(b){b&&k(e),z(l),z(a),z(c),y&&y.d(),b&&h&&h.end()}}}function _P(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Client ID"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].clientId),o||(a=Q(l,"input",n[12]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].clientId&&$e(l,u[0].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function bP(n){let e,t,i,s,l,r,o;function a(f){n[13](f)}let u={id:n[22],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new _f({props:u}),pe.push(()=>Ie(l,"value",a)),{c(){e=_("label"),t=H("Client Secret"),s=O(),B(l.$$.fragment),p(e,"for",i=n[22])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&4194304&&i!==(i=f[22]))&&p(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!r&&c&1&&(r=!0,d.value=f[0].clientSecret,je(()=>r=!1)),l.$set(d)},i(f){o||(A(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function yP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Allow registration for new users"),p(e,"type","checkbox"),p(e,"id",t=n[22]),p(s,"for",r=n[22])},m(u,f){w(u,e,f),e.checked=n[0].allowRegistrations,w(u,i,f),w(u,s,f),m(s,l),o||(a=Q(e,"change",n[14]),o=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].allowRegistrations),f&4194304&&r!==(r=u[22])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Eg(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;return r=new Fe({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[vP,({uniqueId:g})=>({22:g}),({uniqueId:g})=>g?4194304:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[kP,({uniqueId:g})=>({22:g}),({uniqueId:g})=>g?4194304:0]},$$scope:{ctx:n}}}),d=new Fe({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[wP,({uniqueId:g})=>({22:g}),({uniqueId:g})=>g?4194304:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),t.textContent="Optional endpoints (if you self host the OAUTH2 service)",i=O(),s=_("div"),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),f=O(),c=_("div"),B(d.$$.fragment),p(t,"class","section-title"),p(l,"class","col-lg-4"),p(a,"class","col-lg-4"),p(c,"class","col-lg-4"),p(s,"class","grid"),p(e,"class","col-lg-12")},m(g,y){w(g,e,y),m(e,t),m(e,i),m(e,s),m(s,l),V(r,l,null),m(s,o),m(s,a),V(u,a,null),m(s,f),m(s,c),V(d,c,null),h=!0},p(g,y){const b={};y&2&&(b.name=g[1]+".authUrl"),y&12582913&&(b.$$scope={dirty:y,ctx:g}),r.$set(b);const v={};y&2&&(v.name=g[1]+".tokenUrl"),y&12582913&&(v.$$scope={dirty:y,ctx:g}),u.$set(v);const S={};y&2&&(S.name=g[1]+".userApiUrl"),y&12582913&&(S.$$scope={dirty:y,ctx:g}),d.$set(S)},i(g){h||(A(r.$$.fragment,g),A(u.$$.fragment,g),A(d.$$.fragment,g),h=!0)},o(g){F(r.$$.fragment,g),F(u.$$.fragment,g),F(d.$$.fragment,g),h=!1},d(g){g&&k(e),z(r),z(u),z(d)}}}function vP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Custom Auth URL"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","url"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].authUrl),o||(a=Q(l,"input",n[15]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&$e(l,u[0].authUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function kP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Custom Token URL"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].tokenUrl),o||(a=Q(l,"input",n[16]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].tokenUrl&&$e(l,u[0].tokenUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function wP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Custom User API URL"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].userApiUrl),o||(a=Q(l,"input",n[17]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].userApiUrl&&$e(l,u[0].userApiUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function SP(n){let e,t,i,s;e=new Fe({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[gP,({uniqueId:r})=>({22:r}),({uniqueId:r})=>r?4194304:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&Ag(n);return{c(){B(e.$$.fragment),t=O(),l&&l.c(),i=st()},m(r,o){V(e,r,o),w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){const a={};o&2&&(a.name=r[1]+".enabled"),o&12582913&&(a.$$scope={dirty:o,ctx:r}),e.$set(a),r[0].enabled?l?(l.p(r,o),o&1&&A(l,1)):(l=Ag(r),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Me(),F(l,1,1,()=>{l=null}),Oe())},i(r){s||(A(e.$$.fragment,r),A(l),s=!0)},o(r){F(e.$$.fragment,r),F(l),s=!1},d(r){z(e,r),r&&k(t),l&&l.d(r),r&&k(i)}}}function Pg(n){let e;return{c(){e=_("i"),p(e,"class",n[3])},m(t,i){w(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&k(e)}}}function $P(n){let e;return{c(){e=_("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function CP(n){let e;return{c(){e=_("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Lg(n){let e,t,i,s,l,r;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=St.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){s||(Ot(()=>{i||(i=ft(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){i||(i=ft(e,Wn,{duration:150,start:.7},!1)),i.run(0),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function MP(n){let e,t,i,s,l,r,o,a,u,f,c=n[3]&&Pg(n);function d(b,v){return b[0].enabled?CP:$P}let h=d(n),g=h(n),y=n[6]&&Lg();return{c(){e=_("div"),c&&c.c(),t=O(),i=_("span"),s=H(n[2]),l=O(),g.c(),r=O(),o=_("div"),a=O(),y&&y.c(),u=st(),p(i,"class","txt"),p(e,"class","inline-flex"),p(o,"class","flex-fill")},m(b,v){w(b,e,v),c&&c.m(e,null),m(e,t),m(e,i),m(i,s),w(b,l,v),g.m(b,v),w(b,r,v),w(b,o,v),w(b,a,v),y&&y.m(b,v),w(b,u,v),f=!0},p(b,v){b[3]?c?c.p(b,v):(c=Pg(b),c.c(),c.m(e,t)):c&&(c.d(1),c=null),(!f||v&4)&&ge(s,b[2]),h!==(h=d(b))&&(g.d(1),g=h(b),g&&(g.c(),g.m(r.parentNode,r))),b[6]?y?v&64&&A(y,1):(y=Lg(),y.c(),A(y,1),y.m(u.parentNode,u)):y&&(Me(),F(y,1,1,()=>{y=null}),Oe())},i(b){f||(A(y),f=!0)},o(b){F(y),f=!1},d(b){b&&k(e),c&&c.d(),b&&k(l),g.d(b),b&&k(r),b&&k(o),b&&k(a),y&&y.d(b),b&&k(u)}}}function OP(n){let e,t;const i=[n[7]];let s={$$slots:{header:[MP],default:[SP]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ct(s,i[l]);return e=new hf({props:s}),n[18](e),e.$on("expand",n[19]),e.$on("collapse",n[20]),e.$on("toggle",n[21]),{c(){B(e.$$.fragment)},m(l,r){V(e,l,r),t=!0},p(l,[r]){const o=r&128?bn(i,[hi(l[7])]):{};r&8388703&&(o.$$scope={dirty:r,ctx:l}),e.$set(o)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){F(e.$$.fragment,l),t=!1},d(l){n[18](null),z(e,l)}}}function TP(n,e,t){let i;const s=["key","title","icon","config","showSelfHostedFields","expand","collapse"];let l=Ut(e,s),r;hn(n,ys,L=>t(10,r=L));let{key:o}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{showSelfHostedFields:c=!1}=e,d;function h(){d==null||d.expand()}function g(){d==null||d.collapse()}function y(){f.enabled=this.checked,t(0,f)}function b(){f.clientId=this.value,t(0,f)}function v(L){n.$$.not_equal(f.clientSecret,L)&&(f.clientSecret=L,t(0,f))}function S(){f.allowRegistrations=this.checked,t(0,f)}function $(){f.authUrl=this.value,t(0,f)}function C(){f.tokenUrl=this.value,t(0,f)}function M(){f.userApiUrl=this.value,t(0,f)}function T(L){pe[L?"unshift":"push"](()=>{d=L,t(5,d)})}function E(L){ut.call(this,n,L)}function D(L){ut.call(this,n,L)}function P(L){ut.call(this,n,L)}return n.$$set=L=>{e=ct(ct({},e),di(L)),t(7,l=Ut(e,s)),"key"in L&&t(1,o=L.key),"title"in L&&t(2,a=L.title),"icon"in L&&t(3,u=L.icon),"config"in L&&t(0,f=L.config),"showSelfHostedFields"in L&&t(4,c=L.showSelfHostedFields)},n.$$.update=()=>{n.$$.dirty&1026&&t(6,i=!W.isEmpty(W.getNestedVal(r,o))),n.$$.dirty&3&&(f.enabled||L0(o))},[f,o,a,u,c,d,i,l,h,g,r,y,b,v,S,$,C,M,T,E,D,P]}class Hr extends Pe{constructor(e){super(),Ee(this,e,TP,OP,De,{key:1,title:2,icon:3,config:0,showSelfHostedFields:4,expand:8,collapse:9})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}}function DP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P;function L(ce){n[8](ce)}let R={single:!0};n[0].emailAuth!==void 0&&(R.config=n[0].emailAuth),t=new mP({props:R}),n[7](t),pe.push(()=>Ie(t,"config",L));function j(ce){n[9](ce)}let G={single:!0,key:"googleAuth",title:"Google",icon:"ri-google-line"};n[0].googleAuth!==void 0&&(G.config=n[0].googleAuth),l=new Hr({props:G}),pe.push(()=>Ie(l,"config",j));function Y(ce){n[10](ce)}let q={single:!0,key:"facebookAuth",title:"Facebook",icon:"ri-facebook-line"};n[0].facebookAuth!==void 0&&(q.config=n[0].facebookAuth),a=new Hr({props:q}),pe.push(()=>Ie(a,"config",Y));function Z(ce){n[11](ce)}let J={single:!0,key:"githubAuth",title:"GitHub",icon:"ri-github-line"};n[0].githubAuth!==void 0&&(J.config=n[0].githubAuth),c=new Hr({props:J}),pe.push(()=>Ie(c,"config",Z));function K(ce){n[12](ce)}let ne={single:!0,key:"gitlabAuth",title:"GitLab",icon:"ri-gitlab-line",showSelfHostedFields:!0};return n[0].gitlabAuth!==void 0&&(ne.config=n[0].gitlabAuth),g=new Hr({props:ne}),pe.push(()=>Ie(g,"config",K)),{c(){e=_("div"),B(t.$$.fragment),s=O(),B(l.$$.fragment),o=O(),B(a.$$.fragment),f=O(),B(c.$$.fragment),h=O(),B(g.$$.fragment),b=O(),v=_("div"),S=_("div"),$=O(),C=_("button"),M=_("span"),M.textContent="Save changes",p(e,"class","accordions"),p(S,"class","flex-fill"),p(M,"class","txt"),p(C,"type","submit"),p(C,"class","btn btn-expanded"),C.disabled=T=!n[4]||n[3],ee(C,"btn-loading",n[3]),p(v,"class","flex m-t-base")},m(ce,be){w(ce,e,be),V(t,e,null),m(e,s),V(l,e,null),m(e,o),V(a,e,null),m(e,f),V(c,e,null),m(e,h),V(g,e,null),w(ce,b,be),w(ce,v,be),m(v,S),m(v,$),m(v,C),m(C,M),E=!0,D||(P=Q(C,"click",n[13]),D=!0)},p(ce,be){const se={};!i&&be&1&&(i=!0,se.config=ce[0].emailAuth,je(()=>i=!1)),t.$set(se);const x={};!r&&be&1&&(r=!0,x.config=ce[0].googleAuth,je(()=>r=!1)),l.$set(x);const Te={};!u&&be&1&&(u=!0,Te.config=ce[0].facebookAuth,je(()=>u=!1)),a.$set(Te);const te={};!d&&be&1&&(d=!0,te.config=ce[0].githubAuth,je(()=>d=!1)),c.$set(te);const _e={};!y&&be&1&&(y=!0,_e.config=ce[0].gitlabAuth,je(()=>y=!1)),g.$set(_e),(!E||be&24&&T!==(T=!ce[4]||ce[3]))&&(C.disabled=T),be&8&&ee(C,"btn-loading",ce[3])},i(ce){E||(A(t.$$.fragment,ce),A(l.$$.fragment,ce),A(a.$$.fragment,ce),A(c.$$.fragment,ce),A(g.$$.fragment,ce),E=!0)},o(ce){F(t.$$.fragment,ce),F(l.$$.fragment,ce),F(a.$$.fragment,ce),F(c.$$.fragment,ce),F(g.$$.fragment,ce),E=!1},d(ce){ce&&k(e),n[7](null),z(t),z(l),z(a),z(c),z(g),ce&&k(b),ce&&k(v),D=!1,P()}}}function AP(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function EP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;e=new nl({});const y=[AP,DP],b=[];function v(S,$){return S[2]?0:1}return f=v(n),c=b[f]=y[f](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div> 
+            <div class="breadcrumb-item">Auth providers</div></nav>`,l=O(),r=_("div"),o=_("form"),a=_("h6"),a.textContent="Manage the allowed users sign-in/sign-up methods.",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","m-b-base"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,$){V(e,S,$),w(S,t,$),w(S,i,$),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=Q(o,"submit",Wt(n[5])),h=!0)},p(S,[$]){let C=f;f=v(S),f===C?b[f].p(S,$):(Me(),F(b[C],1,1,()=>{b[C]=null}),Oe(),c=b[f],c?c.p(S,$):(c=b[f]=y[f](S),c.c()),A(c,1),c.m(o,null))},i(S){d||(A(e.$$.fragment,S),A(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function PP(n,e,t){let i,s,l={},r=!1,o=!1,a="";W.setDocumentTitle("Auth providers"),u();async function u(){t(2,r=!0);try{const $=await ke.Settings.getAll()||{};c($)}catch($){ke.errorResponseHandler($)}t(2,r=!1)}async function f(){if(!(o||!i)){t(3,o=!0);try{const $=await ke.Settings.update(W.filterRedactedProps(l));c($),Ki({}),s==null||s.collapseSiblings(),mn("Successfully updated auth providers.")}catch($){ke.errorResponseHandler($)}t(3,o=!1)}}function c($){$=$||{},t(0,l={}),t(0,l.emailAuth=Object.assign({enabled:!0},$.emailAuth),l);const C=["googleAuth","facebookAuth","githubAuth","gitlabAuth"];for(const M of C)t(0,l[M]=Object.assign({enabled:!1,allowRegistrations:!0},$[M]),l);t(6,a=JSON.stringify(l))}function d($){pe[$?"unshift":"push"](()=>{s=$,t(1,s)})}function h($){n.$$.not_equal(l.emailAuth,$)&&(l.emailAuth=$,t(0,l))}function g($){n.$$.not_equal(l.googleAuth,$)&&(l.googleAuth=$,t(0,l))}function y($){n.$$.not_equal(l.facebookAuth,$)&&(l.facebookAuth=$,t(0,l))}function b($){n.$$.not_equal(l.githubAuth,$)&&(l.githubAuth=$,t(0,l))}function v($){n.$$.not_equal(l.gitlabAuth,$)&&(l.gitlabAuth=$,t(0,l))}const S=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(4,i=a!=JSON.stringify(l))},[l,s,r,o,i,f,a,d,h,g,y,b,v,S]}class LP extends Pe{constructor(e){super(),Ee(this,e,PP,EP,De,{})}}function Fg(n,e,t){const i=n.slice();return i[12]=e[t],i[13]=e,i[14]=t,i}function FP(n){let e=[],t=new Map,i,s,l,r,o,a,u,f,c,d,h=n[4];const g=y=>y[12].key;for(let y=0;y<h.length;y+=1){let b=Fg(n,h,y),v=g(b);t.set(v,e[y]=Ig(v,b))}return{c(){for(let y=0;y<e.length;y+=1)e[y].c();i=O(),s=_("div"),l=_("div"),r=O(),o=_("button"),a=_("span"),a.textContent="Save changes",p(l,"class","flex-fill"),p(a,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-expanded"),o.disabled=u=!n[3]||n[2],ee(o,"btn-loading",n[2]),p(s,"class","flex")},m(y,b){for(let v=0;v<e.length;v+=1)e[v].m(y,b);w(y,i,b),w(y,s,b),m(s,l),m(s,r),m(s,o),m(o,a),f=!0,c||(d=Q(o,"click",n[9]),c=!0)},p(y,b){b&32785&&(h=y[4],Me(),e=rt(e,b,g,1,y,h,t,i.parentNode,Ft,Ig,i,Fg),Oe()),(!f||b&12&&u!==(u=!y[3]||y[2]))&&(o.disabled=u),b&4&&ee(o,"btn-loading",y[2])},i(y){if(!f){for(let b=0;b<h.length;b+=1)A(e[b]);f=!0}},o(y){for(let b=0;b<e.length;b+=1)F(e[b]);f=!1},d(y){for(let b=0;b<e.length;b+=1)e[b].d(y);y&&k(i),y&&k(s),c=!1,d()}}}function IP(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function NP(n){let e,t=n[12].label+"",i,s,l,r,o,a,u,f,c,d,h;function g(){n[7].call(o,n[12])}function y(){return n[8](n[12])}return{c(){e=_("label"),i=H(t),s=H(" duration (in seconds)"),r=O(),o=_("input"),u=O(),f=_("div"),c=_("span"),c.textContent="Invalidate all previously issued tokens",p(e,"for",l=n[15]),p(o,"type","number"),p(o,"id",a=n[15]),o.required=!0,p(c,"class","link-primary"),ee(c,"txt-success",n[0][n[12].key].secret),p(f,"class","help-block")},m(b,v){w(b,e,v),m(e,i),m(e,s),w(b,r,v),w(b,o,v),$e(o,n[0][n[12].key].duration),w(b,u,v),w(b,f,v),m(f,c),d||(h=[Q(o,"input",g),Q(c,"click",y)],d=!0)},p(b,v){n=b,v&32768&&l!==(l=n[15])&&p(e,"for",l),v&32768&&a!==(a=n[15])&&p(o,"id",a),v&17&&Mt(o.value)!==n[0][n[12].key].duration&&$e(o,n[0][n[12].key].duration),v&17&&ee(c,"txt-success",n[0][n[12].key].secret)},d(b){b&&k(e),b&&k(r),b&&k(o),b&&k(u),b&&k(f),d=!1,lt(h)}}}function Ig(n,e){let t,i,s;return i=new Fe({props:{class:"form-field required",name:e[12].key+".duration",$$slots:{default:[NP,({uniqueId:l})=>({15:l}),({uniqueId:l})=>l?32768:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=st(),B(i.$$.fragment),this.first=t},m(l,r){w(l,t,r),V(i,l,r),s=!0},p(l,r){e=l;const o={};r&98305&&(o.$$scope={dirty:r,ctx:e}),i.$set(o)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){F(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function RP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;e=new nl({});const y=[IP,FP],b=[];function v(S,$){return S[1]?0:1}return f=v(n),c=b[f]=y[f](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div> 
+            <div class="breadcrumb-item">Token options</div></nav>`,l=O(),r=_("div"),o=_("form"),a=_("div"),a.innerHTML="<p>Adjust common token options.</p>",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content m-b-sm txt-xl"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,$){V(e,S,$),w(S,t,$),w(S,i,$),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=Q(o,"submit",Wt(n[5])),h=!0)},p(S,[$]){let C=f;f=v(S),f===C?b[f].p(S,$):(Me(),F(b[C],1,1,()=>{b[C]=null}),Oe(),c=b[f],c?c.p(S,$):(c=b[f]=y[f](S),c.c()),A(c,1),c.m(o,null))},i(S){d||(A(e.$$.fragment,S),A(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function jP(n,e,t){let i;const s=[{key:"userAuthToken",label:"Users auth token"},{key:"userVerificationToken",label:"Users email verification token"},{key:"userPasswordResetToken",label:"Users password reset token"},{key:"userEmailChangeToken",label:"Users email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];let l={},r=!1,o=!1,a="";W.setDocumentTitle("Token options"),u();async function u(){t(1,r=!0);try{const y=await ke.Settings.getAll()||{};c(y)}catch(y){ke.errorResponseHandler(y)}t(1,r=!1)}async function f(){if(!(o||!i)){t(2,o=!0);try{const y=await ke.Settings.update(W.filterRedactedProps(l));c(y),mn("Successfully saved tokens options.")}catch(y){ke.errorResponseHandler(y)}t(2,o=!1)}}function c(y){var b;y=y||{},t(0,l={});for(const v of s)t(0,l[v.key]={duration:((b=y[v.key])==null?void 0:b.duration)||0},l);t(6,a=JSON.stringify(l))}function d(y){l[y.key].duration=Mt(this.value),t(0,l)}const h=y=>{l[y.key].secret?(delete l[y.key].secret,t(0,l)):t(0,l[y.key].secret=W.randomString(50),l)},g=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(3,i=a!=JSON.stringify(l))},[l,r,o,i,s,f,a,d,h,g]}class HP extends Pe{constructor(e){super(),Ee(this,e,jP,RP,De,{})}}const dn=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Zs("/"):!0}],qP={"/login":sn({component:yE,conditions:dn.concat([n=>!ke.AuthStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":sn({asyncComponent:()=>as(()=>import("./PageAdminRequestPasswordReset.aecae2cf.js"),[]),conditions:dn.concat([n=>!ke.AuthStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":sn({asyncComponent:()=>as(()=>import("./PageAdminConfirmPasswordReset.f104bea1.js"),[]),conditions:dn.concat([n=>!ke.AuthStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":sn({component:kA,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":sn({component:P3,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/users":sn({component:WA,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":sn({asyncComponent:()=>as(()=>import("./PageUserConfirmPasswordReset.90fa6cdc.js"),[]),conditions:dn.concat([()=>(ke.logout(!1),!0)]),userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":sn({asyncComponent:()=>as(()=>import("./PageUserConfirmVerification.9c23f768.js"),[]),conditions:dn.concat([()=>(ke.logout(!1),!0)]),userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":sn({asyncComponent:()=>as(()=>import("./PageUserConfirmEmailChange.d9c73d4b.js"),[]),conditions:dn.concat([()=>(ke.logout(!1),!0)]),userData:{showAppSidebar:!1}}),"/settings":sn({component:OE,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":sn({component:pE,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":sn({component:KE,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":sn({component:sP,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":sn({component:LP,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":sn({component:HP,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"*":sn({component:a2,userData:{showAppSidebar:!1}})};function VP(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[r,o]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*r/t.width-(t.left+r),u=e.top+e.height*o/t.height-(t.top+o),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=Eo}=i;return{delay:f,duration:Jn(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,g)=>{const y=g*a,b=g*u,v=h+g*e.width/t.width,S=h+g*e.height/t.height;return`transform: ${l} translate(${y}px, ${b}px) scale(${v}, ${S});`}}}function Ng(n,e,t){const i=n.slice();return i[2]=e[t],i}function zP(n){let e;return{c(){e=_("i"),p(e,"class","ri-alert-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function BP(n){let e;return{c(){e=_("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function UP(n){let e;return{c(){e=_("i"),p(e,"class","ri-information-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Rg(n,e){let t,i,s,l,r=e[2].message+"",o,a,u,f,c,d,h=oe,g,y,b;function v(M,T){return M[2].type==="info"?UP:M[2].type==="success"?BP:zP}let S=v(e),$=S(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=_("div"),i=_("div"),$.c(),s=O(),l=_("div"),o=H(r),a=O(),u=_("div"),u.innerHTML='<i class="ri-close-line"></i>',f=O(),p(i,"class","icon"),p(l,"class","content"),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){w(M,t,T),m(t,i),$.m(i,null),m(t,s),m(t,l),m(l,o),m(t,a),m(t,u),m(t,f),g=!0,y||(b=Q(u,"click",Wt(C)),y=!0)},p(M,T){e=M,S!==(S=v(e))&&($.d(1),$=S(e),$&&($.c(),$.m(i,null))),(!g||T&1)&&r!==(r=e[2].message+"")&&ge(o,r),T&1&&ee(t,"alert-info",e[2].type=="info"),T&1&&ee(t,"alert-success",e[2].type=="success"),T&1&&ee(t,"alert-danger",e[2].type=="error"),T&1&&ee(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){Zb(t),h(),Jg(t,d)},a(){h(),h=Gb(t,d,VP,{duration:150})},i(M){g||(Ot(()=>{c||(c=ft(t,ao,{duration:150},!0)),c.run(1)}),g=!0)},o(M){c||(c=ft(t,ao,{duration:150},!1)),c.run(0),g=!1},d(M){M&&k(t),$.d(),M&&c&&c.end(),y=!1,b()}}}function WP(n){let e,t=[],i=new Map,s,l=n[0];const r=o=>o[2].message;for(let o=0;o<l.length;o+=1){let a=Ng(n,l,o),u=r(a);i.set(u,t[o]=Rg(u,a))}return{c(){e=_("div");for(let o=0;o<t.length;o+=1)t[o].c();p(e,"class","toasts-wrapper")},m(o,a){w(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(o,[a]){if(a&1){l=o[0],Me();for(let u=0;u<t.length;u+=1)t[u].r();t=rt(t,a,r,1,o,l,i,e,e1,Rg,null,Ng);for(let u=0;u<t.length;u+=1)t[u].a();Oe()}},i(o){if(!s){for(let a=0;a<l.length;a+=1)A(t[a]);s=!0}},o(o){for(let a=0;a<t.length;a+=1)F(t[a]);s=!1},d(o){o&&k(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function YP(n,e,t){let i;return hn(n,zu,l=>t(0,i=l)),[i,l=>E0(l)]}class KP extends Pe{constructor(e){super(),Ee(this,e,YP,WP,De,{})}}function JP(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=_("h4"),i=H(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,r){w(l,e,r),m(e,i)},p(l,r){var o;r&2&&t!==(t=((o=l[1])==null?void 0:o.text)+"")&&ge(i,t)},d(l){l&&k(e)}}}function GP(n){let e,t,i,s,l,r,o;return{c(){e=_("button"),t=_("span"),t.textContent="No",i=O(),s=_("button"),l=_("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){w(a,e,u),m(e,t),w(a,i,u),w(a,s,u),m(s,l),e.focus(),r||(o=[Q(e,"click",n[3]),Q(s,"click",n[4])],r=!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&&k(e),a&&k(i),a&&k(s),r=!1,lt(o)}}}function ZP(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:[GP],header:[JP]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[5](e),e.$on("hide",n[6]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&4&&(r.overlayClose=!s[2]),l&4&&(r.escClose=!s[2]),l&135&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[5](null),z(e,s)}}}function xP(n,e,t){let i;hn(n,pf,f=>t(1,i=f));let s,l=!1;const r=()=>{i!=null&&i.noCallback&&i.noCallback(),s==null||s.hide()},o=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),s==null||s.hide()};function a(f){pe[f?"unshift":"push"](()=>{s=f,t(0,s)})}const u=async()=>{i!=null&&i.noCallback&&i.noCallback(),await Oi(),Lb()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(s==null||s.show())},[s,i,l,r,o,a,u]}class XP extends Pe{constructor(e){super(),Ee(this,e,xP,ZP,De,{})}}function jg(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,$,C,M,T,E,D,P,L,R,j,G,Y,q,Z,J;return Y=new ks({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[QP]},$$scope:{ctx:n}}}),{c(){var K;e=_("aside"),t=_("a"),t.innerHTML='<img src="/_/images/logo.svg" alt="PocketBase logo" width="40" height="40"/>',s=O(),l=_("nav"),r=_("a"),r.innerHTML='<i class="ri-database-2-line"></i>',f=O(),c=_("a"),c.innerHTML='<i class="ri-group-line"></i>',y=O(),b=_("a"),b.innerHTML='<i class="ri-line-chart-line"></i>',C=O(),M=_("a"),M.innerHTML='<i class="ri-tools-line"></i>',P=O(),L=_("figure"),R=_("img"),G=O(),B(Y.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(r,"href","/collections"),p(r,"class","menu-item"),p(r,"aria-label","Collections"),p(c,"href","/users"),p(c,"class","menu-item"),p(c,"aria-label","Users"),p(b,"href","/logs"),p(b,"class","menu-item"),p(b,"aria-label","Logs"),p(M,"href","/settings"),p(M,"class","menu-item"),p(M,"aria-label","Settings"),p(l,"class","main-menu"),ei(R.src,j="/_/images/avatars/avatar"+(((K=n[1])==null?void 0:K.avatar)||0)+".svg")||p(R,"src",j),p(R,"alt","Avatar"),p(L,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(K,ne){w(K,e,ne),m(e,t),m(e,s),m(e,l),m(l,r),m(l,f),m(l,c),m(l,y),m(l,b),m(l,C),m(l,M),m(e,P),m(e,L),m(L,R),m(L,G),V(Y,L,null),q=!0,Z||(J=[Xe(i=On.call(null,t)),Xe(o=On.call(null,r)),Xe(a=oi.call(null,r,{path:"/collections/?.*",className:"current-route"})),Xe(u=St.call(null,r,{text:"Collections",position:"right"})),Xe(d=On.call(null,c)),Xe(h=oi.call(null,c,{path:"/users/?.*",className:"current-route"})),Xe(g=St.call(null,c,{text:"Users",position:"right"})),Xe(v=On.call(null,b)),Xe(S=oi.call(null,b,{path:"/logs/?.*",className:"current-route"})),Xe($=St.call(null,b,{text:"Logs",position:"right"})),Xe(T=On.call(null,M)),Xe(E=oi.call(null,M,{path:"/settings/?.*",className:"current-route"})),Xe(D=St.call(null,M,{text:"Settings",position:"right"}))],Z=!0)},p(K,ne){var be;(!q||ne&2&&!ei(R.src,j="/_/images/avatars/avatar"+(((be=K[1])==null?void 0:be.avatar)||0)+".svg"))&&p(R,"src",j);const ce={};ne&64&&(ce.$$scope={dirty:ne,ctx:K}),Y.$set(ce)},i(K){q||(A(Y.$$.fragment,K),q=!0)},o(K){F(Y.$$.fragment,K),q=!1},d(K){K&&k(e),z(Y),Z=!1,lt(J)}}}function QP(n){let e,t,i,s,l,r,o;return{c(){e=_("a"),e.innerHTML=`<i class="ri-shield-user-line"></i> 
+                        <span class="txt">Manage admins</span>`,t=O(),i=_("hr"),s=O(),l=_("div"),l.innerHTML=`<i class="ri-logout-circle-line"></i> 
+                        <span class="txt">Logout</span>`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),r||(o=[Xe(On.call(null,e)),Q(l,"click",n[4])],r=!0)},p:oe,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),r=!1,lt(o)}}}function eL(n){var c;let e,t,i,s,l,r,o,a,u,f=((c=n[1])==null?void 0:c.id)&&n[0]&&jg(n);return s=new o1({props:{routes:qP}}),s.$on("routeLoading",n[2]),s.$on("conditionsFailed",n[3]),r=new KP({}),a=new XP({}),{c(){e=_("div"),f&&f.c(),t=O(),i=_("div"),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment),p(i,"class","app-body"),p(e,"class","app-layout")},m(d,h){w(d,e,h),f&&f.m(e,null),m(e,t),m(e,i),V(s,i,null),w(d,l,h),V(r,d,h),w(d,o,h),V(a,d,h),u=!0},p(d,[h]){var g;((g=d[1])==null?void 0:g.id)&&d[0]?f?(f.p(d,h),h&3&&A(f,1)):(f=jg(d),f.c(),A(f,1),f.m(e,t)):f&&(Me(),F(f,1,1,()=>{f=null}),Oe())},i(d){u||(A(f),A(s.$$.fragment,d),A(r.$$.fragment,d),A(a.$$.fragment,d),u=!0)},o(d){F(f),F(s.$$.fragment,d),F(r.$$.fragment,d),F(a.$$.fragment,d),u=!1},d(d){d&&k(e),f&&f.d(),z(s),d&&k(l),z(r,d),d&&k(o),z(a,d)}}}function tL(n,e,t){let i;hn(n,Bu,u=>t(1,i=u));let s,l=!1;function r(u){var f,c,d,h;((f=u==null?void 0:u.detail)==null?void 0:f.location)!==s&&(t(0,l=!!((d=(c=u==null?void 0:u.detail)==null?void 0:c.userData)!=null&&d.showAppSidebar)),s=(h=u==null?void 0:u.detail)==null?void 0:h.location,W.setDocumentTitle(""),Ki({}),Lb())}function o(){Zs("/")}function a(){ke.logout()}return[l,i,r,o,a]}class nL extends Pe{constructor(e){super(),Ee(this,e,tL,eL,De,{})}}new nL({target:document.getElementById("app")});export{lt as A,mn as B,W as C,Zs as D,st as E,F0 as F,hn as G,Gs as H,_n as I,pi as J,pe as K,Fn as P,Pe as S,F as a,O as b,B as c,z as d,_ as e,p as f,w as g,m as h,Ee as i,Xe as j,Me as k,On as l,V as m,Oe as n,k as o,ke as p,Fe as q,ee as r,De as s,A as t,Q as u,Wt as v,H as w,ge as x,oe as y,$e as z};
diff --git a/ui/dist/index.html b/ui/dist/index.html
index 70f02386..d4979982 100644
--- a/ui/dist/index.html
+++ b/ui/dist/index.html
@@ -20,7 +20,7 @@
         window.Prism = window.Prism || {};
         window.Prism.manual = true;
     </script>
-  <script type="module" crossorigin src="/_/assets/index.15552609.js"></script>
+  <script type="module" crossorigin src="/_/assets/index.6f2d3c23.js"></script>
   <link rel="stylesheet" href="/_/assets/index.d97a62dd.css">
 </head>
 <body>
diff --git a/ui/src/components/collections/docs/ListApiDocs.svelte b/ui/src/components/collections/docs/ListApiDocs.svelte
index 68e06abe..52af8bbc 100644
--- a/ui/src/components/collections/docs/ListApiDocs.svelte
+++ b/ui/src/components/collections/docs/ListApiDocs.svelte
@@ -203,7 +203,8 @@
                 />
                 Supports up to 6-levels depth nested relations expansion. <br />
                 The expanded relations will be appended to each individual record under the
-                <code>@expand</code> property (eg. <code>{`"@expand": {"rel1": {...}, ...}`}</code>).
+                <code>@expand</code> property (eg. <code>{`"@expand": {"rel1": {...}, ...}`}</code>). Only the
+                relations that the user has permissions to <strong>view</strong> will be expanded.
             </td>
         </tr>
     </tbody>
diff --git a/ui/src/components/collections/docs/ViewApiDocs.svelte b/ui/src/components/collections/docs/ViewApiDocs.svelte
index 2779cdb4..7c796a68 100644
--- a/ui/src/components/collections/docs/ViewApiDocs.svelte
+++ b/ui/src/components/collections/docs/ViewApiDocs.svelte
@@ -145,7 +145,8 @@
                 />
                 Supports up to 6-levels depth nested relations expansion. <br />
                 The expanded relations will be appended to the record under the
-                <code>@expand</code> property (eg. <code>{`"@expand": {"rel1": {...}, ...}`}</code>).
+                <code>@expand</code> property (eg. <code>{`"@expand": {"rel1": {...}, ...}`}</code>). Only the
+                relations that the user has permissions to <strong>view</strong> will be expanded.
             </td>
         </tr>
     </tbody>