diff --git a/_app/immutable/chunks/AccordionItem.CxgotlFR.js b/_app/immutable/chunks/AccordionItem.CxgotlFR.js new file mode 100644 index 0000000000000000000000000000000000000000..0dc11e59fb93907dd1a58a2a59a2d1ce70bcb190 --- /dev/null +++ b/_app/immutable/chunks/AccordionItem.CxgotlFR.js @@ -0,0 +1 @@ +import{V as Je,q as qe,a8 as He,s as U,b as W,k as D,f as p,a9 as P,n as K,aa as E,ab as $,N as J,z as N,e as L,d as y,g as z,ac as M,J as w,D as S,E as V,F as O,B as ge,L as Ke,I as ae,j as Qe,G as Xe,a as Ue,c as Be,u as Ye,t as Ze,i as we,m as $e}from"./scheduler.BZlHRu_0.js";import{S as F,i as G,g as le,b,d as ne,t as h,h as Le,j as ye,f as ue,c as Q,a as X,m as Y,e as Z}from"./index.a_oafgNU.js";import{q as xe,t as ie,v as et,x as fe,y as tt,z as be,A as lt,B as _e,F as B,G as nt,H as q,J as te,K as me,h as he,I as it,L as st}from"./VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";import{t as ot,g as rt,o as ft,a as ve,r as ut,c as at,b as ct,d as dt,e as _t}from"./arrays.DyTtr4Tk.js";import{d as mt,w as ze}from"./entry.p1-HE9Vh.js";const{name:se,selector:ke}=et("accordion"),gt={multiple:!1,disabled:!1,forceVisible:!1},bt=t=>{const e={...gt,...t},n=ot(xe(e,"value","onValueChange","defaultValue")),l=rt(["root"]),{disabled:i,forceVisible:s}=n,o=e.value??ze(e.defaultValue),a=ft(o,e==null?void 0:e.onValueChange),f=(d,m)=>m===void 0?!1:typeof m=="string"?m===d:m.includes(d),r=mt(a,d=>m=>f(m,d)),u=ie(se(),{returned:()=>({"data-melt-id":l.root})}),c=d=>typeof d=="string"?{value:d}:d,k=d=>typeof d=="number"?{level:d}:d,I=ie(se("item"),{stores:a,returned:d=>m=>{const{value:T,disabled:_}=c(m);return{"data-state":f(T,d)?"open":"closed","data-disabled":fe(_)}}}),g=ie(se("trigger"),{stores:[a,i],returned:([d,m])=>T=>{const{value:_,disabled:H}=c(T);return{disabled:fe(m||H),"aria-expanded":!!f(_,d),"aria-disabled":!!H,"data-disabled":fe(H),"data-value":_,"data-state":f(_,d)?"open":"closed"}},action:d=>({destroy:tt(be(d,"click",()=>{const T=d.dataset.disabled==="true",_=d.dataset.value;T||!_||R(_)}),be(d,"keydown",T=>{if(![B.ARROW_DOWN,B.ARROW_UP,B.HOME,B.END].includes(T.key))return;if(T.preventDefault(),T.key===B.SPACE||T.key===B.ENTER){const ee=d.dataset.disabled==="true",re=d.dataset.value;if(ee||!re)return;R(re);return}const _=T.target,H=nt(l.root);if(!H||!_e(_))return;const j=Array.from(H.querySelectorAll(ke("trigger"))).filter(ee=>_e(ee)?ee.dataset.disabled!=="true":!1);if(!j.length)return;const oe=j.indexOf(_);T.key===B.ARROW_DOWN&&j[(oe+1)%j.length].focus(),T.key===B.ARROW_UP&&j[(oe-1+j.length)%j.length].focus(),T.key===B.HOME&&j[0].focus(),T.key===B.END&&j[j.length-1].focus()}))})}),A=ie(se("content"),{stores:[a,i,s],returned:([d,m,T])=>_=>{const{value:H}=c(_),x=f(H,d)||T;return{"data-state":x?"open":"closed","data-disabled":fe(m),"data-value":H,hidden:x?void 0:!0,style:lt({display:x?void 0:"none"})}},action:d=>{Je().then(()=>{const m=ve(),T=ve(),_=document.querySelector(`${ke("trigger")}, [data-value="${d.dataset.value}"]`);_e(_)&&(d.id=m,_.setAttribute("aria-controls",m),_.id=T)})}}),C=ie(se("heading"),{returned:()=>d=>{const{level:m}=k(d);return{role:"heading","aria-level":m,"data-heading-level":m}}});function R(d){a.update(m=>m===void 0?e.multiple?[d]:d:Array.isArray(m)?m.includes(d)?m.filter(T=>T!==d):(m.push(d),m):m===d?void 0:d)}return{ids:l,elements:{root:u,item:I,trigger:g,content:A,heading:C},states:{value:a},helpers:{isSelected:r},options:n}};function ce(){return{NAME:"accordion",ITEM_NAME:"accordion-item",PARTS:["root","content","header","item","trigger"]}}function ht(t){const e=bt(ut(t)),{NAME:n,PARTS:l}=ce(),i=at(n,l),s={...e,getAttrs:i,updateOption:ct(e.options)};return qe(n,s),s}function de(){const{NAME:t}=ce();return He(t)}function vt(t){const{ITEM_NAME:e}=ce(),n=ze(t);return qe(e,{propsStore:n}),{...de(),propsStore:n}}function Fe(){const{ITEM_NAME:t}=ce();return He(t)}function kt(){const t=de(),{propsStore:e}=Fe();return{...t,propsStore:e}}function At(){const t=de(),{propsStore:e}=Fe();return{...t,props:e}}const Ct=t=>({builder:t&4}),Ae=t=>({builder:t[2]}),pt=t=>({builder:t&4}),Ce=t=>({builder:t[2]});function Et(t){let e,n,l,i;const s=t[11].default,o=N(s,t,t[10],Ae);let a=[t[2],t[4]],f={};for(let r=0;r{o[u]=null}),ne(),n=o[e],n?n.p(f,r):(n=o[e]=s[e](f),n.c()),h(n,1),n.m(l.parentNode,l))},i(f){i||(h(n),i=!0)},o(f){b(n),i=!1},d(f){f&&p(l),o[e].d(f)}}}function Nt(t,e,n){let l;const i=["multiple","value","onValueChange","disabled","asChild","el"];let s=P(e,i),o,{$$slots:a={},$$scope:f}=e,{multiple:r=!1}=e,{value:u=void 0}=e,{onValueChange:c=void 0}=e,{disabled:k=!1}=e,{asChild:I=!1}=e,{el:g=void 0}=e;const{elements:{root:A},states:{value:C},updateOption:R,getAttrs:d}=ht({multiple:r,disabled:k,defaultValue:u,onValueChange:({next:_})=>Array.isArray(_)?((!Array.isArray(u)||!dt(u,_))&&(c==null||c(_),n(5,u=_)),_):(u!==_&&(c==null||c(_),n(5,u=_)),_)});K(t,A,_=>n(9,o=_));const m=d("root");function T(_){J[_?"unshift":"push"](()=>{g=_,n(0,g)})}return t.$$set=_=>{e=E(E({},e),$(_)),n(4,s=P(e,i)),"multiple"in _&&n(6,r=_.multiple),"value"in _&&n(5,u=_.value),"onValueChange"in _&&n(7,c=_.onValueChange),"disabled"in _&&n(8,k=_.disabled),"asChild"in _&&n(1,I=_.asChild),"el"in _&&n(0,g=_.el),"$$scope"in _&&n(10,f=_.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&u!==void 0&&C.set(Array.isArray(u)?[...u]:u),t.$$.dirty&64&&R("multiple",r),t.$$.dirty&256&&R("disabled",k),t.$$.dirty&512&&n(2,l=o),t.$$.dirty&4&&Object.assign(l,m)},[g,I,l,A,s,u,r,c,k,o,f,a,T]}let St=class extends F{constructor(e){super(),G(this,e,Nt,It,U,{multiple:6,value:5,onValueChange:7,disabled:8,asChild:1,el:0})}};const Vt=t=>({builder:t&4}),pe=t=>({builder:t[2]}),Ot=t=>({builder:t&4}),Ee=t=>({builder:t[2]});function Dt(t){let e,n,l,i;const s=t[11].default,o=N(s,t,t[10],pe);let a=[t[2],t[5]],f={};for(let r=0;r{o[u]=null}),ne(),n=o[e],n?n.p(f,r):(n=o[e]=s[e](f),n.c()),h(n,1),n.m(l.parentNode,l))},i(f){i||(h(n),i=!0)},o(f){b(n),i=!1},d(f){f&&p(l),o[e].d(f)}}}function Rt(t,e,n){let l;const i=["value","disabled","asChild","el"];let s=P(e,i),o,a,{$$slots:f={},$$scope:r}=e,{value:u}=e,{disabled:c=void 0}=e,{asChild:k=!1}=e,{el:I=void 0}=e;const{elements:{item:g},propsStore:A,getAttrs:C}=vt({value:u,disabled:c});K(t,g,m=>n(9,a=m)),K(t,A,m=>n(8,o=m));const R=C("item");function d(m){J[m?"unshift":"push"](()=>{I=m,n(0,I)})}return t.$$set=m=>{e=E(E({},e),$(m)),n(5,s=P(e,i)),"value"in m&&n(6,u=m.value),"disabled"in m&&n(7,c=m.disabled),"asChild"in m&&n(1,k=m.asChild),"el"in m&&n(0,I=m.el),"$$scope"in m&&n(10,r=m.$$scope)},t.$$.update=()=>{t.$$.dirty&192&&A.set({value:u,disabled:c}),t.$$.dirty&896&&n(2,l=a({...o,disabled:c})),t.$$.dirty&4&&Object.assign(l,R)},[I,k,l,g,A,s,u,c,o,a,r,f,d]}let jt=class extends F{constructor(e){super(),G(this,e,Rt,Pt,U,{value:6,disabled:7,asChild:1,el:0})}};const Wt=t=>({builder:t&4}),Te=t=>({builder:t[2]}),qt=t=>({builder:t&4}),Ie=t=>({builder:t[2]});function Ht(t){let e,n,l,i;const s=t[8].default,o=N(s,t,t[7],Te);let a=[t[2],t[4]],f={};for(let r=0;r{o[u]=null}),ne(),n=o[e],n?n.p(f,r):(n=o[e]=s[e](f),n.c()),h(n,1),n.m(l.parentNode,l))},i(f){i||(h(n),i=!0)},o(f){b(n),i=!1},d(f){f&&p(l),o[e].d(f)}}}function Lt(t,e,n){let l;const i=["level","asChild","el"];let s=P(e,i),o,{$$slots:a={},$$scope:f}=e,{level:r=3}=e,{asChild:u=!1}=e,{el:c=void 0}=e;const{elements:{heading:k},getAttrs:I}=de();K(t,k,C=>n(6,o=C));const g=I("header");function A(C){J[C?"unshift":"push"](()=>{c=C,n(0,c)})}return t.$$set=C=>{e=E(E({},e),$(C)),n(4,s=P(e,i)),"level"in C&&n(5,r=C.level),"asChild"in C&&n(1,u=C.asChild),"el"in C&&n(0,c=C.el),"$$scope"in C&&n(7,f=C.$$scope)},t.$$.update=()=>{t.$$.dirty&96&&n(2,l=o(r)),t.$$.dirty&4&&Object.assign(l,g)},[c,u,l,k,s,r,o,f,a,A]}class yt extends F{constructor(e){super(),G(this,e,Lt,Bt,U,{level:5,asChild:1,el:0})}}const zt=t=>({builder:t&4}),Ne=t=>({builder:t[2]}),Ft=t=>({builder:t&4}),Se=t=>({builder:t[2]});function Gt(t){let e,n,l,i;const s=t[10].default,o=N(s,t,t[9],Ne);let a=[t[2],{type:"button"},t[6]],f={};for(let r=0;r{o[u]=null}),ne(),n=o[e],n?n.p(f,r):(n=o[e]=s[e](f),n.c()),h(n,1),n.m(l.parentNode,l))},i(f){i||(h(n),i=!0)},o(f){b(n),i=!1},d(f){f&&p(l),o[e].d(f)}}}function Qt(t,e,n){let l;const i=["asChild","el"];let s=P(e,i),o,a,{$$slots:f={},$$scope:r}=e,{asChild:u=!1}=e,{el:c=void 0}=e;const{elements:{trigger:k},props:I,getAttrs:g}=At();K(t,k,d=>n(8,a=d)),K(t,I,d=>n(7,o=d));const A=_t(),C=g("trigger");function R(d){J[d?"unshift":"push"](()=>{c=d,n(0,c)})}return t.$$set=d=>{e=E(E({},e),$(d)),n(6,s=P(e,i)),"asChild"in d&&n(1,u=d.asChild),"el"in d&&n(0,c=d.el),"$$scope"in d&&n(9,r=d.$$scope)},t.$$.update=()=>{t.$$.dirty&384&&n(2,l=a({...o})),t.$$.dirty&4&&Object.assign(l,C)},[c,u,l,k,I,A,s,o,a,r,f,R]}let Xt=class extends F{constructor(e){super(),G(this,e,Qt,Kt,U,{asChild:1,el:0})}};const Yt=t=>({builder:t&256}),Ve=t=>({builder:t[8]}),Zt=t=>({builder:t&256}),Oe=t=>({builder:t[8]}),wt=t=>({builder:t&256}),De=t=>({builder:t[8]}),$t=t=>({builder:t&256}),Me=t=>({builder:t[8]}),xt=t=>({builder:t&256}),Pe=t=>({builder:t[8]}),el=t=>({builder:t&256}),Re=t=>({builder:t[8]});function tl(t){let e,n,l,i;const s=t[17].default,o=N(s,t,t[16],Ve);let a=[t[8],t[14]],f={};for(let r=0;r{n=ye(e,t[3],t[4]),n.start()})),l=!0)},o(u){b(a,u),l=!1},d(u){u&&p(e),a&&a.d(u),t[20](null),i=!1,s()}}}function il(t){let e,n,l,i,s,o;const a=t[17].default,f=N(a,t,t[16],Me);let r=[t[8],t[14]],u={};for(let c=0;c{i&&(l&&l.end(1),n=ye(e,t[3],t[4]),n.start())}),i=!0)},o(c){b(f,c),n&&n.invalidate(),c&&(l=Le(e,t[5],t[6])),i=!1},d(c){c&&p(e),f&&f.d(c),t[19](null),c&&l&&l.end(),s=!1,o()}}}function sl(t){let e,n,l,i,s;const o=t[17].default,a=N(o,t,t[16],Pe);let f=[t[8],t[14]],r={};for(let u=0;u{l&&(n||(n=ue(e,t[1],t[2],!0)),n.run(1))}),l=!0)},o(u){b(a,u),u&&(n||(n=ue(e,t[1],t[2],!1)),n.run(0)),l=!1},d(u){u&&p(e),a&&a.d(u),t[18](null),u&&n&&n.end(),i=!1,s()}}}function ol(t){let e;const n=t[17].default,l=N(n,t,t[16],Re);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,s){l&&l.m(i,s),e=!0},p(i,s){l&&l.p&&(!e||s&65792)&&S(l,n,i,i[16],e?O(n,i[16],s,el):V(i[16]),Re)},i(i){e||(h(l,i),e=!0)},o(i){b(l,i),e=!1},d(i){l&&l.d(i)}}}function rl(t){let e,n,l,i,s,o,a,f,r,u;const c=[ol,sl,il,nl,ll,tl],k=[];function I(g,A){return A&1664&&(e=null),A&1538&&(n=null),A&1576&&(l=null),A&1544&&(i=null),A&1568&&(s=null),A&1536&&(o=null),e==null&&(e=!!(g[7]&&g[10](g[9].value))),e?0:(n==null&&(n=!!(g[1]&&g[10](g[9].value))),n?1:(l==null&&(l=!!(g[3]&&g[5]&&g[10](g[9].value))),l?2:(i==null&&(i=!!(g[3]&&g[10](g[9].value))),i?3:(s==null&&(s=!!(g[5]&&g[10](g[9].value))),s?4:(o==null&&(o=!!g[10](g[9].value)),o?5:-1)))))}return~(a=I(t,-1))&&(f=k[a]=c[a](t)),{c(){f&&f.c(),r=W()},l(g){f&&f.l(g),r=W()},m(g,A){~a&&k[a].m(g,A),D(g,r,A),u=!0},p(g,[A]){let C=a;a=I(g,A),a===C?~a&&k[a].p(g,A):(f&&(le(),b(k[C],1,1,()=>{k[C]=null}),ne()),~a?(f=k[a],f?f.p(g,A):(f=k[a]=c[a](g),f.c()),h(f,1),f.m(r.parentNode,r)):f=null)},i(g){u||(h(f),u=!0)},o(g){b(f),u=!1},d(g){g&&p(r),~a&&k[a].d(g)}}}function fl(t,e,n){let l;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","el"];let s=P(e,i),o,a,f,{$$slots:r={},$$scope:u}=e,{transition:c=void 0}=e,{transitionConfig:k=void 0}=e,{inTransition:I=void 0}=e,{inTransitionConfig:g=void 0}=e,{outTransition:A=void 0}=e,{outTransitionConfig:C=void 0}=e,{asChild:R=!1}=e,{el:d=void 0}=e;const{elements:{content:m},helpers:{isSelected:T},propsStore:_,getAttrs:H}=kt();K(t,m,v=>n(15,a=v)),K(t,T,v=>n(10,f=v)),K(t,_,v=>n(9,o=v));const x=H("content");function j(v){J[v?"unshift":"push"](()=>{d=v,n(0,d)})}function oe(v){J[v?"unshift":"push"](()=>{d=v,n(0,d)})}function ee(v){J[v?"unshift":"push"](()=>{d=v,n(0,d)})}function re(v){J[v?"unshift":"push"](()=>{d=v,n(0,d)})}function Ge(v){J[v?"unshift":"push"](()=>{d=v,n(0,d)})}return t.$$set=v=>{e=E(E({},e),$(v)),n(14,s=P(e,i)),"transition"in v&&n(1,c=v.transition),"transitionConfig"in v&&n(2,k=v.transitionConfig),"inTransition"in v&&n(3,I=v.inTransition),"inTransitionConfig"in v&&n(4,g=v.inTransitionConfig),"outTransition"in v&&n(5,A=v.outTransition),"outTransitionConfig"in v&&n(6,C=v.outTransitionConfig),"asChild"in v&&n(7,R=v.asChild),"el"in v&&n(0,d=v.el),"$$scope"in v&&n(16,u=v.$$scope)},t.$$.update=()=>{t.$$.dirty&33280&&n(8,l=a({...o})),t.$$.dirty&256&&Object.assign(l,x)},[d,c,k,I,g,A,C,R,l,o,f,m,T,_,s,a,u,r,j,oe,ee,re,Ge]}let ul=class extends F{constructor(e){super(),G(this,e,fl,rl,U,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,el:0})}};function al(t){let e,n,l;const i=t[2].default,s=N(i,t,t[3],null);return{c(){e=L("div"),s&&s.c(),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=z(e);s&&s.l(a),a.forEach(p),this.h()},h(){Qe(e,"class","pb-4 pt-0")},m(o,a){D(o,e,a),s&&s.m(e,null),l=!0},p(o,a){s&&s.p&&(!l||a&8)&&S(s,i,o,o[3],l?O(i,o[3],a,null):V(o[3]),null)},i(o){l||(h(s,o),o&&ae(()=>{l&&(n||(n=ue(e,he,{duration:200},!0)),n.run(1))}),l=!0)},o(o){b(s,o),o&&(n||(n=ue(e,he,{duration:200},!1)),n.run(0)),l=!1},d(o){o&&p(e),s&&s.d(o),o&&n&&n.end()}}}function cl(t){let e,n;const l=[{class:te("overflow-hidden text-sm",t[0])},t[1]];let i={$$slots:{default:[al]},$$scope:{ctx:t}};for(let s=0;s{e=E(E({},e),$(f)),n(1,i=P(e,l)),"class"in f&&n(0,a=f.class),"$$scope"in f&&n(3,o=f.$$scope)},[a,i,s,o]}class _l extends F{constructor(e){super(),G(this,e,dl,cl,U,{class:0})}}function ml(t){let e;const n=t[3].default,l=N(n,t,t[4],null);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,s){l&&l.m(i,s),e=!0},p(i,s){l&&l.p&&(!e||s&16)&&S(l,n,i,i[4],e?O(n,i[4],s,null):V(i[4]),null)},i(i){e||(h(l,i),e=!0)},o(i){b(l,i),e=!1},d(i){l&&l.d(i)}}}function gl(t){let e,n;const l=[{value:t[1]},{class:te("border-b",t[0])},t[2]];let i={$$slots:{default:[ml]},$$scope:{ctx:t}};for(let s=0;s{e=E(E({},e),$(r)),n(2,i=P(e,l)),"class"in r&&n(0,a=r.class),"value"in r&&n(1,f=r.value),"$$scope"in r&&n(4,o=r.$$scope)},[a,f,i,s,o]}class hl extends F{constructor(e){super(),G(this,e,bl,gl,U,{class:0,value:1})}}function vl(t){let e,n,l;const i=t[3].default,s=N(i,t,t[5],null);return n=new it({props:{src:st,class:"h-4 w-4 shrink-0 text-gray-500 transition-transform duration-200"}}),{c(){s&&s.c(),e=Ue(),Q(n.$$.fragment)},l(o){s&&s.l(o),e=Be(o),X(n.$$.fragment,o)},m(o,a){s&&s.m(o,a),D(o,e,a),Y(n,o,a),l=!0},p(o,a){s&&s.p&&(!l||a&32)&&S(s,i,o,o[5],l?O(i,o[5],a,null):V(o[5]),null)},i(o){l||(h(s,o),h(n.$$.fragment,o),l=!0)},o(o){b(s,o),b(n.$$.fragment,o),l=!1},d(o){o&&p(e),s&&s.d(o),Z(n,o)}}}function kl(t){let e,n;const l=[{class:te("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 rounded focus-visible:ring-gray-200 focus-visible:outline-none focus-visible:ring-2",t[0])},t[2]];let i={$$slots:{default:[vl]},$$scope:{ctx:t}};for(let s=0;ssvg]:rotate-180 rounded focus-visible:ring-gray-200 focus-visible:outline-none focus-visible:ring-2",s[0])},o&4&&me(s[2])]):{};o&32&&(a.$$scope={dirty:o,ctx:s}),e.$set(a)},i(s){n||(h(e.$$.fragment,s),n=!0)},o(s){b(e.$$.fragment,s),n=!1},d(s){Z(e,s)}}}function Al(t){let e,n;return e=new yt({props:{level:t[1],class:"flex",$$slots:{default:[kl]},$$scope:{ctx:t}}}),{c(){Q(e.$$.fragment)},l(l){X(e.$$.fragment,l)},m(l,i){Y(e,l,i),n=!0},p(l,[i]){const s={};i&2&&(s.level=l[1]),i&37&&(s.$$scope={dirty:i,ctx:l}),e.$set(s)},i(l){n||(h(e.$$.fragment,l),n=!0)},o(l){b(e.$$.fragment,l),n=!1},d(l){Z(e,l)}}}function Cl(t,e,n){const l=["class","level"];let i=P(e,l),{$$slots:s={},$$scope:o}=e,{class:a=void 0}=e,{level:f=3}=e;function r(u){Xe.call(this,t,u)}return t.$$set=u=>{e=E(E({},e),$(u)),n(2,i=P(e,l)),"class"in u&&n(0,a=u.class),"level"in u&&n(1,f=u.level),"$$scope"in u&&n(5,o=u.$$scope)},[a,f,i,s,r,o]}class pl extends F{constructor(e){super(),G(this,e,Cl,Al,U,{class:0,level:1})}}const El=St;function Tl(t){let e;const n=t[2].default,l=N(n,t,t[3],null);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,s){l&&l.m(i,s),e=!0},p(i,s){l&&l.p&&(!e||s&8)&&S(l,n,i,i[3],e?O(n,i[3],s,null):V(i[3]),null)},i(i){e||(h(l,i),e=!0)},o(i){b(l,i),e=!1},d(i){l&&l.d(i)}}}function Il(t){let e,n;return e=new El({props:{class:t[1],multiple:!t[0],$$slots:{default:[Tl]},$$scope:{ctx:t}}}),{c(){Q(e.$$.fragment)},l(l){X(e.$$.fragment,l)},m(l,i){Y(e,l,i),n=!0},p(l,[i]){const s={};i&2&&(s.class=l[1]),i&1&&(s.multiple=!l[0]),i&8&&(s.$$scope={dirty:i,ctx:l}),e.$set(s)},i(l){n||(h(e.$$.fragment,l),n=!0)},o(l){b(e.$$.fragment,l),n=!1},d(l){Z(e,l)}}}function Nl(t,e,n){let{$$slots:l={},$$scope:i}=e,{single:s=!1}=e,{class:o=void 0}=e;return t.$$set=a=>{"single"in a&&n(0,s=a.single),"class"in a&&n(1,o=a.class),"$$scope"in a&&n(3,i=a.$$scope)},[s,o,l,i]}class Fl extends F{constructor(e){super(),G(this,e,Nl,Il,U,{single:0,class:1})}}const Sl=t=>({}),je=t=>({});function Vl(t){let e;return{c(){e=Ze(t[0])},l(n){e=we(n,t[0])},m(n,l){D(n,e,l)},p(n,l){l&1&&$e(e,n[0])},d(n){n&&p(e)}}}function Ol(t){let e;const n=t[3].title,l=N(n,t,t[4],je),i=l||Vl(t);return{c(){i&&i.c()},l(s){i&&i.l(s)},m(s,o){i&&i.m(s,o),e=!0},p(s,o){l?l.p&&(!e||o&16)&&S(l,n,s,s[4],e?O(n,s[4],o,Sl):V(s[4]),je):i&&i.p&&(!e||o&1)&&i.p(s,e?o:-1)},i(s){e||(h(i,s),e=!0)},o(s){b(i,s),e=!1},d(s){i&&i.d(s)}}}function Dl(t){let e;const n=t[3].default,l=N(n,t,t[4],null);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,s){l&&l.m(i,s),e=!0},p(i,s){l&&l.p&&(!e||s&16)&&S(l,n,i,i[4],e?O(n,i[4],s,null):V(i[4]),null)},i(i){e||(h(l,i),e=!0)},o(i){b(l,i),e=!1},d(i){l&&l.d(i)}}}function Ml(t){let e,n,l,i;return e=new pl({props:{class:t[1]?"py-0":"",$$slots:{default:[Ol]},$$scope:{ctx:t}}}),l=new _l({props:{$$slots:{default:[Dl]},$$scope:{ctx:t}}}),{c(){Q(e.$$.fragment),n=Ue(),Q(l.$$.fragment)},l(s){X(e.$$.fragment,s),n=Be(s),X(l.$$.fragment,s)},m(s,o){Y(e,s,o),D(s,n,o),Y(l,s,o),i=!0},p(s,o){const a={};o&2&&(a.class=s[1]?"py-0":""),o&17&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const f={};o&16&&(f.$$scope={dirty:o,ctx:s}),l.$set(f)},i(s){i||(h(e.$$.fragment,s),h(l.$$.fragment,s),i=!0)},o(s){b(e.$$.fragment,s),b(l.$$.fragment,s),i=!1},d(s){s&&p(n),Z(e,s),Z(l,s)}}}function We(t){let e,n;return e=new hl({props:{value:t[0],class:t[2],$$slots:{default:[Ml]},$$scope:{ctx:t}}}),{c(){Q(e.$$.fragment)},l(l){X(e.$$.fragment,l)},m(l,i){Y(e,l,i),n=!0},p(l,i){const s={};i&1&&(s.value=l[0]),i&4&&(s.class=l[2]),i&19&&(s.$$scope={dirty:i,ctx:l}),e.$set(s)},i(l){n||(h(e.$$.fragment,l),n=!0)},o(l){b(e.$$.fragment,l),n=!1},d(l){Z(e,l)}}}function Pl(t){let e=t[0],n,l,i=We(t);return{c(){i.c(),n=W()},l(s){i.l(s),n=W()},m(s,o){i.m(s,o),D(s,n,o),l=!0},p(s,[o]){o&1&&U(e,e=s[0])?(le(),b(i,1,1,Ye),ne(),i=We(s),i.c(),h(i,1),i.m(n.parentNode,n)):i.p(s,o)},i(s){l||(h(i),l=!0)},o(s){b(i),l=!1},d(s){s&&p(n),i.d(s)}}}function Rl(t,e,n){let{$$slots:l={},$$scope:i}=e,{title:s=""}=e,{compact:o=!1}=e,{class:a=void 0}=e;return t.$$set=f=>{"title"in f&&n(0,s=f.title),"compact"in f&&n(1,o=f.compact),"class"in f&&n(2,a=f.class),"$$scope"in f&&n(4,i=f.$$scope)},[s,o,a,l,i]}class Gl extends F{constructor(e){super(),G(this,e,Rl,Pl,U,{title:0,compact:1,class:2})}}export{Fl as A,Gl as a}; diff --git a/_app/immutable/chunks/AreaMap.Ua5Kysct.js b/_app/immutable/chunks/AreaMap.Ua5Kysct.js new file mode 100644 index 0000000000000000000000000000000000000000..0285ef9daa382e4bbf35f78ccad287826a123a77 --- /dev/null +++ b/_app/immutable/chunks/AreaMap.Ua5Kysct.js @@ -0,0 +1,27 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/chunks/leaflet-src.C2Mhlg_w.js","_app/immutable/chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js","_app/immutable/chunks/entry.p1-HE9Vh.js","_app/immutable/chunks/scheduler.BZlHRu_0.js","_app/immutable/chunks/index.a_oafgNU.js","_app/immutable/chunks/preload-helper.D7HrI6pR.js","_app/immutable/chunks/index.rV6zwFgL.js","_app/immutable/assets/VennDiagram.Hmmox_0V.css"])))=>i.map(i=>d[i]); +var fo=Object.defineProperty;var xl=l=>{throw TypeError(l)};var uo=(l,e,n)=>e in l?fo(l,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[e]=n;var ul=(l,e,n)=>uo(l,typeof e!="symbol"?e+"":e,n),$l=(l,e,n)=>e.has(l)||xl("Cannot "+n);var _e=(l,e,n)=>($l(l,e,"read from private field"),n?n.call(l):e.get(l)),ct=(l,e,n)=>e.has(l)?xl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(l):e.set(l,n),pt=(l,e,n,t)=>($l(l,e,"write to private field"),t?t.call(l,n):e.set(l,n),n);import{V as fn,af as va,s as de,b as K,k as C,f as b,a9 as $,n as Pe,aa as A,ab as Ee,N as Ae,e as N,d as R,g as B,ac as be,J as Je,u as ae,z as ne,D as le,E as re,F as ie,q as jn,a8 as Un,I as yt,B as Ie,L as ft,r as Il,t as ue,i as ce,m as De,G as st,l as z,aq as co,j as w,A as tt,a as se,c as fe,ak as Wt,al as lt,H as At,o as yn,M as Ln,T as Fe,ap as Dl,ah as er,an as ho,O as tr,P as nr,K as mo}from"./scheduler.BZlHRu_0.js";import{S as he,i as me,g as ve,b as k,d as ke,t as y,h as tl,j as Cn,f as vt,c as U,a as Z,m as Y,e as q,k as zt}from"./index.a_oafgNU.js";import{B as it,G as go,ak as Al,bX as _o,t as Qe,z as ot,w as et,q as Ll,v as Nl,ag as Tn,bY as bo,bZ as yo,x as lr,y as jt,F as pe,b_ as rr,bA as vo,bC as ir,al as ka,A as un,bz as ht,b$ as ko,bD as pa,ai as St,c0 as po,ah as an,by as Co,H as Ce,J as Le,K as qe,bG as Ca,I as nl,c1 as Do,bE as So,c2 as Eo,i as Ne,an as vn,c3 as To,c4 as Oo,c5 as Mo,Q as Et,ac as Zn,c6 as Da,W as wo,bg as Sa,h as Qt,c7 as Po,a3 as Rl,a8 as Kt,bI as Io,bH as ar,a2 as In,c8 as Ao,a5 as Lo,c9 as No,ad as ll,ca as Ro,ab as Vl,cb as Ea,ae as xn,cc as Vo,cd as Bo,a6 as Fo,ce as _n,N as Ta,cf as Wo,cg as or,ch as zo,u as jo,o as Uo}from"./VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";import{c as Zo,d as Oa,t as cl,v as Yo,w as qo,x as Ho,y as Jo,u as Ma,g as Sl,n as Go,r as Ko,k as wa,z as Qo,A as Xo,j as sr,b as xo,C as dl,i as $o,o as Pa,B as es,D as Ia}from"./button.DH6vZO4W.js";import{o as Nn,t as kn,g as Bl,a as ts,c as rl,r as il,b as al,e as tn,d as ns}from"./arrays.DyTtr4Tk.js";import{w as at,d as Ze,a as Qn}from"./entry.p1-HE9Vh.js";import{p as Aa}from"./stores.D7EENclZ.js";import{C as La,P as Na}from"./Prismjs.XAZNzsAo.js";import{h as El,u as Ra}from"./await_block.Ctm0iWyv.js";import{_ as ls}from"./preload-helper.D7HrI6pR.js";function hl(l){return Array.from(l.querySelectorAll('[role="option"]:not([data-disabled])')).filter(e=>it(e))}function rs(l){return e=>{const n=e.target,t=go(l);if(!t||!Al(n))return!1;const r=t.id;return!!(_o(n)&&r===n.htmlFor||n.closest(`label[for="${r}"]`))}}function is(){return{elements:{root:Qe("label",{action:e=>({destroy:ot(e,"mousedown",t=>{!t.defaultPrevented&&t.detail>1&&t.preventDefault()})})})}}}const as=[pe.ARROW_LEFT,pe.ESCAPE,pe.ARROW_RIGHT,pe.SHIFT,pe.CAPS_LOCK,pe.CONTROL,pe.ALT,pe.META,pe.ENTER,pe.F1,pe.F2,pe.F3,pe.F4,pe.F5,pe.F6,pe.F7,pe.F8,pe.F9,pe.F10,pe.F11,pe.F12],os={positioning:{placement:"bottom",sameWidth:!0},scrollAlignment:"nearest",loop:!0,defaultOpen:!1,closeOnOutsideClick:!0,preventScroll:!0,closeOnEscape:!0,forceVisible:!1,portal:void 0,builder:"listbox",disabled:!1,required:!1,name:void 0,typeahead:!0,highlightOnHover:!0,onOutsideClick:void 0},ss=["trigger","menu","label"];function fs(l){const e={...os,...l},n=et(at(null)),t=et(at(null)),r=e.selected??at(e.defaultSelected),i=Nn(r,e==null?void 0:e.onSelectedChange),a=Ze(t,J=>J?ee(J):void 0),s=e.open??at(e.defaultOpen),o=Nn(s,e==null?void 0:e.onOpenChange),f=kn({...Ll(e,"open","defaultOpen","builder","ids"),multiple:e.multiple??!1}),{scrollAlignment:u,loop:c,closeOnOutsideClick:d,closeOnEscape:h,preventScroll:m,portal:g,forceVisible:v,positioning:p,multiple:D,arrowSize:L,disabled:V,required:M,typeahead:x,name:F,highlightOnHover:S,onOutsideClick:E}=f,{name:I,selector:_}=Nl(e.builder),O=kn({...Bl(ss),...e.ids}),{handleTypeaheadSearch:T}=Zo({onMatch:J=>{t.set(J),J.scrollIntoView({block:u.get()})},getCurrentItem(){return t.get()}});function ee(J){const ge=J.getAttribute("data-value"),j=J.getAttribute("data-label"),nt=J.hasAttribute("data-disabled");return{value:ge&&JSON.parse(ge),label:j??J.textContent??void 0,disabled:!!nt}}const we=J=>{i.update(ge=>{if(D.get()){const nt=Array.isArray(ge)?[...ge]:[];return Qo(J,nt,(H,Me)=>Tn(H.value,Me.value))}return J})};function Se(J){const ge=ee(J);we(ge)}async function Re(){o.set(!0);const J=document.getElementById(O.trigger.get());if(!J)return;J!==n.get()&&n.set(J),await fn();const ge=document.getElementById(O.menu.get());if(!it(ge))return;const j=ge.querySelector("[aria-selected=true]");it(j)&&t.set(j)}function G(){o.set(!1),t.set(null)}const Oe=Oa({open:o,forceVisible:v,activeTrigger:n}),Te=Ze([i],([J])=>ge=>Array.isArray(J)?J.some(j=>Tn(j.value,ge)):bo(ge)?Tn(J==null?void 0:J.value,yo(ge,void 0)):Tn(J==null?void 0:J.value,ge)),ye=Ze([a],([J])=>ge=>Tn(J==null?void 0:J.value,ge)),We=Qe(I("trigger"),{stores:[o,t,V,O.menu,O.trigger,O.label],returned:([J,ge,j,nt,H,Me])=>({"aria-activedescendant":ge==null?void 0:ge.id,"aria-autocomplete":"list","aria-controls":nt,"aria-expanded":J,"aria-labelledby":Me,id:H,role:"combobox",disabled:lr(j),type:e.builder==="select"?"button":void 0}),action:J=>{const ge=po(J),j=jt(ot(J,"click",()=>{J.focus(),o.get()?G():Re()}),ot(J,"keydown",Me=>{if(!o.get()){if(as.includes(Me.key)||Me.key===pe.TAB||Me.key===pe.BACKSPACE&&ge&&J.value===""||Me.key===pe.SPACE&&rr(J))return;Re(),fn().then(()=>{if(i.get())return;const Rt=document.getElementById(O.menu.get());if(!it(Rt))return;const He=Array.from(Rt.querySelectorAll(`${_("item")}:not([data-disabled]):not([data-hidden])`)).filter(kt=>it(kt));He.length&&(Me.key===pe.ARROW_DOWN?(t.set(He[0]),He[0].scrollIntoView({block:u.get()})):Me.key===pe.ARROW_UP&&(t.set(cl(He)),cl(He).scrollIntoView({block:u.get()})))})}if(Me.key===pe.TAB){G();return}if(Me.key===pe.ENTER&&!Me.isComposing||Me.key===pe.SPACE&&rr(J)){Me.preventDefault();const je=t.get();je&&Se(je),D.get()||G()}if(Me.key===pe.ARROW_UP&&Me.altKey&&G(),vo.includes(Me.key)){Me.preventDefault();const je=document.getElementById(O.menu.get());if(!it(je))return;const Rt=hl(je);if(!Rt.length)return;const He=Rt.filter(En=>!ir(En)&&En.dataset.hidden===void 0),kt=t.get(),Vt=kt?He.indexOf(kt):-1,dn=c.get(),hn=u.get();let _t;switch(Me.key){case pe.ARROW_DOWN:_t=Jo(He,Vt,dn);break;case pe.ARROW_UP:_t=Ho(He,Vt,dn);break;case pe.PAGE_DOWN:_t=qo(He,Vt,10,dn);break;case pe.PAGE_UP:_t=Yo(He,Vt,10,dn);break;case pe.HOME:_t=He[0];break;case pe.END:_t=cl(He);break;default:return}t.set(_t),_t==null||_t.scrollIntoView({block:hn})}else if(x.get()){const je=document.getElementById(O.menu.get());if(!it(je))return;T(Me.key,hl(je))}}));let nt=an;const H=ka(J,{handler:G,enabled:Ze([o,h],([Me,rt])=>Me&&rt)});return H&&H.destroy&&(nt=H.destroy),{destroy(){j(),nt()}}}}),Ge=Qe(I("menu"),{stores:[Oe,O.menu],returned:([J,ge])=>({hidden:J?void 0:!0,id:ge,role:"listbox",style:un({display:J?void 0:"none"})}),action:J=>{let ge=an;const j=jt(ht([Oe,g,d,p,n],([nt,H,Me,rt,je])=>{ge(),!(!nt||!je)&&fn().then(()=>{ge();const Rt=rs(O.trigger.get());ge=Ma(J,{anchorElement:je,open:o,options:{floating:rt,focusTrap:null,modal:{closeOnInteractOutside:Me,onClose:G,open:nt,shouldCloseOnInteractOutside:He=>{var Vt;if((Vt=E.get())==null||Vt(He),He.defaultPrevented)return!1;const kt=He.target;return!(!Al(kt)||kt===je||je.contains(kt)||Rt(He))}},escapeKeydown:null,portal:Sl(J,H)}}).destroy})}));return{destroy:()=>{j(),ge()}}}}),{elements:{root:Q}}=is(),{action:ut}=va(Q),dt=Qe(I("label"),{stores:[O.label,O.trigger],returned:([J,ge])=>({id:J,for:ge}),action:ut}),Ve=Qe(I("option"),{stores:[Te],returned:([J])=>ge=>{const j=J(ge.value);return{"data-value":JSON.stringify(ge.value),"data-label":ge.label,"data-disabled":lr(ge.disabled),"aria-disabled":ge.disabled?!0:void 0,"aria-selected":j,"data-selected":j?"":void 0,id:ts(),role:"option"}},action:J=>({destroy:jt(ot(J,"click",j=>{if(ir(J)){j.preventDefault();return}Se(J),D.get()||G()}),ht(S,j=>j?jt(ot(J,"mouseover",()=>{t.set(J)}),ot(J,"mouseleave",()=>{t.set(null)})):void 0))})}),Lt=Qe(I("group"),{returned:()=>J=>({role:"group","aria-labelledby":J})}),Ot=Qe(I("group-label"),{returned:()=>J=>({id:J})}),X=ko({value:Ze([i],([J])=>{const ge=Array.isArray(J)?J.map(j=>j.value):J==null?void 0:J.value;return typeof ge=="string"?ge:JSON.stringify(ge)}),name:Qn(F),required:M,prefix:e.builder}),Nt=Qe(I("arrow"),{stores:L,returned:J=>({"data-arrow":!0,style:un({position:"absolute",width:`var(--arrow-size, ${J}px)`,height:`var(--arrow-size, ${J}px)`})})});return pa(()=>{if(!St)return;const J=document.getElementById(O.menu.get()),ge=document.getElementById(O.trigger.get());if(ge&&n.set(ge),!J)return;const j=J.querySelector("[data-selected]");it(j)}),ht([t],([J])=>{if(!St)return;const ge=document.getElementById(O.menu.get());it(ge)&&hl(ge).forEach(j=>{j===J?Go(j):Ko(j)})}),ht([o],([J])=>{if(!St)return;let ge=an;return m.get()&&J&&(ge=wa()),()=>{ge()}}),{ids:O,elements:{trigger:We,group:Lt,option:Ve,menu:Ge,groupLabel:Ot,label:dt,hiddenInput:X,arrow:Nt},states:{open:o,selected:i,highlighted:a,highlightedItem:t},helpers:{isSelected:Te,isHighlighted:ye,closeMenu:G},options:f}}function ml(l,e){return l-e*Math.floor(l/e)}const Va=1721426;function Hn(l,e,n,t){e=Fl(l,e);let r=e-1,i=-2;return n<=2?i=0:Xn(e)&&(i=-1),Va-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+i+t)}function Xn(l){return l%4===0&&(l%100!==0||l%400===0)}function Fl(l,e){return l==="BC"?1-e:e}function us(l){let e="AD";return l<=0&&(e="BC",l=1-l),[e,l]}const cs={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class pn{fromJulianDay(e){let n=e,t=n-Va,r=Math.floor(t/146097),i=ml(t,146097),a=Math.floor(i/36524),s=ml(i,36524),o=Math.floor(s/1461),f=ml(s,1461),u=Math.floor(f/365),c=r*400+a*100+o*4+u+(a!==4&&u!==4?1:0),[d,h]=us(c),m=n-Hn(d,h,1,1),g=2;n0&&e===Ye())return new Date(l).getTimezoneOffset()*-6e4;let{year:n,month:t,day:r,hour:i,minute:a,second:s}=za(l,e);return Wa(n,t,r,i,a,s,0)-Math.floor(l/1e3)*1e3}const hr=new Map;function za(l,e){let n=hr.get(e);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),hr.set(e,n));let t=n.formatToParts(new Date(l)),r={};for(let i of t)i.type!=="literal"&&(r[i.type]=i.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}const $n=864e5;function vs(l,e){let n=Xt(l),t=n-Rn(n-$n,e),r=n-Rn(n+$n,e);return ja(l,e,t,r)}function ja(l,e,n,t){return(n===t?[n]:[n,t]).filter(i=>ks(l,e,i))}function ks(l,e,n){let t=za(n,e);return l.year===t.year&&l.month===t.month&&l.day===t.day&&l.hour===t.hour&&l.minute===t.minute&&l.second===t.second}function Pt(l,e,n="compatible"){let t=xt(l);if(e==="UTC")return Xt(t);if(e===Ye()&&n==="compatible"){t=gt(t,new pn);let o=new Date,f=Fl(t.era,t.year);return o.setFullYear(f,t.month-1,t.day),o.setHours(t.hour,t.minute,t.second,t.millisecond),o.getTime()}let r=Xt(t),i=Rn(r-$n,e),a=Rn(r+$n,e),s=ja(t,e,r-i,r-a);if(s.length===1)return s[0];if(s.length>1)switch(n){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(r-i,r-a);case"compatible":case"later":return Math.max(r-i,r-a);case"reject":throw new RangeError("No such absolute time found")}}function Ua(l,e,n="compatible"){return new Date(Pt(l,e,n))}function It(l,e){let n=Rn(l,e),t=new Date(l+n),r=t.getUTCFullYear(),i=t.getUTCMonth()+1,a=t.getUTCDate(),s=t.getUTCHours(),o=t.getUTCMinutes(),f=t.getUTCSeconds(),u=t.getUTCMilliseconds();return new Zt(r<1?"BC":"AD",r<1?-r+1:r,i,a,e,n,s,o,f,u)}function ps(l){return new $t(l.calendar,l.era,l.year,l.month,l.day)}function xt(l,e){let n=0,t=0,r=0,i=0;if("timeZone"in l)({hour:n,minute:t,second:r,millisecond:i}=l);else if("hour"in l&&!e)return l;return e&&({hour:n,minute:t,second:r,millisecond:i}=e),new en(l.calendar,l.era,l.year,l.month,l.day,n,t,r,i)}function gt(l,e){if(l.calendar.identifier===e.identifier)return l;let n=e.fromJulianDay(l.calendar.toJulianDay(l)),t=l.copy();return t.calendar=e,t.era=n.era,t.year=n.year,t.month=n.month,t.day=n.day,cn(t),t}function Cs(l,e,n){if(l instanceof Zt)return l.timeZone===e?l:Ss(l,e);let t=Pt(l,e,n);return It(t,e)}function Ds(l){let e=Xt(l)-l.offset;return new Date(e)}function Ss(l,e){let n=Xt(l)-l.offset;return gt(It(n,e),l.calendar)}const On=36e5;function ol(l,e){let n=l.copy(),t="hour"in n?Ms(n,e):0;Tl(n,e.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,l),n.month+=e.months||0,Ol(n),Za(n),n.day+=(e.weeks||0)*7,n.day+=e.days||0,n.day+=t,Es(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let r=n.calendar.getYearsInEra(n);if(n.year>r){var i,a;let o=(i=(a=n.calendar).isInverseEra)===null||i===void 0?void 0:i.call(a,n);n.year=r,n.month=o?1:n.calendar.getMonthsInYear(n),n.day=o?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Tl(l,e){var n,t;!((n=(t=l.calendar).isInverseEra)===null||n===void 0)&&n.call(t,l)&&(e=-e),l.year+=e}function Ol(l){for(;l.month<1;)Tl(l,-1),l.month+=l.calendar.getMonthsInYear(l);let e=0;for(;l.month>(e=l.calendar.getMonthsInYear(l));)l.month-=e,Tl(l,1)}function Es(l){for(;l.day<1;)l.month--,Ol(l),l.day+=l.calendar.getDaysInMonth(l);for(;l.day>l.calendar.getDaysInMonth(l);)l.day-=l.calendar.getDaysInMonth(l),l.month++,Ol(l)}function Za(l){l.month=Math.max(1,Math.min(l.calendar.getMonthsInYear(l),l.month)),l.day=Math.max(1,Math.min(l.calendar.getDaysInMonth(l),l.day))}function cn(l){l.calendar.constrainDate&&l.calendar.constrainDate(l),l.year=Math.max(1,Math.min(l.calendar.getYearsInEra(l),l.year)),Za(l)}function Ya(l){let e={};for(let n in l)typeof l[n]=="number"&&(e[n]=-l[n]);return e}function qa(l,e){return ol(l,Ya(e))}function Wl(l,e){let n=l.copy();return e.era!=null&&(n.era=e.era),e.year!=null&&(n.year=e.year),e.month!=null&&(n.month=e.month),e.day!=null&&(n.day=e.day),cn(n),n}function el(l,e){let n=l.copy();return e.hour!=null&&(n.hour=e.hour),e.minute!=null&&(n.minute=e.minute),e.second!=null&&(n.second=e.second),e.millisecond!=null&&(n.millisecond=e.millisecond),Os(n),n}function Ts(l){l.second+=Math.floor(l.millisecond/1e3),l.millisecond=Gn(l.millisecond,1e3),l.minute+=Math.floor(l.second/60),l.second=Gn(l.second,60),l.hour+=Math.floor(l.minute/60),l.minute=Gn(l.minute,60);let e=Math.floor(l.hour/24);return l.hour=Gn(l.hour,24),e}function Os(l){l.millisecond=Math.max(0,Math.min(l.millisecond,1e3)),l.second=Math.max(0,Math.min(l.second,59)),l.minute=Math.max(0,Math.min(l.minute,59)),l.hour=Math.max(0,Math.min(l.hour,23))}function Gn(l,e){let n=l%e;return n<0&&(n+=e),n}function Ms(l,e){return l.hour+=e.hours||0,l.minute+=e.minutes||0,l.second+=e.seconds||0,l.millisecond+=e.milliseconds||0,Ts(l)}function zl(l,e,n,t){let r=l.copy();switch(e){case"era":{let s=l.calendar.getEras(),o=s.indexOf(l.era);if(o<0)throw new Error("Invalid era: "+l.era);o=Ut(o,n,0,s.length-1,t==null?void 0:t.round),r.era=s[o],cn(r);break}case"year":var i,a;!((i=(a=r.calendar).isInverseEra)===null||i===void 0)&&i.call(a,r)&&(n=-n),r.year=Ut(l.year,n,-1/0,9999,t==null?void 0:t.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,l);break;case"month":r.month=Ut(l.month,n,1,l.calendar.getMonthsInYear(l),t==null?void 0:t.round);break;case"day":r.day=Ut(l.day,n,1,l.calendar.getDaysInMonth(l),t==null?void 0:t.round);break;default:throw new Error("Unsupported field "+e)}return l.calendar.balanceDate&&l.calendar.balanceDate(r),cn(r),r}function Ha(l,e,n,t){let r=l.copy();switch(e){case"hour":{let i=l.hour,a=0,s=23;if((t==null?void 0:t.hourCycle)===12){let o=i>=12;a=o?12:0,s=o?23:11}r.hour=Ut(i,n,a,s,t==null?void 0:t.round);break}case"minute":r.minute=Ut(l.minute,n,0,59,t==null?void 0:t.round);break;case"second":r.second=Ut(l.second,n,0,59,t==null?void 0:t.round);break;case"millisecond":r.millisecond=Ut(l.millisecond,n,0,999,t==null?void 0:t.round);break;default:throw new Error("Unsupported field "+e)}return r}function Ut(l,e,n,t,r=!1){if(r){l+=Math.sign(e),l0?l=Math.ceil(l/i)*i:l=Math.floor(l/i)*i,l>t&&(l=n)}else l+=e,lt&&(l=n+(l-t-1));return l}function Ja(l,e){let n;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let r=ol(xt(l),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});n=Pt(r,l.timeZone)}else n=Xt(l)-l.offset;n+=e.milliseconds||0,n+=(e.seconds||0)*1e3,n+=(e.minutes||0)*6e4,n+=(e.hours||0)*36e5;let t=It(n,l.timeZone);return gt(t,l.calendar)}function ws(l,e){return Ja(l,Ya(e))}function Ps(l,e,n,t){switch(e){case"hour":{let r=0,i=23;if((t==null?void 0:t.hourCycle)===12){let m=l.hour>=12;r=m?12:0,i=m?23:11}let a=xt(l),s=gt(el(a,{hour:r}),new pn),o=[Pt(s,l.timeZone,"earlier"),Pt(s,l.timeZone,"later")].filter(m=>It(m,l.timeZone).day===s.day)[0],f=gt(el(a,{hour:i}),new pn),u=[Pt(f,l.timeZone,"earlier"),Pt(f,l.timeZone,"later")].filter(m=>It(m,l.timeZone).day===f.day).pop(),c=Xt(l)-l.offset,d=Math.floor(c/On),h=c%On;return c=Ut(d,n,Math.floor(o/On),Math.floor(u/On),t==null?void 0:t.round)*On+h,gt(It(c,l.timeZone),l.calendar)}case"minute":case"second":case"millisecond":return Ha(l,e,n,t);case"era":case"year":case"month":case"day":{let r=zl(xt(l),e,n,t),i=Pt(r,l.timeZone);return gt(It(i,l.timeZone),l.calendar)}default:throw new Error("Unsupported field "+e)}}function Is(l,e,n){let t=xt(l),r=el(Wl(t,e),e);if(r.compare(t)===0)return l;let i=Pt(r,l.timeZone,n);return gt(It(i,l.timeZone),l.calendar)}const As=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Ls=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Ns=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?)?\[(.*?)\]$/;function Rs(l){let e=l.match(As);if(!e)throw new Error("Invalid ISO 8601 date string: "+l);let n=new $t(Ke(e[1],0,9999),Ke(e[2],1,12),1);return n.day=Ke(e[3],0,n.calendar.getDaysInMonth(n)),n}function Vs(l){let e=l.match(Ls);if(!e)throw new Error("Invalid ISO 8601 date time string: "+l);let n=Ke(e[1],-9999,9999),t=n<1?"BC":"AD",r=new en(t,n<1?-n+1:n,Ke(e[2],1,12),1,e[4]?Ke(e[4],0,23):0,e[5]?Ke(e[5],0,59):0,e[6]?Ke(e[6],0,59):0,e[7]?Ke(e[7],0,1/0)*1e3:0);return r.day=Ke(e[3],0,r.calendar.getDaysInMonth(r)),r}function Bs(l,e){let n=l.match(Ns);if(!n)throw new Error("Invalid ISO 8601 date time string: "+l);let t=Ke(n[1],-9999,9999),r=t<1?"BC":"AD",i=new Zt(r,t<1?-t+1:t,Ke(n[2],1,12),1,n[10],0,n[4]?Ke(n[4],0,23):0,n[5]?Ke(n[5],0,59):0,n[6]?Ke(n[6],0,59):0,n[7]?Ke(n[7],0,1/0)*1e3:0);i.day=Ke(n[3],0,i.calendar.getDaysInMonth(i));let a=xt(i),s;if(n[8]){var o;if(i.offset=Ke(n[8],-23,23)*36e5+Ke((o=n[9])!==null&&o!==void 0?o:"0",0,59)*6e4,s=Xt(i)-i.offset,!vs(a,i.timeZone).includes(s))throw new Error(`Offset ${Ka(i.offset)} is invalid for ${jl(i)} in ${i.timeZone}`)}else s=Pt(xt(a),i.timeZone,e);return It(s,i.timeZone)}function Ke(l,e,n){let t=Number(l);if(tn)throw new RangeError(`Value out of range: ${e} <= ${t} <= ${n}`);return t}function Fs(l){return`${String(l.hour).padStart(2,"0")}:${String(l.minute).padStart(2,"0")}:${String(l.second).padStart(2,"0")}${l.millisecond?String(l.millisecond/1e3).slice(1):""}`}function Ga(l){let e=gt(l,new pn),n;return e.era==="BC"?n=e.year===1?"0000":"-"+String(Math.abs(1-e.year)).padStart(6,"00"):n=String(e.year).padStart(4,"0"),`${n}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function jl(l){return`${Ga(l)}T${Fs(l)}`}function Ka(l){let e=Math.sign(l)<0?"-":"+";l=Math.abs(l);let n=Math.floor(l/36e5),t=l%36e5/6e4;return`${e}${String(n).padStart(2,"0")}:${String(t).padStart(2,"0")}`}function Ws(l){return`${jl(l)}${Ka(l.offset)}[${l.timeZone}]`}function zs(l,e){if(e.has(l))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ul(l,e,n){zs(l,e),e.set(l,n)}function Zl(l){let e=typeof l[0]=="object"?l.shift():new pn,n;if(typeof l[0]=="string")n=l.shift();else{let a=e.getEras();n=a[a.length-1]}let t=l.shift(),r=l.shift(),i=l.shift();return[e,n,t,r,i]}var js=new WeakMap;class $t{copy(){return this.era?new $t(this.calendar,this.era,this.year,this.month,this.day):new $t(this.calendar,this.year,this.month,this.day)}add(e){return ol(this,e)}subtract(e){return qa(this,e)}set(e){return Wl(this,e)}cycle(e,n,t){return zl(this,e,n,t)}toDate(e){return Ua(this,e)}toString(){return Ga(this)}compare(e){return Fa(this,e)}constructor(...e){Ul(this,js,{writable:!0,value:void 0});let[n,t,r,i,a]=Zl(e);this.calendar=n,this.era=t,this.year=r,this.month=i,this.day=a,cn(this)}}var Us=new WeakMap;class en{copy(){return this.era?new en(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new en(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return ol(this,e)}subtract(e){return qa(this,e)}set(e){return Wl(el(this,e),e)}cycle(e,n,t){switch(e){case"era":case"year":case"month":case"day":return zl(this,e,n,t);default:return Ha(this,e,n,t)}}toDate(e,n){return Ua(this,e,n)}toString(){return jl(this)}compare(e){let n=Fa(this,e);return n===0?_s(this,xt(e)):n}constructor(...e){Ul(this,Us,{writable:!0,value:void 0});let[n,t,r,i,a]=Zl(e);this.calendar=n,this.era=t,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,cn(this)}}var Zs=new WeakMap;class Zt{copy(){return this.era?new Zt(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Zt(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ja(this,e)}subtract(e){return ws(this,e)}set(e,n){return Is(this,e,n)}cycle(e,n,t){return Ps(this,e,n,t)}toDate(){return Ds(this)}toString(){return Ws(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Cs(e,this.timeZone).toDate().getTime()}constructor(...e){Ul(this,Zs,{writable:!0,value:void 0});let[n,t,r,i,a]=Zl(e),s=e.shift(),o=e.shift();this.calendar=n,this.era=t,this.year=r,this.month=i,this.day=a,this.timeZone=s,this.offset=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,cn(this)}}let _l=new Map;class Ct{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,n);if(n= start date");return`${this.formatter.format(e)} – ${this.formatter.format(n)}`}formatRangeToParts(e,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,n);if(n= start date");let t=this.formatter.formatToParts(e),r=this.formatter.formatToParts(n);return[...t.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return Hs()&&(this.resolvedHourCycle||(this.resolvedHourCycle=Js(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}constructor(e,n={}){this.formatter=Qa(e,n),this.options=n}}const Ys={true:{ja:"h11"},false:{}};function Qa(l,e={}){if(typeof e.hour12=="boolean"&&qs()){e={...e};let r=Ys[String(e.hour12)][l.split("-")[0]],i=e.hour12?"h12":"h23";e.hourCycle=r??i,delete e.hour12}let n=l+(e?Object.entries(e).sort((r,i)=>r[0]i.type==="hour").value,10),r=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(t===0&&r===23)return"h23";if(t===24&&r===23)return"h24";if(t===0&&r===11)return"h11";if(t===12&&r===11)return"h12";throw new Error("Unexpected hour cycle result")}const Gs={defaultValue:void 0,defaultPlaceholder:void 0,granularity:"day"};function Ks(l){const e={...Gs,...l},{defaultValue:n,defaultPlaceholder:t,granularity:r}=e;if(Array.isArray(n)&&n.length)return n[n.length-1];if(n&&!Array.isArray(n))return n;if(t)return t;{const i=new Date,a=i.getFullYear(),s=i.getMonth()+1,o=i.getDate();return["hour","minute","second"].includes(r??"day")?new en(a,s,o,0,0,0):new $t(a,s,o)}}function Pn(l,e){let n;return e instanceof Zt?n=Bs(l):e instanceof en?n=Vs(l):n=Rs(l),n.calendar!==e.calendar?gt(n,e.calendar):n}function Ft(l,e=Ye()){return l instanceof Zt?l.toDate():l.toDate(e)}function Qs(l){return l instanceof en}function Xa(l){return l instanceof Zt}function Xs(l){return Qs(l)||Xa(l)}function xs(l){if(l instanceof Date){const e=l.getFullYear(),n=l.getMonth()+1;return new Date(e,n,0).getDate()}else return l.set({day:100}).day}function mn(l,e){return l.compare(e)<0}function vl(l,e){return l.compare(e)>0}function $s(l,e){return l.compare(e)<=0}function ef(l,e){return l.compare(e)>=0}function mr(l,e,n){return ef(l,e)&&$s(l,n)}function tf(l,e,n){const t=Ba(l,n);return e>t?l.subtract({days:t+7-e}):e===t?l:l.subtract({days:t-e})}function nf(l,e,n){const t=Ba(l,n),r=e===0?6:e-1;return t===r?l:t>r?l.add({days:7-t+r}):l.add({days:r-t})}function lf(l,e,n,t){if(n===void 0&&t===void 0)return!0;let r=l.add({days:1});if(t!=null&&t(r)||n!=null&&n(r))return!1;const i=e;for(;r.compare(i)<0;)if(r=r.add({days:1}),t!=null&&t(r)||n!=null&&n(r))return!1;return!0}function rf(l){let e=l;function n(m){e=m}function t(){return e}function r(m,g){return new Ct(e,g).format(m)}function i(m,g=!0){return Xs(m)&&g?r(Ft(m),{dateStyle:"long",timeStyle:"long"}):r(Ft(m),{dateStyle:"long"})}function a(m){return new Ct(e,{month:"long",year:"numeric"}).format(m)}function s(m){return new Ct(e,{month:"long"}).format(m)}function o(m){return new Ct(e,{year:"numeric"}).format(m)}function f(m,g){return Xa(m)?new Ct(e,{...g,timeZone:m.timeZone}).formatToParts(Ft(m)):new Ct(e,g).formatToParts(Ft(m))}function u(m,g="narrow"){return new Ct(e,{weekday:g}).format(m)}function c(m){var p;return((p=new Ct(e,{hour:"numeric",minute:"numeric"}).formatToParts(m).find(D=>D.type==="dayPeriod"))==null?void 0:p.value)==="PM"?"PM":"AM"}const d={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function h(m,g,v={}){const p={...d,...v},L=f(m,p).find(V=>V.type===g);return L?L.value:""}return{setLocale:n,getLocale:t,fullMonth:s,fullYear:o,fullMonthAndYear:a,toParts:f,custom:r,part:h,dayPeriod:c,selectedDate:i,dayOfWeek:u}}function af(l,e){const{set:n,update:t,subscribe:r,get:i}=et(l);function a(h){t(m=>m.add(h))}function s(h){t(m=>m.set({day:1}).add({months:h}))}function o(h){t(m=>m.set({day:1}).subtract({months:h}))}function f(h){t(m=>m.subtract(h))}function u(h,m){if(m){t(g=>g.set(h,m));return}t(g=>g.set(h))}function c(){t(()=>e)}function d(){return{set:n,subscribe:r,update:t,get:i}}return{get:i,set:n,update:t,subscribe:r,add:a,subtract:f,setDate:u,reset:c,toWritable:d,nextPage:s,prevPage:o}}function of(){if(!St)return null;let l=document.querySelector("[data-melt-announcer]");if(!it(l)){const t=document.createElement("div");t.style.cssText=un({border:"0px",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute","white-space":"nowrap",width:"1px"}),t.setAttribute("data-melt-announcer",""),t.appendChild(e("assertive")),t.appendChild(e("polite")),l=t,document.body.insertBefore(l,document.body.firstChild)}function e(t){const r=document.createElement("div");return r.role="log",r.ariaLive=t,r.setAttribute("aria-relevant","additions"),r}function n(t){if(!it(l))return null;const r=l.querySelector(`[aria-live="${t}"]`);return it(r)?r:null}return{getLog:n}}function gr(){const l=of();function e(n,t="assertive",r=7500){if(!l||!St)return;const i=l.getLog(t),a=document.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,t==="assertive"?i==null||i.replaceChildren(a):i==null||i.appendChild(a),setTimeout(()=>{a.remove()},r)}return{announce:e}}function sf(l){return!(!it(l)||!l.hasAttribute("data-melt-calendar-cell"))}function _r(l,e){const n=[];let t=l.add({days:1});const r=e;for(;t.compare(r)<0;)n.push(t),t=t.add({days:1});return n}function kl(l){const{dateObj:e,weekStartsOn:n,fixedWeeks:t,locale:r}=l,i=xs(e),a=Array.from({length:i},(v,p)=>e.set({day:p+1})),s=Bt(e),o=rn(e),f=tf(s,n,r),u=nf(o,n,r),c=_r(f.subtract({days:1}),s),d=_r(o,u.add({days:1})),h=c.length+a.length+d.length;if(t&&h<42){const v=42-h;let p=d[d.length-1];p||(p=e.add({months:1}).set({day:1}));const D=Array.from({length:v},(L,V)=>{const M=V+1;return p.add({days:M})});d.push(...D)}const m=c.concat(a,d),g=Xo(m,7);return{value:e,dates:m,weeks:g}}function Mn(l){const{numberOfMonths:e,dateObj:n,...t}=l,r=[];if(!e||e===1)return r.push(kl({...t,dateObj:n})),r;r.push(kl({...t,dateObj:n}));for(let i=1;iit(t)):[]}function br(l,e){const n=l.getAttribute("data-value");n&&e.set(Pn(n,va(e)))}const ff={positioning:{placement:"bottom"},arrowSize:8,defaultOpen:!1,disableFocusTrap:!1,closeOnEscape:!0,preventScroll:!1,onOpenChange:void 0,closeOnOutsideClick:!0,portal:void 0,forceVisible:!1,openFocus:void 0,closeFocus:void 0,onOutsideClick:void 0},{name:wn}=Nl("popover"),uf=["trigger","content"];function cf(l){const e={...ff,...l},n=kn(Ll(e,"open","ids")),{positioning:t,arrowSize:r,disableFocusTrap:i,preventScroll:a,closeOnEscape:s,closeOnOutsideClick:o,portal:f,forceVisible:u,openFocus:c,closeFocus:d,onOutsideClick:h}=n,m=e.open??at(e.defaultOpen),g=Nn(m,e==null?void 0:e.onOpenChange),v=et.writable(null),p=kn({...Bl(uf),...e.ids});pa(()=>{v.set(document.getElementById(p.trigger.get()))});function D(){g.set(!1);const _=document.getElementById(p.trigger.get());sr({prop:d.get(),defaultEl:_})}const L=Oa({open:g,activeTrigger:v,forceVisible:u}),V=Qe(wn("content"),{stores:[L,f,p.content],returned:([_,O,T])=>({hidden:_&&St?void 0:!0,tabindex:-1,style:un({display:_?void 0:"none"}),id:T,"data-state":_?"open":"closed","data-portal":Co(O)}),action:_=>{let O=an;const T=ht([L,v,t,i,s,o,f],([ee,we,Se,Re,G,Oe,Te])=>{O(),!(!ee||!we)&&fn().then(()=>{O(),O=Ma(_,{anchorElement:we,open:g,options:{floating:Se,focusTrap:Re?null:{returnFocusOnDeactivate:!1,clickOutsideDeactivates:Oe,allowOutsideClick:!0,escapeDeactivates:G},modal:{shouldCloseOnInteractOutside:x,onClose:D,open:ee,closeOnInteractOutside:Oe},escapeKeydown:G?{handler:()=>{D()}}:null,portal:Sl(_,Te)}}).destroy})});return{destroy(){T(),O()}}}});function M(_){g.update(O=>!O),_&&_!==v.get()&&v.set(_)}function x(_){var ee;if((ee=h.get())==null||ee(_),_.defaultPrevented)return!1;const O=_.target,T=document.getElementById(p.trigger.get());return!(T&&Al(O)&&(O===T||T.contains(O)))}const F=Qe(wn("trigger"),{stores:[L,p.content,p.trigger],returned:([_,O,T])=>({role:"button","aria-haspopup":"dialog","aria-expanded":_?"true":"false","data-state":yr(_),"aria-controls":O,id:T}),action:_=>({destroy:jt(ot(_,"click",()=>{M(_)}),ot(_,"keydown",T=>{T.key!==pe.ENTER&&T.key!==pe.SPACE||(T.preventDefault(),M(_))}))})}),S=Qe(wn("overlay"),{stores:[L],returned:([_])=>({hidden:_?void 0:!0,tabindex:-1,style:un({display:_?void 0:"none"}),"aria-hidden":"true","data-state":yr(_)}),action:_=>{let O=an,T=an,ee=an;if(s.get()){const we=ka(_,{handler:()=>{D()}});we&&we.destroy&&(O=we.destroy)}return T=ht([f],([we])=>{if(ee(),we===null)return;const Se=Sl(_,we);Se!==null&&(ee=xo(_,Se).destroy)}),{destroy(){O(),T(),ee()}}}}),E=Qe(wn("arrow"),{stores:r,returned:_=>({"data-arrow":!0,style:un({position:"absolute",width:`var(--arrow-size, ${_}px)`,height:`var(--arrow-size, ${_}px)`})})}),I=Qe(wn("close"),{returned:()=>({type:"button"}),action:_=>({destroy:jt(ot(_,"click",T=>{T.defaultPrevented||D()}),ot(_,"keydown",T=>{T.defaultPrevented||T.key!==pe.ENTER&&T.key!==pe.SPACE||(T.preventDefault(),M())}))})});return ht([g,v,a],([_,O,T])=>{if(!St)return;const ee=[];if(_){O||fn().then(()=>{const Se=document.getElementById(p.trigger.get());it(Se)&&v.set(Se)}),T&&ee.push(wa());const we=O??document.getElementById(p.trigger.get());sr({prop:c.get(),defaultEl:we})}return()=>{ee.forEach(we=>we())}}),{ids:p,elements:{trigger:F,content:V,arrow:E,close:I,overlay:S},states:{open:g},options:n}}function yr(l){return l?"open":"closed"}const df={isDateDisabled:void 0,isDateUnavailable:void 0,value:void 0,defaultValue:{start:void 0,end:void 0},preventDeselect:!1,numberOfMonths:1,pagedNavigation:!1,weekStartsOn:0,fixedWeeks:!1,calendarLabel:"Event Date",locale:"en",minValue:void 0,maxValue:void 0,disabled:!1,readonly:!1,weekdayFormat:"narrow"},{name:gn}=Nl("calendar"),hf=["calendar","accessibleHeading"];function mf(l){var En,Jl,Gl;const e={...df,...l},n=kn({...Ll(e,"value","placeholder")}),{preventDeselect:t,numberOfMonths:r,pagedNavigation:i,weekStartsOn:a,fixedWeeks:s,calendarLabel:o,locale:f,minValue:u,maxValue:c,disabled:d,readonly:h,weekdayFormat:m}=n,g=kn({...Bl(hf),...e.ids}),v=Ks({defaultValue:(En=e.defaultValue)==null?void 0:En.start,defaultPlaceholder:e.defaultPlaceholder}),p=rf(f.get()),D=e.value??at(e.defaultValue),L=Nn(D,e.onValueChange);L.get()||L.set(e.defaultValue);const V=et(at(L.get().start??((Jl=e.defaultValue)==null?void 0:Jl.start))),M=et(at(L.get().end??((Gl=e.defaultValue)==null?void 0:Gl.end))),x=e.placeholder??at(e.defaultPlaceholder??v),F=af(Nn(x,e.onPlaceholderChange),e.defaultPlaceholder??v),S=et(at(null)),E=et(at(null)),I=et(at(Mn({dateObj:F.get(),weekStartsOn:e.weekStartsOn,locale:e.locale,fixedWeeks:e.fixedWeeks,numberOfMonths:e.numberOfMonths}))),_=et(Ze([I],([P])=>P.map(W=>W.value))),O=et(Ze([_],([P])=>W=>!P.some(te=>Jn(W,te)))),T=et(Ze([n.isDateDisabled,u,c],([P,W,te])=>oe=>!!(P!=null&&P(oe)||W&&mn(oe,W)||te&&vl(oe,te)))),ee=et(Ze([n.isDateUnavailable],([P])=>W=>!!(P!=null&&P(W)))),we=Ze([V,ee,T],([P,W,te])=>P?W(P)||te(P):!1),Se=Ze([M,ee,T],([P,W,te])=>P?W(P)||te(P):!1),Re=Ze([V,M,Se,we],([P,W,te,oe])=>!!(oe||te||W&&P&&mn(W,P))),G=et.derived([I,c,d],([P,W,te])=>{if(!W||!P.length)return!1;if(te)return!0;const Be=P[P.length-1].value.add({months:1}).set({day:1});return vl(Be,W)}),Oe=et.derived([I,u,d],([P,W,te])=>{if(!W||!P.length)return!1;if(te)return!0;const Be=P[0].value.subtract({months:1}).set({day:35});return mn(Be,W)});let Te=gr();const ye=et.derived([I,f],([P,W])=>{if(!P.length)return"";if(W!==p.getLocale()&&p.setLocale(W),P.length===1){const bt=Ft(P[0].value);return`${p.fullMonthAndYear(bt)}`}const te=Ft(P[0].value),oe=Ft(P[P.length-1].value),Be=p.fullMonth(te),ze=p.fullMonth(oe),Ue=p.fullYear(te),Xe=p.fullYear(oe);return Ue===Xe?`${Be} - ${ze} ${Xe}`:`${Be} ${Ue} - ${ze} ${Xe}`}),We=et.derived([ye,o],([P,W])=>`${W}, ${P}`),Ge=Qe(gn(),{stores:[We,Re,g.calendar,d,h],returned:([P,W,te,oe,Be])=>({id:te,role:"application","aria-label":P,"data-invalid":W?"":void 0,"data-disabled":oe?"":void 0,"data-readonly":Be?"":void 0}),action:P=>{j(P,We.get()),Te=gr();const W=ot(P,"keydown",dn);return{destroy(){W()}}}}),Q=Qe(gn("heading"),{stores:[d],returned:([P])=>({"aria-hidden":!0,"data-disabled":P?"":void 0})}),ut=Qe(gn("grid"),{stores:[h,d],returned:([P,W])=>({tabindex:-1,role:"grid","aria-readonly":P?"true":void 0,"aria-disabled":W?"true":void 0,"data-readonly":P?"":void 0,"data-disabled":W?"":void 0})}),dt=Qe(gn("prevButton"),{stores:[Oe],returned:([P])=>{const W=P;return{role:"button",type:"button","aria-label":"Previous","aria-disabled":W?"true":void 0,disabled:W?!0:void 0,"data-disabled":W?"":void 0}},action:P=>({destroy:jt(ot(P,"click",()=>{H()}))})}),Ve=Qe(gn("nextButton"),{stores:[G],returned:([P])=>{const W=P;return{role:"button",type:"button","aria-label":"Next","aria-disabled":W?"true":void 0,disabled:W?!0:void 0,"data-disabled":W?"":void 0}},action:P=>({destroy:jt(ot(P,"click",()=>{nt()}))})}),Lt=Ze([V],([P])=>W=>P?Mt(P,W):!1),Ot=Ze([M],([P])=>W=>P?Mt(P,W):!1),X=Ze([V,M],([P,W])=>te=>P&&Mt(P,te)||W&&Mt(W,te)?!0:W&&P?mr(te,P,W):!1),Nt=et.derived([V,M,S,T,ee],([P,W,te,oe,Be])=>{if(P&&W||!P||!te)return null;const ze=mn(P,te),Ue=ze?P:te,Xe=ze?te:P;return Mt(Ue.add({days:1}),Xe)?{start:Ue,end:Xe}:lf(Ue,Xe,Be,oe)?{start:Ue,end:Xe}:null}),J=Qe(gn("cell"),{stores:[X,Ot,Lt,Nt,T,ee,F,O],returned:([P,W,te,oe,Be,ze,Ue,Xe])=>(xe,bt)=>{const nn=Ft(xe),ln=Be(xe),Kl=ze(xe),ro=hs(xe,Ye()),qn=!Jn(xe,bt),Ql=Mt(xe,Ue),io=Xe(xe),Xl=P(xe),ao=te(xe),oo=W(xe),so=oe?mr(xe,oe.start,oe.end):!1;return{role:"button","aria-label":p.custom(nn,{weekday:"long",month:"long",day:"numeric",year:"numeric"}),"aria-selected":Xl?!0:void 0,"aria-disabled":qn||ln||Kl?!0:void 0,"data-selected":Xl?!0:void 0,"data-selection-start":ao?!0:void 0,"data-selection-end":oo?!0:void 0,"data-value":xe.toString(),"data-disabled":ln||qn?"":void 0,"data-unavailable":Kl?"":void 0,"data-today":ro?"":void 0,"data-outside-month":qn?"":void 0,"data-outside-visible-months":io?"":void 0,"data-focused":Ql?"":void 0,"data-highlighted":so?"":void 0,tabindex:Ql?0:qn||ln?void 0:-1}},action:P=>{const W=()=>{const oe=P.getAttribute("data-value"),Be=P.getAttribute("data-label"),ze=P.hasAttribute("data-disabled");return{value:oe,label:Be??P.textContent??null,disabled:!!ze}};return{destroy:jt(ot(P,"click",oe=>{const Be=W();Be.disabled||Be.value&&kt(oe,Pn(Be.value,F.get()))}),ot(P,"mouseenter",()=>{const oe=W();oe.disabled||oe.value&&S.set(Pn(oe.value,F.get()))}),ot(P,"focusin",()=>{const oe=W();oe.disabled||oe.value&&S.set(Pn(oe.value,F.get()))}))}}});ht([f],([P])=>{p.getLocale()!==P&&p.setLocale(P)}),ht([F],([P])=>{if(!St||!P||_.get().some(Xe=>Jn(Xe,P)))return;const te=a.get(),oe=f.get(),Be=s.get(),ze=r.get(),Ue={weekStartsOn:te,locale:oe,fixedWeeks:Be,numberOfMonths:ze};I.set(Mn({...Ue,dateObj:P}))}),ht([a,f,s,r],([P,W,te,oe])=>{const Be=F.get();if(!St||!Be)return;const ze={weekStartsOn:P,locale:W,fixedWeeks:te,numberOfMonths:oe};I.set(Mn({...ze,dateObj:Be}))}),ht([We],([P])=>{if(!St)return;const W=document.getElementById(g.accessibleHeading.get());it(W)&&(W.textContent=P)}),ht([V],([P])=>{P&&F.get()!==P&&F.set(P)});const ge=Ze([I,m,f],([P,W,te])=>P.length?P[0].weeks[0].map(oe=>p.dayOfWeek(Ft(oe),W)):[]);function j(P,W){if(!St)return;const te=document.createElement("div");te.style.cssText=un({border:"0px",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute","white-space":"nowrap",width:"1px"});const oe=document.createElement("div");oe.textContent=W,oe.id=g.accessibleHeading.get(),oe.role="heading",oe.ariaLevel="2",P.insertBefore(te,P.firstChild),te.appendChild(oe)}function nt(){const P=I.get(),W=r.get();if(i.get()){const te=P[0].value;F.set(te.add({months:W}))}else{const te=P[0].value,oe=Mn({dateObj:te.add({months:1}),weekStartsOn:a.get(),locale:f.get(),fixedWeeks:s.get(),numberOfMonths:W});I.set(oe),F.set(oe[0].value.set({day:1}))}}function H(){const P=I.get(),W=r.get();if(i.get()){const te=P[0].value;F.set(te.subtract({months:W}))}else{const te=P[0].value,oe=Mn({dateObj:te.subtract({months:1}),weekStartsOn:a.get(),locale:f.get(),fixedWeeks:s.get(),numberOfMonths:W});I.set(oe),F.set(oe[0].value.set({day:1}))}}function Me(){F.add({years:1})}function rt(){F.subtract({years:1})}const je=[pe.ARROW_DOWN,pe.ARROW_UP,pe.ARROW_LEFT,pe.ARROW_RIGHT];function Rt(P){F.setDate({year:P})}function He(P){if(P<0||P>11)throw new Error("Month must be between 0 and 11");F.setDate({month:P})}function kt(P,W){const te=T.get(),oe=ee.get();if(te(W)||oe(W))return;const Be=E.get();E.set(W);const ze=V.get(),Ue=M.get(),Xe=Nt.get();if(ze&&Xe===null){if(Mt(ze,W)&&!t.get()&&!Ue){V.set(void 0),F.set(W),Te.announce("Selected date is now empty.","polite");return}else if(!Ue){P.preventDefault(),Be&&Mt(Be,W)&&(V.set(W),Te.announce(`Selected Date: ${p.selectedDate(W,!1)}`,"polite"));return}}if(ze&&Ue&&Mt(Ue,W)&&!t.get()){V.set(void 0),M.set(void 0),F.set(W),Te.announce("Selected date is now empty.","polite");return}ze?Ue?Ue&&ze&&(M.set(void 0),V.update(()=>(Te.announce(`Selected Date: ${p.selectedDate(W,!1)}`,"polite"),W))):M.update(()=>(Te.announce(`Selected Dates: ${p.selectedDate(ze,!1)} to ${p.selectedDate(W,!1)}`,"polite"),W)):V.update(()=>(Te.announce(`Selected Date: ${p.selectedDate(W,!1)}`,"polite"),W))}const Vt=[pe.ENTER,pe.SPACE];function dn(P){const W=P.target;if(sf(W)&&!(!je.includes(P.key)&&!Vt.includes(P.key))&&(P.preventDefault(),P.key===pe.ARROW_DOWN&&hn(W,7),P.key===pe.ARROW_UP&&hn(W,-7),P.key===pe.ARROW_LEFT&&hn(W,-1),P.key===pe.ARROW_RIGHT&&hn(W,1),P.key===pe.SPACE||P.key===pe.ENTER)){const te=W.getAttribute("data-value");if(!te)return;kt(P,Pn(te,F.get()))}}function hn(P,W){const te=g.calendar.get(),oe=pl(te);if(!oe.length)return;const ze=oe.indexOf(P)+W;if(dl(ze,oe)){const Ue=oe[ze];return br(Ue,F),Ue.focus()}if(ze<0){if(Oe.get())return;const Xe=I.get()[0].value,xe=r.get();F.set(Xe.subtract({months:xe})),fn().then(()=>{const bt=pl(te);if(!bt.length)return;const nn=bt.length-Math.abs(ze);if(dl(nn,bt)){const ln=bt[nn];return br(ln,F),ln.focus()}})}if(ze>=oe.length){if(G.get())return;const Xe=I.get()[0].value,xe=r.get();F.set(Xe.add({months:xe})),fn().then(()=>{const bt=pl(te);if(!bt.length)return;const nn=ze-oe.length;if(dl(nn,bt))return bt[nn].focus()})}}const _t=Ze([T,F,u,c],([P,W,te,oe])=>Be=>!!(P(Be)||te&&mn(Be,te)||oe&&vl(Be,oe)||!Jn(Be,W)));return ht([L],([P])=>{const W=V.get(),te=M.get();if(P!=null&&P.start&&(P!=null&&P.end)){P.start!==W&&V.set(P.start),P.end!==te&&M.set(P.end);return}}),ht([V,M],([P,W])=>{const te=L.get();te&&(te==null?void 0:te.start)===P&&(te==null?void 0:te.end)===W||(P&&W?L.update(oe=>(oe==null?void 0:oe.start)===P&&(oe==null?void 0:oe.end)===W?oe:mn(W,P)?{start:W,end:P}:{start:P,end:W}):te&&te.start&&te.end&&L.set({start:void 0,end:void 0}))}),{elements:{calendar:Ge,heading:Q,grid:ut,cell:J,nextButton:Ve,prevButton:dt},states:{placeholder:F.toWritable(),months:I,weekdays:ge,headingValue:ye,value:L,startValue:V,endValue:M},helpers:{nextPage:nt,prevPage:H,nextYear:Me,prevYear:rt,setYear:Rt,setMonth:He,isDateDisabled:_t,isDateUnavailable:ee},options:n,ids:g}}function gf(l){const e=fs({...l,builder:"select"}),n=Ze(e.states.selected,t=>Array.isArray(t)?t.map(r=>r.label).join(", "):(t==null?void 0:t.label)??"");return{...e,elements:{...e.elements},states:{...e.states,selectedLabel:n}}}const _f=typeof document<"u";function bf(l){if(!_f)return;const e=l.querySelector("[data-selected]");if(e)return Cl(e);const n=l.querySelector("[data-today]");if(n)return Cl(n);const t=l.querySelector("[data-calendar-date]");if(t)return Cl(t)}function Cl(l){const e={x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop};l.focus(),window.scrollTo(e.x,e.y)}function yf(){return{NAME:"separator",PARTS:["root"]}}function vf(l){const{NAME:e,PARTS:n}=yf(),t=rl(e,n),r={...$o(il(l)),getAttrs:t};return{...r,updateOption:al(r.options)}}const kf=l=>({builder:l&4}),vr=l=>({builder:l[2]});function pf(l){let e,n,t,r=[l[2],l[4]],i={};for(let a=0;a{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Sf(l,e,n){let t;const r=["orientation","decorative","asChild","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{orientation:f="horizontal"}=e,{decorative:u=!0}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{root:h},updateOption:m,getAttrs:g}=vf({orientation:f,decorative:u});Pe(l,h,D=>n(7,a=D));const v=g("root");function p(D){Ae[D?"unshift":"push"](()=>{d=D,n(0,d)})}return l.$$set=D=>{e=A(A({},e),Ee(D)),n(4,i=$(e,r)),"orientation"in D&&n(5,f=D.orientation),"decorative"in D&&n(6,u=D.decorative),"asChild"in D&&n(1,c=D.asChild),"el"in D&&n(0,d=D.el),"$$scope"in D&&n(8,o=D.$$scope)},l.$$.update=()=>{l.$$.dirty&32&&m("orientation",f),l.$$.dirty&64&&m("decorative",u),l.$$.dirty&128&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,v)},[d,c,t,h,i,f,u,a,o,s,p]}let Ef=class extends he{constructor(e){super(),me(this,e,Sf,Df,de,{orientation:5,decorative:6,asChild:1,el:0})}};function xa(){return{NAME:"popover",PARTS:["arrow","close","content","trigger"]}}function Tf(l){const{NAME:e,PARTS:n}=xa(),t=rl(e,n),r={...cf({positioning:{placement:"bottom",gutter:0},...il(l),forceVisible:!0}),getAttrs:t};return jn(e,r),{...r,updateOption:al(r.options)}}function Yl(){const{NAME:l}=xa();return Un(l)}function Of(l){const n={...{side:"bottom",align:"center"},...l},{options:{positioning:t}}=Yl();Pa(t)(n)}const Mf=l=>({ids:l&1}),kr=l=>({ids:l[0]});function wf(l){let e;const n=l[13].default,t=ne(n,l,l[12],kr);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,[i]){t&&t.p&&(!e||i&4097)&&le(t,n,r,r[12],e?ie(n,r[12],i,Mf):re(r[12]),kr)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Pf(l,e,n){let t,{$$slots:r={},$$scope:i}=e,{disableFocusTrap:a=void 0}=e,{closeOnEscape:s=void 0}=e,{closeOnOutsideClick:o=void 0}=e,{preventScroll:f=void 0}=e,{portal:u=void 0}=e,{open:c=void 0}=e,{onOpenChange:d=void 0}=e,{openFocus:h=void 0}=e,{closeFocus:m=void 0}=e,{onOutsideClick:g=void 0}=e;const{updateOption:v,states:{open:p},ids:D}=Tf({disableFocusTrap:a,closeOnEscape:s,closeOnOutsideClick:o,preventScroll:f,portal:u,defaultOpen:c,openFocus:h,closeFocus:m,onOutsideClick:g,onOpenChange:({next:V})=>(c!==V&&(d==null||d(V),n(2,c=V)),V),positioning:{gutter:0,offset:{mainAxis:1}}}),L=Ze([D.content,D.trigger],([V,M])=>({content:V,trigger:M}));return Pe(l,L,V=>n(0,t=V)),l.$$set=V=>{"disableFocusTrap"in V&&n(3,a=V.disableFocusTrap),"closeOnEscape"in V&&n(4,s=V.closeOnEscape),"closeOnOutsideClick"in V&&n(5,o=V.closeOnOutsideClick),"preventScroll"in V&&n(6,f=V.preventScroll),"portal"in V&&n(7,u=V.portal),"open"in V&&n(2,c=V.open),"onOpenChange"in V&&n(8,d=V.onOpenChange),"openFocus"in V&&n(9,h=V.openFocus),"closeFocus"in V&&n(10,m=V.closeFocus),"onOutsideClick"in V&&n(11,g=V.onOutsideClick),"$$scope"in V&&n(12,i=V.$$scope)},l.$$.update=()=>{l.$$.dirty&4&&c!==void 0&&p.set(c),l.$$.dirty&8&&v("disableFocusTrap",a),l.$$.dirty&16&&v("closeOnEscape",s),l.$$.dirty&32&&v("closeOnOutsideClick",o),l.$$.dirty&64&&v("preventScroll",f),l.$$.dirty&128&&v("portal",u),l.$$.dirty&512&&v("openFocus",h),l.$$.dirty&1024&&v("closeFocus",m),l.$$.dirty&2048&&v("onOutsideClick",g)},[t,L,c,a,s,o,f,u,d,h,m,g,i,r]}class If extends he{constructor(e){super(),me(this,e,Pf,wf,de,{disableFocusTrap:3,closeOnEscape:4,closeOnOutsideClick:5,preventScroll:6,portal:7,open:2,onOpenChange:8,openFocus:9,closeFocus:10,onOutsideClick:11})}}const Af=l=>({builder:l[0]&256}),pr=l=>({builder:l[8]}),Lf=l=>({builder:l[0]&256}),Cr=l=>({builder:l[8]}),Nf=l=>({builder:l[0]&256}),Dr=l=>({builder:l[8]}),Rf=l=>({builder:l[0]&256}),Sr=l=>({builder:l[8]}),Vf=l=>({builder:l[0]&256}),Er=l=>({builder:l[8]}),Bf=l=>({builder:l[0]&256}),Tr=l=>({builder:l[8]});function Ff(l){let e,n,t,r;const i=l[27].default,a=ne(i,l,l[26],pr);let s=[l[8],l[12]],o={};for(let f=0;f{n=Cn(e,l[3],l[4]),n.start()})),t=!0)},o(u){k(s,u),t=!1},d(u){u&&b(e),s&&s.d(u),l[30](null),r=!1,i()}}}function jf(l){let e,n,t,r,i,a;const s=l[27].default,o=ne(s,l,l[26],Sr);let f=[l[8],l[12]],u={};for(let c=0;c{r&&(t&&t.end(1),n=Cn(e,l[3],l[4]),n.start())}),r=!0)},o(c){k(o,c),n&&n.invalidate(),c&&(t=tl(e,l[5],l[6])),r=!1},d(c){c&&b(e),o&&o.d(c),l[29](null),c&&t&&t.end(),i=!1,a()}}}function Uf(l){let e,n,t,r,i;const a=l[27].default,s=ne(a,l,l[26],Er);let o=[l[8],l[12]],f={};for(let u=0;u{t&&(n||(n=vt(e,l[1],l[2],!0)),n.run(1))}),t=!0)},o(u){k(s,u),u&&(n||(n=vt(e,l[1],l[2],!1)),n.run(0)),t=!1},d(u){u&&b(e),s&&s.d(u),l[28](null),u&&n&&n.end(),r=!1,i()}}}function Zf(l){let e;const n=l[27].default,t=ne(n,l,l[26],Tr);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i[0]&67109120)&&le(t,n,r,r[26],e?ie(n,r[26],i,Bf):re(r[26]),Tr)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Yf(l){let e,n,t,r;const i=[Zf,Uf,jf,zf,Wf,Ff],a=[];function s(o,f){return o[7]&&o[9]?0:o[1]&&o[9]?1:o[3]&&o[5]&&o[9]?2:o[3]&&o[9]?3:o[5]&&o[9]?4:o[9]?5:-1}return~(e=s(l))&&(n=a[e]=i[e](l)),{c(){n&&n.c(),t=K()},l(o){n&&n.l(o),t=K()},m(o,f){~e&&a[e].m(o,f),C(o,t,f),r=!0},p(o,f){let u=e;e=s(o),e===u?~e&&a[e].p(o,f):(n&&(ve(),k(a[u],1,1,()=>{a[u]=null}),ke()),~e?(n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t)):n=null)},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),~e&&a[e].d(o)}}}function qf(l,e,n){let t;const r=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let i=$(e,r),a,s,{$$slots:o={},$$scope:f}=e,{transition:u=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:h=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:g=void 0}=e,{asChild:v=!1}=e,{id:p=void 0}=e,{side:D="bottom"}=e,{align:L="center"}=e,{sideOffset:V=0}=e,{alignOffset:M=0}=e,{collisionPadding:x=8}=e,{avoidCollisions:F=!0}=e,{collisionBoundary:S=void 0}=e,{sameWidth:E=!1}=e,{fitViewport:I=!1}=e,{strategy:_="absolute"}=e,{overlap:O=!1}=e,{el:T=void 0}=e;const{elements:{content:ee},states:{open:we},ids:Se,getAttrs:Re}=Yl();Pe(l,ee,Q=>n(25,s=Q)),Pe(l,we,Q=>n(9,a=Q));const G=Re("content");function Oe(Q){Ae[Q?"unshift":"push"](()=>{T=Q,n(0,T)})}function Te(Q){Ae[Q?"unshift":"push"](()=>{T=Q,n(0,T)})}function ye(Q){Ae[Q?"unshift":"push"](()=>{T=Q,n(0,T)})}function We(Q){Ae[Q?"unshift":"push"](()=>{T=Q,n(0,T)})}function Ge(Q){Ae[Q?"unshift":"push"](()=>{T=Q,n(0,T)})}return l.$$set=Q=>{e=A(A({},e),Ee(Q)),n(12,i=$(e,r)),"transition"in Q&&n(1,u=Q.transition),"transitionConfig"in Q&&n(2,c=Q.transitionConfig),"inTransition"in Q&&n(3,d=Q.inTransition),"inTransitionConfig"in Q&&n(4,h=Q.inTransitionConfig),"outTransition"in Q&&n(5,m=Q.outTransition),"outTransitionConfig"in Q&&n(6,g=Q.outTransitionConfig),"asChild"in Q&&n(7,v=Q.asChild),"id"in Q&&n(13,p=Q.id),"side"in Q&&n(14,D=Q.side),"align"in Q&&n(15,L=Q.align),"sideOffset"in Q&&n(16,V=Q.sideOffset),"alignOffset"in Q&&n(17,M=Q.alignOffset),"collisionPadding"in Q&&n(18,x=Q.collisionPadding),"avoidCollisions"in Q&&n(19,F=Q.avoidCollisions),"collisionBoundary"in Q&&n(20,S=Q.collisionBoundary),"sameWidth"in Q&&n(21,E=Q.sameWidth),"fitViewport"in Q&&n(22,I=Q.fitViewport),"strategy"in Q&&n(23,_=Q.strategy),"overlap"in Q&&n(24,O=Q.overlap),"el"in Q&&n(0,T=Q.el),"$$scope"in Q&&n(26,f=Q.$$scope)},l.$$.update=()=>{l.$$.dirty[0]&8192&&p&&Se.content.set(p),l.$$.dirty[0]&33554432&&n(8,t=s),l.$$.dirty[0]&256&&Object.assign(t,G),l.$$.dirty[0]&33538560&&a&&Of({side:D,align:L,sideOffset:V,alignOffset:M,collisionPadding:x,avoidCollisions:F,collisionBoundary:S,sameWidth:E,fitViewport:I,strategy:_,overlap:O})},[T,u,c,d,h,m,g,v,t,a,ee,we,i,p,D,L,V,M,x,F,S,E,I,_,O,s,f,o,Oe,Te,ye,We,Ge]}let Hf=class extends he{constructor(e){super(),me(this,e,qf,Yf,de,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,side:14,align:15,sideOffset:16,alignOffset:17,collisionPadding:18,avoidCollisions:19,collisionBoundary:20,sameWidth:21,fitViewport:22,strategy:23,overlap:24,el:0},null,[-1,-1])}};const Jf=l=>({builder:l&4}),Or=l=>({builder:l[2]}),Gf=l=>({builder:l&4}),Mr=l=>({builder:l[2]});function Kf(l){let e,n,t,r;const i=l[12].default,a=ne(i,l,l[11],Or);let s=[l[2],{type:"button"},l[6]],o={};for(let f=0;f{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function xf(l,e,n){let t,r;const i=["asChild","id","el"];let a=$(e,i),s,o,{$$slots:f={},$$scope:u}=e,{asChild:c=!1}=e,{id:d=void 0}=e,{el:h=void 0}=e;const{elements:{trigger:m},states:{open:g},ids:v,getAttrs:p}=Yl();Pe(l,m,M=>n(9,s=M)),Pe(l,g,M=>n(10,o=M));const D=tn(),L=p("trigger");function V(M){Ae[M?"unshift":"push"](()=>{h=M,n(0,h)})}return l.$$set=M=>{e=A(A({},e),Ee(M)),n(6,a=$(e,i)),"asChild"in M&&n(1,c=M.asChild),"id"in M&&n(7,d=M.id),"el"in M&&n(0,h=M.el),"$$scope"in M&&n(11,u=M.$$scope)},l.$$.update=()=>{l.$$.dirty&128&&d&&v.trigger.set(d),l.$$.dirty&1024&&n(8,t={...L,"aria-controls":o?v.content:void 0}),l.$$.dirty&512&&n(2,r=s),l.$$.dirty&260&&Object.assign(r,t)},[h,c,r,m,g,D,a,d,t,s,o,u,f,V]}class $f extends he{constructor(e){super(),me(this,e,xf,Xf,de,{asChild:1,id:7,el:0})}}function $a(){return{NAME:"calendar",PARTS:["root","prev-button","next-button","heading","grid","day","header","grid-head","head-cell","grid-body","cell","grid-row"]}}function eu(l){const{NAME:e,PARTS:n}=$a(),t=rl(e,n),r={...mf(il(l)),getAttrs:t};return jn(e,r),{...r,updateOption:al(r.options)}}function Tt(){const{NAME:l}=$a();return Un(l)}const tu=l=>({builder:l[0]&4,months:l[0]&16,weekdays:l[0]&32,startValue:l[0]&8,endValue:l[0]&64}),wr=l=>({builder:l[2],months:l[4],weekdays:l[5],startValue:l[3],endValue:l[6]}),nu=l=>({builder:l[0]&4,months:l[0]&16,weekdays:l[0]&32,startValue:l[0]&8,endValue:l[0]&64}),Pr=l=>({builder:l[2],months:l[4],weekdays:l[5],startValue:l[3],endValue:l[6]});function lu(l){let e,n,t,r;const i=l[38].default,a=ne(i,l,l[37],wr);let s=[l[2],l[13]],o={};for(let f=0;f{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function au(l,e,n){let t;const r=["placeholder","onPlaceholderChange","value","onValueChange","preventDeselect","minValue","maxValue","pagedNavigation","weekStartsOn","locale","isDateUnavailable","isDateDisabled","disabled","readonly","fixedWeeks","calendarLabel","asChild","id","weekdayFormat","initialFocus","startValue","numberOfMonths","el"];let i=$(e,r),a,s,o,f,u,{$$slots:c={},$$scope:d}=e,{placeholder:h=void 0}=e,{onPlaceholderChange:m=void 0}=e,{value:g=void 0}=e,{onValueChange:v=void 0}=e,{preventDeselect:p=void 0}=e,{minValue:D=void 0}=e,{maxValue:L=void 0}=e,{pagedNavigation:V=void 0}=e,{weekStartsOn:M=void 0}=e,{locale:x=void 0}=e,{isDateUnavailable:F=void 0}=e,{isDateDisabled:S=void 0}=e,{disabled:E=void 0}=e,{readonly:I=void 0}=e,{fixedWeeks:_=void 0}=e,{calendarLabel:O=void 0}=e,{asChild:T=!1}=e,{id:ee=void 0}=e,{weekdayFormat:we=void 0}=e,{initialFocus:Se=!1}=e,{startValue:Re=void 0}=e,{numberOfMonths:G=void 0}=e,{el:Oe=void 0}=e;Il(()=>{!Se||!Oe||bf(Oe)});const{elements:{calendar:Te},states:{value:ye,placeholder:We,months:Ge,weekdays:Q,startValue:ut,endValue:dt},updateOption:Ve,ids:Lt,getAttrs:Ot}=eu({defaultPlaceholder:h,defaultValue:g,preventDeselect:p,minValue:D,maxValue:L,pagedNavigation:V,weekStartsOn:M,locale:x,isDateUnavailable:F,isDateDisabled:S,disabled:E,readonly:I,fixedWeeks:_,calendarLabel:O,weekdayFormat:we,numberOfMonths:G,onPlaceholderChange:({next:j})=>(h!==j&&(m==null||m(j),n(14,h=j)),j),onValueChange:({next:j})=>(g!==j&&(v==null||v(j),n(15,g=j)),j)});Pe(l,Te,j=>n(36,s=j)),Pe(l,Ge,j=>n(35,a=j)),Pe(l,Q,j=>n(5,f=j)),Pe(l,ut,j=>n(3,o=j)),Pe(l,dt,j=>n(6,u=j));const X=Ot("root"),Nt=tn();let J=a;function ge(j){Ae[j?"unshift":"push"](()=>{Oe=j,n(0,Oe)})}return l.$$set=j=>{e=A(A({},e),Ee(j)),n(13,i=$(e,r)),"placeholder"in j&&n(14,h=j.placeholder),"onPlaceholderChange"in j&&n(17,m=j.onPlaceholderChange),"value"in j&&n(15,g=j.value),"onValueChange"in j&&n(18,v=j.onValueChange),"preventDeselect"in j&&n(19,p=j.preventDeselect),"minValue"in j&&n(20,D=j.minValue),"maxValue"in j&&n(21,L=j.maxValue),"pagedNavigation"in j&&n(22,V=j.pagedNavigation),"weekStartsOn"in j&&n(23,M=j.weekStartsOn),"locale"in j&&n(24,x=j.locale),"isDateUnavailable"in j&&n(25,F=j.isDateUnavailable),"isDateDisabled"in j&&n(26,S=j.isDateDisabled),"disabled"in j&&n(27,E=j.disabled),"readonly"in j&&n(28,I=j.readonly),"fixedWeeks"in j&&n(29,_=j.fixedWeeks),"calendarLabel"in j&&n(30,O=j.calendarLabel),"asChild"in j&&n(1,T=j.asChild),"id"in j&&n(31,ee=j.id),"weekdayFormat"in j&&n(32,we=j.weekdayFormat),"initialFocus"in j&&n(33,Se=j.initialFocus),"startValue"in j&&n(16,Re=j.startValue),"numberOfMonths"in j&&n(34,G=j.numberOfMonths),"el"in j&&n(0,Oe=j.el),"$$scope"in j&&n(37,d=j.$$scope)},l.$$.update=()=>{l.$$.dirty[1]&1&&ee&&Lt.calendar.set(ee),l.$$.dirty[0]&8&&n(16,Re=o),l.$$.dirty[0]&32768&&g!==void 0&&ye.set(g),l.$$.dirty[0]&16384&&h!==void 0&&We.set(h),l.$$.dirty[0]&524288&&Ve("preventDeselect",p),l.$$.dirty[0]&1048576&&Ve("minValue",D),l.$$.dirty[0]&2097152&&Ve("maxValue",L),l.$$.dirty[0]&4194304&&Ve("pagedNavigation",V),l.$$.dirty[0]&8388608&&Ve("weekStartsOn",M),l.$$.dirty[0]&16777216&&Ve("locale",x),l.$$.dirty[0]&33554432&&Ve("isDateUnavailable",F),l.$$.dirty[0]&67108864&&Ve("isDateDisabled",S),l.$$.dirty[0]&134217728&&Ve("disabled",E),l.$$.dirty[0]&268435456&&Ve("readonly",I),l.$$.dirty[0]&536870912&&Ve("fixedWeeks",_),l.$$.dirty[0]&1073741824&&Ve("calendarLabel",O),l.$$.dirty[1]&2&&Ve("weekdayFormat",we),l.$$.dirty[1]&8&&Ve("numberOfMonths",G),l.$$.dirty[1]&32&&n(2,t=s),l.$$.dirty[0]&4&&Object.assign(t,X),l.$$.dirty[1]&16&&n(4,J=a)},[Oe,T,t,o,J,f,u,Te,Ge,Q,ut,dt,Nt,i,h,g,Re,m,v,p,D,L,V,M,x,F,S,E,I,_,O,ee,we,Se,G,a,s,d,c,ge]}let ou=class extends he{constructor(e){super(),me(this,e,au,iu,de,{placeholder:14,onPlaceholderChange:17,value:15,onValueChange:18,preventDeselect:19,minValue:20,maxValue:21,pagedNavigation:22,weekStartsOn:23,locale:24,isDateUnavailable:25,isDateDisabled:26,disabled:27,readonly:28,fixedWeeks:29,calendarLabel:30,asChild:1,id:31,weekdayFormat:32,initialFocus:33,startValue:16,numberOfMonths:34,el:0},null,[-1,-1])}};const su=l=>({builder:l&8,disabled:l&32,unavailable:l&16}),Ir=l=>({builder:l[3],disabled:l[5],unavailable:l[4]}),fu=l=>({builder:l&8,disabled:l&32,unavailable:l&16}),Ar=l=>({builder:l[3],disabled:l[5],unavailable:l[4]});function uu(l){let e,n,t,r;const i=l[16].default,a=ne(i,l,l[15],Ir),s=a||du(l);let o=[l[3],l[10]],f={};for(let u=0;u{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function mu(l,e,n){let t,r,i;const a=["date","month","asChild","el"];let s=$(e,a),o,f,u,{$$slots:c={},$$scope:d}=e,{date:h}=e,{month:m}=e,{asChild:g=!1}=e,{el:v=void 0}=e;const{elements:{cell:p},helpers:{isDateDisabled:D,isDateUnavailable:L},getAttrs:V}=Tt();Pe(l,p,S=>n(14,u=S)),Pe(l,D,S=>n(13,f=S)),Pe(l,L,S=>n(12,o=S));const M=V("day"),x=tn();function F(S){Ae[S?"unshift":"push"](()=>{v=S,n(0,v)})}return l.$$set=S=>{e=A(A({},e),Ee(S)),n(10,s=$(e,a)),"date"in S&&n(1,h=S.date),"month"in S&&n(11,m=S.month),"asChild"in S&&n(2,g=S.asChild),"el"in S&&n(0,v=S.el),"$$scope"in S&&n(15,d=S.$$scope)},l.$$.update=()=>{l.$$.dirty&18434&&n(3,t=u(h,m)),l.$$.dirty&8&&Object.assign(t,M),l.$$.dirty&8194&&n(5,r=f(h)),l.$$.dirty&4098&&n(4,i=o(h))},[v,h,g,t,i,r,p,D,L,x,s,m,o,f,u,d,c,F]}let gu=class extends he{constructor(e){super(),me(this,e,mu,hu,de,{date:1,month:11,asChild:2,el:0})}};const _u=l=>({builder:l&4}),Lr=l=>({builder:l[2]}),bu=l=>({builder:l&4}),Nr=l=>({builder:l[2]});function yu(l){let e,n,t,r;const i=l[7].default,a=ne(i,l,l[6],Lr);let s=[l[2],l[4]],o={};for(let f=0;f{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function pu(l,e,n){let t;const r=["asChild","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{asChild:f=!1}=e,{el:u=void 0}=e;const{elements:{grid:c},getAttrs:d}=Tt();Pe(l,c,g=>n(5,a=g));const h=d("grid");function m(g){Ae[g?"unshift":"push"](()=>{u=g,n(0,u)})}return l.$$set=g=>{e=A(A({},e),Ee(g)),n(4,i=$(e,r)),"asChild"in g&&n(1,f=g.asChild),"el"in g&&n(0,u=g.el),"$$scope"in g&&n(6,o=g.$$scope)},l.$$.update=()=>{l.$$.dirty&32&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,h)},[u,f,t,c,i,a,o,s,m]}let Cu=class extends he{constructor(e){super(),me(this,e,pu,ku,de,{asChild:1,el:0})}};const Du=l=>({}),Rr=l=>({attrs:l[2]});function Su(l){let e,n;const t=l[5].default,r=ne(t,l,l[4],null);let i=[l[3],l[2]],a={};for(let s=0;s{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Ou(l,e,n){const t=["asChild","el"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{asChild:s=!1}=e,{el:o=void 0}=e;const{getAttrs:f}=Tt(),u=f("grid-body");function c(d){Ae[d?"unshift":"push"](()=>{o=d,n(0,o)})}return l.$$set=d=>{e=A(A({},e),Ee(d)),n(3,r=$(e,t)),"asChild"in d&&n(1,s=d.asChild),"el"in d&&n(0,o=d.el),"$$scope"in d&&n(4,a=d.$$scope)},[o,s,u,r,a,i,c]}let Mu=class extends he{constructor(e){super(),me(this,e,Ou,Tu,de,{asChild:1,el:0})}};const wu=l=>({attrs:l&4}),Vr=l=>({attrs:l[2]}),Pu=l=>({attrs:l&4}),Br=l=>({attrs:l[2]});function Iu(l){let e,n;const t=l[10].default,r=ne(t,l,l[9],Vr);let i=[l[5],l[2]],a={};for(let s=0;s{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Nu(l,e,n){let t;const r=["date","asChild","el"];let i=$(e,r),a,s,{$$slots:o={},$$scope:f}=e,{date:u}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{helpers:{isDateDisabled:h,isDateUnavailable:m},getAttrs:g}=Tt();Pe(l,h,p=>n(8,s=p)),Pe(l,m,p=>n(7,a=p));function v(p){Ae[p?"unshift":"push"](()=>{d=p,n(0,d)})}return l.$$set=p=>{e=A(A({},e),Ee(p)),n(5,i=$(e,r)),"date"in p&&n(6,u=p.date),"asChild"in p&&n(1,c=p.asChild),"el"in p&&n(0,d=p.el),"$$scope"in p&&n(9,f=p.$$scope)},l.$$.update=()=>{l.$$.dirty&448&&n(2,t={...g("cell"),"aria-disabled":s(u)||a(u),role:"gridcell"})},[d,c,t,h,m,i,u,a,s,f,o,v]}let Ru=class extends he{constructor(e){super(),me(this,e,Nu,Lu,de,{date:6,asChild:1,el:0})}};const Vu=l=>({}),Fr=l=>({attrs:l[2]});function Bu(l){let e,n;const t=l[5].default,r=ne(t,l,l[4],null);let i=[l[3],l[2]],a={};for(let s=0;s{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function zu(l,e,n){const t=["asChild","el"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{asChild:s=!1}=e,{el:o=void 0}=e;const{getAttrs:f}=Tt(),u={...f("grid-head"),"aria-hidden":!0};function c(d){Ae[d?"unshift":"push"](()=>{o=d,n(0,o)})}return l.$$set=d=>{e=A(A({},e),Ee(d)),n(3,r=$(e,t)),"asChild"in d&&n(1,s=d.asChild),"el"in d&&n(0,o=d.el),"$$scope"in d&&n(4,a=d.$$scope)},[o,s,u,r,a,i,c]}let ju=class extends he{constructor(e){super(),me(this,e,zu,Wu,de,{asChild:1,el:0})}};const Uu=l=>({}),Wr=l=>({attrs:l[2]});function Zu(l){let e,n;const t=l[5].default,r=ne(t,l,l[4],null);let i=[l[3],l[2]],a={};for(let s=0;s{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Hu(l,e,n){const t=["asChild","el"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{asChild:s=!1}=e,{el:o=void 0}=e;const{getAttrs:f}=Tt(),u=f("head-cell");function c(d){Ae[d?"unshift":"push"](()=>{o=d,n(0,o)})}return l.$$set=d=>{e=A(A({},e),Ee(d)),n(3,r=$(e,t)),"asChild"in d&&n(1,s=d.asChild),"el"in d&&n(0,o=d.el),"$$scope"in d&&n(4,a=d.$$scope)},[o,s,u,r,a,i,c]}let Ju=class extends he{constructor(e){super(),me(this,e,Hu,qu,de,{asChild:1,el:0})}};const Gu=l=>({}),zr=l=>({attrs:l[2]}),Ku=l=>({}),jr=l=>({attrs:l[2]});function Qu(l){let e,n;const t=l[5].default,r=ne(t,l,l[4],zr);let i=[l[3],l[2]],a={};for(let s=0;s{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function $u(l,e,n){const t=["asChild","el"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{asChild:s=!1}=e,{el:o=void 0}=e;const{getAttrs:f}=Tt(),u=f("grid-row");function c(d){Ae[d?"unshift":"push"](()=>{o=d,n(0,o)})}return l.$$set=d=>{e=A(A({},e),Ee(d)),n(3,r=$(e,t)),"asChild"in d&&n(1,s=d.asChild),"el"in d&&n(0,o=d.el),"$$scope"in d&&n(4,a=d.$$scope)},[o,s,u,r,a,i,c]}let ec=class extends he{constructor(e){super(),me(this,e,$u,xu,de,{asChild:1,el:0})}};const tc=l=>({}),Ur=l=>({attrs:l[2]}),nc=l=>({}),Zr=l=>({attrs:l[2]});function lc(l){let e,n;const t=l[5].default,r=ne(t,l,l[4],Ur);let i=[l[3],l[2]],a={};for(let s=0;s{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function ac(l,e,n){const t=["asChild","el"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{asChild:s=!1}=e,{el:o=void 0}=e;const{getAttrs:f}=Tt(),u=f("header");function c(d){Ae[d?"unshift":"push"](()=>{o=d,n(0,o)})}return l.$$set=d=>{e=A(A({},e),Ee(d)),n(3,r=$(e,t)),"asChild"in d&&n(1,s=d.asChild),"el"in d&&n(0,o=d.el),"$$scope"in d&&n(4,a=d.$$scope)},[o,s,u,r,a,i,c]}let oc=class extends he{constructor(e){super(),me(this,e,ac,ic,de,{asChild:1,el:0})}};const sc=l=>({builder:l&4,headingValue:l&8}),Yr=l=>({builder:l[2],headingValue:l[3]}),fc=l=>({builder:l&4,headingValue:l&8}),qr=l=>({builder:l[2],headingValue:l[3]});function uc(l){let e,n,t,r;const i=l[9].default,a=ne(i,l,l[8],Yr),s=a||dc(l);let o=[l[2],l[6]],f={};for(let u=0;u{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function mc(l,e,n){let t;const r=["asChild","el"];let i=$(e,r),a,s,{$$slots:o={},$$scope:f}=e,{asChild:u=!1}=e,{el:c=void 0}=e;const{elements:{heading:d},states:{headingValue:h},getAttrs:m}=Tt();Pe(l,d,p=>n(7,a=p)),Pe(l,h,p=>n(3,s=p));const g=m("heading");function v(p){Ae[p?"unshift":"push"](()=>{c=p,n(0,c)})}return l.$$set=p=>{e=A(A({},e),Ee(p)),n(6,i=$(e,r)),"asChild"in p&&n(1,u=p.asChild),"el"in p&&n(0,c=p.el),"$$scope"in p&&n(8,f=p.$$scope)},l.$$.update=()=>{l.$$.dirty&128&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,g)},[c,u,t,s,d,h,i,a,f,o,v]}let gc=class extends he{constructor(e){super(),me(this,e,mc,hc,de,{asChild:1,el:0})}};const _c=l=>({builder:l&4}),Hr=l=>({builder:l[2]}),bc=l=>({builder:l&4}),Jr=l=>({builder:l[2]});function yc(l){let e,n,t,r;const i=l[8].default,a=ne(i,l,l[7],Hr);let s=[l[2],{type:"button"},l[5]],o={};for(let f=0;f{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function pc(l,e,n){let t;const r=["asChild","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{asChild:f=!1}=e,{el:u=void 0}=e;const{elements:{nextButton:c},getAttrs:d}=Tt();Pe(l,c,v=>n(6,a=v));const h=d("next-button"),m=tn();function g(v){Ae[v?"unshift":"push"](()=>{u=v,n(0,u)})}return l.$$set=v=>{e=A(A({},e),Ee(v)),n(5,i=$(e,r)),"asChild"in v&&n(1,f=v.asChild),"el"in v&&n(0,u=v.el),"$$scope"in v&&n(7,o=v.$$scope)},l.$$.update=()=>{l.$$.dirty&64&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,h)},[u,f,t,c,m,i,a,o,s,g]}let Cc=class extends he{constructor(e){super(),me(this,e,pc,kc,de,{asChild:1,el:0})}};const Dc=l=>({builder:l&4}),Gr=l=>({builder:l[2]}),Sc=l=>({builder:l&4}),Kr=l=>({builder:l[2]});function Ec(l){let e,n,t,r;const i=l[8].default,a=ne(i,l,l[7],Gr);let s=[l[2],{type:"button"},l[5]],o={};for(let f=0;f{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Mc(l,e,n){let t;const r=["asChild","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{asChild:f=!1}=e,{el:u=void 0}=e;const{elements:{prevButton:c},getAttrs:d}=Tt();Pe(l,c,v=>n(6,a=v));const h=d("prev-button"),m=tn();function g(v){Ae[v?"unshift":"push"](()=>{u=v,n(0,u)})}return l.$$set=v=>{e=A(A({},e),Ee(v)),n(5,i=$(e,r)),"asChild"in v&&n(1,f=v.asChild),"el"in v&&n(0,u=v.el),"$$scope"in v&&n(7,o=v.$$scope)},l.$$.update=()=>{l.$$.dirty&64&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,h)},[u,f,t,c,m,i,a,o,s,g]}let wc=class extends he{constructor(e){super(),me(this,e,Mc,Oc,de,{asChild:1,el:0})}};function sl(){return{NAME:"select",GROUP_NAME:"select-group",ITEM_NAME:"select-item",PARTS:["arrow","content","group","item","indicator","input","label","trigger","value"]}}function Dn(){const{NAME:l}=sl();return Un(l)}function Pc(l){const{NAME:e,PARTS:n}=sl(),t=rl(e,n),r={...gf({...il(l),forceVisible:!0}),getAttrs:t};return jn(e,r),{...r,updateOption:al(r.options)}}function Ic(l){const{ITEM_NAME:e}=sl(),n=Dn();return jn(e,l),n}function Ac(){const{ITEM_NAME:l}=sl(),{helpers:{isSelected:e},getAttrs:n}=Dn();return{value:Un(l),isSelected:e,getAttrs:n}}function Lc(l){const n={...{side:"bottom",align:"center",sameWidth:!0},...l},{options:{positioning:t}}=Dn();Pa(t)(n)}const Nc=l=>({ids:l&1}),Qr=l=>({ids:l[0]});function Rc(l){let e;const n=l[19].default,t=ne(n,l,l[18],Qr);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,[i]){t&&t.p&&(!e||i&262145)&&le(t,n,r,r[18],e?ie(n,r[18],i,Nc):re(r[18]),Qr)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Vc(l,e,n){let t,{$$slots:r={},$$scope:i}=e,{required:a=void 0}=e,{disabled:s=void 0}=e,{preventScroll:o=void 0}=e,{loop:f=void 0}=e,{closeOnEscape:u=void 0}=e,{closeOnOutsideClick:c=void 0}=e,{portal:d=void 0}=e,{name:h=void 0}=e,{multiple:m=!1}=e,{selected:g=void 0}=e,{onSelectedChange:v=void 0}=e,{open:p=void 0}=e,{onOpenChange:D=void 0}=e,{items:L=[]}=e,{onOutsideClick:V=void 0}=e,{typeahead:M=void 0}=e;const{states:{open:x,selected:F},updateOption:S,ids:E}=Pc({required:a,disabled:s,preventScroll:o,loop:f,closeOnEscape:u,closeOnOutsideClick:c,portal:d,name:h,onOutsideClick:V,multiple:m,forceVisible:!0,defaultSelected:Array.isArray(g)?[...g]:g,defaultOpen:p,onSelectedChange:({next:_})=>Array.isArray(_)?((!Array.isArray(g)||!ns(g,_))&&(v==null||v(_),n(2,g=_)),_):(g!==_&&(v==null||v(_),n(2,g=_)),_),onOpenChange:({next:_})=>(p!==_&&(D==null||D(_),n(3,p=_)),_),items:L,typeahead:M}),I=Ze([E.menu,E.trigger,E.label],([_,O,T])=>({menu:_,trigger:O,label:T}));return Pe(l,I,_=>n(0,t=_)),l.$$set=_=>{"required"in _&&n(4,a=_.required),"disabled"in _&&n(5,s=_.disabled),"preventScroll"in _&&n(6,o=_.preventScroll),"loop"in _&&n(7,f=_.loop),"closeOnEscape"in _&&n(8,u=_.closeOnEscape),"closeOnOutsideClick"in _&&n(9,c=_.closeOnOutsideClick),"portal"in _&&n(10,d=_.portal),"name"in _&&n(11,h=_.name),"multiple"in _&&n(12,m=_.multiple),"selected"in _&&n(2,g=_.selected),"onSelectedChange"in _&&n(13,v=_.onSelectedChange),"open"in _&&n(3,p=_.open),"onOpenChange"in _&&n(14,D=_.onOpenChange),"items"in _&&n(15,L=_.items),"onOutsideClick"in _&&n(16,V=_.onOutsideClick),"typeahead"in _&&n(17,M=_.typeahead),"$$scope"in _&&n(18,i=_.$$scope)},l.$$.update=()=>{l.$$.dirty&8&&p!==void 0&&x.set(p),l.$$.dirty&4&&g!==void 0&&F.set(Array.isArray(g)?[...g]:g),l.$$.dirty&16&&S("required",a),l.$$.dirty&32&&S("disabled",s),l.$$.dirty&64&&S("preventScroll",o),l.$$.dirty&128&&S("loop",f),l.$$.dirty&256&&S("closeOnEscape",u),l.$$.dirty&512&&S("closeOnOutsideClick",c),l.$$.dirty&1024&&S("portal",d),l.$$.dirty&2048&&S("name",h),l.$$.dirty&4096&&S("multiple",m),l.$$.dirty&65536&&S("onOutsideClick",V),l.$$.dirty&131072&&S("typeahead",M)},[t,I,g,p,a,s,o,f,u,c,d,h,m,v,D,L,V,M,i,r]}class Bc extends he{constructor(e){super(),me(this,e,Vc,Rc,de,{required:4,disabled:5,preventScroll:6,loop:7,closeOnEscape:8,closeOnOutsideClick:9,portal:10,name:11,multiple:12,selected:2,onSelectedChange:13,open:3,onOpenChange:14,items:15,onOutsideClick:16,typeahead:17})}}const Fc=l=>({builder:l[0]&256}),Xr=l=>({builder:l[8]}),Wc=l=>({builder:l[0]&256}),xr=l=>({builder:l[8]}),zc=l=>({builder:l[0]&256}),$r=l=>({builder:l[8]}),jc=l=>({builder:l[0]&256}),ei=l=>({builder:l[8]}),Uc=l=>({builder:l[0]&256}),ti=l=>({builder:l[8]}),Zc=l=>({builder:l[0]&256}),ni=l=>({builder:l[8]});function Yc(l){let e,n,t,r;const i=l[28].default,a=ne(i,l,l[27],Xr);let s=[l[8],l[13]],o={};for(let f=0;f{n=Cn(e,l[3],l[4]),n.start()})),t=!0)},o(u){k(s,u),t=!1},d(u){u&&b(e),s&&s.d(u),l[36](null),r=!1,ft(i)}}}function Jc(l){let e,n,t,r,i,a;const s=l[28].default,o=ne(s,l,l[27],ei);let f=[l[8],l[13]],u={};for(let c=0;c{r&&(t&&t.end(1),n=Cn(e,l[3],l[4]),n.start())}),r=!0)},o(c){k(o,c),n&&n.invalidate(),c&&(t=tl(e,l[5],l[6])),r=!1},d(c){c&&b(e),o&&o.d(c),l[35](null),c&&t&&t.end(),i=!1,ft(a)}}}function Gc(l){let e,n,t,r,i;const a=l[28].default,s=ne(a,l,l[27],ti);let o=[l[8],l[13]],f={};for(let u=0;u{t&&(n||(n=vt(e,l[1],l[2],!0)),n.run(1))}),t=!0)},o(u){k(s,u),u&&(n||(n=vt(e,l[1],l[2],!1)),n.run(0)),t=!1},d(u){u&&b(e),s&&s.d(u),l[34](null),u&&n&&n.end(),r=!1,ft(i)}}}function Kc(l){let e;const n=l[28].default,t=ne(n,l,l[27],ni);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i[0]&134217984)&&le(t,n,r,r[27],e?ie(n,r[27],i,Zc):re(r[27]),ni)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Qc(l){let e,n,t,r;const i=[Kc,Gc,Jc,Hc,qc,Yc],a=[];function s(o,f){return o[7]&&o[9]?0:o[1]&&o[9]?1:o[3]&&o[5]&&o[9]?2:o[3]&&o[9]?3:o[5]&&o[9]?4:o[9]?5:-1}return~(e=s(l))&&(n=a[e]=i[e](l)),{c(){n&&n.c(),t=K()},l(o){n&&n.l(o),t=K()},m(o,f){~e&&a[e].m(o,f),C(o,t,f),r=!0},p(o,f){let u=e;e=s(o),e===u?~e&&a[e].p(o,f):(n&&(ve(),k(a[u],1,1,()=>{a[u]=null}),ke()),~e?(n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t)):n=null)},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),~e&&a[e].d(o)}}}function Xc(l,e,n){let t;const r=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let i=$(e,r),a,s,{$$slots:o={},$$scope:f}=e,{transition:u=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:h=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:g=void 0}=e,{asChild:v=!1}=e,{id:p=void 0}=e,{side:D="bottom"}=e,{align:L="center"}=e,{sideOffset:V=0}=e,{alignOffset:M=0}=e,{collisionPadding:x=8}=e,{avoidCollisions:F=!0}=e,{collisionBoundary:S=void 0}=e,{sameWidth:E=!0}=e,{fitViewport:I=!1}=e,{strategy:_="absolute"}=e,{overlap:O=!1}=e,{el:T=void 0}=e;const{elements:{menu:ee},states:{open:we},ids:Se,getAttrs:Re}=Dn();Pe(l,ee,X=>n(26,s=X)),Pe(l,we,X=>n(9,a=X));const G=tn(),Oe=Re("content");function Te(X){st.call(this,l,X)}function ye(X){st.call(this,l,X)}function We(X){st.call(this,l,X)}function Ge(X){st.call(this,l,X)}function Q(X){st.call(this,l,X)}function ut(X){Ae[X?"unshift":"push"](()=>{T=X,n(0,T)})}function dt(X){Ae[X?"unshift":"push"](()=>{T=X,n(0,T)})}function Ve(X){Ae[X?"unshift":"push"](()=>{T=X,n(0,T)})}function Lt(X){Ae[X?"unshift":"push"](()=>{T=X,n(0,T)})}function Ot(X){Ae[X?"unshift":"push"](()=>{T=X,n(0,T)})}return l.$$set=X=>{e=A(A({},e),Ee(X)),n(13,i=$(e,r)),"transition"in X&&n(1,u=X.transition),"transitionConfig"in X&&n(2,c=X.transitionConfig),"inTransition"in X&&n(3,d=X.inTransition),"inTransitionConfig"in X&&n(4,h=X.inTransitionConfig),"outTransition"in X&&n(5,m=X.outTransition),"outTransitionConfig"in X&&n(6,g=X.outTransitionConfig),"asChild"in X&&n(7,v=X.asChild),"id"in X&&n(14,p=X.id),"side"in X&&n(15,D=X.side),"align"in X&&n(16,L=X.align),"sideOffset"in X&&n(17,V=X.sideOffset),"alignOffset"in X&&n(18,M=X.alignOffset),"collisionPadding"in X&&n(19,x=X.collisionPadding),"avoidCollisions"in X&&n(20,F=X.avoidCollisions),"collisionBoundary"in X&&n(21,S=X.collisionBoundary),"sameWidth"in X&&n(22,E=X.sameWidth),"fitViewport"in X&&n(23,I=X.fitViewport),"strategy"in X&&n(24,_=X.strategy),"overlap"in X&&n(25,O=X.overlap),"el"in X&&n(0,T=X.el),"$$scope"in X&&n(27,f=X.$$scope)},l.$$.update=()=>{l.$$.dirty[0]&16384&&p&&Se.menu.set(p),l.$$.dirty[0]&67108864&&n(8,t=s),l.$$.dirty[0]&256&&Object.assign(t,Oe),l.$$.dirty[0]&67076608&&a&&Lc({side:D,align:L,sideOffset:V,alignOffset:M,collisionPadding:x,avoidCollisions:F,collisionBoundary:S,sameWidth:E,fitViewport:I,strategy:_,overlap:O})},[T,u,c,d,h,m,g,v,t,a,ee,we,G,i,p,D,L,V,M,x,F,S,E,I,_,O,s,f,o,Te,ye,We,Ge,Q,ut,dt,Ve,Lt,Ot]}let xc=class extends he{constructor(e){super(),me(this,e,Xc,Qc,de,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,strategy:24,overlap:25,el:0},null,[-1,-1])}};const $c=l=>({builder:l&16,isSelected:l&32}),li=l=>({builder:l[4],isSelected:l[5]}),ed=l=>({builder:l&16,isSelected:l&32}),ri=l=>({builder:l[4],isSelected:l[5]});function td(l){let e,n,t,r;const i=l[14].default,a=ne(i,l,l[13],li),s=a||ld(l);let o=[l[4],l[9]],f={};for(let u=0;u{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function id(l,e,n){let t,r;const i=["value","disabled","label","asChild","el"];let a=$(e,i),s,o,{$$slots:f={},$$scope:u}=e,{value:c}=e,{disabled:d=void 0}=e,{label:h=void 0}=e,{asChild:m=!1}=e,{el:g=void 0}=e;const{elements:{option:v},helpers:{isSelected:p},getAttrs:D}=Ic(c);Pe(l,v,I=>n(12,o=I)),Pe(l,p,I=>n(11,s=I));const L=tn(),V=D("item");function M(I){st.call(this,l,I)}function x(I){st.call(this,l,I)}function F(I){st.call(this,l,I)}function S(I){st.call(this,l,I)}function E(I){Ae[I?"unshift":"push"](()=>{g=I,n(0,g)})}return l.$$set=I=>{e=A(A({},e),Ee(I)),n(9,a=$(e,i)),"value"in I&&n(1,c=I.value),"disabled"in I&&n(10,d=I.disabled),"label"in I&&n(2,h=I.label),"asChild"in I&&n(3,m=I.asChild),"el"in I&&n(0,g=I.el),"$$scope"in I&&n(13,u=I.$$scope)},l.$$.update=()=>{l.$$.dirty&5126&&n(4,t=o({value:c,disabled:d,label:h})),l.$$.dirty&16&&Object.assign(t,V),l.$$.dirty&2050&&n(5,r=s(c))},[g,c,h,m,t,r,v,p,L,a,d,s,o,u,f,M,x,F,S,E]}let ad=class extends he{constructor(e){super(),me(this,e,id,rd,de,{value:1,disabled:10,label:2,asChild:3,el:0})}};const od=l=>({isSelected:l&4}),ii=l=>({attrs:l[5],isSelected:l[2](l[4])}),sd=l=>({isSelected:l&4}),ai=l=>({attrs:l[5],isSelected:l[2](l[4])});function fd(l){let e,n=l[2](l[4]),t,r=n&&oi(l),i=[l[6],l[5]],a={};for(let s=0;s{r=null}),ke()),be(e,a=Ce(i,[o&64&&s[6],s[5]]))},i(s){t||(y(r),t=!0)},o(s){k(r),t=!1},d(s){s&&b(e),r&&r.d(),l[9](null)}}}function ud(l){let e;const n=l[8].default,t=ne(n,l,l[7],ai);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&132)&&le(t,n,r,r[7],e?ie(n,r[7],i,sd):re(r[7]),ai)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function oi(l){let e;const n=l[8].default,t=ne(n,l,l[7],ii);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&132)&&le(t,n,r,r[7],e?ie(n,r[7],i,od):re(r[7]),ii)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function cd(l){let e,n,t,r;const i=[ud,fd],a=[];function s(o,f){return o[1]?0:1}return e=s(l),n=a[e]=i[e](l),{c(){n.c(),t=K()},l(o){n.l(o),t=K()},m(o,f){a[e].m(o,f),C(o,t,f),r=!0},p(o,[f]){let u=e;e=s(o),e===u?a[e].p(o,f):(ve(),k(a[u],1,1,()=>{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function dd(l,e,n){const t=["asChild","el"];let r=$(e,t),i,{$$slots:a={},$$scope:s}=e,{asChild:o=!1}=e,{el:f=void 0}=e;const{isSelected:u,value:c,getAttrs:d}=Ac();Pe(l,u,g=>n(2,i=g));const h=d("indicator");function m(g){Ae[g?"unshift":"push"](()=>{f=g,n(0,f)})}return l.$$set=g=>{e=A(A({},e),Ee(g)),n(6,r=$(e,t)),"asChild"in g&&n(1,o=g.asChild),"el"in g&&n(0,f=g.el),"$$scope"in g&&n(7,s=g.$$scope)},[f,o,i,u,c,h,r,s,a,m]}class hd extends he{constructor(e){super(),me(this,e,dd,cd,de,{asChild:1,el:0})}}const md=l=>({builder:l&4}),si=l=>({builder:l[2]}),gd=l=>({builder:l&4}),fi=l=>({builder:l[2]});function _d(l){let e,n,t,r;const i=l[9].default,a=ne(i,l,l[8],si);let s=[l[2],{type:"button"},l[5]],o={};for(let f=0;f{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function vd(l,e,n){let t;const r=["asChild","id","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{asChild:f=!1}=e,{id:u=void 0}=e,{el:c=void 0}=e;const{elements:{trigger:d},ids:h,getAttrs:m}=Dn();Pe(l,d,D=>n(7,a=D));const g=tn(),v=m("trigger");function p(D){Ae[D?"unshift":"push"](()=>{c=D,n(0,c)})}return l.$$set=D=>{e=A(A({},e),Ee(D)),n(5,i=$(e,r)),"asChild"in D&&n(1,f=D.asChild),"id"in D&&n(6,u=D.id),"el"in D&&n(0,c=D.el),"$$scope"in D&&n(8,o=D.$$scope)},l.$$.update=()=>{l.$$.dirty&64&&u&&h.trigger.set(u),l.$$.dirty&128&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,v)},[c,f,t,d,g,i,u,a,o,s,p]}let ql=class extends he{constructor(e){super(),me(this,e,vd,yd,de,{asChild:1,id:6,el:0})}};const kd=l=>({label:l&8}),ui=l=>({label:l[3],attrs:l[5]});function pd(l){let e,n=(l[3]||l[1])+"",t,r,i=[l[6],l[5],{"data-placeholder":r=l[3]?void 0:""}],a={};for(let s=0;s{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Sd(l,e,n){let t;const r=["placeholder","asChild","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{placeholder:f=""}=e,{asChild:u=!1}=e,{el:c=void 0}=e;const{states:{selectedLabel:d},getAttrs:h}=Dn();Pe(l,d,v=>n(7,a=v));const m=h("value");function g(v){Ae[v?"unshift":"push"](()=>{c=v,n(0,c)})}return l.$$set=v=>{e=A(A({},e),Ee(v)),n(6,i=$(e,r)),"placeholder"in v&&n(1,f=v.placeholder),"asChild"in v&&n(2,u=v.asChild),"el"in v&&n(0,c=v.el),"$$scope"in v&&n(8,o=v.$$scope)},l.$$.update=()=>{l.$$.dirty&128&&n(3,t=a)},[c,f,u,t,d,m,i,a,o,s,g]}class Ed extends he{constructor(e){super(),me(this,e,Sd,Dd,de,{placeholder:1,asChild:2,el:0})}}function Td(l){let e,n;const t=l[2].default,r=ne(t,l,l[1],null);return{c(){e=N("div"),r&&r.c(),this.h()},l(i){e=R(i,"DIV",{class:!0});var a=B(e);r&&r.l(a),a.forEach(b),this.h()},h(){w(e,"class","contents"),tt(e,"print:hidden",l[0])},m(i,a){C(i,e,a),r&&r.m(e,null),n=!0},p(i,[a]){r&&r.p&&(!n||a&2)&&le(r,t,i,i[1],n?ie(t,i[1],a,null):re(i[1]),null),(!n||a&1)&&tt(e,"print:hidden",i[0])},i(i){n||(y(r,i),n=!0)},o(i){k(r,i),n=!1},d(i){i&&b(e),r&&r.d(i)}}}function Od(l,e,n){let{$$slots:t={},$$scope:r}=e,{enabled:i=!0}=e;return l.$$set=a=>{"enabled"in a&&n(0,i=a.enabled),"$$scope"in a&&n(1,r=a.$$scope)},[i,r,t]}class Md extends he{constructor(e){super(),me(this,e,Od,Td,de,{enabled:0})}}function wd(l){let e;const n=l[6].default,t=ne(n,l,l[7],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&128)&&le(t,n,r,r[7],e?ie(n,r[7],i,null):re(r[7]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Pd(l){let e,n;const t=[{transition:l[1]},{transitionConfig:l[2]},{align:l[3]},{sideOffset:l[4]},l[5],{class:Le("z-50 w-72 rounded-md border bg-white p-4 text-gray-900 shadow-md outline-none",l[0])}];let r={$$slots:{default:[wd]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(d)),n(5,r=$(e,t)),"class"in d&&n(0,s=d.class),"transition"in d&&n(1,o=d.transition),"transitionConfig"in d&&n(2,f=d.transitionConfig),"align"in d&&n(3,u=d.align),"sideOffset"in d&&n(4,c=d.sideOffset),"$$scope"in d&&n(7,a=d.$$scope)},[s,o,f,u,c,r,i,a]}class Ad extends he{constructor(e){super(),me(this,e,Id,Pd,de,{class:0,transition:1,transitionConfig:2,align:3,sideOffset:4})}}const Ld=If,Nd=$f;function Rd(l){let e,n;const t=[{class:Le("shrink-0 bg-gray-200",l[1]==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",l[0])},{orientation:l[1]},{decorative:l[2]},l[3]];let r={};for(let i=0;i{e=A(A({},e),Ee(o)),n(3,r=$(e,t)),"class"in o&&n(0,i=o.class),"orientation"in o&&n(1,a=o.orientation),"decorative"in o&&n(2,s=o.decorative)},[i,a,s,r]}class Hl extends he{constructor(e){super(),me(this,e,Vd,Rd,de,{class:0,orientation:1,decorative:2})}}function Bd(l){let e,n;return e=new nl({props:{src:Do,class:"h-4 w-4"}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p:ae,i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Fd(l){let e,n,t,r;n=new hd({props:{$$slots:{default:[Bd]},$$scope:{ctx:l}}});const i=l[5].default,a=ne(i,l,l[9],null);return{c(){e=N("span"),U(n.$$.fragment),t=se(),a&&a.c(),this.h()},l(s){e=R(s,"SPAN",{class:!0});var o=B(e);Z(n.$$.fragment,o),o.forEach(b),t=fe(s),a&&a.l(s),this.h()},h(){w(e,"class","absolute right-2 flex h-3.5 w-3.5 items-center justify-center")},m(s,o){C(s,e,o),Y(n,e,null),C(s,t,o),a&&a.m(s,o),r=!0},p(s,o){const f={};o&512&&(f.$$scope={dirty:o,ctx:s}),n.$set(f),a&&a.p&&(!r||o&512)&&le(a,i,s,s[9],r?ie(i,s[9],o,null):re(s[9]),null)},i(s){r||(y(n.$$.fragment,s),y(a,s),r=!0)},o(s){k(n.$$.fragment,s),k(a,s),r=!1},d(s){s&&(b(e),b(t)),q(n),a&&a.d(s)}}}function Wd(l){let e,n;const t=[{value:l[1]},{disabled:l[3]},{label:l[2]},{class:Le("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-gray-100 data-[disabled]:opacity-50",l[0])},l[4]];let r={$$slots:{default:[Fd]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(m)),n(4,r=$(e,t)),"class"in m&&n(0,s=m.class),"value"in m&&n(1,o=m.value),"label"in m&&n(2,f=m.label),"disabled"in m&&n(3,u=m.disabled),"$$scope"in m&&n(9,a=m.$$scope)},[s,o,f,u,r,i,c,d,h,a]}class Sn extends he{constructor(e){super(),me(this,e,zd,Wd,de,{class:0,value:1,label:2,disabled:3})}}function jd(l){let e,n;const t=l[7].default,r=ne(t,l,l[8],null);return{c(){e=N("div"),r&&r.c(),this.h()},l(i){e=R(i,"DIV",{class:!0});var a=B(e);r&&r.l(a),a.forEach(b),this.h()},h(){w(e,"class","w-full p-1")},m(i,a){C(i,e,a),r&&r.m(e,null),n=!0},p(i,a){r&&r.p&&(!n||a&256)&&le(r,t,i,i[8],n?ie(t,i[8],a,null):re(i[8]),null)},i(i){n||(y(r,i),n=!0)},o(i){k(r,i),n=!1},d(i){i&&b(e),r&&r.d(i)}}}function Ud(l){let e,n;const t=[{inTransition:l[2]},{inTransitionConfig:l[3]},{outTransition:l[4]},{outTransitionConfig:l[5]},{sideOffset:l[1]},{class:Le("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-white text-gray-900 shadow-md focus:outline-none",l[0])},l[6]];let r={$$slots:{default:[jd]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(h)),n(6,r=$(e,t)),"class"in h&&n(0,s=h.class),"sideOffset"in h&&n(1,o=h.sideOffset),"inTransition"in h&&n(2,f=h.inTransition),"inTransitionConfig"in h&&n(3,u=h.inTransitionConfig),"outTransition"in h&&n(4,c=h.outTransition),"outTransitionConfig"in h&&n(5,d=h.outTransitionConfig),"$$scope"in h&&n(8,a=h.$$scope)},[s,o,f,u,c,d,r,i,a]}class fl extends he{constructor(e){super(),me(this,e,Zd,Ud,de,{class:0,sideOffset:1,inTransition:2,inTransitionConfig:3,outTransition:4,outTransitionConfig:5})}}function Yd(l){let e,n,t,r;const i=l[2].default,a=ne(i,l,l[3],null);return t=new nl({props:{src:Eo,class:"h-4 w-4"}}),{c(){a&&a.c(),e=se(),n=N("div"),U(t.$$.fragment)},l(s){a&&a.l(s),e=fe(s),n=R(s,"DIV",{});var o=B(n);Z(t.$$.fragment,o),o.forEach(b)},m(s,o){a&&a.m(s,o),C(s,e,o),C(s,n,o),Y(t,n,null),r=!0},p(s,o){a&&a.p&&(!r||o&8)&&le(a,i,s,s[3],r?ie(i,s[3],o,null):re(s[3]),null)},i(s){r||(y(a,s),y(t.$$.fragment,s),r=!0)},o(s){k(a,s),k(t.$$.fragment,s),r=!1},d(s){s&&(b(e),b(n)),a&&a.d(s),q(t)}}}function qd(l){let e,n;const t=[{class:Le("border-input flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-white placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-gray-400 disabled:cursor-not-allowed disabled:opacity-50",l[0])},l[1]];let r={$$slots:{default:[Yd]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class Jd extends he{constructor(e){super(),me(this,e,Hd,qd,de,{class:0})}}const Ml=Bc,eo=Ed;function ci(l,e,n){const t=l.slice();return t[23]=e[n],t}function di(l,e,n){const t=l.slice();return t[26]=e[n],t}function hi(l,e,n){const t=l.slice();return t[29]=e[n],t}function mi(l,e,n){const t=l.slice();return t[32]=e[n],t}function gi(l,e,n){const t=l.slice();return t[1]=e[n].value,t[35]=e[n].label,t}function _i(l,e,n){const t=l.slice();return t[1]=e[n].value,t[35]=e[n].label,t}function Gd(l){let e,n;return e=new eo({props:{placeholder:"Select month"}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p:ae,i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Kd(l){let e=l[35]+"",n,t;return{c(){n=ue(e),t=se()},l(r){n=ce(r,e),t=fe(r)},m(r,i){C(r,n,i),C(r,t,i)},p:ae,d(r){r&&(b(n),b(t))}}}function bi(l){let e,n;return e=new Sn({props:{value:l[1],label:l[35],$$slots:{default:[Kd]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r[1]&512&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Qd(l){let e,n,t=Ne(l[11]),r=[];for(let a=0;ak(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;ak(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;ak(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;ak(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;ak(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;ak(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;a({21:h,22:m}),({months:h,weekdays:m})=>[(h?2097152:0)|(m?4194304:0)]]},$$scope:{ctx:l}};for(let h=0;hzt(e,"value",o)),Ae.push(()=>zt(e,"placeholder",f)),Ae.push(()=>zt(e,"startValue",u)),Ae.push(()=>zt(e,"selectedDateRange",c)),e.$on("keydown",l[19]),{c(){U(e.$$.fragment)},l(h){Z(e.$$.fragment,h)},m(h,m){Y(e,h,m),a=!0},p(h,m){const g=m[0]&4336?Ce(s,[m[0]&32&&{minValue:h[5]},m[0]&64&&{maxValue:h[6]},m[0]&16&&{weekdayFormat:h[4]},m[0]&128&&{class:Le("p-3",h[7])},m[0]&4096&&qe(h[12])]):{};m[0]&6293249|m[1]&512&&(g.$$scope={dirty:m,ctx:h}),!n&&m[0]&2&&(n=!0,g.value=h[1],Wt(()=>n=!1)),!t&&m[0]&1&&(t=!0,g.placeholder=h[0],Wt(()=>t=!1)),!r&&m[0]&8&&(r=!0,g.startValue=h[3],Wt(()=>r=!1)),!i&&m[0]&4&&(i=!0,g.selectedDateRange=h[2],Wt(()=>i=!1)),e.$set(g)},i(h){a||(y(e.$$.fragment,h),a=!0)},o(h){k(e.$$.fragment,h),a=!1},d(h){q(e,h)}}}function mh(l,e,n){let t,r,i;const a=["value","placeholder","selectedDateRange","weekdayFormat","startValue","minValue","maxValue","class"];let s=$(e,a),{value:o=void 0}=e,{placeholder:f=void 0}=e,{selectedDateRange:u=void 0}=e,{weekdayFormat:c="short"}=e,{startValue:d=void 0}=e,{minValue:h=void 0}=e,{maxValue:m=void 0}=e,{class:g=void 0}=e;const v=["January","February","March","April","May","June","July","August","September","October","November","December"].map((E,I)=>({value:I+1,label:E})),p=new Ct("en-US",{month:"long"}),D=E=>{!E||!f||E.value!==(f==null?void 0:f.month)&&n(0,f=f.set({month:E.value}))},L=E=>{!E||!f||E.value!==(f==null?void 0:f.year)&&n(0,f=f.set({year:E.value}))};function V(E){o=E,n(1,o)}function M(E){f=E,n(0,f)}function x(E){d=E,n(3,d)}function F(E){u=E,n(2,u)}function S(E){st.call(this,l,E)}return l.$$set=E=>{e=A(A({},e),Ee(E)),n(12,s=$(e,a)),"value"in E&&n(1,o=E.value),"placeholder"in E&&n(0,f=E.placeholder),"selectedDateRange"in E&&n(2,u=E.selectedDateRange),"weekdayFormat"in E&&n(4,c=E.weekdayFormat),"startValue"in E&&n(3,d=E.startValue),"minValue"in E&&n(5,h=E.minValue),"maxValue"in E&&n(6,m=E.maxValue),"class"in E&&n(7,g=E.class)},l.$$.update=()=>{l.$$.dirty[0]&96&&n(10,t=Array.from({length:100},(E,I)=>({label:String(new Date().getFullYear()-I),value:new Date().getFullYear()-I})).filter(({value:E})=>!((h==null?void 0:h.year)>E||E>(m==null?void 0:m.year)))),l.$$.dirty[0]&1&&n(9,r=f?{value:f.year,label:String(f.year)}:void 0),l.$$.dirty[0]&1&&n(8,i=f?{value:f.month,label:p.format(f.toDate(Ye()))}:void 0)},[f,o,u,d,c,h,m,g,i,r,t,v,s,D,L,V,M,x,F,S]}class gh extends he{constructor(e){super(),me(this,e,mh,hh,de,{value:1,placeholder:0,selectedDateRange:2,weekdayFormat:4,startValue:3,minValue:5,maxValue:6,class:7},null,[-1,-1])}}function _h(l){let e;const n=l[3].default,t=ne(n,l,l[4],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&16)&&le(t,n,r,r[4],e?ie(n,r[4],i,null):re(r[4]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function bh(l){let e,n;const t=[{date:l[0]},{class:Le("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-gray-100 first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md [&:has([data-selected][data-outside-month])]:bg-gray-100/50 [&:has([data-selected][data-selection-end])]:rounded-r-md",l[1])},l[2]];let r={$$slots:{default:[_h]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(f)),n(2,r=$(e,t)),"date"in f&&n(0,s=f.date),"class"in f&&n(1,o=f.class),"$$scope"in f&&n(4,a=f.$$scope)},[s,o,r,i,a]}class vh extends he{constructor(e){super(),me(this,e,yh,bh,de,{date:0,class:1})}}const kh=l=>({disabled:l&128,unavailable:l&256,builder:l&512}),Di=l=>({disabled:l[7],unavailable:l[8],builder:l[9]});function ph(l){let e=l[0].day+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r&1&&e!==(e=t[0].day+"")&&De(n,e)},d(t){t&&b(n)}}}function Ch(l){let e;const n=l[4].default,t=ne(n,l,l[6],Di),r=t||ph(l);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,a){r&&r.m(i,a),e=!0},p(i,a){t?t.p&&(!e||a&960)&&le(t,n,i,i[6],e?ie(n,i[6],a,kh):re(i[6]),Di):r&&r.p&&(!e||a&1)&&r.p(i,e?a:-1)},i(i){e||(y(r,i),e=!0)},o(i){k(r,i),e=!1},d(i){r&&r.d(i)}}}function Dh(l){let e,n;const t=[{date:l[0]},{month:l[1]},{class:Le(vn({variant:"ghost"}),"h-8 w-8 p-0 font-normal data-[selected]:opacity-100","[&[data-today]:not([data-selected])]:border [&[data-today]:not([data-selected])]:border-dashed [&[data-today]:not([data-selected])]:text-gray-900","data-[selection-start]:bg-gray-900 data-[selection-start]:text-white data-[selection-start]:hover:bg-gray-900 data-[selection-start]:hover:text-white data-[selection-start]:focus:bg-gray-900 data-[selection-start]:focus:text-white","data-[selection-end]:bg-gray-900 data-[selection-end]:text-white data-[selection-end]:hover:bg-gray-900 data-[selection-end]:hover:text-white data-[selection-end]:focus:bg-gray-900 data-[selection-end]:focus:text-white","data-[outside-month]:pointer-events-none data-[outside-month]:text-gray-500 data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:bg-gray-100/50 [&[data-outside-month][data-selected]]:text-gray-500 [&[data-outside-month][data-selected]]:opacity-30","data-[disabled]:text-gray-500 data-[disabled]:opacity-50","data-[unavailable]:text-red-50 data-[unavailable]:line-through",l[2])},l[3]];let r={$$slots:{default:[Ch,({disabled:i,unavailable:a,builder:s})=>({7:i,8:a,9:s}),({disabled:i,unavailable:a,builder:s})=>(i?128:0)|(a?256:0)|(s?512:0)]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(c)),n(3,r=$(e,t)),"date"in c&&n(0,s=c.date),"month"in c&&n(1,o=c.month),"class"in c&&n(2,f=c.class),"$$scope"in c&&n(6,a=c.$$scope)},[s,o,f,r,i,u,a]}class Eh extends he{constructor(e){super(),me(this,e,Sh,Dh,de,{date:0,month:1,class:2})}}function Th(l){let e;const n=l[2].default,t=ne(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&le(t,n,r,r[3],e?ie(n,r[3],i,null):re(r[3]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Oh(l){let e,n;const t=[{class:Le("w-full border-collapse space-y-1",l[0])},l[1]];let r={$$slots:{default:[Th]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class wh extends he{constructor(e){super(),me(this,e,Mh,Oh,de,{class:0})}}function Ph(l){let e;const n=l[2].default,t=ne(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&le(t,n,r,r[3],e?ie(n,r[3],i,null):re(r[3]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Ih(l){let e,n;const t=[{class:Le("flex justify-between pt-1 relative items-center w-full",l[0])},l[1]];let r={$$slots:{default:[Ph]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class Lh extends he{constructor(e){super(),me(this,e,Ah,Ih,de,{class:0})}}function Nh(l){let e,n,t;const r=l[3].default,i=ne(r,l,l[2],null);let a=[{class:n=Le("flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0 mt-4",l[0])},l[1]],s={};for(let o=0;o{e=A(A({},e),Ee(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(2,a=o.$$scope)},[s,r,a,i]}class Vh extends he{constructor(e){super(),me(this,e,Rh,Nh,de,{class:0})}}function Bh(l){let e;const n=l[2].default,t=ne(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&le(t,n,r,r[3],e?ie(n,r[3],i,null):re(r[3]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Fh(l){let e,n;const t=[{class:Le("flex",l[0])},l[1]];let r={$$slots:{default:[Bh]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class to extends he{constructor(e){super(),me(this,e,Wh,Fh,de,{class:0})}}const zh=l=>({headingValue:l&16}),Si=l=>({headingValue:l[4]});function jh(l){let e=l[4]+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r&16&&e!==(e=t[4]+"")&&De(n,e)},d(t){t&&b(n)}}}function Uh(l){let e;const n=l[2].default,t=ne(n,l,l[3],Si),r=t||jh(l);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,a){r&&r.m(i,a),e=!0},p(i,a){t?t.p&&(!e||a&24)&&le(t,n,i,i[3],e?ie(n,i[3],a,zh):re(i[3]),Si):r&&r.p&&(!e||a&16)&&r.p(i,e?a:-1)},i(i){e||(y(r,i),e=!0)},o(i){k(r,i),e=!1},d(i){r&&r.d(i)}}}function Zh(l){let e,n;const t=[{class:Le("text-sm font-medium",l[0])},l[1]];let r={$$slots:{default:[Uh,({headingValue:i})=>({4:i}),({headingValue:i})=>i?16:0]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class qh extends he{constructor(e){super(),me(this,e,Yh,Zh,de,{class:0})}}function Hh(l){let e;const n=l[2].default,t=ne(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&le(t,n,r,r[3],e?ie(n,r[3],i,null):re(r[3]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Jh(l){let e,n;const t=[{class:Le(l[0])},l[1]];let r={$$slots:{default:[Hh]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class Kh extends he{constructor(e){super(),me(this,e,Gh,Jh,de,{class:0})}}function Qh(l){let e;const n=l[2].default,t=ne(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&le(t,n,r,r[3],e?ie(n,r[3],i,null):re(r[3]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Xh(l){let e,n;const t=[{class:Le(l[0])},l[1]];let r={$$slots:{default:[Qh]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class $h extends he{constructor(e){super(),me(this,e,xh,Xh,de,{class:0})}}function em(l){let e;const n=l[2].default,t=ne(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&le(t,n,r,r[3],e?ie(n,r[3],i,null):re(r[3]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function tm(l){let e,n;const t=[{class:Le("w-8 rounded-md text-[0.8rem] font-normal text-gray-500",l[0])},l[1]];let r={$$slots:{default:[em]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class lm extends he{constructor(e){super(),me(this,e,nm,tm,de,{class:0})}}const rm=l=>({builder:l&32}),Ei=l=>({builder:l[5]});function im(l){let e,n;return e=new nl({props:{src:To,class:"h-4 w-4"}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p:ae,i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function am(l){let e;const n=l[2].default,t=ne(n,l,l[4],Ei),r=t||im();return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,a){r&&r.m(i,a),e=!0},p(i,a){t&&t.p&&(!e||a&48)&&le(t,n,i,i[4],e?ie(n,i[4],a,rm):re(i[4]),Ei)},i(i){e||(y(r,i),e=!0)},o(i){k(r,i),e=!1},d(i){r&&r.d(i)}}}function om(l){let e,n;const t=[{class:Le(vn({variant:"ghost"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",l[0])},l[1]];let r={$$slots:{default:[am,({builder:i})=>({5:i}),({builder:i})=>i?32:0]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(f)),n(1,r=$(e,t)),"class"in f&&n(0,s=f.class),"$$scope"in f&&n(4,a=f.$$scope)},[s,r,i,o,a]}class fm extends he{constructor(e){super(),me(this,e,sm,om,de,{class:0})}}const um=l=>({builder:l&32}),Ti=l=>({builder:l[5]});function cm(l){let e,n;return e=new nl({props:{src:Oo,class:"h-4 w-4"}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p:ae,i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function dm(l){let e;const n=l[2].default,t=ne(n,l,l[4],Ti),r=t||cm();return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,a){r&&r.m(i,a),e=!0},p(i,a){t&&t.p&&(!e||a&48)&&le(t,n,i,i[4],e?ie(n,i[4],a,um):re(i[4]),Ti)},i(i){e||(y(r,i),e=!0)},o(i){k(r,i),e=!1},d(i){r&&r.d(i)}}}function hm(l){let e,n;const t=[{class:Le(vn({variant:"ghost"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",l[0])},l[1]];let r={$$slots:{default:[dm,({builder:i})=>({5:i}),({builder:i})=>i?32:0]},$$scope:{ctx:l}};for(let i=0;i{e=A(A({},e),Ee(f)),n(1,r=$(e,t)),"class"in f&&n(0,s=f.class),"$$scope"in f&&n(4,a=f.$$scope)},[s,r,i,o,a]}class gm extends he{constructor(e){super(),me(this,e,mm,hm,de,{class:0})}}function Oi(l,e,n){const t=l.slice();return t[23]=e[n],t}function Mi(l,e,n){const t=l.slice();return t[23]=e[n],t}function wi(l,e,n){const t=l.slice();return t[23]=e[n],t}function Pi(l,e,n){const t=l.slice();return t[23]=e[n],t}function _m(l){let e;return{c(){e=ue("Date Range")},l(n){e=ce(n,"Date Range")},m(n,t){C(n,e,t)},p:ae,d(n){n&&b(e)}}}function bm(l){let e=l[7].format(l[6].toDate(Ye()))+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&64&&e!==(e=t[7].format(t[6].toDate(Ye()))+"")&&De(n,e)},d(t){t&&b(n)}}}function ym(l){let e;function n(i,a){return i[0].end?pm:km}let t=n(l),r=t(l);return{c(){r.c(),e=K()},l(i){r.l(i),e=K()},m(i,a){r.m(i,a),C(i,e,a)},p(i,a){t===(t=n(i))&&r?r.p(i,a):(r.d(1),r=t(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&b(e),r.d(i)}}}function vm(l){let e;return{c(){e=ue("Loading...")},l(n){e=ce(n,"Loading...")},m(n,t){C(n,e,t)},p:ae,d(n){n&&b(e)}}}function km(l){let e=l[7].format(l[0].start.toDate(Ye()))+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&1&&e!==(e=t[7].format(t[0].start.toDate(Ye()))+"")&&De(n,e)},d(t){t&&b(n)}}}function pm(l){let e=l[7].format(l[0].start.toDate(Ye()))+"",n,t,r=l[7].format(l[0].end.toDate(Ye()))+"",i;return{c(){n=ue(e),t=ue(" - "),i=ue(r)},l(a){n=ce(a,e),t=ce(a," - "),i=ce(a,r)},m(a,s){C(a,n,s),C(a,t,s),C(a,i,s)},p(a,s){s[0]&1&&e!==(e=a[7].format(a[0].start.toDate(Ye()))+"")&&De(n,e),s[0]&1&&r!==(r=a[7].format(a[0].end.toDate(Ye()))+"")&&De(i,r)},d(a){a&&(b(n),b(t),b(i))}}}function Cm(l){let e;return{c(){e=ue("Date Range")},l(n){e=ce(n,"Date Range")},m(n,t){C(n,e,t)},p:ae,d(n){n&&b(e)}}}function Dm(l){let e=l[8].format(l[6].toDate(Ye()))+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&64&&e!==(e=t[8].format(t[6].toDate(Ye()))+"")&&De(n,e)},d(t){t&&b(n)}}}function Sm(l){let e;function n(i,a){return i[0].end?Om:Tm}let t=n(l),r=t(l);return{c(){r.c(),e=K()},l(i){r.l(i),e=K()},m(i,a){r.m(i,a),C(i,e,a)},p(i,a){t===(t=n(i))&&r?r.p(i,a):(r.d(1),r=t(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&b(e),r.d(i)}}}function Em(l){let e;return{c(){e=ue("Loading...")},l(n){e=ce(n,"Loading...")},m(n,t){C(n,e,t)},p:ae,d(n){n&&b(e)}}}function Tm(l){let e=l[8].format(l[0].start.toDate(Ye()))+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&1&&e!==(e=t[8].format(t[0].start.toDate(Ye()))+"")&&De(n,e)},d(t){t&&b(n)}}}function Om(l){let e=l[8].format(l[0].start.toDate(Ye()))+"",n,t,r=l[8].format(l[0].end.toDate(Ye()))+"",i;return{c(){n=ue(e),t=ue(" - "),i=ue(r)},l(a){n=ce(a,e),t=ce(a," - "),i=ce(a,r)},m(a,s){C(a,n,s),C(a,t,s),C(a,i,s)},p(a,s){s[0]&1&&e!==(e=a[8].format(a[0].start.toDate(Ye()))+"")&&De(n,e),s[0]&1&&r!==(r=a[8].format(a[0].end.toDate(Ye()))+"")&&De(i,r)},d(a){a&&(b(n),b(t),b(i))}}}function Mm(l){let e,n,t;function r(u,c){return u[1]?u[0]&&u[0].start?ym:u[6]?bm:_m:vm}let i=r(l),a=i(l);function s(u,c){return u[1]?u[0]&&u[0].start?Sm:u[6]?Dm:Cm:Em}let o=s(l),f=o(l);return{c(){e=N("span"),a.c(),n=se(),t=N("span"),f.c(),this.h()},l(u){e=R(u,"SPAN",{class:!0});var c=B(e);a.l(c),c.forEach(b),n=fe(u),t=R(u,"SPAN",{class:!0});var d=B(t);f.l(d),d.forEach(b),this.h()},h(){w(e,"class","hidden sm:inline"),w(t,"class","sm:hidden")},m(u,c){C(u,e,c),a.m(e,null),C(u,n,c),C(u,t,c),f.m(t,null)},p(u,c){i===(i=r(u))&&a?a.p(u,c):(a.d(1),a=i(u),a&&(a.c(),a.m(e,null))),o===(o=s(u))&&f?f.p(u,c):(f.d(1),f=o(u),f&&(f.c(),f.m(t,null)))},d(u){u&&(b(e),b(n),b(t)),a.d(),f.d()}}}function wm(l){let e,n;return e=new es({props:{variant:"outline",size:"sm",class:Le("flex justify-start rounded-r-none border-r-0 text-left font-normal",!l[0]&&"text-gray-400"),builders:[l[32]],disabled:!l[1],$$slots:{default:[Mm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r[0]&1&&(i.class=Le("flex justify-start rounded-r-none border-r-0 text-left font-normal",!t[0]&&"text-gray-400")),r[1]&2&&(i.builders=[t[32]]),r[0]&2&&(i.disabled=!t[1]),r[0]&67|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Pm(l){let e,n,t,r;function i(o){l[16](o)}function a(o){l[17](o)}let s={initialFocus:!0,numberOfMonths:1,onValueChange:l[15],minValue:l[4],maxValue:l[3]};return l[0]!==void 0&&(s.selectedDateRange=l[0]),l[6]!==void 0&&(s.placeholder=l[6]),e=new gh({props:s}),Ae.push(()=>zt(e,"selectedDateRange",i)),Ae.push(()=>zt(e,"placeholder",a)),{c(){U(e.$$.fragment)},l(o){Z(e.$$.fragment,o)},m(o,f){Y(e,o,f),r=!0},p(o,f){const u={};f[0]&5&&(u.onValueChange=o[15]),f[0]&16&&(u.minValue=o[4]),f[0]&8&&(u.maxValue=o[3]),!n&&f[0]&1&&(n=!0,u.selectedDateRange=o[0],Wt(()=>n=!1)),!t&&f[0]&64&&(t=!0,u.placeholder=o[6],Wt(()=>t=!1)),e.$set(u)},i(o){r||(y(e.$$.fragment,o),r=!0)},o(o){k(e.$$.fragment,o),r=!1},d(o){q(e,o)}}}function Im(l){let e,n,t,r;return e=new Nd({props:{asChild:!0,$$slots:{default:[wm,({builder:i})=>({32:i}),({builder:i})=>[0,i?2:0]]},$$scope:{ctx:l}}}),t=new Ad({props:{class:"w-auto select-none p-0",align:"start",$$slots:{default:[Pm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment),n=se(),U(t.$$.fragment)},l(i){Z(e.$$.fragment,i),n=fe(i),Z(t.$$.fragment,i)},m(i,a){Y(e,i,a),C(i,n,a),Y(t,i,a),r=!0},p(i,a){const s={};a[0]&67|a[1]&6&&(s.$$scope={dirty:a,ctx:i}),e.$set(s);const o={};a[0]&93|a[1]&4&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(y(e.$$.fragment,i),y(t.$$.fragment,i),r=!0)},o(i){k(e.$$.fragment,i),k(t.$$.fragment,i),r=!1},d(i){i&&b(n),q(e,i),q(t,i)}}}function Am(l){let e,n="Select a Range",t,r,i="Range";return{c(){e=N("span"),e.textContent=n,t=se(),r=N("span"),r.textContent=i,this.h()},l(a){e=R(a,"SPAN",{class:!0,"data-svelte-h":!0}),At(e)!=="svelte-13biyvu"&&(e.textContent=n),t=fe(a),r=R(a,"SPAN",{class:!0,"data-svelte-h":!0}),At(r)!=="svelte-1a1txje"&&(r.textContent=i),this.h()},h(){w(e,"class","hidden sm:inline"),w(r,"class","sm:hidden")},m(a,s){C(a,e,s),C(a,t,s),C(a,r,s)},p:ae,d(a){a&&(b(e),b(t),b(r))}}}function Lm(l){let e=l[2].label+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&4&&e!==(e=t[2].label+"")&&De(n,e)},d(t){t&&b(n)}}}function Nm(l){let e;function n(i,a){return i[2]?Lm:Am}let t=n(l),r=t(l);return{c(){r.c(),e=K()},l(i){r.l(i),e=K()},m(i,a){r.m(i,a),C(i,e,a)},p(i,a){t===(t=n(i))&&r?r.p(i,a):(r.d(1),r=t(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&b(e),r.d(i)}}}function Rm(l){let e,n;return e=new fl({props:{$$slots:{default:[Ym]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r[0]&32|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Vm(l){let e,n;return e=new fl({props:{class:"text-sm text-center",$$slots:{default:[qm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Bm(l){let e=l[23].label+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&32&&e!==(e=t[23].label+"")&&De(n,e)},d(t){t&&b(n)}}}function Ii(l){let e,n;return e=new Sn({props:{value:l[23].range,label:l[23].label,class:"text-xs",$$slots:{default:[Bm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r[0]&32&&(i.value=t[23].range),r[0]&32&&(i.label=t[23].label),r[0]&32|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Fm(l){let e,n;return e=new Hl({props:{orientation:"horizontal"}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Wm(l){let e=l[23].label+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&32&&e!==(e=t[23].label+"")&&De(n,e)},d(t){t&&b(n)}}}function Ai(l){let e,n;return e=new Sn({props:{value:l[23].range,label:l[23].label,class:"text-xs",$$slots:{default:[Wm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r[0]&32&&(i.value=t[23].range),r[0]&32&&(i.label=t[23].label),r[0]&32|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function zm(l){let e,n;return e=new Hl({props:{orientation:"horizontal"}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function jm(l){let e=l[23].label+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&32&&e!==(e=t[23].label+"")&&De(n,e)},d(t){t&&b(n)}}}function Li(l){let e,n;return e=new Sn({props:{value:l[23].range,label:l[23].label,class:"text-xs",$$slots:{default:[jm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r[0]&32&&(i.value=t[23].range),r[0]&32&&(i.label=t[23].label),r[0]&32|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Um(l){let e,n;return e=new Hl({props:{orientation:"horizontal"}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Zm(l){let e=l[23].label+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&32&&e!==(e=t[23].label+"")&&De(n,e)},d(t){t&&b(n)}}}function Ni(l){let e,n;return e=new Sn({props:{value:l[23].range,label:l[23].label,class:"text-xs",$$slots:{default:[Zm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r[0]&32&&(i.value=t[23].range),r[0]&32&&(i.label=t[23].label),r[0]&32|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Ym(l){let e,n=l[9]("Months"),t,r,i=l[9]("Last"),a,s,o=l[9]("To Date"),f,u,c,d=Ne(l[5].filter(Ri)),h=[];for(let _=0;_k(h[_],1,1,()=>{h[_]=null});let g=n&&Fm(),v=Ne(l[5].filter(Vi)),p=[];for(let _=0;_k(p[_],1,1,()=>{p[_]=null});let L=i&&zm(),V=Ne(l[5].filter(Bi)),M=[];for(let _=0;_k(M[_],1,1,()=>{M[_]=null});let F=o&&Um(),S=Ne(l[5].filter(Fi)),E=[];for(let _=0;_k(E[_],1,1,()=>{E[_]=null});return{c(){for(let _=0;_{o[h]=null}),ke(),r=o[t],r?r.p(u,c):(r=o[t]=s[t](u),r.c()),y(r,1),r.m(i.parentNode,i))},i(u){a||(y(e.$$.fragment,u),y(r),a=!0)},o(u){k(e.$$.fragment,u),k(r),a=!1},d(u){u&&(b(n),b(i)),q(e,u),o[t].d(u)}}}function Jm(l){let e,n,t,r,i,a;n=new Ld({props:{openFocus:!0,$$slots:{default:[Im]},$$scope:{ctx:l}}});function s(f){l[19](f)}let o={onSelectedChange:l[18],disabled:!l[1],$$slots:{default:[Hm]},$$scope:{ctx:l}};return l[2]!==void 0&&(o.selected=l[2]),r=new Ml({props:o}),Ae.push(()=>zt(r,"selected",s)),{c(){e=N("div"),U(n.$$.fragment),t=se(),U(r.$$.fragment),this.h()},l(f){e=R(f,"DIV",{class:!0});var u=B(e);Z(n.$$.fragment,u),t=fe(u),Z(r.$$.fragment,u),u.forEach(b),this.h()},h(){w(e,"class","flex")},m(f,u){C(f,e,u),Y(n,e,null),z(e,t),Y(r,e,null),a=!0},p(f,u){const c={};u[0]&95|u[1]&4&&(c.$$scope={dirty:u,ctx:f}),n.$set(c);const d={};u[0]&2&&(d.disabled=!f[1]),u[0]&36|u[1]&4&&(d.$$scope={dirty:u,ctx:f}),!i&&u[0]&4&&(i=!0,d.selected=f[2],Wt(()=>i=!1)),r.$set(d)},i(f){a||(y(n.$$.fragment,f),y(r.$$.fragment,f),a=!0)},o(f){k(n.$$.fragment,f),k(r.$$.fragment,f),a=!1},d(f){f&&b(e),q(n),q(r)}}}function Kn(l){return l.toString().toLowerCase().replace(/\s+/g,"")}const Ri=l=>l.group==="Days",Vi=l=>l.group==="Months",Bi=l=>l.group==="Last",Fi=l=>l.group==="To Date";function Gm(l,e,n){let t,r,i;function a(I){const _=I.split("-");return new $t(Number(_[0]),Number(_[1]),Number(_[2]))}const s=new Ct("en-US",{dateStyle:"medium"}),o=new Ct("en-US",{dateStyle:"short"});let{selectedDateRange:f=void 0}=e,{start:u}=e,{end:c}=e,{loaded:d=!0}=e,{presetRanges:h}=e,{defaultValue:m}=e;function g(I){n(6,p=I)}let v,p;function D(I){return t.some(_=>_.group===I)}function L(I){if(!I)return;const _=t.find(O=>Kn(O.label)===Kn(typeof I=="string"?I:I.label));_&&(n(0,f=_.range??_.value),n(2,v=_))}function V(I,_){v||n(0,f={start:I,end:_})}const M=I=>{n(2,v=void 0),n(0,f=I)};function x(I){f=I,n(0,f)}function F(I){p=I,n(6,p)}const S=I=>{I.range=I.value,L(I)};function E(I){v=I,n(2,v)}return l.$$set=I=>{"selectedDateRange"in I&&n(0,f=I.selectedDateRange),"start"in I&&n(12,u=I.start),"end"in I&&n(13,c=I.end),"loaded"in I&&n(1,d=I.loaded),"presetRanges"in I&&n(11,h=I.presetRanges),"defaultValue"in I&&n(14,m=I.defaultValue)},l.$$.update=()=>{if(l.$$.dirty[0]&8192&&n(3,i=a(c)),l.$$.dirty[0]&4096&&n(4,r=a(u)),l.$$.dirty[0]&24&&n(5,t=[{label:"Last 7 Days",group:"Days",range:{start:i.subtract({days:6}),end:i}},{label:"Last 30 Days",group:"Days",range:{start:i.subtract({days:29}),end:i}},{label:"Last 90 Days",group:"Days",range:{start:i.subtract({days:89}),end:i}},{label:"Last 3 Months",group:"Months",range:{start:Bt(i.subtract({months:3})),end:rn(i.subtract({months:1}))}},{label:"Last 6 Months",group:"Months",range:{start:Bt(i.subtract({months:6})),end:rn(i.subtract({months:1}))}},{label:"Last 12 Months",group:"Months",range:{start:Bt(i.subtract({months:12})),end:rn(i.subtract({months:1}))}},{label:"Last Month",group:"Last",range:{start:Bt(i.subtract({months:1})),end:rn(i.subtract({months:1}))}},{label:"Last Year",group:"Last",range:{start:ur(i.subtract({years:1})),end:cr(i.subtract({years:1}))}},{label:"Month to Date",group:"To Date",range:{start:Bt(i),end:rn(i)}},{label:"Year to Date",group:"To Date",range:{start:ur(i),end:cr(i)}},{label:"All Time",group:"To Date",range:{start:r,end:i}}]),l.$$.dirty[0]&2080&&(typeof h=="string"&&n(11,h=[h]),h&&typeof h[0]=="string")){const I=h.map(O=>Kn(O));let _=t.filter(O=>I.includes(Kn(O.label)));n(5,t=_)}l.$$.dirty[0]&8&&g(i),l.$$.dirty[0]&16421&&typeof m=="string"&&!f&&!v&&t.length&&L(m),l.$$.dirty[0]&24&&V(r,i)},[f,d,v,i,r,t,p,s,o,D,L,h,u,c,m,M,x,F,S,E]}class Km extends he{constructor(e){super(),me(this,e,Gm,Jm,de,{selectedDateRange:0,start:12,end:13,loaded:1,presetRanges:11,defaultValue:14},null,[-1,-1])}}function Wi(l){let e,n;return{c(){e=N("span"),n=ue(l[0]),this.h()},l(t){e=R(t,"SPAN",{class:!0});var r=B(e);n=ce(r,l[0]),r.forEach(b),this.h()},h(){w(e,"class","text-sm text-gray-500 block mb-1")},m(t,r){C(t,e,r),z(e,n)},p(t,r){r&1&&De(n,t[0])},d(t){t&&b(e)}}}function Qm(l){let e,n;return e=new Zn({props:{data:l[4],$$slots:{skeleton:[$m],default:[xm,({loaded:t})=>({19:t}),({loaded:t})=>t?524288:0]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&16&&(i.data=t[4]),r&1573100&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Xm(l){let e,n,t="error",r,i,a=l[8].error+"",s;return{c(){e=N("span"),n=N("span"),n.textContent=t,r=se(),i=N("span"),s=ue(a),this.h()},l(o){e=R(o,"SPAN",{class:!0});var f=B(e);n=R(f,"SPAN",{class:!0,"data-svelte-h":!0}),At(n)!=="svelte-1927df"&&(n.textContent=t),r=fe(f),i=R(f,"SPAN",{class:!0});var u=B(i);s=ce(u,a),u.forEach(b),f.forEach(b),this.h()},h(){w(n,"class","inline font-sans font-medium text-xs text-red-600"),w(i,"class","hidden text-white font-sans group-hover:inline absolute -top-1 left-[105%] text-sm z-10 px-2 py-1 bg-gray-800/80 leading-relaxed min-w-[150px] w-max max-w-[400px] rounded-md"),w(e,"class","group inline-flex items-center relative cursor-help cursor-helpfont-sans px-1 border border-red-200 py-[1px] bg-red-50 rounded")},m(o,f){C(o,e,f),z(e,n),z(e,r),z(e,i),z(i,s)},p(o,f){f&256&&a!==(a=o[8].error+"")&&De(s,a)},i:ae,o:ae,d(o){o&&b(e)}}}function xm(l){var a;let e,n,t;function r(s){l[16](s)}let i={start:l[7],end:l[6],loaded:((a=l[19])==null?void 0:a.ready)??!0,presetRanges:l[2],defaultValue:l[3]};return l[5]!==void 0&&(i.selectedDateRange=l[5]),e=new Km({props:i}),Ae.push(()=>zt(e,"selectedDateRange",r)),{c(){U(e.$$.fragment)},l(s){Z(e.$$.fragment,s)},m(s,o){Y(e,s,o),t=!0},p(s,o){var u;const f={};o&128&&(f.start=s[7]),o&64&&(f.end=s[6]),o&524288&&(f.loaded=((u=s[19])==null?void 0:u.ready)??!0),o&4&&(f.presetRanges=s[2]),o&8&&(f.defaultValue=s[3]),!n&&o&32&&(n=!0,f.selectedDateRange=s[5],Wt(()=>n=!1)),e.$set(f)},i(s){t||(y(e.$$.fragment,s),t=!0)},o(s){k(e.$$.fragment,s),t=!1},d(s){q(e,s)}}}function $m(l){let e,n;return e=new Da({props:{class:"h-8 w-72"}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p:ae,i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function e1(l){let e,n,t,r,i,a=l[0]&&Wi(l);const s=[Xm,Qm],o=[];function f(u,c){var d;return(d=u[8])!=null&&d.error?0:1}return t=f(l),r=o[t]=s[t](l),{c(){e=N("div"),a&&a.c(),n=se(),r.c(),this.h()},l(u){e=R(u,"DIV",{class:!0});var c=B(e);a&&a.l(c),n=fe(c),r.l(c),c.forEach(b),this.h()},h(){w(e,"class","mt-2 mb-4 ml-0 mr-2 inline-block")},m(u,c){C(u,e,c),a&&a.m(e,null),z(e,n),o[t].m(e,null),i=!0},p(u,c){u[0]?a?a.p(u,c):(a=Wi(u),a.c(),a.m(e,n)):a&&(a.d(1),a=null);let d=t;t=f(u),t===d?o[t].p(u,c):(ve(),k(o[d],1,1,()=>{o[d]=null}),ke(),r=o[t],r?r.p(u,c):(r=o[t]=s[t](u),r.c()),y(r,1),r.m(e,null))},i(u){i||(y(r),i=!0)},o(u){k(r),i=!1},d(u){u&&b(e),a&&a.d(),o[t].d()}}}function t1(l){let e,n;return e=new Md({props:{enabled:l[1],$$slots:{default:[e1]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,[r]){const i={};r&2&&(i.enabled=t[1]),r&1049085&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}const zi=/^\d{4}-\d{2}-\d{2}$/;function Yt(l){return l.toISOString().split("T")[0]}function n1(l,e,n){let t,r,i,a,s=ae,o=()=>(s(),s=Ln(M,S=>n(8,a=S)),M),f;Pe(l,Aa,S=>n(15,f=S)),l.$$.on_destroy.push(()=>s());const u=Ia();Pe(l,u,S=>n(17,i=S));let{name:c}=e,{title:d}=e,{hideDuringPrint:h=!0}=e,{start:m}=e,{end:g}=e,{data:v}=e,{dates:p}=e,{presetRanges:D}=e,{defaultValue:L}=e;const V=Mo();let M,x;function F(S){x=S,n(5,x)}return l.$$set=S=>{"name"in S&&n(10,c=S.name),"title"in S&&n(0,d=S.title),"hideDuringPrint"in S&&n(1,h=S.hideDuringPrint),"start"in S&&n(11,m=S.start),"end"in S&&n(12,g=S.end),"data"in S&&n(13,v=S.data),"dates"in S&&n(14,p=S.dates),"presetRanges"in S&&n(2,D=S.presetRanges),"defaultValue"in S&&n(3,L=S.defaultValue)},l.$$.update=()=>{var S,E,I,_;if(l.$$.dirty&58384&&v&&p){const O=typeof v=="string"?v:`(${v.text})`;o(n(4,M=Et.create(`SELECT min(${p}) as start, max(${p}) as end FROM ${O}`,V,{initialData:(S=f==null?void 0:f.data)==null?void 0:S.data[`DateRange-${c}_data`],knownColumns:(E=f==null?void 0:f.data)==null?void 0:E.data[`DateRange-${c}_columns`],disableCache:!0,noResolve:!1,id:`DateRange-${c}`}))),M.fetch()}l.$$.dirty&2304&&n(7,t=typeof m=="string"&&zi.test(m)?m:m instanceof Date?Yt(m):(a==null?void 0:a[0].start)instanceof Date?Yt(a==null?void 0:a[0].start):Yt(new Date(0))),l.$$.dirty&4352&&n(6,r=typeof g=="string"&&zi.test(g)?g:g instanceof Date?Yt(g):(a==null?void 0:a[0].end)instanceof Date?Yt(a==null?void 0:a[0].end):Yt(new Date)),l.$$.dirty&1488&&(M&&a.dataLoaded||!M)&&yn(u,i[c]={start:t,end:r},i),l.$$.dirty&1056&&x&&(x.start||x.end)&&yn(u,i[c]={start:Yt(((I=x.start)==null?void 0:I.toDate(Ye()))??new Date(0)),end:Yt(((_=x.end)==null?void 0:_.toDate(Ye()))??new Date)},i)},[d,h,D,L,M,x,r,t,a,u,c,m,g,v,p,f,F]}class R_ extends he{constructor(e){super(),me(this,e,n1,t1,de,{name:10,title:0,hideDuringPrint:1,start:11,end:12,data:13,dates:14,presetRanges:2,defaultValue:3})}}function ji(l,e,n){const t=l.slice();return t[12]=e[n],t[14]=n,t}function Ui(l,e,n){const t=l.slice();return t[15]=e[n],t[17]=n,t}function Zi(l,e,n){const t=l.slice();return t[15]=e[n],t}function Yi(l,e,n){const t=l.slice();return t[15]=e[n],t}function qi(l){let e,n=l[15].id+"",t,r,i,a;return{c(){e=N("th"),t=ue(n),this.h()},l(s){e=R(s,"TH",{class:!0,style:!0,evidencetype:!0,evidencetypefidelity:!0});var o=B(e);t=ce(o,n),o.forEach(b),this.h()},h(){var s,o;w(e,"class",r=Dl(l[15].type)+" svelte-157z0gu"),Fe(e,"width",l[6]+"%"),w(e,"evidencetype",i=((s=l[15].evidenceColumnType)==null?void 0:s.evidenceType)||"unavailable"),w(e,"evidencetypefidelity",a=((o=l[15].evidenceColumnType)==null?void 0:o.typeFidelity)||"unavailable")},m(s,o){C(s,e,o),z(e,t)},p(s,o){var f,u;o&8&&n!==(n=s[15].id+"")&&De(t,n),o&8&&r!==(r=Dl(s[15].type)+" svelte-157z0gu")&&w(e,"class",r),o&64&&Fe(e,"width",s[6]+"%"),o&8&&i!==(i=((f=s[15].evidenceColumnType)==null?void 0:f.evidenceType)||"unavailable")&&w(e,"evidencetype",i),o&8&&a!==(a=((u=s[15].evidenceColumnType)==null?void 0:u.typeFidelity)||"unavailable")&&w(e,"evidencetypefidelity",a)},d(s){s&&b(e)}}}function Hi(l){let e,n=l[15].type+"",t,r,i,a;return{c(){e=N("th"),t=ue(n),this.h()},l(s){e=R(s,"TH",{class:!0,style:!0,evidencetype:!0,evidencetypefidelity:!0});var o=B(e);t=ce(o,n),o.forEach(b),this.h()},h(){var s,o;w(e,"class",r=l[15].type+" type-indicator svelte-157z0gu"),Fe(e,"width",l[6]+"%"),w(e,"evidencetype",i=((s=l[15].evidenceColumnType)==null?void 0:s.evidenceType)||"unavailable"),w(e,"evidencetypefidelity",a=((o=l[15].evidenceColumnType)==null?void 0:o.typeFidelity)||"unavailable")},m(s,o){C(s,e,o),z(e,t)},p(s,o){var f,u;o&8&&n!==(n=s[15].type+"")&&De(t,n),o&8&&r!==(r=s[15].type+" type-indicator svelte-157z0gu")&&w(e,"class",r),o&64&&Fe(e,"width",s[6]+"%"),o&8&&i!==(i=((f=s[15].evidenceColumnType)==null?void 0:f.evidenceType)||"unavailable")&&w(e,"evidencetype",i),o&8&&a!==(a=((u=s[15].evidenceColumnType)==null?void 0:u.typeFidelity)||"unavailable")&&w(e,"evidencetypefidelity",a)},d(s){s&&b(e)}}}function l1(l){let e=(l[2]+l[14]+1).toLocaleString()+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r&4&&e!==(e=(t[2]+t[14]+1).toLocaleString()+"")&&De(n,e)},d(t){t&&b(n)}}}function r1(l){let e=(l[2]+l[14]+1).toLocaleString()+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r&4&&e!==(e=(t[2]+t[14]+1).toLocaleString()+"")&&De(n,e)},d(t){t&&b(n)}}}function i1(l){let e,n=(l[12][l[15].id]||"Ø")+"",t;return{c(){e=N("td"),t=ue(n),this.h()},l(r){e=R(r,"TD",{class:!0,style:!0});var i=B(e);t=ce(i,n),i.forEach(b),this.h()},h(){w(e,"class","other svelte-157z0gu"),Fe(e,"width",l[6]+"%")},m(r,i){C(r,e,i),z(e,t)},p(r,i){i&40&&n!==(n=(r[12][r[15].id]||"Ø")+"")&&De(t,n),i&64&&Fe(e,"width",r[6]+"%")},d(r){r&&b(e)}}}function a1(l){let e,n,t=(l[12][l[15].id]??"Ø")+"",r,i;return{c(){e=N("td"),n=N("div"),r=ue(t),this.h()},l(a){e=R(a,"TD",{class:!0,style:!0,title:!0});var s=B(e);n=R(s,"DIV",{class:!0});var o=B(n);r=ce(o,t),o.forEach(b),s.forEach(b),this.h()},h(){w(n,"class","svelte-157z0gu"),w(e,"class","boolean svelte-157z0gu"),Fe(e,"width",l[6]+"%"),w(e,"title",i=l[12][l[15].id])},m(a,s){C(a,e,s),z(e,n),z(n,r)},p(a,s){s&40&&t!==(t=(a[12][a[15].id]??"Ø")+"")&&De(r,t),s&64&&Fe(e,"width",a[6]+"%"),s&40&&i!==(i=a[12][a[15].id])&&w(e,"title",i)},d(a){a&&b(e)}}}function o1(l){let e,n,t=(l[12][l[15].id]||"Ø")+"",r,i;return{c(){e=N("td"),n=N("div"),r=ue(t),this.h()},l(a){e=R(a,"TD",{class:!0,style:!0,title:!0});var s=B(e);n=R(s,"DIV",{class:!0});var o=B(n);r=ce(o,t),o.forEach(b),s.forEach(b),this.h()},h(){w(n,"class","svelte-157z0gu"),w(e,"class","string svelte-157z0gu"),Fe(e,"width",l[6]+"%"),w(e,"title",i=l[12][l[15].id])},m(a,s){C(a,e,s),z(e,n),z(n,r)},p(a,s){s&40&&t!==(t=(a[12][a[15].id]||"Ø")+"")&&De(r,t),s&64&&Fe(e,"width",a[6]+"%"),s&40&&i!==(i=a[12][a[15].id])&&w(e,"title",i)},d(a){a&&b(e)}}}function s1(l){let e,n,t=Kt(l[12][l[15].id],l[3][l[17]].format,l[3][l[17]].columnUnitSummary)+"",r,i;return{c(){e=N("td"),n=N("div"),r=ue(t),this.h()},l(a){e=R(a,"TD",{class:!0,style:!0,title:!0});var s=B(e);n=R(s,"DIV",{class:!0});var o=B(n);r=ce(o,t),o.forEach(b),s.forEach(b),this.h()},h(){w(n,"class","svelte-157z0gu"),w(e,"class","string svelte-157z0gu"),Fe(e,"width",l[6]+"%"),w(e,"title",i=Kt(l[12][l[15].id],l[3][l[17]].format,l[3][l[17]].columnUnitSummary))},m(a,s){C(a,e,s),z(e,n),z(n,r)},p(a,s){s&40&&t!==(t=Kt(a[12][a[15].id],a[3][a[17]].format,a[3][a[17]].columnUnitSummary)+"")&&De(r,t),s&64&&Fe(e,"width",a[6]+"%"),s&40&&i!==(i=Kt(a[12][a[15].id],a[3][a[17]].format,a[3][a[17]].columnUnitSummary))&&w(e,"title",i)},d(a){a&&b(e)}}}function f1(l){let e,n=Kt(l[12][l[15].id],l[3][l[17]].format,l[3][l[17]].columnUnitSummary)+"",t;return{c(){e=N("td"),t=ue(n),this.h()},l(r){e=R(r,"TD",{class:!0,style:!0});var i=B(e);t=ce(i,n),i.forEach(b),this.h()},h(){w(e,"class","number svelte-157z0gu"),Fe(e,"width",l[6]+"%")},m(r,i){C(r,e,i),z(e,t)},p(r,i){i&40&&n!==(n=Kt(r[12][r[15].id],r[3][r[17]].format,r[3][r[17]].columnUnitSummary)+"")&&De(t,n),i&64&&Fe(e,"width",r[6]+"%")},d(r){r&&b(e)}}}function u1(l){let e,n="Ø",t,r;return{c(){e=N("td"),t=ue(n),this.h()},l(i){e=R(i,"TD",{class:!0,style:!0});var a=B(e);t=ce(a,n),a.forEach(b),this.h()},h(){w(e,"class",r="null "+l[3][l[17]].type+" svelte-157z0gu"),Fe(e,"width",l[6]+"%")},m(i,a){C(i,e,a),z(e,t)},p(i,a){a&8&&r!==(r="null "+i[3][i[17]].type+" svelte-157z0gu")&&w(e,"class",r),a&64&&Fe(e,"width",i[6]+"%")},d(i){i&&b(e)}}}function Ji(l){let e;function n(i,a){return i[12][i[15].id]==null?u1:i[3][i[17]].type==="number"?f1:i[3][i[17]].type==="date"?s1:i[3][i[17]].type==="string"?o1:i[3][i[17]].type==="boolean"?a1:i1}let t=n(l),r=t(l);return{c(){r.c(),e=K()},l(i){r.l(i),e=K()},m(i,a){r.m(i,a),C(i,e,a)},p(i,a){t===(t=n(i))&&r?r.p(i,a):(r.d(1),r=t(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&b(e),r.d(i)}}}function Gi(l){let e,n,t,r;function i(u,c){return u[14]===0?r1:l1}let s=i(l)(l),o=Ne(l[3]),f=[];for(let u=0;u0&&Ki(l);return x=new wo({props:{class:"download-button",data:l[1],queryID:l[0],display:!0}}),{c(){e=N("div"),n=N("div"),t=N("table"),r=N("thead"),i=N("tr"),a=N("th"),s=se();for(let G=0;G0?Re?Re.p(G,Oe):(Re=Ki(G),Re.c(),Re.m(e,V)):Re&&(Re.d(1),Re=null);const Te={};Oe&2&&(Te.data=G[1]),Oe&1&&(Te.queryID=G[0]),x.$set(Te)},i(G){S||(G&&(D||yt(()=>{D=Cn(t,Sa,{}),D.start()})),y(x.$$.fragment,G),G&&yt(()=>{S&&(F||(F=vt(e,Qt,{},!0)),F.run(1))}),S=!0)},o(G){k(x.$$.fragment,G),G&&(F||(F=vt(e,Qt,{},!1)),F.run(0)),S=!1},d(G){G&&b(e),lt(O,G),lt(ee,G),lt(Se,G),Re&&Re.d(),q(x),G&&F&&F.end(),E=!1,I()}}}let on=5;function d1(l,e,n){let t,r,i,a,{queryID:s}=e,{data:o}=e,f=0,u;function c(){u=o.slice(f,f+on),n(5,a=u)}const d=Po(g=>{n(2,f=Math.min(Math.max(0,f+Math.floor(g.deltaY/Math.abs(g.deltaY))),i)),c()},60);function h(g){if(Math.abs(g.deltaX)>=Math.abs(g.deltaY))return;const v=g.deltaY<0&&f===0,p=g.deltaY>0&&f===i;v||p||(g.preventDefault(),d(g))}function m(){f=ho(this.value),n(2,f)}return l.$$set=g=>{"queryID"in g&&n(0,s=g.queryID),"data"in g&&n(1,o=g.data)},l.$$.update=()=>{l.$$.dirty&2&&n(3,t=Rl(o,"array")),l.$$.dirty&8&&n(6,r=90/(t.length+1)),l.$$.dirty&2&&n(4,i=Math.max(o.length-on,0)),l.$$.dirty&6&&n(5,a=o.slice(f,f+on))},[s,o,f,t,i,a,r,c,h,m]}class h1 extends he{constructor(e){super(),me(this,e,d1,c1,de,{queryID:0,data:1})}}function m1(l){let e,n="Compiled",t,r,i="Written",a,s;return{c(){e=N("button"),e.textContent=n,t=se(),r=N("button"),r.textContent=i,this.h()},l(o){e=R(o,"BUTTON",{class:!0,"data-svelte-h":!0}),At(e)!=="svelte-1vzm9jy"&&(e.textContent=n),t=fe(o),r=R(o,"BUTTON",{class:!0,"data-svelte-h":!0}),At(r)!=="svelte-5roa31"&&(r.textContent=i),this.h()},h(){w(e,"class","off svelte-1b8idd8"),w(r,"class","on svelte-1b8idd8")},m(o,f){C(o,e,f),C(o,t,f),C(o,r,f),a||(s=Ie(e,"click",l[1]),a=!0)},p:ae,d(o){o&&(b(e),b(t),b(r)),a=!1,s()}}}function g1(l){let e,n="Compiled",t,r,i="Written",a,s;return{c(){e=N("button"),e.textContent=n,t=se(),r=N("button"),r.textContent=i,this.h()},l(o){e=R(o,"BUTTON",{class:!0,"data-svelte-h":!0}),At(e)!=="svelte-1ofx42v"&&(e.textContent=n),t=fe(o),r=R(o,"BUTTON",{class:!0,"data-svelte-h":!0}),At(r)!=="svelte-v36xno"&&(r.textContent=i),this.h()},h(){w(e,"class","on svelte-1b8idd8"),w(r,"class","off svelte-1b8idd8")},m(o,f){C(o,e,f),C(o,t,f),C(o,r,f),a||(s=Ie(r,"click",l[1]),a=!0)},p:ae,d(o){o&&(b(e),b(t),b(r)),a=!1,s()}}}function _1(l){let e,n,t;function r(s,o){return s[0]?g1:m1}let i=r(l),a=i(l);return{c(){e=N("div"),a.c(),this.h()},l(s){e=R(s,"DIV",{class:!0});var o=B(e);a.l(o),o.forEach(b),this.h()},h(){w(e,"class","toggle svelte-1b8idd8")},m(s,o){C(s,e,o),a.m(e,null),t=!0},p(s,[o]){i===(i=r(s))&&a?a.p(s,o):(a.d(1),a=i(s),a&&(a.c(),a.m(e,null)))},i(s){t||(s&&yt(()=>{t&&(n||(n=vt(e,Qt,{},!0)),n.run(1))}),t=!0)},o(s){s&&(n||(n=vt(e,Qt,{},!1)),n.run(0)),t=!1},d(s){s&&b(e),a.d(),s&&n&&n.end()}}}function b1(l,e,n){let{showCompiled:t}=e;const r=function(){n(0,t=!t)};return l.$$set=i=>{"showCompiled"in i&&n(0,t=i.showCompiled)},[t,r]}class y1 extends he{constructor(e){super(),me(this,e,b1,_1,de,{showCompiled:0})}}function Qi(l){let e,n,t,r,i,a,s,o,f,u,c,d,h,m,g,v,p;r=new La({props:{toggled:l[10]}});let D=l[10]&&l[4]&&Xi(l),L=l[10]&&xi(l);const V=[S1,D1,C1,p1],M=[];function x(S,E){return S[6]?0:S[8]?1:S[2].loading?2:3}c=x(l),d=M[c]=V[c](l);let F=l[8]>0&&!l[6]&&l[9]&&$i(l);return{c(){e=N("div"),n=N("div"),t=N("button"),U(r.$$.fragment),i=se(),a=ue(l[0]),s=se(),D&&D.c(),o=se(),L&&L.c(),f=se(),u=N("button"),d.c(),h=se(),F&&F.c(),this.h()},l(S){e=R(S,"DIV",{class:!0});var E=B(e);n=R(E,"DIV",{class:!0});var I=B(n);t=R(I,"BUTTON",{type:!0,"aria-label":!0,class:!0});var _=B(t);Z(r.$$.fragment,_),i=fe(_),a=ce(_,l[0]),_.forEach(b),s=fe(I),D&&D.l(I),o=fe(I),L&&L.l(I),I.forEach(b),f=fe(E),u=R(E,"BUTTON",{type:!0,"aria-label":!0,class:!0});var O=B(u);d.l(O),O.forEach(b),h=fe(E),F&&F.l(E),E.forEach(b),this.h()},h(){w(t,"type","button"),w(t,"aria-label","show-sql"),w(t,"class","title svelte-1plm20d"),w(n,"class","container-a svelte-1plm20d"),w(u,"type","button"),w(u,"aria-label","view-query"),w(u,"class",Dl("status-bar")+" svelte-1plm20d"),tt(u,"error",l[6]),tt(u,"success",!l[6]),tt(u,"open",l[9]),tt(u,"closed",!l[9]),w(e,"class","scrollbox svelte-1plm20d")},m(S,E){C(S,e,E),z(e,n),z(n,t),Y(r,t,null),z(t,i),z(t,a),z(n,s),D&&D.m(n,null),z(n,o),L&&L.m(n,null),z(e,f),z(e,u),M[c].m(u,null),z(e,h),F&&F.m(e,null),g=!0,v||(p=[Ie(t,"click",l[14]),Ie(u,"click",l[15])],v=!0)},p(S,E){const I={};E&1024&&(I.toggled=S[10]),r.$set(I),(!g||E&1)&&De(a,S[0]),S[10]&&S[4]?D?(D.p(S,E),E&1040&&y(D,1)):(D=Xi(S),D.c(),y(D,1),D.m(n,o)):D&&(ve(),k(D,1,1,()=>{D=null}),ke()),S[10]?L?(L.p(S,E),E&1024&&y(L,1)):(L=xi(S),L.c(),y(L,1),L.m(n,null)):L&&(ve(),k(L,1,1,()=>{L=null}),ke());let _=c;c=x(S),c===_?M[c].p(S,E):(ve(),k(M[_],1,1,()=>{M[_]=null}),ke(),d=M[c],d?d.p(S,E):(d=M[c]=V[c](S),d.c()),y(d,1),d.m(u,null)),(!g||E&64)&&tt(u,"error",S[6]),(!g||E&64)&&tt(u,"success",!S[6]),(!g||E&512)&&tt(u,"open",S[9]),(!g||E&512)&&tt(u,"closed",!S[9]),S[8]>0&&!S[6]&&S[9]?F?(F.p(S,E),E&832&&y(F,1)):(F=$i(S),F.c(),y(F,1),F.m(e,null)):F&&(ve(),k(F,1,1,()=>{F=null}),ke())},i(S){g||(y(r.$$.fragment,S),y(D),y(L),y(d),y(F),S&&yt(()=>{g&&(m||(m=vt(e,Qt,{},!0)),m.run(1))}),g=!0)},o(S){k(r.$$.fragment,S),k(D),k(L),k(d),k(F),S&&(m||(m=vt(e,Qt,{},!1)),m.run(0)),g=!1},d(S){S&&b(e),q(r),D&&D.d(),L&&L.d(),M[c].d(),F&&F.d(),S&&m&&m.end(),v=!1,ft(p)}}}function Xi(l){let e,n,t;function r(a){l[18](a)}let i={};return l[5]!==void 0&&(i.showCompiled=l[5]),e=new y1({props:i}),Ae.push(()=>zt(e,"showCompiled",r)),{c(){U(e.$$.fragment)},l(a){Z(e.$$.fragment,a)},m(a,s){Y(e,a,s),t=!0},p(a,s){const o={};!n&&s&32&&(n=!0,o.showCompiled=a[5],Wt(()=>n=!1)),e.$set(o)},i(a){t||(y(e.$$.fragment,a),t=!0)},o(a){k(e.$$.fragment,a),t=!1},d(a){q(e,a)}}}function xi(l){let e,n,t,r,i;const a=[k1,v1],s=[];function o(f,u){return f[5]?0:1}return n=o(l),t=s[n]=a[n](l),{c(){e=N("div"),t.c(),this.h()},l(f){e=R(f,"DIV",{class:!0});var u=B(e);t.l(u),u.forEach(b),this.h()},h(){w(e,"class","code-container svelte-1plm20d")},m(f,u){C(f,e,u),s[n].m(e,null),i=!0},p(f,u){let c=n;n=o(f),n===c?s[n].p(f,u):(ve(),k(s[c],1,1,()=>{s[c]=null}),ke(),t=s[n],t?t.p(f,u):(t=s[n]=a[n](f),t.c()),y(t,1),t.m(e,null))},i(f){i||(y(t),f&&yt(()=>{i&&(r||(r=vt(e,Qt,{},!0)),r.run(1))}),i=!0)},o(f){k(t),f&&(r||(r=vt(e,Qt,{},!1)),r.run(0)),i=!1},d(f){f&&b(e),s[n].d(),f&&r&&r.end()}}}function v1(l){let e,n;return e=new Na({props:{code:l[3]}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&8&&(i.code=t[3]),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function k1(l){let e,n;return e=new Na({props:{code:l[1].originalText}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&2&&(i.code=t[1].originalText),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function p1(l){let e;return{c(){e=ue("ran successfully but no data was returned")},l(n){e=ce(n,"ran successfully but no data was returned")},m(n,t){C(n,e,t)},p:ae,i:ae,o:ae,d(n){n&&b(e)}}}function C1(l){let e;return{c(){e=ue("loading...")},l(n){e=ce(n,"loading...")},m(n,t){C(n,e,t)},p:ae,i:ae,o:ae,d(n){n&&b(e)}}}function D1(l){let e,n,t=l[8].toLocaleString()+"",r,i,a=l[8]>1?"records":"record",s,o,f=l[7].toLocaleString()+"",u,c,d=l[7]>1?"properties":"property",h,m;return e=new La({props:{toggled:l[9],color:"#3488e9"}}),{c(){U(e.$$.fragment),n=se(),r=ue(t),i=se(),s=ue(a),o=ue(" with "),u=ue(f),c=se(),h=ue(d)},l(g){Z(e.$$.fragment,g),n=fe(g),r=ce(g,t),i=fe(g),s=ce(g,a),o=ce(g," with "),u=ce(g,f),c=fe(g),h=ce(g,d)},m(g,v){Y(e,g,v),C(g,n,v),C(g,r,v),C(g,i,v),C(g,s,v),C(g,o,v),C(g,u,v),C(g,c,v),C(g,h,v),m=!0},p(g,v){const p={};v&512&&(p.toggled=g[9]),e.$set(p),(!m||v&256)&&t!==(t=g[8].toLocaleString()+"")&&De(r,t),(!m||v&256)&&a!==(a=g[8]>1?"records":"record")&&De(s,a),(!m||v&128)&&f!==(f=g[7].toLocaleString()+"")&&De(u,f),(!m||v&128)&&d!==(d=g[7]>1?"properties":"property")&&De(h,d)},i(g){m||(y(e.$$.fragment,g),m=!0)},o(g){k(e.$$.fragment,g),m=!1},d(g){g&&(b(n),b(r),b(i),b(s),b(o),b(u),b(c),b(h)),q(e,g)}}}function S1(l){let e=l[6].message+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r&64&&e!==(e=t[6].message+"")&&De(n,e)},i:ae,o:ae,d(t){t&&b(n)}}}function $i(l){let e,n;return e=new h1({props:{data:l[1],queryID:l[0]}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&2&&(i.data=t[1]),r&1&&(i.queryID=t[0]),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function E1(l){let e,n,t,r=l[11]&&Qi(l);return{c(){e=N("div"),r&&r.c(),this.h()},l(i){e=R(i,"DIV",{class:!0});var a=B(e);r&&r.l(a),a.forEach(b),this.h()},h(){w(e,"class","over-container svelte-1plm20d")},m(i,a){C(i,e,a),r&&r.m(e,null),t=!0},p(i,[a]){i[11]?r?(r.p(i,a),a&2048&&y(r,1)):(r=Qi(i),r.c(),y(r,1),r.m(e,null)):r&&(ve(),k(r,1,1,()=>{r=null}),ke())},i(i){t||(y(r),i&&(n||yt(()=>{n=Cn(e,Sa,{}),n.start()})),t=!0)},o(i){k(r),t=!1},d(i){i&&b(e),r&&r.d()}}}function T1(l,e,n){let t,r,i,a,s=ae,o=()=>(s(),s=Ln(m,S=>n(2,a=S)),m),f,u,c,d;Pe(l,Aa,S=>n(17,c=S)),Pe(l,Io,S=>n(11,d=S)),l.$$.on_destroy.push(()=>s());let{queryID:h}=e,{queryResult:m}=e;o();let g=ar("showSQL_".concat(h),!1);Pe(l,g,S=>n(10,u=S));let v=ar(`showResults_${h}`);Pe(l,v,S=>n(9,f=S));const p=function(){yn(g,u=!u,u)},D=function(){!x&&a.length>0&&yn(v,f=!f,f)};let L,V,M=!0,x;function F(S){M=S,n(5,M)}return l.$$set=S=>{"queryID"in S&&n(0,h=S.queryID),"queryResult"in S&&o(n(1,m=S.queryResult))},l.$$.update=()=>{if(l.$$.dirty&131072&&n(16,t=c.data.evidencemeta.queries),l.$$.dirty&4&&(a?n(6,x=a.error):n(6,x=new Error("queryResult is undefined"))),l.$$.dirty&4&&n(8,r=(a==null?void 0:a.length)??0),l.$$.dirty&4&&n(7,i=a.columns.length??(a==null?void 0:a._evidenceColumnTypes.length)??0),l.$$.dirty&65537){let S=t==null?void 0:t.find(E=>E.id===h);S&&(n(3,L=S.inputQueryString),n(4,V=S.compiled&&S.compileError===void 0))}},[h,m,a,L,V,M,x,i,r,f,u,d,g,v,p,D,t,c,F]}class V_ extends he{constructor(e){super(),me(this,e,T1,E1,de,{queryID:0,queryResult:1})}}function O1(l){let e,n;return e=new No({props:{error:l[2]}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.error=t[2]),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function M1(l){let e,n=Kt(l[1],l[3])+"",t;return{c(){e=N("span"),t=ue(n),this.h()},l(r){e=R(r,"SPAN",{style:!0});var i=B(e);t=ce(i,n),i.forEach(b),this.h()},h(){Fe(e,"color",l[4])},m(r,i){C(r,e,i),z(e,t)},p(r,i){i&10&&n!==(n=Kt(r[1],r[3])+"")&&De(t,n),i&16&&Fe(e,"color",r[4])},i:ae,o:ae,d(r){r&&b(e)}}}function w1(l){let e,n,t,r,i,a="Placeholder: no data currently referenced.";return{c(){e=N("span"),n=ue("["),t=ue(l[0]),r=ue("]"),i=N("span"),i.textContent=a,this.h()},l(s){e=R(s,"SPAN",{class:!0});var o=B(e);n=ce(o,"["),t=ce(o,l[0]),r=ce(o,"]"),i=R(o,"SPAN",{class:!0,"data-svelte-h":!0}),At(i)!=="svelte-ddarzq"&&(i.textContent=a),o.forEach(b),this.h()},h(){w(i,"class","error-msg svelte-11norvs"),w(e,"class","placeholder svelte-11norvs")},m(s,o){C(s,e,o),z(e,n),z(e,t),z(e,r),z(e,i)},p(s,o){o&1&&De(t,s[0])},i:ae,o:ae,d(s){s&&b(e)}}}function P1(l){let e,n,t,r;const i=[w1,M1,O1],a=[];function s(o,f){return o[0]?0:o[2]?2:1}return e=s(l),n=a[e]=i[e](l),{c(){n.c(),t=K()},l(o){n.l(o),t=K()},m(o,f){a[e].m(o,f),C(o,t,f),r=!0},p(o,[f]){let u=e;e=s(o),e===u?a[e].p(o,f):(ve(),k(a[u],1,1,()=>{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function I1(l,e,n){let{data:t=null}=e,{row:r=0}=e,{column:i=null}=e,{value:a=null}=e,{placeholder:s=null}=e,{fmt:o=void 0}=e,f,u,c,{color:d=void 0}=e,h="",{redNegatives:m=!1}=e,g;return l.$$set=v=>{"data"in v&&n(5,t=v.data),"row"in v&&n(8,r=v.row),"column"in v&&n(6,i=v.column),"value"in v&&n(9,a=v.value),"placeholder"in v&&n(0,s=v.placeholder),"fmt"in v&&n(10,o=v.fmt),"color"in v&&n(11,d=v.color),"redNegatives"in v&&n(7,m=v.redNegatives)},l.$$.update=()=>{var v;if(l.$$.dirty&576&&n(6,i=i??a),l.$$.dirty&5477)try{if(n(2,c=void 0),!s)if(t){if(typeof t=="string")throw Error(`Received: data=${t}, expected: data={${t}}`);if(Array.isArray(t)||n(5,t=[t]),isNaN(r))throw Error("row must be a number (row="+r+")");try{Object.keys(t[r])[0]}catch{throw Error("Row "+r+" does not exist in the dataset")}n(6,i=i??Object.keys(t[r])[0]),In(t,[i]),n(12,g=Rl(t,"array"));const p=g.filter(D=>{var L;return D.type==="date"&&!(((L=t[0])==null?void 0:L[D.id])instanceof Date)}).map(D=>D.id);for(let D=0;DD.id===i)),o?n(3,f=Lo(o,(v=g[0].format)==null?void 0:v.valueType)):n(3,f=g[0].format)}else throw Error("No data provided. If you referenced a query result, check that the name is correct.")}catch(p){n(2,c=p.message),console.error("\x1B[31m%s\x1B[0m",`Error in Value: ${c}`)}l.$$.dirty&576&&a&&i&&console.warn('Both "value" and "column" were supplied as props to Value. "value" will be ignored.'),l.$$.dirty&128&&n(7,m=m==="true"||m===!0),l.$$.dirty&2178&&(m||d)&&(m&&u<0?n(4,h="rgb(220 38 38)"):d&&n(4,h=d))},[s,u,c,f,h,t,i,m,r,a,o,d,g]}class A1 extends he{constructor(e){super(),me(this,e,I1,P1,de,{data:5,row:8,column:6,value:9,placeholder:0,fmt:10,color:11,redNegatives:7})}}function L1(l){let e;const n=l[7].default,t=ne(n,l,l[8],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&256)&&le(t,n,r,r[8],e?ie(n,r[8],i,null):re(r[8]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function N1(l){let e,n;const t=[l[4],{data:Et.isQuery(l[11])?Array.from(l[11]):l[11]}];let r={$$slots:{default:[L1]},$$scope:{ctx:l}};for(let i=0;i{t=null}),ke()):t?(t.p(r,i),i&16&&y(t,1)):(t=ea(r),t.c(),y(t,1),t.m(e,null))},i(r){n||(y(t),n=!0)},o(r){k(t),n=!1},d(r){r&&b(e),t&&t.d()}}}function V1(l){let e,n="Loading...";return{c(){e=N("span"),e.textContent=n,this.h()},l(t){e=R(t,"SPAN",{slot:!0,class:!0,"data-svelte-h":!0}),At(e)!=="svelte-exu0be"&&(e.textContent=n),this.h()},h(){w(e,"slot","skeleton"),w(e,"class","text-gray-500")},m(t,r){C(t,e,r)},p:ae,d(t){t&&b(e)}}}function B1(l){let e,n;return e=new Zn({props:{data:l[0],$$slots:{skeleton:[V1],empty:[R1],default:[N1,({loaded:t})=>({11:t}),({loaded:t})=>t?2048:0]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,[r]){const i={};r&1&&(i.data=t[0]),r&2334&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}let F1="Value";function W1(l,e,n){let t,{$$slots:r={},$$scope:i}=e,{data:a}=e,{column:s}=e,{agg:o}=e;const f=Et.isQuery(a)?a.hash:void 0;let u=(a==null?void 0:a.hash)===f,{emptySet:c=void 0}=e,{emptyMessage:d=void 0}=e;return l.$$set=h=>{n(10,e=A(A({},e),Ee(h))),"data"in h&&n(0,a=h.data),"column"in h&&n(5,s=h.column),"agg"in h&&n(6,o=h.agg),"emptySet"in h&&n(1,c=h.emptySet),"emptyMessage"in h&&n(2,d=h.emptyMessage),"$$scope"in h&&n(8,i=h.$$scope)},l.$$.update=()=>{l.$$.dirty&97&&o&&n(0,a=a.groupBy(void 0).agg({[o]:{col:s,as:s}})),l.$$.dirty&1&&n(3,u=(a==null?void 0:a.hash)===f),n(4,t=Object.fromEntries(Object.entries(e).filter(([,h])=>h!==void 0)))},e=Ee(e),[a,c,d,u,t,s,o,r,i]}class Yn extends he{constructor(e){super(),me(this,e,W1,B1,de,{data:0,column:5,agg:6,emptySet:1,emptyMessage:2})}}function z1(l){let e;const n=l[6].default,t=ne(n,l,l[7],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&128)&&le(t,n,r,r[7],e?ie(n,r[7],i,null):re(r[7]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function j1(l){let e,n;const t=[l[4],{data:Et.isQuery(l[10])?Array.from(l[10]):l[10]},{queryID:l[5]}];let r={$$slots:{default:[z1]},$$scope:{ctx:l}};for(let i=0;i({10:t}),({loaded:t})=>t?1024:0],empty:[U1],default:[j1,({loaded:t})=>({10:t}),({loaded:t})=>t?1024:0]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,[r]){const i={};r&1&&(i.data=t[0]),r&1182&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}let q1="Sparkline";function H1(l,e,n){let t,{$$slots:r={},$$scope:i}=e,{data:a}=e;const s=Et.isQuery(a)?a.hash:void 0;let o=(a==null?void 0:a.hash)===s,{emptySet:f=void 0}=e,{emptyMessage:u=void 0}=e,c=a==null?void 0:a.id;return l.$$set=d=>{n(9,e=A(A({},e),Ee(d))),"data"in d&&n(0,a=d.data),"emptySet"in d&&n(1,f=d.emptySet),"emptyMessage"in d&&n(2,u=d.emptyMessage),"$$scope"in d&&n(7,i=d.$$scope)},l.$$.update=()=>{l.$$.dirty&1&&n(3,o=(a==null?void 0:a.hash)===s),n(4,t={...Object.fromEntries(Object.entries(e).filter(([,d])=>d!==void 0))})},e=Ee(e),[a,f,u,o,t,c,r,i]}class J1 extends he{constructor(e){super(),me(this,e,H1,Y1,de,{data:0,emptySet:1,emptyMessage:2})}}function G1(l){let e,n,t,r,i,a,s,o,f,u;const c=[X1,Q1],d=[];function h(v,p){return v[20]?0:1}i=h(l),a=d[i]=c[i](l);let m=l[8]&&ta(l),g=l[7]&&na(l);return{c(){e=N("p"),n=ue(l[3]),t=se(),r=N("div"),a.c(),s=se(),m&&m.c(),o=se(),g&&g.c(),f=K(),this.h()},l(v){e=R(v,"P",{class:!0});var p=B(e);n=ce(p,l[3]),p.forEach(b),t=fe(v),r=R(v,"DIV",{class:!0});var D=B(r);a.l(D),s=fe(D),m&&m.l(D),D.forEach(b),o=fe(v),g&&g.l(v),f=K(),this.h()},h(){w(e,"class","text-sm text-gray-700"),w(r,"class","relative text-xl font-medium text-gray-700 my-0.5")},m(v,p){C(v,e,p),z(e,n),C(v,t,p),C(v,r,p),d[i].m(r,null),z(r,s),m&&m.m(r,null),C(v,o,p),g&&g.m(v,p),C(v,f,p),u=!0},p(v,p){(!u||p&8)&&De(n,v[3]);let D=i;i=h(v),i===D?d[i].p(v,p):(ve(),k(d[D],1,1,()=>{d[D]=null}),ke(),a=d[i],a?a.p(v,p):(a=d[i]=c[i](v),a.c()),y(a,1),a.m(r,s)),v[8]?m?(m.p(v,p),p&256&&y(m,1)):(m=ta(v),m.c(),y(m,1),m.m(r,null)):m&&(ve(),k(m,1,1,()=>{m=null}),ke()),v[7]?g?(g.p(v,p),p&128&&y(g,1)):(g=na(v),g.c(),y(g,1),g.m(f.parentNode,f)):g&&(ve(),k(g,1,1,()=>{g=null}),ke())},i(v){u||(y(a),y(m),y(g),u=!0)},o(v){k(a),k(m),k(g),u=!1},d(v){v&&(b(e),b(t),b(r),b(o),b(f)),d[i].d(),m&&m.d(),g&&g.d(v)}}}function K1(l){let e,n;return e=new Ea({props:{chartType:"Big Value",error:l[21].message}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&2097152&&(i.error=t[21].message),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Q1(l){let e,n;return e=new Yn({props:{data:l[0],column:l[6],fmt:l[14]}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.data=t[0]),r&64&&(i.column=t[6]),r&16384&&(i.fmt=t[14]),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function X1(l){let e,n,t,r;return n=new Yn({props:{data:l[0],column:l[6],fmt:l[14]}}),{c(){e=N("a"),U(n.$$.fragment),this.h()},l(i){e=R(i,"A",{class:!0,href:!0});var a=B(e);Z(n.$$.fragment,a),a.forEach(b),this.h()},h(){w(e,"class","hover:bg-gray-100"),w(e,"href",t=xn(l[20]))},m(i,a){C(i,e,a),Y(n,e,null),r=!0},p(i,a){const s={};a&1&&(s.data=i[0]),a&64&&(s.column=i[6]),a&16384&&(s.fmt=i[14]),n.$set(s),(!r||a&1048576&&t!==(t=xn(i[20])))&&w(e,"href",t)},i(i){r||(y(n.$$.fragment,i),r=!0)},o(i){k(n.$$.fragment,i),r=!1},d(i){i&&b(e),q(n)}}}function ta(l){let e,n;return e=new J1({props:{height:"15",data:l[0],dateCol:l[8],valueCol:l[6],type:l[9],interactive:"true",color:l[10],valueFmt:l[14]??l[11],dateFmt:l[12],yScale:l[2],connectGroup:l[13]}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.data=t[0]),r&256&&(i.dateCol=t[8]),r&64&&(i.valueCol=t[6]),r&512&&(i.type=t[9]),r&1024&&(i.color=t[10]),r&18432&&(i.valueFmt=t[14]??t[11]),r&4096&&(i.dateFmt=t[12]),r&4&&(i.yScale=t[2]),r&8192&&(i.connectGroup=t[13]),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function na(l){let e,n,t,r;const i=[$1,x1],a=[];function s(o,f){return o[1]?0:1}return e=s(l),n=a[e]=i[e](l),{c(){n.c(),t=K()},l(o){n.l(o),t=K()},m(o,f){a[e].m(o,f),C(o,t,f),r=!0},p(o,f){let u=e;e=s(o),e===u?a[e].p(o,f):(ve(),k(a[u],1,1,()=>{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function x1(l){let e,n,t,r,i,a,s;const o=[tg,eg],f=[];function u(c,d){return c[20]?0:1}return n=u(l),t=f[n]=o[n](l),{c(){e=N("p"),t.c(),r=se(),i=N("span"),a=ue(l[4]),this.h()},l(c){e=R(c,"P",{class:!0});var d=B(e);t.l(d),r=fe(d),i=R(d,"SPAN",{});var h=B(i);a=ce(h,l[4]),h.forEach(b),d.forEach(b),this.h()},h(){w(e,"class","text-xs font-sans text-gray-500 pt-[0.5px]")},m(c,d){C(c,e,d),f[n].m(e,null),z(e,r),z(e,i),z(i,a),s=!0},p(c,d){let h=n;n=u(c),n===h?f[n].p(c,d):(ve(),k(f[h],1,1,()=>{f[h]=null}),ke(),t=f[n],t?t.p(c,d):(t=f[n]=o[n](c),t.c()),y(t,1),t.m(e,r)),(!s||d&16)&&De(a,c[4])},i(c){s||(y(t),s=!0)},o(c){k(t),s=!1},d(c){c&&b(e),f[n].d()}}}function $1(l){let e,n,t,r;return n=new Vo({props:{data:l[0],column:l[7],fmt:l[15],fontClass:"text-xs",symbolPosition:"left",neutralMin:l[16],neutralMax:l[17],text:l[4],downIsGood:l[5]}}),{c(){e=N("p"),U(n.$$.fragment),this.h()},l(i){e=R(i,"P",{class:!0,style:!0});var a=B(e);Z(n.$$.fragment,a),a.forEach(b),this.h()},h(){w(e,"class","text-xs font-sans"),w(e,"style",t=`color:${l[22]}`)},m(i,a){C(i,e,a),Y(n,e,null),r=!0},p(i,a){const s={};a&1&&(s.data=i[0]),a&128&&(s.column=i[7]),a&32768&&(s.fmt=i[15]),a&65536&&(s.neutralMin=i[16]),a&131072&&(s.neutralMax=i[17]),a&16&&(s.text=i[4]),a&32&&(s.downIsGood=i[5]),n.$set(s),(!r||a&4194304&&t!==(t=`color:${i[22]}`))&&w(e,"style",t)},i(i){r||(y(n.$$.fragment,i),r=!0)},o(i){k(n.$$.fragment,i),r=!1},d(i){i&&b(e),q(n)}}}function eg(l){let e,n;return e=new Yn({props:{data:l[0],column:l[7],fmt:l[15]}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.data=t[0]),r&128&&(i.column=t[7]),r&32768&&(i.fmt=t[15]),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function tg(l){let e,n,t,r;return n=new Yn({props:{data:l[0],column:l[7],fmt:l[15]}}),{c(){e=N("a"),U(n.$$.fragment),this.h()},l(i){e=R(i,"A",{class:!0,href:!0});var a=B(e);Z(n.$$.fragment,a),a.forEach(b),this.h()},h(){w(e,"class","hover:bg-gray-100"),w(e,"href",t=xn(l[20]))},m(i,a){C(i,e,a),Y(n,e,null),r=!0},p(i,a){const s={};a&1&&(s.data=i[0]),a&128&&(s.column=i[7]),a&32768&&(s.fmt=i[15]),n.$set(s),(!r||a&1048576&&t!==(t=xn(i[20])))&&w(e,"href",t)},i(i){r||(y(n.$$.fragment,i),r=!0)},o(i){k(n.$$.fragment,i),r=!1},d(i){i&&b(e),q(n)}}}function ng(l){let e,n,t,r,i;const a=[K1,G1],s=[];function o(f,u){return f[21]?0:1}return n=o(l),t=s[n]=a[n](l),{c(){e=N("div"),t.c(),this.h()},l(f){e=R(f,"DIV",{class:!0,style:!0});var u=B(e);t.l(u),u.forEach(b),this.h()},h(){w(e,"class","inline-block font-sans pt-2 pb-3 pr-3 pl-0 mr-3 items-center align-top"),w(e,"style",r=` + min-width: ${l[19]}; + max-width: ${l[18]}; + `)},m(f,u){C(f,e,u),s[n].m(e,null),i=!0},p(f,[u]){let c=n;n=o(f),n===c?s[n].p(f,u):(ve(),k(s[c],1,1,()=>{s[c]=null}),ke(),t=s[n],t?t.p(f,u):(t=s[n]=a[n](f),t.c()),y(t,1),t.m(e,null)),(!i||u&786432&&r!==(r=` + min-width: ${f[19]}; + max-width: ${f[18]}; + `))&&w(e,"style",r)},i(f){i||(y(t),i=!0)},o(f){k(t),i=!1},d(f){f&&b(e),s[n].d()}}}function lg(l,e,n){let{data:t}=e,{value:r=null}=e,{comparison:i=null}=e,{comparisonDelta:a=!0}=e,{sparkline:s=null}=e,{sparklineType:o="line"}=e,{sparklineColor:f=void 0}=e,{sparklineValueFmt:u=void 0}=e,{sparklineDateFmt:c=void 0}=e,{sparklineYScale:d=!1}=e,{connectGroup:h=void 0}=e,{fmt:m=void 0}=e,{comparisonFmt:g=void 0}=e,{title:v=null}=e,{comparisonTitle:p=null}=e,{downIsGood:D=!1}=e,{neutralMin:L=0}=e,{neutralMax:V=0}=e,{maxWidth:M="none"}=e,{minWidth:x="18%"}=e,F=!0,S="var(--grey-700)",{link:E=null}=e,I;return l.$$set=_=>{"data"in _&&n(0,t=_.data),"value"in _&&n(6,r=_.value),"comparison"in _&&n(7,i=_.comparison),"comparisonDelta"in _&&n(1,a=_.comparisonDelta),"sparkline"in _&&n(8,s=_.sparkline),"sparklineType"in _&&n(9,o=_.sparklineType),"sparklineColor"in _&&n(10,f=_.sparklineColor),"sparklineValueFmt"in _&&n(11,u=_.sparklineValueFmt),"sparklineDateFmt"in _&&n(12,c=_.sparklineDateFmt),"sparklineYScale"in _&&n(2,d=_.sparklineYScale),"connectGroup"in _&&n(13,h=_.connectGroup),"fmt"in _&&n(14,m=_.fmt),"comparisonFmt"in _&&n(15,g=_.comparisonFmt),"title"in _&&n(3,v=_.title),"comparisonTitle"in _&&n(4,p=_.comparisonTitle),"downIsGood"in _&&n(5,D=_.downIsGood),"neutralMin"in _&&n(16,L=_.neutralMin),"neutralMax"in _&&n(17,V=_.neutralMax),"maxWidth"in _&&n(18,M=_.maxWidth),"minWidth"in _&&n(19,x=_.minWidth),"link"in _&&n(20,E=_.link)},l.$$.update=()=>{var _;if(l.$$.dirty&2&&n(1,a=a==="true"||a===!0),l.$$.dirty&4&&n(2,d=d==="true"||d===!0),l.$$.dirty&32&&n(5,D=D==="true"||D===!0),l.$$.dirty&10486265)try{if(n(21,I=void 0),!r)throw new Error("value is required");Array.isArray(t)||n(0,t=[t]),In(t,[r]);let O=Rl(t,"array"),T=O.find(ee=>ee.id===r);if(n(3,v=v??(T?T.title:null)),i){In(t,[i]);let ee=O.find(we=>we.id===i);n(4,p=p??(ee?ee.title:null))}if(t&&i&&(n(23,F=t[0][i]>=0),n(22,S=F&&!D||!F&&D?"var(--green-700)":"var(--red-700)")),s&&(In(t,[s]),((_=O.find(ee=>ee.id===s))==null?void 0:_.type)!=="date"))throw Error("sparkline must be a date column")}catch(O){n(21,I=O),console.error("\x1B[31m%s\x1B[0m",`Error in Big Value: ${I.message}`)}},[t,a,d,v,p,D,r,i,s,o,f,u,c,h,m,g,L,V,M,x,E,I,S,F]}let rg=class extends he{constructor(e){super(),me(this,e,lg,ng,de,{data:0,value:6,comparison:7,comparisonDelta:1,sparkline:8,sparklineType:9,sparklineColor:10,sparklineValueFmt:11,sparklineDateFmt:12,sparklineYScale:2,connectGroup:13,fmt:14,comparisonFmt:15,title:3,comparisonTitle:4,downIsGood:5,neutralMin:16,neutralMax:17,maxWidth:18,minWidth:19,link:20})}};function ig(l){let e;const n=l[6].default,t=ne(n,l,l[7],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&128)&&le(t,n,r,r[7],e?ie(n,r[7],i,null):re(r[7]),null)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function ag(l){let e,n;const t=[l[4],{data:Et.isQuery(l[9])?Array.from(l[9]):l[9]}];let r={$$slots:{default:[ig]},$$scope:{ctx:l}};for(let i=0;i({9:t}),({loaded:t})=>t?512:0],empty:[sg],error:[og,({loaded:t})=>({9:t}),({loaded:t})=>t?512:0],default:[ag,({loaded:t})=>({9:t}),({loaded:t})=>t?512:0]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,[r]){const i={};r&1&&(i.data=t[0]),r&702&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}let cg="Big Value";function dg(l,e,n){let t,{$$slots:r={},$$scope:i}=e,{data:a}=e;const s=Et.isQuery(a)?a.hash:void 0;let o=(a==null?void 0:a.hash)===s,{emptySet:f=void 0}=e,{emptyMessage:u=void 0}=e;return l.$$set=c=>{n(5,e=A(A({},e),Ee(c))),"data"in c&&n(0,a=c.data),"emptySet"in c&&n(1,f=c.emptySet),"emptyMessage"in c&&n(2,u=c.emptyMessage),"$$scope"in c&&n(7,i=c.$$scope)},l.$$.update=()=>{l.$$.dirty&1&&n(3,o=(a==null?void 0:a.hash)===s),n(4,t=Object.fromEntries(Object.entries(e).filter(([,c])=>c!==void 0)))},e=Ee(e),[a,f,u,o,t,e,r,i]}class F_ extends he{constructor(e){super(),me(this,e,dg,ug,de,{data:0,emptySet:1,emptyMessage:2})}}const hg={trailing:!0};function mg(l,e=25,n={}){if(n={...hg,...n},!Number.isFinite(e))throw new TypeError("Expected `wait` to be a finite number");let t,r,i=[],a,s;const o=(f,u)=>(a=gg(l,f,u),a.finally(()=>{if(a=null,n.trailing&&s&&!r){const c=o(f,s);return s=null,c}}),a);return function(...f){return a?(n.trailing&&(s=f),a):new Promise(u=>{const c=!r&&n.leading;clearTimeout(r),r=setTimeout(()=>{r=null;const d=n.leading?t:o(this,f);for(const h of i)h(d);i=[]},e),c?(t=o(this,f),u(t)):i.push(u)})}}async function gg(l,e,n){return await l.apply(e,n)}function _g(l){l.Map.mergeOptions({smoothWheelZoom:!0,smoothSensitivity:1}),l.Map.SmoothWheelZoom=l.Handler.extend({addHooks:function(){l.DomEvent.on(this._map._container,"wheel",this._onWheelScroll,this)},removeHooks:function(){l.DomEvent.off(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){this._isWheeling||this._onWheelStart(e),this._onWheeling(e)},_onWheelStart:function(e){var n=this._map;this._isWheeling=!0,this._wheelMousePosition=n.mouseEventToContainerPoint(e),this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),this._wheelStartLatLng=n.containerPointToLatLng(this._wheelMousePosition),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),n._panAnim&&n._panAnim.stop(),this._goalZoom=n.getZoom(),this._prevCenter=n.getCenter(),this._prevZoom=n.getZoom(),this._zoomAnimationId=requestAnimationFrame(this._updateWheelZoom.bind(this))},_onWheeling:function(e){var n=this._map;this._goalZoom=this._goalZoom+l.DomEvent.getWheelDelta(e)*.003*n.options.smoothSensitivity,(this._goalZoomn.getMaxZoom())&&(this._goalZoom=n._limitZoom(this._goalZoom)),this._wheelMousePosition=this._map.mouseEventToContainerPoint(e),clearTimeout(this._timeoutId),this._timeoutId=setTimeout(this._onWheelEnd.bind(this),200),l.DomEvent.preventDefault(e),l.DomEvent.stopPropagation(e)},_onWheelEnd:function(){this._isWheeling=!1,cancelAnimationFrame(this._zoomAnimationId),this._map._moveEnd(!0)},_updateWheelZoom:function(){var e=this._map;if(!(!e.getCenter().equals(this._prevCenter)||e.getZoom()!=this._prevZoom)){this._zoom=e.getZoom()+(this._goalZoom-e.getZoom())*.3,this._zoom=Math.floor(this._zoom*100)/100;var n=this._wheelMousePosition.subtract(this._centerPoint);n.x===0&&n.y===0||(e.options.smoothWheelZoom==="center"?this._center=this._startLatLng:this._center=e.unproject(e.project(this._wheelStartLatLng,this._zoom).subtract(n),this._zoom),this._moved||(e._moveStart(!0,!1),this._moved=!0),e._move(this._center,this._zoom),this._prevCenter=e.getCenter(),this._prevZoom=e.getZoom(),this._zoomAnimationId=requestAnimationFrame(this._updateWheelZoom.bind(this)))}}}),l.Map.addInitHook("addHandler","smoothWheelZoom",l.Map.SmoothWheelZoom)}let mt;var $e,wt,qt,sn,Ht,Dt,bn,Jt,Vn,Gt,Bn,Fn,Wn,zn;const An=class An{constructor(){ct(this,$e);ct(this,wt,null);ct(this,qt,new Map);ct(this,sn);ct(this,Ht,Bo());ct(this,Dt);ct(this,bn,!1);ct(this,Jt);ul(this,"updateBounds",mg(()=>{if(pt(this,Dt,mt.latLngBounds()),_e(this,$e).eachLayer(e=>{(e instanceof mt.Marker||e instanceof mt.CircleMarker||e instanceof mt.GeoJSON)&&_e(this,Dt).extend(e.getBounds?e.getBounds():e.getLatLng())}),_e(this,Dt).isValid())_e(this,$e).fitBounds(_e(this,Dt),{maxZoom:12}),_e(this,Jt)&&_e(this,$e).setZoom(_e(this,Jt));else throw console.error("Bounds are invalid!",_e(this,Dt)),new Error("Bounds are invalid!")},100));ct(this,Gt,at(new Map));ul(this,"allGeoJsonLoaded",Ze(_e(this,Gt),e=>Array.from(e.values()).every(Boolean)));ct(this,Bn,at("bottomLeft"));ct(this,Fn,at([]));ct(this,Wn,[]);ct(this,zn,at(void 0));pt(this,wt,null),pt(this,qt,new Map)}get initPromise(){return _e(this,Ht).promise}get mapEl(){return _e(this,sn)}async init(e,n,t,r,i=!1,a){if(mt||(_e(this,Ht).start(),mt=await ls(()=>import("./leaflet-src.C2Mhlg_w.js").then(o=>o.l),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(o=>{const f=o.default;return _g(f),f}).catch(o=>{_e(this,Ht).reject(o)})),pt(this,Jt,r),_e(this,sn)){const o=new Error("Evidence Map already initialized");throw _e(this,Ht).reject(o),o}pt(this,sn,e),pt(this,$e,mt.map(_e(this,sn),{zoomControl:!1,scrollWheelZoom:!1,smoothWheelZoom:!0,smoothSensitivity:5}).setView(t,r??5)),i&&pt(this,bn,!0);const s=this.processBasemapUrl(n);mt.tileLayer(s,{subdomains:"abcd",maxZoom:20,attribution:a}).addTo(_e(this,$e)),a||_e(this,$e).removeControl(_e(this,$e).attributionControl),pt(this,Dt,mt.latLngBounds()),_e(this,Ht).resolve()}cleanup(){_e(this,$e).remove()}addArea(e,n,t,r,i,a,s,o,f){if(!mt)throw new Error("Leaflet is not yet available");this.lastSelectedLayer||(this.lastSelectedLayer=null),this.originalStyles||(this.originalStyles=new Map);const u=mt.geoJSON(t,{...r,onEachFeature:(c,d)=>{this.originalStyles.set(d,r),d.on("click",()=>{this.lastSelectedLayer===d?(d.setStyle(this.originalStyles.get(d)),o(e,n),this.lastSelectedLayer=null):(this.lastSelectedLayer&&this.lastSelectedLayer.setStyle(this.originalStyles.get(this.lastSelectedLayer)),d.bringToFront(),d.setStyle(i),s(e,n),this.lastSelectedLayer=d),a(c),f&&(window.location.href=f)})}}).addTo(_e(this,$e));return _e(this,Dt).extend(u.getBounds()),_e(this,bn)?_e(this,$e).setZoom(_e(this,Jt)??5):this.updateBounds(),u.bringToBack(),u}addCircle(e,n,t,r,i,a,s,o,f){if(!mt)throw new Error("Leaflet is not yet available");_e(this,$e).getPane(t.pane)||(_e(this,$e).createPane(t.pane),_e(this,Wn).forEach((c,d)=>{c===t.pane&&(_e(this,$e).getPane(c).style.zIndex=400+d)}));const u=mt.circleMarker(i,t);return u.addTo(_e(this,$e)),this.updateMarkerStyle(u,t),u.on("click",()=>{if(a(),_e(this,wt)===u){const c={..._e(this,qt).get(u)};this.updateMarkerStyle(u,c),pt(this,wt,null),o(n),a(null)}else{if(_e(this,wt)){const c={..._e(this,qt).get(_e(this,wt))};this.updateMarkerStyle(_e(this,wt),c)}this.updateMarkerStyle(u,r),pt(this,wt,u),s(e,n),a(u)}u.bringToFront(),f&&(window.location.href=f)}),i&&Array.isArray(i)&&i.length===2&&!_e(this,bn)?(_e(this,Dt).extend(i),this.updateBounds()):_e(this,$e).setZoom(_e(this,Jt)??5),u}updateMarkerStyle(e,n){e.setStyle(n),_e(this,qt).has(e)||_e(this,qt).set(e,{...n})}buildTooltip(e,n){let t="",r=n.map(i=>({id:i.id,title:i.title??i.id,showColumnName:i.showColumnName===void 0?!0:i.showColumnName,fieldClass:i.fieldClass??"default-field-class",valueClass:i.valueClass??"default-value-class",fmt:i.fmt??"num0",formatColumnTitle:i.formatColumnTitle===void 0&&i.title===void 0?!0:i.formatColumnTitle,contentType:i.contentType??"text",linkLabel:i.linkLabel??void 0}));if(r)for(let i=0;i`+(r[i].showColumnName?`${r[i].formatColumnTitle?Fo(r[i].title):r[i].title}`:"")+(r[i].contentType==="link"?`${r[i].linkLabel?r[i].linkLabel:_n(e[r[i].id],r[i].fmt)}`:`${_n(e[r[i].id],r[i].fmt)}`)+"";return t}attachTooltip(e,n,t,r){r==="hover"?e.bindTooltip(n,t):r==="click"?e.bindPopup(n,t):console.error("tooltipType must be 'hover' or 'click'")}processBasemapUrl(e){const n=window.devicePixelRatio||1;let t=e;return t.includes("{r}")&&(t=t.replace("{r}",n>1?"@2x":"")),t.includes("{ext}")&&(t=t.replace("{ext}","png")),t}get geoJsonData(){return Qn(_e(this,Gt))}async loadGeoJson(e){const n=_e(An,Vn).get(e);if(n)return n;const t=fetch(e).then(i=>i.json()).catch(i=>{_e(this,Gt).update(a=>(a.delete(e),a)),console.error(`Failed to load GeoJSON at URL '${e}': ${i}`)});_e(An,Vn).set(e,t),_e(this,Gt).update(i=>i.set(e,null));const r=await t;return _e(this,Gt).update(i=>(r?i.set(e,r):i.delete(e),i)),r}handleLegendValues(e,n,t){if(t==="categorical"){n=[...new Set(n)];let i=0;for(;e.length=e.length&&(i=0),e.push(e[i]),i++}else t==="scalar"&&n.forEach(r=>{typeof r!="number"&&r!==null&&console.error("Scalar legend requires numeric values or null."),typeof r=="number"&&isNaN(r)&&console.error("Scalar legend requires valid numeric values.")});return n}handleFillColor(e,n,t,r,i){if(!n)return Ta.blue700;if(e[n])return typeof e[n]=="string"?r[t.indexOf(e[n])]:i(e[n])}updateLegendPosition(e){_e(this,Bn).set(e)}get legendPosition(){let e;return _e(this,Bn).subscribe(n=>e=n)(),e}buildLegend(e,n,t,r,i,a,s,o,f,u){const c=()=>({colorPalette:e,values:n,minValue:t,maxValue:r,legendType:i,valueFmt:a,chartType:s,legendId:o,value:f,legend:u});_e(this,Fn).update(d=>{const h=d.findIndex(m=>m.legendId===o);return h!==-1?d.map((m,g)=>g===h?{...u,...c()}:m):o!==void 0?[...d,c()]:d})}get legendData(){return Qn(_e(this,Fn))}async initializeData(e,{corordinates:n,value:t,checkInputs:r,min:i,max:a,colorPalette:s,legendType:o,valueFmt:f,chartType:u,legendId:c,legend:d}){await e.fetch(),r(e,n);let h=e.map(p=>p[t]),m=Math.min(...h),g=Math.max(...h),v;return o||(typeof h[0]=="number"?o="scalar":o="categorical"),o&&!s&&(s=o==="categorical"?Wo:["lightblue","darkblue"],s=s.map(p=>or(p).hex())),v=or.scale(s).domain([i??m,a??g]),d&&t&&(h=this.handleLegendValues(s,h,o),this.buildLegend(s,h,m,g,o,f,u,c,t,d)),{values:h,colorPalette:s,colorScale:v}}registerPane(e){return _e(this,Wn).push(e),e}handleInternalError(e){e&&_e(this,zn).set(e)}get internalError(){return Qn(_e(this,zn))}};$e=new WeakMap,wt=new WeakMap,qt=new WeakMap,sn=new WeakMap,Ht=new WeakMap,Dt=new WeakMap,bn=new WeakMap,Jt=new WeakMap,Vn=new WeakMap,Gt=new WeakMap,Bn=new WeakMap,Fn=new WeakMap,Wn=new WeakMap,zn=new WeakMap,ct(An,Vn,new Map);let wl=An;const no=Symbol("EvidenceMapContext");function la(l,e,n){const t=l.slice();return t[7]=e[n],t[9]=n,t}function ra(l){let e,n,t,r,i,a=(l[7]||"No value")+"",s,o,f;return{c(){e=N("div"),n=N("span"),r=se(),i=N("span"),s=ue(a),f=se(),this.h()},l(u){e=R(u,"DIV",{class:!0});var c=B(e);n=R(c,"SPAN",{class:!0,style:!0}),B(n).forEach(b),r=fe(c),i=R(c,"SPAN",{class:!0,title:!0});var d=B(i);s=ce(d,a),d.forEach(b),f=fe(c),c.forEach(b),this.h()},h(){w(n,"class",t="inline-block h-[8px] "+(l[0].chartType==="Area Map"?"":"rounded-full")+" w-[8px]"),Fe(n,"background-color",l[0].colorPalette[l[9]]),w(i,"class","inline-block ml-2 truncate max-w-[calc(100%-16px)]"),w(i,"title",o=l[7]),w(e,"class","flex items-center")},m(u,c){C(u,e,c),z(e,n),z(e,r),z(e,i),z(i,s),z(e,f)},p(u,c){c&1&&t!==(t="inline-block h-[8px] "+(u[0].chartType==="Area Map"?"":"rounded-full")+" w-[8px]")&&w(n,"class",t),c&1&&Fe(n,"background-color",u[0].colorPalette[u[9]]),c&1&&a!==(a=(u[7]||"No value")+"")&&De(s,a),c&1&&o!==(o=u[7])&&w(i,"title",o)},d(u){u&&b(e)}}}function bg(l){let e,n,t,r,i,a,s,o,f,u=Ne(l[0].values),c=[];for(let d=0;di-50;return l.$$set=u=>{"legend"in u&&n(0,t=u.legend),"hideLegend"in u&&n(1,r=u.hideLegend),"height"in u&&n(2,i=u.height),"capitalize"in u&&n(5,a=u.capitalize)},[t,r,i,s,f,a]}class vg extends he{constructor(e){super(),me(this,e,yg,bg,de,{legend:0,hideLegend:1,height:2,capitalize:5})}}function kg(l){let e,n,t,r,i,a,s,o,f,u,c=(l[0].valueFmt?_n(l[0].minValue,l[0].valueFmt):l[0].minValue)+"",d,h,m,g=(l[0].valueFmt?_n(l[0].maxValue,l[0].valueFmt):l[0].maxValue)+"",v,p;return{c(){e=N("div"),n=N("div"),t=N("span"),r=ue(l[4]),i=se(),a=N("div"),s=N("span"),o=se(),f=N("div"),u=N("span"),d=ue(c),h=se(),m=N("span"),v=ue(g),this.h()},l(D){e=R(D,"DIV",{class:!0});var L=B(e);n=R(L,"DIV",{class:!0});var V=B(n);t=R(V,"SPAN",{});var M=B(t);r=ce(M,l[4]),M.forEach(b),V.forEach(b),i=fe(L),a=R(L,"DIV",{class:!0});var x=B(a);s=R(x,"SPAN",{style:!0,class:!0});var F=B(s);F.forEach(b),o=fe(x),f=R(x,"DIV",{class:!0});var S=B(f);u=R(S,"SPAN",{class:!0});var E=B(u);d=ce(E,c),E.forEach(b),h=fe(S),m=R(S,"SPAN",{class:!0});var I=B(m);v=ce(I,g),I.forEach(b),S.forEach(b),x.forEach(b),L.forEach(b),this.h()},h(){w(n,"class","flex flex-wrap flex-col font-semibold"),Fe(s,"background",l[0].colorPalette?`linear-gradient(to right, ${l[0].colorPalette.join(", ")})`:"white"),w(s,"class","relative h-2 min-w-56"),w(u,"class","text-[10px] inline-block"),w(m,"class","text-[10px] inline-block"),w(f,"class","flex justify-between"),w(a,"class","flex flex-col justify-center overflow-hidden h-8 w-full"),w(e,"class",p="flex flex-col "+(l[1]?l[2]:l[3])+" transition-[opacity, max-height, overflow-y] duration-[350ms] ease-in-out w-full")},m(D,L){C(D,e,L),z(e,n),z(n,t),z(t,r),z(e,i),z(e,a),z(a,s),z(a,o),z(a,f),z(f,u),z(u,d),z(f,h),z(f,m),z(m,v)},p(D,[L]){L&1&&Fe(s,"background",D[0].colorPalette?`linear-gradient(to right, ${D[0].colorPalette.join(", ")})`:"white"),L&1&&c!==(c=(D[0].valueFmt?_n(D[0].minValue,D[0].valueFmt):D[0].minValue)+"")&&De(d,c),L&1&&g!==(g=(D[0].valueFmt?_n(D[0].maxValue,D[0].valueFmt):D[0].maxValue)+"")&&De(v,g),L&2&&p!==(p="flex flex-col "+(D[1]?D[2]:D[3])+" transition-[opacity, max-height, overflow-y] duration-[350ms] ease-in-out w-full")&&w(e,"class",p)},i:ae,o:ae,d(D){D&&b(e)}}}function pg(l,e,n){let{legend:t}=e,{hideLegend:r=!1}=e,{capitalize:i}=e,a="max-h-[0px] opacity-0",s="max-h-[300px]",o=i(t.value);return l.$$set=f=>{"legend"in f&&n(0,t=f.legend),"hideLegend"in f&&n(1,r=f.hideLegend),"capitalize"in f&&n(5,i=f.capitalize)},[t,r,a,s,o,i]}class Cg extends he{constructor(e){super(),me(this,e,pg,kg,de,{legend:0,hideLegend:1,capitalize:5})}}function Dg(l){let e,n,t,r,i,a,s=l[0]?"Show Legend":"Hide Legend",o,f,u;return{c(){e=N("button"),n=tr("svg"),t=tr("polyline"),i=se(),a=N("span"),o=ue(s),this.h()},l(c){e=R(c,"BUTTON",{class:!0,"aria-label":!0});var d=B(e);n=nr(d,"svg",{xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0,class:!0});var h=B(n);t=nr(h,"polyline",{points:!0}),B(t).forEach(b),h.forEach(b),i=fe(d),a=R(d,"SPAN",{class:!0});var m=B(a);o=ce(m,s),m.forEach(b),d.forEach(b),this.h()},h(){w(t,"points","14 17 10 12 14 7"),w(n,"xmlns","http://www.w3.org/2000/svg"),w(n,"width",`8 + `),w(n,"height","8"),w(n,"viewBox","6 6 12 12"),w(n,"fill","none"),w(n,"stroke","#374151"),w(n,"stroke-width","1"),w(n,"stroke-linecap","round"),w(n,"stroke-linejoin","round"),w(n,"class",r="transform transition-transform duration-300 ease-in-out text-left gray-500 "+(l[0]?l[3][l[2]].hide:l[3][l[2]].show)),w(a,"class","sr-only"),w(e,"class","flex z-[1] items-center px-[8px] py-[1.5px]"),w(e,"aria-label","Toggle Legend")},m(c,d){C(c,e,d),z(e,n),z(n,t),z(e,i),z(e,a),z(a,o),f||(u=[Ie(e,"click",function(){mo(l[1])&&l[1].apply(this,arguments)}),Ie(e,"dblclick",Sg)],f=!0)},p(c,[d]){l=c,d&5&&r!==(r="transform transition-transform duration-300 ease-in-out text-left gray-500 "+(l[0]?l[3][l[2]].hide:l[3][l[2]].show))&&w(n,"class",r),d&1&&s!==(s=l[0]?"Show Legend":"Hide Legend")&&De(o,s)},i:ae,o:ae,d(c){c&&b(e),f=!1,ft(u)}}}const Sg=l=>l.stopPropagation();function Eg(l,e,n){let{hideLegend:t=!1}=e,{handleLegendToggle:r}=e,{legendPosition:i="bottomLeft"}=e,a="down";i.includes("top")?a="up":i.includes("bottom")&&(a="down");const s={down:{show:"rotate-[270deg]",hide:"rotate-90"},up:{show:"rotate-90",hide:"rotate-[270deg]"}};return l.$$set=o=>{"hideLegend"in o&&n(0,t=o.hideLegend),"handleLegendToggle"in o&&n(1,r=o.handleLegendToggle),"legendPosition"in o&&n(4,i=o.legendPosition)},[t,r,a,s,i]}class Tg extends he{constructor(e){super(),me(this,e,Eg,Dg,de,{hideLegend:0,handleLegendToggle:1,legendPosition:4})}}function ia(l,e,n){const t=l.slice();return t[14]=e[n],t}function aa(l,e,n){const t=l.slice();return t[14]=e[n],t}function oa(l){let e,n,t,r,i,a,s,o,f,u,c,d,h=l[4].length>0&&sa(l),m=l[5].length>0&&ua(l);return s=new Tg({props:{handleLegendToggle:l[11],hideLegend:l[6],multiLegend:l[7],legendPosition:l[1]}}),{c(){e=N("div"),n=N("div"),h&&h.c(),t=se(),m&&m.c(),i=se(),a=N("div"),U(s.$$.fragment),this.h()},l(g){e=R(g,"DIV",{class:!0,role:!0});var v=B(e);n=R(v,"DIV",{class:!0});var p=B(n);h&&h.l(p),t=fe(p),m&&m.l(p),p.forEach(b),i=fe(v),a=R(v,"DIV",{class:!0});var D=B(a);Z(s.$$.fragment,D),D.forEach(b),v.forEach(b),this.h()},h(){w(n,"class",r="bg-white background-blur "+l[13][l[1]]+" svelte-168cccw"),w(a,"class",o="bg-white background-blur flex justify-center w-fit transition-[border-radius] ease-in-out "+(l[1].includes("bottom")?"shadow-bottom":"")+" svelte-168cccw"),tt(a,"rounded",l[6]),tt(a,"delay-[225ms]",l[6]),tt(a,"rounded-b",!l[6]&&l[1].includes("bottom")),tt(a,"rounded-t",!l[6]&&!l[1].includes("bottom")),w(e,"class",f="absolute z-[401] m-4 flex max-w-60 flex legend-font "+l[12]()+" "+(l[9][l[1]]??"top-3 left-[-9px]")+" svelte-168cccw"),w(e,"role","group")},m(g,v){C(g,e,v),z(e,n),h&&h.m(n,null),z(n,t),m&&m.m(n,null),z(e,i),z(e,a),Y(s,a,null),u=!0,c||(d=[Ie(e,"wheel",Mg),Ie(e,"dblclick",wg)],c=!0)},p(g,v){g[4].length>0?h?(h.p(g,v),v&16&&y(h,1)):(h=sa(g),h.c(),y(h,1),h.m(n,t)):h&&(ve(),k(h,1,1,()=>{h=null}),ke()),g[5].length>0?m?(m.p(g,v),v&32&&y(m,1)):(m=ua(g),m.c(),y(m,1),m.m(n,null)):m&&(ve(),k(m,1,1,()=>{m=null}),ke()),(!u||v&2&&r!==(r="bg-white background-blur "+g[13][g[1]]+" svelte-168cccw"))&&w(n,"class",r);const p={};v&64&&(p.hideLegend=g[6]),v&128&&(p.multiLegend=g[7]),v&2&&(p.legendPosition=g[1]),s.$set(p),(!u||v&2&&o!==(o="bg-white background-blur flex justify-center w-fit transition-[border-radius] ease-in-out "+(g[1].includes("bottom")?"shadow-bottom":"")+" svelte-168cccw"))&&w(a,"class",o),(!u||v&66)&&tt(a,"rounded",g[6]),(!u||v&66)&&tt(a,"delay-[225ms]",g[6]),(!u||v&66)&&tt(a,"rounded-b",!g[6]&&g[1].includes("bottom")),(!u||v&66)&&tt(a,"rounded-t",!g[6]&&!g[1].includes("bottom")),(!u||v&2&&f!==(f="absolute z-[401] m-4 flex max-w-60 flex legend-font "+g[12]()+" "+(g[9][g[1]]??"top-3 left-[-9px]")+" svelte-168cccw"))&&w(e,"class",f)},i(g){u||(y(h),y(m),y(s.$$.fragment,g),u=!0)},o(g){k(h),k(m),k(s.$$.fragment,g),u=!1},d(g){g&&b(e),h&&h.d(),m&&m.d(),q(s),c=!1,ft(d)}}}function sa(l){let e,n,t=Ne(l[4]),r=[];for(let a=0;ak(r[a],1,1,()=>{r[a]=null});return{c(){e=N("div");for(let a=0;ak(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;a0&&oa(l);return{c(){t&&t.c(),e=K()},l(r){t&&t.l(r),e=K()},m(r,i){t&&t.m(r,i),C(r,e,i),n=!0},p(r,[i]){r[8].length>0?t?(t.p(r,i),i&256&&y(t,1)):(t=oa(r),t.c(),y(t,1),t.m(e.parentNode,e)):t&&(ve(),k(t,1,1,()=>{t=null}),ke())},i(r){n||(y(t),n=!0)},o(r){k(t),n=!1},d(r){r&&b(e),t&&t.d(r)}}}function lo(l){return l&&l.charAt(0).toUpperCase()+l.slice(1).toLowerCase()}const Mg=l=>l.stopPropagation(),wg=l=>l.stopPropagation();function Pg(l,e,n){let t,r,i=ae,a=()=>(i(),i=Ln(g,M=>n(4,r=M)),g),s,o,f=ae,u=()=>(f(),f=Ln(d,M=>n(8,o=M)),d);l.$$.on_destroy.push(()=>i()),l.$$.on_destroy.push(()=>f());const c={topLeft:"top-[-9px] left-[-9px]",topRight:"top-[-9px] right-[-9px]",bottomLeft:"bottom-[-9px] left-[-9px]",bottomRight:"bottom-[-9px] right-[-9px] "};let{legendData:d}=e;u();let{legendPosition:h="bottomLeft"}=e,{height:m=300}=e,{categoricalLegendData:g=Ze(d,M=>M.filter(x=>x.legendType==="categorical"))}=e;a();let v=Ze(d,M=>M.filter(x=>x.legendType==="scalar"));Pe(l,v,M=>n(5,s=M));let p=!1;const D=()=>{n(6,p=!p)},L=()=>{let M="";return h.includes("bottom")?M+="flex-col":M+="flex-col-reverse",h.includes("Right")&&(M+=" items-end"),M},V={bottomLeft:"rounded-t rounded-br shadow-bottom-right",bottomRight:"rounded-t rounded-bl shadow-bottom-left",topLeft:"rounded-b rounded-tr z-[405] shadow-bottom",topRight:"rounded-b rounded-tl z-[405] shadow-bottom"};return l.$$set=M=>{"legendData"in M&&u(n(0,d=M.legendData)),"legendPosition"in M&&n(1,h=M.legendPosition),"height"in M&&n(2,m=M.height),"categoricalLegendData"in M&&a(n(3,g=M.categoricalLegendData))},l.$$.update=()=>{l.$$.dirty&48&&n(7,t=r.length>1||s.length>1||s.length>0&&r.length>0)},[d,h,m,g,r,s,p,t,o,c,v,D,L,V]}class Ig extends he{constructor(e){super(),me(this,e,Pg,Og,de,{legendData:0,legendPosition:1,height:2,categoricalLegendData:3})}}function Ag(l){let e,n,t,r,i,a,s,o,f,u=l[1]&&da(l);const c=l[18].default,d=ne(c,l,l[17],null);let h=l[6]&&ha(l),m=!l[7]&&ma(l);return{c(){e=N("div"),u&&u.c(),n=se(),t=N("div"),r=N("div"),d&&d.c(),i=se(),h&&h.c(),a=se(),m&&m.c(),this.h()},l(g){e=R(g,"DIV",{class:!0});var v=B(e);u&&u.l(v),n=fe(v),t=R(v,"DIV",{class:!0,style:!0});var p=B(t);r=R(p,"DIV",{class:!0});var D=B(r);d&&d.l(D),D.forEach(b),i=fe(p),h&&h.l(p),p.forEach(b),a=fe(v),m&&m.l(v),v.forEach(b),this.h()},h(){w(r,"class","svelte-tuhe9b"),w(t,"class","z-0 rounded-md focus:outline-none svelte-tuhe9b"),Fe(t,"height",l[0]+"px"),w(e,"class","relative break-inside-avoid svelte-tuhe9b")},m(g,v){C(g,e,v),u&&u.m(e,null),z(e,n),z(e,t),z(t,r),d&&d.m(r,null),z(t,i),h&&h.m(t,null),l[20](t),z(e,a),m&&m.m(e,null),s=!0,o||(f=Ie(r,"dispatcherror",l[19]),o=!0)},p(g,v){g[1]?u?u.p(g,v):(u=da(g),u.c(),u.m(e,n)):u&&(u.d(1),u=null),d&&d.p&&(!s||v&131072)&&le(d,c,g,g[17],s?ie(c,g[17],v,null):re(g[17]),null),g[6]?h?(h.p(g,v),v&64&&y(h,1)):(h=ha(g),h.c(),y(h,1),h.m(t,null)):h&&(ve(),k(h,1,1,()=>{h=null}),ke()),(!s||v&1)&&Fe(t,"height",g[0]+"px"),g[7]?m&&(ve(),k(m,1,1,()=>{m=null}),ke()):m?(m.p(g,v),v&128&&y(m,1)):(m=ma(g),m.c(),y(m,1),m.m(e,null))},i(g){s||(y(d,g),y(h),y(m),s=!0)},o(g){k(d,g),k(h),k(m),s=!1},d(g){g&&b(e),u&&u.d(),d&&d.d(g),h&&h.d(),l[20](null),m&&m.d(),o=!1,f()}}}function Lg(l){let e,n;return e=new Vl({props:{error:l[5],chartType:l[3]}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&32&&(i.error=t[5]),r&8&&(i.chartType=t[3]),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function da(l){let e,n;return{c(){e=N("h4"),n=ue(l[1]),this.h()},l(t){e=R(t,"H4",{class:!0});var r=B(e);n=ce(r,l[1]),r.forEach(b),this.h()},h(){w(e,"class","markdown mb-2")},m(t,r){C(t,e,r),z(e,n)},p(t,r){r&2&&De(n,t[1])},d(t){t&&b(e)}}}function ha(l){let e,n;return e=new Ig({props:{legendData:l[9],legendPosition:l[2],height:l[0]}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.legendPosition=t[2]),r&1&&(i.height=t[0]),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function ma(l){let e,n,t;return n=new Da({}),{c(){e=N("div"),U(n.$$.fragment),this.h()},l(r){e=R(r,"DIV",{class:!0,style:!0});var i=B(e);Z(n.$$.fragment,i),i.forEach(b),this.h()},h(){w(e,"class","absolute left-0 right-0 bottom-0 w-full *:m-0 bg-white svelte-tuhe9b"),Fe(e,"height",l[0]+"px")},m(r,i){C(r,e,i),Y(n,e,null),t=!0},p(r,i){(!t||i&1)&&Fe(e,"height",r[0]+"px")},i(r){t||(y(n.$$.fragment,r),t=!0)},o(r){k(n.$$.fragment,r),t=!1},d(r){r&&b(e),q(n)}}}function Ng(l){let e,n,t,r;const i=[Lg,Ag],a=[];function s(o,f){return o[5]?0:1}return e=s(l),n=a[e]=i[e](l),{c(){n.c(),t=K()},l(o){n.l(o),t=K()},m(o,f){a[e].m(o,f),C(o,t,f),r=!0},p(o,[f]){let u=e;e=s(o),e===u?a[e].p(o,f):(ve(),k(a[u],1,1,()=>{a[u]=null}),ke(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),y(n,1),n.m(t.parentNode,t))},i(o){r||(y(n),r=!0)},o(o){k(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}const Rg=39.077;function Vg(l,e,n){let t,r,i,{$$slots:a={},$$scope:s}=e,o,{startingLat:f=void 0}=e,{startingLong:u=void 0}=e,{startingZoom:c=void 0}=e;const d=-180,h=f||u;let{height:m=300}=e,{basemap:g=void 0}=e,{title:v=void 0}=e,p,{attribution:D=void 0}=e;const L=new wl;jn(no,L);const V=L.allGeoJsonLoaded;Pe(l,V,_=>n(7,i=_));let M=L.legendData;Pe(l,M,_=>n(6,r=_));let{legendPosition:x="bottomLeft"}=e,F=L.internalError;Pe(l,F,_=>n(16,t=_));let{chartType:S="Map"}=e;Il(async()=>{try{const _=f??!1?[f,u]:[Rg,d];return await L.init(o,g??"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",_,c,h,D),()=>L.cleanup()}catch(_){n(5,p=_.message),console.error(_)}});const E=_=>n(5,p=_.detail);function I(_){Ae[_?"unshift":"push"](()=>{o=_,n(4,o)})}return l.$$set=_=>{"startingLat"in _&&n(11,f=_.startingLat),"startingLong"in _&&n(12,u=_.startingLong),"startingZoom"in _&&n(13,c=_.startingZoom),"height"in _&&n(0,m=_.height),"basemap"in _&&n(14,g=_.basemap),"title"in _&&n(1,v=_.title),"attribution"in _&&n(15,D=_.attribution),"legendPosition"in _&&n(2,x=_.legendPosition),"chartType"in _&&n(3,S=_.chartType),"$$scope"in _&&n(17,s=_.$$scope)},l.$$.update=()=>{l.$$.dirty&4&&x&&L.updateLegendPosition(x),l.$$.dirty&65536&&console.log(t),l.$$.dirty&65536&&t!==void 0&&n(5,p=t)},[m,v,x,S,o,p,r,i,V,M,F,f,u,c,g,D,t,s,a,E,I]}class Bg extends he{constructor(e){super(),me(this,e,Vg,Ng,de,{startingLat:11,startingLong:12,startingZoom:13,height:0,basemap:14,title:1,attribution:15,legendPosition:2,chartType:3})}}function Fg(l,e,n){let{map:t=void 0}=e,{feature:r=void 0}=e,{areaOptions:i=void 0}=e,{selectedAreaOptions:a=void 0}=e,{onclick:s=void 0}=e,{setInput:o=void 0}=e,{unsetInput:f=void 0}=e,{item:u=void 0}=e,{tooltip:c=void 0}=e,{tooltipOptions:d=void 0}=e,{tooltipType:h=void 0}=e,{showTooltip:m=void 0}=e,{link:g=void 0}=e,{name:v=void 0}=e;return Il(()=>{const p=t.addArea(u,v,r,i,a,s,o,f,u[g]);if(m){const D=t.buildTooltip(u,c);t.attachTooltip(p,D,d,h)}return()=>p.remove()}),l.$$set=p=>{"map"in p&&n(0,t=p.map),"feature"in p&&n(1,r=p.feature),"areaOptions"in p&&n(2,i=p.areaOptions),"selectedAreaOptions"in p&&n(3,a=p.selectedAreaOptions),"onclick"in p&&n(4,s=p.onclick),"setInput"in p&&n(5,o=p.setInput),"unsetInput"in p&&n(6,f=p.unsetInput),"item"in p&&n(7,u=p.item),"tooltip"in p&&n(8,c=p.tooltip),"tooltipOptions"in p&&n(9,d=p.tooltipOptions),"tooltipType"in p&&n(10,h=p.tooltipType),"showTooltip"in p&&n(11,m=p.showTooltip),"link"in p&&n(12,g=p.link),"name"in p&&n(13,v=p.name)},[t,r,i,a,s,o,f,u,c,d,h,m,g,v]}class Wg extends he{constructor(e){super(),me(this,e,Fg,null,de,{map:0,feature:1,areaOptions:2,selectedAreaOptions:3,onclick:4,setInput:5,unsetInput:6,item:7,tooltip:8,tooltipOptions:9,tooltipType:10,showTooltip:11,link:12,name:13})}}function ga(l,e,n){const t=l.slice();t[47]=e[n];const r=t[24].find(function(...a){return l[42](t[47],...a)});return t[48]=r,t}function zg(l){return{c:ae,l:ae,m:ae,p:ae,i:ae,o:ae,d:ae}}function jg(l){let e,n,t={ctx:l,current:null,token:null,hasCatch:!0,pending:Yg,then:Zg,catch:Ug,error:51,blocks:[,,,]};return El(l[28](),t),{c(){e=K(),t.block.c()},l(r){e=K(),t.block.l(r)},m(r,i){C(r,e,i),t.block.m(r,t.anchor=i),t.mount=()=>e.parentNode,t.anchor=e,n=!0},p(r,i){l=r,Ra(t,l,i)},i(r){n||(y(t.block),n=!0)},o(r){for(let i=0;i<3;i+=1){const a=t.blocks[i];k(a)}n=!1},d(r){r&&b(e),t.block.d(r),t.token=null,t=null}}}function Ug(l){let e=l[26].handleInternalError(l[51])+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p:ae,i:ae,o:ae,d(t){t&&b(n)}}}function Zg(l){let e=[],n=new Map,t,r,i=Ne(l[23]);const a=s=>s[47].properties[s[7]];for(let s=0;se.parentNode,r.anchor=e,t=!0},p(i,a){l=i,r.ctx=l,a[0]&32&&n!==(n=Promise.all([l[26].initPromise,l[5].fetch()]))&&El(n,r)||Ra(r,l,a)},i(i){t||(y(r.block),t=!0)},o(i){for(let a=0;a<3;a+=1){const s=r.blocks[a];k(s)}t=!1},d(i){i&&b(e),r.block.d(i),r.token=null,r=null}}}function Jg(l,e,n){let t,r,i=ae,a=()=>(i(),i=Ln(f,H=>n(24,r=H)),f);l.$$.on_destroy.push(()=>i());const s=Ia();Pe(l,s,H=>n(43,t=H));const o=Un(no);if(!o)throw new Error("Evidence Map Context has not been set. Areas will not function");let{data:f}=e;a();let{geoJsonUrl:u="https://evd-geojson.b-cdn.net/ca_california_zip_codes_geo_1.min.json"}=e,{areaCol:c=void 0}=e,{geoId:d=void 0}=e,{value:h=void 0}=e,{valueFmt:m=void 0}=e,{min:g=void 0}=e,{max:v=void 0}=e,{link:p=void 0}=e,{name:D=void 0}=e,{legendType:L=void 0}=e,{chartType:V="Area Map"}=e,{legend:M=!0}=e,{onclick:x=()=>{}}=e,{borderWidth:F=void 0}=e;if(F){if(F=Number(F),isNaN(F))throw Error("borderWidth must be a number");if(F<0)throw Error("borderWidth cannot be negative")}else F=.75;let{color:S=void 0}=e,{borderColor:E=Ta.grey300}=e,{colorPalette:I=void 0}=e,{opacity:_=void 0}=e;if(_){if(_=Number(_),isNaN(_))throw Error("opacity must be a number");if(_<0)throw Error("opacity cannot be negative")}else _=.9;let{areaClass:O=void 0}=e,{selectedBorderWidth:T=1}=e;if(T){if(T=Number(T),isNaN(T))throw Error("selectedBorderWidth must be a number");if(T<0)throw Error("selectedBorderWidth cannot be negative")}else T=.75;let{selectedColor:ee="#d42a2a"}=e,{selectedBorderColor:we="#ab1818"}=e,{selectedOpacity:Se=void 0}=e;if(Se){if(Se=Number(Se),isNaN(Se))throw Error("selectedOpacity must be a number");if(Se<0)throw Error("selectedOpacity cannot be negative")}else Se=1;let{selectedAreaClass:Re=void 0}=e,{showTooltip:G=!0}=e,{tooltip:Oe=[]}=e;Oe.length===0&&(c&&Oe.push({id:c,showColumnName:!1,valueClass:"font-bold text-sm",fmt:"id"}),h&&Oe.push({id:h,fmt:m}));let{tooltipClass:Te=void 0}=e,{tooltipType:ye="hover"}=e;const We={permanent:!1,direction:"auto",sticky:!0,opacity:1,className:`${Te}`,interactive:!0};async function Ge(){const H=u,Me=await o.loadGeoJson(H);if(!Me||u!==H)return;const rt=new Set(f.map(je=>je[c].toString()));n(23,dt=Me==null?void 0:Me.features.filter(je=>rt.has(je.properties[d])))}let Q,ut,dt=[],Ve=zo();async function Lt(){let H={corordinates:[c],value:h,checkInputs:In,min:g,max:v,colorPalette:I,legendType:L,valueFmt:m,chartType:V,legendId:Ve,legend:M};await f.fetch(),S||n(21,{values:Q,colorPalette:I,legendType:L,colorScale:ut}=await o.initializeData(f,H),Q,n(1,I),n(31,L),n(22,ut)),await Ge(),D&&r.length>0&&Ot(r[0],D)}function Ot(H,Me){yn(s,t[Me]=Object.fromEntries(Object.keys(H).map(rt=>[rt,!0])),t)}function X(H,Me){yn(s,t[Me]=Object.fromEntries(Object.entries(H).map(([rt,je])=>[rt,typeof je=="string"?je.replaceAll("'","''"):je])),t)}function Nt(H,Me){s.update(rt=>(Object.prototype.hasOwnProperty.call(rt,Me)&&delete rt[Me],rt)),Ot(H,Me)}const J=H=>{x(H)},ge=H=>{D&&X(H,D)},j=H=>{D&&Nt(H,D)},nt=(H,Me)=>Me[c].toString()===H.properties[d];return l.$$set=H=>{"data"in H&&a(n(5,f=H.data)),"geoJsonUrl"in H&&n(32,u=H.geoJsonUrl),"areaCol"in H&&n(6,c=H.areaCol),"geoId"in H&&n(7,d=H.geoId),"value"in H&&n(8,h=H.value),"valueFmt"in H&&n(33,m=H.valueFmt),"min"in H&&n(34,g=H.min),"max"in H&&n(35,v=H.max),"link"in H&&n(9,p=H.link),"name"in H&&n(10,D=H.name),"legendType"in H&&n(31,L=H.legendType),"chartType"in H&&n(36,V=H.chartType),"legend"in H&&n(37,M=H.legend),"onclick"in H&&n(11,x=H.onclick),"borderWidth"in H&&n(0,F=H.borderWidth),"color"in H&&n(12,S=H.color),"borderColor"in H&&n(13,E=H.borderColor),"colorPalette"in H&&n(1,I=H.colorPalette),"opacity"in H&&n(2,_=H.opacity),"areaClass"in H&&n(14,O=H.areaClass),"selectedBorderWidth"in H&&n(3,T=H.selectedBorderWidth),"selectedColor"in H&&n(15,ee=H.selectedColor),"selectedBorderColor"in H&&n(16,we=H.selectedBorderColor),"selectedOpacity"in H&&n(4,Se=H.selectedOpacity),"selectedAreaClass"in H&&n(17,Re=H.selectedAreaClass),"showTooltip"in H&&n(18,G=H.showTooltip),"tooltip"in H&&n(19,Oe=H.tooltip),"tooltipClass"in H&&n(38,Te=H.tooltipClass),"tooltipType"in H&&n(20,ye=H.tooltipType)},l.$$.update=()=>{l.$$.dirty[0]&96|l.$$.dirty[1]&2&&(async()=>(await f.fetch(),await Ge()))()},[F,I,_,T,Se,f,c,d,h,p,D,x,S,E,O,ee,we,Re,G,Oe,ye,Q,ut,dt,r,s,o,We,Lt,X,Nt,L,u,m,g,v,V,M,Te,J,ge,j,nt]}class Gg extends he{constructor(e){super(),me(this,e,Jg,Hg,de,{data:5,geoJsonUrl:32,areaCol:6,geoId:7,value:8,valueFmt:33,min:34,max:35,link:9,name:10,legendType:31,chartType:36,legend:37,onclick:11,borderWidth:0,color:12,borderColor:13,colorPalette:1,opacity:2,areaClass:14,selectedBorderWidth:3,selectedColor:15,selectedBorderColor:16,selectedOpacity:4,selectedAreaClass:17,showTooltip:18,tooltip:19,tooltipClass:38,tooltipType:20},null,[-1,-1])}}const Kg=l=>({data:l&1024}),ba=l=>({data:l[10]});function ya(l){let e,n;return{c(){e=N("h4"),n=ue(l[1]),this.h()},l(t){e=R(t,"H4",{class:!0});var r=B(e);n=ce(r,l[1]),r.forEach(b),this.h()},h(){w(e,"class","markdown mb-2")},m(t,r){C(t,e,r),z(e,n)},p(t,r){r&2&&De(n,t[1])},d(t){t&&b(e)}}}function Qg(l){let e;const n=l[8].default,t=ne(n,l,l[9],ba);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&1536)&&le(t,n,r,r[9],e?ie(n,r[9],i,Kg):re(r[9]),ba)},i(r){e||(y(t,r),e=!0)},o(r){k(t,r),e=!1},d(r){t&&t.d(r)}}}function Xg(l){let e,n;const t=[l[7],{title:void 0}];let r={$$slots:{default:[Qg]},$$scope:{ctx:l}};for(let i=0;i({10:a}),({loaded:a})=>a?1024:0],empty:[xg],default:[Xg,({loaded:a})=>({10:a}),({loaded:a})=>a?1024:0]},$$scope:{ctx:l}}}),{c(){e=N("div"),i&&i.c(),n=se(),U(t.$$.fragment),this.h()},l(a){e=R(a,"DIV",{style:!0});var s=B(e);i&&i.l(s),n=fe(s),Z(t.$$.fragment,s),s.forEach(b),this.h()},h(){Fe(e,"margin-top","15px"),Fe(e,"margin-bottom","10px")},m(a,s){C(a,e,s),i&&i.m(e,null),z(e,n),Y(t,e,null),r=!0},p(a,[s]){a[1]?i?i.p(a,s):(i=ya(a),i.c(),i.m(e,n)):i&&(i.d(1),i=null);const o={};s&1&&(o.data=a[0]),s&1788&&(o.$$scope={dirty:s,ctx:a}),t.$set(o)},i(a){r||(y(t.$$.fragment,a),r=!0)},o(a){k(t.$$.fragment,a),r=!1},d(a){a&&b(e),i&&i.d(),q(t)}}}function t_(l,e,n){const t=["data","title","emptySet","emptyMessage","chartType","isInitial","error"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{data:s}=e,{title:o=void 0}=e,{emptySet:f=void 0}=e,{emptyMessage:u=void 0}=e,{chartType:c=void 0}=e,{isInitial:d=!0}=e,{error:h=void 0}=e;return l.$$set=m=>{e=A(A({},e),Ee(m)),n(7,r=$(e,t)),"data"in m&&n(0,s=m.data),"title"in m&&n(1,o=m.title),"emptySet"in m&&n(2,f=m.emptySet),"emptyMessage"in m&&n(3,u=m.emptyMessage),"chartType"in m&&n(4,c=m.chartType),"isInitial"in m&&n(5,d=m.isInitial),"error"in m&&n(6,h=m.error),"$$scope"in m&&n(9,a=m.$$scope)},[s,o,f,u,c,d,h,r,i,a]}class n_ extends he{constructor(e){super(),me(this,e,t_,e_,de,{data:0,title:1,emptySet:2,emptyMessage:3,chartType:4,isInitial:5,error:6})}}function l_(l){let e,n;const t=[{data:l[15]},{geoJsonUrl:l[2]},{geoId:l[3]},{areaCol:l[4]},{legendType:l[12]},{chartType:Pl},{legend:l[13]},l[18]];let r={};for(let i=0;i({15:t}),({data:t})=>t?32768:0]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Z(e.$$.fragment,t)},m(t,r){Y(e,t,r),n=!0},p(t,[r]){const i={};r&32768&&(i.data=t[15]),r&32&&(i.startingLat=t[5]),r&64&&(i.startingLong=t[6]),r&128&&(i.startingZoom=t[7]),r&256&&(i.height=t[8]),r&512&&(i.basemap=t[9]),r&1024&&(i.title=t[10]),r&2048&&(i.legendPosition=t[11]),r&131072&&(i.isInitial=t[17]),r&1&&(i.emptySet=t[0]),r&2&&(i.emptyMessage=t[1]),r&65536&&(i.error=t[16]),r&16384&&(i.attribution=t[14]),r&2469916&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(y(e.$$.fragment,t),n=!0)},o(t){k(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}const Pl="Area Map";function i_(l,e,n){let t;const r=["emptySet","emptyMessage","data","geoJsonUrl","geoId","areaCol","startingLat","startingLong","startingZoom","height","basemap","title","legendPosition","legendType","legend","attribution"];let i=$(e,r),{emptySet:a=void 0}=e,{emptyMessage:s=void 0}=e,o,{data:f}=e;f||(o="data is required");let{geoJsonUrl:u="https://evd-geojson.b-cdn.net/ca_california_zip_codes_geo_1.min.json"}=e,{geoId:c=void 0}=e;c||(o="geoId is required. This is the name of the field in your geoJSON file which identifies the area/feature");let{areaCol:d=void 0}=e;d||(o="areaCol is required. This is the name of the column in your query result which contains the identifier for the area you want to map");let{startingLat:h=void 0}=e,{startingLong:m=void 0}=e,{startingZoom:g=void 0}=e,{height:v=300}=e,{basemap:p=void 0}=e,{title:D=void 0}=e,{legendPosition:L="bottomLeft"}=e,{legendType:V=void 0}=e,{legend:M=!0}=e,{attribution:x=void 0}=e;const F=Et.isQuery(f)?f.hash:void 0,S=E=>n(16,o=E.detail);return l.$$set=E=>{e=A(A({},e),Ee(E)),n(18,i=$(e,r)),"emptySet"in E&&n(0,a=E.emptySet),"emptyMessage"in E&&n(1,s=E.emptyMessage),"data"in E&&n(15,f=E.data),"geoJsonUrl"in E&&n(2,u=E.geoJsonUrl),"geoId"in E&&n(3,c=E.geoId),"areaCol"in E&&n(4,d=E.areaCol),"startingLat"in E&&n(5,h=E.startingLat),"startingLong"in E&&n(6,m=E.startingLong),"startingZoom"in E&&n(7,g=E.startingZoom),"height"in E&&n(8,v=E.height),"basemap"in E&&n(9,p=E.basemap),"title"in E&&n(10,D=E.title),"legendPosition"in E&&n(11,L=E.legendPosition),"legendType"in E&&n(12,V=E.legendType),"legend"in E&&n(13,M=E.legend),"attribution"in E&&n(14,x=E.attribution)},l.$$.update=()=>{l.$$.dirty&32768&&n(17,t=(f==null?void 0:f.hash)===F)},[a,s,u,c,d,h,m,g,v,p,D,L,V,M,x,f,o,t,i,S]}class W_ extends he{constructor(e){super(),me(this,e,i_,r_,de,{emptySet:0,emptyMessage:1,data:15,geoJsonUrl:2,geoId:3,areaCol:4,startingLat:5,startingLong:6,startingZoom:7,height:8,basemap:9,title:10,legendPosition:11,legendType:12,legend:13,attribution:14})}}export{W_ as A,F_ as B,R_ as D,V_ as Q}; diff --git a/_app/immutable/chunks/Button.DOpmxt6h.js b/_app/immutable/chunks/Button.DOpmxt6h.js new file mode 100644 index 0000000000000000000000000000000000000000..99ca30a47642bcf704a79ad46ec4111a4aff76bf --- /dev/null +++ b/_app/immutable/chunks/Button.DOpmxt6h.js @@ -0,0 +1 @@ +import{s as G,z as N,e as O,a as k,d as U,g as p,c as S,f as w,j as h,A as y,k as H,l as B,B as J,C as K,D as L,E as M,F as Q,G as R}from"./scheduler.BZlHRu_0.js";import{S as V,i as W,t as m,g as P,b as _,d as C,c as j,a as q,m as v,e as A}from"./index.a_oafgNU.js";import{I as D}from"./VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";function E(t){let e,s;return e=new D({props:{src:t[1],class:z[t[4]]}}),{c(){j(e.$$.fragment)},l(i){q(e.$$.fragment,i)},m(i,u){v(e,i,u),s=!0},p(i,u){const f={};u&2&&(f.src=i[1]),u&16&&(f.class=z[i[4]]),e.$set(f)},i(i){s||(m(e.$$.fragment,i),s=!0)},o(i){_(e.$$.fragment,i),s=!1},d(i){A(e,i)}}}function I(t){let e,s;return e=new D({props:{src:t[1],class:z[t[4]]}}),{c(){j(e.$$.fragment)},l(i){q(e.$$.fragment,i)},m(i,u){v(e,i,u),s=!0},p(i,u){const f={};u&2&&(f.src=i[1]),u&16&&(f.class=z[i[4]]),e.$set(f)},i(i){s||(m(e.$$.fragment,i),s=!0)},o(i){_(e.$$.fragment,i),s=!1},d(i){A(e,i)}}}function X(t){let e,s,i,u,f,g,d,a=t[2]==="left"&&t[1]&&E(t);const b=t[10].default,r=N(b,t,t[9],null);let o=t[2]==="right"&&t[1]&&I(t);return{c(){e=O("button"),a&&a.c(),s=k(),r&&r.c(),i=k(),o&&o.c(),this.h()},l(n){e=U(n,"BUTTON",{type:!0,formaction:!0,class:!0});var l=p(e);a&&a.l(l),s=S(l),r&&r.l(l),i=S(l),o&&o.l(l),l.forEach(w),this.h()},h(){h(e,"type",t[0]),e.disabled=t[7],h(e,"formaction",t[8]),h(e,"class",u="flex items-center transition-colors rounded variant-"+t[5]+" "+T[t[3]]+" svelte-2eg245"),y(e,"outlined",t[6])},m(n,l){H(n,e,l),a&&a.m(e,null),B(e,s),r&&r.m(e,null),B(e,i),o&&o.m(e,null),f=!0,g||(d=J(e,"click",K(t[11])),g=!0)},p(n,[l]){n[2]==="left"&&n[1]?a?(a.p(n,l),l&6&&m(a,1)):(a=E(n),a.c(),m(a,1),a.m(e,s)):a&&(P(),_(a,1,1,()=>{a=null}),C()),r&&r.p&&(!f||l&512)&&L(r,b,n,n[9],f?Q(b,n[9],l,null):M(n[9]),null),n[2]==="right"&&n[1]?o?(o.p(n,l),l&6&&m(o,1)):(o=I(n),o.c(),m(o,1),o.m(e,null)):o&&(P(),_(o,1,1,()=>{o=null}),C()),(!f||l&1)&&h(e,"type",n[0]),(!f||l&128)&&(e.disabled=n[7]),(!f||l&256)&&h(e,"formaction",n[8]),(!f||l&40&&u!==(u="flex items-center transition-colors rounded variant-"+n[5]+" "+T[n[3]]+" svelte-2eg245"))&&h(e,"class",u),(!f||l&104)&&y(e,"outlined",n[6])},i(n){f||(m(a),m(r,n),m(o),f=!0)},o(n){_(a),_(r,n),_(o),f=!1},d(n){n&&w(e),a&&a.d(),r&&r.d(n),o&&o.d(),g=!1,d()}}}const T={base:"px-2 py-1 mx-1 gap-2",md:"px-2 py-1 mx-1 gap-2 text-xs",sm:"px-1 py-0.5 mx-0.5 gap-1 text-xs",lg:"px-4 py-2 mx-2 gap-4"},z={base:"w-4",md:"w-4",sm:"w-3",lg:"w-5"};function Y(t,e,s){let{$$slots:i={},$$scope:u}=e,{icon:f=void 0}=e,{iconPosition:g="right"}=e,{size:d="base"}=e,{iconSize:a=d}=e,{variant:b="info"}=e,{outline:r=!1}=e,{disabled:o=!1}=e,{formaction:n=void 0}=e,{type:l="button"}=e;function F(c){R.call(this,t,c)}return t.$$set=c=>{"icon"in c&&s(1,f=c.icon),"iconPosition"in c&&s(2,g=c.iconPosition),"size"in c&&s(3,d=c.size),"iconSize"in c&&s(4,a=c.iconSize),"variant"in c&&s(5,b=c.variant),"outline"in c&&s(6,r=c.outline),"disabled"in c&&s(7,o=c.disabled),"formaction"in c&&s(8,n=c.formaction),"type"in c&&s(0,l=c.type),"$$scope"in c&&s(9,u=c.$$scope)},t.$$.update=()=>{t.$$.dirty&256&&n&&s(0,l="submit")},[l,f,g,d,a,b,r,o,n,u,i,F]}class ee extends V{constructor(e){super(),W(this,e,Y,X,G,{icon:1,iconPosition:2,size:3,iconSize:4,variant:5,outline:6,disabled:7,formaction:8,type:0})}}export{ee as B}; diff --git a/_app/immutable/chunks/Prismjs.XAZNzsAo.js b/_app/immutable/chunks/Prismjs.XAZNzsAo.js new file mode 100644 index 0000000000000000000000000000000000000000..c8c043a5a82505a363412bbd91d8c236e9b52406 --- /dev/null +++ b/_app/immutable/chunks/Prismjs.XAZNzsAo.js @@ -0,0 +1,3 @@ +import{s as d,e as i,O as r,d as D,g as C,P as U,f as t,j as e,k as B,l as a,u as s,t as n,Q as u,i as o,R as G}from"./scheduler.BZlHRu_0.js";import{S as c,i as h}from"./index.a_oafgNU.js";import{P}from"./VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";function f(A){let E,I,N;return{c(){E=i("span"),I=r("svg"),N=r("path"),this.h()},l(T){E=D(T,"SPAN",{"aria-expanded":!0,class:!0});var R=C(E);I=U(R,"svg",{viewBox:!0,width:!0,height:!0,class:!0});var O=C(I);N=U(O,"path",{fill:!0,"fill-rule":!0,d:!0}),C(N).forEach(t),O.forEach(t),R.forEach(t),this.h()},h(){e(N,"fill",A[1]),e(N,"fill-rule","evenodd"),e(N,"d","M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"),e(I,"viewBox","0 0 16 16"),e(I,"width",A[2]),e(I,"height",A[2]),e(I,"class","svelte-c6mrxw"),e(E,"aria-expanded",A[0]),e(E,"class","svelte-c6mrxw")},m(T,R){B(T,E,R),a(E,I),a(I,N)},p(T,[R]){R&2&&e(N,"fill",T[1]),R&4&&e(I,"width",T[2]),R&4&&e(I,"height",T[2]),R&1&&e(E,"aria-expanded",T[0])},i:s,o:s,d(T){T&&t(E)}}}function F(A,E,I){let{toggled:N=!1}=E,{color:T="#2d2d2d"}=E,{size:R=10}=E;return A.$$set=O=>{"toggled"in O&&I(0,N=O.toggled),"color"in O&&I(1,T=O.color),"size"in O&&I(2,R=O.size)},[N,T,R]}class v extends c{constructor(E){super(),h(this,E,F,f,d,{toggled:0,color:1,size:2})}}const M={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};function g(A){let E,I,N,T,R=P.highlight(A[0],M)+"",O;return{c(){E=i("pre"),I=n(" "),N=i("code"),T=new u(!1),O=n(` +`),this.h()},l(S){E=D(S,"PRE",{class:!0});var L=C(E);I=o(L," "),N=D(L,"CODE",{class:!0});var l=C(N);T=G(l,!1),l.forEach(t),O=o(L,` +`),L.forEach(t),this.h()},h(){T.a=null,e(N,"class","language-sql svelte-isi8vj"),e(E,"class","text-xs max-h-56 overflow-auto svelte-isi8vj")},m(S,L){B(S,E,L),a(E,I),a(E,N),T.m(R,N),a(E,O)},p(S,[L]){L&1&&R!==(R=P.highlight(S[0],M)+"")&&T.p(R)},i:s,o:s,d(S){S&&t(E)}}}function m(A,E,I){let{code:N=""}=E;return A.$$set=T=>{"code"in T&&I(0,N=T.code)},[N]}class K extends c{constructor(E){super(),h(this,E,m,g,d,{code:0})}}export{v as C,K as P}; diff --git a/_app/immutable/chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js b/_app/immutable/chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js new file mode 100644 index 0000000000000000000000000000000000000000..23d30e5b8439d63a772733bb9eabdeb5c3bd1b86 --- /dev/null +++ b/_app/immutable/chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js @@ -0,0 +1,294 @@ +var gre=Object.defineProperty;var n4=r=>{throw TypeError(r)};var vre=(r,e,t)=>e in r?gre(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Nn=(r,e,t)=>vre(r,typeof e!="symbol"?e+"":e,t),i4=(r,e,t)=>e.has(r)||n4("Cannot "+t);var re=(r,e,t)=>(i4(r,e,"read from private field"),t?t.call(r):e.get(r)),Wt=(r,e,t)=>e.has(r)?n4("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),Gr=(r,e,t,n)=>(i4(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t);var a4=(r,e,t,n)=>({set _(i){Gr(r,e,i,t)},get _(){return re(r,e,n)}});import{w as wd,d as MG,r as Cu,e as mre,g as yre,a as bre}from"./entry.p1-HE9Vh.js";import{b as ee,t as X,S as Cr,i as xr,j as _re,c as Ve,a as Ge,m as Ue,e as He,g as Tt,d as kt,f as Fl,k as IG}from"./index.a_oafgNU.js";import{L as Sd,r as p0,p as Q2,af as LG,ar as AT,Z as wre,s as Dr,aa as An,O as Mi,b as Xe,P as Ii,g as ge,f as V,as as na,k as se,l as Q,u as Oe,al as di,a9 as hg,ab as ts,t as ht,i as dt,m as Bt,e as ie,d as ae,H as Et,j as Y,I as Ad,z as Li,a as Ie,c as Le,J as FG,D as Fi,E as Bi,F as Oi,K as J2,at as BG,q as OG,a8 as XI,ah as Sw,B as gn,ap as o4,V as PG,T as Re,A as zr,Q as jg,R as qg,N as KI,ao as s4,a7 as RG,G as Sre,n as NG,ak as zG,an as VG}from"./scheduler.BZlHRu_0.js";import{_ as ll}from"./preload-helper.D7HrI6pR.js";import{d as Are,b as Cre}from"./index.rV6zwFgL.js";function Er(r){return(r==null?void 0:r.length)!==void 0?r:Array.from(r)}function Uje(r,e){r.d(1),e.delete(r.key)}function xre(r,e){ee(r,1,1,()=>{e.delete(r.key)})}function Dre(r,e,t,n,i,a,o,s,l,u,c,f){let h=r.length,d=a.length,p=h;const g={};for(;p--;)g[r[p].key]=p;const v=[],m=new Map,y=new Map,b=[];for(p=d;p--;){const A=f(i,a,p),C=t(A);let x=o.get(C);x?b.push(()=>x.p(A,e)):(x=u(C,A),x.c()),m.set(C,v[p]=x),C in g&&y.set(C,Math.abs(p-g[C]))}const _=new Set,w=new Set;function S(A){X(A,1),A.m(s,c),o.set(A.key,A),c=A.first,d--}for(;h&&d;){const A=v[d-1],C=r[h-1],x=A.key,D=C.key;A===C?(c=A.first,h--,d--):m.has(D)?!o.has(x)||_.has(x)?S(A):w.has(D)?h--:y.get(x)>y.get(D)?(w.add(x),S(A)):(_.add(D),h--):(l(C,o),h--)}for(;h--;){const A=r[h];m.has(A.key)||l(A,o)}for(;d;)S(v[d-1]);return Sd(b),v}function xo(r,e){const t={},n={},i={$$scope:1};let a=r.length;for(;a--;){const o=r[a],s=e[a];if(s){for(const l in o)l in s||(n[l]=1);for(const l in s)i[l]||(t[l]=s[l],i[l]=1);r[a]=s}else for(const l in o)i[l]=1}for(const o in n)o in t||(t[o]=void 0);return t}function Yy(r){return typeof r=="object"&&r!==null?r:{}}function Qt(r,e,t,n){function i(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((n=n.apply(r,e||[])).next())})}function l4(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _r(r){return this instanceof _r?(this.v=r,this):new _r(r)}function bl(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(d){return function(p){return Promise.resolve(p).then(d,f)}}function s(d,p){n[d]&&(i[d]=function(g){return new Promise(function(v,m){a.push([d,g,v,m])>1||l(d,g)})},p&&(i[d]=p(i[d])))}function l(d,p){try{u(n[d](p))}catch(g){h(a[0][3],g)}}function u(d){d.value instanceof _r?Promise.resolve(d.value.v).then(c,f):h(a[0][2],d)}function c(d){l("next",d)}function f(d){l("throw",d)}function h(d,p){d(p),a.shift(),a.length&&l(a[0][0],a[0][1])}}function k_(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,a){e[i]=r[i]?function(o){return(t=!t)?{value:_r(r[i](o)),done:!1}:a?a(o):o}:a}}function Hh(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof l4=="function"?l4(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=r[a]&&function(o){return new Promise(function(s,l){o=r[a](o),i(s,l,o.done,o.value)})}}function i(a,o,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s})},o)}}const Ere=new TextDecoder("utf-8"),CT=r=>Ere.decode(r),Tre=new TextEncoder,QI=r=>Tre.encode(r),kre=r=>typeof r=="number",GG=r=>typeof r=="boolean",fi=r=>typeof r=="function",Qa=r=>r!=null&&Object(r)===r,Zc=r=>Qa(r)&&fi(r.then),Zy=r=>Qa(r)&&fi(r[Symbol.iterator]),Yg=r=>Qa(r)&&fi(r[Symbol.asyncIterator]),xT=r=>Qa(r)&&Qa(r.schema),UG=r=>Qa(r)&&"done"in r&&"value"in r,HG=r=>Qa(r)&&fi(r.stat)&&kre(r.fd),WG=r=>Qa(r)&&JI(r.body),eA=r=>"_getDOMStream"in r&&"_getNodeStream"in r,Mre=r=>Qa(r)&&fi(r.abort)&&fi(r.getWriter)&&!eA(r),JI=r=>Qa(r)&&fi(r.cancel)&&fi(r.getReader)&&!eA(r),Ire=r=>Qa(r)&&fi(r.end)&&fi(r.write)&&GG(r.writable)&&!eA(r),$G=r=>Qa(r)&&fi(r.read)&&fi(r.pipe)&&GG(r.readable)&&!eA(r),Lre=r=>Qa(r)&&fi(r.clear)&&fi(r.bytes)&&fi(r.position)&&fi(r.setPosition)&&fi(r.capacity)&&fi(r.getBufferIdentifier)&&fi(r.createLong),eL=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function Fre(r){const e=r[0]?[r[0]]:[];let t,n,i,a;for(let o,s,l=0,u=0,c=r.length;++lc+f.byteLength,0);let i,a,o,s=0,l=-1;const u=Math.min(e||Number.POSITIVE_INFINITY,n);for(const c=t.length;++lbn(Int32Array,r),Jr=r=>bn(Uint8Array,r),DT=r=>(r.next(),r);function*Bre(r,e){const t=function*(i){yield i},n=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof eL?t(e):Zy(e)?e:t(e);return yield*DT(function*(i){let a=null;do a=i.next(yield bn(r,a));while(!a.done)}(n[Symbol.iterator]())),new r}const Ore=r=>Bre(Uint8Array,r);function jG(r,e){return bl(this,arguments,function*(){if(Zc(e))return yield _r(yield _r(yield*k_(Hh(jG(r,yield _r(e))))));const n=function(o){return bl(this,arguments,function*(){yield yield _r(yield _r(o))})},i=function(o){return bl(this,arguments,function*(){yield _r(yield*k_(Hh(DT(function*(s){let l=null;do l=s.next(yield l==null?void 0:l.value);while(!l.done)}(o[Symbol.iterator]())))))})},a=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof eL?n(e):Zy(e)?i(e):Yg(e)?e:n(e);return yield _r(yield*k_(Hh(DT(function(o){return bl(this,arguments,function*(){let s=null;do s=yield _r(o.next(yield yield _r(bn(r,s))));while(!s.done)})}(a[Symbol.asyncIterator]()))))),yield _r(new r)})}const Pre=r=>jG(Uint8Array,r);function tL(r,e,t){if(r!==0){t=t.slice(0,e+1);for(let n=-1;++n<=e;)t[n]+=r}return t}function Rre(r,e){let t=0;const n=r.length;if(n!==e.length)return!1;if(n>0)do if(r[t]!==e[t])return!1;while(++t(r.next(),r);function*Nre(r){let e,t=!1,n=[],i,a,o,s=0;function l(){return a==="peek"?Bl(n,o)[0]:([i,n,s]=Bl(n,o),i)}({cmd:a,size:o}=yield null);const u=Ore(r)[Symbol.iterator]();try{do if({done:e,value:i}=Number.isNaN(o-s)?u.next():u.next(o-s),!e&&i.byteLength>0&&(n.push(i),s+=i.byteLength),e||o<=s)do({cmd:a,size:o}=yield l());while(o0&&(i.push(a),l+=a.byteLength),t||s<=l)do({cmd:o,size:s}=yield yield _r(u()));while(s0&&(i.push(Jr(a)),l+=a.byteLength),t||s<=l)do({cmd:o,size:s}=yield yield _r(u()));while(s{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return Qt(this,void 0,void 0,function*(){const{reader:t,source:n}=this;t&&(yield t.cancel(e).catch(()=>{})),n&&n.locked&&this.releaseLock()})}read(e){return Qt(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};const t=yield this.reader.read();return!t.done&&(t.value=Jr(t)),t})}}const MC=(r,e)=>{const t=i=>n([e,i]);let n;return[e,t,new Promise(i=>(n=i)&&r.once(e,t))]};function Ure(r){return bl(this,arguments,function*(){const t=[];let n="error",i=!1,a=null,o,s,l=0,u=[],c;function f(){return o==="peek"?Bl(u,s)[0]:([c,u,l]=Bl(u,s),c)}if({cmd:o,size:s}=yield yield _r(null),r.isTTY)return yield yield _r(new Uint8Array(0)),yield _r(null);try{t[0]=MC(r,"end"),t[1]=MC(r,"error");do{if(t[2]=MC(r,"readable"),[n,a]=yield _r(Promise.race(t.map(d=>d[2]))),n==="error")break;if((i=n==="end")||(Number.isFinite(s-l)?(c=Jr(r.read(s-l)),c.byteLength0&&(u.push(c),l+=c.byteLength)),i||s<=l)do({cmd:o,size:s}=yield yield _r(f()));while(s{for(const[m,y]of d)r.off(m,y);try{const m=r.destroy;m&&m.call(r,p),p=void 0}catch(m){p=m||p}finally{p!=null?v(p):g()}})}})}var fo;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(fo||(fo={}));var Ao;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(Ao||(Ao={}));var Xa;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(Xa||(Xa={}));var Lu;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(Lu||(Lu={}));var tn;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(tn||(tn={}));var Xc;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME",r[r.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Xc||(Xc={}));var an;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(an||(an={}));var oe;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth"})(oe||(oe={}));var su;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(su||(su={}));const Hre=void 0;function g0(r){if(r===null)return"null";if(r===Hre)return"undefined";switch(typeof r){case"number":return`${r}`;case"bigint":return`${r}`;case"string":return`"${r}"`}return typeof r[Symbol.toPrimitive]=="function"?r[Symbol.toPrimitive]("string"):ArrayBuffer.isView(r)?r instanceof BigInt64Array||r instanceof BigUint64Array?`[${[...r].map(e=>g0(e))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(e,t)=>typeof t=="bigint"?`${t}`:t)}const Wre=Symbol.for("isArrowBigNum");function Gs(r,...e){return e.length===0?Object.setPrototypeOf(bn(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...e),this.constructor.prototype)}Gs.prototype[Wre]=!0;Gs.prototype.toJSON=function(){return`"${m0(this)}"`};Gs.prototype.valueOf=function(){return qG(this)};Gs.prototype.toString=function(){return m0(this)};Gs.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return qG(this);case"string":return m0(this);case"default":return $re(this)}return m0(this)};function Op(...r){return Gs.apply(this,r)}function Pp(...r){return Gs.apply(this,r)}function v0(...r){return Gs.apply(this,r)}Object.setPrototypeOf(Op.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Pp.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(v0.prototype,Object.create(Uint32Array.prototype));Object.assign(Op.prototype,Gs.prototype,{constructor:Op,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Pp.prototype,Gs.prototype,{constructor:Pp,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(v0.prototype,Gs.prototype,{constructor:v0,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});function qG(r){const{buffer:e,byteOffset:t,length:n,signed:i}=r,a=new BigUint64Array(e,t,n),o=i&&a.at(-1)&BigInt(1)<{if(r.byteLength===8)return`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`;if(!r.signed)return IC(r);let e=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2);if(new Int16Array([e.at(-1)])[0]>=0)return IC(r);e=e.slice();let n=1;for(let a=0;ar.byteLength===8?new r.BigIntArray(r.buffer,r.byteOffset,1)[0]:m0(r);function IC(r){let e="";const t=new Uint32Array(2);let n=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2);const i=new Uint32Array((n=new Uint16Array(n).reverse()).buffer);let a=-1;const o=n.length-1;do{for(t[0]=n[a=0];aNumber.MAX_SAFE_INTEGER))throw new TypeError(`${r} is not safe to convert to a number.`);return Number(r)}var YG,ZG,XG,KG,QG,JG,eU,tU,rU,nU,iU,aU,oU,sU,lU,uU,cU,fU,hU;class ir{static isNull(e){return(e==null?void 0:e.typeId)===oe.Null}static isInt(e){return(e==null?void 0:e.typeId)===oe.Int}static isFloat(e){return(e==null?void 0:e.typeId)===oe.Float}static isBinary(e){return(e==null?void 0:e.typeId)===oe.Binary}static isUtf8(e){return(e==null?void 0:e.typeId)===oe.Utf8}static isBool(e){return(e==null?void 0:e.typeId)===oe.Bool}static isDecimal(e){return(e==null?void 0:e.typeId)===oe.Decimal}static isDate(e){return(e==null?void 0:e.typeId)===oe.Date}static isTime(e){return(e==null?void 0:e.typeId)===oe.Time}static isTimestamp(e){return(e==null?void 0:e.typeId)===oe.Timestamp}static isInterval(e){return(e==null?void 0:e.typeId)===oe.Interval}static isList(e){return(e==null?void 0:e.typeId)===oe.List}static isStruct(e){return(e==null?void 0:e.typeId)===oe.Struct}static isUnion(e){return(e==null?void 0:e.typeId)===oe.Union}static isFixedSizeBinary(e){return(e==null?void 0:e.typeId)===oe.FixedSizeBinary}static isFixedSizeList(e){return(e==null?void 0:e.typeId)===oe.FixedSizeList}static isMap(e){return(e==null?void 0:e.typeId)===oe.Map}static isDictionary(e){return(e==null?void 0:e.typeId)===oe.Dictionary}static isDenseUnion(e){return ir.isUnion(e)&&e.mode===Ao.Dense}static isSparseUnion(e){return ir.isUnion(e)&&e.mode===Ao.Sparse}get typeId(){return oe.NONE}}YG=Symbol.toStringTag;ir[YG]=(r=>(r.children=null,r.ArrayType=Array,r[Symbol.toStringTag]="DataType"))(ir.prototype);let Kc=class extends ir{toString(){return"Null"}get typeId(){return oe.Null}};ZG=Symbol.toStringTag;Kc[ZG]=(r=>r[Symbol.toStringTag]="Null")(Kc.prototype);class Qc extends ir{constructor(e,t){super(),this.isSigned=e,this.bitWidth=t}get typeId(){return oe.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}XG=Symbol.toStringTag;Qc[XG]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Qc.prototype);class y0 extends Qc{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(y0.prototype,"ArrayType",{value:Int32Array});class b0 extends ir{constructor(e){super(),this.precision=e}get typeId(){return oe.Float}get ArrayType(){switch(this.precision){case Xa.HALF:return Uint16Array;case Xa.SINGLE:return Float32Array;case Xa.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}KG=Symbol.toStringTag;b0[KG]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(b0.prototype);let Aw=class extends ir{constructor(){super()}get typeId(){return oe.Binary}toString(){return"Binary"}};QG=Symbol.toStringTag;Aw[QG]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Aw.prototype);let Cw=class extends ir{constructor(){super()}get typeId(){return oe.Utf8}toString(){return"Utf8"}};JG=Symbol.toStringTag;Cw[JG]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Cw.prototype);let xw=class extends ir{constructor(){super()}get typeId(){return oe.Bool}toString(){return"Bool"}};eU=Symbol.toStringTag;xw[eU]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(xw.prototype);let Dw=class extends ir{constructor(e,t,n=128){super(),this.scale=e,this.precision=t,this.bitWidth=n}get typeId(){return oe.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};tU=Symbol.toStringTag;Dw[tU]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(Dw.prototype);class Ew extends ir{constructor(e){super(),this.unit=e}get typeId(){return oe.Date}toString(){return`Date${(this.unit+1)*32}<${Lu[this.unit]}>`}}rU=Symbol.toStringTag;Ew[rU]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Date"))(Ew.prototype);class _0 extends ir{constructor(e,t){super(),this.unit=e,this.bitWidth=t}get typeId(){return oe.Time}toString(){return`Time${this.bitWidth}<${tn[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}nU=Symbol.toStringTag;_0[nU]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(_0.prototype);class Tw extends ir{constructor(e,t){super(),this.unit=e,this.timezone=t}get typeId(){return oe.Timestamp}toString(){return`Timestamp<${tn[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}iU=Symbol.toStringTag;Tw[iU]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Timestamp"))(Tw.prototype);class kw extends ir{constructor(e){super(),this.unit=e}get typeId(){return oe.Interval}toString(){return`Interval<${Xc[this.unit]}>`}}aU=Symbol.toStringTag;kw[aU]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(kw.prototype);let Mw=class extends ir{constructor(e){super(),this.children=[e]}get typeId(){return oe.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};oU=Symbol.toStringTag;Mw[oU]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(Mw.prototype);class _a extends ir{constructor(e){super(),this.children=e}get typeId(){return oe.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}sU=Symbol.toStringTag;_a[sU]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(_a.prototype);class Iw extends ir{constructor(e,t,n){super(),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((i,a,o)=>(i[a]=o)&&i||i,Object.create(null))}get typeId(){return oe.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}}lU=Symbol.toStringTag;Iw[lU]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Iw.prototype);let Lw=class extends ir{constructor(e){super(),this.byteWidth=e}get typeId(){return oe.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};uU=Symbol.toStringTag;Lw[uU]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(Lw.prototype);let Fw=class extends ir{constructor(e,t){super(),this.listSize=e,this.children=[t]}get typeId(){return oe.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};cU=Symbol.toStringTag;Fw[cU]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(Fw.prototype);class Bw extends ir{constructor(e,t=!1){super(),this.children=[e],this.keysSorted=t}get typeId(){return oe.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}fU=Symbol.toStringTag;Bw[fU]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Bw.prototype);const jre=(r=>()=>++r)(-1);class dg extends ir{constructor(e,t,n,i){super(),this.indices=t,this.dictionary=e,this.isOrdered=i||!1,this.id=n==null?jre():Fs(n)}get typeId(){return oe.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}hU=Symbol.toStringTag;dg[hU]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(dg.prototype);function lu(r){const e=r;switch(r.typeId){case oe.Decimal:return r.bitWidth/32;case oe.Timestamp:return 2;case oe.Date:return 1+e.unit;case oe.Interval:return 1+e.unit;case oe.FixedSizeList:return e.listSize;case oe.FixedSizeBinary:return e.byteWidth;default:return 1}}class jr{visitMany(e,...t){return e.map((n,i)=>this.visit(n,...t.map(a=>a[i])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return qre(this,e,t)}getVisitFnByTypeId(e,t=!0){return lp(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}}function qre(r,e,t=!0){return typeof e=="number"?lp(r,e,t):typeof e=="string"&&e in oe?lp(r,oe[e],t):e&&e instanceof ir?lp(r,c4(e),t):e!=null&&e.type&&e.type instanceof ir?lp(r,c4(e.type),t):lp(r,oe.NONE,t)}function lp(r,e,t=!0){let n=null;switch(e){case oe.Null:n=r.visitNull;break;case oe.Bool:n=r.visitBool;break;case oe.Int:n=r.visitInt;break;case oe.Int8:n=r.visitInt8||r.visitInt;break;case oe.Int16:n=r.visitInt16||r.visitInt;break;case oe.Int32:n=r.visitInt32||r.visitInt;break;case oe.Int64:n=r.visitInt64||r.visitInt;break;case oe.Uint8:n=r.visitUint8||r.visitInt;break;case oe.Uint16:n=r.visitUint16||r.visitInt;break;case oe.Uint32:n=r.visitUint32||r.visitInt;break;case oe.Uint64:n=r.visitUint64||r.visitInt;break;case oe.Float:n=r.visitFloat;break;case oe.Float16:n=r.visitFloat16||r.visitFloat;break;case oe.Float32:n=r.visitFloat32||r.visitFloat;break;case oe.Float64:n=r.visitFloat64||r.visitFloat;break;case oe.Utf8:n=r.visitUtf8;break;case oe.Binary:n=r.visitBinary;break;case oe.FixedSizeBinary:n=r.visitFixedSizeBinary;break;case oe.Date:n=r.visitDate;break;case oe.DateDay:n=r.visitDateDay||r.visitDate;break;case oe.DateMillisecond:n=r.visitDateMillisecond||r.visitDate;break;case oe.Timestamp:n=r.visitTimestamp;break;case oe.TimestampSecond:n=r.visitTimestampSecond||r.visitTimestamp;break;case oe.TimestampMillisecond:n=r.visitTimestampMillisecond||r.visitTimestamp;break;case oe.TimestampMicrosecond:n=r.visitTimestampMicrosecond||r.visitTimestamp;break;case oe.TimestampNanosecond:n=r.visitTimestampNanosecond||r.visitTimestamp;break;case oe.Time:n=r.visitTime;break;case oe.TimeSecond:n=r.visitTimeSecond||r.visitTime;break;case oe.TimeMillisecond:n=r.visitTimeMillisecond||r.visitTime;break;case oe.TimeMicrosecond:n=r.visitTimeMicrosecond||r.visitTime;break;case oe.TimeNanosecond:n=r.visitTimeNanosecond||r.visitTime;break;case oe.Decimal:n=r.visitDecimal;break;case oe.List:n=r.visitList;break;case oe.Struct:n=r.visitStruct;break;case oe.Union:n=r.visitUnion;break;case oe.DenseUnion:n=r.visitDenseUnion||r.visitUnion;break;case oe.SparseUnion:n=r.visitSparseUnion||r.visitUnion;break;case oe.Dictionary:n=r.visitDictionary;break;case oe.Interval:n=r.visitInterval;break;case oe.IntervalDayTime:n=r.visitIntervalDayTime||r.visitInterval;break;case oe.IntervalYearMonth:n=r.visitIntervalYearMonth||r.visitInterval;break;case oe.FixedSizeList:n=r.visitFixedSizeList;break;case oe.Map:n=r.visitMap;break}if(typeof n=="function")return n;if(!t)return()=>null;throw new Error(`Unrecognized type '${oe[e]}'`)}function c4(r){switch(r.typeId){case oe.Null:return oe.Null;case oe.Int:{const{bitWidth:e,isSigned:t}=r;switch(e){case 8:return t?oe.Int8:oe.Uint8;case 16:return t?oe.Int16:oe.Uint16;case 32:return t?oe.Int32:oe.Uint32;case 64:return t?oe.Int64:oe.Uint64}return oe.Int}case oe.Float:switch(r.precision){case Xa.HALF:return oe.Float16;case Xa.SINGLE:return oe.Float32;case Xa.DOUBLE:return oe.Float64}return oe.Float;case oe.Binary:return oe.Binary;case oe.Utf8:return oe.Utf8;case oe.Bool:return oe.Bool;case oe.Decimal:return oe.Decimal;case oe.Time:switch(r.unit){case tn.SECOND:return oe.TimeSecond;case tn.MILLISECOND:return oe.TimeMillisecond;case tn.MICROSECOND:return oe.TimeMicrosecond;case tn.NANOSECOND:return oe.TimeNanosecond}return oe.Time;case oe.Timestamp:switch(r.unit){case tn.SECOND:return oe.TimestampSecond;case tn.MILLISECOND:return oe.TimestampMillisecond;case tn.MICROSECOND:return oe.TimestampMicrosecond;case tn.NANOSECOND:return oe.TimestampNanosecond}return oe.Timestamp;case oe.Date:switch(r.unit){case Lu.DAY:return oe.DateDay;case Lu.MILLISECOND:return oe.DateMillisecond}return oe.Date;case oe.Interval:switch(r.unit){case Xc.DAY_TIME:return oe.IntervalDayTime;case Xc.YEAR_MONTH:return oe.IntervalYearMonth}return oe.Interval;case oe.Map:return oe.Map;case oe.List:return oe.List;case oe.Struct:return oe.Struct;case oe.Union:switch(r.mode){case Ao.Dense:return oe.DenseUnion;case Ao.Sparse:return oe.SparseUnion}return oe.Union;case oe.FixedSizeBinary:return oe.FixedSizeBinary;case oe.FixedSizeList:return oe.FixedSizeList;case oe.Dictionary:return oe.Dictionary}throw new Error(`Unrecognized type '${oe[r.typeId]}'`)}jr.prototype.visitInt8=null;jr.prototype.visitInt16=null;jr.prototype.visitInt32=null;jr.prototype.visitInt64=null;jr.prototype.visitUint8=null;jr.prototype.visitUint16=null;jr.prototype.visitUint32=null;jr.prototype.visitUint64=null;jr.prototype.visitFloat16=null;jr.prototype.visitFloat32=null;jr.prototype.visitFloat64=null;jr.prototype.visitDateDay=null;jr.prototype.visitDateMillisecond=null;jr.prototype.visitTimestampSecond=null;jr.prototype.visitTimestampMillisecond=null;jr.prototype.visitTimestampMicrosecond=null;jr.prototype.visitTimestampNanosecond=null;jr.prototype.visitTimeSecond=null;jr.prototype.visitTimeMillisecond=null;jr.prototype.visitTimeMicrosecond=null;jr.prototype.visitTimeNanosecond=null;jr.prototype.visitDenseUnion=null;jr.prototype.visitSparseUnion=null;jr.prototype.visitIntervalDayTime=null;jr.prototype.visitIntervalYearMonth=null;const dU=new Float64Array(1),Pd=new Uint32Array(dU.buffer);function pU(r){const e=(r&31744)>>10,t=(r&1023)/1024,n=Math.pow(-1,(r&32768)>>15);switch(e){case 31:return n*(t?Number.NaN:1/0);case 0:return n*(t?6103515625e-14*t:0)}return n*Math.pow(2,e-15)*(1+t)}function Yre(r){if(r!==r)return 32256;dU[0]=r;const e=(Pd[1]&2147483648)>>16&65535;let t=Pd[1]&2146435072,n=0;return t>=1089470464?Pd[0]>0?t=31744:(t=(t&2080374784)>>16,n=(Pd[1]&1048575)>>10):t<=1056964608?(n=1048576+(Pd[1]&1048575),n=1048576+(n<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,n=(Pd[1]&1048575)+512>>10),e|t|n&65535}class fr extends jr{}function mr(r){return(e,t,n)=>{if(e.setValid(t,n!=null))return r(e,t,n)}}const Zre=(r,e,t)=>{r[e]=Math.trunc(t/864e5)},nL=(r,e,t)=>{r[e]=Math.trunc(t%4294967296),r[e+1]=Math.trunc(t/4294967296)},Xre=(r,e,t)=>{r[e]=Math.trunc(t*1e3%4294967296),r[e+1]=Math.trunc(t*1e3/4294967296)},Kre=(r,e,t)=>{r[e]=Math.trunc(t*1e6%4294967296),r[e+1]=Math.trunc(t*1e6/4294967296)},gU=(r,e,t,n)=>{if(t+1{const i=r+t;n?e[i>>3]|=1<>3]&=~(1<{r[e]=t},iL=({values:r},e,t)=>{r[e]=t},vU=({values:r},e,t)=>{r[e]=Yre(t)},Jre=(r,e,t)=>{switch(r.type.precision){case Xa.HALF:return vU(r,e,t);case Xa.SINGLE:case Xa.DOUBLE:return iL(r,e,t)}},mU=({values:r},e,t)=>{Zre(r,e,t.valueOf())},yU=({values:r},e,t)=>{nL(r,e*2,t.valueOf())},ene=({stride:r,values:e},t,n)=>{e.set(n.subarray(0,r),r*t)},tne=({values:r,valueOffsets:e},t,n)=>gU(r,e,t,n),rne=({values:r,valueOffsets:e},t,n)=>{gU(r,e,t,QI(n))},nne=(r,e,t)=>{r.type.unit===Lu.DAY?mU(r,e,t):yU(r,e,t)},bU=({values:r},e,t)=>nL(r,e*2,t/1e3),_U=({values:r},e,t)=>nL(r,e*2,t),wU=({values:r},e,t)=>Xre(r,e*2,t),SU=({values:r},e,t)=>Kre(r,e*2,t),ine=(r,e,t)=>{switch(r.type.unit){case tn.SECOND:return bU(r,e,t);case tn.MILLISECOND:return _U(r,e,t);case tn.MICROSECOND:return wU(r,e,t);case tn.NANOSECOND:return SU(r,e,t)}},AU=({values:r},e,t)=>{r[e]=t},CU=({values:r},e,t)=>{r[e]=t},xU=({values:r},e,t)=>{r[e]=t},DU=({values:r},e,t)=>{r[e]=t},ane=(r,e,t)=>{switch(r.type.unit){case tn.SECOND:return AU(r,e,t);case tn.MILLISECOND:return CU(r,e,t);case tn.MICROSECOND:return xU(r,e,t);case tn.NANOSECOND:return DU(r,e,t)}},one=({values:r,stride:e},t,n)=>{r.set(n.subarray(0,e),e*t)},sne=(r,e,t)=>{const n=r.children[0],i=r.valueOffsets,a=rs.getVisitFn(n);if(Array.isArray(t))for(let o=-1,s=i[e],l=i[e+1];s{const n=r.children[0],{valueOffsets:i}=r,a=rs.getVisitFn(n);let{[e]:o,[e+1]:s}=i;const l=t instanceof Map?t.entries():Object.entries(t);for(const u of l)if(a(n,o,u),++o>=s)break},une=(r,e)=>(t,n,i,a)=>n&&t(n,r,e[a]),cne=(r,e)=>(t,n,i,a)=>n&&t(n,r,e.get(a)),fne=(r,e)=>(t,n,i,a)=>n&&t(n,r,e.get(i.name)),hne=(r,e)=>(t,n,i,a)=>n&&t(n,r,e[i.name]),dne=(r,e,t)=>{const n=r.type.children.map(a=>rs.getVisitFn(a.type)),i=t instanceof Map?fne(e,t):t instanceof on?cne(e,t):Array.isArray(t)?une(e,t):hne(e,t);r.type.children.forEach((a,o)=>i(n[o],r.children[o],a,o))},pne=(r,e,t)=>{r.type.mode===Ao.Dense?EU(r,e,t):TU(r,e,t)},EU=(r,e,t)=>{const n=r.type.typeIdToChildIndex[r.typeIds[e]],i=r.children[n];rs.visit(i,r.valueOffsets[e],t)},TU=(r,e,t)=>{const n=r.type.typeIdToChildIndex[r.typeIds[e]],i=r.children[n];rs.visit(i,e,t)},gne=(r,e,t)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[e],t)},vne=(r,e,t)=>{r.type.unit===Xc.DAY_TIME?kU(r,e,t):MU(r,e,t)},kU=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},MU=({values:r},e,t)=>{r[e]=t[0]*12+t[1]%12},mne=(r,e,t)=>{const{stride:n}=r,i=r.children[0],a=rs.getVisitFn(i);if(Array.isArray(t))for(let o=-1,s=e*n;++o`${g0(e)}: ${g0(t)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new yne(this[_s],this[Rp])}}class yne{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const e=this.childIndex;return et.name)}has(e,t){return e[_s].type.children.findIndex(n=>n.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[_s].type.children.findIndex(n=>n.name===t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];const n=e[_s].type.children.findIndex(i=>i.name===t);if(n!==-1){const i=Ja.visit(e[_s].children[n],e[Rp]);return Reflect.set(e,t,i),i}}set(e,t,n){const i=e[_s].type.children.findIndex(a=>a.name===t);return i!==-1?(rs.visit(e[_s].children[i],e[Rp],n),Reflect.set(e,t,n)):Reflect.has(e,t)||typeof t=="symbol"?Reflect.set(e,t,n):!1}}class ar extends jr{}function hr(r){return(e,t)=>e.getValid(t)?r(e,t):null}const _ne=(r,e)=>864e5*r[e],oL=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),wne=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,Sne=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,IU=r=>new Date(r),Ane=(r,e)=>IU(_ne(r,e)),Cne=(r,e)=>IU(oL(r,e)),xne=(r,e)=>null,LU=(r,e,t)=>{if(t+1>=e.length)return null;const n=e[t],i=e[t+1];return r.subarray(n,i)},Dne=({offset:r,values:e},t)=>{const n=r+t;return(e[n>>3]&1<Ane(r,e),BU=({values:r},e)=>Cne(r,e*2),bf=({stride:r,values:e},t)=>e[r*t],Ene=({stride:r,values:e},t)=>pU(e[r*t]),OU=({values:r},e)=>r[e],Tne=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),kne=({values:r,valueOffsets:e},t)=>LU(r,e,t),Mne=({values:r,valueOffsets:e},t)=>{const n=LU(r,e,t);return n!==null?CT(n):null},Ine=({values:r},e)=>r[e],Lne=({type:r,values:e},t)=>r.precision!==Xa.HALF?e[t]:pU(e[t]),Fne=(r,e)=>r.type.unit===Lu.DAY?FU(r,e):BU(r,e),PU=({values:r},e)=>1e3*oL(r,e*2),RU=({values:r},e)=>oL(r,e*2),NU=({values:r},e)=>wne(r,e*2),zU=({values:r},e)=>Sne(r,e*2),Bne=(r,e)=>{switch(r.type.unit){case tn.SECOND:return PU(r,e);case tn.MILLISECOND:return RU(r,e);case tn.MICROSECOND:return NU(r,e);case tn.NANOSECOND:return zU(r,e)}},VU=({values:r},e)=>r[e],GU=({values:r},e)=>r[e],UU=({values:r},e)=>r[e],HU=({values:r},e)=>r[e],One=(r,e)=>{switch(r.type.unit){case tn.SECOND:return VU(r,e);case tn.MILLISECOND:return GU(r,e);case tn.MICROSECOND:return UU(r,e);case tn.NANOSECOND:return HU(r,e)}},Pne=({values:r,stride:e},t)=>rL.decimal(r.subarray(e*t,e*(t+1))),Rne=(r,e)=>{const{valueOffsets:t,stride:n,children:i}=r,{[e*n]:a,[e*n+1]:o}=t,l=i[0].slice(a,o-a);return new on([l])},Nne=(r,e)=>{const{valueOffsets:t,children:n}=r,{[e]:i,[e+1]:a}=t,o=n[0];return new sL(o.slice(i,a-i))},zne=(r,e)=>new aL(r,e),Vne=(r,e)=>r.type.mode===Ao.Dense?WU(r,e):$U(r,e),WU=(r,e)=>{const t=r.type.typeIdToChildIndex[r.typeIds[e]],n=r.children[t];return Ja.visit(n,r.valueOffsets[e])},$U=(r,e)=>{const t=r.type.typeIdToChildIndex[r.typeIds[e]],n=r.children[t];return Ja.visit(n,e)},Gne=(r,e)=>{var t;return(t=r.dictionary)===null||t===void 0?void 0:t.get(r.values[e])},Une=(r,e)=>r.type.unit===Xc.DAY_TIME?jU(r,e):qU(r,e),jU=({values:r},e)=>r.subarray(2*e,2*(e+1)),qU=({values:r},e)=>{const t=r[e],n=new Int32Array(2);return n[0]=Math.trunc(t/12),n[1]=Math.trunc(t%12),n},Hne=(r,e)=>{const{stride:t,children:n}=r,a=n[0].slice(e*t,t);return new on([a])};ar.prototype.visitNull=hr(xne);ar.prototype.visitBool=hr(Dne);ar.prototype.visitInt=hr(Ine);ar.prototype.visitInt8=hr(bf);ar.prototype.visitInt16=hr(bf);ar.prototype.visitInt32=hr(bf);ar.prototype.visitInt64=hr(OU);ar.prototype.visitUint8=hr(bf);ar.prototype.visitUint16=hr(bf);ar.prototype.visitUint32=hr(bf);ar.prototype.visitUint64=hr(OU);ar.prototype.visitFloat=hr(Lne);ar.prototype.visitFloat16=hr(Ene);ar.prototype.visitFloat32=hr(bf);ar.prototype.visitFloat64=hr(bf);ar.prototype.visitUtf8=hr(Mne);ar.prototype.visitBinary=hr(kne);ar.prototype.visitFixedSizeBinary=hr(Tne);ar.prototype.visitDate=hr(Fne);ar.prototype.visitDateDay=hr(FU);ar.prototype.visitDateMillisecond=hr(BU);ar.prototype.visitTimestamp=hr(Bne);ar.prototype.visitTimestampSecond=hr(PU);ar.prototype.visitTimestampMillisecond=hr(RU);ar.prototype.visitTimestampMicrosecond=hr(NU);ar.prototype.visitTimestampNanosecond=hr(zU);ar.prototype.visitTime=hr(One);ar.prototype.visitTimeSecond=hr(VU);ar.prototype.visitTimeMillisecond=hr(GU);ar.prototype.visitTimeMicrosecond=hr(UU);ar.prototype.visitTimeNanosecond=hr(HU);ar.prototype.visitDecimal=hr(Pne);ar.prototype.visitList=hr(Rne);ar.prototype.visitStruct=hr(zne);ar.prototype.visitUnion=hr(Vne);ar.prototype.visitDenseUnion=hr(WU);ar.prototype.visitSparseUnion=hr($U);ar.prototype.visitDictionary=hr(Gne);ar.prototype.visitInterval=hr(Une);ar.prototype.visitIntervalDayTime=hr(jU);ar.prototype.visitIntervalYearMonth=hr(qU);ar.prototype.visitFixedSizeList=hr(Hne);ar.prototype.visitMap=hr(Nne);const Ja=new ar,ul=Symbol.for("keys"),Np=Symbol.for("vals");class sL{constructor(e){return this[ul]=new on([e.children[0]]).memoize(),this[Np]=e.children[1],new Proxy(this,new $ne)}[Symbol.iterator](){return new Wne(this[ul],this[Np])}get size(){return this[ul].length}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[ul],t=this[Np],n={};for(let i=-1,a=e.length;++i`${g0(e)}: ${g0(t)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class Wne{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){const e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),Ja.visit(this.vals,e)]})}}class $ne{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[ul].toArray().map(String)}has(e,t){return e[ul].includes(t)}getOwnPropertyDescriptor(e,t){if(e[ul].indexOf(t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];const n=e[ul].indexOf(t);if(n!==-1){const i=Ja.visit(Reflect.get(e,Np),n);return Reflect.set(e,t,i),i}}set(e,t,n){const i=e[ul].indexOf(t);return i!==-1?(rs.visit(Reflect.get(e,Np),i,n),Reflect.set(e,t,n)):Reflect.has(e,t)?Reflect.set(e,t,n):!1}}Object.defineProperties(sL.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[ul]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Np]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let f4;function YU(r,e,t,n){const{length:i=0}=r;let a=typeof e!="number"?0:e,o=typeof t!="number"?i:t;return a<0&&(a=(a%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),n?n(r,a,o):[a,o]}const h4=r=>r!==r;function Zg(r){if(typeof r!=="object"||r===null)return h4(r)?h4:t=>t===r;if(r instanceof Date){const t=r.valueOf();return n=>n instanceof Date?n.valueOf()===t:!1}return ArrayBuffer.isView(r)?t=>t?Rre(r,t):!1:r instanceof Map?qne(r):Array.isArray(r)?jne(r):r instanceof on?Yne(r):Zne(r,!0)}function jne(r){const e=[];for(let t=-1,n=r.length;++t!1;const n=[];for(let i=-1,a=t.length;++i{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return Xne(r,t);case Map:return d4(r,t,t.keys());case sL:case aL:case Object:case void 0:return d4(r,t,e||Object.keys(t))}return t instanceof on?Kne(r,t):!1}}function Xne(r,e){const t=r.length;if(e.length!==t)return!1;for(let n=-1;++n>n}function lL(r,e,t){const n=t.byteLength+7&-8;if(r>0||t.byteLength>3):Ow(new uL(t,r,e,null,ZU)).subarray(0,n)),i}return t}function Ow(r){const e=[];let t=0,n=0,i=0;for(const o of r)o&&(i|=1<0)&&(e[t++]=i);const a=new Uint8Array(e.length+7&-8);return a.set(e),a}class uL{constructor(e,t,n,i,a){this.bytes=e,this.length=n,this.context=i,this.get=a,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=e+(e%8===0?0:8-e%8);return ET(r,e,i)+ET(r,n,t)+Jne(r,i>>3,n-i>>3)}function Jne(r,e,t){let n=0,i=Math.trunc(e);const a=new DataView(r.buffer,r.byteOffset,r.byteLength),o=t===void 0?r.byteLength:i+t;for(;o-i>=4;)n+=LC(a.getUint32(i)),i+=4;for(;o-i>=2;)n+=LC(a.getUint16(i)),i+=2;for(;o-i>=1;)n+=LC(a.getUint8(i)),i+=1;return n}function LC(r){let e=Math.trunc(r);return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}const eie=-1;class xn{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0;const{valueOffsets:t,values:n,nullBitmap:i,typeIds:a}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),i&&(e+=i.byteLength),a&&(e+=a.byteLength),this.children.reduce((o,s)=>o+s.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=eie&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-ET(t,this.offset,this.offset+this.length)),e}constructor(e,t,n,i,a,o=[],s){this.type=e,this.children=o,this.dictionary=s,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let l;a instanceof xn?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=lu(e),a&&((l=a[0])&&(this.valueOffsets=l),(l=a[1])&&(this.values=l),(l=a[2])&&(this.nullBitmap=l),(l=a[3])&&(this.typeIds=l))),this.nullable=this._nullCount!==0&&this.nullBitmap&&this.nullBitmap.byteLength>0}getValid(e){if(this.nullable&&this.nullCount>0){const t=this.offset+e;return(this.nullBitmap[t>>3]&1<>3){const{nullBitmap:l}=this._changeLengthAndBackfillNullBitmap(this.length);Object.assign(this,{nullBitmap:l,_nullCount:0})}const{nullBitmap:n,offset:i}=this,a=i+e>>3,o=(i+e)%8,s=n[a]>>o&1;return t?s===0&&(n[a]|=1<>3).fill(255,0,t>>3);i[t>>3]=(1<0&&i.set(lL(this.offset,t,this.nullBitmap),0);const a=this.buffers;return a[su.VALIDITY]=i,this.clone(this.type,0,e,n+(e-t),a)}_sliceBuffers(e,t,n,i){let a;const{buffers:o}=this;return(a=o[su.TYPE])&&(o[su.TYPE]=a.subarray(e,e+t)),(a=o[su.OFFSET])&&(o[su.OFFSET]=a.subarray(e,e+t+1))||(a=o[su.DATA])&&(o[su.DATA]=i===6?a:a.subarray(n*e,n*(e+t))),o}_sliceChildren(e,t,n){return e.map(i=>i.slice(t,n))}}xn.prototype.children=Object.freeze([]);class Hm extends jr{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){const{["type"]:t,["offset"]:n=0,["length"]:i=0}=e;return new xn(t,n,i,0)}visitBool(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.nullBitmap),a=bn(t.ArrayType,e.data),{["length"]:o=a.length>>3,["nullCount"]:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,a,i])}visitInt(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.nullBitmap),a=bn(t.ArrayType,e.data),{["length"]:o=a.length,["nullCount"]:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,a,i])}visitFloat(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.nullBitmap),a=bn(t.ArrayType,e.data),{["length"]:o=a.length,["nullCount"]:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,a,i])}visitUtf8(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.data),a=Jr(e.nullBitmap),o=Tv(e.valueOffsets),{["length"]:s=o.length-1,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new xn(t,n,s,l,[o,i,a])}visitBinary(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.data),a=Jr(e.nullBitmap),o=Tv(e.valueOffsets),{["length"]:s=o.length-1,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new xn(t,n,s,l,[o,i,a])}visitFixedSizeBinary(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.nullBitmap),a=bn(t.ArrayType,e.data),{["length"]:o=a.length/lu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,a,i])}visitDate(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.nullBitmap),a=bn(t.ArrayType,e.data),{["length"]:o=a.length/lu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,a,i])}visitTimestamp(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.nullBitmap),a=bn(t.ArrayType,e.data),{["length"]:o=a.length/lu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,a,i])}visitTime(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.nullBitmap),a=bn(t.ArrayType,e.data),{["length"]:o=a.length/lu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,a,i])}visitDecimal(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.nullBitmap),a=bn(t.ArrayType,e.data),{["length"]:o=a.length/lu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,a,i])}visitList(e){const{["type"]:t,["offset"]:n=0,["child"]:i}=e,a=Jr(e.nullBitmap),o=Tv(e.valueOffsets),{["length"]:s=o.length-1,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new xn(t,n,s,l,[o,void 0,a],[i])}visitStruct(e){const{["type"]:t,["offset"]:n=0,["children"]:i=[]}=e,a=Jr(e.nullBitmap),{length:o=i.reduce((l,{length:u})=>Math.max(l,u),0),nullCount:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,void 0,a],i)}visitUnion(e){const{["type"]:t,["offset"]:n=0,["children"]:i=[]}=e,a=Jr(e.nullBitmap),o=bn(t.ArrayType,e.typeIds),{["length"]:s=o.length,["nullCount"]:l=e.nullBitmap?-1:0}=e;if(ir.isSparseUnion(t))return new xn(t,n,s,l,[void 0,void 0,a,o],i);const u=Tv(e.valueOffsets);return new xn(t,n,s,l,[u,void 0,a,o],i)}visitDictionary(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.nullBitmap),a=bn(t.indices.ArrayType,e.data),{["dictionary"]:o=new on([new Hm().visit({type:t.dictionary})])}=e,{["length"]:s=a.length,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new xn(t,n,s,l,[void 0,a,i],[],o)}visitInterval(e){const{["type"]:t,["offset"]:n=0}=e,i=Jr(e.nullBitmap),a=bn(t.ArrayType,e.data),{["length"]:o=a.length/lu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,a,i])}visitFixedSizeList(e){const{["type"]:t,["offset"]:n=0,["child"]:i=new Hm().visit({type:t.valueType})}=e,a=Jr(e.nullBitmap),{["length"]:o=i.length/lu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new xn(t,n,o,s,[void 0,void 0,a],[i])}visitMap(e){const{["type"]:t,["offset"]:n=0,["child"]:i=new Hm().visit({type:t.childType})}=e,a=Jr(e.nullBitmap),o=Tv(e.valueOffsets),{["length"]:s=o.length-1,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new xn(t,n,s,l,[o,void 0,a],[i])}}function Wr(r){return new Hm().visit(r)}class p4{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndexe+t.nullCount,0)}function KU(r){return r.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(r.length+1))}function QU(r,e,t,n){const i=[];for(let a=-1,o=r.length;++a=n)break;if(t>=l+u)continue;if(l>=t&&l+u<=n){i.push(s);continue}const c=Math.max(0,t-l),f=Math.min(n-l,u);i.push(s.slice(c,f-c))}return i.length===0&&i.push(r[0].slice(0,0)),i}function cL(r,e,t,n){let i=0,a=0,o=e.length-1;do{if(i>=o-1)return t0?0:-1}function rie(r,e){const{nullBitmap:t}=r;if(!t||r.nullCount<=0)return-1;let n=0;for(const i of new uL(t,r.offset+(e||0),r.length,t,ZU)){if(!i)return n;++n}return-1}function Ir(r,e,t){if(e===void 0)return-1;if(e===null)return rie(r,t);const n=Ja.getVisitFn(r),i=Zg(e);for(let a=(t||0)-1,o=r.length;++a{const i=r.data[n];return i.values.subarray(0,i.length)[Symbol.iterator]()});let t=0;return new p4(r.data.length,n=>{const a=r.data[n].length,o=r.slice(t,t+a);return t+=a,new nie(o)})}class nie{constructor(e){this.vector=e,this.index=0}next(){return this.indexr+e;class _f extends jr{visitNull(e,t){return 0}visitInt(e,t){return e.type.bitWidth/8}visitFloat(e,t){return e.type.ArrayType.BYTES_PER_ELEMENT}visitBool(e,t){return 1/8}visitDecimal(e,t){return e.type.bitWidth/8}visitDate(e,t){return(e.type.unit+1)*4}visitTime(e,t){return e.type.bitWidth/8}visitTimestamp(e,t){return e.type.unit===tn.SECOND?4:8}visitInterval(e,t){return(e.type.unit+1)*4}visitStruct(e,t){return e.children.reduce((n,i)=>n+Ol.visit(i,t),0)}visitFixedSizeBinary(e,t){return e.type.byteWidth}visitMap(e,t){return 8+e.children.reduce((n,i)=>n+Ol.visit(i,t),0)}visitDictionary(e,t){var n;return e.type.indices.bitWidth/8+(((n=e.dictionary)===null||n===void 0?void 0:n.getByteLength(e.values[t]))||0)}}const aie=({valueOffsets:r},e)=>8+(r[e+1]-r[e]),oie=({valueOffsets:r},e)=>8+(r[e+1]-r[e]),sie=({valueOffsets:r,stride:e,children:t},n)=>{const i=t[0],{[n*e]:a}=r,{[n*e+1]:o}=r,s=Ol.getVisitFn(i.type),l=i.slice(a,o-a);let u=8;for(let c=-1,f=o-a;++c{const n=e[0],i=n.slice(t*r,r),a=Ol.getVisitFn(n.type);let o=0;for(let s=-1,l=i.length;++sr.type.mode===Ao.Dense?rH(r,e):nH(r,e),rH=({type:r,children:e,typeIds:t,valueOffsets:n},i)=>{const a=r.typeIdToChildIndex[t[i]];return 8+Ol.visit(e[a],n[i])},nH=({children:r},e)=>4+Ol.visitMany(r,r.map(()=>e)).reduce(iie,0);_f.prototype.visitUtf8=aie;_f.prototype.visitBinary=oie;_f.prototype.visitList=sie;_f.prototype.visitFixedSizeList=lie;_f.prototype.visitUnion=uie;_f.prototype.visitDenseUnion=rH;_f.prototype.visitSparseUnion=nH;const Ol=new _f;var iH;const aH={},oH={};class on{constructor(e){var t,n,i;const a=e[0]instanceof on?e.flatMap(s=>s.data):e;if(a.length===0||a.some(s=>!(s instanceof xn)))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=(t=a[0])===null||t===void 0?void 0:t.type;switch(a.length){case 0:this._offsets=[0];break;case 1:{const{get:s,set:l,indexOf:u,byteLength:c}=aH[o.typeId],f=a[0];this.isValid=h=>fL(f,h),this.get=h=>s(f,h),this.set=(h,d)=>l(f,h,d),this.indexOf=h=>u(f,h),this.getByteLength=h=>c(f,h),this._offsets=[0,f.length];break}default:Object.setPrototypeOf(this,oH[o.typeId]),this._offsets=KU(a);break}this.data=a,this.type=o,this.stride=lu(o),this.numChildren=(i=(n=o.children)===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this._byteLength===-1&&(this._byteLength=this.data.reduce((e,t)=>e+t.byteLength,0)),this._byteLength}get nullCount(){return this._nullCount===-1&&(this._nullCount=XU(this.data)),this._nullCount}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${oe[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>0}getByteLength(e){return 0}[Symbol.iterator](){return hL.visit(this)}concat(...e){return new on(this.data.concat(e.flatMap(t=>t.data).flat(Number.POSITIVE_INFINITY)))}slice(e,t){return new on(YU(this,e,t,({data:n,_offsets:i},a,o)=>QU(n,i,a,o)))}toJSON(){return[...this]}toArray(){const{type:e,data:t,length:n,stride:i,ArrayType:a}=this;switch(e.typeId){case oe.Int:case oe.Float:case oe.Decimal:case oe.Time:case oe.Timestamp:switch(t.length){case 0:return new a;case 1:return t[0].values.subarray(0,n*i);default:return t.reduce((o,{values:s,length:l})=>(o.array.set(s.subarray(0,l*i),o.offset),o.offset+=l*i,o),{array:new a(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var t;return this.getChildAt((t=this.type.children)===null||t===void 0?void 0:t.findIndex(n=>n.name===e))}getChildAt(e){return e>-1&&et[e])):null}get isMemoized(){return ir.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(ir.isDictionary(this.type)){const e=new Rw(this.data[0].dictionary),t=this.data.map(n=>{const i=n.clone();return i.dictionary=e,i});return new on(t)}return new Rw(this)}unmemoize(){if(ir.isDictionary(this.type)&&this.isMemoized){const e=this.data[0].dictionary.unmemoize(),t=this.data.map(n=>{const i=n.clone();return i.dictionary=e,i});return new on(t)}return this}}iH=Symbol.toStringTag;on[iH]=(r=>{r.type=ir.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._nullCount=-1,r._byteLength=-1,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const e=Object.keys(oe).map(t=>oe[t]).filter(t=>typeof t=="number"&&t!==oe.NONE);for(const t of e){const n=Ja.getVisitFnByTypeId(t),i=rs.getVisitFnByTypeId(t),a=Pw.getVisitFnByTypeId(t),o=Ol.getVisitFnByTypeId(t);aH[t]={get:n,set:i,indexOf:a,byteLength:o},oH[t]=Object.create(r,{isValid:{value:zp(fL)},get:{value:zp(Ja.getVisitFnByTypeId(t))},set:{value:JU(rs.getVisitFnByTypeId(t))},indexOf:{value:eH(Pw.getVisitFnByTypeId(t))},getByteLength:{value:zp(Ol.getVisitFnByTypeId(t))}})}return"Vector"})(on.prototype);class Rw extends on{constructor(e){super(e.data);const t=this.get,n=this.set,i=this.slice,a=new Array(this.length);Object.defineProperty(this,"get",{value(o){const s=a[o];if(s!==void 0)return s;const l=t.call(this,o);return a[o]=l,l}}),Object.defineProperty(this,"set",{value(o,s){n.call(this,o,s),a[o]=s}}),Object.defineProperty(this,"slice",{value:(o,s)=>new Rw(i.call(this,o,s))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new on(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class TT{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,t,n,i){return e.prep(8,24),e.writeInt64(BigInt(i??0)),e.pad(4),e.writeInt32(n),e.writeInt64(BigInt(t??0)),e.offset()}}const FC=2,cl=4,bu=4,Cn=4,gc=new Int32Array(2),g4=new Float32Array(gc.buffer),v4=new Float64Array(gc.buffer),N1=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var kT;(function(r){r[r.UTF8_BYTES=1]="UTF8_BYTES",r[r.UTF16_STRING=2]="UTF16_STRING"})(kT||(kT={}));let pg=class sH{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new sH(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<>8}writeUint16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeInt32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeUint32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeInt64(e,t){this.writeInt32(e,Number(BigInt.asIntN(32,t))),this.writeInt32(e+4,Number(BigInt.asIntN(32,t>>BigInt(32))))}writeUint64(e,t){this.writeUint32(e,Number(BigInt.asUintN(32,t))),this.writeUint32(e+4,Number(BigInt.asUintN(32,t>>BigInt(32))))}writeFloat32(e,t){g4[0]=t,this.writeInt32(e,gc[0])}writeFloat64(e,t){v4[0]=t,this.writeInt32(e,gc[N1?0:1]),this.writeInt32(e+4,gc[N1?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=e);const n=~(this.bb.capacity()-this.space+t)+1&e-1;for(;this.space=0&&this.vtable[t]==0;t--);const n=t+1;for(;t>=0;t--)this.addInt16(this.vtable[t]!=0?e-this.vtable[t]:0);const i=2;this.addInt16(e-this.object_start);const a=(n+i)*FC;this.addInt16(a);let o=0;const s=this.space;e:for(t=0;t=0;o--)this.writeInt8(a.charCodeAt(o))}this.prep(this.minalign,cl+i),this.addOffset(e),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,t){this.finish(e,t,!0)}requiredField(e,t){const n=this.bb.capacity()-e,i=n-this.bb.readInt32(n);if(!(t=0;n--)e.addInt32(t[n]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,n){return Va.startUnion(e),Va.addMode(e,t),Va.addTypeIds(e,n),Va.endUnion(e)}}class xh{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new xh).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+Cn),(t||new xh).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return xh.startUtf8(e),xh.endUtf8(e)}}var Gn;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.FloatingPoint=3]="FloatingPoint",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct_=13]="Struct_",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.LargeList=21]="LargeList",r[r.RunEndEncoded=22]="RunEndEncoded"})(Gn||(Gn={}));let Fo=class L_{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new L_).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+Cn),(t||new L_).__init(e.readInt32(e.position())+e.position(),e)}name(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){const e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):Gn.NONE}type(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){const t=this.bb.__offset(this.bb_pos,12);return t?(e||new _u).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){const n=this.bb.__offset(this.bb_pos,14);return n?(t||new L_).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}childrenLength(){const e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,16);return n?(t||new pi).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,Gn.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}},al=class au{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new au).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+Cn),(t||new au).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):vg.Little}fields(e,t){const n=this.bb.__offset(this.bb_pos,6);return n?(t||new Fo).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}fieldsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new pi).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):BigInt(0)}featuresLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,vg.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let n=t.length-1;n>=0;n--)e.addInt64(t[n]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,n,i,a){return au.startSchema(e),au.addEndianness(e,t),au.addFields(e,n),au.addCustomMetadata(e,i),au.addFeatures(e,a),au.endSchema(e)}};class lo{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new lo).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+Cn),(t||new lo).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):gg.V1}schema(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new al).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new TT).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}dictionariesLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){const n=this.bb.__offset(this.bb_pos,10);return n?(t||new TT).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}recordBatchesLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,12);return n?(t||new pi).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,gg.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}}class sn{constructor(e=[],t,n){this.fields=e||[],this.metadata=t||new Map,n||(n=MT(e)),this.dictionaries=n}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(e=>e.name)}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(e){const t=new Set(e),n=this.fields.filter(i=>t.has(i.name));return new sn(n,this.metadata)}selectAt(e){const t=e.map(n=>this.fields[n]).filter(Boolean);return new sn(t,this.metadata)}assign(...e){const t=e[0]instanceof sn?e[0]:Array.isArray(e[0])?new sn(e[0]):new sn(e),n=[...this.fields],i=z1(z1(new Map,this.metadata),t.metadata),a=t.fields.filter(s=>{const l=n.findIndex(u=>u.name===s.name);return~l?(n[l]=s.clone({metadata:z1(z1(new Map,n[l].metadata),s.metadata)}))&&!1:!0}),o=MT(a,new Map);return new sn([...n,...a],i,new Map([...this.dictionaries,...o]))}}sn.prototype.fields=null;sn.prototype.metadata=null;sn.prototype.dictionaries=null;class Bn{static new(...e){let[t,n,i,a]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],n===void 0&&(n=e[0].type),i===void 0&&(i=e[0].nullable),a===void 0&&(a=e[0].metadata)),new Bn(`${t}`,n,i,a)}constructor(e,t,n=!1,i){this.name=e,this.type=t,this.nullable=n,this.metadata=i||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,n,i,a]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,n=this.type,i=this.nullable,a=this.metadata]=e:{name:t=this.name,type:n=this.type,nullable:i=this.nullable,metadata:a=this.metadata}=e[0],Bn.new(t,n,i,a)}}Bn.prototype.type=null;Bn.prototype.name=null;Bn.prototype.nullable=null;Bn.prototype.metadata=null;function z1(r,e){return new Map([...r||new Map,...e||new Map])}function MT(r,e=new Map){for(let t=-1,n=r.length;++t0&&MT(a.children,e)}return e}var cie=lH,fie=pg;class w0{static decode(e){e=new fie(Jr(e));const t=lo.getRootAsFooter(e),n=sn.decode(t.schema());return new hie(n,t)}static encode(e){const t=new cie,n=sn.encode(t,e.schema);lo.startRecordBatchesVector(t,e.numRecordBatches);for(const o of[...e.recordBatches()].slice().reverse())Jc.encode(t,o);const i=t.endVector();lo.startDictionariesVector(t,e.numDictionaries);for(const o of[...e.dictionaryBatches()].slice().reverse())Jc.encode(t,o);const a=t.endVector();return lo.startFooter(t),lo.addSchema(t,n),lo.addVersion(t,fo.V4),lo.addRecordBatches(t,i),lo.addDictionaries(t,a),lo.finishFooterBuffer(t,lo.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=fo.V4,n,i){this.schema=e,this.version=t,n&&(this._recordBatches=n),i&&(this._dictionaryBatches=i)}*recordBatches(){for(let e,t=-1,n=this.numRecordBatches;++t=0&&e=0&&e=0&&e=0&&ethis._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return Qt(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){const{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(Hn);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Go.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Go.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return Qt(this,void 0,void 0,function*(){return yield this.abort(e),Hn})}return(e){return Qt(this,void 0,void 0,function*(){return yield this.close(),Hn})}read(e){return Qt(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return Qt(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,n)=>{this.resolvers.push({resolve:t,reject:n})}):Promise.resolve(Hn)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class F_ extends die{write(e){if((e=Jr(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?CT(this.toUint8Array(!0)):this.toUint8Array(!1).then(CT)}toUint8Array(e=!1){return e?Bl(this._values)[0]:Qt(this,void 0,void 0,function*(){var t,n,i,a;const o=[];let s=0;try{for(var l=!0,u=Hh(this),c;c=yield u.next(),t=c.done,!t;l=!0){a=c.value,l=!1;const f=a;o.push(f),s+=f.byteLength}}catch(f){n={error:f}}finally{try{!l&&!t&&(i=u.return)&&(yield i.call(u))}finally{if(n)throw n.error}}return Bl(o,s)[0]})}}class Hw{constructor(e){e&&(this.source=new pie(Go.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class yg{constructor(e){e instanceof yg?this.source=e.source:e instanceof F_?this.source=new If(Go.fromAsyncIterable(e)):$G(e)?this.source=new If(Go.fromNodeStream(e)):JI(e)?this.source=new If(Go.fromDOMStream(e)):WG(e)?this.source=new If(Go.fromDOMStream(e.body)):Zy(e)?this.source=new If(Go.fromIterable(e)):Zc(e)?this.source=new If(Go.fromAsyncIterable(e)):Yg(e)&&(this.source=new If(Go.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class pie{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||Hn)}return(e){return Object.create(this.source.return&&this.source.return(e)||Hn)}}class If{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}cancel(e){return Qt(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return Qt(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return Qt(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e,t="read"){return Qt(this,void 0,void 0,function*(){return yield this.source.next({cmd:t,size:e})})}throw(e){return Qt(this,void 0,void 0,function*(){const t=this.source.throw&&(yield this.source.throw(e))||Hn;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return Qt(this,void 0,void 0,function*(){const t=this.source.return&&(yield this.source.return(e))||Hn;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}}class _4 extends Hw{constructor(e,t){super(),this.position=0,this.buffer=Jr(e),this.size=t===void 0?this.buffer.byteLength:t}readInt32(e){const{buffer:t,byteOffset:n}=this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]);let i=t[3]*n[3];this.buffer[0]=i&65535;let a=i>>>16;return i=t[2]*n[3],a+=i,i=t[3]*n[2]>>>0,a+=i,this.buffer[0]+=a<<16,this.buffer[1]=a>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){const t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]>>0&&++t[1],t[1]>>0&&++t[2],t[2]>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${Sp(this.buffer[3])} ${Sp(this.buffer[2])} ${Sp(this.buffer[1])} ${Sp(this.buffer[0])}`}static multiply(e,t){return new ol(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new ol(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return ol.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return ol.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){const n=e.startsWith("-"),i=e.length,a=new ol(t);for(let o=n?1:0;o0&&this.readData(e,n)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+t)}readDictionary(e){return this.dictionaries.get(e.id)}}class vie extends fH{constructor(e,t,n,i){super(new Uint8Array(0),t,n,i),this.sources=e}readNullBitmap(e,t,{offset:n}=this.nextBufferRange()){return t<=0?new Uint8Array(0):Ow(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return bn(Uint8Array,bn(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return bn(Uint8Array,bn(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){const{sources:n}=this;return ir.isTimestamp(e)||(ir.isInt(e)||ir.isTime(e))&&e.bitWidth===64||ir.isDate(e)&&e.unit===Lu.MILLISECOND?bn(Uint8Array,Na.convertArray(n[t])):ir.isDecimal(e)?bn(Uint8Array,ol.convertArray(n[t])):ir.isBinary(e)||ir.isFixedSizeBinary(e)?mie(n[t]):ir.isBool(e)?Ow(n[t]):ir.isUtf8(e)?QI(n[t].join("")):bn(Uint8Array,bn(e.ArrayType,n[t].map(i=>+i)))}}function mie(r){const e=r.join(""),t=new Uint8Array(e.length/2);for(let n=0;n>1]=Number.parseInt(e.slice(n,n+2),16);return t}class lr extends jr{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((n,i)=>this.compareFields(n,t[i]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}}function ro(r,e){return e instanceof r.constructor}function Xy(r,e){return r===e||ro(r,e)}function $u(r,e){return r===e||ro(r,e)&&r.bitWidth===e.bitWidth&&r.isSigned===e.isSigned}function rA(r,e){return r===e||ro(r,e)&&r.precision===e.precision}function yie(r,e){return r===e||ro(r,e)&&r.byteWidth===e.byteWidth}function gL(r,e){return r===e||ro(r,e)&&r.unit===e.unit}function Ky(r,e){return r===e||ro(r,e)&&r.unit===e.unit&&r.timezone===e.timezone}function Qy(r,e){return r===e||ro(r,e)&&r.unit===e.unit&&r.bitWidth===e.bitWidth}function bie(r,e){return r===e||ro(r,e)&&r.children.length===e.children.length&&ef.compareManyFields(r.children,e.children)}function _ie(r,e){return r===e||ro(r,e)&&r.children.length===e.children.length&&ef.compareManyFields(r.children,e.children)}function vL(r,e){return r===e||ro(r,e)&&r.mode===e.mode&&r.typeIds.every((t,n)=>t===e.typeIds[n])&&ef.compareManyFields(r.children,e.children)}function wie(r,e){return r===e||ro(r,e)&&r.id===e.id&&r.isOrdered===e.isOrdered&&ef.visit(r.indices,e.indices)&&ef.visit(r.dictionary,e.dictionary)}function mL(r,e){return r===e||ro(r,e)&&r.unit===e.unit}function Sie(r,e){return r===e||ro(r,e)&&r.listSize===e.listSize&&r.children.length===e.children.length&&ef.compareManyFields(r.children,e.children)}function Aie(r,e){return r===e||ro(r,e)&&r.keysSorted===e.keysSorted&&r.children.length===e.children.length&&ef.compareManyFields(r.children,e.children)}lr.prototype.visitNull=Xy;lr.prototype.visitBool=Xy;lr.prototype.visitInt=$u;lr.prototype.visitInt8=$u;lr.prototype.visitInt16=$u;lr.prototype.visitInt32=$u;lr.prototype.visitInt64=$u;lr.prototype.visitUint8=$u;lr.prototype.visitUint16=$u;lr.prototype.visitUint32=$u;lr.prototype.visitUint64=$u;lr.prototype.visitFloat=rA;lr.prototype.visitFloat16=rA;lr.prototype.visitFloat32=rA;lr.prototype.visitFloat64=rA;lr.prototype.visitUtf8=Xy;lr.prototype.visitBinary=Xy;lr.prototype.visitFixedSizeBinary=yie;lr.prototype.visitDate=gL;lr.prototype.visitDateDay=gL;lr.prototype.visitDateMillisecond=gL;lr.prototype.visitTimestamp=Ky;lr.prototype.visitTimestampSecond=Ky;lr.prototype.visitTimestampMillisecond=Ky;lr.prototype.visitTimestampMicrosecond=Ky;lr.prototype.visitTimestampNanosecond=Ky;lr.prototype.visitTime=Qy;lr.prototype.visitTimeSecond=Qy;lr.prototype.visitTimeMillisecond=Qy;lr.prototype.visitTimeMicrosecond=Qy;lr.prototype.visitTimeNanosecond=Qy;lr.prototype.visitDecimal=Xy;lr.prototype.visitList=bie;lr.prototype.visitStruct=_ie;lr.prototype.visitUnion=vL;lr.prototype.visitDenseUnion=vL;lr.prototype.visitSparseUnion=vL;lr.prototype.visitDictionary=wie;lr.prototype.visitInterval=mL;lr.prototype.visitIntervalDayTime=mL;lr.prototype.visitIntervalYearMonth=mL;lr.prototype.visitFixedSizeList=Sie;lr.prototype.visitMap=Aie;const ef=new lr;function IT(r,e){return ef.compareSchemas(r,e)}function BC(r,e){return Cie(r,e.map(t=>t.data.concat()))}function Cie(r,e){const t=[...r.fields],n=[],i={numBatches:e.reduce((f,h)=>Math.max(f,h.length),0)};let a=0,o=0,s=-1;const l=e.length;let u,c=[];for(;i.numBatches-- >0;){for(o=Number.POSITIVE_INFINITY,s=-1;++s0&&(n[a++]=Wr({type:new _a(t),length:o,nullCount:0,children:c.slice()})))}return[r=r.assign(t),n.map(f=>new Ga(r,f))]}function xie(r,e,t,n,i){var a;const o=(e+63&-64)>>3;for(let s=-1,l=n.length;++s=e)c===e?t[s]=u:(t[s]=u.slice(0,e),i.numBatches=Math.max(i.numBatches,n[s].unshift(u.slice(e,c-e))));else{const f=r[s];r[s]=f.clone({nullable:!0}),t[s]=(a=u==null?void 0:u._changeLengthAndBackfillNullBitmap(e))!==null&&a!==void 0?a:Wr({type:f.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)})}}return t}var hH;let Pl=class ah{constructor(...e){var t,n;if(e.length===0)return this.batches=[],this.schema=new sn([]),this._offsets=[0],this;let i,a;e[0]instanceof sn&&(i=e.shift()),e.at(-1)instanceof Uint32Array&&(a=e.pop());const o=l=>{if(l){if(l instanceof Ga)return[l];if(l instanceof ah)return l.batches;if(l instanceof xn){if(l.type instanceof _a)return[new Ga(new sn(l.type.children),l)]}else{if(Array.isArray(l))return l.flatMap(u=>o(u));if(typeof l[Symbol.iterator]=="function")return[...l].flatMap(u=>o(u));if(typeof l=="object"){const u=Object.keys(l),c=u.map(d=>new on([l[d]])),f=new sn(u.map((d,p)=>new Bn(String(d),c[p].type))),[,h]=BC(f,c);return h.length===0?[new Ga(l)]:h}}}return[]},s=e.flatMap(l=>o(l));if(i=(n=i??((t=s[0])===null||t===void 0?void 0:t.schema))!==null&&n!==void 0?n:new sn([]),!(i instanceof sn))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const l of s){if(!(l instanceof Ga))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!IT(i,l.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=i,this.batches=s,this._offsets=a??KU(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,t)=>e+t.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=XU(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}set(e,t){}indexOf(e,t){return-1}getByteLength(e){return 0}[Symbol.iterator](){return this.batches.length>0?hL.visit(new on(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ + ${this.toArray().join(`, + `)} +]`}concat(...e){const t=this.schema,n=this.data.concat(e.flatMap(({data:i})=>i));return new ah(t,n.map(i=>new Ga(t,i)))}slice(e,t){const n=this.schema;[e,t]=YU({length:this.numRows},e,t);const i=QU(this.data,this._offsets,e,t);return new ah(n,i.map(a=>new Ga(n,a)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&en.children[e]);if(t.length===0){const{type:n}=this.schema.fields[e],i=Wr({type:n,length:0,nullCount:0});t.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new on(t)}return null}setChild(e,t){var n;return this.setChildAt((n=this.schema.fields)===null||n===void 0?void 0:n.findIndex(i=>i.name===e),t)}setChildAt(e,t){let n=this.schema,i=[...this.batches];if(e>-1&&ethis.getChildAt(u));[a[e],s[e]]=[o,t],[n,i]=BC(n,s)}return new ah(n,i)}select(e){const t=this.schema.fields.reduce((n,i,a)=>n.set(i.name,a),new Map);return this.selectAt(e.map(n=>t.get(n)).filter(n=>n>-1))}selectAt(e){const t=this.schema.selectAt(e),n=this.batches.map(i=>i.selectAt(e));return new ah(t,n)}assign(e){const t=this.schema.fields,[n,i]=e.schema.fields.reduce((s,l,u)=>{const[c,f]=s,h=t.findIndex(d=>d.name===l.name);return~h?f[h]=u:c.push(u),s},[[],[]]),a=this.schema.assign(e.schema),o=[...t.map((s,l)=>[l,i[l]]).map(([s,l])=>l===void 0?this.getChildAt(s):e.getChildAt(l)),...n.map(s=>e.getChildAt(s))].filter(Boolean);return new ah(...BC(a,o))}};hH=Symbol.toStringTag;Pl[hH]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=zp(fL),r.get=zp(Ja.getVisitFn(oe.Struct)),r.set=JU(rs.getVisitFn(oe.Struct)),r.indexOf=eH(Pw.getVisitFn(oe.Struct)),r.getByteLength=zp(Ol.getVisitFn(oe.Struct)),"Table"))(Pl.prototype);var dH;let Ga=class wm{constructor(...e){switch(e.length){case 2:{if([this.schema]=e,!(this.schema instanceof sn))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=Wr({nullCount:0,type:new _a(this.schema.fields),children:this.schema.fields.map(t=>Wr({type:t.type,nullCount:0}))})]=e,!(this.data instanceof xn))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=w4(this.schema,this.data.children);break}case 1:{const[t]=e,{fields:n,children:i,length:a}=Object.keys(t).reduce((l,u,c)=>(l.children[c]=t[u],l.length=Math.max(l.length,t[u].length),l.fields[c]=Bn.new({name:u,type:t[u].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new sn(n),s=Wr({type:new _a(n),length:a,children:i,nullCount:0});[this.schema,this.data]=w4(o,s.children,a);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=pH(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return Ja.visit(this.data,e)}set(e,t){return rs.visit(this.data,e,t)}indexOf(e,t){return Pw.visit(this.data,e,t)}getByteLength(e){return Ol.visit(this.data,e)}[Symbol.iterator](){return hL.visit(new on([this.data]))}toArray(){return[...this]}concat(...e){return new Pl(this.schema,[this,...e])}slice(e,t){const[n]=new on([this.data]).slice(e,t).data;return new wm(this.schema,n)}getChild(e){var t;return this.getChildAt((t=this.schema.fields)===null||t===void 0?void 0:t.findIndex(n=>n.name===e))}getChildAt(e){return e>-1&&ei.name===e),t)}setChildAt(e,t){let n=this.schema,i=this.data;if(e>-1&&es.name===a);~o&&(i[o]=this.data.children[o])}return new wm(t,Wr({type:n,length:this.numRows,children:i}))}selectAt(e){const t=this.schema.selectAt(e),n=e.map(a=>this.data.children[a]).filter(Boolean),i=Wr({type:new _a(t.fields),length:this.numRows,children:n});return new wm(t,i)}};dH=Symbol.toStringTag;Ga[dH]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(Ga.prototype);function w4(r,e,t=e.reduce((n,i)=>Math.max(n,i.length),0)){var n;const i=[...r.fields],a=[...e],o=(t+63&-64)>>3;for(const[s,l]of r.fields.entries()){const u=e[s];(!u||u.length!==t)&&(i[s]=l.clone({nullable:!0}),a[s]=(n=u==null?void 0:u._changeLengthAndBackfillNullBitmap(t))!==null&&n!==void 0?n:Wr({type:l.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)}))}return[r.assign(i),Wr({type:new _a(i),length:t,children:a})]}function pH(r,e,t=new Map){for(let n=-1,i=r.length;++n0&&pH(o.children,s.children,t)}return t}class yL extends Ga{constructor(e){const t=e.fields.map(i=>Wr({type:i.type})),n=Wr({type:new _a(e.fields),nullCount:0,children:t});super(e,n)}}var $w;(function(r){r[r.BUFFER=0]="BUFFER"})($w||($w={}));var jw;(function(r){r[r.LZ4_FRAME=0]="LZ4_FRAME",r[r.ZSTD=1]="ZSTD"})(jw||(jw={}));class vc{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(e,t){return(t||new vc).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+Cn),(t||new vc).__init(e.readInt32(e.position())+e.position(),e)}codec(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):jw.LZ4_FRAME}method(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):$w.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,jw.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,$w.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,n){return vc.startBodyCompression(e),vc.addCodec(e,t),vc.addMethod(e,n),vc.endBodyCompression(e)}}let gH=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(e,t,n){return e.prep(8,16),e.writeInt64(BigInt(n??0)),e.writeInt64(BigInt(t??0)),e.offset()}},vH=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(e,t,n){return e.prep(8,16),e.writeInt64(BigInt(n??0)),e.writeInt64(BigInt(t??0)),e.offset()}},uu=class LT{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new LT).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+Cn),(t||new LT).__init(e.readInt32(e.position())+e.position(),e)}length(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}nodes(e,t){const n=this.bb.__offset(this.bb_pos,6);return n?(t||new vH).__init(this.bb.__vector(this.bb_pos+n)+e*16,this.bb):null}nodesLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new gH).__init(this.bb.__vector(this.bb_pos+n)+e*16,this.bb):null}buffersLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){const t=this.bb.__offset(this.bb_pos,10);return t?(e||new vc).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,BigInt("0"))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}},fp=class FT{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(e,t){return(t||new FT).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+Cn),(t||new FT).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}data(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new uu).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){const e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,BigInt("0"))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}};var qw;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(qw||(qw={}));let Ku=class tl{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new tl).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+Cn),(t||new tl).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):gg.V1}headerType(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):qw.NONE}header(e){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,12);return n?(t||new pi).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,gg.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,qw.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,BigInt("0"))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,n,i,a,o){return tl.startMessage(e),tl.addVersion(e,t),tl.addHeaderType(e,n),tl.addHeader(e,i),tl.addBodyLength(e,a),tl.addCustomMetadata(e,o),tl.endMessage(e)}};class Die extends jr{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return y4.startNull(t),y4.endNull(t)}visitInt(e,t){return co.startInt(t),co.addBitWidth(t,e.bitWidth),co.addIsSigned(t,e.isSigned),co.endInt(t)}visitFloat(e,t){return dl.startFloatingPoint(t),dl.addPrecision(t,e.precision),dl.endFloatingPoint(t)}visitBinary(e,t){return Sh.startBinary(t),Sh.endBinary(t)}visitBool(e,t){return m4.startBool(t),m4.endBool(t)}visitUtf8(e,t){return xh.startUtf8(t),xh.endUtf8(t)}visitDecimal(e,t){return za.startDecimal(t),za.addScale(t,e.scale),za.addPrecision(t,e.precision),za.addBitWidth(t,e.bitWidth),za.endDecimal(t)}visitDate(e,t){return M_.startDate(t),M_.addUnit(t,e.unit),M_.endDate(t)}visitTime(e,t){return Uo.startTime(t),Uo.addUnit(t,e.unit),Uo.addBitWidth(t,e.bitWidth),Uo.endTime(t)}visitTimestamp(e,t){const n=e.timezone&&t.createString(e.timezone)||void 0;return Ho.startTimestamp(t),Ho.addUnit(t,e.unit),n!==void 0&&Ho.addTimezone(t,n),Ho.endTimestamp(t)}visitInterval(e,t){return pl.startInterval(t),pl.addUnit(t,e.unit),pl.endInterval(t)}visitList(e,t){return Ah.startList(t),Ah.endList(t)}visitStruct(e,t){return Ch.startStruct_(t),Ch.endStruct_(t)}visitUnion(e,t){Va.startTypeIdsVector(t,e.typeIds.length);const n=Va.createTypeIdsVector(t,e.typeIds);return Va.startUnion(t),Va.addMode(t,e.mode),Va.addTypeIds(t,n),Va.endUnion(t)}visitDictionary(e,t){const n=this.visit(e.indices,t);return _u.startDictionaryEncoding(t),_u.addId(t,BigInt(e.id)),_u.addIsOrdered(t,e.isOrdered),n!==void 0&&_u.addIndexType(t,n),_u.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return fl.startFixedSizeBinary(t),fl.addByteWidth(t,e.byteWidth),fl.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return hl.startFixedSizeList(t),hl.addListSize(t,e.listSize),hl.endFixedSizeList(t)}visitMap(e,t){return I_.startMap(t),I_.addKeysSorted(t,e.keysSorted),I_.endMap(t)}}const OC=new Die;function Eie(r,e=new Map){return new sn(kie(r,e),B_(r.customMetadata),e)}function mH(r){return new Co(r.count,yH(r.columns),bH(r.columns))}function Tie(r){return new Rl(mH(r.data),r.id,r.isDelta)}function kie(r,e){return(r.fields||[]).filter(Boolean).map(t=>Bn.fromJSON(t,e))}function S4(r,e){return(r.children||[]).filter(Boolean).map(t=>Bn.fromJSON(t,e))}function yH(r){return(r||[]).reduce((e,t)=>[...e,new Cd(t.count,Mie(t.VALIDITY)),...yH(t.children)],[])}function bH(r,e=[]){for(let t=-1,n=(r||[]).length;++te+ +(t===0),0)}function Iie(r,e){let t,n,i,a,o,s;return!e||!(a=r.dictionary)?(o=C4(r,S4(r,e)),i=new Bn(r.name,o,r.nullable,B_(r.customMetadata))):e.has(t=a.id)?(n=(n=a.indexType)?A4(n):new y0,s=new dg(e.get(t),n,t,a.isOrdered),i=new Bn(r.name,s,r.nullable,B_(r.customMetadata))):(n=(n=a.indexType)?A4(n):new y0,e.set(t,o=C4(r,S4(r,e))),s=new dg(o,n,t,a.isOrdered),i=new Bn(r.name,s,r.nullable,B_(r.customMetadata))),i||null}function B_(r){return new Map(Object.entries(r||{}))}function A4(r){return new Qc(r.isSigned,r.bitWidth)}function C4(r,e){const t=r.type.name;switch(t){case"NONE":return new Kc;case"null":return new Kc;case"binary":return new Aw;case"utf8":return new Cw;case"bool":return new xw;case"list":return new Mw((e||[])[0]);case"struct":return new _a(e||[]);case"struct_":return new _a(e||[])}switch(t){case"int":{const n=r.type;return new Qc(n.isSigned,n.bitWidth)}case"floatingpoint":{const n=r.type;return new b0(Xa[n.precision])}case"decimal":{const n=r.type;return new Dw(n.scale,n.precision,n.bitWidth)}case"date":{const n=r.type;return new Ew(Lu[n.unit])}case"time":{const n=r.type;return new _0(tn[n.unit],n.bitWidth)}case"timestamp":{const n=r.type;return new Tw(tn[n.unit],n.timezone)}case"interval":{const n=r.type;return new kw(Xc[n.unit])}case"union":{const n=r.type;return new Iw(Ao[n.mode],n.typeIds||[],e||[])}case"fixedsizebinary":{const n=r.type;return new Lw(n.byteWidth)}case"fixedsizelist":{const n=r.type;return new Fw(n.listSize,(e||[])[0])}case"map":{const n=r.type;return new Bw((e||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}var Lie=lH,Fie=pg;class wa{static fromJSON(e,t){const n=new wa(0,fo.V4,t);return n._createHeader=Bie(e,t),n}static decode(e){e=new Fie(Jr(e));const t=Ku.getRootAsMessage(e),n=t.bodyLength(),i=t.version(),a=t.headerType(),o=new wa(n,i,a);return o._createHeader=Oie(t,a),o}static encode(e){const t=new Lie;let n=-1;return e.isSchema()?n=sn.encode(t,e.header()):e.isRecordBatch()?n=Co.encode(t,e.header()):e.isDictionaryBatch()&&(n=Rl.encode(t,e.header())),Ku.startMessage(t),Ku.addVersion(t,fo.V4),Ku.addHeader(t,n),Ku.addHeaderType(t,e.headerType),Ku.addBodyLength(t,BigInt(e.bodyLength)),Ku.finishMessageBuffer(t,Ku.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof sn)return new wa(0,fo.V4,an.Schema,e);if(e instanceof Co)return new wa(t,fo.V4,an.RecordBatch,e);if(e instanceof Rl)return new wa(t,fo.V4,an.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===an.Schema}isRecordBatch(){return this.headerType===an.RecordBatch}isDictionaryBatch(){return this.headerType===an.DictionaryBatch}constructor(e,t,n,i){this._version=t,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=Fs(e)}}class Co{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,n){this._nodes=t,this._buffers=n,this._length=Fs(e)}}class Rl{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,t,n=!1){this._data=e,this._isDelta=n,this._id=Fs(t)}}class _l{constructor(e,t){this.offset=Fs(e),this.length=Fs(t)}}class Cd{constructor(e,t){this.length=Fs(e),this.nullCount=Fs(t)}}function Bie(r,e){return()=>{switch(e){case an.Schema:return sn.fromJSON(r);case an.RecordBatch:return Co.fromJSON(r);case an.DictionaryBatch:return Rl.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${an[e]}, type: ${e} }`)}}function Oie(r,e){return()=>{switch(e){case an.Schema:return sn.decode(r.header(new al));case an.RecordBatch:return Co.decode(r.header(new uu),r.version());case an.DictionaryBatch:return Rl.decode(r.header(new fp),r.version())}throw new Error(`Unrecognized Message type: { name: ${an[e]}, type: ${e} }`)}}Bn.encode=jie;Bn.decode=Wie;Bn.fromJSON=Iie;sn.encode=$ie;sn.decode=Pie;sn.fromJSON=Eie;Co.encode=qie;Co.decode=Rie;Co.fromJSON=mH;Rl.encode=Yie;Rl.decode=Nie;Rl.fromJSON=Tie;Cd.encode=Zie;Cd.decode=Vie;_l.encode=Xie;_l.decode=zie;function Pie(r,e=new Map){const t=Hie(r,e);return new sn(t,O_(r),e)}function Rie(r,e=fo.V4){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Co(r.length(),Gie(r),Uie(r,e))}function Nie(r,e=fo.V4){return new Rl(Co.decode(r.data(),e),r.id(),r.isDelta())}function zie(r){return new _l(r.offset(),r.length())}function Vie(r){return new Cd(r.length(),r.nullCount())}function Gie(r){const e=[];for(let t,n=-1,i=-1,a=r.nodesLength();++nBn.encode(r,a));al.startFieldsVector(r,t.length);const n=al.createFieldsVector(r,t),i=e.metadata&&e.metadata.size>0?al.createCustomMetadataVector(r,[...e.metadata].map(([a,o])=>{const s=r.createString(`${a}`),l=r.createString(`${o}`);return pi.startKeyValue(r),pi.addKey(r,s),pi.addValue(r,l),pi.endKeyValue(r)})):-1;return al.startSchema(r),al.addFields(r,n),al.addEndianness(r,Kie?vg.Little:vg.Big),i!==-1&&al.addCustomMetadata(r,i),al.endSchema(r)}function jie(r,e){let t=-1,n=-1,i=-1;const a=e.type;let o=e.typeId;ir.isDictionary(a)?(o=a.dictionary.typeId,i=OC.visit(a,r),n=OC.visit(a.dictionary,r)):n=OC.visit(a,r);const s=(a.children||[]).map(c=>Bn.encode(r,c)),l=Fo.createChildrenVector(r,s),u=e.metadata&&e.metadata.size>0?Fo.createCustomMetadataVector(r,[...e.metadata].map(([c,f])=>{const h=r.createString(`${c}`),d=r.createString(`${f}`);return pi.startKeyValue(r),pi.addKey(r,h),pi.addValue(r,d),pi.endKeyValue(r)})):-1;return e.name&&(t=r.createString(e.name)),Fo.startField(r),Fo.addType(r,n),Fo.addTypeType(r,o),Fo.addChildren(r,l),Fo.addNullable(r,!!e.nullable),t!==-1&&Fo.addName(r,t),i!==-1&&Fo.addDictionary(r,i),u!==-1&&Fo.addCustomMetadata(r,u),Fo.endField(r)}function qie(r,e){const t=e.nodes||[],n=e.buffers||[];uu.startNodesVector(r,t.length);for(const o of t.slice().reverse())Cd.encode(r,o);const i=r.endVector();uu.startBuffersVector(r,n.length);for(const o of n.slice().reverse())_l.encode(r,o);const a=r.endVector();return uu.startRecordBatch(r),uu.addLength(r,BigInt(e.length)),uu.addNodes(r,i),uu.addBuffers(r,a),uu.endRecordBatch(r)}function Yie(r,e){const t=Co.encode(r,e.data);return fp.startDictionaryBatch(r),fp.addId(r,BigInt(e.id)),fp.addIsDelta(r,e.isDelta),fp.addData(r,t),fp.endDictionaryBatch(r)}function Zie(r,e){return vH.createFieldNode(r,BigInt(e.length),BigInt(e.nullCount))}function Xie(r,e){return gH.createBuffer(r,BigInt(e.offset),BigInt(e.length))}const Kie=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),bL=r=>`Expected ${an[r]} Message in stream, but was null or length 0.`,_L=r=>`Header pointer of flatbuffer-encoded ${an[r]} Message is null or length 0.`,_H=(r,e)=>`Expected to read ${r} metadata bytes, but only read ${e}.`,wH=(r,e)=>`Expected to read ${r} bytes for message body, but only read ${e}.`;class SH{constructor(e){this.source=e instanceof Hw?e:new Hw(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?Hn:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(bL(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);const t=Jr(this.source.read(e));if(t.byteLength[...i,...a.VALIDITY&&[a.VALIDITY]||[],...a.TYPE&&[a.TYPE]||[],...a.OFFSET&&[a.OFFSET]||[],...a.DATA&&[a.DATA]||[],...t(a.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(bL(e));return t.value}readSchema(){const e=an.Schema,t=this.readMessage(e),n=t==null?void 0:t.header();if(!t||!n)throw new Error(_L(e));return n}}const nA=4,BT="ARROW1",S0=new Uint8Array(BT.length);for(let r=0;rthis):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Go.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Go.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof mo?e:xT(e)?iae(e):HG(e)?sae(e):Zc(e)?Qt(this,void 0,void 0,function*(){return yield mo.from(yield e)}):WG(e)||JI(e)||$G(e)||Yg(e)?oae(new yg(e)):aae(new Hw(e))}static readAll(e){return e instanceof mo?e.isSync()?T4(e):k4(e):xT(e)||ArrayBuffer.isView(e)||Zy(e)||UG(e)?T4(e):k4(e)}}class Yw extends mo{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return bl(this,arguments,function*(){yield _r(yield*k_(Hh(this[Symbol.iterator]())))})}}class Zw extends mo{constructor(e){super(e),this._impl=e}readAll(){var e,t,n,i;return Qt(this,void 0,void 0,function*(){const a=new Array;try{for(var o=!0,s=Hh(this),l;l=yield s.next(),e=l.done,!e;o=!0){i=l.value,o=!1;const u=i;a.push(u)}}catch(u){t={error:u}}finally{try{!o&&!e&&(n=s.return)&&(yield n.call(s))}finally{if(t)throw t.error}}return a})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class CH extends Yw{constructor(e){super(e),this._impl=e}}class tae extends Zw{constructor(e){super(e),this._impl=e}}class xH{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){const n=this._loadVectors(e,t,this.schema.fields),i=Wr({type:new _a(this.schema.fields),length:e.length,children:n});return new Ga(this.schema,i)}_loadDictionaryBatch(e,t){const{id:n,isDelta:i}=e,{dictionaries:a,schema:o}=this,s=a.get(n);if(i||!s){const l=o.dictionaries.get(n),u=this._loadVectors(e.data,t,[l]);return(s&&i?s.concat(new on(u)):new on(u)).memoize()}return s.memoize()}_loadVectors(e,t,n){return new fH(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}}class Xw extends xH{constructor(e,t){super(t),this._reader=xT(e)?new Jie(this._handle=e):new SH(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=EH(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Hn}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Hn}next(){if(this.closed)return Hn;let e;const{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;const n=e.header(),i=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;const n=e.header(),i=t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new yL(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}}class Kw extends xH{constructor(e,t){super(t),this._reader=new Qie(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Qt(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return Qt(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=EH(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Qt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):Hn})}return(e){return Qt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):Hn})}next(){return Qt(this,void 0,void 0,function*(){if(this.closed)return Hn;let e;const{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;const n=e.header(),i=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;const n=e.header(),i=yield t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new yL(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Qt(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}}class DH extends Xw{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof _4?e:new _4(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();const n=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(an.RecordBatch);if(i!=null&&i.isRecordBatch()){const a=i.header(),o=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(a,o)}}return null}_readDictionaryBatch(e){var t;const n=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(an.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const a=i.header(),o=this._reader.readMessageBody(i.bodyLength),s=this._loadDictionaryBatch(a,o);this.dictionaries.set(a.id,s)}}}_readFooter(){const{_handle:e}=this,t=e.size-AH,n=e.readInt32(t),i=e.readAt(t-n,n);return w0.decode(i)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Qt(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const n of this._footer.dictionaryBatches())n&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){var t;return Qt(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());const n=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(an.RecordBatch);if(i!=null&&i.isRecordBatch()){const a=i.header(),o=yield this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(a,o)}}return null})}_readDictionaryBatch(e){var t;return Qt(this,void 0,void 0,function*(){const n=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(an.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const a=i.header(),o=yield this._reader.readMessageBody(i.bodyLength),s=this._loadDictionaryBatch(a,o);this.dictionaries.set(a.id,s)}}})}_readFooter(){return Qt(this,void 0,void 0,function*(){const{_handle:e}=this;e._pending&&(yield e._pending);const t=e.size-AH,n=yield e.readInt32(t),i=yield e.readAt(t-n,n);return w0.decode(i)})}_readNextMessageAndValidate(e){return Qt(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?wL(e)?new CH(new DH(r.read())):new Yw(new Xw(r)):new Yw(new Xw(function*(){}()))}function oae(r){return Qt(this,void 0,void 0,function*(){const e=yield r.peek(Jy+7&-8);return e&&e.byteLength>=4?wL(e)?new CH(new DH(yield r.read())):new Zw(new Kw(r)):new Zw(new Kw(function(){return bl(this,arguments,function*(){})}()))})}function sae(r){return Qt(this,void 0,void 0,function*(){const{size:e}=yield r.stat(),t=new Ww(r,e);return e>=eae&&wL(yield t.readAt(0,Jy+7&-8))?new tae(new rae(t)):new Zw(new Kw(t))})}class oi extends jr{static assemble(...e){const t=i=>i.flatMap(a=>Array.isArray(a)?t(a):a instanceof Ga?a.data.children:a.data),n=new oi;return n.visitMany(t(e)),n}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(e){if(e instanceof on)return this.visitMany(e.data),this;const{type:t}=e;if(!ir.isDictionary(t)){const{length:n,nullCount:i}=e;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");ir.isNull(t)||Es.call(this,i<=0?new Uint8Array(0):lL(e.offset,n,e.nullBitmap)),this.nodes.push(new Cd(n,i))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function Es(r){const e=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new _l(this._byteLength,e)),this._byteLength+=e,this}function lae(r){const{type:e,length:t,typeIds:n,valueOffsets:i}=r;if(Es.call(this,n),e.mode===Ao.Sparse)return OT.call(this,r);if(e.mode===Ao.Dense){if(r.offset<=0)return Es.call(this,i),OT.call(this,r);{const a=n.reduce((c,f)=>Math.max(c,f),n[0]),o=new Int32Array(a+1),s=new Int32Array(a+1).fill(-1),l=new Int32Array(t),u=tL(-i[0],t,i);for(let c,f,h=-1;++h=r.length?Es.call(this,new Uint8Array(0)):(e=r.values)instanceof Uint8Array?Es.call(this,lL(r.offset,r.length,e)):Es.call(this,Ow(r.values))}function wf(r){return Es.call(this,r.values.subarray(0,r.length*r.stride))}function TH(r){const{length:e,values:t,valueOffsets:n}=r,i=n[0],a=n[e],o=Math.min(a-i,t.byteLength-i);return Es.call(this,tL(-n[0],e,n)),Es.call(this,t.subarray(i,i+o)),this}function SL(r){const{length:e,valueOffsets:t}=r;return t&&Es.call(this,tL(t[0],e,t)),this.visit(r.children[0])}function OT(r){return this.visitMany(r.type.children.map((e,t)=>r.children[t]).filter(Boolean))[0]}oi.prototype.visitBool=uae;oi.prototype.visitInt=wf;oi.prototype.visitFloat=wf;oi.prototype.visitUtf8=TH;oi.prototype.visitBinary=TH;oi.prototype.visitFixedSizeBinary=wf;oi.prototype.visitDate=wf;oi.prototype.visitTimestamp=wf;oi.prototype.visitTime=wf;oi.prototype.visitDecimal=wf;oi.prototype.visitList=SL;oi.prototype.visitStruct=OT;oi.prototype.visitUnion=lae;oi.prototype.visitInterval=wf;oi.prototype.visitFixedSizeList=SL;oi.prototype.visitMap=SL;class kH extends dL{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}constructor(e){super(),this._position=0,this._started=!1,this._sink=new F_,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,Qa(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return Zc(e)?e.then(t=>this.writeAll(t)):Yg(e)?DL(this,e):xL(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof F_?this._sink=e:(this._sink=new F_,e&&Mre(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&Ire(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,(!t||!IT(t,this._schema))&&(t==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof Pl&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Ga&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!IT(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Ga?e instanceof yL||this._writeRecordBatch(e):e instanceof Pl?this.writeAll(e.batches):Zy(e)&&this.writeAll(e)}_writeMessage(e,t=8){const n=t-1,i=wa.encode(e),a=i.byteLength,o=this._writeLegacyIpcFormat?4:8,s=a+o+n&~n,l=s-a-o;return e.headerType===an.RecordBatch?this._recordBatchBlocks.push(new Jc(s,e.bodyLength,this._position)):e.headerType===an.DictionaryBatch&&this._dictionaryBlocks.push(new Jc(s,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(s-o)),a>0&&this._write(i),this._writePadding(l)}_write(e){if(this._started){const t=Jr(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(wa.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(S0)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){const{byteLength:t,nodes:n,bufferRegions:i,buffers:a}=oi.assemble(e),o=new Co(e.numRows,n,i),s=wa.from(o,t);return this._writeDictionaries(e)._writeMessage(s)._writeBodyBuffers(a)}_writeDictionaryBatch(e,t,n=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));const{byteLength:i,nodes:a,bufferRegions:o,buffers:s}=oi.assemble(new on([e])),l=new Co(e.length,a,o),u=new Rl(l,t,n),c=wa.from(u,i);return this._writeMessage(c)._writeBodyBuffers(s)}_writeBodyBuffers(e){let t,n,i;for(let a=-1,o=e.length;++a0&&(this._write(t),(i=(n+7&-8)-n)>0&&this._writePadding(i));return this}_writeDictionaries(e){for(let[t,n]of e.dictionaries){let i=this._dictionaryDeltaOffsets.get(t)||0;if(i===0||(n=n==null?void 0:n.slice(i)).length>0)for(const a of n.data)this._writeDictionaryBatch(a,t,i>0),i+=a.length}return this}}class AL extends kH{static writeAll(e,t){const n=new AL(t);return Zc(e)?e.then(i=>n.writeAll(i)):Yg(e)?DL(n,e):xL(n,e)}}class CL extends kH{static writeAll(e){const t=new CL;return Zc(e)?e.then(n=>t.writeAll(n)):Yg(e)?DL(t,e):xL(t,e)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){const t=w0.encode(new w0(e,fo.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}}function xL(r,e){let t=e;e instanceof Pl&&(t=e.batches,r.reset(void 0,e.schema));for(const n of t)r.write(n);return r.finish()}function DL(r,e){var t,n,i,a,o,s,l;return Qt(this,void 0,void 0,function*(){try{for(t=!0,n=Hh(e);i=yield n.next(),a=i.done,!a;t=!0){l=i.value,t=!1;const u=l;r.write(u)}}catch(u){o={error:u}}finally{try{!t&&!a&&(s=n.return)&&(yield s.call(n))}finally{if(o)throw o.error}}return r.finish()})}function cae(r){const e=mo.from(r);return Zc(e)?e.then(t=>cae(t)):e.isAsync()?e.readAll().then(t=>new Pl(t)):new Pl(e.readAll())}function fae(r,e="stream"){return(e==="stream"?AL:CL).writeAll(r).toUint8Array(!0)}function hae(r){switch(r.typeId){case oe.Date:return"date";case oe.Float:case oe.Int:return"number";case oe.Bool:return"boolean";case oe.Dictionary:default:return"string"}}function dae(r){if(r==null)return[];const e=r.toArray();return Object.defineProperty(e,"_evidenceColumnTypes",{enumerable:!1,value:r.schema.fields.map(t=>({name:t.name,evidenceType:hae(t.type),typeFidelity:"precise"}))}),e}function MH(){let r,e,t=new Promise((n,i)=>{r=n,e=i});return{resolve:r,reject:e,promise:t}}function IH(r){return Promise.race([r,new Promise((e,t)=>setTimeout(()=>t(new Error("Timeout while initializing database")),5e3))])}var pae=Object.create,LH=Object.defineProperty,gae=Object.getOwnPropertyDescriptor,vae=Object.getOwnPropertyNames,mae=Object.getPrototypeOf,yae=Object.prototype.hasOwnProperty,bae=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),_ae=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vae(e))!yae.call(r,i)&&i!==t&&LH(r,i,{get:()=>e[i],enumerable:!(n=gae(e,i))||n.enumerable});return r},wae=(r,e,t)=>(t=r!=null?pae(mae(r)):{},_ae(!r||!r.__esModule?LH(t,"default",{value:r,enumerable:!0}):t,r)),Sae=bae((r,e)=>{e.exports=Worker}),Aae=(r=>(r[r.UNDEFINED=0]="UNDEFINED",r[r.AUTOMATIC=1]="AUTOMATIC",r[r.READ_ONLY=2]="READ_ONLY",r[r.READ_WRITE=3]="READ_WRITE",r))(Aae||{}),Cae=(r=>(r[r.IDENTIFIER=0]="IDENTIFIER",r[r.NUMERIC_CONSTANT=1]="NUMERIC_CONSTANT",r[r.STRING_CONSTANT=2]="STRING_CONSTANT",r[r.OPERATOR=3]="OPERATOR",r[r.KEYWORD=4]="KEYWORD",r[r.COMMENT=5]="COMMENT",r))(Cae||{}),xae=(r=>(r[r.NONE=0]="NONE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARNING=3]="WARNING",r[r.ERROR=4]="ERROR",r))(xae||{}),Dae=(r=>(r[r.NONE=0]="NONE",r[r.CONNECT=1]="CONNECT",r[r.DISCONNECT=2]="DISCONNECT",r[r.OPEN=3]="OPEN",r[r.QUERY=4]="QUERY",r[r.INSTANTIATE=5]="INSTANTIATE",r))(Dae||{}),Eae=(r=>(r[r.NONE=0]="NONE",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR",r[r.START=3]="START",r[r.RUN=4]="RUN",r[r.CAPTURE=5]="CAPTURE",r))(Eae||{}),Tae=(r=>(r[r.NONE=0]="NONE",r[r.WEB_WORKER=1]="WEB_WORKER",r[r.NODE_WORKER=2]="NODE_WORKER",r[r.BINDINGS=3]="BINDINGS",r[r.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",r))(Tae||{}),kae=class{log(r){}};var Mae=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(Mae||{}),Iae=class{constructor(r,e){this._bindings=r,this._conn=e}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(r){return r(this._bindings,this._conn)}async query(r){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let e=await this._bindings.runQuery(this._conn,r),t=mo.from(e);return console.assert(t.isSync(),"Reader is not sync"),console.assert(t.isFile(),"Reader is not file"),new Pl(t)}async send(r){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let e=await this._bindings.startPendingQuery(this._conn,r);for(;e==null;)e=await this._bindings.pollPendingQuery(this._conn);let t=new FH(this._bindings,this._conn,e),n=await mo.from(t);return console.assert(n.isAsync()),console.assert(n.isStream()),n}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(r){return await this._bindings.getTableNames(this._conn,r)}async prepare(r){let e=await this._bindings.createPrepared(this._conn,r);return new Lae(this._bindings,this._conn,e)}async insertArrowTable(r,e){let t=fae(r,"stream");await this.insertArrowFromIPCStream(t,e)}async insertArrowFromIPCStream(r,e){await this._bindings.insertArrowFromIPCStream(this._conn,r,e)}async insertCSVFromPath(r,e){await this._bindings.insertCSVFromPath(this._conn,r,e)}async insertJSONFromPath(r,e){await this._bindings.insertJSONFromPath(this._conn,r,e)}},FH=class{constructor(e,t,n){this.db=e,this.conn=t,this.header=n,this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e;return this._inFlight!=null?(e=await this._inFlight,this._inFlight=null):e=await this.db.fetchQueryResults(this.conn),this._depleted=e.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:e}}[Symbol.asyncIterator](){return this}},Lae=class{constructor(r,e,t){this.bindings=r,this.connectionId=e,this.statementId=t}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...r){let e=await this.bindings.runPrepared(this.connectionId,this.statementId,r),t=mo.from(e);return console.assert(t.isSync()),console.assert(t.isFile()),new Pl(t)}async send(...r){let e=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),t=new FH(this.bindings,this.connectionId,e),n=await mo.from(t);return console.assert(n.isAsync()),console.assert(n.isStream()),n}},Fae=(r=>(r.CANCEL_PENDING_QUERY="CANCEL_PENDING_QUERY",r.CLOSE_PREPARED="CLOSE_PREPARED",r.COLLECT_FILE_STATISTICS="COLLECT_FILE_STATISTICS",r.CONNECT="CONNECT",r.COPY_FILE_TO_BUFFER="COPY_FILE_TO_BUFFER",r.COPY_FILE_TO_PATH="COPY_FILE_TO_PATH",r.CREATE_PREPARED="CREATE_PREPARED",r.DISCONNECT="DISCONNECT",r.DROP_FILE="DROP_FILE",r.DROP_FILES="DROP_FILES",r.EXPORT_FILE_STATISTICS="EXPORT_FILE_STATISTICS",r.FETCH_QUERY_RESULTS="FETCH_QUERY_RESULTS",r.FLUSH_FILES="FLUSH_FILES",r.GET_FEATURE_FLAGS="GET_FEATURE_FLAGS",r.GET_TABLE_NAMES="GET_TABLE_NAMES",r.GET_VERSION="GET_VERSION",r.GLOB_FILE_INFOS="GLOB_FILE_INFOS",r.INSERT_ARROW_FROM_IPC_STREAM="INSERT_ARROW_FROM_IPC_STREAM",r.INSERT_CSV_FROM_PATH="IMPORT_CSV_FROM_PATH",r.INSERT_JSON_FROM_PATH="IMPORT_JSON_FROM_PATH",r.INSTANTIATE="INSTANTIATE",r.OPEN="OPEN",r.PING="PING",r.POLL_PENDING_QUERY="POLL_PENDING_QUERY",r.REGISTER_FILE_BUFFER="REGISTER_FILE_BUFFER",r.REGISTER_FILE_HANDLE="REGISTER_FILE_HANDLE",r.REGISTER_FILE_URL="REGISTER_FILE_URL",r.RESET="RESET",r.RUN_PREPARED="RUN_PREPARED",r.RUN_QUERY="RUN_QUERY",r.SEND_PREPARED="SEND_PREPARED",r.START_PENDING_QUERY="START_PENDING_QUERY",r.TOKENIZE="TOKENIZE",r))(Fae||{}),Bae=(r=>(r.CONNECTION_INFO="CONNECTION_INFO",r.ERROR="ERROR",r.FEATURE_FLAGS="FEATURE_FLAGS",r.FILE_BUFFER="FILE_BUFFER",r.FILE_INFOS="FILE_INFOS",r.FILE_SIZE="FILE_SIZE",r.FILE_STATISTICS="FILE_STATISTICS",r.INSTANTIATE_PROGRESS="INSTANTIATE_PROGRESS",r.LOG="LOG",r.OK="OK",r.PREPARED_STATEMENT_ID="PREPARED_STATEMENT_ID",r.QUERY_PLAN="QUERY_PLAN",r.QUERY_RESULT="QUERY_RESULT",r.QUERY_RESULT_CHUNK="QUERY_RESULT_CHUNK",r.QUERY_RESULT_HEADER="QUERY_RESULT_HEADER",r.QUERY_RESULT_HEADER_OR_NULL="QUERY_RESULT_HEADER_OR_NULL",r.REGISTERED_FILE="REGISTERED_FILE",r.SCRIPT_TOKENS="SCRIPT_TOKENS",r.SUCCESS="SUCCESS",r.TABLE_NAMES="TABLE_NAMES",r.VERSION_STRING="VERSION_STRING",r))(Bae||{}),qr=class{constructor(e,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=e,this.data=t,this.promise=new Promise((n,i)=>{this.promiseResolver=n,this.promiseRejecter=i})}};function P_(r){switch(r.typeId){case oe.Binary:return{sqlType:"binary"};case oe.Bool:return{sqlType:"bool"};case oe.Date:return{sqlType:"date"};case oe.DateDay:return{sqlType:"date32[d]"};case oe.DateMillisecond:return{sqlType:"date64[ms]"};case oe.Decimal:{let e=r;return{sqlType:"decimal",precision:e.precision,scale:e.scale}}case oe.Float:return{sqlType:"float"};case oe.Float16:return{sqlType:"float16"};case oe.Float32:return{sqlType:"float32"};case oe.Float64:return{sqlType:"float64"};case oe.Int:return{sqlType:"int32"};case oe.Int16:return{sqlType:"int16"};case oe.Int32:return{sqlType:"int32"};case oe.Int64:return{sqlType:"int64"};case oe.Uint16:return{sqlType:"uint16"};case oe.Uint32:return{sqlType:"uint32"};case oe.Uint64:return{sqlType:"uint64"};case oe.Uint8:return{sqlType:"uint8"};case oe.IntervalDayTime:return{sqlType:"interval[dt]"};case oe.IntervalYearMonth:return{sqlType:"interval[m]"};case oe.List:return{sqlType:"list",valueType:P_(r.valueType)};case oe.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:r.byteWidth};case oe.Null:return{sqlType:"null"};case oe.Utf8:return{sqlType:"utf8"};case oe.Struct:return{sqlType:"struct",fields:r.children.map(e=>PT(e.name,e.type))};case oe.Map:{let e=r;return{sqlType:"map",keyType:P_(e.keyType),valueType:P_(e.valueType)}}case oe.Time:return{sqlType:"time[s]"};case oe.TimeMicrosecond:return{sqlType:"time[us]"};case oe.TimeMillisecond:return{sqlType:"time[ms]"};case oe.TimeNanosecond:return{sqlType:"time[ns]"};case oe.TimeSecond:return{sqlType:"time[s]"};case oe.Timestamp:return{sqlType:"timestamp",timezone:r.timezone||void 0};case oe.TimestampSecond:return{sqlType:"timestamp[s]",timezone:r.timezone||void 0};case oe.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:r.timezone||void 0};case oe.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:r.timezone||void 0};case oe.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(r.toString()))}function PT(r,e){let t=P_(e);return t.name=r,t}var Oae=new TextEncoder,Pae=class{constructor(r,e=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=r,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),e!=null&&this.attach(e)}get logger(){return this._logger}attach(r){this._worker=r,this._worker.addEventListener("message",this._onMessageHandler),this._worker.addEventListener("error",this._onErrorHandler),this._worker.addEventListener("close",this._onCloseHandler),this._workerShutdownPromise=new Promise((e,t)=>{this._workerShutdownResolver=e})}detach(){this._worker&&(this._worker.removeEventListener("message",this._onMessageHandler),this._worker.removeEventListener("error",this._onErrorHandler),this._worker.removeEventListener("close",this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(r,e=[]){if(!this._worker){console.error("cannot send a message since the worker is not set!");return}let t=this._nextMessageId++;return this._pendingRequests.set(t,r),this._worker.postMessage({messageId:t,type:r.type,data:r.data},e),await r.promise}onMessage(r){var e;let t=r.data;switch(t.type){case"LOG":{this._logger.log(t.data);return}case"INSTANTIATE_PROGRESS":{for(let i of this._onInstantiationProgress)i(t.data);return}}let n=this._pendingRequests.get(t.requestId);if(!n){console.warn("unassociated response: [".concat(t.requestId,", ").concat(t.type.toString(),"]"));return}if(this._pendingRequests.delete(t.requestId),t.type=="ERROR"){let i=new Error(t.data.message);i.name=t.data.name,(e=Object.getOwnPropertyDescriptor(i,"stack"))!=null&&e.writable&&(i.stack=t.data.stack),n.promiseRejecter(i);return}switch(n.type){case"CLOSE_PREPARED":case"COLLECT_FILE_STATISTICS":case"COPY_FILE_TO_PATH":case"DISCONNECT":case"DROP_FILE":case"DROP_FILES":case"FLUSH_FILES":case"INSERT_ARROW_FROM_IPC_STREAM":case"IMPORT_CSV_FROM_PATH":case"IMPORT_JSON_FROM_PATH":case"OPEN":case"PING":case"REGISTER_FILE_BUFFER":case"REGISTER_FILE_HANDLE":case"REGISTER_FILE_URL":case"RESET":if(t.type=="OK"){n.promiseResolver(t.data);return}break;case"INSTANTIATE":if(this._onInstantiationProgress=[],t.type=="OK"){n.promiseResolver(t.data);return}break;case"GLOB_FILE_INFOS":if(t.type=="FILE_INFOS"){n.promiseResolver(t.data);return}break;case"GET_VERSION":if(t.type=="VERSION_STRING"){n.promiseResolver(t.data);return}break;case"GET_FEATURE_FLAGS":if(t.type=="FEATURE_FLAGS"){n.promiseResolver(t.data);return}break;case"GET_TABLE_NAMES":if(t.type=="TABLE_NAMES"){n.promiseResolver(t.data);return}break;case"TOKENIZE":if(t.type=="SCRIPT_TOKENS"){n.promiseResolver(t.data);return}break;case"COPY_FILE_TO_BUFFER":if(t.type=="FILE_BUFFER"){n.promiseResolver(t.data);return}break;case"EXPORT_FILE_STATISTICS":if(t.type=="FILE_STATISTICS"){n.promiseResolver(t.data);return}break;case"CONNECT":if(t.type=="CONNECTION_INFO"){n.promiseResolver(t.data);return}break;case"RUN_PREPARED":case"RUN_QUERY":if(t.type=="QUERY_RESULT"){n.promiseResolver(t.data);return}break;case"SEND_PREPARED":if(t.type=="QUERY_RESULT_HEADER"){n.promiseResolver(t.data);return}break;case"START_PENDING_QUERY":if(t.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(t.data);return}break;case"POLL_PENDING_QUERY":if(t.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(t.data);return}break;case"CANCEL_PENDING_QUERY":if(this._onInstantiationProgress=[],t.type=="SUCCESS"){n.promiseResolver(t.data);return}break;case"FETCH_QUERY_RESULTS":if(t.type=="QUERY_RESULT_CHUNK"){n.promiseResolver(t.data);return}break;case"CREATE_PREPARED":if(t.type=="PREPARED_STATEMENT_ID"){n.promiseResolver(t.data);return}break}n.promiseRejecter(new Error("unexpected response type: ".concat(t.type.toString())))}onError(r){console.error(r),console.error("error in duckdb worker: ".concat(r.message)),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn("worker terminated with ".concat(this._pendingRequests.size," pending requests"));return}this._pendingRequests.clear()}async reset(){let r=new qr("RESET",null);return await this.postTask(r)}async ping(){let r=new qr("PING",null);await this.postTask(r)}async dropFile(r){let e=new qr("DROP_FILE",r);return await this.postTask(e)}async dropFiles(){let r=new qr("DROP_FILES",null);return await this.postTask(r)}async flushFiles(){let r=new qr("FLUSH_FILES",null);return await this.postTask(r)}async instantiate(r,e=null,t=n=>{}){this._onInstantiationProgress.push(t);let n=new qr("INSTANTIATE",[r,e]);return await this.postTask(n)}async getVersion(){let r=new qr("GET_VERSION",null);return await this.postTask(r)}async getFeatureFlags(){let r=new qr("GET_FEATURE_FLAGS",null);return await this.postTask(r)}async open(r){let e=new qr("OPEN",r);await this.postTask(e)}async tokenize(r){let e=new qr("TOKENIZE",r);return await this.postTask(e)}async connectInternal(){let r=new qr("CONNECT",null);return await this.postTask(r)}async connect(){let r=await this.connectInternal();return new Iae(this,r)}async disconnect(r){let e=new qr("DISCONNECT",r);await this.postTask(e)}async runQuery(r,e){let t=new qr("RUN_QUERY",[r,e]);return await this.postTask(t)}async startPendingQuery(r,e){let t=new qr("START_PENDING_QUERY",[r,e]);return await this.postTask(t)}async pollPendingQuery(r){let e=new qr("POLL_PENDING_QUERY",r);return await this.postTask(e)}async cancelPendingQuery(r){let e=new qr("CANCEL_PENDING_QUERY",r);return await this.postTask(e)}async fetchQueryResults(r){let e=new qr("FETCH_QUERY_RESULTS",r);return await this.postTask(e)}async getTableNames(r,e){let t=new qr("GET_TABLE_NAMES",[r,e]);return await this.postTask(t)}async createPrepared(r,e){let t=new qr("CREATE_PREPARED",[r,e]);return await this.postTask(t)}async closePrepared(r,e){let t=new qr("CLOSE_PREPARED",[r,e]);await this.postTask(t)}async runPrepared(r,e,t){let n=new qr("RUN_PREPARED",[r,e,t]);return await this.postTask(n)}async sendPrepared(r,e,t){let n=new qr("SEND_PREPARED",[r,e,t]);return await this.postTask(n)}async globFiles(r){let e=new qr("GLOB_FILE_INFOS",r);return await this.postTask(e)}async registerFileText(r,e){let t=Oae.encode(e);await this.registerFileBuffer(r,t)}async registerFileURL(r,e,t,n){e===void 0&&(e=r);let i=new qr("REGISTER_FILE_URL",[r,e,t,n]);await this.postTask(i)}async registerEmptyFileBuffer(r){let e=new qr("REGISTER_FILE_BUFFER",[r,new Uint8Array]);await this.postTask(e)}async registerFileBuffer(r,e){let t=new qr("REGISTER_FILE_BUFFER",[r,e]);await this.postTask(t,[e.buffer])}async registerFileHandle(r,e,t,n){let i=new qr("REGISTER_FILE_HANDLE",[r,e,t,n]);await this.postTask(i,[])}async collectFileStatistics(r,e){let t=new qr("COLLECT_FILE_STATISTICS",[r,e]);await this.postTask(t,[])}async exportFileStatistics(r){let e=new qr("EXPORT_FILE_STATISTICS",r);return await this.postTask(e,[])}async copyFileToBuffer(r){let e=new qr("COPY_FILE_TO_BUFFER",r);return await this.postTask(e)}async copyFileToPath(r,e){let t=new qr("COPY_FILE_TO_PATH",[r,e]);await this.postTask(t)}async insertArrowFromIPCStream(r,e,t){if(e.length==0)return;let n=new qr("INSERT_ARROW_FROM_IPC_STREAM",[r,e,t]);await this.postTask(n,[e.buffer])}async insertCSVFromPath(r,e,t){if(t.columns!==void 0){let i=[];for(let a in t.columns){let o=t.columns[a];i.push(PT(a,o))}t.columnsFlat=i,delete t.columns}let n=new qr("IMPORT_CSV_FROM_PATH",[r,e,t]);await this.postTask(n)}async insertJSONFromPath(r,e,t){if(t.columns!==void 0){let i=[];for(let a in t.columns){let o=t.columns[a];i.push(PT(a,o))}t.columnsFlat=i,delete t.columns}let n=new qr("IMPORT_JSON_FROM_PATH",[r,e,t]);await this.postTask(n)}},Rae=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),Nae=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),zae=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),Vae=()=>(async r=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(r)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),Gae={name:"@duckdb/duckdb-wasm",version:"1.28.0",description:"DuckDB powered by WebAssembly",license:"MIT",repository:{type:"git",url:"https://github.com/duckdb/duckdb-wasm.git"},keywords:["sql","duckdb","relational","database","data","query","wasm","analytics","olap","arrow","parquet","json","csv"],dependencies:{"apache-arrow":"^13.0.0"},devDependencies:{"@types/emscripten":"^1.39.8","@types/jasmine":"^4.3.1","@typescript-eslint/eslint-plugin":"^6.5.0","@typescript-eslint/parser":"^6.7.3",esbuild:"^0.19.5",eslint:"^8.50.0","eslint-plugin-jasmine":"^4.1.3","eslint-plugin-react":"^7.33.2","fast-glob":"^3.3.1",jasmine:"^5.1.0","jasmine-core":"^5.1.1","jasmine-spec-reporter":"^7.0.0","js-sha256":"^0.9.0",karma:"^6.4.2","karma-chrome-launcher":"^3.2.0","karma-coverage":"^2.2.1","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^5.1.0","karma-jasmine-html-reporter":"^2.1.0","karma-sourcemap-loader":"^0.4.0","karma-spec-reporter":"^0.0.36","make-dir":"^4.0.0",nyc:"^15.1.0",prettier:"^3.0.2",puppeteer:"^21.1.1",rimraf:"^5.0.5",s3rver:"^3.7.1",typedoc:"^0.25.2",typescript:"^5.2.2","wasm-feature-detect":"^1.5.1","web-worker":"^1.2.0"},scripts:{"build:debug":"node bundle.mjs debug && tsc --emitDeclarationOnly","build:release":"node bundle.mjs release && tsc --emitDeclarationOnly",docs:"typedoc",report:"node ./coverage.mjs","test:node":"node --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:debug":"node --inspect-brk --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:coverage":"nyc -r json --report-dir ./coverage/node node ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:firefox":"karma start ./karma/tests-firefox.cjs","test:chrome":"karma start ./karma/tests-chrome.cjs","test:chrome:eh":"karma start ./karma/tests-chrome-eh.cjs","test:chrome:coverage":"karma start ./karma/tests-chrome-coverage.cjs","test:browser":"karma start ./karma/tests-all.cjs","test:browser:debug":"karma start ./karma/tests-debug.cjs",test:"npm run test:chrome && npm run test:node","test:coverage":"npm run test:chrome:coverage && npm run test:node:coverage && npm run report",lint:"eslint src test"},files:["dist","!dist/types/test"],main:"dist/duckdb-browser.cjs",module:"dist/duckdb-browser.mjs",types:"dist/duckdb-browser.d.ts",jsdelivr:"dist/duckdb-browser.cjs",unpkg:"dist/duckdb-browser.mjs",sideEffects:!1,browser:{fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},exports:{"./dist/duckdb-mvp.wasm":"./dist/duckdb-mvp.wasm","./dist/duckdb-eh.wasm":"./dist/duckdb-eh.wasm","./dist/duckdb-coi.wasm":"./dist/duckdb-coi.wasm","./dist/duckdb-browser":"./dist/duckdb-browser.mjs","./dist/duckdb-browser.cjs":"./dist/duckdb-browser.cjs","./dist/duckdb-browser.mjs":"./dist/duckdb-browser.mjs","./dist/duckdb-browser-blocking":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.mjs":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.cjs":"./dist/duckdb-browser-blocking.cjs","./dist/duckdb-browser-coi.pthread.worker.js":"./dist/duckdb-browser-coi.pthread.worker.js","./dist/duckdb-browser-coi.worker.js":"./dist/duckdb-browser-coi.worker.js","./dist/duckdb-browser-eh.worker.js":"./dist/duckdb-browser-eh.worker.js","./dist/duckdb-browser-mvp.worker.js":"./dist/duckdb-browser-mvp.worker.js","./dist/duckdb-node":"./dist/duckdb-node.cjs","./dist/duckdb-node.cjs":"./dist/duckdb-node.cjs","./dist/duckdb-node-blocking":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-blocking.cjs":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-eh.worker.cjs":"./dist/duckdb-node-eh.worker.cjs","./dist/duckdb-node-mvp.worker.cjs":"./dist/duckdb-node-mvp.worker.cjs","./blocking":{browser:{types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},node:{types:"./dist/duckdb-node-blocking.d.ts",require:"./dist/duckdb-node-blocking.cjs",import:"./dist/duckdb-node-blocking.cjs"},types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},".":{browser:{types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"},node:{types:"./dist/duckdb-node.d.ts",import:"./dist/duckdb-node.cjs",require:"./dist/duckdb-node.cjs"},types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"}}},EL=Gae.version.split(".");EL[0];EL[1];EL[2];var Uae=()=>typeof navigator>"u",PC=null,RC=null,NC=null,zC=null,VC=null;async function Hae(){return PC==null&&(PC=typeof BigInt64Array<"u"),RC==null&&(RC=await Nae()),NC==null&&(NC=await Vae()),zC==null&&(zC=await zae()),VC==null&&(VC=await Rae()),{bigInt64Array:PC,crossOriginIsolated:Uae()||globalThis.crossOriginIsolated||!1,wasmExceptions:RC,wasmSIMD:zC,wasmThreads:NC,wasmBulkMemory:VC}}wae(Sae());function Wae(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer<"u"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}Wae();var BH=(r=>(r[r.BUFFER=0]="BUFFER",r[r.NODE_FS=1]="NODE_FS",r[r.BROWSER_FILEREADER=2]="BROWSER_FILEREADER",r[r.BROWSER_FSACCESS=3]="BROWSER_FSACCESS",r[r.HTTP=4]="HTTP",r[r.S3=5]="S3",r))(BH||{});const $ae=(r,e)=>{if(r===void 0||r.startsWith("http")||r.startsWith("#")||/^[^/]*:/.test(r))return r;let t=e.deployment.basePath;return t?(t!=null&&t.startsWith("/")||(t=`/${t}`),t.endsWith("/")&&(t=t.slice(0,-1)),r.startsWith(t)?r:(r.startsWith("/")||(r=`/${r}`),`${t}${r}`)):r},jae={plugins:{components:{"@evidence-dev/core-components":{overrides:[],aliases:{},provides:[]}},datasources:{"@evidence-dev/bigquery":{},"@evidence-dev/csv":{},"@evidence-dev/databricks":{},"@evidence-dev/duckdb":{},"@evidence-dev/mssql":{},"@evidence-dev/mysql":{},"@evidence-dev/postgres":{},"@evidence-dev/snowflake":{},"@evidence-dev/sqlite":{},"@evidence-dev/trino":{},"@evidence-dev/motherduck":{}}},deployment:{basePath:""}},nd=r=>$ae(r,jae);let Ss,A0;const{resolve:qae,reject:Yae,promise:Zae}=MH(),{resolve:Xae,reject:Kae,promise:Qae}=MH();let M4=!1;async function TL(){if(!Ss){if(M4)return IH(Zae);M4=!0;try{const e=await Hae().then(a=>a.wasmExceptions)?{mainModule:(await ll(async()=>{const{default:a}=await import("./duckdb-eh.JG_ftmuc.js");return{default:a}},[])).default,mainWorker:(await ll(async()=>{const{default:a}=await import("./duckdb-browser-eh.worker.DO3Z9GRb.js");return{default:a}},[])).default}:{mainModule:(await ll(async()=>{const{default:a}=await import("./duckdb-mvp.Di_zmpSr.js");return{default:a}},[])).default,mainWorker:(await ll(async()=>{const{default:a}=await import("./duckdb-browser-mvp.worker.Be-sGAgG.js");return{default:a}},[])).default},t=new kae,n=new e.mainWorker,i=new Pae(t,n);await i.instantiate(e.mainModule),Ss=i,await Ss.open({query:{castBigIntToDouble:!0,castTimestampToDate:!0,castDecimalToDouble:!0,castDurationToTime64:!0}}),A0=await Ss.connect(),qae()}catch(r){throw Yae(r),r}}}async function tqe(r){Ss||await TL(),await A0.query(`PRAGMA search_path='${r.join(",")}'`)}async function GC(r){await Ss.flushFiles();for(const e of await Ss.globFiles(r))await Ss.dropFile(e.fileName)}async function rqe(r,e=!1){Ss||await TL(),e||await GC("*");try{for(const t in r){await A0.query(`CREATE SCHEMA IF NOT EXISTS "${t}";`);for(const n of r[t]){const i=n.split(/[\\/]/).at(-1).slice(0,-8),a=`${t}_${i}.parquet`;let o=n;!n.startsWith("http")&&!n.startsWith("/")&&(o=`/${n}`),o.startsWith("/static")&&(o=o.substring(7)),e&&(await GC(a),await GC(n)),await Ss.registerFileURL(a,nd(o),BH.HTTP,!1),await A0.query(`CREATE OR REPLACE VIEW "${t}"."${i}" AS (SELECT * FROM read_parquet('${a}'));`)}}Xae()}catch(t){throw Kae(t),t}}async function OH(r){return Ss||await TL(),await IH(Qae),await A0.query(r).then(dae)}const nqe=wd(!0),iqe=wd("");function Jae(){const{subscribe:r,update:e}=wd([]),t=new Map,n=i=>{e(a=>a.filter(o=>o.id!==i))};return{subscribe:r,add:(i,a=2e3)=>{if(i.id=i.id??Math.random().toString(),e(o=>{const s=o.find(l=>l.id===i.id);return s?(Object.assign(s,i),t.has(i.id)&&(clearTimeout(t.get(i.id)),t.delete(i.id))):o.push(i),o}),a){const o=setTimeout(()=>{n(i.id),t.delete(i.id)},a);t.set(i.id,o)}},dismiss:i=>{n(i),t.has(i)&&(clearTimeout(t.get(i)),t.delete[i])}}}const eoe=Jae(),I4=r=>{let e;return r.subscribe(t=>e=t)(),e},toe=(r,e)=>{const t=wd(JSON.parse(localStorage.getItem(r))??e),{subscribe:n,set:i}=t,a=o=>{typeof o>"u"||o===null?localStorage.removeItem(r):localStorage.setItem(r,JSON.stringify(o))};return a(I4(t)),{subscribe:n,set:o=>{i(o),a(o)},update:o=>{const s=o(I4(t));i(s),a(s)}}},aqe=toe("showQueries",Are),roe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let noe=(r=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(r));for(;r--;)e+=roe[t[r]&63];return e};const ioe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};var L4={};const V1=()=>{if(typeof process<"u")return!!(L4.EVIDENCE_DEBUG||L4.VITE_PUBLIC_EVIDENCE_DEBUG);if(typeof ioe<"u")return!1};class C0{constructor(e,t){e&&(this.table=String(e)),t&&(this.column=t)}get columns(){return this.column?[this.column]:[]}toString(){const{table:e,column:t}=this;if(t){const n=t.startsWith("*")?t:`"${t}"`;return`${e?`${F4(e)}.`:""}${n}`}else return e?F4(e):"NULL"}}function F4(r){return r.split(".").map(t=>`"${t}"`).join(".")}function aoe(r,e){return r instanceof C0&&r.column===e}function Tc(r){return typeof r=="string"?soe(r):r}function UC(r){return typeof r=="string"?ooe(r):r}function ooe(r){return new C0(r)}function soe(r,e=null){return arguments.length===1&&(e=r,r=null),new C0(r,e)}function kL(r){switch(typeof r){case"boolean":return r?"TRUE":"FALSE";case"string":return`'${r.replace("'","''")}'`;case"number":return Number.isFinite(r)?String(r):"NULL";default:if(r==null)return"NULL";if(r instanceof Date){const e=+r;if(Number.isNaN(e))return"NULL";const t=r.getUTCFullYear(),n=r.getUTCMonth(),i=r.getUTCDate();return e===Date.UTC(t,n,i)?`MAKE_DATE(${t}, ${n+1}, ${i})`:`EPOCH_MS(${e})`}else return r instanceof RegExp?`'${r.source}'`:String(r)}}const x0=r=>typeof(r==null?void 0:r.addEventListener)=="function";function PH(r){return r instanceof iA}class iA{constructor(e,t,n){this._expr=Array.isArray(e)?e:[e],this._deps=t||[],this.annotate(n);const i=this._expr.filter(a=>x0(a));i.length>0?(this._params=Array.from(new Set(i)),this._params.forEach(a=>{a.addEventListener("value",()=>{var o;return loe(this,(o=this.map)==null?void 0:o.get("value"))})})):this.addEventListener=void 0}get value(){return this}get columns(){const{_params:e,_deps:t}=this;if(e){const n=new Set(e.flatMap(i=>{var o;const a=(o=i.value)==null?void 0:o.columns;return Array.isArray(a)?a:[]}));if(n.size){const i=new Set(t);return n.forEach(a=>i.add(a)),Array.from(i)}}return t}get column(){return this._deps.length?this._deps[0]:this.columns[0]}annotate(...e){return Object.assign(this,...e)}toString(){return this._expr.map(e=>x0(e)&&!PH(e)?kL(e.value):e).join("")}addEventListener(e,t){const n=this.map||(this.map=new Map);(n.get(e)||(n.set(e,new Set),n.get(e))).add(t)}}function loe(r,e){if(e!=null&&e.size)return Promise.allSettled(Array.from(e,t=>t(r)))}function RH(r,e){const t=[r[0]],n=new Set,i=e.length;for(let a=0,o=0;an.add(u)),t[o]+=typeof s=="string"?s:kL(s));const l=r[++a];x0(t[o])?t[++o]=l:t[o]+=l}return{spans:t,cols:Array.from(n)}}function Ci(r,...e){const{spans:t,cols:n}=RH(r,e);return new iA(t,n)}function RT(r,e){return Array.from({length:r},()=>e)}class gh extends iA{constructor(e,t,n,i,a="",o="",s=""){let l;if(i&&!(a||o||s))l=i?Ci`${t} OVER "${i}"`:Ci`${t} OVER ()`;else{const h=a&&o?" ":"",d=(a||o)&&s?" ":"";l=Ci`${t} OVER (${i?`"${i}" `:""}${a}${h}${o}${d}${s})`}n&&(l=Ci`(${l})::${n}`);const{_expr:c,_deps:f}=l;super(c,f),this.window=e,this.func=t,this.type=n,this.name=i,this.group=a,this.order=o,this.frame=s}get basis(){return this.column}get label(){const{func:e}=this;return e.label??e.toString()}over(e){const{window:t,func:n,type:i,group:a,order:o,frame:s}=this;return new gh(t,n,i,e,a,o,s)}partitionby(...e){const t=e.flat().filter(c=>c).map(Tc),n=Ci(["PARTITION BY ",RT(t.length-1,", "),""],...t),{window:i,func:a,type:o,name:s,order:l,frame:u}=this;return new gh(i,a,o,s,n,l,u)}orderby(...e){const t=e.flat().filter(c=>c).map(Tc),n=Ci(["ORDER BY ",RT(t.length-1,", "),""],...t),{window:i,func:a,type:o,name:s,group:l,frame:u}=this;return new gh(i,a,o,s,l,n,u)}rows(e){const t=B4("ROWS",e),{window:n,func:i,type:a,name:o,group:s,order:l}=this;return new gh(n,i,a,o,s,l,t)}range(e){const t=B4("RANGE",e),{window:n,func:i,type:a,name:o,group:s,order:l}=this;return new gh(n,i,a,o,s,l,t)}}function B4(r,e){if(x0(e)){const t=Ci`${e}`;return t.toString=()=>`${r} ${O4(e.value)}`,t}return`${r} ${O4(e)}`}function O4(r){const[e,t]=r,n=e===0?"CURRENT ROW":Number.isFinite(e)?`${Math.abs(e)} PRECEDING`:"UNBOUNDED PRECEDING",i=t===0?"CURRENT ROW":Number.isFinite(t)?`${Math.abs(t)} FOLLOWING`:"UNBOUNDED FOLLOWING";return`BETWEEN ${n} AND ${i}`}class Wm extends iA{constructor(e,t,n,i,a){t=(t||[]).map(Tc);const{strings:o,exprs:s}=uoe(e,t,n,i,a),{spans:l,cols:u}=RH(o,s);super(l,u),this.aggregate=e,this.args=t,this.type=n,this.isDistinct=i,this.filter=a}get basis(){return this.column}get label(){const{aggregate:e,args:t,isDistinct:n}=this,i=n?"DISTINCT"+(t.length?" ":""):"",a=t.length?`(${i}${t.map(coe).join(", ")})`:"";return`${e.toLowerCase()}${a}`}distinct(){const{aggregate:e,args:t,type:n,filter:i}=this;return new Wm(e,t,n,!0,i)}where(e){const{aggregate:t,args:n,type:i,isDistinct:a}=this;return new Wm(t,n,i,a,e)}window(){const{aggregate:e,args:t,type:n,isDistinct:i}=this,a=new Wm(e,t,null,i);return new gh(e,a,n)}partitionby(...e){return this.window().partitionby(...e)}orderby(...e){return this.window().orderby(...e)}rows(e){return this.window().rows(e)}range(e){return this.window().range(e)}}function uoe(r,e,t,n,i){const a=`)${t?`::${t}`:""}`;let o=[`${r}(${n?"DISTINCT ":""}`],s=[];return e.length?(o=o.concat([...RT(e.length-1,", "),`${a}${i?" FILTER (WHERE ":""}`,...i?[")"]:[]]),s=[...e,...i?[i]:[]]):o[0]+="*"+a,{exprs:s,strings:o}}function coe(r){const e=kL(r);return e&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function Xg(r,e){return(...t)=>new Wm(r,t,e)}const foe=Xg("COUNT","INTEGER"),hoe=Xg("AVG"),doe=Xg("MAX"),poe=Xg("MIN"),goe=Xg("SUM","DOUBLE"),voe=Xg("MEDIAN");let R_=class hp{static select(...e){return new hp().select(...e)}static from(...e){return new hp().from(...e)}static with(...e){return new hp().with(...e)}static union(...e){return new Dh("UNION",e.flat())}static unionAll(...e){return new Dh("UNION ALL",e.flat())}static intersect(...e){return new Dh("INTERSECT",e.flat())}static except(...e){return new Dh("EXCEPT",e.flat())}static describe(e){const t=e.clone(),{clone:n,toString:i}=t;return Object.assign(t,{describe:!0,clone:()=>hp.describe(n.call(t)),toString:()=>`DESCRIBE ${i.call(t)}`})}constructor(){this.query={with:[],select:[],from:[],where:[],groupby:[],having:[],window:[],qualify:[],orderby:[]},this.cteFor=null}clone(){const e=new hp;return e.query={...this.query},e}with(...e){const{query:t}=this;if(e.length===0)return t.with;{const n=[],i=(a,o)=>{const s=o.clone();s.cteFor=this,n.push({as:a,query:s})};return e.flat().forEach(a=>{if(a!=null)if(a.as&&a.query)i(a.as,a.query);else for(const o in a)i(o,a[o])}),t.with=t.with.concat(n),this}}select(...e){const{query:t}=this;if(e.length===0)return t.select;{const n=[];for(const a of e.flat())if(a!=null)if(typeof a=="string")n.push({as:a,expr:Tc(a)});else if(a instanceof C0)n.push({as:a.column,expr:a});else if(Array.isArray(a))n.push({as:a[0],expr:a[1]});else for(const o in a)n.push({as:G1(o),expr:Tc(a[o])});const i=new Set(n.map(a=>a.as));return t.select=t.select.filter(a=>!i.has(a.as)).concat(n.filter(a=>a.expr)),this}}$select(...e){return this.query.select=[],this.select(...e)}distinct(e=!0){return this.query.distinct=!!e,this}from(...e){const{query:t}=this;if(e.length===0)return t.from;{const n=[];return e.flat().forEach(i=>{if(i!=null)if(typeof i=="string")n.push({as:i,from:UC(i)});else if(i instanceof C0)n.push({as:i.table,from:i});else if(HC(i)||PH(i))n.push({from:i});else if(Array.isArray(i))n.push({as:G1(i[0]),from:UC(i[1])});else for(const a in i)n.push({as:G1(a),from:UC(i[a])})}),t.from=t.from.concat(n),this}}$from(...e){return this.query.from=[],this.from(...e)}sample(e,t){const{query:n}=this;if(arguments.length===0)return n.sample;{let i=e;return typeof e=="number"&&(i=e>0&&e<1?{perc:100*e,method:t}:{rows:Math.round(e),method:t}),n.sample=i,this}}where(...e){const{query:t}=this;return e.length===0?t.where:(t.where=t.where.concat(e.flat().filter(n=>n)),this)}$where(...e){return this.query.where=[],this.where(...e)}groupby(...e){const{query:t}=this;return e.length===0?t.groupby:(t.groupby=t.groupby.concat(e.flat().filter(n=>n).map(Tc)),this)}$groupby(...e){return this.query.groupby=[],this.groupby(...e)}having(...e){const{query:t}=this;return e.length===0?t.having:(t.having=t.having.concat(e.flat().filter(n=>n)),this)}window(...e){const{query:t}=this;if(e.length===0)return t.window;{const n=[];return e.flat().forEach(i=>{if(i!=null)for(const a in i)n.push({as:G1(a),expr:i[a]})}),t.window=t.window.concat(n),this}}qualify(...e){const{query:t}=this;return e.length===0?t.qualify:(t.qualify=t.qualify.concat(e.flat().filter(n=>n)),this)}orderby(...e){const{query:t}=this;return e.length===0?t.orderby:(t.orderby=t.orderby.concat(e.flat().filter(n=>n).map(Tc)),this)}limit(e){const{query:t}=this;return arguments.length===0?t.limit:(t.limit=Number.isFinite(e)?e:void 0,this)}offset(e){const{query:t}=this;return arguments.length===0?t.offset:(t.offset=Number.isFinite(e)?e:void 0,this)}get subqueries(){const{query:e,cteFor:t}=this,n=((t==null?void 0:t.query)||e).with,i=n==null?void 0:n.reduce((o,{as:s,query:l})=>(o[s]=l,o),{}),a=[];return e.from.forEach(({from:o})=>{if(HC(o))a.push(o);else if(i[o.table]){const s=i[o.table];a.push(s)}}),a}toString(){const{with:e,select:t,distinct:n,from:i,sample:a,where:o,groupby:s,having:l,window:u,qualify:c,orderby:f,limit:h,offset:d}=this.query,p=[];if(e.length){const v=e.map(({as:m,query:y})=>`"${m}" AS (${y})`);p.push(`WITH ${v.join(", ")}`)}const g=t.map(({as:v,expr:m})=>aoe(m,v)&&!m.table?`${m}`:`${m} AS "${v}"`);if(p.push(`SELECT${n?" DISTINCT":""} ${g.join(", ")}`),i.length){const v=i.map(({as:m,from:y})=>{const b=HC(y)?`(${y})`:`${y}`;return!m||m===y.table?b:`${b} AS "${m}"`});p.push(`FROM ${v.join(", ")}`)}if(o.length){const v=o.map(String).filter(m=>m).join(" AND ");v&&p.push(`WHERE ${v}`)}if(a){const{rows:v,perc:m,method:y,seed:b}=a,_=v?`${v} ROWS`:`${m} PERCENT`,w=y?` (${y}${b!=null?`, ${b}`:""})`:"";p.push(`USING SAMPLE ${_}${w}`)}if(s.length&&p.push(`GROUP BY ${s.join(", ")}`),l.length){const v=l.map(String).filter(m=>m).join(" AND ");v&&p.push(`HAVING ${v}`)}if(u.length){const v=u.map(({as:m,expr:y})=>`"${m}" AS (${y})`);p.push(`WINDOW ${v.join(", ")}`)}if(c.length){const v=c.map(String).filter(m=>m).join(" AND ");v&&p.push(`QUALIFY ${v}`)}return f.length&&p.push(`ORDER BY ${f.join(", ")}`),Number.isFinite(h)&&p.push(`LIMIT ${h}`),Number.isFinite(d)&&p.push(`OFFSET ${d}`),p.join(" ")}};class Dh{constructor(e,t){this.op=e,this.queries=t.map(n=>n.clone()),this.query={orderby:[]},this.cteFor=null}clone(){const e=new Dh(this.op,this.queries);return e.query={...this.query},e}orderby(...e){const{query:t}=this;return e.length===0?t.orderby:(t.orderby=t.orderby.concat(e.flat().filter(n=>n).map(Tc)),this)}limit(e){const{query:t}=this;return arguments.length===0?t.limit:(t.limit=Number.isFinite(e)?e:void 0,this)}offset(e){const{query:t}=this;return arguments.length===0?t.offset:(t.offset=Number.isFinite(e)?e:void 0,this)}get subqueries(){const{queries:e,cteFor:t}=this;return t&&e.forEach(n=>n.cteFor=t),e}toString(){const{op:e,queries:t,query:{orderby:n,limit:i,offset:a}}=this,o=[t.join(` ${e} `)];return n.length&&o.push(`ORDER BY ${n.join(", ")}`),Number.isFinite(i)&&o.push(`LIMIT ${i}`),Number.isFinite(a)&&o.push(`OFFSET ${a}`),o.join(" ")}}function HC(r){return r instanceof R_||r instanceof Dh}function G1(r){return moe(r)?r.slice(1,-1):r}function moe(r){return r[0]==='"'&&r[r.length-1]==='"'}const WC=r=>{let e=null,t=null;const n=new Promise((o,s)=>{e=o,t=s});let i="init",a=null;if(!e||!t)throw new Error;return{promise:n,resolve:o=>{if(e)(i==="loading"||i==="init")&&(i="resolved",a=o,e(o),r==null||r());else throw new Error("SharedPromise encountered an error: res not defined")},reject:o=>{if(t)(i==="loading"||i==="init")&&(i="rejected",n.catch(()=>{}),t(o),r==null||r());else throw new Error("SharedPromise encountered an error: rej not defined")},get state(){return i},get value(){return a},start(){i="loading",r==null||r()}}},js=(r,e,t)=>{try{const n=typeof e=="function"?e():e;return n instanceof Promise?n.then(i=>r(i,!0)).catch(i=>{const a=i instanceof Error?i:new Error("Unknown Error",{cause:i});if(t)return t(a,!0);throw a}):r(n,!1)}catch(n){const i=n instanceof Error?n:new Error("Unknown Error",{cause:n});if(t)return t(i,!1);throw i}},P4=(r,e)=>{const t=e.reduce((n,i)=>n+_oe(i.column_type),e.length*4);return Math.abs(t*r)};function yoe(r){return r.startsWith("STRUCT")||r.endsWith("[]")}function boe(r){return r.startsWith("DECIMAL")}function _oe(r){const e={string:30,number:12,boolean:4,date:48};if(yoe(r))return console.warn(`[!] Evidence does not support DuckDB Struct or Array +If you need to use one, convert it to JSON in your query, and then manually parse it in your project`),e.string;if(boe(r))return e.number;switch(r){case"BOOLEAN":return e.boolean;case"BIGINT":case"DOUBLE":case"FLOAT":case"INTEGER":case"SMALLINT":case"TINYINT":case"UBIGINT":case"UINTEGER":case"USMALLINT":case"UTINYINT":case"HUGEINT":return e.number;case"UUID":case"VARCHAR":return e.string;case"DATE":case"TIMESTAMP":case"TIMESTAMP_S":case"TIMESTAMP_MS":case"TIMESTAMP_NS":case"TIMESTAMP WITH TIME ZONE":return e.date;case"INTERVAL":case"TIME":case"TIME WITH TIME ZONE":case"BLOB":case"BIT":return e.string;default:return console.error(`Column type ${r} is not supported`),e.string}}const woe=/--([^']|'.*')+$/,Soe=/(\/\*.*\*\/)/g,Aoe=r=>{const e=r.split(` +`);let t=!1;for(let n=e.length;n>0;n--){let i=e[n-1],a="";const o=Array.from(i.matchAll(Soe));for(const l of o){const u=i.slice(0,l.index),c=i.slice(l.index+l[0].length);i=`${u}${c}`}if(t&&i.includes("/*")){t=!1;const l=i.split("/*");i=l.slice(0,-1).join("/*"),a+="/*"+l.slice(-1)}if(i.trim().endsWith("*/")){t=!0;continue}const s=woe.exec(i);if(s){const l=i.slice(0,s.index),u=l.trimEnd();if(u.endsWith(";")){const c=i.slice(s.index),f=l.slice(u.length,l.length);i=`${l.slice(0,-1+-1*(l.length-u.length))}${f}${c}`}}else if(i.trimEnd().endsWith(";")){const u=i.lastIndexOf(";");i=i.slice(0,u)+i.slice(u+1)}for(const l of o){const u=i.slice(0,l.index),c=i.slice(l.index);i=`${u}${l[0]}${c}`}if(i!==e[n-1]){e[n-1]=i+a;break}}return e.push(""),e.join(` +`)};var zh,Xi,zy,xc,Vy,da,Gy,Uy,Hy,Ln,cc,oh,pa,ag,vu,$2,og,Vh,Wy,Ro,j2,zn,Gh,Vn,Uh,ii,sg,q2,No,Y2,Z2,$y,qI,YI,mu,ZI,Ra,lg,ug,bs,yu,Dc,fc,Ki,jy,cg,X2,fg,Ec,qy,K2;const ot=class ot{constructor(e,t,n={}){Wt(this,Ln);Wt(this,zh);Wt(this,Xi,[]);Wt(this,zy,-1);Wt(this,xc,0);Wt(this,Vy,-1);Wt(this,da,[]);Wt(this,Gy);Wt(this,Uy,-1);Wt(this,Hy);Wt(this,pa);Wt(this,ag);Wt(this,Ro,-1);Wt(this,j2,()=>{this.lengthLoaded&&this.columnsLoaded?(Gr(this,Ro,P4(this.length,this.columns)),re(this,Ro)>re(ot,Wy)&&re(this,Ec).call(this,"highScore",re(this,Ro))):Promise.allSettled([re(this,Vn).promise,re(this,ii).promise]).then(([e,t])=>{if(e.status==="rejected"||t.status==="rejected"){Gr(this,Ro,-1);return}if(!re(this,xc)||!re(this,da)){Gr(this,Ro,-1);return}Gr(this,Ro,P4(this.length,this.columns)),re(this,Ro)>re(ot,Wy)&&re(this,Ec).call(this,"highScore",re(this,Ro))}).catch(e=>{console.error(`${this.id} | Failed to calculate Query score ${e}`)})});Wt(this,zn,WC(()=>this.publish(`data promise (${re(this,zn).state})`)));Wt(this,Gh,()=>{var a;if(re(this,zn).state!=="init")return re(this,zn).promise;if(re(this,Ln,cc))return re(this,Ra).call(this,"data error","Refusing to execute data query, store has an error state"),re(this,zn).promise;if(re(this,zn).state!=="init"||this.opts.noResolve)return re(this,zn).promise;re(this,zn).start();const e=` +---- Data ${re(this,bs)} ${re(this,yu)} +${this.text.trim()} + `.trim()+` +`;re(this,lg).call(this,"data query text",` +`+e,"font-family: monospace;");const t=re(this,Ki);re(a=ot,$2).call(a,this);const n=performance.now();return js((o,s)=>{Gr(this,Xi,o);const l=performance.now();return n-l>5e3&&(re(this,Ec).call(this,"longRun",n-l),re(this,Ra).call(this,"long-running",`Query took ${n-l}ms to execute`)),Gr(this,zy,l-n),re(this,Uh).call(this),re(this,zn).resolve(this),re(this,Ec).call(this,"dataReady",void 0),s?re(this,zn).promise:this},()=>t(e,`${re(this,bs)}_data`),(o,s)=>(Gr(this,Ln,o,oh),re(this,zn).reject(o),s?re(this,zn).promise:this))});Nn(this,"fetch",()=>re(this,sg).call(this)instanceof Promise&&!this.opts.noResolve?Promise.allSettled([re(this,sg).call(this),re(this,Gh).call(this)]).then(()=>this.value):(re(this,Gh).call(this),this.value));Nn(this,"backgroundFetch",()=>{if(typeof window>"u"){re(this,Ra).call(this,"background fetch skip","Did not execute backgroundFetch in SSR");return}re(this,Ra).call(this,"background fetch","Executed backgroundFetch"),js(()=>{},async()=>(await new Promise(e=>setTimeout(e,0)),re(this,Ki).call(this,`--data +${this.text.trim()}`,this.id)),()=>{})});Wt(this,Vn,WC(()=>this.publish(`length promise (${re(this,Vn).state})`)));Wt(this,Uh,()=>{if(re(this,Xi)&&re(this,zn).state==="resolved"&&re(this,Vn).state==="init")return re(this,Ra).call(this,"length inferred","Inferred length from already-resolved data promise",re(this,Xi)),Gr(this,xc,re(this,Xi).length),re(this,Vn).resolve(this),re(this,Vn).promise;if(re(this,Ln,cc))return re(this,Ra).call(this,"length error","Refusing to execute length query, store has an error state",re(this,Ln,cc)),re(this,Vn).reject(re(this,Ln,cc)),re(this,Vn).value??re(this,Vn).promise;if(re(this,Vn).state!=="init"||this.opts.noResolve)return re(this,Vn).promise;re(this,Vn).start();const e=` +---- Length ${re(this,bs)} (${re(this,yu)}) +SELECT COUNT(*) as rowCount FROM (${this.text.trim()}) + `.trim()+` +`,t=re(this,Ki);re(this,lg).call(this,"length query text",` +`+e,"font-family: monospace;");const n=performance.now();return js((a,o)=>{const s=performance.now();return Gr(this,Vy,s-n),Gr(this,xc,a[0].rowCount),re(this,Vn).resolve(this),o?re(this,Vn).promise:this},()=>t(e,`${re(this,bs)}_length`),(a,o)=>(Gr(this,Ln,a,oh),re(this,Vn).reject(a),o?re(this,Vn).promise:this))});Wt(this,ii,WC(()=>this.publish(`columns promise (${re(this,ii).state})`)));Wt(this,sg,()=>{if(re(this,Ln,cc))return re(this,Ra).call(this,"cols query error","Refusing to execute columns query, store has an error state",re(this,Ln,cc)),re(this,ii).value??re(this,ii).promise;if(re(this,ii).state!=="init"||this.opts.noResolve)return re(this,ii).promise;re(this,ii).start();const e=` +---- Columns ${re(this,bs)} (${re(this,yu)}) +DESCRIBE ${this.text.trim()} + `.trim()+` +`;re(this,lg).call(this,"columns query text",` +`+e,"font-family: monospace;");const t=re(this,Ki),n=performance.now();return js((a,o)=>{const s=performance.now();return Gr(this,Uy,s-n),Gr(this,da,a),re(this,ii).resolve(this),Gr(this,Gy,Object.fromEntries(a.map(l=>[l.column_name,void 0]))),o?re(this,ii).promise:this},()=>t(e,`${re(this,bs)}_columns`),(a,o)=>(Gr(this,Ln,a,oh),re(this,ii).reject(a),o?re(this,ii).promise:this))});Wt(this,q2,()=>new Proxy([],{getPrototypeOf:()=>Object.getPrototypeOf(re(this,Xi)),has:(t,n)=>n in re(this,Xi)||n in this,get:(t,n)=>{let i=n;if(typeof i=="string"&&/^[\d.]+$/.exec(i)&&(i=parseInt(i)),(typeof i=="number"||ot.ProxyFetchTriggers.includes(i.toString()))&&re(this,zn).state==="init"&&(re(this,Ra).call(this,"implicit fetch",`Implicit query fetch triggered by ${i.toString()}`),re(this,Gh).call(this)),i==="length"&&re(this,Uh).call(this),i==="constructor")return re(this,Xi).constructor;if(i==="toString")return re(this,Xi).toString.bind(re(this,Xi));const a=i in this?this:re(this,Xi)&&i in re(this,Xi)?re(this,Xi):null;if(a===null)return typeof i!="number"||i>re(this,xc)?void 0:re(this,Gy)??{};const o=a[i];return typeof o=="function"?o.bind(a):o}}));Wt(this,Ra,V1()?(e,...t)=>{const n=`${(performance.now()/1e3).toFixed(3)} | ${this.id} (${this.hash}) | ${e}`;console.groupCollapsed(n);for(const i of t)console.debug(typeof i=="function"?i():i);console.groupEnd()}:()=>{});Wt(this,lg,V1()?(e,t,n)=>{const i=`${(performance.now()/1e3).toFixed(3)} | ${this.id} (${this.hash}) | ${e}`;console.groupCollapsed(i),console.debug(`%c${t}`,n),console.groupEnd()}:()=>{});Wt(this,bs);Wt(this,yu);Wt(this,Dc);Wt(this,Ki);Nn(this,"opts");Wt(this,jy);Wt(this,cg,new Set);Nn(this,"subscribe",e=>(re(this,cg).add(e),e(re(this,zh)),()=>re(this,cg).delete(e)));Wt(this,X2,0);Nn(this,"publish",e=>{if(a4(this,X2)._++>1e5)throw new Error("Query published too many times.");re(this,Ra).call(this,"publish",`Publishing triggered by ${e}`,this),re(this,cg).forEach(t=>t(re(this,zh)))});Wt(this,fg,{dataReady:new Set,error:new Set,highScore:new Set,longRun:new Set});Wt(this,Ec,(e,t)=>{re(this,fg)[e].forEach(n=>n(t,e))});Nn(this,"on",(e,t)=>{re(this,fg)[e].add(t)});Nn(this,"off",(e,t)=>{re(this,fg)[e].delete(t)});Nn(this,"addEventListener",this.on);Nn(this,"removeEventListener",this.off);Nn(this,"where",e=>ot.create(re(this,pa).clone().where(Ci`${e}`),re(this,Ki),{knownColumns:re(this,da),noResolve:re(this,Dc).noResolve}));Nn(this,"withOrdinal",e=>{const t=re(this,pa).clone();return t.select({ordinal:Ci`row_number() over (${e})`}),ot.create(t,re(this,Ki),{...re(this,Ln,fc),knownColumns:re(this,da)})});Nn(this,"search",(e,t,n)=>{(typeof n>"u"||n<0||n>1)&&(n=1-1/e.length);const i=[...re(this,da),{column_name:"similarity",column_type:"INTEGER",nullable:"NO"}],a=ot.create,o=e.replaceAll("'","''"),l=(Array.isArray(t)?t:[t]).map(c=>{const f=Ci`CASE WHEN lower("${c.trim()}") = lower('${o}') THEN 2 ELSE 0 END`,h=Ci`jaccard(lower('${o}'), lower("${c}"))`,d=o.length>=1?Ci`CASE WHEN lower("${c.trim()}") LIKE lower('%${o.split(" ").join("%")}%') THEN 1 ELSE 0 END`:Ci`0`;return Ci`GREATEST((${f}), (${h}), (${d}))`}).join(",");return a(re(this,pa).clone().$select({similarity:Ci`GREATEST(${l})`},"*").where(Ci`"similarity" > ${n} `).orderby(Ci`"similarity" DESC`),re(this,Ki),{knownColumns:i,...re(this,Ln,fc)})});Nn(this,"limit",e=>ot.create(re(this,pa).clone().limit(e),re(this,Ki),{knownColumns:re(this,da),...re(this,Ln,fc)}));Nn(this,"offset",e=>ot.create(re(this,pa).clone().offset(e),re(this,Ki),{knownColumns:re(this,da),...re(this,Ln,fc)}));Nn(this,"paginate",(e,t)=>ot.create(re(this,pa).clone().offset(e).limit(t),re(this,Ki),{knownColumns:re(this,da),...re(this,Ln,fc)}));Nn(this,"groupBy",(e,t)=>{const n=re(this,pa).clone();return n.$select(e),t&&n.select({rows:foe("*")}),n.$groupby(e),ot.create(n,re(this,Ki),{knownColumns:re(this,da),...re(this,Ln,fc)})});Nn(this,"agg",e=>{var n;const t=re(this,pa).clone();for(const[i,a]of Object.entries(e)){if(!re(n=ot,K2).call(n,i))throw new Error(`Unknown agg function: ${i}`);const o=re(ot,qy)[i],s=Array.isArray(a)?a:[a];for(const l of s){const u=typeof l=="object"?l.as:`${i}_${l}`,c=typeof l=="object"?l.col:l;t.select({[u]:o(c)})}}return ot.create(t,re(this,Ki),{knownColumns:re(this,da),...re(this,Ln,fc)})});var l;Gr(this,jy,(l=new Error().stack)==null?void 0:l.split(` +`).slice(2).map(u=>u.slice(7)).join(` +`));const{id:i,initialData:a=void 0,knownColumns:o=void 0,initialError:s=void 0}=n;if(this.opts=n,Gr(this,Ki,t),typeof e!="string"&&!(e instanceof R_)&&(console.warn(`Query ${i} has no query text`),n.noResolve=!0),re(ot,ug)||console.warn("Directly using new Query() is not a recommended use-case. Please use Query.create()"),Gr(ot,ug,!1),Gr(this,zh,re(this,q2).call(this)),Gr(this,ag,(e==null?void 0:e.toString())??"SELECT 'Empty Query' WHERE 0"),Gr(this,yu,Lf(re(this,ag))),Gr(this,bs,i??re(this,yu)),Gr(this,Dc,n),e&&typeof e!="string")Gr(this,pa,e);else if(e){const u=new R_().from({[`inputQuery-${noe(2)}`]:Ci`(${Aoe(e)})`}).select("*");Gr(this,pa,u)}else{Gr(this,pa,new R_),Gr(this,Ln,new Error("Refusing to create Query: No Query Text provided"),oh);return}if(s){Gr(this,Ln,s,oh);return}if(a)re(this,Ra).call(this,"initial data","Created with initial data",a),js(u=>{Gr(this,Xi,u),n.initialDataDirty?(this.publish("dataDirty"),re(this,Gh).call(this)):(re(this,zn).resolve(this),re(this,Uh).call(this))},a,u=>{Gr(this,Ln,u,oh)});else if(n.noResolve)return re(this,zn).start(),re(this,Vn).start(),re(this,ii).start(),this;if(o){if(!Array.isArray(o))throw new Error("Expected knownColumns to be an array",{cause:o});re(this,Ra).call(this,"known columns","Created with known columns",o),Gr(this,da,o),re(this,ii).resolve(this)}else js(()=>{},re(this,sg).call(this),(u,c)=>{if(!c)throw u});js(()=>{},re(this,Uh).call(this),(u,c)=>{if(!c)throw u}),n.autoScore&&re(this,j2).call(this)}get value(){return re(this,zh)}get dataLoaded(){return["resolved","rejected"].includes(re(this,zn).state)}get dataLoading(){return re(this,zn).state==="loading"}get dataQueryTime(){return re(this,zy)}get length(){return re(this,xc)}get lengthLoaded(){return["resolved","rejected"].includes(re(this,Vn).state)}get lengthLoading(){return re(this,Vn).state==="loading"}get lengthQueryTime(){return re(this,Vy)}get columns(){return re(this,da)}get columnsLoaded(){return["resolved","rejected"].includes(re(this,ii).state)}get columnsLoading(){return re(this,ii).state==="loading"}get columnsQueryTime(){return re(this,Uy)}get ready(){return re(this,Vn).state==="resolved"&&re(this,ii).state==="resolved"&&re(this,zn).state==="resolved"}get loading(){return re(this,Vn).state==="loading"||re(this,ii).state==="loading"||re(this,zn).state==="loading"}get error(){return re(this,Ln,cc)}get originalText(){return re(this,ag)}get text(){var e;return((e=re(this,pa))==null?void 0:e.toString())??"SELECT 'Empty Query' WHERE 0"}static get queriesInFlight(){return re(ot,vu).size>0}static resetInFlightQueries(){Gr(ot,vu,new Set)}static addEventListener(e,t){re(this,og)[e].add(t)}static removeEventListener(e,t){re(this,og)[e].delete(t)}get score(){return re(this,Ro)}get isQuery(){return!0}static[Symbol.hasInstance](e){return ot.isQuery(e)}static get ProxyFetchTriggers(){return["at"]}static get cacheSize(){return re(this,No).size}get id(){return re(this,bs)}get hash(){return re(this,yu)}get createdStack(){return re(this,jy)}};zh=new WeakMap,Xi=new WeakMap,zy=new WeakMap,xc=new WeakMap,Vy=new WeakMap,da=new WeakMap,Gy=new WeakMap,Uy=new WeakMap,Hy=new WeakMap,Ln=new WeakSet,cc=function(){return re(this,Hy)},oh=function(e){e&&(console.error(`${this.id} | Error in Query!`,e==null?void 0:e.message),re(this,Ec).call(this,"error",e),Gr(this,Hy,e))},pa=new WeakMap,ag=new WeakMap,vu=new WeakMap,$2=new WeakMap,og=new WeakMap,Vh=new WeakMap,Wy=new WeakMap,Ro=new WeakMap,j2=new WeakMap,zn=new WeakMap,Gh=new WeakMap,Vn=new WeakMap,Uh=new WeakMap,ii=new WeakMap,sg=new WeakMap,q2=new WeakMap,No=new WeakMap,Y2=new WeakMap,Z2=new WeakMap,$y=new WeakMap,qI=new WeakMap,YI=new WeakMap,mu=new WeakMap,ZI=new WeakMap,Ra=new WeakMap,lg=new WeakMap,ug=new WeakMap,bs=new WeakMap,yu=new WeakMap,Dc=new WeakMap,fc=function(){return{autoScore:re(this,Dc).autoScore,noResolve:re(this,Dc).noResolve,disableCache:re(this,Dc).disableCache}},Ki=new WeakMap,jy=new WeakMap,cg=new WeakMap,X2=new WeakMap,fg=new WeakMap,Ec=new WeakMap,qy=new WeakMap,K2=new WeakMap,Wt(ot,vu,new Set),Wt(ot,$2,e=>{var t;re(ot,vu).size===0&&re(t=ot,Vh).call(t,"inFlightQueryStart",void 0),re(ot,vu).add(e),re(e,zn).promise.finally(()=>{var n;re(ot,vu).delete(e),re(ot,vu).size===0&&re(n=ot,Vh).call(n,"inFlightQueryEnd",void 0)})}),Wt(ot,og,{inFlightQueryStart:new Set,inFlightQueryEnd:new Set,queryCreated:new Set,cacheCleared:new Set}),Wt(ot,Vh,(e,t)=>{re(ot,og)[e].forEach(n=>n(t,e))}),Wt(ot,Wy,10*1024*1024),Nn(ot,"isQuery",e=>typeof e!="object"||!e?!1:"isQuery"in e&&e.isQuery===!0),Nn(ot,"CacheMaxScore",5*10*1024),Wt(ot,No,new Map),Nn(ot,"emptyCache",()=>{var e;re(ot,No).clear(),re(e=ot,Vh).call(e,"cacheCleared",void 0)}),Wt(ot,Y2,e=>{var t;re(ot,No).set(e.hash,{query:e,added:Date.now()}),re(t=ot,mu).call(t,"cache",`Added to cache: ${e.hash}`,{cacheSize:re(ot,No).size,cacheScore:Array.from(re(ot,No).values()).reduce((n,i)=>n+i.query.score,0)})}),Wt(ot,Z2,e=>{const t=re(ot,No).get(e);return t?t.query:null}),Wt(ot,$y,()=>{let e=Array.from(re(ot,No).values()).reduce((n,i)=>n+i.query.score,0);const t=Array.from(re(ot,No).values()).sort((n,i)=>n.added-i.added);for(;e>ot.CacheMaxScore;){const n=t.shift();if(!n)break;re(ot,No).delete(n.query.hash),e-=n.query.score}}),Nn(ot,"createReactive",(e,t,n)=>{const{loadGracePeriod:i=250,callback:a=()=>{},execFn:o}=e,s=ot.create;let l=n,u=0,c;const f=(d,p)=>{var b;if(!l)throw new Error;u+=1;const g=u;re(b=ot,mu).call(b,`${l.id} (${Lf(d)}) | Reactive Updating`,d,{changeIdx:u,targetChangeIdx:g,hash:Lf(d)},{initialOpts:t,newOpts:p});const v=ot.isQuery(d)?d:s(d,o,Object.assign({},t,{initialData:void 0,initialError:void 0},p)),m=v.fetch();let y=m;m instanceof Promise&&(y=Promise.race([new Promise(_=>setTimeout(_,i)),v.fetch()])),js(()=>{var _;if(u!==g){re(_=ot,mu).call(_,"changeIdx does not match, results are discarded");return}c==null||c(),l=v.value,c=l.subscribe(a)},y,_=>{throw console.warn(`Error while attempting to update reactive query: ${_.message}`),_})};function h(){t={...t,initialData:void 0,initialError:void 0}}return(d,p)=>{if(l){js(()=>{},f(d,p),v=>{console.warn(`Error while attempting to update reactive query: ${v.message}`)});return}l=s(d,o,Object.assign({},t,p));const g=l.fetch();js(h,g),c=l.subscribe(a),a(l)}}),Wt(ot,qI,!1),Wt(ot,YI,()=>{}),Nn(ot,"create",(e,t,n,i)=>{var l,u,c,f,h,d,p,g;const a=Lf(e);let o;if(typeof n=="string"?o={...i,id:n}:n?(o=n,o.id||(o.id=a+"-"+Math.random().toString(36).substring(0,4))):o={id:a+"-"+Math.random().toString(36).substring(0,4)},"autoScore"in o||(o.autoScore=!0),o.disableCache)re(h=ot,mu).call(h,`${o.id??"[query id missing]"} (${a}) | cache disabled`,`Cache is disabled for ${o.id??"[query id missing]"}`,{opts:o,query:e,hash:Lf(e)});else{const v=re(l=ot,Z2).call(l,a);if(re(u=ot,$y).call(u),v)return re(c=ot,mu).call(c,`${o.id??"[query id missing]"} (${a}) | Using cached query`,{opts:o,hash:Lf(e)},e,v),v.value;re(f=ot,mu).call(f,`${o.id??"[query id missing]"} (${a}) | Cached query not found`,{opts:o,hash:Lf(e)},e)}Gr(ot,ug,!0);const s=new ot(e,t,o);return re(d=ot,Vh).call(d,"queryCreated",{raw:s,proxied:s.value}),o.disableCache||(re(p=ot,Y2).call(p,s),re(g=ot,$y).call(g)),s.value}),Wt(ot,mu,V1()?(e,...t)=>{const n=`${(performance.now()/1e3).toFixed(3)} | Query | ${e}`;console.groupCollapsed(n);for(const i of t)console.debug(typeof i=="function"?i():i);console.groupEnd()}:()=>{}),Wt(ot,ZI,V1()?(e,t,n)=>{const i=`${(performance.now()/1e3).toFixed(3)} | Query | ${e}`;console.groupCollapsed(i),console.debug(`%c${t}`,n),console.groupEnd()}:()=>{}),Wt(ot,ug,!1),Wt(ot,qy,{sum:goe,avg:hoe,min:poe,max:doe,median:voe}),Wt(ot,K2,e=>e in re(ot,qy));let El=ot;const Lf=(...r)=>(t=>{let n=0;for(let i=0;ir[t]===void 0?e:e+`${t}:${r[t]};`,"")}function oqe(r){return r?!0:void 0}NH({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function sqe(r){if(r!==null)return""}function z4(r){function e(t){return t(r),()=>{}}return{subscribe:e}}function lqe(r){if(!xoe)return null;const e=document.querySelector(`[data-melt-id="${r}"]`);return ML(e)?e:null}const U1=r=>new Proxy(r,{get(e,t,n){return Reflect.get(e,t,n)},ownKeys(e){return Reflect.ownKeys(e).filter(t=>t!=="action")}}),V4=r=>typeof r=="function";zH("empty");function zH(r,e){const{stores:t,action:n,returned:i}=e??{},a=(()=>{if(t&&i)return MG(t,s=>{const l=i(s);if(V4(l)){const u=(...c)=>U1({...l(...c),[`data-melt-${r}`]:"",action:n??mc});return u.action=n??mc,u}return U1({...l,[`data-melt-${r}`]:"",action:n??mc})});{const s=i,l=s==null?void 0:s();if(V4(l)){const u=(...c)=>U1({...l(...c),[`data-melt-${r}`]:"",action:n??mc});return u.action=n??mc,z4(u)}return z4(U1({...l,[`data-melt-${r}`]:"",action:n??mc}))}})(),o=n??(()=>{});return o.subscribe=a.subscribe,o}function Coe(r){const e=a=>a?`${r}-${a}`:r,t=a=>`data-melt-${r}${a?`-${a}`:""}`,n=a=>`[data-melt-${r}${a?`-${a}`:""}]`;return{name:e,attribute:t,selector:n,getEl:a=>document.querySelector(n(a))}}const xoe=typeof document<"u",Doe=r=>typeof r=="function";function uqe(r){return r instanceof Element}function ML(r){return r instanceof HTMLElement}function cqe(r){return r instanceof HTMLInputElement}function fqe(r){return r instanceof HTMLLabelElement}function hqe(r){return r instanceof HTMLButtonElement}function dqe(r){const e=r.getAttribute("aria-disabled"),t=r.getAttribute("disabled"),n=r.hasAttribute("data-disabled");return!!(e==="true"||t!==null||n)}function Eoe(r){return r!==null&&typeof r=="object"}function VH(r){return Eoe(r)&&"subscribe"in r}function Toe(...r){return(...e)=>{for(const t of r)typeof t=="function"&&t(...e)}}function mc(){}function GH(r,e,t,n){const i=Array.isArray(e)?e:[e];return i.forEach(a=>r.addEventListener(a,t,n)),()=>{i.forEach(a=>r.removeEventListener(a,t,n))}}function pqe(r,e,t,n){const i=Array.isArray(e)?e:[e];if(typeof t=="function"){const a=Moe(o=>t(o));return i.forEach(o=>r.addEventListener(o,a,n)),()=>{i.forEach(o=>r.removeEventListener(o,a,n))}}return()=>void 0}function koe(r){const e=r.currentTarget;if(!ML(e))return null;const t=new CustomEvent(`m-${r.type}`,{detail:{originalEvent:r},cancelable:!0});return e.dispatchEvent(t),t}function Moe(r){return e=>{const t=koe(e);if(!(t!=null&&t.defaultPrevented))return r(e)}}const gqe=r=>{try{p0(r)}catch{return r}},Ioe=r=>{try{Q2(r)}catch{return r}};function UH(r,...e){const t={};for(const n of Object.keys(r))e.includes(n)||(t[n]=r[n]);return t}function vqe(r,e,t){return Object.fromEntries(Object.entries(r).filter(([n,i])=>!$m(i,e)))}function Loe(r){const e={};for(const t in r){const n=r[t];n!==void 0&&(e[t]=n)}return e}function Qw(r){return{...r,get:()=>LG(r)}}Qw.writable=function(r){const e=wd(r);let t=r;return{subscribe:e.subscribe,set(n){e.set(n),t=n},update(n){const i=n(t);e.set(i),t=i},get(){return t}}};Qw.derived=function(r,e){const t=new Map,n=()=>{const a=Array.isArray(r)?r.map(o=>o.get()):r.get();return e(a)};return{get:n,subscribe:a=>{const o=[];return(Array.isArray(r)?r:[r]).forEach(l=>{o.push(l.subscribe(()=>{a(n())}))}),a(n()),t.set(a,o),()=>{const l=t.get(a);if(l)for(const u of l)u();t.delete(a)}}}};let Foe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Boe=(r=21)=>{let e="",t=r;for(;t--;)e+=Foe[Math.random()*64|0];return e};const xu={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",A:"a",P:"p"},Ooe=[xu.ARROW_DOWN,xu.PAGE_UP,xu.HOME],Poe=[xu.ARROW_UP,xu.PAGE_DOWN,xu.END],mqe=[...Ooe,...Poe],yqe=[xu.ENTER,xu.SPACE];function Roe(r,e){let t;const n=MG(r,a=>{t==null||t(),t=e(a)}).subscribe(mc),i=()=>{n(),t==null||t()};return Ioe(i),i}Cu(void 0,r=>{function e(n){r(n),r(void 0)}return GH(document,"pointerup",e,{passive:!1,capture:!0})});const Noe=Cu(void 0,r=>{function e(n){n&&n.key===xu.ESCAPE&&r(n),r(void 0)}return GH(document,"keydown",e,{passive:!1})}),bqe=(r,e={})=>{let t=mc;function n(i={}){t();const a={enabled:!0,...i},o=VH(a.enabled)?a.enabled:Cu(a.enabled);t=Toe(Noe.subscribe(s=>{var u;if(!s||!LG(o))return;const l=s.target;if(!(!ML(l)||l.closest("[data-escapee]")!==r)){if(s.preventDefault(),a.ignore){if(Doe(a.ignore)){if(a.ignore(s))return}else if(Array.isArray(a.ignore)&&a.ignore.length>0&&a.ignore.some(c=>c&&l===c))return}(u=a.handler)==null||u.call(a,s)}}),Roe(o,s=>{s?r.dataset.escapee="":delete r.dataset.escapee}))}return n(e),{update:n,destroy(){r.removeAttribute("data-escapee"),t()}}};function zoe(r){const e={};return Object.keys(r).forEach(t=>{const n=t,i=r[n];VH(i)?e[n]=Qw(i):e[n]=Qw(Cu(i))}),e}const Voe={prefix:"",disabled:Cu(!1),required:Cu(!1),name:Cu(void 0)};function _qe(r){const e={...Voe,...Loe(r)},{name:t}=Coe(e.prefix),{value:n,name:i,disabled:a,required:o}=zoe(UH(e,"prefix")),s=i;return zH(t("hidden-input"),{stores:[n,s,a,o],returned:([u,c,f,h])=>({name:c,value:u==null?void 0:u.toString(),"aria-hidden":"true",hidden:!0,disabled:f,required:h,tabIndex:-1,style:NH({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"})}),action:u=>({destroy:n.subscribe(f=>{u.value=f,u.dispatchEvent(new Event("change",{bubbles:!0}))})})})}const Goe={isDateDisabled:void 0,isDateUnavailable:void 0,value:void 0,preventDeselect:!1,numberOfMonths:1,pagedNavigation:!1,weekStartsOn:0,fixedWeeks:!1,calendarLabel:"Event Date",locale:"en",minValue:void 0,maxValue:void 0,disabled:!1,readonly:!1,weekdayFormat:"narrow"};({...UH(Goe,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});function HH(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(e=0;e{const e=$oe(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:o=>{const s=o.split(IL);return s[0]===""&&s.length!==1&&s.shift(),WH(s,e)||Woe(o)},getConflictingClassGroupIds:(o,s)=>{const l=t[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},WH=(r,e)=>{var o;if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),i=n?WH(r.slice(1),n):void 0;if(i)return i;if(e.validators.length===0)return;const a=r.join(IL);return(o=e.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},G4=/^\[(.+)\]$/,Woe=r=>{if(G4.test(r)){const e=G4.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},$oe=r=>{const{theme:e,prefix:t}=r,n={nextPart:new Map,validators:[]};return qoe(Object.entries(r.classGroups),t).forEach(([a,o])=>{NT(o,n,a,e)}),n},NT=(r,e,t,n)=>{r.forEach(i=>{if(typeof i=="string"){const a=i===""?e:U4(e,i);a.classGroupId=t;return}if(typeof i=="function"){if(joe(i)){NT(i(n),e,t,n);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([a,o])=>{NT(o,U4(e,a),t,n)})})},U4=(r,e)=>{let t=r;return e.split(IL).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},joe=r=>r.isThemeGetter,qoe=(r,e)=>e?r.map(([t,n])=>{const i=n.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[e+o,s])):a);return[t,i]}):r,Yoe=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;const i=(a,o)=>{t.set(a,o),e++,e>r&&(e=0,n=t,t=new Map)};return{get(a){let o=t.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){t.has(a)?t.set(a,o):i(a,o)}}},$H="!",Zoe=r=>{const{separator:e,experimentalParseClassName:t}=r,n=e.length===1,i=e[0],a=e.length,o=s=>{const l=[];let u=0,c=0,f;for(let v=0;vc?f-c:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:g}};return t?s=>t({className:s,parseClassName:o}):o},Xoe=r=>{if(r.length<=1)return r;const e=[];let t=[];return r.forEach(n=>{n[0]==="["?(e.push(...t.sort(),n),t=[]):t.push(n)}),e.push(...t.sort()),e},Koe=r=>({cache:Yoe(r.cacheSize),parseClassName:Zoe(r),...Hoe(r)}),Qoe=/\s+/,Joe=(r,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:i}=e,a=[],o=r.trim().split(Qoe);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:d}=t(u);let p=!!d,g=n(p?h.substring(0,d):h);if(!g){if(!p){s=u+(s.length>0?" "+s:s);continue}if(g=n(h),!g){s=u+(s.length>0?" "+s:s);continue}p=!1}const v=Xoe(c).join(":"),m=f?v+$H:v,y=m+g;if(a.includes(y))continue;a.push(y);const b=i(g,p);for(let _=0;_0?" "+s:s)}return s};function ese(){let r=0,e,t,n="";for(;r{if(typeof r=="string")return r;let e,t="";for(let n=0;nf(c),r());return t=Koe(u),n=t.cache.get,i=t.cache.set,a=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=Joe(l,t);return i(l,c),c}return function(){return a(ese.apply(null,arguments))}}const kn=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},qH=/^\[(?:([a-z-]+):)?(.+)\]$/i,rse=/^\d+\/\d+$/,nse=new Set(["px","full","screen"]),ise=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ase=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ose=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,sse=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lse=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,eu=r=>Vp(r)||nse.has(r)||rse.test(r),Qu=r=>Qg(r,"length",vse),Vp=r=>!!r&&!Number.isNaN(Number(r)),$C=r=>Qg(r,"number",Vp),kv=r=>!!r&&Number.isInteger(Number(r)),use=r=>r.endsWith("%")&&Vp(r.slice(0,-1)),br=r=>qH.test(r),Ju=r=>ise.test(r),cse=new Set(["length","size","percentage"]),fse=r=>Qg(r,cse,YH),hse=r=>Qg(r,"position",YH),dse=new Set(["image","url"]),pse=r=>Qg(r,dse,yse),gse=r=>Qg(r,"",mse),Mv=()=>!0,Qg=(r,e,t)=>{const n=qH.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):t(n[2]):!1},vse=r=>ase.test(r)&&!ose.test(r),YH=()=>!1,mse=r=>sse.test(r),yse=r=>lse.test(r),bse=()=>{const r=kn("colors"),e=kn("spacing"),t=kn("blur"),n=kn("brightness"),i=kn("borderColor"),a=kn("borderRadius"),o=kn("borderSpacing"),s=kn("borderWidth"),l=kn("contrast"),u=kn("grayscale"),c=kn("hueRotate"),f=kn("invert"),h=kn("gap"),d=kn("gradientColorStops"),p=kn("gradientColorStopPositions"),g=kn("inset"),v=kn("margin"),m=kn("opacity"),y=kn("padding"),b=kn("saturate"),_=kn("scale"),w=kn("sepia"),S=kn("skew"),A=kn("space"),C=kn("translate"),x=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",br,e],T=()=>[br,e],k=()=>["",eu,Qu],M=()=>["auto",Vp,br],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",br],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[Vp,br];return{cacheSize:500,separator:":",theme:{colors:[Mv],spacing:[eu,Qu],blur:["none","",Ju,br],brightness:P(),borderColor:[r],borderRadius:["none","","full",Ju,br],borderSpacing:T(),borderWidth:k(),contrast:P(),grayscale:$(),hueRotate:P(),invert:$(),gap:T(),gradientColorStops:[r],gradientColorStopPositions:[use,Qu],inset:E(),margin:E(),opacity:P(),padding:T(),saturate:P(),scale:P(),sepia:$(),skew:P(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",br]}],container:["container"],columns:[{columns:[Ju]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...L(),br]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",kv,br]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",br]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",kv,br]}],"grid-cols":[{"grid-cols":[Mv]}],"col-start-end":[{col:["auto",{span:["full",kv,br]},br]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Mv]}],"row-start-end":[{row:["auto",{span:[kv,br]},br]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",br]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",br]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",br,e]}],"min-w":[{"min-w":[br,e,"min","max","fit"]}],"max-w":[{"max-w":[br,e,"none","full","min","max","fit","prose",{screen:[Ju]},Ju]}],h:[{h:[br,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[br,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[br,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[br,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Ju,Qu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$C]}],"font-family":[{font:[Mv]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",br]}],"line-clamp":[{"line-clamp":["none",Vp,$C]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",eu,br]}],"list-image":[{"list-image":["none",br]}],"list-style-type":[{list:["none","disc","decimal",br]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",eu,Qu]}],"underline-offset":[{"underline-offset":["auto",eu,br]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",br]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",br]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),hse]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",fse]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pse]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:F()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[eu,br]}],"outline-w":[{outline:[eu,Qu]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[eu,Qu]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",Ju,gse]}],"shadow-color":[{shadow:[Mv]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ju,br]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",br]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",br]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",br]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[kv,br]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",br]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",br]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",br]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[eu,Qu,$C]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},_se=tse(bse);function wse(r){return r<.5?4*r*r*r:.5*Math.pow(2*r-2,3)+1}function aA(r){const e=r-1;return e*e*e+1}function Jw(...r){return _se(Uoe(r))}const wqe=(r,e={y:-8,x:0,start:.95,duration:150})=>{const t=getComputedStyle(r),n=t.transform==="none"?"":t.transform,i=(o,s,l)=>{const[u,c]=s,[f,h]=l;return(o-u)/(c-u)*(h-f)+f},a=o=>Object.keys(o).reduce((s,l)=>o[l]===void 0?s:s+`${l}:${o[l]};`,"");return{duration:e.duration??200,delay:0,css:o=>{const s=i(o,[0,1],[e.y??5,0]),l=i(o,[0,1],[e.x??0,0]),u=i(o,[0,1],[e.start??.95,1]);return a({transform:`${n} translate3d(${l}px, ${s}px, 0) scale(${u})`,opacity:o})},easing:aA}};function Sqe(r,{delay:e=0,duration:t=400,easing:n=wse,amount:i=5,opacity:a=0}={}){const o=getComputedStyle(r),s=+o.opacity,l=o.filter==="none"?"":o.filter,u=s*(1-a),[c,f]=AT(i);return{delay:e,duration:t,easing:n,css:(h,d)=>`opacity: ${s-u*d}; filter: ${l} blur(${d*c}${f});`}}function id(r,{delay:e=0,duration:t=400,easing:n=wre}={}){const i=+getComputedStyle(r).opacity;return{delay:e,duration:t,easing:n,css:a=>`opacity: ${a*i}`}}function Aqe(r,{delay:e=0,duration:t=400,easing:n=aA,x:i=0,y:a=0,opacity:o=0}={}){const s=getComputedStyle(r),l=+s.opacity,u=s.transform==="none"?"":s.transform,c=l*(1-o),[f,h]=AT(i),[d,p]=AT(a);return{delay:e,duration:t,easing:n,css:(g,v)=>` + transform: ${u} translate(${(1-g)*f}${h}, ${(1-g)*d}${p}); + opacity: ${l-c*v}`}}function eS(r,{delay:e=0,duration:t=400,easing:n=aA,axis:i="y"}={}){const a=getComputedStyle(r),o=+a.opacity,s=i==="y"?"height":"width",l=parseFloat(a[s]),u=i==="y"?["top","bottom"]:["left","right"],c=u.map(m=>`${m[0].toUpperCase()}${m.slice(1)}`),f=parseFloat(a[`padding${c[0]}`]),h=parseFloat(a[`padding${c[1]}`]),d=parseFloat(a[`margin${c[0]}`]),p=parseFloat(a[`margin${c[1]}`]),g=parseFloat(a[`border${c[0]}Width`]),v=parseFloat(a[`border${c[1]}Width`]);return{delay:e,duration:t,easing:n,css:m=>`overflow: hidden;opacity: ${Math.min(m*20,1)*o};${s}: ${m*l}px;padding-${u[0]}: ${m*f}px;padding-${u[1]}: ${m*h}px;margin-${u[0]}: ${m*d}px;margin-${u[1]}: ${m*p}px;border-${u[0]}-width: ${m*g}px;border-${u[1]}-width: ${m*v}px;`}}function Cqe(r,{delay:e=0,duration:t=400,easing:n=aA,start:i=0,opacity:a=0}={}){const o=getComputedStyle(r),s=+o.opacity,l=o.transform==="none"?"":o.transform,u=1-i,c=s*(1-a);return{delay:e,duration:t,easing:n,css:(f,h)=>` + transform: ${l} scale(${1-u*h}); + opacity: ${s-c*h} + `}}function H4(r,e,t){const n=r.slice();return n[6]=e[t],n}function W4(r,e,t){const n=r.slice();return n[6]=e[t],n}function $4(r,e,t){const n=r.slice();return n[6]=e[t],n}function j4(r,e,t){const n=r.slice();return n[6]=e[t],n}function q4(r,e,t){const n=r.slice();return n[6]=e[t],n}function Y4(r,e,t){const n=r.slice();return n[6]=e[t],n}function Z4(r){let e,t;return{c(){e=Mi("title"),t=ht(r[1])},l(n){e=Ii(n,"title",{});var i=ge(e);t=dt(i,r[1]),i.forEach(V)},m(n,i){se(n,e,i),Q(e,t)},p(n,i){i&2&&Bt(t,n[1])},d(n){n&&V(e)}}}function X4(r){let e,t=[r[6]],n={};for(let i=0;i{e=An(An({},e),ts(c)),t(3,a=hg(e,i)),"src"in c&&t(4,o=c.src),"size"in c&&t(0,s=c.size),"theme"in c&&t(5,l=c.theme),"title"in c&&t(1,u=c.title)},r.$$.update=()=>{r.$$.dirty&48&&t(2,n=(o==null?void 0:o[l])??(o==null?void 0:o.default))},[s,u,n,a,o,l]}class po extends Cr{constructor(e){super(),xr(this,e,Ase,Sse,Dr,{src:4,size:0,theme:5,title:1})}}const xqe={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor"}]}},Dqe={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:"currentColor"}]}},Eqe={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor"}]}},Tqe={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:"currentColor"}]}},kqe={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:"currentColor"}]}},Cse={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 2.5C2 2.22386 2.22386 2 2.5 2H5.5C5.77614 2 6 2.22386 6 2.5C6 2.77614 5.77614 3 5.5 3H3V5.5C3 5.77614 2.77614 6 2.5 6C2.22386 6 2 5.77614 2 5.5V2.5ZM9 2.5C9 2.22386 9.22386 2 9.5 2H12.5C12.7761 2 13 2.22386 13 2.5V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3H9.5C9.22386 3 9 2.77614 9 2.5ZM2.5 9C2.77614 9 3 9.22386 3 9.5V12H5.5C5.77614 12 6 12.2239 6 12.5C6 12.7761 5.77614 13 5.5 13H2.5C2.22386 13 2 12.7761 2 12.5V9.5C2 9.22386 2.22386 9 2.5 9ZM12.5 9C12.7761 9 13 9.22386 13 9.5V12.5C13 12.7761 12.7761 13 12.5 13H9.5C9.22386 13 9 12.7761 9 12.5C9 12.2239 9.22386 12 9.5 12H12V9.5C12 9.22386 12.2239 9 12.5 9Z",fill:"currentColor"}]}};function xse(r){let e,t='Loading...
',n;return{c(){e=ie("div"),e.innerHTML=t,this.h()},l(i){e=ae(i,"DIV",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-7iquaz"&&(e.innerHTML=t),this.h()},h(){Y(e,"class","animate-pulse h-full w-full my-2")},m(i,a){se(i,e,a)},p:Oe,i(i){i&&(n||Ad(()=>{n=_re(e,id,{}),n.start()}))},o:Oe,d(i){i&&V(e)}}}class ZH extends Cr{constructor(e){super(),xr(this,e,null,xse,Dr,{})}}const Dse={default:{a:{class:"icon icon-tabler icon-tabler-123",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M3 10l2 -2v8"},{d:"M9 8h3a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h3"},{d:"M17 8h2.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-1.5h1.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-2.5"}]}},Ese={default:{a:{class:"icon icon-tabler icon-tabler-abc",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M3 16v-6a2 2 0 1 1 4 0v6"},{d:"M3 13h4"},{d:"M10 8v6a2 2 0 1 0 4 0v-1a2 2 0 1 0 -4 0v1"},{d:"M20.732 12a2 2 0 0 0 -3.732 1v1a2 2 0 0 0 3.726 1.01"}]}},Mqe={default:{a:{class:"icon icon-tabler icon-tabler-bug",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9 9v-1a3 3 0 0 1 6 0v1"},{d:"M8 9h8a6 6 0 0 1 1 3v3a5 5 0 0 1 -10 0v-3a6 6 0 0 1 1 -3"},{d:"M3 13l4 0"},{d:"M17 13l4 0"},{d:"M12 20l0 -6"},{d:"M4 19l3.35 -2"},{d:"M20 19l-3.35 -2"},{d:"M4 7l3.75 2.4"},{d:"M20 7l-3.75 2.4"}]}},Tse={default:{a:{class:"icon icon-tabler icon-tabler-calendar",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z"},{d:"M16 3v4"},{d:"M8 3v4"},{d:"M4 11h16"},{d:"M11 15h1"},{d:"M12 15v3"}]}},XH={default:{a:{class:"icon icon-tabler icon-tabler-chevron-down",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M6 9l6 6l6 -6"}]}},kse={default:{a:{class:"icon icon-tabler icon-tabler-chevron-left",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M15 6l-6 6l6 6"}]}},KH={default:{a:{class:"icon icon-tabler icon-tabler-chevron-right",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9 6l6 6l-6 6"}]}},Mse={default:{a:{class:"icon icon-tabler icon-tabler-chevron-up",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M6 15l6 -6l6 6"}]}},Ise={default:{a:{class:"icon icon-tabler icon-tabler-chevrons-left",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M11 7l-5 5l5 5"},{d:"M17 7l-5 5l5 5"}]}},Lse={default:{a:{class:"icon icon-tabler icon-tabler-chevrons-right",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M7 7l5 5l-5 5"},{d:"M13 7l5 5l-5 5"}]}},Iqe={default:{a:{class:"icon icon-tabler icon-tabler-circle-check",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},{d:"M9 12l2 2l4 -4"}]},filled:{a:{class:"icon icon-tabler icon-tabler-circle-check-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z","stroke-width":"0",fill:"currentColor"}]}},Fse={default:{a:{class:"icon icon-tabler icon-tabler-circle-half-2",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},{d:"M12 3v18"},{d:"M12 14l7 -7"},{d:"M12 19l8.5 -8.5"},{d:"M12 9l4.5 -4.5"}]}},Lqe={default:{a:{class:"icon icon-tabler icon-tabler-circle-x",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},{d:"M10 10l4 4m0 -4l-4 4"}]},filled:{a:{class:"icon icon-tabler icon-tabler-circle-x-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-6.489 5.8a1 1 0 0 0 -1.218 1.567l1.292 1.293l-1.292 1.293l-.083 .094a1 1 0 0 0 1.497 1.32l1.293 -1.292l1.293 1.292l.094 .083a1 1 0 0 0 1.32 -1.497l-1.292 -1.293l1.292 -1.293l.083 -.094a1 1 0 0 0 -1.497 -1.32l-1.293 1.292l-1.293 -1.292l-.094 -.083z","stroke-width":"0",fill:"currentColor"}]}},Fqe={default:{a:{class:"icon icon-tabler icon-tabler-clipboard",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"}]}},Bqe={default:{a:{class:"icon icon-tabler icon-tabler-database",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0"},{d:"M4 6v6a8 3 0 0 0 16 0v-6"},{d:"M4 12v6a8 3 0 0 0 16 0v-6"}]}},Oqe={default:{a:{class:"icon icon-tabler icon-tabler-device-floppy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},{d:"M14 4l0 4l-6 0l0 -4"}]}},Pqe={default:{a:{class:"icon icon-tabler icon-tabler-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}]}},Rqe={default:{a:{class:"icon icon-tabler icon-tabler-exclamation-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},{d:"M12 9v4"},{d:"M12 16v.01"}]}},Nqe={default:{a:{class:"icon icon-tabler icon-tabler-eye-off",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"},{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"},{d:"M3 3l18 18"}]}},zqe={default:{a:{class:"icon icon-tabler icon-tabler-eye",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"},{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"}]},filled:{a:{class:"icon icon-tabler icon-tabler-eye-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 4c4.29 0 7.863 2.429 10.665 7.154l.22 .379l.045 .1l.03 .083l.014 .055l.014 .082l.011 .1v.11l-.014 .111a.992 .992 0 0 1 -.026 .11l-.039 .108l-.036 .075l-.016 .03c-2.764 4.836 -6.3 7.38 -10.555 7.499l-.313 .004c-4.396 0 -8.037 -2.549 -10.868 -7.504a1 1 0 0 1 0 -.992c2.831 -4.955 6.472 -7.504 10.868 -7.504zm0 5a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z","stroke-width":"0",fill:"currentColor"}]}},Vqe={default:{a:{class:"icon icon-tabler icon-tabler-folder-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 19h-7a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v3.5"},{d:"M16 19h6"},{d:"M19 16v6"}]}},Gqe={default:{a:{class:"icon icon-tabler icon-tabler-help-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},{d:"M12 16v.01"},{d:"M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483"}]},filled:{a:{class:"icon icon-tabler icon-tabler-help-circle-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 13a1 1 0 0 0 -.993 .883l-.007 .117l.007 .127a1 1 0 0 0 1.986 0l.007 -.117l-.007 -.127a1 1 0 0 0 -.993 -.883zm1.368 -6.673a2.98 2.98 0 0 0 -3.631 .728a1 1 0 0 0 1.44 1.383l.171 -.18a.98 .98 0 0 1 1.11 -.15a1 1 0 0 1 -.34 1.886l-.232 .012a1 1 0 0 0 .111 1.994a3 3 0 0 0 1.371 -5.673z","stroke-width":"0",fill:"currentColor"}]}},Bse={default:{a:{class:"icon icon-tabler icon-tabler-info-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},{d:"M12 9h.01"},{d:"M11 12h1v4h1"}]},filled:{a:{class:"icon icon-tabler icon-tabler-info-circle-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:"currentColor"}]}},Uqe={default:{a:{class:"icon icon-tabler icon-tabler-menu-2",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 6l16 0"},{d:"M4 12l16 0"},{d:"M4 18l16 0"}]}},Hqe={default:{a:{class:"icon icon-tabler icon-tabler-moon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z"}]},filled:{a:{class:"icon icon-tabler icon-tabler-moon-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 1.992a10 10 0 1 0 9.236 13.838c.341 -.82 -.476 -1.644 -1.298 -1.31a6.5 6.5 0 0 1 -6.864 -10.787l.077 -.08c.551 -.63 .113 -1.653 -.758 -1.653h-.266l-.068 -.006l-.06 -.002z","stroke-width":"0",fill:"currentColor"}]}},Wqe={default:{a:{class:"icon icon-tabler icon-tabler-pencil",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4"},{d:"M13.5 6.5l4 4"}]}},$qe={default:{a:{class:"icon icon-tabler icon-tabler-player-play",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M7 4v16l13 -8z"}]},filled:{a:{class:"icon icon-tabler icon-tabler-player-play-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z","stroke-width":"0",fill:"currentColor"}]}},jqe={default:{a:{class:"icon icon-tabler icon-tabler-plug",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9.785 6l8.215 8.215l-2.054 2.054a5.81 5.81 0 1 1 -8.215 -8.215l2.054 -2.054z"},{d:"M4 20l3.5 -3.5"},{d:"M15 4l-3.5 3.5"},{d:"M20 9l-3.5 3.5"}]}},Ose={default:{a:{class:"icon icon-tabler icon-tabler-search",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},{d:"M21 21l-6 -6"}]}},qqe={default:{a:{class:"icon icon-tabler icon-tabler-sun",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0"},{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7"}]},filled:{a:{class:"icon icon-tabler icon-tabler-sun-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 19a1 1 0 0 1 .993 .883l.007 .117v1a1 1 0 0 1 -1.993 .117l-.007 -.117v-1a1 1 0 0 1 1 -1z","stroke-width":"0",fill:"currentColor"},{d:"M18.313 16.91l.094 .083l.7 .7a1 1 0 0 1 -1.32 1.497l-.094 -.083l-.7 -.7a1 1 0 0 1 1.218 -1.567l.102 .07z","stroke-width":"0",fill:"currentColor"},{d:"M7.007 16.993a1 1 0 0 1 .083 1.32l-.083 .094l-.7 .7a1 1 0 0 1 -1.497 -1.32l.083 -.094l.7 -.7a1 1 0 0 1 1.414 0z","stroke-width":"0",fill:"currentColor"},{d:"M4 11a1 1 0 0 1 .117 1.993l-.117 .007h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z","stroke-width":"0",fill:"currentColor"},{d:"M21 11a1 1 0 0 1 .117 1.993l-.117 .007h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z","stroke-width":"0",fill:"currentColor"},{d:"M6.213 4.81l.094 .083l.7 .7a1 1 0 0 1 -1.32 1.497l-.094 -.083l-.7 -.7a1 1 0 0 1 1.217 -1.567l.102 .07z","stroke-width":"0",fill:"currentColor"},{d:"M19.107 4.893a1 1 0 0 1 .083 1.32l-.083 .094l-.7 .7a1 1 0 0 1 -1.497 -1.32l.083 -.094l.7 -.7a1 1 0 0 1 1.414 0z","stroke-width":"0",fill:"currentColor"},{d:"M12 2a1 1 0 0 1 .993 .883l.007 .117v1a1 1 0 0 1 -1.993 .117l-.007 -.117v-1a1 1 0 0 1 1 -1z","stroke-width":"0",fill:"currentColor"},{d:"M12 7a5 5 0 1 1 -4.995 5.217l-.005 -.217l.005 -.217a5 5 0 0 1 4.995 -4.783z","stroke-width":"0",fill:"currentColor"}]}},Yqe={default:{a:{class:"icon icon-tabler icon-tabler-table",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},{d:"M3 10h18"},{d:"M10 3v18"}]},filled:{a:{class:"icon icon-tabler icon-tabler-table-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 11h4a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-2a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-6a1 1 0 0 1 1 -1z","stroke-width":"0",fill:"currentColor"},{d:"M21 12v6a3 3 0 0 1 -2.824 2.995l-.176 .005h-6a1 1 0 0 1 -1 -1v-8a1 1 0 0 1 1 -1h8a1 1 0 0 1 1 1z","stroke-width":"0",fill:"currentColor"},{d:"M18 3a3 3 0 0 1 2.995 2.824l.005 .176v2a1 1 0 0 1 -1 1h-8a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h6z","stroke-width":"0",fill:"currentColor"},{d:"M9 4v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a3 3 0 0 1 2.824 -2.995l.176 -.005h2a1 1 0 0 1 1 1z","stroke-width":"0",fill:"currentColor"}]}},Pse={default:{a:{class:"icon icon-tabler icon-tabler-x",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M18 6l-12 12"},{d:"M6 6l12 12"}]}};function Rse(r){let e,t,n,i,a,o,s,l,u,c,f;n=new po({props:{class:"w-6 h-6 ",src:Pse}});const h=r[4].default,d=Li(h,r,r[3],null);return{c(){e=ie("dialog"),t=ie("button"),Ve(n.$$.fragment),i=Ie(),a=ie("div"),d&&d.c(),this.h()},l(p){e=ae(p,"DIALOG",{class:!0});var g=ge(e);t=ae(g,"BUTTON",{class:!0});var v=ge(t);Ge(n.$$.fragment,v),v.forEach(V),i=Le(g),a=ae(g,"DIV",{class:!0});var m=ge(a);d&&d.l(m),m.forEach(V),g.forEach(V),this.h()},h(){Y(t,"class","absolute top-4 right-[18.5px] text-gray-900 hover:bg-gray-100 rounded-lg p-1 focus:outline-none focus:ring-1 focus:ring-gray-400"),Y(a,"class",o="py-2 px-6 "+(r[1]?"":"pt-6")),Y(e,"class",s="w-[90vw] rounded-lg fixed border shadow-lg "+(r[0]?"slideIn":"slideOut")+" svelte-u80bk0")},m(p,g){se(p,e,g),Q(e,t),Ue(n,t,null),Q(e,i),Q(e,a),d&&d.m(a,null),u=!0,c||(f=FG(l=r[2].call(null,e,r[0])),c=!0)},p(p,[g]){d&&d.p&&(!u||g&8)&&Fi(d,h,p,p[3],u?Oi(h,p[3],g,null):Bi(p[3]),null),(!u||g&2&&o!==(o="py-2 px-6 "+(p[1]?"":"pt-6")))&&Y(a,"class",o),(!u||g&1&&s!==(s="w-[90vw] rounded-lg fixed border shadow-lg "+(p[0]?"slideIn":"slideOut")+" svelte-u80bk0"))&&Y(e,"class",s),l&&J2(l.update)&&g&1&&l.update.call(null,p[0])},i(p){u||(X(n.$$.fragment,p),X(d,p),u=!0)},o(p){ee(n.$$.fragment,p),ee(d,p),u=!1},d(p){p&&V(e),He(n),d&&d.d(p),c=!1,f()}}}function Nse(r,e,t){let{$$slots:n={},$$scope:i}=e,{open:a=!1}=e,{search:o=!1}=e;function s(l,u){u?l.showModal():l.close();function c(p){p.target===l&&t(0,a=!1)}function f(){t(0,a=!1)}function h(p){p.key==="Escape"&&t(0,a=!1)}l.addEventListener("keydown",h),l.addEventListener("click",c);const d=l.firstElementChild;return d.addEventListener("click",f),{update(p){p?(l.showModal(),document.body.style.overflow="hidden"):(l.addEventListener("animationend",()=>{a||l.close()}),document.body.style.overflow="")},destroy(){l.removeEventListener("keydown",h),l.removeEventListener("click",c),d.removeEventListener("click",f)}}}return r.$$set=l=>{"open"in l&&t(0,a=l.open),"search"in l&&t(1,o=l.search),"$$scope"in l&&t(3,i=l.$$scope)},[a,o,s,i,n]}class zse extends Cr{constructor(e){super(),xr(this,e,Nse,Rse,Dr,{open:0,search:1})}}function Vse(r){return!r||!r[0]||!r.length}const Gse=r=>({loaded:r&2}),rO=r=>({loaded:r[1]}),Use=r=>({loaded:r&2}),nO=r=>({loaded:r[1]}),Hse=r=>({loaded:r&2}),iO=r=>({loaded:r[1]}),Wse=r=>({loaded:r&2}),aO=r=>({loaded:r[1]}),$se=r=>({loaded:r&1}),oO=r=>({loaded:r[0]}),jse=r=>({loaded:r&1}),sO=r=>({loaded:r[0]}),qse=r=>({loaded:r&1}),lO=r=>({loaded:r[0]});function Yse(r){let e;const t=r[5].default,n=Li(t,r,r[4],rO);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&18)&&Fi(n,t,i,i[4],e?Oi(t,i[4],a,Gse):Bi(i[4]),rO)},i(i){e||(X(n,i),e=!0)},o(i){ee(n,i),e=!1},d(i){n&&n.d(i)}}}function Zse(r){let e;const t=r[5].empty,n=Li(t,r,r[4],nO);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&18)&&Fi(n,t,i,i[4],e?Oi(t,i[4],a,Use):Bi(i[4]),nO)},i(i){e||(X(n,i),e=!0)},o(i){ee(n,i),e=!1},d(i){n&&n.d(i)}}}function Xse(r){let e;const t=r[5].error,n=Li(t,r,r[4],iO);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&18)&&Fi(n,t,i,i[4],e?Oi(t,i[4],a,Hse):Bi(i[4]),iO)},i(i){e||(X(n,i),e=!0)},o(i){ee(n,i),e=!1},d(i){n&&n.d(i)}}}function Kse(r){let e;const t=r[5].skeleton,n=Li(t,r,r[4],aO),i=n||ele();return{c(){i&&i.c()},l(a){i&&i.l(a)},m(a,o){i&&i.m(a,o),e=!0},p(a,o){n&&n.p&&(!e||o&18)&&Fi(n,t,a,a[4],e?Oi(t,a[4],o,Wse):Bi(a[4]),aO)},i(a){e||(X(i,a),e=!0)},o(a){ee(i,a),e=!1},d(a){i&&i.d(a)}}}function Qse(r){let e,t,n,i,a;const o=[rle,tle],s=[];function l(u,c){return c&5&&(e=null),e==null&&(e=!!((Array.isArray(u[0])||!u[0])&&Vse(u[0])&&u[2].empty)),e?0:1}return t=l(r,-1),n=s[t]=o[t](r),{c(){n.c(),i=Xe()},l(u){n.l(u),i=Xe()},m(u,c){s[t].m(u,c),se(u,i,c),a=!0},p(u,c){let f=t;t=l(u,c),t===f?s[t].p(u,c):(Tt(),ee(s[f],1,1,()=>{s[f]=null}),kt(),n=s[t],n?n.p(u,c):(n=s[t]=o[t](u),n.c()),X(n,1),n.m(i.parentNode,i))},i(u){a||(X(n),a=!0)},o(u){ee(n),a=!1},d(u){u&&V(i),s[t].d(u)}}}function Jse(r){let e;const t=r[5].default,n=Li(t,r,r[4],lO);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&17)&&Fi(n,t,i,i[4],e?Oi(t,i[4],a,qse):Bi(i[4]),lO)},i(i){e||(X(n,i),e=!0)},o(i){ee(n,i),e=!1},d(i){n&&n.d(i)}}}function ele(r){let e,t,n;return t=new ZH({}),{c(){e=ie("div"),Ve(t.$$.fragment),this.h()},l(i){e=ae(i,"DIV",{class:!0});var a=ge(e);Ge(t.$$.fragment,a),a.forEach(V),this.h()},h(){Y(e,"class","w-full h-64")},m(i,a){se(i,e,a),Ue(t,e,null),n=!0},p:Oe,i(i){n||(X(t.$$.fragment,i),n=!0)},o(i){ee(t.$$.fragment,i),n=!1},d(i){i&&V(e),He(t)}}}function tle(r){let e;const t=r[5].default,n=Li(t,r,r[4],oO);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&17)&&Fi(n,t,i,i[4],e?Oi(t,i[4],a,$se):Bi(i[4]),oO)},i(i){e||(X(n,i),e=!0)},o(i){ee(n,i),e=!1},d(i){n&&n.d(i)}}}function rle(r){let e;const t=r[5].empty,n=Li(t,r,r[4],sO);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&17)&&Fi(n,t,i,i[4],e?Oi(t,i[4],a,jse):Bi(i[4]),sO)},i(i){e||(X(n,i),e=!0)},o(i){ee(n,i),e=!1},d(i){n&&n.d(i)}}}function nle(r){let e,t,n,i,a;const o=[Jse,Qse,Kse,Xse,Zse,Yse],s=[];function l(u,c){return c&1&&(e=null),u[0]?(e==null&&(e=!El.isQuery(u[0])),e?1:!u[1]||!u[1].dataLoaded&&!u[1].error?2:u[1].error&&u[2].error?3:!u[1].length&&!u[1].error&&u[2].empty?4:5):0}return t=l(r,-1),n=s[t]=o[t](r),{c(){n.c(),i=Xe()},l(u){n.l(u),i=Xe()},m(u,c){s[t].m(u,c),se(u,i,c),a=!0},p(u,[c]){let f=t;t=l(u,c),t===f?s[t].p(u,c):(Tt(),ee(s[f],1,1,()=>{s[f]=null}),kt(),n=s[t],n?n.p(u,c):(n=s[t]=o[t](u),n.c()),X(n,1),n.m(i.parentNode,i))},i(u){a||(X(n),a=!0)},o(u){ee(n),a=!1},d(u){u&&V(i),s[t].d(u)}}}function ile(r,e,t){let{$$slots:n={},$$scope:i}=e;const a=BG(n);let{data:o}=e,s=()=>{},l;return Q2(s),r.$$set=u=>{"data"in u&&t(0,o=u.data),"$$scope"in u&&t(4,i=u.$$scope)},r.$$.update=()=>{r.$$.dirty&9&&El.isQuery(o)&&(o.fetch(),s(),t(3,s=o.subscribe(u=>{t(1,l=u)})))},[o,l,a,s,i,n]}class LL extends Cr{constructor(e){super(),xr(this,e,ile,nle,Dr,{data:0})}}function ale(r){return(...e)=>Promise.resolve(r(...e))}function ole(){this.__data__=[],this.size=0}var sle=ole;function lle(r,e){return r===e||r!==r&&e!==e}var oA=lle,ule=oA;function cle(r,e){for(var t=r.length;t--;)if(ule(r[t][0],e))return t;return-1}var sA=cle,fle=sA,hle=Array.prototype,dle=hle.splice;function ple(r){var e=this.__data__,t=fle(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():dle.call(e,t,1),--this.size,!0}var gle=ple,vle=sA;function mle(r){var e=this.__data__,t=vle(e,r);return t<0?void 0:e[t][1]}var yle=mle,ble=sA;function _le(r){return ble(this.__data__,r)>-1}var wle=_le,Sle=sA;function Ale(r,e){var t=this.__data__,n=Sle(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var Cle=Ale,xle=sle,Dle=gle,Ele=yle,Tle=wle,kle=Cle;function Jg(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e-1&&r%1==0&&r<=qfe}var uW=Yfe,Zfe=FL,Xfe=uW;function Kfe(r){return r!=null&&Xfe(r.length)&&!Zfe(r)}var PL=Kfe,Qfe=PL,Jfe=e1;function ehe(r){return Jfe(r)&&Qfe(r)}var the=ehe,rS={exports:{}};function rhe(){return!1}var nhe=rhe;rS.exports;(function(r,e){var t=ev,n=nhe,i=e&&!e.nodeType&&e,a=i&&!0&&r&&!r.nodeType&&r,o=a&&a.exports===i,s=o?t.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;r.exports=u})(rS,rS.exports);var cW=rS.exports,ihe=uA,ahe=iW,ohe=e1,she="[object Object]",lhe=Function.prototype,uhe=Object.prototype,fW=lhe.toString,che=uhe.hasOwnProperty,fhe=fW.call(Object);function hhe(r){if(!ohe(r)||ihe(r)!=she)return!1;var e=ahe(r);if(e===null)return!0;var t=che.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&fW.call(t)==fhe}var dhe=hhe,phe=uA,ghe=uW,vhe=e1,mhe="[object Arguments]",yhe="[object Array]",bhe="[object Boolean]",_he="[object Date]",whe="[object Error]",She="[object Function]",Ahe="[object Map]",Che="[object Number]",xhe="[object Object]",Dhe="[object RegExp]",Ehe="[object Set]",The="[object String]",khe="[object WeakMap]",Mhe="[object ArrayBuffer]",Ihe="[object DataView]",Lhe="[object Float32Array]",Fhe="[object Float64Array]",Bhe="[object Int8Array]",Ohe="[object Int16Array]",Phe="[object Int32Array]",Rhe="[object Uint8Array]",Nhe="[object Uint8ClampedArray]",zhe="[object Uint16Array]",Vhe="[object Uint32Array]",In={};In[Lhe]=In[Fhe]=In[Bhe]=In[Ohe]=In[Phe]=In[Rhe]=In[Nhe]=In[zhe]=In[Vhe]=!0;In[mhe]=In[yhe]=In[Mhe]=In[bhe]=In[Ihe]=In[_he]=In[whe]=In[She]=In[Ahe]=In[Che]=In[xhe]=In[Dhe]=In[Ehe]=In[The]=In[khe]=!1;function Ghe(r){return vhe(r)&&ghe(r.length)&&!!In[phe(r)]}var Uhe=Ghe;function Hhe(r){return function(e){return r(e)}}var Whe=Hhe,nS={exports:{}};nS.exports;(function(r,e){var t=QH,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();r.exports=s})(nS,nS.exports);var $he=nS.exports,jhe=Uhe,qhe=Whe,bO=$he,_O=bO&&bO.isTypedArray,Yhe=_O?qhe(_O):jhe,hW=Yhe;function Zhe(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}var dW=Zhe,Xhe=OL,Khe=oA,Qhe=Object.prototype,Jhe=Qhe.hasOwnProperty;function ede(r,e,t){var n=r[e];(!(Jhe.call(r,e)&&Khe(n,t))||t===void 0&&!(e in r))&&Xhe(r,e,t)}var tde=ede,rde=tde,nde=OL;function ide(r,e,t,n){var i=!t;t||(t={});for(var a=-1,o=e.length;++a-1&&r%1==0&&r0){if(++e>=mpe)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var wpe=_pe,Spe=vpe,Ape=wpe,Cpe=Ape(Spe),xpe=Cpe,Dpe=mW,Epe=cpe,Tpe=xpe;function kpe(r,e){return Tpe(Epe(r,e,Dpe),r+"")}var Mpe=kpe,Ipe=oA,Lpe=PL,Fpe=pW,Bpe=xd;function Ope(r,e,t){if(!Bpe(t))return!1;var n=typeof e;return(n=="number"?Lpe(t)&&Fpe(e,t.length):n=="string"&&e in t)?Ipe(t[e],r):!1}var Ppe=Ope,Rpe=Mpe,Npe=Ppe;function zpe(r){return Rpe(function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,o&&Npe(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++ni;function e(i){}r.assertIs=e;function t(i){throw new Error}r.assertNever=t,r.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},r.getValidEnumValues=i=>{const a=r.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return r.objectValues(o)},r.objectValues=i=>r.objectKeys(i).map(function(a){return i[a]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},r.find=(i,a)=>{for(const o of i)if(a(o))return o},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}r.joinValues=n,r.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(Zr||(Zr={}));var zT;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(zT||(zT={}));const vt=Zr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Sc=r=>{switch(typeof r){case"undefined":return vt.undefined;case"string":return vt.string;case"number":return isNaN(r)?vt.nan:vt.number;case"boolean":return vt.boolean;case"function":return vt.function;case"bigint":return vt.bigint;case"symbol":return vt.symbol;case"object":return Array.isArray(r)?vt.array:r===null?vt.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?vt.promise:typeof Map<"u"&&r instanceof Map?vt.map:typeof Set<"u"&&r instanceof Set?vt.set:typeof Date<"u"&&r instanceof Date?vt.date:vt.object;default:return vt.unknown}},Ze=Zr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$pe=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class yo extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},n={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let s=n,l=0;for(;lt.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}yo.create=r=>new yo(r);const _g=(r,e)=>{let t;switch(r.code){case Ze.invalid_type:r.received===vt.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case Ze.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,Zr.jsonStringifyReplacer)}`;break;case Ze.unrecognized_keys:t=`Unrecognized key(s) in object: ${Zr.joinValues(r.keys,", ")}`;break;case Ze.invalid_union:t="Invalid input";break;case Ze.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Zr.joinValues(r.options)}`;break;case Ze.invalid_enum_value:t=`Invalid enum value. Expected ${Zr.joinValues(r.options)}, received '${r.received}'`;break;case Ze.invalid_arguments:t="Invalid function arguments";break;case Ze.invalid_return_type:t="Invalid function return type";break;case Ze.invalid_date:t="Invalid date";break;case Ze.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:Zr.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case Ze.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case Ze.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case Ze.custom:t="Invalid input";break;case Ze.invalid_intersection_types:t="Intersection results could not be merged";break;case Ze.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case Ze.not_finite:t="Number must be finite";break;default:t=e.defaultError,Zr.assertNever(r)}return{message:t}};let yW=_g;function jpe(r){yW=r}function iS(){return yW}const aS=r=>{const{data:e,path:t,errorMaps:n,issueData:i}=r,a=[...t,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)s=u(o,{data:e,defaultError:s}).message;return{...i,path:a,message:s}},qpe=[];function ct(r,e){const t=iS(),n=aS({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===_g?void 0:_g].filter(i=>!!i)});r.common.issues.push(n)}class ia{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if(i.status==="aborted")return Zt;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const i of t){const a=await i.key,o=await i.value;n.push({key:a,value:o})}return ia.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Zt;a.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:e.value,value:n}}}const Zt=Object.freeze({status:"aborted"}),Ap=r=>({status:"dirty",value:r}),Ea=r=>({status:"valid",value:r}),VT=r=>r.status==="aborted",GT=r=>r.status==="dirty",D0=r=>r.status==="valid",E0=r=>typeof Promise<"u"&&r instanceof Promise;function oS(r,e,t,n){if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function bW(r,e,t,n,i){if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var It;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(It||(It={}));var Sm,Am;class Nl{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const EO=(r,e)=>{if(D0(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new yo(r.common.issues);return this._error=t,this._error}}};function gr(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:i}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,s)=>{var l,u;const{message:c}=r;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(u=c??t)!==null&&u!==void 0?u:s.defaultError}},description:i}}class kr{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Sc(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Sc(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ia,ctx:{common:e.parent.common,data:e.data,parsedType:Sc(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(E0(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const i={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sc(e)},a=this._parseSync({data:e,path:i.path,parent:i});return EO(i,a)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sc(e)},i=this._parse({data:e,path:n.path,parent:n}),a=await(E0(i)?i:Promise.resolve(i));return EO(n,a)}refine(e,t){const n=i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t;return this._refinement((i,a)=>{const o=e(i),s=()=>a.addIssue({code:Ze.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new Bs({schema:this,typeName:jt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Tl.create(this,this._def)}nullable(){return af.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ts.create(this,this._def)}promise(){return Sg.create(this,this._def)}or(e){return I0.create([this,e],this._def)}and(e){return L0.create(this,e,this._def)}transform(e){return new Bs({...gr(this._def),schema:this,typeName:jt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new R0({...gr(this._def),innerType:this,defaultValue:t,typeName:jt.ZodDefault})}brand(){return new RL({typeName:jt.ZodBranded,type:this,...gr(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new N0({...gr(this._def),innerType:this,catchValue:t,typeName:jt.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return t1.create(this,e)}readonly(){return z0.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ype=/^c[^\s-]{8,}$/i,Zpe=/^[0-9a-z]+$/,Xpe=/^[0-9A-HJKMNP-TV-Z]{26}$/,Kpe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Qpe=/^[a-z0-9_-]{21}$/i,Jpe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ege=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tge="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let qC;const rge=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nge=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ige=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,_W="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",age=new RegExp(`^${_W}$`);function wW(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function oge(r){return new RegExp(`^${wW(r)}$`)}function SW(r){let e=`${_W}T${wW(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function sge(r,e){return!!((e==="v4"||!e)&&rge.test(r)||(e==="v6"||!e)&&nge.test(r))}class As extends kr{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==vt.string){const a=this._getOrReturnCtx(e);return ct(a,{code:Ze.invalid_type,expected:vt.string,received:a.parsedType}),Zt}const n=new ia;let i;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(i=this._getOrReturnCtx(e,i),ct(i,{code:Ze.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const o=e.data.length>a.value,s=e.data.lengthe.test(i),{validation:t,code:Ze.invalid_string,...It.errToObj(n)})}_addCheck(e){return new As({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...It.errToObj(e)})}url(e){return this._addCheck({kind:"url",...It.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...It.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...It.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...It.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...It.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...It.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...It.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...It.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...It.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...It.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...It.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...It.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...It.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...It.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...It.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...It.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...It.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...It.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...It.errToObj(t)})}nonempty(e){return this.min(1,It.errToObj(e))}trim(){return new As({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new As({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new As({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new As({checks:[],typeName:jt.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...gr(r)})};function lge(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,a=parseInt(r.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class tf extends kr{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==vt.number){const a=this._getOrReturnCtx(e);return ct(a,{code:Ze.invalid_type,expected:vt.number,received:a.parsedType}),Zt}let n;const i=new ia;for(const a of this._def.checks)a.kind==="int"?Zr.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),ct(n,{code:Ze.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),ct(n,{code:Ze.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?lge(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),ct(n,{code:Ze.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),ct(n,{code:Ze.not_finite,message:a.message}),i.dirty()):Zr.assertNever(a);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,It.toString(t))}gt(e,t){return this.setLimit("min",e,!1,It.toString(t))}lte(e,t){return this.setLimit("max",e,!0,It.toString(t))}lt(e,t){return this.setLimit("max",e,!1,It.toString(t))}setLimit(e,t,n,i){return new tf({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:It.toString(i)}]})}_addCheck(e){return new tf({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:It.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:It.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:It.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:It.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:It.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:It.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:It.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:It.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:It.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&Zr.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.valuenew tf({checks:[],typeName:jt.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...gr(r)});class rf extends kr{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==vt.bigint){const a=this._getOrReturnCtx(e);return ct(a,{code:Ze.invalid_type,expected:vt.bigint,received:a.parsedType}),Zt}let n;const i=new ia;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),ct(n,{code:Ze.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),ct(n,{code:Ze.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):Zr.assertNever(a);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,It.toString(t))}gt(e,t){return this.setLimit("min",e,!1,It.toString(t))}lte(e,t){return this.setLimit("max",e,!0,It.toString(t))}lt(e,t){return this.setLimit("max",e,!1,It.toString(t))}setLimit(e,t,n,i){return new rf({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:It.toString(i)}]})}_addCheck(e){return new rf({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:It.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:It.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:It.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:It.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:It.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new rf({checks:[],typeName:jt.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...gr(r)})};class T0 extends kr{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==vt.boolean){const n=this._getOrReturnCtx(e);return ct(n,{code:Ze.invalid_type,expected:vt.boolean,received:n.parsedType}),Zt}return Ea(e.data)}}T0.create=r=>new T0({typeName:jt.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...gr(r)});class ad extends kr{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==vt.date){const a=this._getOrReturnCtx(e);return ct(a,{code:Ze.invalid_type,expected:vt.date,received:a.parsedType}),Zt}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return ct(a,{code:Ze.invalid_date}),Zt}const n=new ia;let i;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(i=this._getOrReturnCtx(e,i),ct(i,{code:Ze.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):Zr.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ad({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:It.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:It.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew ad({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:jt.ZodDate,...gr(r)});class sS extends kr{_parse(e){if(this._getType(e)!==vt.symbol){const n=this._getOrReturnCtx(e);return ct(n,{code:Ze.invalid_type,expected:vt.symbol,received:n.parsedType}),Zt}return Ea(e.data)}}sS.create=r=>new sS({typeName:jt.ZodSymbol,...gr(r)});class k0 extends kr{_parse(e){if(this._getType(e)!==vt.undefined){const n=this._getOrReturnCtx(e);return ct(n,{code:Ze.invalid_type,expected:vt.undefined,received:n.parsedType}),Zt}return Ea(e.data)}}k0.create=r=>new k0({typeName:jt.ZodUndefined,...gr(r)});class M0 extends kr{_parse(e){if(this._getType(e)!==vt.null){const n=this._getOrReturnCtx(e);return ct(n,{code:Ze.invalid_type,expected:vt.null,received:n.parsedType}),Zt}return Ea(e.data)}}M0.create=r=>new M0({typeName:jt.ZodNull,...gr(r)});class wg extends kr{constructor(){super(...arguments),this._any=!0}_parse(e){return Ea(e.data)}}wg.create=r=>new wg({typeName:jt.ZodAny,...gr(r)});class Wh extends kr{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ea(e.data)}}Wh.create=r=>new Wh({typeName:jt.ZodUnknown,...gr(r)});class Fu extends kr{_parse(e){const t=this._getOrReturnCtx(e);return ct(t,{code:Ze.invalid_type,expected:vt.never,received:t.parsedType}),Zt}}Fu.create=r=>new Fu({typeName:jt.ZodNever,...gr(r)});class lS extends kr{_parse(e){if(this._getType(e)!==vt.undefined){const n=this._getOrReturnCtx(e);return ct(n,{code:Ze.invalid_type,expected:vt.void,received:n.parsedType}),Zt}return Ea(e.data)}}lS.create=r=>new lS({typeName:jt.ZodVoid,...gr(r)});class Ts extends kr{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==vt.array)return ct(t,{code:Ze.invalid_type,expected:vt.array,received:t.parsedType}),Zt;if(i.exactLength!==null){const o=t.data.length>i.exactLength.value,s=t.data.lengthi.maxLength.value&&(ct(t,{code:Ze.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,s)=>i.type._parseAsync(new Nl(t,o,t.path,s)))).then(o=>ia.mergeArray(n,o));const a=[...t.data].map((o,s)=>i.type._parseSync(new Nl(t,o,t.path,s)));return ia.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new Ts({...this._def,minLength:{value:e,message:It.toString(t)}})}max(e,t){return new Ts({...this._def,maxLength:{value:e,message:It.toString(t)}})}length(e,t){return new Ts({...this._def,exactLength:{value:e,message:It.toString(t)}})}nonempty(e){return this.min(1,e)}}Ts.create=(r,e)=>new Ts({type:r,minLength:null,maxLength:null,exactLength:null,typeName:jt.ZodArray,...gr(e)});function dp(r){if(r instanceof Un){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=Tl.create(dp(n))}return new Un({...r._def,shape:()=>e})}else return r instanceof Ts?new Ts({...r._def,type:dp(r.element)}):r instanceof Tl?Tl.create(dp(r.unwrap())):r instanceof af?af.create(dp(r.unwrap())):r instanceof zl?zl.create(r.items.map(e=>dp(e))):r}class Un extends kr{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=Zr.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==vt.object){const u=this._getOrReturnCtx(e);return ct(u,{code:Ze.invalid_type,expected:vt.object,received:u.parsedType}),Zt}const{status:n,ctx:i}=this._processInputParams(e),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Fu&&this._def.unknownKeys==="strip"))for(const u in i.data)o.includes(u)||s.push(u);const l=[];for(const u of o){const c=a[u],f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Nl(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Fu){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")s.length>0&&(ct(i,{code:Ze.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Nl(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const f=await c.key,h=await c.value;u.push({key:f,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>ia.mergeObjectSync(n,u)):ia.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return It.errToObj,new Un({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,a,o,s;const l=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,t,n).message)!==null&&o!==void 0?o:n.defaultError;return t.code==="unrecognized_keys"?{message:(s=It.errToObj(e).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Un({...this._def,unknownKeys:"strip"})}passthrough(){return new Un({...this._def,unknownKeys:"passthrough"})}extend(e){return new Un({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Un({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:jt.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Un({...this._def,catchall:e})}pick(e){const t={};return Zr.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new Un({...this._def,shape:()=>t})}omit(e){const t={};return Zr.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new Un({...this._def,shape:()=>t})}deepPartial(){return dp(this)}partial(e){const t={};return Zr.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}),new Un({...this._def,shape:()=>t})}required(e){const t={};return Zr.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Tl;)a=a._def.innerType;t[n]=a}}),new Un({...this._def,shape:()=>t})}keyof(){return AW(Zr.objectKeys(this.shape))}}Un.create=(r,e)=>new Un({shape:()=>r,unknownKeys:"strip",catchall:Fu.create(),typeName:jt.ZodObject,...gr(e)});Un.strictCreate=(r,e)=>new Un({shape:()=>r,unknownKeys:"strict",catchall:Fu.create(),typeName:jt.ZodObject,...gr(e)});Un.lazycreate=(r,e)=>new Un({shape:r,unknownKeys:"strip",catchall:Fu.create(),typeName:jt.ZodObject,...gr(e)});class I0 extends kr{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new yo(s.ctx.common.issues));return ct(t,{code:Ze.invalid_union,unionErrors:o}),Zt}if(t.common.async)return Promise.all(n.map(async a=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const l of n){const u={...t,common:{...t.common,issues:[]},parent:null},c=l._parseSync({data:t.data,path:t.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(l=>new yo(l));return ct(t,{code:Ze.invalid_union,unionErrors:s}),Zt}}get options(){return this._def.options}}I0.create=(r,e)=>new I0({options:r,typeName:jt.ZodUnion,...gr(e)});const ou=r=>r instanceof B0?ou(r.schema):r instanceof Bs?ou(r.innerType()):r instanceof O0?[r.value]:r instanceof nf?r.options:r instanceof P0?Zr.objectValues(r.enum):r instanceof R0?ou(r._def.innerType):r instanceof k0?[void 0]:r instanceof M0?[null]:r instanceof Tl?[void 0,...ou(r.unwrap())]:r instanceof af?[null,...ou(r.unwrap())]:r instanceof RL||r instanceof z0?ou(r.unwrap()):r instanceof N0?ou(r._def.innerType):[];class hA extends kr{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==vt.object)return ct(t,{code:Ze.invalid_type,expected:vt.object,received:t.parsedType}),Zt;const n=this.discriminator,i=t.data[n],a=this.optionsMap.get(i);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(ct(t,{code:Ze.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Zt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const a of t){const o=ou(a.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,a)}}return new hA({typeName:jt.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...gr(n)})}}function UT(r,e){const t=Sc(r),n=Sc(e);if(r===e)return{valid:!0,data:r};if(t===vt.object&&n===vt.object){const i=Zr.objectKeys(e),a=Zr.objectKeys(r).filter(s=>i.indexOf(s)!==-1),o={...r,...e};for(const s of a){const l=UT(r[s],e[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(t===vt.array&&n===vt.array){if(r.length!==e.length)return{valid:!1};const i=[];for(let a=0;a{if(VT(a)||VT(o))return Zt;const s=UT(a.value,o.value);return s.valid?((GT(a)||GT(o))&&t.dirty(),{status:t.value,value:s.data}):(ct(n,{code:Ze.invalid_intersection_types}),Zt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}L0.create=(r,e,t)=>new L0({left:r,right:e,typeName:jt.ZodIntersection,...gr(t)});class zl extends kr{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==vt.array)return ct(n,{code:Ze.invalid_type,expected:vt.array,received:n.parsedType}),Zt;if(n.data.lengththis._def.items.length&&(ct(n,{code:Ze.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...n.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Nl(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>ia.mergeArray(t,o)):ia.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new zl({...this._def,rest:e})}}zl.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new zl({items:r,typeName:jt.ZodTuple,rest:null,...gr(e)})};class F0 extends kr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==vt.object)return ct(n,{code:Ze.invalid_type,expected:vt.object,received:n.parsedType}),Zt;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in n.data)i.push({key:a._parse(new Nl(n,s,n.path,s)),value:o._parse(new Nl(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?ia.mergeObjectAsync(t,i):ia.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof kr?new F0({keyType:e,valueType:t,typeName:jt.ZodRecord,...gr(n)}):new F0({keyType:As.create(),valueType:e,typeName:jt.ZodRecord,...gr(t)})}}class uS extends kr{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==vt.map)return ct(n,{code:Ze.invalid_type,expected:vt.map,received:n.parsedType}),Zt;const i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,l],u)=>({key:i._parse(new Nl(n,s,n.path,[u,"key"])),value:a._parse(new Nl(n,l,n.path,[u,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return Zt;(u.status==="dirty"||c.status==="dirty")&&t.dirty(),s.set(u.value,c.value)}return{status:t.value,value:s}})}else{const s=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return Zt;(u.status==="dirty"||c.status==="dirty")&&t.dirty(),s.set(u.value,c.value)}return{status:t.value,value:s}}}}uS.create=(r,e,t)=>new uS({valueType:e,keyType:r,typeName:jt.ZodMap,...gr(t)});class od extends kr{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==vt.set)return ct(n,{code:Ze.invalid_type,expected:vt.set,received:n.parsedType}),Zt;const i=this._def;i.minSize!==null&&n.data.sizei.maxSize.value&&(ct(n,{code:Ze.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const a=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return Zt;c.status==="dirty"&&t.dirty(),u.add(c.value)}return{status:t.value,value:u}}const s=[...n.data.values()].map((l,u)=>a._parse(new Nl(n,l,n.path,u)));return n.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,t){return new od({...this._def,minSize:{value:e,message:It.toString(t)}})}max(e,t){return new od({...this._def,maxSize:{value:e,message:It.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}od.create=(r,e)=>new od({valueType:r,minSize:null,maxSize:null,typeName:jt.ZodSet,...gr(e)});class Gp extends kr{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==vt.function)return ct(t,{code:Ze.invalid_type,expected:vt.function,received:t.parsedType}),Zt;function n(s,l){return aS({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,iS(),_g].filter(u=>!!u),issueData:{code:Ze.invalid_arguments,argumentsError:l}})}function i(s,l){return aS({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,iS(),_g].filter(u=>!!u),issueData:{code:Ze.invalid_return_type,returnTypeError:l}})}const a={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Sg){const s=this;return Ea(async function(...l){const u=new yo([]),c=await s._def.args.parseAsync(l,a).catch(d=>{throw u.addIssue(n(l,d)),u}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(d=>{throw u.addIssue(i(f,d)),u})})}else{const s=this;return Ea(function(...l){const u=s._def.args.safeParse(l,a);if(!u.success)throw new yo([n(l,u.error)]);const c=Reflect.apply(o,this,u.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new yo([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Gp({...this._def,args:zl.create(e).rest(Wh.create())})}returns(e){return new Gp({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Gp({args:e||zl.create([]).rest(Wh.create()),returns:t||Wh.create(),typeName:jt.ZodFunction,...gr(n)})}}class B0 extends kr{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}B0.create=(r,e)=>new B0({getter:r,typeName:jt.ZodLazy,...gr(e)});class O0 extends kr{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return ct(t,{received:t.data,code:Ze.invalid_literal,expected:this._def.value}),Zt}return{status:"valid",value:e.data}}get value(){return this._def.value}}O0.create=(r,e)=>new O0({value:r,typeName:jt.ZodLiteral,...gr(e)});function AW(r,e){return new nf({values:r,typeName:jt.ZodEnum,...gr(e)})}class nf extends kr{constructor(){super(...arguments),Sm.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return ct(t,{expected:Zr.joinValues(n),received:t.parsedType,code:Ze.invalid_type}),Zt}if(oS(this,Sm)||bW(this,Sm,new Set(this._def.values)),!oS(this,Sm).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return ct(t,{received:t.data,code:Ze.invalid_enum_value,options:n}),Zt}return Ea(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return nf.create(e,{...this._def,...t})}exclude(e,t=this._def){return nf.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}Sm=new WeakMap;nf.create=AW;class P0 extends kr{constructor(){super(...arguments),Am.set(this,void 0)}_parse(e){const t=Zr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==vt.string&&n.parsedType!==vt.number){const i=Zr.objectValues(t);return ct(n,{expected:Zr.joinValues(i),received:n.parsedType,code:Ze.invalid_type}),Zt}if(oS(this,Am)||bW(this,Am,new Set(Zr.getValidEnumValues(this._def.values))),!oS(this,Am).has(e.data)){const i=Zr.objectValues(t);return ct(n,{received:n.data,code:Ze.invalid_enum_value,options:i}),Zt}return Ea(e.data)}get enum(){return this._def.values}}Am=new WeakMap;P0.create=(r,e)=>new P0({values:r,typeName:jt.ZodNativeEnum,...gr(e)});class Sg extends kr{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==vt.promise&&t.common.async===!1)return ct(t,{code:Ze.invalid_type,expected:vt.promise,received:t.parsedType}),Zt;const n=t.parsedType===vt.promise?t.data:Promise.resolve(t.data);return Ea(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Sg.create=(r,e)=>new Sg({type:r,typeName:jt.ZodPromise,...gr(e)});class Bs extends kr{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===jt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:o=>{ct(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async s=>{if(t.value==="aborted")return Zt;const l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?Zt:l.status==="dirty"||t.value==="dirty"?Ap(l.value):l});{if(t.value==="aborted")return Zt;const s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?Zt:s.status==="dirty"||t.value==="dirty"?Ap(s.value):s}}if(i.type==="refinement"){const o=s=>{const l=i.refinement(s,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Zt:(s.status==="dirty"&&t.dirty(),o(s.value),{status:t.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?Zt:(s.status==="dirty"&&t.dirty(),o(s.value).then(()=>({status:t.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!D0(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>D0(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:t.value,value:s})):o);Zr.assertNever(i)}}Bs.create=(r,e,t)=>new Bs({schema:r,typeName:jt.ZodEffects,effect:e,...gr(t)});Bs.createWithPreprocess=(r,e,t)=>new Bs({schema:e,effect:{type:"preprocess",transform:r},typeName:jt.ZodEffects,...gr(t)});class Tl extends kr{_parse(e){return this._getType(e)===vt.undefined?Ea(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Tl.create=(r,e)=>new Tl({innerType:r,typeName:jt.ZodOptional,...gr(e)});class af extends kr{_parse(e){return this._getType(e)===vt.null?Ea(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}af.create=(r,e)=>new af({innerType:r,typeName:jt.ZodNullable,...gr(e)});class R0 extends kr{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===vt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}R0.create=(r,e)=>new R0({innerType:r,typeName:jt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...gr(e)});class N0 extends kr{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return E0(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new yo(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new yo(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}N0.create=(r,e)=>new N0({innerType:r,typeName:jt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...gr(e)});class cS extends kr{_parse(e){if(this._getType(e)!==vt.nan){const n=this._getOrReturnCtx(e);return ct(n,{code:Ze.invalid_type,expected:vt.nan,received:n.parsedType}),Zt}return{status:"valid",value:e.data}}}cS.create=r=>new cS({typeName:jt.ZodNaN,...gr(r)});const uge=Symbol("zod_brand");class RL extends kr{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class t1 extends kr{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Zt:a.status==="dirty"?(t.dirty(),Ap(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Zt:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new t1({in:e,out:t,typeName:jt.ZodPipeline})}}class z0 extends kr{_parse(e){const t=this._def.innerType._parse(e),n=i=>(D0(i)&&(i.value=Object.freeze(i.value)),i);return E0(t)?t.then(i=>n(i)):n(t)}unwrap(){return this._def.innerType}}z0.create=(r,e)=>new z0({innerType:r,typeName:jt.ZodReadonly,...gr(e)});function CW(r,e={},t){return r?wg.create().superRefine((n,i)=>{var a,o;if(!r(n)){const s=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(o=(a=s.fatal)!==null&&a!==void 0?a:t)!==null&&o!==void 0?o:!0,u=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...u,fatal:l})}}):wg.create()}const cge={object:Un.lazycreate};var jt;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(jt||(jt={}));const fge=(r,e={message:`Input not instance of ${r.name}`})=>CW(t=>t instanceof r,e),xW=As.create,DW=tf.create,hge=cS.create,dge=rf.create,EW=T0.create,pge=ad.create,gge=sS.create,vge=k0.create,mge=M0.create,yge=wg.create,bge=Wh.create,_ge=Fu.create,wge=lS.create,Sge=Ts.create,Age=Un.create,Cge=Un.strictCreate,xge=I0.create,Dge=hA.create,Ege=L0.create,Tge=zl.create,kge=F0.create,Mge=uS.create,Ige=od.create,Lge=Gp.create,Fge=B0.create,Bge=O0.create,Oge=nf.create,Pge=P0.create,Rge=Sg.create,TO=Bs.create,Nge=Tl.create,zge=af.create,Vge=Bs.createWithPreprocess,Gge=t1.create,Uge=()=>xW().optional(),Hge=()=>DW().optional(),Wge=()=>EW().optional(),$ge={string:r=>As.create({...r,coerce:!0}),number:r=>tf.create({...r,coerce:!0}),boolean:r=>T0.create({...r,coerce:!0}),bigint:r=>rf.create({...r,coerce:!0}),date:r=>ad.create({...r,coerce:!0})},jge=Zt;var To=Object.freeze({__proto__:null,defaultErrorMap:_g,setErrorMap:jpe,getErrorMap:iS,makeIssue:aS,EMPTY_PATH:qpe,addIssueToContext:ct,ParseStatus:ia,INVALID:Zt,DIRTY:Ap,OK:Ea,isAborted:VT,isDirty:GT,isValid:D0,isAsync:E0,get util(){return Zr},get objectUtil(){return zT},ZodParsedType:vt,getParsedType:Sc,ZodType:kr,datetimeRegex:SW,ZodString:As,ZodNumber:tf,ZodBigInt:rf,ZodBoolean:T0,ZodDate:ad,ZodSymbol:sS,ZodUndefined:k0,ZodNull:M0,ZodAny:wg,ZodUnknown:Wh,ZodNever:Fu,ZodVoid:lS,ZodArray:Ts,ZodObject:Un,ZodUnion:I0,ZodDiscriminatedUnion:hA,ZodIntersection:L0,ZodTuple:zl,ZodRecord:F0,ZodMap:uS,ZodSet:od,ZodFunction:Gp,ZodLazy:B0,ZodLiteral:O0,ZodEnum:nf,ZodNativeEnum:P0,ZodPromise:Sg,ZodEffects:Bs,ZodTransformer:Bs,ZodOptional:Tl,ZodNullable:af,ZodDefault:R0,ZodCatch:N0,ZodNaN:cS,BRAND:uge,ZodBranded:RL,ZodPipeline:t1,ZodReadonly:z0,custom:CW,Schema:kr,ZodSchema:kr,late:cge,get ZodFirstPartyTypeKind(){return jt},coerce:$ge,any:yge,array:Sge,bigint:dge,boolean:EW,date:pge,discriminatedUnion:Dge,effect:TO,enum:Oge,function:Lge,instanceof:fge,intersection:Ege,lazy:Fge,literal:Bge,map:Mge,nan:hge,nativeEnum:Pge,never:_ge,null:mge,nullable:zge,number:DW,object:Age,oboolean:Wge,onumber:Hge,optional:Nge,ostring:Uge,pipeline:Gge,preprocess:Vge,promise:Rge,record:kge,set:Ige,strictObject:Cge,string:xW,symbol:gge,transformer:TO,tuple:Tge,undefined:vge,union:xge,unknown:bge,void:wge,NEVER:jge,ZodIssueCode:Ze,quotelessJson:$pe,ZodError:yo});To.object({label:To.union([To.string(),To.number()]).optional().nullable(),value:To.union([To.string(),To.number(),To.null()]),idx:To.number().optional(),selected:To.boolean().optional(),__auto:To.boolean().optional(),__removeOnDeselect:To.boolean().optional()});const TW="___usql_query";let kW=OH;const Xqe=r=>{OG(TW,r),kW=r},Kqe=()=>XI(TW),kO=(r,e,t,n)=>El.create(r,kW,e,{...n,initialData:t}),MO=1,qge=.9,Yge=.8,Zge=.17,YC=.1,ZC=.999,Xge=.9999,Kge=.99,Qge=/[\\/_+.#"@[({&]/,Jge=/[\\/_+.#"@[({&]/g,eve=/[\s-]/,MW=/[\s-]/g;function HT(r,e,t,n,i,a,o){if(a===e.length)return i===r.length?MO:Kge;const s=`${i},${a}`;if(o[s]!==void 0)return o[s];const l=n.charAt(a);let u=t.indexOf(l,i),c=0,f,h,d,p;for(;u>=0;)f=HT(r,e,t,n,u+1,a+1,o),f>c&&(u===i?f*=MO:Qge.test(r.charAt(u-1))?(f*=Yge,d=r.slice(i,u-1).match(Jge),d&&i>0&&(f*=Math.pow(ZC,d.length))):eve.test(r.charAt(u-1))?(f*=qge,p=r.slice(i,u-1).match(MW),p&&i>0&&(f*=Math.pow(ZC,p.length))):(f*=Zge,i>0&&(f*=Math.pow(ZC,u-i))),r.charAt(u)!==e.charAt(a)&&(f*=Xge)),(ff&&(f=h*YC)),f>c&&(c=f),u=t.indexOf(l,u+1);return o[s]=c,c}function IO(r){return r.toLowerCase().replace(MW," ")}function tve(r,e){return HT(r,e,IO(r),IO(e),0,0,{})}function H1(){return Boe(10)}const rve=(r,e)=>tve(r,e);H1(),H1(),H1(),H1();function nve(r){return Object.keys(r).reduce((e,t)=>r[t]===void 0?e:e+`${t}:${r[t]};`,"")}nve({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function IW(r,e,t,n){const i=Array.isArray(e)?e:[e];return i.forEach(a=>r.addEventListener(a,t,n)),()=>{i.forEach(a=>r.removeEventListener(a,t,n))}}const ive={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",A:"a",P:"p"};Cu(void 0,r=>{function e(n){r(n),r(void 0)}return IW(document,"pointerup",e,{passive:!1,capture:!0})});Cu(void 0,r=>{function e(n){n&&n.key===ive.ESCAPE&&r(n),r(void 0)}return IW(document,"keydown",e,{passive:!1,capture:!0})});function Yn(r,e){const t={};return e.forEach(n=>{t[n]={[`data-bits-${r}-${n}`]:""}}),n=>t[n]}function LW(r){return Object.keys(r).reduce((e,t)=>r[t]===void 0?e:e+`${t}:${r[t]};`,"")}LW({position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"});LW({position:"absolute",width:"25px",height:"25px",opacity:"0",margin:"0px",pointerEvents:"none",transform:"translateX(-100%)"});const ave="accordion",ove=["root","content","header","item","trigger"];Yn(ave,ove);const sve="alert-dialog",lve=["action","cancel","content","description","overlay","portal","title","trigger"];Yn(sve,lve);const uve="avatar",cve=["root","image","fallback"];Yn(uve,cve);const fve="checkbox",hve=["root","input","indicator"];Yn(fve,hve);const dve="collapsible",pve=["root","content","trigger"];Yn(dve,pve);const gve="context-menu",vve=["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","separator","sub-content","sub-trigger","trigger"];Yn(gve,vve);const mve="dialog",yve=["close","content","description","overlay","portal","title","trigger"];Yn(mve,yve);const bve="dropdown-menu",_ve=["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","separator","sub-content","sub-trigger","trigger"];Yn(bve,_ve);const wve="link-preview",Sve=["arrow","content","trigger"];Yn(wve,Sve);const Ave="label",Cve=["root"];Yn(Ave,Cve);const xve="menubar",Dve=["root","arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","separator","sub-content","sub-trigger","trigger"];Yn(xve,Dve);const Eve="popover",Tve=["arrow","close","content","trigger"];Yn(Eve,Tve);const kve="progress",Mve=["root"];Yn(kve,Mve);const Ive="radio-group",Lve=["root","item","input"];Yn(Ive,Lve);const Fve="select",Bve=["arrow","content","group","item","input","label","trigger","value"];Yn(Fve,Bve);const Ove="separator",Pve=["root"];Yn(Ove,Pve);const Rve="slider",Nve=["root","input","range","thumb","tick"];Yn(Rve,Nve);const zve="switch",Vve=["root","input","thumb"];Yn(zve,Vve);const Gve="tabs",Uve=["root","content","list","trigger"];Yn(Gve,Uve);const Hve="toggle",Wve=["root","input"];Yn(Hve,Wve);const $ve="toggle-group",jve=["root","item"];Yn($ve,jve);const qve="tooltip",Yve=["arrow","content","trigger"];Yn(qve,Yve);var LO=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,so=r=>!r||typeof r!="object"||Object.keys(r).length===0,Zve=(r,e)=>JSON.stringify(r)===JSON.stringify(e);function FW(r,e){r.forEach(function(t){Array.isArray(t)?FW(t,e):e.push(t)})}function BW(r){let e=[];return FW(r,e),e}var OW=(...r)=>BW(r).filter(Boolean),PW=(r,e)=>{let t={},n=Object.keys(r),i=Object.keys(e);for(let a of n)if(i.includes(a)){let o=r[a],s=e[a];typeof o=="object"&&typeof s=="object"?t[a]=PW(o,s):Array.isArray(o)||Array.isArray(s)?t[a]=OW(s,o):t[a]=s+" "+o}else t[a]=r[a];for(let a of i)n.includes(a)||(t[a]=e[a]);return t},FO=r=>!r||typeof r!="string"?r:r.replace(/\s+/g," ").trim();function Xve(){for(var r=0,e,t,n="";rr&&(e=0,n=t,t=new Map)}return{get:function(o){var s=t.get(o);if(s!==void 0)return s;if((s=n.get(o))!==void 0)return i(o,s),s},set:function(o,s){t.has(o)?t.set(o,s):i(o,s)}}}var zW="!";function nme(r){var e=r.separator||":",t=e.length===1,n=e[0],i=e.length;return function(o){for(var s=[],l=0,u=0,c,f=0;fu?c-u:void 0;return{modifiers:s,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:v}}}function ime(r){if(r.length<=1)return r;var e=[],t=[];return r.forEach(function(n){var i=n[0]==="[";i?(e.push.apply(e,t.sort().concat([n])),t=[]):t.push(n)}),e.push.apply(e,t.sort()),e}function ame(r){return{cache:rme(r.cacheSize),splitModifiers:nme(r),...Kve(r)}}var ome=/\s+/;function sme(r,e){var t=e.splitModifiers,n=e.getClassGroupId,i=e.getConflictingClassGroupIds,a=new Set;return r.trim().split(ome).map(function(o){var s=t(o),l=s.modifiers,u=s.hasImportantModifier,c=s.baseClassName,f=s.maybePostfixModifierPosition,h=n(f?c.substring(0,f):c),d=!!f;if(!h){if(!f)return{isTailwindClass:!1,originalClassName:o};if(h=n(c),!h)return{isTailwindClass:!1,originalClassName:o};d=!1}var p=ime(l).join(":"),g=u?p+zW:p;return{isTailwindClass:!0,modifierId:g,classGroupId:h,originalClassName:o,hasPostfixModifier:d}}).reverse().filter(function(o){if(!o.isTailwindClass)return!0;var s=o.modifierId,l=o.classGroupId,u=o.hasPostfixModifier,c=s+l;return a.has(c)?!1:(a.add(c),i(l,u).forEach(function(f){return a.add(s+f)}),!0)}).reverse().map(function(o){return o.originalClassName}).join(" ")}function $T(){for(var r=arguments.length,e=new Array(r),t=0;t1?e-1:0),n=1;nr||void 0,V0=(...r)=>HW(BW(r).filter(Boolean).join(" ")),XC=null,fS={},YT=!1,Bv=(...r)=>e=>e.twMerge?((!XC||YT)&&(YT=!1,XC=so(fS)?xme:Cme(fS)),HW(XC(V0(r)))):V0(r),RO=(r,e)=>{for(let t in e)r.hasOwnProperty(t)?r[t]=V0(r[t],e[t]):r[t]=e[t];return r},WW=(r,e)=>{let{extend:t=null,slots:n={},variants:i={},compoundVariants:a=[],compoundSlots:o=[],defaultVariants:s={}}=r,l={...Dme,...e},u=t!=null&&t.base?V0(t.base,r==null?void 0:r.base):r==null?void 0:r.base,c=t!=null&&t.variants&&!so(t.variants)?PW(i,t.variants):i,f=t!=null&&t.defaultVariants&&!so(t.defaultVariants)?{...t.defaultVariants,...s}:s;!so(l.twMergeConfig)&&!Zve(l.twMergeConfig,fS)&&(YT=!0,fS=l.twMergeConfig);let h=so(t==null?void 0:t.slots),d=so(n)?{}:{base:V0(r==null?void 0:r.base,h&&(t==null?void 0:t.base)),...n},p=h?d:RO({...t==null?void 0:t.slots},so(d)?{base:r==null?void 0:r.base}:d),g=m=>{if(so(c)&&so(n)&&h)return Bv(u,m==null?void 0:m.class,m==null?void 0:m.className)(l);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof a}`);if(o&&!Array.isArray(o))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof o}`);let y=(T,k,M=[],L)=>{let F=M;if(typeof k=="string")F=F.concat(FO(k).split(" ").map(U=>`${T}:${U}`));else if(Array.isArray(k))F=F.concat(k.reduce((U,N)=>U.concat(`${T}:${N}`),[]));else if(typeof k=="object"&&typeof L=="string"){for(let U in k)if(k.hasOwnProperty(U)&&U===L){let N=k[U];if(N&&typeof N=="string"){let $=FO(N);F[L]?F[L]=F[L].concat($.split(" ").map(H=>`${T}:${H}`)):F[L]=$.split(" ").map(H=>`${T}:${H}`)}else Array.isArray(N)&&N.length>0&&(F[L]=N.reduce(($,H)=>$.concat(`${T}:${H}`),[]))}}return F},b=(T,k=c,M=null,L=null)=>{var F;let U=k[T];if(!U||so(U))return null;let N=(F=L==null?void 0:L[T])!=null?F:m==null?void 0:m[T];if(N===null)return null;let $=LO(N),H=Array.isArray(l.responsiveVariants)&&l.responsiveVariants.length>0||l.responsiveVariants===!0,P=f==null?void 0:f[T],te=[];if(typeof $=="object"&&H)for(let[fe,Ce]of Object.entries($)){let ke=U[Ce];if(fe==="initial"){P=Ce;continue}Array.isArray(l.responsiveVariants)&&!l.responsiveVariants.includes(fe)||(te=y(fe,ke,te,M))}let J=U[$]||U[LO(P)];return typeof te=="object"&&typeof M=="string"&&te[M]?RO(te,J):te.length>0?(te.push(J),te):J},_=()=>c?Object.keys(c).map(T=>b(T,c)):null,w=(T,k)=>{if(!c||typeof c!="object")return null;let M=new Array;for(let L in c){let F=b(L,c,T,k),U=T==="base"&&typeof F=="string"?F:F&&F[T];U&&(M[M.length]=U)}return M},S={};for(let T in m)m[T]!==void 0&&(S[T]=m[T]);let A=(T,k)=>{var M;let L=typeof(m==null?void 0:m[T])=="object"?{[T]:(M=m[T])==null?void 0:M.initial}:{};return{...f,...S,...L,...k}},C=(T=[],k)=>{let M=[];for(let{class:L,className:F,...U}of T){let N=!0;for(let[$,H]of Object.entries(U)){let P=A($,k);if(Array.isArray(H)){if(!H.includes(P[$])){N=!1;break}}else if(P[$]!==H){N=!1;break}}N&&(L&&M.push(L),F&&M.push(F))}return M},x=T=>{let k=C(a,T),M=C(t==null?void 0:t.compoundVariants,T);return OW(M,k)},D=T=>{let k=x(T);if(!Array.isArray(k))return k;let M={};for(let L of k)if(typeof L=="string"&&(M.base=Bv(M.base,L)(l)),typeof L=="object")for(let[F,U]of Object.entries(L))M[F]=Bv(M[F],U)(l);return M},E=T=>{if(o.length<1)return null;let k={};for(let{slots:M=[],class:L,className:F,...U}of o){if(!so(U)){let N=!0;for(let $ of Object.keys(U)){let H=A($,T)[$];if(H===void 0||(Array.isArray(U[$])?!U[$].includes(H):U[$]!==H)){N=!1;break}}if(!N)continue}for(let N of M)k[N]=k[N]||[],k[N].push([L,F])}return k};if(!so(n)||!h){let T={};if(typeof p=="object"&&!so(p))for(let k of Object.keys(p))T[k]=M=>{var L,F;return Bv(p[k],w(k,M),((L=D(M))!=null?L:[])[k],((F=E(M))!=null?F:[])[k],M==null?void 0:M.class,M==null?void 0:M.className)(l)};return T}return Bv(u,_(),x(),m==null?void 0:m.class,m==null?void 0:m.className)(l)},v=()=>{if(!(!c||typeof c!="object"))return Object.keys(c)};return g.variantKeys=v(),g.extend=t,g.base=u,g.slots=p,g.variants=c,g.defaultVariants=f,g.compoundSlots=o,g.compoundVariants=a,g};const Qqe=WW({base:"inline-flex items-center justify-center rounded-md text-sm font-medium whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-400 disabled:pointer-events-none disabled:opacity-50",variants:{variant:{default:"bg-gray-900 text-white shadow hover:bg-gray-900/90",destructive:"bg-red-500 text-red-50 shadow-sm hover:bg-red-500/90",outline:"border border-input bg-transparent shadow-sm hover:bg-gray-100 hover:text-gray-900",secondary:"bg-gray-100 text-gray-900 shadow-sm hover:bg-gray-100/80",ghost:"hover:bg-gray-100 hover:text-gray-900",link:"text-gray-900 underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}});WW({base:"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 select-none",variants:{variant:{default:"border-transparent bg-gray-900 text-white shadow hover:bg-gray-900/80",secondary:"border-transparent bg-gray-100 text-gray-900 hover:bg-gray-100/80",destructive:"border-transparent bg-red-500 text-red-50 shadow hover:bg-red-500/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});var $W={exports:{}};(function(r){var e={},t=function(i){i.version="0.11.2";function a(W){for(var q="",j=W.length-1;j>=0;)q+=W.charAt(j--);return q}function o(W,q){for(var j="";j.length=q?j:o("0",q-j.length)+j}function l(W,q){var j=""+W;return j.length>=q?j:o(" ",q-j.length)+j}function u(W,q){var j=""+W;return j.length>=q?j:j+o(" ",q-j.length)}function c(W,q){var j=""+Math.round(W);return j.length>=q?j:o("0",q-j.length)+j}function f(W,q){var j=""+W;return j.length>=q?j:o("0",q-j.length)+j}var h=Math.pow(2,32);function d(W,q){if(W>h||W<-h)return c(W,q);var j=Math.round(W);return f(j,q)}function p(W,q){return q=q||0,W.length>=7+q&&(W.charCodeAt(q)|32)===103&&(W.charCodeAt(q+1)|32)===101&&(W.charCodeAt(q+2)|32)===110&&(W.charCodeAt(q+3)|32)===101&&(W.charCodeAt(q+4)|32)===114&&(W.charCodeAt(q+5)|32)===97&&(W.charCodeAt(q+6)|32)===108}var g=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],v=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function m(W){W[0]="General",W[1]="0",W[2]="0.00",W[3]="#,##0",W[4]="#,##0.00",W[9]="0%",W[10]="0.00%",W[11]="0.00E+00",W[12]="# ?/?",W[13]="# ??/??",W[14]="m/d/yy",W[15]="d-mmm-yy",W[16]="d-mmm",W[17]="mmm-yy",W[18]="h:mm AM/PM",W[19]="h:mm:ss AM/PM",W[20]="h:mm",W[21]="h:mm:ss",W[22]="m/d/yy h:mm",W[37]="#,##0 ;(#,##0)",W[38]="#,##0 ;[Red](#,##0)",W[39]="#,##0.00;(#,##0.00)",W[40]="#,##0.00;[Red](#,##0.00)",W[45]="mm:ss",W[46]="[h]:mm:ss",W[47]="mmss.0",W[48]="##0.0E+0",W[49]="@",W[56]='"上午/下午 "hh"時"mm"分"ss"秒 "'}var y={};m(y);var b=[],_=0;for(_=5;_<=8;++_)b[_]=32+_;for(_=23;_<=26;++_)b[_]=0;for(_=27;_<=31;++_)b[_]=14;for(_=50;_<=58;++_)b[_]=14;for(_=59;_<=62;++_)b[_]=_-58;for(_=67;_<=68;++_)b[_]=_-58;for(_=72;_<=75;++_)b[_]=_-58;for(_=67;_<=68;++_)b[_]=_-57;for(_=76;_<=78;++_)b[_]=_-56;for(_=79;_<=81;++_)b[_]=_-34;var w=[];w[5]=w[63]='"$"#,##0_);\\("$"#,##0\\)',w[6]=w[64]='"$"#,##0_);[Red]\\("$"#,##0\\)',w[7]=w[65]='"$"#,##0.00_);\\("$"#,##0.00\\)',w[8]=w[66]='"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',w[41]='_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',w[42]='_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',w[43]='_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',w[44]='_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)';function S(W,q,j){for(var ve=W<0?-1:1,K=W*ve,xe=0,ne=1,we=0,ue=1,Be=0,$e=0,at=Math.floor(K);Beq&&(Be>q?($e=ue,we=xe):($e=Be,we=ne)),!j)return[0,ve*we,$e];var Gt=Math.floor(ve*we/$e);return[Gt,ve*we-Gt*$e,$e]}function A(W,q,j){if(W>2958465||W<0)return null;var ve=W|0,K=Math.floor(86400*(W-ve)),xe=0,ne=[],we={D:ve,T:K,u:86400*(W-ve)-K,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(we.u)<1e-6&&(we.u=0),q&&q.date1904&&(ve+=1462),we.u>.9999&&(we.u=0,++K==86400&&(we.T=K=0,++ve,++we.D)),ve===60)ne=j?[1317,10,29]:[1900,2,29],xe=3;else if(ve===0)ne=j?[1317,8,29]:[1900,1,0],xe=6;else{ve>60&&--ve;var ue=new Date(1900,0,1);ue.setDate(ue.getDate()+ve-1),ne=[ue.getFullYear(),ue.getMonth()+1,ue.getDate()],xe=ue.getDay(),ve<60&&(xe=(xe+6)%7),j&&(xe=L(ue,ne))}return we.y=ne[0],we.m=ne[1],we.d=ne[2],we.S=K%60,K=Math.floor(K/60),we.M=K%60,K=Math.floor(K/60),we.H=K,we.q=xe,we}i.parse_date_code=A;var C=new Date(1899,11,31,0,0,0),x=C.getTime(),D=new Date(1900,2,1,0,0,0);function E(W,q){var j=W.getTime();return q?j-=1262304e5:W>=D&&(j+=864e5),(j-(x+(W.getTimezoneOffset()-C.getTimezoneOffset())*6e4))/864e5}function T(W){return W.toString(10)}i._general_int=T;var k=function(){var q=/(?:\.0*|(\.\d*[1-9])0+)$/;function j(Be){return Be.indexOf(".")==-1?Be:Be.replace(q,"$1")}var ve=/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,K=/(E[+-])(\d)$/;function xe(Be){return Be.indexOf("E")==-1?Be:Be.replace(ve,"$1E").replace(K,"$10$2")}function ne(Be){var $e=Be<0?12:11,at=j(Be.toFixed(12));return at.length<=$e||(at=Be.toPrecision(10),at.length<=$e)?at:Be.toExponential(5)}function we(Be){var $e=j(Be.toFixed(11));return $e.length>(Be<0?12:11)||$e==="0"||$e==="-0"?Be.toPrecision(6):$e}function ue(Be){var $e=Math.floor(Math.log(Math.abs(Be))*Math.LOG10E),at;return $e>=-4&&$e<=-1?at=Be.toPrecision(10+$e):Math.abs($e)<=9?at=ne(Be):$e===10?at=Be.toFixed(10).substr(0,12):at=we(Be),j(xe(at.toUpperCase()))}return ue}();i._general_num=k;function M(W,q){switch(typeof W){case"string":return W;case"boolean":return W?"TRUE":"FALSE";case"number":return(W|0)===W?W.toString(10):k(W);case"undefined":return"";case"object":if(W==null)return"";if(W instanceof Date)return Se(14,E(W,q&&q.date1904),q)}throw new Error("unsupported value in General format: "+W)}i._general=M;function L(W,q){q[0]-=581;var j=W.getDay();return W<60&&(j=(j+6)%7),j}function F(W,q,j,ve){var K="",xe=0,ne=0,we=j.y,ue,Be=0;switch(W){case 98:we=j.y+543;case 121:switch(q.length){case 1:case 2:ue=we%100,Be=2;break;default:ue=we%1e4,Be=4;break}break;case 109:switch(q.length){case 1:case 2:ue=j.m,Be=q.length;break;case 3:return v[j.m-1][1];case 5:return v[j.m-1][0];default:return v[j.m-1][2]}break;case 100:switch(q.length){case 1:case 2:ue=j.d,Be=q.length;break;case 3:return g[j.q][0];default:return g[j.q][1]}break;case 104:switch(q.length){case 1:case 2:ue=1+(j.H+11)%12,Be=q.length;break;default:throw"bad hour format: "+q}break;case 72:switch(q.length){case 1:case 2:ue=j.H,Be=q.length;break;default:throw"bad hour format: "+q}break;case 77:switch(q.length){case 1:case 2:ue=j.M,Be=q.length;break;default:throw"bad minute format: "+q}break;case 115:if(q!="s"&&q!="ss"&&q!=".0"&&q!=".00"&&q!=".000")throw"bad second format: "+q;return j.u===0&&(q=="s"||q=="ss")?s(j.S,q.length):(ve>=2?ne=ve===3?1e3:100:ne=ve===1?10:1,xe=Math.round(ne*(j.S+j.u)),xe>=60*ne&&(xe=0),q==="s"?xe===0?"0":""+xe/ne:(K=s(xe,2+ve),q==="ss"?K.substr(0,2):"."+K.substr(2,q.length-1)));case 90:switch(q){case"[h]":case"[hh]":ue=j.D*24+j.H;break;case"[m]":case"[mm]":ue=(j.D*24+j.H)*60+j.M;break;case"[s]":case"[ss]":ue=((j.D*24+j.H)*60+j.M)*60+Math.round(j.S+j.u);break;default:throw"bad abstime format: "+q}Be=q.length===3?1:2;break;case 101:ue=we,Be=1;break}var $e=Be>0?s(ue,Be):"";return $e}function U(W){var q=3;if(W.length<=q)return W;for(var j=W.length%q,ve=W.substr(0,j);j!=W.length;j+=q)ve+=(ve.length>0?",":"")+W.substr(j,q);return ve}var N=function(){var q=/%/g;function j(Ne,le,pe){var ft=le.replace(q,""),_e=le.length-ft.length;return N(Ne,ft,pe*Math.pow(10,2*_e))+o("%",_e)}function ve(Ne,le,pe){for(var ft=le.length-1;le.charCodeAt(ft-1)===44;)--ft;return N(Ne,le.substr(0,ft),pe/Math.pow(10,3*(le.length-ft)))}function K(Ne,le){var pe,ft=Ne.indexOf("E")-Ne.indexOf(".")-1;if(Ne.match(/^#+0.0E\+0$/)){if(le==0)return"0.0E+0";if(le<0)return"-"+K(Ne,-le);var _e=Ne.indexOf(".");_e===-1&&(_e=Ne.indexOf("E"));var me=Math.floor(Math.log(le)*Math.LOG10E)%_e;if(me<0&&(me+=_e),pe=(le/Math.pow(10,me)).toPrecision(ft+1+(_e+me)%_e),pe.indexOf("e")===-1){var Te=Math.floor(Math.log(le)*Math.LOG10E);for(pe.indexOf(".")===-1?pe=pe.charAt(0)+"."+pe.substr(1)+"E+"+(Te-pe.length+me):pe+="E+"+(Te-me);pe.substr(0,2)==="0.";)pe=pe.charAt(0)+pe.substr(2,_e)+"."+pe.substr(2+_e),pe=pe.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");pe=pe.replace(/\+-/,"-")}pe=pe.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(Pt,ur,Vr,Kt){return ur+Vr+Kt.substr(0,(_e+me)%_e)+"."+Kt.substr(me)+"E"})}else pe=le.toExponential(ft);return Ne.match(/E\+00$/)&&pe.match(/e[+-]\d$/)&&(pe=pe.substr(0,pe.length-1)+"0"+pe.charAt(pe.length-1)),Ne.match(/E\-/)&&pe.match(/e\+/)&&(pe=pe.replace(/e\+/,"e")),pe.replace("e","E")}var xe=/# (\?+)( ?)\/( ?)(\d+)/;function ne(Ne,le,pe){var ft=parseInt(Ne[4],10),_e=Math.round(le*ft),me=Math.floor(_e/ft),Te=_e-me*ft,Pt=ft;return pe+(me===0?"":""+me)+" "+(Te===0?o(" ",Ne[1].length+1+Ne[4].length):l(Te,Ne[1].length)+Ne[2]+"/"+Ne[3]+s(Pt,Ne[4].length))}function we(Ne,le,pe){return pe+(le===0?"":""+le)+o(" ",Ne[1].length+2+Ne[4].length)}var ue=/^#*0*\.([0#]+)/,Be=/\).*[0#]/,$e=/\(###\) ###\\?-####/;function at(Ne){for(var le="",pe,ft=0;ft!=Ne.length;++ft)switch(pe=Ne.charCodeAt(ft)){case 35:break;case 63:le+=" ";break;case 48:le+="0";break;default:le+=String.fromCharCode(pe)}return le}function Gt(Ne,le){var pe=Math.pow(10,le);return""+Math.round(Ne*pe)/pe}function Yt(Ne,le){var pe=Ne-Math.floor(Ne),ft=Math.pow(10,le);return le<(""+Math.round(pe*ft)).length?0:Math.round(pe*ft)}function je(Ne,le){return le<(""+Math.round((Ne-Math.floor(Ne))*Math.pow(10,le))).length?1:0}function Me(Ne){return Ne<2147483647&&Ne>-2147483648?""+(Ne>=0?Ne|0:Ne-1|0):""+Math.floor(Ne)}function yt(Ne,le,pe){if(Ne.charCodeAt(0)===40&&!le.match(Be)){var ft=le.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return pe>=0?yt("n",ft,pe):"("+yt("n",ft,-pe)+")"}if(le.charCodeAt(le.length-1)===44)return ve(Ne,le,pe);if(le.indexOf("%")!==-1)return j(Ne,le,pe);if(le.indexOf("E")!==-1)return K(le,pe);if(le.charCodeAt(0)===36)return"$"+yt(Ne,le.substr(le.charAt(1)==" "?2:1),pe);var _e,me,Te,Pt,ur=Math.abs(pe),Vr=pe<0?"-":"";if(le.match(/^00+$/))return Vr+d(ur,le.length);if(le.match(/^[#?]+$/))return _e=d(pe,0),_e==="0"&&(_e=""),_e.length>le.length?_e:at(le.substr(0,le.length-_e.length))+_e;if(me=le.match(xe))return ne(me,ur,Vr);if(le.match(/^#+0+$/))return Vr+d(ur,le.length-le.indexOf("0"));if(me=le.match(ue))return _e=Gt(pe,me[1].length).replace(/^([^\.]+)$/,"$1."+at(me[1])).replace(/\.$/,"."+at(me[1])).replace(/\.(\d*)$/,function(I,z){return"."+z+o("0",at(me[1]).length-z.length)}),le.indexOf("0.")!==-1?_e:_e.replace(/^0\./,".");if(le=le.replace(/^#+([0.])/,"$1"),me=le.match(/^(0*)\.(#*)$/))return Vr+Gt(ur,me[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,me[1].length?"0.":".");if(me=le.match(/^#{1,3},##0(\.?)$/))return Vr+U(d(ur,0));if(me=le.match(/^#,##0\.([#0]*0)$/))return pe<0?"-"+yt(Ne,le,-pe):U(""+(Math.floor(pe)+je(pe,me[1].length)))+"."+s(Yt(pe,me[1].length),me[1].length);if(me=le.match(/^#,#*,#0/))return yt(Ne,le.replace(/^#,#*,/,""),pe);if(me=le.match(/^([0#]+)(\\?-([0#]+))+$/))return _e=a(yt(Ne,le.replace(/[\\-]/g,""),pe)),Te=0,a(a(le.replace(/\\/g,"")).replace(/[0#]/g,function(I){return Te<_e.length?_e.charAt(Te++):I==="0"?"0":""}));if(le.match($e))return _e=yt(Ne,"##########",pe),"("+_e.substr(0,3)+") "+_e.substr(3,3)+"-"+_e.substr(6);var Kt="";if(me=le.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return Te=Math.min(me[4].length,7),Pt=S(ur,Math.pow(10,Te)-1,!1),_e=""+Vr,Kt=N("n",me[1],Pt[1]),Kt.charAt(Kt.length-1)==" "&&(Kt=Kt.substr(0,Kt.length-1)+"0"),_e+=Kt+me[2]+"/"+me[3],Kt=u(Pt[2],Te),Kt.length=0?xt("n",ft,pe):"("+xt("n",ft,-pe)+")"}if(le.charCodeAt(le.length-1)===44)return gt(Ne,le,pe);if(le.indexOf("%")!==-1)return Nr(Ne,le,pe);if(le.indexOf("E")!==-1)return Ht(le,pe);if(le.charCodeAt(0)===36)return"$"+xt(Ne,le.substr(le.charAt(1)==" "?2:1),pe);var _e,me,Te,Pt,ur=Math.abs(pe),Vr=pe<0?"-":"";if(le.match(/^00+$/))return Vr+s(ur,le.length);if(le.match(/^[#?]+$/))return _e=""+pe,pe===0&&(_e=""),_e.length>le.length?_e:at(le.substr(0,le.length-_e.length))+_e;if(me=le.match(xe))return we(me,ur,Vr);if(le.match(/^#+0+$/))return Vr+s(ur,le.length-le.indexOf("0"));if(me=le.match(ue))return _e=(""+pe).replace(/^([^\.]+)$/,"$1."+at(me[1])).replace(/\.$/,"."+at(me[1])),_e=_e.replace(/\.(\d*)$/,function(I,z){return"."+z+o("0",at(me[1]).length-z.length)}),le.indexOf("0.")!==-1?_e:_e.replace(/^0\./,".");if(le=le.replace(/^#+([0.])/,"$1"),me=le.match(/^(0*)\.(#*)$/))return Vr+(""+ur).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,me[1].length?"0.":".");if(me=le.match(/^#{1,3},##0(\.?)$/))return Vr+U(""+ur);if(me=le.match(/^#,##0\.([#0]*0)$/))return pe<0?"-"+xt(Ne,le,-pe):U(""+pe)+"."+o("0",me[1].length);if(me=le.match(/^#,#*,#0/))return xt(Ne,le.replace(/^#,#*,/,""),pe);if(me=le.match(/^([0#]+)(\\?-([0#]+))+$/))return _e=a(xt(Ne,le.replace(/[\\-]/g,""),pe)),Te=0,a(a(le.replace(/\\/g,"")).replace(/[0#]/g,function(I){return Te<_e.length?_e.charAt(Te++):I==="0"?"0":""}));if(le.match($e))return _e=xt(Ne,"##########",pe),"("+_e.substr(0,3)+") "+_e.substr(3,3)+"-"+_e.substr(6);var Kt="";if(me=le.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return Te=Math.min(me[4].length,7),Pt=S(ur,Math.pow(10,Te)-1,!1),_e=""+Vr,Kt=N("n",me[1],Pt[1]),Kt.charAt(Kt.length-1)==" "&&(Kt=Kt.substr(0,Kt.length-1)+"0"),_e+=Kt+me[2]+"/"+me[3],Kt=u(Pt[2],Te),Kt.length-1||j=="\\"&&W.charAt(q+1)=="-"&&"0#".indexOf(W.charAt(q+2))>-1););break;case"?":for(;W.charAt(++q)===j;);break;case"*":++q,(W.charAt(q)==" "||W.charAt(q)=="*")&&++q;break;case"(":case")":++q;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;q-1;);break;case" ":++q;break;default:++q;break}return!1}i.is_date=P;function te(W,q,j,ve){for(var K=[],xe="",ne=0,we="",ue="t",Be,$e,at,Gt="H";ne=12?"P":"A"),Me.t="T",Gt="h",ne+=3):W.substr(ne,5).toUpperCase()==="AM/PM"?(Be!=null&&(Me.v=Be.H>=12?"PM":"AM"),Me.t="T",ne+=5,Gt="h"):W.substr(ne,5).toUpperCase()==="上午/下午"?(Be!=null&&(Me.v=Be.H>=12?"下午":"上午"),Me.t="T",ne+=5,Gt="h"):(Me.t="t",++ne),Be==null&&Me.t==="T")return"";K[K.length]=Me,ue=we;break;case"[":for(xe=we;W.charAt(ne++)!=="]"&&ne-1&&(xe=(xe.match(/\$([^-\[\]]*)/)||[])[1]||"$",P(W)||(K[K.length]={t:"t",v:xe}));break;case".":if(Be!=null){for(xe=we;++ne-1;)xe+=we;K[K.length]={t:"n",v:xe};break;case"?":for(xe=we;W.charAt(++ne)===we;)xe+=we;K[K.length]={t:we,v:xe},ue=we;break;case"*":++ne,(W.charAt(ne)==" "||W.charAt(ne)=="*")&&++ne;break;case"(":case")":K[K.length]={t:ve===1?"t":we,v:we},++ne;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(xe=we;ne-1;)xe+=W.charAt(ne);K[K.length]={t:"D",v:xe};break;case" ":K[K.length]={t:we,v:we},++ne;break;case"$":K[K.length]={t:"t",v:"$"},++ne;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(we)===-1)throw new Error("unrecognized character "+we+" in "+W);K[K.length]={t:"t",v:we},++ne;break}var yt=0,gt=0,Nr;for(ne=K.length-1,ue="t";ne>=0;--ne)switch(K[ne].t){case"h":case"H":K[ne].t=Gt,ue="h",yt<1&&(yt=1);break;case"s":(Nr=K[ne].v.match(/\.0+$/))&&(gt=Math.max(gt,Nr[0].length-1)),yt<3&&(yt=3);case"d":case"y":case"M":case"e":ue=K[ne].t;break;case"m":ue==="s"&&(K[ne].t="M",yt<2&&(yt=2));break;case"X":break;case"Z":yt<1&&K[ne].v.match(/[Hh]/)&&(yt=1),yt<2&&K[ne].v.match(/[Mm]/)&&(yt=2),yt<3&&K[ne].v.match(/[Ss]/)&&(yt=3)}switch(yt){case 0:break;case 1:Be.u>=.5&&(Be.u=0,++Be.S),Be.S>=60&&(Be.S=0,++Be.M),Be.M>=60&&(Be.M=0,++Be.H);break;case 2:Be.u>=.5&&(Be.u=0,++Be.S),Be.S>=60&&(Be.S=0,++Be.M);break}var Ht="",xt;for(ne=0;ne0){Ht.charCodeAt(0)==40?(le=q<0&&Ht.charCodeAt(0)===45?-q:q,pe=N("n",Ht,le)):(le=q<0&&ve>1?-q:q,pe=N("n",Ht,le),le<0&&K[0]&&K[0].t=="t"&&(pe=pe.substr(1),K[0].v="-"+K[0].v)),xt=pe.length-1;var ft=K.length;for(ne=0;ne-1){ft=ne;break}var _e=K.length;if(ft===K.length&&pe.indexOf("E")===-1){for(ne=K.length-1;ne>=0;--ne)K[ne]==null||"n?".indexOf(K[ne].t)===-1||(xt>=K[ne].v.length-1?(xt-=K[ne].v.length,K[ne].v=pe.substr(xt+1,K[ne].v.length)):xt<0?K[ne].v="":(K[ne].v=pe.substr(0,xt+1),xt=-1),K[ne].t="t",_e=ne);xt>=0&&_e=0;--ne)if(!(K[ne]==null||"n?".indexOf(K[ne].t)===-1)){for($e=K[ne].v.indexOf(".")>-1&&ne===ft?K[ne].v.indexOf(".")-1:K[ne].v.length-1,Ne=K[ne].v.substr($e+1);$e>=0;--$e)xt>=0&&(K[ne].v.charAt($e)==="0"||K[ne].v.charAt($e)==="#")&&(Ne=pe.charAt(xt--)+Ne);K[ne].v=Ne,K[ne].t="t",_e=ne}for(xt>=0&&_e-1&&ne===ft?K[ne].v.indexOf(".")+1:0,Ne=K[ne].v.substr(0,$e);$e-1&&(le=ve>1&&q<0&&ne>0&&K[ne-1].v==="-"?-q:q,K[ne].v=N(K[ne].t,K[ne].v,le),K[ne].t="t");var me="";for(ne=0;ne!==K.length;++ne)K[ne]!=null&&(me+=K[ne].v);return me}i._eval=te;var J=/\[[=<>]/,fe=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Ce(W,q){if(q==null)return!1;var j=parseFloat(q[2]);switch(q[1]){case"=":if(W==j)return!0;break;case">":if(W>j)return!0;break;case"<":if(W":if(W!=j)return!0;break;case">=":if(W>=j)return!0;break;case"<=":if(W<=j)return!0;break}return!1}function ke(W,q){var j=$(W),ve=j.length,K=j[ve-1].indexOf("@");if(ve<4&&K>-1&&--ve,j.length>4)throw new Error("cannot find right format for |"+j.join("|")+"|");if(typeof q!="number")return[4,j.length===4||K>-1?j[j.length-1]:"@"];switch(j.length){case 1:j=K>-1?["General","General","General",j[0]]:[j[0],j[0],j[0],"@"];break;case 2:j=K>-1?[j[0],j[0],j[0],j[1]]:[j[0],j[1],j[0],"@"];break;case 3:j=K>-1?[j[0],j[1],j[0],j[2]]:[j[0],j[1],j[2],"@"];break}var xe=q>0?j[0]:q<0?j[1]:j[2];if(j[0].indexOf("[")===-1&&j[1].indexOf("[")===-1)return[ve,xe];if(j[0].match(J)!=null||j[1].match(J)!=null){var ne=j[0].match(fe),we=j[1].match(fe);return Ce(q,ne)?[ve,j[0]]:Ce(q,we)?[ve,j[1]]:[ve,j[ne!=null&&we!=null?2:1]]}return[ve,xe]}function Se(W,q,j){j==null&&(j={});var ve="";switch(typeof W){case"string":W=="m/d/yy"&&j.dateNF?ve=j.dateNF:ve=W;break;case"number":W==14&&j.dateNF?ve=j.dateNF:ve=(j.table!=null?j.table:y)[W],ve==null&&(ve=j.table&&j.table[b[W]]||y[b[W]]),ve==null&&(ve=w[W]||"General");break}if(p(ve,0))return M(q,j);q instanceof Date&&(q=E(q,j.date1904));var K=ke(ve,q);if(p(K[1]))return M(q,j);if(q===!0)q="TRUE";else if(q===!1)q="FALSE";else if(q===""||q==null)return"";return te(K[1],q,j,K[0])}function be(W,q){if(typeof q!="number"){q=+q||-1;for(var j=0;j<392;++j){if(y[j]==null){q<0&&(q=j);continue}if(y[j]==W){q=j;break}}q<0&&(q=391)}return y[q]=W,q}i.load=be,i._table=y,i.get_table=function(){return y},i.load_table=function(q){for(var j=0;j!=392;++j)q[j]!==void 0&&be(q[j],j)},i.init_table=m,i.format=Se};t(e),typeof DO_NOT_EXPORT_SSF>"u"&&(r.exports=e)})($W);var Eme=$W.exports;const Ag=Kg(Eme),Tme="customFormattingSettings",Hc="auto",kme=3,Mme=[{name:"year",description:'When lowerCase(columnName)="year" with the column having numeric values will result in no formatting',matchingFunction:(r,e,t)=>r&&e?r.toLowerCase()==="year"&&((e==null?void 0:e.evidenceType)==="number"||(t==null?void 0:t.unitType)==="number"):!1,format:{formatCode:Hc,valueType:"number",exampleInput:2013,_autoFormat:{autoFormatCode:"@",truncateUnits:!1}}},{name:"id",description:'When lowerCase(columnName)="id" with the column having numeric values, then values will have no formatting',matchingFunction:(r,e,t)=>r&&e?r.toLowerCase()==="id"&&((e==null?void 0:e.evidenceType)==="number"||(t==null?void 0:t.unitType)==="number"):!1,format:{formatCode:Hc,valueType:"number",exampleInput:93120121,_autoFormat:{autoFormatFunction:r=>r!=null&&!isNaN(r)?r.toLocaleString("fullwide",{useGrouping:!1}):r}}},{name:"defaultDate",description:"Formatting for Default Date",matchingFunction:(r,e,t)=>e?(e==null?void 0:e.evidenceType)==="date"||(t==null?void 0:t.unitType)==="date":!1,format:{formatCode:Hc,valueType:"date",exampleInput:"Sat Jan 01 2022 03:15:00 GMT-0500",_autoFormat:{autoFormatCode:"YYYY-MM-DD",truncateUnits:!1}}}],zL=(r,e)=>{switch(e){case"T":return r/1e12;case"B":return r/1e9;case"M":return r/1e6;case"k":return r/1e3;default:return r}},Ime=(r,e)=>{var i,a,o;let t=((i=e||r.formatCode)==null?void 0:i.toLowerCase())===Hc,n=((a=r._autoFormat)==null?void 0:a.autoFormatFunction)||((o=r._autoFormat)==null?void 0:o.autoFormatCode);return!!(t&&n!==void 0)},VL=(r,e=7)=>{let t,n="",i=r==null?void 0:r.median,a;if(i!==void 0){let o;n=jW(i),n?(o=zL(i,n),a=!0):(o=i,a=!1),r.maxDecimals===0&&!a?t="#,##0":t=Ome(o,e)}else t="#,##0",a=!1;return{formatCode:Hc,valueType:"number",_autoFormat:{autoFormatCode:t,truncateUnits:a,columnUnits:n}}},Lme=(r,e,t)=>{let n=Mme.find(i=>i.matchingFunction(r,e,t));if(n)return n.format;if((t==null?void 0:t.unitType)==="number")return VL(t)},Fme=(r,e,t=void 0)=>{var n,i,a;if((n=e._autoFormat)!=null&&n.autoFormatFunction)return e._autoFormat.autoFormatFunction(r,e,t);if(e._autoFormat.autoFormatCode){let o=(i=e==null?void 0:e._autoFormat)==null?void 0:i.autoFormatCode;if(e.valueType==="number"){let l=(a=e==null?void 0:e._autoFormat)==null?void 0:a.truncateUnits,u=r,c="";return l&&(t==null?void 0:t.median)!==void 0&&(c=jW(t.median),u=zL(r,c)),Ag.format(o,u)+c}else return Ag.format(o,r)}else console.warn("autoFormat called without a formatCode or function");return r},Bme=r=>typeof r=="number"?r.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2}):r!=null?r==null?void 0:r.toString():"-";function Ome(r,e=7,t=kme){let n="#,##0",i=Pme(r),a=0;return i-t<0&&(a=Math.min(Math.max(Math.abs(i-t+1),0),e)),a>0&&(n+=".",n+="0".repeat(a)),n}function jW(r){let e=Math.abs(r);return e>=5e12?"T":e>=5e9?"B":e>=5e6?"M":e>=5e3?"k":""}function Pme(r){return r===0?0:Math.floor(Math.log10(r))}const Rme=[{primaryCode:"usd",currencySymbol:"$",displayName:"USD - United States Dollar"},{primaryCode:"aud",currencySymbol:"A$",displayName:"AUD - Australian Dollar",escapeCurrencySymbol:!0},{primaryCode:"brl",currencySymbol:"R$",displayName:"BRL - Brazilian Real",escapeCurrencySymbol:!0},{primaryCode:"cad",currencySymbol:"C$",displayName:"CAD - Canadian Dollar",escapeCurrencySymbol:!0},{primaryCode:"cny",currencySymbol:"¥",displayName:"CNY - Renminbi",escapeCurrencySymbol:!0},{primaryCode:"eur",currencySymbol:"€",displayName:"EUR - Euro"},{primaryCode:"gbp",currencySymbol:"£",displayName:"GBP - Pound Sterling",escapeCurrencySymbol:!0},{primaryCode:"jpy",currencySymbol:"¥",displayName:"JPY - Japanese Yen",escapeCurrencySymbol:!0},{primaryCode:"inr",currencySymbol:"₹",displayName:"INR - Indian Rupee",escapeCurrencySymbol:!0},{primaryCode:"krw",currencySymbol:"₩",displayName:"KRW - South Korean won",escapeCurrencySymbol:!0},{primaryCode:"ngn",currencySymbol:"₦",displayName:"NGN - Nigerian Naira",escapeCurrencySymbol:!0},{primaryCode:"rub",currencySymbol:"rub",displayName:"RUB - Russian Ruble",escapeCurrencySymbol:!0},{primaryCode:"sek",currencySymbol:"kr",displayName:"SEK - Swedish Krona",escapeCurrencySymbol:!0}],Nme=[{derivedSuffix:"",valueFormatCode:"#,##0",exampleInput:412.17,auto:!0},{derivedSuffix:"0",valueFormatCode:"#,##0",exampleInput:7043.123},{derivedSuffix:"1",valueFormatCode:"#,##0.0",exampleInput:7043.123},{derivedSuffix:"2",valueFormatCode:"#,##0.00",exampleInput:7043.123},{derivedSuffix:"0k",valueFormatCode:'#,##0,"k"',exampleInput:64301.12},{derivedSuffix:"1k",valueFormatCode:'#,##0.0,"k"',exampleInput:64301.12},{derivedSuffix:"2k",valueFormatCode:'#,##0.00,"k"',exampleInput:64301.12},{derivedSuffix:"0m",valueFormatCode:'#,##0,,"M"',exampleInput:456430112e-2},{derivedSuffix:"1m",valueFormatCode:'#,##0.0,,"M"',exampleInput:456430112e-2},{derivedSuffix:"2m",valueFormatCode:'#,##0.00,,"M"',exampleInput:456430112e-2},{derivedSuffix:"0b",valueFormatCode:'#,##0,,,"B"',exampleInput:978456430112e-2},{derivedSuffix:"1b",valueFormatCode:'#,##0.0,,,"B"',exampleInput:978456430112e-2},{derivedSuffix:"2b",valueFormatCode:'#,##0.00,,,"B"',exampleInput:978456430112e-2}],zme=Rme.map(r=>{let e=[];return Nme.forEach(t=>{let n={formatTag:r.primaryCode+t.derivedSuffix,parentFormat:r.primaryCode,formatCategory:"currency",valueType:"number",exampleInput:t.exampleInput,titleTagReplacement:` (${r.currencySymbol})`},i=r.escapeCurrencySymbol?`"${r.currencySymbol}"`:r.currencySymbol;t.auto||Hc===t.formatCode?(n.formatCode=Hc,n._autoFormat={autoFormatFunction:(a,o,s)=>{let l=VL(s,2),u=`${i}${l._autoFormat.autoFormatCode}`,c="",f=a;return l._autoFormat.truncateUnits&&l._autoFormat.columnUnits?(c=l._autoFormat.columnUnits,f=zL(a,l._autoFormat.columnUnits)):u.endsWith(".0")&&(u=u+"0"),Ag.format(u,f)+c}}):n.formatCode=`${i}${t.valueFormatCode}`,t.axisValueFormatCode&&(n.axisFormatCode=t.axisValueFormatCode),e.push(n)}),e}).flat(),qW=[...zme,{formatTag:"ddd",formatCode:"ddd",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"dddd",formatCode:"dddd",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"mmm",formatCode:"mmm",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"mmmm",formatCode:"mmmm",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"yyyy",formatCode:"yyyy",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"shortdate",formatCode:"mmm d/yy",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"longdate",formatCode:"mmmm d, yyyy",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"fulldate",formatCode:"dddd mmmm d, yyyy",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"mdy",formatCode:"m/d/y",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"dmy",formatCode:"d/m/y",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"hms",formatCode:"H:MM:SS AM/PM",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09T11:45:03"},{formatTag:"num0",formatCode:"#,##0",formatCategory:"number",valueType:"number",exampleInput:11.23168},{formatTag:"num1",formatCode:"#,##0.0",formatCategory:"number",valueType:"number",exampleInput:11.23168},{formatTag:"num2",formatCode:"#,##0.00",formatCategory:"number",valueType:"number",exampleInput:11.23168},{formatTag:"num3",formatCode:"#,##0.000",formatCategory:"number",valueType:"number",exampleInput:11.23168},{formatTag:"num4",formatCode:"#,##0.0000",formatCategory:"number",valueType:"number",exampleInput:11.23168},{formatTag:"num0k",formatCode:'#,##0,"k"',formatCategory:"number",valueType:"number",exampleInput:64201},{formatTag:"num1k",formatCode:'#,##0.0,"k"',formatCategory:"number",valueType:"number",exampleInput:64201},{formatTag:"num2k",formatCode:'#,##0.00,"k"',formatCategory:"number",valueType:"number",exampleInput:64201},{formatTag:"num0m",formatCode:'#,##0,,"M"',formatCategory:"number",valueType:"number",exampleInput:42539483},{formatTag:"num1m",formatCode:'#,##0.0,,"M"',formatCategory:"number",valueType:"number",exampleInput:42539483},{formatTag:"num2m",formatCode:'#,##0.00,,"M"',formatCategory:"number",valueType:"number",exampleInput:42539483},{formatTag:"num0b",formatCode:'#,##0,,,"B"',formatCategory:"number",valueType:"number",exampleInput:1384937584},{formatTag:"num1b",formatCode:'#,##0.0,,,"B"',formatCategory:"number",valueType:"number",exampleInput:1384937584},{formatTag:"num2b",formatCode:'#,##0.00,,,"B"',formatCategory:"number",valueType:"number",exampleInput:1384937584},{formatTag:"id",formatCode:"0",formatCategory:"number",valueType:"number",exampleInput:"921594675",titleTagReplacement:" id"},{formatTag:"fract",formatCode:"# ?/?",formatCategory:"number",valueType:"number",exampleInput:"0.25"},{formatTag:"mult",formatCode:'#,##0.0"x"',formatCategory:"number",valueType:"number",exampleInput:"5.32"},{formatTag:"mult0",formatCode:'#,##0"x"',formatCategory:"number",valueType:"number",exampleInput:"5.32"},{formatTag:"mult1",formatCode:'#,##0.0"x"',formatCategory:"number",valueType:"number",exampleInput:"5.32"},{formatTag:"mult2",formatCode:'#,##0.00"x"',formatCategory:"number",valueType:"number",exampleInput:"5.32"},{formatTag:"sci",formatCode:"0.00E+0",formatCategory:"number",valueType:"number",exampleInput:"16546.1561"},{formatTag:"pct",formatCode:Hc,formatCategory:"percent",valueType:"number",exampleInput:.731,titleTagReplacement:"",_autoFormat:{autoFormatFunction:(r,e,t)=>{if((t==null?void 0:t.unitType)==="number"){let n={min:t.min*100,max:t.max*100,median:t.median*100,maxDecimals:Math.max(t.maxDecimals-2,0),unitType:t.unitType},i=VL(n);return Ag.format(i._autoFormat.autoFormatCode,r*100)+"%"}else return Ag.format("#,##0%",r)}}},{formatTag:"pct0",formatCode:"#,##0%",formatCategory:"percent",valueType:"number",exampleInput:.731,titleTagReplacement:""},{formatTag:"pct1",formatCode:"#,##0.0%",formatCategory:"percent",valueType:"number",exampleInput:.731,titleTagReplacement:""},{formatTag:"pct2",formatCode:"#,##0.00%",formatCategory:"percent",valueType:"number",exampleInput:.731,titleTagReplacement:""},{formatTag:"pct3",formatCode:"#,##0.000%",formatCategory:"percent",valueType:"number",exampleInput:.731,titleTagReplacement:""}];function GL(r,...e){if(typeof r=="function")throw new Error("You must supply the data as the first argument to tidy()");let t=r;for(const n of e)n&&(t=n(t));return t}function Vme(r){return r==null?[]:Array.isArray(r)?r:[r]}function Gme(r,e){return re?1:r>=e?0:NaN}function*Ume(r,e){if(e===void 0)for(let t of r)t!=null&&(t=+t)>=t&&(yield t);else{let t=-1;for(let n of r)(n=e(n,++t,r))!=null&&(n=+n)>=n&&(yield n)}}class Hme{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let i=0;i0){for(o=e[--t];t>0&&(n=o,i=e[--t],o=n+i,a=i-(o-n),!a););t>0&&(a<0&&e[t-1]<0||a>0&&e[t-1]>0)&&(i=a*2,n=o+i,i==n-o&&(o=n))}return o}}function YW(r,e){const t=new Hme;if(e===void 0)for(let n of r)(n=+n)&&t.add(n);else{let n=-1;for(let i of r)(i=+e(i,++n,r))&&t.add(i)}return+t}class Wme extends Map{constructor(e,t=qme){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(const[n,i]of e)this.set(n,i)}get(e){return super.get(NO(this,e))}has(e){return super.has(NO(this,e))}set(e,t){return super.set($me(this,e),t)}delete(e){return super.delete(jme(this,e))}}function NO({_intern:r,_key:e},t){const n=e(t);return r.has(n)?r.get(n):t}function $me({_intern:r,_key:e},t){const n=e(t);return r.has(n)?r.get(n):(r.set(n,t),t)}function jme({_intern:r,_key:e},t){const n=e(t);return r.has(n)&&(t=r.get(t),r.delete(n)),t}function qme(r){return r!==null&&typeof r=="object"?r.valueOf():r}function zO(r){return r}function Yme(r,...e){return Zme(r,zO,zO,e)}function Zme(r,e,t,n){return function i(a,o){if(o>=n.length)return t(a);const s=new Wme,l=n[o++];let u=-1;for(const c of a){const f=l(c,++u,a),h=s.get(f);h?h.push(c):s.set(f,[c])}for(const[c,f]of s)s.set(c,i(f,o));return e(s)}(r,0)}function ZT(r,e){let t;if(e===void 0)for(const n of r)n!=null&&(t=n)&&(t=n);else{let n=-1;for(let i of r)(i=e(i,++n,r))!=null&&(t=i)&&(t=i)}return t}function XT(r,e){let t;if(e===void 0)for(const n of r)n!=null&&(t>n||t===void 0&&n>=n)&&(t=n);else{let n=-1;for(let i of r)(i=e(i,++n,r))!=null&&(t>i||t===void 0&&i>=i)&&(t=i)}return t}function ZW(r,e,t=0,n=r.length-1,i=Gme){for(;n>t;){if(n-t>600){const l=n-t+1,u=e-t+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),d=Math.max(t,Math.floor(e-u*f/l+h)),p=Math.min(n,Math.floor(e+(l-u)*f/l+h));ZW(r,e,d,p,i)}const a=r[e];let o=t,s=n;for(Ov(r,t,e),i(r[n],a)>0&&Ov(r,t,n);o0;)--s}i(r[t],a)===0?Ov(r,t,s):(++s,Ov(r,s,n)),s<=e&&(t=s+1),e<=s&&(n=s-1)}return r}function Ov(r,e,t){const n=r[e];r[e]=r[t],r[t]=n}function Xme(r,e,t){if(r=Float64Array.from(Ume(r,t)),!!(n=r.length)){if((e=+e)<=0||n<2)return XT(r);if(e>=1)return ZT(r);var n,i=(n-1)*e,a=Math.floor(i),o=ZT(ZW(r,a).subarray(0,a+1)),s=XT(r.subarray(a+1));return o+(s-o)*(i-a)}}function Kme(r,e){return Xme(r,.5,e)}function VO(r,e){return n=>{e=e??{};const i={},a=Object.keys(r);for(const o of a)i[o]=r[o](n);if(e.rest&&n.length){const o=Object.keys(n[0]);for(const s of o)a.includes(s)||(i[s]=e.rest(s)(n))}return[i]}}function XW(r){return t=>{const n=t.map(a=>({...a}));let i=0;for(const a of n){for(const o in r){const s=r[o],l=typeof s=="function"?s(a,i,n):s;a[o]=l}++i}return n}}function hS(r,e){if(r==null||typeof r!="object"||Array.isArray(r))return r;const t=Object.fromEntries(e.filter(n=>typeof n[0]!="function"&&n[0]!=null));return Object.assign(t,r)}function dA(r,e,t,n,i,a=0){for(const[o,s]of r.entries()){const l=[...t,o];if(s instanceof Map){const u=n(e,l,a);dA(s,u,l,n,i,a+1)}else i(e,l,s,a)}return e}function Qme(r,e,t=n=>n[n.length-1]){function n(o,s){const l=new Map;return o.set(t(s),l),l}function i(o,s,l){o.set(t(s),e(l,s))}const a=new Map;return dA(r,a,[],n,i),a}const dS=r=>r;function Jme(r){const e=typeof r;return r!=null&&(e==="object"||e==="function")}function Sf(r,e,t){return typeof e=="function"?e=[e]:arguments.length===2&&e!=null&&!Array.isArray(e)&&(t=e),i=>{const a=t0e(i,r),o=e0e(a,e,t==null?void 0:t.addGroupKeys);if(t!=null&&t.export)switch(t.export){case"grouped":return o;case"levels":return KC(o,t);case"entries-obj":case"entriesObject":return KC(o,{...t,export:"levels",levels:["entries-object"]});default:return KC(o,{...t,export:"levels",levels:[t.export]})}return r0e(o,t==null?void 0:t.addGroupKeys)}}Sf.grouped=r=>({...r,export:"grouped"});Sf.entries=r=>({...r,export:"entries"});Sf.entriesObject=r=>({...r,export:"entries-object"});Sf.object=r=>({...r,export:"object"});Sf.map=r=>({...r,export:"map"});Sf.keys=r=>({...r,export:"keys"});Sf.values=r=>({...r,export:"values"});Sf.levels=r=>({...r,export:"levels"});function e0e(r,e,t){let n=r;if(!(e!=null&&e.length))return n;for(const i of e)i&&(n=Qme(n,(a,o)=>{let l=i(a,{groupKeys:o});return t!==!1&&(l=l.map(u=>hS(u,o))),l}));return n}function t0e(r,e){const t=Vme(e).map((i,a)=>{const o=typeof i=="function"?i:l=>l[i],s=new Map;return l=>{const u=o(l),c=Jme(u)?u.valueOf():u;if(s.has(c))return s.get(c);const f=[i,u];return s.set(c,f),f}});return Yme(r,...t)}function r0e(r,e){const t=[];return dA(r,t,[],dS,(n,i,a)=>{let o=a;e!==!1&&(o=a.map(s=>hS(s,i))),n.push(...o)}),t}const n0e=r=>r.join("/");function i0e(r){var e;const{flat:t,single:n,mapLeaf:i=dS,mapLeaves:a=dS,addGroupKeys:o}=r;let s;return r.flat&&(s=(e=r.compositeKey)!=null?e:n0e),{groupFn:(c,f)=>n?i(o===!1?c[0]:hS(c[0],f)):a(c.map(h=>i(o===!1?h:hS(h,f)))),keyFn:t?c=>s(c.map(f=>f[1])):c=>c[c.length-1][1]}}function KC(r,e){const{groupFn:t,keyFn:n}=i0e(e);let{mapEntry:i=dS}=e;const{levels:a=["entries"]}=e,o=[];for(const c of a)switch(c){case"entries":case"entries-object":case"entries-obj":case"entriesObject":{const f=(c==="entries-object"||c==="entries-obj"||c==="entriesObject")&&e.mapEntry==null?([h,d])=>({key:h,values:d}):i;o.push({id:"entries",createEmptySubgroup:()=>[],addSubgroup:(h,d,p,g)=>{h.push(f([p,d],g))},addLeaf:(h,d,p,g)=>{h.push(f([d,p],g))}});break}case"map":o.push({id:"map",createEmptySubgroup:()=>new Map,addSubgroup:(f,h,d)=>{f.set(d,h)},addLeaf:(f,h,d)=>{f.set(h,d)}});break;case"object":o.push({id:"object",createEmptySubgroup:()=>({}),addSubgroup:(f,h,d)=>{f[d]=h},addLeaf:(f,h,d)=>{f[h]=d}});break;case"keys":o.push({id:"keys",createEmptySubgroup:()=>[],addSubgroup:(f,h,d)=>{f.push([d,h])},addLeaf:(f,h)=>{f.push(h)}});break;case"values":o.push({id:"values",createEmptySubgroup:()=>[],addSubgroup:(f,h)=>{f.push(h)},addLeaf:(f,h,d)=>{f.push(d)}});break;default:typeof c=="object"&&o.push(c)}const s=(c,f,h)=>{var d,p;if(e.flat)return c;const g=(d=o[h])!=null?d:o[o.length-1],m=((p=o[h+1])!=null?p:g).createEmptySubgroup();return g.addSubgroup(c,m,n(f),h),m},l=(c,f,h,d)=>{var p;((p=o[d])!=null?p:o[o.length-1]).addLeaf(c,n(f),t(h,f),d)},u=o[0].createEmptySubgroup();return dA(r,u,[],s,l)}function GO(r){if(r!=null&&r.predicate){const e=r.predicate;return t=>t.reduce((n,i,a)=>e(i,a,t)?n+1:n,0)}return e=>e.length}function a0e(r,e){let t=typeof r=="function"?r:n=>n[r];return n=>YW(n,t)}function o0e(r,e){let t=0;for(let n=0;nt[r];return t=>XT(t,e)}function l0e(r){const e=typeof r=="function"?r:t=>t[r];return t=>ZT(t,e)}function u0e(r){const e=typeof r=="function"?r:t=>t[r];return t=>o0e(t,e)}function c0e(r){const e=typeof r=="function"?r:t=>t[r];return t=>Kme(t,e)}function UO(r,e={}){const t=typeof r=="function"?r:n=>n[r];return n=>{const i=new Map;let a=0,o=0;for(const s of n){const l=t(s,o++,n);if(!i.has(l)){if(!e.includeUndefined&&l===void 0||e.includeNull===!1&&l===null)continue;a+=1,i.set(l,!0)}}return a}}function UL(r){if(r&&typeof r=="string"){let e=r.split(" ");r.includes(":")||(r=r+"T00:00:00"),e.length>2&&(r=e[0]+" "+e[1]);const t=/\.([^\s]+)/;r=r.replace(t,""),r=r.replace("Z",""),r=r.replace(" ","T")}return r}function f0e(r,e){return r=GL(r,XW({[e]:t=>t[e]?new Date(UL(t[e])):null})),r}function Jqe(r,e){return r=GL(r,XW({[e]:t=>UL(t[e])})),r}var kc;(function(r){r.BOOLEAN="boolean",r.NUMBER="number",r.STRING="string",r.DATE="date"})(kc||(kc={}));var G0;(function(r){r.INFERRED="inferred",r.PRECISE="precise"})(G0||(G0={}));const KW=function(r){return typeof r=="number"?kc.NUMBER:typeof r=="boolean"?kc.BOOLEAN:r instanceof Date?kc.DATE:kc.STRING};function h0e(r){if(r!=null&&r._evidenceColumnTypes)return r._evidenceColumnTypes;if(r&&r.length>0){let e=Object.keys(r[0]);return e==null?void 0:e.map(n=>{let i=r.find(a=>a[n]!=null);if(i){let a=KW(i[n]);return{name:n,evidenceType:a,typeFidelity:G0.INFERRED}}else return{name:n,evidenceType:kc.STRING,typeFidelity:G0.INFERRED}})}return[]}const QW="axis",U0="value",JW=()=>{var r;try{return((r=XI(Tme))==null?void 0:r.getCustomFormats())||[]}catch{return[]}},d0e=(r,e,t)=>{let n=m0e(r);if(e.evidenceType==="string")return;if(n){let a=JW(),o=[...qW,...a].find(s=>{var l,u;return((l=s.formatTag)==null?void 0:l.toLowerCase())===((u=n==null?void 0:n.toLowerCase)==null?void 0:u.call(n))});if(o)return o}let i=Lme(r,e,t);if(i)return i};function yi(r,e=void 0){let t=r,n=JW(),i=[...qW,...n].find(o=>{var s,l;return((s=o.formatTag)==null?void 0:s.toLowerCase())===((l=t==null?void 0:t.toLowerCase)==null?void 0:l.call(t))}),a={};return i||(a={formatTag:"custom",formatCode:t},e&&(a.valueType=e),a)}const $n=(r,e=void 0,t=void 0)=>{try{return HL(r,e,t,U0)}catch(n){return console.warn(`Unexpected error calling applyFormatting(${r}, ${e}, ${U0}, ${t}). Error=${n}`),r}},eYe=(r,e=void 0,t=void 0)=>{try{return HL(r,e,t,QW)}catch{}return r},p0e=(r,e)=>{let t=r;if(r&&(e!=null&&e.formatTag)){let n=r.toLowerCase().lastIndexOf(`_${e.formatTag.toLowerCase()}`),i="";n>0&&(typeof(e==null?void 0:e.titleTagReplacement)=="string"&&(i=e.titleTagReplacement),t=r.substring(0,n)+i)}return t},g0e=r=>{switch(r){case"number":return 1234;case"date":return"2022-01-03";default:return}},tYe=r=>{var n,i;let t=((n=r.userInput)==null?void 0:n.trim())||r.exampleInput||g0e(r.valueType);if(t)try{let a;if(r.valueType==="number"){let o=Number(t);a={min:o,max:o,median:o,maxDecimals:((i=o.toString().split(".")[1])==null?void 0:i.length)||0,unitType:"number"}}return HL(t,r,a,U0)}catch{}return""};function HL(r,e=void 0,t=void 0,n=U0){if(r==null)return"-";let i;if(e)try{let a=v0e(e,n),o;try{e.valueType==="date"&&typeof r=="string"?o=new Date(UL(r)):r instanceof Date?o=new Date(r.toISOString().slice(0,-1)):e.valueType==="number"&&typeof r!="number"&&!Number.isNaN(r)?o=Number(r):o=r}catch{o=r}if(Ime(e,a))try{i=Fme(o,e,t)}catch(s){console.warn(`Unexpected error applying auto formatting. Error=${s}`)}else i=Ag.format(a,o)}catch(a){console.warn(`Unexpected error applying formatting ${a}`)}return i===void 0&&(i=Bme(r)),i}function v0e(r,e=U0){return typeof r=="string"?r:e===QW&&(r!=null&&r.axisFormatCode)?r.axisFormatCode:r==null?void 0:r.formatCode}function m0e(r){let e=r.toLowerCase(),t=e.lastIndexOf("_");if(t>0)return e.substr(t).replace("_","")}function rYe(r,e){let t=yi(e),n=KW(r);return t.valueType=n,$n(r,t)}function y0e(r,e){let t=p0e(r,e),n=["id","gdp"],i=["of","the","and","in","on"];function a(o){return o.replace(/\S*/g,function(s){return!n.includes(s)&&!i.includes(s)?s.charAt(0).toUpperCase()+s.substr(1).toLowerCase():n.includes(s)?s.toUpperCase():s.toLowerCase()})}return t=a(r.replace(/"/g,"").replace(/_/g," ")),t}function b0e(r){let e,t,n="View environment variables →";return{c(){e=ie("br"),t=ie("a"),t.textContent=n,this.h()},l(i){e=ae(i,"BR",{}),t=ae(i,"A",{class:!0,href:!0,"data-svelte-h":!0}),Et(t)!=="svelte-16l7o12"&&(t.textContent=n),this.h()},h(){Y(t,"class","credentials-link svelte-1no0yro"),Y(t,"href","https://docs.evidence.dev/cli/#environment-variables")},m(i,a){se(i,e,a),se(i,t,a)},d(i){i&&(V(e),V(t))}}}function _0e(r){let e,t,n,i,a,o,s,l,u;function c(d,p){if(d[0]===w0e)return b0e}let f=c(r),h=f&&f(r);return{c(){e=ie("div"),t=ie("div"),n=ie("div"),i=ht(r[1]),a=Ie(),o=ie("div"),s=ht(r[0]),l=Ie(),h&&h.c(),this.h()},l(d){e=ae(d,"DIV",{width:!0,class:!0});var p=ge(e);t=ae(p,"DIV",{class:!0});var g=ge(t);n=ae(g,"DIV",{class:!0});var v=ge(n);i=dt(v,r[1]),v.forEach(V),a=Le(g),o=ae(g,"DIV",{class:!0});var m=ge(o);s=dt(m,r[0]),l=Le(m),h&&h.l(m),m.forEach(V),g.forEach(V),p.forEach(V),this.h()},h(){Y(n,"class","font-bold text-center text-lg"),Y(o,"class","text-center [word-wrap:break-work] text-xs"),Y(t,"class","m-auto w-full"),Y(e,"width","100%"),Y(e,"class",u="grid grid-rows-auto box-content grid-cols-1 justify-center bg-red-50 text-grey-700 font-ui font-normal rounded border border-red-200 min-h-["+r[2]+"px] py-5 px-8 my-5 print:break-inside-avoid relative svelte-1no0yro")},m(d,p){se(d,e,p),Q(e,t),Q(t,n),Q(n,i),Q(t,a),Q(t,o),Q(o,s),Q(o,l),h&&h.m(o,null)},p(d,[p]){p&2&&Bt(i,d[1]),p&1&&Bt(s,d[0]),f!==(f=c(d))&&(h&&h.d(1),h=f&&f(d),h&&(h.c(),h.m(o,null))),p&4&&u!==(u="grid grid-rows-auto box-content grid-cols-1 justify-center bg-red-50 text-grey-700 font-ui font-normal rounded border border-red-200 min-h-["+d[2]+"px] py-5 px-8 my-5 print:break-inside-avoid relative svelte-1no0yro")&&Y(e,"class",u)},i:Oe,o:Oe,d(d){d&&V(e),h&&h.d()}}}const w0e="SQL Error: Missing database connection; set the EVIDENCE_DATABASE environment variable.";function S0e(r,e,t){let{error:n}=e,{chartType:i}=e,{minHeight:a="150"}=e;return r.$$set=o=>{"error"in o&&t(0,n=o.error),"chartType"in o&&t(1,i=o.chartType),"minHeight"in o&&t(2,a=o.minHeight)},[n,i,a]}class WL extends Cr{constructor(e){super(),xr(this,e,S0e,_0e,Dr,{error:0,chartType:1,minHeight:2})}}const nYe=Symbol(),e$=Symbol();function A0e(r){let e,t,n="error",i,a,o;return{c(){e=ie("span"),t=ie("span"),t.textContent=n,i=Ie(),a=ie("span"),o=ht(r[0]),this.h()},l(s){e=ae(s,"SPAN",{class:!0});var l=ge(e);t=ae(l,"SPAN",{class:!0,"data-svelte-h":!0}),Et(t)!=="svelte-1927df"&&(t.textContent=n),i=Le(l),a=ae(l,"SPAN",{class:!0});var u=ge(a);o=dt(u,r[0]),u.forEach(V),l.forEach(V),this.h()},h(){Y(t,"class","inline font-sans font-medium text-xs text-red-600"),Y(a,"class","hidden text-white font-sans group-hover:inline absolute -top-1 left-[105%] text-sm z-10 px-2 py-1 bg-gray-800/80 leading-relaxed min-w-[150px] max-w-[400px] rounded-md"),Y(e,"class","group inline-flex items-center relative cursor-help cursor-helpfont-sans px-1 border border-red-200 py-[1px] bg-red-50 rounded")},m(s,l){se(s,e,l),Q(e,t),Q(e,i),Q(e,a),Q(a,o)},p(s,[l]){l&1&&Bt(o,s[0])},i:Oe,o:Oe,d(s){s&&V(e)}}}function C0e(r,e,t){let{error:n=void 0}=e;return r.$$set=i=>{"error"in i&&t(0,n=i.error)},[n]}class $L extends Cr{constructor(e){super(),xr(this,e,C0e,A0e,Dr,{error:0})}}function x0e(r){let e,t,n="Big Value",i,a,o,s,l,u;return{c(){e=ie("div"),t=ie("div"),t.textContent=n,i=Ie(),a=ie("div"),o=ie("div"),s=ht(`error + `),l=ie("span"),u=ht(r[0]),this.h()},l(c){e=ae(c,"DIV",{width:!0,class:!0});var f=ge(e);t=ae(f,"DIV",{class:!0,"data-svelte-h":!0}),Et(t)!=="svelte-f1i116"&&(t.textContent=n),i=Le(f),a=ae(f,"DIV",{class:!0});var h=ge(a);o=ae(h,"DIV",{class:!0});var d=ge(o);s=dt(d,`error + `),l=ae(d,"SPAN",{class:!0});var p=ge(l);u=dt(p,r[0]),p.forEach(V),d.forEach(V),h.forEach(V),f.forEach(V),this.h()},h(){Y(t,"class","font-bold text-center text-sm"),Y(l,"class","hidden text-white font-sans group-hover:inline-block absolute top-[50%] left-[50%] text-sm z-10 px-2 py-1 bg-gray-800/80 leading-relaxed min-w-[150px] max-w-[400px] rounded-md z-50 overflow-visible"),Y(o,"class","text-center [word-wrap:break-work] w-full font-medium text-xs text-red-600"),Y(a,"class","m-auto w-[100px]"),Y(e,"width","100%"),Y(e,"class","inline-block group w-[100px] relative cursor-help cursor-helpfont-sans box-content grid-cols-1 justify-center bg-red-50 text-grey-700 font-ui font-normal rounded border border-red-200 h-[38px] mt-0.5 py-3 px-3 print:break-inside-avoid")},m(c,f){se(c,e,f),Q(e,t),Q(e,i),Q(e,a),Q(a,o),Q(o,s),Q(o,l),Q(l,u)},p(c,[f]){f&1&&Bt(u,c[0])},i:Oe,o:Oe,d(c){c&&V(e)}}}function D0e(r,e,t){let{error:n}=e;return r.$$set=i=>{"error"in i&&t(0,n=i.error)},[n]}class E0e extends Cr{constructor(e){super(),xr(this,e,D0e,x0e,Dr,{error:0})}}function T0e(r){let e,t;return e=new WL({props:{chartType:r[3],error:r[4]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&8&&(a.chartType=n[3]),i&16&&(a.error=n[4]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function k0e(r){let e,t;return e=new E0e({props:{error:r[4]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&16&&(a.error=n[4]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function M0e(r){let e,t;return e=new $L({props:{error:r[4]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&16&&(a.error=n[4]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function I0e(r){let e;function t(a,o){return a[3]==="Value"?B0e:a[3]==="Big Value"?F0e:L0e}let n=t(r),i=n(r);return{c(){i.c(),e=Xe()},l(a){i.l(a),e=Xe()},m(a,o){i.m(a,o),se(a,e,o)},p(a,o){n===(n=t(a))&&i?i.p(a,o):(i.d(1),i=n(a),i&&(i.c(),i.m(e.parentNode,e)))},i:Oe,o:Oe,d(a){a&&V(e),i.d(a)}}}function L0e(r){let e,t;return{c(){e=ie("p"),t=ht(r[2]),this.h()},l(n){e=ae(n,"P",{class:!0});var i=ge(e);t=dt(i,r[2]),i.forEach(V),this.h()},h(){Y(e,"class","text-xs text-gray-500 p-2 my-2 w-full border border-dashed rounded")},m(n,i){se(n,e,i),Q(e,t)},p(n,i){i&4&&Bt(t,n[2])},d(n){n&&V(e)}}}function F0e(r){let e,t;return{c(){e=ie("p"),t=ht(r[2]),this.h()},l(n){e=ae(n,"P",{class:!0});var i=ge(e);t=dt(i,r[2]),i.forEach(V),this.h()},h(){Y(e,"class","text-xs text-gray-500 p-2 pt-[32px] my-0 text-center w-full align-middle h-[80px] border border-dashed rounded min-w-[120px]")},m(n,i){se(n,e,i),Q(e,t)},p(n,i){i&4&&Bt(t,n[2])},d(n){n&&V(e)}}}function B0e(r){let e,t;return{c(){e=ie("span"),t=ht(r[2]),this.h()},l(n){e=ae(n,"SPAN",{class:!0});var i=ge(e);t=dt(i,r[2]),i.forEach(V),this.h()},h(){Y(e,"class","text-xs text-gray-500 p-2 my-2 w-full border border-dashed rounded")},m(n,i){se(n,e,i),Q(e,t)},p(n,i){i&4&&Bt(t,n[2])},d(n){n&&V(e)}}}function O0e(r){let e,t,n,i,a;const o=[I0e,M0e,k0e,T0e],s=[];function l(u,c){return c&3&&(e=null),e==null&&(e=!!(["warn","pass"].includes(u[1])||!u[0])),e?0:u[3]==="Value"?1:u[3]==="Big Value"?2:3}return t=l(r,-1),n=s[t]=o[t](r),{c(){n.c(),i=Xe()},l(u){n.l(u),i=Xe()},m(u,c){s[t].m(u,c),se(u,i,c),a=!0},p(u,[c]){let f=t;t=l(u,c),t===f?s[t].p(u,c):(Tt(),ee(s[f],1,1,()=>{s[f]=null}),kt(),n=s[t],n?n.p(u,c):(n=s[t]=o[t](u),n.c()),X(n,1),n.m(i.parentNode,i))},i(u){a||(X(n),a=!0)},o(u){ee(n),a=!1},d(u){u&&V(i),s[t].d(u)}}}function P0e(r,e,t){let{isInitial:n=!0}=e,{emptySet:i="error"}=e,{emptyMessage:a="No Records"}=e,{chartType:o="Component"}=e,s="Dataset is empty - query ran successfully, but no data was returned from the database";return o==="Big Value"&&(s="Dataset is empty"),i==="error"&&n?console.error("\x1B[31m%s\x1B[0m",`Error in ${o}: ${s}`):i==="warn"&&n&&console.warn(`Warning in ${o}: Dataset is empty - query ran successfully, but no data was returned from the database`),r.$$set=l=>{"isInitial"in l&&t(0,n=l.isInitial),"emptySet"in l&&t(1,i=l.emptySet),"emptyMessage"in l&&t(2,a=l.emptyMessage),"chartType"in l&&t(3,o=l.chartType)},[n,i,a,o,s]}class t$ extends Cr{constructor(e){super(),xr(this,e,P0e,O0e,Dr,{isInitial:0,emptySet:1,emptyMessage:2,chartType:3})}}function HO(r,e,t){const n=r.slice();n[4]=e[t];const i=n[4].data_type??n[4].column_type;return n[5]=i,n}function WO(r,e){let t,n,i,a,o=e[5]+"",s,l,u,c=e[4].column_name+"",f,h,d,p;return i=new po({props:{src:e[3](e[5]),class:"text-gray-700 w-5 h-5"}}),{key:r,first:null,c(){t=ie("li"),n=ie("div"),Ve(i.$$.fragment),a=Ie(),s=ht(o),l=Ie(),u=ie("b"),f=ht(c),h=Ie(),this.h()},l(g){t=ae(g,"LI",{class:!0});var v=ge(t);n=ae(v,"DIV",{class:!0});var m=ge(n);Ge(i.$$.fragment,m),a=Le(m),s=dt(m,o),l=Le(m),u=ae(m,"B",{class:!0});var y=ge(u);f=dt(y,c),y.forEach(V),m.forEach(V),h=Le(v),v.forEach(V),this.h()},h(){Y(u,"class","lowercase truncate"),Y(n,"class","grid grid-cols-[auto,auto,1fr] gap-2 px-2 py-1 w-full lowercase truncate"),Y(t,"class",d=Jw("font-mono text-sm rounded flex flex-row hover:bg-blue-50 max-w-full",e[1])),this.first=t},m(g,v){se(g,t,v),Q(t,n),Ue(i,n,null),Q(n,a),Q(n,s),Q(n,l),Q(n,u),Q(u,f),Q(t,h),p=!0},p(g,v){e=g;const m={};v&1&&(m.src=e[3](e[5])),i.$set(m),(!p||v&1)&&o!==(o=e[5]+"")&&Bt(s,o),(!p||v&1)&&c!==(c=e[4].column_name+"")&&Bt(f,c),(!p||v&2&&d!==(d=Jw("font-mono text-sm rounded flex flex-row hover:bg-blue-50 max-w-full",e[1])))&&Y(t,"class",d)},i(g){p||(X(i.$$.fragment,g),p=!0)},o(g){ee(i.$$.fragment,g),p=!1},d(g){g&&V(t),He(i)}}}function R0e(r){let e,t=[],n=new Map,i,a,o=Er(r[0]);const s=l=>l[4].column_name;for(let l=0;l{switch(s.toUpperCase()){case"INT":case"INTEGER":case"BIGINT":case"SMALLINT":case"TINYINT":case"DOUBLE":return Dse;case"DATE":case"DATETIME":case"TIMESTAMP":return Tse;case"BOOLEAN":return Fse;default:return Ese}};return r.$$set=s=>{"columns"in s&&t(0,n=s.columns),"rowClass"in s&&t(1,i=s.rowClass),"class"in s&&t(2,a=s.class)},[n,i,a,o]}class z0e extends Cr{constructor(e){super(),xr(this,e,N0e,R0e,Dr,{columns:0,rowClass:1,class:2})}}function $O(r,e,t=!0){const n=GL(r,VO(t?{count:GO(e),countDistinct:UO(e),min:s0e(e),max:l0e(e),median:c0e(e),mean:u0e(e),sum:a0e(e)}:{count:GO(e),countDistinct:UO(e)}))[0],{maxDecimals:i,unitType:a}=V0e(r.map(o=>o[e]));return{min:n.min,max:n.max,median:n.median,mean:n.mean,count:n.count,countDistinct:n.countDistinct,sum:n.sum,maxDecimals:i,unitType:a}}function V0e(r){var e;if(r==null||r.length===0)return{maxDecimals:0,unitType:"unknown"};{let t=0;for(const n of r){const i=(e=n==null?void 0:n.toString().split(".")[1])==null?void 0:e.length;i>t&&(t=i)}return{maxDecimals:t,unitType:"number"}}}function jL(r,e="object"){const t={},n=h0e(r);for(const i of Object.keys(r[0])){const a=n.find(u=>{var c;return((c=u.name)==null?void 0:c.toLowerCase())===(i==null?void 0:i.toLowerCase())})??{name:i,evidenceType:kc.NUMBER,typeFidelity:G0.INFERRED},o=a.evidenceType;let s=a.evidenceType==="number"?$O(r,i,!0):$O(r,i,!1);a.evidenceType!=="number"&&(s.maxDecimals=0,s.unitType=a.evidenceType);const l=d0e(i,a,s);t[i]={title:y0e(i,l),type:o,evidenceColumnType:a,format:l,columnUnitSummary:s}}return e!=="object"?Object.entries(t).map(([i,a])=>({id:i,...a})):t}const r$=1024;let G0e=0,QC=class{constructor(e,t){this.from=e,this.to=t}};class Pr{constructor(e={}){this.id=G0e++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=eo.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}Pr.closedBy=new Pr({deserialize:r=>r.split(" ")});Pr.openedBy=new Pr({deserialize:r=>r.split(" ")});Pr.group=new Pr({deserialize:r=>r.split(" ")});Pr.isolate=new Pr({deserialize:r=>{if(r&&r!="rtl"&&r!="ltr"&&r!="auto")throw new RangeError("Invalid value for isolate: "+r);return r||"auto"}});Pr.contextHash=new Pr({perNode:!0});Pr.lookAhead=new Pr({perNode:!0});Pr.mounted=new Pr({perNode:!0});class pS{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[Pr.mounted.id]}}const U0e=Object.create(null);class eo{constructor(e,t,n,i=0){this.name=e,this.props=t,this.id=n,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):U0e,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new eo(e.name||"",t,e.id,n);if(e.props){for(let a of e.props)if(Array.isArray(a)||(a=a(i)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[a[0].id]=a[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(Pr.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let i of n.split(" "))t[i]=e[n];return n=>{for(let i=n.prop(Pr.group),a=-1;a<(i?i.length:0);a++){let o=t[a<0?n.name:i[a]];if(o)return o}}}}eo.none=new eo("",Object.create(null),0,8);class qL{constructor(e){this.types=e;for(let t=0;t0;for(let l=this.cursor(o|Di.IncludeAnonymous);;){let u=!1;if(l.from<=a&&l.to>=i&&(!s&&l.type.isAnonymous||t(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&n&&(s||!l.type.isAnonymous)&&n(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:XL(eo.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,i)=>new KT(this.type,t,n,i,this.propValues),e.makeTree||((t,n,i)=>new KT(eo.none,t,n,i)))}static build(e){return j0e(e)}};Vi.empty=new Vi(eo.none,[],[],0);class YL{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new YL(this.buffer,this.index)}}class of{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return eo.none}toString(){let e=[];for(let t=0;t0));l=o[l+3]);return s}slice(e,t,n){let i=this.buffer,a=new Uint16Array(t-e),o=0;for(let s=e,l=0;s=e&&te;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function H0(r,e,t,n){for(var i;r.from==r.to||(t<1?r.from>=e:r.from>e)||(t>-1?r.to<=e:r.to0?s.length:-1;e!=u;e+=t){let c=s[e],f=l[e]+o.from;if(n$(i,n,f,f+c.length)){if(c instanceof of){if(a&Di.ExcludeBuffers)continue;let h=c.findChild(0,c.buffer.length,t,n-f,i);if(h>-1)return new Mc(new H0e(o,c,e,f),null,h)}else if(a&Di.IncludeAnonymous||!c.type.isAnonymous||ZL(c)){let h;if(!(a&Di.IgnoreMounts)&&(h=pS.get(c))&&!h.overlay)return new N_(h.tree,f,e,o);let d=new N_(c,f,e,o);return a&Di.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,n,i)}}}if(a&Di.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let i;if(!(n&Di.IgnoreOverlays)&&(i=pS.get(this._tree))&&i.overlay){let a=e-this.from;for(let{from:o,to:s}of i.overlay)if((t>0?o<=a:o=a:s>a))return new N_(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function qO(r,e,t,n){let i=r.cursor(),a=[];if(!i.firstChild())return a;if(t!=null){for(let o=!1;!o;)if(o=i.type.is(t),!i.nextSibling())return a}for(;;){if(n!=null&&i.type.is(n))return a;if(i.type.is(e)&&a.push(i.node),!i.nextSibling())return n==null?a:[]}}function QT(r,e,t=e.length-1){for(let n=r;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class H0e{constructor(e,t,n,i){this.parent=e,this.buffer=t,this.index=n,this.start=i}}class Mc extends i${get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,n);return a<0?null:new Mc(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&Di.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return a<0?null:new Mc(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Mc(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Mc(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,i=this.index+4,a=n.buffer[this.index+3];if(a>i){let o=n.buffer[this.index+1];e.push(n.slice(i,a,o)),t.push(0)}return new Vi(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function a$(r){if(!r.length)return null;let e=0,t=r[0];for(let a=1;at.from||o.to=e){let s=new sf(o.tree,o.overlay[0].from+a.from,-1,a);(i||(i=[n])).push(H0(s,e,t,!1))}}return i?a$(i):n}class JT{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof sf)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return e?e instanceof sf?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:i}=this.buffer,a=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,n);return a<0?!1:(this.stack.push(this.index),this.yieldBuf(a))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&Di.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Di.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Di.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let i=n<0?0:this.stack[n]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let a=t+e,o=e<0?-1:n._tree.children.length;a!=o;a+=e){let s=n._tree.children[a];if(this.mode&Di.IncludeAnonymous||s instanceof of||!s.type.isAnonymous||ZL(s))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,n=a+1;break e}i=this.stack[--a]}for(let i=n;i=0;a--){if(a<0)return QT(this._tree,e,i);let o=n[t.buffer[this.stack[a]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function ZL(r){return r.children.some(e=>e instanceof of||!e.type.isAnonymous||ZL(e))}function j0e(r){var e;let{buffer:t,nodeSet:n,maxBufferLength:i=r$,reused:a=[],minRepeatType:o=n.types.length}=r,s=Array.isArray(t)?new YL(t,t.length):t,l=n.types,u=0,c=0;function f(w,S,A,C,x,D){let{id:E,start:T,end:k,size:M}=s,L=c,F=u;for(;M<0;)if(s.next(),M==-1){let P=a[E];A.push(P),C.push(T-w);return}else if(M==-3){u=E;return}else if(M==-4){c=E;return}else throw new RangeError(`Unrecognized record size: ${M}`);let U=l[E],N,$,H=T-w;if(k-T<=i&&($=v(s.pos-S,x))){let P=new Uint16Array($.size-$.skip),te=s.pos-$.size,J=P.length;for(;s.pos>te;)J=m($.start,P,J);N=new of(P,k-$.start,n),H=$.start-w}else{let P=s.pos-M;s.next();let te=[],J=[],fe=E>=o?E:-1,Ce=0,ke=k;for(;s.pos>P;)fe>=0&&s.id==fe&&s.size>=0?(s.end<=ke-i&&(p(te,J,T,Ce,s.end,ke,fe,L,F),Ce=te.length,ke=s.end),s.next()):D>2500?h(T,P,te,J):f(T,P,te,J,fe,D+1);if(fe>=0&&Ce>0&&Ce-1&&Ce>0){let Se=d(U,F);N=XL(U,te,J,0,te.length,0,k-T,Se,Se)}else N=g(U,te,J,k-T,L-k,F)}A.push(N),C.push(H)}function h(w,S,A,C){let x=[],D=0,E=-1;for(;s.pos>S;){let{id:T,start:k,end:M,size:L}=s;if(L>4)s.next();else{if(E>-1&&k=0;M-=3)T[L++]=x[M],T[L++]=x[M+1]-k,T[L++]=x[M+2]-k,T[L++]=L;A.push(new of(T,x[2]-k,n)),C.push(k-w)}}function d(w,S){return(A,C,x)=>{let D=0,E=A.length-1,T,k;if(E>=0&&(T=A[E])instanceof Vi){if(!E&&T.type==w&&T.length==x)return T;(k=T.prop(Pr.lookAhead))&&(D=C[E]+T.length+k)}return g(w,A,C,x,D,S)}}function p(w,S,A,C,x,D,E,T,k){let M=[],L=[];for(;w.length>C;)M.push(w.pop()),L.push(S.pop()+A-x);w.push(g(n.types[E],M,L,D-x,T-D,k)),S.push(x-A)}function g(w,S,A,C,x,D,E){if(D){let T=[Pr.contextHash,D];E=E?[T].concat(E):[T]}if(x>25){let T=[Pr.lookAhead,x];E=E?[T].concat(E):[T]}return new Vi(w,S,A,C,E)}function v(w,S){let A=s.fork(),C=0,x=0,D=0,E=A.end-i,T={size:0,start:0,skip:0};e:for(let k=A.pos-w;A.pos>k;){let M=A.size;if(A.id==S&&M>=0){T.size=C,T.start=x,T.skip=D,D+=4,C+=4,A.next();continue}let L=A.pos-M;if(M<0||L=o?4:0,U=A.start;for(A.next();A.pos>L;){if(A.size<0)if(A.size==-3)F+=4;else break e;else A.id>=o&&(F+=4);A.next()}x=U,C+=M,D+=F}return(S<0||C==w)&&(T.size=C,T.start=x,T.skip=D),T.size>4?T:void 0}function m(w,S,A){let{id:C,start:x,end:D,size:E}=s;if(s.next(),E>=0&&C4){let k=s.pos-(E-4);for(;s.pos>k;)A=m(w,S,A)}S[--A]=T,S[--A]=D-w,S[--A]=x-w,S[--A]=C}else E==-3?u=C:E==-4&&(c=C);return A}let y=[],b=[];for(;s.pos>0;)f(r.start||0,r.bufferStart||0,y,b,-1,0);let _=(e=r.length)!==null&&e!==void 0?e:y.length?b[0]+y[0].length:0;return new Vi(l[r.topID],y.reverse(),b.reverse(),_)}const YO=new WeakMap;function z_(r,e){if(!r.isAnonymous||e instanceof of||e.type!=r)return 1;let t=YO.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=r||!(n instanceof Vi)){t=1;break}t+=z_(r,n)}YO.set(e,t)}return t}function XL(r,e,t,n,i,a,o,s,l){let u=0;for(let p=n;p=c)break;S+=A}if(b==_+1){if(S>c){let A=p[_];d(A.children,A.positions,0,A.children.length,g[_]+y);continue}f.push(p[_])}else{let A=g[b-1]+p[b-1].length-w;f.push(XL(r,p,g,_,b,w,A,null,l))}h.push(w+y-a)}}return d(e,t,n,i,0),(s||l)(f,h,o)}class $h{constructor(e,t,n,i,a=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=i,this.open=(a?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let i=[new $h(0,e.length,e,0,!1,n)];for(let a of t)a.to>e.length&&i.push(a);return i}static applyChanges(e,t,n=128){if(!t.length)return e;let i=[],a=1,o=e.length?e[0]:null;for(let s=0,l=0,u=0;;s++){let c=s=n)for(;o&&o.from=h.from||f<=h.to||u){let d=Math.max(h.from,l)-u,p=Math.min(h.to,f)-u;h=d>=p?null:new $h(d,p,h.tree,h.offset+u,s>0,!!c)}if(h&&i.push(h),o.to>f)break;o=anew QC(i.from,i.to)):[new QC(0,0)]:[new QC(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let i=this.startParse(e,t,n);for(;;){let a=i.advance();if(a)return a}}};class q0e{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new Pr({perNode:!0});class Kr{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,n){[e,t]=Cg(this,e,t);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),gl.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Cg(this,e,t);let n=[];return this.decompose(e,t,n,0),gl.from(n,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),n=this.length-this.scanIdentical(e,-1),i=new jm(this),a=new jm(e);for(let o=t,s=t;;){if(i.next(o),a.next(o),o=0,i.lineBreak!=a.lineBreak||i.done!=a.done||i.value!=a.value)return!1;if(s+=i.value.length,i.done||s>=n)return!0}}iter(e=1){return new jm(this,e)}iterRange(e,t=this.length){return new s$(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new l$(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Kr.empty:e.length<=32?new Kn(e):gl.from(Kn.split(e,[]))}}class Kn extends Kr{constructor(e,t=Y0e(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let a=0;;a++){let o=this.text[a],s=i+o.length;if((t?n:s)>=e)return new Z0e(i,s,n,o);i=s+1,n++}}decompose(e,t,n,i){let a=e<=0&&t>=this.length?this:new Kn(ZO(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let o=n.pop(),s=V_(a.text,o.text.slice(),0,a.length);if(s.length<=32)n.push(new Kn(s,o.length+a.length));else{let l=s.length>>1;n.push(new Kn(s.slice(0,l)),new Kn(s.slice(l)))}}else n.push(a)}replace(e,t,n){if(!(n instanceof Kn))return super.replace(e,t,n);[e,t]=Cg(this,e,t);let i=V_(this.text,V_(n.text,ZO(this.text,0,e)),t),a=this.length+n.length-(t-e);return i.length<=32?new Kn(i,a):gl.from(Kn.split(i,[]),a)}sliceString(e,t=this.length,n=` +`){[e,t]=Cg(this,e,t);let i="";for(let a=0,o=0;a<=t&&oe&&o&&(i+=n),ea&&(i+=s.slice(Math.max(0,e-a),t-a)),a=l+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let a of e)n.push(a),i+=a.length+1,n.length==32&&(t.push(new Kn(n,i)),n=[],i=-1);return i>-1&&t.push(new Kn(n,i)),t}}class gl extends Kr{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,i){for(let a=0;;a++){let o=this.children[a],s=i+o.length,l=n+o.lines-1;if((t?l:s)>=e)return o.lineInner(e,t,n,i);i=s+1,n=l+1}}decompose(e,t,n,i){for(let a=0,o=0;o<=t&&a=o){let u=i&((o<=e?1:0)|(l>=t?2:0));o>=e&&l<=t&&!u?n.push(s):s.decompose(e-o,t-o,n,u)}o=l+1}}replace(e,t,n){if([e,t]=Cg(this,e,t),n.lines=a&&t<=s){let l=o.replace(e-a,t-a,n),u=this.lines-o.lines+l.lines;if(l.lines>4&&l.lines>u>>6){let c=this.children.slice();return c[i]=l,new gl(c,this.length-(t-e)+n.length)}return super.replace(a,s,l)}a=s+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=` +`){[e,t]=Cg(this,e,t);let i="";for(let a=0,o=0;ae&&a&&(i+=n),eo&&(i+=s.sliceString(e-o,t-o,n)),o=l+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof gl))return 0;let n=0,[i,a,o,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,a+=t){if(i==o||a==s)return n;let l=this.children[i],u=e.children[a];if(l!=u)return n+l.scanIdentical(u,t);n+=l.length+1}}static from(e,t=e.reduce((n,i)=>n+i.length+1,-1)){let n=0;for(let d of e)n+=d.lines;if(n<32){let d=[];for(let p of e)p.flatten(d);return new Kn(d,t)}let i=Math.max(32,n>>5),a=i<<1,o=i>>1,s=[],l=0,u=-1,c=[];function f(d){let p;if(d.lines>a&&d instanceof gl)for(let g of d.children)f(g);else d.lines>o&&(l>o||!l)?(h(),s.push(d)):d instanceof Kn&&l&&(p=c[c.length-1])instanceof Kn&&d.lines+p.lines<=32?(l+=d.lines,u+=d.length+1,c[c.length-1]=new Kn(p.text.concat(d.text),p.length+1+d.length)):(l+d.lines>i&&h(),l+=d.lines,u+=d.length+1,c.push(d))}function h(){l!=0&&(s.push(c.length==1?c[0]:gl.from(c,u)),u=-1,l=c.length=0)}for(let d of e)f(d);return h(),s.length==1?s[0]:new gl(s,t)}}Kr.empty=new Kn([""],0);function Y0e(r){let e=-1;for(let t of r)e+=t.length+1;return e}function V_(r,e,t=0,n=1e9){for(let i=0,a=0,o=!0;a=t&&(l>n&&(s=s.slice(0,n-i)),i0?1:(e instanceof Kn?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],a=this.offsets[n],o=a>>1,s=i instanceof Kn?i.text.length:i.children.length;if(o==(t>0?s:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((a&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof Kn){let l=i.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,l.length>Math.max(0,e))return this.value=e==0?l:t>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[o+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof Kn?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class s${constructor(e,t,n){this.value="",this.done=!1,this.cursor=new jm(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}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 n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),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 l${constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Kr.prototype[Symbol.iterator]=function(){return this.iter()},jm.prototype[Symbol.iterator]=s$.prototype[Symbol.iterator]=l$.prototype[Symbol.iterator]=function(){return this});let Z0e=class{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}};function Cg(r,e,t){return e=Math.max(0,Math.min(r.length,e)),[e,Math.max(e,Math.min(r.length,t))]}let Up="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(r=>r?parseInt(r,36):1);for(let r=1;rr)return Up[e-1]<=r;return!1}function XO(r){return r>=127462&&r<=127487}const KO=8205;function Gi(r,e,t=!0,n=!0){return(t?u$:K0e)(r,e,n)}function u$(r,e,t){if(e==r.length)return e;e&&c$(r.charCodeAt(e))&&f$(r.charCodeAt(e-1))&&e--;let n=ea(r,e);for(e+=qo(n);e=0&&XO(ea(r,o));)a++,o-=2;if(a%2==0)break;e+=2}else break}return e}function K0e(r,e,t){for(;e>0;){let n=u$(r,e-2,t);if(n=56320&&r<57344}function f$(r){return r>=55296&&r<56320}function ea(r,e){let t=r.charCodeAt(e);if(!f$(t)||e+1==r.length)return t;let n=r.charCodeAt(e+1);return c$(n)?(t-55296<<10)+(n-56320)+65536:t}function KL(r){return r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode((r>>10)+55296,(r&1023)+56320))}function qo(r){return r<65536?1:2}const ek=/\r\n?|\n/;var Sa=function(r){return r[r.Simple=0]="Simple",r[r.TrackDel=1]="TrackDel",r[r.TrackBefore=2]="TrackBefore",r[r.TrackAfter=3]="TrackAfter",r}(Sa||(Sa={}));class kl{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return a+(e-i);a+=s}else{if(n!=Sa.Simple&&u>=e&&(n==Sa.TrackDel&&ie||n==Sa.TrackBefore&&ie))return null;if(u>e||u==e&&t<0&&!s)return e==i||t<0?a:a+l;a+=l}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return a}touchesRange(e,t=e){for(let n=0,i=0;n=0&&i<=t&&s>=e)return it?"cover":!0;i=s}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}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 kl(e)}static create(e){return new kl(e)}}class hi extends kl{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 tk(this,(t,n,i,a,o)=>e=e.replace(i,i+(n-t),o),!1),e}mapDesc(e,t=!1){return rk(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,a=0;i=0){t[i]=s,t[i+1]=o;let l=i>>1;for(;n.length0&&Ic(n,t,a.text),a.forward(c),s+=c}let u=e[o++];for(;s>1].toJSON()))}return e}static of(e,t,n){let i=[],a=[],o=0,s=null;function l(c=!1){if(!c&&!i.length)return;oh||f<0||h>t)throw new RangeError(`Invalid change range ${f} to ${h} (in doc of length ${t})`);let p=d?typeof d=="string"?Kr.of(d.split(n||ek)):d:Kr.empty,g=p.length;if(f==h&&g==0)return;fo&&Ji(i,f-o,-1),Ji(i,h-f,g),Ic(a,i,p),o=h}}return u(e),l(!s),s}static empty(e){return new hi(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;is&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(a.length==1)t.push(a[0],0);else{for(;n.length=0&&t<=0&&t==r[i+1]?r[i]+=e:e==0&&r[i]==0?r[i+1]+=t:n?(r[i]+=e,r[i+1]+=t):r.push(e,t)}function Ic(r,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n>1])),!(t||o==r.sections.length||r.sections[o+1]<0);)s=r.sections[o++],l=r.sections[o++];e(i,u,a,c,f),i=u,a=c}}}function rk(r,e,t,n=!1){let i=[],a=n?[]:null,o=new W0(r),s=new W0(e);for(let l=-1;;)if(o.ins==-1&&s.ins==-1){let u=Math.min(o.len,s.len);Ji(i,u,-1),o.forward(u),s.forward(u)}else if(s.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(s.len=0&&l=0){let u=0,c=o.len;for(;c;)if(s.ins==-1){let f=Math.min(c,s.len);u+=f,c-=f,s.forward(f)}else if(s.ins==0&&s.lenl||o.ins>=0&&o.len>l)&&(s||n.length>u),a.forward2(l),o.forward(l)}}}}class W0{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Kr.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Kr.empty:t[n].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 Th{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new Th(n,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return ze.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return ze.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}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 ze.range(e.anchor,e.head)}static create(e,t,n){return new Th(e,t,n)}}class ze{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:ze.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.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 ze(e.ranges.map(t=>Th.fromJSON(t)),e.main)}static single(e,t=e){return new ze([ze.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 n=0,i=0;ie?8:0)|a)}static normalized(e,t=0){let n=e[t];e.sort((i,a)=>i.from-a.from),t=e.indexOf(n);for(let i=1;ia.head?ze.range(l,s):ze.range(s,l))}}return new ze(e,t)}}function d$(r,e){for(let t of r.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let QL=0;class Dt{constructor(e,t,n,i,a){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=i,this.id=QL++,this.default=e([]),this.extensions=typeof a=="function"?a(this):a}get reader(){return this}static define(e={}){return new Dt(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:JL),!!e.static,e.enables)}of(e){return new G_([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new G_(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new G_(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function JL(r,e){return r==e||r.length==e.length&&r.every((t,n)=>t===e[n])}class G_{constructor(e,t,n,i){this.dependencies=e,this.facet=t,this.type=n,this.value=i,this.id=QL++}dynamicSlot(e){var t;let n=this.value,i=this.facet.compareInput,a=this.id,o=e[a]>>1,s=this.type==2,l=!1,u=!1,c=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?u=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=n(f),1},update(f,h){if(l&&h.docChanged||u&&(h.docChanged||h.selection)||nk(f,c)){let d=n(f);if(s?!QO(d,f.values[o],i):!i(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,h)=>{let d,p=h.config.address[a];if(p!=null){let g=vS(h,p);if(this.dependencies.every(v=>v instanceof Dt?h.facet(v)===f.facet(v):v instanceof ji?h.field(v,!1)==f.field(v,!1):!0)||(s?QO(d=n(f),g,i):i(d=n(f),g)))return f.values[o]=g,0}else d=n(f);return f.values[o]=d,1}}}}function QO(r,e,t){if(r.length!=e.length)return!1;for(let n=0;nr[l.id]),i=t.map(l=>l.type),a=n.filter(l=>!(l&1)),o=r[e.id]>>1;function s(l){let u=[];for(let c=0;cn===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(JO).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,i)=>{let a=n.values[t],o=this.updateF(a,i);return this.compareF(a,o)?0:(n.values[t]=o,1)},reconfigure:(n,i)=>i.config.address[this.id]!=null?(n.values[t]=i.field(this),0):(n.values[t]=this.create(n),1)}}init(e){return[this,JO.of({field:this,create:e})]}get extension(){return this}}const vh={lowest:4,low:3,default:2,high:1,highest:0};function Pv(r){return e=>new p$(e,r)}const Ed={highest:Pv(vh.highest),high:Pv(vh.high),default:Pv(vh.default),low:Pv(vh.low),lowest:Pv(vh.lowest)};class p${constructor(e,t){this.inner=e,this.prec=t}}class pA{of(e){return new ik(this,e)}reconfigure(e){return pA.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ik{constructor(e,t){this.compartment=e,this.inner=t}}class gS{constructor(e,t,n,i,a,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=i,this.staticValues=a,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let i=[],a=Object.create(null),o=new Map;for(let h of J0e(e,t,o))h instanceof ji?i.push(h):(a[h.facet.id]||(a[h.facet.id]=[])).push(h);let s=Object.create(null),l=[],u=[];for(let h of i)s[h.id]=u.length<<1,u.push(d=>h.slot(d));let c=n==null?void 0:n.config.facets;for(let h in a){let d=a[h],p=d[0].facet,g=c&&c[h]||[];if(d.every(v=>v.type==0))if(s[p.id]=l.length<<1|1,JL(g,d))l.push(n.facet(p));else{let v=p.combine(d.map(m=>m.value));l.push(n&&p.compare(v,n.facet(p))?n.facet(p):v)}else{for(let v of d)v.type==0?(s[v.id]=l.length<<1|1,l.push(v.value)):(s[v.id]=u.length<<1,u.push(m=>v.dynamicSlot(m)));s[p.id]=u.length<<1,u.push(v=>Q0e(v,p,d))}}let f=u.map(h=>h(s));return new gS(e,o,f,s,l,a)}}function J0e(r,e,t){let n=[[],[],[],[],[]],i=new Map;function a(o,s){let l=i.get(o);if(l!=null){if(l<=s)return;let u=n[l].indexOf(o);u>-1&&n[l].splice(u,1),o instanceof ik&&t.delete(o.compartment)}if(i.set(o,s),Array.isArray(o))for(let u of o)a(u,s);else if(o instanceof ik){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;t.set(o.compartment,u),a(u,s)}else if(o instanceof p$)a(o.inner,o.prec);else if(o instanceof ji)n[s].push(o),o.provides&&a(o.provides,s);else if(o instanceof G_)n[s].push(o),o.facet.extensions&&a(o.facet.extensions,vh.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(u,s)}}return a(r,vh.default),n.reduce((o,s)=>o.concat(s))}function qm(r,e){if(e&1)return 2;let t=e>>1,n=r.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;r.status[t]=4;let i=r.computeSlot(r,r.config.dynamicSlots[t]);return r.status[t]=2|i}function vS(r,e){return e&1?r.config.staticValues[e>>1]:r.values[e>>1]}const g$=Dt.define(),ak=Dt.define({combine:r=>r.some(e=>e),static:!0}),v$=Dt.define({combine:r=>r.length?r[0]:void 0,static:!0}),m$=Dt.define(),y$=Dt.define(),b$=Dt.define(),_$=Dt.define({combine:r=>r.length?r[0]:!1});class ju{constructor(e,t){this.type=e,this.value=t}static define(){return new eye}}class eye{of(e){return new ju(this,e)}}class tye{constructor(e){this.map=e}of(e){return new Sr(this,e)}}class Sr{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 Sr(this.type,t)}is(e){return this.type==e}static define(e={}){return new tye(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let i of e){let a=i.map(t);a&&n.push(a)}return n}}Sr.reconfigure=Sr.define();Sr.appendConfig=Sr.define();class gi{constructor(e,t,n,i,a,o){this.startState=e,this.changes=t,this.selection=n,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,n&&d$(n,t.newLength),a.some(s=>s.type==gi.time)||(this.annotations=a.concat(gi.time.of(Date.now())))}static create(e,t,n,i,a,o){return new gi(e,t,n,i,a,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(gi.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}gi.time=ju.define();gi.userEvent=ju.define();gi.addToHistory=ju.define();gi.remote=ju.define();function rye(r,e){let t=[];for(let n=0,i=0;;){let a,o;if(n=r[n]))a=r[n++],o=r[n++];else if(i=0;i--){let a=n[i](r);a instanceof gi?r=a:Array.isArray(a)&&a.length==1&&a[0]instanceof gi?r=a[0]:r=S$(e,Hp(a),!1)}return r}function iye(r){let e=r.startState,t=e.facet(b$),n=r;for(let i=t.length-1;i>=0;i--){let a=t[i](r);a&&Object.keys(a).length&&(n=w$(n,ok(e,a,r.changes.newLength),!0))}return n==r?r:gi.create(e,r.changes,r.selection,n.effects,n.annotations,n.scrollIntoView)}const aye=[];function Hp(r){return r==null?aye:Array.isArray(r)?r:[r]}var On=function(r){return r[r.Word=0]="Word",r[r.Space=1]="Space",r[r.Other=2]="Other",r}(On||(On={}));const oye=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let sk;try{sk=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function sye(r){if(sk)return sk.test(r);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||oye.test(t)))return!0}return!1}function lye(r){return e=>{if(!/\S/.test(e))return On.Space;if(sye(e))return On.Word;for(let t=0;t-1)return On.Word;return On.Other}}class en{constructor(e,t,n,i,a,o){this.config=e,this.doc=t,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=a,o&&(o._state=this);for(let s=0;si.set(u,l)),t=null),i.set(s.value.compartment,s.value.extension)):s.is(Sr.reconfigure)?(t=null,n=s.value):s.is(Sr.appendConfig)&&(t=null,n=Hp(n).concat(s.value));let a;t?a=e.startState.values.slice():(t=gS.resolve(n,i,this),a=new en(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let o=e.startState.facet(ak)?e.newSelection:e.newSelection.asSingle();new en(t,e.newDoc,o,a,(s,l)=>l.update(s,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:ze.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),i=this.changes(n.changes),a=[n.range],o=Hp(n.effects);for(let s=1;so.spec.fromJSON(s,l)))}}return en.create({doc:e.doc,selection:ze.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=gS.resolve(e.extensions||[],new Map),n=e.doc instanceof Kr?e.doc:Kr.of((e.doc||"").split(t.staticFacet(en.lineSeparator)||ek)),i=e.selection?e.selection instanceof ze?e.selection:ze.single(e.selection.anchor,e.selection.head):ze.single(0);return d$(i,n.length),t.staticFacet(ak)||(i=i.asSingle()),new en(t,n,i,t.dynamicSlots.map(()=>null),(a,o)=>o.create(a),null)}get tabSize(){return this.facet(en.tabSize)}get lineBreak(){return this.facet(en.lineSeparator)||` +`}get readOnly(){return this.facet(_$)}phrase(e,...t){for(let n of this.facet(en.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,i)=>{if(i=="$")return"$";let a=+(i||1);return!a||a>t.length?n:t[a-1]})),e}languageDataAt(e,t,n=-1){let i=[];for(let a of this.facet(g$))for(let o of a(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){return lye(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),a=this.charCategorizer(e),o=e-n,s=e-n;for(;o>0;){let l=Gi(t,o,!1);if(a(t.slice(l,o))!=On.Word)break;o=l}for(;sr.length?r[0]:4});en.lineSeparator=v$;en.readOnly=_$;en.phrases=Dt.define({compare(r,e){let t=Object.keys(r),n=Object.keys(e);return t.length==n.length&&t.every(i=>r[i]==e[i])}});en.languageData=g$;en.changeFilter=m$;en.transactionFilter=y$;en.transactionExtender=b$;pA.reconfigure=Sr.define();function Af(r,e,t={}){let n={};for(let i of r)for(let a of Object.keys(i)){let o=i[a],s=n[a];if(s===void 0)n[a]=o;else if(!(s===o||o===void 0))if(Object.hasOwnProperty.call(t,a))n[a]=t[a](s,o);else throw new Error("Config merge conflict for field "+a)}for(let i in e)n[i]===void 0&&(n[i]=e[i]);return n}class sd{eq(e){return this==e}range(e,t=e){return $0.create(e,t,this)}}sd.prototype.startSide=sd.prototype.endSide=0;sd.prototype.point=!1;sd.prototype.mapMode=Sa.TrackDel;class $0{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new $0(e,t,n)}}function lk(r,e){return r.from-e.from||r.value.startSide-e.value.startSide}class e3{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let a=n?this.to:this.from;for(let o=i,s=a.length;;){if(o==s)return o;let l=o+s>>1,u=a[l]-e||(n?this.value[l].endSide:this.value[l].startSide)-t;if(l==o)return u>=0?o:s;u>=0?s=l:o=l+1}}between(e,t,n,i){for(let a=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,a);ad||h==d&&u.startSide>0&&u.endSide<=0)continue;(d-h||u.endSide-u.startSide)<0||(o<0&&(o=h),u.point&&(s=Math.max(s,d-h)),n.push(u),i.push(h-o),a.push(d-o))}return{mapped:n.length?new e3(i,a,n,s):null,pos:o}}}class En{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new En(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:a=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(n&&(t=t.slice().sort(lk)),this.isEmpty)return t.length?En.of(t):this;let s=new A$(this,null,-1).goto(0),l=0,u=[],c=new xg;for(;s.value||l=0){let f=t[l++];c.addInner(f.from,f.to,f.value)||u.push(f)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||as.to||a=a&&e<=a+o.length&&o.between(a,e-a,t-a,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return j0.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return j0.from(e).goto(t)}static compare(e,t,n,i,a=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=a),s=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=a),l=eP(o,s,n),u=new Rv(o,l,a),c=new Rv(s,l,a);n.iterGaps((f,h,d)=>tP(u,f,c,h,d,i)),n.empty&&n.length==0&&tP(u,0,c,0,0,i)}static eq(e,t,n=0,i){i==null&&(i=999999999);let a=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(a.length!=o.length)return!1;if(!a.length)return!0;let s=eP(a,o),l=new Rv(a,s,0).goto(n),u=new Rv(o,s,0).goto(n);for(;;){if(l.to!=u.to||!uk(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>i)return!0;l.next(),u.next()}}static spans(e,t,n,i,a=-1){let o=new Rv(e,null,a).goto(t),s=t,l=o.openStart;for(;;){let u=Math.min(o.to,n);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroms&&(i.span(s,u,o.active,l),l=o.openEnd(u));if(o.to>n)return l+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(e,t=!1){let n=new xg;for(let i of e instanceof $0?[e]:t?uye(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return En.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=En.empty;i=i.nextLayer)t=new En(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}En.empty=new En([],[],null,-1);function uye(r){if(r.length>1)for(let e=r[0],t=1;t0)return r.slice().sort(lk);e=n}return r}En.empty.nextLayer=En.empty;class xg{finishChunk(e){this.chunks.push(new e3(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new xg)).add(e,t,n)}addInner(e,t,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(En.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=En.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function eP(r,e,t){let n=new Map;for(let a of r)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&i.push(new A$(o,t,n,a));return i.length==1?i[0]:new j0(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)JC(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)JC(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),JC(this.heap,0)}}}function JC(r,e){for(let t=r[e];;){let n=(e<<1)+1;if(n>=r.length)break;let i=r[n];if(n+1=0&&(i=r[n+1],n++),t.compare(i)<0)break;r[n]=t,r[e]=i,e=n}}class Rv{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=j0.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){j1(this.active,e),j1(this.activeTo,e),j1(this.activeRank,e),this.minActive=rP(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:i,rank:a}=this.cursor;for(;t0;)t++;q1(this.active,t,n),q1(this.activeTo,t,i),q1(this.activeRank,t,a),e&&q1(e,t,this.cursor.from),this.minActive=rP(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&j1(n,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let a=this.cursor.value;if(!a.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[i]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function tP(r,e,t,n,i,a){r.goto(e),t.goto(n);let o=n+i,s=n,l=n-e;for(;;){let u=r.to+l-t.to||r.endSide-t.endSide,c=u<0?r.to+l:t.to,f=Math.min(c,o);if(r.point||t.point?r.point&&t.point&&(r.point==t.point||r.point.eq(t.point))&&uk(r.activeForPoint(r.to),t.activeForPoint(t.to))||a.comparePoint(s,f,r.point,t.point):f>s&&!uk(r.active,t.active)&&a.compareRange(s,f,r.active,t.active),c>o)break;s=c,u<=0&&r.next(),u>=0&&t.next()}}function uk(r,e){if(r.length!=e.length)return!1;for(let t=0;t=e;n--)r[n+1]=r[n];r[e]=t}function rP(r,e){let t=-1,n=1e9;for(let i=0;i=e)return i;if(i==r.length)break;a+=r.charCodeAt(i)==9?t-a%t:1,i=Gi(r,i)}return n===!0?-1:r.length}const ck="ͼ",nP=typeof Symbol>"u"?"__"+ck:Symbol.for(ck),fk=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),iP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class lf{constructor(e,t){this.rules=[];let{finish:n}=t||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function a(o,s,l,u){let c=[],f=/^@(\w+)\b/.exec(o[0]),h=f&&f[1]=="keyframes";if(f&&s==null)return l.push(o[0]+";");for(let d in s){let p=s[d];if(/&/.test(d))a(d.split(/,\s*/).map(g=>o.map(v=>g.replace(/&/,v))).reduce((g,v)=>g.concat(v)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");a(i(d),p,c,h)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||h)&&l.push((n&&!f&&!u?o.map(n):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)a(i(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=iP[nP]||1;return iP[nP]=e+1,ck+e.toString(36)}static mount(e,t,n){let i=e[fk],a=n&&n.nonce;i?a&&i.setNonce(a):i=new fye(e,a),i.mount(Array.isArray(t)?t:[t],e)}}let aP=new Map;class fye{constructor(e,t){let n=e.ownerDocument||e,i=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let a=aP.get(n);if(a)return e[fk]=a;this.sheet=new i.CSSStyleSheet,aP.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[fk]=this}mount(e,t){let n=this.sheet,i=0,a=0;for(let o=0;o-1&&(this.modules.splice(l,1),a--,l=-1),l==-1){if(this.modules.splice(a++,0,s),n)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},hye=typeof navigator<"u"&&/Mac/.test(navigator.platform),dye=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var zi=0;zi<10;zi++)uf[48+zi]=uf[96+zi]=String(zi);for(var zi=1;zi<=24;zi++)uf[zi+111]="F"+zi;for(var zi=65;zi<=90;zi++)uf[zi]=String.fromCharCode(zi+32),q0[zi]=String.fromCharCode(zi);for(var ex in uf)q0.hasOwnProperty(ex)||(q0[ex]=uf[ex]);function pye(r){var e=hye&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||dye&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?q0:uf)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Y0(r){let e;return r.nodeType==11?e=r.getSelection?r:r.ownerDocument:e=r,e.getSelection()}function hk(r,e){return e?r==e||r.contains(e.nodeType!=1?e.parentNode:e):!1}function U_(r,e){if(!e.anchorNode)return!1;try{return hk(r,e.anchorNode)}catch{return!1}}function Z0(r){return r.nodeType==3?ud(r,0,r.nodeValue.length).getClientRects():r.nodeType==1?r.getClientRects():[]}function Ym(r,e,t,n){return t?oP(r,e,t,n,-1)||oP(r,e,t,n,1):!1}function ld(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e}function mS(r){return r.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(r.nodeName)}function oP(r,e,t,n,i){for(;;){if(r==t&&e==n)return!0;if(e==(i<0?0:Vl(r))){if(r.nodeName=="DIV")return!1;let a=r.parentNode;if(!a||a.nodeType!=1)return!1;e=ld(r)+(i<0?0:1),r=a}else if(r.nodeType==1){if(r=r.childNodes[e+(i<0?-1:0)],r.nodeType==1&&r.contentEditable=="false")return!1;e=i<0?Vl(r):0}else return!1}}function Vl(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function vA(r,e){let t=e?r.left:r.right;return{left:t,right:t,top:r.top,bottom:r.bottom}}function gye(r){let e=r.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:r.innerWidth,top:0,bottom:r.innerHeight}}function C$(r,e){let t=e.width/r.offsetWidth,n=e.height/r.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-r.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-r.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function vye(r,e,t,n,i,a,o,s){let l=r.ownerDocument,u=l.defaultView||window;for(let c=r,f=!1;c&&!f;)if(c.nodeType==1){let h,d=c==l.body,p=1,g=1;if(d)h=gye(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let y=c.getBoundingClientRect();({scaleX:p,scaleY:g}=C$(c,y)),h={left:y.left,right:y.left+c.clientWidth*p,top:y.top,bottom:y.top+c.clientHeight*g}}let v=0,m=0;if(i=="nearest")e.top0&&e.bottom>h.bottom+m&&(m=e.bottom-h.bottom+m+o)):e.bottom>h.bottom&&(m=e.bottom-h.bottom+o,t<0&&e.top-m0&&e.right>h.right+v&&(v=e.right-h.right+v+a)):e.right>h.right&&(v=e.right-h.right+a,t<0&&e.lefti.clientHeight&&(n=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:n}}class yye{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Vl(t):0),n,Math.min(e.focusOffset,n?Vl(n):0))}set(e,t,n,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=i}}let Rd=null;function x$(r){if(r.setActive)return r.setActive();if(Rd)return r.focus(Rd);let e=[];for(let t=r;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(r.focus(Rd==null?{get preventScroll(){return Rd={preventScroll:!0},!0}}:void 0),!Rd){Rd=!1;for(let t=0;tMath.max(1,r.scrollHeight-r.clientHeight-4)}function T$(r,e){for(let t=r,n=e;;){if(t.nodeType==3&&n>0)return{node:t,offset:n};if(t.nodeType==1&&n>0){if(t.contentEditable=="false")return null;t=t.childNodes[n-1],n=Vl(t)}else if(t.parentNode&&!mS(t))n=ld(t),t=t.parentNode;else return null}}function k$(r,e){for(let t=r,n=e;;){if(t.nodeType==3&&nt)return f.domBoundsAround(e,t,u);if(h>=e&&i==-1&&(i=l,a=u),u>t&&f.dom.parentNode==this.dom){o=l,s=c;break}c=h,u=h+f.breakAfter}return{from:a,to:s<0?n+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=t3){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function I$(r,e,t,n,i,a,o,s,l){let{children:u}=r,c=u.length?u[e]:null,f=a.length?a[a.length-1]:null,h=f?f.breakAfter:o;if(!(e==n&&c&&!o&&!h&&a.length<2&&c.merge(t,i,a.length?f:null,t==0,s,l))){if(n0&&(!o&&a.length&&c.merge(t,c.length,a[0],!1,s,0)?c.breakAfter=a.shift().breakAfter:(t2);var bt={mac:fP||/Mac/.test(Ua.platform),windows:/Win/.test(Ua.platform),linux:/Linux|X11/.test(Ua.platform),ie:mA,ie_version:F$?dk.documentMode||6:gk?+gk[1]:pk?+pk[1]:0,gecko:uP,gecko_version:uP?+(/Firefox\/(\d+)/.exec(Ua.userAgent)||[0,0])[1]:0,chrome:!!tx,chrome_version:tx?+tx[1]:0,ios:fP,android:/Android\b/.test(Ua.userAgent),webkit:cP,safari:B$,webkit_version:cP?+(/\bAppleWebKit\/(\d+)/.exec(Ua.userAgent)||[0,0])[1]:0,tabSize:dk.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const wye=256;class Os extends wn{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return this.flags&8||n&&(!(n instanceof Os)||this.length-(t-e)+n.length>wye||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Os(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new ta(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return Sye(this.dom,e,t)}}class Bu extends wn{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let i of t)i.setParent(this)}setAttrs(e){if(D$(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,i,a,o){return n&&(!(n instanceof Bu&&n.mark.eq(this.mark))||e&&a<=0||te&&t.push(n=e&&(i=a),n=l,a++}let o=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Bu(this.mark,t,o)}domAtPos(e){return O$(this,e)}coordsAt(e,t){return R$(this,e,t)}}function Sye(r,e,t){let n=r.nodeValue.length;e>n&&(e=n);let i=e,a=e,o=0;e==0&&t<0||e==n&&t>=0?bt.chrome||bt.gecko||(e?(i--,o=1):a=0)?0:s.length-1];return bt.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(s,u=>u.width)||l),o?vA(l,o<0):l||null}class Lc extends wn{static create(e,t,n){return new Lc(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Lc.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,i,a,o){return n&&(!(n instanceof Lc)||!this.widget.compare(n.widget)||e>0&&a<=0||t0)?ta.before(this.dom):ta.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let i=this.dom.getClientRects(),a=null;if(!i.length)return null;let o=this.side?this.side<0:e>0;for(let s=o?i.length-1:0;a=i[s],!(e>0?s==0:s==i.length-1||a.top0?ta.before(this.dom):ta.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Kr.empty}get isHidden(){return!0}}Os.prototype.children=Lc.prototype.children=Dg.prototype.children=t3;function O$(r,e){let t=r.dom,{children:n}=r,i=0;for(let a=0;ia&&e0;a--){let o=n[a-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let a=i;a0&&e instanceof Bu&&i.length&&(n=i[i.length-1])instanceof Bu&&n.mark.eq(e.mark)?P$(n,e.children[0],t-1):(i.push(e),e.setParent(r)),r.length+=e.length}function R$(r,e,t){let n=null,i=-1,a=null,o=-1;function s(u,c){for(let f=0,h=0;f=c&&(d.children.length?s(d,c-h):(!a||a.isHidden&&t>0)&&(p>c||h==p&&d.getSide()>0)?(a=d,o=c-h):(h-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let a of n)if(a!=t&&(i.indexOf(a)==-1||r[a]!==e[a]))return!1;return!0}function mk(r,e,t){let n=!1;if(e)for(let i in e)t&&i in t||(n=!0,i=="style"?r.style.cssText="":r.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(n=!0,i=="style"?r.style.cssText=t[i]:r.setAttribute(i,t[i]));return n}function Cye(r){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new cf(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,i;if(e.isBlockGap)n=-5e8,i=4e8;else{let{start:a,end:o}=N$(e,t);n=(a?t?-3e8:-1:5e8)-1,i=(o?t?2e8:1:-6e8)+1}return new cf(e,n,i,t,e.widget||null,!0)}static line(e){return new n1(e)}static set(e,t=!1){return En.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Jt.none=En.empty;class r1 extends Jt{constructor(e){let{start:t,end:n}=N$(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof r1&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&yS(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}r1.prototype.point=!1;class n1 extends Jt{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof n1&&this.spec.class==e.spec.class&&yS(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}n1.prototype.mapMode=Sa.TrackBefore;n1.prototype.point=!0;class cf extends Jt{constructor(e,t,n,i,a,o){super(t,n,a,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?Sa.TrackBefore:Sa.TrackAfter:Sa.TrackDel}get type(){return this.startSide!=this.endSide?bo.WidgetRange:this.startSide<=0?bo.WidgetBefore:bo.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof cf&&xye(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}cf.prototype.point=!0;function N$(r,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=r;return t==null&&(t=r.inclusive),n==null&&(n=r.inclusive),{start:t??e,end:n??e}}function xye(r,e){return r==e||!!(r&&e&&r.compare(e))}function yk(r,e,t,n=0){let i=t.length-1;i>=0&&t[i]+n>=r?t[i]=Math.max(t[i],e):t.push(r,e)}let ga=class Cm extends wn{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,i,a,o){if(n){if(!(n instanceof Cm))return!1;this.dom||n.transferDOM(this)}return i&&this.setDeco(n?n.attrs:null),L$(this,e,t,n?n.children.slice():[],a,o),!0}split(e){let t=new Cm;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:i}=this.childPos(e);i&&(t.append(this.children[n].split(i),0),this.children[n].merge(i,this.children[n].length,null,!1,0,0),n++);for(let a=n;a0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){yS(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){P$(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=vk(t,this.attrs||{})),n&&(this.attrs=vk({class:n},this.attrs||{}))}domAtPos(e){return O$(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(D$(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(mk(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&wn.get(i)instanceof Bu;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((n=wn.get(i))===null||n===void 0?void 0:n.isEditable)==!1&&(!bt.ios||!this.children.some(a=>a instanceof Os))){let a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof Os)||/[^ -~]/.test(n.text))return null;let i=Z0(n.dom);if(i.length!=1)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=R$(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:i}=this.parent.view.viewState,a=n.bottom-n.top;if(Math.abs(a-i.lineHeight)<2&&i.textHeight=t){if(a instanceof Cm)return a;if(o>t)break}i=o+a.breakAfter}return null}};class Du extends wn{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,i,a,o){return n&&(!(n instanceof Du)||!this.widget.compare(n.widget)||e>0&&a<=0||t0}}class bk extends iv{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Zm{constructor(e,t,n,i){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Du&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new ga),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Y1(new Dg(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Du)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:a,lineBreak:o,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=a,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Y1(new Os(this.text.slice(this.textOff,this.textOff+i)),t),n),this.atCursorPos=!0,this.textOff+=i,e-=i,n=0}}span(e,t,n,i){this.buildText(t-e,n,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,n,i,a,o){if(this.disallowBlockEffectsFor[o]&&n instanceof cf){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof cf)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Du(n.widget||Eg.block,s,n));else{let l=Lc.create(n.widget||Eg.inline,s,s?0:n.startSide),u=this.atCursorPos&&!l.isEditable&&a<=i.length&&(e0),c=!l.isEditable&&(ei.length||n.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(f.append(Y1(new Dg(1),i),a),a=i.length+Math.max(0,a-i.length)),f.append(Y1(l,i),a),this.atCursorPos=c,this.pendingBuffer=c?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=a)}static build(e,t,n,i,a){let o=new Zm(e,t,n,a);return o.openEnd=En.spans(i,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Y1(r,e){for(let t of e)r=new Bu(t,[r],r.length);return r}class Eg extends iv{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Eg.inline=new Eg("span");Eg.block=new Eg("div");var Pn=function(r){return r[r.LTR=0]="LTR",r[r.RTL=1]="RTL",r}(Pn||(Pn={}));const cd=Pn.LTR,r3=Pn.RTL;function z$(r){let e=[];for(let t=0;t=t){if(s.level==n)return o;(a<0||(i!=0?i<0?s.fromt:e[a].level>s.level))&&(a=o)}}if(a<0)throw new RangeError("Index out of range");return a}}function G$(r,e){if(r.length!=e.length)return!1;for(let t=0;t=0;g-=3)if(qs[g+1]==-d){let v=qs[g+2],m=v&2?i:v&4?v&1?a:i:0;m&&(_n[f]=_n[qs[g]]=m),s=g;break}}else{if(qs.length==189)break;qs[s++]=f,qs[s++]=h,qs[s++]=l}else if((p=_n[f])==2||p==1){let g=p==i;l=g?0:1;for(let v=s-3;v>=0;v-=3){let m=qs[v+2];if(m&2)break;if(g)qs[v+2]|=2;else{if(m&4)break;qs[v+2]|=4}}}}}function Iye(r,e,t,n){for(let i=0,a=n;i<=t.length;i++){let o=i?t[i-1].to:r,s=il;)p==v&&(p=t[--g].from,v=g?t[g-1].to:r),_n[--p]=d;l=c}else a=u,l++}}}function wk(r,e,t,n,i,a,o){let s=n%2?2:1;if(n%2==i%2)for(let l=e,u=0;ll&&o.push(new Fc(l,g.from,d));let v=g.direction==cd!=!(d%2);Sk(r,v?n+1:n,i,g.inner,g.from,g.to,o),l=g.to}p=g.to}else{if(p==t||(c?_n[p]!=s:_n[p]==s))break;p++}h?wk(r,l,p,n+1,i,h,o):le;){let c=!0,f=!1;if(!u||l>a[u-1].to){let g=_n[l-1];g!=s&&(c=!1,f=g==16)}let h=!c&&s==1?[]:null,d=c?n:n+1,p=l;e:for(;;)if(u&&p==a[u-1].to){if(f)break e;let g=a[--u];if(!c)for(let v=g.from,m=u;;){if(v==e)break e;if(m&&a[m-1].to==v)v=a[--m].from;else{if(_n[v-1]==s)break e;break}}if(h)h.push(g);else{g.to_n.length;)_n[_n.length]=256;let n=[],i=e==cd?0:1;return Sk(r,i,i,t,0,r.length,n),n}function U$(r){return[new Fc(0,r,0)]}let H$="";function Fye(r,e,t,n,i){var a;let o=n.head-r.from,s=Fc.find(e,o,(a=n.bidiLevel)!==null&&a!==void 0?a:-1,n.assoc),l=e[s],u=l.side(i,t);if(o==u){let h=s+=i?1:-1;if(h<0||h>=e.length)return null;l=e[s=h],o=l.side(!i,t),u=l.side(i,t)}let c=Gi(r.text,o,l.forward(i,t));(cl.to)&&(c=u),H$=r.text.slice(Math.min(o,c),Math.max(o,c));let f=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return f&&c==u&&f.level+(i?0:1)r.some(e=>e)}),K$=Dt.define({combine:r=>r.some(e=>e)}),Q$=Dt.define();class $p{constructor(e,t="nearest",n="nearest",i=5,a=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=i,this.xMargin=a,this.isSnapshot=o}map(e){return e.empty?this:new $p(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new $p(ze.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Z1=Sr.define({map:(r,e)=>r.map(e)}),J$=Sr.define();function Ya(r,e,t){let n=r.facet(q$);n.length?n[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Ac=Dt.define({combine:r=>r.length?r[0]:!0});let Oye=0;const xm=Dt.define();class Ta{constructor(e,t,n,i,a){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=i,this.extension=a(this)}static define(e,t){const{eventHandlers:n,eventObservers:i,provide:a,decorations:o}=t||{};return new Ta(Oye++,e,n,i,s=>{let l=[xm.of(s)];return o&&l.push(X0.of(u=>{let c=u.plugin(s);return c?o(c):Jt.none})),a&&l.push(a(s)),l})}static fromClass(e,t){return Ta.define(n=>new e(n),t)}}class rx{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Ya(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Ya(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){Ya(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const ej=Dt.define(),a3=Dt.define(),X0=Dt.define(),tj=Dt.define(),o3=Dt.define(),rj=Dt.define();function dP(r,e){let t=r.state.facet(rj);if(!t.length)return t;let n=t.map(a=>a instanceof Function?a(r):a),i=[];return En.spans(n,e.from,e.to,{point(){},span(a,o,s,l){let u=a-e.from,c=o-e.from,f=i;for(let h=s.length-1;h>=0;h--,l--){let d=s[h].spec.bidiIsolate,p;if(d==null&&(d=Bye(e.text,u,c)),l>0&&f.length&&(p=f[f.length-1]).to==u&&p.direction==d)p.to=c,f=p.inner;else{let g={from:u,to:c,direction:d,inner:[]};f.push(g),f=g.inner}}}}),i}const nj=Dt.define();function s3(r){let e=0,t=0,n=0,i=0;for(let a of r.state.facet(nj)){let o=a(r);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(n=Math.max(n,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:t,top:n,bottom:i}}const Dm=Dt.define();class Jo{constructor(e,t,n,i){this.fromA=e,this.toA=t,this.fromB=n,this.toB=i}join(e){return new Jo(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>n.toA)){if(i.toAc)break;a+=2}if(!l)return n;new Jo(l.fromA,l.toA,l.fromB,l.toB).addToSet(n),o=l.toA,s=l.toB}}}class bS{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=hi.empty(this.startState.doc.length);for(let a of n)this.changes=this.changes.compose(a.changes);let i=[];this.changes.iterChangedRanges((a,o,s,l)=>i.push(new Jo(a,o,s,l))),this.changedRanges=i}static create(e,t,n){return new bS(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class pP extends wn{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Jt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new ga],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Jo(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:u,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!Uye(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let a=i>-1?Rye(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;n=new Jo(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(n.slice())}this.hasComposition=a?{from:a.range.fromB,to:a.range.toB}:null,(bt.ie||bt.chrome)&&!a&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,s=this.updateDeco(),l=Vye(o,s,e.changes);return n=Jo.extendWithRanges(n,l),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,a),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=bt.chrome||bt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||i.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let a=[];if(this.view.viewport.from||this.view.viewport.to=0?i[o]:null;if(!s)break;let{fromA:l,toA:u,fromB:c,toB:f}=s,h,d,p,g;if(n&&n.range.fromBc){let _=Zm.build(this.view.state.doc,c,n.range.fromB,this.decorations,this.dynamicDecorationMap),w=Zm.build(this.view.state.doc,n.range.toB,f,this.decorations,this.dynamicDecorationMap);d=_.breakAtStart,p=_.openStart,g=w.openEnd;let S=this.compositionView(n);w.breakAtStart?S.breakAfter=1:w.content.length&&S.merge(S.length,S.length,w.content[0],!1,w.openStart,0)&&(S.breakAfter=w.content[0].breakAfter,w.content.shift()),_.content.length&&S.merge(0,0,_.content[_.content.length-1],!0,0,_.openEnd)&&_.content.pop(),h=_.content.concat(S).concat(w.content)}else({content:h,breakAtStart:d,openStart:p,openEnd:g}=Zm.build(this.view.state.doc,c,f,this.decorations,this.dynamicDecorationMap));let{i:v,off:m}=a.findPos(u,1),{i:y,off:b}=a.findPos(l,-1);I$(this,y,b,v,m,h,d,p,g)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(J$)&&(this.editContextFormatting=n.value)}compositionView(e){let t=new Os(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new Bu(i,[t],t.length);let n=new ga;return n.append(t,0),n}fixCompositionDOM(e){let t=(a,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let s=wn.get(a);s&&s!=o&&(s.dom=null),o.setDOM(a)},n=this.childPos(e.range.fromB,1),i=this.children[n.i];t(e.line,i);for(let a=e.marks.length-1;a>=-1;a--)n=i.childPos(n.off,1),i=i.children[n.i],t(a>=0?e.marks[a].node:e.text,i)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,i=n==this.dom,a=!i&&U_(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),u=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(bt.gecko&&s.empty&&!this.hasComposition&&Pye(l)){let f=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(f,l.node.childNodes[l.offset]||null)),l=u=new ta(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!Ym(l.node,l.offset,c.anchorNode,c.anchorOffset)||!Ym(u.node,u.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,s))&&(this.view.observer.ignore(()=>{bt.android&&bt.chrome&&this.dom.contains(c.focusNode)&&Gye(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Y0(this.view.root);if(f)if(s.empty){if(bt.gecko){let h=Nye(l.node,l.offset);if(h&&h!=3){let d=(h==1?T$:k$)(l.node,l.offset);d&&(l=new ta(d.node,d.offset))}}f.collapse(l.node,l.offset),s.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=s.bidiLevel)}else if(f.extend){f.collapse(l.node,l.offset);try{f.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();s.anchor>s.head&&([l,u]=[u,l]),h.setEnd(u.node,u.offset),h.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(h)}a&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new ta(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new ta(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Ym(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Y0(e.root),{anchorNode:i,anchorOffset:a}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=ga.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let l=this.coordsAt(t.head,-1),u=this.coordsAt(t.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(i,a)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let i=e.offset;!n&&i=0;i--){let a=wn.get(t.childNodes[i]);a instanceof ga&&(n=a.domAtPos(a.length))}return n?new ta(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=wn.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;o--){let s=this.children[o],l=a-s.breakAfter,u=l-s.length;if(le||s.covers(1))&&(!n||s instanceof ga&&!(n instanceof ga&&t>=0)))n=s,i=u;else if(n&&u==e&&l==e&&s instanceof Du&&Math.abs(t)<2){if(s.deco.startSide<0)break;o&&(n=null)}a=u}return n?n.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),i=this.children[t];if(!(i instanceof ga))return null;for(;i.children.length;){let{i:s,off:l}=i.childPos(n,1);for(;;s++){if(s==i.children.length)return null;if((i=i.children[s]).length)break}n=l}if(!(i instanceof Os))return null;let a=Gi(i.text,n);if(a==n)return null;let o=ud(i.dom,n,a).getClientRects();for(let s=0;sMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==Pn.LTR;for(let u=0,c=0;ci)break;if(u>=n){let d=f.dom.getBoundingClientRect();if(t.push(d.height),o){let p=f.dom.lastChild,g=p?Z0(p):[];if(g.length){let v=g[g.length-1],m=l?v.right-d.left:d.right-v.left;m>s&&(s=m,this.minWidth=a,this.minWidthFrom=u,this.minWidthTo=h)}}}u=h+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Pn.RTL:Pn.LTR}measureTextSize(){for(let a of this.children)if(a instanceof ga){let o=a.measureTextSize();if(o)return o}let e=document.createElement("div"),t,n,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let a=Z0(e.firstChild)[0];t=e.getBoundingClientRect().height,n=a?a.width/27:7,i=a?a.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new M$(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,i=0;;i++){let a=i==t.viewports.length?null:t.viewports[i],o=a?a.from-1:this.length;if(o>n){let s=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Jt.replace({widget:new bk(s),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!a)break;n=a.to+1}return Jt.set(e)}updateDeco(){let e=1,t=this.view.state.facet(X0).map(a=>(this.dynamicDecorationMap[e++]=typeof a=="function")?a(this.view):a),n=!1,i=this.view.state.facet(tj).map((a,o)=>{let s=typeof a=="function";return s&&(n=!0),s?a(this.view):a});for(i.length&&(this.dynamicDecorationMap[e++]=n,t.push(En.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),i;if(!n)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,i.left),top:Math.min(n.top,i.top),right:Math.max(n.right,i.right),bottom:Math.max(n.bottom,i.bottom)});let a=s3(this.view),o={left:n.left-a.left,top:n.top-a.top,right:n.right+a.right,bottom:n.bottom+a.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;vye(this.view.scrollDOM,o,t.head{ne.from&&(t=!0)}),t}function Hye(r,e,t=1){let n=r.charCategorizer(e),i=r.doc.lineAt(e),a=e-i.from;if(i.length==0)return ze.cursor(e);a==0?t=1:a==i.length&&(t=-1);let o=a,s=a;t<0?o=Gi(i.text,a,!1):s=Gi(i.text,a);let l=n(i.text.slice(o,s));for(;o>0;){let u=Gi(i.text,o,!1);if(n(i.text.slice(u,o))!=l)break;o=u}for(;sr?e.left-r:Math.max(0,r-e.right)}function $ye(r,e){return e.top>r?e.top-r:Math.max(0,r-e.bottom)}function nx(r,e){return r.tope.top+1}function gP(r,e){return er.bottom?{top:r.top,left:r.left,right:r.right,bottom:e}:r}function Ck(r,e,t){let n,i,a,o,s=!1,l,u,c,f;for(let p=r.firstChild;p;p=p.nextSibling){let g=Z0(p);for(let v=0;vb||o==b&&a>y){n=p,i=m,a=y,o=b;let _=b?t0?v0)}y==0?t>m.bottom&&(!c||c.bottomm.top)&&(u=p,f=m):c&&nx(c,m)?c=vP(c,m.bottom):f&&nx(f,m)&&(f=gP(f,m.top))}}if(c&&c.bottom>=t?(n=l,i=c):f&&f.top<=t&&(n=u,i=f),!n)return{node:r,offset:0};let h=Math.max(i.left,Math.min(i.right,e));if(n.nodeType==3)return mP(n,h,t);if(s&&n.contentEditable!="false")return Ck(n,h,t);let d=Array.prototype.indexOf.call(r.childNodes,n)+(e>=(i.left+i.right)/2?1:0);return{node:r,offset:d}}function mP(r,e,t){let n=r.nodeValue.length,i=-1,a=1e9,o=0;for(let s=0;st?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,d=h;if((bt.chrome||bt.gecko)&&ud(r,s).getBoundingClientRect().left==c.right&&(d=!h),f<=0)return{node:r,offset:s+(d?1:0)};i=s+(d?1:0),a=f}}}return{node:r,offset:i>-1?i:o>0?r.nodeValue.length:0}}function aj(r,e,t,n=-1){var i,a;let o=r.contentDOM.getBoundingClientRect(),s=o.top+r.viewState.paddingTop,l,{docHeight:u}=r.viewState,{x:c,y:f}=e,h=f-s;if(h<0)return 0;if(h>u)return r.state.doc.length;for(let _=r.viewState.heightOracle.textHeight/2,w=!1;l=r.elementAtHeight(h),l.type!=bo.Text;)for(;h=n>0?l.bottom+_:l.top-_,!(h>=0&&h<=u);){if(w)return t?null:0;w=!0,n=-n}f=s+h;let d=l.from;if(dr.viewport.to)return r.viewport.to==r.state.doc.length?r.state.doc.length:t?null:yP(r,o,l,c,f);let p=r.dom.ownerDocument,g=r.root.elementFromPoint?r.root:p,v=g.elementFromPoint(c,f);v&&!r.contentDOM.contains(v)&&(v=null),v||(c=Math.max(o.left+1,Math.min(o.right-1,c)),v=g.elementFromPoint(c,f),v&&!r.contentDOM.contains(v)&&(v=null));let m,y=-1;if(v&&((i=r.docView.nearest(v))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let _=p.caretPositionFromPoint(c,f);_&&({offsetNode:m,offset:y}=_)}else if(p.caretRangeFromPoint){let _=p.caretRangeFromPoint(c,f);_&&({startContainer:m,startOffset:y}=_,(!r.contentDOM.contains(m)||bt.safari&&jye(m,y,c)||bt.chrome&&qye(m,y,c))&&(m=void 0))}m&&(y=Math.min(Vl(m),y))}if(!m||!r.docView.dom.contains(m)){let _=ga.find(r.docView,d);if(!_)return h>l.top+l.height/2?l.to:l.from;({node:m,offset:y}=Ck(_.dom,c,f))}let b=r.docView.nearest(m);if(!b)return null;if(b.isWidget&&((a=b.dom)===null||a===void 0?void 0:a.nodeType)==1){let _=b.dom.getBoundingClientRect();return e.y<_.top||e.y<=_.bottom&&e.x<=(_.left+_.right)/2?b.posAtStart:b.posAtEnd}else return b.localPosFromDOM(m,y)+b.posAtStart}function yP(r,e,t,n,i){let a=Math.round((n-e.left)*r.defaultCharacterWidth);if(r.lineWrapping&&t.height>r.defaultLineHeight*1.5){let s=r.viewState.heightOracle.textHeight,l=Math.floor((i-t.top-(r.defaultLineHeight-s)*.5)/s);a+=l*r.viewState.heightOracle.lineLength}let o=r.state.sliceDoc(t.from,t.to);return t.from+cye(o,a,r.state.tabSize)}function jye(r,e,t){let n;if(r.nodeType!=3||e!=(n=r.nodeValue.length))return!1;for(let i=r.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return ud(r,n-1,n).getBoundingClientRect().left>t}function qye(r,e,t){if(e!=0)return!1;for(let i=r;;){let a=i.parentNode;if(!a||a.nodeType!=1||a.firstChild!=i)return!1;if(a.classList.contains("cm-line"))break;i=a}let n=r.nodeType==1?r.getBoundingClientRect():ud(r,0,Math.max(r.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function xk(r,e){let t=r.lineBlockAt(e);if(Array.isArray(t.type)){for(let n of t.type)if(n.to>e||n.to==e&&(n.to==t.to||n.type==bo.Text))return n}return t}function Yye(r,e,t,n){let i=xk(r,e.head),a=!n||i.type!=bo.Text||!(r.lineWrapping||i.widgetLineBreaks)?null:r.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(a){let o=r.dom.getBoundingClientRect(),s=r.textDirectionAt(i.from),l=r.posAtCoords({x:t==(s==Pn.LTR)?o.right-1:o.left+1,y:(a.top+a.bottom)/2});if(l!=null)return ze.cursor(l,t?-1:1)}return ze.cursor(t?i.to:i.from,t?-1:1)}function bP(r,e,t,n){let i=r.state.doc.lineAt(e.head),a=r.bidiSpans(i),o=r.textDirectionAt(i.from);for(let s=e,l=null;;){let u=Fye(i,a,o,s,t),c=H$;if(!u){if(i.number==(t?r.state.doc.lines:1))return s;c=` +`,i=r.state.doc.line(i.number+(t?1:-1)),a=r.bidiSpans(i),u=r.visualLineSide(i,!t)}if(l){if(!l(c))return s}else{if(!n)return u;l=n(c)}s=u}}function Zye(r,e,t){let n=r.state.charCategorizer(e),i=n(t);return a=>{let o=n(a);return i==On.Space&&(i=o),i==o}}function Xye(r,e,t,n){let i=e.head,a=t?1:-1;if(i==(t?r.state.doc.length:0))return ze.cursor(i,e.assoc);let o=e.goalColumn,s,l=r.contentDOM.getBoundingClientRect(),u=r.coordsAtPos(i,e.assoc||-1),c=r.documentTop;if(u)o==null&&(o=u.left-l.left),s=a<0?u.top:u.bottom;else{let d=r.viewState.lineBlockAt(i);o==null&&(o=Math.min(l.right-l.left,r.defaultCharacterWidth*(i-d.from))),s=(a<0?d.top:d.bottom)+c}let f=l.left+o,h=n??r.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=s+(h+d)*a,g=aj(r,{x:f,y:p},!1,a);if(pl.bottom||(a<0?gi)){let v=r.docView.coordsForChar(g),m=!v||p{if(e>a&&ei(r)),t.from,e.head>t.from?-1:1);return n==t.from?t:ze.cursor(n,na)&&this.lineBreak(),i=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let a=-1,o=1,s;if(this.lineSeparator?(a=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(s=i.exec(t))&&(a=s.index,o=s[0].length),this.append(t.slice(n,a<0?t.length:a)),a<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);n=a+o}}readNode(e){if(e.cmIgnore)return;let t=wn.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let i=n.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Qye(e,n.node,n.offset)?t:0))}}function Qye(r,e,t){for(;;){if(!e||t-1;let{impreciseHead:a,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let s=a||o?[]:r1e(e),l=new Kye(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=n1e(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=a&&a.node==s.focusNode&&a.offset==s.focusOffset||!hk(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),u=o&&o.node==s.anchorNode&&o.offset==s.anchorOffset||!hk(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),c=e.viewport;if((bt.ios||bt.chrome)&&e.state.selection.main.empty&&l!=u&&(c.from>0||c.toDate.now()-100?r.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:s}=e.bounds,l=i.from,u=null;(a===8||bt.android&&e.text.length=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:r.state.doc.slice(i.from,t.from).append(t.insert).append(r.state.doc.slice(t.to,i.to))}:(bt.mac||bt.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&r.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=ze.single(n.main.anchor-1,n.main.head-1)),t={from:i.from,to:i.to,insert:Kr.of([" "])}):bt.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==` + `&&r.lineWrapping&&(n&&(n=ze.single(n.main.anchor-1,n.main.head-1)),t={from:i.from,to:i.to,insert:Kr.of([" "])}),t)return l3(r,t,n,a);if(n&&!n.main.eq(i)){let o=!1,s="select";return r.inputState.lastSelectionTime>Date.now()-50&&(r.inputState.lastSelectionOrigin=="select"&&(o=!0),s=r.inputState.lastSelectionOrigin),r.dispatch({selection:n,scrollIntoView:o,userEvent:s}),!0}else return!1}function l3(r,e,t,n=-1){if(bt.ios&&r.inputState.flushIOSKey(e))return!0;let i=r.state.selection.main;if(bt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&r.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Wp(r.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||n==8&&e.insert.lengthi.head)&&Wp(r.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Wp(r.contentDOM,"Delete",46)))return!0;let a=e.insert.toString();r.inputState.composing>=0&&r.inputState.composing++;let o,s=()=>o||(o=e1e(r,e,t));return r.state.facet(Y$).some(l=>l(r,e.from,e.to,a,s))||r.dispatch(s()),!0}function e1e(r,e,t){let n,i=r.state,a=i.selection.main;if(e.from>=a.from&&e.to<=a.to&&e.to-e.from>=(a.to-a.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&r.inputState.composing<0){let s=a.frome.to?i.sliceDoc(e.to,a.to):"";n=i.replaceSelection(r.state.toText(s+e.insert.sliceString(0,void 0,r.state.lineBreak)+l))}else{let s=i.changes(e),l=t&&t.main.to<=s.newLength?t.main:void 0;if(i.selection.ranges.length>1&&r.inputState.composing>=0&&e.to<=a.to&&e.to>=a.to-10){let u=r.state.sliceDoc(e.from,e.to),c,f=t&&ij(r,t.main.head);if(f){let p=e.insert.length-(e.to-e.from);c={from:f.from,to:f.to-p}}else c=r.state.doc.lineAt(a.head);let h=a.to-e.to,d=a.to-a.from;n=i.changeByRange(p=>{if(p.from==a.from&&p.to==a.to)return{changes:s,range:l||p.map(s)};let g=p.to-h,v=g-u.length;if(p.to-p.from!=d||r.state.sliceDoc(v,g)!=u||p.to>=c.from&&p.from<=c.to)return{range:p};let m=i.changes({from:v,to:g,insert:e.insert}),y=p.to-a.to;return{changes:m,range:l?ze.range(Math.max(0,l.anchor+y),Math.max(0,l.head+y)):p.map(m)}})}else n={changes:s,selection:l&&i.selection.replaceRange(l)}}let o="input.type";return(r.composing||r.inputState.compositionPendingChange&&r.inputState.compositionEndedAt>Date.now()-50)&&(r.inputState.compositionPendingChange=!1,o+=".compose",r.inputState.compositionFirstChange&&(o+=".start",r.inputState.compositionFirstChange=!1)),i.update(n,{userEvent:o,scrollIntoView:!0})}function t1e(r,e,t,n){let i=Math.min(r.length,e.length),a=0;for(;a0&&s>0&&r.charCodeAt(o-1)==e.charCodeAt(s-1);)o--,s--;if(n=="end"){let l=Math.max(0,a-Math.min(o,s));t-=o+l-a}if(o=o?a-t:0;a-=l,s=a+(s-o),o=a}else if(s=s?a-t:0;a-=l,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function r1e(r){let e=[];if(r.root.activeElement!=r.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:i,focusOffset:a}=r.observer.selectionRange;return t&&(e.push(new _P(t,n)),(i!=t||a!=n)&&e.push(new _P(i,a))),e}function n1e(r,e){if(r.length==0)return null;let t=r[0].pos,n=r.length==2?r[1].pos:t;return t>-1&&n>-1?ze.single(t+e,n+e):null}class i1e{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,bt.safari&&e.contentDOM.addEventListener("input",()=>null),bt.gecko&&_1e(e.contentDOM.ownerDocument)}handleEvent(e){!h1e(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let i of n.observers)i(this.view,t);for(let i of n.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=a1e(e),n=this.handlers,i=this.view.contentDOM;for(let a in t)if(a!="scroll"){let o=!t[a].handlers.length,s=n[a];s&&o!=!s.handlers.length&&(i.removeEventListener(a,this.handleEvent),s=null),s||i.addEventListener(a,this.handleEvent,{passive:o})}for(let a in n)a!="scroll"&&!t[a]&&i.removeEventListener(a,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&lj.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),bt.android&&bt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return bt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=sj.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||o1e.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:bt.safari&&!bt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function wP(r,e){return(t,n)=>{try{return e.call(r,n,t)}catch(i){Ya(t.state,i)}}}function a1e(r){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of r){let i=n.spec;if(i&&i.domEventHandlers)for(let a in i.domEventHandlers){let o=i.domEventHandlers[a];o&&t(a).handlers.push(wP(n.value,o))}if(i&&i.domEventObservers)for(let a in i.domEventObservers){let o=i.domEventObservers[a];o&&t(a).observers.push(wP(n.value,o))}}for(let n in Ps)t(n).handlers.push(Ps[n]);for(let n in ns)t(n).observers.push(ns[n]);return e}const sj=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],o1e="dthko",lj=[16,17,18,20,91,92,224,225],X1=6;function K1(r){return Math.max(0,r)*.7+8}function s1e(r,e){return Math.max(Math.abs(r.clientX-e.clientX),Math.abs(r.clientY-e.clientY))}class l1e{constructor(e,t,n,i){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=mye(e.contentDOM),this.atoms=e.state.facet(o3).map(o=>o(e));let a=e.contentDOM.ownerDocument;a.addEventListener("mousemove",this.move=this.move.bind(this)),a.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(en.allowMultipleSelections)&&u1e(e,t),this.dragging=f1e(e,t)&&fj(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&s1e(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,i=0,a=0,o=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:a,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=s3(this.view);e.clientX-l.left<=i+X1?t=-K1(i-e.clientX):e.clientX+l.right>=o-X1&&(t=K1(e.clientX-o)),e.clientY-l.top<=a+X1?n=-K1(a-e.clientY):e.clientY+l.bottom>=s-X1&&(n=K1(e.clientY-s)),this.setScrollSpeed(t,n)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;nt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function u1e(r,e){let t=r.state.facet(W$);return t.length?t[0](e):bt.mac?e.metaKey:e.ctrlKey}function c1e(r,e){let t=r.state.facet($$);return t.length?t[0](e):bt.mac?!e.altKey:!e.ctrlKey}function f1e(r,e){let{main:t}=r.state.selection;if(t.empty)return!1;let n=Y0(r.root);if(!n||n.rangeCount==0)return!0;let i=n.getRangeAt(0).getClientRects();for(let a=0;a=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function h1e(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=r.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=wn.get(t))&&n.ignoreEvent(e))return!1;return!0}const Ps=Object.create(null),ns=Object.create(null),uj=bt.ie&&bt.ie_version<15||bt.ios&&bt.webkit_version<604;function d1e(r){let e=r.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{r.focus(),t.remove(),cj(r,t.value)},50)}function yA(r,e,t){for(let n of r.facet(e))t=n(t,r);return t}function cj(r,e){e=yA(r.state,n3,e);let{state:t}=r,n,i=1,a=t.toText(e),o=a.lines==t.selection.ranges.length;if(Dk!=null&&t.selection.ranges.every(l=>l.empty)&&Dk==a.toString()){let l=-1;n=t.changeByRange(u=>{let c=t.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let f=t.toText((o?a.line(i++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:ze.cursor(u.from+f.length)}})}else o?n=t.changeByRange(l=>{let u=a.line(i++);return{changes:{from:l.from,to:l.to,insert:u.text},range:ze.cursor(l.from+u.length)}}):n=t.replaceSelection(a);r.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}ns.scroll=r=>{r.inputState.lastScrollTop=r.scrollDOM.scrollTop,r.inputState.lastScrollLeft=r.scrollDOM.scrollLeft};Ps.keydown=(r,e)=>(r.inputState.setSelectionOrigin("select"),e.keyCode==27&&r.inputState.tabFocusMode!=0&&(r.inputState.tabFocusMode=Date.now()+2e3),!1);ns.touchstart=(r,e)=>{r.inputState.lastTouchTime=Date.now(),r.inputState.setSelectionOrigin("select.pointer")};ns.touchmove=r=>{r.inputState.setSelectionOrigin("select.pointer")};Ps.mousedown=(r,e)=>{if(r.observer.flush(),r.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of r.state.facet(j$))if(t=n(r,e),t)break;if(!t&&e.button==0&&(t=v1e(r,e)),t){let n=!r.hasFocus;r.inputState.startMouseSelection(new l1e(r,e,t,n)),n&&r.observer.ignore(()=>{x$(r.contentDOM);let a=r.root.activeElement;a&&!a.contains(r.contentDOM)&&a.blur()});let i=r.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function SP(r,e,t,n){if(n==1)return ze.cursor(e,t);if(n==2)return Hye(r.state,e,t);{let i=ga.find(r.docView,e),a=r.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:a.from,s=i?i.posAtEnd:a.to;return se>=t.top&&e<=t.bottom&&r>=t.left&&r<=t.right;function p1e(r,e,t,n){let i=ga.find(r.docView,e);if(!i)return 1;let a=e-i.posAtStart;if(a==0)return 1;if(a==i.length)return-1;let o=i.coordsAt(a,-1);if(o&&AP(t,n,o))return-1;let s=i.coordsAt(a,1);return s&&AP(t,n,s)?1:o&&o.bottom>=n?-1:1}function CP(r,e){let t=r.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:p1e(r,t,e.clientX,e.clientY)}}const g1e=bt.ie&&bt.ie_version<=11;let xP=null,DP=0,EP=0;function fj(r){if(!g1e)return r.detail;let e=xP,t=EP;return xP=r,EP=Date.now(),DP=!e||t>Date.now()-400&&Math.abs(e.clientX-r.clientX)<2&&Math.abs(e.clientY-r.clientY)<2?(DP+1)%3:1}function v1e(r,e){let t=CP(r,e),n=fj(e),i=r.state.selection;return{update(a){a.docChanged&&(t.pos=a.changes.mapPos(t.pos),i=i.map(a.changes))},get(a,o,s){let l=CP(r,a),u,c=SP(r,l.pos,l.bias,n);if(t.pos!=l.pos&&!o){let f=SP(r,t.pos,t.bias,n),h=Math.min(f.from,c.from),d=Math.max(f.to,c.to);c=h1&&(u=m1e(i,l.pos))?u:s?i.addRange(c):ze.create([c])}}}function m1e(r,e){for(let t=0;t=e)return ze.create(r.ranges.slice(0,t).concat(r.ranges.slice(t+1)),r.mainIndex==t?0:r.mainIndex-(r.mainIndex>t?1:0))}return null}Ps.dragstart=(r,e)=>{let{selection:{main:t}}=r.state;if(e.target.draggable){let i=r.docView.nearest(e.target);if(i&&i.isWidget){let a=i.posAtStart,o=a+i.length;(a>=t.to||o<=t.from)&&(t=ze.range(a,o))}}let{inputState:n}=r;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",yA(r.state,i3,r.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Ps.dragend=r=>(r.inputState.draggedContent=null,!1);function TP(r,e,t,n){if(t=yA(r.state,n3,t),!t)return;let i=r.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:a}=r.inputState,o=n&&a&&c1e(r,e)?{from:a.from,to:a.to}:null,s={from:i,insert:t},l=r.state.changes(o?[o,s]:s);r.focus(),r.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),r.inputState.draggedContent=null}Ps.drop=(r,e)=>{if(!e.dataTransfer)return!1;if(r.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),i=0,a=()=>{++i==t.length&&TP(r,e,n.filter(o=>o!=null).join(r.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(n[o]=s.result),a()},s.readAsText(t[o])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return TP(r,e,n,!0),!0}return!1};Ps.paste=(r,e)=>{if(r.state.readOnly)return!0;r.observer.flush();let t=uj?null:e.clipboardData;return t?(cj(r,t.getData("text/plain")||t.getData("text/uri-list")),!0):(d1e(r),!1)};function y1e(r,e){let t=r.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),r.focus()},50)}function b1e(r){let e=[],t=[],n=!1;for(let i of r.selection.ranges)i.empty||(e.push(r.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:a}of r.selection.ranges){let o=r.doc.lineAt(a);o.number>i&&(e.push(o.text),t.push({from:o.from,to:Math.min(r.doc.length,o.to+1)})),i=o.number}n=!0}return{text:yA(r,i3,e.join(r.lineBreak)),ranges:t,linewise:n}}let Dk=null;Ps.copy=Ps.cut=(r,e)=>{let{text:t,ranges:n,linewise:i}=b1e(r.state);if(!t&&!i)return!1;Dk=i?t:null,e.type=="cut"&&!r.state.readOnly&&r.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let a=uj?null:e.clipboardData;return a?(a.clearData(),a.setData("text/plain",t),!0):(y1e(r,t),!1)};const hj=ju.define();function dj(r,e){let t=[];for(let n of r.facet(Z$)){let i=n(r,e);i&&t.push(i)}return t?r.update({effects:t,annotations:hj.of(!0)}):null}function pj(r){setTimeout(()=>{let e=r.hasFocus;if(e!=r.inputState.notifiedFocused){let t=dj(r.state,e);t?r.dispatch(t):r.update([])}},10)}ns.focus=r=>{r.inputState.lastFocusTime=Date.now(),!r.scrollDOM.scrollTop&&(r.inputState.lastScrollTop||r.inputState.lastScrollLeft)&&(r.scrollDOM.scrollTop=r.inputState.lastScrollTop,r.scrollDOM.scrollLeft=r.inputState.lastScrollLeft),pj(r)};ns.blur=r=>{r.observer.clearSelectionRange(),pj(r)};ns.compositionstart=ns.compositionupdate=r=>{r.observer.editContext||(r.inputState.compositionFirstChange==null&&(r.inputState.compositionFirstChange=!0),r.inputState.composing<0&&(r.inputState.composing=0))};ns.compositionend=r=>{r.observer.editContext||(r.inputState.composing=-1,r.inputState.compositionEndedAt=Date.now(),r.inputState.compositionPendingKey=!0,r.inputState.compositionPendingChange=r.observer.pendingRecords().length>0,r.inputState.compositionFirstChange=null,bt.chrome&&bt.android?r.observer.flushSoon():r.inputState.compositionPendingChange?Promise.resolve().then(()=>r.observer.flush()):setTimeout(()=>{r.inputState.composing<0&&r.docView.hasComposition&&r.update([])},50))};ns.contextmenu=r=>{r.inputState.lastContextMenu=Date.now()};Ps.beforeinput=(r,e)=>{var t,n;if(e.inputType=="insertReplacementText"&&r.observer.editContext){let a=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(a&&o.length){let s=o[0],l=r.posAtDOM(s.startContainer,s.startOffset),u=r.posAtDOM(s.endContainer,s.endOffset);return l3(r,{from:l,to:u,insert:r.state.toText(a)},null),!0}}let i;if(bt.chrome&&bt.android&&(i=sj.find(a=>a.inputType==e.inputType))&&(r.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let a=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>a+10&&r.hasFocus&&(r.contentDOM.blur(),r.focus())},100)}return bt.ios&&e.inputType=="deleteContentForward"&&r.observer.flushSoon(),bt.safari&&e.inputType=="insertText"&&r.inputState.composing>=0&&setTimeout(()=>ns.compositionend(r,e),20),!1};const kP=new Set;function _1e(r){kP.has(r)||(kP.add(r),r.addEventListener("copy",()=>{}),r.addEventListener("cut",()=>{}))}const MP=["pre-wrap","normal","pre-line","break-spaces"];let Tg=!1;function IP(){Tg=!1}class w1e{constructor(e){this.lineWrapping=e,this.doc=Kr.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return MP.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,l=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=i,this.lineLength=a,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>W_&&(Tg=!0),this.height=e)}replace(e,t,n){return Ca.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,i){let a=this,o=n.doc;for(let s=i.length-1;s>=0;s--){let{fromA:l,toA:u,fromB:c,toB:f}=i[s],h=a.lineAt(l,Fn.ByPosNoHeight,n.setDoc(t),0,0),d=h.to>=u?h:a.lineAt(u,Fn.ByPosNoHeight,n,0,0);for(f+=d.to-u,u=d.to;s>0&&h.from<=i[s-1].toA;)l=i[s-1].fromA,c=i[s-1].fromB,s--,la*2){let s=e[t-1];s.break?e.splice(--t,1,s.left,null,s.right):e.splice(--t,1,s.left,s.right),n+=1+s.break,i-=s.size}else if(a>i*2){let s=e[n];s.break?e.splice(n,1,s.left,null,s.right):e.splice(n,1,s.left,s.right),n+=2+s.break,a-=s.size}else break;else if(i=a&&o(this.blockAt(0,n,i,a))}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class uo extends gj{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,i){return new vl(i,this.length,n,this.height,this.breaks)}replace(e,t,n){let i=n[0];return n.length==1&&(i instanceof uo||i instanceof Ni&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Ni?i=new uo(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Ca.of(n)}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ni extends Ca{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,a=i-n+1,o,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*a);o=l/a,this.length>a+1&&(s=(this.height-l)/(this.length-a-1))}else o=this.height/a;return{firstLine:n,lastLine:i,perLine:o,perChar:s}}blockAt(e,t,n,i){let{firstLine:a,lastLine:o,perLine:s,perChar:l}=this.heightMetrics(t,i);if(t.lineWrapping){let u=i+(e0){let a=n[n.length-1];a instanceof Ni?n[n.length-1]=new Ni(a.length+i):n.push(null,new Ni(i-1))}if(e>0){let a=n[0];a instanceof Ni?n[0]=new Ni(e+a.length):n.unshift(new Ni(e-1),null)}return Ca.of(n)}decomposeLeft(e,t){t.push(new Ni(e-1),null)}decomposeRight(e,t){t.push(null,new Ni(this.length-e-1))}updateHeight(e,t=0,n=!1,i){let a=t+this.length;if(i&&i.from<=t+this.length&&i.more){let o=[],s=Math.max(t,i.from),l=-1;for(i.from>t&&o.push(new Ni(i.from-t-1).updateHeight(e,t));s<=a&&i.more;){let c=e.doc.lineAt(s).length;o.length&&o.push(null);let f=i.heights[i.index++];l==-1?l=f:Math.abs(f-l)>=W_&&(l=-2);let h=new uo(c,f);h.outdated=!1,o.push(h),s+=c+1}s<=a&&o.push(null,new Ni(a-s).updateHeight(e,s));let u=Ca.of(o);return(l<0||Math.abs(u.height-this.height)>=W_||Math.abs(l-this.heightMetrics(e,t).perLine)>=W_)&&(Tg=!0),_S(this,u)}else(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class A1e extends Ca{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,i){let a=n+this.left.height;return es))return u;let c=t==Fn.ByPosNoHeight?Fn.ByPosNoHeight:Fn.ByPos;return l?u.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,i,a).join(u)}forEachLine(e,t,n,i,a,o){let s=i+this.left.height,l=a+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,t,n,s,l,o);else{let u=this.lineAt(l,Fn.ByPos,n,i,a);e=e&&u.from<=t&&o(u),t>u.to&&this.right.forEachLine(u.to+1,t,n,s,l,o)}}replace(e,t,n){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,n));let a=[];e>0&&this.decomposeLeft(e,a);let o=a.length;for(let s of n)a.push(s);if(e>0&&LP(a,o-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,i=n+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?Ca.of(this.break?[e,null,t]:[e,t]):(this.left=_S(this.left,e),this.right=_S(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,i){let{left:a,right:o}=this,s=t+a.length+this.break,l=null;return i&&i.from<=t+a.length&&i.more?l=a=a.updateHeight(e,t,n,i):a.updateHeight(e,t,n),i&&i.from<=s+o.length&&i.more?l=o=o.updateHeight(e,s,n,i):o.updateHeight(e,s,n),l?this.balanced(a,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function LP(r,e){let t,n;r[e]==null&&(t=r[e-1])instanceof Ni&&(n=r[e+1])instanceof Ni&&r.splice(e-1,3,new Ni(t.length+1+n.length))}const C1e=5;class u3{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof uo?i.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new uo(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=C1e)&&this.addLineDeco(i,a,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new uo(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new Ni(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof uo)return e;let t=new uo(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let i=this.ensureLine();i.length+=n,i.collapsed+=n,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof uo)&&!this.isCovered?this.nodes.push(new uo(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let h=c.getBoundingClientRect();a=Math.max(a,h.left),o=Math.min(o,h.right),s=Math.max(s,h.top),l=Math.min(u==r.parentNode?i.innerHeight:l,h.bottom)}u=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:a-t.left,right:Math.max(a,o)-t.left,top:s-(t.top+e),bottom:Math.max(s,l)-(t.top+e)}}function T1e(r,e){let t=r.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class ax{constructor(e,t,n,i){this.from=e,this.to=t,this.size=n,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;ntypeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new w1e(t),this.stateDeco=e.facet(X0).filter(n=>typeof n!="function"),this.heightMap=Ca.empty().applyChanges(this.stateDeco,Kr.empty,this.heightOracle.setDoc(e.doc),[new Jo(0,0,0,e.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Jt.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let i=n?t.head:t.anchor;if(!e.some(({from:a,to:o})=>i>=a&&i<=o)){let{from:a,to:o}=this.lineBlockAt(i);e.push(new Q1(a,o))}}return this.viewports=e.sort((n,i)=>n.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?BP:new c3(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Tm(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(X0).filter(c=>typeof c!="function");let i=e.changedRanges,a=Jo.extendWithRanges(i,x1e(n,this.stateDeco,e?e.changes:hi.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);IP(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),a),(this.heightMap.height!=o||Tg)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=a.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(K$)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),i=this.heightOracle,a=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?Pn.RTL:Pn.LTR;let o=this.heightOracle.mustRefreshForWrapping(a),s=t.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let u=0,c=0;if(s.width&&s.height){let{scaleX:_,scaleY:w}=C$(t,s);(_>.005&&Math.abs(this.scaleX-_)>.005||w>.005&&Math.abs(this.scaleY-w)>.005)&&(this.scaleX=_,this.scaleY=w,u|=8,o=l=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,h=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=h)&&(this.paddingTop=f,this.paddingBottom=h,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=E$(e.scrollDOM);let p=(this.printing?T1e:E1e)(t,this.paddingTop),g=p.top-this.pixelViewport.top,v=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let y=s.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let _=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(_)&&(o=!0),o||i.lineWrapping&&Math.abs(y-this.contentDOMWidth)>i.charWidth){let{lineHeight:w,charWidth:S,textHeight:A}=e.docView.measureTextSize();o=w>0&&i.refresh(a,w,S,A,y/S,_),o&&(e.docView.minWidth=0,u|=8)}g>0&&v>0?c=Math.max(g,v):g<0&&v<0&&(c=Math.min(g,v)),IP();for(let w of this.viewports){let S=w.from==this.viewport.from?_:e.docView.measureVisibleLineHeights(w);this.heightMap=(o?Ca.empty().applyChanges(this.stateDeco,Kr.empty,this.heightOracle,[new Jo(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new S1e(w.from,S))}Tg&&(u|=2)}let b=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return b&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),u|=this.updateForViewport()),(u&2||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,a=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,l=new Q1(i.lineAt(o-n*1e3,Fn.ByHeight,a,0,0).from,i.lineAt(s+(1-n)*1e3,Fn.ByHeight,a,0,0).to);if(t){let{head:u}=t.range;if(ul.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(u,Fn.ByPos,a,0,0),h;t.y=="center"?h=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&u=s+Math.max(10,Math.min(n,250)))&&i>o-2*1e3&&a>1,o=i<<1;if(this.defaultTextDirection!=Pn.LTR&&!n)return[];let s=[],l=(c,f,h,d)=>{if(f-cc&&mm.from>=h.from&&m.to<=h.to&&Math.abs(m.from-c)m.fromy));if(!v){if(fb.from<=f&&b.to>=f)){let b=t.moveToLineBoundary(ze.cursor(f),!1,!0).head;b>c&&(f=b)}let m=this.gapSize(h,c,f,d),y=n||m<2e6?m:2e6;v=new ax(c,f,m,y)}s.push(v)},u=c=>{if(c.length2e6)for(let S of e)S.from>=c.from&&S.fromc.from&&l(c.from,d,c,f),pt.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];En.spans(e,this.viewport.from,this.viewport.to,{span(i,a){t.push({from:i,to:a})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,a)=>i.from!=t[a].from||i.to!=t[a].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Tm(this.heightMap.lineAt(e,Fn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Tm(this.heightMap.lineAt(this.scaler.fromDOM(e),Fn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Tm(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Q1{constructor(e,t){this.from=e,this.to=t}}function M1e(r,e,t){let n=[],i=r,a=0;return En.spans(t,r,e,{span(){},point(o,s){o>i&&(n.push({from:i,to:o}),a+=o-i),i=s}},20),i=1)return e[e.length-1].to;let n=Math.floor(r*t);for(let i=0;;i++){let{from:a,to:o}=e[i],s=o-a;if(n<=s)return a+n;n-=s}}function eb(r,e){let t=0;for(let{from:n,to:i}of r.ranges){if(e<=i){t+=e-n;break}t+=i-n}return t/r.total}function I1e(r,e){for(let t of r)if(e(t))return t}const BP={toDOM(r){return r},fromDOM(r){return r},scale:1,eq(r){return r==this}};class c3{constructor(e,t,n){let i=0,a=0,o=0;this.viewports=n.map(({from:s,to:l})=>{let u=t.lineAt(s,Fn.ByPos,e,0,0).top,c=t.lineAt(l,Fn.ByPos,e,0,0).bottom;return i+=c-u,{from:s,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let s of this.viewports)s.domTop=o+(s.top-a)*this.scale,o=s.domBottom=s.domTop+(s.bottom-s.top),a=s.bottom}toDOM(e){for(let t=0,n=0,i=0;;t++){let a=tt.from==e.viewports[n].from&&t.to==e.viewports[n].to):!1}}function Tm(r,e){if(e.scale==1)return r;let t=e.toDOM(r.top),n=e.toDOM(r.bottom);return new vl(r.from,r.length,t,n-t,Array.isArray(r._content)?r._content.map(i=>Tm(i,e)):r._content)}const tb=Dt.define({combine:r=>r.join(" ")}),Ek=Dt.define({combine:r=>r.indexOf(!0)>-1}),Tk=lf.newName(),vj=lf.newName(),mj=lf.newName(),yj={"&light":"."+vj,"&dark":"."+mj};function kk(r,e,t){return new lf(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,i=>{if(i=="&")return r;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):r+" "+n}})}const L1e=kk("."+Tk,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},yj),F1e={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},ox=bt.ie&&bt.ie_version<=11;class B1e{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new yye,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(bt.ie&&bt.ie_version<=11||bt.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(bt.chrome&&bt.chrome_version<126)&&(this.editContext=new P1e(e),e.state.facet(Ac)&&(e.contentDOM.editContext=this.editContext.editContext)),ox&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,i=this.selectionRange;if(n.state.facet(Ac)?n.root.activeElement!=this.dom:!U_(this.dom,i))return;let a=i.anchorNode&&n.docView.nearest(i.anchorNode);if(a&&a.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(bt.ie&&bt.ie_version<=11||bt.android&&bt.chrome)&&!n.state.selection.main.empty&&i.focusNode&&Ym(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Y0(e.root);if(!t)return!1;let n=bt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&O1e(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let i=U_(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let a=this.delayedAndroidKey;a&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=a.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&a.force&&Wp(this.dom,a.key,a.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,i=!1;for(let a of e){let o=this.readMutation(a);o&&(o.typeOver&&(i=!0),t==-1?{from:t,to:n}=o:(t=Math.min(o.from,t),n=Math.max(o.to,n)))}return{from:t,to:n,typeOver:i}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),i=this.selectionChanged&&U_(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let a=new Jye(this.view,e,t,n);return this.view.docView.domChanged={newSel:a.newSel?a.newSel.main:null},a}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,i=oj(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=OP(t,e.previousSibling||e.target.previousSibling,-1),i=OP(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ac)!=e.state.facet(Ac)&&(e.view.contentDOM.editContext=e.state.facet(Ac)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function OP(r,e,t){for(;e;){let n=wn.get(e);if(n&&n.parent==r)return n;let i=e.parentNode;e=i!=r.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function PP(r,e){let t=e.startContainer,n=e.startOffset,i=e.endContainer,a=e.endOffset,o=r.docView.domAtPos(r.state.selection.main.anchor);return Ym(o.node,o.offset,i,a)&&([t,n,i,a]=[i,a,t,n]),{anchorNode:t,anchorOffset:n,focusNode:i,focusOffset:a}}function O1e(r,e){if(e.getComposedRanges){let i=e.getComposedRanges(r.root)[0];if(i)return PP(r,i)}let t=null;function n(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return r.contentDOM.addEventListener("beforeinput",n,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",n,!0),t?PP(r,t):null}class P1e{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let{anchor:i}=e.state.selection.main,a=this.toEditorPos(n.updateRangeStart),o=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:a,drifted:!1});let s={from:a,to:o,insert:Kr.of(n.text.split(` +`))};s.from==this.from&&ithis.to&&(s.to=i),!(s.from==s.to&&!s.insert.length)&&(this.pendingContextChange=s,e.state.readOnly||l3(e,s,ze.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=n=>{let i=[],a=null;for(let o=this.toEditorPos(n.rangeStart),s=this.toEditorPos(n.rangeEnd);o{let i=[];for(let a of n.getTextFormats()){let o=a.underlineStyle,s=a.underlineThickness;if(o!="None"&&s!="None"){let l=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${s=="Thin"?1:2}px`;i.push(Jt.mark({attributes:{style:l}}).range(this.toEditorPos(a.rangeStart),this.toEditorPos(a.rangeEnd)))}}e.dispatch({effects:J$.of(Jt.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let i=Y0(n.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,i=this.pendingContextChange;return e.changes.iterChanges((a,o,s,l,u)=>{if(n)return;let c=u.length-(o-a);if(i&&o>=i.to)if(i.from==a&&i.to==o&&i.insert.eq(u)){i=this.pendingContextChange=null,t+=c,this.to+=c;return}else i=null,this.revertPending(e.state);if(a+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(athis.to||this.to-this.from+u.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(a),this.toContextPos(o),u.toString()),this.to+=c}t+=c}),i&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some(n=>!n.isUserEvent("input.type")&&n.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(n,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){let t=this.composing;return t&&t.drifted?t.editorBase+(e-t.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class St{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(a=>n(a,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||bye(e.parent)||document,this.viewState=new FP(e.state||en.create(e)),e.scrollTo&&e.scrollTo.is(Z1)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(xm).map(i=>new rx(i));for(let i of this.plugins)i.update(this);this.observer=new B1e(this),this.inputState=new i1e(this),this.inputState.ensureHandlers(this.plugins),this.docView=new pP(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof gi?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,i,a=this.state;for(let h of e){if(h.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=h.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,l=null;e.some(h=>h.annotation(hj))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=dj(a,o),l||(s=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(c=null)):this.observer.clear(),a.facet(en.phrases)!=this.state.facet(en.phrases))return this.setState(a);i=bS.create(this,a,e),i.flags|=s;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(f&&(f=f.map(h.changes)),h.scrollIntoView){let{main:d}=h.state.selection;f=new $p(d.empty?d:ze.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of h.effects)d.is(Z1)&&(f=d.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=wS.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Dm)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(tb)!=i.state.facet(tb)&&(this.viewState.mustMeasureContent=!0),(t||n||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let h of this.state.facet(Ak))try{h(i)}catch(d){Ya(this.state,d,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!oj(this,c)&&u.force&&Wp(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new FP(e),this.plugins=e.facet(xm).map(n=>new rx(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new pP(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(xm),n=e.state.facet(xm);if(t!=n){let i=[];for(let a of n){let o=t.indexOf(a);if(o<0)i.push(new rx(a));else{let s=this.plugins[o];s.mustUpdate=e,i.push(s)}}for(let a of this.plugins)a.mustUpdate!=e&&a.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,i=n.scrollTop*this.scaleY,{scrollAnchorPos:a,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(o<0)if(E$(n))a=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(i);a=d.from,o=d.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(d=>{try{return d.read(this)}catch(p){return Ya(this.state,p),RP}}),f=bS.create(this,this.state,[]),h=!1;f.flags|=l,t?t.flags|=l:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),h=this.docView.update(f),h&&this.docViewUpdate());for(let d=0;d1||p<-1){i=i+p,n.scrollTop=i/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let s of this.state.facet(Ak))s(t)}get themeClasses(){return Tk+" "+(this.state.facet(Ek)?mj:vj)+" "+this.state.facet(tb)}updateAttrs(){let e=NP(this,ej,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Ac)?"true":"false",class:"cm-content",style:`${bt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),NP(this,a3,t);let n=this.observer.ignore(()=>{let i=mk(this.contentDOM,this.contentAttrs,t),a=mk(this.dom,this.editorAttrs,e);return i||a});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let i of n.effects)if(i.is(St.announce)){t&&(this.announceDOM.textContent=""),t=!1;let a=this.announceDOM.appendChild(document.createElement("div"));a.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Dm);let e=this.state.facet(St.cspNonce);lf.mount(this.root,this.styleModules.concat(L1e).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tn.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return ix(this,e,bP(this,e,t,n))}moveByGroup(e,t){return ix(this,e,bP(this,e,t,n=>Zye(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),i=this.textDirectionAt(e.from),a=n[t?n.length-1:0];return ze.cursor(a.side(t,i)+e.from,a.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,n=!0){return Yye(this,e,t,n)}moveVertically(e,t,n){return ix(this,e,Xye(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),aj(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let i=this.state.doc.lineAt(e),a=this.bidiSpans(i),o=a[Fc.find(a,e-i.from,-1,t)];return vA(n,o.dir==Pn.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(X$)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>R1e)return U$(e.length);let t=this.textDirectionAt(e.from),n;for(let a of this.bidiCache)if(a.from==e.from&&a.dir==t&&(a.fresh||G$(a.isolates,n=dP(this,e))))return a.order;n||(n=dP(this,e));let i=Lye(e.text,t,n);return this.bidiCache.push(new wS(e.from,e.to,t,n,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||bt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{x$(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Z1.of(new $p(typeof e=="number"?ze.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Z1.of(new $p(ze.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ta.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ta.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=lf.newName(),i=[tb.of(n),Dm.of(kk(`.${n}`,e))];return t&&t.dark&&i.push(Ek.of(!0)),i}static baseTheme(e){return Ed.lowest(Dm.of(kk("."+Tk,e,yj)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),i=n&&wn.get(n)||wn.get(e);return((t=i==null?void 0:i.rootView)===null||t===void 0?void 0:t.view)||null}}St.styleModule=Dm;St.inputHandler=Y$;St.clipboardInputFilter=n3;St.clipboardOutputFilter=i3;St.scrollHandler=Q$;St.focusChangeEffect=Z$;St.perLineTextDirection=X$;St.exceptionSink=q$;St.updateListener=Ak;St.editable=Ac;St.mouseSelectionStyle=j$;St.dragMovesSelection=$$;St.clickAddsSelectionRange=W$;St.decorations=X0;St.outerDecorations=tj;St.atomicRanges=o3;St.bidiIsolatedRanges=rj;St.scrollMargins=nj;St.darkTheme=Ek;St.cspNonce=Dt.define({combine:r=>r.length?r[0]:""});St.contentAttributes=a3;St.editorAttributes=ej;St.lineWrapping=St.contentAttributes.of({class:"cm-lineWrapping"});St.announce=Sr.define();const R1e=4096,RP={};class wS{constructor(e,t,n,i,a,o){this.from=e,this.to=t,this.dir=n,this.isolates=i,this.fresh=a,this.order=o}static update(e,t){if(t.empty&&!e.some(a=>a.fresh))return e;let n=[],i=e.length?e[e.length-1].dir:Pn.LTR;for(let a=Math.max(0,e.length-10);a=0;i--){let a=n[i],o=typeof a=="function"?a(r):a;o&&vk(o,t)}return t}const N1e=bt.mac?"mac":bt.windows?"win":bt.linux?"linux":"key";function z1e(r,e){const t=r.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let i,a,o,s;for(let l=0;ln.concat(i),[]))),t}function G1e(r,e,t){return _j(bj(r.state),e,r,t)}let Cc=null;const U1e=4e3;function H1e(r,e=N1e){let t=Object.create(null),n=Object.create(null),i=(o,s)=>{let l=n[o];if(l==null)n[o]=s;else if(l!=s)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},a=(o,s,l,u,c)=>{var f,h;let d=t[o]||(t[o]=Object.create(null)),p=s.split(/ (?!$)/).map(m=>z1e(m,e));for(let m=1;m{let _=Cc={view:b,prefix:y,scope:o};return setTimeout(()=>{Cc==_&&(Cc=null)},U1e),!0}]})}let g=p.join(" ");i(g,!1);let v=d[g]||(d[g]={preventDefault:!1,stopPropagation:!1,run:((h=(f=d._any)===null||f===void 0?void 0:f.run)===null||h===void 0?void 0:h.slice())||[]});l&&v.run.push(l),u&&(v.preventDefault=!0),c&&(v.stopPropagation=!0)};for(let o of r){let s=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let u of s){let c=t[u]||(t[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let h in c)c[h].run.push(d=>f(d,Mk))}let l=o[e]||o.key;if(l)for(let u of s)a(u,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&a(u,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return t}let Mk=null;function _j(r,e,t,n){Mk=e;let i=pye(e),a=ea(i,0),o=qo(a)==i.length&&i!=" ",s="",l=!1,u=!1,c=!1;Cc&&Cc.view==t&&Cc.scope==n&&(s=Cc.prefix+" ",lj.indexOf(e.keyCode)<0&&(u=!0,Cc=null));let f=new Set,h=v=>{if(v){for(let m of v.run)if(!f.has(m)&&(f.add(m),m(t)))return v.stopPropagation&&(c=!0),!0;v.preventDefault&&(v.stopPropagation&&(c=!0),u=!0)}return!1},d=r[n],p,g;return d&&(h(d[s+rb(i,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(bt.windows&&e.ctrlKey&&e.altKey)&&(p=uf[e.keyCode])&&p!=i?(h(d[s+rb(p,e,!0)])||e.shiftKey&&(g=q0[e.keyCode])!=i&&g!=p&&h(d[s+rb(g,e,!1)]))&&(l=!0):o&&e.shiftKey&&h(d[s+rb(i,e,!0)])&&(l=!0),!l&&h(d._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),Mk=null,l}class i1{constructor(e,t,n,i,a){this.className=e,this.left=t,this.top=n,this.width=i,this.height=a}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let i=e.coordsAtPos(n.head,n.assoc||1);if(!i)return[];let a=wj(e);return[new i1(t,i.left-a.left,i.top-a.top,null,i.bottom-i.top)]}else return W1e(e,t,n)}}function wj(r){let e=r.scrollDOM.getBoundingClientRect();return{left:(r.textDirection==Pn.LTR?e.left:e.right-r.scrollDOM.clientWidth*r.scaleX)-r.scrollDOM.scrollLeft*r.scaleX,top:e.top-r.scrollDOM.scrollTop*r.scaleY}}function VP(r,e,t,n){let i=r.coordsAtPos(e,t*2);if(!i)return n;let a=r.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,s=r.posAtCoords({x:a.left+1,y:o}),l=r.posAtCoords({x:a.right-1,y:o});return s==null||l==null?n:{from:Math.max(n.from,Math.min(s,l)),to:Math.min(n.to,Math.max(s,l))}}function W1e(r,e,t){if(t.to<=r.viewport.from||t.from>=r.viewport.to)return[];let n=Math.max(t.from,r.viewport.from),i=Math.min(t.to,r.viewport.to),a=r.textDirection==Pn.LTR,o=r.contentDOM,s=o.getBoundingClientRect(),l=wj(r),u=o.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),f=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=s.right-(c?parseInt(c.paddingRight):0),d=xk(r,n),p=xk(r,i),g=d.type==bo.Text?d:null,v=p.type==bo.Text?p:null;if(g&&(r.lineWrapping||d.widgetLineBreaks)&&(g=VP(r,n,1,g)),v&&(r.lineWrapping||p.widgetLineBreaks)&&(v=VP(r,i,-1,v)),g&&v&&g.from==v.from&&g.to==v.to)return y(b(t.from,t.to,g));{let w=g?b(t.from,null,g):_(d,!1),S=v?b(null,t.to,v):_(p,!0),A=[];return(g||d).to<(v||p).from-(g&&v?1:0)||d.widgetLineBreaks>1&&w.bottom+r.defaultLineHeight/2T&&M.from=F)break;H>L&&E(Math.max($,L),w==null&&$<=T,Math.min(H,F),S==null&&H>=k,N.dir)}if(L=U.to+1,L>=F)break}return D.length==0&&E(T,w==null,k,S==null,r.textDirection),{top:C,bottom:x,horizontal:D}}function _(w,S){let A=s.top+(S?w.top:w.bottom);return{top:A,bottom:A,horizontal:[]}}}function $1e(r,e){return r.constructor==e.constructor&&r.eq(e)}class j1e{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet($_)!=e.state.facet($_)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet($_);for(;t!$1e(t,this.drawn[n]))){let t=this.dom.firstChild,n=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[n].constructor&&i.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const $_=Dt.define();function Sj(r){return[Ta.define(e=>new j1e(e,r)),$_.of(r)]}const Aj=!bt.ios,K0=Dt.define({combine(r){return Af(r,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function q1e(r={}){return[K0.of(r),Y1e,Z1e,X1e,K$.of(!0)]}function Cj(r){return r.startState.facet(K0)!=r.state.facet(K0)}const Y1e=Sj({above:!0,markers(r){let{state:e}=r,t=e.facet(K0),n=[];for(let i of e.selection.ranges){let a=i==e.selection.main;if(i.empty?!a||Aj:t.drawRangeCursor){let o=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=i.empty?i:ze.cursor(i.head,i.head>i.anchor?-1:1);for(let l of i1.forRange(r,o,s))n.push(l)}}return n},update(r,e){r.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=Cj(r);return t&&GP(r.state,e),r.docChanged||r.selectionSet||t},mount(r,e){GP(e.state,r)},class:"cm-cursorLayer"});function GP(r,e){e.style.animationDuration=r.facet(K0).cursorBlinkRate+"ms"}const Z1e=Sj({above:!1,markers(r){return r.state.selection.ranges.map(e=>e.empty?[]:i1.forRange(r,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(r,e){return r.docChanged||r.selectionSet||r.viewportChanged||Cj(r)},class:"cm-selectionLayer"}),Ik={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Aj&&(Ik[".cm-line"].caretColor=Ik[".cm-content"].caretColor="transparent !important");const X1e=Ed.highest(St.theme(Ik)),xj=Sr.define({map(r,e){return r==null?null:e.mapPos(r)}}),km=ji.define({create(){return null},update(r,e){return r!=null&&(r=e.changes.mapPos(r)),e.effects.reduce((t,n)=>n.is(xj)?n.value:t,r)}}),K1e=Ta.fromClass(class{constructor(r){this.view=r,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(r){var e;let t=r.state.field(km);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(r.startState.field(km)!=t||r.docChanged||r.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:r}=this,e=r.state.field(km),t=e!=null&&r.coordsAtPos(e);if(!t)return null;let n=r.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+r.scrollDOM.scrollLeft*r.scaleX,top:t.top-n.top+r.scrollDOM.scrollTop*r.scaleY,height:t.bottom-t.top}}drawCursor(r){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;r?(this.cursor.style.left=r.left/e+"px",this.cursor.style.top=r.top/t+"px",this.cursor.style.height=r.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(r){this.view.state.field(km)!=r&&this.view.dispatch({effects:xj.of(r)})}},{eventObservers:{dragover(r){this.setDropPos(this.view.posAtCoords({x:r.clientX,y:r.clientY}))},dragleave(r){(r.target==this.view.contentDOM||!this.view.contentDOM.contains(r.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Q1e(){return[km,K1e]}const Nv="-10000px";class Dj{constructor(e,t,n,i){this.facet=t,this.createTooltipView=n,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let a=null;this.tooltipViews=this.tooltips.map(o=>a=n(o,a))}update(e,t){var n;let i=e.state.facet(this.facet),a=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],s=t?[]:null;for(let l=0;lt[u]=l),t.length=s.length),this.input=i,this.tooltips=a,this.tooltipViews=o,!0}}function J1e(r){let{win:e}=r;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const sx=Dt.define({combine:r=>{var e,t,n;return{position:bt.ios?"absolute":((e=r.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=r.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=r.find(i=>i.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||J1e}}}),UP=new WeakMap,f3=Ta.fromClass(class{constructor(r){this.view=r,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=r.state.facet(sx);this.position=e.position,this.parent=e.parent,this.classes=r.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Dj(r,h3,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),r.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let r of this.manager.tooltipViews)this.intersectionObserver.observe(r.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(r){r.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(r,this.above);e&&this.observeIntersection();let t=e||r.geometryChanged,n=r.state.facet(sx);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(r,e){let t=r.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),r.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Nv,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var r,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(r=n.destroy)===null||r===void 0||r.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let r=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:a}=this.manager.tooltipViews[0];if(bt.gecko)t=a.offsetParent!=this.container.ownerDocument.body;else if(a.style.top==Nv&&a.style.left=="0px"){let o=a.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(t||this.position=="absolute")if(this.parent){let a=this.parent.getBoundingClientRect();a.width&&a.height&&(r=a.width/this.parent.offsetWidth,e=a.height/this.parent.offsetHeight)}else({scaleX:r,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),i=s3(this.view);return{visible:{left:n.left+i.left,top:n.top+i.top,right:n.right-i.right,bottom:n.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((a,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(a.pos):this.view.coordsAtPos(a.pos)}),size:this.manager.tooltipViews.map(({dom:a})=>a.getBoundingClientRect()),space:this.view.state.facet(sx).tooltipSpace(this.view),scaleX:r,scaleY:e,makeAbsolute:t}}writeMeasure(r){var e;if(r.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{visible:t,space:n,scaleX:i,scaleY:a}=r,o=[];for(let s=0;s=Math.min(t.bottom,n.bottom)||f.rightMath.min(t.right,n.right)+.1)){c.style.top=Nv;continue}let d=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,g=h.right-h.left,v=(e=UP.get(u))!==null&&e!==void 0?e:h.bottom-h.top,m=u.offset||tbe,y=this.view.textDirection==Pn.LTR,b=h.width>n.right-n.left?y?n.left:n.right-h.width:y?Math.max(n.left,Math.min(f.left-(d?14:0)+m.x,n.right-g)):Math.min(Math.max(n.left,f.left-g+(d?14:0)-m.x),n.right-g),_=this.above[s];!l.strictSide&&(_?f.top-v-p-m.yn.bottom)&&_==n.bottom-f.bottom>f.top-n.top&&(_=this.above[s]=!_);let w=(_?f.top-n.top:n.bottom-f.bottom)-p;if(wb&&C.topS&&(S=_?C.top-v-2-p:C.bottom+p+2);if(this.position=="absolute"?(c.style.top=(S-r.parent.top)/a+"px",c.style.left=(b-r.parent.left)/i+"px"):(c.style.top=S/a+"px",c.style.left=b/i+"px"),d){let C=f.left+(y?m.x:-m.x)-(b+14-7);d.style.left=C/i+"px"}u.overlap!==!0&&o.push({left:b,top:S,right:A,bottom:S+v}),c.classList.toggle("cm-tooltip-above",_),c.classList.toggle("cm-tooltip-below",!_),u.positioned&&u.positioned(r.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let r of this.manager.tooltipViews)r.dom.style.top=Nv}},{eventObservers:{scroll(){this.maybeMeasure()}}}),ebe=St.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),tbe={x:0,y:0},h3=Dt.define({enables:[f3,ebe]}),SS=Dt.define({combine:r=>r.reduce((e,t)=>e.concat(t),[])});class _A{static create(e){return new _A(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Dj(e,SS,(t,n)=>this.createHostedView(t,n),t=>t.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let i=n[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const rbe=h3.compute([SS],r=>{let e=r.facet(SS);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var n;return(n=t.end)!==null&&n!==void 0?n:t.pos})),create:_A.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class nbe{constructor(e,t,n,i,a){this.view=e,this.source=t,this.field=n,this.setHover=i,this.hoverTime=a,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;es.bottom||t.xs.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(c=>c.from<=i&&c.to>=i),u=l&&l.dir==Pn.RTL?-1:1;a=t.x{this.pending==s&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Ya(e.state,l,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(f3),t=e?e.manager.tooltips.findIndex(n=>n.create==_A.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:a}=this;if(i.length&&a&&!ibe(a.dom,e)||this.pending){let{pos:o}=i[0]||this.pending,s=(n=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:o;(o==s?this.view.posAtCoords(this.lastMove)!=o:!abe(this.view,o,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:n}=this;n&&n.dom.contains(e.relatedTarget)?this.watchTooltipLeave(n.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const nb=4;function ibe(r,e){let{left:t,right:n,top:i,bottom:a}=r.getBoundingClientRect(),o;if(o=r.querySelector(".cm-tooltip-arrow")){let s=o.getBoundingClientRect();i=Math.min(s.top,i),a=Math.max(s.bottom,a)}return e.clientX>=t-nb&&e.clientX<=n+nb&&e.clientY>=i-nb&&e.clientY<=a+nb}function abe(r,e,t,n,i,a){let o=r.scrollDOM.getBoundingClientRect(),s=r.documentTop+r.documentPadding.top+r.contentHeight;if(o.left>n||o.righti||Math.min(o.bottom,s)=e&&l<=t}function obe(r,e={}){let t=Sr.define(),n=ji.define({create(){return[]},update(i,a){if(i.length&&(e.hideOnChange&&(a.docChanged||a.selection)?i=[]:e.hideOn&&(i=i.filter(o=>!e.hideOn(a,o))),a.docChanged)){let o=[];for(let s of i){let l=a.changes.mapPos(s.pos,-1,Sa.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),s);u.pos=l,u.end!=null&&(u.end=a.changes.mapPos(u.end)),o.push(u)}}i=o}for(let o of a.effects)o.is(t)&&(i=o.value),o.is(sbe)&&(i=[]);return i},provide:i=>SS.from(i)});return{active:n,extension:[n,Ta.define(i=>new nbe(i,r,n,t,e.hoverTime||300)),rbe]}}function Ej(r,e){let t=r.plugin(f3);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}const sbe=Sr.define(),HP=Dt.define({combine(r){let e,t;for(let n of r)e=e||n.topContainer,t=t||n.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Q0(r,e){let t=r.plugin(Tj),n=t?t.specs.indexOf(e):-1;return n>-1?t.panels[n]:null}const Tj=Ta.fromClass(class{constructor(r){this.input=r.state.facet(J0),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(r));let e=r.state.facet(HP);this.top=new ib(r,!0,e.topContainer),this.bottom=new ib(r,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(r){let e=r.state.facet(HP);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ib(r.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ib(r.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=r.state.facet(J0);if(t!=this.input){let n=t.filter(l=>l),i=[],a=[],o=[],s=[];for(let l of n){let u=this.specs.indexOf(l),c;u<0?(c=l(r.view),s.push(c)):(c=this.panels[u],c.update&&c.update(r)),i.push(c),(c.top?a:o).push(c)}this.specs=n,this.panels=i,this.top.sync(a),this.bottom.sync(o);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let n of this.panels)n.update&&n.update(r)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:r=>St.scrollMargins.of(e=>{let t=e.plugin(r);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class ib{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=WP(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=WP(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function WP(r){let e=r.nextSibling;return r.remove(),e}const J0=Dt.define({enables:Tj});class kg extends sd{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}kg.prototype.elementClass="";kg.prototype.toDOM=void 0;kg.prototype.mapMode=Sa.TrackBefore;kg.prototype.startSide=kg.prototype.endSide=-1;kg.prototype.point=!0;let lbe=0;class Wo{constructor(e,t,n,i){this.name=e,this.set=t,this.base=n,this.modified=i,this.id=lbe++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof Wo&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Wo(n,[],null,[]);if(i.set.push(i),t)for(let a of t.set)i.set.push(a);return i}static defineModifier(e){let t=new AS(e);return n=>n.modified.indexOf(t)>-1?n:AS.get(n.base||n,n.modified.concat(t).sort((i,a)=>i.id-a.id))}}let ube=0;class AS{constructor(e){this.name=e,this.instances=[],this.id=ube++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(s=>s.base==e&&cbe(t,s.modified));if(n)return n;let i=[],a=new Wo(e.name,i,e,t);for(let s of t)s.instances.push(a);let o=fbe(t);for(let s of e.set)if(!s.modified.length)for(let l of o)i.push(AS.get(s,l));return a}}function cbe(r,e){return r.length==e.length&&r.every((t,n)=>t==e[n])}function fbe(r){let e=[[]];for(let t=0;tn.length-t.length)}function kj(r){let e=Object.create(null);for(let t in r){let n=r[t];Array.isArray(n)||(n=[n]);for(let i of t.split(" "))if(i){let a=[],o=2,s=i;for(let f=0;;){if(s=="..."&&f>0&&f+3==i.length){o=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!h)throw new RangeError("Invalid path: "+i);if(a.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==i.length)break;let d=i[f++];if(f==i.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+i);s=i.slice(f)}let l=a.length-1,u=a[l];if(!u)throw new RangeError("Invalid path: "+i);let c=new CS(n,o,l>0?a.slice(0,l):null);e[u]=c.sort(e[u])}}return Mj.add(e)}const Mj=new Pr;class CS{constructor(e,t,n,i){this.tags=e,this.mode=t,this.context=n,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=i;for(let s of a)for(let l of s.set){let u=t[l.id];if(u){o=o?o+" "+u:u;break}}return o},scope:n}}function hbe(r,e){let t=null;for(let n of r){let i=n.style(e);i&&(t=t?t+" "+i:i)}return t}function dbe(r,e,t,n=0,i=r.length){let a=new pbe(n,Array.isArray(e)?e:[e],t);a.highlightRange(r.cursor(),n,i,"",a.highlighters),a.flush(i)}class pbe{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,a){let{type:o,from:s,to:l}=e;if(s>=n||l<=t)return;o.isTop&&(a=this.highlighters.filter(d=>!d.scope||d.scope(o)));let u=i,c=gbe(e)||CS.empty,f=hbe(a,c.tags);if(f&&(u&&(u+=" "),u+=f,c.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(t,s),u),c.opaque)return;let h=e.tree&&e.tree.prop(Pr.mounted);if(h&&h.overlay){let d=e.node.enter(h.overlay[0].from+s,1),p=this.highlighters.filter(v=>!v.scope||v.scope(h.tree.type)),g=e.firstChild();for(let v=0,m=s;;v++){let y=v=b||!e.nextSibling())););if(!y||b>n)break;m=y.to+s,m>t&&(this.highlightRange(d.cursor(),Math.max(t,y.from+s),Math.min(n,m),"",p),this.startSpan(Math.min(n,m),u))}g&&e.parent()}else if(e.firstChild()){h&&(i="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,i,a),this.startSpan(Math.min(n,e.to),u)}while(e.nextSibling());e.parent()}}}function gbe(r){let e=r.type.prop(Mj);for(;e&&e.context&&!r.matchContext(e.context);)e=e.next;return e||null}const it=Wo.define,ab=it(),yc=it(),$P=it(yc),jP=it(yc),bc=it(),ob=it(bc),lx=it(bc),rl=it(),Ff=it(rl),Ys=it(),Zs=it(),Lk=it(),zv=it(Lk),sb=it(),O={comment:ab,lineComment:it(ab),blockComment:it(ab),docComment:it(ab),name:yc,variableName:it(yc),typeName:$P,tagName:it($P),propertyName:jP,attributeName:it(jP),className:it(yc),labelName:it(yc),namespace:it(yc),macroName:it(yc),literal:bc,string:ob,docString:it(ob),character:it(ob),attributeValue:it(ob),number:lx,integer:it(lx),float:it(lx),bool:it(bc),regexp:it(bc),escape:it(bc),color:it(bc),url:it(bc),keyword:Ys,self:it(Ys),null:it(Ys),atom:it(Ys),unit:it(Ys),modifier:it(Ys),operatorKeyword:it(Ys),controlKeyword:it(Ys),definitionKeyword:it(Ys),moduleKeyword:it(Ys),operator:Zs,derefOperator:it(Zs),arithmeticOperator:it(Zs),logicOperator:it(Zs),bitwiseOperator:it(Zs),compareOperator:it(Zs),updateOperator:it(Zs),definitionOperator:it(Zs),typeOperator:it(Zs),controlOperator:it(Zs),punctuation:Lk,separator:it(Lk),bracket:zv,angleBracket:it(zv),squareBracket:it(zv),paren:it(zv),brace:it(zv),content:rl,heading:Ff,heading1:it(Ff),heading2:it(Ff),heading3:it(Ff),heading4:it(Ff),heading5:it(Ff),heading6:it(Ff),contentSeparator:it(rl),list:it(rl),quote:it(rl),emphasis:it(rl),strong:it(rl),link:it(rl),monospace:it(rl),strikethrough:it(rl),inserted:it(),deleted:it(),changed:it(),invalid:it(),meta:sb,documentMeta:it(sb),annotation:it(sb),processingInstruction:it(sb),definition:Wo.defineModifier("definition"),constant:Wo.defineModifier("constant"),function:Wo.defineModifier("function"),standard:Wo.defineModifier("standard"),local:Wo.defineModifier("local"),special:Wo.defineModifier("special")};for(let r in O){let e=O[r];e instanceof Wo&&(e.name=r)}Ij([{tag:O.link,class:"tok-link"},{tag:O.heading,class:"tok-heading"},{tag:O.emphasis,class:"tok-emphasis"},{tag:O.strong,class:"tok-strong"},{tag:O.keyword,class:"tok-keyword"},{tag:O.atom,class:"tok-atom"},{tag:O.bool,class:"tok-bool"},{tag:O.url,class:"tok-url"},{tag:O.labelName,class:"tok-labelName"},{tag:O.inserted,class:"tok-inserted"},{tag:O.deleted,class:"tok-deleted"},{tag:O.literal,class:"tok-literal"},{tag:O.string,class:"tok-string"},{tag:O.number,class:"tok-number"},{tag:[O.regexp,O.escape,O.special(O.string)],class:"tok-string2"},{tag:O.variableName,class:"tok-variableName"},{tag:O.local(O.variableName),class:"tok-variableName tok-local"},{tag:O.definition(O.variableName),class:"tok-variableName tok-definition"},{tag:O.special(O.variableName),class:"tok-variableName2"},{tag:O.definition(O.propertyName),class:"tok-propertyName tok-definition"},{tag:O.typeName,class:"tok-typeName"},{tag:O.namespace,class:"tok-namespace"},{tag:O.className,class:"tok-className"},{tag:O.macroName,class:"tok-macroName"},{tag:O.propertyName,class:"tok-propertyName"},{tag:O.operator,class:"tok-operator"},{tag:O.comment,class:"tok-comment"},{tag:O.meta,class:"tok-meta"},{tag:O.invalid,class:"tok-invalid"},{tag:O.punctuation,class:"tok-punctuation"}]);var ux;const Cp=new Pr;function vbe(r){return Dt.define({combine:r?e=>e.concat(r):void 0})}const mbe=new Pr;class Cs{constructor(e,t,n=[],i=""){this.data=e,this.name=i,en.prototype.hasOwnProperty("tree")||Object.defineProperty(en.prototype,"tree",{get(){return aa(this)}}),this.parser=t,this.extension=[Ig.of(this),en.languageData.of((a,o,s)=>{let l=qP(a,o,s),u=l.type.prop(Cp);if(!u)return[];let c=a.facet(u),f=l.type.prop(mbe);if(f){let h=l.resolve(o-l.from,s);for(let d of f)if(d.test(h,a)){let p=a.facet(d.facet);return d.type=="replace"?p:p.concat(c)}}return c})].concat(n)}isActiveAt(e,t,n=-1){return qP(e,t,n).type.prop(Cp)==this.data}findRegions(e){let t=e.facet(Ig);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],i=(a,o)=>{if(a.prop(Cp)==this.data){n.push({from:o,to:o+a.length});return}let s=a.prop(Pr.mounted);if(s){if(s.tree.prop(Cp)==this.data){if(s.overlay)for(let l of s.overlay)n.push({from:l.from+o,to:l.to+o});else n.push({from:o,to:o+a.length});return}else if(s.overlay){let l=n.length;if(i(s.tree,s.overlay[0].from+o),n.length>l)return}}for(let l=0;ln.isTop?t:void 0)]}),e.name)}configure(e,t){return new xS(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function aa(r){let e=r.field(Cs.state,!1);return e?e.tree:Vi.empty}class ybe{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let Vv=null;class DS{constructor(e,t,n=[],i,a,o,s,l){this.parser=e,this.state=t,this.fragments=n,this.tree=i,this.treeLen=a,this.viewport=o,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new DS(e,t,[],Vi.empty,0,n,[],null)}startParse(){return this.parser.startParse(new ybe(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Vi.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped($h.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Vv;Vv=this;try{return e()}finally{Vv=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=YP(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,f,h)=>l.push({fromA:u,toA:c,fromB:f,toB:h})),n=$h.applyChanges(n,l),i=Vi.empty,a=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){s=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),f=e.mapPos(u.to,-1);ce.from&&(this.fragments=YP(this.fragments,i,a),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends o${createParse(t,n,i){let a=i[0].from,o=i[i.length-1].to;return{parsedPos:a,advance(){let l=Vv;if(l){for(let u of i)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new Vi(eo.none,[],[],o-a)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Vv}}function YP(r,e,t){return $h.applyChanges(r,[{fromA:e,toA:t,fromB:e,toB:t}])}class Mg{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new Mg(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=DS.create(e.facet(Ig).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new Mg(n)}}Cs.state=ji.define({create:Mg.init,update(r,e){for(let t of e.effects)if(t.is(Cs.setState))return t.value;return e.startState.facet(Ig)!=e.state.facet(Ig)?Mg.init(e.state):r.apply(e)}});let Lj=r=>{let e=setTimeout(()=>r(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Lj=r=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(r,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const cx=typeof navigator<"u"&&(!((ux=navigator.scheduling)===null||ux===void 0)&&ux.isInputPending)?()=>navigator.scheduling.isInputPending():null,bbe=Ta.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Cs.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Cs.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Lj(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,l=a.context.work(()=>cx&&cx()||Date.now()>o,i+(s?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(a.context.takeTree(),this.view.dispatch({effects:Cs.setState.of(new Mg(a.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(a.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Ya(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ig=Dt.define({combine(r){return r.length?r[0]:null},enables:r=>[Cs.state,bbe,St.contentAttributes.compute([r],e=>{let t=e.facet(r);return t&&t.name?{"data-language":t.name}:{}})]});class _be{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const wbe=Dt.define(),d3=Dt.define({combine:r=>{if(!r.length)return" ";let e=r[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return e}});function ES(r){let e=r.facet(d3);return e.charCodeAt(0)==9?r.tabSize*e.length:e.length}function ey(r,e){let t="",n=r.tabSize,i=r.facet(d3)[0];if(i==" "){for(;e>=n;)t+=" ",e-=n;i=" "}for(let a=0;a=e?Sbe(r,t,e):null}class wA{constructor(e,t={}){this.state=e,this.options=t,this.unit=ES(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:a}=this.options;return i!=null&&i>=n.from&&i<=n.to?a&&i==e?{text:"",from:e}:(t<0?i-1&&(a+=o-this.countColumn(n,n.search(/\S|$/))),a}countColumn(e,t=e.length){return gA(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:i}=this.lineAt(e,t),a=this.options.overrideIndentation;if(a){let o=a(i);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Fj=new Pr;function Sbe(r,e,t){let n=e.resolveStack(t),i=n.node.enterUnfinishedNodesBefore(t);if(i!=n.node){let a=[];for(let o=i;o!=n.node;o=o.parent)a.push(o);for(let o=a.length-1;o>=0;o--)n={node:a[o],next:n}}return Bj(n,r,t)}function Bj(r,e,t){for(let n=r;n;n=n.next){let i=Cbe(n.node);if(i)return i(g3.create(e,t,n))}return 0}function Abe(r){return r.pos==r.options.simulateBreak&&r.options.simulateDoubleBreak}function Cbe(r){let e=r.type.prop(Fj);if(e)return e;let t=r.firstChild,n;if(t&&(n=t.type.prop(Pr.closedBy))){let i=r.lastChild,a=i&&n.indexOf(i.name)>-1;return o=>Tbe(o,!0,1,void 0,a&&!Abe(o)?i.from:void 0)}return r.parent==null?xbe:null}function xbe(){return 0}class g3 extends wA{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new g3(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Dbe(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Bj(this.context.next,this.base,this.pos)}}function Dbe(r,e){for(let t=e;t;t=t.parent)if(r==t)return!0;return!1}function Ebe(r){let e=r.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let i=r.options.simulateBreak,a=r.state.doc.lineAt(t.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let s=t.to;;){let l=e.childAfter(s);if(!l||l==n)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let u=/^ */.exec(a.text.slice(t.to-a.from))[0].length;return{from:t.from,to:t.to+u}}s=l.to}}function Tbe(r,e,t,n,i){let a=r.textAfter,o=a.match(/^\s*/)[0].length,s=i==r.pos+o,l=Ebe(r);return l?s?r.column(l.from):r.column(l.to):r.baseIndent+(s?0:r.unit*t)}function kbe({except:r,units:e=1}={}){return t=>{let n=r&&r.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const Mbe=200;function Ibe(){return en.transactionFilter.of(r=>{if(!r.docChanged||!r.isUserEvent("input.type")&&!r.isUserEvent("input.complete"))return r;let e=r.startState.languageDataAt("indentOnInput",r.startState.selection.main.head);if(!e.length)return r;let t=r.newDoc,{head:n}=r.newSelection.main,i=t.lineAt(n);if(n>i.from+Mbe)return r;let a=t.sliceString(i.from,n);if(!e.some(u=>u.test(a)))return r;let{state:o}=r,s=-1,l=[];for(let{head:u}of o.selection.ranges){let c=o.doc.lineAt(u);if(c.from==s)continue;s=c.from;let f=p3(o,c.from);if(f==null)continue;let h=/^\s*/.exec(c.text)[0],d=ey(o,f);h!=d&&l.push({from:c.from,to:c.from+h.length,insert:d})}return l.length?[r,{changes:l,sequential:!0}]:r})}const Lbe=Dt.define(),Oj=new Pr;function Fbe(r,e,t){let n=aa(r);if(n.lengtht)continue;if(a&&s.from=e&&u.to>t&&(a=u)}}return a}function Bbe(r){let e=r.lastChild;return e&&e.to==r.to&&e.type.isError}function Pj(r,e,t){for(let n of r.facet(Lbe)){let i=n(r,e,t);if(i)return i}return Fbe(r,e,t)}function Rj(r,e){let t=e.mapPos(r.from,1),n=e.mapPos(r.to,-1);return t>=n?void 0:{from:t,to:n}}const v3=Sr.define({map:Rj}),SA=Sr.define({map:Rj});function Nj(r){let e=[];for(let{head:t}of r.state.selection.ranges)e.some(n=>n.from<=t&&n.to>=t)||e.push(r.lineBlockAt(t));return e}const a1=ji.define({create(){return Jt.none},update(r,e){r=r.map(e.changes);for(let t of e.effects)if(t.is(v3)&&!Obe(r,t.value.from,t.value.to)){let{preparePlaceholder:n}=e.state.facet(Uj),i=n?Jt.replace({widget:new Hbe(n(e.state,t.value))}):ZP;r=r.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(SA)&&(r=r.update({filter:(n,i)=>t.value.from!=n||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:n}=e.selection.main;r.between(n,n,(i,a)=>{in&&(t=!0)}),t&&(r=r.update({filterFrom:n,filterTo:n,filter:(i,a)=>a<=n||i>=n}))}return r},provide:r=>St.decorations.from(r),toJSON(r,e){let t=[];return r.between(0,e.doc.length,(n,i)=>{t.push(n,i)}),t},fromJSON(r){if(!Array.isArray(r)||r.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!i||i.from>a)&&(i={from:a,to:o})}),i}function Obe(r,e,t){let n=!1;return r.between(e,e,(i,a)=>{i==e&&a==t&&(n=!0)}),n}function Vj(r,e){return r.field(a1,!1)?e:e.concat(Sr.appendConfig.of(Ube()))}const Pbe=r=>{for(let e of Nj(r)){let t=Pj(r.state,e.from,e.to);if(t)return r.dispatch({effects:Vj(r.state,[v3.of(t),Gj(r,t)])}),!0}return!1},Rbe=r=>{if(!r.state.field(a1,!1))return!1;let e=[];for(let t of Nj(r)){let n=zj(r.state,t.from,t.to);n&&e.push(SA.of(n),Gj(r,n,!1))}return e.length&&r.dispatch({effects:e}),e.length>0};function Gj(r,e,t=!0){let n=r.state.doc.lineAt(e.from).number,i=r.state.doc.lineAt(e.to).number;return St.announce.of(`${r.state.phrase(t?"Folded lines":"Unfolded lines")} ${n} ${r.state.phrase("to")} ${i}.`)}const Nbe=r=>{let{state:e}=r,t=[];for(let n=0;n{let e=r.state.field(a1,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,r.state.doc.length,(n,i)=>{t.push(SA.of({from:n,to:i}))}),r.dispatch({effects:t}),!0},Vbe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Pbe},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Rbe},{key:"Ctrl-Alt-[",run:Nbe},{key:"Ctrl-Alt-]",run:zbe}],Gbe={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Uj=Dt.define({combine(r){return Af(r,Gbe)}});function Ube(r){return[a1,Wbe]}function Hj(r,e){let{state:t}=r,n=t.facet(Uj),i=o=>{let s=r.lineBlockAt(r.posAtDOM(o.target)),l=zj(r.state,s.from,s.to);l&&r.dispatch({effects:SA.of(l)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(r,i,e);let a=document.createElement("span");return a.textContent=n.placeholderText,a.setAttribute("aria-label",t.phrase("folded code")),a.title=t.phrase("unfold"),a.className="cm-foldPlaceholder",a.onclick=i,a}const ZP=Jt.replace({widget:new class extends iv{toDOM(r){return Hj(r,null)}}});class Hbe extends iv{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Hj(e,this.value)}}const Wbe=St.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class o1{constructor(e,t){this.specs=e;let n;function i(s){let l=lf.newName();return(n||(n=Object.create(null)))["."+l]=s,l}const a=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof Cs?s=>s.prop(Cp)==o.data:o?s=>s==o:void 0,this.style=Ij(e.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:a}).style,this.module=n?new lf(n):null,this.themeType=t.themeType}static define(e,t){return new o1(e,t||{})}}const Fk=Dt.define(),Wj=Dt.define({combine(r){return r.length?[r[0]]:null}});function fx(r){let e=r.facet(Fk);return e.length?e:r.facet(Wj)}function $j(r,e){let t=[jbe],n;return r instanceof o1&&(r.module&&t.push(St.styleModule.of(r.module)),n=r.themeType),e!=null&&e.fallback?t.push(Wj.of(r)):n?t.push(Fk.computeN([St.darkTheme],i=>i.facet(St.darkTheme)==(n=="dark")?[r]:[])):t.push(Fk.of(r)),t}class $be{constructor(e){this.markCache=Object.create(null),this.tree=aa(e.state),this.decorations=this.buildDeco(e,fx(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=aa(e.state),n=fx(e.state),i=n!=fx(e.startState),{viewport:a}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=a.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=a.to)}buildDeco(e,t){if(!t||!this.tree.length)return Jt.none;let n=new xg;for(let{from:i,to:a}of e.visibleRanges)dbe(this.tree,t,(o,s,l)=>{n.add(o,s,this.markCache[l]||(this.markCache[l]=Jt.mark({class:l})))},i,a);return n.finish()}}const jbe=Ed.high(Ta.fromClass($be,{decorations:r=>r.decorations})),qbe=o1.define([{tag:O.meta,color:"#404740"},{tag:O.link,textDecoration:"underline"},{tag:O.heading,textDecoration:"underline",fontWeight:"bold"},{tag:O.emphasis,fontStyle:"italic"},{tag:O.strong,fontWeight:"bold"},{tag:O.strikethrough,textDecoration:"line-through"},{tag:O.keyword,color:"#708"},{tag:[O.atom,O.bool,O.url,O.contentSeparator,O.labelName],color:"#219"},{tag:[O.literal,O.inserted],color:"#164"},{tag:[O.string,O.deleted],color:"#a11"},{tag:[O.regexp,O.escape,O.special(O.string)],color:"#e40"},{tag:O.definition(O.variableName),color:"#00f"},{tag:O.local(O.variableName),color:"#30a"},{tag:[O.typeName,O.namespace],color:"#085"},{tag:O.className,color:"#167"},{tag:[O.special(O.variableName),O.macroName],color:"#256"},{tag:O.definition(O.propertyName),color:"#00c"},{tag:O.comment,color:"#940"},{tag:O.invalid,color:"#f00"}]),Ybe=St.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),jj=1e4,qj="()[]{}",Yj=Dt.define({combine(r){return Af(r,{afterCursor:!0,brackets:qj,maxScanDistance:jj,renderMatch:Kbe})}}),Zbe=Jt.mark({class:"cm-matchingBracket"}),Xbe=Jt.mark({class:"cm-nonmatchingBracket"});function Kbe(r){let e=[],t=r.matched?Zbe:Xbe;return e.push(t.range(r.start.from,r.start.to)),r.end&&e.push(t.range(r.end.from,r.end.to)),e}const Qbe=ji.define({create(){return Jt.none},update(r,e){if(!e.docChanged&&!e.selection)return r;let t=[],n=e.state.facet(Yj);for(let i of e.state.selection.ranges){if(!i.empty)continue;let a=wl(e.state,i.head,-1,n)||i.head>0&&wl(e.state,i.head-1,1,n)||n.afterCursor&&(wl(e.state,i.head,1,n)||i.headSt.decorations.from(r)}),Jbe=[Qbe,Ybe];function e_e(r={}){return[Yj.of(r),Jbe]}const t_e=new Pr;function Bk(r,e,t){let n=r.prop(e<0?Pr.openedBy:Pr.closedBy);if(n)return n;if(r.name.length==1){let i=t.indexOf(r.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function Ok(r){let e=r.type.prop(t_e);return e?e(r.node):r}function wl(r,e,t,n={}){let i=n.maxScanDistance||jj,a=n.brackets||qj,o=aa(r),s=o.resolveInner(e,t);for(let l=s;l;l=l.parent){let u=Bk(l.type,t,a);if(u&&l.from0?e>=c.from&&ec.from&&e<=c.to))return r_e(r,e,t,l,c,u,a)}}return n_e(r,e,t,o,s.type,i,a)}function r_e(r,e,t,n,i,a,o){let s=n.parent,l={from:i.from,to:i.to},u=0,c=s==null?void 0:s.cursor();if(c&&(t<0?c.childBefore(n.from):c.childAfter(n.to)))do if(t<0?c.to<=n.from:c.from>=n.to){if(u==0&&a.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:t<0?e-1:e,to:t>0?e+1:e},c=r.doc.iterRange(e,t>0?r.doc.length:0),f=0;for(let h=0;!c.next().done&&h<=a;){let d=c.value;t<0&&(h+=d.length);let p=e+h*t;for(let g=t>0?0:d.length-1,v=t>0?d.length:-1;g!=v;g+=t){let m=o.indexOf(d[g]);if(!(m<0||n.resolveInner(p+g,1).type!=i))if(m%2==0==t>0)f++;else{if(f==1)return{start:u,end:{from:p+g,to:p+g+1},matched:m>>1==l>>1};f--}}t>0&&(h+=d.length)}return c.done?{start:u,matched:!1}:null}const i_e=Object.create(null),XP=[eo.none],KP=[],QP=Object.create(null),a_e=Object.create(null);for(let[r,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])a_e[r]=o_e(i_e,e);function hx(r,e){KP.indexOf(r)>-1||(KP.push(r),console.warn(e))}function o_e(r,e){let t=[];for(let s of e.split(" ")){let l=[];for(let u of s.split(".")){let c=r[u]||O[u];c?typeof c=="function"?l.length?l=l.map(c):hx(u,`Modifier ${u} used at start of tag`):l.length?hx(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:hx(u,`Unknown highlighting tag ${u}`)}for(let u of l)t.push(u)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),i=n+" "+t.map(s=>s.id),a=QP[i];if(a)return a.id;let o=QP[i]=eo.define({id:XP.length,name:n,props:[kj({[n]:t})]});return XP.push(o),o.id}Pn.RTL,Pn.LTR;var JP={};class TS{constructor(e,t,n,i,a,o,s,l,u,c=0,f){this.p=e,this.stack=t,this.state=n,this.reducePos=i,this.pos=a,this.score=o,this.buffer=s,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let i=e.parser.context;return new TS(e,[],t,n,n,0,[],0,i?new eR(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,i=e&65535,{parser:a}=this.p,o=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,u)}storeNode(e,t,n,i=4,a=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[s-4]==0&&o.buffer[s-1]>-1){if(t==n)return;if(o.buffer[s-2]>=t){o.buffer[s-2]=n;return}}}if(!a||this.pos==n)this.buffer.push(e,t,n,i);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let s=!1;for(let l=o;l>0&&this.buffer[l-2]>n;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=i}}shift(e,t,n,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4);else{let a=e,{parser:o}=this.p;(i>this.pos||t<=o.maxNode)&&(this.pos=i,o.stateFlag(a,1)||(this.reducePos=i)),this.pushState(a,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,i,4)}}apply(e,t,n,i){e&65536?this.reduce(e):this.shift(e,t,n,i)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(n,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new TS(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new s_e(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let a=0,o;al&1&&s==o)||i.push(t[a],o)}t=i}let n=[];for(let i=0;i>19,i=t&65535,a=this.stack.length-n*3;if(a<0||e.getGoto(this.stack[a],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(i,a)=>{if(!t.includes(i))return t.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let s=(o>>19)-a;if(s>1){let l=o&65535,u=this.stack.length-s*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return s<<19|65536|l}}else{let s=n(o,a+1);if(s!=null)return s}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class eR{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class s_e{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class kS{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new kS(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new kS(this.stack,this.pos,this.index)}}function lb(r,e=Uint16Array){if(typeof r!="string")return r;let t=null;for(let n=0,i=0;n=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,s=!0),a+=l,s)break;a*=46}t?t[i++]=a:t=new e(a)}return t}class j_{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const tR=new j_;class l_e{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=tR,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,i=this.rangeIndex,a=this.pos+e;for(;an.to:a>=n.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];a+=o.from-n.to,n=o}return a}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,i;if(t>=0&&t=this.chunk2Pos&&ns.to&&(this.chunk2=this.chunk2.slice(0,s.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=tR,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return n}}class jp{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;c_e(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}jp.prototype.contextual=jp.prototype.fallback=jp.prototype.extend=!1;jp.prototype.fallback=jp.prototype.extend=!1;class u_e{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function c_e(r,e,t,n,i,a){let o=0,s=1<0){let p=r[d];if(l.allows(p)&&(e.token.value==-1||e.token.value==p||f_e(p,e.token.value,i,a))){e.acceptToken(p);break}}let c=e.next,f=0,h=r[o+2];if(e.next<0&&h>f&&r[u+h*3-3]==65535){o=r[u+h*3-1];continue e}for(;f>1,p=u+d+(d<<1),g=r[p],v=r[p+1]||65536;if(c=v)f=d+1;else{o=r[p+2],e.advance();continue e}}break}}function rR(r,e,t){for(let n=e,i;(i=r[n])!=65535;n++)if(i==t)return n-e;return-1}function f_e(r,e,t,n){let i=rR(t,n,e);return i<0||rR(t,n,r)e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(r.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:r.length}}class h_e{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?nR(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?nR(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(a instanceof Vi){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(a),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+a.length}}}class d_e{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new j_)}getActions(e){let t=0,n=null,{parser:i}=e.p,{tokenizers:a}=i,o=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let u=0;uf.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let h=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!c.extend&&(n=f,t>h))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new j_,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new j_,{pos:n,p:i}=e;return t.start=n,t.end=Math.min(n+1,i.stream.end),t.value=n==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,n){let i=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(i,e),n),e.value>-1){let{parser:a}=n.p;for(let o=0;o=0&&n.p.parser.dialect.allows(s>>1)){s&1?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,n,i){for(let a=0;ae.bufferLength*4?new h_e(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],i,a;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;ot)n.push(s);else{if(this.advanceStack(s,n,e))continue;{i||(i=[],a=[]),i.push(s);let l=this.tokens.getMainToken(s);a.push(l.value,l.end)}}break}}if(!n.length){let o=i&&v_e(i);if(o)return io&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw io&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,a,n);if(o)return io&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(n.length>o)for(n.sort((s,l)=>l.score-s.score);n.length>o;)n.pop();n.some(s=>s.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let o=0;o500&&u.buffer.length>500)if((s.score-u.score||s.buffer.length-u.buffer.length)>0)n.splice(l--,1);else{n.splice(o--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let h=this.parser.nodeSet.types[f.type.id]==f.type?a.getGoto(e.state,f.type.id):-1;if(h>-1&&f.length&&(!u||(f.prop(Pr.contextHash)||0)==c))return e.useNode(f,h),io&&console.log(o+this.stackID(e)+` (via reuse of ${a.getName(f.type.id)})`),!0;if(!(f instanceof Vi)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof Vi&&f.positions[0]==0)f=d;else break}}let s=a.stateSlot(e.state,4);if(s>0)return e.reduce(s),io&&console.log(o+this.stackID(e)+` (via always-reduce ${a.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;ui?t.push(p):n.push(p)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return iR(e,t),!0}}runRecovery(e,t,n){let i=null,a=!1;for(let o=0;o ":"";if(s.deadEnd&&(a||(a=!0,s.restart(),io&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))))continue;let f=s.split(),h=c;for(let d=0;f.forceReduce()&&d<10&&(io&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));d++)io&&(h=this.stackID(f)+" -> ");for(let d of s.recoverByInsert(l))io&&console.log(c+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,n);this.stream.end>s.pos?(u==s.pos&&(u++,l=0),s.recoverByDelete(l,u),io&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),iR(s,n)):(!i||i.scoree.topRules[s][1]),i=[];for(let s=0;s=0)a(c,l,s[u++]);else{let f=s[u+-c];for(let h=-c;h>0;h--)a(s[u++],l,f);u++}}}this.nodeSet=new qL(t.map((s,l)=>eo.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:n.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=r$;let o=lb(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new jp(o,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let i=new p_e(this,e,t,n);for(let a of this.wrappers)i=a(i,e,t,n);return i}getGoto(e,t,n=!1){let i=this.goto;if(t>=i[0])return-1;for(let a=i[t+1];;){let o=i[a++],s=o&1,l=i[a++];if(s&&n)return l;for(let u=a+(o>>1);a0}validAction(e,t){return!!this.allActions(e,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),i=n?t(n):void 0;for(let a=this.stateSlot(e,1);i==null;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=hu(this.data,a+2);else break;i=t(hu(this.data,a+1))}return i}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=hu(this.data,n+2);else break;if(!(this.data[n+2]&1)){let i=this.data[n+1];t.some((a,o)=>o&1&&a==i)||t.push(this.data[n],i)}}return t}configure(e){let t=Object.assign(Object.create(MS.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let i=e.tokenizers.find(a=>a.from==n);return i?i.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,i)=>{let a=e.specializers.find(s=>s.from==n.external);if(!a)return n;let o=Object.assign(Object.assign({},n),{external:a.to});return t.specializers[i]=aR(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let a of e.split(" ")){let o=t.indexOf(a);o>=0&&(n[o]=!0)}let i=null;for(let a=0;an)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scorer.external(t,n)<<1|e}return r.get}class Zj{constructor(e,t,n,i){this.state=e,this.pos=t,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=aa(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),i=t.text.slice(n-t.from,this.pos-t.from),a=i.search(Kj(e,!1));return a<0?null:{from:n+a,to:this.pos,text:i.slice(a)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function oR(r){let e=Object.keys(r).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function m_e(r){let e=Object.create(null),t=Object.create(null);for(let{label:i}of r){e[i[0]]=!0;for(let a=1;atypeof i=="string"?{label:i}:i),[t,n]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:m_e(e);return i=>{let a=i.matchBefore(n);return a||i.explicit?{from:a?a.from:i.pos,options:e,validFor:t}:null}}function y_e(r,e){return t=>{for(let n=aa(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(r.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}class sR{constructor(e,t,n,i){this.completion=e,this.source=t,this.match=n,this.score=i}}function jh(r){return r.selection.main.from}function Kj(r,e){var t;let{source:n}=r,i=e&&n[0]!="^",a=n[n.length-1]!="$";return!i&&!a?r:new RegExp(`${i?"^":""}(?:${n})${a?"$":""}`,(t=r.flags)!==null&&t!==void 0?t:r.ignoreCase?"i":"")}const Qj=ju.define();function b_e(r,e,t,n){let{main:i}=r.selection,a=t-i.from,o=n-i.from;return Object.assign(Object.assign({},r.changeByRange(s=>{if(s!=i&&t!=n&&r.sliceDoc(s.from+a,s.from+o)!=r.sliceDoc(t,n))return{range:s};let l=r.toText(e);return{changes:{from:s.from+a,to:n==i.from?s.to:s.from+o,insert:l},range:ze.cursor(s.from+a+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const lR=new WeakMap;function __e(r){if(!Array.isArray(r))return r;let e=lR.get(r);return e||lR.set(r,e=Xj(r)),e}const IS=Sr.define(),ty=Sr.define();class w_e{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(S=KL(w))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(!y||A==1&&v||_==0&&A!=0)&&(t[f]==w||n[f]==w&&(h=!0)?o[f++]=y:o.length&&(m=!1)),_=A,y+=qo(w)}return f==l&&o[0]==0&&m?this.result(-100+(h?-200:0),o,e):d==l&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):d==l?this.ret(-900-e.length,[p,g]):f==l?this.result(-100+(h?-200:0)+-700+(m?0:-1100),o,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,n){let i=[],a=0;for(let o of t){let s=o+(this.astral?qo(ea(n,o)):1);a&&i[a-1]==o?i[a-1]=s:(i[a++]=o,i[a++]=s)}return this.ret(e-n.length,i)}}class S_e{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:A_e,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>uR(e(n),t(n)),optionClass:(e,t)=>n=>uR(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function uR(r,e){return r?e?r+" "+e:r:e}function A_e(r,e,t,n,i,a){let o=r.textDirection==Pn.RTL,s=o,l=!1,u="top",c,f,h=e.left-i.left,d=i.right-e.right,p=n.right-n.left,g=n.bottom-n.top;if(s&&h=g||y>e.top?c=t.bottom-e.top:(u="bottom",c=e.bottom-t.top)}let v=(e.bottom-e.top)/a.offsetHeight,m=(e.right-e.left)/a.offsetWidth;return{style:`${u}: ${c/v}px; max-width: ${f/m}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":s?"left":"right")}}function C_e(r){let e=r.addToOptions.slice();return r.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,i,a){let o=document.createElement("span");o.className="cm-completionLabel";let s=t.displayLabel||t.label,l=0;for(let u=0;ul&&o.appendChild(document.createTextNode(s.slice(l,c)));let h=o.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(s.slice(c,f))),h.className="cm-completionMatchedText",l=f}return lt.position-n.position).map(t=>t.render)}function px(r,e,t){if(r<=t)return{from:0,to:r};if(e<0&&(e=0),e<=r>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let n=Math.floor((r-e)/t);return{from:r-(n+1)*t,to:r-n*t}}class x_e{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:a,selected:o}=i.open,s=e.state.facet(Ei);this.optionContent=C_e(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=px(a.length,o,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(t).open;for(let c=l.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(Ei).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:ty.of(null)})}),this.showOptions(a,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=i){let{options:a,selected:o,disabled:s}=n.open;(!i.open||i.open.options!=a)&&(this.range=px(a.length,o,e.state.facet(Ei).maxRenderedOptions),this.showOptions(a,n.id)),this.updateSel(),s!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=px(t.options.length,t.selected,this.view.state.facet(Ei).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:i}=n;if(!i)return;let a=typeof i=="string"?document.createTextNode(i):i(n);if(!a)return;"then"in a?a.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,n)}).catch(o=>Ya(this.view.state,o,"completion info")):this.addInfoPane(a,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:a}=e;n.appendChild(i),this.infoDestroy=a||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,i=this.range.from;n;n=n.nextSibling,i++)n.nodeName!="LI"||!n.id?i--:i==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&E_e(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),a=this.space;if(!a){let o=this.dom.ownerDocument.defaultView||window;a={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return i.top>Math.min(a.bottom,t.bottom)-10||i.bottomn.from||n.from==0))if(a=h,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let d=i.appendChild(document.createElement("completion-section"));d.textContent=h}}const c=i.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let f=this.optionClass(s);f&&(c.className=f);for(let h of this.optionContent){let d=h(s,this.view.state,this.view,l);d&&c.appendChild(d)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.tonew x_e(t,r,e)}function E_e(r,e){let t=r.getBoundingClientRect(),n=e.getBoundingClientRect(),i=t.height/r.offsetHeight;n.topt.bottom&&(r.scrollTop+=(n.bottom-t.bottom)/i)}function cR(r){return(r.boost||0)*100+(r.apply?10:0)+(r.info?5:0)+(r.type?1:0)}function T_e(r,e){let t=[],n=null,i=u=>{t.push(u);let{section:c}=u.completion;if(c){n||(n=[]);let f=typeof c=="string"?c:c.name;n.some(h=>h.name==f)||n.push(typeof c=="string"?{name:f}:c)}},a=e.facet(Ei);for(let u of r)if(u.hasResult()){let c=u.result.getMatch;if(u.result.filter===!1)for(let f of u.result.options)i(new sR(f,u.source,c?c(f):[],1e9-t.length));else{let f=e.sliceDoc(u.from,u.to),h,d=a.filterStrict?new S_e(f):new w_e(f);for(let p of u.result.options)if(h=d.match(p.label)){let g=p.displayLabel?c?c(p,h.matched):[]:h.matched;i(new sR(p,u.source,g,h.score+(p.boost||0)))}}}if(n){let u=Object.create(null),c=0,f=(h,d)=>{var p,g;return((p=h.rank)!==null&&p!==void 0?p:1e9)-((g=d.rank)!==null&&g!==void 0?g:1e9)||(h.namef.score-c.score||l(c.completion,f.completion))){let c=u.completion;!s||s.label!=c.label||s.detail!=c.detail||s.type!=null&&c.type!=null&&s.type!=c.type||s.apply!=c.apply||s.boost!=c.boost?o.push(u):cR(u.completion)>cR(s)&&(o[o.length-1]=u),s=u.completion}return o}class xp{constructor(e,t,n,i,a,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=i,this.selected=a,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new xp(this.options,fR(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,i,a,o){if(i&&!o&&e.some(u=>u.isPending))return i.setDisabled();let s=T_e(e,t);if(!s.length)return i&&e.some(u=>u.isPending)?i.setDisabled():null;let l=t.facet(Ei).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let u=i.options[i.selected].completion;for(let c=0;cc.hasResult()?Math.min(u,c.from):u,1e8),create:B_e,above:a.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new xp(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new xp(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class LS{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new LS(L_e,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(Ei),a=(n.override||t.languageDataAt("autocomplete",jh(t)).map(__e)).map(l=>(this.active.find(c=>c.source==l)||new Xo(l,this.active.some(c=>c.state!=0)?1:0)).update(e,n));a.length==this.active.length&&a.every((l,u)=>l==this.active[u])&&(a=this.active);let o=this.open,s=e.effects.some(l=>l.is(m3));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||a.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!k_e(a,this.active)||s?o=xp.build(a,t,this.id,o,n,s):o&&o.disabled&&!a.some(l=>l.isPending)&&(o=null),!o&&a.every(l=>!l.isPending)&&a.some(l=>l.hasResult())&&(a=a.map(l=>l.hasResult()?new Xo(l.source,0):l));for(let l of e.effects)l.is(eq)&&(o=o&&o.setSelected(l.value,this.id));return a==this.active&&o==this.open?this:new LS(a,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?M_e:I_e}}function k_e(r,e){if(r==e)return!0;for(let t=0,n=0;;){for(;t-1&&(t["aria-activedescendant"]=r+"-"+e),t}const L_e=[];function Jj(r,e){if(r.isUserEvent("input.complete")){let n=r.annotation(Qj);if(n&&e.activateOnCompletion(n))return 12}let t=r.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:r.isUserEvent("delete.backward")?2:r.selection?8:r.docChanged?16:0}class Xo{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=Jj(e,t),i=this;(n&8||n&16&&this.touches(e))&&(i=new Xo(i.source,0)),n&4&&i.state==0&&(i=new Xo(this.source,1)),i=i.updateFor(e,n);for(let a of e.effects)if(a.is(IS))i=new Xo(i.source,1,a.value);else if(a.is(ty))i=new Xo(i.source,0);else if(a.is(m3))for(let o of a.value)o.source==i.source&&(i=o);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(jh(e.state))}}class qp extends Xo{constructor(e,t,n,i,a,o){super(e,3,t),this.limit=n,this.result=i,this.from=a,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let a=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=jh(e.state);if(s>o||!i||t&2&&(jh(e.startState)==this.from||st.map(e))}}),eq=Sr.define(),ba=ji.define({create(){return LS.start()},update(r,e){return r.update(e)},provide:r=>[h3.from(r,e=>e.tooltip),St.contentAttributes.from(r,e=>e.attrs)]});function y3(r,e){const t=e.completion.apply||e.completion.label;let n=r.state.field(ba).active.find(i=>i.source==e.source);return n instanceof qp?(typeof t=="string"?r.dispatch(Object.assign(Object.assign({},b_e(r.state,t,n.from,n.to)),{annotations:Qj.of(e.completion)})):t(r,e.completion,n.from,n.to),!0):!1}const B_e=D_e(ba,y3);function ub(r,e="option"){return t=>{let n=t.state.field(ba,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp-1?n.open.selected+i*(r?1:-1):r?0:o-1;return s<0?s=e=="page"?0:o-1:s>=o&&(s=e=="page"?o-1:0),t.dispatch({effects:eq.of(s)}),!0}}const tq=r=>{let e=r.state.field(ba,!1);return r.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampr.state.field(ba,!1)?(r.dispatch({effects:IS.of(!0)}),!0):!1,O_e=r=>{let e=r.state.field(ba,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(r.dispatch({effects:ty.of(null)}),!0)};class P_e{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const R_e=50,N_e=1e3,z_e=Ta.fromClass(class{constructor(r){this.view=r,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of r.state.field(ba).active)e.isPending&&this.startQuery(e)}update(r){let e=r.state.field(ba),t=r.state.facet(Ei);if(!r.selectionSet&&!r.docChanged&&r.startState.field(ba)==e)return;let n=r.transactions.some(a=>{let o=Jj(a,t);return o&8||(a.selection||a.docChanged)&&!(o&3)});for(let a=0;aR_e&&Date.now()-o.time>N_e){for(let s of o.context.abortListeners)try{s()}catch(l){Ya(this.view.state,l)}o.context.abortListeners=null,this.running.splice(a--,1)}else o.updates.push(...r.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),r.transactions.some(a=>a.effects.some(o=>o.is(IS)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(a=>a.isPending&&!this.running.some(o=>o.active.source==a.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let a of r.transactions)a.isUserEvent("input.type")?this.composing=2:this.composing==2&&a.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:r}=this.view,e=r.field(ba);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ei).updateSyncTime))}startQuery(r){let{state:e}=this.view,t=jh(e),n=new Zj(e,t,r.explicit,this.view),i=new P_e(r,n);this.running.push(i),Promise.resolve(r.source(n)).then(a=>{i.context.aborted||(i.done=a||null,this.scheduleAccept())},a=>{this.view.dispatch({effects:ty.of(null)}),Ya(this.view.state,a)})}scheduleAccept(){this.running.every(r=>r.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ei).updateSyncTime))}accept(){var r;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Ei),n=this.view.state.field(ba);for(let i=0;is.source==a.active.source);if(o&&o.isPending)if(a.done==null){let s=new Xo(a.active.source,0);for(let l of a.updates)s=s.update(l,t);s.isPending||e.push(s)}else this.startQuery(o)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:m3.of(e)})}},{eventHandlers:{blur(r){let e=this.view.state.field(ba,!1);if(e&&e.tooltip&&this.view.state.facet(Ei).closeOnBlur){let t=e.open&&Ej(this.view,e.open.tooltip);(!t||!t.dom.contains(r.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ty.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:IS.of(!1)}),20),this.composing=0}}}),V_e=typeof navigator=="object"&&/Win/.test(navigator.platform),G_e=Ed.highest(St.domEventHandlers({keydown(r,e){let t=e.state.field(ba,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||r.key.length>1||r.ctrlKey&&!(V_e&&r.altKey)||r.metaKey)return!1;let n=t.open.options[t.open.selected],i=t.active.find(o=>o.source==n.source),a=n.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(r.key)>-1&&y3(e,n),!1}})),U_e=St.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),ry={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},kh=Sr.define({map(r,e){let t=e.mapPos(r,-1,Sa.TrackAfter);return t??void 0}}),b3=new class extends sd{};b3.startSide=1;b3.endSide=-1;const rq=ji.define({create(){return En.empty},update(r,e){if(r=r.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);r=r.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(kh)&&(r=r.update({add:[b3.range(t.value,t.value+1)]}));return r}});function H_e(){return[$_e,rq]}const gx="()[]{}<>";function nq(r){for(let e=0;e{if((W_e?r.composing:r.compositionStarted)||r.state.readOnly)return!1;let i=r.state.selection.main;if(n.length>2||n.length==2&&qo(ea(n,0))==1||e!=i.from||t!=i.to)return!1;let a=Y_e(r.state,n);return a?(r.dispatch(a),!0):!1}),j_e=({state:r,dispatch:e})=>{if(r.readOnly)return!1;let n=iq(r,r.selection.main.head).brackets||ry.brackets,i=null,a=r.changeByRange(o=>{if(o.empty){let s=Z_e(r.doc,o.head);for(let l of n)if(l==s&&AA(r.doc,o.head)==nq(ea(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:ze.cursor(o.head-l.length)}}return{range:i=o}});return i||e(r.update(a,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},q_e=[{key:"Backspace",run:j_e}];function Y_e(r,e){let t=iq(r,r.selection.main.head),n=t.brackets||ry.brackets;for(let i of n){let a=nq(ea(i,0));if(e==i)return a==i?Q_e(r,i,n.indexOf(i+i+i)>-1,t):X_e(r,i,a,t.before||ry.before);if(e==a&&aq(r,r.selection.main.from))return K_e(r,i,a)}return null}function aq(r,e){let t=!1;return r.field(rq).between(0,r.doc.length,n=>{n==e&&(t=!0)}),t}function AA(r,e){let t=r.sliceString(e,e+2);return t.slice(0,qo(ea(t,0)))}function Z_e(r,e){let t=r.sliceString(e-2,e);return qo(ea(t,0))==t.length?t:t.slice(1)}function X_e(r,e,t,n){let i=null,a=r.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:kh.of(o.to+e.length),range:ze.range(o.anchor+e.length,o.head+e.length)};let s=AA(r.doc,o.head);return!s||/\s/.test(s)||n.indexOf(s)>-1?{changes:{insert:e+t,from:o.head},effects:kh.of(o.head+e.length),range:ze.cursor(o.head+e.length)}:{range:i=o}});return i?null:r.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function K_e(r,e,t){let n=null,i=r.changeByRange(a=>a.empty&&AA(r.doc,a.head)==t?{changes:{from:a.head,to:a.head+t.length,insert:t},range:ze.cursor(a.head+t.length)}:n={range:a});return n?null:r.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Q_e(r,e,t,n){let i=n.stringPrefixes||ry.stringPrefixes,a=null,o=r.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:kh.of(s.to+e.length),range:ze.range(s.anchor+e.length,s.head+e.length)};let l=s.head,u=AA(r.doc,l),c;if(u==e){if(dR(r,l))return{changes:{insert:e+e,from:l},effects:kh.of(l+e.length),range:ze.cursor(l+e.length)};if(aq(r,l)){let h=t&&r.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+h.length,insert:h},range:ze.cursor(l+h.length)}}}else{if(t&&r.sliceDoc(l-2*e.length,l)==e+e&&(c=pR(r,l-2*e.length,i))>-1&&dR(r,c))return{changes:{insert:e+e+e+e,from:l},effects:kh.of(l+e.length),range:ze.cursor(l+e.length)};if(r.charCategorizer(l)(u)!=On.Word&&pR(r,l,i)>-1&&!J_e(r,l,e,i))return{changes:{insert:e+e,from:l},effects:kh.of(l+e.length),range:ze.cursor(l+e.length)}}return{range:a=s}});return a?null:r.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function dR(r,e){let t=aa(r).resolveInner(e+1);return t.parent&&t.from==e}function J_e(r,e,t,n){let i=aa(r).resolveInner(e,-1),a=n.reduce((o,s)=>Math.max(o,s.length),0);for(let o=0;o<5;o++){let s=r.sliceDoc(i.from,Math.min(i.to,i.from+t.length+a)),l=s.indexOf(t);if(!l||l>-1&&n.indexOf(s.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>t.length+l;){if(r.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let u=i.to==e&&i.parent;if(!u)break;i=u}return!1}function pR(r,e,t){let n=r.charCategorizer(e);if(n(r.sliceDoc(e-1,e))!=On.Word)return e;for(let i of t){let a=e-i.length;if(r.sliceDoc(a,e)==i&&n(r.sliceDoc(a-1,a))!=On.Word)return a}return-1}function ewe(r={}){return[G_e,ba,Ei.of(r),z_e,twe,U_e]}const oq=[{key:"Ctrl-Space",run:hR},{mac:"Alt-`",run:hR},{key:"Escape",run:O_e},{key:"ArrowDown",run:ub(!0)},{key:"ArrowUp",run:ub(!1)},{key:"PageDown",run:ub(!0,"page")},{key:"PageUp",run:ub(!1,"page")},{key:"Enter",run:tq}],twe=Ed.highest(bA.computeN([Ei],r=>r.facet(Ei).defaultKeymap?[oq]:[]));function rwe(r){let e=r.field(ba,!1);return e&&e.active.some(t=>t.isPending)?"pending":e&&e.active.some(t=>t.state!=0)?"active":null}const nwe=36,gR=1,iwe=2,Nd=3,vx=4,awe=5,owe=6,swe=7,lwe=8,uwe=9,cwe=10,fwe=11,hwe=12,dwe=13,pwe=14,gwe=15,vwe=16,mwe=17,vR=18,ywe=19,sq=20,lq=21,mR=22,bwe=23,_we=24;function Pk(r){return r>=65&&r<=90||r>=97&&r<=122||r>=48&&r<=57}function wwe(r){return r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70}function sh(r,e,t){for(let n=!1;;){if(r.next<0)return;if(r.next==e&&!n){r.advance();return}n=t&&!n&&r.next==92,r.advance()}}function Swe(r,e){e:for(;;){if(r.next<0)return;if(r.next==36){r.advance();for(let t=0;t)".charCodeAt(t);for(;;){if(r.next<0)return;if(r.next==n&&r.peek(1)==39){r.advance(2);return}r.advance()}}function Rk(r,e){for(;!(r.next!=95&&!Pk(r.next));)e!=null&&(e+=String.fromCharCode(r.next)),r.advance();return e}function Cwe(r){if(r.next==39||r.next==34||r.next==96){let e=r.next;r.advance(),sh(r,e,!1)}else Rk(r)}function yR(r,e){for(;r.next==48||r.next==49;)r.advance();e&&r.next==e&&r.advance()}function bR(r,e){for(;;){if(r.next==46){if(e)break;e=!0}else if(r.next<48||r.next>57)break;r.advance()}if(r.next==69||r.next==101)for(r.advance(),(r.next==43||r.next==45)&&r.advance();r.next>=48&&r.next<=57;)r.advance()}function _R(r){for(;!(r.next<0||r.next==10);)r.advance()}function Bf(r,e){for(let t=0;t!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:uq(fq,cq)};function xwe(r,e,t,n){let i={};for(let a in Nk)i[a]=(r.hasOwnProperty(a)?r:Nk)[a];return e&&(i.words=uq(e,t||"",n)),i}function hq(r){return new u_e(e=>{var t;let{next:n}=e;if(e.advance(),Bf(n,mx)){for(;Bf(e.next,mx);)e.advance();e.acceptToken(nwe)}else if(n==36&&r.doubleDollarQuotedStrings){let i=Rk(e,"");e.next==36&&(e.advance(),Swe(e,i),e.acceptToken(Nd))}else if(n==39||n==34&&r.doubleQuotedStrings)sh(e,n,r.backslashEscapes),e.acceptToken(Nd);else if(n==35&&r.hashComments||n==47&&e.next==47&&r.slashComments)_R(e),e.acceptToken(gR);else if(n==45&&e.next==45&&(!r.spaceAfterDashes||e.peek(1)==32))_R(e),e.acceptToken(gR);else if(n==47&&e.next==42){e.advance();for(let i=1;;){let a=e.next;if(e.next<0)break;if(e.advance(),a==42&&e.next==47){if(i--,e.advance(),!i)break}else a==47&&e.next==42&&(i++,e.advance())}e.acceptToken(iwe)}else if((n==101||n==69)&&e.next==39)e.advance(),sh(e,39,!0),e.acceptToken(Nd);else if((n==110||n==78)&&e.next==39&&r.charSetCasts)e.advance(),sh(e,39,r.backslashEscapes),e.acceptToken(Nd);else if(n==95&&r.charSetCasts)for(let i=0;;i++){if(e.next==39&&i>1){e.advance(),sh(e,39,r.backslashEscapes),e.acceptToken(Nd);break}if(!Pk(e.next))break;e.advance()}else if(r.plsqlQuotingMechanism&&(n==113||n==81)&&e.next==39&&e.peek(1)>0&&!Bf(e.peek(1),mx)){let i=e.peek(1);e.advance(2),Awe(e,i),e.acceptToken(Nd)}else if(n==40)e.acceptToken(swe);else if(n==41)e.acceptToken(lwe);else if(n==123)e.acceptToken(uwe);else if(n==125)e.acceptToken(cwe);else if(n==91)e.acceptToken(fwe);else if(n==93)e.acceptToken(hwe);else if(n==59)e.acceptToken(dwe);else if(r.unquotedBitLiterals&&n==48&&e.next==98)e.advance(),yR(e),e.acceptToken(mR);else if((n==98||n==66)&&(e.next==39||e.next==34)){const i=e.next;e.advance(),r.treatBitsAsBytes?(sh(e,i,r.backslashEscapes),e.acceptToken(bwe)):(yR(e,i),e.acceptToken(mR))}else if(n==48&&(e.next==120||e.next==88)||(n==120||n==88)&&e.next==39){let i=e.next==39;for(e.advance();wwe(e.next);)e.advance();i&&e.next==39&&e.advance(),e.acceptToken(vx)}else if(n==46&&e.next>=48&&e.next<=57)bR(e,!0),e.acceptToken(vx);else if(n==46)e.acceptToken(pwe);else if(n>=48&&n<=57)bR(e,!1),e.acceptToken(vx);else if(Bf(n,r.operatorChars)){for(;Bf(e.next,r.operatorChars);)e.advance();e.acceptToken(gwe)}else if(Bf(n,r.specialVar))e.next==n&&e.advance(),Cwe(e),e.acceptToken(mwe);else if(Bf(n,r.identifierQuotes))sh(e,n,!1),e.acceptToken(ywe);else if(n==58||n==44)e.acceptToken(vwe);else if(Pk(n)){let i=Rk(e,String.fromCharCode(n));e.acceptToken(e.next==46||e.peek(-i.length-1)==46?vR:(t=r.words[i.toLowerCase()])!==null&&t!==void 0?t:vR)}})}const dq=hq(Nk),Dwe=MS.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,nodeProps:[["isolate",-4,1,2,3,19,""]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,dq],topRules:{Script:[0,25]},tokenPrec:0});function zk(r){let e=r.cursor().moveTo(r.from,-1);for(;/Comment/.test(e.name);)e.moveTo(e.from,-1);return e.node}function ny(r,e){let t=r.sliceString(e.from,e.to),n=/^([`'"])(.*)\1$/.exec(t);return n?n[2]:t}function FS(r){return r&&(r.name=="Identifier"||r.name=="QuotedIdentifier")}function Ewe(r,e){if(e.name=="CompositeIdentifier"){let t=[];for(let n=e.firstChild;n;n=n.nextSibling)FS(n)&&t.push(ny(r,n));return t}return[ny(r,e)]}function wR(r,e){for(let t=[];;){if(!e||e.name!=".")return t;let n=zk(e);if(!FS(n))return t;t.unshift(ny(r,n)),e=zk(n)}}function Twe(r,e){let t=aa(r).resolveInner(e,-1),n=Mwe(r.doc,t);return t.name=="Identifier"||t.name=="QuotedIdentifier"||t.name=="Keyword"?{from:t.from,quoted:t.name=="QuotedIdentifier"?r.doc.sliceString(t.from,t.from+1):null,parents:wR(r.doc,zk(t)),aliases:n}:t.name=="."?{from:e,quoted:null,parents:wR(r.doc,t),aliases:n}:{from:e,quoted:null,parents:[],empty:!0,aliases:n}}const kwe=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" "));function Mwe(r,e){let t;for(let i=e;!t;i=i.parent){if(!i)return null;i.name=="Statement"&&(t=i)}let n=null;for(let i=t.firstChild,a=!1,o=null;i;i=i.nextSibling){let s=i.name=="Keyword"?r.sliceString(i.from,i.to).toLowerCase():null,l=null;if(!a)a=s=="from";else if(s=="as"&&o&&FS(i.nextSibling))l=ny(r,i.nextSibling);else{if(s&&kwe.has(s))break;o&&FS(i)&&(l=ny(r,i))}l&&(n||(n=Object.create(null)),n[l]=Ewe(r,o)),o=/Identifier$/.test(i.name)?i:null}return n}function Iwe(r,e){return r?e.map(t=>Object.assign(Object.assign({},t),{label:t.label[0]==r?t.label:r+t.label+r,apply:void 0})):e}const Lwe=/^\w*$/,Fwe=/^[`'"]?\w*[`'"]?$/;function SR(r){return r.self&&typeof r.self.label=="string"}class _3{constructor(e,t){this.idQuote=e,this.idCaseInsensitive=t,this.list=[],this.children=void 0}child(e){let t=this.children||(this.children=Object.create(null)),n=t[e];return n||(e&&!this.list.some(i=>i.label==e)&&this.list.push(AR(e,"type",this.idQuote,this.idCaseInsensitive)),t[e]=new _3(this.idQuote,this.idCaseInsensitive))}maybeChild(e){return this.children?this.children[e]:null}addCompletion(e){let t=this.list.findIndex(n=>n.label==e.label);t>-1?this.list[t]=e:this.list.push(e)}addCompletions(e){for(let t of e)this.addCompletion(typeof t=="string"?AR(t,"property",this.idQuote,this.idCaseInsensitive):t)}addNamespace(e){Array.isArray(e)?this.addCompletions(e):SR(e)?this.addNamespace(e.children):this.addNamespaceObject(e)}addNamespaceObject(e){for(let t of Object.keys(e)){let n=e[t],i=null,a=t.replace(/\\?\./g,s=>s=="."?"\0":s).split("\0"),o=this;SR(n)&&(i=n.self,n=n.children);for(let s=0;s{let{parents:f,from:h,quoted:d,empty:p,aliases:g}=Twe(c.state,c.pos);if(p&&!c.explicit)return null;g&&f.length==1&&(f=g[f[0]]||f);let v=l;for(let b of f){for(;!v.children||!v.children[b];)if(v==l&&u)v=u;else if(v==u&&n)v=v.child(n);else return null;let _=v.maybeChild(b);if(!_)return null;v=_}let m=d&&c.state.sliceDoc(c.pos,c.pos+1)==d,y=v.list;return v==l&&g&&(y=y.concat(Object.keys(g).map(b=>({label:b,type:"constant"})))),{from:h,to:m?c.pos+1:void 0,options:Iwe(d,y),validFor:d?Fwe:Lwe}}}function Owe(r){return r==lq?"type":r==sq?"keyword":"variable"}function Pwe(r,e,t){let n=Object.keys(r).map(i=>t(e?i.toUpperCase():i,Owe(r[i])));return y_e(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],Xj(n))}let Rwe=Dwe.configure({props:[Fj.add({Statement:kbe()}),Oj.add({Statement(r,e){return{from:Math.min(r.from+100,e.doc.lineAt(r.from).to),to:r.to}},BlockComment(r){return{from:r.from+2,to:r.to-2}}}),kj({Keyword:O.keyword,Type:O.typeName,Builtin:O.standard(O.name),Bits:O.number,Bytes:O.string,Bool:O.bool,Null:O.null,Number:O.number,String:O.string,Identifier:O.name,QuotedIdentifier:O.special(O.string),SpecialVar:O.special(O.name),LineComment:O.lineComment,BlockComment:O.blockComment,Operator:O.operator,"Semi Punctuation":O.punctuation,"( )":O.paren,"{ }":O.brace,"[ ]":O.squareBracket})]});class CA{constructor(e,t,n){this.dialect=e,this.language=t,this.spec=n}get extension(){return this.language.extension}static define(e){let t=xwe(e,e.keywords,e.types,e.builtin),n=xS.define({name:"sql",parser:Rwe.configure({tokenizers:[{from:dq,to:hq(t)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new CA(t,n,e)}}function Nwe(r,e){return{label:r,type:e,boost:-1}}function zwe(r,e=!1,t){return Pwe(r.dialect.words,e,t||Nwe)}function Vwe(r){return r.schema?Bwe(r.schema,r.tables,r.schemas,r.defaultTable,r.defaultSchema,r.dialect||w3):()=>null}function Gwe(r){return r.schema?(r.dialect||w3).language.data.of({autocomplete:Vwe(r)}):[]}function Uwe(r={}){let e=r.dialect||w3;return new _be(e.language,[Gwe(r),e.language.data.of({autocomplete:zwe(e,r.upperCaseKeywords,r.keywordCompletion)})])}const w3=CA.define({}),Hwe=CA.define({charSetCasts:!0,doubleDollarQuotedStrings:!0,operatorChars:"+-*/<>=~!@#%^&|`?",specialVar:"",keywords:fq+"abort abs absent access according ada admin aggregate alias also always analyse analyze array_agg array_max_cardinality asensitive assert assignment asymmetric atomic attach attribute attributes avg backward base64 begin_frame begin_partition bernoulli bit_length blocked bom cache called cardinality catalog_name ceil ceiling chain char_length character_length character_set_catalog character_set_name character_set_schema characteristics characters checkpoint class class_origin cluster coalesce cobol collation_catalog collation_name collation_schema collect column_name columns command_function command_function_code comment comments committed concurrently condition_number configuration conflict connection_name constant constraint_catalog constraint_name constraint_schema contains content control conversion convert copy corr cost covar_pop covar_samp csv cume_dist current_catalog current_row current_schema cursor_name database datalink datatype datetime_interval_code datetime_interval_precision db debug defaults defined definer degree delimiter delimiters dense_rank depends derived detach detail dictionary disable discard dispatch dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue document dump dynamic_function dynamic_function_code element elsif empty enable encoding encrypted end_frame end_partition endexec enforced enum errcode error event every exclude excluding exclusive exp explain expression extension extract family file filter final first_value flag floor following force foreach fortran forward frame_row freeze fs functions fusion generated granted greatest groups handler header hex hierarchy hint id ignore ilike immediately immutable implementation implicit import include including increment indent index indexes info inherit inherits inline insensitive instance instantiable instead integrity intersection invoker isnull key_member key_type label lag last_value lead leakproof least length library like_regex link listen ln load location lock locked log logged lower mapping matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text min minvalue mod mode more move multiset mumps name namespace nfc nfd nfkc nfkd nil normalize normalized nothing notice notify notnull nowait nth_value ntile nullable nullif nulls number occurrences_regex octet_length octets off offset oids operator options ordering others over overlay overriding owned owner parallel parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partition pascal passing passthrough password percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding prepared print_strict_params procedural procedures program publication query quote raise range rank reassign recheck recovery refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex rename repeatable replace replica requiring reset respect restart restore result_oid returned_cardinality returned_length returned_octet_length returned_sqlstate returning reverse routine_catalog routine_name routine_schema routines row_count row_number rowtype rule scale schema_name schemas scope scope_catalog scope_name scope_schema security selective self sensitive sequence sequences serializable server server_name setof share show simple skip slice snapshot source specific_name sqlcode sqlerror sqrt stable stacked standalone statement statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time table_name tables tablesample tablespace temp template ties token top_level_count transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex trigger_catalog trigger_name trigger_schema trim trim_array truncate trusted type types uescape unbounded uncommitted unencrypted unlink unlisten unlogged unnamed untyped upper uri use_column use_variable user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema vacuum valid validate validator value_of var_pop var_samp varbinary variable_conflict variadic verbose version versioning views volatile warning whitespace width_bucket window within wrapper xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate yes",types:cq+"bigint int8 bigserial serial8 varbit bool box bytea cidr circle precision float8 inet int4 json jsonb line lseg macaddr macaddr8 money numeric pg_lsn point polygon float4 int2 smallserial serial2 serial serial4 text timetz timestamptz tsquery tsvector txid_snapshot uuid xml"}),Wwe=r=>{let{state:e}=r,t=e.doc.lineAt(e.selection.main.from),n=A3(r.state,t.from);return n.line?$we(r):n.block?qwe(r):!1};function S3(r,e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=r(e,t);return i?(n(t.update(i)),!0):!1}}const $we=S3(Xwe,0),jwe=S3(pq,0),qwe=S3((r,e)=>pq(r,e,Zwe(e)),0);function A3(r,e){let t=r.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Gv=50;function Ywe(r,{open:e,close:t},n,i){let a=r.sliceDoc(n-Gv,n),o=r.sliceDoc(i,i+Gv),s=/\s*$/.exec(a)[0].length,l=/^\s*/.exec(o)[0].length,u=a.length-s;if(a.slice(u-e.length,u)==e&&o.slice(l,l+t.length)==t)return{open:{pos:n-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let c,f;i-n<=2*Gv?c=f=r.sliceDoc(n,i):(c=r.sliceDoc(n,n+Gv),f=r.sliceDoc(i-Gv,i));let h=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(h,h+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:n+h+e.length,margin:/\s/.test(c.charAt(h+e.length))?1:0},close:{pos:i-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function Zwe(r){let e=[];for(let t of r.selection.ranges){let n=r.doc.lineAt(t.from),i=t.to<=n.to?n:r.doc.lineAt(t.to);i.from>n.from&&i.from==t.to&&(i=t.to==n.to+1?n:r.doc.lineAt(t.to-1));let a=e.length-1;a>=0&&e[a].to>n.from?e[a].to=i.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:i.to})}return e}function pq(r,e,t=e.selection.ranges){let n=t.map(a=>A3(e,a.from).block);if(!n.every(a=>a))return null;let i=t.map((a,o)=>Ywe(e,n[o],a.from,a.to));if(r!=2&&!i.every(a=>a))return{changes:e.changes(t.map((a,o)=>i[o]?[]:[{from:a.from,insert:n[o].open+" "},{from:a.to,insert:" "+n[o].close}]))};if(r!=1&&i.some(a=>a)){let a=[];for(let o=0,s;oi&&(a==o||o>f.from)){i=f.from;let h=/^\s*/.exec(f.text)[0].length,d=h==f.length,p=f.text.slice(h,h+u.length)==u?h:-1;ha.comment<0&&(!a.empty||a.single))){let a=[];for(let{line:s,token:l,indent:u,empty:c,single:f}of n)(f||!c)&&a.push({from:s.from+u,insert:l+" "});let o=e.changes(a);return{changes:o,selection:e.selection.map(o,1)}}else if(r!=1&&n.some(a=>a.comment>=0)){let a=[];for(let{line:o,comment:s,token:l}of n)if(s>=0){let u=o.from+s,c=u+l.length;o.text[c-o.from]==" "&&c++,a.push({from:u,to:c})}return{changes:a}}return null}const Vk=ju.define(),Kwe=ju.define(),Qwe=Dt.define(),gq=Dt.define({combine(r){return Af(r,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,i)=>e(n,i)||t(n,i)})}}),vq=ji.define({create(){return Sl.empty},update(r,e){let t=e.state.facet(gq),n=e.annotation(Vk);if(n){let l=Za.fromTransaction(e,n.selection),u=n.side,c=u==0?r.undone:r.done;return l?c=BS(c,c.length,t.minDepth,l):c=bq(c,e.startState.selection),new Sl(u==0?n.rest:c,u==0?c:n.rest)}let i=e.annotation(Kwe);if((i=="full"||i=="before")&&(r=r.isolate()),e.annotation(gi.addToHistory)===!1)return e.changes.empty?r:r.addMapping(e.changes.desc);let a=Za.fromTransaction(e),o=e.annotation(gi.time),s=e.annotation(gi.userEvent);return a?r=r.addChanges(a,o,s,t,e):e.selection&&(r=r.addSelection(e.startState.selection,o,s,t.newGroupDelay)),(i=="full"||i=="after")&&(r=r.isolate()),r},toJSON(r){return{done:r.done.map(e=>e.toJSON()),undone:r.undone.map(e=>e.toJSON())}},fromJSON(r){return new Sl(r.done.map(Za.fromJSON),r.undone.map(Za.fromJSON))}});function Jwe(r={}){return[vq,gq.of(r),St.domEventHandlers({beforeinput(e,t){let n=e.inputType=="historyUndo"?mq:e.inputType=="historyRedo"?Gk:null;return n?(e.preventDefault(),n(t)):!1}})]}function xA(r,e){return function({state:t,dispatch:n}){if(!e&&t.readOnly)return!1;let i=t.field(vq,!1);if(!i)return!1;let a=i.pop(r,t,e);return a?(n(a),!0):!1}}const mq=xA(0,!1),Gk=xA(1,!1),eSe=xA(0,!0),tSe=xA(1,!0);class Za{constructor(e,t,n,i,a){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=i,this.selectionsAfter=a}setSelAfter(e){return new Za(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Za(e.changes&&hi.fromJSON(e.changes),[],e.mapped&&kl.fromJSON(e.mapped),e.startSelection&&ze.fromJSON(e.startSelection),e.selectionsAfter.map(ze.fromJSON))}static fromTransaction(e,t){let n=Ko;for(let i of e.startState.facet(Qwe)){let a=i(e);a.length&&(n=n.concat(a))}return!n.length&&e.changes.empty?null:new Za(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,Ko)}static selection(e){return new Za(void 0,Ko,void 0,void 0,e)}}function BS(r,e,t,n){let i=e+1>t+20?e-t-1:0,a=r.slice(i,e);return a.push(n),a}function rSe(r,e){let t=[],n=!1;return r.iterChangedRanges((i,a)=>t.push(i,a)),e.iterChangedRanges((i,a,o,s)=>{for(let l=0;l=u&&o<=c&&(n=!0)}}),n}function nSe(r,e){return r.ranges.length==e.ranges.length&&r.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length===0}function yq(r,e){return r.length?e.length?r.concat(e):r:e}const Ko=[],iSe=200;function bq(r,e){if(r.length){let t=r[r.length-1],n=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-iSe));return n.length&&n[n.length-1].eq(e)?r:(n.push(e),BS(r,r.length-1,1e9,t.setSelAfter(n)))}else return[Za.selection([e])]}function aSe(r){let e=r[r.length-1],t=r.slice();return t[r.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function yx(r,e){if(!r.length)return r;let t=r.length,n=Ko;for(;t;){let i=oSe(r[t-1],e,n);if(i.changes&&!i.changes.empty||i.effects.length){let a=r.slice(0,t);return a[t-1]=i,a}else e=i.mapped,t--,n=i.selectionsAfter}return n.length?[Za.selection(n)]:Ko}function oSe(r,e,t){let n=yq(r.selectionsAfter.length?r.selectionsAfter.map(s=>s.map(e)):Ko,t);if(!r.changes)return Za.selection(n);let i=r.changes.map(e),a=e.mapDesc(r.changes,!0),o=r.mapped?r.mapped.composeDesc(a):a;return new Za(i,Sr.mapEffects(r.effects,e),o,r.startSelection.map(a),n)}const sSe=/^(input\.type|delete)($|\.)/;class Sl{constructor(e,t,n=0,i=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new Sl(this.done,this.undone):this}addChanges(e,t,n,i,a){let o=this.done,s=o[o.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!n||sSe.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?r.moveByChar(t,e):DA(t,e))}function la(r){return r.textDirectionAt(r.state.selection.main.head)==Pn.LTR}const wq=r=>_q(r,!la(r)),Sq=r=>_q(r,la(r));function Aq(r,e){return Us(r,t=>t.empty?r.moveByGroup(t,e):DA(t,e))}const uSe=r=>Aq(r,!la(r)),cSe=r=>Aq(r,la(r));function fSe(r,e,t){if(e.type.prop(t))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(r.sliceDoc(e.from,e.to)))||e.firstChild}function EA(r,e,t){let n=aa(r).resolveInner(e.head),i=t?Pr.closedBy:Pr.openedBy;for(let l=e.head;;){let u=t?n.childAfter(l):n.childBefore(l);if(!u)break;fSe(r,u,i)?n=u:l=t?u.to:u.from}let a=n.type.prop(i),o,s;return a&&(o=t?wl(r,n.from,1):wl(r,n.to,-1))&&o.matched?s=t?o.end.to:o.end.from:s=t?n.to:n.from,ze.cursor(s,t?-1:1)}const hSe=r=>Us(r,e=>EA(r.state,e,!la(r))),dSe=r=>Us(r,e=>EA(r.state,e,la(r)));function Cq(r,e){return Us(r,t=>{if(!t.empty)return DA(t,e);let n=r.moveVertically(t,e);return n.head!=t.head?n:r.moveToLineBoundary(t,e)})}const xq=r=>Cq(r,!1),Dq=r=>Cq(r,!0);function Eq(r){let e=r.scrollDOM.clientHeighto.empty?r.moveVertically(o,e,t.height):DA(o,e));if(i.eq(n.selection))return!1;let a;if(t.selfScroll){let o=r.coordsAtPos(n.selection.main.head),s=r.scrollDOM.getBoundingClientRect(),l=s.top+t.marginTop,u=s.bottom-t.marginBottom;o&&o.top>l&&o.bottomTq(r,!1),Uk=r=>Tq(r,!0);function Cf(r,e,t){let n=r.lineBlockAt(e.head),i=r.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?n.to:n.from)&&(i=r.moveToLineBoundary(e,t,!1)),!t&&i.head==n.from&&n.length){let a=/^\s*/.exec(r.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;a&&e.head!=n.from+a&&(i=ze.cursor(n.from+a))}return i}const pSe=r=>Us(r,e=>Cf(r,e,!0)),gSe=r=>Us(r,e=>Cf(r,e,!1)),vSe=r=>Us(r,e=>Cf(r,e,!la(r))),mSe=r=>Us(r,e=>Cf(r,e,la(r))),ySe=r=>Us(r,e=>ze.cursor(r.lineBlockAt(e.head).from,1)),bSe=r=>Us(r,e=>ze.cursor(r.lineBlockAt(e.head).to,-1));function _Se(r,e,t){let n=!1,i=av(r.selection,a=>{let o=wl(r,a.head,-1)||wl(r,a.head,1)||a.head>0&&wl(r,a.head-1,1)||a.head_Se(r,e);function os(r,e){let t=av(r.state.selection,n=>{let i=e(n);return ze.range(n.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(r.state.selection)?!1:(r.dispatch(Zl(r.state,t)),!0)}function kq(r,e){return os(r,t=>r.moveByChar(t,e))}const Mq=r=>kq(r,!la(r)),Iq=r=>kq(r,la(r));function Lq(r,e){return os(r,t=>r.moveByGroup(t,e))}const SSe=r=>Lq(r,!la(r)),ASe=r=>Lq(r,la(r)),CSe=r=>os(r,e=>EA(r.state,e,!la(r))),xSe=r=>os(r,e=>EA(r.state,e,la(r)));function Fq(r,e){return os(r,t=>r.moveVertically(t,e))}const Bq=r=>Fq(r,!1),Oq=r=>Fq(r,!0);function Pq(r,e){return os(r,t=>r.moveVertically(t,e,Eq(r).height))}const xR=r=>Pq(r,!1),DR=r=>Pq(r,!0),DSe=r=>os(r,e=>Cf(r,e,!0)),ESe=r=>os(r,e=>Cf(r,e,!1)),TSe=r=>os(r,e=>Cf(r,e,!la(r))),kSe=r=>os(r,e=>Cf(r,e,la(r))),MSe=r=>os(r,e=>ze.cursor(r.lineBlockAt(e.head).from)),ISe=r=>os(r,e=>ze.cursor(r.lineBlockAt(e.head).to)),ER=({state:r,dispatch:e})=>(e(Zl(r,{anchor:0})),!0),TR=({state:r,dispatch:e})=>(e(Zl(r,{anchor:r.doc.length})),!0),kR=({state:r,dispatch:e})=>(e(Zl(r,{anchor:r.selection.main.anchor,head:0})),!0),MR=({state:r,dispatch:e})=>(e(Zl(r,{anchor:r.selection.main.anchor,head:r.doc.length})),!0),LSe=({state:r,dispatch:e})=>(e(r.update({selection:{anchor:0,head:r.doc.length},userEvent:"select"})),!0),FSe=({state:r,dispatch:e})=>{let t=TA(r).map(({from:n,to:i})=>ze.range(n,Math.min(i+1,r.doc.length)));return e(r.update({selection:ze.create(t),userEvent:"select"})),!0},BSe=({state:r,dispatch:e})=>{let t=av(r.selection,n=>{let i=aa(r),a=i.resolveStack(n.from,1);if(n.empty){let o=i.resolveStack(n.from,-1);o.node.from>=a.node.from&&o.node.to<=a.node.to&&(a=o)}for(let o=a;o;o=o.next){let{node:s}=o;if((s.from=n.to||s.to>n.to&&s.from<=n.from)&&o.next)return ze.range(s.to,s.from)}return n});return t.eq(r.selection)?!1:(e(Zl(r,t)),!0)},OSe=({state:r,dispatch:e})=>{let t=r.selection,n=null;return t.ranges.length>1?n=ze.create([t.main]):t.main.empty||(n=ze.create([ze.cursor(t.main.head)])),n?(e(Zl(r,n)),!0):!1};function s1(r,e){if(r.state.readOnly)return!1;let t="delete.selection",{state:n}=r,i=n.changeByRange(a=>{let{from:o,to:s}=a;if(o==s){let l=e(a);lo&&(t="delete.forward",l=cb(r,l,!0)),o=Math.min(o,l),s=Math.max(s,l)}else o=cb(r,o,!1),s=cb(r,s,!0);return o==s?{range:a}:{changes:{from:o,to:s},range:ze.cursor(o,oi(r)))n.between(e,e,(i,a)=>{ie&&(e=t?a:i)});return e}const Rq=(r,e,t)=>s1(r,n=>{let i=n.from,{state:a}=r,o=a.doc.lineAt(i),s,l;if(t&&!e&&i>o.from&&iRq(r,!1,!0),Nq=r=>Rq(r,!0,!1),zq=(r,e)=>s1(r,t=>{let n=t.head,{state:i}=r,a=i.doc.lineAt(n),o=i.charCategorizer(n);for(let s=null;;){if(n==(e?a.to:a.from)){n==t.head&&a.number!=(e?i.doc.lines:1)&&(n+=e?1:-1);break}let l=Gi(a.text,n-a.from,e)+a.from,u=a.text.slice(Math.min(n,l)-a.from,Math.max(n,l)-a.from),c=o(u);if(s!=null&&c!=s)break;(u!=" "||n!=t.head)&&(s=c),n=l}return n}),Vq=r=>zq(r,!1),PSe=r=>zq(r,!0),RSe=r=>s1(r,e=>{let t=r.lineBlockAt(e.head).to;return e.heads1(r,e=>{let t=r.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),zSe=r=>s1(r,e=>{let t=r.moveToLineBoundary(e,!0).head;return e.head{if(r.readOnly)return!1;let t=r.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:Kr.of(["",""])},range:ze.cursor(n.from)}));return e(r.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},GSe=({state:r,dispatch:e})=>{if(r.readOnly)return!1;let t=r.changeByRange(n=>{if(!n.empty||n.from==0||n.from==r.doc.length)return{range:n};let i=n.from,a=r.doc.lineAt(i),o=i==a.from?i-1:Gi(a.text,i-a.from,!1)+a.from,s=i==a.to?i+1:Gi(a.text,i-a.from,!0)+a.from;return{changes:{from:o,to:s,insert:r.doc.slice(i,s).append(r.doc.slice(o,i))},range:ze.cursor(s)}});return t.changes.empty?!1:(e(r.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function TA(r){let e=[],t=-1;for(let n of r.selection.ranges){let i=r.doc.lineAt(n.from),a=r.doc.lineAt(n.to);if(!n.empty&&n.to==a.from&&(a=r.doc.lineAt(n.to-1)),t>=i.number){let o=e[e.length-1];o.to=a.to,o.ranges.push(n)}else e.push({from:i.from,to:a.to,ranges:[n]});t=a.number+1}return e}function Gq(r,e,t){if(r.readOnly)return!1;let n=[],i=[];for(let a of TA(r)){if(t?a.to==r.doc.length:a.from==0)continue;let o=r.doc.lineAt(t?a.to+1:a.from-1),s=o.length+1;if(t){n.push({from:a.to,to:o.to},{from:a.from,insert:o.text+r.lineBreak});for(let l of a.ranges)i.push(ze.range(Math.min(r.doc.length,l.anchor+s),Math.min(r.doc.length,l.head+s)))}else{n.push({from:o.from,to:a.from},{from:a.to,insert:r.lineBreak+o.text});for(let l of a.ranges)i.push(ze.range(l.anchor-s,l.head-s))}}return n.length?(e(r.update({changes:n,scrollIntoView:!0,selection:ze.create(i,r.selection.mainIndex),userEvent:"move.line"})),!0):!1}const USe=({state:r,dispatch:e})=>Gq(r,e,!1),HSe=({state:r,dispatch:e})=>Gq(r,e,!0);function Uq(r,e,t){if(r.readOnly)return!1;let n=[];for(let i of TA(r))t?n.push({from:i.from,insert:r.doc.slice(i.from,i.to)+r.lineBreak}):n.push({from:i.to,insert:r.lineBreak+r.doc.slice(i.from,i.to)});return e(r.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const WSe=({state:r,dispatch:e})=>Uq(r,e,!1),$Se=({state:r,dispatch:e})=>Uq(r,e,!0),jSe=r=>{if(r.state.readOnly)return!1;let{state:e}=r,t=e.changes(TA(e).map(({from:i,to:a})=>(i>0?i--:a{let a;if(r.lineWrapping){let o=r.lineBlockAt(i.head),s=r.coordsAtPos(i.head,i.assoc||1);s&&(a=o.bottom+r.documentTop-s.bottom+r.defaultLineHeight/2)}return r.moveVertically(i,!0,a)}).map(t);return r.dispatch({changes:t,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function qSe(r,e){if(/\(\)|\[\]|\{\}/.test(r.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=aa(r).resolveInner(e),n=t.childBefore(e),i=t.childAfter(e),a;return n&&i&&n.to<=e&&i.from>=e&&(a=n.type.prop(Pr.closedBy))&&a.indexOf(i.name)>-1&&r.doc.lineAt(n.to).from==r.doc.lineAt(i.from).from&&!/\S/.test(r.sliceDoc(n.to,i.from))?{from:n.to,to:i.from}:null}const IR=Hq(!1),YSe=Hq(!0);function Hq(r){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(i=>{let{from:a,to:o}=i,s=e.doc.lineAt(a),l=!r&&a==o&&qSe(e,a);r&&(a=o=(o<=s.to?s:e.doc.lineAt(o)).to);let u=new wA(e,{simulateBreak:a,simulateDoubleBreak:!!l}),c=p3(u,a);for(c==null&&(c=gA(/^\s*/.exec(e.doc.lineAt(a).text)[0],e.tabSize));os.from&&a{let i=[];for(let o=n.from;o<=n.to;){let s=r.doc.lineAt(o);s.number>t&&(n.empty||n.to>s.from)&&(e(s,i,n),t=s.number),o=s.to+1}let a=r.changes(i);return{changes:i,range:ze.range(a.mapPos(n.anchor,1),a.mapPos(n.head,1))}})}const ZSe=({state:r,dispatch:e})=>{if(r.readOnly)return!1;let t=Object.create(null),n=new wA(r,{overrideIndentation:a=>{let o=t[a];return o??-1}}),i=C3(r,(a,o,s)=>{let l=p3(n,a.from);if(l==null)return;/\S/.test(a.text)||(l=0);let u=/^\s*/.exec(a.text)[0],c=ey(r,l);(u!=c||s.fromr.readOnly?!1:(e(r.update(C3(r,(t,n)=>{n.push({from:t.from,insert:r.facet(d3)})}),{userEvent:"input.indent"})),!0),KSe=({state:r,dispatch:e})=>r.readOnly?!1:(e(r.update(C3(r,(t,n)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let a=gA(i,r.tabSize),o=0,s=ey(r,Math.max(0,a-ES(r)));for(;o(r.setTabFocusMode(),!0),JSe=[{key:"Ctrl-b",run:wq,shift:Mq,preventDefault:!0},{key:"Ctrl-f",run:Sq,shift:Iq},{key:"Ctrl-p",run:xq,shift:Bq},{key:"Ctrl-n",run:Dq,shift:Oq},{key:"Ctrl-a",run:ySe,shift:MSe},{key:"Ctrl-e",run:bSe,shift:ISe},{key:"Ctrl-d",run:Nq},{key:"Ctrl-h",run:Hk},{key:"Ctrl-k",run:RSe},{key:"Ctrl-Alt-h",run:Vq},{key:"Ctrl-o",run:VSe},{key:"Ctrl-t",run:GSe},{key:"Ctrl-v",run:Uk}],e2e=[{key:"ArrowLeft",run:wq,shift:Mq,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:uSe,shift:SSe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:vSe,shift:TSe,preventDefault:!0},{key:"ArrowRight",run:Sq,shift:Iq,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:cSe,shift:ASe,preventDefault:!0},{mac:"Cmd-ArrowRight",run:mSe,shift:kSe,preventDefault:!0},{key:"ArrowUp",run:xq,shift:Bq,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ER,shift:kR},{mac:"Ctrl-ArrowUp",run:CR,shift:xR},{key:"ArrowDown",run:Dq,shift:Oq,preventDefault:!0},{mac:"Cmd-ArrowDown",run:TR,shift:MR},{mac:"Ctrl-ArrowDown",run:Uk,shift:DR},{key:"PageUp",run:CR,shift:xR},{key:"PageDown",run:Uk,shift:DR},{key:"Home",run:gSe,shift:ESe,preventDefault:!0},{key:"Mod-Home",run:ER,shift:kR},{key:"End",run:pSe,shift:DSe,preventDefault:!0},{key:"Mod-End",run:TR,shift:MR},{key:"Enter",run:IR,shift:IR},{key:"Mod-a",run:LSe},{key:"Backspace",run:Hk,shift:Hk},{key:"Delete",run:Nq},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Vq},{key:"Mod-Delete",mac:"Alt-Delete",run:PSe},{mac:"Mod-Backspace",run:NSe},{mac:"Mod-Delete",run:zSe}].concat(JSe.map(r=>({mac:r.key,run:r.run,shift:r.shift}))),t2e=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:hSe,shift:CSe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:dSe,shift:xSe},{key:"Alt-ArrowUp",run:USe},{key:"Shift-Alt-ArrowUp",run:WSe},{key:"Alt-ArrowDown",run:HSe},{key:"Shift-Alt-ArrowDown",run:$Se},{key:"Escape",run:OSe},{key:"Mod-Enter",run:YSe},{key:"Alt-l",mac:"Ctrl-l",run:FSe},{key:"Mod-i",run:BSe,preventDefault:!0},{key:"Mod-[",run:KSe},{key:"Mod-]",run:XSe},{key:"Mod-Alt-\\",run:ZSe},{key:"Shift-Mod-k",run:jSe},{key:"Shift-Mod-\\",run:wSe},{key:"Mod-/",run:Wwe},{key:"Alt-A",run:jwe},{key:"Ctrl-m",mac:"Shift-Alt-m",run:QSe}].concat(e2e);function Dn(){var r=arguments[0];typeof r=="string"&&(r=document.createElement(r));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=t[n];typeof i=="string"?r.setAttribute(n,i):i!=null&&(r[n]=i)}e++}for(;er.normalize("NFKD"):r=>r;class Lg{constructor(e,t,n=0,i=e.length,a,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,i),this.bufferStart=n,this.normalize=a?s=>a(LR(s)):LR,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ea(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=KL(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=qo(e);let i=this.normalize(t);if(i.length)for(let a=0,o=n;;a++){let s=i.charCodeAt(a),l=this.match(s,o,this.bufferPos+this.bufferStart);if(a==i.length-1){if(l)return this.value=l,this;break}o==n&&athis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,i=n+t[0].length;if(this.matchPos=OS(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=n||i.to<=t){let s=new Yp(t,e.sliceString(t,n));return bx.set(e,s),s}if(i.from==t&&i.to==n)return i;let{text:a,from:o}=i;return o>t&&(a=e.sliceString(t,o)+a,o=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,i=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,match:t},this.matchPos=OS(this.text,i+(n==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Yp.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(jq.prototype[Symbol.iterator]=qq.prototype[Symbol.iterator]=function(){return this});function r2e(r){try{return new RegExp(r,x3),!0}catch{return!1}}function OS(r,e){if(e>=r.length)return e;let t=r.lineAt(e),n;for(;e=56320&&n<57344;)e++;return e}function Wk(r){let e=String(r.state.doc.lineAt(r.state.selection.main.head).number),t=Dn("input",{class:"cm-textfield",name:"line",value:e}),n=Dn("form",{class:"cm-gotoLine",onkeydown:a=>{a.keyCode==27?(a.preventDefault(),r.dispatch({effects:PS.of(!1)}),r.focus()):a.keyCode==13&&(a.preventDefault(),i())},onsubmit:a=>{a.preventDefault(),i()}},Dn("label",r.state.phrase("Go to line"),": ",t)," ",Dn("button",{class:"cm-button",type:"submit"},r.state.phrase("go")));function i(){let a=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!a)return;let{state:o}=r,s=o.doc.lineAt(o.selection.main.head),[,l,u,c,f]=a,h=c?+c.slice(1):0,d=u?+u:s.number;if(u&&f){let v=d/100;l&&(v=v*(l=="-"?-1:1)+s.number/o.doc.lines),d=Math.round(o.doc.lines*v)}else u&&l&&(d=d*(l=="-"?-1:1)+s.number);let p=o.doc.line(Math.max(1,Math.min(o.doc.lines,d))),g=ze.cursor(p.from+Math.max(0,Math.min(h,p.length)));r.dispatch({effects:[PS.of(!1),St.scrollIntoView(g.from,{y:"center"})],selection:g}),r.focus()}return{dom:n}}const PS=Sr.define(),FR=ji.define({create(){return!0},update(r,e){for(let t of e.effects)t.is(PS)&&(r=t.value);return r},provide:r=>J0.from(r,e=>e?Wk:null)}),n2e=r=>{let e=Q0(r,Wk);if(!e){let t=[PS.of(!0)];r.state.field(FR,!1)==null&&t.push(Sr.appendConfig.of([FR,i2e])),r.dispatch({effects:t}),e=Q0(r,Wk)}return e&&e.dom.querySelector("input").select(),!0},i2e=St.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),a2e={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},o2e=Dt.define({combine(r){return Af(r,a2e,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function s2e(r){return[h2e,f2e]}const l2e=Jt.mark({class:"cm-selectionMatch"}),u2e=Jt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function BR(r,e,t,n){return(t==0||r(e.sliceDoc(t-1,t))!=On.Word)&&(n==e.doc.length||r(e.sliceDoc(n,n+1))!=On.Word)}function c2e(r,e,t,n){return r(e.sliceDoc(t,t+1))==On.Word&&r(e.sliceDoc(n-1,n))==On.Word}const f2e=Ta.fromClass(class{constructor(r){this.decorations=this.getDeco(r)}update(r){(r.selectionSet||r.docChanged||r.viewportChanged)&&(this.decorations=this.getDeco(r.view))}getDeco(r){let e=r.state.facet(o2e),{state:t}=r,n=t.selection;if(n.ranges.length>1)return Jt.none;let i=n.main,a,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return Jt.none;let l=t.wordAt(i.head);if(!l)return Jt.none;o=t.charCategorizer(i.head),a=t.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return Jt.none;if(e.wholeWords){if(a=t.sliceDoc(i.from,i.to),o=t.charCategorizer(i.head),!(BR(o,t,i.from,i.to)&&c2e(o,t,i.from,i.to)))return Jt.none}else if(a=t.sliceDoc(i.from,i.to),!a)return Jt.none}let s=[];for(let l of r.visibleRanges){let u=new Lg(t.doc,a,l.from,l.to);for(;!u.next().done;){let{from:c,to:f}=u.value;if((!o||BR(o,t,c,f))&&(i.empty&&c<=i.from&&f>=i.to?s.push(u2e.range(c,f)):(c>=i.to||f<=i.from)&&s.push(l2e.range(c,f)),s.length>e.maxMatches))return Jt.none}}return Jt.set(s)}},{decorations:r=>r.decorations}),h2e=St.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),d2e=({state:r,dispatch:e})=>{let{selection:t}=r,n=ze.create(t.ranges.map(i=>r.wordAt(i.head)||ze.cursor(i.head)),t.mainIndex);return n.eq(t)?!1:(e(r.update({selection:n})),!0)};function p2e(r,e){let{main:t,ranges:n}=r.selection,i=r.wordAt(t.head),a=i&&i.from==t.from&&i.to==t.to;for(let o=!1,s=new Lg(r.doc,e,n[n.length-1].to);;)if(s.next(),s.done){if(o)return null;s=new Lg(r.doc,e,0,Math.max(0,n[n.length-1].from-1)),o=!0}else{if(o&&n.some(l=>l.from==s.value.from))continue;if(a){let l=r.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const g2e=({state:r,dispatch:e})=>{let{ranges:t}=r.selection;if(t.some(a=>a.from===a.to))return d2e({state:r,dispatch:e});let n=r.sliceDoc(t[0].from,t[0].to);if(r.selection.ranges.some(a=>r.sliceDoc(a.from,a.to)!=n))return!1;let i=p2e(r,n);return i?(e(r.update({selection:r.selection.addRange(ze.range(i.from,i.to),!1),effects:St.scrollIntoView(i.to)})),!0):!1},ov=Dt.define({combine(r){return Af(r,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new E2e(e),scrollToMatch:e=>St.scrollIntoView(e)})}});class Yq{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||r2e(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?` +`:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new b2e(this):new m2e(this)}getCursor(e,t=0,n){let i=e.doc?e:en.create({doc:e});return n==null&&(n=i.doc.length),this.regexp?gp(this,i,t,n):pp(this,i,t,n)}}class Zq{constructor(e){this.spec=e}}function pp(r,e,t,n){return new Lg(e.doc,r.unquoted,t,n,r.caseSensitive?void 0:i=>i.toLowerCase(),r.wholeWord?v2e(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function v2e(r,e){return(t,n,i,a)=>((a>t||a+i.length=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let a=pp(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!a.next().done;)i(a.value.from,a.value.to)}}function gp(r,e,t,n){return new jq(e.doc,r.search,{ignoreCase:!r.caseSensitive,test:r.wholeWord?y2e(e.charCategorizer(e.selection.main.head)):void 0},t,n)}function RS(r,e){return r.slice(Gi(r,e,!1),e)}function NS(r,e){return r.slice(e,Gi(r,e))}function y2e(r){return(e,t,n)=>!n[0].length||(r(RS(n.input,n.index))!=On.Word||r(NS(n.input,n.index))!=On.Word)&&(r(NS(n.input,n.index+n[0].length))!=On.Word||r(RS(n.input,n.index+n[0].length))!=On.Word)}class b2e extends Zq{nextMatch(e,t,n){let i=gp(this.spec,e,n,e.doc.length).next();return i.done&&(i=gp(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,n){for(let i=1;;i++){let a=Math.max(t,n-i*1e4),o=gp(this.spec,e,a,n),s=null;for(;!o.next().done;)s=o.value;if(s&&(a==t||s.from>a+10))return s;if(a==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,n)=>n=="$"?"$":n=="&"?e.match[0]:n!="0"&&+n=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let a=gp(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!a.next().done;)i(a.value.from,a.value.to)}}const iy=Sr.define(),D3=Sr.define(),Wc=ji.define({create(r){return new _x($k(r).create(),null)},update(r,e){for(let t of e.effects)t.is(iy)?r=new _x(t.value.create(),r.panel):t.is(D3)&&(r=new _x(r.query,t.value?E3:null));return r},provide:r=>J0.from(r,e=>e.panel)});class _x{constructor(e,t){this.query=e,this.panel=t}}const _2e=Jt.mark({class:"cm-searchMatch"}),w2e=Jt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),S2e=Ta.fromClass(class{constructor(r){this.view=r,this.decorations=this.highlight(r.state.field(Wc))}update(r){let e=r.state.field(Wc);(e!=r.startState.field(Wc)||r.docChanged||r.selectionSet||r.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:r,panel:e}){if(!e||!r.spec.valid)return Jt.none;let{view:t}=this,n=new xg;for(let i=0,a=t.visibleRanges,o=a.length;ia[i+1].from-2*250;)l=a[++i].to;r.highlight(t.state,s,l,(u,c)=>{let f=t.state.selection.ranges.some(h=>h.from==u&&h.to==c);n.add(u,c,f?w2e:_2e)})}return n.finish()}},{decorations:r=>r.decorations});function l1(r){return e=>{let t=e.state.field(Wc,!1);return t&&t.query.spec.valid?r(e,t):Qq(e)}}const zS=l1((r,{query:e})=>{let{to:t}=r.state.selection.main,n=e.nextMatch(r.state,t,t);if(!n)return!1;let i=ze.single(n.from,n.to),a=r.state.facet(ov);return r.dispatch({selection:i,effects:[T3(r,n),a.scrollToMatch(i.main,r)],userEvent:"select.search"}),Kq(r),!0}),VS=l1((r,{query:e})=>{let{state:t}=r,{from:n}=t.selection.main,i=e.prevMatch(t,n,n);if(!i)return!1;let a=ze.single(i.from,i.to),o=r.state.facet(ov);return r.dispatch({selection:a,effects:[T3(r,i),o.scrollToMatch(a.main,r)],userEvent:"select.search"}),Kq(r),!0}),A2e=l1((r,{query:e})=>{let t=e.matchAll(r.state,1e3);return!t||!t.length?!1:(r.dispatch({selection:ze.create(t.map(n=>ze.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),C2e=({state:r,dispatch:e})=>{let t=r.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:i}=t.main,a=[],o=0;for(let s=new Lg(r.doc,r.sliceDoc(n,i));!s.next().done;){if(a.length>1e3)return!1;s.value.from==n&&(o=a.length),a.push(ze.range(s.value.from,s.value.to))}return e(r.update({selection:ze.create(a,o),userEvent:"select.search.matches"})),!0},OR=l1((r,{query:e})=>{let{state:t}=r,{from:n,to:i}=t.selection.main;if(t.readOnly)return!1;let a=e.nextMatch(t,n,n);if(!a)return!1;let o=a,s=[],l,u,c=[];if(o.from==n&&o.to==i&&(u=t.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:u}),o=e.nextMatch(t,o.from,o.to),c.push(St.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+"."))),o){let f=s.length==0||s[0].from>=a.to?0:a.to-a.from-u.length;l=ze.single(o.from-f,o.to-f),c.push(T3(r,o)),c.push(t.facet(ov).scrollToMatch(l.main,r))}return r.dispatch({changes:s,selection:l,effects:c,userEvent:"input.replace"}),!0}),x2e=l1((r,{query:e})=>{if(r.state.readOnly)return!1;let t=e.matchAll(r.state,1e9).map(i=>{let{from:a,to:o}=i;return{from:a,to:o,insert:e.getReplacement(i)}});if(!t.length)return!1;let n=r.state.phrase("replaced $ matches",t.length)+".";return r.dispatch({changes:t,effects:St.announce.of(n),userEvent:"input.replace.all"}),!0});function E3(r){return r.state.facet(ov).createPanel(r)}function $k(r,e){var t,n,i,a,o;let s=r.selection.main,l=s.empty||s.to>s.from+100?"":r.sliceDoc(s.from,s.to);if(e&&!l)return e;let u=r.facet(ov);return new Yq({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(n=e==null?void 0:e.caseSensitive)!==null&&n!==void 0?n:u.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:u.literal,regexp:(a=e==null?void 0:e.regexp)!==null&&a!==void 0?a:u.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:u.wholeWord})}function Xq(r){let e=Q0(r,E3);return e&&e.dom.querySelector("[main-field]")}function Kq(r){let e=Xq(r);e&&e==r.root.activeElement&&e.select()}const Qq=r=>{let e=r.state.field(Wc,!1);if(e&&e.panel){let t=Xq(r);if(t&&t!=r.root.activeElement){let n=$k(r.state,e.query.spec);n.valid&&r.dispatch({effects:iy.of(n)}),t.focus(),t.select()}}else r.dispatch({effects:[D3.of(!0),e?iy.of($k(r.state,e.query.spec)):Sr.appendConfig.of(k2e)]});return!0},Jq=r=>{let e=r.state.field(Wc,!1);if(!e||!e.panel)return!1;let t=Q0(r,E3);return t&&t.dom.contains(r.root.activeElement)&&r.focus(),r.dispatch({effects:D3.of(!1)}),!0},D2e=[{key:"Mod-f",run:Qq,scope:"editor search-panel"},{key:"F3",run:zS,shift:VS,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:zS,shift:VS,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Jq,scope:"editor search-panel"},{key:"Mod-Shift-l",run:C2e},{key:"Mod-Alt-g",run:n2e},{key:"Mod-d",run:g2e,preventDefault:!0}];class E2e{constructor(e){this.view=e;let t=this.query=e.state.field(Wc).query.spec;this.commit=this.commit.bind(this),this.searchField=Dn("input",{value:t.search,placeholder:ao(e,"Find"),"aria-label":ao(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Dn("input",{value:t.replace,placeholder:ao(e,"Replace"),"aria-label":ao(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Dn("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Dn("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Dn("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(i,a,o){return Dn("button",{class:"cm-button",name:i,onclick:a,type:"button"},o)}this.dom=Dn("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,n("next",()=>zS(e),[ao(e,"next")]),n("prev",()=>VS(e),[ao(e,"previous")]),n("select",()=>A2e(e),[ao(e,"all")]),Dn("label",null,[this.caseField,ao(e,"match case")]),Dn("label",null,[this.reField,ao(e,"regexp")]),Dn("label",null,[this.wordField,ao(e,"by word")]),...e.state.readOnly?[]:[Dn("br"),this.replaceField,n("replace",()=>OR(e),[ao(e,"replace")]),n("replaceAll",()=>x2e(e),[ao(e,"replace all")])],Dn("button",{name:"close",onclick:()=>Jq(e),"aria-label":ao(e,"close"),type:"button"},["×"])])}commit(){let e=new Yq({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:iy.of(e)}))}keydown(e){G1e(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?VS:zS)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),OR(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(iy)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ov).top}}function ao(r,e){return r.state.phrase(e)}const fb=30,hb=/[\s\.,:;?!]/;function T3(r,{from:e,to:t}){let n=r.state.doc.lineAt(e),i=r.state.doc.lineAt(t).to,a=Math.max(n.from,e-fb),o=Math.min(i,t+fb),s=r.state.sliceDoc(a,o);if(a!=n.from){for(let l=0;ls.length-fb;l--)if(!hb.test(s[l-1])&&hb.test(s[l])){s=s.slice(0,l);break}}return St.announce.of(`${r.state.phrase("current match")}. ${s} ${r.state.phrase("on line")} ${n.number}.`)}const T2e=St.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),k2e=[Wc,Ed.low(S2e),T2e];class M2e{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class mh{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let i=e,a=n.facet(ay).markerFilter;a&&(i=a(i,n));let o=Jt.set(i.map(s=>s.from==s.to||s.from==s.to-1&&n.doc.lineAt(s.from).to==s.from?Jt.widget({widget:new z2e(s),diagnostic:s}).range(s.from):Jt.mark({attributes:{class:"cm-lintRange cm-lintRange-"+s.severity+(s.markClass?" "+s.markClass:"")},diagnostic:s}).range(s.from,s.to)),!0);return new mh(o,t,Fg(o))}}function Fg(r,e=null,t=0){let n=null;return r.between(t,1e9,(i,a,{spec:o})=>{if(!(e&&o.diagnostic!=e))return n=new M2e(i,a,o.diagnostic),!1}),n}function I2e(r,e){let t=e.pos,n=e.end||t,i=r.state.facet(ay).hideOn(r,t,n);if(i!=null)return i;let a=r.startState.doc.lineAt(e.pos);return!!(r.effects.some(o=>o.is(eY))||r.changes.touchesRange(a.from,Math.max(a.to,n)))}function L2e(r,e){return r.field(go,!1)?e:e.concat(Sr.appendConfig.of(U2e))}const eY=Sr.define(),k3=Sr.define(),tY=Sr.define(),go=ji.define({create(){return new mh(Jt.none,null,null)},update(r,e){if(e.docChanged&&r.diagnostics.size){let t=r.diagnostics.map(e.changes),n=null,i=r.panel;if(r.selected){let a=e.changes.mapPos(r.selected.from,1);n=Fg(t,r.selected.diagnostic,a)||Fg(t,null,a)}!t.size&&i&&e.state.facet(ay).autoPanel&&(i=null),r=new mh(t,i,n)}for(let t of e.effects)if(t.is(eY)){let n=e.state.facet(ay).autoPanel?t.value.length?oy.open:null:r.panel;r=mh.init(t.value,n,e.state)}else t.is(k3)?r=new mh(r.diagnostics,t.value?oy.open:null,r.selected):t.is(tY)&&(r=new mh(r.diagnostics,r.panel,t.value));return r},provide:r=>[J0.from(r,e=>e.panel),St.decorations.from(r,e=>e.diagnostics)]}),F2e=Jt.mark({class:"cm-lintRange cm-lintRange-active"});function B2e(r,e,t){let{diagnostics:n}=r.state.field(go),i=[],a=2e8,o=0;n.between(e-(t<0?1:0),e+(t>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||t>0)&&(enY(r,t,!1)))}const P2e=r=>{let e=r.state.field(go,!1);(!e||!e.panel)&&r.dispatch({effects:L2e(r.state,[k3.of(!0)])});let t=Q0(r,oy.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},PR=r=>{let e=r.state.field(go,!1);return!e||!e.panel?!1:(r.dispatch({effects:k3.of(!1)}),!0)},R2e=r=>{let e=r.state.field(go,!1);if(!e)return!1;let t=r.state.selection.main,n=e.diagnostics.iter(t.to+1);return!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==t.from&&n.to==t.to)?!1:(r.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)},N2e=[{key:"Mod-Shift-m",run:P2e,preventDefault:!0},{key:"F8",run:R2e}],ay=Dt.define({combine(r){return Object.assign({sources:r.map(e=>e.source).filter(e=>e!=null)},Af(r.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function rY(r){let e=[];if(r)e:for(let{name:t}of r){for(let n=0;na.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function nY(r,e,t){var n;let i=t?rY(e.actions):[];return Dn("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Dn("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(r):e.message),(n=e.actions)===null||n===void 0?void 0:n.map((a,o)=>{let s=!1,l=h=>{if(h.preventDefault(),s)return;s=!0;let d=Fg(r.state.field(go).diagnostics,e);d&&a.apply(r,d.from,d.to)},{name:u}=a,c=i[o]?u.indexOf(i[o]):-1,f=c<0?u:[u.slice(0,c),Dn("u",u.slice(c,c+1)),u.slice(c+1)];return Dn("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[o]})"`}.`},f)}),e.source&&Dn("div",{class:"cm-diagnosticSource"},e.source))}class z2e extends iv{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Dn("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class RR{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=nY(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class oy{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)PR(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:a}=this.items[this.selectedIndex],o=rY(a.actions);for(let s=0;s{for(let a=0;aPR(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(go).selected;if(!e)return-1;for(let t=0;t{let u=-1,c;for(let f=n;fn&&(this.items.splice(n,u-n),i=!0)),t&&c.diagnostic==t.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),a=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),n++});n({sel:a.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:s})=>{let l=s.height/this.list.offsetHeight;o.tops.bottom&&(this.list.scrollTop+=(o.bottom-s.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let n=e;e=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(go),n=Fg(t.diagnostics,this.items[e].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:tY.of(n)})}static open(e){return new oy(e)}}function V2e(r,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(r)}')`}function db(r){return V2e(``,'width="6" height="3"')}const G2e=St.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:db("#d11")},".cm-lintRange-warning":{backgroundImage:db("orange")},".cm-lintRange-info":{backgroundImage:db("#999")},".cm-lintRange-hint":{backgroundImage:db("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),U2e=[go,St.decorations.compute([go],r=>{let{selected:e,panel:t}=r.field(go);return!e||!t||e.from==e.to?Jt.none:Jt.set([F2e.range(e.from,e.to)])}),obe(B2e,{hideOn:I2e}),G2e],ua=({variant:r,settings:e,styles:t})=>{const n=St.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:r==="dark"}),i=o1.define(t);return[n,$j(i)]};ua({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:O.comment,color:"#404080"},{tag:[O.string,O.regexp],color:"#999999"},{tag:O.number,color:"#7090B0"},{tag:[O.bool,O.null],color:"#8080A0"},{tag:[O.punctuation,O.derefOperator],color:"#805080"},{tag:O.keyword,color:"#60B0FF"},{tag:O.definitionKeyword,color:"#B0FFF0"},{tag:O.moduleKeyword,color:"#60B0FF"},{tag:O.operator,color:"#A0A0FF"},{tag:[O.variableName,O.self],color:"#008080"},{tag:O.operatorKeyword,color:"#A0A0FF"},{tag:O.controlKeyword,color:"#80A0FF"},{tag:O.className,color:"#70E080"},{tag:[O.function(O.propertyName),O.propertyName],color:"#50A0A0"},{tag:O.tagName,color:"#009090"},{tag:O.modifier,color:"#B0FFF0"},{tag:[O.squareBracket,O.attributeName],color:"#D0D0FF"}]});ua({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:O.comment,color:"#787b8099"},{tag:O.string,color:"#86b300"},{tag:O.regexp,color:"#4cbf99"},{tag:[O.number,O.bool,O.null],color:"#ffaa33"},{tag:O.variableName,color:"#5c6166"},{tag:[O.definitionKeyword,O.modifier],color:"#fa8d3e"},{tag:[O.keyword,O.special(O.brace)],color:"#fa8d3e"},{tag:O.operator,color:"#ed9366"},{tag:O.separator,color:"#5c6166b3"},{tag:O.punctuation,color:"#5c6166"},{tag:[O.definition(O.propertyName),O.function(O.variableName)],color:"#f2ae49"},{tag:[O.className,O.definition(O.typeName)],color:"#22a4e6"},{tag:[O.tagName,O.typeName,O.self,O.labelName],color:"#55b4d4"},{tag:O.angleBracket,color:"#55b4d480"},{tag:O.attributeName,color:"#f2ae49"}]});ua({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:O.comment,color:"#6E6E6E"},{tag:[O.string,O.regexp,O.special(O.brace)],color:"#5C81B3"},{tag:O.number,color:"#C1E1B8"},{tag:O.bool,color:"#53667D"},{tag:[O.definitionKeyword,O.modifier,O.function(O.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[O.keyword,O.moduleKeyword,O.operatorKeyword,O.operator],color:"#697A8E",fontWeight:"bold"},{tag:[O.variableName,O.attributeName],color:"#708E67"},{tag:[O.function(O.variableName),O.definition(O.propertyName),O.derefOperator],color:"#fff"},{tag:O.tagName,color:"#A3D295"}]});ua({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:O.comment,color:"#666666"},{tag:[O.string,O.special(O.brace)],color:"#54BE0D"},{tag:O.regexp,color:"#E9C062"},{tag:O.number,color:"#CF6A4C"},{tag:[O.keyword,O.operator],color:"#5EA6EA"},{tag:O.variableName,color:"#7587A6"},{tag:[O.definitionKeyword,O.modifier],color:"#F9EE98"},{tag:[O.propertyName,O.function(O.variableName)],color:"#937121"},{tag:[O.typeName,O.angleBracket,O.tagName],color:"#9B859D"}]});ua({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:O.comment,color:"#6B4E32"},{tag:[O.keyword,O.operator,O.derefOperator],color:"#EF5D32"},{tag:O.className,color:"#EFAC32",fontWeight:"bold"},{tag:[O.typeName,O.propertyName,O.function(O.variableName),O.definition(O.variableName)],color:"#EFAC32"},{tag:O.definition(O.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:O.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[O.number,O.bool],color:"#6C99BB"},{tag:[O.variableName,O.self],color:"#7DAF9C"},{tag:[O.string,O.special(O.brace),O.regexp],color:"#D9D762"},{tag:[O.angleBracket,O.tagName,O.attributeName],color:"#EFCB43"}]});ua({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:O.comment,color:"#404040"},{tag:[O.string,O.special(O.brace),O.regexp],color:"#00D8FF"},{tag:O.number,color:"#E62286"},{tag:[O.variableName,O.attributeName,O.self],color:"#E62286",fontWeight:"bold"},{tag:O.function(O.variableName),color:"#fff",fontWeight:"bold"}]});ua({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:O.comment,color:"#BCC8BA"},{tag:[O.string,O.special(O.brace),O.regexp],color:"#5D90CD"},{tag:[O.number,O.bool,O.null],color:"#46A609"},{tag:O.keyword,color:"#AF956F"},{tag:[O.definitionKeyword,O.modifier],color:"#C52727"},{tag:[O.angleBracket,O.tagName,O.attributeName],color:"#606060"},{tag:O.self,color:"#000"}]});ua({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:O.comment,color:"#0088FF"},{tag:O.string,color:"#3AD900"},{tag:O.regexp,color:"#80FFC2"},{tag:[O.number,O.bool,O.null],color:"#FF628C"},{tag:[O.definitionKeyword,O.modifier],color:"#FFEE80"},{tag:O.variableName,color:"#CCCCCC"},{tag:O.self,color:"#FF80E1"},{tag:[O.className,O.definition(O.propertyName),O.function(O.variableName),O.definition(O.typeName),O.labelName],color:"#FFDD00"},{tag:[O.keyword,O.operator],color:"#FF9D00"},{tag:[O.propertyName,O.typeName],color:"#80FFBB"},{tag:O.special(O.brace),color:"#EDEF7D"},{tag:O.attributeName,color:"#9EFFFF"},{tag:O.derefOperator,color:"#fff"}]});ua({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:O.comment,color:"#AEAEAE"},{tag:[O.string,O.special(O.brace),O.regexp],color:"#8DFF8E"},{tag:[O.className,O.definition(O.propertyName),O.function(O.variableName),O.function(O.definition(O.variableName)),O.definition(O.typeName)],color:"#A3EBFF"},{tag:[O.number,O.bool,O.null],color:"#62E9BD"},{tag:[O.keyword,O.operator],color:"#2BF1DC"},{tag:[O.definitionKeyword,O.modifier],color:"#F8FBB1"},{tag:[O.variableName,O.self],color:"#B683CA"},{tag:[O.angleBracket,O.tagName,O.typeName,O.propertyName],color:"#60A4F1"},{tag:O.derefOperator,color:"#E0E0E0"},{tag:O.attributeName,color:"#7BACCA"}]});ua({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:O.comment,color:"#6272a4"},{tag:[O.string,O.special(O.brace)],color:"#f1fa8c"},{tag:[O.number,O.self,O.bool,O.null],color:"#bd93f9"},{tag:[O.keyword,O.operator],color:"#ff79c6"},{tag:[O.definitionKeyword,O.typeName],color:"#8be9fd"},{tag:O.definition(O.typeName),color:"#f8f8f2"},{tag:[O.className,O.definition(O.propertyName),O.function(O.variableName),O.attributeName],color:"#50fa7b"}]});const H2e=ua({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:O.comment,color:"#AAAAAA"},{tag:[O.keyword,O.operator,O.typeName,O.tagName,O.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[O.attributeName,O.definition(O.propertyName)],color:"#4F9FD0"},{tag:[O.className,O.string,O.special(O.brace)],color:"#CF4F5F"},{tag:O.number,color:"#CF4F5F",fontWeight:"bold"},{tag:O.variableName,fontWeight:"bold"}]});ua({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:O.comment,color:"#9995b7"},{tag:O.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[O.definitionKeyword,O.modifier],color:"#ff5792"},{tag:[O.className,O.tagName,O.definition(O.typeName)],color:"#0094f0"},{tag:[O.number,O.bool,O.null,O.special(O.brace)],color:"#5842ff"},{tag:[O.definition(O.propertyName),O.function(O.variableName)],color:"#0095a8"},{tag:O.typeName,color:"#b3694d"},{tag:[O.propertyName,O.variableName],color:"#fa8900"},{tag:O.operator,color:"#ff5792"},{tag:O.self,color:"#e64100"},{tag:[O.string,O.regexp],color:"#00b368"},{tag:[O.paren,O.bracket],color:"#0431fa"},{tag:O.labelName,color:"#00bdd6"},{tag:O.attributeName,color:"#e64100"},{tag:O.angleBracket,color:"#9995b7"}]});ua({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:O.comment,color:"#9893a5"},{tag:[O.bool,O.null],color:"#286983"},{tag:O.number,color:"#d7827e"},{tag:O.className,color:"#d7827e"},{tag:[O.angleBracket,O.tagName,O.typeName],color:"#56949f"},{tag:O.attributeName,color:"#907aa9"},{tag:O.punctuation,color:"#797593"},{tag:[O.keyword,O.modifier],color:"#286983"},{tag:[O.string,O.regexp],color:"#ea9d34"},{tag:O.variableName,color:"#d7827e"}]});ua({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:O.comment,color:"#CFCFCF"},{tag:[O.number,O.bool,O.null],color:"#E66C29"},{tag:[O.className,O.definition(O.propertyName),O.function(O.variableName),O.labelName,O.definition(O.typeName)],color:"#2EB43B"},{tag:O.keyword,color:"#D8B229"},{tag:O.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[O.definitionKeyword,O.modifier],color:"#925A47"},{tag:O.string,color:"#704D3D"},{tag:O.typeName,color:"#2F8996"},{tag:[O.variableName,O.propertyName],color:"#77ACB0"},{tag:O.self,color:"#77ACB0",fontWeight:"bold"},{tag:O.regexp,color:"#E3965E"},{tag:[O.tagName,O.angleBracket],color:"#BAA827"},{tag:O.attributeName,color:"#B06520"},{tag:O.derefOperator,color:"#000"}]});ua({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:O.comment,color:"#93A1A1"},{tag:O.string,color:"#2AA198"},{tag:O.regexp,color:"#D30102"},{tag:O.number,color:"#D33682"},{tag:O.variableName,color:"#268BD2"},{tag:[O.keyword,O.operator,O.punctuation],color:"#859900"},{tag:[O.definitionKeyword,O.modifier],color:"#073642",fontWeight:"bold"},{tag:[O.className,O.self,O.definition(O.propertyName)],color:"#268BD2"},{tag:O.function(O.variableName),color:"#268BD2"},{tag:[O.bool,O.null],color:"#B58900"},{tag:O.tagName,color:"#268BD2",fontWeight:"bold"},{tag:O.angleBracket,color:"#93A1A1"},{tag:O.attributeName,color:"#93A1A1"},{tag:O.typeName,color:"#859900"}]});ua({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:O.comment,color:"#8E908C"},{tag:[O.variableName,O.self,O.propertyName,O.attributeName,O.regexp],color:"#C82829"},{tag:[O.number,O.bool,O.null],color:"#F5871F"},{tag:[O.className,O.typeName,O.definition(O.typeName)],color:"#C99E00"},{tag:[O.string,O.special(O.brace)],color:"#718C00"},{tag:O.operator,color:"#3E999F"},{tag:[O.definition(O.propertyName),O.function(O.variableName)],color:"#4271AE"},{tag:O.keyword,color:"#8959A8"},{tag:O.derefOperator,color:"#4D4D4C"}]});const uYe=async()=>{const r=` +SELECT concat(tables.table_schema, '.', tables.table_name) as qualifiedTable, + column_name as label, + ordinal_position as ordinal, + * +FROM information_schema.tables +INNER JOIN information_schema.columns +ON tables.table_name = columns.table_name + AND tables.table_schema = columns.table_schema`.trim(),e=kO(r);if(await e.fetch(),e.error)throw e.error;const t=e.reduce((s,l)=>{l.qualifiedTable in s||(s[l.qualifiedTable]=[]);const u=l.is_nullable==="YES"?"":"(NOT NULL)";return s[l.qualifiedTable].push({label:l.label,type:"property",detail:`${l.data_type} ${u}`,boost:Math.floor(100/l.ordinal)}),s},{}),n=` + SELECT concat(tables.table_schema, '.', tables.table_name) as qualifiedTable, + * + FROM information_schema.tables`.trim(),i=kO(n);if(await i.fetch(),i.error)throw i.error;const a=i.map(s=>({label:s.qualifiedTable,displayLabel:s.table_name,detail:s.table_schema,type:"class",info:u=>{const c=t[u.label],f=document.createElement("dl");return f.classList.add("grid-cols-2","grid","gap-x-4"),c.forEach(h=>{const d=document.createElement("dt");d.classList.add("overflow-hidden","truncate","text-ellipsis"),d.textContent=h.label;const p=document.createElement("dd");p.textContent=h.detail,f.appendChild(d),f.appendChild(p)}),f}})),o=Object.values(i.reduce((s,l)=>{if(!s[l.label]){const u={label:l.table_schema,type:"namespace",info:c=>{const f=a.filter(d=>d.label.startsWith(c.label)),h=document.createElement("dl");return h.classList.add("grid-cols-2","grid","gap-x-4"),f.forEach(d=>{const p=document.createElement("dt");p.classList.add("overflow-hidden","truncate","text-ellipsis"),p.textContent=d.displayLabel;const g=document.createElement("dd");g.textContent=d.detail,h.appendChild(p),h.appendChild(g)}),h}};s[l.label]=u}return s},{}));return{schema:t,tables:a,schemas:o}},cYe=(r,e)=>{let t,n;function i({initialState:a,schema:o,onChange:s,onSubmit:l}){t&&t.destroy(),n&&n(),t=new St({doc:a,extensions:[bA.of([{preventDefault:!0,stopPropagation:!0,key:"Ctrl-Enter",mac:"Cmd-Enter",run:l},{preventDefault:!0,key:"Tab",run:c=>{if(rwe(c.state)!==null)tq(c);else{const h=c.state.selection.asSingle().ranges[0];if(h.from===h.to){const d=h.from;c.dispatch({changes:{from:d,insert:" "},selection:{anchor:h.from+1,head:h.from+1}})}else{const d=c.lineBlockAt(h.from);c.dispatch({changes:{from:d.from,insert:" "}})}}}},{preventDefault:!0,key:"Shift-Tab",run:c=>{const f=c.state.selection.asSingle().ranges[0],h=c.lineBlockAt(f.from);c.state.doc.slice(h.from,h.from+1).toString()===" "&&c.dispatch({changes:{from:h.from,to:h.from+1,insert:""}}),c.state.doc.slice(h.from,h.from+2).toString()===" "&&c.dispatch({changes:{from:h.from,to:h.from+2,insert:""}})}}]),...W2e,Uwe({...o,dialect:Hwe}),St.updateListener.of(s)],parent:r});const u=c=>{c.stopImmediatePropagation(),t.focus()};r.addEventListener("click",u),n=()=>r.removeEventListener("click",u)}return e&&i(e),{destroy(){t.destroy()},update(a){a&&i(a)}}},W2e=[H2e,Jwe(),q1e(),Q1e(),Ibe(),$j(qbe,{fallback:!0}),e_e(),H_e(),ewe(),s2e(),bA.of([...q_e,...t2e,...D2e,...lSe,...Vbe,...oq,...N2e])];function $2e(r){let e,t,n,i,a,o,s,l;return a=new po({props:{src:Ose,class:"pl-0.5"}}),{c(){e=ie("div"),t=ie("input"),n=Ie(),i=ie("div"),Ve(a.$$.fragment),this.h()},l(u){e=ae(u,"DIV",{class:!0});var c=ge(e);t=ae(c,"INPUT",{class:!0,type:!0,placeholder:!0}),n=Le(c),i=ae(c,"DIV",{class:!0});var f=ge(i);Ge(a.$$.fragment,f),f.forEach(V),c.forEach(V),this.h()},h(){Y(t,"class","search-bar svelte-104e064"),Y(t,"type","text"),Y(t,"placeholder",r[1]),Y(i,"class","search-icon svelte-104e064"),Y(e,"class","search-container svelte-104e064")},m(u,c){se(u,e,c),Q(e,t),Sw(t,r[0]),Q(e,n),Q(e,i),Ue(a,i,null),o=!0,s||(l=[gn(t,"input",r[3]),gn(t,"keyup",r[4])],s=!0)},p(u,[c]){(!o||c&2)&&Y(t,"placeholder",u[1]),c&1&&t.value!==u[0]&&Sw(t,u[0])},i(u){o||(X(a.$$.fragment,u),o=!0)},o(u){ee(a.$$.fragment,u),o=!1},d(u){u&&V(e),He(a),s=!1,Sd(l)}}}function j2e(r,e,t){let{placeholder:n="Search"}=e,{value:i}=e,{searchFunction:a}=e;function o(){i=this.value,t(0,i)}const s=()=>a(i);return r.$$set=l=>{"placeholder"in l&&t(1,n=l.placeholder),"value"in l&&t(0,i=l.value),"searchFunction"in l&&t(2,a=l.searchFunction)},[i,n,a,o,s]}class q2e extends Cr{constructor(e){super(),xr(this,e,j2e,$2e,Dr,{placeholder:1,value:0,searchFunction:2})}}function M3(r,e,t){var a,o,s,l,u;let n=[];if(r===void 0)throw Error("No data provided");if(typeof r!="object")throw Error("'"+r+"' is not a recognized query result. Data should be provided in the format: data = {"+r.replace("data.","")+"}");if(r[0]===void 0||r.length===0)throw Error("Dataset is empty: query ran successfully, but no data was returned from the database");if(((o=(a=r[0])==null?void 0:a.error_object)==null?void 0:o.error)!=null)throw Error("SQL Error: "+((u=(l=(s=r[0])==null?void 0:s.error_object)==null?void 0:l.error)==null?void 0:u.message));if(e!=null){if(!(e instanceof Array))throw Error("reqCols must be passed in as an array");for(var i=0;i0&&console.warn("Option to use object keys as headers was set, but headers were still passed!")}return Object.defineProperty(s.prototype,"options",{get:function(){return this._options},set:function(l){this._options=o({},r.ConfigDefaults,l)},enumerable:!0,configurable:!0}),s.prototype.generateCsv=function(l,u){if(u===void 0&&(u=!1),this._csv="",this._parseData(l),this._options.useBom&&(this._csv+=e.BOM),this._options.showTitle&&(this._csv+=this._options.title+`\r + +`),this._getHeaders(),this._getBody(),this._csv==""){console.log("Invalid data");return}if(u)return this._csv;var c=this._options.useTextFile?"plain":"csv",f=this._options.useTextFile?".txt":".csv",h=new Blob([this._csv],{type:"text/"+c+";charset=utf8;"});if(navigator.msSaveBlob){var d=this._options.filename.replace(/ /g,"_")+f;navigator.msSaveBlob(h,d)}else{var p=this._options.useTextFile?"text":"csv";""+p+encodeURI(this._csv);var g=document.createElement("a");g.href=URL.createObjectURL(h),g.setAttribute("visibility","hidden"),g.download=this._options.filename.replace(/ /g,"_")+f,document.body.appendChild(g),g.click(),document.body.removeChild(g)}},s.prototype._getHeaders=function(){if(!(!this._options.showLabels&&!this._options.useKeysAsHeaders)){var l=this._options.useKeysAsHeaders,u=l?Object.keys(this._data[0]):this._options.headers;if(u.length>0){for(var c="",f=0;f-1||l.indexOf(` +`)>-1||l.indexOf("\r")>-1)&&(l=this._options.quoteStrings+l+this._options.quoteStrings),l):typeof l=="boolean"?l?"TRUE":"FALSE":l},s.prototype._isFloat=function(l){return+l===l&&(!isFinite(l)||!!(l%1))},s.prototype._parseData=function(l){return this._data=typeof l!="object"?JSON.parse(l):l,this._data},s}();r.ExportToCsv=t;var n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(s){for(var l,u=a(s),c,f=1;f{l&&(s||(s=Fl(e,id,{duration:200},!0)),s.run(1))}),l=!0)},o(p){ee(d,p),p&&(s||(s=Fl(e,id,{duration:200},!1)),s.run(0)),l=!1},d(p){p&&V(e),d&&d.d(p),p&&s&&s.end(),u=!1,c()}}}function Y2e(r){let e,t;return{c(){e=Mi("svg"),t=Mi("path"),this.h()},l(n){e=Ii(n,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0});var i=ge(e);t=Ii(i,"path",{d:!0}),ge(t).forEach(V),i.forEach(V),this.h()},h(){Y(t,"d","M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5"),Y(e,"width","12"),Y(e,"height","12"),Y(e,"viewBox","0 0 24 24"),Y(e,"fill","none"),Y(e,"stroke-width","2"),Y(e,"stroke-linecap","round"),Y(e,"stroke-linejoin","round")},m(n,i){se(n,e,i),Q(e,t)},p:Oe,d(n){n&&V(e)}}}function Z2e(r){let e,t,n=r[0]&&NR(r);return{c(){n&&n.c(),e=Xe()},l(i){n&&n.l(i),e=Xe()},m(i,a){n&&n.m(i,a),se(i,e,a),t=!0},p(i,[a]){i[0]?n?(n.p(i,a),a&1&&X(n,1)):(n=NR(i),n.c(),X(n,1),n.m(e.parentNode,e)):n&&(Tt(),ee(n,1,1,()=>{n=null}),kt())},i(i){t||(X(n),t=!0)},o(i){ee(n),t=!1},d(i){i&&V(e),n&&n.d(i)}}}function X2e(r,e,t){let{$$slots:n={},$$scope:i}=e,{data:a=void 0}=e,{queryID:o=void 0}=e,{text:s="Download"}=e,{display:l=!0}=e;const u=new Date,c=new Date(u.getTime()-u.getTimezoneOffset()*6e4).toISOString().slice(0,19).replaceAll(":","-");let{downloadData:f=h=>{const d={fieldSeparator:",",quoteStrings:'"',decimalSeparator:".",showLabels:!0,showTitle:!1,filename:(o??"evidence_download")+` ${c}`,useTextFile:!1,useBom:!0,useKeysAsHeaders:!0},p=JSON.parse(JSON.stringify(Array.from(h)));new iY.ExportToCsv(d).generateCsv(p)}}=e;return r.$$set=h=>{t(4,e=An(An({},e),ts(h))),"data"in h&&t(1,a=h.data),"queryID"in h&&t(5,o=h.queryID),"text"in h&&t(2,s=h.text),"display"in h&&t(0,l=h.display),"downloadData"in h&&t(3,f=h.downloadData),"$$scope"in h&&t(6,i=h.$$scope)},r.$$.update=()=>{r.$$.dirty&1&&t(0,l=l==="true"||l===!0)},e=ts(e),[l,a,s,f,e,o,i,n]}class oY extends Cr{constructor(e){super(),xr(this,e,X2e,Z2e,Dr,{data:1,queryID:5,text:2,display:0,downloadData:3})}}function K2e(r){let e;return{c(){e=Xe()},l(t){e=Xe()},m(t,n){se(t,e,n)},p(t,[n]){},i:Oe,o:Oe,d(t){t&&V(e)}}}function Q2e(r,e,t){let{data:n}=e,{link:i}=e;const a=o=>o[i];return r.$$set=o=>{"data"in o&&t(0,n=o.data),"link"in o&&t(1,i=o.link)},[n,i,a]}class sY extends Cr{constructor(e){super(),xr(this,e,Q2e,K2e,Dr,{data:0,link:1})}}const lY=async()=>{const r=(await ll(async()=>{const{default:e}=await Promise.resolve().then(()=>Lje);return{default:e}},void 0)).default;return await ll(()=>import("./prism-bash.DTkDXsAh.js"),[]),await ll(()=>import("./prism-sql.AgAyy5H_.js"),[]),await ll(()=>import("./prism-python.DhmbaUsA.js"),[]),await ll(()=>import("./prism-markdown.4MKFcK2x.js"),[]),await ll(()=>import("./prism-svelte.RW_sD_9_.js"),[]),r};function zR(r){let e,t;return{c(){e=Mi("title"),t=ht(r[0])},l(n){e=Ii(n,"title",{});var i=ge(e);t=dt(i,r[0]),i.forEach(V)},m(n,i){se(n,e,i),Q(e,t)},p(n,i){i&1&&Bt(t,n[0])},d(n){n&&V(e)}}}function J2e(r){let e,t,n,i=r[0]&&zR(r),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{width:"100%"},{height:"100%"},{preserveAspectRatio:"xMidYMid meet"},r[1],r[2]],o={};for(let s=0;s{t(4,e=An(An({},e),ts(l))),t(2,o=hg(e,a)),"title"in l&&t(0,s=l.title)},r.$$.update=()=>{t(3,n=e["aria-label"]||e["aria-labelledby"]||s),t(1,i={"aria-hidden":n?void 0:!0,role:n?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ts(e),[s,i,o,n]}class tAe extends Cr{constructor(e){super(),xr(this,e,eAe,J2e,Dr,{title:0})}}function rAe(r){let e,t;return{c(){e=Mi("svg"),t=Mi("path"),this.h()},l(n){e=Ii(n,"svg",{class:!0,viewBox:!0,fill:!0,width:!0,height:!0,preserveAspectRatio:!0});var i=ge(e);t=Ii(i,"path",{d:!0}),ge(t).forEach(V),i.forEach(V),this.h()},h(){Y(t,"d","M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"),Y(e,"class","copyButtonSuccessIcon"),Y(e,"viewBox","0 0 24 24"),Y(e,"fill",r[0]),Y(e,"width","100%"),Y(e,"height","100%"),Y(e,"preserveAspectRatio","xMidYMid meet")},m(n,i){se(n,e,i),Q(e,t)},p(n,[i]){i&1&&Y(e,"fill",n[0])},i:Oe,o:Oe,d(n){n&&V(e)}}}function nAe(r,e,t){let{color:n="green"}=e;return r.$$set=i=>{"color"in i&&t(0,n=i.color)},[n]}class iAe extends Cr{constructor(e){super(),xr(this,e,nAe,rAe,Dr,{color:0})}}function VR(r){let e,t,n,i,a,o,s;const l=[oAe,aAe],u=[];function c(f,h){return f[3]?0:1}return t=c(r),n=u[t]=l[t](r),{c(){e=ie("button"),n.c(),this.h()},l(f){e=ae(f,"BUTTON",{class:!0});var h=ge(e);n.l(h),h.forEach(V),this.h()},h(){Y(e,"class",i="absolute opacity-0 bg-gray-50 rounded-sm p-1 group-hover:opacity-100 top-4 right-6 h-6 w-6 z-10 transition-all duration-200 ease-in-out"+(r[3],""))},m(f,h){se(f,e,h),u[t].m(e,null),a=!0,o||(s=gn(e,"click",r[7]),o=!0)},p(f,h){let d=t;t=c(f),t!==d&&(Tt(),ee(u[d],1,1,()=>{u[d]=null}),kt(),n=u[t],n||(n=u[t]=l[t](f),n.c()),X(n,1),n.m(e,null)),(!a||h&8&&i!==(i="absolute opacity-0 bg-gray-50 rounded-sm p-1 group-hover:opacity-100 top-4 right-6 h-6 w-6 z-10 transition-all duration-200 ease-in-out"+(f[3],"")))&&Y(e,"class",i)},i(f){a||(X(n),a=!0)},o(f){ee(n),a=!1},d(f){f&&V(e),u[t].d(),o=!1,s()}}}function aAe(r){let e,t;return e=new tAe({}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function oAe(r){let e,t;return e=new iAe({props:{color:"var(--green-500)"}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function sAe(r){let e;const t=r[6].default,n=Li(t,r,r[5],null);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&32)&&Fi(n,t,i,i[5],e?Oi(t,i[5],a,null):Bi(i[5]),null)},i(i){e||(X(n,i),e=!0)},o(i){ee(n,i),e=!1},d(i){n&&n.d(i)}}}function lAe(r){let e;return{c(){e=ht(r[0])},l(t){e=dt(t,r[0])},m(t,n){se(t,e,n)},p(t,n){n&1&&Bt(e,t[0])},i:Oe,o:Oe,d(t){t&&V(e)}}}function uAe(r){let e,t,n,i,a,o,s,l,u=r[1]&&VR(r);const c=[lAe,sAe],f=[];function h(d,p){return d[0]?0:1}return a=h(r),o=f[a]=c[a](r),{c(){e=ie("div"),u&&u.c(),t=Ie(),n=ie("pre"),i=ie("code"),o.c(),this.h()},l(d){e=ae(d,"DIV",{class:!0});var p=ge(e);u&&u.l(p),t=Le(p),n=ae(p,"PRE",{class:!0});var g=ge(n);i=ae(g,"CODE",{class:!0});var v=ge(i);o.l(v),v.forEach(V),g.forEach(V),p.forEach(V),this.h()},h(){Y(i,"class",s="language-"+r[2]+" text-sm"),Y(n,"class","overflow-auto pretty-scrollbar my-[0.5em]"),Y(e,"class","my-5 bg-gray-50 border border-gray-200 rounded px-3 py-2 relative group")},m(d,p){se(d,e,p),u&&u.m(e,null),Q(e,t),Q(e,n),Q(n,i),f[a].m(i,null),l=!0},p(d,[p]){d[1]?u?(u.p(d,p),p&2&&X(u,1)):(u=VR(d),u.c(),X(u,1),u.m(e,t)):u&&(Tt(),ee(u,1,1,()=>{u=null}),kt());let g=a;a=h(d),a===g?f[a].p(d,p):(Tt(),ee(f[g],1,1,()=>{f[g]=null}),kt(),o=f[a],o?o.p(d,p):(o=f[a]=c[a](d),o.c()),X(o,1),o.m(i,null)),(!l||p&4&&s!==(s="language-"+d[2]+" text-sm"))&&Y(i,"class",s)},i(d){l||(X(u),X(o),l=!0)},o(d){ee(u),ee(o),l=!1},d(d){d&&V(e),u&&u.d(),f[a].d()}}}function cAe(r,e,t){let{$$slots:n={},$$scope:i}=e,{source:a}=e,{copyToClipboard:o=!1}=e,{language:s=void 0}=e,l=!1;const u=function(){t(3,l=!1)};async function c(){try{await navigator.clipboard.writeText(a),t(3,l=!0),setTimeout(u,1500)}catch{}}const f=()=>{a!==void 0&&c()};return r.$$set=h=>{"source"in h&&t(0,a=h.source),"copyToClipboard"in h&&t(1,o=h.copyToClipboard),"language"in h&&t(2,s=h.language),"$$scope"in h&&t(5,i=h.$$scope)},r.$$.update=()=>{r.$$.dirty&4&&PG().then(async()=>{const h=await lY();typeof h<"u"?document.querySelectorAll(`pre code${s?`.language-${s}`:""}`).forEach(p=>{h.highlightElement(p,!1)}):console.error("Prism is not defined in reactive statement")})},[a,o,s,l,c,i,n,f]}class fAe extends Cr{constructor(e){super(),xr(this,e,cAe,uAe,Dr,{source:0,copyToClipboard:1,language:2})}}function ws(r,e){const t=e.filter(n=>n.id===r.id);if(t===void 0||t.length!==1){const n=r.id===void 0?new Error('please add an "id" property to all the '):new Error(`column with id: "${r.id}" not found`);return console.warn(n.message),""}return t[0]}function GS(r,e,t){if(!t||!r.length)return null;let n=0,i=0;return r.forEach(a=>{const o=Number(a[e]??0),s=Number(a[t]??0);n+=o*s,i+=s}),i>0?n/i:0}function Ou(r,e,t,n,i=null){if(!t&&n==="number"&&(t="sum"),!r||!r.length)return null;if(n!=="number"&&["sum","min","max","mean","weightedMean","median",void 0].includes(t))return"-";const a=r.map(o=>o[e]).filter(o=>o!==void 0);switch(t){case"sum":return a.reduce((o,s)=>o+Number(s),0);case"min":return Math.min(...a);case"max":return Math.max(...a);case"mean":return a.length?a.reduce((o,s)=>o+Number(s),0)/a.length:"-";case"count":return r.length;case"countDistinct":return new Set(a).size;case"weightedMean":{if(!i)return"Weight column name required for weightedMean";let o=0,s=r.reduce((l,u)=>{const c=u[i]||0;return o+=c,l+(Number(u[e])||0)*c},0);return o>0?s/o:null}case"median":{const o=a.sort((l,u)=>l-u),s=Math.floor(o.length/2);return o.length%2!==0?o[s]:(o[s-1]+o[s])/2}default:return`${t}`}}function hAe(r,e){const t=r.filter(n=>!e.includes(n));return[...e,...t]}function dAe(r){let e,t;return e=new $L({props:{error:r[8]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&256&&(a.error=n[8]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function pAe(r){let e,t,n,i;function a(u,c){return u[5]==="right"?vAe:gAe}let o=a(r),s=o(r),l=r[3]&&$R(r);return{c(){e=ie("span"),t=ie("span"),s.c(),n=Ie(),l&&l.c(),this.h()},l(u){e=ae(u,"SPAN",{class:!0});var c=ge(e);t=ae(c,"SPAN",{});var f=ge(t);s.l(f),n=Le(f),l&&l.l(f),f.forEach(V),c.forEach(V),this.h()},h(){Re(t,"text-align",r[6]??"right"),Y(e,"class",i="m-0 "+r[7]+" font-ui inline-block rounded-md"),zr(e,"px-1",r[0]),Re(e,"background-color",r[0]?r[12][r[11]].chipColor:void 0),Re(e,"border",r[0]?`1px solid ${r[12][r[11]].chipBorder}`:void 0),Re(e,"color",r[12][r[11]].color)},m(u,c){se(u,e,c),Q(e,t),s.m(t,null),Q(t,n),l&&l.m(t,null)},p(u,c){o===(o=a(u))&&s?s.p(u,c):(s.d(1),s=o(u),s&&(s.c(),s.m(t,n))),u[3]?l?l.p(u,c):(l=$R(u),l.c(),l.m(t,null)):l&&(l.d(1),l=null),c&64&&Re(t,"text-align",u[6]??"right"),c&128&&i!==(i="m-0 "+u[7]+" font-ui inline-block rounded-md")&&Y(e,"class",i),c&129&&zr(e,"px-1",u[0]),c&2049&&Re(e,"background-color",u[0]?u[12][u[11]].chipColor:void 0),c&2049&&Re(e,"border",u[0]?`1px solid ${u[12][u[11]].chipBorder}`:void 0),c&2048&&Re(e,"color",u[12][u[11]].color)},i:Oe,o:Oe,d(u){u&&V(e),s.d(),l&&l.d()}}}function gAe(r){let e,t,n=r[2]&&GR(r),i=r[1]&&UR(r);return{c(){n&&n.c(),e=Ie(),i&&i.c(),t=Xe()},l(a){n&&n.l(a),e=Le(a),i&&i.l(a),t=Xe()},m(a,o){n&&n.m(a,o),se(a,e,o),i&&i.m(a,o),se(a,t,o)},p(a,o){a[2]?n?n.p(a,o):(n=GR(a),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null),a[1]?i?i.p(a,o):(i=UR(a),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(a){a&&(V(e),V(t)),n&&n.d(a),i&&i.d(a)}}}function vAe(r){let e,t,n=r[1]&&HR(r),i=r[2]&&WR(r);return{c(){n&&n.c(),e=Ie(),i&&i.c(),t=Xe()},l(a){n&&n.l(a),e=Le(a),i&&i.l(a),t=Xe()},m(a,o){n&&n.m(a,o),se(a,e,o),i&&i.m(a,o),se(a,t,o)},p(a,o){a[1]?n?n.p(a,o):(n=HR(a),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null),a[2]?i?i.p(a,o):(i=WR(a),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(a){a&&(V(e),V(t)),n&&n.d(a),i&&i.d(a)}}}function GR(r){let e,t,n=r[11]==="positive"?"▲":r[11]==="negative"?"▼":"—";return{c(){e=ie("span"),t=new jg(!1),this.h()},l(i){e=ae(i,"SPAN",{class:!0});var a=ge(e);t=qg(a,!1),a.forEach(V),this.h()},h(){t.a=null,Y(e,"class","font-[system-ui]")},m(i,a){se(i,e,a),t.m(n,e)},p(i,a){a&2048&&n!==(n=i[11]==="positive"?"▲":i[11]==="negative"?"▼":"—")&&t.p(n)},d(i){i&&V(e)}}}function UR(r){let e;function t(a,o){return a[9]===null?yAe:mAe}let n=t(r),i=n(r);return{c(){i.c(),e=Xe()},l(a){i.l(a),e=Xe()},m(a,o){i.m(a,o),se(a,e,o)},p(a,o){n===(n=t(a))&&i?i.p(a,o):(i.d(1),i=n(a),i&&(i.c(),i.m(e.parentNode,e)))},d(a){a&&V(e),i.d(a)}}}function mAe(r){let e,t=$n(r[9],r[10],r[4])+"",n;return{c(){e=ie("span"),n=ht(t)},l(i){e=ae(i,"SPAN",{});var a=ge(e);n=dt(a,t),a.forEach(V)},m(i,a){se(i,e,a),Q(e,n)},p(i,a){a&1552&&t!==(t=$n(i[9],i[10],i[4])+"")&&Bt(n,t)},d(i){i&&V(e)}}}function yAe(r){let e,t="–";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-45ueay"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-[system-ui]")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function HR(r){let e;function t(a,o){return a[9]===null?_Ae:bAe}let n=t(r),i=n(r);return{c(){i.c(),e=Xe()},l(a){i.l(a),e=Xe()},m(a,o){i.m(a,o),se(a,e,o)},p(a,o){n===(n=t(a))&&i?i.p(a,o):(i.d(1),i=n(a),i&&(i.c(),i.m(e.parentNode,e)))},d(a){a&&V(e),i.d(a)}}}function bAe(r){let e,t=$n(r[9],r[10],r[4])+"",n;return{c(){e=ie("span"),n=ht(t)},l(i){e=ae(i,"SPAN",{});var a=ge(e);n=dt(a,t),a.forEach(V)},m(i,a){se(i,e,a),Q(e,n)},p(i,a){a&1552&&t!==(t=$n(i[9],i[10],i[4])+"")&&Bt(n,t)},d(i){i&&V(e)}}}function _Ae(r){let e,t="–";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-45ueay"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-[system-ui]")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function WR(r){let e,t,n=r[11]==="positive"?"▲":r[11]==="negative"?"▼":"– ";return{c(){e=ie("span"),t=new jg(!1),this.h()},l(i){e=ae(i,"SPAN",{class:!0});var a=ge(e);t=qg(a,!1),a.forEach(V),this.h()},h(){t.a=null,Y(e,"class","font-[system-ui]")},m(i,a){se(i,e,a),t.m(n,e)},p(i,a){a&2048&&n!==(n=i[11]==="positive"?"▲":i[11]==="negative"?"▼":"– ")&&t.p(n)},d(i){i&&V(e)}}}function $R(r){let e,t;return{c(){e=ie("span"),t=ht(r[3])},l(n){e=ae(n,"SPAN",{});var i=ge(e);t=dt(i,r[3]),i.forEach(V)},m(n,i){se(n,e,i),Q(e,t)},p(n,i){i&8&&Bt(t,n[3])},d(n){n&&V(e)}}}function wAe(r){let e,t,n,i;const a=[pAe,dAe],o=[];function s(l,u){return l[8]?1:0}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),se(l,n,u),i=!0},p(l,[u]){let c=e;e=s(l),e===c?o[e].p(l,u):(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n))},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),o[e].d(l)}}}function SAe(r,e,t){let{data:n=void 0}=e,{row:i=0}=e,{column:a=void 0}=e,{value:o=void 0}=e,{text:s=void 0}=e,{chip:l=!1}=e,{downIsGood:u=!1}=e,{fmt:c=void 0}=e,{format_object:f=void 0}=e,{columnUnitSummary:h=void 0}=e,{showValue:d=!0}=e,{showSymbol:p=!0}=e,{symbolPosition:g="right"}=e,{align:v="right"}=e,{fontClass:m=l?"text-sm":"text-base"}=e,{neutralMin:y=0}=e,{neutralMax:b=0}=e,_={positive:{color:u?"var(--red-700)":"var(--green-700)",chipColor:u?"var(--red-100)":"var(--green-100)",chipBorder:u?"var(--red-300)":"var(--green-300)"},negative:{color:u?"var(--green-700)":"var(--red-700)",chipColor:u?"var(--green-100)":"var(--red-100)",chipBorder:u?"var(--green-300)":"var(--red-300)"},neutral:{color:"var(--grey-500)",chipColor:"var(--grey-100)",chipBorder:"var(--grey-300)"}},w,S,A,C,x;return r.$$set=D=>{"data"in D&&t(13,n=D.data),"row"in D&&t(16,i=D.row),"column"in D&&t(14,a=D.column),"value"in D&&t(17,o=D.value),"text"in D&&t(3,s=D.text),"chip"in D&&t(0,l=D.chip),"downIsGood"in D&&t(15,u=D.downIsGood),"fmt"in D&&t(18,c=D.fmt),"format_object"in D&&t(19,f=D.format_object),"columnUnitSummary"in D&&t(4,h=D.columnUnitSummary),"showValue"in D&&t(1,d=D.showValue),"showSymbol"in D&&t(2,p=D.showSymbol),"symbolPosition"in D&&t(5,g=D.symbolPosition),"align"in D&&t(6,v=D.align),"fontClass"in D&&t(7,m=D.fontClass),"neutralMin"in D&&t(20,y=D.neutralMin),"neutralMax"in D&&t(21,b=D.neutralMax)},r.$$.update=()=>{var D;if(r.$$.dirty&1&&t(0,l=l==="true"||l===!0),r.$$.dirty&32768&&t(15,u=u==="true"||u===!0),r.$$.dirty&2&&t(1,d=d==="true"||d===!0),r.$$.dirty&4&&t(2,p=p==="true"||p===!0),r.$$.dirty&8348416)try{if(t(8,w=void 0),n){if(typeof n=="string")throw Error(`Received: data=${n}, expected: data={${n}}`);if(Array.isArray(n)||t(13,n=[n]),isNaN(i))throw Error("row must be a number (row="+i+")");try{Object.keys(n[i])[0]}catch{throw Error("Row "+i+" does not exist in the dataset")}t(14,a=a??Object.keys(n[i])[0]),M3(n,[a]),t(22,A=jL(n,"array")),t(9,S=n[i][a]),t(22,A=A.filter(E=>E.id===a)),c?t(10,C=yi(c,(D=A[0].format)==null?void 0:D.valueType)):t(10,C=A[0].format)}else if(o!==void 0){if(isNaN(o))throw Error("value must be a number (value="+o+")");t(9,S=o),t(10,C=c?yi(c,"number"):f??void 0)}else throw Error("No data or value provided. If you referenced a query result, check that the name is correct.");t(11,x=S>b?"positive":S{n=null}),kt()):n?(n.p(i,a),a&16&&X(n,1)):(n=jR(i),n.c(),X(n,1),n.m(e,null))},i(i){t||(X(n),t=!0)},o(i){ee(n),t=!1},d(i){i&&V(e),n&&n.d()}}}function DAe(r){let e,t="Loading...";return{c(){e=ie("p"),e.textContent=t,this.h()},l(n){e=ae(n,"P",{slot:!0,class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-e46ma0"&&(e.textContent=t),this.h()},h(){Y(e,"slot","skeleton"),Y(e,"class","text-gray-500")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function EAe(r){let e,t;return e=new LL({props:{data:r[0],$$slots:{skeleton:[DAe],empty:[xAe],default:[CAe,({loaded:n})=>({7:n}),({loaded:n})=>n?128:0]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,[i]){const a={};i&1&&(a.data=n[0]),i&414&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}let TAe="Delta";function kAe(r,e,t){let n,{data:i=void 0}=e;const a=typeof i=="object"&&"__isQueryStore"in i?i.hash:void 0;let o=(i==null?void 0:i.hash)===a,{emptySet:s=void 0}=e,{emptyMessage:l=void 0}=e;return r.$$set=u=>{t(6,e=An(An({},e),ts(u))),"data"in u&&t(0,i=u.data),"emptySet"in u&&t(1,s=u.emptySet),"emptyMessage"in u&&t(2,l=u.emptyMessage)},r.$$.update=()=>{r.$$.dirty&1&&t(3,o=(i==null?void 0:i.hash)===a),t(4,n=Object.fromEntries(Object.entries(e).filter(([,u])=>u!==void 0)))},e=ts(e),[i,s,l,o,n]}class kA extends Cr{constructor(e){super(),xr(this,e,kAe,EAe,Dr,{data:0,emptySet:1,emptyMessage:2})}}function MAe(r){let e,t,n;const i=r[17].default,a=Li(i,r,r[16],null);return{c(){e=ie("td"),a&&a.c(),this.h()},l(o){e=ae(o,"TD",{role:!0,class:!0,rowspan:!0,colspan:!0});var s=ge(e);a&&a.l(s),s.forEach(V),this.h()},h(){Y(e,"role","cell"),Y(e,"class",t=(r[15].class||"")+" "+r[0]+" "+r[11]+" whitespace-nowrap overflow-hidden first:pl-[3px] "+(r[14]?"text-xs py-[1px] px-[4px]":"py-[2px] px-[8px]")+" svelte-iw64fb"),Y(e,"rowspan",r[6]),Y(e,"colspan",r[7]),Re(e,"text-align",r[1]),Re(e,"height",r[2]),Re(e,"width",r[3]),Re(e,"white-space",r[4]?"normal":"nowrap"),Re(e,"vertical-align",r[5]),Re(e,"display",r[8]?void 0:"none"),Re(e,"background-color",r[9]),Re(e,"color",r[10]),Re(e,"padding-left",r[12]),Re(e,"border-bottom",r[13])},m(o,s){se(o,e,s),a&&a.m(e,null),n=!0},p(o,[s]){a&&a.p&&(!n||s&65536)&&Fi(a,i,o,o[16],n?Oi(i,o[16],s,null):Bi(o[16]),null),(!n||s&51201&&t!==(t=(o[15].class||"")+" "+o[0]+" "+o[11]+" whitespace-nowrap overflow-hidden first:pl-[3px] "+(o[14]?"text-xs py-[1px] px-[4px]":"py-[2px] px-[8px]")+" svelte-iw64fb"))&&Y(e,"class",t),(!n||s&64)&&Y(e,"rowspan",o[6]),(!n||s&128)&&Y(e,"colspan",o[7]),s&2&&Re(e,"text-align",o[1]),s&4&&Re(e,"height",o[2]),s&8&&Re(e,"width",o[3]),s&16&&Re(e,"white-space",o[4]?"normal":"nowrap"),s&32&&Re(e,"vertical-align",o[5]),s&256&&Re(e,"display",o[8]?void 0:"none"),s&512&&Re(e,"background-color",o[9]),s&1024&&Re(e,"color",o[10]),s&4096&&Re(e,"padding-left",o[12]),s&8192&&Re(e,"border-bottom",o[13])},i(o){n||(X(a,o),n=!0)},o(o){ee(a,o),n=!1},d(o){o&&V(e),a&&a.d(o)}}}function IAe(r,e,t){const n=["dataType","align","height","width","wrap","verticalAlign","rowSpan","colSpan","show","cellColor","fontColor","topBorder","paddingLeft","borderBottom","compact"];let i=hg(e,n),{$$slots:a={},$$scope:o}=e,{dataType:s=void 0}=e,{align:l=void 0}=e,{height:u=void 0}=e,{width:c=void 0}=e,{wrap:f=void 0}=e,{verticalAlign:h="middle"}=e,{rowSpan:d=1}=e,{colSpan:p=1}=e,{show:g=!0}=e,{cellColor:v=void 0}=e,{fontColor:m=void 0}=e,{topBorder:y=void 0}=e,{paddingLeft:b=void 0}=e,{borderBottom:_=void 0}=e,{compact:w=!1}=e;return r.$$set=S=>{e=An(An({},e),ts(S)),t(15,i=hg(e,n)),"dataType"in S&&t(0,s=S.dataType),"align"in S&&t(1,l=S.align),"height"in S&&t(2,u=S.height),"width"in S&&t(3,c=S.width),"wrap"in S&&t(4,f=S.wrap),"verticalAlign"in S&&t(5,h=S.verticalAlign),"rowSpan"in S&&t(6,d=S.rowSpan),"colSpan"in S&&t(7,p=S.colSpan),"show"in S&&t(8,g=S.show),"cellColor"in S&&t(9,v=S.cellColor),"fontColor"in S&&t(10,m=S.fontColor),"topBorder"in S&&t(11,y=S.topBorder),"paddingLeft"in S&&t(12,b=S.paddingLeft),"borderBottom"in S&&t(13,_=S.borderBottom),"compact"in S&&t(14,w=S.compact),"$$scope"in S&&t(16,o=S.$$scope)},[s,l,u,c,f,h,d,p,g,v,m,y,b,_,w,i,o,a]}class qu extends Cr{constructor(e){super(),xr(this,e,IAe,MAe,Dr,{dataType:0,align:1,height:2,width:3,wrap:4,verticalAlign:5,rowSpan:6,colSpan:7,show:8,cellColor:9,fontColor:10,topBorder:11,paddingLeft:12,borderBottom:13,compact:14})}}const Zp=(r,e=0,t=1)=>L3(F3(e,r),t),I3=r=>{r._clipped=!1,r._unclipped=r.slice(0);for(let e=0;e<=3;e++)e<3?((r[e]<0||r[e]>255)&&(r._clipped=!0),r[e]=Zp(r[e],0,255)):e===3&&(r[e]=Zp(r[e],0,1));return r},uY={};for(let r of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])uY[`[object ${r}]`]=r.toLowerCase();function Or(r){return uY[Object.prototype.toString.call(r)]||"object"}const Rr=(r,e=null)=>r.length>=3?Array.prototype.slice.call(r):Or(r[0])=="object"&&e?e.split("").filter(t=>r[0][t]!==void 0).map(t=>r[0][t]):r[0],MA=r=>{if(r.length<2)return null;const e=r.length-1;return Or(r[e])=="string"?r[e].toLowerCase():null},{PI:IA,min:L3,max:F3}=Math,du=IA*2,Sx=IA/3,LAe=IA/180,FAe=180/IA,cr={format:{},autodetect:[]};class Ke{constructor(...e){const t=this;if(Or(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=MA(e),i=!1;if(!n){i=!0,cr.sorted||(cr.autodetect=cr.autodetect.sort((a,o)=>o.p-a.p),cr.sorted=!0);for(let a of cr.autodetect)if(n=a.test(...e),n)break}if(cr.format[n]){const a=cr.format[n].apply(null,i?e:e.slice(0,-1));t._rgb=I3(a)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return Or(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const BAe="2.6.0",tr=(...r)=>new tr.Color(...r);tr.Color=Ke;tr.version=BAe;const OAe=(...r)=>{r=Rr(r,"cmyk");const[e,t,n,i]=r,a=r.length>4?r[4]:1;return i===1?[0,0,0,a]:[e>=1?0:255*(1-e)*(1-i),t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),a]},{max:qR}=Math,PAe=(...r)=>{let[e,t,n]=Rr(r,"rgb");e=e/255,t=t/255,n=n/255;const i=1-qR(e,qR(t,n)),a=i<1?1/(1-i):0,o=(1-e-i)*a,s=(1-t-i)*a,l=(1-n-i)*a;return[o,s,l,i]};Ke.prototype.cmyk=function(){return PAe(this._rgb)};tr.cmyk=(...r)=>new Ke(...r,"cmyk");cr.format.cmyk=OAe;cr.autodetect.push({p:2,test:(...r)=>{if(r=Rr(r,"cmyk"),Or(r)==="array"&&r.length===4)return"cmyk"}});const Ax=r=>Math.round(r*100)/100,RAe=(...r)=>{const e=Rr(r,"hsla");let t=MA(r)||"lsa";return e[0]=Ax(e[0]||0),e[1]=Ax(e[1]*100)+"%",e[2]=Ax(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]=e.length>3?e[3]:1,t="hsla"):e.length=3,`${t}(${e.join(",")})`},cY=(...r)=>{r=Rr(r,"rgba");let[e,t,n]=r;e/=255,t/=255,n/=255;const i=L3(e,t,n),a=F3(e,t,n),o=(a+i)/2;let s,l;return a===i?(s=0,l=Number.NaN):s=o<.5?(a-i)/(a+i):(a-i)/(2-a-i),e==a?l=(t-n)/(a-i):t==a?l=2+(n-e)/(a-i):n==a&&(l=4+(e-t)/(a-i)),l*=60,l<0&&(l+=360),r.length>3&&r[3]!==void 0?[l,s,o,r[3]]:[l,s,o]},{round:Cx}=Math,NAe=(...r)=>{const e=Rr(r,"rgba");let t=MA(r)||"rgb";return t.substr(0,3)=="hsl"?RAe(cY(e),t):(e[0]=Cx(e[0]),e[1]=Cx(e[1]),e[2]=Cx(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]=e.length>3?e[3]:1,t="rgba"),`${t}(${e.slice(0,t==="rgb"?3:4).join(",")})`)},{round:xx}=Math,jk=(...r)=>{r=Rr(r,"hsl");const[e,t,n]=r;let i,a,o;if(t===0)i=a=o=n*255;else{const s=[0,0,0],l=[0,0,0],u=n<.5?n*(1+t):n+t-n*t,c=2*n-u,f=e/360;s[0]=f+1/3,s[1]=f,s[2]=f-1/3;for(let h=0;h<3;h++)s[h]<0&&(s[h]+=1),s[h]>1&&(s[h]-=1),6*s[h]<1?l[h]=c+(u-c)*6*s[h]:2*s[h]<1?l[h]=u:3*s[h]<2?l[h]=c+(u-c)*(2/3-s[h])*6:l[h]=c;[i,a,o]=[xx(l[0]*255),xx(l[1]*255),xx(l[2]*255)]}return r.length>3?[i,a,o,r[3]]:[i,a,o,1]},fY=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,hY=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,dY=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,pY=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,gY=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,vY=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,{round:YR}=Math,B3=r=>{r=r.toLowerCase().trim();let e;if(cr.format.named)try{return cr.format.named(r)}catch{}if(e=r.match(fY)){const t=e.slice(1,4);for(let n=0;n<3;n++)t[n]=+t[n];return t[3]=1,t}if(e=r.match(hY)){const t=e.slice(1,5);for(let n=0;n<4;n++)t[n]=+t[n];return t}if(e=r.match(dY)){const t=e.slice(1,4);for(let n=0;n<3;n++)t[n]=YR(t[n]*2.55);return t[3]=1,t}if(e=r.match(pY)){const t=e.slice(1,5);for(let n=0;n<3;n++)t[n]=YR(t[n]*2.55);return t[3]=+t[3],t}if(e=r.match(gY)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const n=jk(t);return n[3]=1,n}if(e=r.match(vY)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const n=jk(t);return n[3]=+e[4],n}};B3.test=r=>fY.test(r)||hY.test(r)||dY.test(r)||pY.test(r)||gY.test(r)||vY.test(r);Ke.prototype.css=function(r){return NAe(this._rgb,r)};tr.css=(...r)=>new Ke(...r,"css");cr.format.css=B3;cr.autodetect.push({p:5,test:(r,...e)=>{if(!e.length&&Or(r)==="string"&&B3.test(r))return"css"}});cr.format.gl=(...r)=>{const e=Rr(r,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};tr.gl=(...r)=>new Ke(...r,"gl");Ke.prototype.gl=function(){const r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};const{floor:zAe}=Math,VAe=(...r)=>{r=Rr(r,"hcg");let[e,t,n]=r,i,a,o;n=n*255;const s=t*255;if(t===0)i=a=o=n;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const l=zAe(e),u=e-l,c=n*(1-t),f=c+s*(1-u),h=c+s*u,d=c+s;switch(l){case 0:[i,a,o]=[d,h,c];break;case 1:[i,a,o]=[f,d,c];break;case 2:[i,a,o]=[c,d,h];break;case 3:[i,a,o]=[c,f,d];break;case 4:[i,a,o]=[h,c,d];break;case 5:[i,a,o]=[d,c,f];break}}return[i,a,o,r.length>3?r[3]:1]},GAe=(...r)=>{const[e,t,n]=Rr(r,"rgb"),i=L3(e,t,n),a=F3(e,t,n),o=a-i,s=o*100/255,l=i/(255-o)*100;let u;return o===0?u=Number.NaN:(e===a&&(u=(t-n)/o),t===a&&(u=2+(n-e)/o),n===a&&(u=4+(e-t)/o),u*=60,u<0&&(u+=360)),[u,s,l]};Ke.prototype.hcg=function(){return GAe(this._rgb)};tr.hcg=(...r)=>new Ke(...r,"hcg");cr.format.hcg=VAe;cr.autodetect.push({p:1,test:(...r)=>{if(r=Rr(r,"hcg"),Or(r)==="array"&&r.length===3)return"hcg"}});const UAe=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,HAe=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,mY=r=>{if(r.match(UAe)){(r.length===4||r.length===7)&&(r=r.substr(1)),r.length===3&&(r=r.split(""),r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]);const e=parseInt(r,16),t=e>>16,n=e>>8&255,i=e&255;return[t,n,i,1]}if(r.match(HAe)){(r.length===5||r.length===9)&&(r=r.substr(1)),r.length===4&&(r=r.split(""),r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);const e=parseInt(r,16),t=e>>24&255,n=e>>16&255,i=e>>8&255,a=Math.round((e&255)/255*100)/100;return[t,n,i,a]}throw new Error(`unknown hex color: ${r}`)},{round:pb}=Math,yY=(...r)=>{let[e,t,n,i]=Rr(r,"rgba"),a=MA(r)||"auto";i===void 0&&(i=1),a==="auto"&&(a=i<1?"rgba":"rgb"),e=pb(e),t=pb(t),n=pb(n);let s="000000"+(e<<16|t<<8|n).toString(16);s=s.substr(s.length-6);let l="0"+pb(i*255).toString(16);switch(l=l.substr(l.length-2),a.toLowerCase()){case"rgba":return`#${s}${l}`;case"argb":return`#${l}${s}`;default:return`#${s}`}};Ke.prototype.hex=function(r){return yY(this._rgb,r)};tr.hex=(...r)=>new Ke(...r,"hex");cr.format.hex=mY;cr.autodetect.push({p:4,test:(r,...e)=>{if(!e.length&&Or(r)==="string"&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});const{cos:zd}=Math,WAe=(...r)=>{r=Rr(r,"hsi");let[e,t,n]=r,i,a,o;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(o=(1-t)/3,i=(1+t*zd(du*e)/zd(Sx-du*e))/3,a=1-(o+i)):e<2/3?(e-=1/3,i=(1-t)/3,a=(1+t*zd(du*e)/zd(Sx-du*e))/3,o=1-(i+a)):(e-=2/3,a=(1-t)/3,o=(1+t*zd(du*e)/zd(Sx-du*e))/3,i=1-(a+o)),i=Zp(n*i*3),a=Zp(n*a*3),o=Zp(n*o*3),[i*255,a*255,o*255,r.length>3?r[3]:1]},{min:$Ae,sqrt:jAe,acos:qAe}=Math,YAe=(...r)=>{let[e,t,n]=Rr(r,"rgb");e/=255,t/=255,n/=255;let i;const a=$Ae(e,t,n),o=(e+t+n)/3,s=o>0?1-a/o:0;return s===0?i=NaN:(i=(e-t+(e-n))/2,i/=jAe((e-t)*(e-t)+(e-n)*(t-n)),i=qAe(i),n>t&&(i=du-i),i/=du),[i*360,s,o]};Ke.prototype.hsi=function(){return YAe(this._rgb)};tr.hsi=(...r)=>new Ke(...r,"hsi");cr.format.hsi=WAe;cr.autodetect.push({p:2,test:(...r)=>{if(r=Rr(r,"hsi"),Or(r)==="array"&&r.length===3)return"hsi"}});Ke.prototype.hsl=function(){return cY(this._rgb)};tr.hsl=(...r)=>new Ke(...r,"hsl");cr.format.hsl=jk;cr.autodetect.push({p:2,test:(...r)=>{if(r=Rr(r,"hsl"),Or(r)==="array"&&r.length===3)return"hsl"}});const{floor:ZAe}=Math,XAe=(...r)=>{r=Rr(r,"hsv");let[e,t,n]=r,i,a,o;if(n*=255,t===0)i=a=o=n;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const s=ZAe(e),l=e-s,u=n*(1-t),c=n*(1-t*l),f=n*(1-t*(1-l));switch(s){case 0:[i,a,o]=[n,f,u];break;case 1:[i,a,o]=[c,n,u];break;case 2:[i,a,o]=[u,n,f];break;case 3:[i,a,o]=[u,c,n];break;case 4:[i,a,o]=[f,u,n];break;case 5:[i,a,o]=[n,u,c];break}}return[i,a,o,r.length>3?r[3]:1]},{min:KAe,max:QAe}=Math,JAe=(...r)=>{r=Rr(r,"rgb");let[e,t,n]=r;const i=KAe(e,t,n),a=QAe(e,t,n),o=a-i;let s,l,u;return u=a/255,a===0?(s=Number.NaN,l=0):(l=o/a,e===a&&(s=(t-n)/o),t===a&&(s=2+(n-e)/o),n===a&&(s=4+(e-t)/o),s*=60,s<0&&(s+=360)),[s,l,u]};Ke.prototype.hsv=function(){return JAe(this._rgb)};tr.hsv=(...r)=>new Ke(...r,"hsv");cr.format.hsv=XAe;cr.autodetect.push({p:2,test:(...r)=>{if(r=Rr(r,"hsv"),Or(r)==="array"&&r.length===3)return"hsv"}});const Ka={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},{pow:eCe}=Math,bY=(...r)=>{r=Rr(r,"lab");const[e,t,n]=r;let i,a,o,s,l,u;return a=(e+16)/116,i=isNaN(t)?a:a+t/500,o=isNaN(n)?a:a-n/200,a=Ka.Yn*Ex(a),i=Ka.Xn*Ex(i),o=Ka.Zn*Ex(o),s=Dx(3.2404542*i-1.5371385*a-.4985314*o),l=Dx(-.969266*i+1.8760108*a+.041556*o),u=Dx(.0556434*i-.2040259*a+1.0572252*o),[s,l,u,r.length>3?r[3]:1]},Dx=r=>255*(r<=.00304?12.92*r:1.055*eCe(r,1/2.4)-.055),Ex=r=>r>Ka.t1?r*r*r:Ka.t2*(r-Ka.t0),{pow:_Y}=Math,wY=(...r)=>{const[e,t,n]=Rr(r,"rgb"),[i,a,o]=tCe(e,t,n),s=116*a-16;return[s<0?0:s,500*(i-a),200*(a-o)]},Tx=r=>(r/=255)<=.04045?r/12.92:_Y((r+.055)/1.055,2.4),kx=r=>r>Ka.t3?_Y(r,1/3):r/Ka.t2+Ka.t0,tCe=(r,e,t)=>{r=Tx(r),e=Tx(e),t=Tx(t);const n=kx((.4124564*r+.3575761*e+.1804375*t)/Ka.Xn),i=kx((.2126729*r+.7151522*e+.072175*t)/Ka.Yn),a=kx((.0193339*r+.119192*e+.9503041*t)/Ka.Zn);return[n,i,a]};Ke.prototype.lab=function(){return wY(this._rgb)};tr.lab=(...r)=>new Ke(...r,"lab");cr.format.lab=bY;cr.autodetect.push({p:2,test:(...r)=>{if(r=Rr(r,"lab"),Or(r)==="array"&&r.length===3)return"lab"}});const{sin:rCe,cos:nCe}=Math,SY=(...r)=>{let[e,t,n]=Rr(r,"lch");return isNaN(n)&&(n=0),n=n*LAe,[e,nCe(n)*t,rCe(n)*t]},AY=(...r)=>{r=Rr(r,"lch");const[e,t,n]=r,[i,a,o]=SY(e,t,n),[s,l,u]=bY(i,a,o);return[s,l,u,r.length>3?r[3]:1]},iCe=(...r)=>{const e=Rr(r,"hcl").reverse();return AY(...e)},{sqrt:aCe,atan2:oCe,round:sCe}=Math,CY=(...r)=>{const[e,t,n]=Rr(r,"lab"),i=aCe(t*t+n*n);let a=(oCe(n,t)*FAe+360)%360;return sCe(i*1e4)===0&&(a=Number.NaN),[e,i,a]},xY=(...r)=>{const[e,t,n]=Rr(r,"rgb"),[i,a,o]=wY(e,t,n);return CY(i,a,o)};Ke.prototype.lch=function(){return xY(this._rgb)};Ke.prototype.hcl=function(){return xY(this._rgb).reverse()};tr.lch=(...r)=>new Ke(...r,"lch");tr.hcl=(...r)=>new Ke(...r,"hcl");cr.format.lch=AY;cr.format.hcl=iCe;["lch","hcl"].forEach(r=>cr.autodetect.push({p:2,test:(...e)=>{if(e=Rr(e,r),Or(e)==="array"&&e.length===3)return r}}));const Bg={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};Ke.prototype.name=function(){const r=yY(this._rgb,"rgb");for(let e of Object.keys(Bg))if(Bg[e]===r)return e.toLowerCase();return r};cr.format.named=r=>{if(r=r.toLowerCase(),Bg[r])return mY(Bg[r]);throw new Error("unknown color name: "+r)};cr.autodetect.push({p:5,test:(r,...e)=>{if(!e.length&&Or(r)==="string"&&Bg[r.toLowerCase()])return"named"}});const lCe=r=>{if(Or(r)=="number"&&r>=0&&r<=16777215){const e=r>>16,t=r>>8&255,n=r&255;return[e,t,n,1]}throw new Error("unknown num color: "+r)},uCe=(...r)=>{const[e,t,n]=Rr(r,"rgb");return(e<<16)+(t<<8)+n};Ke.prototype.num=function(){return uCe(this._rgb)};tr.num=(...r)=>new Ke(...r,"num");cr.format.num=lCe;cr.autodetect.push({p:5,test:(...r)=>{if(r.length===1&&Or(r[0])==="number"&&r[0]>=0&&r[0]<=16777215)return"num"}});const{round:DY}=Math;Ke.prototype.rgb=function(r=!0){return r===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(DY)};Ke.prototype.rgba=function(r=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?r===!1?e:DY(e):e)};tr.rgb=(...r)=>new Ke(...r,"rgb");cr.format.rgb=(...r)=>{const e=Rr(r,"rgba");return e[3]===void 0&&(e[3]=1),e};cr.autodetect.push({p:3,test:(...r)=>{if(r=Rr(r,"rgba"),Or(r)==="array"&&(r.length===3||r.length===4&&Or(r[3])=="number"&&r[3]>=0&&r[3]<=1))return"rgb"}});const{log:gb}=Math,EY=r=>{const e=r/100;let t,n,i;return e<66?(t=255,n=e<6?0:-155.25485562709179-.44596950469579133*(n=e-2)+104.49216199393888*gb(n),i=e<20?0:-254.76935184120902+.8274096064007395*(i=e-10)+115.67994401066147*gb(i)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*gb(t),n=325.4494125711974+.07943456536662342*(n=e-50)-28.0852963507957*gb(n),i=255),[t,n,i,1]},{round:cCe}=Math,fCe=(...r)=>{const e=Rr(r,"rgb"),t=e[0],n=e[2];let i=1e3,a=4e4;const o=.4;let s;for(;a-i>o;){s=(a+i)*.5;const l=EY(s);l[2]/l[0]>=n/t?a=s:i=s}return cCe(s)};Ke.prototype.temp=Ke.prototype.kelvin=Ke.prototype.temperature=function(){return fCe(this._rgb)};tr.temp=tr.kelvin=tr.temperature=(...r)=>new Ke(...r,"temp");cr.format.temp=cr.format.kelvin=cr.format.temperature=EY;const{pow:q_,sign:hCe}=Math,TY=(...r)=>{r=Rr(r,"lab");const[e,t,n]=r,i=q_(e+.3963377774*t+.2158037573*n,3),a=q_(e-.1055613458*t-.0638541728*n,3),o=q_(e-.0894841775*t-1.291485548*n,3);return[255*Mx(4.0767416621*i-3.3077115913*a+.2309699292*o),255*Mx(-1.2684380046*i+2.6097574011*a-.3413193965*o),255*Mx(-.0041960863*i-.7034186147*a+1.707614701*o),r.length>3?r[3]:1]};function Mx(r){const e=Math.abs(r);return e>.0031308?(hCe(r)||1)*(1.055*q_(e,1/2.4)-.055):r*12.92}const{cbrt:Ix,pow:dCe,sign:pCe}=Math,kY=(...r)=>{const[e,t,n]=Rr(r,"rgb"),[i,a,o]=[Lx(e/255),Lx(t/255),Lx(n/255)],s=Ix(.4122214708*i+.5363325363*a+.0514459929*o),l=Ix(.2119034982*i+.6806995451*a+.1073969566*o),u=Ix(.0883024619*i+.2817188376*a+.6299787005*o);return[.2104542553*s+.793617785*l-.0040720468*u,1.9779984951*s-2.428592205*l+.4505937099*u,.0259040371*s+.7827717662*l-.808675766*u]};function Lx(r){const e=Math.abs(r);return e<.04045?r/12.92:(pCe(r)||1)*dCe((e+.055)/1.055,2.4)}Ke.prototype.oklab=function(){return kY(this._rgb)};tr.oklab=(...r)=>new Ke(...r,"oklab");cr.format.oklab=TY;cr.autodetect.push({p:3,test:(...r)=>{if(r=Rr(r,"oklab"),Or(r)==="array"&&r.length===3)return"oklab"}});const gCe=(...r)=>{r=Rr(r,"lch");const[e,t,n]=r,[i,a,o]=SY(e,t,n),[s,l,u]=TY(i,a,o);return[s,l,u,r.length>3?r[3]:1]},vCe=(...r)=>{const[e,t,n]=Rr(r,"rgb"),[i,a,o]=kY(e,t,n);return CY(i,a,o)};Ke.prototype.oklch=function(){return vCe(this._rgb)};tr.oklch=(...r)=>new Ke(...r,"oklch");cr.format.oklch=gCe;cr.autodetect.push({p:3,test:(...r)=>{if(r=Rr(r,"oklch"),Or(r)==="array"&&r.length===3)return"oklch"}});Ke.prototype.alpha=function(r,e=!1){return r!==void 0&&Or(r)==="number"?e?(this._rgb[3]=r,this):new Ke([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]};Ke.prototype.clipped=function(){return this._rgb._clipped||!1};Ke.prototype.darken=function(r=1){const e=this,t=e.lab();return t[0]-=Ka.Kn*r,new Ke(t,"lab").alpha(e.alpha(),!0)};Ke.prototype.brighten=function(r=1){return this.darken(-r)};Ke.prototype.darker=Ke.prototype.darken;Ke.prototype.brighter=Ke.prototype.brighten;Ke.prototype.get=function(r){const[e,t]=r.split("."),n=this[e]();if(t){const i=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(i>-1)return n[i];throw new Error(`unknown channel ${t} in mode ${e}`)}else return n};const{pow:mCe}=Math,yCe=1e-7,bCe=20;Ke.prototype.luminance=function(r,e="rgb"){if(r!==void 0&&Or(r)==="number"){if(r===0)return new Ke([0,0,0,this._rgb[3]],"rgb");if(r===1)return new Ke([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),n=bCe;const i=(o,s)=>{const l=o.interpolate(s,.5,e),u=l.luminance();return Math.abs(r-u)r?i(o,l):i(l,s)},a=(t>r?i(new Ke([0,0,0]),this):i(this,new Ke([255,255,255]))).rgb();return new Ke([...a,this._rgb[3]])}return _Ce(...this._rgb.slice(0,3))};const _Ce=(r,e,t)=>(r=Fx(r),e=Fx(e),t=Fx(t),.2126*r+.7152*e+.0722*t),Fx=r=>(r/=255,r<=.03928?r/12.92:mCe((r+.055)/1.055,2.4)),ra={},sy=(r,e,t=.5,...n)=>{let i=n[0]||"lrgb";if(!ra[i]&&!n.length&&(i=Object.keys(ra)[0]),!ra[i])throw new Error(`interpolation mode ${i} is not defined`);return Or(r)!=="object"&&(r=new Ke(r)),Or(e)!=="object"&&(e=new Ke(e)),ra[i](r,e,t).alpha(r.alpha()+t*(e.alpha()-r.alpha()))};Ke.prototype.mix=Ke.prototype.interpolate=function(r,e=.5,...t){return sy(this,r,e,...t)};Ke.prototype.premultiply=function(r=!1){const e=this._rgb,t=e[3];return r?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Ke([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};Ke.prototype.saturate=function(r=1){const e=this,t=e.lch();return t[1]+=Ka.Kn*r,t[1]<0&&(t[1]=0),new Ke(t,"lch").alpha(e.alpha(),!0)};Ke.prototype.desaturate=function(r=1){return this.saturate(-r)};Ke.prototype.set=function(r,e,t=!1){const[n,i]=r.split("."),a=this[n]();if(i){const o=n.indexOf(i)-(n.substr(0,2)==="ok"?2:0);if(o>-1){if(Or(e)=="string")switch(e.charAt(0)){case"+":a[o]+=+e;break;case"-":a[o]+=+e;break;case"*":a[o]*=+e.substr(1);break;case"/":a[o]/=+e.substr(1);break;default:a[o]=+e}else if(Or(e)==="number")a[o]=e;else throw new Error("unsupported value for Color.set");const s=new Ke(a,n);return t?(this._rgb=s._rgb,this):s}throw new Error(`unknown channel ${i} in mode ${n}`)}else return a};Ke.prototype.tint=function(r=.5,...e){return sy(this,"white",r,...e)};Ke.prototype.shade=function(r=.5,...e){return sy(this,"black",r,...e)};const wCe=(r,e,t)=>{const n=r._rgb,i=e._rgb;return new Ke(n[0]+t*(i[0]-n[0]),n[1]+t*(i[1]-n[1]),n[2]+t*(i[2]-n[2]),"rgb")};ra.rgb=wCe;const{sqrt:Bx,pow:Vd}=Math,SCe=(r,e,t)=>{const[n,i,a]=r._rgb,[o,s,l]=e._rgb;return new Ke(Bx(Vd(n,2)*(1-t)+Vd(o,2)*t),Bx(Vd(i,2)*(1-t)+Vd(s,2)*t),Bx(Vd(a,2)*(1-t)+Vd(l,2)*t),"rgb")};ra.lrgb=SCe;const ACe=(r,e,t)=>{const n=r.lab(),i=e.lab();return new Ke(n[0]+t*(i[0]-n[0]),n[1]+t*(i[1]-n[1]),n[2]+t*(i[2]-n[2]),"lab")};ra.lab=ACe;const sv=(r,e,t,n)=>{let i,a;n==="hsl"?(i=r.hsl(),a=e.hsl()):n==="hsv"?(i=r.hsv(),a=e.hsv()):n==="hcg"?(i=r.hcg(),a=e.hcg()):n==="hsi"?(i=r.hsi(),a=e.hsi()):n==="lch"||n==="hcl"?(n="hcl",i=r.hcl(),a=e.hcl()):n==="oklch"&&(i=r.oklch().reverse(),a=e.oklch().reverse());let o,s,l,u,c,f;(n.substr(0,1)==="h"||n==="oklch")&&([o,l,c]=i,[s,u,f]=a);let h,d,p,g;return!isNaN(o)&&!isNaN(s)?(s>o&&s-o>180?g=s-(o+360):s180?g=s+360-o:g=s-o,d=o+t*g):isNaN(o)?isNaN(s)?d=Number.NaN:(d=s,(c==1||c==0)&&n!="hsv"&&(h=u)):(d=o,(f==1||f==0)&&n!="hsv"&&(h=l)),h===void 0&&(h=l+t*(u-l)),p=c+t*(f-c),n==="oklch"?new Ke([p,h,d],n):new Ke([d,h,p],n)},MY=(r,e,t)=>sv(r,e,t,"lch");ra.lch=MY;ra.hcl=MY;const CCe=(r,e,t)=>{const n=r.num(),i=e.num();return new Ke(n+t*(i-n),"num")};ra.num=CCe;const xCe=(r,e,t)=>sv(r,e,t,"hcg");ra.hcg=xCe;const DCe=(r,e,t)=>sv(r,e,t,"hsi");ra.hsi=DCe;const ECe=(r,e,t)=>sv(r,e,t,"hsl");ra.hsl=ECe;const TCe=(r,e,t)=>sv(r,e,t,"hsv");ra.hsv=TCe;const kCe=(r,e,t)=>{const n=r.oklab(),i=e.oklab();return new Ke(n[0]+t*(i[0]-n[0]),n[1]+t*(i[1]-n[1]),n[2]+t*(i[2]-n[2]),"oklab")};ra.oklab=kCe;const MCe=(r,e,t)=>sv(r,e,t,"oklch");ra.oklch=MCe;const{pow:Ox,sqrt:Px,PI:Rx,cos:ZR,sin:XR,atan2:ICe}=Math,LCe=(r,e="lrgb",t=null)=>{const n=r.length;t||(t=Array.from(new Array(n)).map(()=>1));const i=n/t.reduce(function(f,h){return f+h});if(t.forEach((f,h)=>{t[h]*=i}),r=r.map(f=>new Ke(f)),e==="lrgb")return FCe(r,t);const a=r.shift(),o=a.get(e),s=[];let l=0,u=0;for(let f=0;f{const d=f.get(e);c+=f.alpha()*t[h+1];for(let p=0;p=360;)h-=360;o[f]=h}else o[f]=o[f]/s[f];return c/=n,new Ke(o,e).alpha(c>.99999?1:c,!0)},FCe=(r,e)=>{const t=r.length,n=[0,0,0,0];for(let i=0;i.9999999&&(n[3]=1),new Ke(I3(n))},{pow:BCe}=Math;function US(r){let e="rgb",t=tr("#ccc"),n=0,i=[0,1],a=[],o=[0,0],s=!1,l=[],u=!1,c=0,f=1,h=!1,d={},p=!0,g=1;const v=function(A){if(A=A||["#fff","#000"],A&&Or(A)==="string"&&tr.brewer&&tr.brewer[A.toLowerCase()]&&(A=tr.brewer[A.toLowerCase()]),Or(A)==="array"){A.length===1&&(A=[A[0],A[0]]),A=A.slice(0);for(let C=0;C=s[x];)x++;return x-1}return 0};let y=A=>A,b=A=>A;const _=function(A,C){let x,D;if(C==null&&(C=!1),isNaN(A)||A===null)return t;C?D=A:s&&s.length>2?D=m(A)/(s.length-2):f!==c?D=(A-c)/(f-c):D=1,D=b(D),C||(D=y(D)),g!==1&&(D=BCe(D,g)),D=o[0]+D*(1-o[0]-o[1]),D=Zp(D,0,1);const E=Math.floor(D*1e4);if(p&&d[E])x=d[E];else{if(Or(l)==="array")for(let T=0;T=k&&T===a.length-1){x=l[T];break}if(D>k&&Dd={};v(r);const S=function(A){const C=tr(_(A));return u&&C[u]?C[u]():C};return S.classes=function(A){if(A!=null){if(Or(A)==="array")s=A,i=[A[0],A[A.length-1]];else{const C=tr.analyze(i);A===0?s=[C.min,C.max]:s=tr.limits(C,"e",A)}return S}return s},S.domain=function(A){if(!arguments.length)return i;c=A[0],f=A[A.length-1],a=[];const C=l.length;if(A.length===C&&c!==f)for(let x of Array.from(A))a.push((x-c)/(f-c));else{for(let x=0;x2){const x=A.map((E,T)=>T/(A.length-1)),D=A.map(E=>(E-c)/(f-c));D.every((E,T)=>x[T]===E)||(b=E=>{if(E<=0||E>=1)return E;let T=0;for(;E>=D[T+1];)T++;const k=(E-D[T])/(D[T+1]-D[T]);return x[T]+k*(x[T+1]-x[T])})}}return i=[c,f],S},S.mode=function(A){return arguments.length?(e=A,w(),S):e},S.range=function(A,C){return v(A),S},S.out=function(A){return u=A,S},S.spread=function(A){return arguments.length?(n=A,S):n},S.correctLightness=function(A){return A==null&&(A=!0),h=A,w(),h?y=function(C){const x=_(0,!0).lab()[0],D=_(1,!0).lab()[0],E=x>D;let T=_(C,!0).lab()[0];const k=x+(D-x)*C;let M=T-k,L=0,F=1,U=20;for(;Math.abs(M)>.01&&U-- >0;)(function(){return E&&(M*=-1),M<0?(L=C,C+=(F-C)*.5):(F=C,C+=(L-C)*.5),T=_(C,!0).lab()[0],M=T-k})();return C}:y=C=>C,S},S.padding=function(A){return A!=null?(Or(A)==="number"&&(A=[A,A]),o=A,S):o},S.colors=function(A,C){arguments.length<2&&(C="hex");let x=[];if(arguments.length===0)x=l.slice(0);else if(A===1)x=[S(.5)];else if(A>1){const D=i[0],E=i[1]-D;x=OCe(0,A).map(T=>S(D+T/(A-1)*E))}else{r=[];let D=[];if(s&&s.length>2)for(let E=1,T=s.length,k=1<=T;k?ET;k?E++:E--)D.push((s[E-1]+s[E])*.5);else D=i;x=D.map(E=>S(E))}return tr[C]&&(x=x.map(D=>D[C]())),x},S.cache=function(A){return A!=null?(p=A,S):p},S.gamma=function(A){return A!=null?(g=A,S):g},S.nodata=function(A){return A!=null?(t=tr(A),S):t},S}function OCe(r,e,t){let n=[],i=ra;i?o++:o--)n.push(o);return n}const PCe=function(r){let e=[1,1];for(let t=1;tnew Ke(a)),r.length===2)[t,n]=r.map(a=>a.lab()),e=function(a){const o=[0,1,2].map(s=>t[s]+a*(n[s]-t[s]));return new Ke(o,"lab")};else if(r.length===3)[t,n,i]=r.map(a=>a.lab()),e=function(a){const o=[0,1,2].map(s=>(1-a)*(1-a)*t[s]+2*(1-a)*a*n[s]+a*a*i[s]);return new Ke(o,"lab")};else if(r.length===4){let a;[t,n,i,a]=r.map(o=>o.lab()),e=function(o){const s=[0,1,2].map(l=>(1-o)*(1-o)*(1-o)*t[l]+3*(1-o)*(1-o)*o*n[l]+3*(1-o)*o*o*i[l]+o*o*o*a[l]);return new Ke(s,"lab")}}else if(r.length>=5){let a,o,s;a=r.map(l=>l.lab()),s=r.length-1,o=PCe(s),e=function(l){const u=1-l,c=[0,1,2].map(f=>a.reduce((h,d,p)=>h+o[p]*u**(s-p)*l**p*d[f],0));return new Ke(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},NCe=r=>{const e=RCe(r);return e.scale=()=>US(e),e},Rs=(r,e,t)=>{if(!Rs[t])throw new Error("unknown blend mode "+t);return Rs[t](r,e)},xf=r=>(e,t)=>{const n=tr(t).rgb(),i=tr(e).rgb();return tr.rgb(r(n,i))},Df=r=>(e,t)=>{const n=[];return n[0]=r(e[0],t[0]),n[1]=r(e[1],t[1]),n[2]=r(e[2],t[2]),n},zCe=r=>r,VCe=(r,e)=>r*e/255,GCe=(r,e)=>r>e?e:r,UCe=(r,e)=>r>e?r:e,HCe=(r,e)=>255*(1-(1-r/255)*(1-e/255)),WCe=(r,e)=>e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255)),$Ce=(r,e)=>255*(1-(1-e/255)/(r/255)),jCe=(r,e)=>r===255?255:(r=255*(e/255)/(1-r/255),r>255?255:r);Rs.normal=xf(Df(zCe));Rs.multiply=xf(Df(VCe));Rs.screen=xf(Df(HCe));Rs.overlay=xf(Df(WCe));Rs.darken=xf(Df(GCe));Rs.lighten=xf(Df(UCe));Rs.dodge=xf(Df(jCe));Rs.burn=xf(Df($Ce));const{pow:qCe,sin:YCe,cos:ZCe}=Math;function XCe(r=300,e=-1.5,t=1,n=1,i=[0,1]){let a=0,o;Or(i)==="array"?o=i[1]-i[0]:(o=0,i=[i,i]);const s=function(l){const u=du*((r+120)/360+e*l),c=qCe(i[0]+o*l,n),h=(a!==0?t[0]+l*a:t)*c*(1-c)/2,d=ZCe(u),p=YCe(u),g=c+h*(-.14861*d+1.78277*p),v=c+h*(-.29227*d-.90649*p),m=c+h*(1.97294*d);return tr(I3([g*255,v*255,m*255,1]))};return s.start=function(l){return l==null?r:(r=l,s)},s.rotations=function(l){return l==null?e:(e=l,s)},s.gamma=function(l){return l==null?n:(n=l,s)},s.hue=function(l){return l==null?t:(t=l,Or(t)==="array"?(a=t[1]-t[0],a===0&&(t=t[1])):a=0,s)},s.lightness=function(l){return l==null?i:(Or(l)==="array"?(i=l,o=l[1]-l[0]):(i=[l,l],o=0),s)},s.scale=()=>tr.scale(s),s.hue(t),s}const KCe="0123456789abcdef",{floor:QCe,random:JCe}=Math,exe=()=>{let r="#";for(let e=0;e<6;e++)r+=KCe.charAt(QCe(JCe()*16));return new Ke(r,"hex")},{log:KR,pow:txe,floor:rxe,abs:nxe}=Math;function IY(r,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Or(r)==="object"&&(r=Object.values(r)),r.forEach(n=>{e&&Or(n)==="object"&&(n=n[e]),n!=null&&!isNaN(n)&&(t.values.push(n),t.sum+=n,nt.max&&(t.max=n),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(n,i)=>LY(t,n,i),t}function LY(r,e="equal",t=7){Or(r)=="array"&&(r=IY(r));const{min:n,max:i}=r,a=r.values.sort((s,l)=>s-l);if(t===1)return[n,i];const o=[];if(e.substr(0,1)==="c"&&(o.push(n),o.push(i)),e.substr(0,1)==="e"){o.push(n);for(let s=1;s 0");const s=Math.LOG10E*KR(n),l=Math.LOG10E*KR(i);o.push(n);for(let u=1;u200&&(f=!1)}const p={};for(let v=0;vv-m),o.push(g[0]);for(let v=1;v{r=new Ke(r),e=new Ke(e);const t=r.luminance(),n=e.luminance();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},{sqrt:tu,pow:ni,min:axe,max:oxe,atan2:QR,abs:JR,cos:vb,sin:e5,exp:sxe,PI:t5}=Math;function lxe(r,e,t=1,n=1,i=1){var a=function(J){return 360*J/(2*t5)},o=function(J){return 2*t5*J/360};r=new Ke(r),e=new Ke(e);const[s,l,u]=Array.from(r.lab()),[c,f,h]=Array.from(e.lab()),d=(s+c)/2,p=tu(ni(l,2)+ni(u,2)),g=tu(ni(f,2)+ni(h,2)),v=(p+g)/2,m=.5*(1-tu(ni(v,7)/(ni(v,7)+ni(25,7)))),y=l*(1+m),b=f*(1+m),_=tu(ni(y,2)+ni(u,2)),w=tu(ni(b,2)+ni(h,2)),S=(_+w)/2,A=a(QR(u,y)),C=a(QR(h,b)),x=A>=0?A:A+360,D=C>=0?C:C+360,E=JR(x-D)>180?(x+D+360)/2:(x+D)/2,T=1-.17*vb(o(E-30))+.24*vb(o(2*E))+.32*vb(o(3*E+6))-.2*vb(o(4*E-63));let k=D-x;k=JR(k)<=180?k:D<=x?k+360:k-360,k=2*tu(_*w)*e5(o(k)/2);const M=c-s,L=w-_,F=1+.015*ni(d-50,2)/tu(20+ni(d-50,2)),U=1+.045*S,N=1+.015*S*T,$=30*sxe(-ni((E-275)/25,2)),P=-(2*tu(ni(S,7)/(ni(S,7)+ni(25,7))))*e5(2*o($)),te=tu(ni(M/(t*F),2)+ni(L/(n*U),2)+ni(k/(i*N),2)+P*(L/(n*U))*(k/(i*N)));return oxe(0,axe(100,te))}function uxe(r,e,t="lab"){r=new Ke(r),e=new Ke(e);const n=r.get(t),i=e.get(t);let a=0;for(let o in n){const s=(n[o]||0)-(i[o]||0);a+=s*s}return Math.sqrt(a)}const cxe=(...r)=>{try{return new Ke(...r),!0}catch{return!1}},fxe={cool(){return US([tr.hsl(180,1,.9),tr.hsl(250,.7,.4)])},hot(){return US(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Y_={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]};for(let r of Object.keys(Y_))Y_[r.toLowerCase()]=Y_[r];Object.assign(tr,{average:LCe,bezier:NCe,blend:Rs,cubehelix:XCe,mix:sy,interpolate:sy,random:exe,scale:US,analyze:IY,contrast:ixe,deltaE:lxe,distance:uxe,limits:LY,valid:cxe,scales:fxe,input:cr,colors:Bg,brewer:Y_});const Dp={blue100:"hsla(202, 100%, 95%, 1)",blue200:"hsla(204, 100%, 85%, 1)",blue300:"hsla(206, 95%, 72%, 1)",blue400:"hsla(208, 90%, 63%, 1)",blue500:"hsla(210, 85%, 54%, 1)",blue600:"hsla(212, 96%, 44%, 1)",blue700:"hsla(214, 98%, 38%, 1)",blue800:"hsla(217, 98%, 33%, 1)",blue900:"hsla(220, 99%, 24%, 1)",blue999:"hsla(222, 100%, 18%, 1)",bluelink:"hsla(205, 62%, 38%, 1)",green100:"hsla(167, 100%, 94%, 1)",green200:"hsla(166, 100%, 87%, 1)",green300:"hsla(163, 93%, 76%, 1)",green400:"hsla(161, 90%, 63%, 1)",green500:"hsla(159, 88%, 44%, 1)",green600:"hsla(158, 91%, 35%, 1)",green700:"hsla(156, 93%, 28%, 1)",green800:"hsla(154, 95%, 23%, 1)",green900:"hsla(152, 100%, 18%, 1)",green999:"hsla(150, 100%, 14%, 1)",grey100:"hsla(217, 33%, 97%, 1)",grey200:"hsla(215, 15%, 91%, 1)",grey300:"hsla(211, 16%, 82%, 1)",grey400:"hsla(212, 13%, 65%, 1)",grey500:"hsla(212, 10%, 53%, 1)",grey600:"hsla(212, 12%, 43%, 1)",grey700:"hsla(210, 14%, 37%, 1)",grey800:"hsla(210, 18%, 30%, 1)",grey900:"hsla(210, 20%, 25%, 1)",grey999:"hsla(211, 24%, 16%, 1)",yellow100:"hsl(49, 100%, 96%, 1)",yellow200:"hsl(48, 100%, 88%, 1)",yellow300:"hsl(48, 95%, 76%, 1)",yellow400:"hsl(48, 94%, 68%, 1)",yellow500:"hsl(44, 92%, 63%, 1)",yellow600:"hsl(42, 87%, 55%, 1)",yellow700:"hsl(36, 77%, 49%, 1)",yellow800:"hsl(29, 80%, 44%, 1)",yellow900:"hsl(22, 82%, 39%, 1)",yellow999:"hsl(15, 86%, 30%, 1)"},fYe=["hsla(207, 65%, 39%, 1)","hsla(195, 49%, 51%, 1)","hsla(207, 69%, 79%, 1)","hsla(202, 28%, 65%, 1)","hsla(179, 37%, 65%, 1)","hsla(40, 30%, 75%, 1)","hsla(38, 89%, 62%, 1)","hsla(342, 40%, 40%, 1)","hsla(207, 86%, 70%, 1)","hsla(160, 40%, 46%, 1)","#71777d","#7e848a","#8c9196","#9a9fa3","#a8acb0","#b7babd","#c5c8ca","#d4d6d7","#e3e4e5","#f3f3f3"],hYe=["hsla(207, 65%, 39%, 1)","hsla(195, 49%, 51%, 1)","hsla(207, 69%, 79%, 1)","hsla(202, 28%, 65%, 1)","hsla(179, 37%, 65%, 1)","hsla(40, 30%, 75%, 1)","hsla(38, 89%, 62%, 1)","hsla(342, 40%, 40%, 1)","hsla(207, 86%, 70%, 1)","hsla(160, 40%, 46%, 1)"];/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var qk=function(r,e){return qk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},qk(r,e)};function de(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");qk(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var hxe=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),dxe=function(){function r(){this.browser=new hxe,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),er=new dxe;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(er.wxa=!0,er.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?er.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(er.node=!0,er.svgSupported=!0):pxe(navigator.userAgent,er);function pxe(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),i&&(t.ie=!0,t.version=i[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var O3=12,FY="sans-serif",ff=O3+"px "+FY,gxe=20,vxe=100,mxe="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function yxe(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function zxe(r,e,t){for(var n=t?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,h=c.left,d=c.top;o.push(h,d),l=l&&a&&h===a[f]&&d===a[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=t?a5(s,o):a5(o,s))}function VY(r){return r.nodeName.toUpperCase()==="CANVAS"}var Vxe=/([&<>"'])/g,Gxe={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ha(r){return r==null?"":(r+"").replace(Vxe,function(e,t){return Gxe[t]})}var Uxe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,zx=[],Hxe=er.browser.firefox&&+er.browser.version.split(".")[0]<39;function tM(r,e,t,n){return t=t||{},n?s5(r,e,t):Hxe&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):s5(r,e,t),t}function s5(r,e,t){if(er.domSupported&&r.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(VY(r)){var a=r.getBoundingClientRect();t.zrX=n-a.left,t.zrY=i-a.top;return}else if(eM(zx,r,n,i)){t.zrX=zx[0],t.zrY=zx[1];return}}t.zrX=t.zrY=0}function U3(r){return r||window.event}function Oo(r,e,t){if(e=U3(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&tM(r,o,e,t)}else{tM(r,e,e,t);var a=Wxe(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&Uxe.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function Wxe(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var i=Math.abs(n!==0?n:t),a=n>0?-1:n<0?1:t>0?-1:1;return 3*i*a}function rM(r,e,t,n){r.addEventListener(e,t,n)}function $xe(r,e,t,n){r.removeEventListener(e,t,n)}var Pu=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function l5(r){return r.which===2||r.which===3}var jxe=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=u5(n)/u5(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=qxe(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function _o(){return[1,0,0,1,0,0]}function OA(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function H3(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function Tu(r,e,t){var n=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function Ul(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function kd(r,e,t,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),f=Math.cos(t);return r[0]=i*f+s*c,r[1]=-i*c+s*f,r[2]=a*f+l*c,r[3]=-a*c+f*l,r[4]=f*(o-n[0])+c*(u-n[1])+n[0],r[5]=f*(u-n[1])-c*(o-n[0])+n[1],r}function W3(r,e,t){var n=t[0],i=t[1];return r[0]=e[0]*n,r[1]=e[1]*i,r[2]=e[2]*n,r[3]=e[3]*i,r[4]=e[4]*n,r[5]=e[5]*i,r}function cv(r,e){var t=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*n;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*i)*l,r[5]=(a*i-t*s)*l,r):null}function Yxe(r){var e=_o();return H3(e,r),e}var Ot=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,i){e.x=t.x+n.x*i,e.y=t.y+n.y*i},r.lerp=function(e,t,n,i){var a=1-i;e.x=a*t.x+i*n.x,e.y=a*t.y+i*n.y},r}(),yb=Math.min,bb=Math.max,Of=new Ot,Pf=new Ot,Rf=new Ot,Nf=new Ot,Uv=new Ot,Hv=new Ot,Nt=function(){function r(e,t,n,i){n<0&&(e=e+n,n=-n),i<0&&(t=t+i,i=-i),this.x=e,this.y=t,this.width=n,this.height=i}return r.prototype.union=function(e){var t=yb(e.x,this.x),n=yb(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=bb(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=bb(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,i=e.height/t.height,a=_o();return Ul(a,a,[-t.x,-t.y]),W3(a,a,[n,i]),Ul(a,a,[e.x,e.y]),a},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,c=e.y,f=e.y+e.height,h=!(ap&&(p=b,gp&&(p=_,m=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=t.x*i+o,e.y=t.y*a+s,e.width=t.width*i,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Of.x=Rf.x=t.x,Of.y=Nf.y=t.y,Pf.x=Nf.x=t.x+t.width,Pf.y=Rf.y=t.y+t.height,Of.transform(n),Nf.transform(n),Pf.transform(n),Rf.transform(n),e.x=yb(Of.x,Pf.x,Rf.x,Nf.x),e.y=yb(Of.y,Pf.y,Rf.y,Nf.y);var l=bb(Of.x,Pf.x,Rf.x,Nf.x),u=bb(Of.y,Pf.y,Rf.y,Nf.y);e.width=l-e.x,e.height=u-e.y},r}(),GY="silent";function Zxe(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:Xxe}}function Xxe(){Pu(this.event)}var Kxe=function(r){mn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(ss),Wv=function(){function r(e,t){this.x=e,this.y=t}return r}(),Qxe=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Gx=new Nt(0,0,0,0),UY=function(r){mn(e,r);function e(t,n,i,a,o){var s=r.call(this)||this;return s._hovered=new Wv(0,0),s.storage=t,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new Kxe,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new Oxe(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(B(Qxe,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,i=t.zrY,a=HY(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new Wv(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Wv(0,0)},e.prototype.dispatch=function(t,n){var i=this[t];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,i){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+n,s=Zxe(n,t,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(t,n,i){var a=this.storage.getDisplayList(),o=new Wv(t,n);if(c5(a,o,t,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Nt(t-u,n-u,l,l),f=a.length-1;f>=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(Gx.copy(h.getBoundingRect()),h.transform&&Gx.applyTransform(h.transform),Gx.intersect(c)&&s.push(h))}if(s.length)for(var d=4,p=Math.PI/12,g=Math.PI*2,v=0;v4)return;this._downPoint=null}this.dispatchToElement(a,r,e)}});function Jxe(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s||n.parent}return i?GY:!0}return!1}function c5(r,e,t,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=Jxe(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==GY)){e.target=o;break}}}function HY(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var WY=32,$v=7;function eDe(r){for(var e=0;r>=WY;)e|=r&1,r>>=1;return r+e}function f5(r,e,t,n){var i=e+1;if(i===t)return 1;if(n(r[i++],r[e])<0){for(;i=0;)i++;return i-e}function tDe(r,e,t){for(t--;e>>1,i(a,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function Ux(r,e,t,n,i,a){var o=0,s=0,l=1;if(a(r,e[t+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(r,e[t+c])>0?o=c+1:l=c}return l}function Hx(r,e,t,n,i,a){var o=0,s=0,l=1;if(a(r,e[t+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(r,e[t+c])<0?l=c:o=c+1}return l}function rDe(r,e){var t=$v,n,i,a=0,o=[];n=[],i=[];function s(d,p){n[a]=d,i[a]=p,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]=$v||A>=$v);if(C)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),p===1){for(m=0;m=0;m--)r[S+m]=r[w+m];r[_]=o[b];return}for(var A=t;;){var C=0,x=0,D=!1;do if(e(o[b],r[y])<0){if(r[_--]=r[y--],C++,x=0,--p===0){D=!0;break}}else if(r[_--]=o[b--],x++,C=0,--v===1){D=!0;break}while((C|x)=0;m--)r[S+m]=r[w+m];if(p===0){D=!0;break}}if(r[_--]=o[b--],--v===1){D=!0;break}if(x=v-Ux(r[y],o,0,v,v-1,e),x!==0){for(_-=x,b-=x,v-=x,S=_+1,w=b+1,m=0;m=$v||x>=$v);if(D)break;A<0&&(A=0),A+=2}if(t=A,t<1&&(t=1),v===1){for(_-=p,y-=p,S=_+1,w=y+1,m=p-1;m>=0;m--)r[S+m]=r[w+m];r[_]=o[b]}else{if(v===0)throw new Error;for(w=_-(v-1),m=0;ms&&(l=s),h5(r,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),i-=a,t+=a}while(i!==0);o.forceMergeRuns()}}var ho=1,Mm=2,vp=4,d5=!1;function Wx(){d5||(d5=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function p5(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var nDe=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=p5}return r.prototype.traverse=function(e,t){for(var n=0;n0&&(c.__clipPaths=[]),isNaN(c.z)&&(Wx(),c.z=0),isNaN(c.z2)&&(Wx(),c.z2=0),isNaN(c.zlevel)&&(Wx(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=e.getDecalElement&&e.getDecalElement();f&&this._updateAndAddDisplayable(f,t,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,t,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,t,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),$S;$S=er.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Km={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-Km.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Km.bounceIn(r*2)*.5:Km.bounceOut(r*2-1)*.5+.5}},_b=Math.pow,$c=Math.sqrt,jS=1e-8,$Y=1e-4,g5=$c(3),wb=1/3,ml=Td(),$o=Td(),Xp=Td();function Rc(r){return r>-jS&&rjS||r<-jS}function ci(r,e,t,n,i){var a=1-i;return a*a*(a*r+3*i*e)+i*i*(i*n+3*a*t)}function v5(r,e,t,n,i){var a=1-i;return 3*(((e-r)*a+2*(t-e)*i)*a+(n-t)*i*i)}function qS(r,e,t,n,i,a){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,d=0;if(Rc(c)&&Rc(f))if(Rc(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[d++]=p)}else{var g=f*f-4*c*h;if(Rc(g)){var v=f/c,p=-s/o+v,m=-v/2;p>=0&&p<=1&&(a[d++]=p),m>=0&&m<=1&&(a[d++]=m)}else if(g>0){var y=$c(g),b=c*s+1.5*o*(-f+y),_=c*s+1.5*o*(-f-y);b<0?b=-_b(-b,wb):b=_b(b,wb),_<0?_=-_b(-_,wb):_=_b(_,wb);var p=(-s-(b+_))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var w=(2*c*s-3*o*f)/(2*$c(c*c*c)),S=Math.acos(w)/3,A=$c(c),C=Math.cos(S),p=(-s-2*A*C)/(3*o),m=(-s+A*(C+g5*Math.sin(S)))/(3*o),x=(-s+A*(C-g5*Math.sin(S)))/(3*o);p>=0&&p<=1&&(a[d++]=p),m>=0&&m<=1&&(a[d++]=m),x>=0&&x<=1&&(a[d++]=x)}}return d}function qY(r,e,t,n,i){var a=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(Rc(o)){if(jY(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Rc(c))i[0]=-a/(2*o);else if(c>0){var f=$c(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function df(r,e,t,n,i,a){var o=(e-r)*i+r,s=(t-e)*i+e,l=(n-t)*i+t,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=r,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function YY(r,e,t,n,i,a,o,s,l,u,c){var f,h=.005,d=1/0,p,g,v,m;ml[0]=l,ml[1]=u;for(var y=0;y<1;y+=.05)$o[0]=ci(r,t,i,o,y),$o[1]=ci(e,n,a,s,y),v=qh(ml,$o),v=0&&v=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Rc(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=$c(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function ZY(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function uy(r,e,t,n,i){var a=(e-r)*n+r,o=(t-e)*n+e,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function XY(r,e,t,n,i,a,o,s,l){var u,c=.005,f=1/0;ml[0]=o,ml[1]=s;for(var h=0;h<1;h+=.05){$o[0]=xi(r,t,i,h),$o[1]=xi(e,n,a,h);var d=qh(ml,$o);d=0&&d=1?1:qS(0,n,a,1,l,s)&&ci(0,i,o,1,s[0])}}}var lDe=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||qn,this.ondestroy=e.ondestroy||qn,this.onrestart=e.onrestart||qn,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=pt(e)?e:Km[e]||$3(e)},r}(),KY=function(){function r(e){this.value=e}return r}(),uDe=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new KY(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),u1=function(){function r(e){this._list=new uDe,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new KY(t),s.key=e,n.insertEntry(s),i[e]=s}return a},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),m5={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ks(r){return r=Math.round(r),r<0?0:r>255?255:r}function cDe(r){return r=Math.round(r),r<0?0:r>360?360:r}function cy(r){return r<0?0:r>1?1:r}function $x(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?ks(parseFloat(e)/100*255):ks(parseInt(e,10))}function Yh(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?cy(parseFloat(e)/100):cy(parseFloat(e))}function jx(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Nc(r,e,t){return r+(e-r)*t}function Bo(r,e,t,n,i){return r[0]=e,r[1]=t,r[2]=n,r[3]=i,r}function iM(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var QY=new u1(20),Sb=null;function Ud(r,e){Sb&&iM(Sb,e),Sb=QY.put(r,Sb||e.slice())}function wo(r,e){if(r){e=e||[];var t=QY.get(r);if(t)return iM(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in m5)return iM(e,m5[n]),Ud(r,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Bo(e,0,0,0,1);return}return Bo(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Ud(r,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Bo(e,0,0,0,1);return}return Bo(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Ud(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Bo(e,+u[0],+u[1],+u[2],1):Bo(e,0,0,0,1);c=Yh(u.pop());case"rgb":if(u.length>=3)return Bo(e,$x(u[0]),$x(u[1]),$x(u[2]),u.length===3?c:Yh(u[3])),Ud(r,e),e;Bo(e,0,0,0,1);return;case"hsla":if(u.length!==4){Bo(e,0,0,0,1);return}return u[3]=Yh(u[3]),aM(u,e),Ud(r,e),e;case"hsl":if(u.length!==3){Bo(e,0,0,0,1);return}return aM(u,e),Ud(r,e),e;default:return}}Bo(e,0,0,0,1)}}function aM(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=Yh(r[1]),i=Yh(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Bo(e,ks(jx(o,a,t+1/3)*255),ks(jx(o,a,t)*255),ks(jx(o,a,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function fDe(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),a=Math.max(e,t,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-t)/6+o/2)/o,h=((a-n)/6+o/2)/o;e===a?l=h-f:t===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return r[3]!=null&&d.push(r[3]),d}}function oM(r,e){var t=wo(r);if(t){for(var n=0;n<3;n++)e<0?t[n]=t[n]*(1-e)|0:t[n]=(255-t[n])*e+t[n]|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return ku(t,t.length===4?"rgba":"rgb")}}function qx(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return t[0]=ks(Nc(o[0],s[0],l)),t[1]=ks(Nc(o[1],s[1],l)),t[2]=ks(Nc(o[2],s[2],l)),t[3]=cy(Nc(o[3],s[3],l)),t}}function hDe(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=wo(e[i]),s=wo(e[a]),l=n-i,u=ku([ks(Nc(o[0],s[0],l)),ks(Nc(o[1],s[1],l)),ks(Nc(o[2],s[2],l)),cy(Nc(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function Qm(r,e,t,n){var i=wo(r);if(r)return i=fDe(i),e!=null&&(i[0]=cDe(e)),t!=null&&(i[1]=Yh(t)),n!=null&&(i[2]=Yh(n)),ku(aM(i),"rgba")}function YS(r,e){var t=wo(r);if(t&&e!=null)return t[3]=cy(e),ku(t,"rgba")}function ku(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function ZS(r,e){var t=wo(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var y5=new u1(100);function sM(r){if(Ye(r)){var e=y5.get(r);return e||(e=oM(r,-.1),y5.put(r,e)),e}else if(FA(r)){var t=ye({},r);return t.colorStops=Ee(r.colorStops,function(n){return{offset:n.offset,color:oM(n.color,-.1)}}),t}return r}var XS=Math.round;function fy(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=wo(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var b5=1e-4;function zc(r){return r-b5}function Ab(r){return XS(r*1e3)/1e3}function lM(r){return XS(r*1e4)/1e4}function dDe(r){return"matrix("+Ab(r[0])+","+Ab(r[1])+","+Ab(r[2])+","+Ab(r[3])+","+lM(r[4])+","+lM(r[5])+")"}var pDe={left:"start",right:"end",center:"middle",middle:"middle"};function gDe(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function vDe(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function mDe(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function JY(r){return r&&!!r.image}function yDe(r){return r&&!!r.svgElement}function j3(r){return JY(r)||yDe(r)}function eZ(r){return r.type==="linear"}function tZ(r){return r.type==="radial"}function rZ(r){return r&&(r.type==="linear"||r.type==="radial")}function PA(r){return"url(#"+r+")"}function nZ(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function iZ(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*Z_,i=Mt(r.scaleX,1),a=Mt(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+XS(o*Z_)+"deg, "+XS(s*Z_)+"deg)"),l.join(" ")}var bDe=function(){return er.hasGlobalWindow&&pt(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),uM=Array.prototype.slice;function cu(r,e,t){return(e-r)*t+r}function Yx(r,e,t,n){for(var i=e.length,a=0;an?e:r,a=Math.min(t,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=w5,l=t;if(oa(t)){var u=ADe(t);s=u,(u===1&&!Mr(t[0])||u===2&&!Mr(t[0][0]))&&(o=!0)}else if(Mr(t)&&!ly(t))s=xb;else if(Ye(t))if(!isNaN(+t))s=xb;else{var c=wo(t);c&&(l=c,s=Im)}else if(FA(t)){var f=ye({},l);f.colorStops=Ee(t.colorStops,function(d){return{offset:d.offset,color:wo(d.color)}}),eZ(t)?s=cM:tZ(t)&&(s=fM),l=f}a===0?this.valType=s:(s!==this.valType||s===w5)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:t,percent:0};return n&&(h.easing=n,h.easingFunc=pt(n)?n:Km[n]||$3(n)),i.push(h),h},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(g,v){return g.time-v.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Db(i),u=S5(i),c=0;c=0&&!(o[c].percent<=t);c--);c=h(c,s-2)}else{for(c=f;ct);c++);c=h(c-1,s-2)}p=o[c+1],d=o[c]}if(d&&p){this._lastFr=c,this._lastFrP=t;var v=p.percent-d.percent,m=v===0?1:h((t-d.percent)/v,1);p.easingFunc&&(m=p.easingFunc(m));var y=n?this._additiveValue:u?jv:e[l];if((Db(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?d.rawValue:p.rawValue;else if(Db(a))a===ew?Yx(y,d[i],p[i],m):_De(y,d[i],p[i],m);else if(S5(a)){var b=d[i],_=p[i],w=a===cM;e[l]={type:w?"linear":"radial",x:cu(b.x,_.x,m),y:cu(b.y,_.y,m),colorStops:Ee(b.colorStops,function(A,C){var x=_.colorStops[C];return{offset:cu(A.offset,x.offset,m),color:J_(Yx([],A.color,x.color,m))}}),global:_.global},w?(e[l].x2=cu(b.x2,_.x2,m),e[l].y2=cu(b.y2,_.y2,m)):e[l].r=cu(b.r,_.r,m)}else if(u)Yx(y,d[i],p[i],m),n||(e[l]=J_(y));else{var S=cu(d[i],p[i],m);n?this._additiveValue=S:e[l]=S}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,i=this._additiveValue;t===xb?e[n]=e[n]+i:t===Im?(wo(e[n],jv),Cb(jv,jv,i,1),e[n]=J_(jv)):t===ew?Cb(e[n],e[n],i,1):t===aZ&&_5(e[n],e[n],i,1)},r}(),q3=function(){function r(e,t,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){N3("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,nr(t),n)},r.prototype.whenWithKeys=function(e,t,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,Jm(u),i),this._trackKeys.push(s)}l.addKeyframe(e,Jm(t[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function Ep(){return new Date().getTime()}var xDe=function(r){mn(e,r);function e(t){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,i=t.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=Ep()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&($S(n),!t._paused&&t.update())}$S(n)},e.prototype.start=function(){this._running||(this._time=Ep(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Ep(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Ep()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var i=new q3(t,n.loop);return this.addAnimator(i),i},e}(ss),DDe=300,Zx=er.domSupported,Xx=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=Ee(r,function(i){var a=i.replace("mouse","pointer");return t.hasOwnProperty(a)?a:i});return{mouse:r,touch:e,pointer:n}}(),A5={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},C5=!1;function hM(r){var e=r.pointerType;return e==="pen"||e==="touch"}function EDe(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Kx(r){r&&(r.zrByTouch=!0)}function TDe(r,e){return Oo(r.dom,new kDe(r,e),!0)}function oZ(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var kDe=function(){function r(e,t){this.stopPropagation=qn,this.stopImmediatePropagation=qn,this.preventDefault=qn,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),gs={mousedown:function(r){r=Oo(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Oo(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Oo(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Oo(this.dom,r);var e=r.toElement||r.relatedTarget;oZ(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){C5=!0,r=Oo(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){C5||(r=Oo(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Oo(this.dom,r),Kx(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),gs.mousemove.call(this,r),gs.mousedown.call(this,r)},touchmove:function(r){r=Oo(this.dom,r),Kx(r),this.handler.processGesture(r,"change"),gs.mousemove.call(this,r)},touchend:function(r){r=Oo(this.dom,r),Kx(r),this.handler.processGesture(r,"end"),gs.mouseup.call(this,r),+new Date-+this.__lastTouchMomentE5||r<-E5}var Vf=[],Hd=[],Jx=_o(),eD=Math.abs,Su=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return zf(this.rotation)||zf(this.x)||zf(this.y)||zf(this.scaleX-1)||zf(this.scaleY-1)||zf(this.skewX)||zf(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(D5(n),this.invTransform=null);return}n=n||_o(),t?this.getLocalTransform(n):D5(n),e&&(t?Tu(n,e,n):H3(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Vf);var n=Vf[0]<0?-1:1,i=Vf[1]<0?-1:1,a=((Vf[0]-n)*t+n)/Vf[0]||0,o=((Vf[1]-i)*t+i)/Vf[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||_o(),cv(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||_o(),Tu(Hd,e.invTransform,t),t=Hd);var n=this.originX,i=this.originY;(n||i)&&(Jx[4]=n,Jx[5]=i,Tu(Hd,t,Jx),Hd[4]-=n,Hd[5]-=i,t=Hd),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&Hi(n,n,i),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&Hi(n,n,i),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&eD(e[0]-1)>1e-10&&eD(e[3]-1)>1e-10?Math.sqrt(eD(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){lZ(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,h=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;t[4]=-p*a-h*g*o,t[5]=-g*o-d*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=d*a,t[2]=h*o,u&&kd(t,t,u),t[4]+=n+c,t[5]+=i+f,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Hl=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function lZ(r,e){for(var t=0;t=0?parseFloat(r)/100*e:parseFloat(r):r}function QS(r,e,t){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=t.height,o=t.width,s=a/2,l=t.x,u=t.y,c="left",f="top";if(n instanceof Array)l+=Ns(n[0],t.width),u+=Ns(n[1],t.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var tD="__zr_normal__",rD=Hl.concat(["ignore"]),BDe=Gl(Hl,function(r,e){return r[e]=!0,r},{ignore:!1}),Wd={},ODe=new Nt(0,0,0,0),NA=function(){function r(e){this.id=PY(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=t.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(t),n.position!=null){var c=ODe;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Wd,n,c):QS(Wd,n,c),a.x=Wd.x,a.y=Wd.y,o=Wd.align,s=Wd.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var h=void 0,d=void 0;f==="center"?(h=c.width*.5,d=c.height*.5):(h=Ns(f[0],c.width),d=Ns(f[1],c.height)),u=!0,a.originX=-a.x+h+(i?0:c.x),a.originY=-a.y+d+(i?0:c.y)}}n.rotation!=null&&(a.rotation=n.rotation);var p=n.offset;p&&(a.x+=p[0],a.y+=p[1],u||(a.originX=-p[0],a.originY=-p[1]));var g=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,v=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,b=void 0;g&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),b=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),b=!0)),m=m||"#000",(m!==v.fill||y!==v.stroke||b!==v.autoStroke||o!==v.align||s!==v.verticalAlign)&&(l=!0,v.fill=m,v.stroke=y,v.autoStroke=b,v.align=o,v.verticalAlign=s,t.setDefaultTextStyle(v)),t.__dirty|=ho,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?vM:gM},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&wo(t);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ku(n,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},ye(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(_t(e))for(var n=e,i=nr(n),a=0;a0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(tD,!1,e)},r.prototype.useState=function(e,t,n,i){var a=e===tD,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ut(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){N3("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(e,t,n,c),h&&h.useState(e,t,n,c),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ho),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,p);var g=this._textContent,v=this._textGuide;g&&g.useStates(e,t,h),v&&v.useStates(e,t,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ho)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var i=this.currentStates.slice(),a=Ut(i,e),o=Ut(i,t)>=0;a>=0?o?i.splice(a,1):i[a]=t:n&&!o&&i.push(t),this.useStates(i)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,i=n.length,a=[],o=0;o0&&t.during&&a[0].during(function(p,g){t.during(g)});for(var h=0;h0||i.force&&!o.length){var C=void 0,x=void 0,D=void 0;if(s){x={},h&&(C={});for(var _=0;_=0&&(i.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var i=Ut(this._children,t);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(t,n){var i=this._children,a=i[n];if(t&&t!==this&&t.parent!==this&&t!==a){i[n]=t,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,i=this._children,a=Ut(i,t);return a<0?this:(i.splice(a,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/l*u+o}function We(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Ye(r)?jDe(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Wn(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),fZ),r=(+r).toFixed(e),t?r:+r}function Qo(r){return r.sort(function(e,t){return e-t}),r}function Al(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return qDe(r)}function qDe(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,i=t>0?t:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function hZ(r,e){var t=Math.log,n=Math.LN10,i=Math.floor(t(r[1]-r[0])/n),a=Math.round(t(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function YDe(r,e){var t=Gl(r,function(d,p){return d+(isNaN(p)?0:p)},0);if(t===0)return[];for(var n=Math.pow(10,e),i=Ee(r,function(d){return(isNaN(d)?0:d)/t*n*100}),a=n*100,o=Ee(i,function(d){return Math.floor(d)}),s=Gl(o,function(d,p){return d+p},0),l=Ee(i,function(d,p){return d-o[p]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return Ee(o,function(d){return d/n})}function ZDe(r,e){var t=Math.max(Al(r),Al(e)),n=r+e;return t>fZ?n:Wn(n,t)}var L5=9007199254740991;function dZ(r){var e=Math.PI*2;return(r%e+e)%e}function hy(r){return r>-I5&&r=10&&e++,e}function pZ(r,e){var t=Y3(r),n=Math.pow(10,t),i=r/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,r=a*n,t>=-20?+r.toFixed(t<0?-t:0):r}function aD(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),i=+r[n-1],a=t-n;return a?i+a*(r[n]-i):i}function F5(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n=0||a&&Ut(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var wEe=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],SEe=dd(wEe),AEe=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return SEe(this,e,t)},r}(),bM=new u1(50);function CEe(r){if(typeof r=="string"){var e=bM.get(r);return e&&e.image}else return r}function Q3(r,e,t,n,i){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var a=bM.get(r),o={hostEl:t,cb:n,cbPayload:i};return a?(e=a.image,!VA(e)&&a.pending.push(o)):(e=hf.loadImage(r,R5,R5),e.__zrImageSrc=r,bM.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function R5(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=So(t,e);return u>s&&(t="",u=0),s=r-u,i.ellipsis=t,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=r,i}function EZ(r,e){var t=e.containerWidth,n=e.font,i=e.contentWidth;if(!t)return"";var a=So(r,n);if(a<=t)return r;for(var o=0;;o++){if(a<=i||o>=e.maxIterations){r+=e.ellipsis;break}var s=o===0?DEe(r,i,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(r.length*i/a):0;r=r.substr(0,s),a=So(r,n)}return r===""&&(r=e.placeholder),r}function DEe(r,e,t,n){for(var i=0,a=0,o=r.length;ad&&u){var p=Math.floor(d/s);f=f.slice(0,p)}if(r&&a&&c!=null)for(var g=DZ(c,i,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;vs&&sD(t,r.substring(s,u),e,o),sD(t,l[2],e,o,l[1]),s=oD.lastIndex}si){w>0?(y.tokens=y.tokens.slice(0,w),v(y,_,b),t.lines=t.lines.slice(0,m+1)):t.lines=t.lines.slice(0,m);break e}var T=A.width,k=T==null||T==="auto";if(typeof T=="string"&&T.charAt(T.length-1)==="%")S.percentWidth=T,c.push(S),S.contentWidth=So(S.text,D);else{if(k){var M=A.backgroundColor,L=M&&M.image;L&&(L=CEe(L),VA(L)&&(S.width=Math.max(S.width,L.width*E/L.height)))}var F=p&&n!=null?n-_:null;F!=null&&F0&&p+n.accumWidth>n.width&&(c=e.split(` +`),u=!0),n.accumWidth=p}else{var g=TZ(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,f=g.linesWidths,c=g.lines}}else c=e.split(` +`);for(var v=0;v=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var LEe=Gl(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function FEe(r){return IEe(r)?!!LEe[r]:!0}function TZ(r,e,t,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=0;ft:i+c+d>t){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=h,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=h,c=d)):p?(a.push(l),o.push(u),l=h,u=d):(a.push(h),o.push(d));continue}c+=d,p?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}var _M="__zr_style_"+Math.round(Math.random()*10),Zh={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},GA={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Zh[_M]=!0;var z5=["z","z2","invisible"],BEe=["invisible"],is=function(r){mn(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=nr(t),i=0;i1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(Eb[0]=fD(i)*t+r,Eb[1]=cD(i)*n+e,Tb[0]=fD(a)*t+r,Tb[1]=cD(a)*n+e,u(s,Eb,Tb),c(l,Eb,Tb),i=i%Uf,i<0&&(i=i+Uf),a=a%Uf,a<0&&(a=a+Uf),i>a&&!o?a+=Uf:ii&&(kb[0]=fD(d)*t+r,kb[1]=cD(d)*n+e,u(s,kb,s),c(l,kb,l))}var nn={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Hf=[],Wf=[],Xs=[],tc=[],Ks=[],Qs=[],hD=Math.min,dD=Math.max,$f=Math.cos,jf=Math.sin,ru=Math.abs,wM=Math.PI,hc=wM*2,pD=typeof Float32Array<"u",qv=[];function gD(r){var e=Math.round(r/wM*1e8)/1e8;return e%2*wM}function J3(r,e){var t=gD(r[0]);t<0&&(t+=hc);var n=t-r[0],i=r[1];i+=n,!e&&i-t>=hc?i=t+hc:e&&t-i>=hc?i=t-hc:!e&&t>i?i=t+(hc-gD(t-i)):e&&t0&&(this._ux=ru(n/KS/e)||0,this._uy=ru(n/KS/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(nn.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=ru(e-this._xi),i=ru(t-this._yi),a=n>this._ux||i>this._uy;if(this.addData(nn.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,i,a,o){return this._drawPendingPt(),this.addData(nn.C,e,t,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,i){return this._drawPendingPt(),this.addData(nn.Q,e,t,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(e,t,n,i,a,o){this._drawPendingPt(),qv[0]=i,qv[1]=a,J3(qv,o),i=qv[0],a=qv[1];var s=a-i;return this.addData(nn.A,e,t,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,i,a,o),this._xi=$f(a)*n+e,this._yi=jf(a)*n+t,this},r.prototype.arcTo=function(e,t,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,i,a),this},r.prototype.rect=function(e,t,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,i),this.addData(nn.R,e,t,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(nn.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&pD&&(this.data=new Float32Array(t));for(var n=0;nc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Xs[0]=Xs[1]=Ks[0]=Ks[1]=Number.MAX_VALUE,tc[0]=tc[1]=Qs[0]=Qs[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,i=0,a=0,o;for(o=0;on||ru(b)>i||h===t-1)&&(g=Math.sqrt(y*y+b*b),a=v,o=m);break}case nn.C:{var _=e[h++],w=e[h++],v=e[h++],m=e[h++],S=e[h++],A=e[h++];g=iDe(a,o,_,w,v,m,S,A,10),a=S,o=A;break}case nn.Q:{var _=e[h++],w=e[h++],v=e[h++],m=e[h++];g=oDe(a,o,_,w,v,m,10),a=v,o=m;break}case nn.A:var C=e[h++],x=e[h++],D=e[h++],E=e[h++],T=e[h++],k=e[h++],M=k+T;h+=1,p&&(s=$f(T)*D+C,l=jf(T)*E+x),g=dD(D,E)*hD(hc,Math.abs(k)),a=$f(M)*D+C,o=jf(M)*E+x;break;case nn.R:{s=a=e[h++],l=o=e[h++];var L=e[h++],F=e[h++];g=L*2+F*2;break}case nn.Z:{var y=s-a,b=l-o;g=Math.sqrt(y*y+b*b),a=s,o=l;break}}g>=0&&(u[f++]=g,c+=g)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,d=t<1,p,g,v=0,m=0,y,b=0,_,w;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,y=t*g,!y)))e:for(var S=0;S0&&(e.lineTo(_,w),b=0),A){case nn.M:s=u=n[S++],l=c=n[S++],e.moveTo(u,c);break;case nn.L:{f=n[S++],h=n[S++];var x=ru(f-u),D=ru(h-c);if(x>i||D>a){if(d){var E=p[m++];if(v+E>y){var T=(y-v)/E;e.lineTo(u*(1-T)+f*T,c*(1-T)+h*T);break e}v+=E}e.lineTo(f,h),u=f,c=h,b=0}else{var k=x*x+D*D;k>b&&(_=f,w=h,b=k)}break}case nn.C:{var M=n[S++],L=n[S++],F=n[S++],U=n[S++],N=n[S++],$=n[S++];if(d){var E=p[m++];if(v+E>y){var T=(y-v)/E;df(u,M,F,N,T,Hf),df(c,L,U,$,T,Wf),e.bezierCurveTo(Hf[1],Wf[1],Hf[2],Wf[2],Hf[3],Wf[3]);break e}v+=E}e.bezierCurveTo(M,L,F,U,N,$),u=N,c=$;break}case nn.Q:{var M=n[S++],L=n[S++],F=n[S++],U=n[S++];if(d){var E=p[m++];if(v+E>y){var T=(y-v)/E;uy(u,M,F,T,Hf),uy(c,L,U,T,Wf),e.quadraticCurveTo(Hf[1],Wf[1],Hf[2],Wf[2]);break e}v+=E}e.quadraticCurveTo(M,L,F,U),u=F,c=U;break}case nn.A:var H=n[S++],P=n[S++],te=n[S++],J=n[S++],fe=n[S++],Ce=n[S++],ke=n[S++],Se=!n[S++],be=te>J?te:J,W=ru(te-J)>.001,q=fe+Ce,j=!1;if(d){var E=p[m++];v+E>y&&(q=fe+Ce*(y-v)/E,j=!0),v+=E}if(W&&e.ellipse?e.ellipse(H,P,te,J,ke,fe,q,Se):e.arc(H,P,be,fe,q,Se),j)break e;C&&(s=$f(fe)*te+H,l=jf(fe)*J+P),u=$f(q)*te+H,c=jf(q)*J+P;break;case nn.R:s=u=n[S],l=c=n[S+1],f=n[S++],h=n[S++];var ve=n[S++],K=n[S++];if(d){var E=p[m++];if(v+E>y){var xe=y-v;e.moveTo(f,h),e.lineTo(f+hD(xe,ve),h),xe-=ve,xe>0&&e.lineTo(f+ve,h+hD(xe,K)),xe-=K,xe>0&&e.lineTo(f+dD(ve-xe,0),h+K),xe-=ve,xe>0&&e.lineTo(f,h+dD(K-xe,0));break e}v+=E}e.rect(f,h,ve,K);break;case nn.Z:if(d){var E=p[m++];if(v+E>y){var T=(y-v)/E;e.lineTo(u*(1-T)+s*T,c*(1-T)+l*T);break e}v+=E}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=nn,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function _c(r,e,t,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>e+s&&o>n+s||or+s&&a>t+s||ae+f&&c>n+f&&c>a+f&&c>s+f||cr+f&&u>t+f&&u>i+f&&u>o+f||ue+u&&l>n+u&&l>a+u||lr+u&&s>t+u&&s>i+u||st||c+ui&&(i+=Yv);var h=Math.atan2(l,s);return h<0&&(h+=Yv),h>=n&&h<=i||h+Yv>=n&&h+Yv<=i}function fu(r,e,t,n,i,a){if(a>e&&a>n||ai?s:0}var rc=$l.CMD,qf=Math.PI*2,GEe=1e-4;function UEe(r,e){return Math.abs(r-e)e&&u>n&&u>a&&u>s||u1&&HEe(),d=ci(e,n,a,s,zo[0]),h>1&&(p=ci(e,n,a,s,zo[1]))),h===2?ve&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=xi(e,n,a,u),h=0;ht||s<-t)return 0;var l=Math.sqrt(t*t-s*s);ma[0]=-l,ma[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=qf-1e-4){n=0,i=qf;var c=a?1:-1;return o>=ma[0]+r&&o<=ma[1]+r?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=qf,i+=qf);for(var h=0,d=0;d<2;d++){var p=ma[d];if(p+r>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=qf+g),(g>=n&&g<=i||g+qf>=n&&g+qf<=i)&&(g>Math.PI/2&&g1&&(t||(s+=fu(l,u,c,f,n,i))),v&&(l=a[p],u=a[p+1],c=l,f=u),g){case rc.M:c=a[p++],f=a[p++],l=c,u=f;break;case rc.L:if(t){if(_c(l,u,a[p],a[p+1],e,n,i))return!0}else s+=fu(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case rc.C:if(t){if(zEe(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=WEe(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case rc.Q:if(t){if(kZ(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=$Ee(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case rc.A:var m=a[p++],y=a[p++],b=a[p++],_=a[p++],w=a[p++],S=a[p++];p+=1;var A=!!(1-a[p++]);h=Math.cos(w)*b+m,d=Math.sin(w)*_+y,v?(c=h,f=d):s+=fu(l,u,h,d,n,i);var C=(n-m)*_/b+m;if(t){if(VEe(m,y,_,w,w+S,A,e,C,i))return!0}else s+=jEe(m,y,_,w,w+S,A,C,i);l=Math.cos(w+S)*b+m,u=Math.sin(w+S)*_+y;break;case rc.R:c=l=a[p++],f=u=a[p++];var x=a[p++],D=a[p++];if(h=c+x,d=f+D,t){if(_c(c,f,h,f,e,n,i)||_c(h,f,h,d,e,n,i)||_c(h,d,c,d,e,n,i)||_c(c,d,c,f,e,n,i))return!0}else s+=fu(h,f,h,d,n,i),s+=fu(c,d,c,f,n,i);break;case rc.Z:if(t){if(_c(l,u,c,f,e,n,i))return!0}else s+=fu(l,u,c,f,n,i);l=c,u=f;break}}return!t&&!UEe(u,f)&&(s+=fu(l,u,c,f,n,i)||0),s!==0}function qEe(r,e,t){return MZ(r,0,!1,e,t)}function YEe(r,e,t,n){return MZ(r,e,!0,t,n)}var JS=mt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Zh),ZEe={style:mt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},GA.style)},vD=Hl.concat(["invisible","culling","z","z2","zlevel","parent"]),Xt=function(r){mn(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){t.buildPath(l,t.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?gM:n>.2?FDe:vM}else if(t)return vM}return gM},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(Ye(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=ZS(t,0)0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&vp)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect(),o=this.style;if(t=i[0],n=i[1],a.contain(t,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),YEe(s,l/u,t,n)))return!0}if(this.hasFill())return qEe(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=vp,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var i=this.shape;return i||(i=this.shape={}),typeof t=="string"?i[t]=n:ye(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&vp)},e.prototype.createStyle=function(t){return BA(JS,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=ye({},this.shape))},e.prototype._applyStateObj=function(t,n,i,a,o,s){r.prototype._applyStateObj.call(this,t,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=ye({},i.shape),ye(u,n.shape)):(u=ye({},a?this.shape:i.shape),ye(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=ye({},this.shape);for(var c={},f=nr(u),h=0;h0},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(t){return BA(XEe,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var n=t.text;n!=null?n+="":n="";var i=c1(n,t.font,t.textAlign,t.textBaseline);if(i.x+=t.x||0,i.y+=t.y||0,this.hasStroke()){var a=t.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(is);Pg.prototype.type="tspan";var KEe=mt({x:0,y:0},Zh),QEe={style:mt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},GA.style)};function JEe(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Pi=function(r){mn(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return BA(KEe,t)},e.prototype._getSize=function(t){var n=this.style,i=n[t];if(i!=null)return i;var a=JEe(n.image)?n.image:this.__image;if(!a)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?a[t]:a[t]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return QEe},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Nt(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(is);Pi.prototype.type="image";function eTe(r,e){var t=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,c;i<0&&(t=t+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),r.moveTo(t+s,n),r.lineTo(t+i-l,n),l!==0&&r.arc(t+i-l,n+l,l,-Math.PI/2,0),r.lineTo(t+i,n+a-u),u!==0&&r.arc(t+i-u,n+a-u,u,0,Math.PI/2),r.lineTo(t+c,n+a),c!==0&&r.arc(t+c,n+a-c,c,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var Tp=Math.round;function IZ(r,e,t){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=t&&t.lineWidth;return s&&(Tp(n*2)===Tp(i*2)&&(r.x1=r.x2=Ih(n,s,!0)),Tp(a*2)===Tp(o*2)&&(r.y1=r.y2=Ih(a,s,!0))),r}}function LZ(r,e,t){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Ih(n,s,!0),r.y=Ih(i,s,!0),r.width=Math.max(Ih(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(Ih(i+o,s,!1)-r.y,o===0?0:1)),r}}function Ih(r,e,t){if(!e)return r;var n=Tp(r*2);return(n+Tp(e))%2===0?n/2:(n+(t?1:-1))/2}var tTe=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),rTe={},vr=function(r){mn(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new tTe},e.prototype.buildPath=function(t,n){var i,a,o,s;if(this.subPixelOptimize){var l=LZ(rTe,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?eTe(t,n):t.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Xt);vr.prototype.type="rect";var W5={fill:"#000"},$5=2,nTe={style:mt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},GA.style)},Ar=function(r){mn(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=W5,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),k=o.calculatedLineHeight,M=0;M=0&&(M=S[k],M.align==="right");)this._placeToken(M,t,C,m,T,"right",b),x-=M.width,T-=M.width,k--;for(E+=(a-(E-v)-(y-T)-x)/2;D<=k;)M=S[D],this._placeToken(M,t,C,m,E+M.width/2,"center",b),E+=M.width,D++;m+=C}},e.prototype._placeToken=function(t,n,i,a,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=a+i/2;c==="top"?f=a+t.height/2:c==="bottom"&&(f=a+i-t.height/2);var h=!t.isLineHolder&&mD(u);h&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var d=!!u.backgroundColor,p=t.textPadding;p&&(o=K5(o,s,p),f-=t.height/2-p[0]-t.innerHeight/2);var g=this._getOrCreateChild(Pg),v=g.createStyle();g.useStyle(v);var m=this._defaultStyle,y=!1,b=0,_=X5("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),w=Z5("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!m.autoStroke||y)?(b=$5,m.stroke):null),S=u.textShadowBlur>0||n.textShadowBlur>0;v.text=t.text,v.x=o,v.y=f,S&&(v.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,v.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",v.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,v.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),v.textAlign=s,v.textBaseline="middle",v.font=t.font||ff,v.opacity=Ml(u.opacity,n.opacity,1),q5(v,u),w&&(v.lineWidth=Ml(u.lineWidth,n.lineWidth,b),v.lineDash=Mt(u.lineDash,n.lineDash),v.lineDashOffset=n.lineDashOffset||0,v.stroke=w),_&&(v.fill=_);var A=t.contentWidth,C=t.contentHeight;g.setBoundingRect(new Nt(Lm(v.x,A,v.textAlign),mp(v.y,C,v.textBaseline),A,C))},e.prototype._renderBackground=function(t,n,i,a,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,h=l&&!f,d=t.borderRadius,p=this,g,v;if(h||t.lineHeight||u&&c){g=this._getOrCreateChild(vr),g.useStyle(g.createStyle()),g.style.fill=null;var m=g.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=d,g.dirtyShape()}if(h){var y=g.style;y.fill=l||null,y.fillOpacity=Mt(t.fillOpacity,1)}else if(f){v=this._getOrCreateChild(Pi),v.onload=function(){p.dirtyStyle()};var b=v.style;b.image=l.image,b.x=i,b.y=a,b.width=o,b.height=s}if(u&&c){var y=g.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=Mt(t.strokeOpacity,1),y.lineDash=t.borderDash,y.lineDashOffset=t.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var _=(g||v).style;_.shadowBlur=t.shadowBlur||0,_.shadowColor=t.shadowColor||"transparent",_.shadowOffsetX=t.shadowOffsetX||0,_.shadowOffsetY=t.shadowOffsetY||0,_.opacity=Ml(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return BZ(t)&&(n=[t.fontStyle,t.fontWeight,FZ(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&xs(n)||t.textFont||t.font},e}(is),iTe={left:!0,right:1,center:1},aTe={top:1,bottom:1,middle:1},j5=["fontStyle","fontWeight","fontSize","fontFamily"];function FZ(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?O3+"px":r+"px"}function q5(r,e){for(var t=0;t=0,a=!1;if(r instanceof Xt){var o=OZ(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if($d(s)||$d(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=ye({},n),u=ye({},u),u.fill=s):!$d(u.fill)&&$d(s)?(a=!0,n=ye({},n),u=ye({},u),u.fill=sM(s)):!$d(u.stroke)&&$d(l)&&(a||(n=ye({},n),u=ye({},u)),u.stroke=sM(l)),n.style=u}}if(n&&n.z2==null){a||(n=ye({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c??hv)}return n}function hTe(r,e,t){if(t&&t.z2==null){t=ye({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??sTe)}return t}function dTe(r,e,t){var n=Ut(r.currentStates,e)>=0,i=r.style.opacity,a=n?null:cTe(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=ye({},t),o=ye({opacity:n?i:a.opacity*.1},o),t.style=o),t}function yD(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return fTe(this,r,e,t);if(r==="blur")return dTe(this,r,t);if(r==="select")return hTe(this,r,t)}return t}function pd(r){r.stateProxy=yD;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=yD),t&&(t.stateProxy=yD)}function rN(r,e){!UZ(r,e)&&!r.__highByOuter&&Yu(r,PZ)}function nN(r,e){!UZ(r,e)&&!r.__highByOuter&&Yu(r,RZ)}function Nu(r,e){r.__highByOuter|=1<<(e||0),Yu(r,PZ)}function zu(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Yu(r,RZ)}function zZ(r){Yu(r,rF)}function nF(r){Yu(r,NZ)}function VZ(r){Yu(r,lTe)}function GZ(r){Yu(r,uTe)}function UZ(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function HZ(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(i,a){var o=eF(a),s=i==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){NZ(u)}),s&&t.push(a)),o.isBlured=!1}),B(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(t,!1,e)})}function AM(r,e,t,n){var i=n.getModel();t=t||"coordinateSystem";function a(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:t.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function Kh(r,e,t){Lh(r,!0),Yu(r,pd),xM(r,e,t)}function bTe(r){Lh(r,!1)}function Rn(r,e,t,n){n?bTe(r):Kh(r,e,t)}function xM(r,e,t){var n=Ct(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var aN=["emphasis","blur","select"],_Te={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Wi(r,e,t,n){t=t||"itemStyle";for(var i=0;i1&&(o*=bD(p),s*=bD(p));var g=(i===a?-1:1)*bD((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,v=g*o*d/s,m=g*-s*h/o,y=(r+t)/2+Ib(f)*v-Mb(f)*m,b=(e+n)/2+Mb(f)*v+Ib(f)*m,_=uN([1,0],[(h-v)/o,(d-m)/s]),w=[(h-v)/o,(d-m)/s],S=[(-1*h-v)/o,(-1*d-m)/s],A=uN(w,S);if(EM(w,S)<=-1&&(A=Zv),EM(w,S)>=1&&(A=0),A<0){var C=Math.round(A/Zv*1e6)/1e6;A=Zv*2+C%2*Zv}c.addData(u,y,b,o,s,_,A,f,a)}var DTe=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,ETe=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function TTe(r){var e=new $l;if(!r)return e;var t=0,n=0,i=t,a=n,o,s=$l.CMD,l=r.match(DTe);if(!l)return e;for(var u=0;uM*M+L*L&&(C=D,x=E),{cx:C,cy:x,x0:-c,y0:-f,x1:C*(i/w-1),y1:x*(i/w-1)}}function OTe(r){var e;if(De(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function PTe(r,e){var t,n=Fm(e.r,0),i=Fm(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,h=!!e.clockwise,d=fN(u-l),p=d>_D&&d%_D;if(p>ps&&(d=p),!(n>ps))r.moveTo(c,f);else if(d>_D-ps)r.moveTo(c+n*qd(l),f+n*Yf(l)),r.arc(c,f,n,l,u,!h),i>ps&&(r.moveTo(c+i*qd(u),f+i*Yf(u)),r.arc(c,f,i,u,l,h));else{var g=void 0,v=void 0,m=void 0,y=void 0,b=void 0,_=void 0,w=void 0,S=void 0,A=void 0,C=void 0,x=void 0,D=void 0,E=void 0,T=void 0,k=void 0,M=void 0,L=n*qd(l),F=n*Yf(l),U=i*qd(u),N=i*Yf(u),$=d>ps;if($){var H=e.cornerRadius;H&&(t=OTe(H),g=t[0],v=t[1],m=t[2],y=t[3]);var P=fN(n-i)/2;if(b=Js(P,m),_=Js(P,y),w=Js(P,g),S=Js(P,v),x=A=Fm(b,_),D=C=Fm(w,S),(A>ps||C>ps)&&(E=n*qd(u),T=n*Yf(u),k=i*qd(l),M=i*Yf(l),dps){var W=Js(m,x),q=Js(y,x),j=Lb(k,M,L,F,n,W,h),ve=Lb(E,T,U,N,n,q,h);r.moveTo(c+j.cx+j.x0,f+j.cy+j.y0),x0&&r.arc(c+j.cx,f+j.cy,W,Yi(j.y0,j.x0),Yi(j.y1,j.x1),!h),r.arc(c,f,n,Yi(j.cy+j.y1,j.cx+j.x1),Yi(ve.cy+ve.y1,ve.cx+ve.x1),!h),q>0&&r.arc(c+ve.cx,f+ve.cy,q,Yi(ve.y1,ve.x1),Yi(ve.y0,ve.x0),!h))}else r.moveTo(c+L,f+F),r.arc(c,f,n,l,u,!h);if(!(i>ps)||!$)r.lineTo(c+U,f+N);else if(D>ps){var W=Js(g,D),q=Js(v,D),j=Lb(U,N,E,T,i,-q,h),ve=Lb(L,F,k,M,i,-W,h);r.lineTo(c+j.cx+j.x0,f+j.cy+j.y0),D0&&r.arc(c+j.cx,f+j.cy,q,Yi(j.y0,j.x0),Yi(j.y1,j.x1),!h),r.arc(c,f,i,Yi(j.cy+j.y1,j.cx+j.x1),Yi(ve.cy+ve.y1,ve.cx+ve.x1),h),W>0&&r.arc(c+ve.cx,f+ve.cy,W,Yi(ve.y1,ve.x1),Yi(ve.y0,ve.x0),!h))}else r.lineTo(c+U,f+N),r.arc(c,f,i,u,l,h)}r.closePath()}}}var RTe=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),Ia=function(r){mn(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new RTe},e.prototype.buildPath=function(t,n){PTe(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Xt);Ia.prototype.type="sector";var NTe=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),d1=function(r){mn(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new NTe},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.PI*2;t.moveTo(i+n.r,a),t.arc(i,a,n.r,0,o,!1),t.moveTo(i+n.r0,a),t.arc(i,a,n.r0,0,o,!0)},e}(Xt);d1.prototype.type="ring";function zTe(r,e,t,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,d=r.length;h=2){if(n){var a=zTe(i,n,t,e.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(t?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;sXf[1]){if(s=!1,a)return s;var c=Math.abs(Xf[0]-Zf[1]),f=Math.abs(Zf[0]-Xf[1]);Math.min(c,f)>i.len()&&(c0){var f=c.duration,h=c.delay,d=c.easing,p={duration:f,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),a&&a()}function Lr(r,e,t,n,i,a){sF("update",r,e,t,n,i,a)}function Sn(r,e,t,n,i,a){sF("enter",r,e,t,n,i,a)}function Kp(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function pN(r){return!r.isGroup}function JTe(r){return r.shape!=null}function v1(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){pN(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return JTe(o)&&(s.shape=ye({},o.shape)),s}var a=n(r);e.traverse(function(o){if(pN(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Lr(o,l,t,Ct(o).dataIndex)}}})}function nX(r,e){return Ee(r,function(t){var n=t[0];n=r2(n,e.x),n=n2(n,e.x+e.width);var i=t[1];return i=r2(i,e.y),i=n2(i,e.y+e.height),[n,i]})}function eke(r,e){var t=r2(r.x,e.x),n=n2(r.x+r.width,e.x+e.width),i=r2(r.y,e.y),a=n2(r.y+r.height,e.y+e.height);if(n>=t&&a>=i)return{x:t,y:i,width:n-t,height:a-i}}function m1(r,e,t){var n=ye({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),mt(i,t),new Pi(n)):qA(r.replace("path://",""),n,t,"center")}function Bm(r,e,t,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var v=wD(d,p,c,f)/h;return!(v<0||v>1)}function wD(r,e,t,n){return r*n-t*e}function tke(r){return r<=1e-6&&r>=-1e-6}function pv(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,i=Ye(e)?{formatter:e}:e,a=t.mainType,o=t.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&B(nr(l),function(c){et(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Ct(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:mt({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function gN(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Ef(r,e){if(r)if(De(r))for(var t=0;t=0&&s.push(l)}),s}}function Tf(r,e){return Rt(Rt({},r,!0),e,!0)}const dke={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},pke={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var a2="ZH",cF="EN",Qp=cF,ow={},fF={},cX=er.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Qp).toUpperCase();return r.indexOf(a2)>-1?a2:Qp}():Qp;function fX(r,e){r=r.toUpperCase(),fF[r]=new $r(e),ow[r]=e}function gke(r){if(Ye(r)){var e=ow[r.toUpperCase()]||{};return r===a2||r===cF?wt(e):Rt(wt(e),wt(ow[Qp]),!1)}else return Rt(wt(r),wt(ow[Qp]),!1)}function MM(r){return fF[r]}function vke(){return fF[Qp]}fX(cF,dke);fX(a2,pke);var hF=1e3,dF=hF*60,a0=dF*60,Zo=a0*24,_N=Zo*365,Om={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Ob="{yyyy}-{MM}-{dd}",wN={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ob,hour:Ob+" "+Om.hour,minute:Ob+" "+Om.minute,second:Ob+" "+Om.second,millisecond:Om.none},CD=["year","month","day","hour","minute","second","millisecond"],hX=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function nc(r,e){return r+="","0000".substr(0,e-r.length)+r}function Jp(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function mke(r){return r===Jp(r)}function yke(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function XA(r,e,t,n){var i=Wl(r),a=i[pF(t)](),o=i[eg(t)]()+1,s=Math.floor((o-1)/3)+1,l=i[KA(t)](),u=i["get"+(t?"UTC":"")+"Day"](),c=i[my(t)](),f=(c-1)%12+1,h=i[QA(t)](),d=i[JA(t)](),p=i[eC(t)](),g=c>=12?"pm":"am",v=g.toUpperCase(),m=n instanceof $r?n:MM(n||cX)||vke(),y=m.getModel("time"),b=y.get("month"),_=y.get("monthAbbr"),w=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,nc(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,nc(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,nc(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,nc(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,nc(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,nc(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,nc(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,nc(p,3)).replace(/{S}/g,p+"")}function bke(r,e,t,n,i){var a=null;if(Ye(t))a=t;else if(pt(t))a=t(r.value,e,{level:r.level});else{var o=ye({},Om);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(De(a)){var f=r.level==null?0:r.level>=0?r.level:a.length+r.level;f=Math.min(f,a.length-1),a=a[f]}}return XA(new Date(r.value),a,i,n)}function dX(r,e){var t=Wl(r),n=t[eg(e)]()+1,i=t[KA(e)](),a=t[my(e)](),o=t[QA(e)](),s=t[JA(e)](),l=t[eC(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,d=h&&i===1,p=d&&n===1;return p?"year":d?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function SN(r,e,t){var n=Mr(r)?Wl(r):r;switch(e=e||dX(r,t),e){case"year":return n[pF(t)]();case"half-year":return n[eg(t)]()>=6?1:0;case"quarter":return Math.floor((n[eg(t)]()+1)/4);case"month":return n[eg(t)]();case"day":return n[KA(t)]();case"half-day":return n[my(t)]()/24;case"hour":return n[my(t)]();case"minute":return n[QA(t)]();case"second":return n[JA(t)]();case"millisecond":return n[eC(t)]()}}function pF(r){return r?"getUTCFullYear":"getFullYear"}function eg(r){return r?"getUTCMonth":"getMonth"}function KA(r){return r?"getUTCDate":"getDate"}function my(r){return r?"getUTCHours":"getHours"}function QA(r){return r?"getUTCMinutes":"getMinutes"}function JA(r){return r?"getUTCSeconds":"getSeconds"}function eC(r){return r?"getUTCMilliseconds":"getMilliseconds"}function _ke(r){return r?"setUTCFullYear":"setFullYear"}function pX(r){return r?"setUTCMonth":"setMonth"}function gX(r){return r?"setUTCDate":"setDate"}function vX(r){return r?"setUTCHours":"setHours"}function mX(r){return r?"setUTCMinutes":"setMinutes"}function yX(r){return r?"setUTCSeconds":"setSeconds"}function bX(r){return r?"setUTCMilliseconds":"setMilliseconds"}function _X(r){if(!gZ(r))return Ye(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function wX(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var mv=G3;function IM(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&xs(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Wl(r):r;if(isNaN(+l)){if(s)return"-"}else return XA(l,n,t)}if(e==="ordinal")return Yk(r)?i(r):Mr(r)&&a(r)?r+"":"-";var u=Ru(r);return a(u)?_X(u):Yk(r)?i(r):typeof r=="boolean"?r+"":"-"}var AN=["a","b","c","d","e","f","g"],xD=function(r,e){return"{"+r+(e??"")+"}"};function SX(r,e,t){De(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a':'';var o=t.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function gd(r,e){return e=e||"transparent",Ye(r)?r:_t(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function o2(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var sw=B,AX=["left","right","top","bottom","width","height"],Fh=[["width","left","right"],["height","top","bottom"]];function gF(r,e,t,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),d,p;if(r==="horizontal"){var g=c.width+(h?-h.x+c.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var v=c.height+(h?-h.y+c.y:0);p=o+v,p>i||l.newline?(a+=s+t,o=0,p=v,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=d+t:o=p+t)})}var Jh=gF;Lt(gF,"vertical");Lt(gF,"horizontal");function Ake(r,e,t){var n=e.width,i=e.height,a=We(r.left,n),o=We(r.top,i),s=We(r.right,n),l=We(r.bottom,i);return(isNaN(a)||isNaN(parseFloat(r.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=i),t=mv(t||0),{width:Math.max(s-a-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function si(r,e,t){t=mv(t||0);var n=e.width,i=e.height,a=We(r.left,n),o=We(r.top,i),s=We(r.right,n),l=We(r.bottom,i),u=We(r.width,n),c=We(r.height,i),f=t[2]+t[0],h=t[1]+t[3],d=r.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),r.left||r.right){case"center":a=n/2-u/2-t[3];break;case"right":a=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-c/2-t[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var p=new Nt(a+t[3],o+t[0],u,c);return p.margin=t,p}function tC(r,e,t,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new Nt(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=si(mt({width:u.width,height:u.height},e),t,n),h=o?f.x-u.x:0,d=s?f.y-u.y:0;return l==="raw"?(a.x=h,a.y=d):(a.x+=h,a.y+=d),a===r&&r.markRedraw(),!0}function Cke(r,e){return r[Fh[e][0]]!=null||r[Fh[e][1]]!=null&&r[Fh[e][2]]!=null}function yy(r){var e=r.layoutMode||r.constructor.layoutMode;return _t(e)?e:e?{type:e}:null}function gf(r,e,t){var n=t&&t.ignoreSize;!De(n)&&(n=[n,n]);var i=o(Fh[0],0),a=o(Fh[1],1);u(Fh[0],r,i),u(Fh[1],r,a);function o(c,f){var h={},d=0,p={},g=0,v=2;if(sw(c,function(b){p[b]=r[b]}),sw(c,function(b){s(e,b)&&(h[b]=p[b]=e[b]),l(h,b)&&d++,l(p,b)&&g++}),n[f])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(g===v||!d)return p;if(d>=v)return h;for(var m=0;m=0;l--)s=Rt(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var i=t+"Index",a=t+"Id";return f1(this.ecModel,t,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}($r);xZ(rr,$r);zA(rr);fke(rr);hke(rr,Dke);function Dke(r){var e=[];return B(rr.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=Ee(e,function(t){return Cl(t).main}),r!=="dataset"&&Ut(e,"dataset")<=0&&e.unshift("dataset"),e}var xX="";typeof navigator<"u"&&(xX=navigator.platform||"");var Yd="rgba(0, 0, 0, 0.2)";const Eke={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Yd,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Yd,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Yd,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Yd,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Yd,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Yd,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:xX.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var DX=nt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),ls="original",sa="arrayRows",us="objectRows",Xl="keyedColumns",jc="typedArray",EX="unknown",Il="column",bv="row",Ri={Must:1,Might:2,Not:3},TX=yr();function Tke(r){TX(r).datasetMap=nt()}function kX(r,e,t){var n={},i=mF(e);if(!i||!r)return n;var a=[],o=[],s=e.ecModel,l=TX(s).datasetMap,u=i.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),B(r,function(g,v){var m=_t(g)?g:r[v]={name:g};m.type==="ordinal"&&c==null&&(c=v,f=p(m)),n[m.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});B(r,function(g,v){var m=g.name,y=p(g);if(c==null){var b=h.valueWayDim;d(n[m],b,y),d(o,b,y),h.valueWayDim+=y}else if(c===v)d(n[m],0,y),d(a,0,y);else{var b=h.categoryWayDim;d(n[m],b,y),d(o,b,y),h.categoryWayDim+=y}});function d(g,v,m){for(var y=0;ye)return r[n];return r[t-1]}function LX(r,e,t,n,i,a,o){a=a||r;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?t:Fke(n,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function Bke(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Pb,Xv,xN,DN="\0_ec_inner",Oke=1,bF=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,i,a,o,s){a=a||{},this.option=null,this._theme=new $r(a),this._locale=new $r(o),this._optionManager=s},e.prototype.setOption=function(t,n,i){var a=kN(n);this._optionManager.setOption(t,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,n){return this._resetOption(t,kN(n))},e.prototype._resetOption=function(t,n){var i=!1,a=this._optionManager;if(!t||t==="recreate"){var o=a.mountOption(t==="recreate");!this.option||t==="recreate"?xN(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&B(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=nt(),u=n&&n.replaceMergeMainTypeMap;Tke(this),B(t,function(f,h){f!=null&&(rr.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?wt(f):Rt(i[h],f,!0))}),u&&u.each(function(f,h){rr.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),rr.topologicalTravel(s,rr.getAllClassMainTypes(),c,this);function c(f){var h=Ike(this,f,Qr(t[f])),d=a.get(f),p=d?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=_Z(d,h,p);oEe(g,f,rr),i[f]=null,a.set(f,null),o.set(f,0);var v=[],m=[],y=0,b;B(g,function(_,w){var S=_.existing,A=_.newOption;if(!A)S&&(S.mergeOption({},this),S.optionUpdated({},!1));else{var C=f==="series",x=rr.getClass(f,_.keyInfo.subType,!C);if(!x)return;if(f==="tooltip"){if(b)return;b=!0}if(S&&S.constructor===x)S.name=_.keyInfo.name,S.mergeOption(A,this),S.optionUpdated(A,!1);else{var D=ye({componentIndex:w},_.keyInfo);S=new x(A,this,this,D),ye(S,D),_.brandNew&&(S.__requireNewView=!0),S.init(A,this,this),S.optionUpdated(null,!0)}}S?(v.push(S.option),m.push(S),y++):(v.push(void 0),m.push(void 0))},this),i[f]=v,a.set(f,m),o.set(f,y),f==="series"&&Pb(this)}this._seriesIndices||Pb(this)},e.prototype.getOption=function(){var t=wt(this.option);return B(t,function(n,i){if(rr.hasClass(i)){for(var a=Qr(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!dy(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,t[i]=a}}),delete t[DN],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var i=this._componentsMap.get(t);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function Wke(r,e){return r.join(",")===e.join(",")}var fs=B,by=_t,MN=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function ED(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=MN.length;t=0;v--){var m=r[v];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&h>=0&&y>0||l==="samesign"&&h<=0&&y<0){h=ZDe(h,y),g=y;break}}}return n[0]=h,n[1]=g,n})})}var rC=function(){function r(e){this.data=e.data||(e.sourceFormat===Xl?{}:[]),this.sourceFormat=e.sourceFormat||EX,this.seriesLayoutBy=e.seriesLayoutBy||Il,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;ng&&(g=b)}d[0]=p,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};RN=(e={},e[sa+"_"+Il]={pure:!0,appendData:a},e[sa+"_"+bv]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[us]={pure:!0,appendData:a},e[Xl]={pure:!0,appendData:function(o){var s=this._data;B(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[ls]={appendData:a},e[jc]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[v])}return g!=null?g+"":""})}},r.prototype.getRawValue=function(e,t){return Ng(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r}();function GN(r){var e,t;return _t(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function o0(r){return new sMe(r)}var sMe=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var i=this.context;i.data=i.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||d1&&n>0?s:o}};return a;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},uMe=function(){function r(e,t){if(!Mr(t)){var n="";Hr(n)}this._opFn=HX[e],this._rvalFloat=Ru(t)}return r.prototype.evaluate=function(e){return Mr(e)?this._opFn(e,this._rvalFloat):this._opFn(Ru(e),this._rvalFloat)},r}(),WX=function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=Mr(e)?e:Ru(e),i=Mr(t)?t:Ru(t),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=Ye(e),l=Ye(t);s&&(n=l?e:0),l&&(i=s?t:0)}return ni?-this._resultLT:0},r}(),cMe=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ru(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=Ru(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function fMe(r,e){return r==="eq"||r==="ne"?new cMe(r==="eq",e):et(HX,r)?new uMe(r,e):null}var hMe=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return qc(e,t)},r}();function dMe(r,e){var t=new hMe,n=r.data,i=t.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Il&&Hr(o);var s=[],l={},u=r.dimensionsDefine;if(u)B(u,function(g,v){var m=g.name,y={index:v,name:m,displayName:g.displayName};if(s.push(y),m!=null){var b="";et(l,m)&&Hr(b),l[m]=y}});else for(var c=0;c65535?wMe:SMe}function Zd(){return[1/0,-1/0]}function AMe(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function WN(r,e,t,n,i){var a=qX[t||"float"];if(i){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;uv[1]&&(v[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Ee(o,function(y){return y.property}),c=0;cm[1]&&(m[1]=v)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,n){var i=this._chunks,a=i[e],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,c=0,f=this.count();c=0&&l<0)&&(s=p,l=d,u=0),d===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=f&&y<=h||isNaN(y))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var v=d[i[0]],b=d[i[1]],_=e[i[1]][0],w=e[i[1]][1],m=0;m=f&&y<=h||isNaN(y))&&(S>=_&&S<=w||isNaN(S))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var m=0;m=f&&y<=h||isNaN(y))&&(l[u++]=A)}else for(var m=0;me[D][1])&&(C=!1)}C&&(l[u++]=t.getRawIndex(m))}return um[1]&&(m[1]=v)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,h,d=new(Qv(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;pc&&(c=f,h=_)}E>0&&Ec-p&&(l=c-p,s.length=l);for(var g=0;gf[1]&&(f[1]=m),h[d++]=y}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,n,i,a){return qc(t[a],this._dimensions[a])}MD={arrayRows:e,objectRows:function(t,n,i,a){return qc(t[n],this._dimensions[a])},keyedColumns:e,original:function(t,n,i,a){var o=t&&(t.value==null?t:t.value);return qc(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(t,n,i,a){return t[a]}}}(),r}(),YX=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,i,a;if(Rb(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=to(s)?jc:ls,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},d=Mt(f.seriesLayoutBy,h.seriesLayoutBy)||null,p=Mt(f.sourceHeader,h.sourceHeader),g=Mt(f.dimensions,h.dimensions),v=d!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||g;i=v?[BM(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:g},l)]:[]}else{var m=e;if(n){var y=this._applyTransform(t);i=y.sourceList,a=y.upstreamSignList}else{var b=m.get("source",!0);i=[BM(b,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),i=t.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&jN(a)}var o,s=[],l=[];return B(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&jN(f),s.push(c),l.push(u._getVersionSign())}),n?o=bMe(n,s,{datasetIndex:t.componentIndex}):i!=null&&(o=[eMe(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return B(r.blocks,function(i){var a=QX(i);a>=e&&(e=a+ +(n&&(!a||PM(i)&&!i.noHeader)))}),e}return 0}function DMe(r,e,t,n){var i=e.noHeader,a=TMe(QX(e)),o=[],s=e.blocks||[];ka(!s||De(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(et(u,l)){var c=new WX(u[l],null);s.sort(function(p,g){return c.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}B(s,function(p,g){var v=e.valueFormatter,m=KX(p)(v?ye(ye({},r),{valueFormatter:v}):r,p,g>0?a.html:0,n);m!=null&&o.push(m)});var f=r.renderMode==="richText"?o.join(a.richText):RM(o.join(""),i?t:a.html);if(i)return f;var h=IM(e.header,"ordinal",r.useUTC),d=XX(n,r.renderMode).nameStyle;return r.renderMode==="richText"?JX(r,h,d)+a.richText+f:RM('
'+Ha(h)+"
"+f,t)}function EMe(r,e,t,n){var i=r.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(_){return _=De(_)?_:[_],Ee(_,function(w,S){return IM(w,De(d)?d[S]:d,u)})};if(!(a&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),h=a?"":IM(l,"ordinal",u),d=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,v=!s&&a,m=XX(n,i),y=m.nameStyle,b=m.valueStyle;return i==="richText"?(s?"":f)+(a?"":JX(r,h,y))+(o?"":IMe(r,p,g,v,b)):RM((s?"":f)+(a?"":kMe(h,!s,y))+(o?"":MMe(p,g,v,b)),t)}}function qN(r,e,t,n,i,a){if(r){var o=KX(r),s={useUTC:i,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function TMe(r){return{html:CMe[r],richText:xMe[r]}}function RM(r,e){var t='
',n="margin: "+e+"px 0 0";return'
'+r+t+"
"}function kMe(r,e,t){var n=e?"margin-left:2px":"";return''+Ha(r)+""}function MMe(r,e,t,n){var i=t?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return r=De(r)?r:[r],''+Ee(r,function(o){return Ha(o)}).join("  ")+""}function JX(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function IMe(r,e,t,n,i){var a=[i],o=n?10:20;return t&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(De(e)?e.join(" "):e,a)}function eK(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return gd(n)}function tK(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var ID=function(){function r(){this.richTextStyles={},this._nextStyleNameId=vZ()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var i=n==="richText"?this._generateStyleName():null,a=Ske({color:t,type:e,renderMode:n,markerId:i});return Ye(a)?a:(this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};De(t)?B(t,function(a){return ye(n,a)}):ye(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},r}();function rK(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(t),l=De(s),u=eK(e,t),c,f,h,d;if(o>1||l&&!o){var p=LMe(s,e,t,a,u);c=p.inlineValues,f=p.inlineValueTypes,h=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=c=Ng(i,t,a[0]),f=g.type}else d=c=l?s[0]:s;var v=Z3(e),m=v&&e.name||"",y=i.getName(t),b=n?m:y;return Si("section",{header:m,noHeader:n||!v,sortParam:d,blocks:[Si("nameValue",{markerType:"item",markerColor:u,name:b,noName:!xs(b),value:c,valueType:f,dataIndex:t})].concat(h||[])})}function LMe(r,e,t,n,i){var a=e.getData(),o=Gl(r,function(f,h,d){var p=a.getDimensionInfo(d);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?B(n,function(f){c(Ng(a,t,f),f)}):B(r,c);function c(f,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?u.push(Si("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:f,valueType:d.type})):(s.push(f),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var ic=yr();function Nb(r,e){return r.getName(e)||r.getId(e)}var lw="__universalTransitionEnabled",pn=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=o0({count:BMe,reset:OMe}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i);var a=ic(this).sourceManager=new YX(this);a.prepareSource();var o=this.getInitialData(t,i);ZN(o,this),this.dataTask.context.data=o,ic(this).dataBeforeProcessed=o,YN(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var i=yy(this),a=i?yv(t):{},o=this.subType;rr.hasClass(o)&&(o+="Series"),Rt(t,n.getTheme().get(this.subType)),Rt(t,this.getDefaultOption()),fd(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&gf(t,a,i)},e.prototype.mergeOption=function(t,n){t=Rt(this.option,t,!0),this.fillDataTextStyle(t.data);var i=yy(this);i&&gf(this.option,t,i);var a=ic(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(t,n);ZN(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ic(this).dataBeforeProcessed=o,YN(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!to(t))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,i){var a=this.ecModel,o=yF.prototype.getColorFromPalette.call(this,t,n,i);return o||(o=a.getColorFromPalette(t,n,i)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(t,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Nb(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[lw])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){_t(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(t,n)}},e.registerClass=function(t){return rr.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(rr);ri(pn,nC);ri(pn,yF);xZ(pn,rr);function YN(r){var e=r.name;Z3(r)||(r.name=FMe(r)||e)}function FMe(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return B(t,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function BMe(r){return r.model.getRawData().count()}function OMe(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),PMe}function PMe(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function ZN(r,e){B(WS(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Lt(RMe,e))})}function RMe(r,e){var t=NM(r);return t&&t.setOutputEnd((e||this).count()),e}function NM(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}var Tn=function(){function r(){this.group=new At,this.uid=vv("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,i){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,i){},r.prototype.updateLayout=function(e,t,n,i){},r.prototype.updateVisual=function(e,t,n,i){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();K3(Tn);zA(Tn);function _v(){var r=yr();return function(e){var t=r(e),n=e.pipelineContext,i=!!t.large,a=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var nK=yr(),NMe=_v(),rn=function(){function r(){this.group=new At,this.uid=vv("viewChart"),this.renderTask=o0({plan:zMe,reset:VMe}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,i){},r.prototype.highlight=function(e,t,n,i){var a=e.getData(i&&i.dataType);a&&KN(a,i,"emphasis")},r.prototype.downplay=function(e,t,n,i){var a=e.getData(i&&i.dataType);a&&KN(a,i,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.updateLayout=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.eachRendered=function(e){Ef(this.group,e)},r.markUpdateMethod=function(e,t){nK(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function XN(r,e,t){r&&gy(r)&&(e==="emphasis"?Nu:zu)(r,t)}function KN(r,e,t){var n=hd(r,e),i=e&&e.highlightKey!=null?STe(e.highlightKey):null;n!=null?B(Qr(n),function(a){XN(r.getItemGraphicEl(a),t,i)}):r.eachItemGraphicEl(function(a){XN(a,t,i)})}K3(rn);zA(rn);function zMe(r){return NMe(r.model)}function VMe(r){var e=r.model,t=r.ecModel,n=r.api,i=r.payload,a=e.pipelineContext.progressiveRender,o=r.view,s=i&&nK(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,i),GMe[l]}var GMe={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},s2="\0__throttleOriginMethod",QN="\0__throttleRate",JN="\0__throttleType";function CF(r,e,t){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var d=[],p=0;p=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){c=d},h}function wv(r,e,t,n){var i=r[e];if(i){var a=i[s2]||i,o=i[JN],s=i[QN];if(s!==t||o!==n){if(t==null||!n)return r[e]=a;i=r[e]=CF(a,t,n==="debounce"),i[s2]=a,i[JN]=n,i[QN]=t}return i}}function _y(r,e){var t=r[e];t&&t[s2]&&(t.clear&&t.clear(),r[e]=t[s2])}var e8=yr(),t8={itemStyle:dd(uX,!0),lineStyle:dd(lX,!0)},UMe={lineStyle:"stroke",itemStyle:"fill"};function iK(r,e){var t=r.visualStyleMapper||t8[e];return t||(console.warn("Unknown style type '"+e+"'."),t8.itemStyle)}function aK(r,e){var t=r.visualDrawType||UMe[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var HMe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=iK(r,n),o=a(i),s=i.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=aK(r,n),u=o[l],c=pt(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||pt(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||pt(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=r.getDataParams(p),v=ye({},o);v[l]=c(g),d.setItemVisual(p,"style",v)}}}},Jv=new $r,WMe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=iK(r,n),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Jv.option=l[n];var u=i(Jv),c=o.ensureUniqueItemVisual(s,"style");ye(c,u),Jv.option.decal&&(o.setItemVisual(s,"decal",Jv.option.decal),Jv.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},$Me={performRawSeries:!0,overallReset:function(r){var e=nt();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),e8(t).scope=a}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),i={},a=t.getData(),o=e8(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=aK(t,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();h[l]=t.getColorFromPalette(d,o,p)}})}})}},zb=Math.PI;function jMe(r,e){e=e||{},mt(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new At,n=new vr({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var i=new Ar({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new vr({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var o;return e.showSpinner&&(o=new jA({shape:{startAngle:-zb/2,endAngle:-zb/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:zb*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:zb*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var oK=function(){function r(e,t,n,i){this._stageTaskMap=nt(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=nt();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;B(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";ka(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,t,n),i.overallReset&&this._createOverallStageTask(i,a,t,n)},this)},r.prototype.prepareView=function(e,t,n,i){var a=e.renderTask,o=a.context;o.model=t,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,i){i=i||{};var a=!1,o=this;B(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var d,p=h.agentStubMap;p.each(function(v){s(i,v)&&(v.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(v){v.perform(g)}),h.perform(g)&&(a=!0)}else f&&f.each(function(v,m){s(i,v)&&v.dirty();var y=o.getPerformArgs(v,i.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(v.context.model),o.updatePayload(v,n),v.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,i){var a=this,o=t.seriesTaskMap,s=t.seriesTaskMap=nt(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,d=s.set(h,o&&o.get(h)||o0({plan:KMe,reset:QMe,count:eIe}));d.context={model:f,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,d)}},r.prototype._createOverallStageTask=function(e,t,n,i){var a=this,o=t.overallTask=t.overallTask||o0({reset:qMe});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=nt(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,d="";ka(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(f=!1,B(n.getSeries(),p));function p(g){var v=g.uid,m=l.set(v,s&&s.get(v)||(h=!0,o0({reset:YMe,onDirty:XMe})));m.context={model:g,overallProgress:f},m.agent=o,m.__block=f,a._pipe(g,m)}h&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},r.wrapStageHandler=function(e,t){return pt(e)&&(e={overallReset:e,seriesType:tIe(e)}),e.uid=vv("stageHandler"),t&&(e.visualType=t),e},r}();function qMe(r){r.overallReset(r.ecModel,r.api,r.payload)}function YMe(r){return r.overallProgress&&ZMe}function ZMe(){this.agent.dirty(),this.getDownstream().dirty()}function XMe(){this.agent&&this.agent.dirty()}function KMe(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function QMe(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Qr(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?Ee(e,function(t,n){return sK(n)}):JMe}var JMe=sK(0);function sK(r){return function(e,t){var n=t.data,i=t.resetDefines[r];if(i&&i.dataEach)for(var a=e.start;a0&&d===u.length-h.length){var p=u.slice(0,d);p!=="data"&&(t.mainType=p,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:i}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,i,a));function c(f,h,d,p){return f[d]==null||h[p||d]===f[d]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),zM=["symbol","symbolSize","symbolRotate","symbolOffset"],a8=zM.concat(["symbolKeepAspect"]),iIe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Oh(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function VM(r,e,t){for(var n=e.type==="radial"?bIe(r,e,t):yIe(r,e,t),i=e.colorStops,a=0;a0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Mr(r)?[r]:De(r)?r:null}function DF(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&wIe(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var i=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(t=Ee(t,function(a){return a/i}),n/=i)}return[t,n]}var SIe=new $l(!0);function c2(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function o8(r){return typeof r=="string"&&r!=="none"}function f2(r){var e=r.fill;return e!=null&&e!=="none"}function s8(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function l8(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function GM(r,e,t){var n=Q3(e.image,e.__image,t);if(VA(n)){var i=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*Z_),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function AIe(r,e,t,n){var i,a=c2(t),o=f2(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||SIe,f=e.__dirty;if(!n){var h=t.fill,d=t.stroke,p=o&&!!h.colorStops,g=a&&!!d.colorStops,v=o&&!!h.image,m=a&&!!d.image,y=void 0,b=void 0,_=void 0,w=void 0,S=void 0;(p||g)&&(S=e.getBoundingRect()),p&&(y=f?VM(r,h,S):e.__canvasFillGradient,e.__canvasFillGradient=y),g&&(b=f?VM(r,d,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),v&&(_=f||!e.__canvasFillPattern?GM(r,h,e):e.__canvasFillPattern,e.__canvasFillPattern=_),m&&(w=f||!e.__canvasStrokePattern?GM(r,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=_),p?r.fillStyle=y:v&&(_?r.fillStyle=_:o=!1),g?r.strokeStyle=b:m&&(w?r.strokeStyle=w:a=!1)}var A=e.getGlobalScale();c.setScale(A[0],A[1],e.segmentIgnoreThreshold);var C,x;r.setLineDash&&t.lineDash&&(i=DF(e),C=i[0],x=i[1]);var D=!0;(u||f&vp)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),D=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),D&&c.rebuildPath(r,l?s:1),C&&(r.setLineDash(C),r.lineDashOffset=x),n||(t.strokeFirst?(a&&l8(r,t),o&&s8(r,t)):(o&&s8(r,t),a&&l8(r,t))),C&&r.setLineDash([])}function CIe(r,e,t){var n=e.__image=Q3(t.image,e.__image,e,e.onload);if(!(!n||!VA(n))){var i=t.x||0,a=t.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,i,a,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,h=s-c;r.drawImage(n,u,c,f,h,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function xIe(r,e,t){var n,i=t.text;if(i!=null&&(i+=""),i){r.font=t.font||ff,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var a=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=DF(e),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),t.strokeFirst?(c2(t)&&r.strokeText(i,t.x,t.y),f2(t)&&r.fillText(i,t.x,t.y)):(f2(t)&&r.fillText(i,t.x,t.y),c2(t)&&r.strokeText(i,t.x,t.y)),a&&r.setLineDash([])}}var u8=["shadowBlur","shadowOffsetX","shadowOffsetY"],c8=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function dK(r,e,t,n,i){var a=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){qa(r,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Zh.opacity:o}(n||e.blend!==t.blend)&&(a||(qa(r,i),a=!0),r.globalCompositeOperation=e.blend||Zh.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,i){if(!this[Zi]){if(this._disposed){this.id;return}var a,o,s;if(_t(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Zi]=!0,!this._model||n){var l=new Vke(this._api),u=this._theme,c=this._model=new bF;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},HM);var f={seriesTransition:s,optionChanged:!0};if(i)this[Pa]={silent:a,updateParams:f},this[Zi]=!1,this.getZr().wakeUp();else{try{Kd(this),ac.update.call(this,null,f)}catch(h){throw this[Pa]=null,this[Zi]=!1,h}this._ssr||this._zr.flush(),this[Pa]=null,this[Zi]=!1,em.call(this,a),tm.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||er.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(er.svgSupported){var t=this._zr,n=t.storage.getDisplayList();return B(n,function(i){i.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,i=this._model,a=[],o=this;B(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return B(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if($M[i]){var l=s,u=s,c=-s,f=-s,h=[],d=t&&t.pixelRatio||this.getDevicePixelRatio();B(l0,function(b,_){if(b.group===i){var w=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(wt(t)),S=b.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),c=o(S.right,c),f=o(S.bottom,f),h.push({dom:w,left:S.left,top:S.top})}}),l*=d,u*=d,c*=d,f*=d;var p=c-l,g=f-u,v=hf.createCanvas(),m=M5(v,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:g}),n){var y="";return B(h,function(b){var _=b.left-l,w=b.top-u;y+=''+b.dom+""}),m.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&m.painter.setBackgroundColor(t.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return t.connectedBackgroundColor&&m.add(new vr({shape:{x:0,y:0,width:p,height:g},style:{fill:t.connectedBackgroundColor}})),B(h,function(b){var _=new Pi({style:{x:b.left*d-l,y:b.top*d-u,image:b.dom}});m.add(_)}),m.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n){return PD(this,"convertToPixel",t,n)},e.prototype.convertFromPixel=function(t,n){return PD(this,"convertFromPixel",t,n)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var i=this._model,a,o=t0(i,t);return B(o,function(s,l){l.indexOf("Models")>=0&&B(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(t,n){var i=this._model,a=t0(i,t,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?xF(s,l,n):b1(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;B(XIe,function(n){var i=function(a){var o=t.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&Bh(s,function(p){var g=Ct(p);if(g&&g.dataIndex!=null){var v=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=v&&v.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=ye({},g.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var h=c&&f!=null&&o.getComponent(c,f),d=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=a,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:d},t.trigger(n,l)}};i.zrEventfulCallAtLast=!0,t._zr.on(n,i,t)}),B(s0,function(n,i){t._messageCenter.on(i,function(a){this.trigger(i,a)},t)}),B(["selectchanged"],function(n){t._messageCenter.on(n,function(i){this.trigger(n,i)},t)}),oIe(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&SZ(this.getDom(),kF,"");var n=this,i=n._api,a=n._model;B(n._componentsViews,function(o){o.dispose(a,i)}),B(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete l0[n.id]},e.prototype.resize=function(t){if(!this[Zi]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=t&&t.silent;this[Pa]&&(a==null&&(a=this[Pa].silent),i=!0,this[Pa]=null),this[Zi]=!0;try{i&&Kd(this),ac.update.call(this,{type:"resize",animation:ye({duration:0},t&&t.animation)})}catch(o){throw this[Zi]=!1,o}this[Zi]=!1,em.call(this,a),tm.call(this,a)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(_t(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!WM[t]){var i=WM[t](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=ye({},t);return n.type=s0[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(_t(n)||(n={silent:!!n}),!!h2[t.type]&&this._model){if(this[Zi]){this._pendingActions.push(t);return}var i=n.silent;ND.call(this,t,i);var a=n.flush;a?this._zr.flush():a!==!1&&er.browser.weChat&&this._throttledZrFlush(),em.call(this,i),tm.call(this,i)}},e.prototype.updateLabelLayout=function(){vs.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Kd=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),OD(f,!0),OD(f,!1),h.plan()},OD=function(f,h){for(var d=f._model,p=f._scheduler,g=h?f._componentsViews:f._chartsViews,v=h?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,b=0;bh.get("hoverLayerThreshold")&&!er.node&&!er.worker&&h.eachSeries(function(v){if(!v.preventUsingHoverLayer){var m=f._chartsMap[v.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(f,h){var d=f.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(f,h){if(!f.preventAutoZ){var d=f.get("z")||0,p=f.get("zlevel")||0;h.eachRendered(function(g){return l(g,d,p,-1/0),!0})}}function l(f,h,d,p){var g=f.getTextContent(),v=f.getTextGuideLine(),m=f.isGroup;if(m)for(var y=f.childrenRef(),b=0;b0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Kp(m))return;if(m instanceof Xt&&ATe(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=v;var b=m.getTextContent(),_=m.getTextGuideLine();b&&(b.stateTransition=v),_&&(_.stateTransition=v)}m.__dirty&&i(m)}})}A8=function(f){return new(function(h){de(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return f._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){Nu(p,g),ko(f)},d.prototype.leaveEmphasis=function(p,g){zu(p,g),ko(f)},d.prototype.enterBlur=function(p){zZ(p),ko(f)},d.prototype.leaveBlur=function(p){nF(p),ko(f)},d.prototype.enterSelect=function(p){VZ(p),ko(f)},d.prototype.leaveSelect=function(p){GZ(p),ko(f)},d.prototype.getModel=function(){return f.getModel()},d.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},d}(FX))(f)},TK=function(f){function h(d,p){for(var g=0;g=0)){x8.push(t);var a=oK.wrapStageHandler(t,i);a.__prio=e,a.__raw=t,r.push(a)}}function BK(r,e){WM[r]=e}function aLe(r,e,t){var n=OIe("registerMap");n&&n(r,e,t)}var oLe=yMe;Ld(EF,HMe);Ld(aC,WMe);Ld(aC,$Me);Ld(EF,iIe);Ld(aC,aIe);Ld(SK,FIe);LK(OX);FK(NIe,Qke);BK("default",jMe);Kl({type:Xh,event:Xh,update:Xh},qn);Kl({type:nw,event:nw,update:nw},qn);Kl({type:r0,event:r0,update:r0},qn);Kl({type:iw,event:iw,update:iw},qn);Kl({type:n0,event:n0,update:n0},qn);IK("light",rIe);IK("dark",cK);var D8=[],sLe={registerPreprocessor:LK,registerProcessor:FK,registerPostInit:tLe,registerPostUpdate:rLe,registerUpdateLifecycle:MF,registerAction:Kl,registerCoordinateSystem:nLe,registerLayout:iLe,registerVisual:Ld,registerTransform:oLe,registerLoading:BK,registerMap:aLe,registerImpl:BIe,PRIORITY:qIe,ComponentModel:rr,ComponentView:Tn,SeriesModel:pn,ChartView:rn,registerComponentModel:function(r){rr.registerClass(r)},registerComponentView:function(r){Tn.registerClass(r)},registerSeriesModel:function(r){pn.registerClass(r)},registerChartView:function(r){rn.registerClass(r)},registerSubTypeDefaulter:function(r,e){rr.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){HDe(r,e)}};function qt(r){if(De(r)){B(r,function(e){qt(e)});return}Ut(D8,r)>=0||(D8.push(r),pt(r)&&(r={install:r}),r.install(sLe))}function rm(r){return r==null?0:r.length||1}function E8(r){return r}var Vu=function(){function r(e,t,n,i,a,o){this._old=e,this._new=t,this._oldKeyGetter=n||E8,this._newKeyGetter=i||E8,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},i=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var d=0;d1)for(var s=0;s30}var nm=_t,oc=Ee,dLe=typeof Int32Array>"u"?Array:Int32Array,pLe="e\0\0",T8=-1,gLe=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],vLe=["_approximateExtent"],k8,Wb,im,am,UD,$b,HD,xa=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;PK(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=t)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===ls;if(l&&!i.pure)for(var u=[],c=e;c0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[t];return a==null&&(a=this.getVisual(t),De(a)?a=a.slice():nm(a)&&(a=ye({},a)),i[t]=a),a},r.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,nm(t)?ye(i,t):i[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){nm(e)?ye(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?ye(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;SM(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){B(this._graphicEls,function(n,i){n&&e&&e.call(t,n,i)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:oc(this.dimensions,this._getDimInfo,this),this.hostModel)),UD(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];pt(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return t.apply(this,[i].concat(V3(arguments)))})},r.internalField=function(){k8=function(e){var t=e._invertedIndicesMap;B(t,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=t[i]=new dLe(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[t]=l}}}(),r}();function _1(r,e){_F(r)||(r=wF(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],i=nt(),a=[],o=yLe(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&zK(o),l=n===r.dimensionsDefine,u=l?NK(r):RK(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=nt(c),h=new jX(o),d=0;d0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function yLe(r,e,t,n){var i=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return B(e,function(a){var o;_t(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function bLe(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var _Le=function(){function r(e){this.coordSysDims=[],this.axisMap=nt(),this.categoryAxisMap=nt(),this.coordSysName=e}return r}();function wLe(r){var e=r.get("coordinateSystem"),t=new _Le(e),n=SLe[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var SLe={cartesian2d:function(r,e,t,n){var i=r.getReferringComponents("xAxis",Qn).models[0],a=r.getReferringComponents("yAxis",Qn).models[0];e.coordSysDims=["x","y"],t.set("x",i),t.set("y",a),Qd(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Qd(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var i=r.getReferringComponents("singleAxis",Qn).models[0];e.coordSysDims=["single"],t.set("single",i),Qd(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var i=r.getReferringComponents("polar",Qn).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",o),Qd(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Qd(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();B(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];t.set(c,u),Qd(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Qd(r){return r.get("type")==="category"}function ALe(r,e,t){t=t||{};var n=t.byIndex,i=t.stackedCoordDimension,a,o,s;CLe(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,h;if(B(a,function(y,b){Ye(y)&&(a[b]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,g=0;B(a,function(y){y.coordDim===d&&g++});var v={name:f,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(h,p),m.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(v),o.appendCalculationDimension(m)):(a.push(v),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function CLe(r){return!PK(r.schema)}function vf(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function VK(r,e){return vf(r,e)?r.getCalculationInfo("stackResultDimension"):e}function xLe(r,e){var t=r.get("coordinateSystem"),n=y1.get(t),i;return e&&e.coordSysDims&&(i=Ee(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=p2(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function DLe(r,e,t){var n,i;return t&&B(r,function(a,o){var s=a.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function Xu(r,e,t){t=t||{};var n=e.getSourceManager(),i,a=!1;r?(a=!0,i=wF(r)):(i=n.getSource(),a=i.sourceFormat===ls);var o=wLe(e),s=xLe(e,o),l=t.useEncodeDefaulter,u=pt(l)?l:l?Lt(kX,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=_1(i,c),h=DLe(f.dimensions,t.createInvertedIndices,o),d=a?null:n.getSharedDataStore(f),p=ALe(e,{schema:f,store:d}),g=new xa(f,e);g.setCalculationInfo(p);var v=h!=null&&ELe(i)?function(m,y,b,_){return _===h?b:this.defaultDimValueGetter(m,y,b,_)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,v),g}function ELe(r){if(r.sourceFormat===ls){var e=TLe(r.data||[]);return!De(fv(e))}}function TLe(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();zA(Ql);var kLe=0,jM=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++kLe}return r.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&Ee(n,MLe);return new r({categories:i,needCollect:!i,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!Ye(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=this._getOrCreateMap();return t=i.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=nt(this.categories))},r}();function MLe(r){return _t(r)&&r.value!=null?r.value:r+""}function qM(r){return r.type==="interval"||r.type==="log"}function ILe(r,e,t,n){var i={},a=r[1]-r[0],o=i.interval=pZ(a/e);t!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=GK(o),l=i.niceTickExtent=[Wn(Math.ceil(r[0]/o)*o,s),Wn(Math.floor(r[1]/o)*o,s)];return LLe(l,r),i}function WD(r){var e=Math.pow(10,Y3(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Wn(t*e)}function GK(r){return Al(r)+2}function M8(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function LLe(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),M8(r,0,e),M8(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function oC(r,e){return r>=e[0]&&r<=e[1]}function sC(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function lC(r,e){return r*(e[1]-e[0])+e[0]}var uC=function(r){de(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new jM({})),De(i)&&(i=new jM({categories:Ee(i,function(a){return _t(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:Ye(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),oC(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),sC(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(lC(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,i=n[0];i<=n[1];)t.push({value:i}),i++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Ql);Ql.registerClass(uC);var eh=Wn,Gu=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return oC(t,this._extent)},e.prototype.normalize=function(t){return sC(t,this._extent)},e.prototype.scale=function(t){return lC(t,this._extent)},e.prototype.setExtent=function(t,n){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(t){var n=this._extent;t[0]n[1]&&(n[1]=t[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=GK(t)},e.prototype.getTicks=function(t){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var c=s.length?s[s.length-1].value:a[1];return i[1]>c&&(t?s.push({value:eh(c+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&d0&&(a=a===null?s:Math.min(a,s))}t[n]=a}}return t}function WK(r){var e=OLe(r),t=[];return B(r,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=We(n.get("barWidth"),s),g=We(n.get("barMaxWidth"),s),v=We(n.get("barMinWidth")||(ZK(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:v,barGap:m,barCategoryGap:y,axisKey:FF(a),stackId:LF(n)})}),$K(t)}function $K(r){var e={};B(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return B(e,function(n,i){t[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=nr(a).length;s=Math.max(35-l*4,15)+"%"}var u=We(s,o),c=We(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,d=(f-u)/(h+(h-1)*c);d=Math.max(d,0),B(a,function(m){var y=m.maxWidth,b=m.minWidth;if(m.width){var _=m.width;y&&(_=Math.min(_,y)),b&&(_=Math.max(_,b)),m.width=_,f-=_+c*_,h--}else{var _=d;y&&y<_&&(_=Math.min(y,f)),b&&b>_&&(_=b),_!==d&&(m.width=_,f-=_+c*_,h--)}}),d=(f-u)/(h+(h-1)*c),d=Math.max(d,0);var p=0,g;B(a,function(m,y){m.width||(m.width=d),g=m,p+=m.width*(1+c)}),g&&(p-=g.width*c);var v=-p/2;B(a,function(m,y){t[i][y]=t[i][y]||{bandWidth:o,offset:v,width:m.width},v+=m.width*(1+c)})}),t}function PLe(r,e,t){if(r&&e){var n=r[FF(e)];return n!=null&&t!=null?n[LF(t)]:n}}function jK(r,e){var t=HK(r,e),n=WK(t);B(t,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=LF(i),u=n[FF(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function qK(r){return{seriesType:r,plan:_v(),reset:function(e){if(YK(e)){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(a.dim)),s=t.getDimensionIndex(t.mapDimension(i.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),f=vf(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=RLe(i,a),p=ZK(e),g=e.get("barMinHeight")||0,v=c&&t.getDimensionIndex(c),m=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(b,_){for(var w=b.count,S=p&&xl(w*3),A=p&&l&&xl(w*3),C=p&&xl(w),x=n.master.getRect(),D=h?x.width:x.height,E,T=_.getStore(),k=0;(E=b.next())!=null;){var M=T.get(f?v:o,E),L=T.get(s,E),F=d,U=void 0;f&&(U=+M-T.get(o,E));var N=void 0,$=void 0,H=void 0,P=void 0;if(h){var te=n.dataToPoint([M,L]);if(f){var J=n.dataToPoint([U,L]);F=J[0]}N=F,$=te[1]+y,H=te[0]-F,P=m,Math.abs(H)0?t:1:t))}var NLe=function(r,e,t,n){for(;t>>1;r[i][1]i&&(this._approxInterval=i);var s=jb.length,l=Math.min(NLe(jb,this._approxInterval,0,s),s-1);this._interval=jb[l][1],this._minLevelUnit=jb[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Mr(t)?t:+Wl(t)},e.prototype.contain=function(t){return oC(this.parse(t),this._extent)},e.prototype.normalize=function(t){return sC(this.parse(t),this._extent)},e.prototype.scale=function(t){return lC(t,this._extent)},e.type="time",e}(Gu),jb=[["second",hF],["minute",dF],["hour",a0],["quarter-day",a0*6],["half-day",a0*12],["day",Zo*1.2],["half-week",Zo*3.5],["week",Zo*7],["month",Zo*31],["quarter",Zo*95],["half-year",_N/2],["year",_N]];function zLe(r,e,t,n){var i=Wl(e),a=Wl(t),o=function(p){return SN(i,p,n)===SN(a,p,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},h=function(){return f()&&o("second")},d=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return h();case"millisecond":return d()}}function VLe(r,e){return r/=Zo,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function GLe(r){var e=30*Zo;return r/=e,r>6?6:r>3?3:r>2?2:1}function ULe(r){return r/=a0,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function I8(r,e){return r/=e?dF:hF,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function HLe(r){return pZ(r)}function WLe(r,e,t){var n=new Date(r);switch(Jp(e)){case"year":case"month":n[pX(t)](0);case"day":n[gX(t)](1);case"hour":n[vX(t)](0);case"minute":n[mX(t)](0);case"second":n[yX(t)](0),n[bX(t)](0)}return n.getTime()}function $Le(r,e,t,n){var i=1e4,a=hX,o=0;function s(D,E,T,k,M,L,F){for(var U=new Date(E),N=E,$=U[k]();N1&&L===0&&T.unshift({value:T[0].value-N})}}for(var L=0;L=n[0]&&y<=n[1]&&f++)}var b=(n[1]-n[0])/e;if(f>b*1.5&&h>b/1.5||(u.push(v),f>b||r===a[d]))break}c=[]}}}for(var _=Xr(Ee(u,function(D){return Xr(D,function(E){return E.value>=n[0]&&E.value<=n[1]&&!E.notAdd})}),function(D){return D.length>0}),w=[],S=_.length-1,d=0;d<_.length;++d)for(var A=_[d],C=0;C0;)a*=10;var s=[Wn(YLe(n[0]/a)*a),Wn(qLe(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){u0.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=hs(t)/hs(this.base),oC(t,this._extent)},e.prototype.normalize=function(t){return t=hs(t)/hs(this.base),sC(t,this._extent)},e.prototype.scale=function(t){return t=lC(t,this._extent),qb(this.base,t)},e.type="log",e}(Ql),XK=OF.prototype;XK.getMinorTicks=u0.getMinorTicks;XK.getLabel=u0.getLabel;function Yb(r,e){return jLe(r,Al(e))}Ql.registerClass(OF);var ZLe=function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[KLe[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=XLe[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),XLe={min:"_determinedMin",max:"_determinedMax"},KLe={min:"_dataMin",max:"_dataMax"};function KK(r,e,t){var n=r.rawExtentInfo;return n||(n=new ZLe(r,e,t),r.rawExtentInfo=n,n)}function Zb(r,e){return e==null?null:ly(e)?NaN:r.parse(e)}function QK(r,e){var t=r.type,n=KK(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&t==="time"){var s=HK("bar",o),l=!1;if(B(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=WK(s),c=QLe(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function QLe(r,e,t,n){var i=t.axis.getExtent(),a=i[1]-i[0],o=PLe(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;B(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;B(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/a,h=c/f-c;return e+=h*(l/u),r-=h*(s/u),{min:r,max:e}}function Vg(r,e){var t=e,n=QK(r,t),i=n.extent,a=t.get("splitNumber");r instanceof OF&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function cC(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new uC({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new BF({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Ql.getClass(e)||Gu)}}function JLe(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Av(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(i,a){return r.scale.getFormattedLabel(i,a,n)}}(e):Ye(e)?function(n){return function(i){var a=r.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):pt(e)?function(n){return function(i,a){return t!=null&&(a=i.value-t),n(PF(r,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return r.scale.getLabel(n)}}function PF(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function e3e(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var n,i,a=t.getExtent();t instanceof uC?i=t.count():(n=t.getTicks(),i=n.length);var o=r.getLabelModel(),s=Av(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;cr[1]&&(r[1]=i[1])})}var w1=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),n3e=1e-8;function F8(r,e){return Math.abs(r-e)i&&(n=o,i=l)}if(n)return a3e(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return B(o,function(s){s.type==="polygon"?B8(s.exterior,i,a,t):B(s.points,function(l){B8(l,i,a,t)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Nt(i[0],i[1],a[0]-i[0],a[1]-i[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/t,l/t])}return n}function l3e(r,e){return r=s3e(r),Ee(Xr(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,i=t.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new O8(o[0],o.slice(1)));break;case"MultiPolygon":B(i.coordinates,function(l){l[0]&&a.push(new O8(l[0],l.slice(1)))});break;case"LineString":a.push(new P8([i.coordinates]));break;case"MultiLineString":a.push(new P8(i.coordinates))}var s=new tQ(n[e||"name"],a,n.cp);return s.properties=n,s})}var Ay=yr();function nQ(r,e){var t=Ee(e,function(n){return r.scale.parse(n)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function u3e(r){var e=r.getLabelModel().get("customValues");if(e){var t=Av(r);return{labels:nQ(r,e).map(function(n){var i={value:n};return{formattedLabel:t(i),rawLabel:r.scale.getLabel(i),tickValue:n}})}}return r.type==="category"?f3e(r):d3e(r)}function c3e(r,e){var t=r.getTickModel().get("customValues");return t?{ticks:nQ(r,t)}:r.type==="category"?h3e(r,e):{ticks:Ee(r.scale.getTicks(),function(n){return n.value})}}function f3e(r){var e=r.getLabelModel(),t=iQ(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function iQ(r,e){var t=aQ(r,"labels"),n=RF(e),i=oQ(t,n);if(i)return i;var a,o;return pt(n)?a=uQ(r,n):(o=n==="auto"?p3e(r):n,a=lQ(r,o)),sQ(t,n,{labels:a,labelCategoryInterval:o})}function h3e(r,e){var t=aQ(r,"ticks"),n=RF(e),i=oQ(t,n);if(i)return i;var a,o;if((!e.get("show")||r.scale.isBlank())&&(a=[]),pt(n))a=uQ(r,n,!0);else if(n==="auto"){var s=iQ(r,r.getLabelModel());o=s.labelCategoryInterval,a=Ee(s.labels,function(l){return l.tickValue})}else o=n,a=lQ(r,o,!0);return sQ(t,n,{ticks:a,tickCategoryInterval:o})}function d3e(r){var e=r.scale.getTicks(),t=Av(r);return{labels:Ee(e,function(n,i){return{level:n.level,formattedLabel:t(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function aQ(r,e){return Ay(r)[e]||(Ay(r)[e]=[])}function oQ(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(n)),f=Math.abs(u*Math.sin(n)),h=0,d=0;l<=a[1];l+=s){var p=0,g=0,v=c1(t({value:l}),e.font,"center","top");p=v.width*1.3,g=v.height*1.3,h=Math.max(h,p,7),d=Math.max(d,g,7)}var m=h/c,y=d/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(m,y))),_=Ay(r.model),w=r.getExtent(),S=_.lastAutoInterval,A=_.lastTickCount;return S!=null&&A!=null&&Math.abs(S-b)<=1&&Math.abs(A-o)<=1&&S>b&&_.axisExtent0===w[0]&&_.axisExtent1===w[1]?b=S:(_.lastTickCount=o,_.lastAutoInterval=b,_.axisExtent0=w[0],_.axisExtent1=w[1]),b}function v3e(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function lQ(r,e,t){var n=Av(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=JK(r),h=o.get("showMinLabel")||f,d=o.get("showMaxLabel")||f;h&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);d&&p-l!==a[1]&&g(a[1]);function g(v){var m={value:v};s.push(t?v:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:v})}return s}function uQ(r,e,t){var n=r.scale,i=Av(r),a=[];return B(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(t?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var R8=[0,1],Ws=function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return hZ(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),N8(n,i.count())),Yr(e,R8,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),N8(n,i.count()));var a=Yr(e,n,R8,t);return this.scale.scale(a)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=c3e(this,t),i=n.ticks,a=Ee(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return m3e(this,a,o,e.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),i=Ee(n,function(a){return Ee(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return u3e(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(){return g3e(this)},r}();function N8(r,e){var t=r[1]-r[0],n=e,i=t/n/2;r[0]+=i,r[1]-=i}function m3e(r,e,t,n){var i=e.length;if(!r.onBand||t||!i)return;var a=r.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;B(e,function(d){d.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var f=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(d,p){return d=Wn(d),p=Wn(p),f?d>p:di&&(i+=om);var d=Math.atan2(s,o);if(d<0&&(d+=om),d>=n&&d<=i||d+om>=n&&d+om<=i)return l[0]=c,l[1]=f,u-t;var p=t*Math.cos(n)+r,g=t*Math.sin(n)+e,v=t*Math.cos(i)+r,m=t*Math.sin(i)+e,y=(p-o)*(p-o)+(g-s)*(g-s),b=(v-o)*(v-o)+(m-s)*(m-s);return y0){e=e/180*Math.PI,Ds.fromArray(r[0]),un.fromArray(r[1]),jn.fromArray(r[2]),Ot.sub(Dl,Ds,un),Ot.sub(yl,jn,un);var t=Dl.len(),n=yl.len();if(!(t<.001||n<.001)){Dl.scale(1/t),yl.scale(1/n);var i=Dl.dot(yl),a=Math.cos(e);if(a1&&Ot.copy(ya,jn),ya.toArray(r[1])}}}}function A3e(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Ds.fromArray(r[0]),un.fromArray(r[1]),jn.fromArray(r[2]),Ot.sub(Dl,un,Ds),Ot.sub(yl,jn,un);var n=Dl.len(),i=yl.len();if(!(n<.001||i<.001)){Dl.scale(1/n),yl.scale(1/i);var a=Dl.dot(e),o=Math.cos(t);if(a=l)Ot.copy(ya,jn);else{ya.scaleAndAdd(yl,s/Math.tan(Math.PI/2-c));var f=jn.x!==un.x?(ya.x-un.x)/(jn.x-un.x):(ya.y-un.y)/(jn.y-un.y);if(isNaN(f))return;f<0?Ot.copy(ya,un):f>1&&Ot.copy(ya,jn)}ya.toArray(r[1])}}}}function qD(r,e,t,n){var i=t==="normal",a=i?r:r.ensureState(t);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?r.useStyle(s):a.style=s}function C3e(r,e){var t=e.smooth,n=e.points;if(n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var i=Bc(n[0],n[1]),a=Bc(n[1],n[2]);if(!i||!a){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*t,s=K_([],n[1],n[0],o/i),l=K_([],n[1],n[2],o/a),u=K_([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0&&a&&w(-c/o,0,o);var g=r[0],v=r[o-1],m,y;b(),m<0&&S(-m,.8),y<0&&S(y,.8),b(),_(m,y,1),_(y,m,-1),b(),m<0&&A(-m),y<0&&A(y);function b(){m=g.rect[e]-n,y=i-v.rect[e]-v.rect[t]}function _(C,x,D){if(C<0){var E=Math.min(x,-C);if(E>0){w(E*D,0,o);var T=E+C;T<0&&S(-T*D,1)}else S(-C*D,1)}}function w(C,x,D){C!==0&&(u=!0);for(var E=x;E0)for(var T=0;T0;T--){var F=D[T-1]*L;w(-F,T,o)}}}function A(C){var x=C<0?-1:1;C=Math.abs(C);for(var D=Math.ceil(C/(o-1)),E=0;E0?w(D,0,E+1):w(-D,o-E-1,o),C-=D,C<=0)return}return u}function x3e(r,e,t,n){return dQ(r,"x","width",e,t,n)}function pQ(r,e,t,n){return dQ(r,"y","height",e,t,n)}function gQ(r){var e=[];r.sort(function(g,v){return v.priority-g.priority});var t=new Nt(0,0,0,0);function n(g){if(!g.ignore){var v=g.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}g.ignore=!0}for(var i=0;i=0&&n.attr(a.oldLayoutSelect),Ut(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Lr(n,u,t,l)}else if(n.attr(u),!gv(n).valueAnimation){var f=Mt(n.style.opacity,1);n.style.opacity=0,Sn(n,{style:{opacity:f}},t,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};Xb(d,u,Kb),Xb(d,n.states.select,Kb)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};Xb(p,u,Kb),Xb(p,n.states.emphasis,Kb)}sX(n,l,c,t,t)}if(i&&!i.ignore&&!i.invisible){var a=T3e(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Lr(i,{shape:g},t)):(i.setShape(g),i.style.strokePercent=0,Sn(i,{style:{strokePercent:1}},t)),a.oldLayout=g}},r}(),ZD=yr();function M3e(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var i=ZD(t).labelManager;i||(i=ZD(t).labelManager=new k3e),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var i=ZD(t).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})}var XD=Math.sin,KD=Math.cos,vQ=Math.PI,rh=Math.PI*2,I3e=180/vQ,mQ=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,i,a,o){this._add("C",e,t,n,i,a,o)},r.prototype.quadraticCurveTo=function(e,t,n,i){this._add("Q",e,t,n,i)},r.prototype.arc=function(e,t,n,i,a,o){this.ellipse(e,t,n,n,0,i,a,o)},r.prototype.ellipse=function(e,t,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=zc(f-rh)||(c?u>=rh:-u>=rh),d=u>0?u%rh:u%rh+rh,p=!1;h?p=!0:zc(f)?p=!1:p=d>=vQ==!!c;var g=e+n*KD(o),v=t+i*XD(o);this._start&&this._add("M",g,v);var m=Math.round(a*I3e);if(h){var y=1/this._p,b=(c?1:-1)*(rh-y);this._add("A",n,i,m,1,+c,e+n*KD(o+b),t+i*XD(o+b)),y>.01&&this._add("A",n,i,m,0,+c,g,v)}else{var _=e+n*KD(s),w=t+i*XD(s);this._add("A",n,i,m,+p,+c,_,w)}},r.prototype.rect=function(e,t,n,i){this._add("M",e,t),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h"}function V3e(r){return""}function GF(r,e){e=e||{};var t=e.newline?` +`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return z3e(o,s)+(o!=="style"?Ha(l):l||"")+(a?""+t+Ee(a,function(u){return n(u)}).join(t)+t:"")+V3e(o)}return n(r)}function G3e(r,e,t){t=t||{};var n=t.newline?` +`:"",i=" {"+n,a=n+"}",o=Ee(nr(r),function(l){return l+i+Ee(nr(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+a}).join(n),s=Ee(nr(e),function(l){return"@keyframes "+l+i+Ee(nr(e[l]),function(u){return u+i+Ee(nr(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function XM(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function U8(r,e,t,n){return mi("svg","root",{width:r,height:e,xmlns:yQ,"xmlns:xlink":bQ,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var U3e=0;function wQ(){return U3e++}var H8={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},lh="transform-origin";function H3e(r,e,t){var n=ye({},r.shape);ye(n,e),r.buildPath(t,n);var i=new mQ;return i.reset(nZ(r)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function W3e(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[lh]=t+"px "+n+"px")}var $3e={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function SQ(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function j3e(r,e,t){var n=r.shape.paths,i={},a,o;if(B(n,function(l){var u=XM(t.zrId);u.animation=!0,fC(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=nr(c),d=h.length;if(d){o=h[d-1];var p=c[o];for(var g in p){var v=p[g];i[g]=i[g]||{d:""},i[g].d+=v.d||""}for(var m in f){var y=f[m].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){e.d=!1;var s=SQ(i,t);return a.replace(o,s)}}function W8(r){return Ye(r)?H8[r]?"cubic-bezier("+H8[r]+")":$3(r)?r:"":""}function fC(r,e,t,n){var i=r.animators,a=i.length,o=[];if(r instanceof oF){var s=j3e(r,e,t);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Se=SQ(A,t);return Se+" "+y[0]+" both"}}for(var v in l){var s=g(l[v]);s&&o.push(s)}if(o.length){var m=t.zrId+"-cls-"+wQ();t.cssNodes["."+m]={animation:o.join(",")},e.class=m}}function q3e(r,e,t){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};$8(n,e,t)}else{var i=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},a=i.fill;if(!a){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(a=sM(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),$8(n,e,t)}}function $8(r,e,t,n){var i=JSON.stringify(r),a=t.cssStyleCache[i];a||(a=t.zrId+"-cls-"+wQ(),t.cssStyleCache[i]=a,t.cssNodes["."+a+":hover"]=r),e.class=e.class?e.class+" "+a:a}var Cy=Math.round;function AQ(r){return r&&Ye(r.src)}function CQ(r){return r&&pt(r.toDataURL)}function UF(r,e,t,n){P3e(function(i,a){var o=i==="fill"||i==="stroke";o&&rZ(a)?DQ(e,r,i,n):o&&j3(a)?EQ(t,r,i,n):o&&a==="none"?r[i]="transparent":r[i]=a},e,t,!1),eFe(t,r,n)}function HF(r,e){var t=WDe(e);t&&(t.each(function(n,i){n!=null&&(r[(G8+i).toLowerCase()]=n+"")}),e.isSilent()&&(r[G8+"silent"]="true"))}function j8(r){return zc(r[0]-1)&&zc(r[1])&&zc(r[2])&&zc(r[3]-1)}function Y3e(r){return zc(r[4])&&zc(r[5])}function WF(r,e,t){if(e&&!(Y3e(e)&&j8(e))){var n=1e4;r.transform=j8(e)?"translate("+Cy(e[4]*n)/n+" "+Cy(e[5]*n)/n+")":dDe(e)}}function q8(r,e,t){for(var n=r.points,i=[],a=0;a"u"){var v="Image width/height must been given explictly in svg-ssr renderer.";ka(h,v),ka(d,v)}else if(h==null||d==null){var m=function(D,E){if(D){var T=D.elm,k=h||E.width,M=d||E.height;D.tag==="pattern"&&(u?(M=1,k/=a.width):c&&(k=1,M/=a.height)),D.attrs.width=k,D.attrs.height=M,T&&(T.setAttribute("width",k),T.setAttribute("height",M))}},y=Q3(p,null,r,function(D){l||m(S,D),m(f,D)});y&&y.width&&y.height&&(h=h||y.width,d=d||y.height)}f=mi("image","img",{href:p,width:h,height:d}),o.width=h,o.height=d}else i.svgElement&&(f=wt(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var b,_;l?b=_=1:u?(_=1,b=o.width/a.width):c?(b=1,_=o.height/a.height):o.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(o.width=b),_!=null&&!isNaN(_)&&(o.height=_);var w=iZ(i);w&&(o.patternTransform=w);var S=mi("pattern","",o,[f]),A=GF(S),C=n.patternCache,x=C[A];x||(x=n.zrId+"-p"+n.patternIdx++,C[A]=x,o.id=x,S=n.defs[x]=mi("pattern",x,o,[f])),e[t]=PA(x)}}function tFe(r,e,t){var n=t.clipPathCache,i=t.defs,a=n[r.id];if(!a){a=t.zrId+"-c"+t.clipPathIdx++;var o={id:a};n[r.id]=a,i[a]=mi("clipPath",a,o,[xQ(r,t)])}e["clip-path"]=PA(a)}function X8(r){return document.createTextNode(r)}function bh(r,e,t){r.insertBefore(e,t)}function K8(r,e){r.removeChild(e)}function Q8(r,e){r.appendChild(e)}function TQ(r){return r.parentNode}function kQ(r){return r.nextSibling}function QD(r,e){r.textContent=e}var J8=58,rFe=120,nFe=mi("","");function KM(r){return r===void 0}function sl(r){return r!==void 0}function iFe(r,e,t){for(var n={},i=e;i<=t;++i){var a=r[i].key;a!==void 0&&(n[a]=i)}return n}function Rm(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function xy(r){var e,t=r.children,n=r.tag;if(sl(n)){var i=r.elm=_Q(n);if($F(nFe,r),De(t))for(e=0;ea?(p=t[l+1]==null?null:t[l+1].elm,MQ(r,p,t,i,l)):y2(r,e,n,a))}function yp(r,e){var t=e.elm=r.elm,n=r.children,i=e.children;r!==e&&($F(r,e),KM(e.text)?sl(n)&&sl(i)?n!==i&&aFe(t,n,i):sl(i)?(sl(r.text)&&QD(t,""),MQ(t,null,i,0,i.length-1)):sl(n)?y2(t,n,0,n.length-1):sl(r.text)&&QD(t,""):r.text!==e.text&&(sl(n)&&y2(t,n,0,n.length-1),QD(t,e.text)))}function oFe(r,e){if(Rm(r,e))yp(r,e);else{var t=r.elm,n=TQ(t);xy(e),n!==null&&(bh(n,e.elm,kQ(t)),y2(n,[r],0,0))}return e}var sFe=0,lFe=function(){function r(e,t,n){if(this.type="svg",this.refreshHover=e6(),this.configLayer=e6(),this.storage=t,this._opts=n=ye({},n),this.root=e,this._id="zr"+sFe++,this._oldVNode=U8(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=_Q("svg");$F(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",oFe(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return Z8(e,XM(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=XM(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis;var o=[],s=this._bgVNode=uFe(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=mi("g","main",{},[]);this._paintList(t,a,l?l.children:o),l&&o.push(l);var u=Ee(nr(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(mi("defs","defs",{},u)),e.animation){var c=G3e(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=mi("style","stl",{},[],c);o.push(f)}}return U8(n,i,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},GF(this.renderToVNode({animation:Mt(e.cssAnimation,!0),emphasis:Mt(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Mt(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(h&&l&&h[g]===l[g]);g--);for(var v=p-1;v>g;v--)o--,s=a[o-1];for(var m=g+1;m=s)}}for(var f=this.__startIndex;f15)break}}M.prevElClipPaths&&m.restore()};if(y)if(y.length===0)C=v.__endIndex;else for(var D=d.dpr,E=0;E0&&e>i[0]){for(l=0;le);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,i=0;i0?Qb:0),this._needsManuallyCompositing),c.__builtin__||N3("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),a=c),i.__dirty&ho&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,B(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Rt(n[e],t,!0):n[e]=t;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(pn);function Gg(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var i=Ng(r,e,t[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var S1=function(r){de(e,r);function e(t,n,i,a){var o=r.call(this)||this;return o.updateData(t,n,i,a),o}return e.prototype._createSymbol=function(t,n,i,a,o){this.removeAll();var s=Jn(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=mFe,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Nu(this.childAt(0))},e.prototype.downplay=function(){zu(this.childAt(0))},e.prototype.setZ=function(t,n){var i=this.childAt(0);i.zlevel=t,i.z=n},e.prototype.setDraggable=function(t,n){var i=this.childAt(0);i.draggable=t,i.cursor=!n&&t?"move":i.cursor},e.prototype.updateData=function(t,n,i,a){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=o!==this._symbolType,c=a&&a.disableAnimation;if(u){var f=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,f)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(d):Lr(h,d,s,n),zs(h)}if(this._updateCommon(t,n,l,i,a),u){var h=this.childAt(0);if(!c){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Sn(h,d,s,n)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,i,a,o){var s=this.childAt(0),l=t.hostModel,u,c,f,h,d,p,g,v,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,d=a.blurScope,g=a.labelStatesModels,v=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||t.hasItemOption){var y=a&&a.itemModel?a.itemModel:t.getItemModel(n),b=y.getModel("emphasis");u=b.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),h=b.get("focus"),d=b.get("blurScope"),p=b.get("disabled"),g=wi(y),v=b.getShallow("scale"),m=y.getShallow("cursor")}var _=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var w=Id(t.getItemVisual(n,"symbolOffset"),i);w&&(s.x=w[0],s.y=w[1]),m&&s.attr("cursor",m);var S=t.getItemVisual(n,"style"),A=S.fill;if(s instanceof Pi){var C=s.style;s.useStyle(ye({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},S))}else s.__isEmptyBrush?s.useStyle(ye({},S)):s.useStyle(S),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var x=t.getItemVisual(n,"liftZ"),D=this._z2;x!=null?D==null&&(this._z2=s.z2,s.z2+=x):D!=null&&(s.z2=D,this._z2=null);var E=o&&o.useNameLabel;$i(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:T,inheritColor:A,defaultOpacity:S.opacity});function T(L){return E?t.getName(L):Gg(t,L)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var k=s.ensureState("emphasis");k.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var M=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;k.scaleX=this._sizeX*M,k.scaleY=this._sizeY*M,this.setSymbolScale(1),Rn(this,h,d,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,i){var a=this.childAt(0),o=Ct(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&pf(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();pf(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return Sv(t.getItemVisual(n,"symbolSize"))},e}(At);function mFe(r,e){this.parent.drift(r,e)}function eE(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function n6(r){return r!=null&&!_t(r)&&(r={isIgnore:r}),r||{}}function i6(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:wi(e),cursorStyle:e.get("cursor")}}var A1=function(){function r(e){this.group=new At,this._SymbolCtor=e||S1}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=n6(t);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=i6(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var h=c(f);if(eE(e,h,f,t)){var d=new o(e,f,l,u);d.setPosition(h),e.setItemGraphicEl(f,d),n.add(d)}}).update(function(f,h){var d=a.getItemGraphicEl(h),p=c(f);if(!eE(e,p,f,t)){n.remove(d);return}var g=e.getItemVisual(f,"symbol")||"circle",v=d&&d.getSymbolType&&d.getSymbolType();if(!d||v&&v!==g)n.remove(d),d=new o(e,f,l,u),d.setPosition(p);else{d.updateData(e,f,l,u);var m={x:p[0],y:p[1]};s?d.attr(m):Lr(d,m,i)}n.add(d),e.setItemGraphicEl(f,d)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=i6(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=n6(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?t=n[0]:n[1]<0&&(t=n[1]),t}function FQ(r,e,t,n){var i=NaN;r.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=t.get(r.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function bFe(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,i){t.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function _Fe(r,e,t,n,i,a,o,s){for(var l=bFe(r,e),u=[],c=[],f=[],h=[],d=[],p=[],g=[],v=LQ(i,e,o),m=r.getLayout("points")||[],y=e.getLayout("points")||[],b=0;b=i||g<0)break;if(ed(m,y)){if(l){g+=a;continue}break}if(g===t)r[a>0?"moveTo":"lineTo"](m,y),f=m,h=y;else{var b=m-u,_=y-c;if(b*b+_*_<.5){g+=a;continue}if(o>0){for(var w=g+a,S=e[w*2],A=e[w*2+1];S===m&&A===y&&v=n||ed(S,A))d=m,p=y;else{D=S-u,E=A-c;var M=m-u,L=S-m,F=y-c,U=A-y,N=void 0,$=void 0;if(s==="x"){N=Math.abs(M),$=Math.abs(L);var H=D>0?1:-1;d=m-H*N*o,p=y,T=m+H*$*o,k=y}else if(s==="y"){N=Math.abs(F),$=Math.abs(U);var P=E>0?1:-1;d=m,p=y-P*N*o,T=m,k=y+P*$*o}else N=Math.sqrt(M*M+F*F),$=Math.sqrt(L*L+U*U),x=$/($+N),d=m-D*o*(1-x),p=y-E*o*(1-x),T=m+D*o*x,k=y+E*o*x,T=sc(T,lc(S,m)),k=sc(k,lc(A,y)),T=lc(T,sc(S,m)),k=lc(k,sc(A,y)),D=T-m,E=k-y,d=m-D*N/$,p=y-E*N/$,d=sc(d,lc(u,m)),p=sc(p,lc(c,y)),d=lc(d,sc(u,m)),p=lc(p,sc(c,y)),D=m-d,E=y-p,T=m+D*$/N,k=y+E*$/N}r.bezierCurveTo(f,h,d,p,m,y),f=T,h=k}else r.lineTo(m,y)}u=m,c=y,g+=a}return v}var BQ=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),wFe=function(r){de(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new BQ},e.prototype.buildPath=function(t,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&ed(i[o*2-2],i[o*2-1]);o--);for(;a=0){var _=u?(p-l)*b+l:(d-s)*b+s;return u?[t,_]:[_,t]}s=d,l=p;break;case o.C:d=a[f++],p=a[f++],g=a[f++],v=a[f++],m=a[f++],y=a[f++];var w=u?qS(s,d,g,m,t,c):qS(l,p,v,y,t,c);if(w>0)for(var S=0;S=0){var _=u?ci(l,p,v,y,A):ci(s,d,g,m,A);return u?[t,_]:[_,t]}}s=m,l=y;break}}},e}(Xt),SFe=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(BQ),OQ=function(r){de(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new SFe},e.prototype.buildPath=function(t,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&ed(i[s*2-2],i[s*2-1]);s--);for(;oe){a?t.push(o(a,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),a=l}return t}function xFe(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=Ee(a.stops,function(b){return{coord:l.toGlobalCoord(l.dataToCoord(b.value)),color:b.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=CFe(u,i==="x"?t.getWidth():t.getHeight()),d=h.length;if(!d&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,g=h[0].coord-p,v=h[d-1].coord+p,m=v-g;if(m<.001)return"transparent";B(h,function(b){b.offset=(b.coord-g)/m}),h.push({offset:d?h[d-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:f[0]||"transparent"});var y=new g1(0,0,0,0,h,!0);return y[i]=g,y[i+"2"]=v,y}}}function DFe(r,e,t){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(i&&EFe(a,e))){var o=e.mapDimension(a.dim),s={};return B(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function EFe(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function TFe(r,e){return isNaN(r)||isNaN(e)}function kFe(r){for(var e=r.length/2;e>0&&TFe(r[e*2-2],r[e*2-1]);e--);return e-1}function u6(r,e){return[r[e*2],r[e*2+1]]}function MFe(r,e,t){for(var n=r.length/2,i=t==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function NQ(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var H=g.getState("emphasis").style;H.lineWidth=+g.style.lineWidth+1}Ct(g).seriesIndex=t.seriesIndex,Rn(g,U,N,$);var P=l6(t.get("smooth")),te=t.get("smoothMonotone");if(g.setShape({smooth:P,smoothMonotone:te,connectNulls:C}),v){var J=l.getCalculationInfo("stackedOnSeries"),fe=0;v.useStyle(mt(c.getAreaStyle(),{fill:k,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),J&&(fe=l6(J.get("smooth"))),v.setShape({smooth:P,stackedOnSmooth:fe,smoothMonotone:te,connectNulls:C}),Wi(v,t,"areaStyle"),Ct(v).seriesIndex=t.seriesIndex,Rn(v,U,N,$)}var Ce=function(ke){a._changePolyState(ke)};l.eachItemGraphicEl(function(ke){ke&&(ke.onHoverStateChange=Ce)}),this._polyline.onHoverStateChange=Ce,this._data=l,this._coordSys=o,this._stackedOnPoints=S,this._points=f,this._step=E,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,g),v&&this.packEventData(t,v))},e.prototype.packEventData=function(t,n){Ct(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,i,a){var o=t.getData(),s=hd(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=t.get("zlevel")||0,d=t.get("z")||0;u=new S1(o,s),u.x=c,u.y=f,u.setZ(h,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else rn.prototype.highlight.call(this,t,n,i,a)},e.prototype.downplay=function(t,n,i,a){var o=t.getData(),s=hd(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else rn.prototype.downplay.call(this,t,n,i,a)},e.prototype._changePolyState=function(t){var n=this._polygon;e2(this._polyline,t),n&&e2(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new wFe({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new OQ({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");pt(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=pt(f)?f(null):f;t.eachItemGraphicEl(function(d,p){var g=d;if(g){var v=[d.x,d.y],m=void 0,y=void 0,b=void 0;if(i)if(o){var _=i,w=n.pointToCoord(v);a?(m=_.startAngle,y=_.endAngle,b=-w[1]/180*Math.PI):(m=_.r0,y=_.r,b=w[0])}else{var S=i;a?(m=S.x,y=S.x+S.width,b=d.x):(m=S.y+S.height,y=S.y,b=d.y)}var A=y===m?0:(b-m)/(y-m);l&&(A=1-A);var C=pt(f)?f(p):c*A+h,x=g.getSymbolPath(),D=x.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:C}),x.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,i){var a=t.getModel("endLabel");if(NQ(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Ar({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=kFe(l);c>=0&&($i(s,wi(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:c,defaultText:function(f,h,d){return d!=null?IQ(o,d):Gg(o,f)},enableTextSetter:!0},IFe(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,v=l.getBaseAxis(),m=v.isHorizontal(),y=v.inverse,b=n.shape,_=y?m?b.x:b.y+b.height:m?b.x+b.width:b.y,w=(m?g:0)*(y?-1:1),S=(m?0:-g)*(y?-1:1),A=m?"x":"y",C=MFe(f,_,A),x=C.range,D=x[1]-x[0],E=void 0;if(D>=1){if(D>1&&!d){var T=u6(f,x[0]);u.attr({x:T[0]+w,y:T[1]+S}),o&&(E=h.getRawValue(x[0]))}else{var T=c.getPointOn(_,A);T&&u.attr({x:T[0]+w,y:T[1]+S});var k=h.getRawValue(x[0]),M=h.getRawValue(x[1]);o&&(E=AZ(i,p,k,M,C.t))}a.lastFrameIndex=x[0]}else{var L=t===1||a.lastFrameIndex>0?x[0]:0,T=u6(f,L);o&&(E=h.getRawValue(L)),u.attr({x:T[0]+w,y:T[1]+S})}if(o){var F=gv(u);typeof F.setLabelText=="function"&&F.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(t,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,h=_Fe(this._data,t,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,p=h.stackedOnCurrent,g=h.next,v=h.stackedOnNext;if(o&&(d=uc(h.current,i,o,l),p=uc(h.stackedOnCurrent,i,o,l),g=uc(h.next,i,o,l),v=uc(h.stackedOnNext,i,o,l)),s6(d,g)>3e3||c&&s6(p,v)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:v}));return}u.shape.__points=h.current,u.shape.points=d;var m={shape:{points:g}};h.current!==d&&(m.shape.__points=h.next),u.stopAnimation(),Lr(u,m,f),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),Lr(c,{shape:{stackedOnPoints:v}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],b=h.status,_=0;_e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;te&&(e=a,t=i)}return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},BFe=function(r){return Math.round(r.length/2)};function zQ(r){return{seriesType:r,reset:function(e,t,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d));var p=void 0;Ye(a)?p=FFe[a]:pt(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,p,BFe))}}}}}function OFe(r){r.registerChartView(LFe),r.registerSeriesModel(vFe),r.registerLayout(x1("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,zQ("line"))}var Dy=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return Xu(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(t),s=a.dataToPoint(o);if(i)B(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),v=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!g&&(v+=1),p.length<2)return;if(p.length===2){s[d]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,_=1,w=0;wv){b=(S+y)/2;break}w===1&&(_=A-p[0].tickValue)}b==null&&(y?y&&(b=p[p.length-1].coord):b=p[0].coord),s[d]=h.toGlobalCoord(b)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(pn);pn.registerClass(Dy);var PFe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Xu(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,i){return i.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Tf(Dy.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Dy),RFe=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),b2=function(r){de(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new RFe},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,d=Math.PI*2,p=h?f-cMath.PI/2&&cs)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,i,a){if(this._isOrderChangedWithinSameData(t,n,i)){var o=this._dataSort(t,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,i){var a=n.baseAxis,o=this._dataSort(t,a,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){vy(a,t,Ct(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(rn),c6={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=r.x+r.width,a=r.y+r.height,o=rE(e.x,r.x),s=nE(e.x+e.width,i),l=rE(e.y,r.y),u=nE(e.y+e.height,a),c=si?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var i=nE(e.r,r.r),a=rE(e.r0,r.r0);e.r=i,e.r0=a;var o=i-a<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},f6={cartesian2d:function(r,e,t,n,i,a,o,s,l){var u=new vr({shape:ye({},n),z2:1});if(u.__dataIndex=t,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(r,e,t,n,i,a,o,s,l){var u=!i&&l?b2:Ia,c=new u({shape:n,z2:1});c.name="item";var f=VQ(i);if(c.calculateTextPosition=NFe(f,{isRoundCap:u===b2}),a){var h=c.shape,d=i?"r":"endAngle",p={};h[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Lr:Sn)(c,{shape:p},a)}return c}};function UFe(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function h6(r,e,t,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Lr:Sn)(t,{shape:l},e,i,null);var c=e?r.baseAxis.model:null;(o?Lr:Sn)(t,{shape:u},c,i)}function d6(r,e){for(var t=0;t0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(r,e,t){var n=r.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function $Fe(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function VQ(r){return function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}}(r)}function g6(r,e,t,n,i,a,o,s){var l=e.getItemVisual(t,"style");if(s){if(!a.get("roundCap")){var c=r.shape,f=Rh(n.getModel("itemStyle"),c,!0);ye(c,f),r.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=n.getShallow("cursor");h&&r.attr("cursor",h);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=wi(n);$i(r,p,{labelFetcher:a,labelDataIndex:t,defaultText:Gg(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=r.getTextContent();if(s&&g){var v=n.get(["label","position"]);r.textConfig.inside=v==="middle"?!0:null,zFe(r,v==="outside"?d:v,VQ(o),n.get(["label","rotate"]))}oX(g,p,a.getRawValue(t),function(y){return IQ(e,y)});var m=n.getModel(["emphasis"]);Rn(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),Wi(r,n),$Fe(i)&&(r.style.fill="none",r.style.stroke="none",B(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function jFe(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var qFe=function(){function r(){}return r}(),v6=function(r){de(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new qFe},e.prototype.buildPath=function(t,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?t:null},30,!1);function YFe(r,e,t){for(var n=r.baseDimIdx,i=1-n,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=a.length/3;c=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function GQ(r,e,t){if(Fd(t,"cartesian2d")){var n=e,i=t.getArea();return{x:r?n.x:i.x,y:r?i.y:n.y,width:r?n.width:i.width,height:r?i.height:n.height}}else{var i=t.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:r?i.r0:a.r0,r:r?i.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function ZFe(r,e,t){var n=r.type==="polar"?Ia:vr;return new n({shape:GQ(e,t,r),silent:!0,z2:0})}function XFe(r){r.registerChartView(GFe),r.registerSeriesModel(PFe),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Lt(jK,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,qK("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,zQ("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var b6=Math.PI*2,r_=Math.PI/180;function UQ(r,e){return si(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function HQ(r,e){var t=UQ(r,e),n=r.get("center"),i=r.get("radius");De(i)||(i=[0,i]);var a=We(t.width,e.getWidth()),o=We(t.height,e.getHeight()),s=Math.min(a,o),l=We(i[0],s/2),u=We(i[1],s/2),c,f,h=r.coordinateSystem;if(h){var d=h.dataToPoint(n);c=d[0]||0,f=d[1]||0}else De(n)||(n=[n,n]),c=We(n[0],a)+t.x,f=We(n[1],o)+t.y;return{cx:c,cy:f,r0:l,r:u}}function KFe(r,e,t){e.eachSeriesByType(r,function(n){var i=n.getData(),a=i.mapDimension("value"),o=UQ(n,t),s=HQ(n,t),l=s.cx,u=s.cy,c=s.r,f=s.r0,h=-n.get("startAngle")*r_,d=n.get("endAngle"),p=n.get("padAngle")*r_;d=d==="auto"?h-b6:-d*r_;var g=n.get("minAngle")*r_,v=g+p,m=0;i.each(a,function(U){!isNaN(U)&&m++});var y=i.getSum(a),b=Math.PI/(y||m)*2,_=n.get("clockwise"),w=n.get("roseType"),S=n.get("stillShowZeroSum"),A=i.getDataExtent(a);A[0]=0;var C=_?1:-1,x=[h,d],D=C*p/2;J3(x,!_),h=x[0],d=x[1];var E=WQ(n);E.startAngle=h,E.endAngle=d,E.clockwise=_;var T=Math.abs(d-h),k=T,M=0,L=h;if(i.setLayout({viewRect:o,r:c}),i.each(a,function(U,N){var $;if(isNaN(U)){i.setItemLayout(N,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:l,cy:u,r0:f,r:w?NaN:c});return}w!=="area"?$=y===0&&S?b:U*b:$=T/m,$$?(P=L+C*$/2,te=P):(P=L+D,te=H-D),i.setItemLayout(N,{angle:$,startAngle:P,endAngle:te,clockwise:_,cx:l,cy:u,r0:f,r:w?Yr(U,A,[f,c]):c}),L=H}),kt?m:v,w=Math.abs(b.label.y-t);if(w>=_.maxY){var S=b.label.x-e-b.len2*i,A=n+b.len,C=Math.abs(S)r.unconstrainedWidth?null:d:null;n.setStyle("width",p)}var g=n.getBoundingRect();a.width=g.width;var v=(n.style.margin||0)+2.1;a.height=g.height+v,a.y-=(a.height-f)/2}}}function iE(r){return r.position==="center"}function eBe(r){var e=r.getData(),t=[],n,i,a=!1,o=(r.get("minShowLabelAngle")||0)*QFe,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function d(S){S.ignore=!0}function p(S){if(!S.ignore)return!0;for(var A in S.states)if(S.states[A].ignore===!1)return!0;return!1}e.each(function(S){var A=e.getItemGraphicEl(S),C=A.shape,x=A.getTextContent(),D=A.getTextGuideLine(),E=e.getItemModel(S),T=E.getModel("label"),k=T.get("position")||E.get(["emphasis","label","position"]),M=T.get("distanceToLabelLine"),L=T.get("alignTo"),F=We(T.get("edgeDistance"),u),U=T.get("bleedMargin"),N=E.getModel("labelLine"),$=N.get("length");$=We($,u);var H=N.get("length2");if(H=We(H,u),Math.abs(C.endAngle-C.startAngle)0?"right":"left":te>0?"left":"right"}var ne=Math.PI,we=0,ue=T.get("rotate");if(Mr(ue))we=ue*(ne/180);else if(k==="center")we=0;else if(ue==="radial"||ue===!0){var Be=te<0?-P+ne:-P;we=Be}else if(ue==="tangential"&&k!=="outside"&&k!=="outer"){var $e=Math.atan2(te,J);$e<0&&($e=ne*2+$e);var at=J>0;at&&($e=ne+$e),we=$e-ne}if(a=!!we,x.x=fe,x.y=Ce,x.rotation=we,x.setStyle({verticalAlign:"middle"}),be){x.setStyle({align:Se});var je=x.states.select;je&&(je.x+=x.x,je.y+=x.y)}else{var Gt=x.getBoundingRect().clone();Gt.applyTransform(x.getComputedTransform());var Yt=(x.style.margin||0)+2.1;Gt.y-=Yt/2,Gt.height+=Yt,t.push({label:x,labelLine:D,position:k,len:$,len2:H,minTurnAngle:N.get("minTurnAngle"),maxSurfaceAngle:N.get("maxSurfaceAngle"),surfaceNormal:new Ot(te,J),linePoints:ke,textAlign:Se,labelDistance:M,labelAlignTo:L,edgeDistance:F,bleedMargin:U,rect:Gt,unconstrainedWidth:Gt.width,labelStyleWidth:x.style.width})}A.setTextConfig({inside:be})}}),!a&&r.get("avoidLabelOverlap")&&JFe(t,n,i,l,u,h,c,f);for(var g=0;g0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},e.type="pie",e}(rn);function Cv(r,e,t){e=De(e)&&{coordDimensions:e}||ye({encodeDefine:r.getEncode()},e);var n=r.getSource(),i=_1(n,e).dimensions,a=new xa(i,r);return a.initData(n,t),a}var E1=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r}(),nBe=yr(),iBe=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new E1(Qe(this.getData,this),Qe(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Cv(this,{coordDimensions:["value"],encodeDefaulter:Lt(vF,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),i=nBe(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=YDe(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=a[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){fd(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(pn);function aBe(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(Mr(o)&&!isNaN(o)&&o<0)})}}}function oBe(r){r.registerChartView(rBe),r.registerSeriesModel(iBe),hK("pie",r.registerAction),r.registerLayout(Lt(KFe,"pie")),r.registerProcessor(D1("pie")),r.registerProcessor(aBe("pie"))}var sBe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return Xu(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,n,i){return i.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(pn),jQ=4,lBe=function(){function r(){}return r}(),uBe=function(r){de(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new lBe},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&a[0]=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(t>=f&&n>=h&&t<=f+s&&n<=h+l)return u}return-1},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();if(t=i[0],n=i[1],a.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),fBe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,i){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,i){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,i){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=x1("").reset(t,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var n=t.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new cBe:new A1,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(rn),hBe=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(rr),JM=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Qn).models[0]},e.type="cartesian2dAxis",e}(rr);ri(JM,w1);var qQ={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},dBe=Rt({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},qQ),jF=Rt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},qQ),pBe=Rt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},jF),gBe=mt({logBase:10},jF);const YQ={category:dBe,value:jF,time:pBe,log:gBe};var vBe={value:1,category:1,time:1,log:1};function Ug(r,e,t,n){B(vBe,function(i,a){var o=Rt(Rt({},YQ[a],!0),n,!0),s=function(l){de(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=yy(this),d=h?yv(c):{},p=f.getTheme();Rt(c,p.get(a+"Axis")),Rt(c,this.getDefaultOption()),c.type=w6(c),h&&gf(c,d,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=jM.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",w6)}function w6(r){return r.type||(r.data?"category":"value")}var mBe=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return Ee(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Xr(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),eI=["x","y"];function S6(r){return r.type==="interval"||r.type==="time"}var yBe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=eI,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!S6(t)||!S6(n))){var i=t.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,d=o[1]-a[0]*f,p=this._transform=[c,0,0,f,h,d];this._invTransform=cv([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var i=this.dataToPoint(t),a=this.dataToPoint(n),o=this.getArea(),s=new Nt(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,i){i=i||[];var a=t[0],o=t[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Hi(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(t,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(t[0]),u=a.parse(t[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(t,n){var i=[];if(this._invTransform)return Hi(i,t,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(t[0]),n),i[1]=o.coordToData(o.toLocalCoord(t[1]),n),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-t,o=Math.min(i[0],i[1])-t,s=Math.max(n[0],n[1])-a+t,l=Math.max(i[0],i[1])-o+t;return new Nt(a,o,s,l)},e}(mBe),bBe=function(r){de(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Ws);function tI(r,e,t){t=t||{};var n=r.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,c=n.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p=u==="x"?[f[2]-d,f[3]+d]:[f[0]-d,f[1]+d];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=[u==="y"?p[h[l]]:f[0],u==="x"?p[h[l]]:f[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?p[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),ki(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function A6(r){return r.get("coordinateSystem")==="cartesian2d"}function C6(r){var e={xAxisModel:null,yAxisModel:null};return B(e,function(t,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,Qn).models[0];e[n]=a}),e}var aE=Math.log;function ZQ(r,e,t){var n=Gu.prototype,i=n.getTicks.call(t),a=n.getTicks.call(t,!0),o=i.length-1,s=n.getInterval.call(t),l=QK(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;if(r.type==="log"){var h=aE(r.base);u=[aE(u[0])/h,aE(u[1])/h]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var d=n.getExtent.call(r);c&&(u[0]=d[0]),f&&(u[1]=d[1]);var p=n.getInterval.call(r),g=u[0],v=u[1];if(c&&f)p=(v-g)/o;else if(c)for(v=u[0]+p*o;vu[0]&&isFinite(g)&&isFinite(u[0]);)p=WD(p),g=u[1]-p*o;else{var m=r.getTicks().length-1;m>o&&(p=WD(p));var y=p*o;v=Math.ceil(u[1]/p)*p,g=Wn(v-y),g<0&&u[0]>=0?(g=0,v=Wn(y)):v>0&&u[1]<=0&&(v=0,g=-Wn(y))}var b=(i[0].value-a[0].value)/s,_=(i[o].value-a[o].value)/s;n.setExtent.call(r,g+p*b,v+p*_),n.setInterval.call(r,p),(b||_)&&n.setNiceExtent.call(r,g+p,v-p)}var _Be=function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=eI,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=nr(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],d=o[h],p=d.model,g=d.scale;qM(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(Vg(g,p),qM(g)&&(s=d))}c.length&&(s||(s=c.pop(),Vg(s.scale,s.model)),B(c,function(v){ZQ(v.scale,v.model,s.scale)}))}}i(n.x),i(n.y);var a={};B(n.x,function(o){x6(n,"y",o,a)}),B(n.y,function(o){x6(n,"x",o,a)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=si(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(B(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=e3e(u);if(c){var f=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+h,u.position==="top"?o.y+=c.height+h:u.position==="left"&&(o.x+=c.width+h)}}}),l()),B(this._coordsList,function(u){u.calcAffineTransform()});function l(){B(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(f[h],f[1-h]),wBe(u,c?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}_t(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):hy(i-Vc)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),E6={axisLine:function(r,e,t,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Hi(s,s,o),Hi(l,l,o));var c=ye({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new vi({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Rg(f.shape,f.style.lineWidth),f.anid="line",t.add(f);var h=e.get(["axisLine","symbol"]);if(h!=null){var d=e.get(["axisLine","symbolSize"]);Ye(h)&&(h=[h,h]),(Ye(d)||Mr(d))&&(d=[d,d]);var p=Id(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],v=d[1];B([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(h[y]!=="none"&&h[y]!=null){var b=Jn(h[y],-g/2,-v/2,g,v,c.stroke,!0),_=m.r+m.offset,w=u?l:s;b.attr({rotation:m.rotate,x:w[0]+_*Math.cos(r.rotation),y:w[1]-_*Math.sin(r.rotation),silent:!0,z2:11}),t.add(b)}})}}},axisTickLabel:function(r,e,t,n){var i=CBe(t,n,e,r),a=DBe(t,n,e,r);if(ABe(e,a,i),xBe(t,n,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=hQ(Ee(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));gQ(o)}},axisName:function(r,e,t,n){var i=ki(r.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,f=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,k6(a)?r.labelOffset+o*l:0],h,d=e.get("nameRotate");d!=null&&(d=d*Vc/180);var p;k6(a)?h=Da.innerTextLayout(r.rotation,d??r.rotation,o):(h=SBe(r.rotation,a,d||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var g=s.getFont(),v=e.get("nameTruncate",!0)||{},m=v.ellipsis,y=ki(r.nameTruncateMaxWidth,v.maxWidth,p),b=new Ar({x:f[0],y:f[1],rotation:h.rotation,silent:Da.isLabelSilent(e),style:hn(s,{text:i,font:g,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(pv({el:b,componentModel:e,itemName:i}),b.__fullText=i,b.anid="name",e.get("triggerEvent")){var _=Da.makeAxisEventDataBase(e);_.targetType="axisName",_.name=i,Ct(b).eventData=_}n.add(b),b.updateTransform(),t.add(b),b.decomposeTransform()}}};function SBe(r,e,t,n){var i=dZ(t-r),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return hy(i-Vc/2)?(o=l?"bottom":"top",a="center"):hy(i-Vc*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iVc/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function ABe(r,e,t){if(!JK(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],f=t[t.length-1],h=t[t.length-2];n===!1?(Mo(a),Mo(u)):T6(a,o)&&(n?(Mo(o),Mo(c)):(Mo(a),Mo(u))),i===!1?(Mo(s),Mo(f)):T6(l,s)&&(i?(Mo(l),Mo(h)):(Mo(s),Mo(f)))}}function Mo(r){r&&(r.ignore=!0)}function T6(r,e){var t=r&&r.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!t||!n)){var i=OA([]);return kd(i,i,-r.rotation),t.applyTransform(Tu([],i,r.getLocalTransform())),n.applyTransform(Tu([],i,e.getLocalTransform())),t.intersect(n)}}function k6(r){return r==="middle"||r==="center"}function XQ(r,e,t,n,i){for(var a=[],o=[],s=[],l=0;l=0||r===e}function LBe(r){var e=qF(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,i=t.option,a=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=rI(t);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=mt({color:p.color},l));var v=Rt(wt(p),{boundaryGap:t,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:g,triggerEvent:h},!1);if(Ye(c)){var m=v.name;v.name=c.replace("{value}",m??"")}else pt(c)&&(v.name=c(v.name,v));var y=new $r(v,null,this.ecModel);return ri(y,w1.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Rt({lineStyle:{color:"#bbb"}},sm.axisLine),axisLabel:n_(sm.axisLabel,!1),axisTick:n_(sm.axisTick,!1),splitLine:n_(sm.splitLine,!0),splitArea:n_(sm.splitArea,!0),indicator:[]},e}(rr),$Be=["axisLine","axisTickLabel","axisName"],jBe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var n=t.coordinateSystem,i=n.getIndicatorAxes(),a=Ee(i,function(o){var s=o.model.get("showName")?o.name:"",l=new Da(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});B(a,function(o){B($Be,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),d=u.get("color"),p=De(h)?h:[h],g=De(d)?d:[d],v=[],m=[];function y(L,F,U){var N=U%F.length;return L[N]=L[N]||[],N}if(a==="circle")for(var b=i[0].getTicksCoords(),_=n.cx,w=n.cy,S=0;S3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;lE(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);lE(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!O6(this._zr,"globalPan")){var n=t.pinchScale>1?1.1:1/1.1;lE(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(ss);function lE(r,e,t,n,i){r.pointerChecker&&r.pointerChecker(n,i.originX,i.originY)&&(Pu(n.event),rJ(r,e,t,n,i))}function rJ(r,e,t,n,i){i.isAvailableBehavior=Qe(cw,null,t,n),r.trigger(e,i)}function cw(r,e,t){var n=t[r];return!r||n&&(!Ye(n)||e.event[n+"Key"])}function ZF(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function XF(r,e,t,n){var i=r.target,a=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,i.x-=(t-i.x)*(u-1),i.y-=(n-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var JBe={axisPointer:1,tooltip:1,brush:1};function hC(r,e,t){var n=e.getComponentByElement(r.topTarget),i=n&&n.coordinateSystem;return n&&n!==t&&!JBe.hasOwnProperty(n.mainType)&&i&&i.model!==t}function nJ(r){if(Ye(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var uE,_2={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},P6=nr(_2),w2={"alignment-baseline":"textBaseline","stop-color":"stopColor"},R6=nr(w2),e4e=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=nJ(e);this._defsUsePending=[];var i=new At;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),oo(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;n4e(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var h=dC(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=aJ(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var d=i;i=new At,i.add(d),d.scaleX=d.scaleY=f.scale,d.x=f.x,d.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new vr({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},r.prototype._parseNode=function(e,t,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!a){var c=uE[s];if(c&&et(uE,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var d=N6[s];if(d&&et(N6,s)){var p=d.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var v=e.firstChild;v;)v.nodeType===1?this._parseNode(v,l,n,u,a,o):v.nodeType===3&&o&&this._parseText(v,l),v=v.nextSibling},r.prototype._parseText=function(e,t){var n=new Pg({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Io(t,n),oo(e,n,this._defsUsePending,!1,!1),t4e(n,t);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=function(){uE={g:function(e,t){var n=new At;return Io(t,n),oo(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new vr;return Io(t,n),oo(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new Zu;return Io(t,n),oo(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new vi;return Io(t,n),oo(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new $A;return Io(t,n),oo(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute("points"),i;n&&(i=G6(n));var a=new La({shape:{points:i||[]},silent:!0});return Io(t,a),oo(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,t){var n=e.getAttribute("points"),i;n&&(i=G6(n));var a=new Fa({shape:{points:i||[]},silent:!0});return Io(t,a),oo(e,a,this._defsUsePending,!1,!1),a},image:function(e,t){var n=new Pi;return Io(t,n),oo(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new At;return Io(t,s),oo(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new At;return Io(t,s),oo(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",i=YZ(n);return Io(t,i),oo(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),r}(),N6={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),i=parseInt(r.getAttribute("y2")||"0",10),a=new g1(e,t,n,i);return z6(r,a),V6(r,a),a},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),i=new QZ(e,t,n);return z6(r,i),V6(r,i),i}};function z6(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function V6(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};iJ(t,a,a);var o=a.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function Io(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),mt(e.__inheritedStyle,r.__inheritedStyle))}function G6(r){for(var e=dC(r),t=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=dC(o);switch(i=i||_o(),s){case"translate":Ul(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":W3(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":kd(i,i,-parseFloat(l[0])*cE,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*cE);Tu(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*cE);Tu(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var H6=/([^\s:;]+)\s*:\s*([^:;]+)/g;function iJ(r,e,t){var n=r.getAttribute("style");if(n){H6.lastIndex=0;for(var i;(i=H6.exec(n))!=null;){var a=i[1],o=et(_2,a)?_2[a]:null;o&&(e[o]=i[2]);var s=et(w2,a)?w2[a]:null;s&&(t[s]=i[2])}}}function s4e(r,e,t){for(var n=0;n0,v={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(v):l.resourceType==="geoSVG"&&this._buildSVG(v),this._updateController(e,t,n),this._updateMapSelectHandler(e,u,n,i)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=nt(),n=nt(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function f(d){for(var p=[],g=!u&&l&&l.project,v=0;v=0)&&(h=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;$i(e,wi(n),{labelFetcher:h,labelDataIndex:f,defaultText:t},d);var p=e.getTextContent();if(p&&(oJ(p).ignore=p.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Y6(r,e,t,n,i,a){r.data?r.data.setItemGraphicEl(a,e):Ct(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:n&&n.option||{}}}function Z6(r,e,t,n,i){r.data||pv({el:e,componentModel:i,itemName:t,itemTooltipOption:n.get("tooltip")})}function X6(r,e,t,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Rn(e,o,a.get("blurScope"),a.get("disabled")),r.isGeo&&wTe(e,i,t),o}function K6(r,e,t){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),B(r,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(pn);function E4e(r,e){var t={};return B(r,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(n,i){for(var a="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=t[a].length,c=0;c1?(_.width=b,_.height=b/v):(_.height=b,_.width=b*v),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var w=r.getBoxLayoutParams();w.aspect=v,_=si(w,{width:p,height:g})}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function I4e(r,e){B(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var L4e=function(){function r(){this.dimensions=lJ}return r.prototype.create=function(e,t){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new aI(l+s,l,ye({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=t9,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),B(a,function(o,s){var l=Ee(o,function(c){return c.get("nameMap")}),u=new aI(s,s,ye({nameMap:z3(l)},i(o[0])));u.zoomLimit=ki.apply(null,Ee(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=t9,u.resize(o[0],t),B(o,function(c){c.coordinateSystem=u,I4e(u,c)})}),n},r.prototype.getFilledRegions=function(e,t,n,i){for(var a=(e||[]).slice(),o=nt(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function N4e(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,i=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){G4e(r);var a=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+e(r,i),r.hierNode.modifier=r.hierNode.prelim-a):r.hierNode.prelim=a}else i&&(r.hierNode.prelim=i.hierNode.prelim+e(r,i));r.parentNode.hierNode.defaultAncestor=U4e(r,i,r.parentNode.hierNode.defaultAncestor||n[0],e)}function z4e(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function n9(r){return arguments.length?r:$4e}function Nm(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function V4e(r,e){return si(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function G4e(r){for(var e=r.children,t=e.length,n=0,i=0;--t>=0;){var a=e[t];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function U4e(r,e,t,n){if(e){for(var i=r,a=r,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=fE(s),a=hE(a),s&&a;){i=fE(i),o=hE(o),i.hierNode.ancestor=r;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(W4e(H4e(s,r,t),r,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!fE(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!hE(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,t=r)}return t}function fE(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function hE(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function H4e(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function W4e(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function $4e(r,e){return r.parentNode===e.parentNode?1:2}var j4e=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),q4e=function(r){de(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new j4e},e.prototype.buildPath=function(t,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=We(n.forkPosition,1),d=[];d[c]=o[c],d[f]=o[f]+(l[f]-o[f])*h,t.moveTo(o[0],o[1]),t.lineTo(d[0],d[1]),t.moveTo(s[0],s[1]),d[c]=s[c],t.lineTo(d[0],d[1]),d[c]=l[c],t.lineTo(d[0],d[1]),t.lineTo(l[0],l[1]);for(var p=1;py.x,w||(_=_-Math.PI));var A=w?"left":"right",C=s.getModel("label"),x=C.get("rotate"),D=x*(Math.PI/180),E=v.getTextContent();E&&(v.setTextConfig({position:C.get("position")||A,rotation:x==null?-_:D,origin:"center"}),E.setStyle("verticalAlign","middle"))}var T=s.get(["emphasis","focus"]),k=T==="relative"?WS(o.getAncestorsIndices(),o.getDescendantIndices()):T==="ancestor"?o.getAncestorsIndices():T==="descendant"?o.getDescendantIndices():null;k&&(Ct(t).focus=k),Z4e(i,o,c,t,p,d,g,n),t.__edge&&(t.onHoverStateChange=function(M){if(M!=="blur"){var L=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);L&&L.hoverState===h1||e2(t.__edge,M)}})}function Z4e(r,e,t,n,i,a,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),h=r.get(["lineStyle","curveness"]),d=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(g||(g=n.__edge=new p1({shape:oI(c,f,h,i,i)})),Lr(g,{shape:oI(c,f,h,a,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var v=e.children,m=[],y=0;yt&&(t=i.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var n=t.getData().tree.root,i=r.targetNode;if(Ye(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=r.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function pJ(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function tB(r,e){var t=pJ(r);return Ut(t,e)>=0}function pC(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var iOe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},i=t.leaves||{},a=new $r(i,this,this.ecModel),o=eB.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Si("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=pC(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(pn);function aOe(r,e,t){for(var n=[r],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)t.push(i[a])}}function oOe(r,e){r.eachSeriesByType("tree",function(t){sOe(t,e)})}function sOe(r,e){var t=V4e(r,e);r.layoutInfo=t;var n=r.get("layout"),i=0,a=0,o=null;n==="radial"?(i=2*Math.PI,a=Math.min(t.height,t.width)/2,o=n9(function(b,_){return(b.parentNode===_.parentNode?1:2)/b.depth})):(i=t.width,a=t.height,o=n9());var s=r.getData().tree.root,l=s.children[0];if(l){R4e(s),aOe(l,N4e,o),s.hierNode.modifier=-l.hierNode.prelim,um(l,z4e);var u=l,c=l,f=l;um(l,function(b){var _=b.getLayout().x;_c.getLayout().x&&(c=b),b.depth>f.depth&&(f=b)});var h=u===c?1:o(u,c)/2,d=h-u.getLayout().x,p=0,g=0,v=0,m=0;if(n==="radial")p=i/(c.getLayout().x+h+d),g=a/(f.depth-1||1),um(l,function(b){v=(b.getLayout().x+d)*p,m=(b.depth-1)*g;var _=Nm(v,m);b.setLayout({x:_.x,y:_.y,rawX:v,rawY:m},!0)});else{var y=r.getOrient();y==="RL"||y==="LR"?(g=a/(c.getLayout().x+h+d),p=i/(f.depth-1||1),um(l,function(b){m=(b.getLayout().x+d)*g,v=y==="LR"?(b.depth-1)*p:i-(b.depth-1)*p,b.setLayout({x:v,y:m},!0)})):(y==="TB"||y==="BT")&&(p=i/(c.getLayout().x+h+d),g=a/(f.depth-1||1),um(l,function(b){v=(b.getLayout().x+d)*p,m=y==="TB"?(b.depth-1)*g:a-(b.depth-1)*g,b.setLayout({x:v,y:m},!0)}))}}}function lOe(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");ye(s,o)})})}function uOe(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=QF(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function cOe(r){r.registerChartView(Y4e),r.registerSeriesModel(iOe),r.registerLayout(oOe),r.registerVisual(lOe),uOe(r)}var l9=["treemapZoomToNode","treemapRender","treemapMove"];function fOe(r){for(var e=0;e1;)a=a.parentNode;var o=FM(r.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var hOe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var i={name:t.name,children:t.data};vJ(i);var a=t.levels||[],o=this.designatedVisualItemStyle={},s=new $r({itemStyle:o},this,n);a=t.levels=dOe(a,n);var l=Ee(a||[],function(f){return new $r(f,s,n)},this),u=eB.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,d){var p=u.getNodeByDataIndex(d),g=p?l[p.depth]:null;return h.parentModel=g||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return Si("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=pC(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},ye(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=nt(),this._idIndexMapCount=0);var i=n.get(t);return i==null&&n.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){gJ(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(pn);function vJ(r){var e=0;B(r.children,function(n){vJ(n);var i=n.value;De(i)&&(i=i[0]),e+=i});var t=r.value;De(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),De(r.value)?r.value[0]=t:r.value=t}function dOe(r,e){var t=Qr(e.get("color")),n=Qr(e.get(["aria","decal","decals"]));if(t){r=r||[];var i,a;B(r,function(s){var l=new $r(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=r[0]||(r[0]={});return i||(o.color=t.slice()),!a&&n&&(o.decal=n.slice()),r}}var pOe=8,u9=8,dE=5,gOe=function(){function r(e){this.group=new At,e.add(this.group)}return r.prototype.render=function(e,t,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,f,u),this._renderContent(e,f,s,l,u,c,i),tC(o,f.pos,f.box)}},r.prototype._prepare=function(e,t,n){for(var i=e;i;i=i.parentNode){var a=ai(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+pOe*2,t.emptyItemWidth);t.totalWidth+=s+u9,t.renderList.push({node:i,text:a,width:s})}},r.prototype._renderContent=function(e,t,n,i,a,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),f=Ake(t.pos,t.box),h=t.totalWidth,d=t.renderList,p=i.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var v=d[g],m=v.node,y=v.width,b=v.text;h>f.width&&(h-=y-u,y=u,b=null);var _=new La({shape:{points:vOe(l,0,y,c,g===d.length-1,g===0)},style:mt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ar({style:hn(a,{text:b})}),textConfig:{position:"inside"},z2:hv*1e4,onclick:Lt(s,m)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=hn(o,{text:b}),_.ensureState("emphasis").style=p,Rn(_,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(_),mOe(_,e,m),l+=y+u9}},r.prototype.remove=function(){this.group.removeAll()},r}();function vOe(r,e,t,n,i,a){var o=[[i?r:r-dE,e],[r+t,e],[r+t,e+n],[i?r:r-dE,e+n]];return!a&&o.splice(2,0,[r+t+dE,e+n/2]),!i&&o.push([r,e+n/2]),o}function mOe(r,e,t){Ct(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&pC(t,e)}}var yOe=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:i,easing:a}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;if9||Math.abs(t.dy)>f9)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var n=t.originX,i=t.originY,a=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Nt(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,d=u.max||1/0;f=Math.max(Math.min(d,f),h)}var p=f/c.zoom;c.zoom=f;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var v=_o();Ul(v,v,[-n,-i]),W3(v,v,[p,p]),Ul(v,v,[n,i]),l.applyTransform(v),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&o2(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,i){var a=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new gOe(this.group))).render(t,n,i.node,function(o){a._state!=="animating"&&(tB(t.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=cm(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(rn);function cm(){return{nodeGroup:[],background:[],content:[]}}function COe(r,e,t,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,g=c.borderWidth,v=c.invisible,m=o.getRawIndex(),y=s&&s.getRawIndex(),b=o.viewChildren,_=c.upperHeight,w=b&&b.length,S=h.getModel("itemStyle"),A=h.getModel(["emphasis","itemStyle"]),C=h.getModel(["blur","itemStyle"]),x=h.getModel(["select","itemStyle"]),D=S.get("borderRadius")||0,E=fe("nodeGroup",sI);if(!E)return;if(l.add(E),E.x=c.x||0,E.y=c.y||0,E.markRedraw(),S2(E).nodeWidth=d,S2(E).nodeHeight=p,c.isAboveViewRoot)return E;var T=fe("background",c9,u,wOe);T&&$(E,T,w&&c.upperLabelHeight);var k=h.getModel("emphasis"),M=k.get("focus"),L=k.get("blurScope"),F=k.get("disabled"),U=M==="ancestor"?o.getAncestorsIndices():M==="descendant"?o.getDescendantIndices():M;if(w)gy(E)&&Lh(E,!1),T&&(Lh(T,!F),f.setItemGraphicEl(o.dataIndex,T),xM(T,U,L));else{var N=fe("content",c9,u,SOe);N&&H(E,N),T.disableMorphing=!0,T&&gy(T)&&Lh(T,!1),Lh(E,!F),f.setItemGraphicEl(o.dataIndex,E),xM(E,U,L)}return E;function $(Se,be,W){var q=Ct(be);if(q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex,be.setShape({x:0,y:0,width:d,height:p,r:D}),v)P(be);else{be.invisible=!1;var j=o.getVisual("style"),ve=j.stroke,K=p9(S);K.fill=ve;var xe=ch(A);xe.fill=A.get("borderColor");var ne=ch(C);ne.fill=C.get("borderColor");var we=ch(x);if(we.fill=x.get("borderColor"),W){var ue=d-2*g;te(be,ve,j.opacity,{x:g,y:0,width:ue,height:_})}else be.removeTextContent();be.setStyle(K),be.ensureState("emphasis").style=xe,be.ensureState("blur").style=ne,be.ensureState("select").style=we,pd(be)}Se.add(be)}function H(Se,be){var W=Ct(be);W.dataIndex=o.dataIndex,W.seriesIndex=r.seriesIndex;var q=Math.max(d-2*g,0),j=Math.max(p-2*g,0);if(be.culling=!0,be.setShape({x:g,y:g,width:q,height:j,r:D}),v)P(be);else{be.invisible=!1;var ve=o.getVisual("style"),K=ve.fill,xe=p9(S);xe.fill=K,xe.decal=ve.decal;var ne=ch(A),we=ch(C),ue=ch(x);te(be,K,ve.opacity,null),be.setStyle(xe),be.ensureState("emphasis").style=ne,be.ensureState("blur").style=we,be.ensureState("select").style=ue,pd(be)}Se.add(be)}function P(Se){!Se.invisible&&a.push(Se)}function te(Se,be,W,q){var j=h.getModel(q?d9:h9),ve=ai(h.get("name"),null),K=j.getShallow("show");$i(Se,wi(h,q?d9:h9),{defaultText:K?ve:null,inheritColor:be,defaultOpacity:W,labelFetcher:r,labelDataIndex:o.dataIndex});var xe=Se.getTextContent();if(xe){var ne=xe.style,we=G3(ne.padding||0);q&&(Se.setTextConfig({layoutRect:q}),xe.disableLabelLayout=!0),xe.beforeUpdate=function(){var Be=Math.max((q?q.width:Se.shape.width)-we[1]-we[3],0),$e=Math.max((q?q.height:Se.shape.height)-we[0]-we[2],0);(ne.width!==Be||ne.height!==$e)&&xe.setStyle({width:Be,height:$e})},ne.truncateMinChar=2,ne.lineOverflow="truncate",J(ne,q,c);var ue=xe.getState("emphasis");J(ue?ue.style:null,q,c)}}function J(Se,be,W){var q=Se?Se.text:null;if(!be&&W.isLeafRoot&&q!=null){var j=r.get("drillDownIcon",!0);Se.text=j?j+" "+q:q}}function fe(Se,be,W,q){var j=y!=null&&t[Se][y],ve=i[Se];return j?(t[Se][y]=null,Ce(ve,j)):v||(j=new be,j instanceof is&&(j.z2=xOe(W,q)),ke(ve,j)),e[Se][m]=j}function Ce(Se,be){var W=Se[m]={};be instanceof sI?(W.oldX=be.x,W.oldY=be.y):W.oldShape=ye({},be.shape)}function ke(Se,be){var W=Se[m]={},q=o.parentNode,j=be instanceof At;if(q&&(!n||n.direction==="drillDown")){var ve=0,K=0,xe=i.background[q.getRawIndex()];!n&&xe&&xe.oldShape&&(ve=xe.oldShape.width,K=xe.oldShape.height),j?(W.oldX=0,W.oldY=K):W.oldShape={x:ve,y:K,width:0,height:0}}W.fadein=!j}}function xOe(r,e){return r*_Oe+e}var ky=B,DOe=_t,A2=-1,bi=function(){function r(e){var t=e.mappingMethod,n=e.type,i=this.option=wt(e);this.type=n,this.mappingMethod=t,this._normalizeData=kOe[t];var a=r.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[t],t==="piecewise"?(pE(i),EOe(i)):t==="category"?i.categories?TOe(i):pE(i,!0):(ka(t!=="linear"||i.dataExtent),pE(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return Qe(this._normalizeData,this)},r.listVisualTypes=function(){return nr(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){_t(e)?B(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var i,a=De(e)?[]:_t(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);i?a=l:a[s]=l}),a},r.retrieveVisuals=function(e){var t={},n;return e&&ky(r.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(t[a]=e[a],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(De(e))e=e.slice();else if(DOe(e)){var t=[];ky(e,function(n,i){t.push(i)}),e=t}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var i,a=1/0,o=0,s=t.length;o=0;a--)n[a]==null&&(delete t[e[a]],e.pop())}function pE(r,e){var t=r.visual,n=[];_t(t)?ky(t,function(a){n.push(a)}):t!=null&&n.push(t);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(r.type)&&(n[1]=n[0]),mJ(r,n)}function a_(r){return{applyVisual:function(e,t,n){var i=this.mapValueToVisual(e);n("color",r(t("color"),i))},_normalizedToVisual:lI([0,1])}}function g9(r){var e=this.option.visual;return e[Math.round(Yr(r,[0,1],[0,e.length-1],!0))]||{}}function fm(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function zm(r){var e=this.option.visual;return e[this.option.loop&&r!==A2?r%e.length:r]}function fh(){return this.option.visual[0]}function lI(r){return{linear:function(e){return Yr(e,r,this.option.visual,!0)},category:zm,piecewise:function(e,t){var n=uI.call(this,t);return n==null&&(n=Yr(e,r,this.option.visual,!0)),n},fixed:fh}}function uI(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=bi.findPieceIndex(r,t),i=t[n];if(i&&i.visual)return i.visual[this.type]}}function mJ(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=Ee(e,function(t){var n=wo(t);return n||[0,0,0,1]})),e}var kOe={linear:function(r){return Yr(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=bi.findPieceIndex(r,e,!0);if(t!=null)return Yr(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??A2},fixed:qn};function o_(r,e,t){return r?e<=t:e=t.length||g===t[g.depth]){var m=OOe(i,l,g,v,p,n);bJ(g,m,t,n)}})}}}function LOe(r,e,t){var n=ye({},e),i=t.designatedVisualItemStyle;return B(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=r.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function v9(r){var e=gE(r,"color");if(e){var t=gE(r,"colorAlpha"),n=gE(r,"colorSaturation");return n&&(e=Qm(e,null,null,n)),t&&(e=YS(e,t)),e}}function FOe(r,e){return e!=null?Qm(e,null,null,r):null}function gE(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function BOe(r,e,t,n,i,a){if(!(!a||!a.length)){var o=vE(e,"color")||i.color!=null&&i.color!=="none"&&(vE(e,"colorAlpha")||vE(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new bi(f);return yJ(h).drColorMappingBy=c,h}}}function vE(r,e){var t=r.get(e);return De(t)&&t.length?{name:e,range:t}:null}function OOe(r,e,t,n,i,a){var o=ye({},e);if(i){var s=i.type,l=s==="color"&&yJ(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var My=Math.max,C2=Math.min,m9=ki,rB=B,_J=["itemStyle","borderWidth"],POe=["itemStyle","gapWidth"],ROe=["upperLabel","show"],NOe=["upperLabel","height"];const zOe={seriesType:"treemap",reset:function(r,e,t,n){var i=t.getWidth(),a=t.getHeight(),o=r.option,s=si(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=We(m9(s.width,l[0]),i),c=We(m9(s.height,l[1]),a),f=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],d=Ty(n,h,r),p=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,g=r.getViewRoot(),v=pJ(g);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?$Oe(r,d,g,u,c):p?[p.width,p.height]:[u,c],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var b={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(_),wJ(g,b,!1,0),_=g.getLayout(),rB(v,function(S,A){var C=(v[A+1]||g).getValue();S.setLayout(ye({dataExtent:[C,C],borderWidth:0,upperHeight:0},_))})}var w=r.getData().tree.root;w.setLayout(jOe(s,p,d),!0),r.setLayoutInfo(s),SJ(w,new Nt(-s.x,-s.y,i,a),v,g,0)}};function wJ(r,e,t,n){var i,a;if(!r.isRemoved()){var o=r.getLayout();i=o.width,a=o.height;var s=r.getModel(),l=s.get(_J),u=s.get(POe)/2,c=AJ(s),f=Math.max(l,c),h=l-u,d=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=My(i-2*h,0),a=My(a-h-d,0);var p=i*a,g=VOe(r,s,p,e,t,n);if(g.length){var v={x:h,y:d,width:i,height:a},m=C2(i,a),y=1/0,b=[];b.area=0;for(var _=0,w=g.length;_=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function WOe(r,e,t){for(var n=0,i=1/0,a=0,o=void 0,s=r.length;an&&(n=o));var l=r.area*r.area,u=e*e*t;return l?My(u*n/l,l/(u*i)):1/0}function y9(r,e,t,n,i){var a=e===t.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=t[s[a]],c=e?r.area/e:0;(i||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,h=r.length;fL5&&(u=L5),a=s}un&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(w[0]=-w[0],w[1]=-w[1]);var A=_[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var C=-Math.atan2(_[1],_[0]);f[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*m+c[0],a.y=-h[1]*y+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=m*A+c[0],a.y=c[1]+x,p=_[0]<0?"right":"left",a.originX=-m*A,a.originY=-x;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=S[0],a.y=S[1]+x,p="center",a.originY=-x;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-m*A+f[0],a.y=f[1]+x,p=_[0]>=0?"right":"left",a.originX=m*A,a.originY=-x;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},e}(At),sB=function(){function r(e){this.group=new At,this._LineCtor=e||oB}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=C9(e);e.diff(a).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=C9(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!cPe(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function C9(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:wi(e)}}function x9(r){return isNaN(r[0])||isNaN(r[1])}function wE(r){return r&&!x9(r[0])&&!x9(r[1])}var SE=[],AE=[],CE=[],tp=xi,xE=qh,D9=Math.abs;function E9(r,e,t){for(var n=r[0],i=r[1],a=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){SE[0]=tp(n[0],i[0],a[0],c),SE[1]=tp(n[1],i[1],a[1],c);var f=D9(xE(SE,e)-l);f=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function DE(r,e){var t=[],n=uy,i=[[],[],[]],a=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Eu(u[0]),Eu(u[1])],u[2]&&u.__original.push(Eu(u[2])));var h=u.__original;if(u[2]!=null){if(va(i[0],h[0]),va(i[1],h[2]),va(i[2],h[1]),c&&c!=="none"){var d=Gm(s.node1),p=E9(i,h[0],d*e);n(i[0][0],i[1][0],i[2][0],p,t),i[0][0]=t[3],i[1][0]=t[4],n(i[0][1],i[1][1],i[2][1],p,t),i[0][1]=t[3],i[1][1]=t[4]}if(f&&f!=="none"){var d=Gm(s.node2),p=E9(i,h[1],d*e);n(i[0][0],i[1][0],i[2][0],p,t),i[1][0]=t[1],i[2][0]=t[2],n(i[0][1],i[1][1],i[2][1],p,t),i[1][1]=t[1],i[2][1]=t[2]}va(u[0],i[0]),va(u[1],i[2]),va(u[2],i[1])}else{if(va(a[0],h[0]),va(a[1],h[1]),Mh(o,a[1],a[0]),uv(o,o),c&&c!=="none"){var d=Gm(s.node1);Xk(a[0],a[0],o,d*e)}if(f&&f!=="none"){var d=Gm(s.node2);Xk(a[1],a[1],o,-d*e)}va(u[0],a[0]),va(u[1],a[1])}})}function T9(r){return r.type==="view"}var fPe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var i=new A1,a=new sB,o=this.group;this._controller=new T1(n.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(a.group),this._symbolDraw=i,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(t,n,i){var a=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(T9(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):Lr(u,c,t)}DE(t.getGraph(),Vm(t));var f=t.getData();s.updateData(f);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,n,i),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p);var g=t.get("layout");f.graph.eachNode(function(b){var _=b.dataIndex,w=b.getGraphicEl(),S=b.getModel();if(w){w.off("drag").off("dragend");var A=S.get("draggable");A&&w.on("drag",function(x){switch(g){case"force":d.warmUp(),!a._layouting&&a._startForceLayoutIteration(d,p),d.setFixed(_),f.setItemLayout(_,[w.x,w.y]);break;case"circular":f.setItemLayout(_,[w.x,w.y]),b.setLayout({fixed:!0},!0),aB(t,"symbolSize",b,[x.offsetX,x.offsetY]),a.updateLayout(t);break;case"none":default:f.setItemLayout(_,[w.x,w.y]),iB(t.getGraph(),t),a.updateLayout(t);break}}).on("dragend",function(){d&&d.setUnfixed(_)}),w.setDraggable(A,!!S.get("cursor"));var C=S.get(["emphasis","focus"]);C==="adjacency"&&(Ct(w).focus=b.getAdjacentDataIndices())}}),f.graph.eachEdge(function(b){var _=b.getGraphicEl(),w=b.getModel().get(["emphasis","focus"]);_&&w==="adjacency"&&(Ct(_).focus={edge:[b.dataIndex],node:[b.node1.dataIndex,b.node2.dataIndex]})});var v=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=f.getLayout("cx"),y=f.getLayout("cy");f.graph.eachNode(function(b){EJ(b,v,m,y)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n){var i=this;(function a(){t.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(n?i._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(t,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!hC(u,i,t)}),!T9(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){ZF(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){XF(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),DE(t.getGraph(),Vm(t)),a._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),i=Vm(t);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(t){DE(t.getGraph(),Vm(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(rn);function rp(r){return"_EC_"+r}var hPe=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(!n[rp(e)]){var i=new hh(e,t);return i.hostGraph=this,this.nodes.push(i),n[rp(e)]=i,i}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[rp(e)]},r.prototype.addEdge=function(e,t,n){var i=this._nodesMap,a=this._edgesMap;if(Mr(e)&&(e=this.nodes[e]),Mr(t)&&(t=this.nodes[t]),e instanceof hh||(e=i[rp(e)]),t instanceof hh||(t=i[rp(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new kJ(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),a[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof hh&&(e=e.id),t instanceof hh&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,i=n.length,a=0;a=0&&e.call(t,n[a],a)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(t,n[a],a)},r.prototype.breadthFirstTraverse=function(e,t,n,i){if(t instanceof hh||(t=this._nodesMap[rp(t)]),!!t){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}ri(hh,MJ("hostGraph","data"));ri(kJ,MJ("hostGraph","edgeData"));function IJ(r,e,t,n,i){for(var a=new hPe(n),o=0;o "+h)),u++)}var d=t.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar")p=Xu(r,t);else{var g=y1.get(d),v=g?g.dimensions||[]:[];Ut(v,"value")<0&&v.concat(["value"]);var m=_1(r,{coordDimensions:v,encodeDefine:t.getEncode()}).dimensions;p=new xa(m,t),p.initData(r)}var y=new xa(["value"],t);return y.initData(l,s),i&&i(p,y),hJ({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var dPe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new E1(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),fd(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var i=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;if(a&&i){JOe(this);var s=IJ(a,i,this,!0,l);return B(s.edges,function(u){ePe(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,v=p.getShallow("category"),m=g[v];return m&&(m.parentModel=p.parentModel,p.parentModel=m),p});var f=$r.prototype.getModel;function h(p,g){var v=f.call(this,p,g);return v.resolveParentPath=d,v}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=h,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(t,i),s=a.graph.getEdgeByIndex(t),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Si("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=rK({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=Ee(this.option.categories||[],function(i){return i.value!=null?i:ye({value:0},i)}),n=new xa(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(pn),pPe={type:"graphRoam",event:"graphRoam",update:"none"};function gPe(r){r.registerChartView(fPe),r.registerSeriesModel(dPe),r.registerProcessor(YOe),r.registerVisual(ZOe),r.registerVisual(XOe),r.registerLayout(tPe),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,nPe),r.registerLayout(aPe),r.registerCoordinateSystem("graphView",{dimensions:k1.dimensions,create:sPe}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},qn),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},qn),r.registerAction(pPe,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(i){var a=i.coordinateSystem,o=QF(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var vPe=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),mPe=function(r){de(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new vPe},e.prototype.buildPath=function(t,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(n.x+i(l)*s,n.y+a(l)*s),t.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),t.lineTo(n.x-i(l)*s,n.y-a(l)*s),t.lineTo(u,c)},e}(Xt);function yPe(r,e){var t=r.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=We(t[0],e.getWidth()),s=We(t[1],e.getHeight()),l=We(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function l_(r,e){var t=r==null?"":r+"";return e&&(Ye(e)?t=e.replace("{value}",t):pt(e)&&(t=e(r))),t}var bPe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),o=yPe(t,i);this._renderMain(t,n,i,a,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,i,a,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),h=f.get("roundCap"),d=h?b2:Ia,p=f.get("show"),g=f.getModel("lineStyle"),v=g.get("width"),m=[u,c];J3(m,!l),u=m[0],c=m[1];for(var y=c-u,b=u,_=[],w=0;p&&w=x&&(D===0?0:a[D-1][0])Math.PI/2&&(fe+=Math.PI)):J==="tangential"?fe=-C-Math.PI/2:Mr(J)&&(fe=J*Math.PI/180),fe===0?f.add(new Ar({style:hn(b,{text:$,x:P,y:te,verticalAlign:L<-.8?"top":L>.8?"bottom":"middle",align:M<-.4?"left":M>.4?"right":"center"},{inheritColor:H}),silent:!0})):f.add(new Ar({style:hn(b,{text:$,x:P,y:te,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:P,originY:te,rotation:fe}))}if(y.get("show")&&F!==_){var U=y.get("distance");U=U?U+c:c;for(var Ce=0;Ce<=w;Ce++){M=Math.cos(C),L=Math.sin(C);var ke=new vi({shape:{x1:M*(p-U)+h,y1:L*(p-U)+d,x2:M*(p-A-U)+h,y2:L*(p-A-U)+d},silent:!0,style:T});T.stroke==="auto"&&ke.setStyle({stroke:a((F+Ce/w)/_)}),f.add(ke),C+=D}C-=D}else C+=x}},e.prototype._renderPointer=function(t,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,d=this._progressEls,p=[],g=t.get(["pointer","show"]),v=t.getModel("progress"),m=v.get("show"),y=t.getData(),b=y.mapDimension("value"),_=+t.get("min"),w=+t.get("max"),S=[_,w],A=[s,l];function C(D,E){var T=y.getItemModel(D),k=T.getModel("pointer"),M=We(k.get("width"),o.r),L=We(k.get("length"),o.r),F=t.get(["pointer","icon"]),U=k.get("offsetCenter"),N=We(U[0],o.r),$=We(U[1],o.r),H=k.get("keepAspect"),P;return F?P=Jn(F,N-M/2,$-L,M,L,null,H):P=new mPe({shape:{angle:-Math.PI/2,width:M,r:L,x:N,y:$}}),P.rotation=-(E+Math.PI/2),P.x=o.cx,P.y=o.cy,P}function x(D,E){var T=v.get("roundCap"),k=T?b2:Ia,M=v.get("overlap"),L=M?v.get("width"):c/y.count(),F=M?o.r-L:o.r-(D+1)*L,U=M?o.r:o.r-D*L,N=new k({shape:{startAngle:s,endAngle:E,cx:o.cx,cy:o.cy,clockwise:u,r0:F,r:U}});return M&&(N.z2=w-y.get(b,D)%w),N}(m||g)&&(y.diff(h).add(function(D){var E=y.get(b,D);if(g){var T=C(D,s);Sn(T,{rotation:-((isNaN(+E)?A[0]:Yr(E,S,A,!0))+Math.PI/2)},t),f.add(T),y.setItemGraphicEl(D,T)}if(m){var k=x(D,s),M=v.get("clip");Sn(k,{shape:{endAngle:Yr(E,S,A,M)}},t),f.add(k),SM(t.seriesIndex,y.dataType,D,k),p[D]=k}}).update(function(D,E){var T=y.get(b,D);if(g){var k=h.getItemGraphicEl(E),M=k?k.rotation:s,L=C(D,M);L.rotation=M,Lr(L,{rotation:-((isNaN(+T)?A[0]:Yr(T,S,A,!0))+Math.PI/2)},t),f.add(L),y.setItemGraphicEl(D,L)}if(m){var F=d[E],U=F?F.shape.endAngle:s,N=x(D,U),$=v.get("clip");Lr(N,{shape:{endAngle:Yr(T,S,A,$)}},t),f.add(N),SM(t.seriesIndex,y.dataType,D,N),p[D]=N}}).execute(),y.each(function(D){var E=y.getItemModel(D),T=E.getModel("emphasis"),k=T.get("focus"),M=T.get("blurScope"),L=T.get("disabled");if(g){var F=y.getItemGraphicEl(D),U=y.getItemVisual(D,"style"),N=U.fill;if(F instanceof Pi){var $=F.style;F.useStyle(ye({image:$.image,x:$.x,y:$.y,width:$.width,height:$.height},U))}else F.useStyle(U),F.type!=="pointer"&&F.setColor(N);F.setStyle(E.getModel(["pointer","itemStyle"]).getItemStyle()),F.style.fill==="auto"&&F.setStyle("fill",a(Yr(y.get(b,D),S,[0,1],!0))),F.z2EmphasisLift=0,Wi(F,E),Rn(F,k,M,L)}if(m){var H=p[D];H.useStyle(y.getItemVisual(D,"style")),H.setStyle(E.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,Wi(H,E),Rn(H,k,M,L)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,n){var i=t.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=Jn(s,n.cx-o/2+We(l[0],n.r),n.cy-o/2+We(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,n,i,a,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),h=new At,d=[],p=[],g=t.isAnimationEnabled(),v=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){d[m]=new Ar({silent:!0}),p[m]=new Ar({silent:!0})}).update(function(m,y){d[m]=s._titleEls[y],p[m]=s._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),b=l.get(u,m),_=new At,w=a(Yr(b,[c,f],[0,1],!0)),S=y.getModel("title");if(S.get("show")){var A=S.get("offsetCenter"),C=o.cx+We(A[0],o.r),x=o.cy+We(A[1],o.r),D=d[m];D.attr({z2:v?0:2,style:hn(S,{x:C,y:x,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:w})}),_.add(D)}var E=y.getModel("detail");if(E.get("show")){var T=E.get("offsetCenter"),k=o.cx+We(T[0],o.r),M=o.cy+We(T[1],o.r),L=We(E.get("width"),o.r),F=We(E.get("height"),o.r),U=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:w,D=p[m],N=E.get("formatter");D.attr({z2:v?0:2,style:hn(E,{x:k,y:M,text:l_(b,N),width:isNaN(L)?null:L,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:U})}),oX(D,{normal:E},b,function(H){return l_(H,N)}),g&&sX(D,m,l,t,{getFormattedLabel:function(H,P,te,J,fe,Ce){return l_(Ce?Ce.interpolatedValue:b,N)}}),_.add(D)}h.add(_)}),this.group.add(h),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(rn),_Pe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return Cv(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(pn);function wPe(r){r.registerChartView(bPe),r.registerSeriesModel(_Pe)}var SPe=["itemStyle","opacity"],APe=function(r){de(e,r);function e(t,n){var i=r.call(this)||this,a=i,o=new Fa,s=new Ar;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,n,!0),i}return e.prototype.updateData=function(t,n,i){var a=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(SPe);c=c??1,i||zs(a),a.useStyle(t.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Sn(a,{style:{opacity:c}},o,n)):Lr(a,{style:{opacity:c},shape:{points:l.points}},o,n),Wi(a,s),this._updateLabel(t,n),Rn(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),c=u.label,f=t.getItemVisual(n,"style"),h=f.fill;$i(o,wi(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:t.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var d=c.linePoints;a.setShape({points:d}),i.textGuideLineConfig={anchor:d?new Ot(d[0][0],d[0][1]):null},Lr(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),NF(i,zF(l),{stroke:h})},e}(La),CPe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new APe(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);vy(u,t,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(rn),xPe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new E1(Qe(this.getData,this),Qe(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return Cv(this,{coordDimensions:["value"],encodeDefaulter:Lt(vF,this)})},e.prototype._defaultLabelLine=function(t){fd(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),i=r.prototype.getDataParams.call(this,t),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(pn);function DPe(r,e){return si(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function EPe(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),i=[],a=e==="ascending",o=0,s=r.count();oHPe)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!TE(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function TE(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var jPe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&Rt(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var i=t.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){B(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],i=Xr(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);B(i,function(a){t.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(rr),qPe=function(r){de(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Ws);function Od(r,e,t,n,i,a){r=r||0;var o=t[1]-t[0];if(i!=null&&(i=np(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=np(s,[0,o]),i=a=np(s,[i,a]),n=0}e[0]=np(e[0],t),e[1]=np(e[1],t);var l=kE(e,n);e[n]+=r;var u=i||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=np(e[n],c);var f;return f=kE(e,n),i!=null&&(f.sign!==l.sign||f.spana&&(e[1-n]=e[n]+f.sign*a),e}function kE(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function np(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var ME=B,FJ=Math.min,BJ=Math.max,I9=Math.floor,YPe=Math.ceil,L9=Wn,ZPe=Math.PI,XPe=function(){function r(e,t,n){this.type="parallel",this._axesMap=nt(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var i=e.dimensions,a=e.parallelAxisIndex;ME(i,function(o,s){var l=a[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new qPe(o,cC(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,i=t.layoutBase,a=t.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+t.axisLength&&s>=i&&s<=i+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var i=n.getData();ME(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),Vg(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=si(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,c=u_(e.get("axisExpandWidth"),l),f=u_(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,d=e.get("axisExpandWindow"),p;if(d)p=u_(d[1]-d[0],l),d[1]=d[0]+p;else{p=u_(c*(f-1),l);var g=e.get("axisExpandCenter")||I9(u/2);d=[c*g-p/2],d[1]=d[0]+p}var v=(s-p)/(u-f);v<3&&(v=0);var m=[I9(L9(d[0]/c,1))+1,YPe(L9(d[1]/c,1))-1],y=v/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:v,axisExpandWindow:d,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),ME(n,function(o,s){var l=(i.axisExpandable?QPe:KPe)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:ZPe/2,vertical:0},f=[u[a].x+e.x,u[a].y+e.y],h=c[a],d=_o();kd(d,d,h),Ul(d,d,f),this._axesLayout[o]={position:f,rotation:h,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];B(o,function(v){s.push(e.mapDimension(v)),l.push(a.get(v).model)});for(var u=this.hasAxisBrushed(),c=n;ca*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Od(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[BJ(0,p-d/2)],i[1]=FJ(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},r}();function u_(r,e){return FJ(BJ(r,e[0]),e[1])}function KPe(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function QPe(r,e){var t=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return r=0;i--)Qo(n[i])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var a=0,o=n.length;anRe}function VJ(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function GJ(r,e,t,n){var i=new At;return i.add(new vr({name:"main",style:hB(t),silent:!0,draggable:!0,cursor:"move",drift:Lt(O9,r,e,i,["n","s","w","e"]),ondragend:Lt(md,e,{isEnd:!0})})),B(n,function(a){i.add(new vr({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Lt(O9,r,e,i,a),ondragend:Lt(md,e,{isEnd:!0})}))}),i}function UJ(r,e,t,n){var i=n.brushStyle.lineWidth||0,a=Hg(i,iRe),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,c=t[0][1],f=t[1][1],h=c-a+i/2,d=f-a+i/2,p=c-o,g=f-s,v=p+i,m=g+i;iu(r,e,"main",o,s,p,g),n.transformable&&(iu(r,e,"w",l,u,a,m),iu(r,e,"e",h,u,a,m),iu(r,e,"n",l,u,v,a),iu(r,e,"s",l,d,v,a),iu(r,e,"nw",l,u,a,a),iu(r,e,"ne",h,u,a,a),iu(r,e,"sw",l,d,a,a),iu(r,e,"se",h,d,a,a))}function gI(r,e){var t=e.__brushOption,n=t.transformable,i=e.childAt(0);i.useStyle(hB(t)),i.attr({silent:!n,cursor:n?"move":"default"}),B([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?vI(r,a[0]):cRe(r,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?oRe[s]+"-resize":null})})}function iu(r,e,t,n,i,a,o){var s=e.childOfName(t);s&&s.setShape(hRe(dB(r,e,[[n,i],[n+a,i+o]])))}function hB(r){return mt({strokeNoScale:!0},r.brushStyle)}function HJ(r,e,t,n){var i=[Ly(r,t),Ly(e,n)],a=[Hg(r,t),Hg(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function uRe(r){return Qh(r.group)}function vI(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=YA(t[e],uRe(r));return n[i]}function cRe(r,e){var t=[vI(r,e[0]),vI(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function O9(r,e,t,n,i,a){var o=t.__brushOption,s=r.toRectRange(o.range),l=WJ(e,i,a);B(n,function(u){var c=aRe[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(HJ(s[0][0],s[1][0],s[0][1],s[1][1])),uB(e,t),md(e,{isEnd:!1})}function fRe(r,e,t,n){var i=e.__brushOption.range,a=WJ(r,t,n);B(i,function(o){o[0]+=a[0],o[1]+=a[1]}),uB(r,e),md(r,{isEnd:!1})}function WJ(r,e,t){var n=r.group,i=n.transformCoordToLocal(e,t),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function dB(r,e,t){var n=zJ(r,e);return n&&n!==vd?n.clipPath(t,r._transform):wt(t)}function hRe(r){var e=Ly(r[0][0],r[1][0]),t=Ly(r[0][1],r[1][1]),n=Hg(r[0][0],r[1][0]),i=Hg(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:i-t}}function dRe(r,e,t){if(!(!r._brushType||gRe(r,e.offsetX,e.offsetY))){var n=r._zr,i=r._covers,a=fB(r,e,t);if(!r._dragging)for(var o=0;on.getWidth()||t<0||t>n.getHeight()}var vC={lineX:N9(0),lineY:N9(1),rect:{createCover:function(r,e){function t(n){return n}return GJ({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=VJ(r);return HJ(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){UJ(r,e,t,n)},updateCommon:gI,contain:yI},polygon:{createCover:function(r,e){var t=new At;return t.add(new Fa({name:"main",style:hB(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new La({name:"main",draggable:!0,drift:Lt(fRe,r,e),ondragend:Lt(md,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:dB(r,e,t)})},updateCommon:gI,contain:yI}};function N9(r){return{createCover:function(e,t){return GJ({toRectRange:function(n){var i=[n,[0,100]];return r&&i.reverse(),i},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=VJ(e),n=Ly(t[0][r],t[1][r]),i=Hg(t[0][r],t[1][r]);return[n,i]},updateCoverShape:function(e,t,n,i){var a,o=zJ(e,t);if(o!==vd&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,a];r&&l.reverse(),UJ(e,t,l,i)},updateCommon:gI,contain:yI}}function jJ(r){return r=pB(r),function(e){return nX(e,r)}}function qJ(r,e){return r=pB(r),function(t){var n=e??t,i=n?r.width:r.height,a=n?r.x:r.y;return[a,a+(i||0)]}}function YJ(r,e,t){var n=pB(r);return function(i,a){return n.contain(a[0],a[1])&&!hC(i,e,t)}}function pB(r){return Nt.create(r)}var vRe=["axisLine","axisTickLabel","axisName"],mRe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new lB(n.getZr())).on("brush",Qe(this._onBrush,this))},e.prototype.render=function(t,n,i,a){if(!yRe(t,n,a)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new At,this.group.add(this._axisGroup),!!t.get("show")){var s=_Re(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,h=l.getAxisLayout(f),d=ye({strokeContainThreshold:c},h),p=new Da(t,d);B(vRe,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,u,t,s,c,i),v1(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Nt.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:jJ(f),isTargetByCursor:YJ(f,s,a),getLinearBrushOtherExtent:qJ(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(bRe(i))},e.prototype._onBrush=function(t){var n=t.areas,i=this.axisModel,a=i.axis,o=Ee(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Tn);function yRe(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function bRe(r){var e=r.axis;return Ee(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function _Re(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var wRe={type:"axisAreaSelect",event:"axisAreaSelected"};function SRe(r){r.registerAction(wRe,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var ARe={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function ZJ(r){r.registerComponentView(WPe),r.registerComponentModel(jPe),r.registerCoordinateSystem("parallel",eRe),r.registerPreprocessor(VPe),r.registerComponentModel(dI),r.registerComponentView(mRe),Ug(r,"parallel",dI,ARe),SRe(r)}function CRe(r){qt(ZJ),r.registerChartView(LPe),r.registerSeriesModel(OPe),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,zPe)}var xRe=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),DRe=function(r){de(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new xRe},e.prototype.buildPath=function(t,n){var i=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+i,n.y2),t.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(t.lineTo(n.x2,n.y2+i),t.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),t.closePath()},e.prototype.highlight=function(){Nu(this)},e.prototype.downplay=function(){zu(this)},e}(Xt),ERe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,n,i){var a=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),h=t.getData("edge"),d=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var g=new DRe,v=Ct(g);v.dataIndex=p.dataIndex,v.seriesIndex=t.seriesIndex,v.dataType="edge";var m=p.getModel(),y=m.getModel("lineStyle"),b=y.get("curveness"),_=p.node1.getLayout(),w=p.node1.getModel(),S=w.get("localX"),A=w.get("localY"),C=p.node2.getLayout(),x=p.node2.getModel(),D=x.get("localX"),E=x.get("localY"),T=p.getLayout(),k,M,L,F,U,N,$,H;g.shape.extent=Math.max(1,T.dy),g.shape.orient=d,d==="vertical"?(k=(S!=null?S*u:_.x)+T.sy,M=(A!=null?A*c:_.y)+_.dy,L=(D!=null?D*u:C.x)+T.ty,F=E!=null?E*c:C.y,U=k,N=M*(1-b)+F*b,$=L,H=M*b+F*(1-b)):(k=(S!=null?S*u:_.x)+_.dx,M=(A!=null?A*c:_.y)+T.sy,L=D!=null?D*u:C.x,F=(E!=null?E*c:C.y)+T.ty,U=k*(1-b)+L*b,N=M,$=k*b+L*(1-b),H=F),g.setShape({x1:k,y1:M,x2:L,y2:F,cpx1:U,cpy1:N,cpx2:$,cpy2:H}),g.useStyle(y.getItemStyle()),z9(g.style,d,p);var P=""+m.get("value"),te=wi(m,"edgeLabel");$i(g,te,{labelFetcher:{getFormattedLabel:function(Ce,ke,Se,be,W,q){return t.getFormattedLabel(Ce,ke,"edge",be,Ml(W,te.normal&&te.normal.get("formatter"),P),q)}},labelDataIndex:p.dataIndex,defaultText:P}),g.setTextConfig({position:"inside"});var J=m.getModel("emphasis");Wi(g,m,"lineStyle",function(Ce){var ke=Ce.getItemStyle();return z9(ke,d,p),ke}),s.add(g),h.setItemGraphicEl(p.dataIndex,g);var fe=J.get("focus");Rn(g,fe==="adjacency"?p.getAdjacentDataIndices():fe==="trajectory"?p.getTrajectoryDataIndices():fe,J.get("blurScope"),J.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),v=p.getModel(),m=v.get("localX"),y=v.get("localY"),b=v.getModel("emphasis"),_=v.get(["itemStyle","borderRadius"])||0,w=new vr({shape:{x:m!=null?m*u:g.x,y:y!=null?y*c:g.y,width:g.dx,height:g.dy,r:_},style:v.getModel("itemStyle").getItemStyle(),z2:10});$i(w,wi(v),{labelFetcher:{getFormattedLabel:function(A,C){return t.getFormattedLabel(A,C,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),w.disableLabelAnimation=!0,w.setStyle("fill",p.getVisual("color")),w.setStyle("decal",p.getVisual("style").decal),Wi(w,v),s.add(w),f.setItemGraphicEl(p.dataIndex,w),Ct(w).dataType="node";var S=b.get("focus");Rn(w,S==="adjacency"?p.getAdjacentDataIndices():S==="trajectory"?p.getTrajectoryDataIndices():S,b.get("blurScope"),b.get("disabled"))}),f.eachItemGraphicEl(function(p,g){var v=f.getItemModel(g);v.get("draggable")&&(p.drift=function(m,y){a._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(TRe(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(rn);function z9(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var n=t.node1.getVisual("color"),i=t.node2.getVisual("color");Ye(n)&&Ye(i)&&(r.fill=new g1(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function TRe(r,e,t){var n=new vr({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Sn(n,{shape:{width:r.width+20}},e,t),n}var kRe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var i=t.edges||t.links,a=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new $r(o[l],this,n));if(a&&i){var u=IJ(a,i,this,!0,c);return u.data}function c(f,h){f.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,v=g.getData().getItemLayout(p);if(v){var m=v.depth,y=g.levelModels[m];y&&(d.parentModel=y)}return d}),h.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,v=g.getGraph().getEdgeByIndex(p),m=v.node1.getLayout();if(m){var y=m.depth,b=g.levelModels[y];b&&(d.parentModel=b)}return d})}},e.prototype.setNodePosition=function(t,n){var i=this.option.data||this.option.nodes,a=i[t];a.localX=n[0],a.localY=n[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Si("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,h=this.getDataParams(t,i).data.name;return Si("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var i=r.prototype.getDataParams.call(this,t,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(t),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(pn);function MRe(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),a=IRe(t,e);t.layoutInfo=a;var o=a.width,s=a.height,l=t.getGraph(),u=l.nodes,c=l.edges;FRe(u);var f=Xr(u,function(g){return g.getLayout().value===0}),h=f.length!==0?0:t.get("layoutIterations"),d=t.get("orient"),p=t.get("nodeAlign");LRe(u,c,n,i,o,s,h,d,p)})}function IRe(r,e){return si(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function LRe(r,e,t,n,i,a,o,s,l){BRe(r,e,t,i,a,s,l),NRe(r,e,a,i,n,o,s),qRe(r,s)}function FRe(r){B(r,function(e){var t=Yc(e.outEdges,x2),n=Yc(e.inEdges,x2),i=e.getValue()||0,a=Math.max(t,n,i);e.setLayout({value:a},!0)})}function BRe(r,e,t,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h=0;m&&v.depth>d&&(d=v.depth),g.setLayout({depth:m?v.depth:f},!0),a==="vertical"?g.setLayout({dy:t},!0):g.setLayout({dx:t},!0);for(var y=0;yf-1?d:f-1;o&&o!=="left"&&ORe(r,o,a,A);var C=a==="vertical"?(i-t)/A:(n-t)/A;RRe(r,C,a)}function XJ(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function ORe(r,e,t,n){if(e==="right"){for(var i=[],a=r,o=0;a.length;){for(var s=0;s0;a--)l*=.99,GRe(s,l,o),IE(s,i,t,n,o),jRe(s,l,o),IE(s,i,t,n,o)}function zRe(r,e){var t=[],n=e==="vertical"?"y":"x",i=yM(r,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),B(i.keys,function(a){t.push(i.buckets.get(a))}),t}function VRe(r,e,t,n,i,a){var o=1/0;B(r,function(s){var l=s.length,u=0;B(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(t-(l-1)*i)/u;c0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+e;var p=i==="vertical"?n:t;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=f-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function GRe(r,e,t){B(r.slice().reverse(),function(n){B(n,function(i){if(i.outEdges.length){var a=Yc(i.outEdges,URe,t)/Yc(i.outEdges,x2);if(isNaN(a)){var o=i.outEdges.length;a=o?Yc(i.outEdges,HRe,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(a-mf(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-mf(i,t))*e;i.setLayout({y:l},!0)}}})})}function URe(r,e){return mf(r.node2,e)*r.getValue()}function HRe(r,e){return mf(r.node2,e)}function WRe(r,e){return mf(r.node1,e)*r.getValue()}function $Re(r,e){return mf(r.node1,e)}function mf(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function x2(r){return r.getValue()}function Yc(r,e,t){for(var n=0,i=r.length,a=-1;++ao&&(o=l)}),B(n,function(s){var l=new bi({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&B(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function ZRe(r){r.registerChartView(ERe),r.registerSeriesModel(kRe),r.registerLayout(MRe),r.registerVisual(YRe),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var KJ=function(){function r(){}return r.prototype.getInitialData=function(e,t){var n,i=t.getComponent("xAxis",this.get("xAxisIndex")),a=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],d=[i,a],p=d[c].get("type"),g=d[1-c].get("type"),v=e.data;if(v&&l){var m=[];B(v,function(_,w){var S;De(_)?(S=_.slice(),_.unshift(w)):De(_.value)?(S=ye({},_),S.value=S.value.slice(),_.value.unshift(w)):S=_,m.push(S)}),e.data=m}var y=this.defaultValueDimensions,b=[{name:f,type:p2(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:p2(g),dimsDef:y.slice()}];return Cv(this,{coordDimensions:b,dimensionsCount:y.length+1,encodeDefaulter:Lt(kX,b,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),QJ=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(pn);ri(QJ,KJ,!0);var XRe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=V9(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(zs(f),JJ(h,f,a,u)):f=V9(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(t){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(rn),KRe=function(){function r(){}return r}(),QRe=function(r){de(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new KRe},e.prototype.buildPath=function(t,n){var i=n.points,a=0;for(t.moveTo(i[a][0],i[a][1]),a++;a<4;a++)t.lineTo(i[a][0],i[a][1]);for(t.closePath();ag){var _=[m,b];n.push(_)}}}return{boxData:t,outliers:n}}var a5e={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==sa){var n="";Hr(n)}var i=i5e(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function o5e(r){r.registerSeriesModel(QJ),r.registerChartView(XRe),r.registerLayout(e5e),r.registerTransform(a5e)}var s5e=["color","borderColor"],l5e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){Ef(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&G9(u,f))return;var h=LE(f,c,!0);Sn(h,{shape:{points:f.ends}},t,c),FE(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var d=n.getItemLayout(c);if(s&&G9(u,d)){a.remove(h);return}h?(Lr(h,{shape:{points:d.ends}},t,c),zs(h)):h=LE(d),FE(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),U9(t,this.group);var n=t.get("clip",!0)?C1(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=LE(s);FE(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){U9(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(rn),u5e=function(){function r(){}return r}(),c5e=function(r){de(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new u5e},e.prototype.buildPath=function(t,n){var i=n.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(Xt);function LE(r,e,t){var n=r.ends;return new c5e({shape:{points:t?f5e(n,r):n},z2:100})}function G9(r,e){for(var t=!0,n=0;n0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(i=t.get(["itemStyle","borderColorDoji"]));var a=t.getModel("itemStyle").getItemStyle(s5e);e.useStyle(a),e.style.fill=null,e.style.stroke=i}var eee=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,i){var a=n.getItemLayout(t);return a&&i.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(pn);ri(eee,KJ,!0);function d5e(r){!r||!De(r.series)||B(r.series,function(e){_t(e)&&e.type==="k"&&(e.type="candlestick")})}var p5e=["itemStyle","borderColor"],g5e=["itemStyle","borderColor0"],v5e=["itemStyle","borderColorDoji"],m5e=["itemStyle","color"],y5e=["itemStyle","color0"],b5e={seriesType:"candlestick",plan:_v(),performRawSeries:!0,reset:function(r,e){function t(a,o){return o.get(a>0?m5e:y5e)}function n(a,o){return o.get(a===0?v5e:a>0?p5e:g5e)}if(!e.isSeriesFiltered(r)){var i=r.pipelineContext.large;return!i&&{progress:function(a,o){for(var s;(s=a.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,c=l.getItemStyle();c.fill=t(u,l),c.stroke=n(u,l)||c.fill;var f=o.ensureUniqueItemVisual(s,"style");ye(f,c)}}}}}},_5e={seriesType:"candlestick",plan:_v(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=w5e(r,t),i=0,a=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=Ee(t.mapDimensionsAll(o[a]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],h=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:d};function d(g,v){for(var m,y=v.getStore();(m=g.next())!=null;){var b=y.get(s,m),_=y.get(u,m),w=y.get(c,m),S=y.get(f,m),A=y.get(h,m),C=Math.min(_,w),x=Math.max(_,w),D=U(C,b),E=U(x,b),T=U(S,b),k=U(A,b),M=[];N(M,E,0),N(M,D,1),M.push(H(k),H(E),H(T),H(D));var L=v.getItemModel(m),F=!!L.get(["itemStyle","borderColorDoji"]);v.setItemLayout(m,{sign:H9(y,m,_,w,c,F),initBaseline:_>w?E[a]:D[a],ends:M,brushRect:$(S,A,b)})}function U(P,te){var J=[];return J[i]=te,J[a]=P,isNaN(te)||isNaN(P)?[NaN,NaN]:e.dataToPoint(J)}function N(P,te,J){var fe=te.slice(),Ce=te.slice();fe[i]=aw(fe[i]+n/2,1,!1),Ce[i]=aw(Ce[i]-n/2,1,!0),J?P.push(fe,Ce):P.push(Ce,fe)}function $(P,te,J){var fe=U(P,J),Ce=U(te,J);return fe[i]-=n/2,Ce[i]-=n/2,{x:fe[0],y:fe[1],width:n,height:Ce[1]-fe[1]}}function H(P){return P[i]=aw(P[i],1),P}}function p(g,v){for(var m=xl(g.count*4),y=0,b,_=[],w=[],S,A=v.getStore(),C=!!r.get(["itemStyle","borderColorDoji"]);(S=g.next())!=null;){var x=A.get(s,S),D=A.get(u,S),E=A.get(c,S),T=A.get(f,S),k=A.get(h,S);if(isNaN(x)||isNaN(T)||isNaN(k)){m[y++]=NaN,y+=3;continue}m[y++]=H9(A,S,D,E,c,C),_[i]=x,_[a]=T,b=e.dataToPoint(_,null,w),m[y++]=b?b[0]:NaN,m[y++]=b?b[1]:NaN,_[a]=k,b=e.dataToPoint(_,null,w),m[y++]=b?b[1]:NaN}v.setLayout("largePoints",m)}}};function H9(r,e,t,n,i,a){var o;return t>n?o=-1:t0?r.get(i,e-1)<=n?1:-1:1,o}function w5e(r,e){var t=r.getBaseAxis(),n,i=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=We(Mt(r.get("barMaxWidth"),i),i),o=We(Mt(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?We(s,i):Math.max(Math.min(i/2,a),o)}function S5e(r){r.registerChartView(l5e),r.registerSeriesModel(eee),r.registerPreprocessor(d5e),r.registerVisual(b5e),r.registerLayout(_5e)}function W9(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var A5e=function(r){de(e,r);function e(t,n){var i=r.call(this)||this,a=new S1(t,n),o=new At;return i.add(a),i.add(o),i.updateData(t,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,i=t.color,a=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;pt(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,i,a,o){if(n>0){t.__t=0;var s=this,l=t.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(t)});a||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Bc(t.__p1,t.__cp1)+Bc(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,i){this.childAt(0).updateData(t,n,i),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,i=t.__p2,a=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=xi,c=nM;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=t.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=t.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);t.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];t.x=f[0]*(1-c)+c*h[0],t.y=f[1]*(1-c)+c*h[1];var d=t.__t<1?h[0]-f[0]:f[0]-h[0],p=t.__t<1?h[1]-f[1]:f[1]-h[1];t.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e}(tee),T5e=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),k5e=function(r){de(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new T5e},e.prototype.buildPath=function(t,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){t.moveTo(i[o++],i[o++]);for(var l=1;l0){var d=(u+f)/2-(c-h)*a,p=(c+h)/2-(f-u)*a;t.quadraticCurveTo(d,p,f,h)}else t.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var f=a[u++],h=a[u++],d=1;d0){var v=(f+p)/2-(h-g)*o,m=(h+g)/2-(p-f)*o;if(kZ(f,h,v,m,p,g,s,t,n))return l}else if(_c(f,h,p,g,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();if(t=i[0],n=i[1],a.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),nee={seriesType:"lines",plan:_v(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(t){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=t.get("clip",!0)&&C1(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,i){var a=t.getData(),o=this._updateLineDraw(a,t);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,i){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,i){var a=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=nee.reset(t,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new M5e:new sB(o?a?E5e:ree:a?tee:oB),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e}(rn),L5e=typeof Uint32Array>"u"?Array:Uint32Array,F5e=typeof Float64Array>"u"?Array:Float64Array;function $9(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=Ee(e,function(t){var n=[t[0].coord,t[1].coord],i={coords:n};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),z3([i,t[0],t[1]])}))}var B5e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],$9(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if($9(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=WS(this._flatCoords,n.flatCoords),this._flatCoordsOffset=WS(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(pn);function c_(r){return r instanceof Array||(r=[r,r]),r}var O5e={seriesType:"lines",reset:function(r){var e=c_(r.get("symbol")),t=c_(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function i(a,o){var s=a.getItemModel(o),l=c_(s.getShallow("symbol",!0)),u=c_(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function P5e(r){r.registerChartView(I5e),r.registerSeriesModel(B5e),r.registerLayout(nee),r.registerVisual(O5e)}var R5e=256,N5e=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=hf.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),d=e.length;f.width=t,f.height=n;for(var p=0;p0){var T=o(b)?l:u;b>0&&(b=b*D+C),w[S++]=T[E],w[S++]=T[E+1],w[S++]=T[E+2],w[S++]=T[E+3]*b*256}else S+=4}return h.putImageData(_,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=hf.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,i=n[t]||(n[t]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},r}();function z5e(r,e,t){var n=r[1]-r[0];e=Ee(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function j9(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var G5e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):j9(o)&&this._renderOnGeo(o,t,a,i)},e.prototype.incrementalPrepareRender=function(t,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,i,a){var o=n.coordinateSystem;o&&(j9(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,a,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Ef(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,n,i,a,o){var s=t.coordinateSystem,l=Fd(s,"cartesian2d"),u,c,f,h;if(l){var d=s.getAxis("x"),p=s.getAxis("y");u=d.getBandWidth()+.5,c=p.getBandWidth()+.5,f=d.scale.getExtent(),h=p.scale.getExtent()}for(var g=this.group,v=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),b=t.getModel(["select","itemStyle"]).getItemStyle(),_=t.get(["itemStyle","borderRadius"]),w=wi(t),S=t.getModel("emphasis"),A=S.get("focus"),C=S.get("blurScope"),x=S.get("disabled"),D=l?[v.mapDimension("x"),v.mapDimension("y"),v.mapDimension("value")]:[v.mapDimension("time"),v.mapDimension("value")],E=i;Ef[1]||Lh[1])continue;var F=s.dataToPoint([M,L]);T=new vr({shape:{x:F[0]-u/2,y:F[1]-c/2,width:u,height:c},style:k})}else{if(isNaN(v.get(D[1],E)))continue;T=new vr({z2:1,shape:s.dataToRect([v.get(D[0],E)]).contentShape,style:k})}if(v.hasItemOption){var U=v.getItemModel(E),N=U.getModel("emphasis");m=N.getModel("itemStyle").getItemStyle(),y=U.getModel(["blur","itemStyle"]).getItemStyle(),b=U.getModel(["select","itemStyle"]).getItemStyle(),_=U.get(["itemStyle","borderRadius"]),A=N.get("focus"),C=N.get("blurScope"),x=N.get("disabled"),w=wi(U)}T.shape.r=_;var $=t.getRawValue(E),H="-";$&&$[2]!=null&&(H=$[2]+""),$i(T,w,{labelFetcher:t,labelDataIndex:E,defaultOpacity:k.opacity,defaultText:H}),T.ensureState("emphasis").style=m,T.ensureState("blur").style=y,T.ensureState("select").style=b,Rn(T,A,C,x),T.incremental=o,o&&(T.states.emphasis.hoverLayer=!0),g.add(T),v.setItemGraphicEl(E,T),this._progressiveEls&&this._progressiveEls.push(T)}},e.prototype._renderOnGeo=function(t,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new N5e;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),v=p-h,m=g-d,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],b=l.mapArray(y,function(A,C,x){var D=t.dataToPoint([A,C]);return D[0]-=h,D[1]-=d,D.push(x),D}),_=i.getExtent(),w=i.type==="visualMap.continuous"?V5e(_,i.option.range):z5e(_,i.getPieceList(),i.option.selected);u.update(b,v,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},w);var S=new Pi({style:{width:v,height:m,x:h,y:d,image:u.canvas},silent:!0});this.group.add(S)},e.type="heatmap",e}(rn),U5e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return Xu(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=y1.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(pn);function H5e(r){r.registerChartView(G5e),r.registerSeriesModel(U5e)}var W5e=["itemStyle","borderWidth"],q9=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],PE=new Zu,$5e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:q9[+c],categoryDim:q9[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=Z9(o,p),v=Y9(o,p,g,h),m=X9(o,h,v);o.setItemGraphicEl(p,m),a.add(m),Q9(m,h,v)}}).update(function(p,g){var v=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(v);return}var m=Z9(o,p),y=Y9(o,p,m,h),b=uee(o,y);v&&b!==v.__pictorialShapeStr&&(a.remove(v),o.setItemGraphicEl(p,null),v=null),v?Q5e(v,h,y):v=X9(o,h,y,!0),o.setItemGraphicEl(p,v),v.__pictorialSymbolMeta=y,a.add(v),Q9(v,h,y)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&K9(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=t.get("clip",!0)?C1(t.coordinateSystem,!1,t):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,n){var i=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(o){K9(a,Ct(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(rn);function Y9(r,e,t,n){var i=r.getItemLayout(e),a=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),h={dataIndex:e,layout:i,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};j5e(t,a,i,n,h),q5e(r,e,i,a,o,h.boundingLength,h.pxSign,c,n,h),Y5e(t,h.symbolScale,u,n,h);var d=h.symbolSize,p=Id(t.get("symbolOffset"),d);return Z5e(t,d,i,a,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function j5e(r,e,t,n,i){var a=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[a.wh]<=0),c;if(De(o)){var f=[RE(s,o[0])-l,RE(s,o[1])-l];f[1]0?1:-1}function RE(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function q5e(r,e,t,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(t[f.wh]),d=r.getItemVisual(e,"symbolSize"),p;De(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[f.index]=We(p[f.index],h),p[c.index]=We(p[c.index],n?h:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function Y5e(r,e,t,n,i){var a=r.get(W5e)||0;a&&(PE.attr({scaleX:e[0],scaleY:e[1],rotation:t}),PE.updateTransform(),a/=PE.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function Z5e(r,e,t,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,d=c.valueDim,p=f.pxSign,g=Math.max(e[d.index]+s,0),v=g;if(n){var m=Math.abs(l),y=ki(r.get("symbolMargin"),"15%")+"",b=!1;y.lastIndexOf("!")===y.length-1&&(b=!0,y=y.slice(0,y.length-1));var _=We(y,e[d.index]),w=Math.max(g+_*2,0),S=b?0:_*2,A=gZ(n),C=A?n:J9((m+S)/w),x=m-C*g;_=x/2/(b?C:Math.max(C-1,1)),w=g+_*2,S=b?0:_*2,!A&&n!=="fixed"&&(C=u?J9((Math.abs(u)+S)/w):0),v=C*w-S,f.repeatTimes=C,f.symbolMargin=_}var D=p*(v/2),E=f.pathPosition=[];E[h.index]=t[h.wh]/2,E[d.index]=o==="start"?D:o==="end"?l-D:l/2,a&&(E[0]+=a[0],E[1]+=a[1]);var T=f.bundlePosition=[];T[h.index]=t[h.xy],T[d.index]=t[d.xy];var k=f.barRectShape=ye({},t);k[d.wh]=p*Math.max(Math.abs(t[d.wh]),Math.abs(E[d.index]+D)),k[h.wh]=t[h.wh];var M=f.clipShape={};M[h.xy]=-t[h.xy],M[h.wh]=c.ecSize[h.wh],M[d.xy]=0,M[d.wh]=t[d.wh]}function iee(r){var e=r.symbolPatternSize,t=Jn(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function aee(r,e,t,n){var i=r.__pictorialBundle,a=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=a[e.valueDim.index]+o+t.symbolMargin*2;for(gB(r,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:m<0)&&(y=u-1-g),v[l.index]=f*(y-u/2+.5)+s[l.index],{x:v[0],y:v[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function oee(r,e,t,n){var i=r.__pictorialBundle,a=r.__pictorialMainPath;a?tg(a,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(a=r.__pictorialMainPath=iee(t),i.add(a),tg(a,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function see(r,e,t){var n=ye({},e.barRectShape),i=r.__pictorialBarRect;i?tg(i,null,{shape:n},e,t):(i=r.__pictorialBarRect=new vr({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,r.add(i))}function lee(r,e,t,n){if(t.symbolClip){var i=r.__pictorialClipPath,a=ye({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)Lr(i,{shape:a},s,l);else{a[o.wh]=0,i=new vr({shape:a}),r.__pictorialBundle.setClipPath(i),r.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],Md[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function Z9(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=X5e,t.isAnimationEnabled=K5e,t}function X5e(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function K5e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function X9(r,e,t,n){var i=new At,a=new At;return i.add(a),i.__pictorialBundle=a,a.x=t.bundlePosition[0],a.y=t.bundlePosition[1],t.symbolRepeat?aee(i,e,t):oee(i,e,t),see(i,t,n),lee(i,e,t,n),i.__pictorialShapeStr=uee(r,t),i.__pictorialSymbolMeta=t,i}function Q5e(r,e,t){var n=t.animationModel,i=t.dataIndex,a=r.__pictorialBundle;Lr(a,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,i),t.symbolRepeat?aee(r,e,t,!0):oee(r,e,t,!0),see(r,t,!0),lee(r,e,t,!0)}function K9(r,e,t,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];gB(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),B(a,function(o){pf(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function uee(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function gB(r,e,t){B(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function tg(r,e,t,n,i,a){e&&r.attr(e),n.symbolClip&&!i?t&&r.attr(t):t&&Md[i?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,a)}function Q9(r,e,t){var n=t.dataIndex,i=t.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");gB(r,function(g){if(g instanceof Pi){var v=g.style;g.useStyle(ye({image:v.image,x:v.x,y:v.y,width:v.width,height:v.height},t.style))}else g.useStyle(t.style);var m=g.ensureState("emphasis");m.style=o,h&&(m.scaleX=g.scaleX*1.1,m.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=t.z2});var d=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,$i(p,wi(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Gg(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:d}),Rn(r,c,f,a.get("disabled"))}function J9(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var J5e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Tf(Dy.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Dy);function eNe(r){r.registerChartView($5e),r.registerSeriesModel(J5e),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Lt(jK,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,qK("pictorialBar"))}var tNe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(v){return v.name}var d=new Vu(this._layersSeries||[],l,h,h),p=[];d.add(Qe(g,this,"add")).update(Qe(g,this,"update")).remove(Qe(g,this,"remove")).execute();function g(v,m,y){var b=o._layers;if(v==="remove"){s.remove(b[m]);return}for(var _=[],w=[],S,A=l[m].indices,C=0;Ca&&(a=s),n.push(s)}for(var u=0;ua&&(a=f)}return{y0:i,max:a}}function oNe(r){r.registerChartView(tNe),r.registerSeriesModel(nNe),r.registerLayout(iNe),r.registerProcessor(D1("themeRiver"))}var sNe=2,lNe=4,t7=function(r){de(e,r);function e(t,n,i,a){var o=r.call(this)||this;o.z2=sNe,o.textConfig={inside:!0},Ct(o).seriesIndex=n.seriesIndex;var s=new Ar({z2:lNe,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,i,a),o}return e.prototype.updateData=function(t,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Ct(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=ye({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var d=n.getVisual("decal");d&&(h.decal=zg(d,o));var p=Rh(l.getModel("itemStyle"),f,!0);ye(f,p),B(Ma,function(y){var b=s.ensureState(y),_=l.getModel([y,"itemStyle"]);b.style=_.getItemStyle();var w=Rh(_,f);w&&(b.shape=w)}),t?(s.setShape(f),s.shape.r=c.r0,Sn(s,{shape:{r:c.r}},i,n.dataIndex)):(Lr(s,{shape:f},i),zs(s)),s.useStyle(h),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var v=u.get("focus"),m=v==="ancestor"?n.getAncestorsIndices():v==="descendant"?n.getDescendantIndices():v;Rn(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)M&&!hy(F-M)&&F0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,t,n,i):(o.virtualPiece=new t7(y,t,n,i),c.add(o.virtualPiece)),b.piece.off("click"),o.virtualPiece.on("click",function(_){o._rootToNode(b.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=t.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";o2(u,c)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:bI,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=t[0]-a.cx,s=t[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(rn),hNe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var i={name:t.name,children:t.data};cee(i);var a=this._levelModels=Ee(t.levels||[],function(l){return new $r(l,this,n)},this),o=eB.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=pC(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){gJ(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(pn);function cee(r){var e=0;B(r.children,function(n){cee(n);var i=n.value;De(i)&&(i=i[0]),e+=i});var t=r.value;De(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),De(r.value)?r.value[0]=t:r.value=t}var n7=Math.PI/180;function dNe(r,e,t){e.eachSeriesByType(r,function(n){var i=n.get("center"),a=n.get("radius");De(a)||(a=[0,a]),De(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=We(i[0],o),c=We(i[1],s),f=We(a[0],l/2),h=We(a[1],l/2),d=-n.get("startAngle")*n7,p=n.get("minAngle")*n7,g=n.getData().tree.root,v=n.getViewRoot(),m=v.depth,y=n.get("sort");y!=null&&fee(v,y);var b=0;B(v.children,function(F){!isNaN(F.getValue())&&b++});var _=v.getValue(),w=Math.PI/(_||b)*2,S=v.depth>0,A=v.height-(S?-1:1),C=(h-f)/(A||1),x=n.get("clockwise"),D=n.get("stillShowZeroSum"),E=x?1:-1,T=function(F,U){if(F){var N=U;if(F!==g){var $=F.getValue(),H=_===0&&D?w:$*w;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&Ye(s)&&(s=oM(s,(n.depth-1)/(a-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");ye(u,l)})})}function vNe(r){r.registerChartView(fNe),r.registerSeriesModel(hNe),r.registerLayout(Lt(dNe,"sunburst")),r.registerProcessor(Lt(D1,"sunburst")),r.registerVisual(gNe),cNe(r)}var i7={color:"fill",borderColor:"stroke"},mNe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Mu=yr(),yNe=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return Xu(null,this)},e.prototype.getDataParams=function(t,n,i){var a=r.prototype.getDataParams.call(this,t,n);return i&&(a.info=Mu(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(pn);function bNe(r,e){return e=e||[0,0],Ee(["x","y"],function(t,n){var i=this.getAxis(t),a=e[n],o=r[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function _Ne(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Qe(bNe,r)}}}function wNe(r,e){return e=e||[0,0],Ee([0,1],function(t){var n=e[t],i=r[t]/2,a=[],o=[];return a[t]=n-i,o[t]=n+i,a[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(a)[t]-this.dataToPoint(o)[t])},this)}function SNe(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:Qe(wNe,r)}}}function ANe(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,i=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-i)-t.dataToCoord(n+i))}function CNe(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Qe(ANe,r)}}}function xNe(r,e){return e=e||[0,0],Ee(["Radius","Angle"],function(t,n){var i="get"+t+"Axis",a=this[i](),o=e[n],s=r[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function DNe(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=r.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:Qe(xNe,r)}}}function ENe(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,i){return r.dataToPoint(n,i)}}}}function hee(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||et(r,"text")))}function dee(r,e,t){var n=r,i,a,o;if(e==="text")o=n;else{o={},et(n,"text")&&(o.text=n.text),et(n,"rich")&&(o.rich=n.rich),et(n,"textFill")&&(o.fill=n.textFill),et(n,"textStroke")&&(o.stroke=n.textStroke),et(n,"fontFamily")&&(o.fontFamily=n.fontFamily),et(n,"fontSize")&&(o.fontSize=n.fontSize),et(n,"fontStyle")&&(o.fontStyle=n.fontStyle),et(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=et(n,"textPosition");t?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),et(n,"textPosition")&&(i.position=n.textPosition),et(n,"textOffset")&&(i.offset=n.textOffset),et(n,"textRotation")&&(i.rotation=n.textRotation),et(n,"textDistance")&&(i.distance=n.textDistance)}return a7(o,r),B(o.rich,function(l){a7(l,l)}),{textConfig:i,textContent:a}}function a7(r,e){e&&(e.font=e.textFont||e.font,et(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),et(e,"textAlign")&&(r.align=e.textAlign),et(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),et(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),et(e,"textWidth")&&(r.width=e.textWidth),et(e,"textHeight")&&(r.height=e.textHeight),et(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),et(e,"textPadding")&&(r.padding=e.textPadding),et(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),et(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),et(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),et(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),et(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),et(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),et(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function o7(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var i=n.textPosition.indexOf("inside")>=0,a=r.fill||"#000";s7(n,e);var o=n.textFill==null;return i?o&&(n.textFill=t.insideFill||"#fff",!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||"#000"),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,B(e.rich,function(s){s7(s,s)}),n}function s7(r,e){e&&(et(e,"fill")&&(r.textFill=e.fill),et(e,"stroke")&&(r.textStroke=e.fill),et(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),et(e,"font")&&(r.font=e.font),et(e,"fontStyle")&&(r.fontStyle=e.fontStyle),et(e,"fontWeight")&&(r.fontWeight=e.fontWeight),et(e,"fontSize")&&(r.fontSize=e.fontSize),et(e,"fontFamily")&&(r.fontFamily=e.fontFamily),et(e,"align")&&(r.textAlign=e.align),et(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),et(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),et(e,"width")&&(r.textWidth=e.width),et(e,"height")&&(r.textHeight=e.height),et(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),et(e,"padding")&&(r.textPadding=e.padding),et(e,"borderColor")&&(r.textBorderColor=e.borderColor),et(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),et(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),et(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),et(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),et(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),et(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),et(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),et(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),et(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),et(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var pee={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},l7=nr(pee);Gl(Hl,function(r,e){return r[e]=1,r},{});Hl.join(", ");var D2=["","style","shape","extra"],Wg=yr();function vB(r,e,t,n,i){var a=r+"Animation",o=dv(r,n,i)||{},s=Wg(e).userDuring;return o.duration>0&&(o.during=s?Qe(LNe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),ye(o,t[a]),o}function fw(r,e,t,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=Wg(r),u=e.style;l.userDuring=e.during;var c={},f={};if(BNe(r,e,f),c7("shape",e,f),c7("extra",e,f),!a&&s&&(FNe(r,e,c),u7("shape",r,e,c),u7("extra",r,e,c),ONe(r,e,u,c)),f.style=u,TNe(r,f,o),MNe(r,e),s)if(a){var h={};B(D2,function(p){var g=p?e[p]:e;g&&g.enterFrom&&(p&&(h[p]=h[p]||{}),ye(p?h[p]:h,g.enterFrom))});var d=vB("enter",r,e,t,i);d.duration>0&&r.animateFrom(h,d)}else kNe(r,e,i||0,t,c);gee(r,e),u?r.dirty():r.markRedraw()}function gee(r,e){for(var t=Wg(r).leaveToProps,n=0;n0&&r.animateFrom(i,a)}}function MNe(r,e){et(e,"silent")&&(r.silent=e.silent),et(e,"ignore")&&(r.ignore=e.ignore),r instanceof is&&et(e,"invisible")&&(r.invisible=e.invisible),r instanceof Xt&&et(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var nl={},INe={setTransform:function(r,e){return nl.el[r]=e,this},getTransform:function(r){return nl.el[r]},setShape:function(r,e){var t=nl.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=nl.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=nl.el,n=t.style;return n&&(n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=nl.el.style;if(e)return e[r]},setExtra:function(r,e){var t=nl.el.extra||(nl.el.extra={});return t[r]=e,this},getExtra:function(r){var e=nl.el.extra;if(e)return e[r]}};function LNe(){var r=this,e=r.el;if(e){var t=Wg(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}nl.el=e,n(INe)}}function u7(r,e,t,n){var i=t[r];if(i){var a=e[r],o;if(a){var s=t.transition,l=i.transition;if(l)if(!o&&(o=n[r]={}),td(l))ye(o,a);else for(var u=Qr(l),c=0;c=0){!o&&(o=n[r]={});for(var d=nr(a),c=0;c=0)){var h=r.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var p=nr(t),u=0;u=0?e.getStore().get(U,L):void 0}var N=e.get(F.name,L),$=F&&F.ordinalMeta;return $?$.categories[N]:N}function S(M,L){L==null&&(L=u);var F=e.getItemVisual(L,"style"),U=F&&F.fill,N=F&&F.opacity,$=y(L,Gc).getItemStyle();U!=null&&($.fill=U),N!=null&&($.opacity=N);var H={inheritColor:Ye(U)?U:"#000"},P=b(L,Gc),te=hn(P,null,H,!1,!0);te.text=P.getShallow("show")?Mt(r.getFormattedLabel(L,Gc),Gg(e,L)):null;var J=i2(P,H,!1);return x(M,$),$=o7($,te,J),M&&C($,M),$.legacy=!0,$}function A(M,L){L==null&&(L=u);var F=y(L,Iu).getItemStyle(),U=b(L,Iu),N=hn(U,null,null,!0,!0);N.text=U.getShallow("show")?Ml(r.getFormattedLabel(L,Iu),r.getFormattedLabel(L,Gc),Gg(e,L)):null;var $=i2(U,null,!0);return x(M,F),F=o7(F,N,$),M&&C(F,M),F.legacy=!0,F}function C(M,L){for(var F in L)et(L,F)&&(M[F]=L[F])}function x(M,L){M&&(M.textFill&&(L.textFill=M.textFill),M.textPosition&&(L.textPosition=M.textPosition))}function D(M,L){if(L==null&&(L=u),et(i7,M)){var F=e.getItemVisual(L,"style");return F?F[i7[M]]:null}if(et(mNe,M))return e.getItemVisual(L,M)}function E(M){if(a.type==="cartesian2d"){var L=a.getBaseAxis();return BLe(mt({axis:L},M))}}function T(){return t.getCurrentSeriesIndices()}function k(M){return uF(M,t)}}function $Ne(r){var e={};return B(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function GE(r,e,t,n,i,a,o){if(!n){a.remove(e);return}var s=wB(r,e,t,n,i,a);return s&&o.setItemGraphicEl(t,s),s&&Rn(s,n.focus,n.blurScope,n.emphasisDisabled),s}function wB(r,e,t,n,i,a){var o=-1,s=e;e&&bee(e,n,i)&&(o=Ut(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=bB(n),s&&GNe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Lo.normal.cfg=Lo.normal.conOpt=Lo.emphasis.cfg=Lo.emphasis.conOpt=Lo.blur.cfg=Lo.blur.conOpt=Lo.select.cfg=Lo.select.conOpt=null,Lo.isLegacy=!1,qNe(u,t,n,i,l,Lo),jNe(u,t,n,i,l),_B(r,u,t,n,Lo,i,l),et(n,"info")&&(Mu(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function bee(r,e,t){var n=Mu(r),i=e.type,a=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&QNe(a)&&_ee(a)!==n.customPathData||i==="image"&&et(o,"image")&&o.image!==n.customImagePath}function jNe(r,e,t,n,i){var a=t.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var o=r.getClipPath();o&&bee(o,a,n)&&(o=null),o||(o=bB(a),r.setClipPath(o)),_B(null,o,e,a,null,n,i)}}function qNe(r,e,t,n,i,a){if(!r.isGroup){h7(t,null,a),h7(t,Iu,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=bB(o),r.setTextContent(c)),_B(null,c,e,o,null,n,i);for(var f=o&&o.style,h=0;h=c;d--){var p=e.childAt(d);ZNe(e,p,i)}}}function ZNe(r,e,t){e&&mC(e,Mu(r).option,t)}function XNe(r){new Vu(r.oldChildren,r.newChildren,d7,d7,r).add(p7).update(p7).remove(KNe).execute()}function d7(r,e){var t=r&&r.name;return t??zNe+e}function p7(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,i=e!=null?t.oldChildren[e]:null;wB(t.api,i,t.dataIndex,n,t.seriesModel,t.group)}function KNe(r){var e=this.context,t=e.oldChildren[r];t&&mC(t,Mu(t).option,e.seriesModel)}function _ee(r){return r&&(r.pathData||r.d)}function QNe(r){return r&&(et(r,"pathData")||et(r,"d"))}function JNe(r){r.registerChartView(UNe),r.registerSeriesModel(yNe)}var _h=yr(),g7=wt,UE=Qe,AB=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,i){var a=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,t,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new At,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var h=Lt(v7,t,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}y7(s,t,!0),this._renderHandle(a)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),i=e.axis,a=i.type==="category",o=t.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=qF(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,i,a){},r.prototype.createPointerEl=function(e,t,n,i){var a=t.pointer;if(a){var o=_h(e).pointerEl=new Md[a.type](g7(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,i){if(t.label){var a=_h(e).labelEl=new Ar(g7(t.label));e.add(a),m7(a,i)}},r.prototype.updatePointerEl=function(e,t,n){var i=_h(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,i){var a=_h(e).labelEl;a&&(a.setStyle(t.label.style),n(a,{x:t.label.x,y:t.label.y}),m7(a,i))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=t.getModel("handle"),o=t.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=m1(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Pu(u.event)},onmousedown:UE(this._onHandleDragMove,this,0,0),drift:UE(this._onHandleDragMove,this),ondragend:UE(this._onHandleDragEnd,this)}),n.add(i)),y7(i,t,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");De(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,wv(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){v7(this._axisPointerModel,!t&&this._moveAnimation,this._handle,HE(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(HE(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(HE(i)),_h(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),_y(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r}();function v7(r,e,t,n){wee(_h(t).lastProp,n)||(_h(t).lastProp=n,e?Lr(t,n,r):(t.stopAnimation(),t.attr(n)))}function wee(r,e){if(_t(r)&&_t(e)){var t=!0;return B(e,function(n,i){t=t&&wee(r[i],n)}),!!t}else return r===e}function m7(r,e){r[e.get(["label","show"])?"show":"hide"]()}function HE(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function y7(r,e,t){var n=e.get("z"),i=e.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=t)})}function CB(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function See(r,e,t,n,i){var a=t.get("value"),o=Aee(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=mv(s.get("padding")||0),u=s.getFont(),c=c1(o,u),f=i.position,h=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(f[0]-=h),p==="center"&&(f[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=d),g==="middle"&&(f[1]-=d/2),e8e(f,h,d,n);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:hn(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:v}),z2:10}}function e8e(r,e,t,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+e,i)-e,r[1]=Math.min(r[1]+t,a)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function Aee(r,e,t,n,i){r=e.scale.parse(r);var a=e.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:PF(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};B(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),Ye(o)?a=o.replace("{value}",a):pt(o)&&(a=o(s))}return a}function xB(r,e,t){var n=_o();return kd(n,n,t.rotation),Ul(n,n,t.position),Ms([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function Cee(r,e,t,n,i,a){var o=Da.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),See(e,n,i,a,{position:xB(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function DB(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function xee(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function b7(r,e,t,n,i,a){return{cx:r,cy:e,r0:t,r:n,startAngle:i,endAngle:a,clockwise:!0}}var t8e=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=_7(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=CB(a),d=r8e[u](s,f,c);d.style=h,t.graphicKey=d.type,t.pointer=d}var p=tI(l.model,i);Cee(n,t,p,i,a,o)},e.prototype.getHandleTransform=function(t,n,i){var a=tI(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=xB(n.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=_7(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,d=[h,h];d[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:d,tooltipOption:p[c]}},e}(AB);function _7(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var r8e={line:function(r,e,t){var n=DB([e,t[0]],[e,t[1]],w7(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:xee([e-n/2,t[0]],[n,i],w7(r))}}};function w7(r){return r.dim==="x"?0:1}var n8e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(rr),Au=yr(),i8e=B;function Dee(r,e,t){if(!er.node){var n=e.getZr();Au(n).records||(Au(n).records={}),a8e(n,e);var i=Au(n).records[r]||(Au(n).records[r]={});i.handler=t}}function a8e(r,e){if(Au(r).initialized)return;Au(r).initialized=!0,t("click",Lt(S7,"click")),t("mousemove",Lt(S7,"mousemove")),t("globalout",s8e);function t(n,i){r.on(n,function(a){var o=l8e(e);i8e(Au(r).records,function(s){s&&i(s,a,o.dispatchAction)}),o8e(o.pendings,e)})}}function o8e(r,e){var t=r.showTip.length,n=r.hideTip.length,i;t?i=r.showTip[t-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function s8e(r,e,t){r.handler("leave",null,t)}function S7(r,e,t,n){e.handler(r,t,n)}function l8e(r){var e={showTip:[],hideTip:[]},t=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function SI(r,e){if(!er.node){var t=e.getZr(),n=(Au(t).records||{})[r];n&&(Au(t).records[r]=null)}}var u8e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=n.getComponent("tooltip"),o=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";Dee("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){SI("axisPointer",n)},e.prototype.dispose=function(t,n){SI("axisPointer",n)},e.type="axisPointer",e}(Tn);function Eee(r,e){var t=[],n=r.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=hd(a,r);if(o==null||o<0||De(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,d=f==="x"||f==="radius"?1:0,p=a.mapDimension(h),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(g)||[]}else t=l.dataToPoint(a.getValues(Ee(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),t=[v.x+v.width/2,v.y+v.height/2]}return{point:t,el:s}}var A7=yr();function c8e(r,e,t){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||Qe(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){hw(i)&&(i=Eee({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=hw(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||hw(i),h={},d={},p={list:[],map:{}},g={showPointer:Lt(h8e,d),showTooltip:Lt(d8e,p)};B(s.coordSysMap,function(m,y){var b=l||m.containPoint(i);B(s.coordSysAxesInfo[y],function(_,w){var S=_.axis,A=m8e(u,_);if(!f&&b&&(!u||A)){var C=A&&A.value;C==null&&!l&&(C=S.pointToData(i)),C!=null&&C7(_,C,g,!1,h)}})});var v={};return B(c,function(m,y){var b=m.linkGroup;b&&!d[y]&&B(b.axesInfo,function(_,w){var S=d[w];if(_!==m&&S){var A=S.value;b.mapper&&(A=m.axis.scale.parse(b.mapper(A,x7(_),x7(m)))),v[m.key]=A}})}),B(v,function(m,y){C7(c[y],m,g,!0,h)}),p8e(d,c,h),g8e(p,i,r,o),v8e(c,o,t),h}}function C7(r,e,t,n,i){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=f8e(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&ye(i,s[0]),!n&&r.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function f8e(r,e){var t=e.axis,n=t.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return B(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,r,t);h=d.dataIndices,f=d.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var p=r-f,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,i=f,a.length=0),B(h,function(v){a.push({seriesIndex:l.seriesIndex,dataIndexInside:v,dataIndex:l.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:i}}function h8e(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function d8e(r,e,t,n){var i=t.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=Ey(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function p8e(r,e,t){var n=t.axesInfo=[];B(e,function(i,a){var o=i.axisPointerModel.option,s=r[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function g8e(r,e,t,n){if(hw(e)||!r.list.length){n({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function v8e(r,e,t){var n=t.getZr(),i="axisPointerLastHighlights",a=A7(n)[i]||{},o=A7(n)[i]={};B(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&B(f.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],l=[];B(a,function(u,c){!o[c]&&l.push(u)}),B(o,function(u,c){!a[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function m8e(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function x7(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function hw(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function M1(r){Bd.registerAxisPointerClass("CartesianAxisPointer",t8e),r.registerComponentModel(n8e),r.registerComponentView(u8e),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!De(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=EBe(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},c8e)}function y8e(r){qt(tJ),qt(M1)}var b8e=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var d=CB(a),p=w8e[h](s,l,f,c);p.style=d,t.graphicKey=p.type,t.pointer=p}var g=a.get(["label","margin"]),v=_8e(n,i,a,l,g);See(t,i,a,o,v)},e}(AB);function _8e(r,e,t,n,i){var a=e.axis,o=a.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=_o();kd(h,h,s),Ul(h,h,[n.cx,n.cy]),u=Ms([o,-i],h);var d=e.getModel("axisLabel").get("rotate")||0,p=Da.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,f=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var v=n.cx,m=n.cy;c=Math.abs(u[0]-v)/g<.3?"center":u[0]>v?"left":"right",f=Math.abs(u[1]-m)/g<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var w8e={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:DB(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var i=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:b7(e.cx,e.cy,n[0],n[1],(-t-i/2)*a,(-t+i/2)*a)}:{type:"Sector",shape:b7(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},S8e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,i=this.ecModel;return i.eachComponent(t,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(rr),EB=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Qn).models[0]},e.type="polarAxis",e}(rr);ri(EB,w1);var A8e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(EB),C8e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(EB),TB=function(r){de(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e}(Ws);TB.prototype.dataToRadius=Ws.prototype.dataToCoord;TB.prototype.radiusToData=Ws.prototype.coordToData;var x8e=yr(),kB=function(r){de(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),i=t.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=c1(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var d=Math.max(0,Math.floor(h)),p=x8e(t.model),g=p.lastAutoInterval,v=p.lastTickCount;return g!=null&&v!=null&&Math.abs(g-d)<=1&&Math.abs(v-o)<=1&&g>d?d=g:(p.lastTickCount=o,p.lastAutoInterval=d),d},e}(Ws);kB.prototype.dataToAngle=Ws.prototype.dataToCoord;kB.prototype.angleToData=Ws.prototype.coordToData;var Tee=["radius","angle"],D8e=function(){function r(e){this.dimensions=Tee,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new TB,this._angleAxis=new kB,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,c=us;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI,i=Math.cos(n)*t+this.cx,a=-Math.sin(n)*t+this.cy;return[i,a]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,c=l*l+u*u-1e-4,f=this.r,h=this.r0;return c<=f*f&&c>=h*h}}},r.prototype.convertToPixel=function(e,t,n){var i=D7(t);return i===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var i=D7(t);return i===this?this.pointToData(n):null},r}();function D7(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function E8e(r,e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight();r.cx=We(n[0],i),r.cy=We(n[1],a);var o=r.getRadiusAxis(),s=Math.min(i,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:De(l)||(l=[0,l]);var u=[We(l[0],s),We(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function T8e(r,e){var t=this,n=t.getAngleAxis(),i=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();B(g2(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),B(g2(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Vg(n.scale,n.model),Vg(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function k8e(r){return r.mainType==="angleAxis"}function E7(r,e){var t;if(r.type=e.get("type"),r.scale=cC(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),k8e(e)){r.inverse=r.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(t=e.get("endAngle"))!==null&&t!==void 0?t:n+(r.inverse?-360:360);r.setExtent(n,i)}e.axis=r,r.model=e}var M8e={dimensions:Tee,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,i){var a=new D8e(i+"");a.update=T8e;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");E7(o,l),E7(s,u),E8e(a,n,e),t.push(a),n.coordinateSystem=a,a.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Qn).models[0];n.coordinateSystem=i.coordinateSystem}}),t}},I8e=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function f_(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),i=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function h_(r){var e=r.getRadiusAxis();return e.inverse?0:1}function T7(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var L8e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=Ee(i.getViewLabels(),function(c){c=wt(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});T7(u),T7(s),B(I8e,function(c){t.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&F8e[c](this.group,t,a,s,l,o,u)},this)}},e.type="angleAxis",e}(Bd),F8e={axisLine:function(r,e,t,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=h_(t),f=c?0:1,h,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new Md[d]({shape:{cx:t.cx,cy:t.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new d1({shape:{cx:t.cx,cy:t.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,r.add(h)},axisTick:function(r,e,t,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[h_(t)],u=Ee(n,function(c){return new vi({shape:f_(t,[l,l+s],c.coord)})});r.add(Yo(u,{style:mt(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[h_(t)],c=[],f=0;fm?"left":"right",_=Math.abs(v[1]-y)/g<.3?"middle":v[1]>y?"top":"bottom";if(s&&s[p]){var w=s[p];_t(w)&&w.textStyle&&(d=new $r(w.textStyle,l,l.ecModel))}var S=new Ar({silent:Da.isLabelSilent(e),style:hn(d,{x:v[0],y:v[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:b,verticalAlign:_})});if(r.add(S),c){var A=Da.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=f.rawLabel,Ct(S).eventData=A}},this)},splitLine:function(r,e,t,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",L=x;w&&(n[c][k]||(n[c][k]={p:x,n:x}),L=n[c][k][M]);var F=void 0,U=void 0,N=void 0,$=void 0;if(p.dim==="radius"){var H=p.dataToCoord(T)-x,P=l.dataToCoord(k);Math.abs(H)=$})}}})}function V8e(r){var e={};B(r,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=Mee(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var d=kee(n);h[d]||f.autoWidthCount++,h[d]=h[d]||{width:0,maxWidth:0};var p=We(n.get("barWidth"),c),g=We(n.get("barMaxWidth"),c),v=n.get("barGap"),m=n.get("barCategoryGap");p&&!h[d].width&&(p=Math.min(f.remainedWidth,p),h[d].width=p,f.remainedWidth-=p),g&&(h[d].maxWidth=g),v!=null&&(f.gap=v),m!=null&&(f.categoryGap=m)});var t={};return B(e,function(n,i){t[i]={};var a=n.stacks,o=n.bandWidth,s=We(n.categoryGap,o),l=We(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),B(a,function(g,v){var m=g.maxWidth;m&&m=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),i=[],a=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[a]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-a]=a===0?n.y+n.height/2:n.x+n.width/2,i},r.prototype.convertToPixel=function(e,t,n){var i=k7(t);return i===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var i=k7(t);return i===this?this.pointToData(n):null},r}();function k7(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function K8e(r,e){var t=[];return r.eachComponent("singleAxis",function(n,i){var a=new X8e(n,r,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,t.push(a)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Qn).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),t}var Q8e={create:K8e,dimensions:Iee},M7=["x","y"],J8e=["width","height"],e6e=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=WE(l,1-k2(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=CB(a),d=t6e[f](s,c,u);d.style=h,t.graphicKey=d.type,t.pointer=d}var p=AI(i);Cee(n,t,p,i,a,o)},e.prototype.getHandleTransform=function(t,n,i){var a=AI(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=xB(n.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,i,a){var o=i.axis,s=o.coordinateSystem,l=k2(o),u=WE(s,l),c=[t.x,t.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=WE(s,1-l),h=(f[1]+f[0])/2,d=[h,h];return d[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(AB),t6e={line:function(r,e,t){var n=DB([e,t[0]],[e,t[1]],k2(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:xee([e-n/2,t[0]],[n,i],k2(r))}}};function k2(r){return r.isHorizontal()?0:1}function WE(r,e){var t=r.getRect();return[t[M7[e]],t[M7[e]]+t[J8e[e]]]}var r6e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Tn);function n6e(r){qt(M1),Bd.registerAxisPointerClass("SingleAxisPointer",e6e),r.registerComponentView(r6e),r.registerComponentView(q8e),r.registerComponentModel(dw),Ug(r,"single",dw,dw.defaultOption),r.registerCoordinateSystem("single",Q8e)}var i6e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,i){var a=yv(t);r.prototype.init.apply(this,arguments),I7(t,a)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),I7(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(rr);function I7(r,e){var t=r.cellSize,n;De(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var i=Ee([0,1],function(a){return Cke(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});gf(r,e,{type:"box",ignoreSize:i})}var a6e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=this.group;a.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,a),this._renderLines(t,s,l,a),this._renderYearText(t,s,l,a),this._renderMonthText(t,u,l,a),this._renderWeekText(t,u,s,l,a)},e.prototype._renderDayRect=function(t,n,i){for(var a=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToRect([u],!1).tl,f=new vr({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},e.prototype._renderLines=function(t,n,i,a){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){p(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var d=f.date;d.setMonth(d.getMonth()+1),f=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToRect([g],!1).tl);var v=o._getLinePointsOfOneWeek(t,g,i);o._tlpoints.push(v[0]),o._blpoints.push(v[v.length-1]),u&&o._drawSplitline(v,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.prototype._getEdgesPoints=function(t,n,i){var a=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(t,n,i){var a=new Fa({z2:20,shape:{points:t},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,n,i){for(var a=t.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return Ye(t)&&t?wke(t,n):pt(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,i,a){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,d={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),v={start:n.start.y,end:n.end.y,nameMap:p},m=this._formatterLabel(g,v),y=new Ar({z2:30,style:hn(o,{text:m})});y.attr(this._yearTextPositionControl(y,d[l],i,l,s)),a.add(y)}},e.prototype._monthTextPositionControl=function(t,n,i,a,o){var s="left",l="top",u=t[0],c=t[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,i,a){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||Ye(s))&&(s&&(n=MM(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=0;g=i.start.time&&n.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var i=Math.floor(t[1].time/$E)-Math.floor(t[0].time/$E)+1,a=new Date(t[0].time),o=a.getDate(),s=t[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-t[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-t[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+t[0].day+6)/7),f=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&ti.lweek)return null;var a=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(i){var a=new r(i);n.push(a),i.coordinateSystem=a}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=n[i.get("calendarIndex")||0])}),n},r.dimensions=["time","value"],r}();function L7(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}function s6e(r){r.registerComponentModel(i6e),r.registerComponentView(a6e),r.registerCoordinateSystem("calendar",o6e)}function l6e(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function F7(r,e){var t;return B(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function u6e(r,e,t){var n=ye({},t),i=r[e],a=t.$action||"merge";a==="merge"?i?(Rt(i,n,!0),gf(i,n,{ignoreSize:!0}),CX(t,i),d_(t,i),d_(t,i,"shape"),d_(t,i,"style"),d_(t,i,"extra"),t.clipPath=i.clipPath):r[e]=n:a==="replace"?r[e]=n:a==="remove"&&i&&(r[e]=null)}var Lee=["transition","enterFrom","leaveTo"],c6e=Lee.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function d_(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?Lee:c6e,i=0;i=0;c--){var f=i[c],h=ai(f.id,null),d=h!=null?o.get(h):null;if(d){var p=d.parent,m=Vo(p),y=p===a?{width:s,height:l}:{width:m.width,height:m.height},b={},_=tC(d,f,y,null,{hv:f.hv,boundingMode:f.bounding},b);if(!Vo(d).isNew&&_){for(var w=f.transition,S={},A=0;A=0)?S[C]=x:d[C]=x}Lr(d,S,t,0)}else d.attr(b)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(i){pw(i,Vo(i).option,n,t._lastGraphicModel)}),this._elMap=nt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Tn);function CI(r){var e=et(B7,r)?B7[r]:lF(r),t=new e({});return Vo(t).type=r,t}function O7(r,e,t,n){var i=CI(t);return e.add(i),n.set(r,i),Vo(i).id=r,Vo(i).isNew=!0,i}function pw(r,e,t,n){var i=r&&r.parent;i&&(r.type==="group"&&r.traverse(function(a){pw(a,e,t,n)}),mC(r,e,n),t.removeKey(Vo(r).id))}function P7(r,e,t,n){r.isGroup||B([["cursor",is.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(i){var a=i[0];et(e,a)?r[a]=Mt(e[a],i[1]):r[a]==null&&(r[a]=i[1])}),B(nr(e),function(i){if(i.indexOf("on")===0){var a=e[i];r[i]=pt(a)?a:null}}),et(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function p6e(r){return r=ye({},r),B(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(AX),function(e){delete r[e]}),r}function g6e(r,e,t){var n=Ct(r).eventData;!r.silent&&!r.ignore&&!n&&(n=Ct(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function v6e(r){r.registerComponentModel(h6e),r.registerComponentView(d6e),r.registerPreprocessor(function(e){var t=e.graphic;De(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var R7=["x","y","radius","angle","single"],m6e=["cartesian2d","polar","singleAxis"];function y6e(r){var e=r.get("coordinateSystem");return Ut(m6e,e)>=0}function Uc(r){return r+"Axis"}function b6e(r,e){var t=nt(),n=[],i=nt();r.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,d){var p=t.get(h);p&&p[d]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(t.get(f)||t.set(f,[]))[h]=!0})}return n}function Fee(r){var e=r.ecModel,t={infoList:[],infoMap:nt()};return r.eachTargetAxis(function(n,i){var a=e.getComponent(Uc(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(a)}}}),t}var jE=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),Fy=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,i){var a=N7(t);this.settledOption=a,this.mergeDefaultAndTheme(t,i),this._doInit(a)},e.prototype.mergeOption=function(t){var n=N7(t);Rt(this.option,t,!0),Rt(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;B([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=nt(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return B(R7,function(i){var a=this.getReferringComponents(Uc(i),cEe);if(a.specified){n=!0;var o=new jE;B(a.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new jE;if(h.add(f.componentIndex),t.set(c,h),a=!1,c==="x"||c==="y"){var d=f.getReferringComponents("grid",Qn).models[0];d&&B(u,function(p){f.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",Qn).models[0]&&h.add(p.componentIndex)})}}}a&&B(R7,function(u){if(a){var c=i.findComponents({mainType:Uc(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new jE;f.add(c[0].componentIndex),t.set(u,f),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,i=this.get("rangeMode");B([["start","startValue"],["end","endValue"]],function(a,o){var s=t[a[0]]!=null,l=t[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,i){t==null&&(t=this.ecModel.getComponent(Uc(n),i))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(i,a){B(i.indexList,function(o){t.call(n,a,o)})})},e.prototype.getAxisProxy=function(t,n){var i=this.getAxisModel(t,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[n])return this.ecModel.getComponent(Uc(t),n)},e.prototype.setRawRange=function(t){var n=this.option,i=this.settledOption;B([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(n[a[0]]=i[a[0]]=t[a[0]],n[a[1]]=i[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;B(["start","startValue","end","endValue"],function(i){n[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(b&&!_&&!w)return!0;b&&(v=!0),_&&(p=!0),w&&(g=!0)}return v&&p&&g})}else bp(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});bp(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;bp(["min","max"],function(i){var a=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Yr(n[0]+o,n,[0,100],!0):a!=null&&(o=Yr(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var i=hZ(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),t[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r}();function A6e(r,e,t){var n=[1/0,-1/0];bp(t,function(o){r3e(n,o.getData(),e)});var i=r.getAxisModel(),a=KK(i.axis.scale,i,n).calculate();return[a.min,a.max]}var C6e={getTargetSeries:function(r){function e(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Uc(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new S6e(i,a,s,r),t.push(o.__dzAxisProxy))});var n=nt();return B(t,function(i){B(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).reset(t)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function x6e(r){r.registerAction("dataZoom",function(e,t){var n=b6e(t,e);B(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var V7=!1;function IB(r){V7||(V7=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,C6e),x6e(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function D6e(r){r.registerComponentModel(_6e),r.registerComponentView(w6e),IB(r)}var jo=function(){function r(){}return r}(),Bee={};function _p(r,e){Bee[r]=e}function Oee(r){return Bee[r]}var E6e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;B(this.option.feature,function(n,i){var a=Oee(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),Rt(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(rr);function T6e(r,e,t){var n=e.getBoxLayoutParams(),i=e.get("padding"),a={width:t.getWidth(),height:t.getHeight()},o=si(n,a,i);Jh(e.get("orient"),r,e.get("itemGap"),o.width,o.height),tC(r,n,a,i)}function Pee(r,e){var t=mv(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),r=new vr({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var k6e=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i,a){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];B(u,function(p,g){f.push(g)}),new Vu(this._featureNames||[],f).add(h).update(h).remove(Lt(h,null)).execute(),this._featureNames=f;function h(p,g){var v=f[p],m=f[g],y=u[v],b=new $r(y,t,t.ecModel),_;if(a&&a.newTitle!=null&&a.featureName===v&&(y.title=a.newTitle),v&&!m){if(M6e(v))_={onclick:b.option.onclick,featureName:v};else{var w=Oee(v);if(!w)return;_=new w}c[v]=_}else if(_=c[m],!_)return;_.uid=vv("toolbox-feature"),_.model=b,_.ecModel=n,_.api=i;var S=_ instanceof jo;if(!v&&m){S&&_.dispose&&_.dispose(n,i);return}if(!b.get("show")||S&&_.unusable){S&&_.remove&&_.remove(n,i);return}d(b,_,v),b.setIconStatus=function(A,C){var x=this.option,D=this.iconPaths;x.iconStatus=x.iconStatus||{},x.iconStatus[A]=C,D[A]&&(C==="emphasis"?Nu:zu)(D[A])},_ instanceof jo&&_.render&&_.render(b,n,i,a)}function d(p,g,v){var m=p.getModel("iconStyle"),y=p.getModel(["emphasis","iconStyle"]),b=g instanceof jo&&g.getIcons?g.getIcons():p.get("icon"),_=p.get("title")||{},w,S;Ye(b)?(w={},w[v]=b):w=b,Ye(_)?(S={},S[v]=_):S=_;var A=p.iconPaths={};B(w,function(C,x){var D=m1(C,{},{x:-s/2,y:-s/2,width:s,height:s});D.setStyle(m.getItemStyle());var E=D.ensureState("emphasis");E.style=y.getItemStyle();var T=new Ar({style:{text:S[x],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:uF({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},n)},ignore:!0});D.setTextContent(T),pv({el:D,componentModel:t,itemName:x,formatterParamsExtra:{title:S[x]}}),D.__title=S[x],D.on("mouseover",function(){var k=y.getItemStyle(),M=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";T.setStyle({fill:y.get("textFill")||k.fill||k.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),D.setTextConfig({position:y.get("textPosition")||M}),T.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",x])!=="emphasis"&&i.leaveEmphasis(this),T.hide()}),(p.get(["iconStatus",x])==="emphasis"?Nu:zu)(D),o.add(D),D.on("click",Qe(g.onclick,g,n,i,x)),A[x]=D})}T6e(o,t,i),o.add(Pee(o.getBoundingRect(),t)),l||o.eachChild(function(p){var g=p.__title,v=p.ensureState("emphasis"),m=v.textConfig||(v.textConfig={}),y=p.getTextContent(),b=y&&y.ensureState("emphasis");if(b&&!pt(b)&&g){var _=b.style||(b.style={}),w=c1(g,Ar.makeFont(_)),S=p.x+o.x,A=p.y+o.y+s,C=!1;A+w.height>i.getHeight()&&(m.position="top",C=!0);var x=C?-5-w.height:s+10;S+w.width/2>i.getWidth()?(m.position=["100%",x],_.align="right"):S-w.width/2<0&&(m.position=[0,x],_.align="left")}})},e.prototype.updateView=function(t,n,i,a){B(this._features,function(o){o instanceof jo&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(t,n){B(this._features,function(i){i instanceof jo&&i.remove&&i.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){B(this._features,function(i){i instanceof jo&&i.dispose&&i.dispose(t,n)})},e.type="toolbox",e}(Tn);function M6e(r){return r.indexOf("my")===0}var I6e=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var i=this.model,a=i.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=er.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),d=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];d&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var v=p.length,m=new Uint8Array(v);v--;)m[v]=p.charCodeAt(v);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,g)}else{var b=document.createElement("iframe");document.body.appendChild(b);var _=b.contentWindow,w=_.document;w.open("image/svg+xml","replace"),w.write(p),w.close(),_.focus(),w.execCommand("SaveAs",!0,g),document.body.removeChild(b)}}else{var S=i.get("lang"),A='',C=window.open();C.document.write(A),C.document.title=a}},e.getDefaultOption=function(t){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(jo),G7="__ec_magicType_stack__",L6e=[["line","bar"],["stack"]],F6e=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),i={};return B(t.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(t){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(U7[i]){var s={series:[]},l=function(f){var h=f.subType,d=f.id,p=U7[i](h,d,f,a);p&&(mt(p,f.option),s.series.push(p));var g=f.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var v=g.getAxesByScale("ordinal")[0];if(v){var m=v.dim,y=m+"Axis",b=f.getReferringComponents(y,Qn).models[0],_=b.componentIndex;s[y]=s[y]||[];for(var w=0;w<=_;w++)s[y][_]=s[y][_]||{};s[y][_].boundaryGap=i==="bar"}}};B(L6e,function(f){Ut(f,i)>=0&&B(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Rt({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(jo),U7={line:function(r,e,t,n){if(r==="bar")return Rt({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return Rt({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var i=t.get("stack")===G7;if(r==="line"||r==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Rt({id:e,stack:i?"":G7},n.get(["option","stack"])||{},!0)}};Kl({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var yC=new Array(60).join("-"),$g=" ";function B6e(r){var e={},t=[],n=[];return r.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function O6e(r){var e=[];return B(r,function(t,n){var i=t.categoryAxis,a=t.valueAxis,o=a.dim,s=[" "].concat(Ee(t.series,function(d){return d.name})),l=[i.model.getCategories()];B(t.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join($g)],c=0;c=0)return!0}var xI=new RegExp("["+$g+"]+","g");function z6e(r){for(var e=r.split(/\n+/g),t=M2(e.shift()).split(xI),n=[],i=Ee(t,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=t[a];if(o[i])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function $6e(r){var e=LB(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return Ree(t,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function j6e(r){Nee(r).snapshots=null}function q6e(r){return LB(r).length}function LB(r){var e=Nee(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Y6e=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){j6e(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(jo);Kl({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var Z6e=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],FB=function(){function r(e,t,n){var i=this;this._targetInfoList=[];var a=H7(t,e);B(X6e,function(o,s){(!n||!n.include||Ut(n.include,s)>=0)&&o(a,i._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=qE[n.brushType](0,a,i);n.__rangeOffset={offset:q7[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){B(e,function(i){var a=this.findTargetInfo(i,t);a&&a!==!0&&B(a.coordSyses,function(o){var s=qE[i.brushType](1,o,i.range,!0);n(i,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){B(e,function(n){var i=this.findTargetInfo(n,t);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=qE[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?q7[n.brushType](a.values,o.offset,K6e(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(e,t){return Ee(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:jJ(i),isTargetByCursor:YJ(i,e,n.coordSysModel),getLinearBrushOtherExtent:qJ(i)}})},r.prototype.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Ut(i.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=H7(t,e),a=0;ar[1]&&r.reverse(),r}function H7(r,e){return t0(r,e,{includeMainTypes:Z6e})}var X6e={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,i=r.gridModels,a=nt(),o={},s={};!t&&!n&&!i||(B(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),B(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),B(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];B(u.getCartesians(),function(f,h){(Ut(t,f.getAxis("x").model)>=0||Ut(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:$7.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){B(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:$7.geo})})}},W7=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,i=r.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],$7={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Qh(r)),e}},qE={lineX:Lt(j7,0),lineY:Lt(j7,1),rect:function(r,e,t,n){var i=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),a=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[DI([i[0],a[0]]),DI([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=Ee(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function j7(r,e,t,n){var i=t.getAxis(["x","y"][r]),a=DI(Ee([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var q7={lineX:Lt(Y7,0),lineY:Lt(Y7,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return Ee(r,function(n,i){return[n[0]-t[0]*e[i][0],n[1]-t[1]*e[i][1]]})}};function Y7(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function K6e(r,e){var t=Z7(r),n=Z7(e),i=[t[0]/n[0],t[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function Z7(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var EI=B,Q6e=aEe("toolbox-dataZoom_"),J6e=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i,a){this._brushController||(this._brushController=new lB(i.getZr()),this._brushController.on("brush",Qe(this._onBrush,this)).mount()),r9e(t,n,this,a,i),t9e(t,n)},e.prototype.onclick=function(t,n,i){e9e[i].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new FB(BB(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),W6e(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),d=h.model,p=l(u,d,a),g=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(f=Od(0,f.slice(),h.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(h=d)}),h}},e.prototype._dispatchZoomAction=function(t){var n=[];EI(t,function(i,a){n.push(wt(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},e}(jo),e9e={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction($6e(this.ecModel))}};function BB(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function t9e(r,e){r.setIconStatus("back",q6e(e)>1?"emphasis":"normal")}function r9e(r,e,t,n,i){var a=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new FB(BB(r),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}Mke("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),i=[],a=BB(n),o=t0(r,a);EI(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),EI(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Q6e+u+f};h[c]=f,i.push(h)}return i});function n9e(r){r.registerComponentModel(E6e),r.registerComponentView(k6e),_p("saveAsImage",I6e),_p("magicType",F6e),_p("dataView",U6e),_p("dataZoom",J6e),_p("restore",Y6e),qt(D6e)}var i9e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(rr);function zee(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function Vee(r){if(er.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function f9e(r,e){var t="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+t,i="opacity"+n+",visibility"+n;return e||(n=" "+r+"s "+t,i+=er.transformSupported?","+OB+n:",left"+n+",top"+n),s9e+":"+i}function X7(r,e,t){var n=r.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!er.transformSupported)return t?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=er.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return t?"top:0;left:0;"+OB+":"+o+";":[["top",0],["left",0],[Gee,o]]}function h9e(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var i=r.get("textShadowColor"),a=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),B(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function d9e(r,e,t){var n=[],i=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),f=tK(r,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&i&&n.push(f9e(i,t)),a&&n.push("background-color:"+a),B(["width","color","radius"],function(d){var p="border-"+d,g=wX(p),v=r.get(g);v!=null&&n.push(p+":"+v+(d==="color"?"":"px"))}),n.push(h9e(c)),f!=null&&n.push("padding:"+mv(f).join("px ")+"px"),n.join(";")+";"}function K7(r,e,t,n,i){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&Rxe(r,o,t,n,i)}else{r[0]=n,r[1]=i;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var p9e=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,er.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=t.appendTo,o=a&&(Ye(a)?document.querySelector(a):Og(a)?a:pt(a)&&a(e.getDom()));K7(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Oo(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=o9e(t,"position"),i=t.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=l9e+d9e(e,!this._firstShow,this._longHide)+X7(a[0],a[1],!0)+("border-color:"+gd(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(Ye(a)&&n.get("trigger")==="item"&&!zee(n)&&(s=c9e(n,i,a)),Ye(e))o.innerHTML=e+s;else if(e){o.innerHTML="",De(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,i=this._api,a=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,i,a){if(!(a.from===this.uid||er.node||!i.getDom())){var o=ez(a,i);this._ticket="";var s=a.dataByCoordSys,l=w9e(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=v9e;c.x=a.x,c.y=a.y,c.update(),Ct(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,i,a))return;var f=Eee(a,n),h=f.point[0],d=f.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(ez(a,i))},e.prototype._manuallyAxisShowTip=function(t,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=hm([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(t,n){var i=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=Ct(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Bh(i,function(c){if(Ct(c).dataIndex!=null)return l=c,!0;if(Ct(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(t,l,n):u?this._showComponentItemTooltip(t,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var i=t.get("showDelay");n=Qe(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(t,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=hm([n.tooltipOption],a),l=this._renderMode,u=[],c=Si("section",{blocks:[],noHeader:!0}),f=[],h=new ID;B(t,function(y){B(y.dataByAxis,function(b){var _=i.getComponent(b.axisDim+"Axis",b.axisIndex),w=b.value;if(!(!_||w==null)){var S=Aee(w,_.axis,i,b.seriesDataIndices,b.valueLabelOpt),A=Si("section",{header:S,noHeader:!xs(S),sortBlocks:!0,blocks:[]});c.blocks.push(A),B(b.seriesDataIndices,function(C){var x=i.getSeriesByIndex(C.seriesIndex),D=C.dataIndexInside,E=x.getDataParams(D);if(!(E.dataIndex<0)){E.axisDim=b.axisDim,E.axisIndex=b.axisIndex,E.axisType=b.axisType,E.axisId=b.axisId,E.axisValue=PF(_.axis,{value:w}),E.axisValueLabel=S,E.marker=h.makeTooltipMarker("item",gd(E.color),l);var T=GN(x.formatTooltip(D,!0,null)),k=T.frag;if(k){var M=hm([x],a).get("valueFormatter");A.blocks.push(M?ye({valueFormatter:M},k):k)}T.text&&f.push(T.text),u.push(E)}})}})}),c.blocks.reverse(),f.reverse();var d=n.position,p=s.get("order"),g=qN(c,h,l,p,i.get("useUTC"),s.get("textStyle"));g&&f.unshift(g);var v=l==="richText"?` + +`:"
",m=f.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],d,null,h)})},e.prototype._showSeriesItemTooltip=function(t,n,i){var a=this._ecModel,o=Ct(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),d=this._renderMode,p=t.positionDefault,g=hm([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),v=g.get("trigger");if(!(v!=null&&v!=="item")){var m=u.getDataParams(c,f),y=new ID;m.marker=y.makeTooltipMarker("item",gd(m.color),d);var b=GN(u.formatTooltip(c,!1,f)),_=g.get("order"),w=g.get("valueFormatter"),S=b.frag,A=S?qN(w?ye({valueFormatter:w},S):S,y,d,_,a.get("useUTC"),g.get("textStyle")):b.text,C="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,A,m,C,t.offsetX,t.offsetY,t.position,t.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,i){var a=this._renderMode==="html",o=Ct(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Ye(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=wt(l),l.content=Ha(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var d=t.positionDefault,p=hm(f,this._tooltipModel,d?{position:d}:null),g=p.get("content"),v=Math.random()+"",m=new ID;this._showOrMove(p,function(){var y=wt(p.get("formatterParams")||{});this._showTooltipContent(p,g,y,v,t.offsetX,t.offsetY,t.position,n,m)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,i,a,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var d=n,p=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor")),g=p.color;if(h)if(Ye(h)){var v=t.ecModel.get("useUTC"),m=De(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=h,y&&(d=XA(m.axisValue,d,v)),d=SX(d,i,!0)}else if(pt(h)){var b=Qe(function(_,w){_===this._ticket&&(f.setContent(w,c,t,g,l),this._updatePosition(t,l,o,s,f,i,u))},this);this._ticket=a,d=h(i,a,b)}else d=h;f.setContent(d,c,t,g,l),f.show(t,g),this._updatePosition(t,l,o,s,f,i,u)}},e.prototype._getNearestPoint=function(t,n,i,a){if(i==="axis"||De(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!De(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),h=t.get("align"),d=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),pt(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),De(n))i=We(n[0],u),a=We(n[1],c);else if(_t(n)){var g=n;g.width=f[0],g.height=f[1];var v=si(g,{width:u,height:c});i=v.x,a=v.y,h=null,d=null}else if(Ye(n)&&l){var m=_9e(n,p,f,t.get("borderWidth"));i=m[0],a=m[1]}else{var m=y9e(i,a,o,u,c,h?null:20,d?null:20);i=m[0],a=m[1]}if(h&&(i-=tz(h)?f[0]/2:h==="right"?f[0]:0),d&&(a-=tz(d)?f[1]/2:d==="bottom"?f[1]:0),zee(t)){var m=b9e(i,a,o,u,c);i=m[0],a=m[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===t.length;return o&&B(i,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&B(u,function(h,d){var p=f[d]||{},g=h.seriesDataIndices||[],v=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&g.length===v.length,o&&B(g,function(m,y){var b=v[y];o=o&&m.seriesIndex===b.seriesIndex&&m.dataIndex===b.dataIndex}),a&&B(h.seriesDataIndices,function(m){var y=m.seriesIndex,b=n[y],_=a[y];b&&_&&_.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){er.node||!n.getDom()||(_y(this,"_updatePosition"),this._tooltipContent.dispose(),SI("itemTooltip",n))},e.type="tooltip",e}(Tn);function hm(r,e,t){var n=e.ecModel,i;t?(i=new $r(t,n,n),i=new $r(e.option,i,n)):i=e;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof $r&&(o=o.get("tooltip",!0)),Ye(o)&&(o={formatter:o}),o&&(i=new $r(o,i,n)))}return i}function ez(r,e){return r.dispatchAction||Qe(e.dispatchAction,e)}function y9e(r,e,t,n,i,a,o){var s=t.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>n?r-=l+a:r+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[r,e]}function b9e(r,e,t,n,i){var a=t.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,i)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function _9e(r,e,t,n){var i=t[0],a=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function tz(r){return r==="center"||r==="middle"}function w9e(r,e,t){var n=X3(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=f1(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Ct(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function S9e(r){qt(M1),r.registerComponentModel(i9e),r.registerComponentView(m9e),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},qn),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},qn)}var A9e=["rect","polygon","keep","clear"];function C9e(r,e){var t=Qr(r?r.brush:[]);if(t.length){var n=[];B(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=r&&r.toolbox;De(i)&&(i=i[0]),i||(i={feature:{}},r.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),x9e(s),e&&!s.length&&s.push.apply(s,A9e)}}function x9e(r){var e={};B(r,function(t){e[t]=1}),r.length=0,B(e,function(t,n){r.push(n)})}var rz=B;function nz(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function TI(r,e,t){var n={};return rz(e,function(a){var o=n[a]=i();rz(r[a],function(s,l){if(bi.isValidType(l)){var u={type:l,visual:s};t&&t(u,a),o[l]=new bi(u),l==="opacity"&&(u=wt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new bi(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function Hee(r,e,t){var n;B(t,function(i){e.hasOwnProperty(i)&&nz(e[i])&&(n=!0)}),n&&B(t,function(i){e.hasOwnProperty(i)&&nz(e[i])?r[i]=wt(e[i]):delete r[i]})}function D9e(r,e,t,n,i,a){var o={};B(r,function(f){var h=bi.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return xF(t,s,f)}function u(f,h){fK(t,s,f,h)}t.each(c);function c(f,h){s=f;var d=t.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,f),g=e[p],v=o[p],m=0,y=v.length;me[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&lz(e)}};function lz(r){return new Nt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var B9e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new lB(n.getZr())).on("brush",Qe(this._onBrush,this)).mount()},e.prototype.render=function(t,n,i,a){this.model=t,this._updateController(t,n,i,a)},e.prototype.updateTransform=function(t,n,i,a){Wee(n),this._updateController(t,n,i,a)},e.prototype.updateVisual=function(t,n,i,a){this.updateTransform(t,n,i,a)},e.prototype.updateView=function(t,n,i,a){this._updateController(t,n,i,a)},e.prototype._updateController=function(t,n,i,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:wt(i),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:wt(i),$from:n})},e.type="brush",e}(Tn),O9e="#ddd",P9e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var i=this.option;!n&&Hee(i,t,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:O9e},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=Ee(t,function(n){return uz(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=uz(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(rr);function uz(r,e){return Rt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new $r(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var R9e=["rect","polygon","lineX","lineY","keep","clear"],N9e=function(r){de(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,B(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,i){this.render(t,n,i)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),i={};return B(t.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(t,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:R9e.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(jo);function z9e(r){r.registerComponentView(B9e),r.registerComponentModel(P9e),r.registerPreprocessor(C9e),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,k9e),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},qn),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},qn),_p("brush",N9e)}var V9e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(rr),G9e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){if(this.group.removeAll(),!!t.get("show")){var a=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Mt(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Ar({style:hn(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=t.get("subtext"),d=new Ar({style:hn(s,{text:h,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),g=t.get("sublink"),v=t.get("triggerEvent",!0);c.silent=!p&&!v,d.silent=!g&&!v,p&&c.on("click",function(){o2(p,"_"+t.get("target"))}),g&&d.on("click",function(){o2(g,"_"+t.get("subtarget"))}),Ct(c).eventData=Ct(d).eventData=v?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(c),h&&a.add(d);var m=a.getBoundingRect(),y=t.getBoxLayoutParams();y.width=m.width,y.height=m.height;var b=si(y,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?b.x+=b.width:l==="center"&&(b.x+=b.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?b.y+=b.height:u==="middle"&&(b.y+=b.height/2),u=u||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var _={align:l,verticalAlign:u};c.setStyle(_),d.setStyle(_),m=a.getBoundingRect();var w=b.margin,S=t.getItemStyle(["color","opacity"]);S.fill=t.get("backgroundColor");var A=new vr({shape:{x:m.x-w[3],y:m.y-w[0],width:m.width+w[1]+w[3],height:m.height+w[0]+w[2],r:t.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(A)}},e.type="title",e}(Tn);function U9e(r){r.registerComponentModel(V9e),r.registerComponentView(G9e)}var cz=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,n=t.data||[],i=t.axisType,a=this._names=[],o;i==="category"?(o=[],B(n,function(u,c){var f=ai(fv(u),""),h;_t(u)?(h=wt(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new xa([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(rr),$ee=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Tf(cz.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(cz);ri($ee,nC.prototype);var H9e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Tn),W9e=function(r){de(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Ws),ZE=Math.PI,fz=yr(),$9e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,i){if(this.model=t,this.api=i,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Si("nameValue",{noName:!0,value:c})},B(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,t)},this),this._renderAxisLabel(a,s,l,t),this._position(a,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,n){var i=t.get(["label","position"]),a=t.get("orient"),o=q9e(t,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:ZE/2},f=a==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),d=h.get("show",!0),p=d?h.get("itemSize"):0,g=d?h.get("itemGap"):0,v=p+g,m=t.get(["label","rotate"])||0;m=m*ZE/180;var y,b,_,w=h.get("position",!0),S=d&&h.get("showPlayBtn",!0),A=d&&h.get("showPrevBtn",!0),C=d&&h.get("showNextBtn",!0),x=0,D=f;w==="left"||w==="bottom"?(S&&(y=[0,0],x+=v),A&&(b=[x,0],x+=v),C&&(_=[D-p,0],D-=v)):(S&&(y=[D-p,0],D-=v),A&&(b=[0,0],x+=v),C&&(_=[D-p,0],D-=v));var E=[x,D];return t.get("inverse")&&E.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:m,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:b,nextBtnPosition:_,axisExtent:E,controlSize:p,controlGap:g}},e.prototype._position=function(t,n){var i=this._mainGroup,a=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=_o(),l=o.x,u=o.y+o.height;Ul(s,s,[-l,-u]),kd(s,s,-ZE/2),Ul(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),f=y(i.getBoundingRect()),h=y(a.getBoundingRect()),d=[i.x,i.y],p=[a.x,a.y];p[0]=d[0]=c[0][0];var g=t.labelPosOpt;if(g==null||Ye(g)){var v=g==="+"?0:1;b(d,f,c,1,v),b(p,h,c,1,1-v)}else{var v=g>=0?0:1;b(d,f,c,1,v),p[1]=d[1]+g}i.setPosition(d),a.setPosition(p),i.rotation=a.rotation=t.rotation,m(i),m(a);function m(_){_.originX=c[0][0]-_.x,_.originY=c[1][0]-_.y}function y(_){return[[_.x,_.x+_.width],[_.y,_.y+_.height]]}function b(_,w,S,A,C){_[A]+=S[A][C]-w[A][C]}},e.prototype._createAxis=function(t,n){var i=n.getData(),a=n.get("axisType"),o=j9e(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new W9e("value",o,t.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new At;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new vi({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:ye({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new vi({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:mt({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],B(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),d=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:Qe(o._changeTimeline,o,u.value)},v=hz(f,h,n,g);v.ensureState("emphasis").style=d.getItemStyle(),v.ensureState("progress").style=p.getItemStyle(),Kh(v);var m=Ct(v);f.get("tooltip")?(m.dataIndex=u.value,m.dataModel=a):m.dataIndex=m.dataModel=null,o._tickSymbols.push(v)})},e.prototype._renderAxisLabel=function(t,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],B(u,function(c){var f=c.tickValue,h=l.getItemModel(f),d=h.getModel("label"),p=h.getModel(["emphasis","label"]),g=h.getModel(["progress","label"]),v=i.dataToCoord(c.tickValue),m=new Ar({x:v,y:0,rotation:t.labelRotation-t.rotation,onclick:Qe(o._changeTimeline,o,f),silent:!1,style:hn(d,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});m.ensureState("emphasis").style=hn(p),m.ensureState("progress").style=hn(g),n.add(m),Kh(m),fz(m).dataIndex=f,o._tickLabels.push(m)})}},e.prototype._renderControl=function(t,n,i,a){var o=t.controlSize,s=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(t.nextBtnPosition,"next",Qe(this._changeTimeline,this,f?"-":"+")),h(t.prevBtnPosition,"prev",Qe(this._changeTimeline,this,f?"+":"-")),h(t.playPosition,c?"stop":"play",Qe(this._handlePlayClick,this,!c),!0);function h(d,p,g,v){if(d){var m=Ns(Mt(a.get(["controlStyle",p+"BtnSize"]),o),o),y=[0,-m/2,m,m],b=Y9e(a,p+"Icon",y,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:v?-s:0,rectHover:!0,style:l,onclick:g});b.ensureState("emphasis").style=u,n.add(b),Kh(b)}}},e.prototype._renderCurrentPointer=function(t,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=Qe(u._handlePointerDrag,u),f.ondragend=Qe(u._handlePointerDragend,u),dz(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){dz(f,u._progressLine,s,i,a)}};this._currentPointer=hz(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var i=this._toAxisCoord(t)[0],a=this._axis,o=Qo(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(o[a]=+o[a].toFixed(h)),[o,f]}var XE={min:Lt(v_,"min"),max:Lt(v_,"max"),average:Lt(v_,"average"),median:Lt(v_,"median")};function By(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,i=n&&n.dimensions;if(!e7e(e)&&!De(e.coord)&&De(i)){var a=jee(e,t,n,r);if(e=wt(e),e.type&&XE[e.type]&&a.baseAxis&&a.valueAxis){var o=Ut(i,a.baseAxis.dim),s=Ut(i,a.valueAxis.dim),l=XE[e.type](t,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!De(i))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)XE[u[c]]&&(u[c]=RB(t,t.mapDimension(i[c]),u[c]));return e}}function jee(r,e,t,n){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,i.valueAxis=t.getAxis(t7e(n,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function t7e(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Oy(r,e){return r&&r.containData&&e.coord&&!MI(e)?r.containData(e.coord):!0}function r7e(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!MI(e)&&!MI(t)?r.containZone(e.coord,t.coord):!0}function qee(r,e){return r?function(t,n,i,a){var o=a<2?t.coord&&t.coord[a]:t.value;return qc(o,e[a])}:function(t,n,i,a){return qc(t.value,e[a])}}function RB(r,e,t){if(t==="average"){var n=0,i=0;return r.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var KE=yr(),NB=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=nt()},e.prototype.render=function(t,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){KE(s).keep=!1}),n.eachSeries(function(s){var l=Hu.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!KE(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(t){KE(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var i=this;B(t,function(a){var o=Hu.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?zZ(l):nF(l))})}})},e.type="marker",e}(Tn);function gz(r,e,t){var n=e.coordinateSystem;r.each(function(i){var a=r.getItemModel(i),o,s=We(a.get("x"),t.getWidth()),l=We(a.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,i));else if(n){var u=r.get(n.dimensions[0],i),c=r.get(n.dimensions[1],i);o=n.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(i,o)})}var n7e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,i){n.eachSeries(function(a){var o=Hu.getMarkerModelFromSeries(a,"markPoint");o&&(gz(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new A1),f=i7e(o,t,n);n.setData(f),gz(n.getData(),t,a),f.each(function(h){var d=f.getItemModel(h),p=d.getShallow("symbol"),g=d.getShallow("symbolSize"),v=d.getShallow("symbolRotate"),m=d.getShallow("symbolOffset"),y=d.getShallow("symbolKeepAspect");if(pt(p)||pt(g)||pt(v)||pt(m)){var b=n.getRawValue(h),_=n.getDataParams(h);pt(p)&&(p=p(b,_)),pt(g)&&(g=g(b,_)),pt(v)&&(v=v(b,_)),pt(m)&&(m=m(b,_))}var w=d.getModel("itemStyle").getItemStyle(),S=b1(l,"color");w.fill||(w.fill=S),f.setItemVisual(h,{symbol:p,symbolSize:g,symbolRotate:v,symbolOffset:m,symbolKeepAspect:y,style:w})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(d){Ct(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e}(NB);function i7e(r,e,t){var n;r?n=Ee(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return ye(ye({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new xa(n,t),a=Ee(t.get("data"),Lt(By,e));r&&(a=Xr(a,Lt(Oy,r)));var o=qee(!!r,n);return i.initData(a,null,o),i}function a7e(r){r.registerComponentModel(J9e),r.registerComponentView(n7e),r.registerPreprocessor(function(e){PB(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var o7e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Hu),m_=yr(),s7e=function(r,e,t,n){var i=r.getData(),a;if(De(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=ki(n.yAxis,n.xAxis);else{var u=jee(n,i,e,r);s=u.valueAxis;var c=VK(i,u.valueDataDim);l=RB(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,d=wt(n),p={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,p.coord[h]=1/0;var g=t.get("precision");g>=0&&Mr(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[f]=p.coord[f]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var v=[By(r,a[0]),By(r,a[1]),ye({},a[2])];return v[2].type=v[2].type||null,Rt(v[2],v[0]),Rt(v[2],v[1]),v};function I2(r){return!isNaN(r)&&!isFinite(r)}function vz(r,e,t,n){var i=1-r,a=n.dimensions[r];return I2(e[i])&&I2(t[i])&&e[r]===t[r]&&n.getAxis(a).containData(e[r])}function l7e(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(vz(1,t,n,r)||vz(0,t,n,r)))return!0}return Oy(r,e[0])&&Oy(r,e[1])}function QE(r,e,t,n,i){var a=n.coordinateSystem,o=r.getItemModel(e),s,l=We(o.get("x"),i.getWidth()),u=We(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=a.dimensions,f=r.get(c[0],e),h=r.get(c[1],e);s=a.dataToPoint([f,h])}if(Fd(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;I2(r.get(c[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[t?0:1]):I2(r.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var u7e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,i){n.eachSeries(function(a){var o=Hu.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=m_(o).from,u=m_(o).to;l.each(function(c){QE(l,c,!0,a,i),QE(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new sB);this.group.add(c.group);var f=c7e(o,t,n),h=f.from,d=f.to,p=f.line;m_(n).from=h,m_(n).to=d,n.setData(p);var g=n.get("symbol"),v=n.get("symbolSize"),m=n.get("symbolRotate"),y=n.get("symbolOffset");De(g)||(g=[g,g]),De(v)||(v=[v,v]),De(m)||(m=[m,m]),De(y)||(y=[y,y]),f.from.each(function(_){b(h,_,!0),b(d,_,!1)}),p.each(function(_){var w=p.getItemModel(_).getModel("lineStyle").getLineStyle();p.setItemLayout(_,[h.getItemLayout(_),d.getItemLayout(_)]),w.stroke==null&&(w.stroke=h.getItemVisual(_,"style").fill),p.setItemVisual(_,{fromSymbolKeepAspect:h.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(_,"symbolOffset"),fromSymbolRotate:h.getItemVisual(_,"symbolRotate"),fromSymbolSize:h.getItemVisual(_,"symbolSize"),fromSymbol:h.getItemVisual(_,"symbol"),toSymbolKeepAspect:d.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(_,"symbolOffset"),toSymbolRotate:d.getItemVisual(_,"symbolRotate"),toSymbolSize:d.getItemVisual(_,"symbolSize"),toSymbol:d.getItemVisual(_,"symbol"),style:w})}),c.updateData(p),f.line.eachItemGraphicEl(function(_){Ct(_).dataModel=n,_.traverse(function(w){Ct(w).dataModel=n})});function b(_,w,S){var A=_.getItemModel(w);QE(_,w,S,t,a);var C=A.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=b1(l,"color")),_.setItemVisual(w,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:Mt(A.get("symbolOffset",!0),y[S?0:1]),symbolRotate:Mt(A.get("symbolRotate",!0),m[S?0:1]),symbolSize:Mt(A.get("symbolSize"),v[S?0:1]),symbol:Mt(A.get("symbol",!0),g[S?0:1]),style:C})}this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e}(NB);function c7e(r,e,t){var n;r?n=Ee(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return ye(ye({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new xa(n,t),a=new xa(n,t),o=new xa([],t),s=Ee(t.get("data"),Lt(s7e,e,r,t));r&&(s=Xr(s,Lt(l7e,r)));var l=qee(!!r,n);return i.initData(Ee(s,function(u){return u[0]}),null,l),a.initData(Ee(s,function(u){return u[1]}),null,l),o.initData(Ee(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function f7e(r){r.registerComponentModel(o7e),r.registerComponentView(u7e),r.registerPreprocessor(function(e){PB(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var h7e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Hu),y_=yr(),d7e=function(r,e,t,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=By(r,i),s=By(r,a),l=o.coord,u=s.coord;l[0]=ki(l[0],-1/0),l[1]=ki(l[1],-1/0),u[0]=ki(u[0],1/0),u[1]=ki(u[1],1/0);var c=z3([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function L2(r){return!isNaN(r)&&!isFinite(r)}function mz(r,e,t,n){var i=1-r;return L2(e[i])&&L2(t[i])}function p7e(r,e){var t=e.coord[0],n=e.coord[1],i={coord:t,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return Fd(r,"cartesian2d")?t&&n&&(mz(1,t,n)||mz(0,t,n))?!0:r7e(r,i,a):Oy(r,i)||Oy(r,a)}function yz(r,e,t,n,i){var a=n.coordinateSystem,o=r.getItemModel(e),s,l=We(o.get(t[0]),i.getWidth()),u=We(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),h=a.clampData(c),d=a.clampData(f),p=[];t[0]==="x0"?p[0]=h[0]>d[0]?f[0]:c[0]:p[0]=h[0]>d[0]?c[0]:f[0],t[1]==="y0"?p[1]=h[1]>d[1]?f[1]:c[1]:p[1]=h[1]>d[1]?c[1]:f[1],s=n.getMarkerPosition(p,t,!0)}else{var g=r.get(t[0],e),v=r.get(t[1],e),m=[g,v];a.clampData&&a.clampData(m,m),s=a.dataToPoint(m,!0)}if(Fd(a,"cartesian2d")){var y=a.getAxis("x"),b=a.getAxis("y"),g=r.get(t[0],e),v=r.get(t[1],e);L2(g)?s[0]=y.toGlobalCoord(y.getExtent()[t[0]==="x0"?0:1]):L2(v)&&(s[1]=b.toGlobalCoord(b.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var bz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],g7e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,i){n.eachSeries(function(a){var o=Hu.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Ee(bz,function(f){return yz(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new At});this.group.add(c.group),this.markKeep(c);var f=v7e(o,t,n);n.setData(f),f.each(function(h){var d=Ee(bz,function(C){return yz(f,h,C,t,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,v=p.getExtent(),m=g.getExtent(),y=[p.parse(f.get("x0",h)),p.parse(f.get("x1",h))],b=[g.parse(f.get("y0",h)),g.parse(f.get("y1",h))];Qo(y),Qo(b);var _=!(v[0]>y[1]||v[1]b[1]||m[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(rr),ip=Lt,LI=B,b_=At,Yee=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new b_),this.group.add(this._selectorGroup=new b_),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,i,l,s,u);var c=t.getBoxLayoutParams(),f={width:i.getWidth(),height:i.getHeight()},h=t.get("padding"),d=si(c,f,h),p=this.layoutInner(t,o,d,a,l,u),g=si(mt({width:p.width,height:p.height},c),f,h);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Pee(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,i,a,o,s,l){var u=this.getContentGroup(),c=nt(),f=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),LI(n.getData(),function(d,p){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===` +`)){var v=new b_;v.newline=!0,u.add(v);return}var m=i.getSeriesByName(g)[0];if(!c.get(g))if(m){var y=m.getData(),b=y.getVisual("legendLineStyle")||{},_=y.getVisual("legendIcon"),w=y.getVisual("style"),S=this._createItem(m,g,p,d,n,t,b,w,_,f,a);S.on("click",ip(_z,g,null,a,h)).on("mouseover",ip(FI,m.name,null,a,h)).on("mouseout",ip(BI,m.name,null,a,h)),i.ssr&&S.eachChild(function(A){var C=Ct(A);C.seriesIndex=m.seriesIndex,C.dataIndex=p,C.ssrType="legend"}),c.set(g,!0)}else i.eachRawSeries(function(A){if(!c.get(g)&&A.legendVisualProvider){var C=A.legendVisualProvider;if(!C.containName(g))return;var x=C.indexOfName(g),D=C.getItemVisual(x,"style"),E=C.getItemVisual(x,"legendIcon"),T=wo(D.fill);T&&T[3]===0&&(T[3]=.2,D=ye(ye({},D),{fill:ku(T,"rgba")}));var k=this._createItem(A,g,p,d,n,t,{},D,E,f,a);k.on("click",ip(_z,null,g,a,h)).on("mouseover",ip(FI,null,g,a,h)).on("mouseout",ip(BI,null,g,a,h)),i.ssr&&k.eachChild(function(M){var L=Ct(M);L.seriesIndex=A.seriesIndex,L.dataIndex=p,L.ssrType="legend"}),c.set(g,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype._createSelector=function(t,n,i,a,o){var s=this.getSelectorGroup();LI(t,function(u){var c=u.type,f=new Ar({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);$i(f,{normal:h,emphasis:d},{defaultText:u.title}),Kh(f)})},e.prototype._createItem=function(t,n,i,a,o,s,l,u,c,f,h){var d=t.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),v=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),b=a.get("icon");c=b||c||"roundRect";var _=b7e(c,a,l,u,d,v,h),w=new b_,S=a.getModel("textStyle");if(pt(t.getLegendIcon)&&(!b||b==="inherit"))w.add(t.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:m,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}));else{var A=b==="inherit"&&t.getData().getVisual("symbol")?m==="inherit"?t.getData().getVisual("symbolRotate"):m:0;w.add(_7e({itemWidth:p,itemHeight:g,icon:c,iconRotate:A,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}))}var C=s==="left"?p+5:-5,x=s,D=o.get("formatter"),E=n;Ye(D)&&D?E=D.replace("{name}",n??""):pt(D)&&(E=D(n));var T=v?S.getTextColor():a.get("inactiveColor");w.add(new Ar({style:hn(S,{text:E,x:C,y:g/2,fill:T,align:x,verticalAlign:"middle"},{inheritColor:T})}));var k=new vr({shape:w.getBoundingRect(),style:{fill:"transparent"}}),M=a.getModel("tooltip");return M.get("show")&&pv({el:k,componentModel:o,itemName:n,itemTooltipOption:M.option}),w.add(k),w.eachChild(function(L){L.silent=!0}),k.silent=!f,this.getContentGroup().add(w),Kh(w),w.__legendDataIndex=i,w},e.prototype.layoutInner=function(t,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Jh(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Jh("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),g=t.getOrient().index,v=g===0?"width":"height",m=g===0?"height":"width",y=g===0?"y":"x";s==="end"?d[g]+=c[v]+p:f[g]+=h[v]+p,d[1-g]+=c[m]/2-h[m]/2,u.x=d[0],u.y=d[1],l.x=f[0],l.y=f[1];var b={x:0,y:0};return b[v]=c[v]+p+h[v],b[m]=Math.max(c[m],h[m]),b[y]=Math.min(0,h[y]+d[1-g]),b}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Tn);function b7e(r,e,t,n,i,a,o){function s(v,m){v.lineWidth==="auto"&&(v.lineWidth=m.lineWidth>0?2:0),LI(v,function(y,b){v[b]==="inherit"&&(v[b]=m[b])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:zg(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:t).opacity),s(u,n);var h=e.getModel("lineStyle"),d=h.getLineStyle();if(s(d,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function _7e(r){var e=r.icon||"roundRect",t=Jn(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function _z(r,e,t,n){BI(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),FI(r,e,t,n)}function Zee(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,i=e.length;ni[o],v=[-d.x,-d.y];n||(v[a]=c[u]);var m=[0,0],y=[-p.x,-p.y],b=Mt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(g){var _=t.get("pageButtonPosition",!0);_==="end"?y[a]+=i[o]-p[o]:m[a]+=p[o]+b}y[1-a]+=d[s]/2-p[s]/2,c.setPosition(v),f.setPosition(m),h.setPosition(y);var w={x:0,y:0};if(w[o]=g?i[o]:d[o],w[s]=Math.max(d[s],p[s]),w[l]=Math.min(0,p[l]+y[1-a]),f.__rectSize=i[o],g){var S={x:0,y:0};S[o]=Math.max(i[o]-p[o]-b,0),S[s]=w[s],f.setClipPath(new vr({shape:S})),f.__rectSize=S[o]}else h.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(t);return A.pageIndex!=null&&Lr(c,{x:A.contentPosition[0],y:A.contentPosition[1]},g?t:null),this._updatePageInfoView(t,A),w},e.prototype._pageGo=function(t,n,i){var a=this._getPageInfo(n)[t];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var i=this._controllerGroup;B(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Ye(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=JE[o],l=eT[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,d=h?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var g=_(f);p.contentPosition[o]=-g.s;for(var v=u+1,m=g,y=g,b=null;v<=h;++v)b=_(c[v]),(!b&&y.e>m.s+a||b&&!w(b,m.s))&&(y.i>m.i?m=y:m=b,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=b;for(var v=u-1,m=g,y=g,b=null;v>=-1;--v)b=_(c[v]),(!b||!w(y,b.s))&&m.i=A&&S.s<=A+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===t&&(n=s)}),n??a},e.type="legend.scroll",e}(Yee);function x7e(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function D7e(r){qt(Xee),r.registerComponentModel(A7e),r.registerComponentView(C7e),x7e(r)}function E7e(r){qt(Xee),qt(D7e)}var T7e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Tf(Fy.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Fy),zB=yr();function k7e(r,e,t){zB(r).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function M7e(r,e){for(var t=zB(r).coordSysRecordMap,n=t.keys(),i=0;in[t+e]&&(e=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function O7e(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=zB(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=nt());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=Fee(a);B(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,I7e(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=nt());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){Kee(i,a);return}var c=B7e(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),wv(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var P7e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,i){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),k7e(i,t,{pan:Qe(tT.pan,this),zoom:Qe(tT.zoom,this),scrollMove:Qe(tT.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){M7e(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(MB),tT={zoom:function(r,e,t,n){var i=this.range,a=i.slice(),o=r.axisModels[0];if(o){var s=rT[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Od(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:Az(function(r,e,t,n,i,a){var o=rT[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Az(function(r,e,t,n,i,a){var o=rT[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,t);return o.signal*(r[1]-r[0])*a.scrollDelta})};function Az(r){return function(e,t,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,i);if(Od(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var rT={grid:function(r,e,t,n,i){var a=t.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,e,t,n,i){var a=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,e,t,n,i){var a=t.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function Qee(r){IB(r),r.registerComponentModel(T7e),r.registerComponentView(P7e),O7e(r)}var R7e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Tf(Fy.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Fy),gm=vr,Cz=7,N7e=1,nT=30,z7e=7,vm="horizontal",xz="vertical",V7e=5,G7e=["line","bar","candlestick","scatter"],U7e={easing:"cubicOut",duration:100,delay:0},H7e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=Qe(this._onBrush,this),this._onBrushEnd=Qe(this._onBrushEnd,this)},e.prototype.render=function(t,n,i,a){if(r.prototype.render.apply(this,arguments),wv(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){_y(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new At;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,i=t.get("brushSelect"),a=i?z7e:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===vm?{right:s.width-o.x-o.width,top:s.height-nT-Cz-a,width:o.width,height:nT}:{right:Cz,top:o.y,width:nT,height:o.height},u=yv(t.option);B(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=si(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===xz&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===vm&&!o?{scaleY:l?1:-1,scaleX:1}:i===vm&&o?{scaleY:l?1:-1,scaleX:-1}:i===xz&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=t.get("brushSelect");i.add(new gm({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new gm({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Qe(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,i=this._shadowSize||[],a=t.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var d=[0,n[1]],p=[0,n[0]],g=[[n[0],0],[0,0]],v=[],m=p[1]/(o.count()-1),y=0,b=Math.round(o.count()/n[0]),_;o.each([l],function(x,D){if(b>0&&D%b){y+=m;return}var E=x==null||isNaN(x)||x==="",T=E?0:Yr(x,f,d,!0);E&&!_&&D?(g.push([g[g.length-1][0],0]),v.push([v[v.length-1][0],0])):!E&&_&&(g.push([y,0]),v.push([y,0])),g.push([y,T]),v.push([y,T]),y+=m,_=E}),u=this._shadowPolygonPts=g,c=this._shadowPolylinePts=v}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var w=this.dataZoomModel;function S(x){var D=w.getModel(x?"selectedDataBackground":"dataBackground"),E=new At,T=new La({shape:{points:u},segmentIgnoreThreshold:1,style:D.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),k=new Fa({shape:{points:c},segmentIgnoreThreshold:1,style:D.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return E.add(T),E.add(k),E}for(var A=0;A<3;A++){var C=S(A===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();B(l,function(u){if(!i&&!(n!==!0&&Ut(G7e,u.get("type"))<0)){var c=a.getComponent(Uc(o),s).axis,f=W7e(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),i={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new gm({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new gm({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:N7e,fill:"rgba(0,0,0,0)"}})),B([0,1],function(b){var _=l.get("handleIcon");!u2[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var w=Jn(_,-1,0,2,2,null,!0);w.attr({cursor:Dz(this._orient),draggable:!0,drift:Qe(this._onDragMove,this,b),ondragend:Qe(this._onDragEnd,this),onmouseover:Qe(this._showDataInfo,this,!0),onmouseout:Qe(this._showDataInfo,this,!1),z2:5});var S=w.getBoundingRect(),A=l.get("handleSize");this._handleHeight=We(A,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Kh(w);var C=l.get("handleColor");C!=null&&(w.style.fill=C),o.add(i[b]=w);var x=l.getModel("textStyle");t.add(a[b]=new Ar({silent:!0,invisible:!0,style:hn(x,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:x.getTextColor(),font:x.getFont()}),z2:10}))},this);var d=h;if(f){var p=We(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new vr({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),v=p*.8,m=n.moveHandleIcon=Jn(l.get("moveHandleIcon"),-v/2,-v/2,v,v,"#fff",!0);m.silent=!0,m.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new vr({invisible:!0,shape:{y:s[1]-y,height:p+y}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(m),o.add(d)}d.attr({draggable:!0,cursor:Dz(this._orient),drift:Qe(this._onDragMove,this,"all"),ondragstart:Qe(this._showDataInfo,this,!0),ondragend:Qe(this._onDragEnd,this),onmouseover:Qe(this._showDataInfo,this,!0),onmouseout:Qe(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Yr(t[0],[0,100],n,!0),Yr(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Od(n,a,o,i.get("zoomLock")?"all":t,s.minSpan!=null?Yr(s.minSpan,l,o,!0):null,s.maxSpan!=null?Yr(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Qo([Yr(a[0],o,l,!0),Yr(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,i=this._handleEnds,a=Qo(i.slice()),o=this._size;B([0,1],function(d){var p=n.handles[d],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;cn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,i=t.offsetY;this._brushStart=new Ot(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Qo([Yr(i.x,o,s,!0),Yr(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Pu(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new gm({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?U7e:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=Fee(this.dataZoomModel).infoList;if(!t&&n.length){var i=n[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var a=this.api.getWidth(),o=this.api.getHeight();t={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(MB);function W7e(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function Dz(r){return r==="vertical"?"ns-resize":"ew-resize"}function Jee(r){r.registerComponentModel(R7e),r.registerComponentView(H7e),IB(r)}function $7e(r){qt(Qee),qt(Jee)}var ete={get:function(r,e,t){var n=wt((j7e[r]||{})[e]);return t&&De(n)?n[n.length-1]:n}},j7e={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Ez=bi.mapVisual,q7e=bi.eachVisual,Y7e=De,Tz=B,Z7e=Qo,X7e=Yr,F2=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,n){var i=this.option;!n&&Hee(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=Qe(t,this),this.controllerVisuals=TI(this.option.controller,n,t),this.targetVisuals=TI(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=Qr(t),n},e.prototype.eachTargetSeries=function(t,n){B(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&t.call(n,a)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(i){i===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],De(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(Ye(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(pt(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+c[1]:t[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=Z7e([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var i=t.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Rt(a,i),Rt(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Y7e(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,h,d){var p=f[h],g=f[d];p&&!g&&(g=f[d]={},Tz(p,function(v,m){if(bi.isValidType(m)){var y=ete.get(m,"inactive",s);y!=null&&(g[m]=y,m==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),v=g||"roundRect";Tz(this.stateList,function(m){var y=this.itemSize,b=f[m];b||(b=f[m]={color:s?p:[p]}),b.symbol==null&&(b.symbol=h&&wt(h)||(s?v:[v])),b.symbolSize==null&&(b.symbolSize=d&&wt(d)||(s?y[0]:[y[0],y[0]])),b.symbol=Ez(b.symbol,function(S){return S==="none"?v:S});var _=b.symbolSize;if(_!=null){var w=-1/0;q7e(_,function(S){S>w&&(w=S)}),b.symbolSize=Ez(_,function(S){return X7e(S,[0,w],[0,y[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(rr),kz=[20,140],K7e=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=kz[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=kz[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):De(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),B(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=Qo((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]=i[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(t){var n=Mz(this,"outOfRange",this.getExtent()),i=Mz(this,"inRange",this.option.range.slice()),a=[];function o(d,p){a.push({value:d,color:t(d,p)})}for(var s=0,l=0,u=i.length,c=n.length;lt[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(t,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,i=this.visualMapModel.get("inverse");return new At(n==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();Q7e([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=t[c];var h=il(t[c],[0,l[1]],u,!0),d=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=d/l[0],f.x=l[0]-d/2;var p=Ms(i.handleLabelPoints[c],Qh(f,this.group));s[c].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),g=il(t,s,u,!0),v=l[0]-p/2,m={x:f.x,y:f.y};f.y=g,f.x=v;var y=Ms(c.indicatorLabelPoint,Qh(f,this.group)),b=c.indicatorLabel;b.attr("invisible",!1);var _=this._applyTransform("left",c.mainGroup),w=this._orient,S=w==="horizontal";b.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:S?_:"middle",align:S?"center":_});var A={x:v,y:g,style:{fill:d}},C={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:"cubicInOut",additive:!0};f.x=m.x,f.y=m.y,f.animateTo(A,x),b.animateTo(C,x)}else f.attr(A),b.attr(C);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var E=0;Eo[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,d=[];(n||Bz(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=lEe(h,d);this._dispatchHighDown("downplay",gw(p[0],i)),this._dispatchHighDown("highlight",gw(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(Bh(t.target,function(l){var u=Ct(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),r.getData().setVisual("visualMeta",n)}}];function oze(r,e,t,n){for(var i=e.targetVisuals[n],a=bi.prepareVisualTypes(i),o={color:b1(r.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(nze,ize),B(aze,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(sze))}function ite(r){r.registerComponentModel(K7e),r.registerComponentView(tze),nte(r)}var lze=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],uze[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=wt(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Ee(this._pieceList,function(l){return l=wt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},i=bi.listVisualTypes(),a=this.isCategory();B(t.pieces,function(s){B(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),B(n,function(s,l){var u=!1;B(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&B(this.stateList,function(c){(t[c]||(t[c]={}))[l]=ete.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var i=this.option,a=this._pieceList,o=(n?i:t).selected||{};if(i.selected=o,B(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;B(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=wt(t)},e.prototype.getValueState=function(t){var n=bi.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=bi.findPieceIndex(l,i);c===t&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var i=t.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var d=t(h,f);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return B(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Tf(F2.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(F2),uze={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function Nz(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var cze=function(r){de(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,h=ki(n.get("showLabel",!0),!f);f&&this._renderEndsText(t,f[0],u,h,l),B(c.viewPieceList,function(d){var p=d.piece,g=new At;g.onclick=Qe(this._onItemClick,this,p),this._enableHoverLink(g,d.indexInModelPieceList);var v=n.getRepresentValue(p);if(this._createItemSymbol(g,v,[0,0,u[0],u[1]]),h){var m=this.visualMapModel.getValueState(v);g.add(new Ar({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1}}))}t.add(g)},this),f&&this._renderEndsText(t,f[1],u,h,l),Jh(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var i=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:gw(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return rte(t,this.api,t.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,n,i,a,o){if(n){var s=new At,l=this.visualMapModel.textStyleModel;s.add(new Ar({style:hn(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=Ee(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),a=t.get("orient"),o=t.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(t,n,i){t.add(Jn(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},e.prototype._onItemClick=function(t){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=wt(i.selected),s=n.getSelectedMapKey(t);a==="single"||a===!0?(o[s]=!0,B(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(tte);function ate(r){r.registerComponentModel(lze),r.registerComponentView(cze),nte(r)}function fze(r){qt(ite),qt(ate)}var hze={label:{enabled:!0},decal:{show:!1}},zz=yr(),dze={};function pze(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=wt(hze);Rt(n.label,r.getLocaleModel().get("aria"),!1),Rt(t.option,n,!1),i(),a();function i(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=nt();r.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),zz(h).scope=d}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(pt(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var y=FM(h.ecModel,h.name,dze,r.getSeriesCount()),b=d.getVisual("decal");d.setVisual("decal",_(b,y))}else{var p=h.getRawData(),g={},v=zz(h).scope;d.each(function(w){var S=d.getRawIndex(w);g[S]=w});var m=p.count();p.each(function(w){var S=g[w],A=p.getName(w)||w+"",C=FM(h.ecModel,A,v,m),x=d.getItemVisual(S,"decal");d.setItemVisual(S,"decal",_(x,C))})}function _(w,S){var A=w?ye(ye({},S),w):S;return A.dirty=!0,A}})}}function a(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=mt(f.option,c),!!f.get("enabled")){if(f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=r.getSeriesCount(),d=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,g=Math.min(h,p),v;if(!(h<1)){var m=s();if(m){var y=f.get(["general","withTitle"]);v=o(y,{title:m})}else v=f.get(["general","withoutTitle"]);var b=[],_=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);v+=o(_,{seriesCount:h}),r.eachSeries(function(C,x){if(x1?f.get(["series","multiple",T]):f.get(["series","single",T]),D=o(D,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var k=C.getData();if(k.count()>d){var M=f.get(["data","partialData"]);D+=o(M,{displayCnt:d})}else D+=f.get(["data","allData"]);for(var L=f.get(["data","separator","middle"]),F=f.get(["data","separator","end"]),U=[],N=0;N":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},mze=function(){function r(e){var t=this._condVal=Ye(e)?new RegExp(e):Txe(e)?e:null;if(t==null){var n="";Hr(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return Ye(t)?this._condVal.test(e):Mr(t)?this._condVal.test(e+""):!1},r}(),yze=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),bze=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&n.push(i),i=[k,M]}function c(k,M,L,F){Mp(k,L)&&Mp(M,F)||i.push(k,M,L,F,L,F)}function f(k,M,L,F,U,N){var $=Math.abs(M-k),H=Math.tan($/4)*4/3,P=MC:E2&&n.push(i),n}function PI(r,e,t,n,i,a,o,s,l,u){if(Mp(r,t)&&Mp(e,n)&&Mp(i,o)&&Mp(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-r,d=s-e,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var g=t-r,v=n-e,m=i-o,y=a-s,b=g*g+v*v,_=m*m+y*y;if(b=0&&C=0){l.push(o,s);return}var x=[],D=[];df(r,t,i,o,.5,x),df(e,n,a,s,.5,D),PI(x[0],D[0],x[1],D[1],x[2],D[2],x[3],D[3],l,u),PI(x[4],D[4],x[5],D[5],x[6],D[6],x[7],D[7],l,u)}function Fze(r,e){var t=OI(r),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),f=ste([l,u],c?0:1,e),h=(c?s:u)/f.length,d=0;di,o=ste([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=r[s]/o.length,h=0;h1?null:new Ot(g*l+r,g*u+e)}function Pze(r,e,t){var n=new Ot;Ot.sub(n,t,e),n.normalize();var i=new Ot;Ot.sub(i,r,e);var a=i.dot(n);return a}function op(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function Rze(r,e,t){for(var n=r.length,i=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),Rze(e,u,c)}function B2(r,e,t,n){if(t===1)n.push(e);else{var i=Math.floor(t/2),a=r(e);B2(r,a[0],i,n),B2(r,a[1],t-i,n)}return n}function Nze(r,e){for(var t=[],n=0;n0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function R2(r){var e=1/0,t=1/0,n=-1/0,i=-1/0,a=Ee(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=Ee(a,function(s,l){return{cp:s,z:qze(s[0],s[1],e,t,n,i),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function cte(r){return Gze(r.path,r.count)}function RI(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Yze(r,e,t){var n=[];function i(w){for(var S=0;S=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var a=l.length,u=Math.ceil(a/2);t[i].many=l.slice(u,a),t[s].many=l.slice(0,u),s++}return t}var Xze={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;Yz(r)&&(u=r,c=e),Yz(e)&&(u=e,c=r);function f(m,y,b,_,w){var S=m.many,A=m.one;if(S.length===1&&!w){var C=y?S[0]:A,x=y?A:S[0];if(O2(C))f({many:[C],one:x},!0,b,_,!0);else{var D=s?mt({delay:s(b,_)},l):l;GB(C,x,D),a(C,x,C,x,D)}}else for(var E=mt({dividePath:Xze[t],individualDelay:s&&function(U,N,$,H){return s(U+b,_)}},l),T=y?Yze(S,A,E):Zze(A,S,E),k=T.fromIndividuals,M=T.toIndividuals,L=k.length,F=0;Fe.length,d=u?Zz(c,u):Zz(h?e:r,[h?r:e]),p=0,g=0;gfte))for(var a=n.getIndices(),o=0;o0&&S.group.traverse(function(C){C instanceof Xt&&!C.animators.length&&C.animateFrom({style:{opacity:0}},A)})})}function eV(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function tV(r){return De(r)?r.sort().join(","):r}function wc(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function nVe(r,e){var t=nt(),n=nt(),i=nt();return B(r.oldSeries,function(a,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=eV(a),c=tV(u);n.set(c,{dataGroupId:s,data:l}),De(u)&&B(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),B(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=eV(a),u=tV(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:wc(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:wc(s),data:s}]});else if(De(l)){var f=[];B(l,function(p){var g=n.get(p);g.data&&f.push({dataGroupId:g.dataGroupId,divide:wc(g.data),data:g.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:wc(s)}]})}else{var h=i.get(l);if(h){var d=t.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:wc(h.data)}],newSeries:[]},t.set(h.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:wc(s)})}}}}),t}function rV(r,e){for(var t=0;t=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:wc(e.oldData[s]),groupIdDim:o.dimension})}),B(Qr(r.to),function(o){var s=rV(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:wc(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&hte(i,a,n)}function aVe(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){B(Qr(n.seriesTransition),function(i){B(Qr(i.to),function(a){for(var o=n.updatedSeries,s=0;s${$n(c.value[1],a)}`,h=`
`,d=`
${$n(c.axisValueLabel,o)}
`;return f+h+d},backgroundColor:"transparent",borderWidth:0,borderColor:"transparent",extraCssText:"box-shadow: none; padding-bottom: 0;",padding:0,textStyle:{fontSize:9}},legend:{show:!1},grid:{left:0,right:0,bottom:0,top:0,containLabel:!0},xAxis:{type:"time",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{width:.75,color:Dp.grey500}},axisTick:{show:!1},axisLabel:{show:!1,hideOverlap:!0,showMaxLabel:!1,formatter:!1,margin:6},scale:!0,z:2,boundaryGap:"2%",axisPointer:{show:!0,snap:!0,type:"line",z:0,lineStyle:{width:.5},handle:{show:!1},label:{show:!1}}},yAxis:[{type:"value",logBase:10,splitLine:{show:!1},axisLine:{show:!1,onZero:!1},axisTick:{show:!1},axisLabel:{show:!1,hideOverlap:!0,margin:4},name:"",nameLocation:"end",nameTextStyle:{align:"left",verticalAlign:"top",padding:[0,5,0,0]},nameGap:6,scale:i,boundaryGap:["1%","1%"],z:2}],series:[{type:t,triggerLineEvent:!0,label:{show:!1,position:"top",padding:0,fontSize:9},labelLayout:{hideOverlap:!0},connectNulls:!1,emphasis:{disabled:!0},lineStyle:{width:1,type:"solid",color:n??Dp.grey400},areaStyle:{color:e==="area"?n?tr(n).brighten(1.5).hex():Dp.grey300:"transparent"},itemStyle:{color:n??Dp.grey400},showSymbol:!1,symbol:"circle",symbolSize:0,step:!1,name:"sparkline",data:r,yAxisIndex:0}],animation:!1}}function uVe(r){let e;return{c(){e=ie("div"),this.h()},l(t){e=ae(t,"DIV",{class:!0,style:!0}),ge(e).forEach(V),this.h()},h(){Y(e,"class","inline-block align-baseline overflow-visible"),Re(e,"width",r[0]+"px"),Re(e,"height",r[1]+"px")},m(t,n){se(t,e,n),r[20](e)},p(t,n){n&1&&Re(e,"width",t[0]+"px"),n&2&&Re(e,"height",t[1]+"px")},i:Oe,o:Oe,d(t){t&&V(e),r[20](null)}}}function cVe(r){let e,t;return{c(){e=ie("div"),t=new jg(!1),this.h()},l(n){e=ae(n,"DIV",{class:!0,style:!0});var i=ge(e);t=qg(i,!1),i.forEach(V),this.h()},h(){t.a=null,Y(e,"class","inline-block align-baseline"),Re(e,"width",r[0]+"px"),Re(e,"height",r[1]+"px")},m(n,i){se(n,e,i),t.m(r[5],e)},p(n,i){i&32&&t.p(n[5]),i&1&&Re(e,"width",n[0]+"px"),i&2&&Re(e,"height",n[1]+"px")},i:Oe,o:Oe,d(n){n&&V(e)}}}function fVe(r){let e,t;return{c(){e=ie("div"),t=new jg(!1),this.h()},l(n){e=ae(n,"DIV",{class:!0,style:!0});var i=ge(e);t=qg(i,!1),i.forEach(V),this.h()},h(){t.a=null,Y(e,"class","inline-block align-baseline"),Re(e,"width",r[0]+"px"),Re(e,"height",r[1]+"px")},m(n,i){se(n,e,i),t.m(r[6],e)},p(n,i){i&64&&t.p(n[6]),i&1&&Re(e,"width",n[0]+"px"),i&2&&Re(e,"height",n[1]+"px")},i:Oe,o:Oe,d(n){n&&V(e)}}}function hVe(r){let e,t;return e=new $L({props:{error:r[4]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&16&&(a.error=n[4]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function dVe(r){let e,t,n,i;const a=[hVe,fVe,cVe,uVe],o=[];function s(l,u){return l[4]?0:l[2]?3:2}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),se(l,n,u),i=!0},p(l,[u]){let c=e;e=s(l),e===c?o[e].p(l,u):(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n))},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),o[e].d(l)}}}let pVe="white";function gVe(r,e,t){let{config:n={}}=e,{width:i=50}=e,{height:a=15}=e,{interactive:o=!0}=e,s,l=null,u="",{data:c=void 0}=e,{dateCol:f=void 0}=e,{valueCol:h=void 0}=e,{valueFmt:d=void 0}=e,p,{dateFmt:g=void 0}=e,v,{type:m="line"}=e,{color:y=void 0}=e,{yScale:b=!1}=e,_=m==="area"?"line":m,{connectGroup:w=void 0}=e,S,A;function C(){o&&s&&!l&&(t(17,l=VD(s,"evidence-light",{renderer:"svg",width:i,height:a})),l.setOption(n),w&&(t(17,l.group=w,l),JIe(w)))}p0(()=>{if(o)C();else{const D=document.createElement("div");D.style.width=i+"px",D.style.height=a+"px";const E=VD(D,"evidence-light",{renderer:"svg",height:a,width:i});E.setOption(n),t(5,u=E.renderToSVGString()),E.dispose()}}),Q2(()=>{l&&l.dispose()});function x(D){KI[D?"unshift":"push"](()=>{s=D,t(3,s)})}return r.$$set=D=>{"config"in D&&t(7,n=D.config),"width"in D&&t(0,i=D.width),"height"in D&&t(1,a=D.height),"interactive"in D&&t(2,o=D.interactive),"data"in D&&t(9,c=D.data),"dateCol"in D&&t(10,f=D.dateCol),"valueCol"in D&&t(11,h=D.valueCol),"valueFmt"in D&&t(12,d=D.valueFmt),"dateFmt"in D&&t(13,g=D.dateFmt),"type"in D&&t(14,m=D.type),"color"in D&&t(15,y=D.color),"yScale"in D&&t(8,b=D.yScale),"connectGroup"in D&&t(16,w=D.connectGroup)},r.$$.update=()=>{if(r.$$.dirty&4&&t(2,o=o==="true"||o===!0),r.$$.dirty&256&&t(8,b=b==="true"||b===!0),r.$$.dirty&982943)try{if(!["line","area","bar"].includes(m))throw Error("type must be line, area, or bar");t(1,{height:a,width:i}=oVe(a,i),a,(t(0,i),t(14,m),t(1,a),t(9,c),t(11,h),t(10,f),t(12,d),t(13,g),t(21,_),t(15,y),t(8,b),t(18,p),t(19,v),t(7,n),t(3,s),t(2,o),t(17,l),t(4,A))),M3(c,[h,f]),t(18,{value_format_object:p,date_format_object:v}=sVe(c,h,f,d,g),p,(t(19,v),t(14,m),t(1,a),t(0,i),t(9,c),t(11,h),t(10,f),t(12,d),t(13,g),t(21,_),t(15,y),t(8,b),t(18,p),t(7,n),t(3,s),t(2,o),t(17,l),t(4,A)));const D=c.map(E=>[E[f],E[h]]);D.sort((E,T)=>E[0]-T[0]),t(7,n=lVe(D,m,_,y,b,p,v,a,pVe)),s&&o&&!l&&C()}catch(D){t(4,A=D),console.error("\x1B[31m%s\x1B[0m",`Error in Sparkline: ${A.message}`)}if(r.$$.dirty&640,r.$$.dirty&131200&&l&&n&&l.setOption(n,!0),r.$$.dirty&135)if(o)C();else{const D=document.createElement("div");D.style.width=i+"px",D.style.height=a+"px";const E=VD(D,"evidence-light",{renderer:"svg",height:a,width:i});E.setOption(n),t(5,u=E.renderToSVGString()),E.dispose()}},[i,a,o,s,A,u,S,n,b,c,f,h,d,g,m,y,w,l,p,v,x]}class UB extends Cr{constructor(e){super(),xr(this,e,gVe,dVe,Dr,{config:7,width:0,height:1,interactive:2,data:9,dateCol:10,valueCol:11,valueFmt:12,dateFmt:13,type:14,color:15,yScale:8,connectGroup:16})}}function nV(r,e,t){const n=r.slice();return n[21]=e[t],n[23]=t,n}function iV(r,e,t){var g,v,m,y;const n=r.slice();n[24]=e[t],n[37]=t;const i=ws(n[24],n[13]);n[25]=i;const a=n[24].scaleColumn?n[13].find(function(..._){return r[16](n[24],..._)}):n[25];n[26]=a;const o=n[24].colorMin??((g=n[26].columnUnitSummary)==null?void 0:g.min);n[27]=o;const s=n[24].colorMax??((v=n[26].columnUnitSummary)==null?void 0:v.max);n[28]=s;const l=n[28]-n[27]!==0&&!isNaN(n[28])&&!isNaN(n[27]);n[29]=l;const u=n[24].fmt?yi(n[24].fmt,(m=n[25].format)==null?void 0:m.valueType):n[24].fmtColumn?yi(n[21][n[24].fmtColumn],(y=n[25].format)==null?void 0:y.valuetype):n[25].format;n[30]=u;const c=n[24].colorBreakpoints??(n[24].colorMid?[n[27],n[24].colorMid,n[28]]:[n[27],n[28]]);n[31]=c;const f=n[24].colorPalette?tr.scale(n[24].colorPalette).domain(n[31]).nodata("white"):"";n[32]=f;const h=n[24].contentType==="colorscale"&&n[29]&&n[24].colorPalette?n[24].scaleColumn?n[32](n[21][n[24].scaleColumn]).hex():n[32](n[21][n[24].id]).hex():"";n[33]=h;const d=n[24].redNegatives?n[21][n[24].id]<0?"rgb(220 38 38)":"":n[24].contentType==="colorscale"&&n[29]&&n[24].colorPalette?tr.contrast(n[33],Dp.grey999)=0?e[28]:e[28]<0?e[27]:Math.abs(e[27])+e[28];return e[39]=t,e}function aV(r){let e,t;return e=new qu({props:{class:"index w-[2%]",compact:r[12],$$slots:{default:[wVe]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[0]&4096&&(a.compact=n[12]),i[0]&32|i[1]&1024&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function wVe(r){let e=(r[5]+r[23]+1).toLocaleString()+"",t;return{c(){t=ht(e)},l(n){t=dt(n,e)},m(n,i){se(n,t,i)},p(n,i){i[0]&32&&e!==(e=(n[5]+n[23]+1).toLocaleString()+"")&&Bt(t,e)},d(n){n&&V(t)}}}function SVe(r){let e=$n(r[21][r[24].id],r[30],r[25].columnUnitSummary)+"",t;return{c(){t=ht(e)},l(n){t=dt(n,e)},m(n,i){se(n,t,i)},p(n,i){i[0]&10241&&e!==(e=$n(n[21][n[24].id],n[30],n[25].columnUnitSummary)+"")&&Bt(t,e)},i:Oe,o:Oe,d(n){n&&V(t)}}}function AVe(r){let e,t=r[21][r[24].id]+"",n;return{c(){e=new jg(!1),n=Xe(),this.h()},l(i){e=qg(i,!1),n=Xe(),this.h()},h(){e.a=n},m(i,a){e.m(t,i,a),se(i,n,a)},p(i,a){a[0]&2049&&t!==(t=i[21][i[24].id]+"")&&e.p(t)},i:Oe,o:Oe,d(i){i&&(V(n),e.d())}}}function CVe(r){let e,t,n,i;return t=new UB({props:{type:"area",data:[...r[21][r[24].id]],dateCol:r[24].sparkX,valueCol:r[24].sparkY,interactive:"false",color:r[24].sparkColor,yScale:r[24].sparkYScale,height:r[24].sparkHeight??20,width:r[24].sparkWidth??80}}),{c(){e=ie("div"),Ve(t.$$.fragment),this.h()},l(a){e=ae(a,"DIV",{class:!0});var o=ge(e);Ge(t.$$.fragment,o),o.forEach(V),this.h()},h(){Y(e,"class",n="items-center justify-"+r[40]+" flex svelte-1ukk5on")},m(a,o){se(a,e,o),Ue(t,e,null),i=!0},p(a,o){const s={};o[0]&2049&&(s.data=[...a[21][a[24].id]]),o[0]&2048&&(s.dateCol=a[24].sparkX),o[0]&2048&&(s.valueCol=a[24].sparkY),o[0]&2048&&(s.color=a[24].sparkColor),o[0]&2048&&(s.yScale=a[24].sparkYScale),o[0]&2048&&(s.height=a[24].sparkHeight??20),o[0]&2048&&(s.width=a[24].sparkWidth??80),t.$set(s),(!i||o[0]&2048&&n!==(n="items-center justify-"+a[40]+" flex svelte-1ukk5on"))&&Y(e,"class",n)},i(a){i||(X(t.$$.fragment,a),i=!0)},o(a){ee(t.$$.fragment,a),i=!1},d(a){a&&V(e),He(t)}}}function xVe(r){let e,t,n;return t=new UB({props:{type:"bar",data:[...r[21][r[24].id]],dateCol:r[24].sparkX,valueCol:r[24].sparkY,interactive:"false",color:r[24].sparkColor,yScale:r[24].sparkYScale,height:r[24].sparkHeight??19,width:r[24].sparkWidth??90}}),{c(){e=ie("div"),Ve(t.$$.fragment),this.h()},l(i){e=ae(i,"DIV",{class:!0});var a=ge(e);Ge(t.$$.fragment,a),a.forEach(V),this.h()},h(){Y(e,"class","items-center justify-center flex svelte-1ukk5on")},m(i,a){se(i,e,a),Ue(t,e,null),n=!0},p(i,a){const o={};a[0]&2049&&(o.data=[...i[21][i[24].id]]),a[0]&2048&&(o.dateCol=i[24].sparkX),a[0]&2048&&(o.valueCol=i[24].sparkY),a[0]&2048&&(o.color=i[24].sparkColor),a[0]&2048&&(o.yScale=i[24].sparkYScale),a[0]&2048&&(o.height=i[24].sparkHeight??19),a[0]&2048&&(o.width=i[24].sparkWidth??90),t.$set(o)},i(i){n||(X(t.$$.fragment,i),n=!0)},o(i){ee(t.$$.fragment,i),n=!1},d(i){i&&V(e),He(t)}}}function DVe(r){let e,t,n,i;return t=new UB({props:{type:"line",data:[...r[21][r[24].id]],dateCol:r[24].sparkX,valueCol:r[24].sparkY,interactive:"false",color:r[24].sparkColor,yScale:r[24].sparkYScale,height:r[24].sparkHeight??19,width:r[24].sparkWidth??90}}),{c(){e=ie("div"),Ve(t.$$.fragment),this.h()},l(a){e=ae(a,"DIV",{class:!0});var o=ge(e);Ge(t.$$.fragment,o),o.forEach(V),this.h()},h(){Y(e,"class",n="items-"+r[40]+" justify-"+r[40]+" flex svelte-1ukk5on")},m(a,o){se(a,e,o),Ue(t,e,null),i=!0},p(a,o){const s={};o[0]&2049&&(s.data=[...a[21][a[24].id]]),o[0]&2048&&(s.dateCol=a[24].sparkX),o[0]&2048&&(s.valueCol=a[24].sparkY),o[0]&2048&&(s.color=a[24].sparkColor),o[0]&2048&&(s.yScale=a[24].sparkYScale),o[0]&2048&&(s.height=a[24].sparkHeight??19),o[0]&2048&&(s.width=a[24].sparkWidth??90),t.$set(s),(!i||o[0]&2048&&n!==(n="items-"+a[40]+" justify-"+a[40]+" flex svelte-1ukk5on"))&&Y(e,"class",n)},i(a){i||(X(t.$$.fragment,a),i=!0)},o(a){ee(t.$$.fragment,a),i=!1},d(a){a&&V(e),He(t)}}}function EVe(r){let e,t,n,i,a=$n(r[21][r[24].id],r[30],r[25].columnUnitSummary)+"",o,s=r[27]<0&&oV(r),l=r[21][r[24].id]>=0&&lV(r);return{c(){e=ie("div"),s&&s.c(),t=Ie(),l&&l.c(),n=Ie(),i=ie("div"),o=ht(a),this.h()},l(u){e=ae(u,"DIV",{style:!0,class:!0});var c=ge(e);s&&s.l(c),t=Le(c),l&&l.l(c),n=Le(c),i=ae(c,"DIV",{style:!0,class:!0});var f=ge(i);o=dt(f,a),f.forEach(V),c.forEach(V),this.h()},h(){Re(i,"position","relative"),Re(i,"z-index","2"),Re(i,"padding-left","4px"),Re(i,"padding-right","4px"),Re(i,"text-align",r[24].align??"left"),Re(i,"width",Math.abs(r[28])/((r[27]<0?Math.abs(r[27]):0)+Math.abs(r[28]))*100+"%"),Re(i,"left",r[27]<0&&r[28]>=0?Math.abs(r[27])/(Math.abs(r[27])+r[28])*100+"%":"0"),Y(i,"class","svelte-1ukk5on"),zr(i,"invisible",r[24].hideLabels),Re(e,"width","100%"),Re(e,"background-color",r[24].backgroundColor),Re(e,"position","relative"),Re(e,"height","100%"),Re(e,"display","flex"),Re(e,"align-items","center"),Re(e,"overflow","hidden"),Y(e,"class","svelte-1ukk5on")},m(u,c){se(u,e,c),s&&s.m(e,null),Q(e,t),l&&l.m(e,null),Q(e,n),Q(e,i),Q(i,o)},p(u,c){u[27]<0?s?s.p(u,c):(s=oV(u),s.c(),s.m(e,t)):s&&(s.d(1),s=null),u[21][u[24].id]>=0?l?l.p(u,c):(l=lV(u),l.c(),l.m(e,n)):l&&(l.d(1),l=null),c[0]&10241&&a!==(a=$n(u[21][u[24].id],u[30],u[25].columnUnitSummary)+"")&&Bt(o,a),c[0]&2048&&Re(i,"text-align",u[24].align??"left"),c[0]&10240&&Re(i,"width",Math.abs(u[28])/((u[27]<0?Math.abs(u[27]):0)+Math.abs(u[28]))*100+"%"),c[0]&10240&&Re(i,"left",u[27]<0&&u[28]>=0?Math.abs(u[27])/(Math.abs(u[27])+u[28])*100+"%":"0"),c[0]&2048&&zr(i,"invisible",u[24].hideLabels),c[0]&2048&&Re(e,"background-color",u[24].backgroundColor)},i:Oe,o:Oe,d(u){u&&V(e),s&&s.d(),l&&l.d()}}}function TVe(r){let e,t;return e=new kA({props:{value:r[21][r[24].id],downIsGood:r[24].downIsGood,format_object:r[30],columnUnitSummary:r[25].columnUnitSummary,showValue:r[24].showValue,showSymbol:r[24].deltaSymbol,align:r[24].align,fontClass:"text-[9.25pt]",neutralMin:r[24].neutralMin,neutralMax:r[24].neutralMax,chip:r[24].chip}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[0]&2049&&(a.value=n[21][n[24].id]),i[0]&2048&&(a.downIsGood=n[24].downIsGood),i[0]&10241&&(a.format_object=n[30]),i[0]&10240&&(a.columnUnitSummary=n[25].columnUnitSummary),i[0]&2048&&(a.showValue=n[24].showValue),i[0]&2048&&(a.showSymbol=n[24].deltaSymbol),i[0]&2048&&(a.align=n[24].align),i[0]&2048&&(a.neutralMin=n[24].neutralMin),i[0]&2048&&(a.neutralMax=n[24].neutralMax),i[0]&2048&&(a.chip=n[24].chip),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function kVe(r){let e;function t(a,o){return a[24].linkLabel!=null&&a[21][a[24].linkLabel]==null&&a[24].linkLabel in a[21]?LVe:IVe}let n=t(r),i=n(r);return{c(){i.c(),e=Xe()},l(a){i.l(a),e=Xe()},m(a,o){i.m(a,o),se(a,e,o)},p(a,o){n===(n=t(a))&&i?i.p(a,o):(i.d(1),i=n(a),i&&(i.c(),i.m(e.parentNode,e)))},i:Oe,o:Oe,d(a){a&&V(e),i.d(a)}}}function MVe(r){let e,t,n;return{c(){e=ie("img"),this.h()},l(i){e=ae(i,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){s4(e.src,t=r[21][r[24].id])||Y(e,"src",t),Y(e,"alt",n=r[24].alt?r[21][r[24].alt]:r[21][r[24].id].replace(/^(.*[/])/g,"").replace(/[.][^.]+$/g,"")),Y(e,"class","mx-auto my-2 max-w-[unset] rounded-[unset] svelte-1ukk5on"),Re(e,"height",r[24].height),Re(e,"width",r[24].width)},m(i,a){se(i,e,a)},p(i,a){a[0]&2049&&!s4(e.src,t=i[21][i[24].id])&&Y(e,"src",t),a[0]&2049&&n!==(n=i[24].alt?i[21][i[24].alt]:i[21][i[24].id].replace(/^(.*[/])/g,"").replace(/[.][^.]+$/g,""))&&Y(e,"alt",n),a[0]&2048&&Re(e,"height",i[24].height),a[0]&2048&&Re(e,"width",i[24].width)},i:Oe,o:Oe,d(i){i&&V(e)}}}function oV(r){let e,t=r[21][r[24].id]<0&&sV(r);return{c(){t&&t.c(),e=Xe()},l(n){t&&t.l(n),e=Xe()},m(n,i){t&&t.m(n,i),se(n,e,i)},p(n,i){n[21][n[24].id]<0?t?t.p(n,i):(t=sV(n),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(n){n&&V(e),t&&t.d(n)}}}function sV(r){let e;return{c(){e=ie("div"),this.h()},l(t){e=ae(t,"DIV",{style:!0,class:!0}),ge(e).forEach(V),this.h()},h(){Re(e,"width",Math.min(Math.abs(r[21][r[24].id]/r[39]*100),100)+"%"),Re(e,"background-color",r[24].negativeBarColor),Re(e,"height","100%"),Re(e,"position","absolute"),Re(e,"right",(1-Math.abs(r[27])/(Math.abs(r[27])+r[28]))*100+"%"),Y(e,"class","svelte-1ukk5on")},m(t,n){se(t,e,n)},p(t,n){n[0]&10241&&Re(e,"width",Math.min(Math.abs(t[21][t[24].id]/t[39]*100),100)+"%"),n[0]&2048&&Re(e,"background-color",t[24].negativeBarColor),n[0]&10240&&Re(e,"right",(1-Math.abs(t[27])/(Math.abs(t[27])+t[28]))*100+"%")},d(t){t&&V(e)}}}function lV(r){let e;return{c(){e=ie("div"),this.h()},l(t){e=ae(t,"DIV",{style:!0,class:!0}),ge(e).forEach(V),this.h()},h(){Re(e,"width",Math.min(r[21][r[24].id]/r[39]*100,100)+"%"),Re(e,"background-color",r[24].barColor),Re(e,"height","100%"),Re(e,"position","absolute"),Re(e,"left",r[27]<0?Math.abs(r[27])/(Math.abs(r[27])+r[28])*100+"%":"0"),Y(e,"class","svelte-1ukk5on")},m(t,n){se(t,e,n)},p(t,n){n[0]&10241&&Re(e,"width",Math.min(t[21][t[24].id]/t[39]*100,100)+"%"),n[0]&2048&&Re(e,"background-color",t[24].barColor),n[0]&10240&&Re(e,"left",t[27]<0?Math.abs(t[27])/(Math.abs(t[27])+t[28])*100+"%":"0")},d(t){t&&V(e)}}}function IVe(r){let e,t,n;function i(l,u){return l[24].linkLabel!=null?FVe:uV}function a(l,u){return u===uV?mVe(l):l}let o=i(r),s=o(a(r,o));return{c(){e=ie("a"),s.c(),this.h()},l(l){e=ae(l,"A",{href:!0,target:!0,class:!0});var u=ge(e);s.l(u),u.forEach(V),this.h()},h(){Y(e,"href",t=nd(r[21][r[24].id])),Y(e,"target",n=r[24].openInNewTab?"_blank":""),Y(e,"class","text-blue-600 hover:text-blue-700 transition-colors duration-200 svelte-1ukk5on")},m(l,u){se(l,e,u),s.m(e,null)},p(l,u){o===(o=i(l))&&s?s.p(a(l,o),u):(s.d(1),s=o(a(l,o)),s&&(s.c(),s.m(e,null))),u[0]&2049&&t!==(t=nd(l[21][l[24].id]))&&Y(e,"href",t),u[0]&2048&&n!==(n=l[24].openInNewTab?"_blank":"")&&Y(e,"target",n)},d(l){l&&V(e),s.d()}}}function LVe(r){let e;return{c(){e=ht("-")},l(t){e=dt(t,"-")},m(t,n){se(t,e,n)},p:Oe,d(t){t&&V(e)}}}function uV(r){var n;let e=$n(r[21][r[24].id],r[24].fmt?yi(r[24].fmt,(n=r[13].format)==null?void 0:n.valueType):r[13].format,r[13].columnUnitSummary)+"",t;return{c(){t=ht(e)},l(i){t=dt(i,e)},m(i,a){se(i,t,a)},p(i,a){var o;a[0]&10241&&e!==(e=$n(i[21][i[24].id],i[24].fmt?yi(i[24].fmt,(o=i[13].format)==null?void 0:o.valueType):i[13].format,i[13].columnUnitSummary)+"")&&Bt(t,e)},d(i){i&&V(t)}}}function FVe(r){let e;function t(o,s){return o[21][o[24].linkLabel]!=null?cV:BVe}function n(o,s){return s===cV?vVe(o):o}let i=t(r),a=i(n(r,i));return{c(){a.c(),e=Xe()},l(o){a.l(o),e=Xe()},m(o,s){a.m(o,s),se(o,e,s)},p(o,s){i===(i=t(o))&&a?a.p(n(o,i),s):(a.d(1),a=i(n(o,i)),a&&(a.c(),a.m(e.parentNode,e)))},d(o){o&&V(e),a.d(o)}}}function BVe(r){let e=r[24].linkLabel+"",t;return{c(){t=ht(e)},l(n){t=dt(n,e)},m(n,i){se(n,t,i)},p(n,i){i[0]&2048&&e!==(e=n[24].linkLabel+"")&&Bt(t,e)},d(n){n&&V(t)}}}function cV(r){var n;let e=$n(r[21][r[24].linkLabel],r[24].fmt?yi(r[24].fmt,(n=r[38].format)==null?void 0:n.valueType):r[38].format,r[38].columnUnitSummary)+"",t;return{c(){t=ht(e)},l(i){t=dt(i,e)},m(i,a){se(i,t,a)},p(i,a){var o;a[0]&10241&&e!==(e=$n(i[21][i[24].linkLabel],i[24].fmt?yi(i[24].fmt,(o=i[38].format)==null?void 0:o.valueType):i[38].format,i[38].columnUnitSummary)+"")&&Bt(t,e)},d(i){i&&V(t)}}}function OVe(r){let e,t,n,i;const a=[MVe,kVe,TVe,EVe,DVe,xVe,CVe,AVe,SVe],o=[];function s(u,c){return u[24].contentType==="image"&&u[21][u[24].id]!==void 0?0:u[24].contentType==="link"&&u[21][u[24].id]!==void 0?1:u[24].contentType==="delta"&&u[21][u[24].id]!==void 0?2:u[24].contentType==="bar"&&u[21][u[24].id]!==void 0?3:u[24].contentType==="sparkline"&&u[21][u[24].id]!==void 0?4:u[24].contentType==="sparkbar"&&u[21][u[24].id]!==void 0?5:u[24].contentType==="sparkarea"&&u[21][u[24].id]!==void 0?6:u[24].contentType==="html"&&u[21][u[24].id]!==void 0?7:8}function l(u,c){return c===3?_Ve(u):c===4?bVe(u):c===6?yVe(u):u}return e=s(r),t=o[e]=a[e](l(r,e)),{c(){t.c(),n=Xe()},l(u){t.l(u),n=Xe()},m(u,c){o[e].m(u,c),se(u,n,c),i=!0},p(u,c){let f=e;e=s(u),e===f?o[e].p(l(u,e),c):(Tt(),ee(o[f],1,1,()=>{o[f]=null}),kt(),t=o[e],t?t.p(l(u,e),c):(t=o[e]=a[e](l(u,e)),t.c()),X(t,1),t.m(n.parentNode,n))},i(u){i||(X(t),i=!0)},o(u){ee(t),i=!1},d(u){u&&V(n),o[e].d(u)}}}function fV(r){var n;let e,t;return e=new qu({props:{class:(n=r[25])==null?void 0:n.type,compact:r[12],verticalAlign:r[7]==="section"?r[10]:void 0,rowSpan:r[7]==="section"&&r[8]===r[25].id&&r[23]===0?r[9]:1,show:!(r[7]==="section"&&r[8]===r[25].id&&r[23]!==0),align:r[24].align,paddingLeft:r[37]===0&&r[6]&&r[7]==="accordion"&&!r[3]?"28px":void 0,height:r[24].height,width:r[24].width,wrap:r[24].wrap,cellColor:r[33],fontColor:r[34],borderBottom:r[35],$$slots:{default:[OVe]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(i){Ge(e.$$.fragment,i)},m(i,a){Ue(e,i,a),t=!0},p(i,a){var s;const o={};a[0]&10240&&(o.class=(s=i[25])==null?void 0:s.type),a[0]&4096&&(o.compact=i[12]),a[0]&1152&&(o.verticalAlign=i[7]==="section"?i[10]:void 0),a[0]&11136&&(o.rowSpan=i[7]==="section"&&i[8]===i[25].id&&i[23]===0?i[9]:1),a[0]&10624&&(o.show=!(i[7]==="section"&&i[8]===i[25].id&&i[23]!==0)),a[0]&2048&&(o.align=i[24].align),a[0]&200&&(o.paddingLeft=i[37]===0&&i[6]&&i[7]==="accordion"&&!i[3]?"28px":void 0),a[0]&2048&&(o.height=i[24].height),a[0]&2048&&(o.width=i[24].width),a[0]&2048&&(o.wrap=i[24].wrap),a[0]&10241&&(o.cellColor=i[33]),a[0]&10241&&(o.fontColor=i[34]),a[0]&10257&&(o.borderBottom=i[35]),a[0]&10241|a[1]&1024&&(o.$$scope={dirty:a,ctx:i}),e.$set(o)},i(i){t||(X(e.$$.fragment,i),t=!0)},o(i){ee(e.$$.fragment,i),t=!1},d(i){He(e,i)}}}function hV(r){let e,t;return e=new qu({props:{compact:r[12],width:"16px",$$slots:{default:[PVe]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[0]&4096&&(a.compact=n[12]),i[0]&5|i[1]&1024&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function PVe(r){let e,t,n,i,a,o;return e=new po({props:{src:KH,class:"w-4 h-4"}}),{c(){Ve(e.$$.fragment),t=Ie(),n=ie("a"),i=ht("See more"),this.h()},l(s){Ge(e.$$.fragment,s),t=Le(s),n=ae(s,"A",{href:!0,class:!0});var l=ge(n);i=dt(l,"See more"),l.forEach(V),this.h()},h(){Y(n,"href",a=nd(r[21][r[2]])),Y(n,"class","sr-only svelte-1ukk5on")},m(s,l){Ue(e,s,l),se(s,t,l),se(s,n,l),Q(n,i),o=!0},p(s,l){(!o||l[0]&5&&a!==(a=nd(s[21][s[2]])))&&Y(n,"href",a)},i(s){o||(X(e.$$.fragment,s),o=!0)},o(s){ee(e.$$.fragment,s),o=!1},d(s){s&&(V(t),V(n)),He(e,s)}}}function dV(r){let e,t,n,i,a,o,s,l=r[3]&&r[7]!=="section"&&aV(r),u=Er(r[11]),c=[];for(let v=0;vee(c[v],1,1,()=>{c[v]=null});let h=r[2]&&r[21][r[2]]&&hV(r);function d(){return r[17](r[21])}function p(){return r[18](r[21])}function g(){return r[19](r[21])}return{c(){e=ie("tr"),l&&l.c(),t=Ie();for(let v=0;v{l=null}),kt()),m[0]&16345){u=Er(r[11]);let y;for(y=0;y{h=null}),kt()),(!a||m[0]&2)&&zr(e,"shaded-row",r[1]&&r[23]%2===1),(!a||m[0]&5)&&zr(e,"row-link",r[2]&&r[21][r[2]]),(!a||m[0]&16)&&zr(e,"row-lines",r[4])},i(v){if(!a){X(l);for(let m=0;mee(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;onew URL(C,window.location.origin).origin!==window.location.origin,y=async C=>{if(!a||!C[a])return;const x=C[a];m(x)||await mre(x)},b=async C=>{if(!a||!C[a])return;const x=C[a];if(m(x)){window.location=nd(x);return}await yre(nd(C[a]))},_=(C,x)=>x.id===C.scaleColumn,w=C=>y(C),S=C=>y(C),A=C=>b(C);return r.$$set=C=>{"displayedData"in C&&t(0,n=C.displayedData),"rowShading"in C&&t(1,i=C.rowShading),"link"in C&&t(2,a=C.link),"rowNumbers"in C&&t(3,o=C.rowNumbers),"rowLines"in C&&t(4,s=C.rowLines),"index"in C&&t(5,l=C.index),"columnSummary"in C&&t(13,u=C.columnSummary),"grouped"in C&&t(6,c=C.grouped),"groupType"in C&&t(7,f=C.groupType),"groupColumn"in C&&t(8,h=C.groupColumn),"rowSpan"in C&&t(9,d=C.rowSpan),"groupNamePosition"in C&&t(10,p=C.groupNamePosition),"orderedColumns"in C&&t(11,g=C.orderedColumns),"compact"in C&&t(12,v=C.compact)},[n,i,a,o,s,l,c,f,h,d,p,g,v,u,y,b,_,w,S,A]}class HB extends Cr{constructor(e){super(),xr(this,e,NVe,RVe,Dr,{displayedData:0,rowShading:1,link:2,rowNumbers:3,rowLines:4,index:5,columnSummary:13,grouped:6,groupType:7,groupColumn:8,rowSpan:9,groupNamePosition:10,orderedColumns:11,compact:12},null,[-1,-1])}}function pV(r,e,t){const n=r.slice();n[8]=e[t];const i=ws(n[8],n[2]);n[9]=i;const a=n[8].totalFmt?yi(n[8].totalFmt):n[8].fmt?yi(n[8].fmt):n[9].format;n[10]=a;const o=n[8].totalAgg??"sum";return n[11]=o,n}function gV(r){let e,t;return e=new qu({props:{class:"index w-[2%]",compact:r[7],topBorder:"border-t border-gray-600"}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&128&&(a.compact=n[7]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function zVe(r){let e=(r[8].totalFmt?$n(r[11],r[10],r[9].columnUnitSummary):r[11])+"",t;return{c(){t=ht(e)},l(n){t=dt(n,e)},m(n,i){se(n,t,i)},p(n,i){i&68&&e!==(e=(n[8].totalFmt?$n(n[11],n[10],n[9].columnUnitSummary):n[11])+"")&&Bt(t,e)},i:Oe,o:Oe,d(n){n&&V(t)}}}function VVe(r){let e,t,n,i;const a=[UVe,GVe],o=[];function s(l,u){return l[8].contentType==="delta"?0:1}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),se(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?o[e].p(l,u):(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n))},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),o[e].d(l)}}}function GVe(r){let e=$n(r[11]==="weightedMean"?GS(r[0],r[8].id,r[8].weightCol):r[9].columnUnitSummary[r[11]],r[10],r[9].columnUnitSummary)+"",t;return{c(){t=ht(e)},l(n){t=dt(n,e)},m(n,i){se(n,t,i)},p(n,i){i&69&&e!==(e=$n(n[11]==="weightedMean"?GS(n[0],n[8].id,n[8].weightCol):n[9].columnUnitSummary[n[11]],n[10],n[9].columnUnitSummary)+"")&&Bt(t,e)},i:Oe,o:Oe,d(n){n&&V(t)}}}function UVe(r){let e,t;return e=new kA({props:{value:r[11]==="weightedMean"?GS(r[0],r[8].id,r[8].weightCol):r[9].columnUnitSummary[r[11]],downIsGood:r[8].downIsGood,format_object:r[10],columnUnitSummary:r[9].columnUnitSummary,showValue:r[8].showValue,showSymbol:r[8].deltaSymbol,align:r[8].align,fontClass:"font-semibold text-[9.25pt]",neutralMin:r[8].neutralMin,neutralMax:r[8].neutralMax,chip:r[8].chip}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&69&&(a.value=n[11]==="weightedMean"?GS(n[0],n[8].id,n[8].weightCol):n[9].columnUnitSummary[n[11]]),i&64&&(a.downIsGood=n[8].downIsGood),i&68&&(a.format_object=n[10]),i&68&&(a.columnUnitSummary=n[9].columnUnitSummary),i&64&&(a.showValue=n[8].showValue),i&64&&(a.showSymbol=n[8].deltaSymbol),i&64&&(a.align=n[8].align),i&64&&(a.neutralMin=n[8].neutralMin),i&64&&(a.neutralMax=n[8].neutralMax),i&64&&(a.chip=n[8].chip),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function HVe(r){let e,t,n,i,a;const o=[VVe,zVe],s=[];function l(u,c){return c&64&&(e=null),e==null&&(e=!!["sum","mean","weightedMean","median","min","max","count","countDistinct"].includes(u[11])),e?0:1}return t=l(r,-1),n=s[t]=o[t](r),{c(){n.c(),i=Ie()},l(u){n.l(u),i=Le(u)},m(u,c){s[t].m(u,c),se(u,i,c),a=!0},p(u,c){let f=t;t=l(u,c),t===f?s[t].p(u,c):(Tt(),ee(s[f],1,1,()=>{s[f]=null}),kt(),n=s[t],n?n.p(u,c):(n=s[t]=o[t](u),n.c()),X(n,1),n.m(i.parentNode,i))},i(u){a||(X(n),a=!0)},o(u){ee(n),a=!1},d(u){u&&V(i),s[t].d(u)}}}function vV(r){let e,t;return e=new qu({props:{compact:r[7],dataType:r[9].type,align:r[8].align,height:r[8].height,width:r[8].width,wrap:r[8].wrap,topBorder:"border-t border-gray-600",$$slots:{default:[HVe]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&128&&(a.compact=n[7]),i&68&&(a.dataType=n[9].type),i&64&&(a.align=n[8].align),i&64&&(a.height=n[8].height),i&64&&(a.width=n[8].width),i&64&&(a.wrap=n[8].wrap),i&16453&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function WVe(r){let e,t,n,i=r[1]&&r[5]!=="section"&&gV(r),a=Er(r[6]),o=[];for(let l=0;lee(o[l],1,1,()=>{o[l]=null});return{c(){e=ie("tr"),i&&i.c(),t=Ie();for(let l=0;l{i=null}),kt()),u&197){a=Er(l[6]);let c;for(c=0;c{"data"in f&&t(0,n=f.data),"rowNumbers"in f&&t(1,i=f.rowNumbers),"columnSummary"in f&&t(2,a=f.columnSummary),"rowColor"in f&&t(3,o=f.rowColor),"fontColor"in f&&t(4,s=f.fontColor),"groupType"in f&&t(5,l=f.groupType),"orderedColumns"in f&&t(6,u=f.orderedColumns),"compact"in f&&t(7,c=f.compact)},[n,i,a,o,s,l,u,c]}class jVe extends Cr{constructor(e){super(),xr(this,e,$Ve,WVe,Dr,{data:0,rowNumbers:1,columnSummary:2,rowColor:3,fontColor:4,groupType:5,orderedColumns:6,compact:7})}}function mV(r,e,t){var l,u;const n=r.slice();n[9]=e[t];const i=ws(n[9],n[2]);n[10]=i;const a=n[9].fmt?yi(n[9].fmt,(l=n[10].format)==null?void 0:l.valueType):n[10].format;n[11]=a;const o=n[9].subtotalFmt?yi(n[9].subtotalFmt):n[9].totalFmt?yi(n[9].totalFmt):n[11];n[12]=o;const s=((u=n[12])==null?void 0:u.valueType)==="date"?"":n[12];return n[13]=s,n}function qVe(r){let e;return{c(){e=ht(r[0])},l(t){e=dt(t,r[0])},m(t,n){se(t,e,n)},p(t,n){n&1&&Bt(e,t[0])},i:Oe,o:Oe,d(t){t&&V(e)}}}function YVe(r){let e,t,n,i;const a=[XVe,ZVe],o=[];function s(l,u){return l[9].contentType==="delta"?0:1}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),se(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?o[e].p(l,u):(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n))},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),o[e].d(l)}}}function ZVe(r){let e=$n(Ou(r[1],r[9].id,r[9].totalAgg,r[10].type,r[9].weightCol),r[13],r[10].columnUnitSummary)+"",t;return{c(){t=ht(e)},l(n){t=dt(n,e)},m(n,i){se(n,t,i)},p(n,i){i&134&&e!==(e=$n(Ou(n[1],n[9].id,n[9].totalAgg,n[10].type,n[9].weightCol),n[13],n[10].columnUnitSummary)+"")&&Bt(t,e)},i:Oe,o:Oe,d(n){n&&V(t)}}}function XVe(r){let e,t;return e=new kA({props:{value:Ou(r[1],r[9].id,r[9].totalAgg,r[10].type,r[9].weightCol),downIsGood:r[9].downIsGood,format_object:r[11],columnUnitSummary:r[10].columnUnitSummary,showValue:r[9].showValue,showSymbol:r[9].deltaSymbol,align:r[9].align,fontClass:"font-medium text-[9.25pt]",neutralMin:r[9].neutralMin,neutralMax:r[9].neutralMax,chip:r[9].chip}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&134&&(a.value=Ou(n[1],n[9].id,n[9].totalAgg,n[10].type,n[9].weightCol)),i&128&&(a.downIsGood=n[9].downIsGood),i&132&&(a.format_object=n[11]),i&132&&(a.columnUnitSummary=n[10].columnUnitSummary),i&128&&(a.showValue=n[9].showValue),i&128&&(a.showSymbol=n[9].deltaSymbol),i&128&&(a.align=n[9].align),i&128&&(a.neutralMin=n[9].neutralMin),i&128&&(a.neutralMax=n[9].neutralMax),i&128&&(a.chip=n[9].chip),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function KVe(r){let e,t,n,i;const a=[YVe,qVe],o=[];function s(l,u){return l[9].id!==l[4]?0:l[5]==="section"?1:-1}return~(e=s(r))&&(t=o[e]=a[e](r)),{c(){t&&t.c(),n=Ie()},l(l){t&&t.l(l),n=Le(l)},m(l,u){~e&&o[e].m(l,u),se(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?~e&&o[e].p(l,u):(t&&(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt()),~e?(t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n)):t=null)},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),~e&&o[e].d(l)}}}function yV(r){let e,t;return e=new qu({props:{class:r[10].type+" font-medium border-t-[1px] border-t-gray-300",compact:r[8],align:r[9].align,$$slots:{default:[KVe]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&132&&(a.class=n[10].type+" font-medium border-t-[1px] border-t-gray-300"),i&256&&(a.compact=n[8]),i&128&&(a.align=n[9].align),i&65719&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function QVe(r){let e,t,n=Er(r[7]),i=[];for(let o=0;oee(i[o],1,1,()=>{i[o]=null});return{c(){e=ie("tr");for(let o=0;o{"groupName"in h&&t(0,n=h.groupName),"currentGroupData"in h&&t(1,i=h.currentGroupData),"columnSummary"in h&&t(2,a=h.columnSummary),"rowColor"in h&&t(3,o=h.rowColor),"groupBy"in h&&t(4,s=h.groupBy),"groupType"in h&&t(5,l=h.groupType),"fontColor"in h&&t(6,u=h.fontColor),"orderedColumns"in h&&t(7,c=h.orderedColumns),"compact"in h&&t(8,f=h.compact)},[n,i,a,o,s,l,u,c,f]}class eGe extends Cr{constructor(e){super(),xr(this,e,JVe,QVe,Dr,{groupName:0,currentGroupData:1,columnSummary:2,rowColor:3,groupBy:4,groupType:5,fontColor:6,orderedColumns:7,compact:8})}}function tGe(r){let e,t;return e=new po({props:{src:XH,class:"w-3 h-3 inline mb-0.5"}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function rGe(r){let e,t;return e=new po({props:{src:Mse,class:"w-3 h-3 inline mb-0.5"}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function nGe(r){let e,t,n,i;const a=[rGe,tGe],o=[];function s(l,u){return l[0]?0:1}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),se(l,n,u),i=!0},p(l,[u]){let c=e;e=s(l),e!==c&&(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt(),t=o[e],t||(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n))},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),o[e].d(l)}}}function iGe(r,e,t){let{ascending:n}=e;return r.$$set=i=>{"ascending"in i&&t(0,n=i.ascending)},[n]}class aGe extends Cr{constructor(e){super(),xr(this,e,iGe,nGe,Dr,{ascending:0})}}function bV(r,e,t){const n=r.slice();return n[12]=e[t],n}function _V(r,e,t){const n=r.slice();return n[12]=e[t],n}function lT(r){const e=r.slice(),t=e[3].map((n,i,a)=>{let o=i===0||n.colGroup!==a[i-1].colGroup,s=1;if(n.colGroup)for(let l=i+1;l0&&SV(r);return{c(){t&&t.c(),e=Xe()},l(n){t&&t.l(n),e=Xe()},m(n,i){t&&t.m(n,i),se(n,e,i)},p(n,i){n[15].length>0?t?t.p(n,i):(t=SV(n),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(n){n&&V(e),t&&t.d(n)}}}function SV(r){let e,t,n=r[0]&&AV(r),i=Er(r[15]),a=[];for(let o=0;o{c=null}),kt()),(!s||h&1048&&o!==(o=ws(r[12],r[4]).type+" "+(r[10]?"text-xs py-[1px] px-[4px]":"py-[2px] px-[8px]")+" svelte-1vzwapn"))&&Y(e,"class",o),h&8&&Re(e,"text-align",r[12].align??(["sparkline","sparkbar","sparkarea","bar"].includes(r[12].contentType)?"center":void 0)),h&4&&Re(e,"color",r[2]),h&2&&Re(e,"background-color",r[1]),h&32&&Re(e,"cursor",r[5]?"pointer":"auto"),h&520&&Re(e,"white-space",r[12].wrapTitle||r[9]?"normal":"nowrap")},i(f){s||(X(c),s=!0)},o(f){ee(c),s=!1},d(f){f&&V(e),c&&c.d(),l=!1,u()}}}function TV(r){let e,t='Links';return{c(){e=ie("th"),e.innerHTML=t,this.h()},l(n){e=ae(n,"TH",{role:!0,class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-17az424"&&(e.innerHTML=t),this.h()},h(){Y(e,"role","columnheader"),Y(e,"class","svelte-1vzwapn")},m(n,i){se(n,e,i)},d(n){n&&V(e)}}}function uGe(r){let e,t,n,i,a,o,s=r[3].length>0&&wV(lT(r)),l=r[0]&&xV(r),u=Er(r[3]),c=[];for(let d=0;dee(c[d],1,1,()=>{c[d]=null});let h=r[11]&&TV();return{c(){e=ie("thead"),s&&s.c(),t=Ie(),n=ie("tr"),l&&l.c(),i=Ie();for(let d=0;d0?s?s.p(lT(d),p):(s=wV(lT(d)),s.c(),s.m(e,t)):s&&(s.d(1),s=null),d[0]?l?l.p(d,p):(l=xV(d),l.c(),l.m(n,i)):l&&(l.d(1),l=null),p&2046){u=Er(d[3]);let g;for(g=0;g{"rowNumbers"in g&&t(0,n=g.rowNumbers),"headerColor"in g&&t(1,i=g.headerColor),"headerFontColor"in g&&t(2,a=g.headerFontColor),"orderedColumns"in g&&t(3,o=g.orderedColumns),"columnSummary"in g&&t(4,s=g.columnSummary),"sortable"in g&&t(5,l=g.sortable),"sortClick"in g&&t(6,u=g.sortClick),"formatColumnTitles"in g&&t(7,c=g.formatColumnTitles),"sortObj"in g&&t(8,f=g.sortObj),"wrapTitles"in g&&t(9,h=g.wrapTitles),"compact"in g&&t(10,d=g.compact),"link"in g&&t(11,p=g.link)},[n,i,a,o,s,l,u,c,f,h,d,p]}class fGe extends Cr{constructor(e){super(),xr(this,e,cGe,uGe,Dr,{rowNumbers:0,headerColor:1,headerFontColor:2,orderedColumns:3,columnSummary:4,sortable:5,sortClick:6,formatColumnTitles:7,sortObj:8,wrapTitles:9,compact:10,link:11})}}function hGe(r){let e,t,n;return{c(){e=ie("span"),t=Mi("svg"),n=Mi("path"),this.h()},l(i){e=ae(i,"SPAN",{"aria-expanded":!0,class:!0});var a=ge(e);t=Ii(a,"svg",{viewBox:!0,width:!0,height:!0,class:!0});var o=ge(t);n=Ii(o,"path",{fill:!0,"fill-rule":!0,d:!0}),ge(n).forEach(V),o.forEach(V),a.forEach(V),this.h()},h(){Y(n,"fill",r[1]),Y(n,"fill-rule","evenodd"),Y(n,"d","M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"),Y(t,"viewBox","0 0 16 16"),Y(t,"width",r[2]),Y(t,"height",r[2]),Y(t,"class","svelte-c6mrxw"),Y(e,"aria-expanded",r[0]),Y(e,"class","inline-flex svelte-c6mrxw")},m(i,a){se(i,e,a),Q(e,t),Q(t,n)},p(i,[a]){a&2&&Y(n,"fill",i[1]),a&4&&Y(t,"width",i[2]),a&4&&Y(t,"height",i[2]),a&1&&Y(e,"aria-expanded",i[0])},i:Oe,o:Oe,d(i){i&&V(e)}}}function dGe(r,e,t){let{toggled:n=!1}=e,{color:i="#2d2d2d"}=e,{size:a=10}=e;return r.$$set=o=>{"toggled"in o&&t(0,n=o.toggled),"color"in o&&t(1,i=o.color),"size"in o&&t(2,a=o.size)},[n,i,a]}class pGe extends Cr{constructor(e){super(),xr(this,e,dGe,hGe,Dr,{toggled:0,color:1,size:2})}}function kV(r,e,t){var l,u;const n=r.slice();n[12]=e[t],n[18]=t;const i=ws(n[12],n[3]);n[13]=i;const a=n[12].fmt?yi(n[12].fmt,(l=n[13].format)==null?void 0:l.valueType):n[13].format;n[14]=a;const o=n[12].subtotalFmt?yi(n[12].subtotalFmt):n[12].totalFmt?yi(n[12].totalFmt):n[14];n[15]=o;const s=((u=n[15])==null?void 0:u.valueType)==="date"?"":n[15];return n[16]=s,n}function gGe(r){let e,t;return e=new qu({}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p:Oe,i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function vGe(r){let e,t;return e=new qu({props:{class:r[13].type+" font-medium",compact:r[8],align:r[12].align,$$slots:{default:[SGe]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&136&&(a.class=n[13].type+" font-medium"),i&256&&(a.compact=n[8]),i&128&&(a.align=n[12].align),i&524426&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function mGe(r){let e,t;return e=new qu({props:{class:"font-medium py-[3px]",compact:r[8],colSpan:r[4]?2:1,paddingLeft:"1px",$$slots:{default:[AGe]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&256&&(a.compact=n[8]),i&16&&(a.colSpan=n[4]?2:1),i&524293&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function yGe(r){let e=r[12].totalAgg+"",t;return{c(){t=ht(e)},l(n){t=dt(n,e)},m(n,i){se(n,t,i)},p(n,i){i&128&&e!==(e=n[12].totalAgg+"")&&Bt(t,e)},i:Oe,o:Oe,d(n){n&&V(t)}}}function bGe(r){let e,t,n,i;const a=[wGe,_Ge],o=[];function s(l,u){return l[12].contentType==="delta"?0:1}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),se(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?o[e].p(l,u):(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n))},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),o[e].d(l)}}}function _Ge(r){let e=$n(Ou(r[1],r[12].id,r[12].totalAgg,r[13].type,r[12].weightCol),r[16],r[13].columnUnitSummary)+"",t;return{c(){t=ht(e)},l(n){t=dt(n,e)},m(n,i){se(n,t,i)},p(n,i){i&138&&e!==(e=$n(Ou(n[1],n[12].id,n[12].totalAgg,n[13].type,n[12].weightCol),n[16],n[13].columnUnitSummary)+"")&&Bt(t,e)},i:Oe,o:Oe,d(n){n&&V(t)}}}function wGe(r){let e,t;return e=new kA({props:{value:Ou(r[1],r[12].id,r[12].totalAgg,r[13].type,r[12].weightCol),downIsGood:r[12].downIsGood,format_object:r[16],columnUnitSummary:r[13].columnUnitSummary,showValue:r[12].showValue,showSymbol:r[12].deltaSymbol,align:r[12].align,fontClass:"font-medium text-[9.25pt]",neutralMin:r[12].neutralMin,neutralMax:r[12].neutralMax,chip:r[12].chip}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&138&&(a.value=Ou(n[1],n[12].id,n[12].totalAgg,n[13].type,n[12].weightCol)),i&128&&(a.downIsGood=n[12].downIsGood),i&136&&(a.format_object=n[16]),i&136&&(a.columnUnitSummary=n[13].columnUnitSummary),i&128&&(a.showValue=n[12].showValue),i&128&&(a.showSymbol=n[12].deltaSymbol),i&128&&(a.align=n[12].align),i&128&&(a.neutralMin=n[12].neutralMin),i&128&&(a.neutralMax=n[12].neutralMax),i&128&&(a.chip=n[12].chip),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function SGe(r){let e,t,n,i,a;const o=[bGe,yGe],s=[];function l(u,c){return c&128&&(e=null),e==null&&(e=!!([void 0,"sum","mean","median","min","max","weightedMean","count","countDistinct"].includes(u[12].totalAgg)||u[12].subtotalFmt)),e?0:1}return t=l(r,-1),n=s[t]=o[t](r),{c(){n.c(),i=Ie()},l(u){n.l(u),i=Le(u)},m(u,c){s[t].m(u,c),se(u,i,c),a=!0},p(u,c){let f=t;t=l(u,c),t===f?s[t].p(u,c):(Tt(),ee(s[f],1,1,()=>{s[f]=null}),kt(),n=s[t],n?n.p(u,c):(n=s[t]=o[t](u),n.c()),X(n,1),n.m(i.parentNode,i))},i(u){a||(X(n),a=!0)},o(u){ee(n),a=!1},d(u){u&&V(i),s[t].d(u)}}}function AGe(r){let e,t,n,i,a,o,s;return n=new pGe({props:{toggled:r[2]}}),{c(){e=ie("div"),t=ie("span"),Ve(n.$$.fragment),i=Ie(),a=ht(r[0]),o=Ie(),this.h()},l(l){e=ae(l,"DIV",{class:!0});var u=ge(e);t=ae(u,"SPAN",{class:!0});var c=ge(t);Ge(n.$$.fragment,c),c.forEach(V),i=Le(u),a=dt(u,r[0]),u.forEach(V),o=Le(l),this.h()},h(){Y(t,"class","inline-flex print-hidden chevron svelte-bqpzbr"),Y(e,"class","items-center gap-2 align-top")},m(l,u){se(l,e,u),Q(e,t),Ue(n,t,null),Q(e,i),Q(e,a),se(l,o,u),s=!0},p(l,u){const c={};u&4&&(c.toggled=l[2]),n.$set(c),(!s||u&1)&&Bt(a,l[0])},i(l){s||(X(n.$$.fragment,l),s=!0)},o(l){ee(n.$$.fragment,l),s=!1},d(l){l&&(V(e),V(o)),He(n)}}}function MV(r){let e,t,n,i;const a=[mGe,vGe,gGe],o=[];function s(l,u){return l[18]===0?0:l[6]?1:2}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),se(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?o[e].p(l,u):(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n))},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),o[e].d(l)}}}function CGe(r){let e,t,n,i,a=Er(r[7]),o=[];for(let l=0;lee(o[l],1,1,()=>{o[l]=null});return{c(){e=ie("tr");for(let l=0;lg.key==="Enter"&&d();return r.$$set=g=>{"groupName"in g&&t(0,n=g.groupName),"currentGroupData"in g&&t(1,i=g.currentGroupData),"toggled"in g&&t(2,a=g.toggled),"columnSummary"in g&&t(3,o=g.columnSummary),"rowNumbers"in g&&t(4,s=g.rowNumbers),"rowColor"in g&&t(5,l=g.rowColor),"subtotals"in g&&t(6,u=g.subtotals),"orderedColumns"in g&&t(7,c=g.orderedColumns),"compact"in g&&t(8,f=g.compact)},[n,i,a,o,s,l,u,c,f,d,p]}class DGe extends Cr{constructor(e){super(),xr(this,e,xGe,CGe,Dr,{groupName:0,currentGroupData:1,toggled:2,columnSummary:3,rowNumbers:4,rowColor:5,subtotals:6,orderedColumns:7,compact:8})}}function IV(r){let e,t,n,i="Fullscreen",a,o,s,l,u,c;return o=new po({props:{class:"w-3 h-3",src:Cse}}),{c(){e=ie("div"),t=ie("button"),n=ie("span"),n.textContent=i,a=Ie(),Ve(o.$$.fragment),this.h()},l(f){e=ae(f,"DIV",{});var h=ge(e);t=ae(h,"BUTTON",{type:!0,"aria-label":!0,class:!0});var d=ge(t);n=ae(d,"SPAN",{"data-svelte-h":!0}),Et(n)!=="svelte-qzhydn"&&(n.textContent=i),a=Le(d),Ge(o.$$.fragment,d),d.forEach(V),h.forEach(V),this.h()},h(){Y(t,"type","button"),Y(t,"aria-label","Enter Fullscreen"),Y(t,"class","svelte-p80uux")},m(f,h){se(f,e,h),Q(e,t),Q(t,n),Q(t,a),Ue(o,t,null),l=!0,u||(c=gn(t,"click",r[1]),u=!0)},i(f){l||(X(o.$$.fragment,f),f&&Ad(()=>{l&&(s||(s=Fl(e,id,{duration:200},!0)),s.run(1))}),l=!0)},o(f){ee(o.$$.fragment,f),f&&(s||(s=Fl(e,id,{duration:200},!1)),s.run(0)),l=!1},d(f){f&&V(e),He(o),f&&s&&s.end(),u=!1,c()}}}function EGe(r){let e,t,n=r[0]&&IV(r);return{c(){n&&n.c(),e=Xe()},l(i){n&&n.l(i),e=Xe()},m(i,a){n&&n.m(i,a),se(i,e,a),t=!0},p(i,[a]){i[0]?n?a&1&&X(n,1):(n=IV(i),n.c(),X(n,1),n.m(e.parentNode,e)):n&&(Tt(),ee(n,1,1,()=>{n=null}),kt())},i(i){t||(X(n),t=!0)},o(i){ee(n),t=!1},d(i){i&&V(e),n&&n.d(i)}}}function TGe(r,e,t){let{display:n}=e;function i(a){Sre.call(this,r,a)}return r.$$set=a=>{"display"in a&&t(0,n=a.display)},[n,i]}class dte extends Cr{constructor(e){super(),xr(this,e,TGe,EGe,Dr,{display:0})}}function kGe(r,e,t){let n,i,a=XI(e$);NG(r,a,ue=>t(45,i=ue));let o;const s=Symbol();let{id:l}=e;function u(){try{if(!Object.keys(i.data[0]).includes(l))throw o="Error in table: "+l+" does not exist in the dataset",new Error(o)}catch(ue){o=ue.message}}let{contentType:c=void 0}=e,{title:f=void 0}=e,{align:h=void 0}=e;h==="centre"&&(h="center");let{wrap:d=!1}=e,{wrapTitle:p=!1}=e,{height:g=void 0}=e,{width:v=void 0}=e,{alt:m=void 0}=e,{openInNewTab:y=!1}=e,{linkLabel:b=void 0}=e,{fmt:_=void 0}=e,{totalAgg:w=void 0}=e,{totalFmt:S=void 0}=e,{weightCol:A=void 0}=e,{subtotalFmt:C=void 0}=e,{colorMax:x=void 0}=e,{colorMin:D=void 0}=e,{colorMid:E=void 0}=e,{colorBreakpoints:T=void 0}=e,{scaleColor:k="green"}=e,{scaleColumn:M=void 0}=e,L={green:["white","hsla(129, 33%, 57%,1)"],red:["white","hsla(0, 56%, 56%,1)"],blue:["white","hsla(198, 56%, 56%,1)"]},F;k instanceof Array?F=k:(F=L[k],F==null&&(F=["white",k]));let{downIsGood:U=!1}=e,{showValue:N=!0}=e,{deltaSymbol:$=!0}=e,{neutralMin:H=0}=e,{neutralMax:P=0}=e,{chip:te=!1}=e,{sparkWidth:J=void 0}=e,{sparkHeight:fe=void 0}=e,{sparkColor:Ce=void 0}=e,{sparkX:ke=void 0}=e,{sparkY:Se=void 0}=e,{sparkYScale:be=!1}=e,{barColor:W="hsla(207, 69%, 79%, 1)"}=e,{negativeBarColor:q="rgb(252 165 165)"}=e,{backgroundColor:j="transparent"}=e,{hideLabels:ve=!1}=e,{colGroup:K=void 0}=e,{fmtColumn:xe=void 0}=e,{redNegatives:ne=!1}=e;const we=()=>{u(),a.update(ue=>{const Be=ue.columns.findIndex($e=>$e.identifier===s);return Be===-1?ue.columns.push(n):ue.columns=[...ue.columns.slice(0,Be),n,...ue.columns.slice(Be+1)],ue})};return Q2(()=>{a.update(ue=>(ue.columns=ue.columns.filter(Be=>Be.identifier!==s),ue))}),r.$$set=ue=>{"id"in ue&&t(12,l=ue.id),"contentType"in ue&&t(13,c=ue.contentType),"title"in ue&&t(14,f=ue.title),"align"in ue&&t(1,h=ue.align),"wrap"in ue&&t(2,d=ue.wrap),"wrapTitle"in ue&&t(3,p=ue.wrapTitle),"height"in ue&&t(15,g=ue.height),"width"in ue&&t(16,v=ue.width),"alt"in ue&&t(17,m=ue.alt),"openInNewTab"in ue&&t(4,y=ue.openInNewTab),"linkLabel"in ue&&t(18,b=ue.linkLabel),"fmt"in ue&&t(19,_=ue.fmt),"totalAgg"in ue&&t(20,w=ue.totalAgg),"totalFmt"in ue&&t(21,S=ue.totalFmt),"weightCol"in ue&&t(22,A=ue.weightCol),"subtotalFmt"in ue&&t(23,C=ue.subtotalFmt),"colorMax"in ue&&t(24,x=ue.colorMax),"colorMin"in ue&&t(25,D=ue.colorMin),"colorMid"in ue&&t(26,E=ue.colorMid),"colorBreakpoints"in ue&&t(27,T=ue.colorBreakpoints),"scaleColor"in ue&&t(28,k=ue.scaleColor),"scaleColumn"in ue&&t(29,M=ue.scaleColumn),"downIsGood"in ue&&t(5,U=ue.downIsGood),"showValue"in ue&&t(6,N=ue.showValue),"deltaSymbol"in ue&&t(7,$=ue.deltaSymbol),"neutralMin"in ue&&t(30,H=ue.neutralMin),"neutralMax"in ue&&t(31,P=ue.neutralMax),"chip"in ue&&t(8,te=ue.chip),"sparkWidth"in ue&&t(32,J=ue.sparkWidth),"sparkHeight"in ue&&t(33,fe=ue.sparkHeight),"sparkColor"in ue&&t(34,Ce=ue.sparkColor),"sparkX"in ue&&t(35,ke=ue.sparkX),"sparkY"in ue&&t(36,Se=ue.sparkY),"sparkYScale"in ue&&t(9,be=ue.sparkYScale),"barColor"in ue&&t(37,W=ue.barColor),"negativeBarColor"in ue&&t(38,q=ue.negativeBarColor),"backgroundColor"in ue&&t(39,j=ue.backgroundColor),"hideLabels"in ue&&t(10,ve=ue.hideLabels),"colGroup"in ue&&t(40,K=ue.colGroup),"fmtColumn"in ue&&t(41,xe=ue.fmtColumn),"redNegatives"in ue&&t(11,ne=ue.redNegatives)},r.$$.update=()=>{r.$$.dirty[0]&4&&t(2,d=d==="true"||d===!0),r.$$.dirty[0]&8&&t(3,p=p==="true"||p===!0),r.$$.dirty[0]&16&&t(4,y=y==="true"||y===!0),r.$$.dirty[0]&32&&t(5,U=U==="true"||U===!0),r.$$.dirty[0]&64&&t(6,N=N==="true"||N===!0),r.$$.dirty[0]&128&&t(7,$=$==="true"||$===!0),r.$$.dirty[0]&256&&t(8,te=te==="true"||te===!0),r.$$.dirty[0]&512&&t(9,be=be==="true"||be===!0),r.$$.dirty[0]&1024&&t(10,ve=ve==="true"||ve===!0),r.$$.dirty[0]&2048&&t(11,ne=ne==="true"||ne===!0),r.$$.dirty[0]&2147483646|r.$$.dirty[1]&4095&&t(43,n={identifier:s,id:l,title:f,align:h,wrap:d,wrapTitle:p,contentType:c,height:g,width:v,alt:m,openInNewTab:y,linkLabel:b,fmt:_,fmtColumn:xe,totalAgg:w,totalFmt:S,subtotalFmt:C,weightCol:A,downIsGood:U,deltaSymbol:$,chip:te,neutralMin:H,neutralMax:P,showValue:N,colorMax:x,colorMin:D,scaleColor:k,scaleColumn:M,colGroup:K,colorMid:E,colorBreakpoints:T,colorPalette:F,redNegatives:ne,sparkWidth:J,sparkHeight:fe,sparkColor:Ce,sparkX:ke,sparkY:Se,sparkYScale:be,barColor:W,negativeBarColor:q,backgroundColor:j,hideLabels:ve}),r.$$.dirty[1]&4096&&we()},[a,h,d,p,y,U,N,$,te,be,ve,ne,l,c,f,g,v,m,b,_,w,S,A,C,x,D,E,T,k,M,H,P,J,fe,Ce,ke,Se,W,q,j,K,xe,F,n]}class pte extends Cr{constructor(e){super(),xr(this,e,kGe,null,Dr,{id:12,contentType:13,title:14,align:1,wrap:2,wrapTitle:3,height:15,width:16,alt:17,openInNewTab:4,linkLabel:18,fmt:19,totalAgg:20,totalFmt:21,weightCol:22,subtotalFmt:23,colorMax:24,colorMin:25,colorMid:26,colorBreakpoints:27,scaleColor:28,scaleColumn:29,downIsGood:5,showValue:6,deltaSymbol:7,neutralMin:30,neutralMax:31,chip:8,sparkWidth:32,sparkHeight:33,sparkColor:34,sparkX:35,sparkY:36,sparkYScale:9,barColor:37,negativeBarColor:38,backgroundColor:39,hideLabels:10,colGroup:40,fmtColumn:41,redNegatives:11},null,[-1,-1])}}function LV(r,e,t){const n=r.slice();return n[86]=e[t],n}function FV(r,e,t){const n=r.slice();return n[89]=e[t],n}function BV(r,e,t){const n=r.slice();return n[86]=e[t],n}function OV(r,e,t){const n=r.slice();return n[86]=e[t],n}function PV(r){const e=r[26]?17.5:23;r[96]=e;const t=45;r[97]=t;const n=24;r[98]=n;const i=r[4]?r[98]+r[97]+234:r[97]+234;r[99]=i}function RV(r,e,t){const n=r.slice();return n[86]=e[t],n}function NV(r){let e,t,n;function i(o){r[71](o)}let a={search:r[4],$$slots:{default:[IGe]},$$scope:{ctx:r}};return r[46]!==void 0&&(a.open=r[46]),e=new zse({props:a}),KI.push(()=>IG(e,"open",i)),{c(){Ve(e.$$.fragment)},l(o){Ge(e.$$.fragment,o)},m(o,s){Ue(e,o,s),n=!0},p(o,s){const l={};s[0]&16&&(l.search=o[4]),s[0]&67108880|s[1]&16843776|s[2]&4194304&&(l.$$scope={dirty:s,ctx:o}),!t&&s[1]&32768&&(t=!0,l.open=o[46],zG(()=>t=!1)),e.$set(l)},i(o){n||(X(e.$$.fragment,o),n=!0)},o(o){ee(e.$$.fragment,o),n=!1},d(o){He(e,o)}}}function zV(r){let e,t;const n=[r[86]];let i={};for(let a=0;aee(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;oee(k[H],1,1,()=>{k[H]=null});let L=r[4]&&HV(r);l=new fGe({props:{rowNumbers:r[1],headerColor:r[23],headerFontColor:r[24],orderedColumns:r[52],columnSummary:r[31],compact:r[26],sortable:r[5],sortClick:r[50],formatColumnTitles:r[11],sortObj:r[27],wrapTitles:r[10],link:r[22]}}),c=new LL({props:{data:r[35],$$slots:{skeleton:[VGe],default:[zGe]},$$scope:{ctx:r}}});const F=[UGe,GGe],U=[];function N(H,P){return H[29]&&H[37]>1?0:1}g=N(r),v=U[g]=F[g](r);let $=r[3]&&QV(r);return{c(){D&&D.c(),e=Ie(),E&&E.c(),t=Ie();for(let H=0;H{E=null}),kt()),P[0]&1|P[1]&1024){T=Er(H[41].columns.filter(tG));let ke;for(ke=0;ke{L=null}),kt());const te={};P[0]&2&&(te.rowNumbers=H[1]),P[0]&8388608&&(te.headerColor=H[23]),P[0]&16777216&&(te.headerFontColor=H[24]),P[1]&2097152&&(te.orderedColumns=H[52]),P[1]&1&&(te.columnSummary=H[31]),P[0]&67108864&&(te.compact=H[26]),P[0]&32&&(te.sortable=H[5]),P[1]&524288&&(te.sortClick=H[50]),P[0]&2048&&(te.formatColumnTitles=H[11]),P[0]&134217728&&(te.sortObj=H[27]),P[0]&1024&&(te.wrapTitles=H[10]),P[0]&4194304&&(te.link=H[22]),l.$set(te);const J={};P[1]&16&&(J.data=H[35]),P[0]&341828487|P[1]&2101563|P[2]&4194304&&(J.$$scope={dirty:P,ctx:H}),c.$set(J),P[0]&33554432&&Re(o,"background-color",H[25]);let fe=g;g=N(H),g===fe?U[g].p(H,P):(Tt(),ee(U[fe],1,1,()=>{U[fe]=null}),kt(),v=U[g],v?v.p(H,P):(v=U[g]=F[g](H),v.c()),X(v,1),v.m(i,null)),(!w||P[0]&2097153&&m!==(m=H[21]?void 0:`DataTable-${((Ce=H[0])==null?void 0:Ce.id)??"no-id"}`))&&Y(i,"data-testid",m),H[3]?$?($.p(H,P),P[0]&8&&X($,1)):($=QV(H),$.c(),X($,1),$.m(_.parentNode,_)):$&&(Tt(),ee($,1,1,()=>{$=null}),kt())},i(H){if(!w){X(D,H),X(E);for(let P=0;P{w&&(y||(y=Fl(i,eS,{},!0)),y.run(1))}),X($),w=!0}},o(H){ee(D,H),ee(E),k=k.filter(Boolean);for(let P=0;Pee(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;oIG(e,"value",i)),{c(){Ve(e.$$.fragment)},l(o){Ge(e.$$.fragment,o)},m(o,s){Ue(e,o,s),n=!0},p(o,s){const l={};!t&&s[1]&8&&(t=!0,l.value=o[34],zG(()=>t=!1)),e.$set(l)},i(o){n||(X(e.$$.fragment,o),n=!0)},o(o){ee(e.$$.fragment,o),n=!1},d(o){He(e,o)}}}function OGe(r){let e,t;return e=new HB({props:{displayedData:r[36],rowShading:r[8],link:r[22],rowNumbers:r[1],rowLines:r[9],compact:r[26],index:r[32],columnSummary:r[31],orderedColumns:r[52]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[1]&32&&(a.displayedData=n[36]),i[0]&256&&(a.rowShading=n[8]),i[0]&4194304&&(a.link=n[22]),i[0]&2&&(a.rowNumbers=n[1]),i[0]&512&&(a.rowLines=n[9]),i[0]&67108864&&(a.compact=n[26]),i[1]&2&&(a.index=n[32]),i[1]&1&&(a.columnSummary=n[31]),i[1]&2097152&&(a.orderedColumns=n[52]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function PGe(r){let e,t,n=Er(r[43]),i=[];for(let o=0;oee(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o{a=null}),kt())},i(o){i||(X(e.$$.fragment,o),X(a),i=!0)},o(o){ee(e.$$.fragment,o),ee(a),i=!1},d(o){o&&(V(t),V(n)),He(e,o),a&&a.d(o)}}}function NGe(r){let e,t,n,i;e=new DGe({props:{groupName:r[89],currentGroupData:r[39][r[89]],toggled:r[28][r[89]],columnSummary:r[31],rowColor:r[15],rowNumbers:r[1],subtotals:r[2],compact:r[26],orderedColumns:r[52]}}),e.$on("toggle",r[54]);let a=r[28][r[89]]&&$V(r);return{c(){Ve(e.$$.fragment),t=Ie(),a&&a.c(),n=Xe()},l(o){Ge(e.$$.fragment,o),t=Le(o),a&&a.l(o),n=Xe()},m(o,s){Ue(e,o,s),se(o,t,s),a&&a.m(o,s),se(o,n,s),i=!0},p(o,s){const l={};s[1]&4096&&(l.groupName=o[89]),s[1]&4352&&(l.currentGroupData=o[39][o[89]]),s[0]&268435456|s[1]&4096&&(l.toggled=o[28][o[89]]),s[1]&1&&(l.columnSummary=o[31]),s[0]&32768&&(l.rowColor=o[15]),s[0]&2&&(l.rowNumbers=o[1]),s[0]&4&&(l.subtotals=o[2]),s[0]&67108864&&(l.compact=o[26]),s[1]&2097152&&(l.orderedColumns=o[52]),e.$set(l),o[28][o[89]]?a?(a.p(o,s),s[0]&268435456|s[1]&4096&&X(a,1)):(a=$V(o),a.c(),X(a,1),a.m(n.parentNode,n)):a&&(Tt(),ee(a,1,1,()=>{a=null}),kt())},i(o){i||(X(e.$$.fragment,o),X(a),i=!0)},o(o){ee(e.$$.fragment,o),ee(a),i=!1},d(o){o&&(V(t),V(n)),He(e,o),a&&a.d(o)}}}function WV(r){let e,t;return e=new eGe({props:{groupName:r[89],currentGroupData:r[39][r[89]],columnSummary:r[31],rowColor:r[17],fontColor:r[18],groupType:r[14],groupBy:r[13],compact:r[26],orderedColumns:r[52]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[1]&4096&&(a.groupName=n[89]),i[1]&4352&&(a.currentGroupData=n[39][n[89]]),i[1]&1&&(a.columnSummary=n[31]),i[0]&131072&&(a.rowColor=n[17]),i[0]&262144&&(a.fontColor=n[18]),i[0]&16384&&(a.groupType=n[14]),i[0]&8192&&(a.groupBy=n[13]),i[0]&67108864&&(a.compact=n[26]),i[1]&2097152&&(a.orderedColumns=n[52]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function $V(r){let e,t;return e=new HB({props:{displayedData:r[39][r[89]],groupType:r[14],rowShading:r[8],link:r[22],rowNumbers:r[1],rowLines:r[9],compact:r[26],index:r[32],columnSummary:r[31],grouped:!0,groupColumn:r[13],orderedColumns:r[52]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[1]&4352&&(a.displayedData=n[39][n[89]]),i[0]&16384&&(a.groupType=n[14]),i[0]&256&&(a.rowShading=n[8]),i[0]&4194304&&(a.link=n[22]),i[0]&2&&(a.rowNumbers=n[1]),i[0]&512&&(a.rowLines=n[9]),i[0]&67108864&&(a.compact=n[26]),i[1]&2&&(a.index=n[32]),i[1]&1&&(a.columnSummary=n[31]),i[0]&8192&&(a.groupColumn=n[13]),i[1]&2097152&&(a.orderedColumns=n[52]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function jV(r){let e,t,n,i;const a=[NGe,RGe],o=[];function s(l,u){return l[14]==="accordion"?0:l[14]==="section"?1:-1}return~(e=s(r))&&(t=o[e]=a[e](r)),{c(){t&&t.c(),n=Xe()},l(l){t&&t.l(l),n=Xe()},m(l,u){~e&&o[e].m(l,u),se(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?~e&&o[e].p(l,u):(t&&(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt()),~e?(t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n)):t=null)},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),~e&&o[e].d(l)}}}function qV(r){let e,t;return e=new jVe({props:{data:r[0],rowNumbers:r[1],columnSummary:r[31],rowColor:r[19],fontColor:r[20],groupType:r[14],compact:r[26],orderedColumns:r[52]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[0]&1&&(a.data=n[0]),i[0]&2&&(a.rowNumbers=n[1]),i[1]&1&&(a.columnSummary=n[31]),i[0]&524288&&(a.rowColor=n[19]),i[0]&1048576&&(a.fontColor=n[20]),i[0]&16384&&(a.groupType=n[14]),i[0]&67108864&&(a.compact=n[26]),i[1]&2097152&&(a.orderedColumns=n[52]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function zGe(r){let e,t,n,i,a;const o=[PGe,OGe],s=[];function l(c,f){return c[13]&&c[39]&&c[34]===""?0:1}e=l(r),t=s[e]=o[e](r);let u=r[7]&&r[34]===""&&qV(r);return{c(){t.c(),n=Ie(),u&&u.c(),i=Xe()},l(c){t.l(c),n=Le(c),u&&u.l(c),i=Xe()},m(c,f){s[e].m(c,f),se(c,n,f),u&&u.m(c,f),se(c,i,f),a=!0},p(c,f){let h=e;e=l(c),e===h?s[e].p(c,f):(Tt(),ee(s[h],1,1,()=>{s[h]=null}),kt(),t=s[e],t?t.p(c,f):(t=s[e]=o[e](c),t.c()),X(t,1),t.m(n.parentNode,n)),c[7]&&c[34]===""?u?(u.p(c,f),f[0]&128|f[1]&8&&X(u,1)):(u=qV(c),u.c(),X(u,1),u.m(i.parentNode,i)):u&&(Tt(),ee(u,1,1,()=>{u=null}),kt())},i(c){a||(X(t),X(u),a=!0)},o(c){ee(t),ee(u),a=!1},d(c){c&&(V(n),V(i)),s[e].d(c),u&&u.d(c)}}}function VGe(r){let e,t,n,i,a;return n=new ZH({}),{c(){e=ie("tr"),t=ie("td"),Ve(n.$$.fragment),this.h()},l(o){e=ae(o,"TR",{class:!0});var s=ge(e);t=ae(s,"TD",{colspan:!0,class:!0});var l=ge(t);Ge(n.$$.fragment,l),l.forEach(V),s.forEach(V),this.h()},h(){Y(t,"colspan",i=r[35].columns.length),Y(t,"class","h-32 svelte-fmobgf"),Y(e,"class","svelte-fmobgf")},m(o,s){se(o,e,s),Q(e,t),Ue(n,t,null),a=!0},p(o,s){(!a||s[1]&16&&i!==(i=o[35].columns.length))&&Y(t,"colspan",i)},i(o){a||(X(n.$$.fragment,o),a=!0)},o(o){ee(n.$$.fragment,o),a=!1},d(o){o&&V(e),He(n)}}}function GGe(r){let e,t,n,i=r[6]&&YV(r),a=!r[21]&&ZV(r);return{c(){e=ie("div"),i&&i.c(),t=Ie(),a&&a.c(),this.h()},l(o){e=ae(o,"DIV",{class:!0});var s=ge(e);i&&i.l(s),t=Le(s),a&&a.l(s),s.forEach(V),this.h()},h(){Y(e,"class","table-footer svelte-fmobgf")},m(o,s){se(o,e,s),i&&i.m(e,null),Q(e,t),a&&a.m(e,null),n=!0},p(o,s){o[6]?i?(i.p(o,s),s[0]&64&&X(i,1)):(i=YV(o),i.c(),X(i,1),i.m(e,t)):i&&(Tt(),ee(i,1,1,()=>{i=null}),kt()),o[21]?a&&(Tt(),ee(a,1,1,()=>{a=null}),kt()):a?(a.p(o,s),s[0]&2097152&&X(a,1)):(a=ZV(o),a.c(),X(a,1),a.m(e,null))},i(o){n||(X(i),X(a),n=!0)},o(o){ee(i),ee(a),n=!1},d(o){o&&V(e),i&&i.d(),a&&a.d()}}}function UGe(r){let e,t,n,i,a,o,s,l,u,c,f,h,d,p,g,v,m,y=r[37].toLocaleString()+"",b,_,w,S=r[45].toLocaleString()+"",A,C,x=r[44].toLocaleString()+"",D,E,T,k,M,L,F,U,N,$,H,P,te,J,fe,Ce,ke;a=new po({props:{src:Ise}}),c=new po({props:{src:kse,class:"h-[0.83em]"}}),L=new po({props:{src:KH,class:"h-[0.83em]"}}),H=new po({props:{src:Lse}});let Se=r[6]&&XV(r),be=!r[21]&&KV(r);return{c(){e=ie("div"),t=ie("div"),n=ie("button"),i=ie("div"),Ve(a.$$.fragment),s=Ie(),l=ie("button"),u=ie("div"),Ve(c.$$.fragment),h=Ie(),d=ie("span"),p=ht(`Page + `),g=ie("input"),v=ht(` + / + `),m=ie("span"),b=ht(y),_=Ie(),w=ie("span"),A=ht(S),C=ht(" of "),D=ht(x),E=ht(" records"),T=Ie(),k=ie("button"),M=ie("div"),Ve(L.$$.fragment),U=Ie(),N=ie("button"),$=ie("div"),Ve(H.$$.fragment),te=Ie(),Se&&Se.c(),J=Ie(),be&&be.c(),this.h()},l(W){e=ae(W,"DIV",{class:!0});var q=ge(e);t=ae(q,"DIV",{class:!0});var j=ge(t);n=ae(j,"BUTTON",{"aria-label":!0,class:!0});var ve=ge(n);i=ae(ve,"DIV",{class:!0});var K=ge(i);Ge(a.$$.fragment,K),K.forEach(V),ve.forEach(V),s=Le(j),l=ae(j,"BUTTON",{"aria-label":!0,class:!0});var xe=ge(l);u=ae(xe,"DIV",{class:!0});var ne=ge(u);Ge(c.$$.fragment,ne),ne.forEach(V),xe.forEach(V),h=Le(j),d=ae(j,"SPAN",{class:!0});var we=ge(d);p=dt(we,`Page + `),g=ae(we,"INPUT",{class:!0,style:!0,type:!0,placeholder:!0}),v=dt(we,` + / + `),m=ae(we,"SPAN",{class:!0});var ue=ge(m);b=dt(ue,y),ue.forEach(V),we.forEach(V),_=Le(j),w=ae(j,"SPAN",{class:!0});var Be=ge(w);A=dt(Be,S),C=dt(Be," of "),D=dt(Be,x),E=dt(Be," records"),Be.forEach(V),T=Le(j),k=ae(j,"BUTTON",{"aria-label":!0,class:!0});var $e=ge(k);M=ae($e,"DIV",{class:!0});var at=ge(M);Ge(L.$$.fragment,at),at.forEach(V),$e.forEach(V),U=Le(j),N=ae(j,"BUTTON",{"aria-label":!0,class:!0});var Gt=ge(N);$=ae(Gt,"DIV",{class:!0});var Yt=ge($);Ge(H.$$.fragment,Yt),Yt.forEach(V),Gt.forEach(V),j.forEach(V),te=Le(q),Se&&Se.l(q),J=Le(q),be&&be.l(q),q.forEach(V),this.h()},h(){Y(i,"class","page-icon flex items-center svelte-fmobgf"),Y(n,"aria-label","first-page"),Y(n,"class","page-changer svelte-fmobgf"),n.disabled=o=r[38]===1,zr(n,"hovering",r[42]),Y(u,"class","page-icon h-[0.83em] flex items-center svelte-fmobgf"),Y(l,"aria-label","previous-page"),Y(l,"class","page-changer svelte-fmobgf"),l.disabled=f=r[38]===1,zr(l,"hovering",r[42]),Y(g,"class","page-input svelte-fmobgf"),Re(g,"width",r[33]?r[51]:r[49]),Y(g,"type","number"),Y(g,"placeholder",r[38]),zr(g,"hovering",r[42]),zr(g,"error",r[33]>r[37]),Y(m,"class","page-count ml-1 svelte-fmobgf"),Y(d,"class","page-count svelte-fmobgf"),Y(w,"class","print-page-count svelte-fmobgf"),Y(M,"class","page-icon h-[0.83em] flex items-center svelte-fmobgf"),Y(k,"aria-label","next-page"),Y(k,"class","page-changer svelte-fmobgf"),k.disabled=F=r[38]===r[37],zr(k,"hovering",r[42]),Y($,"class","page-icon flex items-center svelte-fmobgf"),Y(N,"aria-label","last-page"),Y(N,"class","page-changer svelte-fmobgf"),N.disabled=P=r[38]===r[37],zr(N,"hovering",r[42]),Y(t,"class","page-labels mr-auto svelte-fmobgf"),Y(e,"class","pagination svelte-fmobgf")},m(W,q){se(W,e,q),Q(e,t),Q(t,n),Q(n,i),Ue(a,i,null),Q(t,s),Q(t,l),Q(l,u),Ue(c,u,null),Q(t,h),Q(t,d),Q(d,p),Q(d,g),Sw(g,r[33]),Q(d,v),Q(d,m),Q(m,b),Q(t,_),Q(t,w),Q(w,A),Q(w,C),Q(w,D),Q(w,E),Q(t,T),Q(t,k),Q(k,M),Ue(L,M,null),Q(t,U),Q(t,N),Q(N,$),Ue(H,$,null),Q(e,te),Se&&Se.m(e,null),Q(e,J),be&&be.m(e,null),fe=!0,Ce||(ke=[gn(n,"click",r[73]),gn(l,"click",r[74]),gn(g,"input",r[75]),gn(g,"keyup",r[76]),gn(g,"change",r[77]),gn(k,"click",r[78]),gn(N,"click",r[79])],Ce=!0)},p(W,q){(!fe||q[1]&128&&o!==(o=W[38]===1))&&(n.disabled=o),(!fe||q[1]&2048)&&zr(n,"hovering",W[42]),(!fe||q[1]&128&&f!==(f=W[38]===1))&&(l.disabled=f),(!fe||q[1]&2048)&&zr(l,"hovering",W[42]),(!fe||q[1]&1310724)&&Re(g,"width",W[33]?W[51]:W[49]),(!fe||q[1]&128)&&Y(g,"placeholder",W[38]),q[1]&4&&VG(g.value)!==W[33]&&Sw(g,W[33]),(!fe||q[1]&2048)&&zr(g,"hovering",W[42]),(!fe||q[1]&68)&&zr(g,"error",W[33]>W[37]),(!fe||q[1]&64)&&y!==(y=W[37].toLocaleString()+"")&&Bt(b,y),(!fe||q[1]&16384)&&S!==(S=W[45].toLocaleString()+"")&&Bt(A,S),(!fe||q[1]&8192)&&x!==(x=W[44].toLocaleString()+"")&&Bt(D,x),(!fe||q[1]&192&&F!==(F=W[38]===W[37]))&&(k.disabled=F),(!fe||q[1]&2048)&&zr(k,"hovering",W[42]),(!fe||q[1]&192&&P!==(P=W[38]===W[37]))&&(N.disabled=P),(!fe||q[1]&2048)&&zr(N,"hovering",W[42]),W[6]?Se?(Se.p(W,q),q[0]&64&&X(Se,1)):(Se=XV(W),Se.c(),X(Se,1),Se.m(e,J)):Se&&(Tt(),ee(Se,1,1,()=>{Se=null}),kt()),W[21]?be&&(Tt(),ee(be,1,1,()=>{be=null}),kt()):be?(be.p(W,q),q[0]&2097152&&X(be,1)):(be=KV(W),be.c(),X(be,1),be.m(e,null))},i(W){fe||(X(a.$$.fragment,W),X(c.$$.fragment,W),X(L.$$.fragment,W),X(H.$$.fragment,W),X(Se),X(be),fe=!0)},o(W){ee(a.$$.fragment,W),ee(c.$$.fragment,W),ee(L.$$.fragment,W),ee(H.$$.fragment,W),ee(Se),ee(be),fe=!1},d(W){W&&V(e),He(a),He(c),He(L),He(H),Se&&Se.d(),be&&be.d(),Ce=!1,Sd(ke)}}}function YV(r){let e,t;return e=new oY({props:{class:"download-button",data:r[48],queryID:r[12],display:r[42]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[1]&131072&&(a.data=n[48]),i[0]&4096&&(a.queryID=n[12]),i[1]&2048&&(a.display=n[42]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function ZV(r){let e,t;return e=new dte({props:{display:r[42]}}),e.$on("click",r[81]),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[1]&2048&&(a.display=n[42]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function XV(r){let e,t;return e=new oY({props:{class:"download-button",data:r[48],queryID:r[12],display:r[42]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[1]&131072&&(a.data=n[48]),i[0]&4096&&(a.queryID=n[12]),i[1]&2048&&(a.display=n[42]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function KV(r){let e,t;return e=new dte({props:{display:r[42]}}),e.$on("click",r[80]),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[1]&2048&&(a.display=n[42]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function QV(r){let e,t,n=r[12]&&JV(r);return{c(){n&&n.c(),e=Xe()},l(i){n&&n.l(i),e=Xe()},m(i,a){n&&n.m(i,a),se(i,e,a),t=!0},p(i,a){i[12]?n?(n.p(i,a),a[0]&4096&&X(n,1)):(n=JV(i),n.c(),X(n,1),n.m(e.parentNode,e)):n&&(Tt(),ee(n,1,1,()=>{n=null}),kt())},i(i){t||(X(n),t=!0)},o(i){ee(n),t=!1},d(i){i&&V(e),n&&n.d(i)}}}function JV(r){let e,t;return e=new fAe({props:{$$slots:{default:[HGe]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i[0]&4097|i[2]&4194304&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function eG(r){let e=` `,t,n,i;return{c(){t=ht(e),n=Ie(),i=ie("br"),this.h()},l(a){t=dt(a,e),n=Le(a),i=ae(a,"BR",{class:!0}),this.h()},h(){Y(i,"class","svelte-fmobgf")},m(a,o){se(a,t,o),se(a,n,o),se(a,i,o)},p(a,o){o[0]&1&&e!==(e=` `)&&Bt(t,e)},d(a){a&&(V(t),V(n),V(i))}}}function HGe(r){let e=``,t,n,i,a,o,s="",l,u=Er(Object.keys(r[0][0])),c=[];for(let f=0;f`)&&Bt(t,e),h[0]&1){u=Er(Object.keys(f[0][0]));let d;for(d=0;d{l=null}),kt());let p=t;t=f(h),t===p?c[t].p(h,d):(Tt(),ee(c[p],1,1,()=>{c[p]=null}),kt(),n=c[t],n?n.p(h,d):(n=c[t]=u[t](h),n.c()),X(n,1),n.m(i.parentNode,i))},i(h){a||(X(l),X(n),a=!0)},o(h){ee(l),ee(n),a=!1},d(h){h&&(V(e),V(i)),l&&l.d(h),c[t].d(h),o=!1,s()}}}let $Ge="1.5em",jGe="1em",qGe="0em",YGe=!1;function ZGe(r,e){return r.map(t=>{const n={};for(const i of e)n[i]=t[i];return n})}const tG=r=>r.contentType==="link",XGe=()=>{};function KGe(r,e,t){let n,i,a,o,s,l,u,c,f,{$$slots:h={},$$scope:d}=e,p=wd({});NG(r,p,he=>t(41,f=he)),OG(e$,p);let{data:g}=e,{queryID:v=void 0}=e,{rows:m=10}=e,{rowNumbers:y=!1}=e,{sort:b=void 0}=e,_,w,S,A={},{groupBy:C=void 0}=e,{groupsOpen:x=!0}=e,{groupType:D="accordion"}=e,{accordionRowColor:E=void 0}=e,{groupNamePosition:T="middle"}=e;D==="section"&&(y=!1);let{subtotals:k=!1}=e,{subtotalRowColor:M=void 0}=e,{subtotalFontColor:L=void 0}=e,F={};function U({detail:he}){const{groupName:rt}=he;t(28,F[rt]=!F[rt],F)}let N,$=!1,{generateMarkdown:H=!1}=e,{search:P=!1}=e,{sortable:te=!0}=e,{downloadable:J=!0}=e,{totalRow:fe=!1}=e,{totalRowColor:Ce=void 0}=e,{totalFontColor:ke=void 0}=e,{isFullPage:Se=!1}=e,{link:be=void 0}=e,{showLinkCol:W=!1}=e,q,j=!1;p.update(he=>(t(63,j=!1),{...he,data:g,columns:[]}));let{rowShading:ve=!1}=e,{rowLines:K=!0}=e,{wrapTitles:xe=!1}=e,{headerColor:ne=void 0}=e,{headerFontColor:we="var(--grey-900)"}=e,{formatColumnTitles:ue=!0}=e,{backgroundColor:Be="white"}=e,{compact:$e=void 0}=e,at,Gt=[C];p.update(he=>({...he,priorityColumns:Gt}));let Yt=0,je=null,Me="",yt,gt,Nr,Ht,xt=yt,Ne,le=1,pe,ft=0,_e={},me=[],Te=!1,Pt;function ur(){t(47,Pt=window.innerHeight)}function Vr(he){Te=he,t(46,Te)}function Kt(he){Me=he,t(34,Me)}const qi=()=>u(0),Ba=()=>u(le-2);function ca(){je=VG(this.value),t(33,je),t(56,m),t(32,Yt),t(65,pe),t(35,yt),t(0,g),t(4,P),t(13,C),t(39,_e),t(60,_),t(31,at),t(62,S),t(22,be),t(58,W),t(30,q),t(63,j),t(41,f),t(28,F),t(57,x),t(59,b),t(61,w)}const I=()=>u((je??1)-1),z=()=>u((je??1)-1),R=()=>u(le),G=()=>u(Ne-1),Z=()=>t(46,Te=!0),Ae=()=>t(46,Te=!0),Pe=()=>t(42,$=!0),qe=()=>t(42,$=!1);return r.$$set=he=>{t(55,e=An(An({},e),ts(he))),"data"in he&&t(0,g=he.data),"queryID"in he&&t(12,v=he.queryID),"rows"in he&&t(56,m=he.rows),"rowNumbers"in he&&t(1,y=he.rowNumbers),"sort"in he&&t(59,b=he.sort),"groupBy"in he&&t(13,C=he.groupBy),"groupsOpen"in he&&t(57,x=he.groupsOpen),"groupType"in he&&t(14,D=he.groupType),"accordionRowColor"in he&&t(15,E=he.accordionRowColor),"groupNamePosition"in he&&t(16,T=he.groupNamePosition),"subtotals"in he&&t(2,k=he.subtotals),"subtotalRowColor"in he&&t(17,M=he.subtotalRowColor),"subtotalFontColor"in he&&t(18,L=he.subtotalFontColor),"generateMarkdown"in he&&t(3,H=he.generateMarkdown),"search"in he&&t(4,P=he.search),"sortable"in he&&t(5,te=he.sortable),"downloadable"in he&&t(6,J=he.downloadable),"totalRow"in he&&t(7,fe=he.totalRow),"totalRowColor"in he&&t(19,Ce=he.totalRowColor),"totalFontColor"in he&&t(20,ke=he.totalFontColor),"isFullPage"in he&&t(21,Se=he.isFullPage),"link"in he&&t(22,be=he.link),"showLinkCol"in he&&t(58,W=he.showLinkCol),"rowShading"in he&&t(8,ve=he.rowShading),"rowLines"in he&&t(9,K=he.rowLines),"wrapTitles"in he&&t(10,xe=he.wrapTitles),"headerColor"in he&&t(23,ne=he.headerColor),"headerFontColor"in he&&t(24,we=he.headerFontColor),"formatColumnTitles"in he&&t(11,ue=he.formatColumnTitles),"backgroundColor"in he&&t(25,Be=he.backgroundColor),"compact"in he&&t(26,$e=he.compact),"$$scope"in he&&t(84,d=he.$$scope)},r.$$.update=()=>{if(r.$$.dirty[1]&33554432&&t(56,m=Number.parseInt(m)),r.$$.dirty[0]&2&&t(1,y=y==="true"||y===!0),r.$$.dirty[1]&1879048192&&b){const[he,rt]=b.split(" ");t(60,_=he),t(62,S=rt),t(61,w=rt!=="desc"),t(27,A=_?{col:_,ascending:w}:{col:null,ascending:null})}if(r.$$.dirty[1]&67108864&&t(57,x=x==="true"||x===!0),r.$$.dirty[0]&4&&t(2,k=k==="true"||k===!0),r.$$.dirty[1]&134217728&&t(58,W=W==="true"||W===!0),r.$$.dirty[0]&1077936129|r.$$.dirty[1]&671088641|r.$$.dirty[2]&1)try{if(t(30,q=void 0),M3(g),t(31,at=jL(g,"array")),_){if(!at.map(rt=>rt.id).includes(_))throw Error(`${_} is not a column in the dataset. sort should contain one column name and optionally a direction (asc or desc). E.g., sort=my_column or sort="my_column desc"`);if(S&&!["asc","desc"].includes(S))throw Error(`${S} is not a valid sort direction. Please use asc or desc`)}const he=at.filter(rt=>{var pr;return rt.type==="date"&&!(((pr=g[0])==null?void 0:pr[rt.id])instanceof Date)}).map(rt=>rt.id);for(let rt=0;rtpr.id===be);rt!==-1&&!W&&at.splice(rt,1)}}catch(he){t(30,q=he.message)}if(r.$$.dirty[0]&8193|r.$$.dirty[1]&33554432&&t(29,N=g.length>m&&!C),r.$$.dirty[0]&8&&t(3,H=H==="true"||H===!0),r.$$.dirty[0]&16&&t(4,P=P==="true"||P===!0),r.$$.dirty[0]&32&&t(5,te=te==="true"||te===!0),r.$$.dirty[0]&64&&t(6,J=J==="true"||J===!0),r.$$.dirty[0]&128&&t(7,fe=fe==="true"||fe===!0),r.$$.dirty[0]&256&&t(8,ve=ve==="true"||ve===!0),r.$$.dirty[0]&512&&t(9,K=K==="true"||K===!0),r.$$.dirty[0]&1024&&t(10,xe=xe==="true"||xe===!0),r.$$.dirty[0]&2048&&t(11,ue=ue==="true"||ue===!0),r.$$.dirty[1]&1024&&t(68,n=hAe(f.columns.map(he=>he.id),f.priorityColumns)),r.$$.dirty[1]&1024|r.$$.dirty[2]&64&&t(52,i=[...f.columns].sort((he,rt)=>n.indexOf(he.id)-n.indexOf(rt.id))),r.$$.dirty[0]&1&&t(35,yt=g),r.$$.dirty[0]&17&&El.isQuery(g)&&P&&t(64,gt=ale(El.createReactive({loadGracePeriod:1e3,callback:he=>{t(35,yt=he)},execFn:OH},g.opts,g))),r.$$.dirty[0]&8192|r.$$.dirty[1]&272&&t(67,s=he=>{const rt=he.col,pr=he.ascending?1:-1,yn=Zn=>Zn==null||typeof Zn=="number"&&isNaN(Zn),no=(Zn,Do)=>yn(Zn[rt])&&!yn(Do[rt])||Zn[rt]Do[rt]?1*pr:0;if(C){const Zn={};for(const Do of Object.keys(_e))Zn[Do]=[..._e[Do]].sort(no);t(39,_e=Zn)}else{const Zn=[...yt].sort(no);t(35,yt=Zn)}}),r.$$.dirty[1]&33554454|r.$$.dirty[2]&8&&t(40,u=he=>{t(32,Yt=he*m),t(65,pe=Yt+m),t(38,le=Math.ceil(pe/m)),je&&t(33,je=Math.ceil(pe/m)),t(44,Ht=yt.length),t(36,xt=yt.slice(Yt,Yt+m))}),r.$$.dirty[1]&4&&t(51,a=`${(je??1).toString().length}ch`),r.$$.dirty[0]&1|r.$$.dirty[1]&1032|r.$$.dirty[2]&4&>&>(Me?g.search(Me,f.columns.map(he=>he.id),Me.length===1?.5:Me.length>=6?.9:.8):g,g.opts),r.$$.dirty[0]&17&&P&&!El.isQuery(g)&&eoe.add({status:"warning",title:"Search Failed",message:"Please use a query instead."},5e3),r.$$.dirty[0]&134217728|r.$$.dirty[2]&32&&t(50,o=he=>{A.col===he?t(27,A.ascending=!A.ascending,A):(t(27,A.col=he,A),t(27,A.ascending=!0,A)),s(A)}),r.$$.dirty[0]&1342185473|r.$$.dirty[1]&67110145|r.$$.dirty[2]&2&&!q){C&&!j&&(t(39,_e=g.reduce((rt,pr)=>{const yn=pr[C];return rt[yn]||(rt[yn]=[]),rt[yn].push(pr),rt},{})),t(63,j=!0)),t(66,me=Object.keys(_e).reduce((rt,pr)=>{var yn;rt[pr]={};for(const no of f.columns){const Zn=no.id,Do=(yn=at.find(pre=>pre.id===Zn))==null?void 0:yn.type,Eo=no.totalAgg,hre=no.weightCol,dre=_e[pr];rt[pr][Zn]=Ou(dre,Zn,Eo,Do,hre)}return rt},{}));const he=Object.keys(F);for(const rt of Object.keys(_e))he.includes(rt)||t(28,F[rt]=x,F)}r.$$.dirty[0]&134225920|r.$$.dirty[1]&256|r.$$.dirty[2]&16&&(C&&A.col?t(43,Nr=Object.entries(me).sort((he,rt)=>{const pr=he[1][A.col],yn=rt[1][A.col];return A.col===C&&isNaN(C)?A.ascending?he[0].localeCompare(rt[0]):rt[0].localeCompare(he[0]):(pr==null||isNaN(pr))&&yn!==void 0&&!isNaN(yn)?-1*(A.ascending?1:-1):(yn==null||isNaN(yn))&&pr!==void 0&&!isNaN(pr)?1*(A.ascending?1:-1):pryn?1*(A.ascending?1:-1):0}).map(he=>he[0])):t(43,Nr=Object.keys(_e).sort())),r.$$.dirty[0]&134217729|r.$$.dirty[1]&268435456|r.$$.dirty[2]&32&&g&&b&&s(A),r.$$.dirty[1]&16&&t(44,Ht=yt.length),r.$$.dirty[1]&33554434&&t(38,le=Math.ceil((Yt+m)/m)),r.$$.dirty[0]&536870912|r.$$.dirty[1]&33555186&&(N?(t(37,Ne=Math.ceil(yt.length/m)),t(36,xt=yt.slice(Yt,Yt+m)),t(45,ft=xt.length),Nehe.id)))},e=ts(e),[g,y,k,H,P,te,J,fe,ve,K,xe,ue,v,C,D,E,T,M,L,Ce,ke,Se,be,ne,we,Be,$e,A,F,N,q,at,Yt,je,Me,yt,xt,Ne,le,_e,u,f,$,Nr,Ht,ft,Te,Pt,c,l,o,a,i,p,U,e,m,x,W,b,_,w,S,j,gt,pe,me,s,n,h,ur,Vr,Kt,qi,Ba,ca,I,z,R,G,Z,Ae,Pe,qe,d]}class WB extends Cr{constructor(e){super(),xr(this,e,KGe,WGe,Dr,{data:0,queryID:12,rows:56,rowNumbers:1,sort:59,groupBy:13,groupsOpen:57,groupType:14,accordionRowColor:15,groupNamePosition:16,subtotals:2,subtotalRowColor:17,subtotalFontColor:18,generateMarkdown:3,search:4,sortable:5,downloadable:6,totalRow:7,totalRowColor:19,totalFontColor:20,isFullPage:21,link:22,showLinkCol:58,rowShading:8,rowLines:9,wrapTitles:10,headerColor:23,headerFontColor:24,formatColumnTitles:11,backgroundColor:25,compact:26},null,[-1,-1,-1,-1])}}function QGe(r){let e,t;const n=[r[4],{data:r[11]},{queryID:r[5]}];let i={};for(let a=0;a{o[c]=null}),kt(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n))},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),o[e].d(l)}}}function rUe(r){let e,t;return e=new t$({props:{slot:"empty",emptyMessage:r[2],emptySet:r[1],chartType:gte,isInitial:r[3]}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&4&&(a.emptyMessage=n[2]),i&2&&(a.emptySet=n[1]),i&8&&(a.isInitial=n[3]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function nUe(r){let e,t;return e=new WL({props:{slot:"error",chartType:gte,error:r[11].error.message}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&2048&&(a.error=n[11].error.message),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function iUe(r){let e,t;return e=new LL({props:{data:r[0],$$slots:{error:[nUe,({loaded:n})=>({11:n}),({loaded:n})=>n?2048:0],empty:[rUe],default:[tUe,({loaded:n})=>({11:n}),({loaded:n})=>n?2048:0]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,[i]){const a={};i&1&&(a.data=n[0]),i&2398&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}let gte="Data Table";function aUe(r,e,t){let n,{$$slots:i={},$$scope:a}=e;const o=BG(i);let{data:s}=e;const l=El.isQuery(s)?s.hash:void 0;let u=(s==null?void 0:s.hash)===l,{emptySet:c=void 0}=e,{emptyMessage:f=void 0}=e,h=s==null?void 0:s.id;return r.$$set=d=>{t(10,e=An(An({},e),ts(d))),"data"in d&&t(0,s=d.data),"emptySet"in d&&t(1,c=d.emptySet),"emptyMessage"in d&&t(2,f=d.emptyMessage),"$$scope"in d&&t(8,a=d.$$scope)},r.$$.update=()=>{r.$$.dirty&1&&t(3,u=(s==null?void 0:s.hash)===l),t(4,n=Object.fromEntries(Object.entries(e).filter(([,d])=>d!==void 0)))},e=ts(e),[s,c,f,u,n,h,o,i,a]}class oUe extends Cr{constructor(e){super(),xr(this,e,aUe,iUe,Dr,{data:0,emptySet:1,emptyMessage:2})}}const $B=Symbol.for("yaml.alias"),sUe=Symbol.for("yaml.document"),rd=Symbol.for("yaml.map"),vte=Symbol.for("yaml.pair"),jB=Symbol.for("yaml.scalar"),I1=Symbol.for("yaml.seq"),Jl=Symbol.for("yaml.node.type"),xv=r=>!!r&&typeof r=="object"&&r[Jl]===$B,L1=r=>!!r&&typeof r=="object"&&r[Jl]===sUe,bC=r=>!!r&&typeof r=="object"&&r[Jl]===rd,ei=r=>!!r&&typeof r=="object"&&r[Jl]===vte,ti=r=>!!r&&typeof r=="object"&&r[Jl]===jB,_C=r=>!!r&&typeof r=="object"&&r[Jl]===I1;function Aa(r){if(r&&typeof r=="object")switch(r[Jl]){case rd:case I1:return!0}return!1}function _i(r){if(r&&typeof r=="object")switch(r[Jl]){case $B:case rd:case jB:case I1:return!0}return!1}const lUe=r=>(ti(r)||Aa(r))&&!!r.anchor,ja=Symbol("break visit"),mte=Symbol("skip children"),Ll=Symbol("remove node");function yd(r,e){const t=yte(e);L1(r)?Ip(null,r.contents,t,Object.freeze([r]))===Ll&&(r.contents=null):Ip(null,r,t,Object.freeze([]))}yd.BREAK=ja;yd.SKIP=mte;yd.REMOVE=Ll;function Ip(r,e,t,n){const i=bte(r,e,t,n);if(_i(i)||ei(i))return _te(r,n,i),Ip(r,i,t,n);if(typeof i!="symbol"){if(Aa(e)){n=Object.freeze(n.concat(e));for(let a=0;ar.replace(/[!,[\]{}]/g,e=>uUe[e]);class ys{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ys.defaultYaml,e),this.tags=Object.assign({},ys.defaultTags,t)}clone(){const e=new ys(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new ys(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ys.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ys.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:ys.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ys.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[a,o]=n;return this.tags[a]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[a]=n;if(a==="1.1"||a==="1.2")return this.yaml.version=a,!0;{const o=/^\d+\.\d+$/.test(a);return t(6,`Unsupported YAML version ${a}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}const[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);const a=this.tags[n];if(a)try{return a+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+cUe(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let i;if(e&&n.length>0&&_i(e.contents)){const a={};yd(e.contents,(o,s)=>{_i(s)&&s.tag&&(a[s.tag]=!0)}),i=Object.keys(a)}else i=[];for(const[a,o]of n)a==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(s=>s.startsWith(o)))&&t.push(`%TAG ${a} ${o}`);return t.join(` +`)}}ys.defaultYaml={explicit:!1,version:"1.2"};ys.defaultTags={"!!":"tag:yaml.org,2002:"};function wte(r){if(/[\x00-\x19\s,[\]{}]/.test(r)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(r)}`;throw new Error(t)}return!0}function fUe(r){const e=new Set;return yd(r,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function hUe(r,e){for(let t=1;;++t){const n=`${r}${t}`;if(!e.has(n))return n}}function dYe(r,e){const t=[],n=new Map;let i=null;return{onAnchor:a=>{t.push(a),i||(i=fUe(r));const o=hUe(e,i);return i.add(o),o},setAnchors:()=>{for(const a of t){const o=n.get(a);if(typeof o=="object"&&o.anchor&&(ti(o.node)||Aa(o.node)))o.node.anchor=o.anchor;else{const s=new Error("Failed to resolve repeated object (this should not happen)");throw s.source=a,s}}},sourceObjects:n}}function Um(r,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,a=n.length;iIs(n,String(i),t));if(r&&typeof r.toJSON=="function"){if(!t||!lUe(r))return r.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(r,n),t.onCreate=a=>{n.res=a,delete t.onCreate};const i=r.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof r=="bigint"&&!(t!=null&&t.keep)?Number(r):r}class YB{constructor(e){Object.defineProperty(this,Jl,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:a}={}){if(!L1(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},s=Is(this,"",o);if(typeof i=="function")for(const{count:l,res:u}of o.anchors.values())i(u,l);return typeof a=="function"?Um(a,{"":s},"",s):s}}class dUe extends YB{constructor(e){super($B),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return yd(e,{Node:(n,i)=>{if(i===this)return yd.BREAK;i.anchor===this.source&&(t=i)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:a}=t,o=this.resolve(i);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let s=n.get(o);if(s||(Is(o,null,t),s=n.get(o)),!s||s.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(a>=0&&(s.count+=1,s.aliasCount===0&&(s.aliasCount=vw(i,o,n)),s.count*s.aliasCount>a)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return s.res}toString(e,t,n){const i=`*${this.source}`;if(e){if(wte(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(e.implicitKey)return`${i} `}return i}}function vw(r,e,t){if(xv(e)){const n=e.resolve(r),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(Aa(e)){let n=0;for(const i of e.items){const a=vw(r,i,t);a>n&&(n=a)}return n}else if(ei(e)){const n=vw(r,e.key,t),i=vw(r,e.value,t);return Math.max(n,i)}return 1}const Ste=r=>!r||typeof r!="function"&&typeof r!="object";class cn extends YB{constructor(e){super(jB),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:Is(this.value,e,t)}toString(){return String(this.value)}}cn.BLOCK_FOLDED="BLOCK_FOLDED";cn.BLOCK_LITERAL="BLOCK_LITERAL";cn.PLAIN="PLAIN";cn.QUOTE_DOUBLE="QUOTE_DOUBLE";cn.QUOTE_SINGLE="QUOTE_SINGLE";const pUe="tag:yaml.org,2002:";function gUe(r,e,t){if(e){const n=t.filter(a=>a.tag===e),i=n.find(a=>!a.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>{var i;return((i=n.identify)==null?void 0:i.call(n,r))&&!n.format})}function N2(r,e,t){var f,h,d;if(L1(r)&&(r=r.contents),_i(r))return r;if(ei(r)){const p=(h=(f=t.schema[rd]).createNode)==null?void 0:h.call(f,t.schema,null,t);return p.items.push(r),p}(r instanceof String||r instanceof Number||r instanceof Boolean||typeof BigInt<"u"&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=t;let l;if(n&&r&&typeof r=="object"){if(l=s.get(r),l)return l.anchor||(l.anchor=i(r)),new dUe(l.anchor);l={anchor:null,node:null},s.set(r,l)}e!=null&&e.startsWith("!!")&&(e=pUe+e.slice(2));let u=gUe(r,e,o.tags);if(!u){if(r&&typeof r.toJSON=="function"&&(r=r.toJSON()),!r||typeof r!="object"){const p=new cn(r);return l&&(l.node=p),p}u=r instanceof Map?o[rd]:Symbol.iterator in Object(r)?o[I1]:o[rd]}a&&(a(u),delete t.onTagObj);const c=u!=null&&u.createNode?u.createNode(t.schema,r,t):typeof((d=u==null?void 0:u.nodeClass)==null?void 0:d.from)=="function"?u.nodeClass.from(t.schema,r,t):new cn(r);return e?c.tag=e:u.default||(c.tag=u.tag),l&&(l.node=c),c}function rG(r,e,t){let n=t;for(let i=e.length-1;i>=0;--i){const a=e[i];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){const o=[];o[a]=n,n=o}else n=new Map([[a,n]])}return N2(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new Map})}const vUe=r=>r==null||typeof r=="object"&&!!r[Symbol.iterator]().next().done;class Ate extends YB{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>_i(n)||ei(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(vUe(e))this.add(t);else{const[n,...i]=e,a=this.get(n,!0);if(Aa(a))a.addIn(i,t);else if(a===void 0&&this.schema)this.set(n,rG(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const i=this.get(t,!0);if(Aa(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...i]=e,a=this.get(n,!0);return i.length===0?!t&&ti(a)?a.value:a:Aa(a)?a.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!ei(t))return!1;const n=t.value;return n==null||e&&ti(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const i=this.get(t,!0);return Aa(i)?i.hasIn(n):!1}setIn(e,t){const[n,...i]=e;if(i.length===0)this.set(n,t);else{const a=this.get(n,!0);if(Aa(a))a.setIn(i,t);else if(a===void 0&&this.schema)this.set(n,rG(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}}const mUe=r=>r.replace(/^(?!$)(?: $)?/gm,"#");function Py(r,e){return/^\n+$/.test(r)?r.substring(1):e?r.replace(/^(?! *$)/gm,e):r}const Fp=(r,e,t)=>r.endsWith(` +`)?Py(t,e):t.includes(` +`)?` +`+Py(t,e):(r.endsWith(" ")?"":" ")+t,Cte="flow",NI="block",mw="quoted";function wC(r,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return r;ii-Math.max(2,a)?u.push(0):f=i-n);let h,d,p=!1,g=-1,v=-1,m=-1;t===NI&&(g=nG(r,g,e.length),g!==-1&&(f=g+l));for(let b;b=r[g+=1];){if(t===mw&&b==="\\"){switch(v=g,r[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}m=g}if(b===` +`)t===NI&&(g=nG(r,g,e.length)),f=g+e.length+l,h=void 0;else{if(b===" "&&d&&d!==" "&&d!==` +`&&d!==" "){const _=r[g+1];_&&_!==" "&&_!==` +`&&_!==" "&&(h=g)}if(g>=f)if(h)u.push(h),f=h+l,h=void 0;else if(t===mw){for(;d===" "||d===" ";)d=b,b=r[g+=1],p=!0;const _=g>m+1?g-2:v-1;if(c[_])return r;u.push(_),c[_]=!0,f=_+l,h=void 0}else p=!0}d=b}if(p&&s&&s(),u.length===0)return r;o&&o();let y=r.slice(0,u[0]);for(let b=0;b({indentAtStart:e?r.indent.length:r.indentAtStart,lineWidth:r.options.lineWidth,minContentWidth:r.options.minContentWidth}),AC=r=>/^(%|---|\.\.\.)/m.test(r);function yUe(r,e,t){if(!e||e<0)return!1;const n=e-t,i=r.length;if(i<=n)return!1;for(let a=0,o=0;an)return!0;if(o=a+1,i-o<=n)return!1}return!0}function h0(r,e){const t=JSON.stringify(r);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,a=e.indent||(AC(r)?" ":"");let o="",s=0;for(let l=0,u=t[l];u;u=t[++l])if(u===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(s,l)+"\\ ",l+=1,s=l,u="\\"),u==="\\")switch(t[l+1]){case"u":{o+=t.slice(s,l);const c=t.substr(l+2,4);switch(c){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:c.substr(0,2)==="00"?o+="\\x"+c.substr(2):o+=t.substr(l,6)}l+=5,s=l+1}break;case"n":if(n||t[l+2]==='"'||t.length +`;let f,h;for(h=t.length;h>0;--h){const w=t[h-1];if(w!==` +`&&w!==" "&&w!==" ")break}let d=t.substring(h);const p=d.indexOf(` +`);p===-1?f="-":t===d||p!==d.length-1?(f="+",a&&a()):f="",d&&(t=t.slice(0,-d.length),d[d.length-1]===` +`&&(d=d.slice(0,-1)),d=d.replace(VI,`$&${u}`));let g=!1,v,m=-1;for(v=0;v{S=!0});const C=wC(`${y}${w}${d}`,u,NI,A);if(!S)return`>${_} +${u}${C}`}return t=t.replace(/\n+/g,`$&${u}`),`|${_} +${u}${y}${t}${d}`}function bUe(r,e,t,n){const{type:i,value:a}=r,{actualString:o,implicitKey:s,indent:l,indentStep:u,inFlow:c}=e;if(s&&a.includes(` +`)||c&&/[[\]{},]/.test(a))return Bp(a,e);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||c||!a.includes(` +`)?Bp(a,e):yw(r,e,t,n);if(!s&&!c&&i!==cn.PLAIN&&a.includes(` +`))return yw(r,e,t,n);if(AC(a)){if(l==="")return e.forceBlockIndent=!0,yw(r,e,t,n);if(s&&l===u)return Bp(a,e)}const f=a.replace(/\n+/g,`$& +${l}`);if(o){const h=g=>{var v;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((v=g.test)==null?void 0:v.test(f))},{compat:d,tags:p}=e.doc.schema;if(p.some(h)||d!=null&&d.some(h))return Bp(a,e)}return s?f:wC(f,l,Cte,SC(e,!1))}function ZB(r,e,t,n){const{implicitKey:i,inFlow:a}=e,o=typeof r.value=="string"?r:Object.assign({},r,{value:String(r.value)});let{type:s}=r;s!==cn.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=cn.QUOTE_DOUBLE);const l=c=>{switch(c){case cn.BLOCK_FOLDED:case cn.BLOCK_LITERAL:return i||a?Bp(o.value,e):yw(o,e,t,n);case cn.QUOTE_DOUBLE:return h0(o.value,e);case cn.QUOTE_SINGLE:return zI(o.value,e);case cn.PLAIN:return bUe(o,e,t,n);default:return null}};let u=l(s);if(u===null){const{defaultKeyType:c,defaultStringType:f}=e.options,h=i&&c||f;if(u=l(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}function _Ue(r,e){const t=Object.assign({blockQuote:!0,commentString:mUe,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},r.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:r,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function wUe(r,e){var i;if(e.tag){const a=r.filter(o=>o.tag===e.tag);if(a.length>0)return a.find(o=>o.format===e.format)??a[0]}let t,n;if(ti(e)){n=e.value;let a=r.filter(o=>{var s;return(s=o.identify)==null?void 0:s.call(o,n)});if(a.length>1){const o=a.filter(s=>s.test);o.length>0&&(a=o)}t=a.find(o=>o.format===e.format)??a.find(o=>!o.format)}else n=e,t=r.find(a=>a.nodeClass&&n instanceof a.nodeClass);if(!t){const a=((i=n==null?void 0:n.constructor)==null?void 0:i.name)??typeof n;throw new Error(`Tag not resolved for ${a} value`)}return t}function SUe(r,e,{anchors:t,doc:n}){if(!n.directives)return"";const i=[],a=(ti(r)||Aa(r))&&r.anchor;a&&wte(a)&&(t.add(a),i.push(`&${a}`));const o=r.tag?r.tag:e.default?null:e.tag;return o&&i.push(n.directives.tagString(o)),i.join(" ")}function z2(r,e,t,n){var l;if(ei(r))return r.toString(e,t,n);if(xv(r)){if(e.doc.directives)return r.toString(e);if((l=e.resolvedAliases)!=null&&l.has(r))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(r):e.resolvedAliases=new Set([r]),r=r.resolve(e.doc)}let i;const a=_i(r)?r:e.doc.createNode(r,{onTagObj:u=>i=u});i||(i=wUe(e.doc.schema.tags,a));const o=SUe(a,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const s=typeof i.stringify=="function"?i.stringify(a,e,t,n):ti(a)?ZB(a,e,t,n):a.toString(e,t,n);return o?ti(a)||s[0]==="{"||s[0]==="["?`${o} ${s}`:`${o} +${e.indent}${s}`:s}function AUe({key:r,value:e},t,n,i){const{allNullValues:a,doc:o,indent:s,indentStep:l,options:{commentString:u,indentSeq:c,simpleKeys:f}}=t;let h=_i(r)&&r.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Aa(r)||!_i(r)&&typeof r=="object"){const A="With simple keys, collection cannot be used as a key value";throw new Error(A)}}let d=!f&&(!r||h&&e==null&&!t.inFlow||Aa(r)||(ti(r)?r.type===cn.BLOCK_FOLDED||r.type===cn.BLOCK_LITERAL:typeof r=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!d&&(f||!a),indent:s+l});let p=!1,g=!1,v=z2(r,t,()=>p=!0,()=>g=!0);if(!d&&!t.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");d=!0}if(t.inFlow){if(a||e==null)return p&&n&&n(),v===""?"?":d?`? ${v}`:v}else if(a&&!f||e==null&&d)return v=`? ${v}`,h&&!p?v+=Fp(v,t.indent,u(h)):g&&i&&i(),v;p&&(h=null),d?(h&&(v+=Fp(v,t.indent,u(h))),v=`? ${v} +${s}:`):(v=`${v}:`,h&&(v+=Fp(v,t.indent,u(h))));let m,y,b;_i(e)?(m=!!e.spaceBefore,y=e.commentBefore,b=e.comment):(m=!1,y=null,b=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!d&&!h&&ti(e)&&(t.indentAtStart=v.length+1),g=!1,!c&&l.length>=2&&!t.inFlow&&!d&&_C(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let _=!1;const w=z2(e,t,()=>_=!0,()=>g=!0);let S=" ";if(h||m||y){if(S=m?` +`:"",y){const A=u(y);S+=` +${Py(A,t.indent)}`}w===""&&!t.inFlow?S===` +`&&(S=` + +`):S+=` +${t.indent}`}else if(!d&&Aa(e)){const A=w[0],C=w.indexOf(` +`),x=C!==-1,D=t.inFlow??e.flow??e.items.length===0;if(x||!D){let E=!1;if(x&&(A==="&"||A==="!")){let T=w.indexOf(" ");A==="&"&&T!==-1&&Tr===__||typeof r=="symbol"&&r.description===__,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new cn(Symbol(__)),{addToJSMap:xte}),stringify:()=>__},xUe=(r,e)=>(uT.identify(e)||ti(e)&&(!e.type||e.type===cn.PLAIN)&&uT.identify(e.value))&&(r==null?void 0:r.doc.schema.tags.some(t=>t.tag===uT.tag&&t.default));function xte(r,e,t){if(t=r&&xv(t)?t.resolve(r.doc):t,_C(t))for(const n of t.items)cT(r,e,n);else if(Array.isArray(t))for(const n of t)cT(r,e,n);else cT(r,e,t)}function cT(r,e,t){const n=r&&xv(t)?t.resolve(r.doc):t;if(!bC(n))throw new Error("Merge sources must be maps or map aliases");const i=n.toJSON(null,r,Map);for(const[a,o]of i)e instanceof Map?e.has(a)||e.set(a,o):e instanceof Set?e.add(a):Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function Dte(r,e,{key:t,value:n}){if(_i(t)&&t.addToJSMap)t.addToJSMap(r,e,n);else if(xUe(r,t))xte(r,e,n);else{const i=Is(t,"",r);if(e instanceof Map)e.set(i,Is(n,i,r));else if(e instanceof Set)e.add(i);else{const a=DUe(t,i,r),o=Is(n,a,r);a in e?Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[a]=o}}return e}function DUe(r,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(_i(r)&&(t!=null&&t.doc)){const n=_Ue(t.doc,{});n.anchors=new Set;for(const a of t.anchors.keys())n.anchors.add(a.anchor);n.inFlow=!0,n.inStringifyKey=!0;const i=r.toString(n);if(!t.mapKeyWarned){let a=JSON.stringify(i);a.length>40&&(a=a.substring(0,36)+'..."'),CUe(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${a}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function XB(r,e,t){const n=N2(r,void 0,t),i=N2(e,void 0,t);return new Ls(n,i)}class Ls{constructor(e,t=null){Object.defineProperty(this,Jl,{value:vte}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return _i(t)&&(t=t.clone(e)),_i(n)&&(n=n.clone(e)),new Ls(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return Dte(t,n,this)}toString(e,t,n){return e!=null&&e.doc?AUe(this,e,t,n):JSON.stringify(this)}}function Ete(r,e,t){return(e.inFlow??r.flow?TUe:EUe)(r,e,t)}function EUe({comment:r,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){const{indent:l,options:{commentString:u}}=t,c=Object.assign({},t,{indent:a,type:null});let f=!1;const h=[];for(let p=0;pv=null,()=>f=!0);v&&(m+=Fp(m,a,u(v))),f&&v&&(f=!1),h.push(n+m)}let d;if(h.length===0)d=i.start+i.end;else{d=h[0];for(let p=1;pv=null);pc||m.includes(` +`))&&(u=!0),f.push(m),c=f.length}const{start:h,end:d}=t;if(f.length===0)return h+d;if(!u){const p=f.reduce((g,v)=>g+v.length+2,2);u=e.options.lineWidth>0&&p>e.options.lineWidth}if(u){let p=h;for(const g of f)p+=g?` +${a}${i}${g}`:` +`;return`${p} +${i}${d}`}else return`${h}${o}${f.join(" ")}${o}${d}`}function V2({indent:r,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const a=Py(e(n),r);t.push(a.trimStart())}}function Nh(r,e){const t=ti(e)?e.value:e;for(const n of r)if(ei(n)&&(n.key===e||n.key===t||ti(n.key)&&n.key.value===t))return n}class wp extends Ate{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(rd,e),this.items=[]}static from(e,t,n){const{keepUndefined:i,replacer:a}=n,o=new this(e),s=(l,u)=>{if(typeof a=="function")u=a.call(t,l,u);else if(Array.isArray(a)&&!a.includes(l))return;(u!==void 0||i)&&o.items.push(XB(l,u,n))};if(t instanceof Map)for(const[l,u]of t)s(l,u);else if(t&&typeof t=="object")for(const l of Object.keys(t))s(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){var o;let n;ei(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Ls(e,e==null?void 0:e.value):n=new Ls(e.key,e.value);const i=Nh(this.items,n.key),a=(o=this.schema)==null?void 0:o.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);ti(i.value)&&Ste(n.value)?i.value.value=n.value:i.value=n.value}else if(a){const s=this.items.findIndex(l=>a(n,l)<0);s===-1?this.items.push(n):this.items.splice(s,0,n)}else this.items.push(n)}delete(e){const t=Nh(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const n=Nh(this.items,e),i=n==null?void 0:n.value;return(!t&&ti(i)?i.value:i)??void 0}has(e){return!!Nh(this.items,e)}set(e,t){this.add(new Ls(e,t),!0)}toJSON(e,t,n){const i=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(i);for(const a of this.items)Dte(t,i,a);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(const i of this.items)if(!ei(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Ete(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}class Tte extends Ate{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(I1,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=w_(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=w_(e);if(typeof n!="number")return;const i=this.items[n];return!t&&ti(i)?i.value:i}has(e){const t=w_(e);return typeof t=="number"&&t=0?e:null}function kte(r,e){if(_C(r))for(let t=0;t1&&e("Each pair must have its own sequence indicator");const i=n.items[0]||new Ls(new cn(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore} +${i.key.commentBefore}`:n.commentBefore),n.comment){const a=i.value??i.key;a.comment=a.comment?`${n.comment} +${a.comment}`:n.comment}n=i}r.items[t]=ei(n)?n:new Ls(n)}}else e("Expected a sequence for this tag");return r}function Mte(r,e,t){const{replacer:n}=t,i=new Tte(r);i.tag="tag:yaml.org,2002:pairs";let a=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(a++),o));let s,l;if(Array.isArray(o))if(o.length===2)s=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)s=u[0],l=o[s];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else s=o;i.items.push(XB(s,l,t))}return i}const pYe={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:kte,createNode:Mte};class rg extends Tte{constructor(){super(),this.add=wp.prototype.add.bind(this),this.delete=wp.prototype.delete.bind(this),this.get=wp.prototype.get.bind(this),this.has=wp.prototype.has.bind(this),this.set=wp.prototype.set.bind(this),this.tag=rg.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const i of this.items){let a,o;if(ei(i)?(a=Is(i.key,"",t),o=Is(i.value,a,t)):a=Is(i,"",t),n.has(a))throw new Error("Ordered maps must not include duplicate keys");n.set(a,o)}return n}static from(e,t,n){const i=Mte(e,t,n),a=new this;return a.items=i.items,a}}rg.tag="tag:yaml.org,2002:omap";const gYe={collection:"seq",identify:r=>r instanceof Map,nodeClass:rg,default:!1,tag:"tag:yaml.org,2002:omap",resolve(r,e){const t=kte(r,e),n=[];for(const{key:i}of t.items)ti(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new rg,t)},createNode:(r,e,t)=>rg.from(r,e,t)};class ng extends wp{constructor(e){super(e),this.tag=ng.tag}add(e){let t;ei(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Ls(e.key,null):t=new Ls(e,null),Nh(this.items,t.key)||this.items.push(t)}get(e,t){const n=Nh(this.items,e);return!t&&ei(n)?ti(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=Nh(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Ls(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:i}=n,a=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),a.items.push(XB(o,null,n));return a}}ng.tag="tag:yaml.org,2002:set";const vYe={collection:"map",identify:r=>r instanceof Set,nodeClass:ng,default:!1,tag:"tag:yaml.org,2002:set",createNode:(r,e,t)=>ng.from(r,e,t),resolve(r,e){if(bC(r)){if(r.hasAllNullValues(!0))return Object.assign(new ng,r);e("Set items must all have null values")}else e("Expected a mapping for this tag");return r}};class Ite extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}}class kUe extends Ite{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class mYe extends Ite{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const yYe=(r,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(s=>e.linePos(s));const{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let a=i-1,o=r.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(a>=60&&o.length>80){const s=Math.min(a-39,o.length-79);o="…"+o.substring(s),a-=s-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,a))){let s=r.substring(e.lineStarts[n-2],e.lineStarts[n-1]);s.length>80&&(s=s.substring(0,79)+`… +`),o=s+o}if(/[^ ]/.test(o)){let s=1;const l=t.linePos[1];l&&l.line===n&&l.col>i&&(s=Math.max(1,Math.min(l.col-i,80-a)));const u=" ".repeat(a)+"^".repeat(s);t.message+=`: + +${o} +${u} +`}};function MUe(r,e,t,n){let i="";if(r){let a=!1,o="";for(const s of r){const{source:l,type:u}=s;switch(u){case"space":a=!0;break;case"comment":{t&&!a&&n(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const c=l.substring(1)||" ";i?i+=o+c:i=c,o="";break}case"newline":i&&(o+=l),a=!0;break;default:n(s,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=l.length}}return{comment:i,offset:e}}function IUe(r,e,t){const n=e.offset,i=LUe(e,r.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};const a=i.mode===">"?cn.BLOCK_FOLDED:cn.BLOCK_LITERAL,o=e.source?FUe(e.source):[];let s=o.length;for(let g=o.length-1;g>=0;--g){const v=o[g][1];if(v===""||v==="\r")s=g;else break}if(s===0){const g=i.chomp==="+"&&o.length>0?` +`.repeat(Math.max(1,o.length-1)):"";let v=n+i.length;return e.source&&(v+=e.source.length),{value:g,type:a,comment:i.comment,range:[n,v,v]}}let l=e.indent+i.indent,u=e.offset+i.length,c=0;for(let g=0;gl&&(l=v.length);else{v.length=s;--g)o[g][0].length>l&&(s=g+1);let f="",h="",d=!1;for(let g=0;gl||m[0]===" "?(h===" "?h=` +`:!d&&h===` +`&&(h=` + +`),f+=h+v.slice(l)+m,h=` +`,d=!0):m===""?h===` +`?f+=` +`:h=` +`:(f+=h+m,h=" ",d=!1)}switch(i.chomp){case"-":break;case"+":for(let g=s;gt(n+h,d,p);switch(i){case"scalar":s=cn.PLAIN,l=OUe(a,u);break;case"single-quoted-scalar":s=cn.QUOTE_SINGLE,l=PUe(a,u);break;case"double-quoted-scalar":s=cn.QUOTE_DOUBLE,l=RUe(a,u);break;default:return t(r,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+a.length,n+a.length]}}const c=n+a.length,f=MUe(o,c,e,t);return{value:l,type:s,comment:f.comment,range:[n,c,f.offset]}}function OUe(r,e){let t="";switch(r[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${r[0]}`;break}case"@":case"`":{t=`reserved character ${r[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Lte(r)}function PUe(r,e){return(r[r.length-1]!=="'"||r.length===1)&&e(r.length,"MISSING_CHAR","Missing closing 'quote"),Lte(r.slice(1,-1)).replace(/''/g,"'")}function Lte(r){let e,t;try{e=new RegExp(`(.*?)(?a?r.slice(a,n+1):i)}else t+=i}return(r[r.length-1]!=='"'||r.length===1)&&e(r.length,"MISSING_CHAR",'Missing closing "quote'),t}function NUe(r,e){let t="",n=r[e+1];for(;(n===" "||n===" "||n===` +`||n==="\r")&&!(n==="\r"&&r[e+2]!==` +`);)n===` +`&&(t+=` +`),e+=1,n=r[e+1];return t||(t=" "),{fold:t,offset:e}}const zUe={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` +`,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function VUe(r,e,t,n){const i=r.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const s=r.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(o)}function GUe(r,e=!0,t){if(r){const n=(i,a,o)=>{const s=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(s,a,o);else throw new kUe([s,s+1],a,o)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return BUe(r,e,n);case"block-scalar":return IUe({options:{strict:e}},r,n)}}return null}function UUe(r,e){const{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:a=-1,type:o="PLAIN"}=e,s=ZB({type:o,value:r},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:n,source:` +`}];switch(s[0]){case"|":case">":{const u=s.indexOf(` +`),c=s.substring(0,u),f=s.substring(u+1)+` +`,h=[{type:"block-scalar-header",offset:a,indent:n,source:c}];return Fte(h,l)||h.push({type:"newline",offset:-1,indent:n,source:` +`}),{type:"block-scalar",offset:a,indent:n,props:h,source:f}}case'"':return{type:"double-quoted-scalar",offset:a,indent:n,source:s,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:n,source:s,end:l};default:return{type:"scalar",offset:a,indent:n,source:s,end:l}}}function HUe(r,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:a=!1,type:o}=t,s="indent"in r?r.indent:null;if(n&&typeof s=="number"&&(s+=2),!o)switch(r.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const u=r.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const l=ZB({type:o,value:e},{implicitKey:i||s===null,indent:s!==null&&s>0?" ".repeat(s):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":WUe(r,l);break;case'"':fT(r,l,"double-quoted-scalar");break;case"'":fT(r,l,"single-quoted-scalar");break;default:fT(r,l,"scalar")}}function WUe(r,e){const t=e.indexOf(` +`),n=e.substring(0,t),i=e.substring(t+1)+` +`;if(r.type==="block-scalar"){const a=r.props[0];if(a.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a.source=n,r.source=i}else{const{offset:a}=r,o="indent"in r?r.indent:-1,s=[{type:"block-scalar-header",offset:a,indent:o,source:n}];Fte(s,"end"in r?r.end:void 0)||s.push({type:"newline",offset:-1,indent:o,source:` +`});for(const l of Object.keys(r))l!=="type"&&l!=="offset"&&delete r[l];Object.assign(r,{type:"block-scalar",indent:o,props:s,source:i})}}function Fte(r,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":r.push(t);break;case"newline":return r.push(t),!0}return!1}function fT(r,e,t){switch(r.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":r.type=t,r.source=e;break;case"block-scalar":{const n=r.props.slice(1);let i=e.length;r.props[0].type==="block-scalar-header"&&(i-=r.props[0].source.length);for(const a of n)a.offset+=i;delete r.props,Object.assign(r,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{const i={type:"newline",offset:r.offset+e.length,indent:r.indent,source:` +`};delete r.items,Object.assign(r,{type:t,source:e,end:[i]});break}default:{const n="indent"in r?r.indent:-1,i="end"in r&&Array.isArray(r.end)?r.end.filter(a=>a.type==="space"||a.type==="comment"||a.type==="newline"):[];for(const a of Object.keys(r))a!=="type"&&a!=="offset"&&delete r[a];Object.assign(r,{type:t,indent:n,source:e,end:i})}}}const $Ue=r=>"type"in r?G2(r):bw(r);function G2(r){switch(r.type){case"block-scalar":{let e="";for(const t of r.props)e+=G2(t);return e+r.source}case"block-map":case"block-seq":{let e="";for(const t of r.items)e+=bw(t);return e}case"flow-collection":{let e=r.start.source;for(const t of r.items)e+=bw(t);for(const t of r.end)e+=t.source;return e}case"document":{let e=bw(r);if(r.end)for(const t of r.end)e+=t.source;return e}default:{let e=r.source;if("end"in r&&r.end)for(const t of r.end)e+=t.source;return e}}}function bw({start:r,key:e,sep:t,value:n}){let i="";for(const a of r)i+=a.source;if(e&&(i+=G2(e)),t)for(const a of t)i+=a.source;return n&&(i+=G2(n)),i}const GI=Symbol("break visit"),jUe=Symbol("skip children"),Bte=Symbol("remove item");function bd(r,e){"type"in r&&r.type==="document"&&(r={start:r.start,value:r.value}),Ote(Object.freeze([]),r,e)}bd.BREAK=GI;bd.SKIP=jUe;bd.REMOVE=Bte;bd.itemAtPath=(r,e)=>{let t=r;for(const[n,i]of e){const a=t==null?void 0:t[n];if(a&&"items"in a)t=a.items[i];else return}return t};bd.parentCollection=(r,e)=>{const t=bd.itemAtPath(r,e.slice(0,-1)),n=e[e.length-1][0],i=t==null?void 0:t[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function Ote(r,e,t){let n=t(e,r);if(typeof n=="symbol")return n;for(const i of["key","value"]){const a=e[i];if(a&&"items"in a){for(let o=0;o!!r&&"items"in r,YUe=r=>!!r&&(r.type==="scalar"||r.type==="single-quoted-scalar"||r.type==="double-quoted-scalar"||r.type==="block-scalar");function ZUe(r){switch(r){case CC:return"";case xC:return"";case DC:return"";case Ry:return"";default:return JSON.stringify(r)}}function XUe(r){switch(r){case CC:return"byte-order-mark";case xC:return"doc-mode";case DC:return"flow-error-end";case Ry:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +`:case`\r +`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(r[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const bYe=Object.freeze(Object.defineProperty({__proto__:null,BOM:CC,DOCUMENT:xC,FLOW_END:DC,SCALAR:Ry,createScalarToken:UUe,isCollection:qUe,isScalar:YUe,prettyToken:ZUe,resolveAsScalar:GUe,setScalarValue:HUe,stringify:$Ue,tokenType:XUe,visit:bd},Symbol.toStringTag,{value:"Module"}));function ds(r){switch(r){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}const iG=new Set("0123456789ABCDEFabcdef"),KUe=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),S_=new Set(",[]{}"),QUe=new Set(` ,[]{} +\r `),hT=r=>!r||QUe.has(r);class _Ye{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===` +`?!0:t==="\r"?this.buffer[e+1]===` +`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){const i=this.buffer[n+e+1];if(i===` +`||!i&&!this.atEnd)return e+n+1}return t===` +`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){const n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&ds(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&ethis.indentValue&&!ds(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ds(t)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(hT),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>ds(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let a=this.pos;n=this.buffer[a];++a)switch(n){case" ":t+=1;break;case` +`:e=a,t=0;break;case"\r":{const o=this.buffer[a+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===` +`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const a=this.continueScalar(e+1);if(a===-1)break;e=this.buffer.indexOf(` +`,a)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===` +`;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let a=e-1,o=this.buffer[a];o==="\r"&&(o=this.buffer[--a]);const s=a;for(;o===" ";)o=this.buffer[--a];if(o===` +`&&a>=this.pos&&a+1+t>s)e=a;else break}while(!0);return yield Ry,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){const a=this.buffer[n+1];if(ds(a)||e&&S_.has(a))break;t=n}else if(ds(i)){let a=this.buffer[n+1];if(i==="\r"&&(a===` +`?(n+=1,i=` +`,a=this.buffer[n+1]):t=n),a==="#"||e&&S_.has(a))break;if(i===` +`){const o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&S_.has(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Ry,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(hT))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(ds(t)||e&&S_.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!ds(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(KUe.has(t))t=this.buffer[++e];else if(t==="%"&&iG.has(this.buffer[e+1])&&iG.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===` +`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===` +`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");const i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}var ut,$s,Pte,pc,lt,KB,Rte,tt,fn,ce,wr,Fr,vn,Fe,st,Ft,Je;ut={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9};$s={};$s[ut.BooleanLiteral]="Boolean";$s[ut.EOF]="";$s[ut.Identifier]="Identifier";$s[ut.Keyword]="Keyword";$s[ut.NullLiteral]="Null";$s[ut.NumericLiteral]="Numeric";$s[ut.Punctuator]="Punctuator";$s[ut.StringLiteral]="String";$s[ut.RegularExpression]="RegularExpression";Pte=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="];var zt={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"};pc={Data:1,Get:2,Set:4};lt={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"};KB={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function F1(r,e){if(!r)throw new Error("ASSERT: "+e)}function pu(r){return r>=48&&r<=57}function Nte(r){return"0123456789abcdefABCDEF".indexOf(r)>=0}function d0(r){return"01234567".indexOf(r)>=0}function JUe(r){return r===32||r===9||r===11||r===12||r===160||r>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(r)>=0}function _d(r){return r===10||r===13||r===8232||r===8233}function Dv(r){return r==64||r===36||r===95||r>=65&&r<=90||r>=97&&r<=122||r===92||r>=128&&KB.NonAsciiIdentifierStart.test(String.fromCharCode(r))}function U2(r){return r===36||r===95||r>=65&&r<=90||r>=97&&r<=122||r>=48&&r<=57||r===92||r>=128&&KB.NonAsciiIdentifierPart.test(String.fromCharCode(r))}function eHe(r){switch(r){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function B1(r){switch(r){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function as(r){return r==="eval"||r==="arguments"}function tHe(r){if(fn&&B1(r))return!0;switch(r.length){case 2:return r==="if"||r==="in"||r==="do";case 3:return r==="var"||r==="for"||r==="new"||r==="try"||r==="let";case 4:return r==="this"||r==="else"||r==="case"||r==="void"||r==="with"||r==="enum";case 5:return r==="while"||r==="break"||r==="catch"||r==="throw"||r==="const"||r==="yield"||r==="class"||r==="super";case 6:return r==="return"||r==="typeof"||r==="delete"||r==="switch"||r==="export"||r==="import";case 7:return r==="default"||r==="finally"||r==="extends";case 8:return r==="function"||r==="continue"||r==="debugger";case 10:return r==="instanceof";default:return!1}}function UI(r,e,t,n,i){var a;F1(typeof t=="number","Comment must have valid position"),!(Ft.lastCommentStart>=t)&&(Ft.lastCommentStart=t,a={type:r,value:e},Je.range&&(a.range=[t,n]),Je.loc&&(a.loc=i),Je.comments.push(a),Je.attachComment&&(Je.leadingComments.push(a),Je.trailingComments.push(a)))}function dT(r){var e,t,n,i;for(e=ce-r,t={start:{line:wr,column:ce-Fr-r}};ce=vn&&Tr({},lt.UnexpectedToken,"ILLEGAL");else if(t===42){if(tt.charCodeAt(ce+1)===47){++ce,++ce,Je.comments&&(n=tt.slice(r+2,ce-2),e.end={line:wr,column:ce-Fr},UI("Block",n,r,ce,e));return}++ce}else++ce;Tr({},lt.UnexpectedToken,"ILLEGAL")}function kf(){var r,e;for(e=ce===0;ce>>=")return ce+=4,{type:ut.Punctuator,value:o,lineNumber:wr,lineStart:Fr,start:r,end:ce};if(a=o.substr(0,3),a===">>>"||a==="<<="||a===">>=")return ce+=3,{type:ut.Punctuator,value:a,lineNumber:wr,lineStart:Fr,start:r,end:ce};if(i=a.substr(0,2),n===i[1]&&"+-<>&|".indexOf(n)>=0||i==="=>")return ce+=2,{type:ut.Punctuator,value:i,lineNumber:wr,lineStart:Fr,start:r,end:ce};if("<>=!+-*%&|^/".indexOf(n)>=0)return++ce,{type:ut.Punctuator,value:n,lineNumber:wr,lineStart:Fr,start:r,end:ce};Tr({},lt.UnexpectedToken,"ILLEGAL")}function aHe(r){for(var e="";ce=0&&ce0&&(n=Je.tokens[Je.tokens.length-1],n.range[0]===r&&n.type==="Punctuator"&&(n.value==="/"||n.value==="/=")&&Je.tokens.pop()),Je.tokens.push({type:"RegularExpression",value:t.literal,range:[r,ce],loc:e})),t}function fHe(r){return r.type===ut.Identifier||r.type===ut.Keyword||r.type===ut.BooleanLiteral||r.type===ut.NullLiteral}function hHe(){var r,e;if(r=Je.tokens[Je.tokens.length-1],!r)return ph();if(r.type==="Punctuator"){if(r.value==="]")return gu();if(r.value===")")return e=Je.tokens[Je.openParenToken-1],e&&e.type==="Keyword"&&(e.value==="if"||e.value==="while"||e.value==="for"||e.value==="with")?ph():gu();if(r.value==="}"){if(Je.tokens[Je.openCurlyToken-3]&&Je.tokens[Je.openCurlyToken-3].type==="Keyword"){if(e=Je.tokens[Je.openCurlyToken-4],!e)return gu()}else if(Je.tokens[Je.openCurlyToken-4]&&Je.tokens[Je.openCurlyToken-4].type==="Keyword"){if(e=Je.tokens[Je.openCurlyToken-5],!e)return ph()}else return gu();return Pte.indexOf(e.value)>=0?gu():ph()}return ph()}return r.type==="Keyword"?ph():gu()}function QB(){var r;return kf(),ce>=vn?{type:ut.EOF,lineNumber:wr,lineStart:Fr,start:ce,end:ce}:(r=tt.charCodeAt(ce),Dv(r)?iHe():r===40||r===41||r===59?gu():r===39||r===34?sHe():r===46?pu(tt.charCodeAt(ce+1))?aG():gu():pu(r)?aG():Je.tokenize&&r===47?hHe():gu())}function Gte(){var r,e,t;return kf(),r={start:{line:wr,column:ce-Fr}},e=QB(),r.end={line:wr,column:ce-Fr},e.type!==ut.EOF&&(t=tt.slice(e.start,e.end),Je.tokens.push({type:$s[e.type],value:t,range:[e.start,e.end],loc:r})),e}function Br(){var r;return r=st,ce=r.end,wr=r.lineNumber,Fr=r.lineStart,st=typeof Je.tokens<"u"?Gte():QB(),ce=r.end,wr=r.lineNumber,Fr=r.lineStart,r}function Ute(){var r,e,t;r=ce,e=wr,t=Fr,st=typeof Je.tokens<"u"?Gte():QB(),ce=r,wr=e,Fr=t}function oG(r,e){this.line=r,this.column=e}function dHe(r,e,t,n){this.start=new oG(r,e),this.end=new oG(t,n)}Rte={name:"SyntaxTree",processComment:function(r){var e,t;if(!(r.type===zt.Program&&r.body.length>0)){for(Je.trailingComments.length>0?Je.trailingComments[0].range[0]>=r.range[1]?(t=Je.trailingComments,Je.trailingComments=[]):Je.trailingComments.length=0:Je.bottomRightStack.length>0&&Je.bottomRightStack[Je.bottomRightStack.length-1].trailingComments&&Je.bottomRightStack[Je.bottomRightStack.length-1].trailingComments[0].range[0]>=r.range[1]&&(t=Je.bottomRightStack[Je.bottomRightStack.length-1].trailingComments,delete Je.bottomRightStack[Je.bottomRightStack.length-1].trailingComments);Je.bottomRightStack.length>0&&Je.bottomRightStack[Je.bottomRightStack.length-1].range[0]>=r.range[0];)e=Je.bottomRightStack.pop();e?e.leadingComments&&e.leadingComments[e.leadingComments.length-1].range[1]<=r.range[0]&&(r.leadingComments=e.leadingComments,delete e.leadingComments):Je.leadingComments.length>0&&Je.leadingComments[Je.leadingComments.length-1].range[1]<=r.range[0]&&(r.leadingComments=Je.leadingComments,Je.leadingComments=[]),t&&(r.trailingComments=t),Je.bottomRightStack.push(r)}},markEnd:function(r,e){return Je.range&&(r.range=[e.start,ce]),Je.loc&&(r.loc=new dHe(e.startLineNumber===void 0?e.lineNumber:e.startLineNumber,e.start-(e.startLineStart===void 0?e.lineStart:e.startLineStart),wr,ce-Fr),this.postProcess(r)),Je.attachComment&&this.processComment(r),r},postProcess:function(r){return Je.source&&(r.loc.source=Je.source),r},createArrayExpression:function(r){return{type:zt.ArrayExpression,elements:r}},createAssignmentExpression:function(r,e,t){return{type:zt.AssignmentExpression,operator:r,left:e,right:t}},createBinaryExpression:function(r,e,t){var n=r==="||"||r==="&&"?zt.LogicalExpression:zt.BinaryExpression;return{type:n,operator:r,left:e,right:t}},createBlockStatement:function(r){return{type:zt.BlockStatement,body:r}},createBreakStatement:function(r){return{type:zt.BreakStatement,label:r}},createCallExpression:function(r,e){return{type:zt.CallExpression,callee:r,arguments:e}},createCatchClause:function(r,e){return{type:zt.CatchClause,param:r,body:e}},createConditionalExpression:function(r,e,t){return{type:zt.ConditionalExpression,test:r,consequent:e,alternate:t}},createContinueStatement:function(r){return{type:zt.ContinueStatement,label:r}},createDebuggerStatement:function(){return{type:zt.DebuggerStatement}},createDoWhileStatement:function(r,e){return{type:zt.DoWhileStatement,body:r,test:e}},createEmptyStatement:function(){return{type:zt.EmptyStatement}},createExpressionStatement:function(r){return{type:zt.ExpressionStatement,expression:r}},createForStatement:function(r,e,t,n){return{type:zt.ForStatement,init:r,test:e,update:t,body:n}},createForInStatement:function(r,e,t){return{type:zt.ForInStatement,left:r,right:e,body:t,each:!1}},createFunctionDeclaration:function(r,e,t,n){return{type:zt.FunctionDeclaration,id:r,params:e,defaults:t,body:n,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(r,e,t,n){return{type:zt.FunctionExpression,id:r,params:e,defaults:t,body:n,rest:null,generator:!1,expression:!1}},createIdentifier:function(r){return{type:zt.Identifier,name:r}},createIfStatement:function(r,e,t){return{type:zt.IfStatement,test:r,consequent:e,alternate:t}},createLabeledStatement:function(r,e){return{type:zt.LabeledStatement,label:r,body:e}},createLiteral:function(r){return{type:zt.Literal,value:r.value,raw:tt.slice(r.start,r.end)}},createMemberExpression:function(r,e,t){return{type:zt.MemberExpression,computed:r==="[",object:e,property:t}},createNewExpression:function(r,e){return{type:zt.NewExpression,callee:r,arguments:e}},createObjectExpression:function(r){return{type:zt.ObjectExpression,properties:r}},createPostfixExpression:function(r,e){return{type:zt.UpdateExpression,operator:r,argument:e,prefix:!1}},createProgram:function(r){return{type:zt.Program,body:r}},createProperty:function(r,e,t){return{type:zt.Property,key:e,value:t,kind:r}},createReturnStatement:function(r){return{type:zt.ReturnStatement,argument:r}},createSequenceExpression:function(r){return{type:zt.SequenceExpression,expressions:r}},createSwitchCase:function(r,e){return{type:zt.SwitchCase,test:r,consequent:e}},createSwitchStatement:function(r,e){return{type:zt.SwitchStatement,discriminant:r,cases:e}},createThisExpression:function(){return{type:zt.ThisExpression}},createThrowStatement:function(r){return{type:zt.ThrowStatement,argument:r}},createTryStatement:function(r,e,t,n){return{type:zt.TryStatement,block:r,guardedHandlers:e,handlers:t,finalizer:n}},createUnaryExpression:function(r,e){return r==="++"||r==="--"?{type:zt.UpdateExpression,operator:r,argument:e,prefix:!0}:{type:zt.UnaryExpression,operator:r,argument:e,prefix:!0}},createVariableDeclaration:function(r,e){return{type:zt.VariableDeclaration,declarations:r,kind:e}},createVariableDeclarator:function(r,e){return{type:zt.VariableDeclarator,id:r,init:e}},createWhileStatement:function(r,e){return{type:zt.WhileStatement,test:r,body:e}},createWithStatement:function(r,e){return{type:zt.WithStatement,object:r,body:e}}};function O1(){var r,e,t,n;return r=ce,e=wr,t=Fr,kf(),n=wr!==e,ce=r,wr=e,Fr=t,n}function Tr(r,e){for(var t=[],n=2;n>="||r===">>>="||r==="&="||r==="^="||r==="|=")}function ql(){var r;if(tt.charCodeAt(ce)===59||Vt(";")){Br();return}r=wr,kf(),wr===r&&st.type!==ut.EOF&&!Vt("}")&&jl(st)}function EC(r){return r.type===zt.Identifier||r.type===zt.MemberExpression}function gHe(){var r=[],e;for(e=st,$t("[");!Vt("]");)Vt(",")?(Br(),r.push(null)):(r.push(Vs()),Vt("]")||$t(","));return Br(),Fe.markEnd(Fe.createArrayExpression(r),e)}function pT(r,e){var t,n,i;return t=fn,i=st,n=e4(),e&&fn&&as(r[0].name)&&dn(e,lt.StrictParamName),fn=t,Fe.markEnd(Fe.createFunctionExpression(null,r,[],n),i)}function A_(){var r,e;return e=st,r=Br(),r.type===ut.StringLiteral||r.type===ut.NumericLiteral?(fn&&r.octal&&dn(r,lt.StrictOctalLiteral),Fe.markEnd(Fe.createLiteral(r),e)):Fe.markEnd(Fe.createIdentifier(r.value),e)}function vHe(){var r,e,t,n,i,a;if(r=st,a=st,r.type===ut.Identifier)return t=A_(),r.value==="get"&&!Vt(":")?(e=A_(),$t("("),$t(")"),n=pT([]),Fe.markEnd(Fe.createProperty("get",e,n),a)):r.value==="set"&&!Vt(":")?(e=A_(),$t("("),r=st,r.type!==ut.Identifier?($t(")"),dn(r,lt.UnexpectedToken,r.value),n=pT([])):(i=[Mf()],$t(")"),n=pT(i,r)),Fe.markEnd(Fe.createProperty("set",e,n),a)):($t(":"),n=Vs(),Fe.markEnd(Fe.createProperty("init",t,n),a));if(r.type===ut.EOF||r.type===ut.Punctuator)jl(r);else return e=A_(),$t(":"),n=Vs(),Fe.markEnd(Fe.createProperty("init",e,n),a)}function mHe(){var r=[],e,t,n,i,a={},o=String,s;for(s=st,$t("{");!Vt("}");)e=vHe(),e.key.type===zt.Identifier?t=e.key.name:t=o(e.key.value),i=e.kind==="init"?pc.Data:e.kind==="get"?pc.Get:pc.Set,n="$"+t,Object.prototype.hasOwnProperty.call(a,n)?(a[n]===pc.Data?fn&&i===pc.Data?dn({},lt.StrictDuplicateProperty):i!==pc.Data&&dn({},lt.AccessorDataProperty):i===pc.Data?dn({},lt.AccessorDataProperty):a[n]&i&&dn({},lt.AccessorGetSet),a[n]|=i):a[n]=i,r.push(e),Vt("}")||$t(",");return $t("}"),Fe.markEnd(Fe.createObjectExpression(r),s)}function yHe(){var r;return $t("("),r=Ti(),$t(")"),r}function Hte(){var r,e,t,n;if(Vt("("))return yHe();if(Vt("["))return gHe();if(Vt("{"))return mHe();if(r=st.type,n=st,r===ut.Identifier)t=Fe.createIdentifier(Br().value);else if(r===ut.StringLiteral||r===ut.NumericLiteral)fn&&st.octal&&dn(st,lt.StrictOctalLiteral),t=Fe.createLiteral(Br());else if(r===ut.Keyword){if(Ui("function"))return $He();Ui("this")?(Br(),t=Fe.createThisExpression()):jl(Br())}else r===ut.BooleanLiteral?(e=Br(),e.value=e.value==="true",t=Fe.createLiteral(e)):r===ut.NullLiteral?(e=Br(),e.value=null,t=Fe.createLiteral(e)):Vt("/")||Vt("/=")?(typeof Je.tokens<"u"?t=Fe.createLiteral(ph()):t=Fe.createLiteral(Vte()),Ute()):jl(Br());return Fe.markEnd(t,n)}function Wte(){var r=[];if($t("("),!Vt(")"))for(;ce":case"<=":case">=":case"instanceof":t=7;break;case"in":t=e?7:0;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function SHe(){var r,e,t,n,i,a,o,s,l,u;if(r=st,l=ig(),n=st,i=lG(n,Ft.allowIn),i===0)return l;for(n.prec=i,Br(),e=[r,st],o=ig(),a=[l,n,o];(i=lG(st,Ft.allowIn))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,l=a.pop(),t=Fe.createBinaryExpression(s,l,o),e.pop(),r=e[e.length-1],Fe.markEnd(t,r),a.push(t);n=Br(),n.prec=i,a.push(n),e.push(st),t=ig(),a.push(t)}for(u=a.length-1,t=a[u],e.pop();u>1;)t=Fe.createBinaryExpression(a[u-1].value,a[u-2],t),u-=2,r=e.pop(),Fe.markEnd(t,r);return t}function AHe(){var r,e,t,n,i;return i=st,r=SHe(),Vt("?")&&(Br(),e=Ft.allowIn,Ft.allowIn=!0,t=Vs(),Ft.allowIn=e,$t(":"),n=Vs(),r=Fe.createConditionalExpression(r,t,n),Fe.markEnd(r,i)),r}function Vs(){var r,e,t,n,i;return r=st,i=st,n=e=AHe(),pHe()&&(EC(e)||dn({},lt.InvalidLHSInAssignment),fn&&e.type===zt.Identifier&&as(e.name)&&dn(r,lt.StrictLHSAssignment),r=Br(),t=Vs(),n=Fe.markEnd(Fe.createAssignmentExpression(r.value,e,t),i)),n}function Ti(){var r,e=st;if(r=Vs(),Vt(",")){for(r=Fe.createSequenceExpression([r]);ce"u"));)r.push(e);return r}function W2(){var r,e;return e=st,$t("{"),r=CHe(),$t("}"),Fe.markEnd(Fe.createBlockStatement(r),e)}function Mf(){var r,e;return e=st,r=Br(),r.type!==ut.Identifier&&jl(r),Fe.markEnd(Fe.createIdentifier(r.value),e)}function xHe(r){var e=null,t,n;return n=st,t=Mf(),fn&&as(t.name)&&dn({},lt.StrictVarName),r==="const"?($t("="),e=Vs()):Vt("=")&&(Br(),e=Vs()),Fe.markEnd(Fe.createVariableDeclarator(t,e),n)}function JB(r){var e=[];do{if(e.push(xHe(r)),!Vt(","))break;Br()}while(ce"u"&&$t(";")),typeof n>"u"&&(Vt(";")||(e=Ti()),$t(";"),Vt(")")||(t=Ti())),$t(")"),o=Ft.inIteration,Ft.inIteration=!0,a=Yl(),Ft.inIteration=o,typeof n>"u"?Fe.createForStatement(r,e,t,a):Fe.createForInStatement(n,i,a)}function OHe(){var r=null,e;return li("continue"),tt.charCodeAt(ce)===59?(Br(),Ft.inIteration||Tr({},lt.IllegalContinue),Fe.createContinueStatement(null)):O1()?(Ft.inIteration||Tr({},lt.IllegalContinue),Fe.createContinueStatement(null)):(st.type===ut.Identifier&&(r=Mf(),e="$"+r.name,Object.prototype.hasOwnProperty.call(Ft.labelSet,e)||Tr({},lt.UnknownLabel,r.name)),ql(),r===null&&!Ft.inIteration&&Tr({},lt.IllegalContinue),Fe.createContinueStatement(r))}function PHe(){var r=null,e;return li("break"),tt.charCodeAt(ce)===59?(Br(),Ft.inIteration||Ft.inSwitch||Tr({},lt.IllegalBreak),Fe.createBreakStatement(null)):O1()?(Ft.inIteration||Ft.inSwitch||Tr({},lt.IllegalBreak),Fe.createBreakStatement(null)):(st.type===ut.Identifier&&(r=Mf(),e="$"+r.name,Object.prototype.hasOwnProperty.call(Ft.labelSet,e)||Tr({},lt.UnknownLabel,r.name)),ql(),r===null&&!(Ft.inIteration||Ft.inSwitch)&&Tr({},lt.IllegalBreak),Fe.createBreakStatement(r))}function RHe(){var r=null;return li("return"),Ft.inFunctionBody||dn({},lt.IllegalReturn),tt.charCodeAt(ce)===32&&Dv(tt.charCodeAt(ce+1))?(r=Ti(),ql(),Fe.createReturnStatement(r)):O1()?Fe.createReturnStatement(null):(Vt(";")||!Vt("}")&&st.type!==ut.EOF&&(r=Ti()),ql(),Fe.createReturnStatement(r))}function NHe(){var r,e;return fn&&(kf(),dn({},lt.StrictModeWith)),li("with"),$t("("),r=Ti(),$t(")"),e=Yl(),Fe.createWithStatement(r,e)}function zHe(){var r,e=[],t,n;for(n=st,Ui("default")?(Br(),r=null):(li("case"),r=Ti()),$t(":");ce"u"));)e.push(r);return $t("}"),Ft.labelSet=a,Ft.inIteration=o,Ft.inSwitch=s,Ft.inFunctionBody=l,Fe.markEnd(Fe.createBlockStatement(e),u)}function Yte(r){var e,t=[],n,i,a,o,s;if($t("("),!Vt(")"))for(a={};ce"u"));)e.push(r);return e}function qHe(){var r,e;return kf(),Ute(),e=st,fn=!1,r=jHe(),Fe.markEnd(Fe.createProgram(r),e)}function YHe(){var r,e,t,n=[];for(r=0;r0?1:0,Fr=0,vn=tt.length,st=null,Ft={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},Je={};try{t=qHe(),typeof Je.comments<"u"&&(t.comments=Je.comments),typeof Je.tokens<"u"&&(YHe(),t.tokens=Je.tokens),typeof Je.errors<"u"&&(t.errors=Je.errors)}catch(i){throw i}finally{Je={}}return t}function ZHe(r,e,t,n){function i(l){return String(l).match(/^[0-9]+$/)?parseInt(l):Number.isFinite(l)?parseInt(l,10):0}if(typeof e=="string")throw new Error("start cannot be a string");if(typeof t=="string")throw new Error("end cannot be a string");if(typeof n=="string")throw new Error("step cannot be a string");var a=r.length;if(n===0)throw new Error("step cannot be zero");if(n=n?i(n):1,e=e<0?a+e:e,t=t<0?a+t:t,e=i(e===0?0:e||(n>0?0:a-1)),t=i(t===0?0:t||(n>0?a:-1)),e=n>0?Math.max(0,e):Math.min(a,e),t=n>0?Math.min(t,a):Math.max(-1,t),n>0&&t<=e)return[];if(n<0&&e<=t)return[];for(var o=[],s=e;s!=t&&!(n<0&&s<=t||n>0&&s>=t);s+=n)o.push(r[s]);return o}var Xte={},Kte={};const XHe="estraverse",KHe="ECMAScript JS AST traversal functions",QHe="https://github.com/estools/estraverse",JHe="estraverse.js",eWe="4.3.0",tWe={node:">=4.0"},rWe=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"http://github.com/Constellation"}],nWe={type:"git",url:"http://github.com/estools/estraverse.git"},iWe={"babel-preset-env":"^1.6.1","babel-register":"^6.3.13",chai:"^2.1.1",espree:"^1.11.0",gulp:"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.3.0",jshint:"^2.5.6",mocha:"^2.1.0"},aWe="BSD-2-Clause",oWe={test:"npm run-script lint && npm run-script unit-test",lint:"jshint estraverse.js","unit-test":"mocha --compilers js:babel-register"},sWe={name:XHe,description:KHe,homepage:QHe,main:JHe,version:eWe,engines:tWe,maintainers:rWe,repository:nWe,devDependencies:iWe,license:aWe,scripts:oWe};(function(r){(function e(t){var n,i,a,o,s,l;function u(_){var w={},S,A;for(S in _)_.hasOwnProperty(S)&&(A=_[S],typeof A=="object"&&A!==null?w[S]=u(A):w[S]=A);return w}function c(_,w){var S,A,C,x;for(A=_.length,C=0;A;)S=A>>>1,x=C+S,w(_[x])?A=S:(C=x+1,A-=S+1);return C}n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},a={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},o={},s={},l={},i={Break:o,Skip:s,Remove:l};function f(_,w){this.parent=_,this.key=w}f.prototype.replace=function(w){this.parent[this.key]=w},f.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function h(_,w,S,A){this.node=_,this.path=w,this.wrap=S,this.ref=A}function d(){}d.prototype.path=function(){var w,S,A,C,x,D;function E(T,k){if(Array.isArray(k))for(A=0,C=k.length;A=0;)if(k=F[M],U=D[k],!!U)if(Array.isArray(U)){for(L=U.length;(L-=1)>=0;)if(U[L]){if(g(E,F[M]))x=new h(U[L],[k,L],"Property",null);else if(p(U[L]))x=new h(U[L],[k,L],null,null);else continue;A.push(x)}}else p(U)&&A.push(new h(U,k,null,null))}}},d.prototype.replace=function(w,S){var A,C,x,D,E,T,k,M,L,F,U,N,$;function H(P){var te,J,fe,Ce;if(P.ref.remove()){for(J=P.ref.key,Ce=P.ref.parent,te=A.length;te--;)if(fe=A[te],fe.ref&&fe.ref.parent===Ce){if(fe.ref.key=0;)if($=L[k],F=x[$],!!F)if(Array.isArray(F)){for(M=F.length;(M-=1)>=0;)if(F[M]){if(g(D,L[k]))T=new h(F[M],[$,M],"Property",new f(F,M));else if(p(F[M]))T=new h(F[M],[$,M],null,new f(F,M));else continue;A.push(T)}}else p(F)&&A.push(new h(F,$,null,new f(x,$)))}}return N.root};function v(_,w){var S=new d;return S.traverse(_,w)}function m(_,w){var S=new d;return S.replace(_,w)}function y(_,w){var S;return S=c(w,function(C){return C.range[0]>_.range[0]}),_.extendedRange=[_.range[0],_.range[1]],S!==w.length&&(_.extendedRange[1]=w[S].range[0]),S-=1,S>=0&&(_.extendedRange[0]=w[S].range[1]),_}function b(_,w,S){var A=[],C,x,D,E;if(!_.range)throw new Error("attachComments needs range information");if(!S.length){if(w.length){for(D=0,x=w.length;DT.range[0]));)k.extendedRange[1]===T.range[0]?(T.leadingComments||(T.leadingComments=[]),T.leadingComments.push(k),A.splice(E,1)):E+=1;if(E===A.length)return i.Break;if(A[E].extendedRange[0]>T.range[1])return i.Skip}}),E=0,v(_,{leave:function(T){for(var k;ET.range[1])return i.Skip}}),_}return t.version=sWe.version,t.Syntax=n,t.traverse=v,t.replace=m,t.attachComments=b,t.VisitorKeys=a,t.VisitorOption=i,t.Controller=d,t.cloneEnvironment=function(){return e({})},t})(r)})(Kte);var _w={},Qte={exports:{}};(function(){function r(o){if(o==null)return!1;switch(o.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function e(o){if(o==null)return!1;switch(o.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function t(o){if(o==null)return!1;switch(o.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(o){return t(o)||o!=null&&o.type==="FunctionDeclaration"}function i(o){switch(o.type){case"IfStatement":return o.alternate!=null?o.alternate:o.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return o.body}return null}function a(o){var s;if(o.type!=="IfStatement"||o.alternate==null)return!1;s=o.consequent;do{if(s.type==="IfStatement"&&s.alternate==null)return!0;s=i(s)}while(s);return!1}Qte.exports={isExpression:r,isStatement:t,isIterationStatement:e,isSourceElement:n,isProblematicIfStatement:a,trailingStatement:i}})();var lWe=Qte.exports,Jte={exports:{}};(function(){var r,e,t,n,i,a;e={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function o(v){return 48<=v&&v<=57}function s(v){return 48<=v&&v<=57||97<=v&&v<=102||65<=v&&v<=70}function l(v){return v>=48&&v<=55}t=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function u(v){return v===32||v===9||v===11||v===12||v===160||v>=5760&&t.indexOf(v)>=0}function c(v){return v===10||v===13||v===8232||v===8233}function f(v){if(v<=65535)return String.fromCharCode(v);var m=String.fromCharCode(Math.floor((v-65536)/1024)+55296),y=String.fromCharCode((v-65536)%1024+56320);return m+y}for(n=new Array(128),a=0;a<128;++a)n[a]=a>=97&&a<=122||a>=65&&a<=90||a===36||a===95;for(i=new Array(128),a=0;a<128;++a)i[a]=a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===36||a===95;function h(v){return v<128?n[v]:e.NonAsciiIdentifierStart.test(f(v))}function d(v){return v<128?i[v]:e.NonAsciiIdentifierPart.test(f(v))}function p(v){return v<128?n[v]:r.NonAsciiIdentifierStart.test(f(v))}function g(v){return v<128?i[v]:r.NonAsciiIdentifierPart.test(f(v))}Jte.exports={isDecimalDigit:o,isHexDigit:s,isOctalDigit:l,isWhiteSpace:u,isLineTerminator:c,isIdentifierStartES5:h,isIdentifierPartES5:d,isIdentifierStartES6:p,isIdentifierPartES6:g}})();var ere=Jte.exports,tre={exports:{}};(function(){var r=ere;function e(h){switch(h){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function t(h,d){return!d&&h==="yield"?!1:n(h,d)}function n(h,d){if(d&&e(h))return!0;switch(h.length){case 2:return h==="if"||h==="in"||h==="do";case 3:return h==="var"||h==="for"||h==="new"||h==="try";case 4:return h==="this"||h==="else"||h==="case"||h==="void"||h==="with"||h==="enum";case 5:return h==="while"||h==="break"||h==="catch"||h==="throw"||h==="const"||h==="yield"||h==="class"||h==="super";case 6:return h==="return"||h==="typeof"||h==="delete"||h==="switch"||h==="export"||h==="import";case 7:return h==="default"||h==="finally"||h==="extends";case 8:return h==="function"||h==="continue"||h==="debugger";case 10:return h==="instanceof";default:return!1}}function i(h,d){return h==="null"||h==="true"||h==="false"||t(h,d)}function a(h,d){return h==="null"||h==="true"||h==="false"||n(h,d)}function o(h){return h==="eval"||h==="arguments"}function s(h){var d,p,g;if(h.length===0||(g=h.charCodeAt(0),!r.isIdentifierStartES5(g)))return!1;for(d=1,p=h.length;d=p||(v=h.charCodeAt(d),!(56320<=v&&v<=57343)))return!1;g=l(g,v)}if(!m(g))return!1;m=r.isIdentifierPartES6}return!0}function c(h,d){return s(h)&&!i(h,d)}function f(h,d){return u(h)&&!a(h,d)}tre.exports={isKeywordES5:t,isKeywordES6:n,isReservedWordES5:i,isReservedWordES6:a,isRestrictedWord:o,isIdentifierNameES5:s,isIdentifierNameES6:u,isIdentifierES5:c,isIdentifierES6:f}})();var uWe=tre.exports;(function(){_w.ast=lWe,_w.code=ere,_w.keyword=uWe})();var mm={},gT={},C_={},x_={},uG;function cWe(){if(uG)return x_;uG=1;var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return x_.encode=function(e){if(0<=e&&e>1;return l?-u:u}return C_.encode=function(l){var u="",c,f=a(l);do c=f&n,f>>>=e,f>0&&(c|=i),u+=r.encode(c);while(f>0);return u},C_.decode=function(l,u,c){var f=l.length,h=0,d=0,p,g;do{if(u>=f)throw new Error("Expected more digits in base 64 VLQ value.");if(g=r.decode(l.charCodeAt(u++)),g===-1)throw new Error("Invalid base64 digit: "+l.charAt(u-1));p=!!(g&i),g&=n,h=h+(g<=0;E--)x=C[E],x==="."?C.splice(E,1):x===".."?D++:D>0&&(x===""?(C.splice(E+1,D),D=0):(C.splice(E,2),D--));return w=C.join("/"),w===""&&(w=A?"/":"."),S?(S.path=w,a(S)):w}r.normalize=o;function s(_,w){_===""&&(_="."),w===""&&(w=".");var S=i(w),A=i(_);if(A&&(_=A.path||"/"),S&&!S.scheme)return A&&(S.scheme=A.scheme),a(S);if(S||w.match(n))return w;if(A&&!A.host&&!A.path)return A.host=w,a(A);var C=w.charAt(0)==="/"?w:o(_.replace(/\/+$/,"")+"/"+w);return A?(A.path=C,a(A)):C}r.join=s,r.isAbsolute=function(_){return _.charAt(0)==="/"||t.test(_)};function l(_,w){_===""&&(_="."),_=_.replace(/\/$/,"");for(var S=0;w.indexOf(_+"/")!==0;){var A=_.lastIndexOf("/");if(A<0||(_=_.slice(0,A),_.match(/^([^\/]+:\/)?\/*$/)))return w;++S}return Array(S+1).join("../")+w.substr(_.length+1)}r.relative=l;var u=function(){var _=Object.create(null);return!("__proto__"in _)}();function c(_){return _}function f(_){return d(_)?"$"+_:_}r.toSetString=u?c:f;function h(_){return d(_)?_.slice(1):_}r.fromSetString=u?c:h;function d(_){if(!_)return!1;var w=_.length;if(w<9||_.charCodeAt(w-1)!==95||_.charCodeAt(w-2)!==95||_.charCodeAt(w-3)!==111||_.charCodeAt(w-4)!==116||_.charCodeAt(w-5)!==111||_.charCodeAt(w-6)!==114||_.charCodeAt(w-7)!==112||_.charCodeAt(w-8)!==95||_.charCodeAt(w-9)!==95)return!1;for(var S=w-10;S>=0;S--)if(_.charCodeAt(S)!==36)return!1;return!0}function p(_,w,S){var A=v(_.source,w.source);return A!==0||(A=_.originalLine-w.originalLine,A!==0)||(A=_.originalColumn-w.originalColumn,A!==0||S)||(A=_.generatedColumn-w.generatedColumn,A!==0)||(A=_.generatedLine-w.generatedLine,A!==0)?A:v(_.name,w.name)}r.compareByOriginalPositions=p;function g(_,w,S){var A=_.generatedLine-w.generatedLine;return A!==0||(A=_.generatedColumn-w.generatedColumn,A!==0||S)||(A=v(_.source,w.source),A!==0)||(A=_.originalLine-w.originalLine,A!==0)||(A=_.originalColumn-w.originalColumn,A!==0)?A:v(_.name,w.name)}r.compareByGeneratedPositionsDeflated=g;function v(_,w){return _===w?0:_===null?1:w===null?-1:_>w?1:-1}function m(_,w){var S=_.generatedLine-w.generatedLine;return S!==0||(S=_.generatedColumn-w.generatedColumn,S!==0)||(S=v(_.source,w.source),S!==0)||(S=_.originalLine-w.originalLine,S!==0)||(S=_.originalColumn-w.originalColumn,S!==0)?S:v(_.name,w.name)}r.compareByGeneratedPositionsInflated=m;function y(_){return JSON.parse(_.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=y;function b(_,w,S){if(w=w||"",_&&(_[_.length-1]!=="/"&&w[0]!=="/"&&(_+="/"),w=_+w),S){var A=i(S);if(!A)throw new Error("sourceMapURL could not be parsed");if(A.path){var C=A.path.lastIndexOf("/");C>=0&&(A.path=A.path.substring(0,C+1))}w=s(a(A),w)}return o(w)}r.computeSourceURL=b}(vT)),vT}var mT={},hG;function nre(){if(hG)return mT;hG=1;var r=P1(),e=Object.prototype.hasOwnProperty,t=typeof Map<"u";function n(){this._array=[],this._set=t?new Map:Object.create(null)}return n.fromArray=function(a,o){for(var s=new n,l=0,u=a.length;l=0)return o}else{var s=r.toSetString(a);if(e.call(this._set,s))return this._set[s]}throw new Error('"'+a+'" is not in the set.')},n.prototype.at=function(a){if(a>=0&&aa||o==a&&l>=s||r.compareByGeneratedPositionsInflated(n,i)<=0}function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return t.prototype.unsortedForEach=function(i,a){this._array.forEach(i,a)},t.prototype.add=function(i){e(this._last,i)?(this._last=i,this._array.push(i)):(this._sorted=!1,this._array.push(i))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},yT.MappingList=t,yT}var pG;function ire(){if(pG)return gT;pG=1;var r=rre(),e=P1(),t=nre().ArraySet,n=fWe().MappingList;function i(a){a||(a={}),this._file=e.getArg(a,"file",null),this._sourceRoot=e.getArg(a,"sourceRoot",null),this._skipValidation=e.getArg(a,"skipValidation",!1),this._sources=new t,this._names=new t,this._mappings=new n,this._sourcesContents=null}return i.prototype._version=3,i.fromSourceMap=function(o){var s=o.sourceRoot,l=new i({file:o.file,sourceRoot:s});return o.eachMapping(function(u){var c={generated:{line:u.generatedLine,column:u.generatedColumn}};u.source!=null&&(c.source=u.source,s!=null&&(c.source=e.relative(s,c.source)),c.original={line:u.originalLine,column:u.originalColumn},u.name!=null&&(c.name=u.name)),l.addMapping(c)}),o.sources.forEach(function(u){var c=u;s!==null&&(c=e.relative(s,u)),l._sources.has(c)||l._sources.add(c);var f=o.sourceContentFor(u);f!=null&&l.setSourceContent(u,f)}),l},i.prototype.addMapping=function(o){var s=e.getArg(o,"generated"),l=e.getArg(o,"original",null),u=e.getArg(o,"source",null),c=e.getArg(o,"name",null);this._skipValidation||this._validateMapping(s,l,u,c),u!=null&&(u=String(u),this._sources.has(u)||this._sources.add(u)),c!=null&&(c=String(c),this._names.has(c)||this._names.add(c)),this._mappings.add({generatedLine:s.line,generatedColumn:s.column,originalLine:l!=null&&l.line,originalColumn:l!=null&&l.column,source:u,name:c})},i.prototype.setSourceContent=function(o,s){var l=o;this._sourceRoot!=null&&(l=e.relative(this._sourceRoot,l)),s!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(l)]=s):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(l)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(o,s,l){var u=s;if(s==null){if(o.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);u=o.file}var c=this._sourceRoot;c!=null&&(u=e.relative(c,u));var f=new t,h=new t;this._mappings.unsortedForEach(function(d){if(d.source===u&&d.originalLine!=null){var p=o.originalPositionFor({line:d.originalLine,column:d.originalColumn});p.source!=null&&(d.source=p.source,l!=null&&(d.source=e.join(l,d.source)),c!=null&&(d.source=e.relative(c,d.source)),d.originalLine=p.line,d.originalColumn=p.column,p.name!=null&&(d.name=p.name))}var g=d.source;g!=null&&!f.has(g)&&f.add(g);var v=d.name;v!=null&&!h.has(v)&&h.add(v)},this),this._sources=f,this._names=h,o.sources.forEach(function(d){var p=o.sourceContentFor(d);p!=null&&(l!=null&&(d=e.join(l,d)),c!=null&&(d=e.relative(c,d)),this.setSourceContent(d,p))},this)},i.prototype._validateMapping=function(o,s,l,u){if(s&&typeof s.line!="number"&&typeof s.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(o&&"line"in o&&"column"in o&&o.line>0&&o.column>=0&&!s&&!l&&!u)){if(o&&"line"in o&&"column"in o&&s&&"line"in s&&"column"in s&&o.line>0&&o.column>=0&&s.line>0&&s.column>=0&&l)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:o,source:l,original:s,name:u}))}},i.prototype._serializeMappings=function(){for(var o=0,s=1,l=0,u=0,c=0,f=0,h="",d,p,g,v,m=this._mappings.toArray(),y=0,b=m.length;y0){if(!e.compareByGeneratedPositionsInflated(p,m[y-1]))continue;d+=","}d+=r.encode(p.generatedColumn-o),o=p.generatedColumn,p.source!=null&&(v=this._sources.indexOf(p.source),d+=r.encode(v-f),f=v,d+=r.encode(p.originalLine-1-u),u=p.originalLine-1,d+=r.encode(p.originalColumn-l),l=p.originalColumn,p.name!=null&&(g=this._names.indexOf(p.name),d+=r.encode(g-c),c=g)),h+=d}return h},i.prototype._generateSourcesContent=function(o,s){return o.map(function(l){if(!this._sourcesContents)return null;s!=null&&(l=e.relative(s,l));var u=e.toSetString(l);return Object.prototype.hasOwnProperty.call(this._sourcesContents,u)?this._sourcesContents[u]:null},this)},i.prototype.toJSON=function(){var o={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(o.file=this._file),this._sourceRoot!=null&&(o.sourceRoot=this._sourceRoot),this._sourcesContents&&(o.sourcesContent=this._generateSourcesContent(o.sources,o.sourceRoot)),o},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},gT.SourceMapGenerator=i,gT}var ym={},bT={},gG;function hWe(){return gG||(gG=1,function(r){r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2;function e(t,n,i,a,o,s){var l=Math.floor((n-t)/2)+t,u=o(i,a[l],!0);return u===0?l:u>0?n-l>1?e(l,n,i,a,o,s):s==r.LEAST_UPPER_BOUND?n1?e(t,l,i,a,o,s):s==r.LEAST_UPPER_BOUND?l:t<0?-1:t}r.search=function(n,i,a,o){if(i.length===0)return-1;var s=e(-1,i.length,n,i,a,o||r.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&a(i[s],i[s-1],!0)===0;)--s;return s}}(bT)),bT}var _T={},vG;function dWe(){if(vG)return _T;vG=1;function r(n,i,a){var o=n[i];n[i]=n[a],n[a]=o}function e(n,i){return Math.round(n+Math.random()*(i-n))}function t(n,i,a,o){if(a=0){var g=this._originalMappings[p];if(c.column===void 0)for(var v=g.originalLine;g&&g.originalLine===v;)d.push({line:r.getArg(g,"generatedLine",null),column:r.getArg(g,"generatedColumn",null),lastColumn:r.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++p];else for(var m=g.originalColumn;g&&g.originalLine===f&&g.originalColumn==m;)d.push({line:r.getArg(g,"generatedLine",null),column:r.getArg(g,"generatedColumn",null),lastColumn:r.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++p]}return d},ym.SourceMapConsumer=a;function o(u,c){var f=u;typeof u=="string"&&(f=r.parseSourceMapInput(u));var h=r.getArg(f,"version"),d=r.getArg(f,"sources"),p=r.getArg(f,"names",[]),g=r.getArg(f,"sourceRoot",null),v=r.getArg(f,"sourcesContent",null),m=r.getArg(f,"mappings"),y=r.getArg(f,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);g&&(g=r.normalize(g)),d=d.map(String).map(r.normalize).map(function(b){return g&&r.isAbsolute(g)&&r.isAbsolute(b)?r.relative(g,b):b}),this._names=t.fromArray(p.map(String),!0),this._sources=t.fromArray(d,!0),this._absoluteSources=this._sources.toArray().map(function(b){return r.computeSourceURL(g,b,c)}),this.sourceRoot=g,this.sourcesContent=v,this._mappings=m,this._sourceMapURL=c,this.file=y}o.prototype=Object.create(a.prototype),o.prototype.consumer=a,o.prototype._findSourceIndex=function(u){var c=u;if(this.sourceRoot!=null&&(c=r.relative(this.sourceRoot,c)),this._sources.has(c))return this._sources.indexOf(c);var f;for(f=0;f1&&(C.source=v+D[1],v+=D[1],C.originalLine=p+D[2],p=C.originalLine,C.originalLine+=1,C.originalColumn=g+D[3],g=C.originalColumn,D.length>4&&(C.name=m+D[4],m+=D[4])),A.push(C),typeof C.originalLine=="number"&&S.push(C)}i(A,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,i(S,r.compareByOriginalPositions),this.__originalMappings=S},o.prototype._findMapping=function(c,f,h,d,p,g){if(c[h]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+c[h]);if(c[d]<0)throw new TypeError("Column must be greater than or equal to 0, got "+c[d]);return e.search(c,f,p,g)},o.prototype.computeColumnSpans=function(){for(var c=0;c=0){var d=this._generatedMappings[h];if(d.generatedLine===f.generatedLine){var p=r.getArg(d,"source",null);p!==null&&(p=this._sources.at(p),p=r.computeSourceURL(this.sourceRoot,p,this._sourceMapURL));var g=r.getArg(d,"name",null);return g!==null&&(g=this._names.at(g)),{source:p,line:r.getArg(d,"originalLine",null),column:r.getArg(d,"originalColumn",null),name:g}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(c){return c==null}):!1},o.prototype.sourceContentFor=function(c,f){if(!this.sourcesContent)return null;var h=this._findSourceIndex(c);if(h>=0)return this.sourcesContent[h];var d=c;this.sourceRoot!=null&&(d=r.relative(this.sourceRoot,d));var p;if(this.sourceRoot!=null&&(p=r.urlParse(this.sourceRoot))){var g=d.replace(/^file:\/\//,"");if(p.scheme=="file"&&this._sources.has(g))return this.sourcesContent[this._sources.indexOf(g)];if((!p.path||p.path=="/")&&this._sources.has("/"+d))return this.sourcesContent[this._sources.indexOf("/"+d)]}if(f)return null;throw new Error('"'+d+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(c){var f=r.getArg(c,"source");if(f=this._findSourceIndex(f),f<0)return{line:null,column:null,lastColumn:null};var h={source:f,originalLine:r.getArg(c,"line"),originalColumn:r.getArg(c,"column")},d=this._findMapping(h,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(c,"bias",a.GREATEST_LOWER_BOUND));if(d>=0){var p=this._originalMappings[d];if(p.source===h.source)return{line:r.getArg(p,"generatedLine",null),column:r.getArg(p,"generatedColumn",null),lastColumn:r.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},ym.BasicSourceMapConsumer=o;function l(u,c){var f=u;typeof u=="string"&&(f=r.parseSourceMapInput(u));var h=r.getArg(f,"version"),d=r.getArg(f,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new t,this._names=new t;var p={line:-1,column:0};this._sections=d.map(function(g){if(g.url)throw new Error("Support for url field in sections not implemented.");var v=r.getArg(g,"offset"),m=r.getArg(v,"line"),y=r.getArg(v,"column");if(m=0;l--)this.prepend(s[l]);else if(s[i]||typeof s=="string")this.children.unshift(s);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+s);return this},a.prototype.walk=function(s){for(var l,u=0,c=this.children.length;u0){for(l=[],u=0;u=4.0"},xWe=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"http://github.com/Constellation"}],DWe={type:"git",url:"http://github.com/estools/escodegen.git"},EWe={estraverse:"^4.2.0",esutils:"^2.0.2",esprima:"^4.0.1",optionator:"^0.8.1"},TWe={"source-map":"~0.6.1"},kWe={acorn:"^7.1.0",bluebird:"^3.4.7","bower-registry-client":"^1.0.0",chai:"^3.5.0","commonjs-everywhere":"^0.9.7",gulp:"^3.8.10","gulp-eslint":"^3.0.1","gulp-mocha":"^3.0.1",semver:"^5.1.0"},MWe="BSD-2-Clause",IWe={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint",release:"node tools/release.js","build-min":"./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",build:"./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js"},LWe={name:mWe,description:yWe,homepage:bWe,main:_We,bin:wWe,files:SWe,version:AWe,engines:CWe,maintainers:xWe,repository:DWe,dependencies:EWe,optionalDependencies:TWe,devDependencies:kWe,license:MWe,scripts:IWe};(function(r){(function(){var e,t,n,i,a,o,s,l,u,c,f,h,d,p,g,v,m,y,b,_,w,S,A,C,x,D;a=Kte,o=_w,e=a.Syntax;function E(I){return Pt.Expression.hasOwnProperty(I.type)}function T(I){return Pt.Statement.hasOwnProperty(I.type)}t={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,LogicalOR:3,LogicalAND:4,BitwiseOR:5,BitwiseXOR:6,BitwiseAND:7,Equality:8,Relational:9,BitwiseSHIFT:10,Additive:11,Multiplicative:12,Exponentiation:13,Await:14,Unary:14,Postfix:15,Call:16,New:17,TaggedTemplate:18,Member:19,Primary:20},n={"||":t.LogicalOR,"&&":t.LogicalAND,"|":t.BitwiseOR,"^":t.BitwiseXOR,"&":t.BitwiseAND,"==":t.Equality,"!=":t.Equality,"===":t.Equality,"!==":t.Equality,is:t.Equality,isnt:t.Equality,"<":t.Relational,">":t.Relational,"<=":t.Relational,">=":t.Relational,in:t.Relational,instanceof:t.Relational,"<<":t.BitwiseSHIFT,">>":t.BitwiseSHIFT,">>>":t.BitwiseSHIFT,"+":t.Additive,"-":t.Additive,"*":t.Multiplicative,"%":t.Multiplicative,"/":t.Multiplicative,"**":t.Exponentiation};var k=1,M=2,L=4,F=8,U=16,N=32,$=M|L,H=k|M,P=k|M|L,te=k,J=L,fe=k|L,Ce=k,ke=k|N,Se=0,be=k|U,W=k|F;function q(){return{indent:null,base:null,parse:null,comment:!1,format:{indent:{style:" ",base:0,adjustMultilineComment:!1},newline:` +`,space:" ",json:!1,renumber:!1,hexadecimal:!1,quotes:"single",escapeless:!1,compact:!1,parentheses:!0,semicolons:!0,safeConcatenation:!1,preserveBlankLines:!1},moz:{comprehensionExpressionStartsWithAssignment:!1,starlessGenerator:!1},sourceMap:null,sourceMapRoot:null,sourceMapWithCode:!1,directive:!1,raw:!0,verbatim:null,sourceCode:null}}function j(I,z){var R="";for(z|=0;z>0;z>>>=1,I+=I)z&1&&(R+=I);return R}function ve(I){return/[\r\n]/g.test(I)}function K(I){var z=I.length;return z&&o.code.isLineTerminator(I.charCodeAt(z-1))}function xe(I,z){var R;for(R in z)z.hasOwnProperty(R)&&(I[R]=z[R]);return I}function ne(I,z){var R,G;function Z(Ae){return typeof Ae=="object"&&Ae instanceof Object&&!(Ae instanceof RegExp)}for(R in z)z.hasOwnProperty(R)&&(G=z[R],Z(G)?Z(I[R])?ne(I[R],G):I[R]=ne({},G):I[R]=G);return I}function we(I){var z,R,G,Z,Ae;if(I!==I)throw new Error("Numeric literal whose value is NaN");if(I<0||I===0&&1/I<0)throw new Error("Numeric literal whose value is negative");if(I===1/0)return u?"null":c?"1e400":"1e+400";if(z=""+I,!c||z.length<3)return z;for(R=z.indexOf("."),!u&&z.charCodeAt(0)===48&&R===1&&(R=0,z=z.slice(1)),G=z,z=z.replace("e+","e"),Z=0,(Ae=G.indexOf("e"))>0&&(Z=+G.slice(Ae+1),G=G.slice(0,Ae)),R>=0&&(Z-=G.length-R-1,G=+(G.slice(0,R)+G.slice(R+1))+""),Ae=0;G.charCodeAt(G.length+Ae-1)===48;)--Ae;return Ae!==0&&(Z-=Ae,G=G.slice(0,Ae)),Z!==0&&(G+="e"+Z),(G.length1e12&&Math.floor(I)===I&&(G="0x"+I.toString(16)).length255?"\\u"+"0000".slice(R.length)+R:I===0&&!o.code.isDecimalDigit(z)?"\\0":I===11?"\\x0B":"\\x"+"00".slice(R.length)+R)}function at(I){if(I===92)return"\\\\";if(I===10)return"\\n";if(I===13)return"\\r";if(I===8232)return"\\u2028";if(I===8233)return"\\u2029";throw new Error("Incorrectly classified character")}function Gt(I){var z,R,G,Z;for(Z=h==="double"?'"':"'",z=0,R=I.length;z126))){z+=$e(Z,I.charCodeAt(R+1));continue}z+=String.fromCharCode(Z)}if(qe=!(h==="double"||h==="auto"&&Pe=0&&!o.code.isLineTerminator(I.charCodeAt(z));--z);return I.length-1-z}function Ne(I,z){var R,G,Z,Ae,Pe,qe,he,rt;for(R=I.split(/\r\n|[\r\n]/),qe=Number.MAX_VALUE,G=1,Z=R.length;GPe&&(qe=Pe)}for(typeof z<"u"?(he=s,R[1][qe]==="*"&&(z+=" "),s=z):(qe&1&&--qe,he=s),G=1,Z=R.length;G0){if(Ae=z,C){for(Z=I.leadingComments[0],z=[],rt=Z.extendedRange,pr=Z.range,no=A.substring(rt[0],pr[0]),Eo=(no.match(/\n/g)||[]).length,Eo>0?(z.push(j(` +`,Eo)),z.push(Nr(le(Z)))):(z.push(no),z.push(le(Z))),yn=pr,R=1,G=I.leadingComments.length;R0?(z.push(j(` +`,Eo)),z.push(Nr(le(Z)))):(z.push(no),z.push(le(Z)));else for(Pe=!K(Me(z).toString()),qe=j(" ",xt(Me([s,z,l]).toString())),R=0,G=I.trailingComments.length;R")),I.expression?(z.push(g),R=this.generateExpression(I.body,t.Assignment,P),R.toString().charAt(0)==="{"&&(R=["(",R,")"]),z.push(R)):z.push(this.maybeBlock(I.body,W)),z},Pt.prototype.generateIterationForStatement=function(I,z,R){var G=["for"+(z.await?yt()+"await":"")+g+"("],Z=this;return Ht(function(){z.left.type===e.VariableDeclaration?Ht(function(){G.push(z.left.kind+yt()),G.push(Z.generateStatement(z.left.declarations[0],Se))}):G.push(Z.generateExpression(z.left,t.Call,P)),G=gt(G,I),G=[gt(G,Z.generateExpression(z.right,t.Assignment,P)),")"]}),G.push(this.maybeBlock(z.body,R)),G},Pt.prototype.generatePropertyKey=function(I,z){var R=[];return z&&R.push("["),R.push(this.generateExpression(I,t.Assignment,P)),z&&R.push("]"),R},Pt.prototype.generateAssignment=function(I,z,R,G,Z){return t.Assignment2&&(G=A.substring(R[0]+1,R[1]-1),G[0]===` +`&&(Z=["{"]),Z.push(G)));var Pe,qe,he,rt;for(rt=Ce,z&F&&(rt|=U),Pe=0,qe=I.body.length;Pe0&&!I.body[Pe-1].trailingComments&&!I.body[Pe].leadingComments&&ft(I.body[Pe-1].range[1],I.body[Pe].range[0],Z)),Pe===qe-1&&(rt|=N),I.body[Pe].leadingComments&&C?he=Ae.generateStatement(I.body[Pe],rt):he=Nr(Ae.generateStatement(I.body[Pe],rt)),Z.push(he),K(Me(he).toString())||C&&Pe1?Ht(he):he(),R.push(this.semicolon(z)),R},ThrowStatement:function(I,z){return[gt("throw",this.generateExpression(I.argument,t.Sequence,P)),this.semicolon(z)]},TryStatement:function(I,z){var R,G,Z,Ae;if(R=["try",this.maybeBlock(I.block,Ce)],R=this.maybeBlockSuffix(I.block,R),I.handlers)for(G=0,Z=I.handlers.length;G0?` +`:""],Pe=be,Z=0;Z0&&!I.body[Z-1].trailingComments&&!I.body[Z].leadingComments&&ft(I.body[Z-1].range[1],I.body[Z].range[0],R)),G=Nr(this.generateStatement(I.body[Z],Pe)),R.push(G),Z+10){for(G.push("("),Ae=0,Pe=Z;Ae=2&&Z.charCodeAt(0)===48)&&G.push(" ")),G.push("."),G.push(ur(I.property))),_e(G,t.Member,z)},MetaProperty:function(I,z,R){var G;return G=[],G.push(typeof I.meta=="string"?I.meta:ur(I.meta)),G.push("."),G.push(typeof I.property=="string"?I.property:ur(I.property)),_e(G,t.Member,z)},UnaryExpression:function(I,z,R){var G,Z,Ae,Pe,qe;return Z=this.generateExpression(I.argument,t.Unary,P),g===""?G=gt(I.operator,Z):(G=[I.operator],I.operator.length>2?G=gt(G,Z):(Pe=Me(G).toString(),qe=Pe.charCodeAt(Pe.length-1),Ae=Z.toString().charCodeAt(0),((qe===43||qe===45)&&qe===Ae||o.code.isIdentifierPartES5(qe)&&o.code.isIdentifierPartES5(Ae))&&G.push(yt()),G.push(Z))),_e(G,t.Unary,z)},YieldExpression:function(I,z,R){var G;return I.delegate?G="yield*":G="yield",I.argument&&(G=gt(G,this.generateExpression(I.argument,t.Yield,P))),_e(G,t.Yield,z)},AwaitExpression:function(I,z,R){var G=gt(I.all?"await*":"await",this.generateExpression(I.argument,t.Await,P));return _e(G,t.Await,z)},UpdateExpression:function(I,z,R){return I.prefix?_e([I.operator,this.generateExpression(I.argument,t.Unary,P)],t.Unary,z):_e([this.generateExpression(I.argument,t.Postfix,P),I.operator],t.Postfix,z)},FunctionExpression:function(I,z,R){var G=[Vr(I,!0),"function"];return I.id?(G.push(Kt(I)||yt()),G.push(ur(I.id))):G.push(Kt(I)||g),G.push(this.generateFunctionBody(I)),G},ArrayPattern:function(I,z,R){return this.ArrayExpression(I,z,R,!0)},ArrayExpression:function(I,z,R,G){var Z,Ae,Pe=this;return I.elements.length?(Ae=G?!1:I.elements.length>1,Z=["[",Ae?p:""],Ht(function(qe){var he,rt;for(he=0,rt=I.elements.length;he1,Ht(function(){Ae=Pe.generateExpression(I.properties[0],t.Sequence,P)}),!G&&!ve(Me(Ae).toString())?["{",g,Ae,g,"}"]:(Ht(function(qe){var he,rt;if(Z=["{",p,qe,Ae],G)for(Z.push(","+p),he=1,rt=I.properties.length;he0||_.moz.comprehensionExpressionStartsWithAssignment?G=gt(G,Pe):G.push(Pe)}),I.filter&&(G=gt(G,"if"+g),Pe=this.generateExpression(I.filter,t.Sequence,P),G=gt(G,["(",Pe,")"])),_.moz.comprehensionExpressionStartsWithAssignment||(Pe=this.generateExpression(I.body,t.Assignment,P),G=gt(G,Pe)),G.push(I.type===e.GeneratorExpression?")":"]"),G},ComprehensionBlock:function(I,z,R){var G;return I.left.type===e.VariableDeclaration?G=[I.left.kind,yt(),this.generateStatement(I.left.declarations[0],Se)]:G=this.generateExpression(I.left,t.Call,P),G=gt(G,I.of?"of":"in"),G=gt(G,this.generateExpression(I.right,t.Sequence,P)),["for"+g+"(",G,")"]},SpreadElement:function(I,z,R){return["...",this.generateExpression(I.argument,t.Assignment,P)]},TaggedTemplateExpression:function(I,z,R){var G=H;R&M||(G=te);var Z=[this.generateExpression(I.tag,t.Call,G),this.generateExpression(I.quasi,t.Primary,J)];return _e(Z,t.TaggedTemplate,z)},TemplateElement:function(I,z,R){return I.value.raw},TemplateLiteral:function(I,z,R){var G,Z,Ae;for(G=["`"],Z=0,Ae=I.quasis.length;Z"?c>g:v===">="?c>=g:v==="|"?c|g:v==="&"?c&g:v==="^"?c^g:v==="&&"?c&&g:v==="||"?c||g:t}else{if(a.type==="Identifier")return{}.hasOwnProperty.call(e,a.name)?e[a.name]:t;if(a.type==="ThisExpression")return{}.hasOwnProperty.call(e,"this")?e.this:t;if(a.type==="CallExpression"){var m=i(a.callee);if(m===t||typeof m!="function")return t;var y=a.callee.object?i(a.callee.object):t;y===t&&(y=null);for(var b=[],u=0,c=a.arguments.length;u=i||n(h,f,t)&&s.push({path:c.concat(h),value:f})}),u.forEach(function(f,h){s.length>=i||r&&l(f,c.concat(h))})):RWe(u)&&(Object.keys(u).forEach(function(f){s.length>=i||n(f,u[f],t)&&s.push({path:c.concat(f),value:u[f]})}),Object.keys(u).forEach(function(f){s.length>=i||r&&l(u[f],c.concat(f))}))}).bind(this);return l(a,o),s}}function WI(r,e){try{return OWe(r,e)}catch{}}function D_(r){return function(e,t,n){return this.descend(t,e.expression.value,r,n)}}function E_(r){return function(e,t,n){return this.traverse(t,e.expression.value,r,n)}}function wG(r){return r=r.filter(function(e){return e}),zWe(r,function(e){return e.path.map(function(t){return String(t).replace("-","--")}).join("-")})}function PWe(r){var e=String(r);return e.match(/^-?[0-9]+$/)?parseInt(e):null}function are(r){return Array.isArray(r)}function RWe(r){return r&&!(r instanceof Array)&&r instanceof Object}function ST(r,e,t){var n=HI(e).body[0].expression,i=WI(n,{"@":r.value}),a=t.replace(/\{\{\s*value\s*\}\}/g,i),o=sre.nodes(r.value,a);return o.forEach(function(s){s.path=r.path.concat(s.path.slice(1))}),o}var NWe=function(){function r(){this._fns={"member-child-identifier":function(e,t){var n=e.expression.value,i=t.value;if(i instanceof Object&&n in i)return[{value:i[n],path:t.path.concat(n)}]},"member-descendant-identifier":E_(function(e,t,n){return e==n}),"subscript-child-numeric_literal":D_(function(e,t,n){return e===n}),"member-child-numeric_literal":D_(function(e,t,n){return String(e)===String(n)}),"subscript-descendant-numeric_literal":E_(function(e,t,n){return e===n}),"member-child-wildcard":D_(function(){return!0}),"member-descendant-wildcard":E_(function(){return!0}),"subscript-descendant-wildcard":E_(function(){return!0}),"subscript-child-wildcard":D_(function(){return!0}),"subscript-child-slice":function(e,t){if(are(t.value)){var n=e.expression.value.split(":").map(PWe),i=t.value.map(function(a,o){return{value:a,path:t.path.concat(o)}});return ZHe.apply(null,[i].concat(n))}},"subscript-child-union":function(e,t){var n=[];return e.expression.value.forEach(function(i){var a={operation:"subscript",scope:"child",expression:i.expression},o=this.resolve(a),s=o(a,t);s&&(n=n.concat(s))},this),wG(n)},"subscript-descendant-union":function(e,t,n){var i=this,a=[],o=sre.nodes(t,"$..*").slice(1);return o.forEach(function(s){a.length>=n||e.expression.value.forEach(function(l){var u={operation:"subscript",scope:"child",expression:l.expression},c=i.resolve(u),f=c(u,s);a=a.concat(f)})}),wG(a)},"subscript-child-filter_expression":function(e,t,n){var i=e.expression.value.slice(2,-1),a=HI(i).body[0].expression,o=function(s,l){return WI(a,{"@":l})};return this.descend(t,null,o,n)},"subscript-descendant-filter_expression":function(e,t,n){var i=e.expression.value.slice(2,-1),a=HI(i).body[0].expression,o=function(s,l){return WI(a,{"@":l})};return this.traverse(t,null,o,n)},"subscript-child-script_expression":function(e,t){var n=e.expression.value.slice(1,-1);return ST(t,n,"$[{{value}}]")},"member-child-script_expression":function(e,t){var n=e.expression.value.slice(1,-1);return ST(t,n,"$.{{value}}")},"member-descendant-script_expression":function(e,t){var n=e.expression.value.slice(1,-1);return ST(t,n,"$..value")}},this.initialize()}return r.prototype.initialize=function(){this.traverse=_G(!0),this.descend=_G(),this._fns["subscript-child-string_literal"]=this._fns["member-child-identifier"],this._fns["member-descendant-numeric_literal"]=this._fns["subscript-descendant-string_literal"]=this._fns["member-descendant-identifier"]},r.prototype.resolve=function(e){var t=[e.operation,e.scope,e.expression.type].join("-"),n=this._fns[t];if(!n)throw new Error("couldn't resolve key: "+t);return n.bind(this)},r.prototype.register=function(e,t){if(!(t instanceof Function))throw new Error("handler must be a function");this._fns[e]=t},r}();function zWe(r,e){for(var t=[],n=[],i=0,a=r==null?void 0:r.length;i1?T.ast.set({expression:{type:"union",value:M[F]}}):this.$=M[F];break;case 25:this.$=[M[F]];break;case 26:this.$=M[F-2].concat(M[F]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(M[F])}},T.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:M[F]}},T.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:M[F]}},T.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:M[F]}},T.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:M[F]}},T.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:M[F]}},T.ast.set(this.$);break;case 33:case 34:this.$=M[F];break}},table:[{3:1,4:[1,2],6:3,13:4,15:n,16:i,17:a,18:o,19:s},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:l,14:u,20:16,21:17,22:c},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:l,14:u,20:16,21:17,22:c},t(f,[2,12]),t(f,[2,14]),t(f,[2,15]),t(f,[2,16]),t(f,[2,17]),t(f,[2,18]),{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:l,14:u,20:16,21:17,22:c},t(f,[2,5]),t(f,[2,7]),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(f,[2,19]),t(f,[2,20]),{13:23,15:n,16:i,17:a,18:o,19:s},{13:24,15:n,16:i,17:a,18:o,19:s,22:[1,25]},{15:h,17:d,18:p,23:26,25:27,26:28,27:32,29:34,30:g,31:v,32:m,33:y},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:l,14:u,20:16,21:17,22:c},t(f,[2,6]),t(f,[2,11]),t(f,[2,13]),{15:h,17:d,18:p,23:38,25:27,26:28,27:32,29:34,30:g,31:v,32:m,33:y},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},t(b,[2,25]),t(b,[2,27]),t(b,[2,28]),t(b,[2,29]),t(b,[2,33]),t(b,[2,34]),{24:[1,41]},t(f,[2,21]),{18:p,27:42,29:34,30:g,32:m,33:y},t(f,[2,22]),t(b,[2,26])],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(x,D){if(D.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=D,E}},parse:function(x){var D=this,E=[0],T=[null],k=[],M=this.table,L="",F=0,U=0,N=2,$=1,H=k.slice.call(arguments,1),P=Object.create(this.lexer),te={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(te.yy[J]=this.yy[J]);P.setInput(x,te.yy),te.yy.lexer=P,te.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var fe=P.yylloc;k.push(fe);var Ce=P.options&&P.options.ranges;typeof te.yy.parseError=="function"?this.parseError=te.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var ke=function(){var ue;return ue=P.lex()||$,typeof ue!="number"&&(ue=D.symbols_[ue]||ue),ue},Se,be,W,q,j={},ve,K,xe,ne;;){if(be=E[E.length-1],this.defaultActions[be]?W=this.defaultActions[be]:((Se===null||typeof Se>"u")&&(Se=ke()),W=M[be]&&M[be][Se]),typeof W>"u"||!W.length||!W[0]){var we="";ne=[];for(ve in M[be])this.terminals_[ve]&&ve>N&&ne.push("'"+this.terminals_[ve]+"'");P.showPosition?we="Parse error on line "+(F+1)+`: +`+P.showPosition()+` +Expecting `+ne.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'":we="Parse error on line "+(F+1)+": Unexpected "+(Se==$?"end of input":"'"+(this.terminals_[Se]||Se)+"'"),this.parseError(we,{text:P.match,token:this.terminals_[Se]||Se,line:P.yylineno,loc:fe,expected:ne})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+be+", token: "+Se);switch(W[0]){case 1:E.push(Se),T.push(P.yytext),k.push(P.yylloc),E.push(W[1]),Se=null,U=P.yyleng,L=P.yytext,F=P.yylineno,fe=P.yylloc;break;case 2:if(K=this.productions_[W[1]][1],j.$=T[T.length-K],j._$={first_line:k[k.length-(K||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(K||1)].first_column,last_column:k[k.length-1].last_column},Ce&&(j._$.range=[k[k.length-(K||1)].range[0],k[k.length-1].range[1]]),q=this.performAction.apply(j,[L,U,F,te.yy,W[1],T,k].concat(H)),typeof q<"u")return q;K&&(E=E.slice(0,-1*K*2),T=T.slice(0,-1*K),k=k.slice(0,-1*K)),E.push(this.productions_[W[1]][0]),T.push(j.$),k.push(j._$),xe=M[E[E.length-2]][E[E.length-1]],E.push(xe);break;case 3:return!0}}return!0}},w={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(C){for(var x in C)this._node[x]=C[x];return this._node},node:function(C){return arguments.length&&(this._node=C),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var C=this._nodes;return this.initialize(),C}},S=function(){var C={EOF:1,parseError:function(D,E){if(this.yy.parser)this.yy.parser.parseError(D,E);else throw new Error(D)},setInput:function(x,D){return this.yy=D||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var D=x.match(/(?:\r\n?|\n).*/g);return D?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},unput:function(x){var D=x.length,E=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var T=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var k=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===T.length?this.yylloc.first_column:0)+T[T.length-E.length].length-E[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(x){this.unput(this.match.slice(x))},pastInput:function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var x=this.pastInput(),D=new Array(x.length+1).join("-");return x+this.upcomingInput()+` +`+D+"^"},test_match:function(x,D){var E,T,k;if(this.options.backtrack_lexer&&(k={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(k.yylloc.range=this.yylloc.range.slice(0))),T=x[0].match(/(?:\r\n?|\n).*/g),T&&(this.yylineno+=T.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:T?T[T.length-1].length-T[T.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],E=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var M in k)this[M]=k[M];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,D,E,T;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),M=0;MD[0].length)){if(D=E,T=M,this.options.backtrack_lexer){if(x=this.test_match(E,k[M]),x!==!1)return x;if(this._backtrack){D=!1;continue}else return!1}else if(!this.options.flex)break}return D?(x=this.test_match(D,k[T]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var D=this.next();return D||this.lex()},begin:function(D){this.conditionStack.push(D)},popState:function(){var D=this.conditionStack.length-1;return D>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(D){return D=this.conditionStack.length-1-Math.abs(D||0),D>=0?this.conditionStack[D]:"INITIAL"},pushState:function(D){this.begin(D)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(D,E,T,k){switch(T){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return E.yytext=E.yytext.substr(1,E.yyleng-2),32;case 11:return E.yytext=E.yytext.substr(1,E.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return C}();_.lexer=S;function A(){this.yy={}}return A.prototype=_,_.Parser=A,new A}();typeof GWe<"u"&&(r.parser=e,r.Parser=e.Parser,r.parse=function(){return e.parse.apply(e,arguments)})})(ore);function T_(){var r=new ore.Parser,e=r.parseError;return r.yy.parseError=function(){r.yy.ast&&r.yy.ast.initialize(),e.apply(r,arguments)},r}var Ai=function(){function r(){}return r.ok=function(e,t){if(!e)throw new Error(t)},r.equal=function(e,t,n){if(e!==t)throw new Error(n)},r}(),sre=function(){function r(){}return r.parse=function(e){return Ai.ok(typeof e=="string","we need a path"),new T_().parse(e)},r.parent=function(e,t){Ai.ok(e instanceof Object,"obj needs to be an object"),Ai.ok(t,"we need a path");var n=this.nodes(e,t)[0];return n.path.pop(),this.value(e,n.path)},r.apply=function(e,t,n){Ai.ok(e instanceof Object,"obj needs to be an object"),Ai.ok(t,"we need a path"),Ai.equal(typeof n,"function","fn needs to be function");var i=this.nodes(e,t).sort(function(a,o){return o.path.length-a.path.length});return i.forEach(function(a){var o=a.path.pop(),s=this.value(e,this.stringify(a.path)),l=a.value=n.call(e,s[o]);s[o]=l},this),i},r.value=function(e,t,n){if(Ai.ok(e instanceof Object,"obj needs to be an object"),Ai.ok(t,"we need a path"),n!==void 0){var i=this.nodes(e,t).shift();if(!i)return this._vivify(e,t,n);var a=i.path.slice(-1).shift(),o=this.parent(e,this.stringify(i.path));o[a]=n}return this.query(e,this.stringify(t),1).shift()},r._vivify=function(e,t,n){var i=this;Ai.ok(e instanceof Object,"obj needs to be an object"),Ai.ok(t,"we need a path");var a=new T_().parse(t).map(function(s){return s.expression.value}),o=function(s,l){var u=s.pop(),c=i.value(e,s);c||(o(s.concat(),typeof u=="string"?{}:[]),c=i.value(e,s)),c[u]=l};return o(a,n),this.query(e,t)[0]},r.query=function(e,t,n){Ai.ok(e instanceof Object,"obj needs to be an object"),Ai.ok(typeof t=="string","we need a path");var i=this.nodes(e,t,n).map(function(a){return a.value});return i},r.paths=function(e,t,n){Ai.ok(e instanceof Object,"obj needs to be an object"),Ai.ok(t,"we need a path");var i=this.nodes(e,t,n).map(function(a){return a.path});return i},r.nodes=function(e,t,n){if(Ai.ok(e instanceof Object,"obj needs to be an object"),Ai.ok(t,"we need a path"),n===0)return[];var i=new T_().parse(t),a=new NWe,o=[{path:["$"],value:e}],s=[];return i.length&&i[0].expression.type=="root"&&i.shift(),i.length?(i.forEach(function(l,u){if(!(s.length>=n)){var c=a.resolve(l),f=[];o.forEach(function(h){if(!(s.length>=n)){var d=c(l,h,n);u==i.length-1?s=s.concat(d||[]):f=f.concat(d||[])}}),o=f}}),n?s.slice(0,n):s):o},r.stringify=function(e){Ai.ok(e,"we need a path");var t="$",n={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return e=this._normalize(e),e.forEach(function(i){if(i.expression.type!="root"){var a=[i.scope,i.operation].join("-"),o=n[a],s;if(i.expression.type=="string_literal"?s=JSON.stringify(i.expression.value):s=i.expression.value,!o)throw new Error("couldn't find template "+a);t+=o.replace(/{{value}}/,s)}}),t},r._normalize=function(e){if(Ai.ok(e,"we need a path"),typeof e=="string")return new T_().parse(e);if(Array.isArray(e)&&typeof e[0]=="string"){var t=[{expression:{type:"root",value:"$"}}];return e.forEach(function(n,i){if(!(n=="$"&&i===0))if(typeof n=="string"&&n.match("^"+VWe.identifier+"$"))t.push({operation:"member",scope:"child",expression:{value:n,type:"identifier"}});else{var a=typeof n=="number"?"numeric_literal":"string_literal";t.push({operation:"subscript",scope:"child",expression:{value:n,type:a}})}}),t}else if(Array.isArray(e)&&typeof e[0]=="object")return e;throw new Error("couldn't understand path "+e)},r}();const UWe=r=>({}),SG=r=>({});function HWe(r){let e,t;return e=new po({props:{src:r[0],class:"w-5 h-5 text-gray-600"}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&1&&(a.src=n[0]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function AG(r){let e,t,n;const i=r[7].default,a=Li(i,r,r[6],null);return{c(){e=ie("span"),a&&a.c(),this.h()},l(o){e=ae(o,"SPAN",{class:!0});var s=ge(e);a&&a.l(s),s.forEach(V),this.h()},h(){Y(e,"class","text-sm text-white bg-gray-900/90 rounded py-1 px-2 absolute -top-[5%] z-50 min-w-min w-max"),zr(e,"left-[115%]",r[2]==="right"),zr(e,"right-[115%]",r[2]==="left"),zr(e,"max-w-sm",r[1]==="sm"),zr(e,"max-w-md",r[1]==="md"),zr(e,"max-w-lg",r[1]==="lg"),zr(e,"max-w-[200px]",r[1]!=="sm"&&r[1]!=="md"&&r[1]!=="lg")},m(o,s){se(o,e,s),a&&a.m(e,null),n=!0},p(o,s){a&&a.p&&(!n||s&64)&&Fi(a,i,o,o[6],n?Oi(i,o[6],s,null):Bi(o[6]),null),(!n||s&4)&&zr(e,"left-[115%]",o[2]==="right"),(!n||s&4)&&zr(e,"right-[115%]",o[2]==="left"),(!n||s&2)&&zr(e,"max-w-sm",o[1]==="sm"),(!n||s&2)&&zr(e,"max-w-md",o[1]==="md"),(!n||s&2)&&zr(e,"max-w-lg",o[1]==="lg"),(!n||s&2)&&zr(e,"max-w-[200px]",o[1]!=="sm"&&o[1]!=="md"&&o[1]!=="lg")},i(o){n||(X(a,o),o&&Ad(()=>{n&&(t||(t=Fl(e,id,{},!0)),t.run(1))}),n=!0)},o(o){ee(a,o),o&&(t||(t=Fl(e,id,{},!1)),t.run(0)),n=!1},d(o){o&&V(e),a&&a.d(o),o&&t&&t.end()}}}function WWe(r){let e,t,n,i,a;const o=r[7].handle,s=Li(o,r,r[6],SG),l=s||HWe(r);let u=r[3]&&AG(r);return{c(){e=ie("span"),l&&l.c(),t=Ie(),u&&u.c(),this.h()},l(c){e=ae(c,"SPAN",{class:!0,role:!0});var f=ge(e);l&&l.l(f),t=Le(f),u&&u.l(f),f.forEach(V),this.h()},h(){Y(e,"class","inline-block align-middle leading-4 cursor-help relative w-fit"),Y(e,"role","tooltip")},m(c,f){se(c,e,f),l&&l.m(e,null),Q(e,t),u&&u.m(e,null),n=!0,i||(a=[gn(e,"focus",r[4]),gn(e,"blur",r[5]),gn(e,"mouseenter",r[4]),gn(e,"mouseleave",r[5])],i=!0)},p(c,[f]){s?s.p&&(!n||f&64)&&Fi(s,o,c,c[6],n?Oi(o,c[6],f,UWe):Bi(c[6]),SG):l&&l.p&&(!n||f&1)&&l.p(c,n?f:-1),c[3]?u?(u.p(c,f),f&8&&X(u,1)):(u=AG(c),u.c(),X(u,1),u.m(e,null)):u&&(Tt(),ee(u,1,1,()=>{u=null}),kt())},i(c){n||(X(l,c),X(u),n=!0)},o(c){ee(l,c),ee(u),n=!1},d(c){c&&V(e),l&&l.d(c),u&&u.d(),i=!1,Sd(a)}}}function $We(r,e,t){let{$$slots:n={},$$scope:i}=e,{icon:a=Bse}=e,{maxWidth:o=void 0}=e,{direction:s="right"}=e,l=!1;const u=()=>t(3,l=!0),c=()=>t(3,l=!1);return r.$$set=f=>{"icon"in f&&t(0,a=f.icon),"maxWidth"in f&&t(1,o=f.maxWidth),"direction"in f&&t(2,s=f.direction),"$$scope"in f&&t(6,i=f.$$scope)},[a,o,s,l,u,c,i,n]}class ui extends Cr{constructor(e){super(),xr(this,e,$We,WWe,Dr,{icon:0,maxWidth:1,direction:2})}}/** + * tua-body-scroll-lock v1.5.3 + * (c) 2024 Evinma, BuptStEve + * @license MIT + */var TC=function(){return typeof window>"u"},t4=function(e){e=e||navigator.userAgent;var t=/(iPad).*OS\s([\d_]+)/.test(e),n=!t&&/(iPhone\sOS)\s([\d_]+)/.test(e),i=/(Android);?[\s/]+([\d.]+)?/.test(e),a=n||t;return{ios:a,android:i}};function lre(r){if(TC())return!1;if(!r)throw new Error("options must be provided");var e=!1,t={get passive(){e=!0}},n=function(){},i="__TUA_BSL_TEST_PASSIVE__";window.addEventListener(i,n,t),window.removeEventListener(i,n,t);var a=r.capture;return e?r:typeof a<"u"?a:!1}function r4(){return"__BSL_PREVENT_DEFAULT__"in window||(window.__BSL_PREVENT_DEFAULT__=function(r){r.cancelable&&r.preventDefault()}),window.__BSL_PREVENT_DEFAULT__}function ure(r){return r?Array.isArray(r)?r:[r]:[]}var ww={lockedNum:0,lockedElements:[],unLockCallback:null,documentListenerAdded:!1,initialClientPos:{clientX:0,clientY:0}};function kC(r){if(TC())return ww;if(!(r!=null&&r.useGlobalLockState))return kC.lockState;var e="__BSL_LOCK_STATE__"in window?Object.assign(Object.assign({},ww),window.__BSL_LOCK_STATE__):ww;return window.__BSL_LOCK_STATE__=e,e}kC.lockState=ww;function jWe(r,e,t){if(e){var n=e.scrollTop,i=e.scrollLeft,a=e.scrollWidth,o=e.scrollHeight,s=e.clientWidth,l=e.clientHeight,u=r.targetTouches[0].clientX-t.clientX,c=r.targetTouches[0].clientY-t.clientY,f=Math.abs(c)>Math.abs(u),h=c>0&&n===0,d=u>0&&i===0,p=u<0&&i+s+1>=a,g=c<0&&n+l+1>=o;if(f&&(h||g)||!f&&(d||p))return r4()(r)}return r.stopPropagation(),!0}function qWe(){var r=document.documentElement,e=Object.assign({},r.style),t=window.innerWidth-r.clientWidth,n=parseInt(window.getComputedStyle(r).paddingRight,10);return r.style.overflow="hidden",r.style.boxSizing="border-box",r.style.paddingRight="".concat(t+n,"px"),function(){["overflow","boxSizing","paddingRight"].forEach(function(i){r.style[i]=e[i]||""})}}function YWe(r){var e=document.documentElement,t=document.body,n=e.scrollTop||t.scrollTop,i=Object.assign({},e.style),a=Object.assign({},t.style);return e.style.height="100%",e.style.overflow="hidden",t.style.top="-".concat(n,"px"),t.style.width="100%",t.style.height="auto",t.style.position="fixed",t.style.overflow="hidden",function(){e.style.height=i.height||"",e.style.overflow=i.overflow||"",["top","width","height","overflow","position"].forEach(function(s){t.style[s]=a[s]||""});var o="scrollBehavior"in document.documentElement.style;o?window.scrollTo({top:n,behavior:"instant"}):window.scrollTo(0,n)}}function wYe(r,e){if(!TC()){var t=t4(),n=kC(e);t.ios?(ure(r).filter(function(i){return i&&n.lockedElements.indexOf(i)===-1}).forEach(function(i){i.ontouchstart=function(a){var o=a.targetTouches[0],s=o.clientX,l=o.clientY;n.initialClientPos={clientX:s,clientY:l}},i.ontouchmove=function(a){jWe(a,i,n.initialClientPos)},n.lockedElements.push(i)}),XWe(n)):n.lockedNum<=0&&(n.unLockCallback=t.android?YWe():qWe()),n.lockedNum+=1}}function SYe(r,e){if(!TC()){var t=kC(e);t.lockedNum-=1,!(t.lockedNum>0)&&(ZWe(t)||(ure(r).forEach(function(n){var i=t.lockedElements.indexOf(n);n&&i!==-1&&(n.ontouchmove=null,n.ontouchstart=null,t.lockedElements.splice(i,1))}),KWe(t)))}}function ZWe(r){return t4().ios||typeof r.unLockCallback!="function"?!1:(r.unLockCallback(),!0)}function XWe(r){t4().ios&&(r.documentListenerAdded||(document.addEventListener("touchmove",r4(),lre({passive:!1})),r.documentListenerAdded=!0))}function KWe(r){r.documentListenerAdded&&(document.removeEventListener("touchmove",r4(),lre({passive:!1})),r.documentListenerAdded=!1)}const QWe=r=>({}),CG=r=>({});function xG(r){let e,t;return e=new po({props:{src:XH,class:"h-4 w-4 transition-transform "+(r[1]?"":"rotate-180")}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&2&&(a.class="h-4 w-4 transition-transform "+(n[1]?"":"rotate-180")),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function DG(r){let e,t,n;const i=r[4].default,a=Li(i,r,r[3],null);return{c(){e=ie("div"),a&&a.c()},l(o){e=ae(o,"DIV",{});var s=ge(e);a&&a.l(s),s.forEach(V)},m(o,s){se(o,e,s),a&&a.m(e,null),n=!0},p(o,s){a&&a.p&&(!n||s&8)&&Fi(a,i,o,o[3],n?Oi(i,o[3],s,null):Bi(o[3]),null)},i(o){n||(X(a,o),o&&Ad(()=>{n&&(t||(t=Fl(e,eS,{},!0)),t.run(1))}),n=!0)},o(o){ee(a,o),o&&(t||(t=Fl(e,eS,{},!1)),t.run(0)),n=!1},d(o){o&&V(e),a&&a.d(o),o&&t&&t.end()}}}function JWe(r){let e,t,n,i,a,o,s,l,u;const c=r[4].header,f=Li(c,r,r[3],CG);let h=r[0]&&xG(r),d=(r[0]&&r[1]||!r[0])&&DG(r);return{c(){e=ie("div"),t=ie("section"),n=ie("button"),i=ie("header"),f&&f.c(),a=Ie(),h&&h.c(),o=Ie(),d&&d.c(),this.h()},l(p){e=ae(p,"DIV",{class:!0});var g=ge(e);t=ae(g,"SECTION",{class:!0});var v=ge(t);n=ae(v,"BUTTON",{class:!0});var m=ge(n);i=ae(m,"HEADER",{class:!0});var y=ge(i);f&&f.l(y),a=Le(y),h&&h.l(y),y.forEach(V),m.forEach(V),o=Le(v),d&&d.l(v),v.forEach(V),g.forEach(V),this.h()},h(){Y(i,"class","font-bold px-2 absolute -translate-y-1/2 top-0 left-4 bg-inherit flex gap-2 items-center"),Y(n,"class","contents bg-inherit"),zr(n,"cursor-default",!r[0]),Y(t,"class","flex flex-col border p-4 relative border-gray-500 bg-inherit w-full rounded cu"),Y(e,"class","h-fit bg-inherit")},m(p,g){se(p,e,g),Q(e,t),Q(t,n),Q(n,i),f&&f.m(i,null),Q(i,a),h&&h.m(i,null),Q(t,o),d&&d.m(t,null),s=!0,l||(u=gn(n,"click",r[5]),l=!0)},p(p,[g]){f&&f.p&&(!s||g&8)&&Fi(f,c,p,p[3],s?Oi(c,p[3],g,QWe):Bi(p[3]),CG),p[0]?h?(h.p(p,g),g&1&&X(h,1)):(h=xG(p),h.c(),X(h,1),h.m(i,null)):h&&(Tt(),ee(h,1,1,()=>{h=null}),kt()),(!s||g&1)&&zr(n,"cursor-default",!p[0]),p[0]&&p[1]||!p[0]?d?(d.p(p,g),g&3&&X(d,1)):(d=DG(p),d.c(),X(d,1),d.m(t,null)):d&&(Tt(),ee(d,1,1,()=>{d=null}),kt())},i(p){s||(X(f,p),X(h),X(d),s=!0)},o(p){ee(f,p),ee(h),ee(d),s=!1},d(p){p&&V(e),f&&f.d(p),h&&h.d(),d&&d.d(),l=!1,u()}}}function e$e(r,e,t){let{$$slots:n={},$$scope:i}=e,{togglable:a=!1}=e,{defaultOpen:o=!0}=e,s=o;const l=()=>t(1,s=!s);return r.$$set=u=>{"togglable"in u&&t(0,a=u.togglable),"defaultOpen"in u&&t(2,o=u.defaultOpen),"$$scope"in u&&t(3,i=u.$$scope)},[a,s,o,i,n,l]}class Ev extends Cr{constructor(e){super(),xr(this,e,e$e,JWe,Dr,{togglable:0,defaultOpen:2})}}function EG(r,e,t){const n=r.slice();return n[5]=e[t],n[7]=t,n}function TG(r){let e,t,n=r[7]+1+"",i,a,o,s,l=r[5]+"",u;return{c(){e=ie("div"),t=ie("span"),i=ht(n),a=Ie(),o=ie("pre"),s=new jg(!1),u=Ie(),this.h()},l(c){e=ae(c,"DIV",{class:!0});var f=ge(e);t=ae(f,"SPAN",{class:!0});var h=ge(t);i=dt(h,n),h.forEach(V),a=Le(f),o=ae(f,"PRE",{class:!0});var d=ge(o);s=qg(d,!1),d.forEach(V),u=Le(f),f.forEach(V),this.h()},h(){Y(t,"class","bg-gray-400 group-odd:bg-gray-500 group-hover:bg-gray-600 text-white pr-1.5 pl-1 select-none"),s.a=null,Y(o,"class","group-hover:bg-gray-300 bg-gray-100 group-odd:bg-gray-200 pl-2 whitespace-pre-wrap pr-4"),Y(e,"class","group contents")},m(c,f){se(c,e,f),Q(e,t),Q(t,i),Q(e,a),Q(e,o),s.m(l,o),Q(e,u)},p(c,f){f&1&&l!==(l=c[5]+"")&&s.p(l)},d(c){c&&V(e)}}}function t$e(r){let e,t,n=Er(r[0].split(` +`)),i=[];for(let a=0;a"",o;p0(async()=>{t(4,o=await lY()),t(3,a=o.highlight.bind(o))});let s=n?a(i,o==null?void 0:o.languages[n],n):i;return r.$$set=l=>{"lang"in l&&t(1,n=l.lang),"text"in l&&t(2,i=l.text)},r.$$.update=()=>{r.$$.dirty&30&&t(0,s=n?a(i,o==null?void 0:o.languages[n],n):i)},[s,n,i,a,o]}class $I extends Cr{constructor(e){super(),xr(this,e,r$e,t$e,Dr,{lang:1,text:2})}}function n$e(r){let e,t="[my-query].id";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-s8zzb5"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function i$e(r){let e,t="Identifier";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-i8zb8q"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function a$e(r){let e,t="[my-query].hash";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-umwgaq"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function o$e(r){let e,t="Input Text Hash";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1urstca"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function s$e(r){let e,t="[my-query].score";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1c7ih8g"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function l$e(r){let e,t="Execution Score";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-15qeshn"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold mr-2"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function u$e(r){let e;return{c(){e=ht(`Score is a rough estimate of the overall cost of running a Query, take it with a grain of + salt. Lower is better!`)},l(t){e=dt(t,`Score is a rough estimate of the overall cost of running a Query, take it with a grain of + salt. Lower is better!`)},m(t,n){se(t,e,n)},d(t){t&&V(e)}}}function c$e(r){let e,t="[my-query].length";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-iyrn7e"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function f$e(r){let e,t="Length";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-vllvmp"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function h$e(r){let e,t="[my-query].ready";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-uxqyh"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function d$e(r){let e,t="Ready";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1d0in98"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function p$e(r){let e,t="[my-query].opts.noResolve";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-bdf7yt"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function g$e(r){let e,t="Waiting for Input";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1kfnohx"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function v$e(r){let e,t="[my-query].error?.message";return{c(){e=ie("p"),e.textContent=t,this.h()},l(n){e=ae(n,"P",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-53hk42"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function m$e(r){let e,t="Error";return{c(){e=ie("p"),e.textContent=t,this.h()},l(n){e=ae(n,"P",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-kw73ff"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function y$e(r){let e,t="No Error";return{c(){e=ie("span"),e.textContent=t},l(n){e=ae(n,"SPAN",{"data-svelte-h":!0}),Et(e)!=="svelte-1xdh2tj"&&(e.textContent=t)},m(n,i){se(n,e,i)},p:Oe,i:Oe,o:Oe,d(n){n&&V(e)}}}function b$e(r){let e,t;return e=new $I({props:{text:r[0].error.message}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&1&&(a.text=n[0].error.message),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function _$e(r){let e,t,n,i,a=r[0].id+"",o,s,l,u,c,f,h,d=r[0].hash+"",p,g,v,m,y,b,_,w,S,A,C=r[0].score.toLocaleString()+"",x,D,E,T,k,M=r[0].length+"",L,F,U,N,$,H,P,te=r[0].ready+"",J,fe,Ce,ke,Se,be,W,q=r[0].opts.noResolve+"",j,ve,K,xe,ne,we,ue,Be,$e;t=new ui({props:{maxWidth:"md",$$slots:{handle:[i$e],default:[n$e]},$$scope:{ctx:r}}}),c=new ui({props:{maxWidth:"md",$$slots:{handle:[o$e],default:[a$e]},$$scope:{ctx:r}}}),b=new ui({props:{maxWidth:"md",direction:"left",$$slots:{handle:[l$e],default:[s$e]},$$scope:{ctx:r}}}),w=new ui({props:{direction:"left",$$slots:{default:[u$e]},$$scope:{ctx:r}}}),E=new ui({props:{maxWidth:"md",$$slots:{handle:[f$e],default:[c$e]},$$scope:{ctx:r}}}),$=new ui({props:{maxWidth:"md",$$slots:{handle:[d$e],default:[h$e]},$$scope:{ctx:r}}}),Se=new ui({props:{maxWidth:"md",direction:"left",$$slots:{handle:[g$e],default:[p$e]},$$scope:{ctx:r}}}),xe=new ui({props:{maxWidth:"md",direction:"right",$$slots:{handle:[m$e],default:[v$e]},$$scope:{ctx:r}}});const at=[b$e,y$e],Gt=[];function Yt(je,Me){return je[0].error?0:1}return we=Yt(r),ue=Gt[we]=at[we](r),{c(){e=ie("div"),Ve(t.$$.fragment),n=Ie(),i=ie("span"),o=ht(a),s=Ie(),l=ie("span"),u=Ie(),Ve(c.$$.fragment),f=Ie(),h=ie("span"),p=ht(d),g=Ie(),v=ie("span"),m=Ie(),y=ie("span"),Ve(b.$$.fragment),_=Ie(),Ve(w.$$.fragment),S=Ie(),A=ie("span"),x=ht(C),D=Ie(),Ve(E.$$.fragment),T=Ie(),k=ie("span"),L=ht(M),F=Ie(),U=ie("span"),N=Ie(),Ve($.$$.fragment),H=Ie(),P=ie("span"),J=ht(te),fe=Ie(),Ce=ie("span"),ke=Ie(),Ve(Se.$$.fragment),be=Ie(),W=ie("span"),j=ht(q),ve=Ie(),K=ie("div"),Ve(xe.$$.fragment),ne=Ie(),ue.c(),this.h()},l(je){e=ae(je,"DIV",{class:!0});var Me=ge(e);Ge(t.$$.fragment,Me),n=Le(Me),i=ae(Me,"SPAN",{});var yt=ge(i);o=dt(yt,a),yt.forEach(V),s=Le(Me),l=ae(Me,"SPAN",{}),ge(l).forEach(V),u=Le(Me),Ge(c.$$.fragment,Me),f=Le(Me),h=ae(Me,"SPAN",{});var gt=ge(h);p=dt(gt,d),gt.forEach(V),g=Le(Me),v=ae(Me,"SPAN",{}),ge(v).forEach(V),m=Le(Me),y=ae(Me,"SPAN",{class:!0});var Nr=ge(y);Ge(b.$$.fragment,Nr),_=Le(Nr),Ge(w.$$.fragment,Nr),Nr.forEach(V),S=Le(Me),A=ae(Me,"SPAN",{});var Ht=ge(A);x=dt(Ht,C),Ht.forEach(V),D=Le(Me),Ge(E.$$.fragment,Me),T=Le(Me),k=ae(Me,"SPAN",{});var xt=ge(k);L=dt(xt,M),xt.forEach(V),F=Le(Me),U=ae(Me,"SPAN",{}),ge(U).forEach(V),N=Le(Me),Ge($.$$.fragment,Me),H=Le(Me),P=ae(Me,"SPAN",{});var Ne=ge(P);J=dt(Ne,te),Ne.forEach(V),fe=Le(Me),Ce=ae(Me,"SPAN",{}),ge(Ce).forEach(V),ke=Le(Me),Ge(Se.$$.fragment,Me),be=Le(Me),W=ae(Me,"SPAN",{});var le=ge(W);j=dt(le,q),le.forEach(V),ve=Le(Me),K=ae(Me,"DIV",{class:!0});var pe=ge(K);Ge(xe.$$.fragment,pe),ne=Le(pe),ue.l(pe),pe.forEach(V),Me.forEach(V),this.h()},h(){Y(y,"class","font-bold"),Y(K,"class",Be="col-span-8 "+(r[0].error?"flex flex-col gap-2":"contents")),Y(e,"class","grid grid-cols-[auto,auto,1fr,auto,auto,1fr,auto,auto] items-center gap-x-2 gap-y-4 w-fit")},m(je,Me){se(je,e,Me),Ue(t,e,null),Q(e,n),Q(e,i),Q(i,o),Q(e,s),Q(e,l),Q(e,u),Ue(c,e,null),Q(e,f),Q(e,h),Q(h,p),Q(e,g),Q(e,v),Q(e,m),Q(e,y),Ue(b,y,null),Q(y,_),Ue(w,y,null),Q(e,S),Q(e,A),Q(A,x),Q(e,D),Ue(E,e,null),Q(e,T),Q(e,k),Q(k,L),Q(e,F),Q(e,U),Q(e,N),Ue($,e,null),Q(e,H),Q(e,P),Q(P,J),Q(e,fe),Q(e,Ce),Q(e,ke),Ue(Se,e,null),Q(e,be),Q(e,W),Q(W,j),Q(e,ve),Q(e,K),Ue(xe,K,null),Q(K,ne),Gt[we].m(K,null),$e=!0},p(je,Me){const yt={};Me&2&&(yt.$$scope={dirty:Me,ctx:je}),t.$set(yt),(!$e||Me&1)&&a!==(a=je[0].id+"")&&Bt(o,a);const gt={};Me&2&&(gt.$$scope={dirty:Me,ctx:je}),c.$set(gt),(!$e||Me&1)&&d!==(d=je[0].hash+"")&&Bt(p,d);const Nr={};Me&2&&(Nr.$$scope={dirty:Me,ctx:je}),b.$set(Nr);const Ht={};Me&2&&(Ht.$$scope={dirty:Me,ctx:je}),w.$set(Ht),(!$e||Me&1)&&C!==(C=je[0].score.toLocaleString()+"")&&Bt(x,C);const xt={};Me&2&&(xt.$$scope={dirty:Me,ctx:je}),E.$set(xt),(!$e||Me&1)&&M!==(M=je[0].length+"")&&Bt(L,M);const Ne={};Me&2&&(Ne.$$scope={dirty:Me,ctx:je}),$.$set(Ne),(!$e||Me&1)&&te!==(te=je[0].ready+"")&&Bt(J,te);const le={};Me&2&&(le.$$scope={dirty:Me,ctx:je}),Se.$set(le),(!$e||Me&1)&&q!==(q=je[0].opts.noResolve+"")&&Bt(j,q);const pe={};Me&2&&(pe.$$scope={dirty:Me,ctx:je}),xe.$set(pe);let ft=we;we=Yt(je),we===ft?Gt[we].p(je,Me):(Tt(),ee(Gt[ft],1,1,()=>{Gt[ft]=null}),kt(),ue=Gt[we],ue?ue.p(je,Me):(ue=Gt[we]=at[we](je),ue.c()),X(ue,1),ue.m(K,null)),(!$e||Me&1&&Be!==(Be="col-span-8 "+(je[0].error?"flex flex-col gap-2":"contents")))&&Y(K,"class",Be)},i(je){$e||(X(t.$$.fragment,je),X(c.$$.fragment,je),X(b.$$.fragment,je),X(w.$$.fragment,je),X(E.$$.fragment,je),X($.$$.fragment,je),X(Se.$$.fragment,je),X(xe.$$.fragment,je),X(ue),$e=!0)},o(je){ee(t.$$.fragment,je),ee(c.$$.fragment,je),ee(b.$$.fragment,je),ee(w.$$.fragment,je),ee(E.$$.fragment,je),ee($.$$.fragment,je),ee(Se.$$.fragment,je),ee(xe.$$.fragment,je),ee(ue),$e=!1},d(je){je&&V(e),He(t),He(c),He(b),He(w),He(E),He($),He(Se),He(xe),Gt[we].d()}}}function w$e(r){let e,t="Metadata";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-11krzs3"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function S$e(r){let e,t;return e=new Ev({props:{$$slots:{header:[w$e],default:[_$e]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,[i]){const a={};i&3&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function A$e(r,e,t){let{query:n}=e;return r.$$set=i=>{"query"in i&&t(0,n=i.query)},[n]}class C$e extends Cr{constructor(e){super(),xr(this,e,A$e,S$e,Dr,{query:0})}}function x$e(r){let e,t="[my-query].dataLoading";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-184x792"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function D$e(r){let e,t="Data Loading";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-gdo8md"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function E$e(r){let e,t="[my-query].dataLoaded";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1vkgo5p"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function T$e(r){let e,t="Data Loaded";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1as0p1i"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function k$e(r){let e,t="[my-query].dataQueryTime";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1eowj43"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function M$e(r){let e,t="Data Query Time";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-149ejke"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function I$e(r){let e,t="[my-query].lengthLoading";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1820kb6"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function L$e(r){let e,t="Length Loading";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1mb454x"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function F$e(r){let e,t="[my-query].lengthLoaded";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1yn43p9"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function B$e(r){let e,t="Length Loaded";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-8nyrra"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function O$e(r){let e,t="[my-query].lengthQueryTime";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-hdlej"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function P$e(r){let e,t="Length Query Time";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-yp3o72"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function R$e(r){let e,t="[my-query].columnsLoading";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1hnv6sd"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function N$e(r){let e,t="Columns Loading";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-hoefmu"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function z$e(r){let e,t="[my-query].columnsLoaded";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-u2s16g"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function V$e(r){let e,t="Columns Loaded";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1czt7n1"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function G$e(r){let e,t="[my-query].columnsQueryTime";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-foqbdm"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function U$e(r){let e,t="Columns Query Time";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1lzmvxh"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function H$e(r){let e,t,n,i,a=r[0].dataLoading+"",o,s,l,u,c,f,h,d=r[0].dataLoaded+"",p,g,v,m,y,b,_,w=Math.round(r[0].dataQueryTime*10)/10+"",S,A,C,x,D,E,T=r[0].lengthLoading+"",k,M,L,F,U,N,$,H=r[0].lengthLoaded+"",P,te,J,fe,Ce,ke,Se,be=Math.round(r[0].lengthQueryTime*10)/10+"",W,q,j,ve,K,xe,ne=r[0].columnsLoading+"",we,ue,Be,$e,at,Gt,Yt,je=r[0].columnsLoaded+"",Me,yt,gt,Nr,Ht,xt,Ne,le=Math.round(r[0].columnsQueryTime*10)/10+"",pe,ft,_e;return t=new ui({props:{maxWidth:"md",$$slots:{handle:[D$e],default:[x$e]},$$scope:{ctx:r}}}),c=new ui({props:{maxWidth:"md",$$slots:{handle:[T$e],default:[E$e]},$$scope:{ctx:r}}}),y=new ui({props:{maxWidth:"md",$$slots:{handle:[M$e],default:[k$e]},$$scope:{ctx:r}}}),x=new ui({props:{maxWidth:"md",$$slots:{handle:[L$e],default:[I$e]},$$scope:{ctx:r}}}),U=new ui({props:{maxWidth:"md",$$slots:{handle:[B$e],default:[F$e]},$$scope:{ctx:r}}}),Ce=new ui({props:{maxWidth:"md",$$slots:{handle:[P$e],default:[O$e]},$$scope:{ctx:r}}}),ve=new ui({props:{maxWidth:"md",$$slots:{handle:[N$e],default:[R$e]},$$scope:{ctx:r}}}),at=new ui({props:{maxWidth:"md",$$slots:{handle:[V$e],default:[z$e]},$$scope:{ctx:r}}}),Ht=new ui({props:{maxWidth:"md",$$slots:{handle:[U$e],default:[G$e]},$$scope:{ctx:r}}}),{c(){e=ie("div"),Ve(t.$$.fragment),n=Ie(),i=ie("span"),o=ht(a),s=Ie(),l=ie("span"),u=Ie(),Ve(c.$$.fragment),f=Ie(),h=ie("span"),p=ht(d),g=Ie(),v=ie("span"),m=Ie(),Ve(y.$$.fragment),b=Ie(),_=ie("span"),S=ht(w),A=ht(" ms"),C=Ie(),Ve(x.$$.fragment),D=Ie(),E=ie("span"),k=ht(T),M=Ie(),L=ie("span"),F=Ie(),Ve(U.$$.fragment),N=Ie(),$=ie("span"),P=ht(H),te=Ie(),J=ie("span"),fe=Ie(),Ve(Ce.$$.fragment),ke=Ie(),Se=ie("span"),W=ht(be),q=ht(" ms"),j=Ie(),Ve(ve.$$.fragment),K=Ie(),xe=ie("span"),we=ht(ne),ue=Ie(),Be=ie("span"),$e=Ie(),Ve(at.$$.fragment),Gt=Ie(),Yt=ie("span"),Me=ht(je),yt=Ie(),gt=ie("span"),Nr=Ie(),Ve(Ht.$$.fragment),xt=Ie(),Ne=ie("span"),pe=ht(le),ft=ht(" ms"),this.h()},l(me){e=ae(me,"DIV",{class:!0});var Te=ge(e);Ge(t.$$.fragment,Te),n=Le(Te),i=ae(Te,"SPAN",{});var Pt=ge(i);o=dt(Pt,a),Pt.forEach(V),s=Le(Te),l=ae(Te,"SPAN",{}),ge(l).forEach(V),u=Le(Te),Ge(c.$$.fragment,Te),f=Le(Te),h=ae(Te,"SPAN",{});var ur=ge(h);p=dt(ur,d),ur.forEach(V),g=Le(Te),v=ae(Te,"SPAN",{}),ge(v).forEach(V),m=Le(Te),Ge(y.$$.fragment,Te),b=Le(Te),_=ae(Te,"SPAN",{});var Vr=ge(_);S=dt(Vr,w),A=dt(Vr," ms"),Vr.forEach(V),C=Le(Te),Ge(x.$$.fragment,Te),D=Le(Te),E=ae(Te,"SPAN",{});var Kt=ge(E);k=dt(Kt,T),Kt.forEach(V),M=Le(Te),L=ae(Te,"SPAN",{}),ge(L).forEach(V),F=Le(Te),Ge(U.$$.fragment,Te),N=Le(Te),$=ae(Te,"SPAN",{});var qi=ge($);P=dt(qi,H),qi.forEach(V),te=Le(Te),J=ae(Te,"SPAN",{}),ge(J).forEach(V),fe=Le(Te),Ge(Ce.$$.fragment,Te),ke=Le(Te),Se=ae(Te,"SPAN",{});var Ba=ge(Se);W=dt(Ba,be),q=dt(Ba," ms"),Ba.forEach(V),j=Le(Te),Ge(ve.$$.fragment,Te),K=Le(Te),xe=ae(Te,"SPAN",{});var ca=ge(xe);we=dt(ca,ne),ca.forEach(V),ue=Le(Te),Be=ae(Te,"SPAN",{}),ge(Be).forEach(V),$e=Le(Te),Ge(at.$$.fragment,Te),Gt=Le(Te),Yt=ae(Te,"SPAN",{});var I=ge(Yt);Me=dt(I,je),I.forEach(V),yt=Le(Te),gt=ae(Te,"SPAN",{}),ge(gt).forEach(V),Nr=Le(Te),Ge(Ht.$$.fragment,Te),xt=Le(Te),Ne=ae(Te,"SPAN",{});var z=ge(Ne);pe=dt(z,le),ft=dt(z," ms"),z.forEach(V),Te.forEach(V),this.h()},h(){Y(e,"class","grid grid-cols-[auto,auto,1fr,auto,auto,1fr,auto,auto] items-center gap-x-2 gap-y-4 w-fit")},m(me,Te){se(me,e,Te),Ue(t,e,null),Q(e,n),Q(e,i),Q(i,o),Q(e,s),Q(e,l),Q(e,u),Ue(c,e,null),Q(e,f),Q(e,h),Q(h,p),Q(e,g),Q(e,v),Q(e,m),Ue(y,e,null),Q(e,b),Q(e,_),Q(_,S),Q(_,A),Q(e,C),Ue(x,e,null),Q(e,D),Q(e,E),Q(E,k),Q(e,M),Q(e,L),Q(e,F),Ue(U,e,null),Q(e,N),Q(e,$),Q($,P),Q(e,te),Q(e,J),Q(e,fe),Ue(Ce,e,null),Q(e,ke),Q(e,Se),Q(Se,W),Q(Se,q),Q(e,j),Ue(ve,e,null),Q(e,K),Q(e,xe),Q(xe,we),Q(e,ue),Q(e,Be),Q(e,$e),Ue(at,e,null),Q(e,Gt),Q(e,Yt),Q(Yt,Me),Q(e,yt),Q(e,gt),Q(e,Nr),Ue(Ht,e,null),Q(e,xt),Q(e,Ne),Q(Ne,pe),Q(Ne,ft),_e=!0},p(me,Te){const Pt={};Te&2&&(Pt.$$scope={dirty:Te,ctx:me}),t.$set(Pt),(!_e||Te&1)&&a!==(a=me[0].dataLoading+"")&&Bt(o,a);const ur={};Te&2&&(ur.$$scope={dirty:Te,ctx:me}),c.$set(ur),(!_e||Te&1)&&d!==(d=me[0].dataLoaded+"")&&Bt(p,d);const Vr={};Te&2&&(Vr.$$scope={dirty:Te,ctx:me}),y.$set(Vr),(!_e||Te&1)&&w!==(w=Math.round(me[0].dataQueryTime*10)/10+"")&&Bt(S,w);const Kt={};Te&2&&(Kt.$$scope={dirty:Te,ctx:me}),x.$set(Kt),(!_e||Te&1)&&T!==(T=me[0].lengthLoading+"")&&Bt(k,T);const qi={};Te&2&&(qi.$$scope={dirty:Te,ctx:me}),U.$set(qi),(!_e||Te&1)&&H!==(H=me[0].lengthLoaded+"")&&Bt(P,H);const Ba={};Te&2&&(Ba.$$scope={dirty:Te,ctx:me}),Ce.$set(Ba),(!_e||Te&1)&&be!==(be=Math.round(me[0].lengthQueryTime*10)/10+"")&&Bt(W,be);const ca={};Te&2&&(ca.$$scope={dirty:Te,ctx:me}),ve.$set(ca),(!_e||Te&1)&&ne!==(ne=me[0].columnsLoading+"")&&Bt(we,ne);const I={};Te&2&&(I.$$scope={dirty:Te,ctx:me}),at.$set(I),(!_e||Te&1)&&je!==(je=me[0].columnsLoaded+"")&&Bt(Me,je);const z={};Te&2&&(z.$$scope={dirty:Te,ctx:me}),Ht.$set(z),(!_e||Te&1)&&le!==(le=Math.round(me[0].columnsQueryTime*10)/10+"")&&Bt(pe,le)},i(me){_e||(X(t.$$.fragment,me),X(c.$$.fragment,me),X(y.$$.fragment,me),X(x.$$.fragment,me),X(U.$$.fragment,me),X(Ce.$$.fragment,me),X(ve.$$.fragment,me),X(at.$$.fragment,me),X(Ht.$$.fragment,me),_e=!0)},o(me){ee(t.$$.fragment,me),ee(c.$$.fragment,me),ee(y.$$.fragment,me),ee(x.$$.fragment,me),ee(U.$$.fragment,me),ee(Ce.$$.fragment,me),ee(ve.$$.fragment,me),ee(at.$$.fragment,me),ee(Ht.$$.fragment,me),_e=!1},d(me){me&&V(e),He(t),He(c),He(y),He(x),He(U),He(Ce),He(ve),He(at),He(Ht)}}}function W$e(r){let e,t="State Overview";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-lamrq2"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function $$e(r){let e,t;return e=new Ev({props:{$$slots:{header:[W$e],default:[H$e]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,[i]){const a={};i&3&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function j$e(r,e,t){let{query:n}=e;return r.$$set=i=>{"query"in i&&t(0,n=i.query)},[n]}class q$e extends Cr{constructor(e){super(),xr(this,e,j$e,$$e,Dr,{query:0})}}function Y$e(r){let e,t="Fetch Data",n,i;return{c(){e=ie("button"),e.textContent=t,this.h()},l(a){e=ae(a,"BUTTON",{class:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1ammduk"&&(e.textContent=t),this.h()},h(){Y(e,"class","px-2 py-1 rounded bg-gray-200 hover:bg-gray-300 actvie:bg-gray-100 transition")},m(a,o){se(a,e,o),n||(i=gn(e,"click",r[1]),n=!0)},p:Oe,i:Oe,o:Oe,d(a){a&&V(e),n=!1,i()}}}function Z$e(r){let e,t;return e=new oUe({props:{data:r[0],rowNumbers:!0,sortable:!1,downloadable:!1,isFullPage:!0}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,i){const a={};i&1&&(a.data=n[0]),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function X$e(r){let e,t,n,i;const a=[Z$e,Y$e],o=[];function s(l,u){return l[0].dataLoaded?0:1}return t=s(r),n=o[t]=a[t](r),{c(){e=ie("div"),n.c(),this.h()},l(l){e=ae(l,"DIV",{class:!0});var u=ge(e);n.l(u),u.forEach(V),this.h()},h(){Y(e,"class","w-full overflow-x-auto")},m(l,u){se(l,e,u),o[t].m(e,null),i=!0},p(l,u){let c=t;t=s(l),t===c?o[t].p(l,u):(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt(),n=o[t],n?n.p(l,u):(n=o[t]=a[t](l),n.c()),X(n,1),n.m(e,null))},i(l){i||(X(n),i=!0)},o(l){ee(n),i=!1},d(l){l&&V(e),o[t].d()}}}function K$e(r){let e,t="Data Preview";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1le2fsq"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function Q$e(r){let e,t;return e=new Ev({props:{togglable:!0,defaultOpen:!1,$$slots:{header:[K$e],default:[X$e]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,[i]){const a={};i&5&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function J$e(r,e,t){let{query:n}=e;const i=()=>n.fetch();return r.$$set=a=>{"query"in a&&t(0,n=a.query)},[n,i]}class eje extends Cr{constructor(e){super(),xr(this,e,J$e,Q$e,Dr,{query:0})}}function tje(r){let e,t='[my-query].originalText';return{c(){e=ie("span"),e.innerHTML=t},l(n){e=ae(n,"SPAN",{"data-svelte-h":!0}),Et(e)!=="svelte-jl0ems"&&(e.innerHTML=t)},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function rje(r){let e,t="Original";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-fjjgpy"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function nje(r){let e,t='[my-query].text';return{c(){e=ie("span"),e.innerHTML=t},l(n){e=ae(n,"SPAN",{"data-svelte-h":!0}),Et(e)!=="svelte-lcxq67"&&(e.innerHTML=t)},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function ije(r){let e,t="Executed";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1nwtyas"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function aje(r){let e,t,n,i,a="This is the query that was input by the user",o,s,l,u,c,f,h="This is the query that was executed after Query did transformations",d,p,g;return t=new ui({props:{$$slots:{handle:[rje],default:[tje]},$$scope:{ctx:r}}}),s=new $I({props:{text:r[0].originalText,lang:"sql"}}),u=new ui({props:{$$slots:{handle:[ije],default:[nje]},$$scope:{ctx:r}}}),p=new $I({props:{text:r[0].text,lang:"sql"}}),{c(){e=ie("div"),Ve(t.$$.fragment),n=Ie(),i=ie("p"),i.textContent=a,o=Ie(),Ve(s.$$.fragment),l=Ie(),Ve(u.$$.fragment),c=Ie(),f=ie("p"),f.textContent=h,d=Ie(),Ve(p.$$.fragment),this.h()},l(v){e=ae(v,"DIV",{class:!0});var m=ge(e);Ge(t.$$.fragment,m),n=Le(m),i=ae(m,"P",{class:!0,"data-svelte-h":!0}),Et(i)!=="svelte-13xmom7"&&(i.textContent=a),o=Le(m),Ge(s.$$.fragment,m),l=Le(m),Ge(u.$$.fragment,m),c=Le(m),f=ae(m,"P",{class:!0,"data-svelte-h":!0}),Et(f)!=="svelte-h5plex"&&(f.textContent=h),d=Le(m),Ge(p.$$.fragment,m),m.forEach(V),this.h()},h(){Y(i,"class","italic text-sm"),Y(f,"class","italic text-sm"),Y(e,"class","w-full")},m(v,m){se(v,e,m),Ue(t,e,null),Q(e,n),Q(e,i),Q(e,o),Ue(s,e,null),Q(e,l),Ue(u,e,null),Q(e,c),Q(e,f),Q(e,d),Ue(p,e,null),g=!0},p(v,m){const y={};m&2&&(y.$$scope={dirty:m,ctx:v}),t.$set(y);const b={};m&1&&(b.text=v[0].originalText),s.$set(b);const _={};m&2&&(_.$$scope={dirty:m,ctx:v}),u.$set(_);const w={};m&1&&(w.text=v[0].text),p.$set(w)},i(v){g||(X(t.$$.fragment,v),X(s.$$.fragment,v),X(u.$$.fragment,v),X(p.$$.fragment,v),g=!0)},o(v){ee(t.$$.fragment,v),ee(s.$$.fragment,v),ee(u.$$.fragment,v),ee(p.$$.fragment,v),g=!1},d(v){v&&V(e),He(t),He(s),He(u),He(p)}}}function oje(r){let e,t="Query Text";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1lb6bl9"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function sje(r){let e,t;return e=new Ev({props:{$$slots:{header:[oje],default:[aje]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,[i]){const a={};i&3&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function lje(r,e,t){let{query:n}=e;return r.$$set=i=>{"query"in i&&t(0,n=i.query)},[n]}class uje extends Cr{constructor(e){super(),xr(this,e,lje,sje,Dr,{query:0})}}function cje(r){let e,t,n,i,a;const o=r[2].default,s=Li(o,r,r[1],null);return{c(){e=ie("div"),s&&s.c(),this.h()},l(l){e=ae(l,"DIV",{});var u=ge(e);s&&s.l(u),u.forEach(V),this.h()},h(){e.hidden=!0},m(l,u){se(l,e,u),s&&s.m(e,null),n=!0,i||(a=FG(t=fje.call(null,e,{target:r[0]})),i=!0)},p(l,[u]){s&&s.p&&(!n||u&2)&&Fi(s,o,l,l[1],n?Oi(o,l[1],u,null):Bi(l[1]),null),t&&J2(t.update)&&u&1&&t.update.call(null,{target:l[0]})},i(l){n||(X(s,l),n=!0)},o(l){ee(s,l),n=!1},d(l){l&&V(e),s&&s.d(l),i=!1,a()}}}function fje(r,{target:e="body",prepend:t=!1}){let n;const i=document.createElement("div");i.style.display="none",i.style.position="absolute",r.parentElement.insertBefore(i,r);const a=async s=>{const{target:l}=s??{target:null};if(e=l,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await PG(),n=document.querySelector(e)),n===null)throw new Error(`No element found matching css selector: "${e}"`)}else if(e instanceof HTMLElement)n=e;else if(e===null){i.parentElement.insertBefore(r,i),r.hidden=!1;return}else throw new TypeError(`Unknown portal target type: ${e===null?"null":typeof e}. Allowed types: string (CSS selector) or HTMLElement.`);t?n.prepend(r):n.appendChild(r),r.hidden=!1};function o(){r.parentNode&&r.parentNode.removeChild(r)}return a({target:e}),{update:a,destroy:o}}function hje(r,e,t){let{$$slots:n={},$$scope:i}=e,{target:a="body"}=e;return r.$$set=o=>{"target"in o&&t(0,a=o.target),"$$scope"in o&&t(1,i=o.$$scope)},[a,i,n]}class dje extends Cr{constructor(e){super(),xr(this,e,hje,cje,Dr,{target:0})}}function pje(r){let e;return{c(){e=ht("Columns not available")},l(t){e=dt(t,"Columns not available")},m(t,n){se(t,e,n)},p:Oe,i:Oe,o:Oe,d(t){t&&V(e)}}}function gje(r){let e,t,n;return t=new z0e({props:{class:"contents",rowClass:"bg-inherit hover:bg-inherit",columns:r[0].columns,query:r[0]}}),{c(){e=ie("div"),Ve(t.$$.fragment),this.h()},l(i){e=ae(i,"DIV",{class:!0});var a=ge(e);Ge(t.$$.fragment,a),a.forEach(V),this.h()},h(){Y(e,"class","w-fit grid grid-cols-2 gap-2")},m(i,a){se(i,e,a),Ue(t,e,null),n=!0},p(i,a){const o={};a&1&&(o.columns=i[0].columns),a&1&&(o.query=i[0]),t.$set(o)},i(i){n||(X(t.$$.fragment,i),n=!0)},o(i){ee(t.$$.fragment,i),n=!1},d(i){i&&V(e),He(t)}}}function vje(r){let e,t,n,i;const a=[gje,pje],o=[];function s(l,u){var c;return(c=l[0].columns)!=null&&c.length?0:1}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),se(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?o[e].p(l,u):(Tt(),ee(o[c],1,1,()=>{o[c]=null}),kt(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),X(t,1),t.m(n.parentNode,n))},i(l){i||(X(t),i=!0)},o(l){ee(t),i=!1},d(l){l&&V(n),o[e].d(l)}}}function mje(r){let e,t="Columns";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-118fp8f"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function yje(r){let e,t;return e=new Ev({props:{togglable:!0,defaultOpen:!1,$$slots:{header:[mje],default:[vje]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,[i]){const a={};i&3&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function bje(r,e,t){let{query:n}=e;return r.$$set=i=>{"query"in i&&t(0,n=i.query)},[n]}class _je extends Cr{constructor(e){super(),xr(this,e,bje,yje,Dr,{query:0})}}function wje(r){let e,t,n,i="Options",a,o,s,l=JSON.stringify({...r[0].opts,initialData:void 0},null,2)+"",u,c,f,h,d="Trace",p,g,v,m=(r[0].createdStack??"Not Available")+"",y;return{c(){e=ie("div"),t=ie("div"),n=ie("span"),n.textContent=i,a=Ie(),o=ie("span"),s=ie("pre"),u=ht(l),c=Ie(),f=ie("div"),h=ie("span"),h.textContent=d,p=Ie(),g=ie("span"),v=ie("pre"),y=ht(m),this.h()},l(b){e=ae(b,"DIV",{class:!0});var _=ge(e);t=ae(_,"DIV",{class:!0});var w=ge(t);n=ae(w,"SPAN",{class:!0,"data-svelte-h":!0}),Et(n)!=="svelte-11p6zew"&&(n.textContent=i),a=Le(w),o=ae(w,"SPAN",{});var S=ge(o);s=ae(S,"PRE",{class:!0});var A=ge(s);u=dt(A,l),A.forEach(V),S.forEach(V),w.forEach(V),c=Le(_),f=ae(_,"DIV",{class:!0});var C=ge(f);h=ae(C,"SPAN",{class:!0,"data-svelte-h":!0}),Et(h)!=="svelte-1q2bxsl"&&(h.textContent=d),p=Le(C),g=ae(C,"SPAN",{class:!0});var x=ge(g);v=ae(x,"PRE",{class:!0});var D=ge(v);y=dt(D,m),D.forEach(V),x.forEach(V),C.forEach(V),_.forEach(V),this.h()},h(){Y(n,"class","font-bold"),Y(s,"class","text-xs font-mono pl-4"),Y(t,"class","flex flex-col gap-2 col-span-2"),Y(h,"class","font-bold"),Y(v,"class","text-xs font-mono pl-4"),Y(g,"class","max-w-full overflow-x-auto"),Y(f,"class","flex flex-col gap-2 max-w-full col-span-4"),Y(e,"class","grid grid-cols-3 gap-4 w-full")},m(b,_){se(b,e,_),Q(e,t),Q(t,n),Q(t,a),Q(t,o),Q(o,s),Q(s,u),Q(e,c),Q(e,f),Q(f,h),Q(f,p),Q(f,g),Q(g,v),Q(v,y)},p(b,_){_&1&&l!==(l=JSON.stringify({...b[0].opts,initialData:void 0},null,2)+"")&&Bt(u,l),_&1&&m!==(m=(b[0].createdStack??"Not Available")+"")&&Bt(y,m)},d(b){b&&V(e)}}}function Sje(r){let e,t="Verbose Info";return{c(){e=ie("span"),e.textContent=t,this.h()},l(n){e=ae(n,"SPAN",{slot:!0,"data-svelte-h":!0}),Et(e)!=="svelte-1k0akqs"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){se(n,e,i)},p:Oe,d(n){n&&V(e)}}}function Aje(r){let e,t;return e=new Ev({props:{togglable:!0,defaultOpen:!1,$$slots:{header:[Sje],default:[wje]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,[i]){const a={};i&3&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}function Cje(r,e,t){let{query:n}=e;return r.$$set=i=>{"query"in i&&t(0,n=i.query)},[n]}class xje extends Cr{constructor(e){super(),xr(this,e,Cje,Aje,Dr,{query:0})}}function kG(r){let e,t,n,i,a="Query Inspector",o,s,l,u=r[0].id+"",c,f,h,d,p=r[0].hash+"",g,v,m,y="Close",b,_,w,S,A,C,x,D,E,T,k,M,L,F,U,N,$,H;return S=new C$e({props:{query:r[0]}}),C=new q$e({props:{query:r[0]}}),D=new _je({props:{query:r[0]}}),T=new eje({props:{query:r[0]}}),M=new xje({props:{query:r[0]}}),U=new uje({props:{query:r[0]}}),{c(){e=ie("div"),t=ie("header"),n=ie("div"),i=ie("h2"),i.textContent=a,o=Ie(),s=ie("p"),l=ht("Query ID: "),c=ht(u),f=Ie(),h=ie("p"),d=ht("Query Hash: "),g=ht(p),v=Ie(),m=ie("button"),m.textContent=y,b=Ie(),_=ie("div"),w=ie("div"),Ve(S.$$.fragment),A=Ie(),Ve(C.$$.fragment),x=Ie(),Ve(D.$$.fragment),E=Ie(),Ve(T.$$.fragment),k=Ie(),Ve(M.$$.fragment),L=Ie(),F=ie("div"),Ve(U.$$.fragment),this.h()},l(P){e=ae(P,"DIV",{class:!0});var te=ge(e);t=ae(te,"HEADER",{class:!0});var J=ge(t);n=ae(J,"DIV",{class:!0});var fe=ge(n);i=ae(fe,"H2",{class:!0,"data-svelte-h":!0}),Et(i)!=="svelte-wn7ukb"&&(i.textContent=a),o=Le(fe),s=ae(fe,"P",{class:!0});var Ce=ge(s);l=dt(Ce,"Query ID: "),c=dt(Ce,u),Ce.forEach(V),f=Le(fe),h=ae(fe,"P",{class:!0});var ke=ge(h);d=dt(ke,"Query Hash: "),g=dt(ke,p),ke.forEach(V),fe.forEach(V),v=Le(J),m=ae(J,"BUTTON",{"data-svelte-h":!0}),Et(m)!=="svelte-1c2vztb"&&(m.textContent=y),J.forEach(V),b=Le(te),_=ae(te,"DIV",{class:!0});var Se=ge(_);w=ae(Se,"DIV",{class:!0});var be=ge(w);Ge(S.$$.fragment,be),A=Le(be),Ge(C.$$.fragment,be),x=Le(be),Ge(D.$$.fragment,be),E=Le(be),Ge(T.$$.fragment,be),k=Le(be),Ge(M.$$.fragment,be),be.forEach(V),L=Le(Se),F=ae(Se,"DIV",{class:!0});var W=ge(F);Ge(U.$$.fragment,W),W.forEach(V),Se.forEach(V),te.forEach(V),this.h()},h(){Y(i,"class","font-bold text-xl"),Y(s,"class","text-sm font-medium"),Y(h,"class","text-sm font-medium"),Y(n,"class","pt-4"),Y(t,"class","flex justify-between px-8"),Y(w,"class","col-span-6 bg-inherit flex flex-col gap-4 h-fit overflow-x-auto pt-4"),Y(F,"class","col-span-6 bg-inherit overflow-x-auto pt-4"),Y(_,"class","px-8 py-4 flex-col gap-8 bg-inherit grid grid-cols-12"),Y(e,"class","bg-gray-100 w-screen h-screen overflow-y-auto fixed top-12 left-0 select-text z-50")},m(P,te){se(P,e,te),Q(e,t),Q(t,n),Q(n,i),Q(n,o),Q(n,s),Q(s,l),Q(s,c),Q(n,f),Q(n,h),Q(h,d),Q(h,g),Q(t,v),Q(t,m),Q(e,b),Q(e,_),Q(_,w),Ue(S,w,null),Q(w,A),Ue(C,w,null),Q(w,x),Ue(D,w,null),Q(w,E),Ue(T,w,null),Q(w,k),Ue(M,w,null),Q(_,L),Q(_,F),Ue(U,F,null),N=!0,$||(H=gn(m,"click",r[2]),$=!0)},p(P,te){(!N||te&1)&&u!==(u=P[0].id+"")&&Bt(c,u),(!N||te&1)&&p!==(p=P[0].hash+"")&&Bt(g,p);const J={};te&1&&(J.query=P[0]),S.$set(J);const fe={};te&1&&(fe.query=P[0]),C.$set(fe);const Ce={};te&1&&(Ce.query=P[0]),D.$set(Ce);const ke={};te&1&&(ke.query=P[0]),T.$set(ke);const Se={};te&1&&(Se.query=P[0]),M.$set(Se);const be={};te&1&&(be.query=P[0]),U.$set(be)},i(P){N||(X(S.$$.fragment,P),X(C.$$.fragment,P),X(D.$$.fragment,P),X(T.$$.fragment,P),X(M.$$.fragment,P),X(U.$$.fragment,P),N=!0)},o(P){ee(S.$$.fragment,P),ee(C.$$.fragment,P),ee(D.$$.fragment,P),ee(T.$$.fragment,P),ee(M.$$.fragment,P),ee(U.$$.fragment,P),N=!1},d(P){P&&V(e),He(S),He(C),He(D),He(T),He(M),He(U),$=!1,H()}}}function Dje(r){let e,t,n=r[0]&&kG(r);return{c(){n&&n.c(),e=Xe()},l(i){n&&n.l(i),e=Xe()},m(i,a){n&&n.m(i,a),se(i,e,a),t=!0},p(i,a){i[0]?n?(n.p(i,a),a&1&&X(n,1)):(n=kG(i),n.c(),X(n,1),n.m(e.parentNode,e)):n&&(Tt(),ee(n,1,1,()=>{n=null}),kt())},i(i){t||(X(n),t=!0)},o(i){ee(n),t=!1},d(i){i&&V(e),n&&n.d(i)}}}function Eje(r){let e,t;return e=new dje({props:{target:document.body,$$slots:{default:[Dje]},$$scope:{ctx:r}}}),{c(){Ve(e.$$.fragment)},l(n){Ge(e.$$.fragment,n)},m(n,i){Ue(e,n,i),t=!0},p(n,[i]){const a={};i&9&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){ee(e.$$.fragment,n),t=!1},d(n){He(e,n)}}}const Tje=wd(new Map),AYe=bre(Tje);function kje(r,e,t){let{query:n}=e;p0(()=>(document.body.classList.add("overflow-hidden"),()=>document.body.classList.remove("overflow-hidden")));const i=RG();p0(()=>{const o=s=>{s.key==="Escape"&&(i("close"),s.stopPropagation())};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)});const a=()=>i("close");return r.$$set=o=>{"query"in o&&t(0,n=o.query)},r.$$.update=()=>{r.$$.dirty&1&&(window.currentQuery=n)},[n,i,a]}class CYe extends Cr{constructor(e){super(),xr(this,e,kje,Eje,Dr,{query:0})}}var cre={exports:{}};(function(r){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var t=function(n){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,o={},s={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function y(b){return b instanceof l?new l(b.type,y(b.content),b.alias):Array.isArray(b)?b.map(y):b.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(w){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(y){var b=document.getElementsByTagName("script");for(var _ in b)if(b[_].src==y)return b[_]}return null}},isActive:function(y,b,_){for(var w="no-"+b;y;){var S=y.classList;if(S.contains(b))return!0;if(S.contains(w))return!1;y=y.parentElement}return!!_}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(y,b){var _=s.util.clone(s.languages[y]);for(var w in b)_[w]=b[w];return _},insertBefore:function(y,b,_,w){w=w||s.languages;var S=w[y],A={};for(var C in S)if(S.hasOwnProperty(C)){if(C==b)for(var x in _)_.hasOwnProperty(x)&&(A[x]=_[x]);_.hasOwnProperty(C)||(A[C]=S[C])}var D=w[y];return w[y]=A,s.languages.DFS(s.languages,function(E,T){T===D&&E!=y&&(this[E]=A)}),A},DFS:function y(b,_,w,S){S=S||{};var A=s.util.objId;for(var C in b)if(b.hasOwnProperty(C)){_.call(b,C,b[C],w||C);var x=b[C],D=s.util.type(x);D==="Object"&&!S[A(x)]?(S[A(x)]=!0,y(x,_,null,S)):D==="Array"&&!S[A(x)]&&(S[A(x)]=!0,y(x,_,C,S))}}},plugins:{},highlightAll:function(y,b){s.highlightAllUnder(document,y,b)},highlightAllUnder:function(y,b,_){var w={callback:_,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),s.hooks.run("before-all-elements-highlight",w);for(var S=0,A;A=w.elements[S++];)s.highlightElement(A,b===!0,w.callback)},highlightElement:function(y,b,_){var w=s.util.getLanguage(y),S=s.languages[w];s.util.setLanguage(y,w);var A=y.parentElement;A&&A.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(A,w);var C=y.textContent,x={element:y,language:w,grammar:S,code:C};function D(T){x.highlightedCode=T,s.hooks.run("before-insert",x),x.element.innerHTML=x.highlightedCode,s.hooks.run("after-highlight",x),s.hooks.run("complete",x),_&&_.call(x.element)}if(s.hooks.run("before-sanity-check",x),A=x.element.parentElement,A&&A.nodeName.toLowerCase()==="pre"&&!A.hasAttribute("tabindex")&&A.setAttribute("tabindex","0"),!x.code){s.hooks.run("complete",x),_&&_.call(x.element);return}if(s.hooks.run("before-highlight",x),!x.grammar){D(s.util.encode(x.code));return}if(b&&n.Worker){var E=new Worker(s.filename);E.onmessage=function(T){D(T.data)},E.postMessage(JSON.stringify({language:x.language,code:x.code,immediateClose:!0}))}else D(s.highlight(x.code,x.grammar,x.language))},highlight:function(y,b,_){var w={code:y,grammar:b,language:_};if(s.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=s.tokenize(w.code,w.grammar),s.hooks.run("after-tokenize",w),l.stringify(s.util.encode(w.tokens),w.language)},tokenize:function(y,b){var _=b.rest;if(_){for(var w in _)b[w]=_[w];delete b.rest}var S=new f;return h(S,S.head,y),c(y,S,b,S.head,0),p(S)},hooks:{all:{},add:function(y,b){var _=s.hooks.all;_[y]=_[y]||[],_[y].push(b)},run:function(y,b){var _=s.hooks.all[y];if(!(!_||!_.length))for(var w=0,S;S=_[w++];)S(b)}},Token:l};n.Prism=s;function l(y,b,_,w){this.type=y,this.content=b,this.alias=_,this.length=(w||"").length|0}l.stringify=function y(b,_){if(typeof b=="string")return b;if(Array.isArray(b)){var w="";return b.forEach(function(D){w+=y(D,_)}),w}var S={type:b.type,content:y(b.content,_),tag:"span",classes:["token",b.type],attributes:{},language:_},A=b.alias;A&&(Array.isArray(A)?Array.prototype.push.apply(S.classes,A):S.classes.push(A)),s.hooks.run("wrap",S);var C="";for(var x in S.attributes)C+=" "+x+'="'+(S.attributes[x]||"").replace(/"/g,""")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+C+">"+S.content+""};function u(y,b,_,w){y.lastIndex=b;var S=y.exec(_);if(S&&w&&S[1]){var A=S[1].length;S.index+=A,S[0]=S[0].slice(A)}return S}function c(y,b,_,w,S,A){for(var C in _)if(!(!_.hasOwnProperty(C)||!_[C])){var x=_[C];x=Array.isArray(x)?x:[x];for(var D=0;D=A.reach);$+=N.value.length,N=N.next){var H=N.value;if(b.length>y.length)return;if(!(H instanceof l)){var P=1,te;if(M){if(te=u(U,$,y,k),!te||te.index>=y.length)break;var ke=te.index,J=te.index+te[0].length,fe=$;for(fe+=N.value.length;ke>=fe;)N=N.next,fe+=N.value.length;if(fe-=N.value.length,$=fe,N.value instanceof l)continue;for(var Ce=N;Ce!==b.tail&&(feA.reach&&(A.reach=q);var j=N.prev;be&&(j=h(b,j,be),$+=be.length),d(b,j,P);var ve=new l(C,T?s.tokenize(Se,T):Se,L,Se);if(N=h(b,j,ve),W&&h(b,N,W),P>1){var K={cause:C+","+D,reach:q};c(y,b,_,N.prev,$,K),A&&K.reach>A.reach&&(A.reach=K.reach)}}}}}}function f(){var y={value:null,prev:null,next:null},b={value:null,prev:y,next:null};y.next=b,this.head=y,this.tail=b,this.length=0}function h(y,b,_){var w=b.next,S={value:_,prev:b,next:w};return b.next=S,w.prev=S,y.length++,S}function d(y,b,_){for(var w=b.next,S=0;S<_&&w!==y.tail;S++)w=w.next;b.next=w,w.prev=b,y.length-=S}function p(y){for(var b=[],_=y.head.next;_!==y.tail;)b.push(_.value),_=_.next;return b}if(!n.document)return n.addEventListener&&(s.disableWorkerMessageHandler||n.addEventListener("message",function(y){var b=JSON.parse(y.data),_=b.language,w=b.code,S=b.immediateClose;n.postMessage(s.highlight(w,s.languages[_],_)),S&&n.close()},!1)),s;var g=s.util.currentScript();g&&(s.filename=g.src,g.hasAttribute("data-manual")&&(s.manual=!0));function v(){s.manual||s.highlightAll()}if(!s.manual){var m=document.readyState;m==="loading"||m==="interactive"&&g&&g.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return s}(e);r.exports&&(r.exports=t),typeof wu<"u"&&(wu.Prism=t),t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(i,a){var o={};o["language-"+a]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[a]},o.cdata=/^$/i;var s={"included-cdata":{pattern://i,inside:o}};s["language-"+a]={pattern:/[\s\S]+/,inside:t.languages[a]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:s},t.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(n,i){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\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:[i,"language-"+i],inside:t.languages[i]},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(n){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,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:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var a=n.languages.markup;a&&(a.tag.addInlined("style","css"),a.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",i=function(g,v){return"✖ Error "+g+" while fetching file: "+v},a="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},s="data-src-status",l="loading",u="loaded",c="failed",f="pre[data-src]:not(["+s+'="'+u+'"]):not(['+s+'="'+l+'"])';function h(g,v,m){var y=new XMLHttpRequest;y.open("GET",g,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?v(y.responseText):y.status>=400?m(i(y.status,y.statusText)):m(a))},y.send(null)}function d(g){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(v){var m=Number(v[1]),y=v[2],b=v[3];return y?b?[m,Number(b)]:[m,void 0]:[m,m]}}t.hooks.add("before-highlightall",function(g){g.selector+=", "+f}),t.hooks.add("before-sanity-check",function(g){var v=g.element;if(v.matches(f)){g.code="",v.setAttribute(s,l);var m=v.appendChild(document.createElement("CODE"));m.textContent=n;var y=v.getAttribute("data-src"),b=g.language;if(b==="none"){var _=(/\.(\w+)$/.exec(y)||[,"none"])[1];b=o[_]||_}t.util.setLanguage(m,b),t.util.setLanguage(v,b);var w=t.plugins.autoloader;w&&w.loadLanguages(b),h(y,function(S){v.setAttribute(s,u);var A=d(v.getAttribute("data-range"));if(A){var C=S.split(/\r\n?|\n/g),x=A[0],D=A[1]==null?C.length:A[1];x<0&&(x+=C.length),x=Math.max(0,Math.min(x-1,C.length)),D<0&&(D+=C.length),D=Math.max(0,Math.min(D,C.length)),S=C.slice(x,D).join(` +`),v.hasAttribute("data-start")||v.setAttribute("data-start",String(x+1))}m.textContent=S,t.highlightElement(m)},function(S){v.setAttribute(s,c),m.textContent=S})}}),t.plugins.fileHighlight={highlight:function(v){for(var m=(v||document).querySelectorAll(f),y=0,b;b=m[y++];)t.highlightElement(b)}};var p=!1;t.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(cre);var Mje=cre.exports;const Ije=Kg(Mje),Lje=Object.freeze(Object.defineProperty({__proto__:null,default:Ije},Symbol.toStringTag,{value:"Module"}));function jI(r,e,t){var n,i,a,o,s;e==null&&(e=100);function l(){var c=Date.now()-o;c=0?n=setTimeout(l,e-c):(n=null,t||(s=r.apply(a,i),a=i=null))}var u=function(){a=this,i=arguments,o=Date.now();var c=t&&!n;return n||(n=setTimeout(l,e)),c&&(s=r.apply(a,i),a=i=null),s};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(s=r.apply(a,i),a=i=null,clearTimeout(n),n=null)},u}jI.debounce=jI;var Fje=jI;const xYe=Kg(Fje);var fre={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(wu,function(){return function t(n,i,a){var o=window,s="application/octet-stream",l=a||s,u=n,c=!i&&!a&&u,f=document.createElement("a"),h=function(A){return String(A)},d=o.Blob||o.MozBlob||o.WebKitBlob||h,p=i||"download",g,v;if(d=d.call?d.bind(o):Blob,String(this)==="true"&&(u=[u,l],l=u[0],u=u[1]),c&&c.length<2048&&(p=c.split("/").pop().split("?")[0],f.href=c,f.href.indexOf(c)!==-1)){var m=new XMLHttpRequest;return m.open("GET",c,!0),m.responseType="blob",m.onload=function(A){t(A.target.response,p,s)},setTimeout(function(){m.send()},0),m}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u))if(u.length>1024*1024*1.999&&d!==h)u=w(u),l=u.type||s;else return navigator.msSaveBlob?navigator.msSaveBlob(w(u),p):S(u);else if(/([\x80-\xff])/.test(u)){var y=0,b=new Uint8Array(u.length),_=b.length;for(y;y<_;++y)b[y]=u.charCodeAt(y);u=new d([b],{type:l})}g=u instanceof d?u:new d([u],{type:l});function w(A){var C=A.split(/[:;,]/),x=C[1],D=C[2]=="base64"?atob:decodeURIComponent,E=D(C.pop()),T=E.length,k=0,M=new Uint8Array(T);for(k;k$&&(N.min=$),N.max<$&&(N.max=$)}for(var L=0;Lb?1:y0)w=S;else if(A<0)_=S+1;else return S+1}return _}function m(y,b,_){if(y&&b){if(y.map&&y.map===u)return y.map(b,_);for(var w=[],S=0,A=y.length;S=10&&f++,f}return{isNumber:s,isInteger:l,quantityExponent:u}}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(2),l=s.dataPreprocess,u=s.normalizeDimensions,c={linear:function(d,p){for(var g=p.dimensions[0],v=p.dimensions[1],m=0,y=0,b=0,_=0,w=d.length,S=0;S=0;w--)w>1?U+=Math.round(k[w]*Math.pow(10,w+1))/Math.pow(10,w+1)+"x^"+w+" + ":w===1?U+=Math.round(k[w]*100)/100+"x + ":U+=Math.round(k[w]*100)/100;return{points:M,parameter:k,expression:U}}};function f(d,p){for(var g=0;gMath.abs(d[g][v])&&(v=m);for(var y=g;y=g;w--)d[w][_]-=d[w][g]/d[g][g]*d[g][_]}for(var S=new Array(p),A=d.length-1,m=d.length-2;m>=0;m--){for(var b=0,g=m+1;gf&&(f=c[h]);return f}return u}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(9);return function(l){var u=s(l);return u&&Math.sqrt(u)}}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(4),l=s.isNumber,u=i(10);function c(f){var h=f.length;if(!h||h<2)return 0;if(f.length>=2){for(var d=u(f),p=0,g,v=0;v=1)return s[u-1];var c=(u-1)*l,f=Math.floor(c),h=s[f],d=s[f+1];return h+(d-h)*(c-f)}}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(4),l=s.isNumber;function u(c){for(var f=1/0,h=0;h0?N[P-1]:N[P]-k===F?k:N[P]-F,H[P].x1=P<$?N[P]:T-N[P-1]===F?T:N[P-1]+F;for(var P=0;P50?50:A},scott:function(S,A,C){return Math.ceil((C-A)/(3.5*c(S)*Math.pow(S.length,-1/3)))},freedmanDiaconis:function(S,A,C){return S.sort(g),Math.ceil((C-A)/(2*(u(S,.75)-u(S,.25))*Math.pow(S.length,-1/3)))},sturges:function(S){return Math.ceil(Math.log(S.length)/Math.LN2)+1}};return _}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(2),l=s.getPrecision;return function(u,c,f,h){var d=arguments.length;d<2?(c=u,u=0,f=1):d<3?f=1:d<4?(f=+f,h=l(f)):h=+h;for(var p=Math.ceil(((c-u)/f).toFixed(h)),g=new Array(p+1),v=0;v=Math.sqrt(50)?d*=10:p>=Math.sqrt(10)?d*=5:p>=Math.sqrt(2)&&(d*=2);var g=h<0?-h:0,v=+(u>=l?d:-d).toFixed(g);return{step:v,toFixedPrecision:g}}}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(5),l=i(19),u=2;return{type:"ecStat:regression",transform:function(f){var h=f.upstream,d=f.config||{},p=d.method||"linear",g=s(p,h.cloneRawData(),{order:d.order,dimensions:l.normalizeExistingDimensions(f,d.dimensions)}),v=g.points,m=d.formulaOn;m==null&&(m="end");var y;if(m!=="none"){for(var b=0;b{const e=d(n),r=(s,o)=>{e.update(u=>{const c=s(u);let i=c;return t&&(i=t({curr:u,next:c})),o==null||o(i),i})};return{...e,update:r,set:s=>{r(()=>s)}}};function b(){return l(10)}function v(n){return n.reduce((t,e)=>(t[e]=b(),t),{})}function w(n){const t={};return Object.keys(n).forEach(e=>{const r=e,a=n[r];t[r]=d(f(a))}),t}function A(n,t){const e={};return t.forEach(r=>{e[r]={[`data-${n}-${r}`]:""}}),r=>e[r]}function D(n){return n?{"aria-disabled":"true","data-disabled":""}:{"aria-disabled":void 0,"data-disabled":void 0}}function k(){const n=p();return t=>{const{originalEvent:e}=t.detail,{cancelable:r}=t,a=e.type;n(a,{originalEvent:e,currentTarget:e.currentTarget},{cancelable:r})||t.preventDefault()}}function x(n){const t={};for(const e in n){const r=n[e];r!==void 0&&(t[e]=r)}return t}function I(n){return function(t,e){if(e===void 0)return;const r=n[t];r&&r.set(e)}}function O(n,t){return n.length!==t.length?!1:n.every((e,r)=>e===t[r])}export{b as a,I as b,A as c,O as d,k as e,D as f,v as g,m as o,x as r,w as t}; diff --git a/_app/immutable/chunks/button.DH6vZO4W.js b/_app/immutable/chunks/button.DH6vZO4W.js new file mode 100644 index 0000000000000000000000000000000000000000..6c72eb7df075f31a16f35702bfd8196599792fba --- /dev/null +++ b/_app/immutable/chunks/button.DH6vZO4W.js @@ -0,0 +1,8 @@ +import{ae as nt,q as bn,a8 as ot,af as jt,V as Wt,s as Me,b as de,k as xe,f as re,a9 as Oe,aa as ie,ab as Vt,G as C,N as yt,z as rt,e as Kt,d as zt,g as Ht,ag as Pe,B as F,D as it,E as at,F as st,L as Ut,J as pn,K as vn}from"./scheduler.BZlHRu_0.js";import{w as ke,r as gn,a as Ye,d as yn}from"./entry.p1-HE9Vh.js";import{ag as wn,ah as ae,ai as Tn,B as W,w as xn,aj as _n,ak as lt,al as An,y as Xe,am as te,t as Sn,H as ct,J as wt,an as Tt,K as En}from"./VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";import{t as On}from"./arrays.DyTtr4Tk.js";import{S as Gt,i as qt,g as Pn,b as X,d as kn,t as J,c as Cn,a as Nn,m as Fn,e as Rn}from"./index.a_oafgNU.js";const oe=Symbol("InputStore"),Yt=t=>typeof t!="object"||t===null?!1:"subscribe"in t,Dn=t=>Yt(t)?"set"in t&&"update"in t:!1,jr=t=>{if(!Dn(t))throw console.error({InputStoreValue:t}),new Error("InputStore must be a writable store");if(nt().has(oe)){const e=ot(oe);return e.set(jt(t)),e}else return bn(oe,t),t},Wr=()=>nt().has(oe)?ot(oe):(console.warn("InputStoreKey not found in context. Did you forget to call ensureInputContext?"),ke({})),Vr=()=>{if(!nt().has(oe))return console.warn("InputStoreKey not found in context. Did you forget to call ensureInputContext?"),gn({});const t=ot(oe);if(Yt(t))return Ye(t);throw new Error(`InputStoreKey is not a readable store: ${t}`)};function Kr(t,...e){return t.call(this,...e)}const Je=Symbol("Unset"),xt=Symbol("IsSetTracked"),_t=Symbol("GetModKeys"),At=Symbol("GetOwnKey"),In=Symbol("GetOwnPath"),St=Symbol("GetParent"),Et=(t={},e={},n=void 0,o=void 0)=>{if(n&&!n[xt])throw new Error("SetTracked parent must be SetTracked");const r=Object.assign(()=>{},e??{}),a=Object.keys(r),i=new Proxy(r,{get(l,s){switch(s){case Je:return!(n!=null&&n[_t].includes(o));case _t:return a;case At:return o;case St:return n;case In:{const u=[o];let c=n;for(;c!==void 0;)u.unshift(c[At]),c=c[St];return u.join(".")}case xt:return!0;case"toJSON":return()=>({...l});case"toString":case"toPrimitive":case Symbol.toPrimitive:return i[Je]?o&&o in t?()=>t[o]:()=>"":e.toString.bind(e);default:return s in l||(l[s]=Et(t,void 0,i,s)),l[s]}},set(l,s,u){return a.push(s),typeof u=="object"&&(u=Et(t,u,i,s)),l[s]=u,!0}});return i},zr=(t,...e)=>e.filter(o=>o==null?void 0:o[Je]).length!==0;function Hr(t,e,n,o=!0){const r=e-n;return r<=0?o?t[t.length-1]:t[0]:t[r]}function Ur(t,e,n,o=!0){const r=e+n;return r>t.length-1?o?t[0]:t[t.length-1]:t[r]}function Gr(t,e,n=!0){return e===t.length-1?n?t[0]:t[e]:t[e+1]}function qr(t,e,n=!0){return e<=0?n?t[t.length-1]:t[0]:t[e-1]}function Ln(t){return t[t.length-1]}function Mn(t,e){return t.map((n,o)=>t[(e+o)%t.length])}function Yr(t,e,n=wn){const o=e.findIndex(r=>n(r,t));return o!==-1?e.splice(o,1):e.push(t),e}function Xr(t,e){const n=[];for(let o=0;o=0&&tsetTimeout(e,t))}function Bn(t,e=500){let n=null;return function(...o){const r=()=>{n=null,t(...o)};n&&clearTimeout(n),n=setTimeout(r,e)}}const Xt=()=>typeof window<"u";function jn(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const Jt=t=>Xt()&&t.test(jn().toLowerCase()),Wn=()=>Xt()&&!!navigator.maxTouchPoints,Vn=()=>Jt(/^mac/)&&!Wn(),Kn=()=>Jt(/mac|iphone|ipad|ipod/i),zn=()=>Kn()&&!Vn(),ze="data-melt-scroll-lock";function Ot(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function Hn(t,e,n){if(!t)return;const o=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{o?t.style.setProperty(e,o):t.style.removeProperty(e)}}function Un(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function $r(t){const e=document,n=e.defaultView??window,{documentElement:o,body:r}=e;if(r.hasAttribute(ze))return ae;r.setAttribute(ze,"");const i=n.innerWidth-o.clientWidth,l=()=>Hn(o,"--scrollbar-width",`${i}px`),s=Un(o),u=n.getComputedStyle(r)[s],c=()=>Ot(r,{overflow:"hidden",[s]:`calc(${u} + ${i}px)`}),f=()=>{const{scrollX:m,scrollY:v,visualViewport:g}=n,y=(g==null?void 0:g.offsetLeft)??0,w=(g==null?void 0:g.offsetTop)??0,x=Ot(r,{position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(w))}px`,left:`${-(m-Math.floor(y))}px`,right:"0",[s]:`calc(${u} + ${i}px)`});return()=>{x==null||x(),n.scrollTo(m,v)}},p=[l(),zn()?f():c()];return()=>{p.forEach(m=>m==null?void 0:m()),r.removeAttribute(ze)}}function ei(t){const{open:e,forceVisible:n,activeTrigger:o}=t;return yn([e,n,o],([r,a,i])=>(r||a)&&i!==null)}function Gn(t){Tn&&ut(1).then(()=>{const e=document.activeElement;!W(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function Zt(){return Array.from(document.querySelectorAll('a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])'))}function ti(t){const e=Zt(),o=e.indexOf(t)+1,r=e[o];return o=0&&W(r)?r:null}const qn=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),Yn={onMatch:Gn,getCurrentItem:()=>document.activeElement};function oi(t={}){const e={...Yn,...t},n=xn(ke([])),o=Bn(()=>{n.update(()=>[])});return{typed:n,resetTyped:o,handleTypeaheadSearch:(a,i)=>{if(qn.has(a))return;const l=e.getCurrentItem(),s=jt(n);if(!Array.isArray(s))return;s.push(a.toLowerCase()),n.set(s);const u=i.filter(y=>!(y.getAttribute("disabled")==="true"||y.getAttribute("aria-disabled")==="true"||y.hasAttribute("data-disabled"))),f=s.length>1&&s.every(y=>y===s[0])?s[0]:s.join(""),p=W(l)?u.indexOf(l):-1;let m=Mn(u,Math.max(p,0));f.length===1&&(m=m.filter(y=>y!==l));const g=m.find(y=>(y==null?void 0:y.innerText)&&y.innerText.toLowerCase().startsWith(f.toLowerCase()));W(g)&&g!==l&&e.onMatch(g),o()}}}function Xn(t){let e=t.parentElement;for(;W(e)&&!e.hasAttribute("data-portal");)e=e.parentElement;return e||"body"}function ri(t,e){return e!==void 0?e:Xn(t)==="body"?document.body:null}async function ii(t){const{prop:e,defaultEl:n}=t;if(await Promise.all([ut(1),Wt]),e===void 0){n==null||n.focus();return}const o=_n(e)?e(n):e;if(typeof o=="string"){const r=document.querySelector(o);if(!W(r))return;r.focus()}else W(o)&&o.focus()}const Z=Math.min,V=Math.max,Ce=Math.round,Ae=Math.floor,U=t=>({x:t,y:t}),Jn={left:"right",right:"left",bottom:"top",top:"bottom"},Zn={start:"end",end:"start"};function Ze(t,e,n){return V(t,Z(e,n))}function me(t,e){return typeof t=="function"?t(e):t}function Q(t){return t.split("-")[0]}function be(t){return t.split("-")[1]}function Qt(t){return t==="x"?"y":"x"}function ft(t){return t==="y"?"height":"width"}function se(t){return["top","bottom"].includes(Q(t))?"y":"x"}function dt(t){return Qt(se(t))}function Qn(t,e,n){n===void 0&&(n=!1);const o=be(t),r=dt(t),a=ft(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=Ne(i)),[i,Ne(i)]}function $n(t){const e=Ne(t);return[Qe(t),e,Qe(e)]}function Qe(t){return t.replace(/start|end/g,e=>Zn[e])}function eo(t,e,n){const o=["left","right"],r=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:o:e?o:r;case"left":case"right":return e?a:i;default:return[]}}function to(t,e,n,o){const r=be(t);let a=eo(Q(t),n==="start",o);return r&&(a=a.map(i=>i+"-"+r),e&&(a=a.concat(a.map(Qe)))),a}function Ne(t){return t.replace(/left|right|bottom|top/g,e=>Jn[e])}function no(t){return{top:0,right:0,bottom:0,left:0,...t}}function $t(t){return typeof t!="number"?no(t):{top:t,right:t,bottom:t,left:t}}function Fe(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Pt(t,e,n){let{reference:o,floating:r}=t;const a=se(e),i=dt(e),l=ft(i),s=Q(e),u=a==="y",c=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,p=o[l]/2-r[l]/2;let m;switch(s){case"top":m={x:c,y:o.y-r.height};break;case"bottom":m={x:c,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-r.width,y:f};break;default:m={x:o.x,y:o.y}}switch(be(e)){case"start":m[i]-=p*(n&&u?-1:1);break;case"end":m[i]+=p*(n&&u?-1:1);break}return m}const oo=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,l=a.filter(Boolean),s=await(i.isRTL==null?void 0:i.isRTL(e));let u=await i.getElementRects({reference:t,floating:e,strategy:r}),{x:c,y:f}=Pt(u,o,s),p=o,m={},v=0;for(let g=0;g({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:a,platform:i,elements:l,middlewareData:s}=e,{element:u,padding:c=0}=me(t,e)||{};if(u==null)return{};const f=$t(c),p={x:n,y:o},m=dt(r),v=ft(m),g=await i.getDimensions(u),y=m==="y",w=y?"top":"left",x=y?"bottom":"right",A=y?"clientHeight":"clientWidth",k=a.reference[v]+a.reference[m]-p[m]-a.floating[v],P=p[m]-a.reference[m],D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let L=D?D[A]:0;(!L||!await(i.isElement==null?void 0:i.isElement(D)))&&(L=l.floating[A]||a.floating[v]);const B=k/2-P/2,j=L/2-g[v]/2-1,I=Z(f[w],j),M=Z(f[x],j),O=I,d=L-g[v]-M,h=L/2-g[v]/2+B,T=Ze(O,h,d),S=!s.arrow&&be(r)!=null&&h!==T&&a.reference[v]/2-(hh<=0)){var M,O;const h=(((M=a.flip)==null?void 0:M.index)||0)+1,T=L[h];if(T)return{data:{index:h,overflows:I},reset:{placement:T}};let S=(O=I.filter(E=>E.overflows[0]<=0).sort((E,b)=>E.overflows[1]-b.overflows[1])[0])==null?void 0:O.placement;if(!S)switch(m){case"bestFit":{var d;const E=(d=I.filter(b=>{if(D){const _=se(b.placement);return _===x||_==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(_=>_>0).reduce((_,N)=>_+N,0)]).sort((b,_)=>b[1]-_[1])[0])==null?void 0:d[0];E&&(S=E);break}case"initialPlacement":S=l;break}if(r!==S)return{reset:{placement:S}}}return{}}}};async function ao(t,e){const{placement:n,platform:o,elements:r}=t,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Q(n),l=be(n),s=se(n)==="y",u=["left","top"].includes(i)?-1:1,c=a&&s?-1:1,f=me(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(m=l==="end"?v*-1:v),s?{x:m*c,y:p*u}:{x:p*u,y:m*c}}const so=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:a,placement:i,middlewareData:l}=e,s=await ao(e,t);return i===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:r+s.x,y:a+s.y,data:{...s,placement:i}}}}},lo=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:y=>{let{x:w,y:x}=y;return{x:w,y:x}}},...s}=me(t,e),u={x:n,y:o},c=await ht(e,s),f=se(Q(r)),p=Qt(f);let m=u[p],v=u[f];if(a){const y=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=m+c[y],A=m-c[w];m=Ze(x,m,A)}if(i){const y=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=v+c[y],A=v-c[w];v=Ze(x,v,A)}const g=l.fn({...e,[p]:m,[f]:v});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[p]:a,[f]:i}}}}}},co=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:a,platform:i,elements:l}=e,{apply:s=()=>{},...u}=me(t,e),c=await ht(e,u),f=Q(r),p=be(r),m=se(r)==="y",{width:v,height:g}=a.floating;let y,w;f==="top"||f==="bottom"?(y=f,w=p===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(w=f,y=p==="end"?"top":"bottom");const x=g-c.top-c.bottom,A=v-c.left-c.right,k=Z(g-c[y],x),P=Z(v-c[w],A),D=!e.middlewareData.shift;let L=k,B=P;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(B=A),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(L=x),D&&!p){const I=V(c.left,0),M=V(c.right,0),O=V(c.top,0),d=V(c.bottom,0);m?B=v-2*(I!==0||M!==0?I+M:V(c.left,c.right)):L=g-2*(O!==0||d!==0?O+d:V(c.top,c.bottom))}await s({...e,availableWidth:B,availableHeight:L});const j=await i.getDimensions(l.floating);return v!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function Be(){return typeof window<"u"}function pe(t){return en(t)?(t.nodeName||"").toLowerCase():"#document"}function K(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function q(t){var e;return(e=(en(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function en(t){return Be()?t instanceof Node||t instanceof K(t).Node:!1}function z(t){return Be()?t instanceof Element||t instanceof K(t).Element:!1}function G(t){return Be()?t instanceof HTMLElement||t instanceof K(t).HTMLElement:!1}function kt(t){return!Be()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof K(t).ShadowRoot}function _e(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=H(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(r)}function uo(t){return["table","td","th"].includes(pe(t))}function je(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function mt(t){const e=bt(),n=z(t)?H(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function fo(t){let e=$(t);for(;G(e)&&!he(e);){if(mt(e))return e;if(je(e))return null;e=$(e)}return null}function bt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function he(t){return["html","body","#document"].includes(pe(t))}function H(t){return K(t).getComputedStyle(t)}function We(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function $(t){if(pe(t)==="html")return t;const e=t.assignedSlot||t.parentNode||kt(t)&&t.host||q(t);return kt(e)?e.host:e}function tn(t){const e=$(t);return he(e)?t.ownerDocument?t.ownerDocument.body:t.body:G(e)&&_e(e)?e:tn(e)}function Te(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=tn(t),a=r===((o=t.ownerDocument)==null?void 0:o.body),i=K(r);if(a){const l=$e(i);return e.concat(i,i.visualViewport||[],_e(r)?r:[],l&&n?Te(l):[])}return e.concat(r,Te(r,[],n))}function $e(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function nn(t){const e=H(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=G(t),a=r?t.offsetWidth:n,i=r?t.offsetHeight:o,l=Ce(n)!==a||Ce(o)!==i;return l&&(n=a,o=i),{width:n,height:o,$:l}}function pt(t){return z(t)?t:t.contextElement}function fe(t){const e=pt(t);if(!G(e))return U(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:a}=nn(e);let i=(a?Ce(n.width):n.width)/o,l=(a?Ce(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const ho=U(0);function on(t){const e=K(t);return!bt()||!e.visualViewport?ho:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function mo(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==K(t)?!1:e}function le(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),a=pt(t);let i=U(1);e&&(o?z(o)&&(i=fe(o)):i=fe(t));const l=mo(a,n,o)?on(a):U(0);let s=(r.left+l.x)/i.x,u=(r.top+l.y)/i.y,c=r.width/i.x,f=r.height/i.y;if(a){const p=K(a),m=o&&z(o)?K(o):o;let v=p,g=$e(v);for(;g&&o&&m!==v;){const y=fe(g),w=g.getBoundingClientRect(),x=H(g),A=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,k=w.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;s*=y.x,u*=y.y,c*=y.x,f*=y.y,s+=A,u+=k,v=K(g),g=$e(v)}}return Fe({width:c,height:f,x:s,y:u})}function vt(t,e){const n=We(t).scrollLeft;return e?e.left+n:le(q(t)).left+n}function rn(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=o.left+e.scrollLeft-(n?0:vt(t,o)),a=o.top+e.scrollTop;return{x:r,y:a}}function bo(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const a=r==="fixed",i=q(o),l=e?je(e.floating):!1;if(o===i||l&&a)return n;let s={scrollLeft:0,scrollTop:0},u=U(1);const c=U(0),f=G(o);if((f||!f&&!a)&&((pe(o)!=="body"||_e(i))&&(s=We(o)),G(o))){const m=le(o);u=fe(o),c.x=m.x+o.clientLeft,c.y=m.y+o.clientTop}const p=i&&!f&&!a?rn(i,s,!0):U(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-s.scrollTop*u.y+c.y+p.y}}function po(t){return Array.from(t.getClientRects())}function vo(t){const e=q(t),n=We(t),o=t.ownerDocument.body,r=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+vt(t);const l=-n.scrollTop;return H(o).direction==="rtl"&&(i+=V(e.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:l}}function go(t,e){const n=K(t),o=q(t),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,l=0,s=0;if(r){a=r.width,i=r.height;const u=bt();(!u||u&&e==="fixed")&&(l=r.offsetLeft,s=r.offsetTop)}return{width:a,height:i,x:l,y:s}}function yo(t,e){const n=le(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,a=G(t)?fe(t):U(1),i=t.clientWidth*a.x,l=t.clientHeight*a.y,s=r*a.x,u=o*a.y;return{width:i,height:l,x:s,y:u}}function Ct(t,e,n){let o;if(e==="viewport")o=go(t,n);else if(e==="document")o=vo(q(t));else if(z(e))o=yo(e,n);else{const r=on(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Fe(o)}function an(t,e){const n=$(t);return n===e||!z(n)||he(n)?!1:H(n).position==="fixed"||an(n,e)}function wo(t,e){const n=e.get(t);if(n)return n;let o=Te(t,[],!1).filter(l=>z(l)&&pe(l)!=="body"),r=null;const a=H(t).position==="fixed";let i=a?$(t):t;for(;z(i)&&!he(i);){const l=H(i),s=mt(i);!s&&l.position==="fixed"&&(r=null),(a?!s&&!r:!s&&l.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||_e(i)&&!s&&an(t,i))?o=o.filter(c=>c!==i):r=l,i=$(i)}return e.set(t,o),o}function To(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[...n==="clippingAncestors"?je(e)?[]:wo(e,this._c):[].concat(n),o],l=i[0],s=i.reduce((u,c)=>{const f=Ct(e,c,r);return u.top=V(f.top,u.top),u.right=Z(f.right,u.right),u.bottom=Z(f.bottom,u.bottom),u.left=V(f.left,u.left),u},Ct(e,l,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function xo(t){const{width:e,height:n}=nn(t);return{width:e,height:n}}function _o(t,e,n){const o=G(e),r=q(e),a=n==="fixed",i=le(t,!0,a,e);let l={scrollLeft:0,scrollTop:0};const s=U(0);if(o||!o&&!a)if((pe(e)!=="body"||_e(r))&&(l=We(e)),o){const p=le(e,!0,a,e);s.x=p.x+e.clientLeft,s.y=p.y+e.clientTop}else r&&(s.x=vt(r));const u=r&&!o&&!a?rn(r,l):U(0),c=i.left+l.scrollLeft-s.x-u.x,f=i.top+l.scrollTop-s.y-u.y;return{x:c,y:f,width:i.width,height:i.height}}function He(t){return H(t).position==="static"}function Nt(t,e){if(!G(t)||H(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return q(t)===n&&(n=n.ownerDocument.body),n}function sn(t,e){const n=K(t);if(je(t))return n;if(!G(t)){let r=$(t);for(;r&&!he(r);){if(z(r)&&!He(r))return r;r=$(r)}return n}let o=Nt(t,e);for(;o&&uo(o)&&He(o);)o=Nt(o,e);return o&&he(o)&&He(o)&&!mt(o)?n:o||fo(t)||n}const Ao=async function(t){const e=this.getOffsetParent||sn,n=this.getDimensions,o=await n(t.floating);return{reference:_o(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function So(t){return H(t).direction==="rtl"}const Eo={convertOffsetParentRelativeRectToViewportRelativeRect:bo,getDocumentElement:q,getClippingRect:To,getOffsetParent:sn,getElementRects:Ao,getClientRects:po,getDimensions:xo,getScale:fe,isElement:z,isRTL:So};function Oo(t,e){let n=null,o;const r=q(t);function a(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function i(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),a();const{left:u,top:c,width:f,height:p}=t.getBoundingClientRect();if(l||e(),!f||!p)return;const m=Ae(c),v=Ae(r.clientWidth-(u+f)),g=Ae(r.clientHeight-(c+p)),y=Ae(u),x={rootMargin:-m+"px "+-v+"px "+-g+"px "+-y+"px",threshold:V(0,Z(1,s))||1};let A=!0;function k(P){const D=P[0].intersectionRatio;if(D!==s){if(!A)return i();D?i(!1,D):o=setTimeout(()=>{i(!1,1e-7)},1e3)}A=!1}try{n=new IntersectionObserver(k,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(t)}return i(!0),a}function Po(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=o,u=pt(t),c=r||a?[...u?Te(u):[],...Te(e)]:[];c.forEach(w=>{r&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const f=u&&l?Oo(u,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var A;(A=m)==null||A.observe(e)})),n()}),u&&!s&&m.observe(u),m.observe(e));let v,g=s?le(t):null;s&&y();function y(){const w=le(t);g&&(w.x!==g.x||w.y!==g.y||w.width!==g.width||w.height!==g.height)&&n(),g=w,v=requestAnimationFrame(y)}return n(),()=>{var w;c.forEach(x=>{r&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),f==null||f(),(w=m)==null||w.disconnect(),m=null,s&&cancelAnimationFrame(v)}}const ko=so,Co=lo,No=io,Fo=co,Ro=ro,Do=(t,e,n)=>{const o=new Map,r={platform:Eo,...n},a={...r.platform,_c:o};return oo(t,e,{...r,platform:a})},Io={strategy:"absolute",placement:"top",gutter:5,flip:!0,sameWidth:!1,overflowPadding:8},Lo={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function Mo(t,e,n={}){if(!e||!t||n===null)return{destroy:ae};const o={...Io,...n},r=e.querySelector("[data-arrow=true]"),a=[];o.flip&&a.push(No({boundary:o.boundary,padding:o.overflowPadding}));const i=W(r)?r.offsetHeight/2:0;if(o.gutter||o.offset){const s=o.gutter?{mainAxis:o.gutter}:o.offset;(s==null?void 0:s.mainAxis)!=null&&(s.mainAxis+=i),a.push(ko(s))}a.push(Co({boundary:o.boundary,crossAxis:o.overlap,padding:o.overflowPadding})),r&&a.push(Ro({element:r,padding:8})),a.push(Fo({padding:o.overflowPadding,apply({rects:s,availableHeight:u,availableWidth:c}){o.sameWidth&&Object.assign(e.style,{width:`${Math.round(s.reference.width)}px`,minWidth:"unset"}),o.fitViewport&&Object.assign(e.style,{maxWidth:`${c}px`,maxHeight:`${u}px`})}}));function l(){if(!t||!e||W(t)&&!t.ownerDocument.documentElement.contains(t))return;const{placement:s,strategy:u}=o;Do(t,e,{placement:s,middleware:a,strategy:u}).then(c=>{const f=Math.round(c.x),p=Math.round(c.y),[m,v]=Bo(c.placement);if(e.setAttribute("data-side",m),e.setAttribute("data-align",v),Object.assign(e.style,{position:o.strategy,top:`${p}px`,left:`${f}px`}),W(r)&&c.middlewareData.arrow){const{x:g,y}=c.middlewareData.arrow,w=c.placement.split("-")[0];r.setAttribute("data-side",w),Object.assign(r.style,{position:"absolute",left:g!=null?`${g}px`:"",top:y!=null?`${y}px`:"",[w]:`calc(100% - ${i}px)`,transform:Lo[w],backgroundColor:"inherit",zIndex:"inherit"})}return c})}return Object.assign(e.style,{position:o.strategy}),{destroy:Po(t,e,l)}}function Bo(t){const[e,n="center"]=t.split("-");return[e,n]}/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var ln=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Re=ln.join(","),cn=typeof Element>"u",ce=cn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,De=!cn&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Ie=function t(e,n){var o;n===void 0&&(n=!0);var r=e==null||(o=e.getAttribute)===null||o===void 0?void 0:o.call(e,"inert"),a=r===""||r==="true",i=a||n&&e&&t(e.parentNode);return i},jo=function(e){var n,o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return o===""||o==="true"},un=function(e,n,o){if(Ie(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Re));return n&&ce.call(e,Re)&&r.unshift(e),r=r.filter(o),r},fn=function t(e,n,o){for(var r=[],a=Array.from(e);a.length;){var i=a.shift();if(!Ie(i,!1))if(i.tagName==="SLOT"){var l=i.assignedElements(),s=l.length?l:i.children,u=t(s,!0,o);o.flatten?r.push.apply(r,u):r.push({scopeParent:i,candidates:u})}else{var c=ce.call(i,Re);c&&o.filter(i)&&(n||!e.includes(i))&&r.push(i);var f=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),p=!Ie(f,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(f&&p){var m=t(f===!0?i.children:f.children,!0,o);o.flatten?r.push.apply(r,m):r.push({scopeParent:i,candidates:m})}else a.unshift.apply(a,i.children)}}return r},dn=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ne=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||jo(e))&&!dn(e)?0:e.tabIndex},Wo=function(e,n){var o=ne(e);return o<0&&n&&!dn(e)?0:o},Vo=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},hn=function(e){return e.tagName==="INPUT"},Ko=function(e){return hn(e)&&e.type==="hidden"},zo=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return n},Ho=function(e,n){for(var o=0;osummary:first-of-type"),i=a?e.parentElement:e;if(ce.call(i,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var s=e.parentElement,u=De(e);if(s&&!s.shadowRoot&&r(s)===!0)return Ft(e);e.assignedSlot?e=e.assignedSlot:!s&&u!==e.ownerDocument?e=u.host:e=s}e=l}if(Yo(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Ft(e);return!1},Jo=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o=0)},Qo=function t(e){var n=[],o=[];return e.forEach(function(r,a){var i=!!r.scopeParent,l=i?r.scopeParent:r,s=Wo(l,i),u=i?t(r.candidates):l;s===0?i?n.push.apply(n,u):n.push(l):o.push({documentOrder:a,tabIndex:s,item:r,isScope:i,content:u})}),o.sort(Vo).reduce(function(r,a){return a.isScope?r.push.apply(r,a.content):r.push(a.content),r},[]).concat(n)},$o=function(e,n){n=n||{};var o;return n.getShadowRoot?o=fn([e],n.includeContainer,{filter:et.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Zo}):o=un(e,n.includeContainer,et.bind(null,n)),Qo(o)},er=function(e,n){n=n||{};var o;return n.getShadowRoot?o=fn([e],n.includeContainer,{filter:Le.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):o=un(e,n.includeContainer,Le.bind(null,n)),o},ue=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return ce.call(e,Re)===!1?!1:et(n,e)},tr=ln.concat("iframe").join(","),Ue=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return ce.call(e,tr)===!1?!1:Le(n,e)};/*! +* focus-trap 7.6.2 +* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE +*/function tt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n0){var o=e[e.length-1];o!==n&&o.pause()}var r=e.indexOf(n);r===-1||e.splice(r,1),e.push(n)},deactivateTrap:function(e,n){var o=e.indexOf(n);o!==-1&&e.splice(o,1),e.length>0&&e[e.length-1].unpause()}},ur=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},fr=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},we=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},dr=function(e){return we(e)&&!e.shiftKey},hr=function(e){return we(e)&&e.shiftKey},Lt=function(e){return setTimeout(e,0)},ye=function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r1&&arguments[1]!==void 0?arguments[1]:{},T=h.hasFallback,S=T===void 0?!1:T,E=h.params,b=E===void 0?[]:E,_=a[d];if(typeof _=="function"&&(_=_.apply(void 0,ar(b))),_===!0&&(_=void 0),!_){if(_===void 0||_===!1)return _;throw new Error("`".concat(d,"` was specified but was not a node, or did not return a node"))}var N=_;if(typeof _=="string"){try{N=o.querySelector(_)}catch(R){throw new Error("`".concat(d,'` appears to be an invalid selector; error="').concat(R.message,'"'))}if(!N&&!S)throw new Error("`".concat(d,"` as selector refers to no known node"))}return N},f=function(){var d=c("initialFocus",{hasFallback:!0});if(d===!1)return!1;if(d===void 0||d&&!Ue(d,a.tabbableOptions))if(u(o.activeElement)>=0)d=o.activeElement;else{var h=i.tabbableGroups[0],T=h&&h.firstTabbableNode;d=T||c("fallbackFocus")}else d===null&&(d=c("fallbackFocus"));if(!d)throw new Error("Your focus-trap needs to have at least one focusable element");return d},p=function(){if(i.containerGroups=i.containers.map(function(d){var h=$o(d,a.tabbableOptions),T=er(d,a.tabbableOptions),S=h.length>0?h[0]:void 0,E=h.length>0?h[h.length-1]:void 0,b=T.find(function(R){return ue(R)}),_=T.slice().reverse().find(function(R){return ue(R)}),N=!!h.find(function(R){return ne(R)>0});return{container:d,tabbableNodes:h,focusableNodes:T,posTabIndexesFound:N,firstTabbableNode:S,lastTabbableNode:E,firstDomTabbableNode:b,lastDomTabbableNode:_,nextTabbableNode:function(ee){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Y=h.indexOf(ee);return Y<0?ve?T.slice(T.indexOf(ee)+1).find(function(ge){return ue(ge)}):T.slice(0,T.indexOf(ee)).reverse().find(function(ge){return ue(ge)}):h[Y+(ve?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(d){return d.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(d){return d.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(d){var h=d.activeElement;if(h)return h.shadowRoot&&h.shadowRoot.activeElement!==null?m(h.shadowRoot):h},v=function(d){if(d!==!1&&d!==m(document)){if(!d||!d.focus){v(f());return}d.focus({preventScroll:!!a.preventScroll}),i.mostRecentlyFocusedNode=d,ur(d)&&d.select()}},g=function(d){var h=c("setReturnFocus",{params:[d]});return h||(h===!1?!1:d)},y=function(d){var h=d.target,T=d.event,S=d.isBackward,E=S===void 0?!1:S;h=h||Se(T),p();var b=null;if(i.tabbableGroups.length>0){var _=u(h,T),N=_>=0?i.containerGroups[_]:void 0;if(_<0)E?b=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:b=i.tabbableGroups[0].firstTabbableNode;else if(E){var R=i.tabbableGroups.findIndex(function(Ve){var Ke=Ve.firstTabbableNode;return h===Ke});if(R<0&&(N.container===h||Ue(h,a.tabbableOptions)&&!ue(h,a.tabbableOptions)&&!N.nextTabbableNode(h,!1))&&(R=_),R>=0){var ee=R===0?i.tabbableGroups.length-1:R-1,ve=i.tabbableGroups[ee];b=ne(h)>=0?ve.lastTabbableNode:ve.lastDomTabbableNode}else we(T)||(b=N.nextTabbableNode(h,!1))}else{var Y=i.tabbableGroups.findIndex(function(Ve){var Ke=Ve.lastTabbableNode;return h===Ke});if(Y<0&&(N.container===h||Ue(h,a.tabbableOptions)&&!ue(h,a.tabbableOptions)&&!N.nextTabbableNode(h))&&(Y=_),Y>=0){var ge=Y===i.tabbableGroups.length-1?0:Y+1,gt=i.tabbableGroups[ge];b=ne(h)>=0?gt.firstTabbableNode:gt.firstDomTabbableNode}else we(T)||(b=N.nextTabbableNode(h))}}else b=c("fallbackFocus");return b},w=function(d){var h=Se(d);if(!(u(h,d)>=0)){if(ye(a.clickOutsideDeactivates,d)){l.deactivate({returnFocus:a.returnFocusOnDeactivate});return}ye(a.allowOutsideClick,d)||d.preventDefault()}},x=function(d){var h=Se(d),T=u(h,d)>=0;if(T||h instanceof Document)T&&(i.mostRecentlyFocusedNode=h);else{d.stopImmediatePropagation();var S,E=!0;if(i.mostRecentlyFocusedNode)if(ne(i.mostRecentlyFocusedNode)>0){var b=u(i.mostRecentlyFocusedNode),_=i.containerGroups[b].tabbableNodes;if(_.length>0){var N=_.findIndex(function(R){return R===i.mostRecentlyFocusedNode});N>=0&&(a.isKeyForward(i.recentNavEvent)?N+1<_.length&&(S=_[N+1],E=!1):N-1>=0&&(S=_[N-1],E=!1))}}else i.containerGroups.some(function(R){return R.tabbableNodes.some(function(ee){return ne(ee)>0})})||(E=!1);else E=!1;E&&(S=y({target:i.mostRecentlyFocusedNode,isBackward:a.isKeyBackward(i.recentNavEvent)})),v(S||i.mostRecentlyFocusedNode||f())}i.recentNavEvent=void 0},A=function(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=d;var T=y({event:d,isBackward:h});T&&(we(d)&&d.preventDefault(),v(T))},k=function(d){(a.isKeyForward(d)||a.isKeyBackward(d))&&A(d,a.isKeyBackward(d))},P=function(d){fr(d)&&ye(a.escapeDeactivates,d)!==!1&&(d.preventDefault(),l.deactivate())},D=function(d){var h=Se(d);u(h,d)>=0||ye(a.clickOutsideDeactivates,d)||ye(a.allowOutsideClick,d)||(d.preventDefault(),d.stopImmediatePropagation())},L=function(){if(i.active)return It.activateTrap(r,l),i.delayInitialFocusTimer=a.delayInitialFocus?Lt(function(){v(f())}):v(f()),o.addEventListener("focusin",x,!0),o.addEventListener("mousedown",w,{capture:!0,passive:!1}),o.addEventListener("touchstart",w,{capture:!0,passive:!1}),o.addEventListener("click",D,{capture:!0,passive:!1}),o.addEventListener("keydown",k,{capture:!0,passive:!1}),o.addEventListener("keydown",P),l},B=function(){if(i.active)return o.removeEventListener("focusin",x,!0),o.removeEventListener("mousedown",w,!0),o.removeEventListener("touchstart",w,!0),o.removeEventListener("click",D,!0),o.removeEventListener("keydown",k,!0),o.removeEventListener("keydown",P),l},j=function(d){var h=d.some(function(T){var S=Array.from(T.removedNodes);return S.some(function(E){return E===i.mostRecentlyFocusedNode})});h&&v(f())},I=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(j):void 0,M=function(){I&&(I.disconnect(),i.active&&!i.paused&&i.containers.map(function(d){I.observe(d,{subtree:!0,childList:!0})}))};return l={get active(){return i.active},get paused(){return i.paused},activate:function(d){if(i.active)return this;var h=s(d,"onActivate"),T=s(d,"onPostActivate"),S=s(d,"checkCanFocusTrap");S||p(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=o.activeElement,h==null||h();var E=function(){S&&p(),L(),M(),T==null||T()};return S?(S(i.containers.concat()).then(E,E),this):(E(),this)},deactivate:function(d){if(!i.active)return this;var h=Dt({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},d);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,B(),i.active=!1,i.paused=!1,M(),It.deactivateTrap(r,l);var T=s(h,"onDeactivate"),S=s(h,"onPostDeactivate"),E=s(h,"checkCanReturnFocus"),b=s(h,"returnFocus","returnFocusOnDeactivate");T==null||T();var _=function(){Lt(function(){b&&v(g(i.nodeFocusedBeforeActivation)),S==null||S()})};return b&&E?(E(g(i.nodeFocusedBeforeActivation)).then(_,_),this):(_(),this)},pause:function(d){if(i.paused||!i.active)return this;var h=s(d,"onPause"),T=s(d,"onPostPause");return i.paused=!0,h==null||h(),B(),M(),T==null||T(),this},unpause:function(d){if(!i.paused||!i.active)return this;var h=s(d,"onUnpause"),T=s(d,"onPostUnpause");return i.paused=!1,h==null||h(),p(),L(),M(),T==null||T(),this},updateContainerElements:function(d){var h=[].concat(d).filter(Boolean);return i.containers=h.map(function(T){return typeof T=="string"?o.querySelector(T):T}),i.active&&p(),M(),this}},l.updateContainerElements(e),l};function pr(t={}){let e;const{immediate:n,...o}=t,r=ke(!1),a=ke(!1),i=f=>e==null?void 0:e.activate(f),l=f=>{e==null||e.deactivate(f)},s=()=>{e&&(e.pause(),a.set(!0))},u=()=>{e&&(e.unpause(),a.set(!1))};return{useFocusTrap:f=>(e=br(f,{...o,onActivate(){var p;r.set(!0),(p=t.onActivate)==null||p.call(t)},onDeactivate(){var p;r.set(!1),(p=t.onDeactivate)==null||p.call(t)}}),n&&i(),{destroy(){l(),e=void 0}}),hasFocus:Ye(r),isPaused:Ye(a),activate:i,deactivate:l,pause:s,unpause:u}}const Ee=[],vr=(t,e)=>{let n=ae;function o(){const a=Ee.indexOf(t);a>=0&&Ee.splice(a,1)}function r(a){n();const{open:i,onClose:l,shouldCloseOnInteractOutside:s,closeOnInteractOutside:u}=a;ut(100).then(()=>{i?Ee.push(t):o()});function c(){return Ln(Ee)===t}function f(){c()&&l&&(l(),o())}function p(v){const g=v.target;lt(g)&&g&&c()&&(v.preventDefault(),v.stopPropagation(),v.stopImmediatePropagation())}function m(v){s!=null&&s(v)&&c()&&(v.preventDefault(),v.stopPropagation(),v.stopImmediatePropagation(),f())}n=wr(t,{onInteractOutsideStart:p,onInteractOutside:u?m:void 0,enabled:i}).destroy}return r(e),{update:r,destroy(){o(),n()}}},gr={floating:{},focusTrap:{},modal:{},escapeKeydown:{},portal:"body"},ai=(t,e)=>{t.dataset.escapee="";const{anchorElement:n,open:o,options:r}=e;if(!n||!o||!r)return{destroy:ae};const a={...gr,...r},i=[];if(a.portal!==null&&i.push(yr(t,a.portal).destroy),i.push(Mo(n,t,a.floating).destroy),a.focusTrap!==null){const{useFocusTrap:s}=pr({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...a.focusTrap});i.push(s(t).destroy)}a.modal!==null&&i.push(vr(t,{onClose:()=>{W(n)&&(o.set(!1),n.focus())},shouldCloseOnInteractOutside:s=>!(s.defaultPrevented||W(n)&&n.contains(s.target)),...a.modal}).destroy),a.escapeKeydown!==null&&i.push(An(t,{enabled:o,handler:()=>{o.set(!1)},...a.escapeKeydown}).destroy);const l=Xe(...i);return{destroy(){l()}}},yr=(t,e="body")=>{let n;if(!W(e)&&typeof e!="string")return{destroy:ae};async function o(a){if(e=a,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await Wt(),n=document.querySelector(e)),n===null)throw new Error(`No element found matching css selector: "${e}"`)}else if(e instanceof HTMLElement)n=e;else throw new TypeError(`Unknown portal target type: ${e===null?"null":typeof e}. Allowed types: string (CSS selector) or HTMLElement.`);t.dataset.portal="",n.appendChild(t),t.hidden=!1}function r(){t.remove()}return o(e),{update:o,destroy:r}},wr=(t,e)=>{let n=ae,o=ae,r=!1,a=!1,i=!1;function l(c){n(),o();const{onInteractOutside:f,onInteractOutsideStart:p,enabled:m}=c;if(!m)return;function v(w){f&&Mt(w,t)&&(p==null||p(w));const x=w.target;lt(x)&&mn(t,x)&&(a=!0),r=!0}function g(w){f==null||f(w)}const y=Tr(t);if(typeof PointerEvent<"u"){const w=x=>{o();const A=k=>{s(k)&&g(k),u()};if(x.pointerType==="touch"){o=te(y,"click",A,{capture:!0,once:!0});return}A(x)};n=Xe(te(y,"pointerdown",v,!0),te(y,"pointerup",w,!0))}else{const w=A=>{i?i=!1:s(A)&&g(A),u()},x=A=>{i=!0,s(A)&&g(A),u()};n=Xe(te(y,"mousedown",v,!0),te(y,"mouseup",w,!0),te(y,"touchstart",v,!0),te(y,"touchend",x,!0))}}function s(c){return!!(r&&!a&&Mt(c,t))}function u(){r=!1,a=!1}return l(e),{update:l,destroy(){n(),o()}}};function Mt(t,e){if("button"in t&&t.button>0)return!1;const n=t.target;if(!lt(n))return!1;const o=n.ownerDocument;return!o||!o.documentElement.contains(n)?!1:e&&!mn(e,n)}function mn(t,e){return t===e||t.contains(e)}function Tr(t){return(t==null?void 0:t.ownerDocument)??document}const xr={orientation:"horizontal",decorative:!1},si=t=>{const e={...xr,...t},n=On(e),{orientation:o,decorative:r}=n;return{elements:{root:Sn("separator",{stores:[o,r],returned:([i,l])=>({role:l?"none":"separator","aria-orientation":i==="vertical"?i:void 0,"aria-hidden":l,"data-orientation":i})})},options:n}};function _r(t,e){const n=[];return e.builders.forEach(o=>{const r=o.action(t);r&&n.push(r)}),{destroy:()=>{n.forEach(o=>{o.destroy&&o.destroy()})}}}function Bt(t){const e={};return t.forEach(n=>{Object.keys(n).forEach(o=>{o!=="action"&&(e[o]=n[o])})}),e}function Ar(t){let e=t[1]?"a":"button",n,o,r=(t[1]?"a":"button")&&Ge(t);return{c(){r&&r.c(),n=de()},l(a){r&&r.l(a),n=de()},m(a,i){r&&r.m(a,i),xe(a,n,i),o=!0},p(a,i){a[1],e?Me(e,a[1]?"a":"button")?(r.d(1),r=Ge(a),e=a[1]?"a":"button",r.c(),r.m(n.parentNode,n)):r.p(a,i):(r=Ge(a),e=a[1]?"a":"button",r.c(),r.m(n.parentNode,n))},i(a){o||(J(r,a),o=!0)},o(a){X(r,a),o=!1},d(a){a&&re(n),r&&r.d(a)}}}function Sr(t){let e=t[1]?"a":"button",n,o,r=(t[1]?"a":"button")&&qe(t);return{c(){r&&r.c(),n=de()},l(a){r&&r.l(a),n=de()},m(a,i){r&&r.m(a,i),xe(a,n,i),o=!0},p(a,i){a[1],e?Me(e,a[1]?"a":"button")?(r.d(1),r=qe(a),e=a[1]?"a":"button",r.c(),r.m(n.parentNode,n)):r.p(a,i):(r=qe(a),e=a[1]?"a":"button",r.c(),r.m(n.parentNode,n))},i(a){o||(J(r,a),o=!0)},o(a){X(r,a),o=!1},d(a){a&&re(n),r&&r.d(a)}}}function Ge(t){let e,n,o,r,a;const i=t[7].default,l=rt(i,t,t[6],null);let s=[{type:n=t[1]?void 0:t[2]},{href:t[1]},{tabindex:"0"},t[5],t[4]],u={};for(let c=0;c{i[c]=null}),kn(),n=i[e],n?n.p(s,u):(n=i[e]=a[e](s),n.c()),J(n,1),n.m(o.parentNode,o))},i(s){r||(J(n),r=!0)},o(s){X(n),r=!1},d(s){s&&re(o),i[e].d(s)}}}function Or(t,e,n){const o=["href","type","builders","el"];let r=Oe(e,o),{$$slots:a={},$$scope:i}=e,{href:l=void 0}=e,{type:s=void 0}=e,{builders:u=[]}=e,{el:c=void 0}=e;const f={"data-button-root":""};function p(b){C.call(this,t,b)}function m(b){C.call(this,t,b)}function v(b){C.call(this,t,b)}function g(b){C.call(this,t,b)}function y(b){C.call(this,t,b)}function w(b){C.call(this,t,b)}function x(b){C.call(this,t,b)}function A(b){C.call(this,t,b)}function k(b){C.call(this,t,b)}function P(b){C.call(this,t,b)}function D(b){C.call(this,t,b)}function L(b){C.call(this,t,b)}function B(b){C.call(this,t,b)}function j(b){C.call(this,t,b)}function I(b){C.call(this,t,b)}function M(b){C.call(this,t,b)}function O(b){C.call(this,t,b)}function d(b){C.call(this,t,b)}function h(b){C.call(this,t,b)}function T(b){C.call(this,t,b)}function S(b){yt[b?"unshift":"push"](()=>{c=b,n(0,c)})}function E(b){yt[b?"unshift":"push"](()=>{c=b,n(0,c)})}return t.$$set=b=>{e=ie(ie({},e),Vt(b)),n(5,r=Oe(e,o)),"href"in b&&n(1,l=b.href),"type"in b&&n(2,s=b.type),"builders"in b&&n(3,u=b.builders),"el"in b&&n(0,c=b.el),"$$scope"in b&&n(6,i=b.$$scope)},[c,l,s,u,f,r,i,a,p,m,v,g,y,w,x,A,k,P,D,L,B,j,I,M,O,d,h,T,S,E]}let Pr=class extends Gt{constructor(e){super(),qt(this,e,Or,Er,Me,{href:1,type:2,builders:3,el:0})}};function ci(t){return(e={})=>kr(t,e)}function kr(t,e){const o={...{side:"bottom",align:"center",sideOffset:0,alignOffset:0,sameWidth:!1,avoidCollisions:!0,collisionPadding:8,fitViewport:!1,strategy:"absolute",overlap:!1},...e};t.update(r=>({...r,placement:Cr(o.side,o.align),offset:{...r.offset,mainAxis:o.sideOffset,crossAxis:o.alignOffset},gutter:0,sameWidth:o.sameWidth,flip:o.avoidCollisions,overflowPadding:o.collisionPadding,boundary:o.collisionBoundary,fitViewport:o.fitViewport,strategy:o.strategy,overlap:o.overlap}))}function Cr(t,e){return e==="center"?t:`${t}-${e}`}function Nr(t){let e;const n=t[5].default,o=rt(n,t,t[8],null);return{c(){o&&o.c()},l(r){o&&o.l(r)},m(r,a){o&&o.m(r,a),e=!0},p(r,a){o&&o.p&&(!e||a&256)&&it(o,n,r,r[8],e?st(n,r[8],a,null):at(r[8]),null)},i(r){e||(J(o,r),e=!0)},o(r){X(o,r),e=!1},d(r){o&&o.d(r)}}}function Fr(t){let e,n;const o=[{builders:t[3]},{class:wt(Tt({variant:t[1],size:t[2],className:t[0]}))},{type:"button"},t[4]];let r={$$slots:{default:[Nr]},$$scope:{ctx:t}};for(let a=0;a{e=ie(ie({},e),Vt(m)),n(4,r=Oe(e,o)),"class"in m&&n(0,l=m.class),"variant"in m&&n(1,s=m.variant),"size"in m&&n(2,u=m.size),"builders"in m&&n(3,c=m.builders),"$$scope"in m&&n(8,i=m.$$scope)},[l,s,u,c,r,a,f,p,i]}class ui extends Gt{constructor(e){super(),qt(this,e,Rr,Fr,Me,{class:0,variant:1,size:2,builders:3})}}export{Xr as A,ui as B,Jr as C,Wr as D,Gn as a,yr as b,oi as c,ei as d,jr as e,ut as f,ri as g,zr as h,si as i,ii as j,$r as k,ti as l,ni as m,Zr as n,ci as o,Kr as p,Vr as q,Qr as r,Et as s,Ln as t,ai as u,Hr as v,Ur as w,qr as x,Gr as y,Yr as z}; diff --git a/_app/immutable/chunks/entry.p1-HE9Vh.js b/_app/immutable/chunks/entry.p1-HE9Vh.js new file mode 100644 index 0000000000000000000000000000000000000000..28b53ae713b4ec3ade4ee2a39796dabcb241f32b --- /dev/null +++ b/_app/immutable/chunks/entry.p1-HE9Vh.js @@ -0,0 +1,3 @@ +import{u as B,M as me,L as _e,s as ye,K as we,V as wt,r as ve}from"./scheduler.BZlHRu_0.js";new URL("sveltekit-internal://");function be(t,n){return t==="/"||n==="ignore"?t:n==="never"?t.endsWith("/")?t.slice(0,-1):t:n==="always"&&!t.endsWith("/")?t+"/":t}function Ee(t){return t.split("%25").map(decodeURI).join("%25")}function ke(t){for(const n in t)t[n]=decodeURIComponent(t[n]);return t}function gt({href:t}){return t.split("#")[0]}const Ae=["href","pathname","search","toString","toJSON"];function Se(t,n,e){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(r,o){if(o==="get"||o==="getAll"||o==="has")return s=>(e(s),r[o](s));n();const i=Reflect.get(r,o);return typeof i=="function"?i.bind(r):i}}),enumerable:!0,configurable:!0});for(const r of Ae)Object.defineProperty(a,r,{get(){return n(),t[r]},enumerable:!0,configurable:!0});return a}const Re="/__data.json",Ie=".html__data.json";function Le(t){return t.endsWith(".html")?t.replace(/\.html$/,Ie):t.replace(/\/$/,"")+Re}function Pe(...t){let n=5381;for(const e of t)if(typeof e=="string"){let a=e.length;for(;a;)n=n*33^e.charCodeAt(--a)}else if(ArrayBuffer.isView(e)){const a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);let r=a.length;for(;r;)n=n*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(n>>>0).toString(36)}function Ue(t){const n=atob(t),e=new Uint8Array(n.length);for(let a=0;a((t instanceof Request?t.method:(n==null?void 0:n.method)||"GET")!=="GET"&&H.delete(At(t)),Ht(t,n));const H=new Map;function xe(t,n){const e=At(t,n),a=document.querySelector(e);if(a!=null&&a.textContent){let{body:r,...o}=JSON.parse(a.textContent);const i=a.getAttribute("data-ttl");return i&&H.set(e,{body:r,init:o,ttl:1e3*Number(i)}),a.getAttribute("data-b64")!==null&&(r=Ue(r)),Promise.resolve(new Response(r,o))}return window.fetch(t,n)}function Te(t,n,e){if(H.size>0){const a=At(t,e),r=H.get(a);if(r){if(performance.now(){const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return n.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const o=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(o)return n.push({name:o[1],matcher:o[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const i=a.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return mt(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return mt(String.fromCharCode(...c.slice(2).split("-").map(f=>parseInt(f,16))));const u=Ne.exec(c),[,h,p,d,g]=u;return n.push({name:d,matcher:g,optional:!!h,rest:!!p,chained:p?l===1&&i[0]==="":!1}),p?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return mt(c)}).join("")}).join("")}/?$`),params:n}}function je(t){return!/^\([^)]+\)$/.test(t)}function $e(t){return t.slice(1).split("/").filter(je)}function De(t,n,e){const a={},r=t.slice(1),o=r.filter(s=>s!==void 0);let i=0;for(let s=0;su).join("/"),i=0),l===void 0){c.rest&&(a[c.name]="");continue}if(!c.matcher||e[c.matcher](l)){a[c.name]=l;const u=n[s+1],h=r[s+1];u&&!u.rest&&u.optional&&h&&c.chained&&(i=0),!u&&!h&&Object.keys(a).length===o.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return a}function mt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ce({nodes:t,server_loads:n,dictionary:e,matchers:a}){const r=new Set(n);return Object.entries(e).map(([s,[c,l,u]])=>{const{pattern:h,params:p}=Oe(s),d={id:s,exec:g=>{const f=h.exec(g);if(f)return De(f,p,a)},errors:[1,...u||[]].map(g=>t[g]),layouts:[0,...l||[]].map(i),leaf:o(c)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function o(s){const c=s<0;return c&&(s=~s),[c,t[s]]}function i(s){return s===void 0?s:[r.has(s),t[s]]}}function Kt(t,n=JSON.parse){try{return n(sessionStorage[t])}catch{}}function jt(t,n,e=JSON.stringify){const a=e(n);try{sessionStorage[t]=a}catch{}}const $=[];function Ve(t,n){return{subscribe:st(t,n).subscribe}}function st(t,n=B){let e;const a=new Set;function r(s){if(ye(t,s)&&(t=s,e)){const c=!$.length;for(const l of a)l[1](),$.push(l,t);if(c){for(let l=0;l<$.length;l+=2)$[l][0]($[l+1]);$.length=0}}}function o(s){r(s(t))}function i(s,c=B){const l=[s,c];return a.add(l),a.size===1&&(e=n(r,o)||B),s(t),()=>{a.delete(l),a.size===0&&e&&(e(),e=null)}}return{set:r,update:o,subscribe:i}}function dn(t,n,e){const a=!Array.isArray(t),r=a?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=n.length<2;return Ve(e,(i,s)=>{let c=!1;const l=[];let u=0,h=B;const p=()=>{if(u)return;h();const g=n(a?l[0]:l,i,s);o?i(g):h=we(g)?g:B},d=r.map((g,f)=>me(g,_=>{l[f]=_,u&=~(1<{u|=1<i)}function r(i){e=!1,n.set(i)}function o(i){let s;return n.subscribe(c=>{(s===void 0||e&&c!==s)&&i(s=c)})}return{notify:a,set:r,subscribe:o}}function Ge(){const{set:t,subscribe:n}=st(!1);let e;async function a(){clearTimeout(e);try{const r=await fetch(`${Fe}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const i=(await r.json()).version!==qe;return i&&(t(!0),clearTimeout(e)),i}catch{return!1}}return{subscribe:n,check:a}}function it(t,n){return t.origin!==X||!t.pathname.startsWith(n)}const Be=-1,He=-2,Ke=-3,ze=-4,Je=-5,Ye=-6;function pn(t,n){return Zt(JSON.parse(t),n)}function Zt(t,n){if(typeof t=="number")return r(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const e=t,a=Array(e.length);function r(o,i=!1){if(o===Be)return;if(o===Ke)return NaN;if(o===ze)return 1/0;if(o===Je)return-1/0;if(o===Ye)return-0;if(i)throw new Error("Invalid input");if(o in a)return a[o];const s=e[o];if(!s||typeof s!="object")a[o]=s;else if(Array.isArray(s))if(typeof s[0]=="string"){const c=s[0],l=n==null?void 0:n[c];if(l)return a[o]=l(r(s[1]));switch(c){case"Date":a[o]=new Date(s[1]);break;case"Set":const u=new Set;a[o]=u;for(let d=1;dn!=null)}class ct{constructor(n,e){this.status=n,typeof e=="string"?this.body={message:e}:e?this.body=e:this.body={message:`Error: ${n}`}}toString(){return JSON.stringify(this.body)}}class te{constructor(n,e){this.status=n,this.location=e}}class It extends Error{constructor(n,e,a){super(a),this.status=n,this.text=e}}const Ze="x-sveltekit-invalidated",Qe="x-sveltekit-trailing-slash";function nt(t){return t instanceof ct||t instanceof It?t.status:500}function tn(t){return t instanceof It?t.text:"Internal Error"}const j=Kt(Jt)??{},J=Kt(zt)??{},x={url:Dt({}),page:Dt({}),navigating:st(null),updated:Ge()};function Lt(t){j[t]=Rt()}function en(t,n){let e=t+1;for(;j[e];)delete j[e],e+=1;for(e=n+1;J[e];)delete J[e],e+=1}function F(t){return location.href=t.href,new Promise(()=>{})}function Ct(){}let lt,bt,at,U,Et,M;const ee=[],rt=[];let I=null;const ne=[],nn=[];let N=[],y={branch:[],error:null,url:null},Pt=!1,ot=!1,Vt=!0,Y=!1,G=!1,ae=!1,ft=!1,O,A,L,S,q;const K=new Set;let _t;async function gn(t,n,e){var r,o;document.URL!==location.href&&(location.href=location.href),M=t,lt=Ce(t),U=document.documentElement,Et=n,bt=t.nodes[0],at=t.nodes[1],bt(),at(),A=(r=history.state)==null?void 0:r[C],L=(o=history.state)==null?void 0:o[z],A||(A=L=Date.now(),history.replaceState({...history.state,[C]:A,[z]:L},""));const a=j[A];a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y)),e?await fn(Et,e):cn(location.href,{replaceState:!0}),ln()}async function an(){if(await(_t||(_t=Promise.resolve())),!_t)return;_t=null;const t=Z(y.url,!0);I=null;const n=q={},e=t&&await Tt(t);if(!(!e||n!==q)){if(e.type==="redirect")return ut(new URL(e.location,y.url).href,{},1,n);e.props.page&&(S=e.props.page),y=e.state,re(),O.$set(e.props)}}function re(){ee.length=0,ft=!1}function oe(t){rt.some(n=>n==null?void 0:n.snapshot)&&(J[t]=rt.map(n=>{var e;return(e=n==null?void 0:n.snapshot)==null?void 0:e.capture()}))}function se(t){var n;(n=J[t])==null||n.forEach((e,a)=>{var r,o;(o=(r=rt[a])==null?void 0:r.snapshot)==null||o.restore(e)})}function Ft(){Lt(A),jt(Jt,j),oe(L),jt(zt,J)}async function ut(t,n,e,a){return Q({type:"goto",url:St(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:e,nav_token:a,accept:()=>{n.invalidateAll&&(ft=!0)}})}async function ie(t){if(t.id!==(I==null?void 0:I.id)){const n={};K.add(n),I={id:t.id,token:n,promise:Tt({...t,preload:n}).then(e=>(K.delete(n),e.type==="loaded"&&e.state.error&&(I=null),e))}}return I.promise}async function yt(t){const n=lt.find(e=>e.exec(fe(t)));n&&await Promise.all([...n.layouts,n.leaf].map(e=>e==null?void 0:e[1]()))}function ce(t,n){var r;y=t.state;const e=document.querySelector("style[data-sveltekit]");e&&e.remove(),S=t.props.page,O=new M.root({target:n,props:{...t.props,stores:x,components:rt},hydrate:!0}),se(L);const a={from:null,to:{params:y.params,route:{id:((r=y.route)==null?void 0:r.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};N.forEach(o=>o(a)),ot=!0}async function W({url:t,params:n,branch:e,status:a,error:r,route:o,form:i}){let s="never";if(P&&(t.pathname===P||t.pathname===P+"/"))s="always";else for(const d of e)(d==null?void 0:d.slash)!==void 0&&(s=d.slash);t.pathname=be(t.pathname,s),t.search=t.search;const c={type:"loaded",state:{url:t,params:n,branch:e,error:r,route:o},props:{constructors:Xe(e).map(d=>d.node.component),page:S}};i!==void 0&&(c.props.form=i);let l={},u=!S,h=0;for(let d=0;d(s&&(c.route=!0),f[_])}),params:new Proxy(a,{get:(f,_)=>(s&&c.params.add(_),f[_])}),data:(o==null?void 0:o.data)??null,url:Se(e,()=>{s&&(c.url=!0)},f=>{s&&c.search_params.add(f)}),async fetch(f,_){let b;f instanceof Request?(b=f.url,_={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:f.headers,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,..._}):b=f;const R=new URL(b,e);return s&&d(R.href),R.origin===e.origin&&(b=R.href.slice(e.origin.length)),ot?Te(b,R.href,_):xe(b,_)},setHeaders:()=>{},depends:d,parent(){return s&&(c.parent=!0),n()},untrack(f){s=!1;try{return f()}finally{s=!0}}};i=await l.universal.load.call(null,g)??null}return{node:l,loader:t,server:o,universal:(h=l.universal)!=null&&h.load?{type:"data",data:i,uses:c}:null,data:i??(o==null?void 0:o.data)??null,slash:((p=l.universal)==null?void 0:p.trailingSlash)??(o==null?void 0:o.slash)}}function qt(t,n,e,a,r,o){if(ft)return!0;if(!r)return!1;if(r.parent&&t||r.route&&n||r.url&&e)return!0;for(const i of r.search_params)if(a.has(i))return!0;for(const i of r.params)if(o[i]!==y.params[i])return!0;for(const i of r.dependencies)if(ee.some(s=>s(new URL(i))))return!0;return!1}function xt(t,n){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?n??null:null}function rn(t,n){if(!t)return new Set(n.searchParams.keys());const e=new Set([...t.searchParams.keys(),...n.searchParams.keys()]);for(const a of e){const r=t.searchParams.getAll(a),o=n.searchParams.getAll(a);r.every(i=>o.includes(i))&&o.every(i=>r.includes(i))&&e.delete(a)}return e}function Mt({error:t,url:n,route:e,params:a}){return{type:"loaded",state:{error:t,url:n,route:e,params:a,branch:[]},props:{page:S,constructors:[]}}}async function Tt({id:t,invalidating:n,url:e,params:a,route:r,preload:o}){if((I==null?void 0:I.id)===t)return K.delete(I.token),I.promise;const{errors:i,layouts:s,leaf:c}=r,l=[...s,c];i.forEach(m=>m==null?void 0:m().catch(()=>{})),l.forEach(m=>m==null?void 0:m[1]().catch(()=>{}));let u=null;const h=y.url?t!==y.url.pathname+y.url.search:!1,p=y.route?r.id!==y.route.id:!1,d=rn(y.url,e);let g=!1;const f=l.map((m,v)=>{var T;const E=y.branch[v],k=!!(m!=null&&m[0])&&((E==null?void 0:E.loader)!==m[1]||qt(g,p,h,d,(T=E.server)==null?void 0:T.uses,a));return k&&(g=!0),k});if(f.some(Boolean)){try{u=await he(e,f)}catch(m){const v=await V(m,{url:e,params:a,route:{id:t}});return K.has(o)?Mt({error:v,url:e,params:a,route:r}):dt({status:nt(m),error:v,url:e,route:r})}if(u.type==="redirect")return u}const _=u==null?void 0:u.nodes;let b=!1;const R=l.map(async(m,v)=>{var ht;if(!m)return;const E=y.branch[v],k=_==null?void 0:_[v];if((!k||k.type==="skip")&&m[1]===(E==null?void 0:E.loader)&&!qt(b,p,h,d,(ht=E.universal)==null?void 0:ht.uses,a))return E;if(b=!0,(k==null?void 0:k.type)==="error")throw k;return Ut({loader:m[1],url:e,params:a,route:r,parent:async()=>{var Ot;const Nt={};for(let pt=0;pt{});const w=[];for(let m=0;mPromise.resolve({}),server_data_node:xt(o)}),c={node:await at(),loader:at,universal:null,server:null,data:null};return await W({url:e,params:r,branch:[s,c],status:t,error:n,route:null})}function Z(t,n){if(!t||it(t,P))return;let e;try{e=M.hooks.reroute({url:new URL(t)})??t.pathname}catch{return}const a=fe(e);for(const r of lt){const o=r.exec(a);if(o)return{id:t.pathname+t.search,invalidating:n,route:r,params:ke(o),url:t}}}function fe(t){return Ee(t.slice(P.length)||"/")}function ue({url:t,type:n,intent:e,delta:a}){let r=!1;const o=ge(y,e,t,n);a!==void 0&&(o.navigation.delta=a);const i={...o.navigation,cancel:()=>{r=!0,o.reject(new Error("navigation cancelled"))}};return Y||ne.forEach(s=>s(i)),r?null:o}async function Q({type:t,url:n,popped:e,keepfocus:a,noscroll:r,replace_state:o,state:i={},redirect_count:s=0,nav_token:c={},accept:l=Ct,block:u=Ct}){const h=Z(n,!1),p=ue({url:n,type:t,delta:e==null?void 0:e.delta,intent:h});if(!p){u();return}const d=A,g=L;l(),Y=!0,ot&&x.navigating.set(p.navigation),q=c;let f=h&&await Tt(h);if(!f){if(it(n,P))return await F(n);f=await de(n,{id:null},await V(new It(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404)}if(n=(h==null?void 0:h.url)||n,q!==c)return p.reject(new Error("navigation aborted")),!1;if(f.type==="redirect")if(s>=20)f=await dt({status:500,error:await V(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}});else return ut(new URL(f.location,n).href,{},s+1,c),!1;else f.props.page.status>=400&&await x.updated.check()&&await F(n);if(re(),Lt(d),oe(g),f.props.page.url.pathname!==n.pathname&&(n.pathname=f.props.page.url.pathname),i=e?e.state:i,!e){const w=o?0:1,m={[C]:A+=w,[z]:L+=w,[Yt]:i};(o?history.replaceState:history.pushState).call(history,m,"",n),o||en(A,L)}if(I=null,f.props.page.state=i,ot){y=f.state,f.props.page&&(f.props.page.url=n);const w=(await Promise.all(nn.map(m=>m(p.navigation)))).filter(m=>typeof m=="function");if(w.length>0){let m=function(){N=N.filter(v=>!w.includes(v))};w.push(m),N.push(...w)}O.$set(f.props),ae=!0}else ce(f,Et);const{activeElement:_}=document;await wt();const b=e?e.scroll:r?Rt():null;if(Vt){const w=n.hash&&document.getElementById(decodeURIComponent(n.hash.slice(1)));b?scrollTo(b.x,b.y):w?w.scrollIntoView():scrollTo(0,0)}const R=document.activeElement!==_&&document.activeElement!==document.body;!a&&!R&&kt(),Vt=!0,f.props.page&&(S=f.props.page),Y=!1,t==="popstate"&&se(L),p.fulfil(void 0),N.forEach(w=>w(p.navigation)),x.navigating.set(null)}async function de(t,n,e,a){return t.origin===X&&t.pathname===location.pathname&&!Pt?await dt({status:a,error:e,url:t,route:n}):await F(t)}function on(){let t;U.addEventListener("mousemove",o=>{const i=o.target;clearTimeout(t),t=setTimeout(()=>{a(i,2)},20)});function n(o){a(o.composedPath()[0],1)}U.addEventListener("mousedown",n),U.addEventListener("touchstart",n,{passive:!0});const e=new IntersectionObserver(o=>{for(const i of o)i.isIntersecting&&(yt(i.target.href),e.unobserve(i.target))},{threshold:0});function a(o,i){const s=Xt(o,U);if(!s)return;const{url:c,external:l,download:u}=vt(s,P);if(l||u)return;const h=et(s);if(!h.reload)if(i<=h.preload_data){const p=Z(c,!1);p&&ie(p)}else i<=h.preload_code&&yt(c.pathname)}function r(){e.disconnect();for(const o of U.querySelectorAll("a")){const{url:i,external:s,download:c}=vt(o,P);if(s||c)continue;const l=et(o);l.reload||(l.preload_code===tt.viewport&&e.observe(o),l.preload_code===tt.eager&&yt(i.pathname))}}N.push(r),r()}function V(t,n){if(t instanceof ct)return t.body;const e=nt(t),a=tn(t);return M.hooks.handleError({error:t,event:n,status:e,message:a})??{message:a}}function sn(t,n){ve(()=>(t.push(n),()=>{const e=t.indexOf(n);t.splice(e,1)}))}function mn(t){sn(N,t)}function cn(t,n={}){return t=St(t),t.origin!==X?Promise.reject(new Error("goto: invalid URL")):ut(t,n,0)}function _n(){return ft=!0,an()}async function yn(t){const n=St(t),e=Z(n,!1);if(!e)throw new Error(`Attempted to preload a URL that does not belong to this app: ${n}`);const a=await ie(e);if(a.type==="redirect")return{type:a.type,location:a.location};const{status:r,data:o}=a.props.page??S;return{type:a.type,status:r,data:o}}async function wn(t){if(t.type==="error"){const n=new URL(location.href),{branch:e,route:a}=y;if(!a)return;const r=await le(y.branch.length,e,a.errors);if(r){const o=await W({url:n,params:y.params,branch:e.slice(0,r.idx).concat(r.node),status:t.status??500,error:t.error,route:a});y=o.state,O.$set(o.props),wt().then(kt)}}else t.type==="redirect"?ut(t.location,{invalidateAll:!0},0):(O.$set({form:null,page:{...S,form:t.data,status:t.status}}),await wt(),O.$set({form:t.data}),t.type==="success"&&kt())}function ln(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let a=!1;if(Ft(),!Y){const r=ge(y,void 0,null,"leave"),o={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};ne.forEach(i=>i(o))}a?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ft()}),(n=navigator.connection)!=null&&n.saveData||on(),U.addEventListener("click",e=>{var p;if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const a=Xt(e.composedPath()[0],U);if(!a)return;const{url:r,external:o,target:i,download:s}=vt(a,P);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=et(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;if(o||c.reload){ue({url:r,type:"link"})?Y=!0:e.preventDefault();return}const[u,h]=r.href.split("#");if(h!==void 0&&u===gt(location)){const[,d]=y.url.href.split("#");if(d===h){e.preventDefault(),h===""||h==="top"&&a.ownerDocument.getElementById("top")===null?window.scrollTo({top:0}):(p=a.ownerDocument.getElementById(h))==null||p.scrollIntoView();return}if(G=!0,Lt(A),t(r),!c.replace_state)return;G=!1}e.preventDefault(),Q({type:"link",url:r,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??r.href===location.href})}),U.addEventListener("submit",e=>{if(e.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(e.target),r=e.submitter;if(((r==null?void 0:r.formMethod)||a.method)!=="get")return;const i=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(it(i,P))return;const s=e.target,c=et(s);if(c.reload)return;e.preventDefault(),e.stopPropagation();const l=new FormData(s),u=r==null?void 0:r.getAttribute("name");u&&l.append(u,(r==null?void 0:r.getAttribute("value"))??""),i.search=new URLSearchParams(l).toString(),Q({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async e=>{var a;if((a=e.state)!=null&&a[C]){const r=e.state[C];if(q={},r===A)return;const o=j[r],i=e.state[Yt]??{},s=new URL(e.state[Me]??location.href),c=e.state[z],l=gt(location)===gt(y.url);if(c===L&&(ae||l)){t(s),j[A]=Rt(),o&&scrollTo(o.x,o.y),i!==S.state&&(S={...S,state:i},O.$set({page:S})),A=r;return}const h=r-A;await Q({type:"popstate",url:s,popped:{state:i,scroll:o,delta:h},accept:()=>{A=r,L=c},block:()=>{history.go(-h)},nav_token:q})}else if(!G){const r=new URL(location.href);t(r)}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[C]:++A,[z]:L},"",location.href))});for(const e of document.querySelectorAll("link"))e.rel==="icon"&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&x.navigating.set(null)});function t(e){y.url=e,x.page.set({...S,url:e}),x.page.notify()}}async function fn(t,{status:n=200,error:e,node_ids:a,params:r,route:o,data:i,form:s}){Pt=!0;const c=new URL(location.href);({params:r={},route:o={id:null}}=Z(c,!1)||{});let l;try{const u=a.map(async(d,g)=>{const f=i[g];return f!=null&&f.uses&&(f.uses=pe(f.uses)),Ut({loader:M.nodes[d],url:c,params:r,route:o,parent:async()=>{const _={};for(let b=0;bd===o.id);if(p){const d=p.layouts;for(let g=0;go?"1":"0").join(""));const a=await Ht(e.href);if(!a.ok){let o;throw(r=a.headers.get("content-type"))!=null&&r.includes("application/json")?o=await a.json():a.status===404?o="Not Found":a.status===500&&(o="Internal Error"),new ct(a.status,o)}return new Promise(async o=>{var h;const i=new Map,s=a.body.getReader(),c=new TextDecoder;function l(p){return Zt(p,{Promise:d=>new Promise((g,f)=>{i.set(d,{fulfil:g,reject:f})})})}let u="";for(;;){const{done:p,value:d}=await s.read();if(p&&!u)break;for(u+=!d&&u?` +`:c.decode(d,{stream:!0});;){const g=u.indexOf(` +`);if(g===-1)break;const f=JSON.parse(u.slice(0,g));if(u=u.slice(g+1),f.type==="redirect")return o(f);if(f.type==="data")(h=f.nodes)==null||h.forEach(_=>{(_==null?void 0:_.type)==="data"&&(_.uses=pe(_.uses),_.data=l(_.data))}),o(f);else if(f.type==="chunk"){const{id:_,data:b,error:R}=f,w=i.get(_);i.delete(_),R?w.reject(l(R)):w.fulfil(l(b))}}}})}function pe(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}function kt(){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=document.body,e=n.getAttribute("tabindex");n.tabIndex=-1,n.focus({preventScroll:!0,focusVisible:!1}),e!==null?n.setAttribute("tabindex",e):n.removeAttribute("tabindex");const a=getSelection();if(a&&a.type!=="None"){const r=[];for(let o=0;o{if(a.rangeCount===r.length){for(let o=0;o{r=u,o=h});return i.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:e&&{params:(n==null?void 0:n.params)??null,route:{id:((l=n==null?void 0:n.route)==null?void 0:l.id)??null},url:e},willUnload:!n,type:a,complete:i},fulfil:r,reject:o}}export{hn as a,wn as b,mn as c,dn as d,yn as e,gn as f,cn as g,_n as i,pn as p,Ve as r,x as s,st as w}; diff --git a/_app/immutable/chunks/leaflet-src.C2Mhlg_w.js b/_app/immutable/chunks/leaflet-src.C2Mhlg_w.js new file mode 100644 index 0000000000000000000000000000000000000000..1c5d9dfabcd466b4c5973106c7aff36c72f6fb8c --- /dev/null +++ b/_app/immutable/chunks/leaflet-src.C2Mhlg_w.js @@ -0,0 +1,4 @@ +import{l as Vo,m as qo}from"./VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";function jo(Gt,Vt){for(var l=0;lit[x]})}}}return Object.freeze(Object.defineProperty(Gt,Symbol.toStringTag,{value:"Module"}))}var Xe={exports:{}};/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */(function(Gt,Vt){(function(l,it){it(Vt)})(qo,function(l){var it="1.9.4";function x(t){var e,i,n,o;for(i=1,n=arguments.length;i"u"||!L||!L.Mixin)){t=K(t)?t:[t];for(var e=0;e0?Math.floor(t):Math.ceil(t)};m.prototype={clone:function(){return new m(this.x,this.y)},add:function(t){return this.clone()._add(_(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(_(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new m(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new m(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=oi(this.x),this.y=oi(this.y),this},distanceTo:function(t){t=_(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=_(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=_(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+J(this.x)+", "+J(this.y)+")"}};function _(t,e,i){return t instanceof m?t:K(t)?new m(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new m(t.x,t.y):new m(t,e,i)}function z(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=F(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=F(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,On=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",E,e),window.removeEventListener("testPassiveEventSupport",E,e)}catch{}return t}(),In=function(){return!!document.createElement("canvas").getContext}(),Le=!!(document.createElementNS&&ri("svg").createSVGRect),An=!!Le&&function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Bn=!Le&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}(),Nn=navigator.platform.indexOf("Mac")===0,Rn=navigator.platform.indexOf("Linux")===0;function $(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var f={ie:jt,ielt9:xn,edge:hi,webkit:we,android:ui,android23:li,androidStock:Ln,opera:xe,chrome:ci,gecko:fi,safari:Tn,phantom:di,opera12:_i,win:bn,ie3d:mi,webkit3d:Pe,gecko3d:pi,any3d:Mn,mobile:Et,mobileWebkit:Sn,mobileWebkit3d:Cn,msPointer:vi,pointer:gi,touch:zn,touchNative:yi,mobileOpera:kn,mobileGecko:En,retina:Zn,passiveEvents:On,canvas:In,svg:Le,vml:Bn,inlineSvg:An,mac:Nn,linux:Rn},wi=f.msPointer?"MSPointerDown":"pointerdown",xi=f.msPointer?"MSPointerMove":"pointermove",Pi=f.msPointer?"MSPointerUp":"pointerup",Li=f.msPointer?"MSPointerCancel":"pointercancel",Te={touchstart:wi,touchmove:xi,touchend:Pi,touchcancel:Li},Ti={touchstart:Gn,touchmove:Kt,touchend:Kt,touchcancel:Kt},yt={},bi=!1;function Dn(t,e,i){return e==="touchstart"&&Un(),Ti[e]?(i=Ti[e].bind(this,i),t.addEventListener(Te[e],i,!1),i):(console.warn("wrong event specified:",e),E)}function Fn(t,e,i){if(!Te[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(Te[e],i,!1)}function Hn(t){yt[t.pointerId]=t}function Wn(t){yt[t.pointerId]&&(yt[t.pointerId]=t)}function Mi(t){delete yt[t.pointerId]}function Un(){bi||(document.addEventListener(wi,Hn,!0),document.addEventListener(xi,Wn,!0),document.addEventListener(Pi,Mi,!0),document.addEventListener(Li,Mi,!0),bi=!0)}function Kt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in yt)e.touches.push(yt[i]);e.changedTouches=[e],t(e)}}function Gn(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&N(e),Kt(t,e)}function Vn(t){var e={},i,n;for(n in t)i=t[n],e[n]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var qn=200;function jn(t,e){t.addEventListener("dblclick",e);var i=0,n;function o(s){if(s.detail!==1){n=s.detail;return}if(!(s.pointerType==="mouse"||s.sourceCapabilities&&!s.sourceCapabilities.firesTouchEvents)){var r=Ei(s);if(!(r.some(function(h){return h instanceof HTMLLabelElement&&h.attributes.for})&&!r.some(function(h){return h instanceof HTMLInputElement||h instanceof HTMLSelectElement}))){var a=Date.now();a-i<=qn?(n++,n===2&&e(Vn(s))):n=1,i=a}}}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function Kn(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var be=Jt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Zt=Jt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Si=Zt==="webkitTransition"||Zt==="OTransition"?Zt+"End":"transitionend";function Ci(t){return typeof t=="string"?document.getElementById(t):t}function Ot(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function T(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function k(t){var e=t.parentNode;e&&e.removeChild(t)}function Yt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function wt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function xt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Me(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=Xt(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function v(t,e){if(t.classList!==void 0)for(var i=dt(e),n=0,o=i.length;n0?2*window.devicePixelRatio:1;function Oi(t){return f.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Jn:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Re(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var $n={__proto__:null,on:p,off:M,stopPropagation:pt,disableScrollPropagation:Ne,disableClickPropagation:Nt,preventDefault:N,stop:vt,getPropagationPath:Ei,getMousePosition:Zi,getWheelDelta:Oi,isExternalTarget:Re,addListener:p,removeListener:M},Ii=zt.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=mt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=D(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,O(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=_(e.paddingTopLeft||e.padding||[0,0]),n=_(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=F([r.min.add(i),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var u=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(h);o.x+=u.x<0?-c.x:c.x,o.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=x({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(S(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=x({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=S(this._handleGeolocationResponse,this),i=S(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=new b(e,i),o=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(o);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var a={latlng:n,bounds:o,timestamp:t.timestamp};for(var h in t.coords)typeof t.coords[h]=="number"&&(a[h]=t.coords[h]);this.fire("locationfound",a)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),k(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(G(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)k(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=T("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new H(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=O(t),i=_(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),u=F(this.project(a,n),this.project(r,n)).getSize(),c=f.any3d?this.options.zoomSnap:1,d=h.x/u.x,g=h.y/u.y,R=e?Math.max(d,g):Math.min(d,g);return n=this.getScaleZoom(R,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new m(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new z(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(y(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(_(t),e)},layerPointToLatLng:function(t){var e=_(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(y(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(y(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(O(t))},distance:function(t,e){return this.options.crs.distance(y(t),y(e))},containerPointToLayerPoint:function(t){return _(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return _(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(_(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(y(t)))},mouseEventToContainerPoint:function(t){return Zi(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Ci(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");p(e,"scroll",this._onScroll,this),this._containerId=P(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&f.any3d,v(t,"leaflet-container"+(f.touch?" leaflet-touch":"")+(f.retina?" leaflet-retina":"")+(f.ielt9?" leaflet-oldie":"")+(f.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Ot(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),I(this._mapPane,new m(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(v(t.markerPane,"leaflet-zoom-hide"),v(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){I(this._mapPane,new m(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){e===void 0&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return G(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){I(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[P(this._container)]=this;var e=t?M:p;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),f.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){G(this._resizeRequest),this._resizeRequest=D(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,o=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,r=!1;s;){if(n=this._targets[P(s)],n&&(e==="click"||e==="preclick")&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)&&(o&&!Re(s,t)||(i.push(n),o))||s===this._container)break;s=s.parentNode}return!i.length&&!r&&!o&&this.listens(e,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var i=t.type;i==="mousedown"&&Ze(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=x({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var o=this._findEventTargets(t,e);if(i){for(var s=[],r=0;r0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=f.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Z(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=T("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=be,n=this._proxy.style[i];_t(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){k(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();_t(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(o)?!1:(D(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,v(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(S(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Qn(t,e){return new w(t,e)}var Y=nt.extend({options:{position:"topright"},initialize:function(t){C(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return v(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(k(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Rt=function(t){return new Y(t)};w.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=T("div",e+"control-container",this._container);function n(o,s){var r=e+o+" "+e+s;t[o+s]=T("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)k(this._controlCorners[t]);k(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ai=Y.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(P(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+P(this),i),this._layerControlInputs.push(n),n.layerId=P(t.layer),p(n,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");e.appendChild(s),s.appendChild(n),s.appendChild(o);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,n=[],o=[];this._handlingClick=!0;for(var s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||o.push(i);for(s=0;s=0;o--)e=t[o],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,p(t,"click",N),this.expand();var e=this;setTimeout(function(){M(t,"click",N),e._preventClick=!1})}}),to=function(t,e,i){return new Ai(t,e,i)},De=Y.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=T("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=T("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Nt(s),p(s,"click",vt),p(s,"click",o,this),p(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";Z(this._zoomInButton,e),Z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(v(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(v(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});w.mergeOptions({zoomControl:!0}),w.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new De,this.addControl(this.zoomControl))});var eo=function(t){return new De(t)},Bi=Y.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=T("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=T("div",e,i)),t.imperial&&(this._iScale=T("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,o;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,o+" ft",o/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),io=function(t){return new Bi(t)},no='',Fe=Y.extend({options:{position:"bottomright",prefix:''+(f.inlineSvg?no+" ":"")+"Leaflet"},initialize:function(t){C(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=T("div","leaflet-control-attribution"),Nt(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' ')}}});w.mergeOptions({attributionControl:!0}),w.addInitHook(function(){this.options.attributionControl&&new Fe().addTo(this)});var oo=function(t){return new Fe(t)};Y.Layers=Ai,Y.Zoom=De,Y.Scale=Bi,Y.Attribution=Fe,Rt.layers=to,Rt.zoom=eo,Rt.scale=io,Rt.attribution=oo;var tt=nt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});tt.addTo=function(t,e){return t.addHandler(e,this),this};var so={Events:U},Ni=f.touch?"touchstart mousedown":"mousedown",ct=zt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){C(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(p(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ct._dragging===this&&this.finishDrag(!0),M(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Me(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){ct._dragging===this&&this.finishDrag();return}if(!(ct._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(ct._dragging=this,this._preventOutline&&Ze(this._element),ze(),It(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=zi(this._element);this._startPoint=new m(e.clientX,e.clientY),this._startPos=mt(this._element),this._parentScale=Oe(i);var n=t.type==="mousedown";p(document,n?"mousemove":"touchmove",this._onMove,this),p(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new m(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)s&&(r=a,s=h);s>i&&(e[r]=1,We(t,e,i,n,r),We(t,e,i,r,o))}function uo(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function lo(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Dt(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,a=i.y-s,h=r*r+a*a,u;return h>0&&(u=((t.x-o)*r+(t.y-s)*a)/h,u>1?(o=i.x,s=i.y):u>0&&(o+=r*u,s+=a*u)),r=t.x-o,a=t.y-s,n?r*r+a*a:new m(o,s)}function q(t){return!K(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Gi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),q(t)}function Vi(t,e){var i,n,o,s,r,a,h,u;if(!t||t.length===0)throw new Error("latlngs not passed");q(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=y([0,0]),d=O(t),g=d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest());g<1700&&(c=He(t));var R=t.length,B=[];for(i=0;in){h=(s-n)/o,u=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}var W=e.unproject(_(u));return y([W.lat+c.lat,W.lng+c.lng])}var co={__proto__:null,simplify:Fi,pointToSegmentDistance:Hi,closestPointOnSegment:ao,clipSegment:Ui,_getEdgeIntersection:te,_getBitCode:gt,_sqClosestPointOnSegment:Dt,isFlat:q,_flat:Gi,polylineCenter:Vi},Ue={project:function(t){return new m(t.lng,t.lat)},unproject:function(t){return new b(t.y,t.x)},bounds:new z([-180,-90],[180,90])},Ge={R:6378137,R_MINOR:6356752314245179e-9,bounds:new z([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-i*Math.log(Math.max(a,1e-10)),new m(t.lng*e*i,n)},unproject:function(t){for(var e=180/Math.PI,i=this.R,n=this.R_MINOR/i,o=Math.sqrt(1-n*n),s=Math.exp(-t.y/i),r=Math.PI/2-2*Math.atan(s),a=0,h=.1,u;a<15&&Math.abs(h)>1e-7;a++)u=o*Math.sin(r),u=Math.pow((1-u)/(1+u),o/2),h=Math.PI/2-2*Math.atan(s*u)-r,r+=h;return new b(r*e,t.x*e/i)}},fo={__proto__:null,LonLat:Ue,Mercator:Ge,SphericalMercator:pe},_o=x({},lt,{code:"EPSG:3395",projection:Ge,transformation:function(){var t=.5/(Math.PI*Ge.R);return kt(t,.5,-t,.5)}()}),qi=x({},lt,{code:"EPSG:4326",projection:Ue,transformation:kt(1/180,1,-1/180,.5)}),mo=x({},ot,{projection:Ue,transformation:kt(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});ot.Earth=lt,ot.EPSG3395=_o,ot.EPSG3857=ge,ot.EPSG900913=wn,ot.EPSG4326=qi,ot.Simple=mo;var X=zt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[P(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[P(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});w.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=P(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=P(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return P(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?K(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof b&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){rt.prototype._setLatLngs.call(this,t),q(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return q(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new m(e,e);if(t=new z(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var n=0,o=this._rings.length,s;nt.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(e=!e);return e||rt.prototype._containsPoint.call(this,t,!0)}});function Lo(t,e){return new Tt(t,e)}var at=st.extend({initialize:function(t,e){C(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=K(t)?t:t.features,i,n,o;if(e){for(i=0,n=e.length;i0&&o.push(o[0].slice()),o}function bt(t,e){return t.feature?x({},t.feature,{geometry:e}):re(e)}function re(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Ke={toGeoJSON:function(t){return bt(this,{type:"Point",coordinates:je(this.getLatLng(),t)})}};ee.include(Ke),Ve.include(Ke),ie.include(Ke),rt.include({toGeoJSON:function(t){var e=!q(this._latlngs),i=se(this._latlngs,e?1:0,!1,t);return bt(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Tt.include({toGeoJSON:function(t){var e=!q(this._latlngs),i=e&&!q(this._latlngs[0]),n=se(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),bt(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Pt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),bt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var i=e==="GeometryCollection",n=[];return this.eachLayer(function(o){if(o.toGeoJSON){var s=o.toGeoJSON(t);if(i)n.push(s.geometry);else{var r=re(s);r.type==="FeatureCollection"?n.push.apply(n,r.features):n.push(r)}}}),i?bt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});function Yi(t,e){return new at(t,e)}var To=Yi,ae=X.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=O(e),C(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(v(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){k(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&wt(this._image),this},bringToBack:function(){return this._map&&xt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=O(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:T("img");if(v(e,"leaflet-image-layer"),this._zoomAnimated&&v(e,"leaflet-zoom-animated"),this.options.className&&v(e,this.options.className),e.onselectstart=E,e.onmousemove=E,e.onload=S(this.fire,this,"load"),e.onerror=S(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;_t(this._image,i,e)},_reset:function(){var t=this._image,e=new z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();I(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){V(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),bo=function(t,e,i){return new ae(t,e,i)},Xi=ae.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:T("video");if(v(e,"leaflet-image-layer"),this._zoomAnimated&&v(e,"leaflet-zoom-animated"),this.options.className&&v(e,this.options.className),e.onselectstart=E,e.onmousemove=E,e.onloadeddata=S(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o0?n:[e.src];return}K(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;so?(e.height=o+"px",v(t,s)):Z(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();I(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(Ot(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new m(this._containerLeft,-i-this._containerBottom);o._add(mt(this._container));var s=t.layerPointToContainerPoint(o),r=_(this.options.autoPanPadding),a=_(this.options.autoPanPaddingTopLeft||r),h=_(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),c=0,d=0;s.x+n+h.x>u.x&&(c=s.x+n-u.x+h.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+i+h.y>u.y&&(d=s.y+i-u.y+h.y),s.y-d-a.y<0&&(d=s.y-a.y),(c||d)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,d]))}},_getAnchor:function(){return _(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Co=function(t,e){return new he(t,e)};w.mergeOptions({closePopupOnClick:!0}),w.include({openPopup:function(t,e,i){return this._initOverlay(he,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),X.include({bindPopup:function(t,e){return this._popup=this._initOverlay(he,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof st||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){vt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof ft)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var ue=et.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){et.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){et.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=et.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=T("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+P(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,u=o.offsetHeight,c=_(this.options.offset),d=this._getAnchor();a==="top"?(e=h/2,i=u):a==="bottom"?(e=h/2,i=0):a==="center"?(e=h/2,i=u/2):a==="right"?(e=0,i=u/2):a==="left"?(e=h,i=u/2):r.xthis.options.maxZoom||in?this._retainParent(o,s,r,n):!1)},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new m(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];if(h&&h.active){h.retain=!0;continue}else h&&h.loaded&&(h.retain=!0);i+1this.options.maxZoom||this.options.minZoom!==void 0&&o1){this._setView(t,i);return}for(var d=o.min.y;d<=o.max.y;d++)for(var g=o.min.x;g<=o.max.x;g++){var R=new m(g,d);if(R.z=this._tileZoom,!!this._isValidTile(R)){var B=this._tiles[this._tileCoordsToKey(R)];B?B.current=!0:r.push(R)}}if(r.sort(function(W,St){return W.distanceTo(s)-St.distanceTo(s)}),r.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var j=document.createDocumentFragment();for(g=0;gi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return O(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),s=e.unproject(n,t.z),r=e.unproject(o,t.z);return[s,r]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new H(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new m(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(k(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){v(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=E,t.onmousemove=E,f.ielt9&&this.options.opacity<1&&V(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),S(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&D(S(this._tileReady,this,t,null,o)),I(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(V(i.el,0),G(this._fadeFrame),this._fadeFrame=D(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(v(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),f.ielt9||!this._map._fadeAnimated?D(this._pruneTiles,this):setTimeout(S(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new m(this._wrapX?Ct(t.x,this._wrapX):t.x,this._wrapY?Ct(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Eo(t){return new Ht(t)}var Mt=Ht.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=C(this,e),e.detectRetina&&f.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return p(i,"load",S(this._tileOnLoad,this,e,i)),p(i,"error",S(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:f.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return ti(this._url,x(e,this.options))},_tileOnLoad:function(t,e){f.ielt9?setTimeout(S(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=E,e.onerror=E,!e.complete)){e.src=qt;var i=this._tiles[t].coords;k(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",qt),Ht.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===qt))return Ht.prototype._tileReady.call(this,t,e,i)}});function Qi(t,e){return new Mt(t,e)}var tn=Mt.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=x({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=C(this,e);var o=e.detectRetina&&f.retina?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Mt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=F(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===qi?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Mt.prototype.getTileUrl.call(this,t);return a+Qe(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return x(this.wmsParams,t),e||this.redraw(),this}});function Zo(t,e){return new tn(t,e)}Mt.WMS=tn,Qi.wms=Zo;var ht=X.extend({options:{padding:.1},initialize:function(t){C(this,t),P(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),v(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));f.any3d?_t(this._container,s,i):I(this._container,s)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new z(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),en=ht.extend({options:{tolerance:0},getEvents:function(){var t=ht.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ht.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");p(t,"mousemove",this._onMouseMove,this),p(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),p(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){G(this._redrawRequest),delete this._ctx,k(this._container),M(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ht.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=f.retina?2:1;I(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",f.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ht.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[P(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[P(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,o;for(o=0;o')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Oo={_initContainer:function(){this._container=T("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ht.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wt("shape");v(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wt("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[P(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;k(e),t.removeInteractiveTarget(e),delete this._layers[P(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Wt("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=K(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Wt("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){wt(t._container)},_bringToBack:function(t){xt(t._container)}},le=f.vml?Wt:ri,Ut=ht.extend({_initContainer:function(){this._container=le("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=le("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){k(this._container),M(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ht.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),I(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=le("path");t.options.className&&v(e,t.options.className),t.options.interactive&&v(e,"leaflet-interactive"),this._updateStyle(t),this._layers[P(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){k(t._path),t.removeInteractiveTarget(t._path),delete this._layers[P(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,ai(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+i*2+",0 "+o+-i*2+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){wt(t._path)},_bringToBack:function(t){xt(t._path)}});f.vml&&Ut.include(Oo);function on(t){return f.svg||f.vml?new Ut(t):null}w.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&nn(t)||on(t)}});var sn=Tt.extend({initialize:function(t,e){Tt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=O(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Io(t,e){return new sn(t,e)}Ut.create=le,Ut.pointsToPath=ai,at.geometryToLayer=ne,at.coordsToLatLng=qe,at.coordsToLatLngs=oe,at.latLngToCoords=je,at.latLngsToCoords=se,at.getFeature=bt,at.asFeature=re,w.mergeOptions({boxZoom:!0});var rn=tt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){p(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){M(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){k(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),It(),ze(),this._startPoint=this._map.mouseEventToContainerPoint(t),p(document,{contextmenu:vt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=T("div","leaflet-zoom-box",this._container),v(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new z(this._point,this._startPoint),i=e.getSize();I(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(k(this._box),Z(this._container,"leaflet-crosshair")),At(),ke(),M(document,{contextmenu:vt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(S(this._resetState,this),0);var e=new H(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});w.addInitHook("addHandler","boxZoom",rn),w.mergeOptions({doubleClickZoom:!0});var an=tt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});w.addInitHook("addHandler","doubleClickZoom",an),w.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var hn=tt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ct(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}v(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Z(this._map._container,"leaflet-grab"),Z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=O(this._map.options.maxBounds);this._offsetLimit=F(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});w.addInitHook("addHandler","scrollWheelZoom",ln);var Ao=600;w.mergeOptions({tapHold:f.touchNative&&f.safari&&f.mobile,tapTolerance:15});var cn=tt.extend({addHooks:function(){p(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){M(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new m(e.clientX,e.clientY),this._holdTimeout=setTimeout(S(function(){this._cancel(),this._isTapValid()&&(p(document,"touchend",N),p(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),Ao),p(document,"touchend touchcancel contextmenu",this._cancel,this),p(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){M(document,"touchend",N),M(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),M(document,"touchend touchcancel contextmenu",this._cancel,this),M(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new m(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});w.addInitHook("addHandler","tapHold",cn),w.mergeOptions({touchZoom:f.touch,bounceAtZoomLimits:!0});var fn=tt.extend({addHooks:function(){v(this._map._container,"leaflet-touch-zoom"),p(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Z(this._map._container,"leaflet-touch-zoom"),M(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),p(document,"touchmove",this._onTouchMove,this),p(document,"touchend touchcancel",this._onTouchEnd,this),N(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,o===1)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(o===1&&s.x===0&&s.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),G(this._animRequest);var r=S(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=D(r,this,!0),N(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,G(this._animRequest),M(document,"touchmove",this._onTouchMove,this),M(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});w.addInitHook("addHandler","touchZoom",fn),w.BoxZoom=rn,w.DoubleClickZoom=an,w.Drag=hn,w.Keyboard=un,w.ScrollWheelZoom=ln,w.TapHold=cn,w.TouchZoom=fn,l.Bounds=z,l.Browser=f,l.CRS=ot,l.Canvas=en,l.Circle=Ve,l.CircleMarker=ie,l.Class=nt,l.Control=Y,l.DivIcon=$i,l.DivOverlay=et,l.DomEvent=$n,l.DomUtil=Xn,l.Draggable=ct,l.Evented=zt,l.FeatureGroup=st,l.GeoJSON=at,l.GridLayer=Ht,l.Handler=tt,l.Icon=Lt,l.ImageOverlay=ae,l.LatLng=b,l.LatLngBounds=H,l.Layer=X,l.LayerGroup=Pt,l.LineUtil=co,l.Map=w,l.Marker=ee,l.Mixin=so,l.Path=ft,l.Point=m,l.PolyUtil=ro,l.Polygon=Tt,l.Polyline=rt,l.Popup=he,l.PosAnimation=Ii,l.Projection=fo,l.Rectangle=sn,l.Renderer=ht,l.SVG=Ut,l.SVGOverlay=Ji,l.TileLayer=Mt,l.Tooltip=ue,l.Transformation=ve,l.Util=gn,l.VideoOverlay=Xi,l.bind=S,l.bounds=F,l.canvas=nn,l.circle=xo,l.circleMarker=wo,l.control=Rt,l.divIcon=ko,l.extend=x,l.featureGroup=vo,l.geoJSON=Yi,l.geoJson=To,l.gridLayer=Eo,l.icon=go,l.imageOverlay=bo,l.latLng=y,l.latLngBounds=O,l.layerGroup=po,l.map=Qn,l.marker=yo,l.point=_,l.polygon=Lo,l.polyline=Po,l.popup=Co,l.rectangle=Io,l.setOptions=C,l.stamp=P,l.svg=on,l.svgOverlay=So,l.tileLayer=Qi,l.tooltip=zo,l.transformation=kt,l.version=it,l.videoOverlay=Mo;var Bo=window.L;l.noConflict=function(){return window.L=Bo,this},window.L=l})})(Xe,Xe.exports);var pn=Xe.exports;const Ko=Vo(pn),Xo=jo({__proto__:null,default:Ko},[pn]);export{Xo as l}; diff --git a/_app/immutable/chunks/prism-svelte.RW_sD_9_.js b/_app/immutable/chunks/prism-svelte.RW_sD_9_.js new file mode 100644 index 0000000000000000000000000000000000000000..aafd18aecb024a402ea50e759120710106a367eb --- /dev/null +++ b/_app/immutable/chunks/prism-svelte.RW_sD_9_.js @@ -0,0 +1 @@ +import{P as e}from"./VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";const g="(if|else if|await|then|catch|each|html|debug)";e.languages.svelte=e.languages.extend("markup",{each:{pattern:new RegExp("{[#/]each(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}"),inside:{"language-javascript":[{pattern:/(as[\s\S]*)\([\s\S]*\)(?=\s*\})/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(as[\s]*)[\s\S]*(?=\s*)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(#each[\s]*)[\s\S]*(?=as)/,lookbehind:!0,inside:e.languages.javascript}],keyword:/[#/]each|as/,punctuation:/{|}/}},if:{pattern:new RegExp("{[#/]if(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}"),inside:{"language-javascript":[{pattern:/(as[\s\S]*)\([\s\S]*\)(?=\s*\})/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(as[\s]*)[\s\S]*(?=\s*)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(#if[\s]*)[\s\S]*(?=as)/,lookbehind:!0,inside:e.languages.javascript}],keyword:/[#/]if|as/,punctuation:/{|}/}},block:{pattern:new RegExp("{[#:/@]/s"+g+"(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}"),inside:{punctuation:/^{|}$/,keyword:[new RegExp("[#:/@]"+g+"( )*"),/as/,/then/],"language-javascript":{pattern:/[\s\S]*/,inside:e.languages.javascript}}},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?:"[^"]*"|'[^']*'|{[\s\S]+?}(?=[\s/>])))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"language-javascript":{pattern:/\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/,inside:e.languages.javascript},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],"language-javascript":{pattern:/{[\s\S]+}/,inside:e.languages.javascript}}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},"language-javascript":{pattern:/\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/,lookbehind:!0,inside:e.languages.javascript}});e.languages.svelte.tag.inside["attr-value"].inside.entity=e.languages.svelte.entity;e.hooks.add("wrap",a=>{a.type==="entity"&&(a.attributes.title=a.content.replace(/&/,"&"))});Object.defineProperty(e.languages.svelte.tag,"addInlined",{value:function(n,s){const t={};t["language-"+s]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[s]},t.cdata=/^$/i;const i={"included-cdata":{pattern://i,inside:t}};i["language-"+s]={pattern:/[\s\S]+/,inside:e.languages[s]};const r={};r[n]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,n),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("svelte","cdata",r)}});e.languages.svelte.tag.addInlined("style","css");e.languages.svelte.tag.addInlined("script","javascript"); diff --git a/_app/immutable/chunks/stores.D7EENclZ.js b/_app/immutable/chunks/stores.D7EENclZ.js new file mode 100644 index 0000000000000000000000000000000000000000..1ab82d999df4a47a6c221199b8a74c7eb4af71dc --- /dev/null +++ b/_app/immutable/chunks/stores.D7EENclZ.js @@ -0,0 +1 @@ +import{s as r}from"./entry.p1-HE9Vh.js";const e=()=>{const s=r;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},a={subscribe(s){return e().page.subscribe(s)}},i={subscribe(s){return e().navigating.subscribe(s)}};export{i as n,a as p}; diff --git a/_app/immutable/entry/app.Cc7R6Idk.js b/_app/immutable/entry/app.Cc7R6Idk.js new file mode 100644 index 0000000000000000000000000000000000000000..3471daa672b16d471d30ce1ea2219011da7c163e --- /dev/null +++ b/_app/immutable/entry/app.Cc7R6Idk.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/nodes/0.BLpNeUfM.js","_app/immutable/chunks/index.rV6zwFgL.js","_app/immutable/chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js","_app/immutable/chunks/entry.p1-HE9Vh.js","_app/immutable/chunks/scheduler.BZlHRu_0.js","_app/immutable/chunks/index.a_oafgNU.js","_app/immutable/chunks/preload-helper.D7HrI6pR.js","_app/immutable/assets/VennDiagram.Hmmox_0V.css","_app/immutable/chunks/button.DH6vZO4W.js","_app/immutable/chunks/arrays.DyTtr4Tk.js","_app/immutable/chunks/stores.D7EENclZ.js","_app/immutable/chunks/index.CqVitEmB.js","_app/immutable/chunks/AccordionItem.CxgotlFR.js","_app/immutable/assets/0.3s2JqZFs.css","_app/immutable/nodes/1.BafS0IQd.js","_app/immutable/nodes/2.BYLV8oTN.js","_app/immutable/nodes/3.DaQyX2Nu.js","_app/immutable/nodes/4.tWFXFfna.js","_app/immutable/chunks/AreaMap.Ua5Kysct.js","_app/immutable/chunks/Prismjs.XAZNzsAo.js","_app/immutable/chunks/await_block.Ctm0iWyv.js","_app/immutable/nodes/5.CK_OX4jb.js","_app/immutable/nodes/6.DU1Lccse.js","_app/immutable/chunks/Button.DOpmxt6h.js","_app/immutable/nodes/7.CM8MxEZm.js","_app/immutable/nodes/8.CtsUH2mo.js"])))=>i.map(i=>d[i]); +import{_ as v}from"../chunks/preload-helper.D7HrI6pR.js";import{s as q,a as C,b as u,c as M,k as g,f as h,S as z,r as B,e as F,d as G,g as H,j as R,T as N,t as K,i as Q,m as W,N as D,U as w,V as X}from"../chunks/scheduler.BZlHRu_0.js";import{S as Y,i as Z,b as m,d as O,t as p,g as P,c as b,a as I,m as k,e as E}from"../chunks/index.a_oafgNU.js";const y=o=>o instanceof Error?{message:o.message,stack:o.stack,name:o.name,cause:o.cause?y(o.cause):void 0}:(console.log("Page threw a non-error",{error:o}),JSON.parse(JSON.stringify(o))),x=o=>(console.error("Error in client-side routing",o),y(o.error)),ce={};function ee(o){let e,n,r;var i=o[1][0];function c(t,f){return{props:{data:t[3],form:t[2]}}}return i&&(e=w(i,c(o)),o[15](e)),{c(){e&&b(e.$$.fragment),n=u()},l(t){e&&I(e.$$.fragment,t),n=u()},m(t,f){e&&k(e,t,f),g(t,n,f),r=!0},p(t,f){if(f&2&&i!==(i=t[1][0])){if(e){P();const s=e;m(s.$$.fragment,1,0,()=>{E(s,1)}),O()}i?(e=w(i,c(t)),t[15](e),b(e.$$.fragment),p(e.$$.fragment,1),k(e,n.parentNode,n)):e=null}else if(i){const s={};f&8&&(s.data=t[3]),f&4&&(s.form=t[2]),e.$set(s)}},i(t){r||(e&&p(e.$$.fragment,t),r=!0)},o(t){e&&m(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[15](null),e&&E(e,t)}}}function te(o){let e,n,r;var i=o[1][0];function c(t,f){return{props:{data:t[3],$$slots:{default:[re]},$$scope:{ctx:t}}}}return i&&(e=w(i,c(o)),o[14](e)),{c(){e&&b(e.$$.fragment),n=u()},l(t){e&&I(e.$$.fragment,t),n=u()},m(t,f){e&&k(e,t,f),g(t,n,f),r=!0},p(t,f){if(f&2&&i!==(i=t[1][0])){if(e){P();const s=e;m(s.$$.fragment,1,0,()=>{E(s,1)}),O()}i?(e=w(i,c(t)),t[14](e),b(e.$$.fragment),p(e.$$.fragment,1),k(e,n.parentNode,n)):e=null}else if(i){const s={};f&8&&(s.data=t[3]),f&65591&&(s.$$scope={dirty:f,ctx:t}),e.$set(s)}},i(t){r||(e&&p(e.$$.fragment,t),r=!0)},o(t){e&&m(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[14](null),e&&E(e,t)}}}function ne(o){let e,n,r;var i=o[1][1];function c(t,f){return{props:{data:t[4],form:t[2]}}}return i&&(e=w(i,c(o)),o[13](e)),{c(){e&&b(e.$$.fragment),n=u()},l(t){e&&I(e.$$.fragment,t),n=u()},m(t,f){e&&k(e,t,f),g(t,n,f),r=!0},p(t,f){if(f&2&&i!==(i=t[1][1])){if(e){P();const s=e;m(s.$$.fragment,1,0,()=>{E(s,1)}),O()}i?(e=w(i,c(t)),t[13](e),b(e.$$.fragment),p(e.$$.fragment,1),k(e,n.parentNode,n)):e=null}else if(i){const s={};f&16&&(s.data=t[4]),f&4&&(s.form=t[2]),e.$set(s)}},i(t){r||(e&&p(e.$$.fragment,t),r=!0)},o(t){e&&m(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[13](null),e&&E(e,t)}}}function ie(o){let e,n,r;var i=o[1][1];function c(t,f){return{props:{data:t[4],$$slots:{default:[se]},$$scope:{ctx:t}}}}return i&&(e=w(i,c(o)),o[12](e)),{c(){e&&b(e.$$.fragment),n=u()},l(t){e&&I(e.$$.fragment,t),n=u()},m(t,f){e&&k(e,t,f),g(t,n,f),r=!0},p(t,f){if(f&2&&i!==(i=t[1][1])){if(e){P();const s=e;m(s.$$.fragment,1,0,()=>{E(s,1)}),O()}i?(e=w(i,c(t)),t[12](e),b(e.$$.fragment),p(e.$$.fragment,1),k(e,n.parentNode,n)):e=null}else if(i){const s={};f&16&&(s.data=t[4]),f&65575&&(s.$$scope={dirty:f,ctx:t}),e.$set(s)}},i(t){r||(e&&p(e.$$.fragment,t),r=!0)},o(t){e&&m(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[12](null),e&&E(e,t)}}}function se(o){let e,n,r;var i=o[1][2];function c(t,f){return{props:{data:t[5],form:t[2]}}}return i&&(e=w(i,c(o)),o[11](e)),{c(){e&&b(e.$$.fragment),n=u()},l(t){e&&I(e.$$.fragment,t),n=u()},m(t,f){e&&k(e,t,f),g(t,n,f),r=!0},p(t,f){if(f&2&&i!==(i=t[1][2])){if(e){P();const s=e;m(s.$$.fragment,1,0,()=>{E(s,1)}),O()}i?(e=w(i,c(t)),t[11](e),b(e.$$.fragment),p(e.$$.fragment,1),k(e,n.parentNode,n)):e=null}else if(i){const s={};f&32&&(s.data=t[5]),f&4&&(s.form=t[2]),e.$set(s)}},i(t){r||(e&&p(e.$$.fragment,t),r=!0)},o(t){e&&m(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[11](null),e&&E(e,t)}}}function re(o){let e,n,r,i;const c=[ie,ne],t=[];function f(s,l){return s[1][2]?0:1}return e=f(o),n=t[e]=c[e](o),{c(){n.c(),r=u()},l(s){n.l(s),r=u()},m(s,l){t[e].m(s,l),g(s,r,l),i=!0},p(s,l){let _=e;e=f(s),e===_?t[e].p(s,l):(P(),m(t[_],1,1,()=>{t[_]=null}),O(),n=t[e],n?n.p(s,l):(n=t[e]=c[e](s),n.c()),p(n,1),n.m(r.parentNode,r))},i(s){i||(p(n),i=!0)},o(s){m(n),i=!1},d(s){s&&h(r),t[e].d(s)}}}function A(o){let e,n=o[7]&&L(o);return{c(){e=F("div"),n&&n.c(),this.h()},l(r){e=G(r,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var i=H(e);n&&n.l(i),i.forEach(h),this.h()},h(){R(e,"id","svelte-announcer"),R(e,"aria-live","assertive"),R(e,"aria-atomic","true"),N(e,"position","absolute"),N(e,"left","0"),N(e,"top","0"),N(e,"clip","rect(0 0 0 0)"),N(e,"clip-path","inset(50%)"),N(e,"overflow","hidden"),N(e,"white-space","nowrap"),N(e,"width","1px"),N(e,"height","1px")},m(r,i){g(r,e,i),n&&n.m(e,null)},p(r,i){r[7]?n?n.p(r,i):(n=L(r),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(r){r&&h(e),n&&n.d()}}}function L(o){let e;return{c(){e=K(o[8])},l(n){e=Q(n,o[8])},m(n,r){g(n,e,r)},p(n,r){r&256&&W(e,n[8])},d(n){n&&h(e)}}}function oe(o){let e,n,r,i,c;const t=[te,ee],f=[];function s(_,d){return _[1][1]?0:1}e=s(o),n=f[e]=t[e](o);let l=o[6]&&A(o);return{c(){n.c(),r=C(),l&&l.c(),i=u()},l(_){n.l(_),r=M(_),l&&l.l(_),i=u()},m(_,d){f[e].m(_,d),g(_,r,d),l&&l.m(_,d),g(_,i,d),c=!0},p(_,[d]){let V=e;e=s(_),e===V?f[e].p(_,d):(P(),m(f[V],1,1,()=>{f[V]=null}),O(),n=f[e],n?n.p(_,d):(n=f[e]=t[e](_),n.c()),p(n,1),n.m(r.parentNode,r)),_[6]?l?l.p(_,d):(l=A(_),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null)},i(_){c||(p(n),c=!0)},o(_){m(n),c=!1},d(_){_&&(h(r),h(i)),f[e].d(_),l&&l.d(_)}}}function fe(o,e,n){let{stores:r}=e,{page:i}=e,{constructors:c}=e,{components:t=[]}=e,{form:f}=e,{data_0:s=null}=e,{data_1:l=null}=e,{data_2:_=null}=e;z(r.page.notify);let d=!1,V=!1,T=null;B(()=>{const a=r.page.subscribe(()=>{d&&(n(7,V=!0),X().then(()=>{n(8,T=document.title||"untitled page")}))});return n(6,d=!0),a});function S(a){D[a?"unshift":"push"](()=>{t[2]=a,n(0,t)})}function $(a){D[a?"unshift":"push"](()=>{t[1]=a,n(0,t)})}function J(a){D[a?"unshift":"push"](()=>{t[1]=a,n(0,t)})}function U(a){D[a?"unshift":"push"](()=>{t[0]=a,n(0,t)})}function j(a){D[a?"unshift":"push"](()=>{t[0]=a,n(0,t)})}return o.$$set=a=>{"stores"in a&&n(9,r=a.stores),"page"in a&&n(10,i=a.page),"constructors"in a&&n(1,c=a.constructors),"components"in a&&n(0,t=a.components),"form"in a&&n(2,f=a.form),"data_0"in a&&n(3,s=a.data_0),"data_1"in a&&n(4,l=a.data_1),"data_2"in a&&n(5,_=a.data_2)},o.$$.update=()=>{o.$$.dirty&1536&&r.page.set(i)},[t,c,f,s,l,_,d,V,T,r,i,S,$,J,U,j]}class ue extends Y{constructor(e){super(),Z(this,e,fe,oe,q,{stores:9,page:10,constructors:1,components:0,form:2,data_0:3,data_1:4,data_2:5})}}const me=[()=>v(()=>import("../nodes/0.BLpNeUfM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),()=>v(()=>import("../nodes/1.BafS0IQd.js"),__vite__mapDeps([14,4,5,10,3,12,2,6,1,7,9])),()=>v(()=>import("../nodes/2.BYLV8oTN.js"),__vite__mapDeps([15,1,16,4,5])),()=>v(()=>import("../nodes/3.DaQyX2Nu.js"),__vite__mapDeps([16,4,5])),()=>v(()=>import("../nodes/4.tWFXFfna.js"),__vite__mapDeps([17,4,5,2,3,6,1,7,8,9,10,18,19,20])),()=>v(()=>import("../nodes/5.CK_OX4jb.js"),__vite__mapDeps([21,4,5,2,3,6,1,7,8,9,10,18,19,20])),()=>v(()=>import("../nodes/6.DU1Lccse.js"),__vite__mapDeps([22,4,5,2,3,6,1,7,23])),()=>v(()=>import("../nodes/7.CM8MxEZm.js"),__vite__mapDeps([24,4,5,2,3,6,1,7,20])),()=>v(()=>import("../nodes/8.CtsUH2mo.js"),__vite__mapDeps([25,4,5,2,3,6,1,7,23,11,12,9,19]))],pe=[],de={"/":[4],"/borough/[borough]":[5],"/explore/console":[6,[2]],"/explore/schema":[7,[2]],"/settings":[-9,[3]]},he={handleError:x||(({error:o})=>{console.error(o)}),reroute:()=>{}};export{de as dictionary,he as hooks,ce as matchers,me as nodes,ue as root,pe as server_loads}; diff --git a/_app/immutable/entry/start.EruodsEO.js b/_app/immutable/entry/start.EruodsEO.js new file mode 100644 index 0000000000000000000000000000000000000000..a9c7f1d43a3642fc1ca0bd77fc9be9ee946b2ee7 --- /dev/null +++ b/_app/immutable/entry/start.EruodsEO.js @@ -0,0 +1 @@ +import{f as a}from"../chunks/entry.p1-HE9Vh.js";export{a as start}; diff --git a/_app/immutable/nodes/0.BLpNeUfM.js b/_app/immutable/nodes/0.BLpNeUfM.js new file mode 100644 index 0000000000000000000000000000000000000000..6890d4d88e6abb96797eb41762ecfa281a47b3a7 --- /dev/null +++ b/_app/immutable/nodes/0.BLpNeUfM.js @@ -0,0 +1,14 @@ +var Uu=Object.defineProperty;var Fi=t=>{throw TypeError(t)};var Vu=(t,e,n)=>e in t?Uu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var No=(t,e,n)=>Vu(t,typeof e!="symbol"?e+"":e,n),qi=(t,e,n)=>e.has(t)||Fi("Cannot "+n);var ln=(t,e,n)=>(qi(t,e,"read from private field"),n?n.call(t):e.get(t)),$n=(t,e,n)=>e.has(t)?Fi("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ro=(t,e,n,r)=>(qi(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var Wi=(t,e,n,r)=>({set _(o){Ro(t,e,o,n)},get _(){return ln(t,e,r)}});import{d as go}from"../chunks/index.rV6zwFgL.js";import{m as Ku,l as Yu,ae as Ce,bs as js,bt as zu,bu as Qu,bv as xu,bw as Gu,bx as Ju,w as vt,t as Et,A as er,by as Xu,bz as Ft,B as pe,y as Qt,z as Te,bA as Bi,F as mt,bB as po,al as Zu,ah as tr,bC as xt,bD as Ui,am as hn,ai as Rn,v as $u,x as Lo,q as Cs,n as ec,H as jt,bE as $o,bF as Sn,i as Ye,u as Ts,bi as Vi,K as bi,o as tc,J as Bn,bG as nc,bH as rc,bI as Ki,bJ as oc,bK as ic,I as Kt,bL as ac,bM as lc,bN as ei,f as Ir,bO as sc,bP as uc,bQ as Ms,bR as cc,bS as fc,bT as dc,bU as ti,bV as mc,Q as Yi,bm as hc,bW as gc}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";import{p as cr,s as pc,c as _c,d as zi,u as Qi,g as xi,a as bt,b as bc,f as Ln,i as vc,r as jn,j as yc,k as wc,l as kc,m as Oc,n as Sc,o as Ec,B as Pc,q as As,e as Ic}from"../chunks/button.DH6vZO4W.js";import{V as Gr,q as vi,a8 as Ns,s as Re,b as de,k as B,f as E,a9 as St,n as rt,aa as Be,ab as En,G as Gt,N as qt,z as Ge,D as Je,E as Xe,F as Ze,e as K,d as Y,g as J,ag as Gi,J as fn,B as We,L as tn,ac as gt,I as Mt,a as $,t as ye,c as ee,i as we,j as A,l as V,m as it,a7 as Dc,u as Ne,ao as ni,r as Lr,T as _o,H as en,S as jc,al as Vt,A as ve,p as Cc,ap as Ji,M as Tc,ak as Rs}from"../chunks/scheduler.BZlHRu_0.js";import{S as He,i as Fe,g as De,b as M,d as je,t as I,h as ko,j as Hr,f as Dt,c as re,a as oe,m as ie,e as ae,k as Ls}from"../chunks/index.a_oafgNU.js";import{w as dt,d as Hn,a as Mc,r as Hs,c as Ac}from"../chunks/entry.p1-HE9Vh.js";import{p as Oo,n as Fs}from"../chunks/stores.D7EENclZ.js";import{G as Nc,X as Rc,B as Lc,S as Hc}from"../chunks/index.CqVitEmB.js";import{t as so,g as Xi,o as uo,c as Fc,r as qc,b as Wc,e as yi,f as Bc}from"../chunks/arrays.DyTtr4Tk.js";import{A as Uc,a as Ho}from"../chunks/AccordionItem.CxgotlFR.js";var qs={exports:{}};(function(t){(function(e){function n(v,S){var y=(v&65535)+(S&65535),H=(v>>16)+(S>>16)+(y>>16);return H<<16|y&65535}function r(v,S){return v<>>32-S}function o(v,S,y,H,N,P){return n(r(n(n(S,v),n(H,P)),N),y)}function i(v,S,y,H,N,P,L){return o(S&y|~S&H,v,S,N,P,L)}function a(v,S,y,H,N,P,L){return o(S&H|y&~H,v,S,N,P,L)}function l(v,S,y,H,N,P,L){return o(S^y^H,v,S,N,P,L)}function s(v,S,y,H,N,P,L){return o(y^(S|~H),v,S,N,P,L)}function u(v,S){v[S>>5]|=128<>>9<<4)+14]=S;var y,H,N,P,L,C=1732584193,j=-271733879,R=-1732584194,T=271733878;for(y=0;y>5]>>>S%32&255);return y}function f(v){var S,y=[];for(y[(v.length>>2)-1]=void 0,S=0;S>5]|=(v.charCodeAt(S/8)&255)<16&&(H=u(H,v.length*8)),y=0;y<16;y+=1)N[y]=H[y]^909522486,P[y]=H[y]^1549556828;return L=u(N.concat(f(S)),512+S.length*8),c(u(P.concat(L),640))}function p(v){var S="0123456789abcdef",y="",H,N;for(N=0;N>>4&15)+S.charAt(H&15);return y}function m(v){return unescape(encodeURIComponent(v))}function h(v){return g(m(v))}function b(v){return p(h(v))}function _(v,S){return d(m(v),m(S))}function k(v,S){return p(_(v,S))}function w(v,S,y){return S?y?_(S,v):k(S,v):y?h(v):b(v)}t.exports?t.exports=w:e.md5=w})(Ku)})(qs);var Vc=qs.exports;const Zi=Yu(Vc),Kc=!go,Ws=!0,Yc="always",zc=async()=>{let t={};{const e=await fetch(Ce("/data/manifest.json"));e.ok&&({renderedFiles:t}=await e.json())}await cr(zu),Object.keys(t??{}).length===0?console.warn('No sources found, execute "npm run sources" to generate'.trim()):(await cr(js,t),await cr(Qu,Object.keys(t)))},$i=cr(zc);async function Qc(t,e,n){const r=await n(Ce(`/api/${t}/${e}/all-queries.json`));if(!r.ok)return{};const o=await r.json(),i=await Promise.all(Object.entries(o).map(async([a,l])=>{const s=await n(Ce(`/api/prerendered_queries/${l}.arrow`));if(!s.ok)return null;const u=await xu(s);return[a,Gu(u)]}));return Object.fromEntries(i.filter(Boolean))}const xc=["/settings","/explore"],ea=new Map,Gc=async({fetch:t,route:e,params:n,url:r})=>{var p,m,h;const[{customFormattingSettings:o},i,a]=await Promise.all([t(Ce("/api/customFormattingSettings.json/GET.json")).then(b=>b.json()),t(Ce("/api/pagesManifest.json")).then(b=>b.json()),t(Ce(`/api/${e.id}/evidencemeta.json`)).then(b=>b.json()).catch(()=>({queries:[]}))]),l=Zi(e.id),s=Zi(Object.entries(n).sort().map(([b,_])=>`${b}${_}`).join("")),u=e.id&&xc.every(b=>!e.id.startsWith(b));let c={};const{inputs:f=pc({label:"",value:"(SELECT NULL WHERE 0 /* An Input has not been set */)"})}=ea.get(r.pathname)??{};ea.has(r.pathname),u&&Ws&&(c=await Qc(l,s,t));function g(b,{query_name:_,callback:k=w=>w}={}){return(async()=>{await $i;const w=await Ju(b);return k(w)})()}let d=i;for(const b of(e.id??"").split("/").slice(1)){if(d=d.children[b],!d)break;if((p=d.frontMatter)!=null&&p.title)d.title=d.frontMatter.title;else if((m=d.frontMatter)!=null&&m.breadcrumb){let{breadcrumb:_}=d.frontMatter;for(const[k,w]of Object.entries(n))_=_.replaceAll(`\${params.${k}}`,w);d.title=(h=(await g(_))[0])==null?void 0:h.breadcrumb}}return{__db:{query:g,async load(){return $i},async updateParquetURLs(b){const{renderedFiles:_}=JSON.parse(b);await cr(js,_)}},inputs:f,data:c,customFormattingSettings:o,isUserPage:u,evidencemeta:a,pagesManifest:i}},K_=Object.freeze(Object.defineProperty({__proto__:null,load:Gc,prerender:Ws,ssr:Kc,trailingSlash:Yc},Symbol.toStringTag,{value:"Module"})),Jc={ltr:[...po,mt.ARROW_RIGHT],rtl:[...po,mt.ARROW_LEFT]},Xc={ltr:[mt.ARROW_LEFT],rtl:[mt.ARROW_RIGHT]},ta=["menu","trigger"],Zc={arrowSize:8,positioning:{placement:"bottom"},preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,portal:void 0,loop:!1,dir:"ltr",defaultOpen:!1,typeahead:!0,closeOnItemClick:!0,onOutsideClick:void 0};function $c(t){const{name:e,selector:n}=$u(t.selector),{preventScroll:r,arrowSize:o,positioning:i,closeOnEscape:a,closeOnOutsideClick:l,portal:s,forceVisible:u,typeahead:c,loop:f,closeFocus:g,disableFocusFirstItem:d,closeOnItemClick:p,onOutsideClick:m}=t.rootOptions,h=t.rootOpen,b=t.rootActiveTrigger,_=t.nextFocusable,k=t.prevFocusable,w=vt.writable(!1),v=vt(dt(0)),S=vt(dt(null)),y=vt(dt("right")),H=vt(dt(null)),N=vt(Hn([y,S],([W,x])=>U=>W===(x==null?void 0:x.side)&&ef(U,x==null?void 0:x.area))),{typed:P,handleTypeaheadSearch:L}=_c(),C=so({...Xi(ta),...t.ids}),j=zi({open:h,forceVisible:u,activeTrigger:b}),R=Et(e(),{stores:[j,s,C.menu,C.trigger],returned:([W,x,U,G])=>({role:"menu",hidden:W?void 0:!0,style:er({display:W?void 0:"none"}),id:U,"aria-labelledby":G,"data-state":W?"open":"closed","data-portal":Xu(x),tabindex:-1}),action:W=>{let x=tr;const U=Ft([j,b,i,l,s,a],([Z,Ie,ze,Ee,ce,fe])=>{x(),!(!Z||!Ie)&&Gr().then(()=>{x(),rr(W,n),x=Qi(W,{anchorElement:Ie,open:h,options:{floating:ze,modal:{closeOnInteractOutside:Ee,shouldCloseOnInteractOutside:z=>{var ne;return(ne=m.get())==null||ne(z),!(z.defaultPrevented||pe(Ie)&&Ie.contains(z.target))},onClose:()=>{h.set(!1),Ie.focus()},open:Z},portal:xi(W,ce),escapeKeydown:fe?void 0:null}}).destroy})}),G=Qt(Te(W,"keydown",Z=>{const Ie=Z.target,ze=Z.currentTarget;if(!pe(Ie)||!pe(ze)||!(Ie.closest('[role="menu"]')===ze))return;if(Bi.includes(Z.key)&&ra(Z,f.get()??!1),Z.key===mt.TAB){Z.preventDefault(),h.set(!1),na(Z,_,k);return}const ce=Z.key.length===1;!(Z.ctrlKey||Z.altKey||Z.metaKey)&&ce&&c.get()===!0&&L(Z.key,vn(ze))}));return{destroy(){U(),G(),x()}}}}),T=Et(e("trigger"),{stores:[h,C.menu,C.trigger],returned:([W,x,U])=>({"aria-controls":x,"aria-expanded":W,"data-state":W?"open":"closed",id:U,tabindex:0}),action:W=>(Jr(W),b.update(U=>U||W),{destroy:Qt(Te(W,"click",U=>{const G=h.get(),Z=U.currentTarget;pe(Z)&&(Ke(Z),G||U.preventDefault())}),Te(W,"keydown",U=>{const G=U.currentTarget;if(!pe(G)||!(po.includes(U.key)||U.key===mt.ARROW_DOWN))return;U.preventDefault(),Ke(G);const Z=G.getAttribute("aria-controls");if(!Z)return;const Ie=document.getElementById(Z);if(!Ie)return;const ze=vn(Ie);ze.length&&bt(ze[0])}))})}),D=Et(e("arrow"),{stores:o,returned:W=>({"data-arrow":!0,style:er({position:"absolute",width:`var(--arrow-size, ${W}px)`,height:`var(--arrow-size, ${W}px)`})})}),q=Et(e("overlay"),{stores:[j],returned:([W])=>({hidden:W?void 0:!0,tabindex:-1,style:er({display:W?void 0:"none"}),"aria-hidden":"true","data-state":rf(W)}),action:W=>{let x=tr;if(a.get()){const G=Zu(W,{handler:()=>{h.set(!1);const Z=b.get();Z&&Z.focus()}});G&&G.destroy&&(x=G.destroy)}const U=Ft([s],([G])=>{if(G===null)return tr;const Z=xi(W,G);return Z===null?tr:bc(W,Z).destroy});return{destroy(){x(),U()}}}}),F=Et(e("item"),{returned:()=>({role:"menuitem",tabindex:-1,"data-orientation":"vertical"}),action:W=>(rr(W,n),Jr(W),{destroy:Qt(Te(W,"pointerdown",U=>{const G=U.currentTarget;if(pe(G)&&xt(G)){U.preventDefault();return}}),Te(W,"click",U=>{const G=U.currentTarget;if(pe(G)){if(xt(G)){U.preventDefault();return}if(U.defaultPrevented){bt(G);return}p.get()&&Ln(1).then(()=>{h.set(!1)})}}),Te(W,"keydown",U=>{Pn(U)}),Te(W,"pointermove",U=>{rn(U)}),Te(W,"pointerleave",U=>{Jn(U)}),Te(W,"focusin",U=>{At(U)}),Te(W,"focusout",U=>{yt(U)}))})}),te=Et(e("group"),{returned:()=>W=>({role:"group","aria-labelledby":W})}),X=Et(e("group-label"),{returned:()=>W=>({id:W})}),le={defaultChecked:!1,disabled:!1},be=W=>{const x={...le,...W},U=x.checked??dt(x.defaultChecked??null),G=uo(U,x.onCheckedChange),Z=dt(x.disabled),Ie=Et(e("checkbox-item"),{stores:[G,Z],returned:([ce,fe])=>({role:"menuitemcheckbox",tabindex:-1,"data-orientation":"vertical","aria-checked":he(ce)?"mixed":ce?"true":"false","data-disabled":Lo(fe),"data-state":Me(ce)}),action:ce=>(rr(ce,n),Jr(ce),{destroy:Qt(Te(ce,"pointerdown",z=>{const ne=z.currentTarget;if(pe(ne)&&xt(ne)){z.preventDefault();return}}),Te(ce,"click",z=>{const ne=z.currentTarget;if(pe(ne)){if(xt(ne)){z.preventDefault();return}if(z.defaultPrevented){bt(ne);return}G.update(qe=>he(qe)?!0:!qe),p.get()&&Gr().then(()=>{h.set(!1)})}}),Te(ce,"keydown",z=>{Pn(z)}),Te(ce,"pointermove",z=>{const ne=z.currentTarget;if(pe(ne)){if(xt(ne)){wt(z);return}rn(z,ne)}}),Te(ce,"pointerleave",z=>{Jn(z)}),Te(ce,"focusin",z=>{At(z)}),Te(ce,"focusout",z=>{yt(z)}))})}),ze=Hn(G,ce=>ce===!0),Ee=Hn(G,ce=>ce==="indeterminate");return{elements:{checkboxItem:Ie},states:{checked:G},helpers:{isChecked:ze,isIndeterminate:Ee},options:{disabled:Z}}},me=(W={})=>{const x=W.value??dt(W.defaultValue??null),U=uo(x,W.onValueChange),G=Et(e("radio-group"),{returned:()=>({role:"group"})}),Z={disabled:!1},Ie=Et(e("radio-item"),{stores:[U],returned:([Ee])=>ce=>{const{value:fe,disabled:z}={...Z,...ce},ne=Ee===fe;return{disabled:z,role:"menuitemradio","data-state":ne?"checked":"unchecked","aria-checked":ne,"data-disabled":Lo(z),"data-value":fe,"data-orientation":"vertical",tabindex:-1}},action:Ee=>(rr(Ee,n),{destroy:Qt(Te(Ee,"pointerdown",fe=>{const z=fe.currentTarget;if(!pe(z))return;const ne=Ee.dataset.value;if(Ee.dataset.disabled||ne===void 0){fe.preventDefault();return}}),Te(Ee,"click",fe=>{const z=fe.currentTarget;if(!pe(z))return;const ne=Ee.dataset.value;if(Ee.dataset.disabled||ne===void 0){fe.preventDefault();return}if(fe.defaultPrevented){if(!pe(z))return;bt(z);return}U.set(ne),p.get()&&Gr().then(()=>{h.set(!1)})}),Te(Ee,"keydown",fe=>{Pn(fe)}),Te(Ee,"pointermove",fe=>{const z=fe.currentTarget;if(!pe(z))return;const ne=Ee.dataset.value;if(Ee.dataset.disabled||ne===void 0){wt(fe);return}rn(fe,z)}),Te(Ee,"pointerleave",fe=>{Jn(fe)}),Te(Ee,"focusin",fe=>{At(fe)}),Te(Ee,"focusout",fe=>{yt(fe)}))})}),ze=Hn(U,Ee=>ce=>Ee===ce);return{elements:{radioGroup:G,radioItem:Ie},states:{value:U},helpers:{isChecked:ze}}},{elements:{root:_e}}=vc({orientation:"horizontal"}),Q={...Zc,disabled:!1,positioning:{placement:"right-start",gutter:8}},at=W=>{const x={...Q,...W},U=x.open??dt(!1),G=uo(U,x==null?void 0:x.onOpenChange),Z=so(Cs(x,"ids")),{positioning:Ie,arrowSize:ze,disabled:Ee}=Z,ce=vt(dt(null)),fe=vt(dt(null)),z=vt(dt(0)),ne=so({...Xi(ta),...x.ids});Ui(()=>{const ge=document.getElementById(ne.trigger.get());ge&&ce.set(ge)});const qe=zi({open:G,forceVisible:u,activeTrigger:ce}),pt=Et(e("submenu"),{stores:[qe,ne.menu,ne.trigger],returned:([ge,$e,st])=>({role:"menu",hidden:ge?void 0:!0,style:er({display:ge?void 0:"none"}),id:$e,"aria-labelledby":st,"data-state":ge?"open":"closed","data-id":$e,tabindex:-1}),action:ge=>{let $e=tr;const st=Ft([qe,Ie],([se,Ae])=>{if($e(),!se)return;const Ue=ce.get();Ue&&Gr().then(()=>{$e();const Qe=lt(Ue);$e=Qi(ge,{anchorElement:Ue,open:G,options:{floating:Ae,portal:pe(Qe)?Qe:void 0,modal:null,focusTrap:null,escapeKeydown:null}}).destroy})}),ke=Qt(Te(ge,"keydown",se=>{if(se.key===mt.ESCAPE)return;const Ae=se.target,Ue=se.currentTarget;if(!pe(Ae)||!pe(Ue)||!(Ae.closest('[role="menu"]')===Ue))return;if(Bi.includes(se.key)){se.stopImmediatePropagation(),ra(se,f.get()??!1);return}const Ht=Xc.ltr.includes(se.key),ot=se.ctrlKey||se.altKey||se.metaKey,et=se.key.length===1;if(Ht){const tt=ce.get();se.preventDefault(),G.update(()=>(tt&&bt(tt),!1));return}if(se.key===mt.TAB){se.preventDefault(),h.set(!1),na(se,_,k);return}!ot&&et&&c.get()===!0&&L(se.key,vn(Ue))}),Te(ge,"pointermove",se=>{Rt(se)}),Te(ge,"focusout",se=>{const Ae=ce.get();if(w.get()){const Ue=se.target,Qe=document.getElementById(ne.menu.get());if(!pe(Qe)||!pe(Ue))return;!Qe.contains(Ue)&&Ue!==Ae&&G.set(!1)}else{const Ue=se.currentTarget,Qe=se.relatedTarget;if(!pe(Qe)||!pe(Ue))return;!Ue.contains(Qe)&&Qe!==Ae&&G.set(!1)}}));return{destroy(){st(),$e(),ke()}}}}),Pt=Et(e("subtrigger"),{stores:[G,Ee,ne.menu,ne.trigger],returned:([ge,$e,st,ke])=>({role:"menuitem",id:ke,tabindex:-1,"aria-controls":st,"aria-expanded":ge,"data-state":ge?"open":"closed","data-disabled":Lo($e),"aria-haspopop":"menu"}),action:ge=>{rr(ge,n),Jr(ge),ce.update(ke=>ke||ge);const $e=()=>{Fo(fe),window.clearTimeout(z.get()),S.set(null)},st=Qt(Te(ge,"click",ke=>{if(ke.defaultPrevented)return;const se=ke.currentTarget;!pe(se)||xt(se)||(bt(se),G.get()||G.update(Ae=>Ae||(ce.set(se),!Ae)))}),Te(ge,"keydown",ke=>{const se=P.get(),Ae=ke.currentTarget;if(!(!pe(Ae)||xt(Ae)||se.length>0&&ke.key===mt.SPACE)&&Jc.ltr.includes(ke.key)){if(!G.get()){Ae.click(),ke.preventDefault();return}const Qe=Ae.getAttribute("aria-controls");if(!Qe)return;const Ht=document.getElementById(Qe);if(!pe(Ht))return;const ot=vn(Ht)[0];bt(ot)}}),Te(ge,"pointermove",ke=>{if(!nr(ke)||(Nt(ke),ke.defaultPrevented))return;const se=ke.currentTarget;if(!pe(se))return;nf(ne.menu.get())||bt(se);const Ae=fe.get();!G.get()&&!Ae&&!xt(se)&&fe.set(window.setTimeout(()=>{G.update(()=>(ce.set(se),!0)),Fo(fe)},100))}),Te(ge,"pointerleave",ke=>{if(!nr(ke))return;Fo(fe);const se=document.getElementById(ne.menu.get()),Ae=se==null?void 0:se.getBoundingClientRect();if(Ae){const Ue=se==null?void 0:se.dataset.side,Qe=Ue==="right",Ht=Qe?-5:5,ot=Ae[Qe?"left":"right"],et=Ae[Qe?"right":"left"];S.set({area:[{x:ke.clientX+Ht,y:ke.clientY},{x:ot,y:Ae.top},{x:et,y:Ae.top},{x:et,y:Ae.bottom},{x:ot,y:Ae.bottom}],side:Ue}),window.clearTimeout(z.get()),z.set(window.setTimeout(()=>{S.set(null)},300))}else{if(nn(ke),ke.defaultPrevented)return;S.set(null)}}),Te(ge,"focusout",ke=>{const se=ke.currentTarget;if(!pe(se))return;jn(se);const Ae=ke.relatedTarget;if(!pe(Ae))return;const Ue=se.getAttribute("aria-controls");if(!Ue)return;const Qe=document.getElementById(Ue);Qe&&!Qe.contains(Ae)&&G.set(!1)}),Te(ge,"focusin",ke=>{At(ke)}));return{destroy(){$e(),st()}}}}),Lt=Et(e("subarrow"),{stores:ze,returned:ge=>({"data-arrow":!0,style:er({position:"absolute",width:`var(--arrow-size, ${ge}px)`,height:`var(--arrow-size, ${ge}px)`})})});return Ft([h],([ge])=>{ge||(ce.set(null),G.set(!1))}),Ft([S],([ge])=>{!Rn||ge||window.clearTimeout(z.get())}),Ft([G],([ge])=>{if(Rn&&(ge&&w.get()&&Ln(1).then(()=>{const $e=document.getElementById(ne.menu.get());if(!$e)return;const st=vn($e);st.length&&bt(st[0])}),!ge)){const $e=H.get(),st=document.getElementById(ne.trigger.get());if($e&&Ln(1).then(()=>{const ke=document.getElementById(ne.menu.get());ke&&ke.contains($e)&&jn($e)}),!st||document.activeElement===st)return;jn(st)}}),{ids:ne,elements:{subTrigger:Pt,subMenu:pt,subArrow:Lt},states:{subOpen:G},options:Z}};Ui(()=>{const W=document.getElementById(C.trigger.get());pe(W)&&h.get()&&b.set(W);const x=[],U=()=>w.set(!1),G=()=>{w.set(!0),x.push(Qt(hn(document,"pointerdown",U,{capture:!0,once:!0}),hn(document,"pointermove",U,{capture:!0,once:!0})))},Z=Ie=>{if(Ie.key===mt.ESCAPE&&a.get()){h.set(!1);return}};return x.push(hn(document,"keydown",G,{capture:!0})),x.push(hn(document,"keydown",Z)),()=>{x.forEach(Ie=>Ie())}}),Ft([h,H],([W,x])=>{!W&&x&&jn(x)}),Ft([h],([W])=>{if(Rn&&!W){const x=b.get();if(!x)return;const U=g.get();!W&&x&&yc({prop:U,defaultEl:x})}}),Ft([h,r],([W,x])=>{if(!Rn)return;const U=[];return W&&x&&U.push(wc()),Ln(1).then(()=>{const G=document.getElementById(C.menu.get());if(G&&W&&w.get()){if(d.get()){bt(G);return}const Z=vn(G);if(!Z.length)return;bt(Z[0])}}),()=>{U.forEach(G=>G())}}),Ft(h,W=>{if(!Rn)return;const x=()=>w.set(!1),U=G=>{if(w.set(!0),G.key===mt.ESCAPE&&W&&a.get()){h.set(!1);return}};return Qt(hn(document,"pointerdown",x,{capture:!0,once:!0}),hn(document,"pointermove",x,{capture:!0,once:!0}),hn(document,"keydown",U,{capture:!0}))});function Ke(W){h.update(x=>{const U=!x;return U&&(_.set(kc(W)),k.set(Oc(W)),b.set(W)),U})}function At(W){const x=W.currentTarget;if(!pe(x))return;const U=H.get();U&&jn(U),Sc(x),H.set(x)}function yt(W){const x=W.currentTarget;pe(x)&&jn(x)}function Nt(W){nt(W)&&W.preventDefault()}function wt(W){if(nt(W))return;const x=W.target;if(!pe(x))return;const U=lt(x);U&&bt(U)}function nn(W){nt(W)&&W.preventDefault()}function Rt(W){if(!nr(W))return;const x=W.target,U=W.currentTarget;if(!pe(U)||!pe(x))return;const G=v.get(),Z=G!==W.clientX;if(U.contains(x)&&Z){const Ie=W.clientX>G?"right":"left";y.set(Ie),v.set(W.clientX)}}function rn(W,x=null){if(!nr(W)||(Nt(W),W.defaultPrevented))return;if(x){bt(x);return}const U=W.currentTarget;pe(U)&&bt(U)}function Jn(W){nr(W)&&wt(W)}function Pn(W){if(P.get().length>0&&W.key===mt.SPACE){W.preventDefault();return}if(po.includes(W.key)){W.preventDefault();const G=W.currentTarget;if(!pe(G))return;G.click()}}function he(W){return W==="indeterminate"}function Me(W){return he(W)?"indeterminate":W?"checked":"unchecked"}function nt(W){return N.get()(W)}function lt(W){const x=W.closest('[role="menu"]');return pe(x)?x:null}return{elements:{trigger:T,menu:R,overlay:q,item:F,group:te,groupLabel:X,arrow:D,separator:_e},builders:{createCheckboxItem:be,createSubmenu:at,createMenuRadioGroup:me},states:{open:h},helpers:{handleTypeaheadSearch:L},ids:C,options:t.rootOptions}}function na(t,e,n){if(t.shiftKey){const r=n.get();r&&(t.preventDefault(),Ln(1).then(()=>r.focus()),n.set(null))}else{const r=e.get();r&&(t.preventDefault(),Ln(1).then(()=>r.focus()),e.set(null))}}function vn(t){return Array.from(t.querySelectorAll(`[data-melt-menu-id="${t.id}"]`)).filter(e=>pe(e))}function Jr(t){!t||!xt(t)||(t.setAttribute("data-disabled",""),t.setAttribute("aria-disabled","true"))}function Fo(t){if(!Rn)return;const e=t.get();e&&(window.clearTimeout(e),t.set(null))}function nr(t){return t.pointerType==="mouse"}function rr(t,e){if(!t)return;const n=t.closest(`${e()}, ${e("submenu")}`);pe(n)&&t.setAttribute("data-melt-menu-id",n.id)}function ra(t,e){t.preventDefault();const n=document.activeElement,r=t.currentTarget;if(!pe(n)||!pe(r))return;const o=vn(r);if(!o.length)return;const i=o.filter(s=>!(s.hasAttribute("data-disabled")||s.getAttribute("disabled")==="true")),a=i.indexOf(n);let l;switch(t.key){case mt.ARROW_DOWN:e?l=a0?a-1:i.length-1:l=a<0?i.length-1:a>0?a-1:0;break;case mt.HOME:l=0;break;case mt.END:l=i.length-1;break;default:return}bt(i[l])}function ef(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return tf(n,e)}function tf(t,e){const{x:n,y:r}=t;let o=!1;for(let i=0,a=e.length-1;ir!=c>r&&n<(u-l)*(r-s)/(c-s)+l&&(o=!o)}return o}function nf(t){const e=document.activeElement;if(!pe(e))return!1;const n=e.closest(`[data-id="${t}"]`);return pe(n)}function rf(t){return t?"open":"closed"}const of={arrowSize:8,positioning:{placement:"bottom"},preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,portal:void 0,loop:!1,dir:"ltr",defaultOpen:!1,forceVisible:!1,typeahead:!0,closeFocus:void 0,disableFocusFirstItem:!1,closeOnItemClick:!0,onOutsideClick:void 0};function af(t){const e={...of,...t},n=so(Cs(e,"ids")),r=e.open??dt(e.defaultOpen),o=uo(r,e==null?void 0:e.onOpenChange),i=vt(dt(null)),a=vt(dt(null)),l=vt(dt(null)),{elements:s,builders:u,ids:c,states:f,options:g}=$c({rootOptions:n,rootOpen:o,rootActiveTrigger:vt(i),nextFocusable:vt(a),prevFocusable:vt(l),selector:"dropdown-menu",removeScroll:!0,ids:e.ids});return{ids:c,elements:s,states:f,builders:u,options:g}}function lf(){return ec(10)}function wi(){return{NAME:"menu",SUB_NAME:"menu-submenu",RADIO_GROUP_NAME:"menu-radiogroup",CHECKBOX_ITEM_NAME:"menu-checkboxitem",RADIO_ITEM_NAME:"menu-radioitem",GROUP_NAME:"menu-group",PARTS:["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","radio-indicator","separator","sub-content","sub-trigger","trigger"]}}function Fr(){const{NAME:t}=wi();return Ns(t)}function sf(t){const{NAME:e,PARTS:n}=wi(),r=Fc("menu",n),o={...af({...qc(t),forceVisible:!0}),getAttrs:r};return vi(e,o),{...o,updateOption:Wc(o.options)}}function uf(){const{GROUP_NAME:t}=wi(),{elements:{group:e},getAttrs:n}=Fr(),r=lf();return vi(t,r),{group:e,id:r,getAttrs:n}}function cf(t){const n={...{side:"bottom",align:"center"},...t},{options:{positioning:r}}=Fr();Ec(r)(n)}const ff=t=>({builder:t&8}),oa=t=>({builder:t[3]}),df=t=>({builder:t&8}),ia=t=>({builder:t[3]});function mf(t){let e=t[1]?"a":"div",n,r,o=(t[1]?"a":"div")&&qo(t);return{c(){o&&o.c(),n=de()},l(i){o&&o.l(i),n=de()},m(i,a){o&&o.m(i,a),B(i,n,a),r=!0},p(i,a){i[1],e?Re(e,i[1]?"a":"div")?(o.d(1),o=qo(i),e=i[1]?"a":"div",o.c(),o.m(n.parentNode,n)):o.p(i,a):(o=qo(i),e=i[1]?"a":"div",o.c(),o.m(n.parentNode,n))},i(i){r||(I(o,i),r=!0)},o(i){M(o,i),r=!1},d(i){i&&E(n),o&&o.d(i)}}}function hf(t){let e;const n=t[11].default,r=Ge(n,t,t[10],ia);return{c(){r&&r.c()},l(o){r&&r.l(o)},m(o,i){r&&r.m(o,i),e=!0},p(o,i){r&&r.p&&(!e||i&1032)&&Je(r,n,o,o[10],e?Ze(n,o[10],i,df):Xe(o[10]),ia)},i(o){e||(I(r,o),e=!0)},o(o){M(r,o),e=!1},d(o){r&&r.d(o)}}}function qo(t){let e,n,r,o;const i=t[11].default,a=Ge(i,t,t[10],oa);let l=[{href:t[1]},t[3],t[6]],s={};for(let u=0;u{a[c]=null}),je(),n=a[e],n?n.p(s,u):(n=a[e]=i[e](s),n.c()),I(n,1),n.m(r.parentNode,r))},i(s){o||(I(n),o=!0)},o(s){M(n),o=!1},d(s){s&&E(r),a[e].d(s)}}}function pf(t,e,n){let r,o;const i=["href","asChild","disabled","el"];let a=St(e,i),l,{$$slots:s={},$$scope:u}=e,{href:c=void 0}=e,{asChild:f=!1}=e,{disabled:g=!1}=e,{el:d=void 0}=e;const{elements:{item:p},getAttrs:m}=Fr();rt(t,p,k=>n(9,l=k));const h=yi();function b(k){Gt.call(this,t,k)}function _(k){qt[k?"unshift":"push"](()=>{d=k,n(0,d)})}return t.$$set=k=>{e=Be(Be({},e),En(k)),n(6,a=St(e,i)),"href"in k&&n(1,c=k.href),"asChild"in k&&n(2,f=k.asChild),"disabled"in k&&n(7,g=k.disabled),"el"in k&&n(0,d=k.el),"$$scope"in k&&n(10,u=k.$$scope)},t.$$.update=()=>{t.$$.dirty&512&&n(3,r=l),t.$$.dirty&128&&n(8,o={...m("item"),...Bc(g)}),t.$$.dirty&264&&Object.assign(r,o)},[d,c,f,r,p,h,a,g,o,l,u,s,b,_]}class _f extends He{constructor(e){super(),Fe(this,e,pf,gf,Re,{href:1,asChild:2,disabled:7,el:0})}}const bf=t=>({builder:t&4}),aa=t=>({builder:t[2]}),vf=t=>({builder:t&4}),la=t=>({builder:t[2]});function yf(t){let e,n,r,o;const i=t[7].default,a=Ge(i,t,t[6],aa);let l=[t[2],t[4]],s={};for(let u=0;u{a[c]=null}),je(),n=a[e],n?n.p(s,u):(n=a[e]=i[e](s),n.c()),I(n,1),n.m(r.parentNode,r))},i(s){o||(I(n),o=!0)},o(s){M(n),o=!1},d(s){s&&E(r),a[e].d(s)}}}function Of(t,e,n){let r;const o=["asChild","el"];let i=St(e,o),a,{$$slots:l={},$$scope:s}=e,{asChild:u=!1}=e,{el:c=void 0}=e;const{group:f,id:g,getAttrs:d}=uf();rt(t,f,h=>n(5,a=h));const p=d("group");function m(h){qt[h?"unshift":"push"](()=>{c=h,n(0,c)})}return t.$$set=h=>{e=Be(Be({},e),En(h)),n(4,i=St(e,o)),"asChild"in h&&n(1,u=h.asChild),"el"in h&&n(0,c=h.el),"$$scope"in h&&n(6,s=h.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&n(2,r=a(g)),t.$$.dirty&4&&Object.assign(r,p)},[c,u,r,f,i,a,s,l,m]}class Sf extends He{constructor(e){super(),Fe(this,e,Of,kf,Re,{asChild:1,el:0})}}const Ef=t=>({ids:t&1}),sa=t=>({ids:t[0]});function Pf(t){let e;const n=t[16].default,r=Ge(n,t,t[15],sa);return{c(){r&&r.c()},l(o){r&&r.l(o)},m(o,i){r&&r.m(o,i),e=!0},p(o,[i]){r&&r.p&&(!e||i&32769)&&Je(r,n,o,o[15],e?Ze(n,o[15],i,Ef):Xe(o[15]),sa)},i(o){e||(I(r,o),e=!0)},o(o){M(r,o),e=!1},d(o){r&&r.d(o)}}}function If(t,e,n){let r,{$$slots:o={},$$scope:i}=e,{closeOnOutsideClick:a=void 0}=e,{closeOnEscape:l=void 0}=e,{portal:s=void 0}=e,{open:u=void 0}=e,{onOpenChange:c=void 0}=e,{preventScroll:f=void 0}=e,{loop:g=void 0}=e,{dir:d=void 0}=e,{typeahead:p=void 0}=e,{closeFocus:m=void 0}=e,{disableFocusFirstItem:h=void 0}=e,{closeOnItemClick:b=void 0}=e,{onOutsideClick:_=void 0}=e;const{states:{open:k},updateOption:w,ids:v}=sf({closeOnOutsideClick:a,closeOnEscape:l,portal:s,forceVisible:!0,defaultOpen:u,preventScroll:f,loop:g,dir:d,typeahead:p,closeFocus:m,disableFocusFirstItem:h,closeOnItemClick:b,onOutsideClick:_,onOpenChange:({next:y})=>(u!==y&&(c==null||c(y),n(2,u=y)),y)}),S=Hn([v.menu,v.trigger],([y,H])=>({menu:y,trigger:H}));return rt(t,S,y=>n(0,r=y)),t.$$set=y=>{"closeOnOutsideClick"in y&&n(3,a=y.closeOnOutsideClick),"closeOnEscape"in y&&n(4,l=y.closeOnEscape),"portal"in y&&n(5,s=y.portal),"open"in y&&n(2,u=y.open),"onOpenChange"in y&&n(6,c=y.onOpenChange),"preventScroll"in y&&n(7,f=y.preventScroll),"loop"in y&&n(8,g=y.loop),"dir"in y&&n(9,d=y.dir),"typeahead"in y&&n(10,p=y.typeahead),"closeFocus"in y&&n(11,m=y.closeFocus),"disableFocusFirstItem"in y&&n(12,h=y.disableFocusFirstItem),"closeOnItemClick"in y&&n(13,b=y.closeOnItemClick),"onOutsideClick"in y&&n(14,_=y.onOutsideClick),"$$scope"in y&&n(15,i=y.$$scope)},t.$$.update=()=>{t.$$.dirty&4&&u!==void 0&&k.set(u),t.$$.dirty&8&&w("closeOnOutsideClick",a),t.$$.dirty&16&&w("closeOnEscape",l),t.$$.dirty&32&&w("portal",s),t.$$.dirty&128&&w("preventScroll",f),t.$$.dirty&256&&w("loop",g),t.$$.dirty&512&&w("dir",d),t.$$.dirty&2048&&w("closeFocus",m),t.$$.dirty&4096&&w("disableFocusFirstItem",h),t.$$.dirty&1024&&w("typeahead",p),t.$$.dirty&8192&&w("closeOnItemClick",b),t.$$.dirty&16384&&w("onOutsideClick",_)},[r,S,u,a,l,s,c,f,g,d,p,m,h,b,_,i,o]}class Df extends He{constructor(e){super(),Fe(this,e,If,Pf,Re,{closeOnOutsideClick:3,closeOnEscape:4,portal:5,open:2,onOpenChange:6,preventScroll:7,loop:8,dir:9,typeahead:10,closeFocus:11,disableFocusFirstItem:12,closeOnItemClick:13,onOutsideClick:14})}}const jf=t=>({builder:t[0]&256}),ua=t=>({builder:t[8]}),Cf=t=>({builder:t[0]&256}),ca=t=>({builder:t[8]}),Tf=t=>({builder:t[0]&256}),fa=t=>({builder:t[8]}),Mf=t=>({builder:t[0]&256}),da=t=>({builder:t[8]}),Af=t=>({builder:t[0]&256}),ma=t=>({builder:t[8]}),Nf=t=>({builder:t[0]&256}),ha=t=>({builder:t[8]});function Rf(t){let e,n,r,o;const i=t[28].default,a=Ge(i,t,t[27],ua);let l=[t[8],t[13]],s={};for(let u=0;u{n=Hr(e,t[3],t[4]),n.start()})),r=!0)},o(c){M(l,c),r=!1},d(c){c&&E(e),l&&l.d(c),t[31](null),o=!1,tn(i)}}}function Ff(t){let e,n,r,o,i,a;const l=t[28].default,s=Ge(l,t,t[27],da);let u=[t[8],t[13]],c={};for(let f=0;f{o&&(r&&r.end(1),n=Hr(e,t[3],t[4]),n.start())}),o=!0)},o(f){M(s,f),n&&n.invalidate(),f&&(r=ko(e,t[5],t[6])),o=!1},d(f){f&&E(e),s&&s.d(f),t[30](null),f&&r&&r.end(),i=!1,tn(a)}}}function qf(t){let e,n,r,o,i;const a=t[28].default,l=Ge(a,t,t[27],ma);let s=[t[8],t[13]],u={};for(let c=0;c{r&&(n||(n=Dt(e,t[1],t[2],!0)),n.run(1))}),r=!0)},o(c){M(l,c),c&&(n||(n=Dt(e,t[1],t[2],!1)),n.run(0)),r=!1},d(c){c&&E(e),l&&l.d(c),t[29](null),c&&n&&n.end(),o=!1,tn(i)}}}function Wf(t){let e;const n=t[28].default,r=Ge(n,t,t[27],ha);return{c(){r&&r.c()},l(o){r&&r.l(o)},m(o,i){r&&r.m(o,i),e=!0},p(o,i){r&&r.p&&(!e||i[0]&134217984)&&Je(r,n,o,o[27],e?Ze(n,o[27],i,Nf):Xe(o[27]),ha)},i(o){e||(I(r,o),e=!0)},o(o){M(r,o),e=!1},d(o){r&&r.d(o)}}}function Bf(t){let e,n,r,o;const i=[Wf,qf,Ff,Hf,Lf,Rf],a=[];function l(s,u){return s[7]&&s[9]?0:s[1]&&s[9]?1:s[3]&&s[5]&&s[9]?2:s[3]&&s[9]?3:s[5]&&s[9]?4:s[9]?5:-1}return~(e=l(t))&&(n=a[e]=i[e](t)),{c(){n&&n.c(),r=de()},l(s){n&&n.l(s),r=de()},m(s,u){~e&&a[e].m(s,u),B(s,r,u),o=!0},p(s,u){let c=e;e=l(s),e===c?~e&&a[e].p(s,u):(n&&(De(),M(a[c],1,1,()=>{a[c]=null}),je()),~e?(n=a[e],n?n.p(s,u):(n=a[e]=i[e](s),n.c()),I(n,1),n.m(r.parentNode,r)):n=null)},i(s){o||(I(n),o=!0)},o(s){M(n),o=!1},d(s){s&&E(r),~e&&a[e].d(s)}}}function Uf(t,e,n){let r;const o=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let i=St(e,o),a,l,{$$slots:s={},$$scope:u}=e,{transition:c=void 0}=e,{transitionConfig:f=void 0}=e,{inTransition:g=void 0}=e,{inTransitionConfig:d=void 0}=e,{outTransition:p=void 0}=e,{outTransitionConfig:m=void 0}=e,{asChild:h=!1}=e,{id:b=void 0}=e,{side:_="bottom"}=e,{align:k="center"}=e,{sideOffset:w=0}=e,{alignOffset:v=0}=e,{collisionPadding:S=8}=e,{avoidCollisions:y=!0}=e,{collisionBoundary:H=void 0}=e,{sameWidth:N=!1}=e,{fitViewport:P=!1}=e,{strategy:L="absolute"}=e,{overlap:C=!1}=e,{el:j=void 0}=e;const{elements:{menu:R},states:{open:T},ids:D,getAttrs:q}=Fr();rt(t,R,Q=>n(26,l=Q)),rt(t,T,Q=>n(9,a=Q));const F=yi(),te=q("content");function X(Q){qt[Q?"unshift":"push"](()=>{j=Q,n(0,j)})}function le(Q){qt[Q?"unshift":"push"](()=>{j=Q,n(0,j)})}function be(Q){qt[Q?"unshift":"push"](()=>{j=Q,n(0,j)})}function me(Q){qt[Q?"unshift":"push"](()=>{j=Q,n(0,j)})}function _e(Q){qt[Q?"unshift":"push"](()=>{j=Q,n(0,j)})}return t.$$set=Q=>{e=Be(Be({},e),En(Q)),n(13,i=St(e,o)),"transition"in Q&&n(1,c=Q.transition),"transitionConfig"in Q&&n(2,f=Q.transitionConfig),"inTransition"in Q&&n(3,g=Q.inTransition),"inTransitionConfig"in Q&&n(4,d=Q.inTransitionConfig),"outTransition"in Q&&n(5,p=Q.outTransition),"outTransitionConfig"in Q&&n(6,m=Q.outTransitionConfig),"asChild"in Q&&n(7,h=Q.asChild),"id"in Q&&n(14,b=Q.id),"side"in Q&&n(15,_=Q.side),"align"in Q&&n(16,k=Q.align),"sideOffset"in Q&&n(17,w=Q.sideOffset),"alignOffset"in Q&&n(18,v=Q.alignOffset),"collisionPadding"in Q&&n(19,S=Q.collisionPadding),"avoidCollisions"in Q&&n(20,y=Q.avoidCollisions),"collisionBoundary"in Q&&n(21,H=Q.collisionBoundary),"sameWidth"in Q&&n(22,N=Q.sameWidth),"fitViewport"in Q&&n(23,P=Q.fitViewport),"strategy"in Q&&n(24,L=Q.strategy),"overlap"in Q&&n(25,C=Q.overlap),"el"in Q&&n(0,j=Q.el),"$$scope"in Q&&n(27,u=Q.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&16384&&b&&D.menu.set(b),t.$$.dirty[0]&67108864&&n(8,r=l),t.$$.dirty[0]&256&&Object.assign(r,te),t.$$.dirty[0]&67076608&&a&&cf({side:_,align:k,sideOffset:w,alignOffset:v,collisionPadding:S,avoidCollisions:y,collisionBoundary:H,sameWidth:N,fitViewport:P,strategy:L,overlap:C})},[j,c,f,g,d,p,m,h,r,a,R,T,F,i,b,_,k,w,v,S,y,H,N,P,L,C,l,u,s,X,le,be,me,_e]}class Vf extends He{constructor(e){super(),Fe(this,e,Uf,Bf,Re,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,strategy:24,overlap:25,el:0},null,[-1,-1])}}const Kf=t=>({builder:t&4}),ga=t=>({builder:t[2]}),Yf=t=>({builder:t&4}),pa=t=>({builder:t[2]});function zf(t){let e,n,r,o;const i=t[9].default,a=Ge(i,t,t[8],ga);let l=[t[2],{type:"button"},t[5]],s={};for(let u=0;u{a[c]=null}),je(),n=a[e],n?n.p(s,u):(n=a[e]=i[e](s),n.c()),I(n,1),n.m(r.parentNode,r))},i(s){o||(I(n),o=!0)},o(s){M(n),o=!1},d(s){s&&E(r),a[e].d(s)}}}function Gf(t,e,n){let r;const o=["asChild","id","el"];let i=St(e,o),a,{$$slots:l={},$$scope:s}=e,{asChild:u=!1}=e,{id:c=void 0}=e,{el:f=void 0}=e;const{elements:{trigger:g},ids:d,getAttrs:p}=Fr();rt(t,g,_=>n(7,a=_));const m=yi(),h=p("trigger");function b(_){qt[_?"unshift":"push"](()=>{f=_,n(0,f)})}return t.$$set=_=>{e=Be(Be({},e),En(_)),n(5,i=St(e,o)),"asChild"in _&&n(1,u=_.asChild),"id"in _&&n(6,c=_.id),"el"in _&&n(0,f=_.el),"$$scope"in _&&n(8,s=_.$$scope)},t.$$.update=()=>{t.$$.dirty&64&&c&&d.trigger.set(c),t.$$.dirty&128&&n(2,r=a),t.$$.dirty&4&&Object.assign(r,h)},[f,u,r,g,m,i,c,a,s,l,b]}class Jf extends He{constructor(e){super(),Fe(this,e,Gf,xf,Re,{asChild:1,id:6,el:0})}}const Wo=t=>t instanceof Date,ki=t=>Object.keys(t).length===0,Xt=t=>t!=null&&typeof t=="object",Oi=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Bo=t=>Xt(t)&&ki(t),Si=()=>Object.create(null),Bs=(t,e)=>t===e||!Xt(t)||!Xt(e)?{}:Object.keys(e).reduce((n,r)=>{if(Oi(t,r)){const o=Bs(t[r],e[r]);return Xt(o)&&ki(o)||(n[r]=o),n}return n[r]=e[r],n},Si()),Us=(t,e)=>t===e||!Xt(t)||!Xt(e)?{}:Object.keys(t).reduce((n,r)=>{if(Oi(e,r)){const o=Us(t[r],e[r]);return Xt(o)&&ki(o)||(n[r]=o),n}return n[r]=void 0,n},Si()),Vs=(t,e)=>t===e?{}:!Xt(t)||!Xt(e)?e:Wo(t)||Wo(e)?t.valueOf()==e.valueOf()?{}:e:Object.keys(e).reduce((n,r)=>{if(Oi(t,r)){const o=Vs(t[r],e[r]);return Bo(o)&&!Wo(o)&&(Bo(t[r])||!Bo(e[r]))||(n[r]=o),n}return n},Si()),Xf=(t,e)=>({added:Bs(t,e),deleted:Us(t,e),updated:Vs(t,e)});var Nr,Rr,Wn,wo;class Zf{constructor(){$n(this,Nr,[]);$n(this,Rr,{});$n(this,Wn,new Set);No(this,"subscribe",e=>(ln(this,Wn).add(e),e(this.generations),()=>ln(this,Wn).delete(e)));$n(this,wo,0);No(this,"publish",()=>{if(Wi(this,wo)._++>1e5)throw new Error("History published too many times.");ln(this,Wn).forEach(e=>e(this.generations))})}get generations(){return[...ln(this,Nr)]}push(e){const n=a=>{let l=Object.entries(a);l.sort((u,c)=>u[0].localeCompare(c[0]));const s=Object.fromEntries(l);return JSON.parse(JSON.stringify(s))},r=n(ln(this,Rr)),o=n(e),i=Xf(r,o);ln(this,Nr).push({...i,before:r,after:o,asof:new Date}),Ro(this,Rr,o),this.publish()}}Nr=new WeakMap,Rr=new WeakMap,Wn=new WeakMap,wo=new WeakMap;function _a(t){let e,n;return{c(){e=K("span"),n=ye(t[1]),this.h()},l(r){e=Y(r,"SPAN",{class:!0});var o=J(e);n=we(o,t[1]),o.forEach(E),this.h()},h(){A(e,"class","cursor-pointer font-bold pr-8 flex items-center")},m(r,o){B(r,e,o),V(e,n)},p(r,o){o&2&&it(n,r[1])},d(r){r&&E(e)}}}function $f(t){let e,n,r,o,i,a,l,s,u,c,f=t[1]&&_a(t);return{c(){e=K("div"),f&&f.c(),n=$(),r=K("span"),o=ye(t[2]),this.h()},l(g){e=Y(g,"DIV",{role:!0,class:!0});var d=J(e);f&&f.l(d),n=ee(d),r=Y(d,"SPAN",{class:!0});var p=J(r);o=we(p,t[2]),p.forEach(E),d.forEach(E),this.h()},h(){A(r,"class","cursor-pointer"),A(e,"role","none"),A(e,"class",i="print:hidden rounded py-1 px-3 my-4 mx-0 shadow-md text-xs font-mono flex justify-between transition-all duration-300 border "+(t[0]??"")+" svelte-1v4b5ad")},m(g,d){B(g,e,d),f&&f.m(e,null),V(e,n),V(e,r),V(r,o),s=!0,u||(c=[We(e,"click",t[3]),We(e,"keypress",t[3])],u=!0)},p(g,[d]){g[1]?f?f.p(g,d):(f=_a(g),f.c(),f.m(e,n)):f&&(f.d(1),f=null),(!s||d&4)&&it(o,g[2]),(!s||d&1&&i!==(i="print:hidden rounded py-1 px-3 my-4 mx-0 shadow-md text-xs font-mono flex justify-between transition-all duration-300 border "+(g[0]??"")+" svelte-1v4b5ad"))&&A(e,"class",i)},i(g){s||(g&&Mt(()=>{s&&(l&&l.end(1),a=Hr(e,$o,{}),a.start())}),s=!0)},o(g){a&&a.invalidate(),g&&(l=ko(e,Sn,{x:1e3,duration:1e3,delay:0,opacity:.8})),s=!1},d(g){g&&E(e),f&&f.d(),g&&l&&l.end(),u=!1,tn(c)}}}function ed(t,e,n){let{id:r}=e,{status:o="info"}=e,{title:i}=e,{message:a}=e,{dismissable:l=!0}=e;const s=Dc(),u=()=>{l&&s("dismiss",{id:r})};return t.$$set=c=>{"id"in c&&n(4,r=c.id),"status"in c&&n(0,o=c.status),"title"in c&&n(1,i=c.title),"message"in c&&n(2,a=c.message),"dismissable"in c&&n(5,l=c.dismissable)},[o,i,a,u,r,l]}class td extends He{constructor(e){super(),Fe(this,e,ed,$f,Re,{id:4,status:0,title:1,message:2,dismissable:5})}}function ba(t,e,n){const r=t.slice();return r[2]=e[n],r}function va(t,e){let n,r,o;const i=[e[2]];let a={};for(let l=0;ll[2].id;for(let l=0;ln(0,r=i)),[r,({detail:i})=>Vi.dismiss(i.id)]}class od extends He{constructor(e){super(),Fe(this,e,rd,nd,Re,{})}}const id="/_app/immutable/assets/wordmark-gray-800.CnzB_64T.png";function ad(t){let e,n;return{c(){e=K("img"),this.h()},l(r){e=Y(r,"IMG",{src:!0,alt:!0,class:!0,href:!0}),this.h()},h(){ni(e.src,n=id)||A(e,"src",n),A(e,"alt","Home"),A(e,"class","h-5 aspect-auto"),A(e,"href",Ce("/"))},m(r,o){B(r,e,o)},p:Ne,d(r){r&&E(e)}}}function ld(t){let e;return{c(){e=ye(t[1])},l(n){e=we(n,t[1])},m(n,r){B(n,e,r)},p(n,r){r&2&&it(e,n[1])},d(n){n&&E(e)}}}function sd(t){let e,n;return{c(){e=K("img"),this.h()},l(r){e=Y(r,"IMG",{src:!0,alt:!0,class:!0,href:!0}),this.h()},h(){ni(e.src,n=t[0])||A(e,"src",n),A(e,"alt","Home"),A(e,"class","h-5 aspect-auto"),A(e,"href",Ce("/"))},m(r,o){B(r,e,o)},p(r,o){o&1&&!ni(e.src,n=r[0])&&A(e,"src",n)},d(r){r&&E(e)}}}function ud(t){let e;function n(i,a){return i[0]?sd:i[1]?ld:ad}let r=n(t),o=r(t);return{c(){o.c(),e=de()},l(i){o.l(i),e=de()},m(i,a){o.m(i,a),B(i,e,a)},p(i,[a]){r===(r=n(i))&&o?o.p(i,a):(o.d(1),o=r(i),o&&(o.c(),o.m(e.parentNode,e)))},i:Ne,o:Ne,d(i){i&&E(e),o.d(i)}}}function cd(t,e,n){let{logo:r}=e,{title:o}=e;return t.$$set=i=>{"logo"in i&&n(0,r=i.logo),"title"in i&&n(1,o=i.title)},[r,o]}class Ei extends He{constructor(e){super(),Fe(this,e,cd,ud,Re,{logo:0,title:1})}}/*! @docsearch/js 3.8.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function ri(){return ri=Object.assign?Object.assign.bind():function(t){for(var e=1;e2&&(a.children=arguments.length>3?qr.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)a[i]===void 0&&(a[i]=t.defaultProps[i]);return fr(t,a,r,o,null)}function fr(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Ks,__i:-1,__u:0};return o==null&&Oe.vnode!=null&&Oe.vnode(i),i}function Zt(t){return t.children}function Bt(t,e){this.props=t,this.context=e}function Un(t,e){if(e==null)return t.__?Un(t.__,t.__i+1):null;for(var n;ee&&kn.sort(oi));bo.__r=0}function Js(t,e,n,r,o,i,a,l,s,u,c){var f,g,d,p,m,h=r&&r.__k||Qs,b=e.length;for(n.__d=s,function(_,k,w){var v,S,y,H,N,P=k.length,L=w.length,C=L,j=0;for(_.__k=[],v=0;v0?fr(S.type,S.props,S.key,S.ref?S.ref:null,S.__v):S).__=_,S.__b=_.__b+1,y=null,(N=S.__i=dd(S,w,H,C))!==-1&&(C--,(y=w[N])&&(y.__u|=131072)),y==null||y.__v===null?(N==-1&&j--,typeof S.type!="function"&&(S.__u|=65536)):N!==H&&(N==H-1?j--:N==H+1?j++:(N>H?j--:j++,S.__u|=65536))):S=_.__k[v]=null;if(C)for(v=0;v(s==null||131072&s.__u?0:1))for(;a>=0||l=0){if((s=e[a])&&!(131072&s.__u)&&o==s.key&&i===s.type)return a;a--}if(l2&&(l.children=arguments.length>3?qr.call(arguments,2):n),fr(t.type,l,r||t.key,o||t.ref,null)}qr=Qs.slice,Oe={__e:function(t,e,n,r){for(var o,i,a;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(t)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,r||{}),a=o.__d),a)return o.__E=o}catch(l){t=l}throw t}},Ks=0,Bt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Jt({},this.state),typeof t=="function"&&(t=t(Jt({},n),this.props)),t&&Jt(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),li(this))},Bt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),li(this))},Bt.prototype.render=Zt,kn=[],Ys=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,oi=function(t,e){return t.__v.__b-e.__v.__b},bo.__r=0,Pi=0,ii=ka(!1),ai=ka(!0),zs=0;var un,Ve,Uo,Oa,Vn=0,tu=[],xe=Oe,Sa=xe.__b,Ea=xe.__r,Pa=xe.diffed,Ia=xe.__c,Da=xe.unmount,ja=xe.__;function Kn(t,e){xe.__h&&xe.__h(Ve,t,Vn||e),Vn=0;var n=Ve.__H||(Ve.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Wr(t){return Vn=1,ji(su,t)}function ji(t,e,n){var r=Kn(un++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):su(void 0,e),function(l){var s=r.__N?r.__N[0]:r.__[0],u=r.t(s,l);s!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Ve,!Ve.u)){var o=function(l,s,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(g){return!!g.__c});if(c.every(function(g){return!g.__N}))return!i||i.call(this,l,s,u);var f=!1;return c.forEach(function(g){if(g.__N){var d=g.__[0];g.__=g.__N,g.__N=void 0,d!==g.__[0]&&(f=!0)}}),!(!f&&r.__c.props===l)&&(!i||i.call(this,l,s,u))};Ve.u=!0;var i=Ve.shouldComponentUpdate,a=Ve.componentWillUpdate;Ve.componentWillUpdate=function(l,s,u){if(this.__e){var c=i;i=void 0,o(l,s,u),i=c}a&&a.call(this,l,s,u)},Ve.shouldComponentUpdate=o}return r.__N||r.__}function Br(t,e){var n=Kn(un++,3);!xe.__s&&Ci(n.__H,e)&&(n.__=t,n.i=e,Ve.__H.__h.push(n))}function Ur(t,e){var n=Kn(un++,4);!xe.__s&&Ci(n.__H,e)&&(n.__=t,n.i=e,Ve.__h.push(n))}function nu(t){return Vn=5,Eo(function(){return{current:t}},[])}function ru(t,e,n){Vn=6,Ur(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function Eo(t,e){var n=Kn(un++,7);return Ci(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ou(t,e){return Vn=8,Eo(function(){return t},e)}function iu(t){var e=Ve.context[t.__c],n=Kn(un++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(Ve)),e.props.value):t.__}function au(t,e){xe.useDebugValue&&xe.useDebugValue(e?e(t):t)}function lu(){var t=Kn(un++,11);if(!t.__){for(var e=Ve.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function pd(){for(var t;t=tu.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(co),t.__H.__h.forEach(si),t.__H.__h=[]}catch(e){t.__H.__h=[],xe.__e(e,t.__v)}}xe.__b=function(t){Ve=null,Sa&&Sa(t)},xe.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ja&&ja(t,e)},xe.__r=function(t){Ea&&Ea(t),un=0;var e=(Ve=t.__c).__H;e&&(Uo===Ve?(e.__h=[],Ve.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(co),e.__h.forEach(si),e.__h=[],un=0)),Uo=Ve},xe.diffed=function(t){Pa&&Pa(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(tu.push(e)!==1&&Oa===xe.requestAnimationFrame||((Oa=xe.requestAnimationFrame)||_d)(pd)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Uo=Ve=null},xe.__c=function(t,e){e.some(function(n){try{n.__h.forEach(co),n.__h=n.__h.filter(function(r){return!r.__||si(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],xe.__e(r,n.__v)}}),Ia&&Ia(t,e)},xe.unmount=function(t){Da&&Da(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{co(r)}catch(o){e=o}}),n.__H=void 0,e&&xe.__e(e,n.__v))};var Ca=typeof requestAnimationFrame=="function";function _d(t){var e,n=function(){clearTimeout(r),Ca&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Ca&&(e=requestAnimationFrame(n))}function co(t){var e=Ve,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Ve=e}function si(t){var e=Ve;t.__c=t.__(),Ve=e}function Ci(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function su(t,e){return typeof e=="function"?e(t):e}function ui(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function ci(t,e){this.props=t,this.context=e}(ci.prototype=new Bt).isPureReactComponent=!0,ci.prototype.shouldComponentUpdate=function(t,e){return ui(this.props,t)||ui(this.state,e)};var Ta=Oe.__b;Oe.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Ta&&Ta(t)};var bd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Ma=function(t,e){return t==null?null:$t($t(t).map(e))},vd={map:Ma,forEach:Ma,count:function(t){return t?$t(t).length:0},only:function(t){var e=$t(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:$t},yd=Oe.__e;Oe.__e=function(t,e,n,r){if(t.then){for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e)}yd(t,e,n,r)};var Aa=Oe.unmount;function uu(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=function(r,o){for(var i in o)r[i]=o[i];return r}({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return uu(r,e,n)})),t}function cu(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return cu(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function fo(){this.__u=0,this.t=null,this.__b=null}function fu(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function sr(){this.u=null,this.o=null}Oe.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Aa&&Aa(t)},(fo.prototype=new Bt).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=fu(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=a;var l=function(){if(!--r.__u){if(r.state.__a){var s=r.state.__a;r.__v.__k[0]=cu(s,s.__c.__P,s.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},fo.prototype.componentWillUnmount=function(){this.t=[]},fo.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=uu(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&Wt(Zt,null,t.fallback);return o&&(o.__u&=-33),[Wt(Zt,null,e.__a?null:t.children),o]};var Na=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),e.i.removeChild(r)}}),jr(Wt(wd,{context:e.context},t.__v),e.l)}function du(t,e){var n=Wt(kd,{__v:t,i:e});return n.containerInfo=e,n}(sr.prototype=new Bt).__a=function(t){var e=this,n=fu(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),Na(e,t,r)):o()};n?n(i):i()}},sr.prototype.render=function(t){this.u=null,this.o=new Map;var e=$t(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},sr.prototype.componentDidUpdate=sr.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){Na(t,n,e)})};var mu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Od=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Sd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ed=/[A-Z0-9]/g,Pd=typeof document<"u",Id=function(t){return(typeof Symbol<"u"&&ue(Symbol())=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function hu(t,e,n){return e.__k==null&&(e.textContent=""),jr(t,e),typeof n=="function"&&n(),t?t.__c:null}Bt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Bt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ra=Oe.event;function Dd(){}function jd(){return this.cancelBubble}function Cd(){return this.defaultPrevented}Oe.event=function(t){return Ra&&(t=Ra(t)),t.persist=Dd,t.isPropagationStopped=jd,t.isDefaultPrevented=Cd,t.nativeEvent=t};var Ti,Td={enumerable:!1,configurable:!0,get:function(){return this.class}},La=Oe.vnode;Oe.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,o={},i=r.indexOf("-")===-1;for(var a in n){var l=n[a];if(!(a==="value"&&"defaultValue"in n&&l==null||Pd&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&l===!0?l="":s==="translate"&&l==="no"?l=!1:s[0]==="o"&&s[1]==="n"?s==="ondoubleclick"?a="ondblclick":s!=="onchange"||r!=="input"&&r!=="textarea"||Id(n.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Sd.test(a)&&(a=s):s=a="oninput":i&&Od.test(a)?a=a.replace(Ed,"-$&").toLowerCase():l===null&&(l=void 0),s==="oninput"&&o[a=s]&&(a="oninputCapture"),o[a]=l}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=$t(n.children).forEach(function(u){u.props.selected=o.value.indexOf(u.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=$t(n.children).forEach(function(u){u.props.selected=o.multiple?o.defaultValue.indexOf(u.props.value)!=-1:o.defaultValue==u.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Td)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),e.props=o}(t),t.$$typeof=mu,La&&La(t)};var Ha=Oe.__r;Oe.__r=function(t){Ha&&Ha(t),Ti=t.__c};var Fa=Oe.diffed;Oe.diffed=function(t){Fa&&Fa(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Ti=null};var Md={ReactCurrentDispatcher:{current:{readContext:function(t){return Ti.__n[t.__c].props.value},useCallback:ou,useContext:iu,useDebugValue:au,useDeferredValue:pu,useEffect:Br,useId:lu,useImperativeHandle:ru,useInsertionEffect:bu,useLayoutEffect:Ur,useMemo:Eo,useReducer:ji,useRef:nu,useState:Wr,useSyncExternalStore:vu,useTransition:_u}}};function Zr(t){return!!t&&t.$$typeof===mu}function gu(t){t()}function pu(t){return t}function _u(){return[!1,gu]}var bu=Ur;function vu(t,e){var n=e(),r=Wr({h:{__:n,v:e}}),o=r[0].h,i=r[1];return Ur(function(){o.__=n,o.v=e,Vo(o)&&i({h:o})},[t,n,e]),Br(function(){return Vo(o)&&i({h:o}),t(function(){Vo(o)&&i({h:o})})},[t]),n}function Vo(t){var e,n,r=t.v,o=t.__;try{var i=r();return!((e=o)===(n=i)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}var O={useState:Wr,useId:lu,useReducer:ji,useEffect:Br,useLayoutEffect:Ur,useInsertionEffect:bu,useTransition:_u,useDeferredValue:pu,useSyncExternalStore:vu,startTransition:gu,useRef:nu,useImperativeHandle:ru,useMemo:Eo,useCallback:ou,useContext:iu,useDebugValue:au,version:"18.3.1",Children:vd,render:hu,hydrate:function(t,e,n){return eu(t,e),typeof n=="function"&&n(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(jr(null,t),!0)},createPortal:du,createElement:Wt,createContext:function(t,e){var n={__c:e="__cC"+zs++,__:t,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=new Set,(i={})[e]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.forEach(function(l){l.__e=!0,li(l)})},this.sub=function(a){o.add(a);var l=a.componentWillUnmount;a.componentWillUnmount=function(){o&&o.delete(a),l&&l.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(t){return Wt.bind(null,t)},cloneElement:function(t){return Zr(t)?gd.apply(null,arguments):t},createRef:function(){return{current:null}},Fragment:Zt,isValidElement:Zr,isElement:Zr,isFragment:function(t){return Zr(t)&&t.type===Zt},isMemo:function(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")},findDOMNode:function(t){return t&&(t.base||t.nodeType===1&&t)||null},Component:Bt,PureComponent:ci,memo:function(t,e){function n(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!a:ui(this.props,o)}function r(o){return this.shouldComponentUpdate=n,Wt(t,o)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(t){function e(n){if(!("ref"in n))return t(n,null);var r=n.ref;delete n.ref;var o=t(n,r);return n.ref=r,o}return e.$$typeof=bd,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e},flushSync:function(t,e){return t(e)},unstable_batchedUpdates:function(t,e){return t(e)},StrictMode:Zt,Suspense:fo,SuspenseList:sr,lazy:function(t){var e,n,r;function o(i){if(e||(e=t()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw e;return Wt(n,i)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Md};function fi(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=0;--te){var X=this.tryEntries[te],le=X.completion;if(X.tryLoc==="root")return F("end");if(X.tryLoc<=this.prev){var be=r.call(X,"catchLoc"),me=r.call(X,"finallyLoc");if(be&&me){if(this.prev=0;--F){var te=this.tryEntries[F];if(te.tryLoc<=this.prev&&r.call(te,"finallyLoc")&&this.prev=0;--q){var F=this.tryEntries[q];if(F.finallyLoc===D)return this.complete(F.completion,F.afterLoc),j(F),h}},catch:function(D){for(var q=this.tryEntries.length-1;q>=0;--q){var F=this.tryEntries[q];if(F.tryLoc===D){var te=F.completion;if(te.type==="throw"){var X=te.arg;j(F)}return X}}throw Error("illegal catch attempt")},delegateYield:function(D,q,F){return this.delegate={iterator:T(D),resultName:q,nextLoc:F},this.method==="next"&&(this.arg=t),h}},e}function Tr(t,e){return Tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Tr(t,e)}function Ot(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var o=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var i,a,l,s,u=[],c=!0,f=!1;try{if(l=(o=o.call(n)).next,r===0){if(Object(o)!==o)return;c=!1}else for(;!(c=(i=l.call(o)).done)&&(u.push(i.value),u.length!==r);c=!0);}catch(g){f=!0,a=g}finally{try{if(!c&&o.return!=null&&(s=o.return(),Object(s)!==s))return}finally{if(f)throw a}}return u}}(t,e)||yu(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function dr(t){return function(e){if(Array.isArray(e))return fi(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||yu(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function yu(t,e){if(t){if(typeof t=="string")return fi(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fi(t,e):void 0}}function di(t){var e=typeof Map=="function"?new Map:void 0;return di=function(n){if(n===null||!function(o){try{return Function.toString.call(o).indexOf("[native code]")!==-1}catch{return typeof o=="function"}}(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,r)}function r(){return function(o,i,a){if(Mi())return Reflect.construct.apply(null,arguments);var l=[null];l.push.apply(l,i);var s=new(o.bind.apply(o,l));return a&&Tr(s,a.prototype),s}(n,arguments,Cr(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Tr(r,n)},di(t)}function Ad(){return O.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},O.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function wu(){return O.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},O.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var Nd=["translations"],Yo="Ctrl",Rd=O.forwardRef(function(t,e){var n=t.translations,r=n===void 0?{}:n,o=Ut(t,Nd),i=r.buttonText,a=i===void 0?"Search":i,l=r.buttonAriaLabel,s=l===void 0?"Search":l,u=Ot(Wr(null),2),c=u[0],f=u[1];Br(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?f("⌘"):f(Yo))},[]);var g=Ot(c===Yo?[Yo,"Ctrl",O.createElement(Ad,null)]:["Meta","Command",c],3),d=g[0],p=g[1],m=g[2];return O.createElement("button",ht({type:"button",className:"DocSearch DocSearch-Button","aria-label":"".concat(s," (").concat(p,"+K)")},o,{ref:e}),O.createElement("span",{className:"DocSearch-Button-Container"},O.createElement(wu,null),O.createElement("span",{className:"DocSearch-Button-Placeholder"},a)),O.createElement("span",{className:"DocSearch-Button-Keys"},c!==null&&O.createElement(O.Fragment,null,O.createElement(Ba,{reactsToKey:d},m),O.createElement(Ba,{reactsToKey:"k"},"K"))))});function Ba(t){var e=t.reactsToKey,n=t.children,r=Ot(Wr(!1),2),o=r[0],i=r[1];return Br(function(){if(e)return window.addEventListener("keydown",a),window.addEventListener("keyup",l),function(){window.removeEventListener("keydown",a),window.removeEventListener("keyup",l)};function a(s){s.key===e&&i(!0)}function l(s){s.key!==e&&s.key!=="Meta"||i(!1)}},[e]),O.createElement("kbd",{className:o?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},n)}function ku(t,e){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),i=0;it.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(c[s]=a[s]);return c}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function Ya(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Fn(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=3||p===2&&m>=4||p===1&&m>=10);function b(_,k,w){if(h&&w!==void 0){var v=w[0].__autocomplete_algoliaCredentials,S={"X-Algolia-Application-Id":v.appId,"X-Algolia-API-Key":v.apiKey};g.apply(void 0,[_].concat($r(k),[{headers:S}]))}else g.apply(void 0,[_].concat($r(k)))}return{init:function(_,k){g("init",{appId:_,apiKey:k})},setAuthenticatedUserToken:function(_){g("setAuthenticatedUserToken",_)},setUserToken:function(_){g("setUserToken",_)},clickedObjectIDsAfterSearch:function(){for(var _=arguments.length,k=new Array(_),w=0;w<_;w++)k[w]=arguments[w];k.length>0&&b("clickedObjectIDsAfterSearch",eo(k),k[0].items)},clickedObjectIDs:function(){for(var _=arguments.length,k=new Array(_),w=0;w<_;w++)k[w]=arguments[w];k.length>0&&b("clickedObjectIDs",eo(k),k[0].items)},clickedFilters:function(){for(var _=arguments.length,k=new Array(_),w=0;w<_;w++)k[w]=arguments[w];k.length>0&&g.apply(void 0,["clickedFilters"].concat(k))},convertedObjectIDsAfterSearch:function(){for(var _=arguments.length,k=new Array(_),w=0;w<_;w++)k[w]=arguments[w];k.length>0&&b("convertedObjectIDsAfterSearch",eo(k),k[0].items)},convertedObjectIDs:function(){for(var _=arguments.length,k=new Array(_),w=0;w<_;w++)k[w]=arguments[w];k.length>0&&b("convertedObjectIDs",eo(k),k[0].items)},convertedFilters:function(){for(var _=arguments.length,k=new Array(_),w=0;w<_;w++)k[w]=arguments[w];k.length>0&&g.apply(void 0,["convertedFilters"].concat(k))},viewedObjectIDs:function(){for(var _=arguments.length,k=new Array(_),w=0;w<_;w++)k[w]=arguments[w];k.length>0&&k.reduce(function(v,S){var y=S.items,H=Su(S,qd);return[].concat($r(v),$r(function(N){for(var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,L=[],C=0;C0&&g.apply(void 0,["viewedFilters"].concat(k))}}}(s),c={current:[]},f=ku(function(g){var d=g.state;if(d.isOpen){var p=d.collections.reduce(function(m,h){return[].concat(qn(m),qn(h.items))},[]).filter(or);Ou(c.current.map(function(m){return m.objectID}),p.map(function(m){return m.objectID}))||(c.current=p,p.length>0&&Kd({onItemsChange:o,items:p,insights:u,state:d}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(g){var d=g.setContext,p=g.onSelect,m=g.onActive,h=!1;function b(_){d({algoliaInsightsPlugin:{__algoliaSearchParameters:Tt(Tt({},l?{clickAnalytics:!0}:{}),_?{userToken:Yd(_)}:{}),insights:u}})}s("addAlgoliaAgent","insights-plugin"),b(),s("onUserTokenChange",function(_){h||b(_)}),s("getUserToken",null,function(_,k){h||b(k)}),s("onAuthenticatedUserTokenChange",function(_){_?(h=!0,b(_)):(h=!1,s("getUserToken",null,function(k,w){return b(w)}))}),s("getAuthenticatedUserToken",null,function(_,k){k&&(h=!0,b(k))}),p(function(_){var k=_.item,w=_.state,v=_.event,S=_.source;or(k)&&i({state:w,event:v,insights:u,item:k,insightsEvents:[Tt({eventName:"Item Selected"},Va({item:k,items:S.getItems().filter(or)}))]})}),m(function(_){var k=_.item,w=_.source,v=_.state,S=_.event;or(k)&&a({state:v,event:S,insights:u,item:k,insightsEvents:[Tt({eventName:"Item Active"},Va({item:k,items:w.getItems().filter(or)}))]})})},onStateChange:function(g){var d=g.state;f({state:d})},__autocomplete_pluginOptions:t}}function xa(){var t,e=arguments.length>1?arguments[1]:void 0;return[].concat(qn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]),["autocomplete-internal"],qn((t=e.algoliaInsightsPlugin)!==null&&t!==void 0&&t.__automaticInsights?["autocomplete-automatic"]:[]))}function Yd(t){return typeof t=="number"?t.toString():t}function ho(t,e){var n=e;return{then:function(r,o){return ho(t.then(to(r,n,t),to(o,n,t)),n)},catch:function(r){return ho(t.catch(to(r,n,t)),n)},finally:function(r){return r&&n.onCancelList.push(r),ho(t.finally(to(r&&function(){return n.onCancelList=[],r()},n,t)),n)},cancel:function(){n.isCanceled=!0;var r=n.onCancelList;n.onCancelList=[],r.forEach(function(o){o()})},isCanceled:function(){return n.isCanceled===!0}}}function Ga(t){return ho(t,{isCanceled:!1,onCancelList:[]})}function to(t,e,n){return t?function(r){return e.isCanceled?r:t(r)}:n}function Ja(t,e,n,r){if(!n)return null;if(t<0&&(e===null||r!==null&&e===0))return n+t;var o=(e===null?-1:e)+t;return o<=-1||o>=n?r===null?null:0:o}function Xa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Za(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(j[L]=N[L]);return j}(k,w);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(k);for(S=0;S=0||Object.prototype.propertyIsEnumerable.call(k,v)&&(y[v]=k[v])}return y}(t,$d);ir&&o.environment.clearTimeout(ir);var u=s.setCollections,c=s.setIsOpen,f=s.setQuery,g=s.setActiveItemId,d=s.setStatus,p=s.setContext;if(f(i),g(o.defaultActiveItemId),!i&&o.openOnFocus===!1){var m,h=l.getState().collections.map(function(k){return gn(gn({},k),{},{items:[]})});d("idle"),u(h),c((m=r.isOpen)!==null&&m!==void 0?m:o.shouldPanelOpen({state:l.getState()}));var b=Ga(ll(h).then(function(){return Promise.resolve()}));return l.pendingRequests.add(b)}d("loading"),ir=o.environment.setTimeout(function(){d("stalled")},o.stallThreshold);var _=Ga(ll(o.getSources(gn({query:i,refresh:a,state:l.getState()},s)).then(function(k){return Promise.all(k.map(function(w){return Promise.resolve(w.getItems(gn({query:i,refresh:a,state:l.getState()},s))).then(function(v){return function(S,y,H){if(P=S,!!(P!=null&&P.execute)){var N=S.requesterId==="algolia"?Object.assign.apply(Object,[{}].concat(Iu(Object.keys(H.context).map(function(L){var C;return(C=H.context[L])===null||C===void 0?void 0:C.__algoliaSearchParameters})))):{};return Tn(Tn({},S),{},{requests:S.queries.map(function(L){return{query:S.requesterId==="algolia"?Tn(Tn({},L),{},{params:Tn(Tn({},N),L.params)}):L,sourceId:y,transformResponse:S.transformResponse}})})}var P;return{items:S,sourceId:y}}(v,w.sourceId,l.getState())})})).then(Zd).then(function(w){var v,S=w.some(function(y){return function(H){return!Array.isArray(H)&&!!(H!=null&&H._automaticInsights)}(y.items)});return S&&p({algoliaInsightsPlugin:gn(gn({},((v=l.getState().context)===null||v===void 0?void 0:v.algoliaInsightsPlugin)||{}),{},{__automaticInsights:S})}),function(y,H,N){return H.map(function(P){var L,C=y.filter(function(D){return D.sourceId===P.sourceId}),j=C.map(function(D){return D.items}),R=C[0].transformResponse,T=R?R({results:L=j,hits:L.map(function(D){return D.hits}).filter(Boolean),facetHits:L.map(function(D){var q;return(q=D.facetHits)===null||q===void 0?void 0:q.map(function(F){return{label:F.value,count:F.count,_highlightResult:{label:{value:F.highlighted}}}})}).filter(Boolean)}):j;return P.onResolve({source:P,results:j,items:T,state:N.getState()}),T.every(Boolean),'The `getItems` function from source "'.concat(P.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),`. + +Did you forget to return items? + +See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:P,items:T}})}(w,k,l)}).then(function(w){return function(v){var S=v.props,y=v.state,H=v.collections.reduce(function(P,L){return ro(ro({},P),{},Pu({},L.source.sourceId,ro(ro({},L.source),{},{getItems:function(){return Mr(L.items)}})))},{}),N=S.plugins.reduce(function(P,L){return L.reshape?L.reshape(P):P},{sourcesBySourceId:H,state:y}).sourcesBySourceId;return Mr(S.reshape({sourcesBySourceId:N,sources:Object.values(N),state:y})).filter(Boolean).map(function(P){return{source:P,items:P.getItems()}})}({collections:w,props:o,state:l.getState()})})}))).then(function(k){var w;d("idle"),u(k);var v=o.shouldPanelOpen({state:l.getState()});c((w=r.isOpen)!==null&&w!==void 0?w:o.openOnFocus&&!i&&v||v);var S=On(l.getState());if(l.getState().activeItemId!==null&&S){var y=S.item,H=S.itemInputValue,N=S.itemUrl,P=S.source;P.onActive(gn({event:e,item:y,itemInputValue:H,itemUrl:N,refresh:a,source:P,state:l.getState()},s))}}).finally(function(){d("idle"),ir&&o.environment.clearTimeout(ir)});return l.pendingRequests.add(_)}function kr(t){return kr=typeof Symbol=="function"&&ue(Symbol.iterator)=="symbol"?function(e){return ue(e)}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":ue(e)},kr(t)}var tm=["event","props","refresh","store"];function sl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function _n(t){for(var e=1;e=0||(c[s]=a[s]);return c}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function Sr(t){return Sr=typeof Symbol=="function"&&ue(Symbol.iterator)=="symbol"?function(e){return ue(e)}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":ue(e)},Sr(t)}function cl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function cm(t){for(var e=1;e0},reshape:function(m){return m.sources}},c),{},{id:(g=c.id)!==null&&g!==void 0?g:"autocomplete-".concat(Ld++),plugins:p,initialState:Cn({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},c.initialState),onStateChange:function(m){var h;(h=c.onStateChange)===null||h===void 0||h.call(c,m),p.forEach(function(b){var _;return(_=b.onStateChange)===null||_===void 0?void 0:_.call(b,m)})},onSubmit:function(m){var h;(h=c.onSubmit)===null||h===void 0||h.call(c,m),p.forEach(function(b){var _;return(_=b.onSubmit)===null||_===void 0?void 0:_.call(b,m)})},onReset:function(m){var h;(h=c.onReset)===null||h===void 0||h.call(c,m),p.forEach(function(b){var _;return(_=b.onReset)===null||_===void 0?void 0:_.call(b,m)})},getSources:function(m){return Promise.all([].concat(function(h){return function(b){if(Array.isArray(b))return xo(b)}(h)||function(b){if(typeof Symbol<"u"&&b[Symbol.iterator]!=null||b["@@iterator"]!=null)return Array.from(b)}(h)||function(b,_){if(b){if(typeof b=="string")return xo(b,_);var k=Object.prototype.toString.call(b).slice(8,-1);return k==="Object"&&b.constructor&&(k=b.constructor.name),k==="Map"||k==="Set"?Array.from(b):k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)?xo(b,_):void 0}}(h)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(p.map(function(h){return h.getSources})),[c.getSources]).filter(Boolean).map(function(h){return function(b,_){var k=[];return Promise.resolve(b(_)).then(function(w){return Promise.all(w.filter(function(v){return!!v}).map(function(v){if(v.sourceId,k.includes(v.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(v.sourceId)," is not unique."));k.push(v.sourceId);var S={getItemInputValue:function(H){return H.state.query},getItemUrl:function(){},onSelect:function(H){(0,H.setIsOpen)(!1)},onActive:mo,onResolve:mo};Object.keys(S).forEach(function(H){S[H].__default=!0});var y=Za(Za({},S),v);return Promise.resolve(y)}))})}(h,m)})).then(function(h){return Mr(h)}).then(function(h){return h.map(function(b){return Cn(Cn({},b),{},{onSelect:function(_){b.onSelect(_),f.forEach(function(k){var w;return(w=k.onSelect)===null||w===void 0?void 0:w.call(k,_)})},onActive:function(_){b.onActive(_),f.forEach(function(k){var w;return(w=k.onActive)===null||w===void 0?void 0:w.call(k,_)})},onResolve:function(_){b.onResolve(_),f.forEach(function(k){var w;return(w=k.onResolve)===null||w===void 0?void 0:w.call(k,_)})}})})})},navigator:Cn({navigate:function(m){var h=m.itemUrl;d.location.assign(h)},navigateNewTab:function(m){var h=m.itemUrl,b=d.open(h,"_blank","noopener");b==null||b.focus()},navigateNewWindow:function(m){var h=m.itemUrl;d.open(h,"_blank","noopener")}},c.navigator)})}(t,e),r=function(c,f,g){var d,p=f.initialState;return{getState:function(){return p},dispatch:function(m,h){var b=function(_){for(var k=1;k=0||(Rt[wt]=yt[wt]);return Rt}(me,_e);if(Object.getOwnPropertySymbols){var At=Object.getOwnPropertySymbols(me);for(at=0;at=0||Object.prototype.propertyIsEnumerable.call(me,Q)&&(Ke[Q]=me[Q])}return Ke}(P,tm);if(L.key==="ArrowUp"||L.key==="ArrowDown"){var D=function(){var me=On(R.getState()),_e=C.environment.document.getElementById(It(C.id,"item-".concat(R.getState().activeItemId),me==null?void 0:me.source));_e&&(_e.scrollIntoViewIfNeeded?_e.scrollIntoViewIfNeeded(!1):_e.scrollIntoView(!1))},q=function(){var me=On(R.getState());if(R.getState().activeItemId!==null&&me){var _e=me.item,Q=me.itemInputValue,at=me.itemUrl,Ke=me.source;Ke.onActive(_n({event:L,item:_e,itemInputValue:Q,itemUrl:at,refresh:j,source:Ke,state:R.getState()},T))}};L.preventDefault(),R.getState().isOpen===!1&&(C.openOnFocus||R.getState().query)?pn(_n({event:L,props:C,query:R.getState().query,refresh:j,store:R},T)).then(function(){R.dispatch(L.key,{nextActiveItemId:C.defaultActiveItemId}),q(),setTimeout(D,0)}):(R.dispatch(L.key,{}),q(),D())}else if(L.key==="Escape")L.preventDefault(),R.dispatch(L.key,null),R.pendingRequests.cancelAll();else if(L.key==="Tab")R.dispatch("blur",null),R.pendingRequests.cancelAll();else if(L.key==="Enter"){if(R.getState().activeItemId===null||R.getState().collections.every(function(me){return me.items.length===0}))return void(C.debug||R.pendingRequests.cancelAll());L.preventDefault();var F=On(R.getState()),te=F.item,X=F.itemInputValue,le=F.itemUrl,be=F.source;if(L.metaKey||L.ctrlKey)le!==void 0&&(be.onSelect(_n({event:L,item:te,itemInputValue:X,itemUrl:le,refresh:j,source:be,state:R.getState()},T)),C.navigator.navigateNewTab({itemUrl:le,item:te,state:R.getState()}));else if(L.shiftKey)le!==void 0&&(be.onSelect(_n({event:L,item:te,itemInputValue:X,itemUrl:le,refresh:j,source:be,state:R.getState()},T)),C.navigator.navigateNewWindow({itemUrl:le,item:te,state:R.getState()}));else if(!L.altKey){if(le!==void 0)return be.onSelect(_n({event:L,item:te,itemInputValue:X,itemUrl:le,refresh:j,source:be,state:R.getState()},T)),void C.navigator.navigate({itemUrl:le,item:te,state:R.getState()});pn(_n({event:L,nextState:{isOpen:!1},props:C,query:X,refresh:j,store:R},T)).then(function(){be.onSelect(_n({event:L,item:te,itemInputValue:X,itemUrl:le,refresh:j,source:be,state:R.getState()},T))})}}}(ut({event:N,props:f,refresh:g,store:d},p))},onFocus:b,onBlur:mo,onClick:function(N){m.inputElement!==f.environment.document.activeElement||d.getState().isOpen||b(N)}},v)},getPanelProps:function(m){return ut({onMouseDown:function(h){h.preventDefault()},onMouseLeave:function(){d.dispatch("mouseleave",null)}},m)},getListProps:function(m){var h=m||{},b=h.source,_=Mn(h,lm);return ut({role:"listbox","aria-labelledby":It(f.id,"label"),id:It(f.id,"list",b)},_)},getItemProps:function(m){var h=m.item,b=m.source,_=Mn(m,sm);return ut({id:It(f.id,"item-".concat(h.__autocomplete_id),b),role:"option","aria-selected":d.getState().activeItemId===h.__autocomplete_id,onMouseMove:function(k){if(h.__autocomplete_id!==d.getState().activeItemId){d.dispatch("mousemove",h.__autocomplete_id);var w=On(d.getState());if(d.getState().activeItemId!==null&&w){var v=w.item,S=w.itemInputValue,y=w.itemUrl,H=w.source;H.onActive(ut({event:k,item:v,itemInputValue:S,itemUrl:y,refresh:g,source:H,state:d.getState()},p))}}},onMouseDown:function(k){k.preventDefault()},onClick:function(k){var w=b.getItemInputValue({item:h,state:d.getState()}),v=b.getItemUrl({item:h,state:d.getState()});(v?Promise.resolve():pn(ut({event:k,nextState:{isOpen:!1},props:f,query:w,refresh:g,store:d},p))).then(function(){b.onSelect(ut({event:k,item:h,itemInputValue:w,itemUrl:v,refresh:g,source:b,state:d.getState()},p))})}},_)}}}(bn({props:n,refresh:a,store:r,navigator:n.navigator},o));function a(){return pn(bn({event:new Event("input"),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:a,store:r},o))}function l(c){c.forEach(function(f){var g;return(g=f.subscribe)===null||g===void 0?void 0:g.call(f,bn(bn({},o),{},{navigator:n.navigator,refresh:a,onSelect:function(d){e.push({onSelect:d})},onActive:function(d){e.push({onActive:d})},onResolve:function(d){e.push({onResolve:d})}}))})}function s(){return n.plugins.some(function(c){return c.name==="aa.algoliaInsightsPlugin"})}if(n.insights&&!s()){var u=typeof n.insights=="boolean"?{}:n.insights;n.plugins.push(Qa(u))}return l(n.plugins),function(c){var f,g,d=c.metadata,p=c.environment;if(!((f=p.navigator)===null||f===void 0||(g=f.userAgent)===null||g===void 0)&&g.includes("Algolia Crawler")){var m=p.document.createElement("meta"),h=p.document.querySelector("head");m.name="algolia:metadata",setTimeout(function(){m.content=JSON.stringify(d),h.appendChild(m)},0)}}({metadata:fm({plugins:n.plugins,options:t}),environment:n.environment}),bn(bn({refresh:a,navigator:n.navigator},i),o)}function pm(t){var e=t.translations,n=(e===void 0?{}:e).searchByText,r=n===void 0?"Search by":n;return O.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},O.createElement("span",{className:"DocSearch-Label"},r),O.createElement("svg",{width:"77",height:"19","aria-label":"Algolia",role:"img",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2196.2 500"},O.createElement("defs",null,O.createElement("style",null,".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")),O.createElement("path",{className:"cls-2",d:"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),O.createElement("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),O.createElement("path",{className:"cls-2",d:"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),O.createElement("path",{className:"cls-2",d:"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),O.createElement("path",{className:"cls-2",d:"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"}),O.createElement("path",{className:"cls-2",d:"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),O.createElement("path",{className:"cls-2",d:"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),O.createElement("path",{className:"cls-2",d:"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"}),O.createElement("path",{className:"cls-1",d:"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"})))}function ao(t){return O.createElement("svg",{width:"15",height:"15","aria-label":t.ariaLabel,role:"img"},O.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2"},t.children))}function _m(t){var e=t.translations,n=e===void 0?{}:e,r=n.selectText,o=r===void 0?"to select":r,i=n.selectKeyAriaLabel,a=i===void 0?"Enter key":i,l=n.navigateText,s=l===void 0?"to navigate":l,u=n.navigateUpKeyAriaLabel,c=u===void 0?"Arrow up":u,f=n.navigateDownKeyAriaLabel,g=f===void 0?"Arrow down":f,d=n.closeText,p=d===void 0?"to close":d,m=n.closeKeyAriaLabel,h=m===void 0?"Escape key":m,b=n.searchByText,_=b===void 0?"Search by":b;return O.createElement(O.Fragment,null,O.createElement("div",{className:"DocSearch-Logo"},O.createElement(pm,{translations:{searchByText:_}})),O.createElement("ul",{className:"DocSearch-Commands"},O.createElement("li",null,O.createElement("kbd",{className:"DocSearch-Commands-Key"},O.createElement(ao,{ariaLabel:a},O.createElement("path",{d:"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"}))),O.createElement("span",{className:"DocSearch-Label"},o)),O.createElement("li",null,O.createElement("kbd",{className:"DocSearch-Commands-Key"},O.createElement(ao,{ariaLabel:g},O.createElement("path",{d:"M7.5 3.5v8M10.5 8.5l-3 3-3-3"}))),O.createElement("kbd",{className:"DocSearch-Commands-Key"},O.createElement(ao,{ariaLabel:c},O.createElement("path",{d:"M7.5 11.5v-8M10.5 6.5l-3-3-3 3"}))),O.createElement("span",{className:"DocSearch-Label"},s)),O.createElement("li",null,O.createElement("kbd",{className:"DocSearch-Commands-Key"},O.createElement(ao,{ariaLabel:h},O.createElement("path",{d:"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"}))),O.createElement("span",{className:"DocSearch-Label"},p))))}function bm(t){var e=t.hit,n=t.children;return O.createElement("a",{href:e.url},n)}function vm(){return O.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},O.createElement("g",{fill:"none",fillRule:"evenodd"},O.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},O.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),O.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},O.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function ym(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),O.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function hi(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function wm(){return O.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),O.createElement("path",{d:"M8 17l-6-6 6-6"})))}var km=function(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Om(t){switch(t.type){case"lvl1":return O.createElement(km,null);case"content":return O.createElement(Em,null);default:return O.createElement(Sm,null)}}function Sm(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Em(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function hl(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Pm(){return O.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function Im(){return O.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("path",{d:"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"}))}function Dm(t){var e=t.translations,n=e===void 0?{}:e,r=n.titleText,o=r===void 0?"Unable to fetch results":r,i=n.helpText,a=i===void 0?"You might want to check your network connection.":i;return O.createElement("div",{className:"DocSearch-ErrorScreen"},O.createElement("div",{className:"DocSearch-Screen-Icon"},O.createElement(Pm,null)),O.createElement("p",{className:"DocSearch-Title"},o),O.createElement("p",{className:"DocSearch-Help"},a))}var jm=["translations"];function Cm(t){var e=t.translations,n=e===void 0?{}:e,r=Ut(t,jm),o=n.noResultsText,i=o===void 0?"No results for":o,a=n.suggestedQueryText,l=a===void 0?"Try searching for":a,s=n.reportMissingResultsText,u=s===void 0?"Believe this query should return results?":s,c=n.reportMissingResultsLinkText,f=c===void 0?"Let us know.":c,g=r.state.context.searchSuggestions;return O.createElement("div",{className:"DocSearch-NoResults"},O.createElement("div",{className:"DocSearch-Screen-Icon"},O.createElement(Im,null)),O.createElement("p",{className:"DocSearch-Title"},i,' "',O.createElement("strong",null,r.state.query),'"'),g&&g.length>0&&O.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},O.createElement("p",{className:"DocSearch-Help"},l,":"),O.createElement("ul",null,g.slice(0,3).reduce(function(d,p){return[].concat(dr(d),[O.createElement("li",{key:p},O.createElement("button",{className:"DocSearch-Prefill",key:p,type:"button",onClick:function(){r.setQuery(p.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},p))])},[]))),r.getMissingResultsUrl&&O.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),O.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var Tm=["hit","attribute","tagName"];function gl(t,e){return e.split(".").reduce(function(n,r){return n!=null&&n[r]?n[r]:null},t)}function An(t){var e=t.hit,n=t.attribute,r=t.tagName;return Wt(r===void 0?"span":r,Se(Se({},Ut(t,Tm)),{},{dangerouslySetInnerHTML:{__html:gl(e,"_snippetResult.".concat(n,".value"))||gl(e,n)}}))}function gi(t){return t.collection&&t.collection.items.length!==0?O.createElement("section",{className:"DocSearch-Hits"},O.createElement("div",{className:"DocSearch-Hit-source"},t.title),O.createElement("ul",t.getListProps(),t.collection.items.map(function(e,n){return O.createElement(Mm,ht({key:[t.title,e.objectID].join(":"),item:e,index:n},t))}))):null}function Mm(t){var e=t.item,n=t.index,r=t.renderIcon,o=t.renderAction,i=t.getItemProps,a=t.onItemClick,l=t.collection,s=t.hitComponent,u=Ot(O.useState(!1),2),c=u[0],f=u[1],g=Ot(O.useState(!1),2),d=g[0],p=g[1],m=O.useRef(null),h=s;return O.createElement("li",ht({className:["DocSearch-Hit",e.__docsearch_parent&&"DocSearch-Hit--Child",c&&"DocSearch-Hit--deleting",d&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){m.current&&m.current()}},i({item:e,source:l.source,onClick:function(b){a(e,b)}})),O.createElement(h,{hit:e},O.createElement("div",{className:"DocSearch-Hit-Container"},r({item:e,index:n}),e.hierarchy[e.type]&&e.type==="lvl1"&&O.createElement("div",{className:"DocSearch-Hit-content-wrapper"},O.createElement(An,{className:"DocSearch-Hit-title",hit:e,attribute:"hierarchy.lvl1"}),e.content&&O.createElement(An,{className:"DocSearch-Hit-path",hit:e,attribute:"content"})),e.hierarchy[e.type]&&(e.type==="lvl2"||e.type==="lvl3"||e.type==="lvl4"||e.type==="lvl5"||e.type==="lvl6")&&O.createElement("div",{className:"DocSearch-Hit-content-wrapper"},O.createElement(An,{className:"DocSearch-Hit-title",hit:e,attribute:"hierarchy.".concat(e.type)}),O.createElement(An,{className:"DocSearch-Hit-path",hit:e,attribute:"hierarchy.lvl1"})),e.type==="content"&&O.createElement("div",{className:"DocSearch-Hit-content-wrapper"},O.createElement(An,{className:"DocSearch-Hit-title",hit:e,attribute:"content"}),O.createElement(An,{className:"DocSearch-Hit-path",hit:e,attribute:"hierarchy.lvl1"})),o({item:e,runDeleteTransition:function(b){f(!0),m.current=b},runFavoriteTransition:function(b){p(!0),m.current=b}}))))}function pl(t,e,n){return t.reduce(function(r,o){var i=e(o);return r.hasOwnProperty(i)||(r[i]=[]),r[i].length<(n||5)&&r[i].push(o),r},{})}function _l(t){return t}function lo(t){return t.button===1||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}function Am(){}var ju=/(|<\/mark>)/g,Nm=RegExp(ju.source);function Cu(t){var e,n,r=t;if(!r.__docsearch_parent&&!t._highlightResult)return t.hierarchy.lvl0;var o=r.__docsearch_parent?(e=r.__docsearch_parent)===null||e===void 0||(e=e._highlightResult)===null||e===void 0||(e=e.hierarchy)===null||e===void 0?void 0:e.lvl0:(n=t._highlightResult)===null||n===void 0||(n=n.hierarchy)===null||n===void 0?void 0:n.lvl0;return o?o.value&&Nm.test(o.value)?o.value.replace(ju,""):o.value:t.hierarchy.lvl0}function Rm(t){return O.createElement("div",{className:"DocSearch-Dropdown-Container"},t.state.collections.map(function(e){if(e.items.length===0)return null;var n=Cu(e.items[0]);return O.createElement(gi,ht({},t,{key:e.source.sourceId,title:n,collection:e,renderIcon:function(r){var o,i=r.item,a=r.index;return O.createElement(O.Fragment,null,i.__docsearch_parent&&O.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},O.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},i.__docsearch_parent!==((o=e.items[a+1])===null||o===void 0?void 0:o.__docsearch_parent)?O.createElement("path",{d:"M8 6v21M20 27H8.3"}):O.createElement("path",{d:"M8 6v42M20 27H8.3"}))),O.createElement("div",{className:"DocSearch-Hit-icon"},O.createElement(Om,{type:i.type})))},renderAction:function(){return O.createElement("div",{className:"DocSearch-Hit-action"},O.createElement(wm,null))}}))}),t.resultsFooterComponent&&O.createElement("section",{className:"DocSearch-HitsFooter"},O.createElement(t.resultsFooterComponent,{state:t.state})))}var Lm=["translations"];function Hm(t){var e=t.translations,n=e===void 0?{}:e,r=Ut(t,Lm),o=n.recentSearchesTitle,i=o===void 0?"Recent":o,a=n.noRecentSearchesText,l=a===void 0?"No recent searches":a,s=n.saveRecentSearchButtonTitle,u=s===void 0?"Save this search":s,c=n.removeRecentSearchButtonTitle,f=c===void 0?"Remove this search from history":c,g=n.favoriteSearchesTitle,d=g===void 0?"Favorite":g,p=n.removeFavoriteSearchButtonTitle,m=p===void 0?"Remove this search from favorites":p;return r.state.status==="idle"&&r.hasCollections===!1?r.disableUserPersonalization?null:O.createElement("div",{className:"DocSearch-StartScreen"},O.createElement("p",{className:"DocSearch-Help"},l)):r.hasCollections===!1?null:O.createElement("div",{className:"DocSearch-Dropdown-Container"},O.createElement(gi,ht({},r,{title:i,collection:r.state.collections[0],renderIcon:function(){return O.createElement("div",{className:"DocSearch-Hit-icon"},O.createElement(ym,null))},renderAction:function(h){var b=h.item,_=h.runFavoriteTransition,k=h.runDeleteTransition;return O.createElement(O.Fragment,null,O.createElement("div",{className:"DocSearch-Hit-action"},O.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(w){w.preventDefault(),w.stopPropagation(),_(function(){r.favoriteSearches.add(b),r.recentSearches.remove(b),r.refresh()})}},O.createElement(hl,null))),O.createElement("div",{className:"DocSearch-Hit-action"},O.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(w){w.preventDefault(),w.stopPropagation(),k(function(){r.recentSearches.remove(b),r.refresh()})}},O.createElement(hi,null))))}})),O.createElement(gi,ht({},r,{title:d,collection:r.state.collections[1],renderIcon:function(){return O.createElement("div",{className:"DocSearch-Hit-icon"},O.createElement(hl,null))},renderAction:function(h){var b=h.item,_=h.runDeleteTransition;return O.createElement("div",{className:"DocSearch-Hit-action"},O.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(k){k.preventDefault(),k.stopPropagation(),_(function(){r.favoriteSearches.remove(b),r.refresh()})}},O.createElement(hi,null)))}})))}var Fm=["translations"],qm=O.memo(function(t){var e=t.translations,n=e===void 0?{}:e,r=Ut(t,Fm);if(r.state.status==="error")return O.createElement(Dm,{translations:n==null?void 0:n.errorScreen});var o=r.state.collections.some(function(i){return i.items.length>0});return r.state.query?o===!1?O.createElement(Cm,ht({},r,{translations:n==null?void 0:n.noResultsScreen})):O.createElement(Rm,r):O.createElement(Hm,ht({},r,{hasCollections:o,translations:n==null?void 0:n.startScreen}))},function(t,e){return e.state.status==="loading"||e.state.status==="stalled"}),Wm=["translations"];function Bm(t){var e=t.translations,n=e===void 0?{}:e,r=Ut(t,Wm),o=n.resetButtonTitle,i=o===void 0?"Clear the query":o,a=n.resetButtonAriaLabel,l=a===void 0?"Clear the query":a,s=n.cancelButtonText,u=s===void 0?"Cancel":s,c=n.cancelButtonAriaLabel,f=c===void 0?"Cancel":c,g=n.searchInputLabel,d=g===void 0?"Search":g,p=r.getFormProps({inputElement:r.inputRef.current}).onReset;return O.useEffect(function(){r.autoFocus&&r.inputRef.current&&r.inputRef.current.focus()},[r.autoFocus,r.inputRef]),O.useEffect(function(){r.isFromSelection&&r.inputRef.current&&r.inputRef.current.select()},[r.isFromSelection,r.inputRef]),O.createElement(O.Fragment,null,O.createElement("form",{className:"DocSearch-Form",onSubmit:function(m){m.preventDefault()},onReset:p},O.createElement("label",ht({className:"DocSearch-MagnifierLabel"},r.getLabelProps()),O.createElement(wu,null),O.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},d)),O.createElement("div",{className:"DocSearch-LoadingIndicator"},O.createElement(vm,null)),O.createElement("input",ht({className:"DocSearch-Input",ref:r.inputRef},r.getInputProps({inputElement:r.inputRef.current,autoFocus:r.autoFocus,maxLength:64}))),O.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":l,hidden:!r.state.query},O.createElement(hi,null))),O.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:r.onClose},u))}var Um=["_highlightResult","_snippetResult"];function bl(t){var e=t.key,n=t.limit,r=n===void 0?5:n,o=function(a){return function(){var l="__TEST_KEY__";try{return localStorage.setItem(l,""),localStorage.removeItem(l),!0}catch{return!1}}()===!1?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(l){return window.localStorage.setItem(a,JSON.stringify(l))},getItem:function(){var l=window.localStorage.getItem(a);return l?JSON.parse(l):[]}}}(e),i=o.getItem().slice(0,r);return{add:function(a){var l=a;l._highlightResult,l._snippetResult;var s=Ut(l,Um),u=i.findIndex(function(c){return c.objectID===s.objectID});u>-1&&i.splice(u,1),i.unshift(s),i=i.slice(0,r),o.setItem(i)},remove:function(a){i=i.filter(function(l){return l.objectID!==a.objectID}),o.setItem(i)},getAll:function(){return i}}}function Vm(t){var e,n="algolia-client-js-".concat(t.key);function r(){return e===void 0&&(e=t.localStorage||window.localStorage),e}function o(){return JSON.parse(r().getItem(n)||"{}")}function i(a){r().setItem(n,JSON.stringify(a))}return{get:function(a,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var u,c,f;return u=t.timeToLive?1e3*t.timeToLive:null,c=o(),i(f=Object.fromEntries(Object.entries(c).filter(function(g){return Ot(g,2)[1].timestamp!==void 0}))),u&&i(Object.fromEntries(Object.entries(f).filter(function(g){var d=Ot(g,2)[1],p=new Date().getTime();return!(d.timestamp+u2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return o().then(function(a){return Promise.all([a,i.miss(a)])}).then(function(a){return Ot(a,1)[0]})},set:function(r,o){return Promise.resolve(o)},delete:function(r){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(r,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(r,o,i).catch(function(){return ur({caches:e}).get(r,o,i)})},set:function(r,o){return n.set(r,o).catch(function(){return ur({caches:e}).set(r,o)})},delete:function(r){return n.delete(r).catch(function(){return ur({caches:e}).delete(r)})},clear:function(){return n.clear().catch(function(){return ur({caches:e}).clear()})}}}function Xo(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},e={};return{get:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},i=JSON.stringify(n);if(i in e)return Promise.resolve(t.serializable?JSON.parse(e[i]):e[i]);var a=r();return a.then(function(l){return o.miss(l)}).then(function(){return a})},set:function(n,r){return e[JSON.stringify(n)]=t.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(n){return delete e[JSON.stringify(n)],Promise.resolve()},clear:function(){return e={},Promise.resolve()}}}function Km(t){var e=t.algoliaAgents,n=t.client,r=t.version,o=function(i){var a={value:"Algolia for JavaScript (".concat(i,")"),add:function(l){var s="; ".concat(l.segment).concat(l.version!==void 0?" (".concat(l.version,")"):"");return a.value.indexOf(s)===-1&&(a.value="".concat(a.value).concat(s)),a}};return a}(r).add({segment:n,version:r});return e.forEach(function(i){return o.add(i)}),o}var vl=12e4;function yl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"up",n=Date.now();return Se(Se({},t),{},{status:e,lastUpdate:n,isUp:function(){return e==="up"||Date.now()-n>vl},isTimedOut:function(){return e==="timed out"&&Date.now()-n<=vl}})}var Tu=function(){function t(e,n){var r;return zn(this,t),xn(r=Yn(this,t,[e]),"name","AlgoliaError"),n&&(r.name=n),r}return Gn(t,di(Error)),Qn(t)}(),Mu=function(){function t(e,n,r){var o;return zn(this,t),xn(o=Yn(this,t,[e,r]),"stackTrace",void 0),o.stackTrace=n,o}return Gn(t,Tu),Qn(t)}(),Ym=function(){function t(e){return zn(this,t),Yn(this,t,["Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError"])}return Gn(t,Mu),Qn(t)}(),pi=function(){function t(e,n,r){var o,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"ApiError";return zn(this,t),xn(o=Yn(this,t,[e,r,i]),"status",void 0),o.status=n,o}return Gn(t,Mu),Qn(t)}(),zm=function(){function t(e,n){var r;return zn(this,t),xn(r=Yn(this,t,[e,"DeserializationError"]),"response",void 0),r.response=n,r}return Gn(t,Tu),Qn(t)}(),Qm=function(){function t(e,n,r,o){var i;return zn(this,t),xn(i=Yn(this,t,[e,n,o,"DetailedApiError"]),"error",void 0),i.error=r,i}return Gn(t,pi),Qn(t)}();function xm(t,e,n){var r,o=(r=n,Object.keys(r).filter(function(a){return r[a]!==void 0}).sort().map(function(a){return"".concat(a,"=").concat(encodeURIComponent(Object.prototype.toString.call(r[a])==="[object Array]"?r[a].join(","):r[a]).replace(/\+/g,"%20"))}).join("&")),i="".concat(t.protocol,"://").concat(t.url).concat(t.port?":".concat(t.port):"","/").concat(e.charAt(0)==="/"?e.substring(1):e);return o.length&&(i+="?".concat(o)),i}function Gm(t,e){if(t.method!=="GET"&&(t.data!==void 0||e.data!==void 0)){var n=Array.isArray(t.data)?t.data:Se(Se({},t.data),e.data);return JSON.stringify(n)}}function Jm(t,e,n){var r=Se(Se(Se({Accept:"application/json"},t),e),n),o={};return Object.keys(r).forEach(function(i){var a=r[i];o[i.toLowerCase()]=a}),o}function Xm(t){try{return JSON.parse(t.content)}catch(e){throw new zm(e.message,t)}}function Zm(t,e){var n=t.content,r=t.status;try{var o=JSON.parse(n);return"error"in o?new Qm(o.message,r,o.error,e):new pi(o.message,r,e)}catch{}return new pi(n,r,e)}function $m(t){return t.map(function(e){return Au(e)})}function Au(t){var e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return Se(Se({},t),{},{request:Se(Se({},t.request),{},{headers:Se(Se({},t.request.headers),e)})})}var eh=["appId","apiKey","authMode","algoliaAgents"],th=["params"],wl="5.12.0";function nh(t){return[{url:"".concat(t,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(t,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){for(var n=e,r=e.length-1;r>0;r--){var o=Math.floor(Math.random()*(r+1)),i=e[r];n[r]=e[o],n[o]=i}return n}([{url:"".concat(t,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(t,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(t,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var _i="3.8.0",rh=["footer","searchBox"];function oh(t){var e=t.appId,n=t.apiKey,r=t.indexName,o=t.placeholder,i=o===void 0?"Search docs":o,a=t.searchParameters,l=t.maxResultsPerGroup,s=t.onClose,u=s===void 0?Am:s,c=t.transformItems,f=c===void 0?_l:c,g=t.hitComponent,d=g===void 0?bm:g,p=t.resultsFooterComponent,m=p===void 0?function(){return null}:p,h=t.navigator,b=t.initialScrollY,_=b===void 0?0:b,k=t.transformSearchClient,w=k===void 0?_l:k,v=t.disableUserPersonalization,S=v!==void 0&&v,y=t.initialQuery,H=y===void 0?"":y,N=t.translations,P=N===void 0?{}:N,L=t.getMissingResultsUrl,C=t.insights,j=C!==void 0&&C,R=P.footer,T=P.searchBox,D=Ut(P,rh),q=Ot(O.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),F=q[0],te=q[1],X=O.useRef(null),le=O.useRef(null),be=O.useRef(null),me=O.useRef(null),_e=O.useRef(null),Q=O.useRef(10),at=O.useRef(typeof window<"u"?window.getSelection().toString().slice(0,64):"").current,Ke=O.useRef(H||at).current,At=function(he,Me,nt){return O.useMemo(function(){var lt=function(W,x){if(!W||typeof W!="string")throw new Error("`appId` is missing.");if(!x||typeof x!="string")throw new Error("`apiKey` is missing.");return function(U){var G=U.appId,Z=U.apiKey,Ie=U.authMode,ze=U.algoliaAgents,Ee=Ut(U,eh),ce=function(z,ne){var qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"WithinHeaders",pt={"x-algolia-api-key":ne,"x-algolia-application-id":z};return{headers:function(){return qe==="WithinHeaders"?pt:{}},queryParameters:function(){return qe==="WithinQueryParameters"?pt:{}}}}(G,Z,Ie),fe=function(z){var ne=z.hosts,qe=z.hostsCache,pt=z.baseHeaders,Pt=z.logger,Lt=z.baseQueryParameters,ge=z.algoliaAgent,$e=z.timeouts,st=z.requester,ke=z.requestsCache,se=z.responsesCache;function Ae(ot){return Ue.apply(this,arguments)}function Ue(){return(Ue=Ko(yn().mark(function ot(et){var tt,Yt,ft,kt,on;return yn().wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.next=2,Promise.all(et.map(function(_t){return qe.get(_t,function(){return Promise.resolve(yl(_t))})}));case 2:return tt=zt.sent,Yt=tt.filter(function(_t){return _t.isUp()}),ft=tt.filter(function(_t){return _t.isTimedOut()}),kt=[].concat(dr(Yt),dr(ft)),on=kt.length>0?kt:et,zt.abrupt("return",{hosts:on,getTimeout:function(_t,In){return(ft.length===0&&_t===0?1:ft.length+3+_t)*In}});case 8:case"end":return zt.stop()}},ot)}))).apply(this,arguments)}function Qe(ot,et){return Ht.apply(this,arguments)}function Ht(){return Ht=Ko(yn().mark(function ot(et,tt){var Yt,ft,kt,on,zt,_t,In,Po,mn,Kr,Io,Ai,Do,jo=arguments;return yn().wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:if(Yt=!(jo.length>2&&jo[2]!==void 0)||jo[2],ft=[],kt=Gm(et,tt),on=Jm(pt,et.headers,tt.headers),zt=et.method==="GET"?Se(Se({},et.data),tt.data):{},_t=Se(Se(Se({},Lt),et.queryParameters),zt),ge.value&&(_t["x-algolia-agent"]=ge.value),tt&&tt.queryParameters)for(In=0,Po=Object.keys(tt.queryParameters);In1&&arguments[1]!==void 0?arguments[1]:{},tt=ot.useReadTransporter||ot.method==="GET";if(!tt)return Qe(ot,et,tt);var Yt=function(){return Qe(ot,et)};if((et.cacheable||ot.cacheable)!==!0)return Yt();var ft={request:ot,requestOptions:et,transporter:{queryParameters:Lt,headers:pt}};return se.get(ft,function(){return ke.get(ft,function(){return ke.set(ft,Yt()).then(function(kt){return Promise.all([ke.delete(ft),kt])},function(kt){return Promise.all([ke.delete(ft),Promise.reject(kt)])}).then(function(kt){var on=Ot(kt,2);return on[0],on[1]})})},{miss:function(kt){return se.set(ft,kt)}})},requestsCache:ke,responsesCache:se}}(Se(Se({hosts:nh(G)},Ee),{},{algoliaAgent:Km({algoliaAgents:ze,client:"Lite",version:wl}),baseHeaders:Se(Se({"content-type":"text/plain"},ce.headers()),Ee.baseHeaders),baseQueryParameters:Se(Se({},ce.queryParameters()),Ee.baseQueryParameters)}));return{transporter:fe,appId:G,clearCache:function(){return Promise.all([fe.requestsCache.clear(),fe.responsesCache.clear()]).then(function(){})},get _ua(){return fe.algoliaAgent.value},addAlgoliaAgent:function(z,ne){fe.algoliaAgent.add({segment:z,version:ne})},setClientApiKey:function(z){var ne=z.apiKey;Ie&&Ie!=="WithinHeaders"?fe.baseQueryParameters["x-algolia-api-key"]=ne:fe.baseHeaders["x-algolia-api-key"]=ne},searchForHits:function(z,ne){return this.search(z,ne)},searchForFacets:function(z,ne){return this.search(z,ne)},customPost:function(z,ne){var qe=z.path,pt=z.parameters,Pt=z.body;if(!qe)throw new Error("Parameter `path` is required when calling `customPost`.");var Lt={method:"POST",path:"/{path}".replace("{path}",qe),queryParameters:pt||{},headers:{},data:Pt||{}};return fe.request(Lt,ne)},getRecommendations:function(z,ne){if(z&&Array.isArray(z)&&(z={requests:z}),!z)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!z.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var qe={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:z,useReadTransporter:!0,cacheable:!0};return fe.request(qe,ne)},search:function(z,ne){if(z&&Array.isArray(z)){var qe={requests:z.map(function(Pt){var Lt=Pt.params,ge=Ut(Pt,th);return ge.type==="facet"?Se(Se(Se({},ge),Lt),{},{type:"facet"}):Se(Se(Se({},ge),Lt),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})})};z=qe}if(!z)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!z.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var pt={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:z,useReadTransporter:!0,cacheable:!0};return fe.request(pt,ne)}}}(Se({appId:W,apiKey:x,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(U,G){return Promise.resolve()},info:function(U,G){return Promise.resolve()},error:function(U,G){return Promise.resolve()}},requester:{send:function(U){return new Promise(function(G){var Z=new XMLHttpRequest;Z.open(U.method,U.url,!0),Object.keys(U.headers).forEach(function(ce){return Z.setRequestHeader(ce,U.headers[ce])});var Ie,ze=function(ce,fe){return setTimeout(function(){Z.abort(),G({status:0,content:fe,isTimedOut:!0})},ce)},Ee=ze(U.connectTimeout,"Connection timeout");Z.onreadystatechange=function(){Z.readyState>Z.OPENED&&Ie===void 0&&(clearTimeout(Ee),Ie=ze(U.responseTimeout,"Socket timeout"))},Z.onerror=function(){Z.status===0&&(clearTimeout(Ee),clearTimeout(Ie),G({content:Z.responseText||"Network request failed",status:Z.status,isTimedOut:!1}))},Z.onload=function(){clearTimeout(Ee),clearTimeout(Ie),G({content:Z.responseText,status:Z.status,isTimedOut:!1})},Z.send(U.data)})}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:Xo(),requestsCache:Xo({serializable:!1}),hostsCache:ur({caches:[Vm({key:"".concat(wl,"-").concat(W)}),Xo()]})},void 0))}(he,Me);return lt.addAlgoliaAgent("docsearch",_i),/docsearch.js \(.*\)/.test(lt.transporter.algoliaAgent.value)===!1&<.addAlgoliaAgent("docsearch-react",_i),nt(lt)},[he,Me,nt])}(e,n,w),yt=O.useRef(bl({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(r),limit:10})).current,Nt=O.useRef(bl({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(r),limit:yt.getAll().length===0?7:4})).current,wt=O.useCallback(function(he){if(!S){var Me=he.type==="content"?he.__docsearch_parent:he;Me&&yt.getAll().findIndex(function(nt){return nt.objectID===Me.objectID})===-1&&Nt.add(Me)}},[yt,Nt,S]),nn=O.useCallback(function(he){if(F.context.algoliaInsightsPlugin&&he.__autocomplete_id){var Me=he,nt={eventName:"Item Selected",index:Me.__autocomplete_indexName,items:[Me],positions:[he.__autocomplete_id],queryID:Me.__autocomplete_queryID};F.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(nt)}},[F.context.algoliaInsightsPlugin]),Rt=O.useMemo(function(){return gm({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:Ke,context:{searchSuggestions:[]}},insights:j,navigator:h,onStateChange:function(he){te(he.state)},getSources:function(he){var Me=he.query,nt=he.state,lt=he.setContext,W=he.setStatus;if(!Me)return S?[]:[{sourceId:"recentSearches",onSelect:function(U){var G=U.item,Z=U.event;wt(G),lo(Z)||u()},getItemUrl:function(U){return U.item.url},getItems:function(){return Nt.getAll()}},{sourceId:"favoriteSearches",onSelect:function(U){var G=U.item,Z=U.event;wt(G),lo(Z)||u()},getItemUrl:function(U){return U.item.url},getItems:function(){return yt.getAll()}}];var x=!!j;return At.search({requests:[Se({query:Me,indexName:r,attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(Q.current),"hierarchy.lvl2:".concat(Q.current),"hierarchy.lvl3:".concat(Q.current),"hierarchy.lvl4:".concat(Q.current),"hierarchy.lvl5:".concat(Q.current),"hierarchy.lvl6:".concat(Q.current),"content:".concat(Q.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:x},a)]}).catch(function(U){throw U.name==="RetryError"&&W("error"),U}).then(function(U){var G=U.results[0],Z=G.hits,Ie=G.nbHits,ze=pl(Z,function(ce){return Cu(ce)},l);nt.context.searchSuggestions.length0&&(Pn(),_e.current&&_e.current.focus())},[Ke,Pn]),O.useEffect(function(){function he(){if(le.current){var Me=.01*window.innerHeight;le.current.style.setProperty("--docsearch-vh","".concat(Me,"px"))}}return he(),window.addEventListener("resize",he),function(){window.removeEventListener("resize",he)}},[]),O.createElement("div",ht({ref:X},Jn({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",F.status==="stalled"&&"DocSearch-Container--Stalled",F.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(he){he.target===he.currentTarget&&u()}}),O.createElement("div",{className:"DocSearch-Modal",ref:le},O.createElement("header",{className:"DocSearch-SearchBar",ref:be},O.createElement(Bm,ht({},Rt,{state:F,autoFocus:Ke.length===0,inputRef:_e,isFromSelection:!!Ke&&Ke===at,translations:T,onClose:u}))),O.createElement("div",{className:"DocSearch-Dropdown",ref:me},O.createElement(qm,ht({},Rt,{indexName:r,state:F,hitComponent:d,resultsFooterComponent:m,disableUserPersonalization:S,recentSearches:Nt,favoriteSearches:yt,inputRef:_e,translations:D,getMissingResultsUrl:L,onItemClick:function(he,Me){nn(he),wt(he),lo(Me)||u()}}))),O.createElement("footer",{className:"DocSearch-Footer"},O.createElement(_m,{translations:R}))))}function ih(t){var e,n,r=O.useRef(null),o=Ot(O.useState(!1),2),i=o[0],a=o[1],l=Ot(O.useState((t==null?void 0:t.initialQuery)||void 0),2),s=l[0],u=l[1],c=O.useCallback(function(){a(!0)},[a]),f=O.useCallback(function(){a(!1),u(t==null?void 0:t.initialQuery)},[a,t.initialQuery]);return function(g){var d=g.isOpen,p=g.onOpen,m=g.onClose,h=g.onInput,b=g.searchButtonRef;O.useEffect(function(){function _(k){var w;if(k.code==="Escape"&&d||((w=k.key)===null||w===void 0?void 0:w.toLowerCase())==="k"&&(k.metaKey||k.ctrlKey)||!function(v){var S=v.target,y=S.tagName;return S.isContentEditable||y==="INPUT"||y==="SELECT"||y==="TEXTAREA"}(k)&&k.key==="/"&&!d)return k.preventDefault(),void(d?m():document.body.classList.contains("DocSearch--active")||p());b&&b.current===document.activeElement&&h&&/[a-zA-Z0-9]/.test(String.fromCharCode(k.keyCode))&&h(k)}return window.addEventListener("keydown",_),function(){window.removeEventListener("keydown",_)}},[d,p,m,h,b])}({isOpen:i,onOpen:c,onClose:f,onInput:O.useCallback(function(g){a(!0),u(g.key)},[a,u]),searchButtonRef:r}),O.createElement(O.Fragment,null,O.createElement(Rd,{ref:r,translations:t==null||(e=t.translations)===null||e===void 0?void 0:e.button,onClick:c}),i&&du(O.createElement(oh,ht({},t,{initialScrollY:window.scrollY,initialQuery:s,translations:t==null||(n=t.translations)===null||n===void 0?void 0:n.modal,onClose:f})),document.body))}function ah(t){hu(O.createElement(ih,ri({},t,{transformSearchClient:function(e){return e.addAlgoliaAgent("docsearch.js",_i),t.transformSearchClient?t.transformSearchClient(e):e}})),function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window;return typeof e=="string"?n.document.querySelector(e):e}(t.container,t.environment))}function lh(t){let e;return{c(){e=K("div"),this.h()},l(n){e=Y(n,"DIV",{id:!0}),J(e).forEach(E),this.h()},h(){A(e,"id","docsearch")},m(n,r){B(n,e,r)},p:Ne,i:Ne,o:Ne,d(n){n&&E(e)}}}function sh(t,e,n){let{algolia:r}=e;return Lr(()=>{ah({container:"#docsearch",appId:r==null?void 0:r.appId,apiKey:r==null?void 0:r.apiKey,indexName:r==null?void 0:r.indexName})}),t.$$set=o=>{"algolia"in o&&n(0,r=o.algolia)},[r]}class uh extends He{constructor(e){super(),Fe(this,e,sh,lh,Re,{algolia:0})}}function ch(t){let e;const n=t[3].default,r=Ge(n,t,t[11],null);return{c(){r&&r.c()},l(o){r&&r.l(o)},m(o,i){r&&r.m(o,i),e=!0},p(o,i){r&&r.p&&(!e||i&2048)&&Je(r,n,o,o[11],e?Ze(n,o[11],i,null):Xe(o[11]),null)},i(o){e||(I(r,o),e=!0)},o(o){M(r,o),e=!1},d(o){r&&r.d(o)}}}function fh(t){let e,n;const r=[{class:Bn("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-gray-50 data-[disabled]:opacity-50",t[1]&&"pl-8",t[0])},t[2]];let o={$$slots:{default:[ch]},$$scope:{ctx:t}};for(let i=0;i{e=Be(Be({},e),En(h)),n(2,o=St(e,r)),"class"in h&&n(0,l=h.class),"inset"in h&&n(1,s=h.inset),"$$scope"in h&&n(11,a=h.$$scope)},[l,s,o,i,u,c,f,g,d,p,m,a]}class kl extends He{constructor(e){super(),Fe(this,e,dh,fh,Re,{class:0,inset:1})}}function mh(t){let e;const n=t[5].default,r=Ge(n,t,t[7],null);return{c(){r&&r.c()},l(o){r&&r.l(o)},m(o,i){r&&r.m(o,i),e=!0},p(o,i){r&&r.p&&(!e||i&128)&&Je(r,n,o,o[7],e?Ze(n,o[7],i,null):Xe(o[7]),null)},i(o){e||(I(r,o),e=!0)},o(o){M(r,o),e=!1},d(o){r&&r.d(o)}}}function hh(t){let e,n;const r=[{transition:t[2]},{transitionConfig:t[3]},{sideOffset:t[1]},{class:Bn("z-50 min-w-[8rem] rounded-md border bg-popover p-1 shadow-md bg-white focus:outline-none antialiased text-gray-800 print:hidden",t[0])},t[4]];let o={$$slots:{default:[mh]},$$scope:{ctx:t}};for(let i=0;i{e=Be(Be({},e),En(g)),n(4,o=St(e,r)),"class"in g&&n(0,l=g.class),"sideOffset"in g&&n(1,s=g.sideOffset),"transition"in g&&n(2,u=g.transition),"transitionConfig"in g&&n(3,c=g.transitionConfig),"$$scope"in g&&n(7,a=g.$$scope)},[l,s,u,c,o,i,f,a]}class ph extends He{constructor(e){super(),Fe(this,e,gh,hh,Re,{class:0,sideOffset:1,transition:2,transitionConfig:3})}}function _h(t){let e,n,r;const o=t[3].default,i=Ge(o,t,t[2],null);let a=[{class:n=Bn("ml-auto text-xs tracking-widest opacity-60",t[0])},t[1]],l={};for(let s=0;s{e=Be(Be({},e),En(s)),n(1,o=St(e,r)),"class"in s&&n(0,l=s.class),"$$scope"in s&&n(2,a=s.$$scope)},[l,o,a,i]}class vh extends He{constructor(e){super(),Fe(this,e,bh,_h,Re,{class:0})}}const yh=Df,wh=Jf,kh=Sf,Oh=()=>Hs("light",e=>{if(window.matchMedia){const n=r=>{e(r.matches?"dark":"light")};return n(window.matchMedia("(prefers-color-scheme: dark)")),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n),()=>{window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",n)}}}),Sh=()=>{const t=Oh(),e=rc("evidence-theme","system"),n=Hn([t,e],([o,i])=>i==="system"?o:i),r=()=>{e.update(o=>{switch(o){case"system":return"light";case"light":return"dark";case"dark":default:return"system"}})};return n.subscribe(o=>{typeof document<"u"&&document.documentElement.setAttribute("data-theme",o)}),{systemTheme:t,selectedTheme:Mc(e),theme:n,cycleTheme:r}},Ol=Symbol("__EvidenceThemeStores__"),Nu=()=>{let t=Ns(Ol);return t||(t=Sh(),vi(Ol,t)),t},Eh=!1;function Ph(t){let e,n;return e=new Kt({props:{src:ac,class:"h-6 w-6"}}),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},p:Ne,i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function Ih(t){let e,n;return e=new Pc({props:{builders:[t[13]],variant:"ghost",size:"sm",class:"px-1","aria-label":"Menu",$$slots:{default:[Ph]},$$scope:{ctx:t}}}),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},p(r,o){const i={};o&8192&&(i.builders=[r[13]]),o&16384&&(i.$$scope={dirty:o,ctx:r}),e.$set(i)},i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function Dh(t){let e;return{c(){e=ye("⌘P")},l(n){e=we(n,"⌘P")},m(n,r){B(n,e,r)},d(n){n&&E(e)}}}function jh(t){let e,n,r;return n=new vh({props:{$$slots:{default:[Dh]},$$scope:{ctx:t}}}),{c(){e=ye(`Print PDF + `),re(n.$$.fragment)},l(o){e=we(o,`Print PDF + `),oe(n.$$.fragment,o)},m(o,i){B(o,e,i),ie(n,o,i),r=!0},p(o,i){const a={};i&16384&&(a.$$scope={dirty:i,ctx:o}),n.$set(a)},i(o){r||(I(n.$$.fragment,o),r=!0)},o(o){M(n.$$.fragment,o),r=!1},d(o){o&&E(e),ae(n,o)}}}function Ch(t){let e=t[2]?"Hide ":"Show ",n,r;return{c(){n=ye(e),r=ye(" Queries")},l(o){n=we(o,e),r=we(o," Queries")},m(o,i){B(o,n,i),B(o,r,i)},p(o,i){i&4&&e!==(e=o[2]?"Hide ":"Show ")&&it(n,e)},d(o){o&&(E(n),E(r))}}}function Th(t){let e,n,r,o,i,a;e=new kl({props:{$$slots:{default:[jh]},$$scope:{ctx:t}}}),e.$on("click",t[3]),r=new kl({props:{$$slots:{default:[Ch]},$$scope:{ctx:t}}}),r.$on("click",t[9]);let l=Eh;return{c(){re(e.$$.fragment),n=$(),re(r.$$.fragment),o=$(),i=de()},l(s){oe(e.$$.fragment,s),n=ee(s),oe(r.$$.fragment,s),o=ee(s),i=de()},m(s,u){ie(e,s,u),B(s,n,u),ie(r,s,u),B(s,o,u),B(s,i,u),a=!0},p(s,u){const c={};u&16384&&(c.$$scope={dirty:u,ctx:s}),e.$set(c);const f={};u&16388&&(f.$$scope={dirty:u,ctx:s}),r.$set(f)},i(s){a||(I(e.$$.fragment,s),I(r.$$.fragment,s),I(l),a=!0)},o(s){M(e.$$.fragment,s),M(r.$$.fragment,s),M(l),a=!1},d(s){s&&(E(n),E(o),E(i)),ae(e,s),ae(r,s)}}}function Mh(t){let e,n,r,o;e=new kh({props:{$$slots:{default:[Th]},$$scope:{ctx:t}}});let i=go;return{c(){re(e.$$.fragment),n=$(),r=de()},l(a){oe(e.$$.fragment,a),n=ee(a),r=de()},m(a,l){ie(e,a,l),B(a,n,l),B(a,r,l),o=!0},p(a,l){const s={};l&16391&&(s.$$scope={dirty:l,ctx:a}),e.$set(s)},i(a){o||(I(e.$$.fragment,a),I(i),o=!0)},o(a){M(e.$$.fragment,a),M(i),o=!1},d(a){a&&(E(n),E(r)),ae(e,a)}}}function Ah(t){let e,n,r,o;return e=new wh({props:{asChild:!0,$$slots:{default:[Ih,({builder:i})=>({13:i}),({builder:i})=>i?8192:0]},$$scope:{ctx:t}}}),r=new ph({props:{class:"w-52 text-xs",$$slots:{default:[Mh]},$$scope:{ctx:t}}}),{c(){re(e.$$.fragment),n=$(),re(r.$$.fragment)},l(i){oe(e.$$.fragment,i),n=ee(i),oe(r.$$.fragment,i)},m(i,a){ie(e,i,a),B(i,n,a),ie(r,i,a),o=!0},p(i,a){const l={};a&24576&&(l.$$scope={dirty:a,ctx:i}),e.$set(l);const s={};a&16391&&(s.$$scope={dirty:a,ctx:i}),r.$set(s)},i(i){o||(I(e.$$.fragment,i),I(r.$$.fragment,i),o=!0)},o(i){M(e.$$.fragment,i),M(r.$$.fragment,i),o=!1},d(i){i&&E(n),ae(e,i),ae(r,i)}}}function Nh(t){let e,n;return e=new yh({props:{$$slots:{default:[Ah]},$$scope:{ctx:t}}}),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},p(r,[o]){const i={};o&16391&&(i.$$scope={dirty:o,ctx:r}),e.$set(i)},i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function Rh(t,e,n){let r,o,i,a,l;rt(t,Ki,h=>n(2,l=h));const s=new Event("export-beforeprint"),u=new Event("export-afterprint");function c(){window.dispatchEvent(s),setTimeout(()=>window.print(),0),setTimeout(()=>window.dispatchEvent(u),0)}const{selectedTheme:f,theme:g,cycleTheme:d}=Nu();rt(t,f,h=>n(8,a=h)),rt(t,g,h=>n(7,i=h));const p=h=>{h.preventDefault(),Ki.update(b=>!b)},m=h=>{h.preventDefault(),d()};return t.$$.update=()=>{t.$$.dirty&256&&n(1,r=a==="system"?"System":a==="light"?"Light":"Dark"),t.$$.dirty&128&&n(0,o=i==="light"?oc:ic)},[o,r,l,c,f,g,d,i,a,p,m]}class Lh extends He{constructor(e){super(),Fe(this,e,Rh,Nh,Re,{})}}function Hh(t){let e,n,r,o,i,a,l,s,u,c,f;const g=[Wh,qh],d=[];function p(m,h){return m[0]?0:1}return r=p(t),o=d[r]=g[r](t),s=new Ei({props:{logo:t[2],title:t[1]}}),{c(){e=K("div"),n=K("button"),o.c(),a=$(),l=K("a"),re(s.$$.fragment),this.h()},l(m){e=Y(m,"DIV",{class:!0});var h=J(e);n=Y(h,"BUTTON",{type:!0,class:!0});var b=J(n);o.l(b),b.forEach(E),a=ee(h),l=Y(h,"A",{href:!0,class:!0});var _=J(l);oe(s.$$.fragment,_),_.forEach(E),h.forEach(E),this.h()},h(){A(n,"type","button"),A(n,"class",i="text-gray-900 hover:bg-gray-50 rounded-lg p-1 transition-all duration-500 "+(t[7]==="hide"?"block":"md:hidden")),A(l,"href",Ce("/")),A(l,"class","text-sm font-bold text-gray-800 hidden md:block"),A(e,"class","flex gap-x-4 items-center")},m(m,h){B(m,e,h),V(e,n),d[r].m(n,null),V(e,a),V(e,l),ie(s,l,null),u=!0,c||(f=We(n,"click",t[13]),c=!0)},p(m,h){let b=r;r=p(m),r!==b&&(De(),M(d[b],1,1,()=>{d[b]=null}),je(),o=d[r],o||(o=d[r]=g[r](m),o.c()),I(o,1),o.m(n,null)),(!u||h&128&&i!==(i="text-gray-900 hover:bg-gray-50 rounded-lg p-1 transition-all duration-500 "+(m[7]==="hide"?"block":"md:hidden")))&&A(n,"class",i);const _={};h&4&&(_.logo=m[2]),h&2&&(_.title=m[1]),s.$set(_)},i(m){u||(I(o),I(s.$$.fragment,m),u=!0)},o(m){M(o),M(s.$$.fragment,m),u=!1},d(m){m&&E(e),d[r].d(),ae(s),c=!1,f()}}}function Fh(t){let e,n,r;return n=new Ei({props:{logo:t[2],title:t[1]}}),{c(){e=K("a"),re(n.$$.fragment),this.h()},l(o){e=Y(o,"A",{href:!0,class:!0});var i=J(e);oe(n.$$.fragment,i),i.forEach(E),this.h()},h(){A(e,"href",Ce("/")),A(e,"class","block text-sm font-bold text-gray-800")},m(o,i){B(o,e,i),ie(n,e,null),r=!0},p(o,i){const a={};i&4&&(a.logo=o[2]),i&2&&(a.title=o[1]),n.$set(a)},i(o){r||(I(n.$$.fragment,o),r=!0)},o(o){M(n.$$.fragment,o),r=!1},d(o){o&&E(e),ae(n)}}}function qh(t){let e,n="Open sidebar",r,o,i;return o=new Kt({props:{class:"w-5 h-5",src:lc}}),{c(){e=K("span"),e.textContent=n,r=$(),re(o.$$.fragment),this.h()},l(a){e=Y(a,"SPAN",{class:!0,"data-svelte-h":!0}),en(e)!=="svelte-73kebv"&&(e.textContent=n),r=ee(a),oe(o.$$.fragment,a),this.h()},h(){A(e,"class","sr-only")},m(a,l){B(a,e,l),B(a,r,l),ie(o,a,l),i=!0},i(a){i||(I(o.$$.fragment,a),i=!0)},o(a){M(o.$$.fragment,a),i=!1},d(a){a&&(E(e),E(r)),ae(o,a)}}}function Wh(t){let e,n="Close sidebar",r,o,i;return o=new Kt({props:{class:"w-5 h-5",src:ei}}),{c(){e=K("span"),e.textContent=n,r=$(),re(o.$$.fragment),this.h()},l(a){e=Y(a,"SPAN",{class:!0,"data-svelte-h":!0}),en(e)!=="svelte-13q18xv"&&(e.textContent=n),r=ee(a),oe(o.$$.fragment,a),this.h()},h(){A(e,"class","sr-only")},m(a,l){B(a,e,l),B(a,r,l),ie(o,a,l),i=!0},i(a){i||(I(o.$$.fragment,a),i=!0)},o(a){M(o.$$.fragment,a),i=!1},d(a){a&&(E(e),E(r)),ae(o,a)}}}function Sl(t){let e,n;return e=new uh({props:{algolia:t[8]}}),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},p(r,o){const i={};o&256&&(i.algolia=r[8]),e.$set(i)},i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function El(t){let e,n,r,o;return n=new Kt({props:{src:Nc,class:"w-4 h-4 text-gray-900 "}}),{c(){e=K("a"),re(n.$$.fragment),this.h()},l(i){e=Y(i,"A",{href:!0,class:!0,target:!0,rel:!0});var a=J(e);oe(n.$$.fragment,a),a.forEach(E),this.h()},h(){A(e,"href",r=Ce(t[9])),A(e,"class","hover:bg-gray-50 rounded-lg p-2 transition-all duration-200"),A(e,"target","_blank"),A(e,"rel","noreferrer")},m(i,a){B(i,e,a),ie(n,e,null),o=!0},p(i,a){(!o||a&512&&r!==(r=Ce(i[9])))&&A(e,"href",r)},i(i){o||(I(n.$$.fragment,i),o=!0)},o(i){M(n.$$.fragment,i),o=!1},d(i){i&&E(e),ae(n)}}}function Pl(t){let e,n,r,o;return n=new Kt({props:{src:Rc,class:"w-4 h-4 text-gray-900 "}}),{c(){e=K("a"),re(n.$$.fragment),this.h()},l(i){e=Y(i,"A",{href:!0,class:!0,target:!0,rel:!0});var a=J(e);oe(n.$$.fragment,a),a.forEach(E),this.h()},h(){A(e,"href",r=Ce(t[10])),A(e,"class","hover:bg-gray-50 rounded-lg p-2 transition-all duration-200"),A(e,"target","_blank"),A(e,"rel","noreferrer")},m(i,a){B(i,e,a),ie(n,e,null),o=!0},p(i,a){(!o||a&1024&&r!==(r=Ce(i[10])))&&A(e,"href",r)},i(i){o||(I(n.$$.fragment,i),o=!0)},o(i){M(n.$$.fragment,i),o=!1},d(i){i&&E(e),ae(n)}}}function Il(t){let e,n,r;return n=new Kt({props:{src:Lc,fill:"currentColor",class:"w-4 h-4 text-gray-900 "}}),{c(){e=K("a"),re(n.$$.fragment),this.h()},l(o){e=Y(o,"A",{href:!0,class:!0,target:!0,rel:!0});var i=J(e);oe(n.$$.fragment,i),i.forEach(E),this.h()},h(){A(e,"href",t[11]),A(e,"class","hover:bg-gray-50 rounded-lg p-2 transition-all duration-200"),A(e,"target","_blank"),A(e,"rel","noreferrer")},m(o,i){B(o,e,i),ie(n,e,null),r=!0},p(o,i){(!r||i&2048)&&A(e,"href",o[11])},i(o){r||(I(n.$$.fragment,o),r=!0)},o(o){M(n.$$.fragment,o),r=!1},d(o){o&&E(e),ae(n)}}}function Dl(t){let e,n,r,o;return n=new Kt({props:{src:Hc,class:"w-4 h-4 text-gray-900 "}}),{c(){e=K("a"),re(n.$$.fragment),this.h()},l(i){e=Y(i,"A",{href:!0,class:!0,target:!0,rel:!0});var a=J(e);oe(n.$$.fragment,a),a.forEach(E),this.h()},h(){A(e,"href",r=Ce(t[12])),A(e,"class","hover:bg-gray-50 rounded-lg p-2 transition-all duration-200"),A(e,"target","_blank"),A(e,"rel","noreferrer")},m(i,a){B(i,e,a),ie(n,e,null),o=!0},p(i,a){(!o||a&4096&&r!==(r=Ce(i[12])))&&A(e,"href",r)},i(i){o||(I(n.$$.fragment,i),o=!0)},o(i){M(n.$$.fragment,i),o=!1},d(i){i&&E(e),ae(n)}}}function jl(t){let e,n;return e=new Lh({}),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function Bh(t){let e,n,r,o,i,a,l,s,u,c,f,g,d,p,m,h;const b=[Fh,Hh],_=[];function k(P,L){return P[6]||P[7]==="never"?0:1}r=k(t),o=_[r]=b[r](t);let w=t[8]&&Sl(t),v=t[9]&&El(t),S=t[10]&&Pl(t),y=t[11]&&Il(t),H=t[12]&&Dl(t),N=!t[3]&&jl();return{c(){e=K("header"),n=K("div"),o.c(),i=$(),a=K("div"),w&&w.c(),l=$(),s=K("div"),v&&v.c(),u=$(),S&&S.c(),c=$(),y&&y.c(),f=$(),H&&H.c(),g=$(),d=K("div"),N&&N.c(),this.h()},l(P){e=Y(P,"HEADER",{class:!0});var L=J(e);n=Y(L,"DIV",{class:!0,style:!0});var C=J(n);o.l(C),i=ee(C),a=Y(C,"DIV",{class:!0});var j=J(a);w&&w.l(j),l=ee(j),s=Y(j,"DIV",{class:!0});var R=J(s);v&&v.l(R),u=ee(R),S&&S.l(R),c=ee(R),y&&y.l(R),f=ee(R),H&&H.l(R),R.forEach(E),g=ee(j),d=Y(j,"DIV",{class:!0});var T=J(d);N&&N.l(T),T.forEach(E),j.forEach(E),C.forEach(E),L.forEach(E),this.h()},h(){A(s,"class","flex gap-2 items-center"),A(d,"class","relative"),A(a,"class","flex gap-2 text-sm items-center"),A(n,"class",p=(t[4]?"max-w-full ":t[5]?"":" max-w-7xl ")+"mx-auto px-6 sm:px-8 md:px-12 flex flex-1 items-center justify-between"),_o(n,"max-width",t[5]+"px"),A(e,"class",m="fixed w-full top-0 z-40 flex h-12 shrink-0 justify-start items-center gap-x-4 border-b border-gray-200 bg-white/90 backdrop-blur print:hidden "+(t[7]==="hide"?"md:pl-8":""))},m(P,L){B(P,e,L),V(e,n),_[r].m(n,null),V(n,i),V(n,a),w&&w.m(a,null),V(a,l),V(a,s),v&&v.m(s,null),V(s,u),S&&S.m(s,null),V(s,c),y&&y.m(s,null),V(s,f),H&&H.m(s,null),V(a,g),V(a,d),N&&N.m(d,null),h=!0},p(P,[L]){let C=r;r=k(P),r===C?_[r].p(P,L):(De(),M(_[C],1,1,()=>{_[C]=null}),je(),o=_[r],o?o.p(P,L):(o=_[r]=b[r](P),o.c()),I(o,1),o.m(n,i)),P[8]?w?(w.p(P,L),L&256&&I(w,1)):(w=Sl(P),w.c(),I(w,1),w.m(a,l)):w&&(De(),M(w,1,1,()=>{w=null}),je()),P[9]?v?(v.p(P,L),L&512&&I(v,1)):(v=El(P),v.c(),I(v,1),v.m(s,u)):v&&(De(),M(v,1,1,()=>{v=null}),je()),P[10]?S?(S.p(P,L),L&1024&&I(S,1)):(S=Pl(P),S.c(),I(S,1),S.m(s,c)):S&&(De(),M(S,1,1,()=>{S=null}),je()),P[11]?y?(y.p(P,L),L&2048&&I(y,1)):(y=Il(P),y.c(),I(y,1),y.m(s,f)):y&&(De(),M(y,1,1,()=>{y=null}),je()),P[12]?H?(H.p(P,L),L&4096&&I(H,1)):(H=Dl(P),H.c(),I(H,1),H.m(s,null)):H&&(De(),M(H,1,1,()=>{H=null}),je()),P[3]?N&&(De(),M(N,1,1,()=>{N=null}),je()):N?L&8&&I(N,1):(N=jl(),N.c(),I(N,1),N.m(d,null)),(!h||L&48&&p!==(p=(P[4]?"max-w-full ":P[5]?"":" max-w-7xl ")+"mx-auto px-6 sm:px-8 md:px-12 flex flex-1 items-center justify-between"))&&A(n,"class",p),(!h||L&32)&&_o(n,"max-width",P[5]+"px"),(!h||L&128&&m!==(m="fixed w-full top-0 z-40 flex h-12 shrink-0 justify-start items-center gap-x-4 border-b border-gray-200 bg-white/90 backdrop-blur print:hidden "+(P[7]==="hide"?"md:pl-8":"")))&&A(e,"class",m)},i(P){h||(I(o),I(w),I(v),I(S),I(y),I(H),I(N),h=!0)},o(P){M(o),M(w),M(v),M(S),M(y),M(H),M(N),h=!1},d(P){P&&E(e),_[r].d(),w&&w.d(),v&&v.d(),S&&S.d(),y&&y.d(),H&&H.d(),N&&N.d()}}}function Uh(t,e,n){let{mobileSidebarOpen:r=void 0}=e,{title:o=void 0}=e,{logo:i=void 0}=e,{neverShowQueries:a=void 0}=e,{fullWidth:l=void 0}=e,{maxWidth:s=void 0}=e,{hideSidebar:u=void 0}=e,{sidebarFrontMatter:c=void 0}=e,{algolia:f=void 0}=e,{githubRepo:g=void 0}=e,{xProfile:d=void 0}=e,{blueskyProfile:p=void 0}=e,{slackCommunity:m=void 0}=e;const h=()=>{n(0,r=!r)};return t.$$set=b=>{"mobileSidebarOpen"in b&&n(0,r=b.mobileSidebarOpen),"title"in b&&n(1,o=b.title),"logo"in b&&n(2,i=b.logo),"neverShowQueries"in b&&n(3,a=b.neverShowQueries),"fullWidth"in b&&n(4,l=b.fullWidth),"maxWidth"in b&&n(5,s=b.maxWidth),"hideSidebar"in b&&n(6,u=b.hideSidebar),"sidebarFrontMatter"in b&&n(7,c=b.sidebarFrontMatter),"algolia"in b&&n(8,f=b.algolia),"githubRepo"in b&&n(9,g=b.githubRepo),"xProfile"in b&&n(10,d=b.xProfile),"blueskyProfile"in b&&n(11,p=b.blueskyProfile),"slackCommunity"in b&&n(12,m=b.slackCommunity)},[r,o,i,a,l,s,u,c,f,g,d,p,m,h]}class Vh extends He{constructor(e){super(),Fe(this,e,Uh,Bh,Re,{mobileSidebarOpen:0,title:1,logo:2,neverShowQueries:3,fullWidth:4,maxWidth:5,hideSidebar:6,sidebarFrontMatter:7,algolia:8,githubRepo:9,xProfile:10,blueskyProfile:11,slackCommunity:12})}}function Kh(t){return Lr(()=>{}),[]}class Yh extends He{constructor(e){super(),Fe(this,e,Kh,null,Re,{})}}function zh(t){let e,n='Loading...
',r;return{c(){e=K("div"),e.innerHTML=n,this.h()},l(o){e=Y(o,"DIV",{role:!0,class:!0,"data-svelte-h":!0}),en(e)!=="svelte-19bzzkg"&&(e.innerHTML=n),this.h()},h(){A(e,"role","status"),A(e,"class","animate-pulse")},m(o,i){B(o,e,i)},p:Ne,i(o){o&&(r||Mt(()=>{r=Hr(e,Ir,{}),r.start()}))},o:Ne,d(o){o&&E(e)}}}class Qh extends He{constructor(e){super(),Fe(this,e,null,zh,Re,{})}}function xh(t){let e,n;const r=t[1].default,o=Ge(r,t,t[0],null);return{c(){e=K("span"),o&&o.c(),this.h()},l(i){e=Y(i,"SPAN",{class:!0});var a=J(e);o&&o.l(a),a.forEach(E),this.h()},h(){A(e,"class","rounded px-0.5 py-[1px] bg-green-50 border border-green-200 text-green-800 group-hover:text-green-950 text-base sm:text-xs")},m(i,a){B(i,e,a),o&&o.m(e,null),n=!0},p(i,[a]){o&&o.p&&(!n||a&1)&&Je(o,r,i,i[0],n?Ze(r,i[0],a,null):Xe(i[0]),null)},i(i){n||(I(o,i),n=!0)},o(i){M(o,i),n=!1},d(i){i&&E(e),o&&o.d(i)}}}function Gh(t,e,n){let{$$slots:r={},$$scope:o}=e;return t.$$set=i=>{"$$scope"in i&&n(0,o=i.$$scope)},[o,r]}class dn extends He{constructor(e){super(),Fe(this,e,Gh,xh,Re,{})}}function Cl(t,e,n){const r=t.slice();return r[15]=e[n],r}function Tl(t,e,n){const r=t.slice();return r[15]=e[n],r}function Ml(t){const e=t.slice(),n=e[7].url.pathname.toUpperCase()===e[15].href.toUpperCase()+"/";return e[20]=n,e}function Al(t,e,n){const r=t.slice();return r[15]=e[n],r}function Nl(t){const e=t.slice(),n=e[7].url.pathname.toUpperCase()===e[15].href.toUpperCase()+"/";return e[20]=n,e}function Rl(t,e,n){const r=t.slice();return r[15]=e[n],r}function Ll(t,e,n){const r=t.slice();return r[15]=e[n],r}function Hl(t){const e=t.slice(),n=e[7].url.pathname.toUpperCase()===e[15].href.toUpperCase()+"/";return e[20]=n,e}function Fl(t,e,n){const r=t.slice();return r[15]=e[n],r}function ql(t){const e=t.slice(),n=e[7].url.pathname.toUpperCase()===e[15].href.toUpperCase()+"/";return e[20]=n,e}function Wl(t){let e,n,r,o,i,a,l,s,u,c,f,g='Close sidebar ',d,p,m,h,b,_,k,w,v,S,y,H;s=new Ei({props:{logo:t[2],title:t[1]}});let N=Ye(t[8]),P=[];for(let T=0;TM(P[T],1,1,()=>{P[T]=null});let C=Ye(t[8]),j=[];for(let T=0;TM(j[T],1,1,()=>{j[T]=null});return{c(){e=K("div"),r=$(),o=K("div"),i=K("div"),a=K("div"),l=K("a"),re(s.$$.fragment),u=$(),c=K("span"),f=K("button"),f.innerHTML=g,d=$(),p=K("div"),m=K("div"),h=K("a"),b=ye(t[3]),_=$();for(let T=0;T{S&&(n||(n=Dt(e,Ir,{duration:100},!0)),n.run(1))}),I(s.$$.fragment,T);for(let D=0;D{S&&(v&&v.end(1),w=Hr(o,Sn,{x:-50,duration:300}),w.start())}),S=!0}},o(T){T&&(n||(n=Dt(e,Ir,{duration:100},!1)),n.run(0)),M(s.$$.fragment,T),P=P.filter(Boolean);for(let D=0;DM(f[d],1,1,()=>{f[d]=null});return{c(){e=K("div"),r.c(),o=$();for(let d=0;d0&&$h(t);return{c(){r&&r.c(),e=de()},l(o){r&&r.l(o),e=de()},m(o,i){r&&r.m(o,i),B(o,e,i),n=!0},p(o,i){o[15].children.length>0&&r.p(o,i)},i(o){n||(I(r),n=!0)},o(o){M(r),n=!1},d(o){o&&E(e),r&&r.d(o)}}}function Kl(t){let e,n,r,o,i,a,l,s=Ye(t[8]),u=[];for(let p=0;pM(u[p],1,1,()=>{u[p]=null});let f=Ye(t[8]),g=[];for(let p=0;pM(g[p],1,1,()=>{g[p]=null});return{c(){e=K("div"),n=K("div"),r=K("a"),o=ye(t[3]),i=$();for(let p=0;pM(f[d],1,1,()=>{f[d]=null});return{c(){e=K("div"),r.c(),o=$();for(let d=0;d0&&dg(t);return{c(){r&&r.c(),e=de()},l(o){r&&r.l(o),e=de()},m(o,i){r&&r.m(o,i),B(o,e,i),n=!0},p(o,i){o[15].children.length>0&&r.p(o,i)},i(o){n||(I(r),n=!0)},o(o){M(r),n=!1},d(o){o&&E(e),r&&r.d(o)}}}function xl(t){let e,n='Built with Evidence';return{c(){e=K("div"),e.innerHTML=n,this.h()},l(r){e=Y(r,"DIV",{class:!0,"data-svelte-h":!0}),en(e)!=="svelte-t1ujau"&&(e.innerHTML=n),this.h()},h(){A(e,"class","fixed bottom-0 text-xs py-2")},m(r,o){B(r,e,o)},d(r){r&&E(e)}}}function kg(t){let e,n,r,o,i,a=t[0]&&Wl(t),l=!t[0]&&Kl(t),s=t[4]&&xl();return{c(){a&&a.c(),e=$(),n=K("aside"),l&&l.c(),r=$(),s&&s.c(),this.h()},l(u){a&&a.l(u),e=ee(u),n=Y(u,"ASIDE",{class:!0});var c=J(n);l&&l.l(c),r=ee(c),s&&s.l(c),c.forEach(E),this.h()},h(){A(n,"class",o="w-48 flex-none "+(t[6]==="hide"?"hidden":"hidden md:flex"))},m(u,c){a&&a.m(u,c),B(u,e,c),B(u,n,c),l&&l.m(n,null),V(n,r),s&&s.m(n,null),i=!0},p(u,[c]){u[0]?a?(a.p(u,c),c&1&&I(a,1)):(a=Wl(u),a.c(),I(a,1),a.m(e.parentNode,e)):a&&(De(),M(a,1,1,()=>{a=null}),je()),u[0]?l&&(De(),M(l,1,1,()=>{l=null}),je()):l?(l.p(u,c),c&1&&I(l,1)):(l=Kl(u),l.c(),I(l,1),l.m(n,r)),u[4]?s||(s=xl(),s.c(),s.m(n,null)):s&&(s.d(1),s=null),(!i||c&64&&o!==(o="w-48 flex-none "+(u[6]==="hide"?"hidden":"hidden md:flex")))&&A(n,"class",o)},i(u){i||(I(a),I(l),i=!0)},o(u){M(a),M(l),i=!1},d(u){u&&(E(e),E(n)),a&&a.d(u),l&&l.d(),s&&s.d()}}}function Ru(t){Object.keys(t.children).forEach(function(e){Ru(t.children[e]),!t.children[e].label&&!t.children[e].href&&delete t.children[e]})}function Lu(t){return t.children=Object.values(t.children).sort((e,n)=>{var r,o,i,a;return!isNaN((r=e.frontMatter)==null?void 0:r.sidebar_position)&&!isNaN((o=n.frontMatter)==null?void 0:o.sidebar_position)?e.frontMatter.sidebar_position-n.frontMatter.sidebar_position||e.label.localeCompare(n.label):isNaN((i=e.frontMatter)==null?void 0:i.sidebar_position)?isNaN((a=n.frontMatter)==null?void 0:a.sidebar_position)?e.label.localeCompare(n.label):1:-1}),t.children.forEach(Lu),t}function Og(t,e,n){let r;rt(t,Oo,_=>n(7,r=_));let{fileTree:o=void 0}=e,{title:i=void 0}=e,{logo:a=void 0}=e,{homePageName:l=void 0}=e,{builtWithEvidence:s=void 0}=e,{hideHeader:u=!1}=e,{sidebarFrontMatter:c=void 0}=e;o=structuredClone(o),Ru(o),o=Lu(o);let f=o==null?void 0:o.children,{mobileSidebarOpen:g=!1}=e;jc(()=>{{let _=document.querySelector("#mobileScrollable");g?uc(_):sc(_)}});const d=()=>n(0,g=!1),p=()=>n(0,g=!1),m=()=>{n(0,g=!1)},h=()=>n(0,g=!1),b=()=>n(0,g=!1);return t.$$set=_=>{"fileTree"in _&&n(9,o=_.fileTree),"title"in _&&n(1,i=_.title),"logo"in _&&n(2,a=_.logo),"homePageName"in _&&n(3,l=_.homePageName),"builtWithEvidence"in _&&n(4,s=_.builtWithEvidence),"hideHeader"in _&&n(5,u=_.hideHeader),"sidebarFrontMatter"in _&&n(6,c=_.sidebarFrontMatter),"mobileSidebarOpen"in _&&n(0,g=_.mobileSidebarOpen)},[g,i,a,l,s,u,c,r,f,o,d,p,m,h,b]}class Sg extends He{constructor(e){super(),Fe(this,e,Og,kg,Re,{fileTree:9,title:1,logo:2,homePageName:3,builtWithEvidence:4,hideHeader:5,sidebarFrontMatter:6,mobileSidebarOpen:0})}}function Gl(t,e,n){const r=t.slice();return r[4]=e[n],r}function Jl(t){let e,n="On this page",r,o,i=Ye(t[0]),a=[];for(let l=0;l1&&Jl(t);return{c(){n&&n.c(),e=de()},l(r){n&&n.l(r),e=de()},m(r,o){n&&n.m(r,o),B(r,e,o)},p(r,[o]){r[0]&&r[0].length>1?n?n.p(r,o):(n=Jl(r),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ne,o:Ne,d(r){r&&E(e),n&&n.d(r)}}}function Pg(t,e,n){let r=[],o;function i(){n(0,r=Array.from(document.querySelectorAll("h1.markdown, h2.markdown, h3.markdown")))}function a(){return o=new MutationObserver(()=>{i()}),r.forEach(l=>{o.observe(l,{subtree:!0,characterData:!0,childList:!0})}),o}return Lr(()=>{i(),o=a()}),Cc(()=>{o==null||o.disconnect()}),[r]}class Ig extends He{constructor(e){super(),Fe(this,e,Pg,Eg,Re,{})}}function Zl(t){let e,n,r;return n=new Ig({}),{c(){e=K("div"),re(n.$$.fragment),this.h()},l(o){e=Y(o,"DIV",{class:!0});var i=J(e);oe(n.$$.fragment,i),i.forEach(E),this.h()},h(){A(e,"class","fixed w-48 top-20 bottom-20 pl-4 px-3 overflow-auto pretty-scrollbar"),ve(e,"top-8",t[0])},m(o,i){B(o,e,i),ie(n,e,null),r=!0},p(o,i){(!r||i&1)&&ve(e,"top-8",o[0])},i(o){r||(I(n.$$.fragment,o),r=!0)},o(o){M(n.$$.fragment,o),r=!1},d(o){o&&E(e),ae(n)}}}function Dg(t){let e,n,r=!t[1]&&t[2].data.isUserPage&&Zl(t);return{c(){e=K("aside"),r&&r.c(),this.h()},l(o){e=Y(o,"ASIDE",{class:!0});var i=J(e);r&&r.l(i),i.forEach(E),this.h()},h(){A(e,"class","hidden lg:block w-48")},m(o,i){B(o,e,i),r&&r.m(e,null),n=!0},p(o,[i]){!o[1]&&o[2].data.isUserPage?r?(r.p(o,i),i&6&&I(r,1)):(r=Zl(o),r.c(),I(r,1),r.m(e,null)):r&&(De(),M(r,1,1,()=>{r=null}),je())},i(o){n||(I(r),n=!0)},o(o){M(r),n=!1},d(o){o&&E(e),r&&r.d()}}}function jg(t,e,n){let r,o;rt(t,Fs,a=>n(1,r=a)),rt(t,Oo,a=>n(2,o=a));let{hideHeader:i=!1}=e;return t.$$set=a=>{"hideHeader"in a&&n(0,i=a.hideHeader)},[i,r,o]}class Cg extends He{constructor(e){super(),Fe(this,e,jg,Dg,Re,{hideHeader:0})}}function $l(t,e,n){const r=t.slice();return r[3]=e[n],r[5]=n,r}function Tg(t){let e,n=t[3].title+"",r,o,i;return{c(){e=K("a"),r=ye(n),o=$(),this.h()},l(a){e=Y(a,"A",{href:!0,class:!0});var l=J(e);r=we(l,n),o=ee(l),l.forEach(E),this.h()},h(){A(e,"href",i=Ce(t[3].href)),A(e,"class","hover:underline")},m(a,l){B(a,e,l),V(e,r),V(e,o)},p(a,l){l&1&&n!==(n=a[3].title+"")&&it(r,n),l&1&&i!==(i=Ce(a[3].href))&&A(e,"href",i)},i:Ne,o:Ne,d(a){a&&E(e)}}}function Mg(t){let e,n,r,o;e=new Kt({props:{src:cc,size:"12px",theme:"solid"}});function i(s,u){return s[3].href?Ng:Ag}let a=i(t),l=a(t);return{c(){re(e.$$.fragment),n=$(),l.c(),r=de()},l(s){oe(e.$$.fragment,s),n=ee(s),l.l(s),r=de()},m(s,u){ie(e,s,u),B(s,n,u),l.m(s,u),B(s,r,u),o=!0},p(s,u){a===(a=i(s))&&l?l.p(s,u):(l.d(1),l=a(s),l&&(l.c(),l.m(r.parentNode,r)))},i(s){o||(I(e.$$.fragment,s),o=!0)},o(s){M(e.$$.fragment,s),o=!1},d(s){s&&(E(n),E(r)),ae(e,s),l.d(s)}}}function Ag(t){let e,n=t[3].title+"",r;return{c(){e=K("span"),r=ye(n),this.h()},l(o){e=Y(o,"SPAN",{class:!0});var i=J(e);r=we(i,n),i.forEach(E),this.h()},h(){A(e,"class","cursor-default")},m(o,i){B(o,e,i),V(e,r)},p(o,i){i&1&&n!==(n=o[3].title+"")&&it(r,n)},d(o){o&&E(e)}}}function Ng(t){let e,n=t[3].title+"",r,o;return{c(){e=K("a"),r=ye(n),this.h()},l(i){e=Y(i,"A",{href:!0,class:!0});var a=J(e);r=we(a,n),a.forEach(E),this.h()},h(){A(e,"href",o=Ce(t[3].href)),A(e,"class","hover:underline")},m(i,a){B(i,e,a),V(e,r)},p(i,a){a&1&&n!==(n=i[3].title+"")&&it(r,n),a&1&&o!==(o=Ce(i[3].href))&&A(e,"href",o)},d(i){i&&E(e)}}}function es(t){let e,n,r,o;const i=[Mg,Tg],a=[];function l(s,u){return s[5]>0?0:1}return e=l(t),n=a[e]=i[e](t),{c(){n.c(),r=de()},l(s){n.l(s),r=de()},m(s,u){a[e].m(s,u),B(s,r,u),o=!0},p(s,u){n.p(s,u)},i(s){o||(I(n),o=!0)},o(s){M(n),o=!1},d(s){s&&E(r),a[e].d(s)}}}function Rg(t){let e,n,r,o=Ye(t[0]),i=[];for(let l=0;lM(i[l],1,1,()=>{i[l]=null});return{c(){e=K("div"),n=K("div");for(let l=0;li.isTemplated),!r)return null;return r}function Hg(t,e){const n=[{href:"/",title:"Home"}];t.forEach((r,o)=>{r!=""&&`/${r}`!==Ms.deployment.basePath&&n.push({href:"/"+t.slice(0,o+1).join("/"),title:decodeURIComponent(r.replace(/_/g," ").replace(/-/g," "))})}),n.length>3&&n.splice(1,n.length-3,{href:n.slice(-3)[0].href,title:"..."});for(const r of n)if(r.href==="/")r.href=Ce("/"),r.title="Home";else{const o=Lg(r.href,e);!o||!o.isPage?r.href=null:r.title=o.title??r.title}return n}function Fg(t,e,n){let r,o;rt(t,Oo,a=>n(2,o=a));let{fileTree:i}=e;return t.$$set=a=>{"fileTree"in a&&n(1,i=a.fileTree)},t.$$.update=()=>{t.$$.dirty&6&&n(0,r=Hg(o.url.pathname.split("/").slice(1),i))},[r,i,o]}class qg extends He{constructor(e){super(),Fe(this,e,Fg,Rg,Re,{fileTree:1})}}function ts(t){let e,n,r,o="Error",i,a,l,s,u,c='docs slack email',f,g,d;return{c(){e=K("div"),n=K("div"),r=K("h1"),r.textContent=o,i=$(),a=K("p"),l=ye(t[1]),s=$(),u=K("div"),u.innerHTML=c,this.h()},l(p){e=Y(p,"DIV",{class:!0});var m=J(e);n=Y(m,"DIV",{class:!0});var h=J(n);r=Y(h,"H1",{class:!0,"data-svelte-h":!0}),en(r)!=="svelte-2bfyuv"&&(r.textContent=o),i=ee(h),a=Y(h,"P",{class:!0});var b=J(a);l=we(b,t[1]),b.forEach(E),s=ee(h),u=Y(h,"DIV",{class:!0,"data-svelte-h":!0}),en(u)!=="svelte-1qoirto"&&(u.innerHTML=c),h.forEach(E),m.forEach(E),this.h()},h(){A(r,"class","text-2xl font-bold tracking-wide text-gray-200 border-b pb-4 border-gray-800"),A(a,"class","text-xl text-gray-200 mt-6 leading-relaxed select-text"),A(u,"class","absolute bottom-0 flex items-end gap-4 text-lg mb-6"),A(n,"class","relative min-w-full h-screen bg-gradient-to-b from-black/95 to-gray-900/90 border-t-red-600 rounded-lg border-t-8 border-red-600 shadow-xl p-8"),A(e,"class","fixed flex flex-col z-50 h-screen w-screen bg-gray-900/80 justify-center items-center py-20 px-10 sm:px-20 select-none backdrop-blur-sm")},m(p,m){B(p,e,m),V(e,n),V(n,r),V(n,i),V(n,a),V(a,l),V(n,s),V(n,u),d=!0},p(p,m){(!d||m&2)&&it(l,p[1])},i(p){d||(p&&Mt(()=>{d&&(f||(f=Dt(n,Sn,{y:100,duration:300},!0)),f.run(1))}),p&&Mt(()=>{d&&(g||(g=Dt(e,Ir,{duration:100},!0)),g.run(1))}),d=!0)},o(p){p&&(f||(f=Dt(n,Sn,{y:100,duration:300},!1)),f.run(0)),p&&(g||(g=Dt(e,Ir,{duration:100},!1)),g.run(0)),d=!1},d(p){p&&E(e),p&&f&&f.end(),p&&g&&g.end()}}}function Wg(t){let e,n=t[0]&&ts(t);return{c(){n&&n.c(),e=de()},l(r){n&&n.l(r),e=de()},m(r,o){n&&n.m(r,o),B(r,e,o)},p(r,[o]){r[0]?n?(n.p(r,o),o&1&&I(n,1)):(n=ts(r),n.c(),I(n,1),n.m(e.parentNode,e)):n&&(De(),M(n,1,1,()=>{n=null}),je())},i(r){I(n)},o(r){M(n)},d(r){r&&E(e),n&&n.d(r)}}}function Bg(t,e,n){return[!1,void 0]}class Ug extends He{constructor(e){super(),Fe(this,e,Bg,Wg,Re,{})}}function Vg(t){let e,n=JSON.stringify(t[0],null,2)+"",r;return{c(){e=K("pre"),r=ye(n),this.h()},l(o){e=Y(o,"PRE",{class:!0});var i=J(e);r=we(i,n),i.forEach(E),this.h()},h(){A(e,"class","text-xs px-2 py-2 bg-gray-300 my-2")},m(o,i){B(o,e,i),V(e,r)},p(o,[i]){i&1&&n!==(n=JSON.stringify(o[0],null,2)+"")&&it(r,n)},i:Ne,o:Ne,d(o){o&&E(e)}}}function Kg(t,e,n){let r;const o=As();return rt(t,o,i=>n(0,r=i)),[r,o]}class Yg extends He{constructor(e){super(),Fe(this,e,Kg,Vg,Re,{})}}function zg(t){const e=[{type:"unchanged",content:"{"}],n=fc(t.before,t.after);function r(i,a){return a.reduce((l,s)=>l==null?void 0:l[s],i)}function o(i,a){const l=Object.keys(i);l.forEach((s,u)=>{const c=r(t.added,a)??{},f=r(t.deleted,a)??{},g=r(t.updated,a)??{};let d="unchanged";s in c&&(d="added"),s in f&&(d="deleted"),s in g&&(d="updated");const p=(m,h=!1)=>{const b=`"${s}": `;let _=`${" ".repeat(a.length+1)}${h?"":b}${m}`;return u{let r;const o=Qg[t];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Zo(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Gg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Jg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zg={date:Zo({formats:Gg,defaultWidth:"full"}),time:Zo({formats:Jg,defaultWidth:"full"}),dateTime:Zo({formats:Xg,defaultWidth:"full"})},$g={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ep=(t,e,n,r)=>$g[t];function ar(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,l=n!=null&&n.width?String(n.width):a;o=t.formattingValues[l]||t.formattingValues[a]}else{const a=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;o=t.values[l]||t.values[a]}const i=t.argumentCallback?t.argumentCallback(e):e;return o[i]}}const tp={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},np={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},rp={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},op={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ip={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ap={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},lp=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},sp={ordinalNumber:lp,era:ar({values:tp,defaultWidth:"wide"}),quarter:ar({values:np,defaultWidth:"wide",argumentCallback:t=>t-1}),month:ar({values:rp,defaultWidth:"wide"}),day:ar({values:op,defaultWidth:"wide"}),dayPeriod:ar({values:ip,defaultWidth:"wide",formattingValues:ap,defaultFormattingWidth:"wide"})};function lr(t){return(e,n={})=>{const r=n.width,o=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(o);if(!i)return null;const a=i[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(l)?cp(l,f=>f.test(a)):up(l,f=>f.test(a));let u;u=t.valueCallback?t.valueCallback(s):s,u=n.valueCallback?n.valueCallback(u):u;const c=e.slice(a.length);return{value:u,rest:c}}}function up(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function cp(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const o=r[0],i=e.match(t.parsePattern);if(!i)return null;let a=t.valueCallback?t.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const l=e.slice(o.length);return{value:a,rest:l}}}const dp=/^(\d+)(th|st|nd|rd)?/i,mp=/\d+/i,hp={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},gp={any:[/^b/i,/^(a|c)/i]},pp={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},_p={any:[/1/i,/2/i,/3/i,/4/i]},bp={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vp={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},yp={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},wp={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},kp={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Op={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Sp={ordinalNumber:fp({matchPattern:dp,parsePattern:mp,valueCallback:t=>parseInt(t,10)}),era:lr({matchPatterns:hp,defaultMatchWidth:"wide",parsePatterns:gp,defaultParseWidth:"any"}),quarter:lr({matchPatterns:pp,defaultMatchWidth:"wide",parsePatterns:_p,defaultParseWidth:"any",valueCallback:t=>t+1}),month:lr({matchPatterns:bp,defaultMatchWidth:"wide",parsePatterns:vp,defaultParseWidth:"any"}),day:lr({matchPatterns:yp,defaultMatchWidth:"wide",parsePatterns:wp,defaultParseWidth:"any"}),dayPeriod:lr({matchPatterns:kp,defaultMatchWidth:"any",parsePatterns:Op,defaultParseWidth:"any"})},Hu={code:"en-US",formatDistance:xg,formatLong:Zg,formatRelative:ep,localize:sp,match:Sp,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Ep={};function Vr(){return Ep}function Pp(t){return e=>{const r=(t?Math[t]:Math.trunc)(e);return r===0?0:r}}function ct(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function vo(t){const e=ct(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function Ip(t,e){const n=ct(t),r=ct(e),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}const Fu=6048e5,Dp=864e5,ns=6e4,rs=525600,os=43200,is=1440;function jp(t,e,n){const r=Vr(),o=(n==null?void 0:n.locale)??r.locale??Hu,i=Ip(t,e);if(isNaN(i))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:i});let l,s;i>0?(l=ct(e),s=ct(t)):(l=ct(t),s=ct(e));const u=Pp((n==null?void 0:n.roundingMethod)??"round"),c=s.getTime()-l.getTime(),f=c/ns,g=vo(s)-vo(l),d=(c-g)/ns,p=n==null?void 0:n.unit;let m;if(p?m=p:f<1?m="second":f<60?m="minute":f=o.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Np(t){const e=qu(t),n=cn(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),yo(n)}function Rp(t){const e=ct(t),n=+yo(e)-+Np(e);return Math.round(n/Fu)+1}function Wu(t,e){var c,f,g,d;const n=ct(t),r=n.getFullYear(),o=Vr(),i=(e==null?void 0:e.firstWeekContainsDate)??((f=(c=e==null?void 0:e.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((d=(g=o.locale)==null?void 0:g.options)==null?void 0:d.firstWeekContainsDate)??1,a=cn(t,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const l=Ar(a,e),s=cn(t,0);s.setFullYear(r,0,i),s.setHours(0,0,0,0);const u=Ar(s,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Lp(t,e){var l,s,u,c;const n=Vr(),r=(e==null?void 0:e.firstWeekContainsDate)??((s=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:s.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,o=Wu(t,e),i=cn(t,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Ar(i,e)}function Hp(t,e){const n=ct(t),r=+Ar(n,e)-+Lp(n,e);return Math.round(r/Fu)+1}function Le(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const sn={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return Le(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):Le(n+1,2)},d(t,e){return Le(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return Le(t.getHours()%12||12,e.length)},H(t,e){return Le(t.getHours(),e.length)},m(t,e){return Le(t.getMinutes(),e.length)},s(t,e){return Le(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Le(o,e.length)}},Nn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ss={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return sn.y(t,e)},Y:function(t,e,n,r){const o=Wu(t,r),i=o>0?o:1-o;if(e==="YY"){const a=i%100;return Le(a,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):Le(i,e.length)},R:function(t,e){const n=qu(t);return Le(n,e.length)},u:function(t,e){const n=t.getFullYear();return Le(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Le(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Le(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return sn.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return Le(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const o=Hp(t,r);return e==="wo"?n.ordinalNumber(o,{unit:"week"}):Le(o,e.length)},I:function(t,e,n){const r=Rp(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):Le(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):sn.d(t,e)},D:function(t,e,n){const r=Ap(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Le(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const o=t.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return Le(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const o=t.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return Le(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),o=r===0?7:r;switch(e){case"i":return String(o);case"ii":return Le(o,e.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let o;switch(r===12?o=Nn.noon:r===0?o=Nn.midnight:o=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let o;switch(r>=17?o=Nn.evening:r>=12?o=Nn.afternoon:r>=4?o=Nn.morning:o=Nn.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return sn.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):sn.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Le(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):Le(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):sn.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):sn.s(t,e)},S:function(t,e){return sn.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return cs(r);case"XXXX":case"XX":return wn(r);case"XXXXX":case"XXX":default:return wn(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return cs(r);case"xxxx":case"xx":return wn(r);case"xxxxx":case"xxx":default:return wn(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+us(r,":");case"OOOO":default:return"GMT"+wn(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+us(r,":");case"zzzz":default:return"GMT"+wn(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return Le(r,e.length)},T:function(t,e,n){const r=t.getTime();return Le(r,e.length)}};function us(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+e+Le(i,2)}function cs(t,e){return t%60===0?(t>0?"-":"+")+Le(Math.abs(t)/60,2):wn(t,e)}function wn(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),o=Le(Math.trunc(r/60),2),i=Le(r%60,2);return n+o+e+i}const fs=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Bu=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Fp=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return fs(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",fs(r,e)).replace("{{time}}",Bu(o,e))},qp={p:Bu,P:Fp},Wp=/^D+$/,Bp=/^Y+$/,Up=["D","DD","YY","YYYY"];function Vp(t){return Wp.test(t)}function Kp(t){return Bp.test(t)}function Yp(t,e,n){const r=zp(t,e,n);if(console.warn(r),Up.includes(t))throw new RangeError(r)}function zp(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Qp(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function xp(t){if(!Qp(t)&&typeof t!="number")return!1;const e=ct(t);return!isNaN(Number(e))}const Gp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xp=/^'([^]*?)'?$/,Zp=/''/g,$p=/[a-zA-Z]/;function ds(t,e,n){var c,f,g,d;const r=Vr(),o=r.locale??Hu,i=r.firstWeekContainsDate??((f=(c=r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,a=r.weekStartsOn??((d=(g=r.locale)==null?void 0:g.options)==null?void 0:d.weekStartsOn)??0,l=ct(t);if(!xp(l))throw new RangeError("Invalid time value");let s=e.match(Jp).map(p=>{const m=p[0];if(m==="p"||m==="P"){const h=qp[m];return h(p,o.formatLong)}return p}).join("").match(Gp).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:e_(p)};if(ss[m])return{isToken:!0,value:p};if(m.match($p))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(s=o.localize.preprocessor(l,s));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return s.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Kp(m)||Vp(m))&&Yp(m,e,String(t));const h=ss[m[0]];return h(l,m,o.localize,u)}).join("")}function e_(t){const e=t.match(Xp);return e?e[1].replace(Zp,"'"):t}function ms(t,e,n){const r=t.slice();return r[6]=e[n],r}function hs(t){let e,n,r=t[4](t[6].type)+"",o,i,a,l,s,u=t[6].content+"",c,f,g;return{c(){e=K("div"),n=K("span"),o=ye(r),a=$(),l=K("div"),s=K("pre"),c=ye(u),g=$(),this.h()},l(d){e=Y(d,"DIV",{class:!0});var p=J(e);n=Y(p,"SPAN",{class:!0});var m=J(n);o=we(m,r),m.forEach(E),a=ee(p),l=Y(p,"DIV",{class:!0});var h=J(l);s=Y(h,"PRE",{class:!0});var b=J(s);c=we(b,u),b.forEach(E),h.forEach(E),g=ee(p),p.forEach(E),this.h()},h(){A(n,"class",i=t[3][t[6].type]+" px-1 select-none"),A(s,"class","whitespace-pre-wrap"),A(l,"class",f=t[3][t[6].type]+" selection:bg-black/15"),A(e,"class","group contents")},m(d,p){B(d,e,p),V(e,n),V(n,o),V(e,a),V(e,l),V(l,s),V(s,c),V(e,g)},p(d,p){p&2&&r!==(r=d[4](d[6].type)+"")&&it(o,r),p&2&&i!==(i=d[3][d[6].type]+" px-1 select-none")&&A(n,"class",i),p&2&&u!==(u=d[6].content+"")&&it(c,u),p&2&&f!==(f=d[3][d[6].type]+" selection:bg-black/15")&&A(l,"class",f)},d(d){d&&E(e)}}}function t_(t){let e,n,r,o,i,a=ds(t[0].asof,"HH:mm:ss")+"",l,s,u,c,f=Ye(t[1]),g=[];for(let d=0;d{switch(u){case"added":return"+";case"deleted":return"-";case"updated":return"~";case"unchanged":return" ";default:return"?"}},s=Hs(null,u=>{u(as(i.asof,{addSuffix:!0,includeSeconds:!0}));const c=setInterval(()=>{u(as(i.asof,{addSuffix:!0,includeSeconds:!0}))},5e3);return()=>{clearInterval(c)}});return rt(t,s,u=>n(2,o=u)),t.$$set=u=>{"diffData"in u&&n(0,i=u.diffData)},t.$$.update=()=>{t.$$.dirty&1&&n(1,r=zg(i))},[i,r,o,a,l,s]}class r_ extends He{constructor(e){super(),Fe(this,e,n_,t_,Re,{diffData:0})}}function gs(t,e,n){const r=t.slice();return r[2]=e[n],r}function ps(t){let e,n,r,o;return n=new r_({props:{diffData:t[2]}}),{c(){e=K("div"),re(n.$$.fragment),r=$(),this.h()},l(i){e=Y(i,"DIV",{class:!0});var a=J(e);oe(n.$$.fragment,a),r=ee(a),a.forEach(E),this.h()},h(){A(e,"class","my-4")},m(i,a){B(i,e,a),ie(n,e,null),V(e,r),o=!0},p(i,a){const l={};a&2&&(l.diffData=i[2]),n.$set(l)},i(i){o||(I(n.$$.fragment,i),o=!0)},o(i){M(n.$$.fragment,i),o=!1},d(i){i&&E(e),ae(n)}}}function o_(t){let e,n,r=Ye(t[1].reverse()),o=[];for(let a=0;aM(o[a],1,1,()=>{o[a]=null});return{c(){for(let a=0;a(o(),o=Tc(a,l=>n(1,r=l)),a);t.$$.on_destroy.push(()=>o());let{history:a}=e;return i(),t.$$set=l=>{"history"in l&&i(n(0,a=l.history))},[a,r]}class a_ extends He{constructor(e){super(),Fe(this,e,i_,o_,Re,{history:0})}}function _s(t,e,n){const r=t.slice();return r[12]=e[n][0],r[13]=e[n][1],r}function bs(t){let e,n,r,o,i,a="Evidence Dev Tools",l,s,u,c,f,g;return r=new Kt({props:{src:t[0]?ei:ti,class:"w-4 h-4"}}),s=new Uc({props:{$$slots:{default:[c_]},$$scope:{ctx:t}}}),{c(){e=K("div"),n=K("button"),re(r.$$.fragment),o=$(),i=K("header"),i.textContent=a,l=$(),re(s.$$.fragment),this.h()},l(d){e=Y(d,"DIV",{class:!0});var p=J(e);n=Y(p,"BUTTON",{class:!0});var m=J(n);oe(r.$$.fragment,m),m.forEach(E),o=ee(p),i=Y(p,"HEADER",{class:!0,"data-svelte-h":!0}),en(i)!=="svelte-ekyf9x"&&(i.textContent=a),l=ee(p),oe(s.$$.fragment,p),p.forEach(E),this.h()},h(){A(n,"class","absolute right-4 top-4 rounded-full bg-blue-400 w-8 h-8 flex items-center justify-center hover:bg-blue-300 z-30"),A(i,"class","text-xl font-bold mb-4"),A(e,"class","h-[calc(100vh-3rem)] w-96 bg-gray-200 fixed overflow-auto right-0 top-12 px-4 py-4 z-10")},m(d,p){B(d,e,p),V(e,n),ie(r,n,null),V(e,o),V(e,i),V(e,l),ie(s,e,null),c=!0,f||(g=We(n,"click",t[7]),f=!0)},p(d,p){const m={};p&1&&(m.src=d[0]?ei:ti),r.$set(m);const h={};p&2054&&(h.$$scope={dirty:p,ctx:d}),s.$set(h)},i(d){c||(I(r.$$.fragment,d),I(s.$$.fragment,d),d&&Mt(()=>{c&&(u||(u=Dt(e,Sn,{x:384,duration:250,delay:0},!0)),u.run(1))}),c=!0)},o(d){M(r.$$.fragment,d),M(s.$$.fragment,d),d&&(u||(u=Dt(e,Sn,{x:384,duration:250,delay:0},!1)),u.run(0)),c=!1},d(d){d&&E(e),ae(r),ae(s),d&&u&&u.end(),f=!1,g()}}}function vs(t,e){let n,r,o=e[13].id+"",i,a,l,s=e[13].hash+"",u,c,f,g;function d(){return e[8](e[13])}return{key:t,first:null,c(){n=K("button"),r=K("p"),i=ye(o),a=$(),l=K("p"),u=ye(s),c=$(),this.h()},l(p){n=Y(p,"BUTTON",{class:!0});var m=J(n);r=Y(m,"P",{class:!0});var h=J(r);i=we(h,o),h.forEach(E),a=ee(m),l=Y(m,"P",{class:!0});var b=J(l);u=we(b,s),b.forEach(E),c=ee(m),m.forEach(E),this.h()},h(){var p,m,h;A(r,"class","w-full text-left truncate"),A(l,"class","w-full text-right"),A(n,"class","flex justify-between w-full odd:bg-black/10 hover:bg-black/20"),ve(n,"odd:bg-red-300",e[13].error),ve(n,"bg-red-400",e[13].error),ve(n,"hover:bg-red-500",e[13].error),ve(n,"odd:bg-yellow-300",(p=e[13].opts)==null?void 0:p.noResolve),ve(n,"bg-yellow-400",(m=e[13].opts)==null?void 0:m.noResolve),ve(n,"hover:bg-yellow-500",(h=e[13].opts)==null?void 0:h.noResolve),this.first=n},m(p,m){B(p,n,m),V(n,r),V(r,i),V(n,a),V(n,l),V(l,u),V(n,c),f||(g=We(n,"click",d),f=!0)},p(p,m){var h,b,_;e=p,m&4&&o!==(o=e[13].id+"")&&it(i,o),m&4&&s!==(s=e[13].hash+"")&&it(u,s),m&4&&ve(n,"odd:bg-red-300",e[13].error),m&4&&ve(n,"bg-red-400",e[13].error),m&4&&ve(n,"hover:bg-red-500",e[13].error),m&4&&ve(n,"odd:bg-yellow-300",(h=e[13].opts)==null?void 0:h.noResolve),m&4&&ve(n,"bg-yellow-400",(b=e[13].opts)==null?void 0:b.noResolve),m&4&&ve(n,"hover:bg-yellow-500",(_=e[13].opts)==null?void 0:_.noResolve)},d(p){p&&E(n),f=!1,g()}}}function ys(t){let e,n;return e=new gc({props:{query:t[1]}}),e.$on("close",t[9]),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},p(r,o){const i={};o&2&&(i.query=r[1]),e.$set(i)},i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function l_(t){let e,n=[],r=new Map,o,i=Yi.isQuery(t[1]),a,l,s=Ye(t[2].entries());const u=f=>f[12];for(let f=0;f{c=null}),je())},i(f){l||(I(c),l=!0)},o(f){M(c),l=!1},d(f){f&&(E(e),E(o),E(a));for(let g=0;g{o&&(r||(r=Dt(e,$o,{axis:"x"},!0)),r.run(1))}),o=!0)},o(l){M(n.$$.fragment,l),l&&(r||(r=Dt(e,$o,{axis:"x"},!1)),r.run(0)),o=!1},d(l){l&&E(e),ae(n),l&&r&&r.end(),i=!1,a()}}}function d_(t){let e,n=mc(),r,o,i=t[0]&&bs(t),a=n&&f_(t);const l=t[6].default,s=Ge(l,t,t[11],null);return{c(){i&&i.c(),e=$(),a&&a.c(),r=$(),s&&s.c()},l(u){i&&i.l(u),e=ee(u),a&&a.l(u),r=ee(u),s&&s.l(u)},m(u,c){i&&i.m(u,c),B(u,e,c),a&&a.m(u,c),B(u,r,c),s&&s.m(u,c),o=!0},p(u,[c]){u[0]?i?(i.p(u,c),c&1&&I(i,1)):(i=bs(u),i.c(),I(i,1),i.m(e.parentNode,e)):i&&(De(),M(i,1,1,()=>{i=null}),je()),n&&a.p(u,c),s&&s.p&&(!o||c&2048)&&Je(s,l,u,u[11],o?Ze(l,u[11],c,null):Xe(u[11]),null)},i(u){o||(I(i),I(a),I(s,u),o=!0)},o(u){M(i),M(a),M(s,u),o=!1},d(u){u&&(E(e),E(r)),i&&i.d(u),a&&a.d(u),s&&s.d(u)}}}function m_(t,e,n){let r,o;rt(t,dc,m=>n(2,o=m));let{$$slots:i={},$$scope:a}=e;Ic(dt({}));let l=!1,s;Ac(()=>{}),Lr(()=>{const m=h=>{h.key==="Escape"&&(n(0,l=!1),h.stopPropagation()),h.key.toLowerCase()==="e"&&h.shiftKey&&(h.ctrlKey||h.metaKey)&&(n(0,l=!0),h.stopPropagation())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)});const u=As();rt(t,u,m=>n(5,r=m));const c=new Zf,f=()=>n(0,l=!l),g=m=>n(1,s=m),d=()=>n(1,s=null),p=()=>n(0,l=!l);return t.$$set=m=>{"$$scope"in m&&n(11,a=m.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&c.push(r)},[l,s,o,u,c,r,i,f,g,d,p,a]}class h_ extends He{constructor(e){super(),Fe(this,e,m_,d_,Re,{})}}function g_(t){let e;const n=t[0].default,r=Ge(n,t,t[1],null);return{c(){r&&r.c()},l(o){r&&r.l(o)},m(o,i){r&&r.m(o,i),e=!0},p(o,i){r&&r.p&&(!e||i&2)&&Je(r,n,o,o[1],e?Ze(n,o[1],i,null):Xe(o[1]),null)},i(o){e||(I(r,o),e=!0)},o(o){M(r,o),e=!1},d(o){r&&r.d(o)}}}function p_(t){let e,n;return e=new h_({props:{$$slots:{default:[__]},$$scope:{ctx:t}}}),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},p(r,o){const i={};o&2&&(i.$$scope={dirty:o,ctx:r}),e.$set(i)},i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function __(t){let e;const n=t[0].default,r=Ge(n,t,t[1],null);return{c(){r&&r.c()},l(o){r&&r.l(o)},m(o,i){r&&r.m(o,i),e=!0},p(o,i){r&&r.p&&(!e||i&2)&&Je(r,n,o,o[1],e?Ze(n,o[1],i,null):Xe(o[1]),null)},i(o){e||(I(r,o),e=!0)},o(o){M(r,o),e=!1},d(o){r&&r.d(o)}}}function b_(t){let e,n,r,o;const i=[p_,g_],a=[];function l(s,u){return 1}return e=l(),n=a[e]=i[e](t),{c(){n.c(),r=de()},l(s){n.l(s),r=de()},m(s,u){a[e].m(s,u),B(s,r,u),o=!0},p(s,[u]){n.p(s,u)},i(s){o||(I(n),o=!0)},o(s){M(n),o=!1},d(s){s&&E(r),a[e].d(s)}}}function v_(t,e,n){let{$$slots:r={},$$scope:o}=e;return t.$$set=i=>{"$$scope"in i&&n(1,o=i.$$scope)},[r,o]}class y_ extends He{constructor(e){super(),Fe(this,e,v_,b_,Re,{})}}const w_=t=>({}),ws=t=>({});function ks(t){let e,n,r;function o(a){t[26](a)}let i={title:t[0],logo:t[1],neverShowQueries:t[2],fullWidth:t[3],maxWidth:t[11],hideSidebar:t[4],githubRepo:t[7],slackCommunity:t[10],xProfile:t[8],blueskyProfile:t[9],algolia:t[6],sidebarFrontMatter:t[16]};return t[19]!==void 0&&(i.mobileSidebarOpen=t[19]),e=new Vh({props:i}),qt.push(()=>Ls(e,"mobileSidebarOpen",o)),{c(){re(e.$$.fragment)},l(a){oe(e.$$.fragment,a)},m(a,l){ie(e,a,l),r=!0},p(a,l){const s={};l&1&&(s.title=a[0]),l&2&&(s.logo=a[1]),l&4&&(s.neverShowQueries=a[2]),l&8&&(s.fullWidth=a[3]),l&2048&&(s.maxWidth=a[11]),l&16&&(s.hideSidebar=a[4]),l&128&&(s.githubRepo=a[7]),l&1024&&(s.slackCommunity=a[10]),l&256&&(s.xProfile=a[8]),l&512&&(s.blueskyProfile=a[9]),l&64&&(s.algolia=a[6]),l&65536&&(s.sidebarFrontMatter=a[16]),!n&&l&524288&&(n=!0,s.mobileSidebarOpen=a[19],Rs(()=>n=!1)),e.$set(s)},i(a){r||(I(e.$$.fragment,a),r=!0)},o(a){M(e.$$.fragment,a),r=!1},d(a){ae(e,a)}}}function Os(t){let e,n,r,o;function i(l){t[27](l)}let a={fileTree:t[21],title:t[0],logo:t[1],homePageName:t[12],builtWithEvidence:t[5],hideHeader:t[14],sidebarFrontMatter:t[16]};return t[19]!==void 0&&(a.mobileSidebarOpen=t[19]),n=new Sg({props:a}),qt.push(()=>Ls(n,"mobileSidebarOpen",i)),{c(){e=K("div"),re(n.$$.fragment),this.h()},l(l){e=Y(l,"DIV",{class:!0});var s=J(e);oe(n.$$.fragment,s),s.forEach(E),this.h()},h(){A(e,"class","print:hidden")},m(l,s){B(l,e,s),ie(n,e,null),o=!0},p(l,s){const u={};s&1&&(u.title=l[0]),s&2&&(u.logo=l[1]),s&4096&&(u.homePageName=l[12]),s&32&&(u.builtWithEvidence=l[5]),s&16384&&(u.hideHeader=l[14]),s&65536&&(u.sidebarFrontMatter=l[16]),!r&&s&524288&&(r=!0,u.mobileSidebarOpen=l[19],Rs(()=>r=!1)),n.$set(u)},i(l){o||(I(n.$$.fragment,l),o=!0)},o(l){M(n.$$.fragment,l),o=!1},d(l){l&&E(e),ae(n)}}}function Ss(t){let e,n,r=t[17].route.id!=="/settings"&&Es(t);return{c(){e=K("div"),r&&r.c(),this.h()},l(o){e=Y(o,"DIV",{class:!0});var i=J(e);r&&r.l(i),i.forEach(E),this.h()},h(){A(e,"class","print:hidden")},m(o,i){B(o,e,i),r&&r.m(e,null),n=!0},p(o,i){o[17].route.id!=="/settings"?r?(r.p(o,i),i&131072&&I(r,1)):(r=Es(o),r.c(),I(r,1),r.m(e,null)):r&&(De(),M(r,1,1,()=>{r=null}),je())},i(o){n||(I(r),n=!0)},o(o){M(r),n=!1},d(o){o&&E(e),r&&r.d()}}}function Es(t){let e,n;return e=new qg({props:{fileTree:t[21]}}),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},p:Ne,i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function k_(t){let e,n;return e=new Qh({}),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},p:Ne,i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function O_(t){let e,n;const r=t[25].content,o=Ge(r,t,t[28],ws);return{c(){e=K("article"),o&&o.c(),this.h()},l(i){e=Y(i,"ARTICLE",{id:!0,class:!0});var a=J(e);o&&o.l(a),a.forEach(E),this.h()},h(){A(e,"id","evidence-main-article"),A(e,"class","select-text markdown pb-10")},m(i,a){B(i,e,a),o&&o.m(e,null),n=!0},p(i,a){o&&o.p&&(!n||a&268435456)&&Je(o,r,i,i[28],n?Ze(r,i[28],a,w_):Xe(i[28]),ws)},i(i){n||(I(o,i),n=!0)},o(i){M(o,i),n=!1},d(i){i&&E(e),o&&o.d(i)}}}function Ps(t){let e,n,r;return n=new Cg({props:{hideHeader:t[14]}}),{c(){e=K("div"),re(n.$$.fragment),this.h()},l(o){e=Y(o,"DIV",{class:!0});var i=J(e);oe(n.$$.fragment,i),i.forEach(E),this.h()},h(){A(e,"class","print:hidden")},m(o,i){B(o,e,i),ie(n,e,null),r=!0},p(o,i){const a={};i&16384&&(a.hideHeader=o[14]),n.$set(a)},i(o){r||(I(n.$$.fragment,o),r=!0)},o(o){M(n.$$.fragment,o),r=!1},d(o){o&&E(e),ae(n)}}}function Is(t){let e,n;return e=new Yh({}),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function S_(t){let e,n,r,o,i,a,l,s,u,c,f,g,d,p,m=!t[18]&&go&&!t[17].url.pathname.startsWith("/settings"),h,b;n=new Ug({});let _=!t[14]&&ks(t),k=!t[4]&&t[16]!=="never"&&Os(t),w=!t[13]&&Ss(t);const v=[O_,k_],S=[];function y(P,L){return P[18]?1:0}u=y(t),c=S[u]=v[u](t);let H=!t[15]&&Ps(t),N=m&&Is();return{c(){e=K("div"),re(n.$$.fragment),r=$(),_&&_.c(),o=$(),i=K("div"),k&&k.c(),a=$(),l=K("main"),w&&w.c(),s=$(),c.c(),g=$(),H&&H.c(),p=$(),N&&N.c(),h=de(),this.h()},l(P){e=Y(P,"DIV",{"data-sveltekit-preload-data":!0,class:!0});var L=J(e);oe(n.$$.fragment,L),r=ee(L),_&&_.l(L),o=ee(L),i=Y(L,"DIV",{class:!0,style:!0});var C=J(i);k&&k.l(C),a=ee(C),l=Y(C,"MAIN",{class:!0});var j=J(l);w&&w.l(j),s=ee(j),c.l(j),j.forEach(E),g=ee(C),H&&H.l(C),C.forEach(E),L.forEach(E),p=ee(P),N&&N.l(P),h=de(),this.h()},h(){A(l,"class",f=(t[4]?"":"md:pl-8 ")+(t[15]?"":"md:pr-8 ")+(t[14]?t[13]?" mt-4 sm:mt-[26px] ":" mt-4 sm:mt-8 ":t[13]?" mt-16 sm:mt-[74px] ":" mt-16 sm:mt-20 ")+"flex-grow overflow-x-hidden print:px-0 print:mt-8"),A(i,"class",d=(t[3]?"max-w-full ":t[11]?"":" max-w-7xl ")+"print:w-[650px] print:md:w-[841px] mx-auto print:md:px-0 print:px-0 px-6 sm:px-8 md:px-12 flex justify-start"),_o(i,"max-width",t[11]+"px"),A(e,"data-sveltekit-preload-data",t[20]),A(e,"class","antialiased text-gray-900")},m(P,L){B(P,e,L),ie(n,e,null),V(e,r),_&&_.m(e,null),V(e,o),V(e,i),k&&k.m(i,null),V(i,a),V(i,l),w&&w.m(l,null),V(l,s),S[u].m(l,null),V(i,g),H&&H.m(i,null),B(P,p,L),N&&N.m(P,L),B(P,h,L),b=!0},p(P,L){P[14]?_&&(De(),M(_,1,1,()=>{_=null}),je()):_?(_.p(P,L),L&16384&&I(_,1)):(_=ks(P),_.c(),I(_,1),_.m(e,o)),!P[4]&&P[16]!=="never"?k?(k.p(P,L),L&65552&&I(k,1)):(k=Os(P),k.c(),I(k,1),k.m(i,a)):k&&(De(),M(k,1,1,()=>{k=null}),je()),P[13]?w&&(De(),M(w,1,1,()=>{w=null}),je()):w?(w.p(P,L),L&8192&&I(w,1)):(w=Ss(P),w.c(),I(w,1),w.m(l,s));let C=u;u=y(P),u===C?S[u].p(P,L):(De(),M(S[C],1,1,()=>{S[C]=null}),je(),c=S[u],c?c.p(P,L):(c=S[u]=v[u](P),c.c()),I(c,1),c.m(l,null)),(!b||L&57360&&f!==(f=(P[4]?"":"md:pl-8 ")+(P[15]?"":"md:pr-8 ")+(P[14]?P[13]?" mt-4 sm:mt-[26px] ":" mt-4 sm:mt-8 ":P[13]?" mt-16 sm:mt-[74px] ":" mt-16 sm:mt-20 ")+"flex-grow overflow-x-hidden print:px-0 print:mt-8"))&&A(l,"class",f),P[15]?H&&(De(),M(H,1,1,()=>{H=null}),je()):H?(H.p(P,L),L&32768&&I(H,1)):(H=Ps(P),H.c(),I(H,1),H.m(i,null)),(!b||L&2056&&d!==(d=(P[3]?"max-w-full ":P[11]?"":" max-w-7xl ")+"print:w-[650px] print:md:w-[841px] mx-auto print:md:px-0 print:px-0 px-6 sm:px-8 md:px-12 flex justify-start"))&&A(i,"class",d),(!b||L&2048)&&_o(i,"max-width",P[11]+"px"),L&393216&&(m=!P[18]&&go&&!P[17].url.pathname.startsWith("/settings")),m?N?L&393216&&I(N,1):(N=Is(),N.c(),I(N,1),N.m(h.parentNode,h)):N&&(De(),M(N,1,1,()=>{N=null}),je())},i(P){b||(I(n.$$.fragment,P),I(_),I(k),I(w),I(c),I(H),I(N),b=!0)},o(P){M(n.$$.fragment,P),M(_),M(k),M(w),M(c),M(H),M(N),b=!1},d(P){P&&(E(e),E(p),E(h)),ae(n),_&&_.d(),k&&k.d(),w&&w.d(),S[u].d(),H&&H.d(),N&&N.d(P)}}}function E_(t){let e,n,r,o,i;const a=t[25].default,l=Ge(a,t,t[28],null);return n=new od({}),o=new y_({props:{$$slots:{default:[S_]},$$scope:{ctx:t}}}),{c(){l&&l.c(),e=$(),re(n.$$.fragment),r=$(),re(o.$$.fragment)},l(s){l&&l.l(s),e=ee(s),oe(n.$$.fragment,s),r=ee(s),oe(o.$$.fragment,s)},m(s,u){l&&l.m(s,u),B(s,e,u),ie(n,s,u),B(s,r,u),ie(o,s,u),i=!0},p(s,[u]){l&&l.p&&(!i||u&268435456)&&Je(l,a,s,s[28],i?Ze(a,s[28],u,null):Xe(s[28]),null);const c={};u&269484031&&(c.$$scope={dirty:u,ctx:s}),o.$set(c)},i(s){i||(I(l,s),I(n.$$.fragment,s),I(o.$$.fragment,s),i=!0)},o(s){M(l,s),M(n.$$.fragment,s),M(o.$$.fragment,s),i=!1},d(s){s&&(E(e),E(r)),l&&l.d(s),ae(n,s),ae(o,s)}}}function P_(t){const e=new Map;function n(r){if(r){if(r.href){const o=decodeURI(r.href);e.set(o,r)}Object.values(r.children).forEach(n)}}return n(t),e}function I_(t,e,n){let r,o,i,a,l;rt(t,Oo,D=>n(17,a=D)),rt(t,Fs,D=>n(18,l=D));let{$$slots:s={},$$scope:u}=e;{const D=document.getElementById("__evidence_project_splash");D==null||D.remove()}let{data:c}=e,{title:f=void 0}=e,{logo:g=void 0}=e,{neverShowQueries:d=!1}=e,{fullWidth:p=!1}=e,{hideSidebar:m=!1}=e,{builtWithEvidence:h=!1}=e,{algolia:b=void 0}=e,{githubRepo:_=void 0}=e,{xProfile:k=void 0}=e,{blueskyProfile:w=void 0}=e,{slackCommunity:v=void 0}=e,{maxWidth:S=void 0}=e,{homePageName:y="Home"}=e,{hideBreadcrumbs:H=!1}=e,{hideHeader:N=!1}=e,{hideTOC:P=!1}=e;const L="hover";let C=!1,j=c==null?void 0:c.pagesManifest;Lr(async()=>{if(!("serviceWorker"in navigator))return;const D=await navigator.serviceWorker.register(Ce("/fix-tprotocol-service-worker.js"),{scope:Ce("/"),type:"classic"});console.debug("[fix-tprotocol-service-worker] Service Worker registered",{registration:D})}),Nu();function R(D){C=D,n(19,C),n(18,l)}function T(D){C=D,n(19,C),n(18,l)}return t.$$set=D=>{"data"in D&&n(22,c=D.data),"title"in D&&n(0,f=D.title),"logo"in D&&n(1,g=D.logo),"neverShowQueries"in D&&n(2,d=D.neverShowQueries),"fullWidth"in D&&n(3,p=D.fullWidth),"hideSidebar"in D&&n(4,m=D.hideSidebar),"builtWithEvidence"in D&&n(5,h=D.builtWithEvidence),"algolia"in D&&n(6,b=D.algolia),"githubRepo"in D&&n(7,_=D.githubRepo),"xProfile"in D&&n(8,k=D.xProfile),"blueskyProfile"in D&&n(9,w=D.blueskyProfile),"slackCommunity"in D&&n(10,v=D.slackCommunity),"maxWidth"in D&&n(11,S=D.maxWidth),"homePageName"in D&&n(12,y=D.homePageName),"hideBreadcrumbs"in D&&n(13,H=D.hideBreadcrumbs),"hideHeader"in D&&n(14,N=D.hideHeader),"hideTOC"in D&&n(15,P=D.hideTOC),"$$scope"in D&&n(28,u=D.$$scope)},t.$$.update=()=>{var D;t.$$.dirty&262144&&l&&n(19,C=!1),t.$$.dirty&16908288&&n(23,o=(D=r.get(a.route.id))==null?void 0:D.frontMatter),t.$$.dirty&8388608&&n(16,i=o==null?void 0:o.sidebar),t.$$.dirty&65536&&(["show","hide","never"].includes(i)||n(16,i=void 0))},n(24,r=P_(j)),[f,g,d,p,m,h,b,_,k,w,v,S,y,H,N,P,i,a,l,C,L,j,c,o,r,s,R,T,u]}class D_ extends He{constructor(e){super(),Fe(this,e,I_,E_,Re,{data:22,title:0,logo:1,neverShowQueries:2,fullWidth:3,hideSidebar:4,builtWithEvidence:5,algolia:6,githubRepo:7,xProfile:8,blueskyProfile:9,slackCommunity:10,maxWidth:11,homePageName:12,hideBreadcrumbs:13,hideHeader:14,hideTOC:15})}}const j_=t=>({}),Ds=t=>({slot:"content"});function C_(t){let e;const n=t[1].default,r=Ge(n,t,t[2],Ds);return{c(){r&&r.c()},l(o){r&&r.l(o)},m(o,i){r&&r.m(o,i),e=!0},p(o,i){r&&r.p&&(!e||i&4)&&Je(r,n,o,o[2],e?Ze(n,o[2],i,j_):Xe(o[2]),Ds)},i(o){e||(I(r,o),e=!0)},o(o){M(r,o),e=!1},d(o){r&&r.d(o)}}}function T_(t){let e,n;return e=new D_({props:{data:t[0],githubRepo:"https://github.com/archiewood/nyc-taxi",$$slots:{content:[C_]},$$scope:{ctx:t}}}),{c(){re(e.$$.fragment)},l(r){oe(e.$$.fragment,r)},m(r,o){ie(e,r,o),n=!0},p(r,[o]){const i={};o&1&&(i.data=r[0]),o&4&&(i.$$scope={dirty:o,ctx:r}),e.$set(i)},i(r){n||(I(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){ae(e,r)}}}function M_(t,e,n){let{$$slots:r={},$$scope:o}=e,{data:i}=e;return t.$$set=a=>{"data"in a&&n(0,i=a.data),"$$scope"in a&&n(2,o=a.$$scope)},[i,r,o]}class Y_ extends He{constructor(e){super(),Fe(this,e,M_,T_,Re,{data:0})}}export{Y_ as component,K_ as universal}; diff --git a/_app/immutable/nodes/1.BafS0IQd.js b/_app/immutable/nodes/1.BafS0IQd.js new file mode 100644 index 0000000000000000000000000000000000000000..c8b46b630fdc95b2bf7e42d2ec942f7c14d1c8e3 --- /dev/null +++ b/_app/immutable/nodes/1.BafS0IQd.js @@ -0,0 +1,8 @@ +import{s as J,e as m,a as x,d as _,g,c as T,f as u,j as h,k as d,l as p,B as M,H as A,I as Q,b as P,n as W,t as y,i as C,m as w,u as N}from"../chunks/scheduler.BZlHRu_0.js";import{S as K,i as L,c as I,a as S,m as j,t as v,g as D,b as E,d as U,e as H,f as z}from"../chunks/index.a_oafgNU.js";import{p as X}from"../chunks/stores.D7EENclZ.js";import{A as Y,a as Z}from"../chunks/AccordionItem.CxgotlFR.js";import{I as tt,a as et,f as F}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";import"../chunks/entry.p1-HE9Vh.js";function O(f){let t,o="Copied to clipboard",s,n;return{c(){t=m("p"),t.textContent=o,this.h()},l(a){t=_(a,"P",{class:!0,"data-svelte-h":!0}),A(t)!=="svelte-1dmvowc"&&(t.textContent=o),this.h()},h(){h(t,"class","absolute -bottom-14 right-0 text-sm bg-white/80 w-[17ch] text-center font-sans p-2 border border-gray-950 rounded")},m(a,l){d(a,t,l),n=!0},i(a){n||(a&&Q(()=>{n&&(s||(s=z(t,F,{duration:250},!0)),s.run(1))}),n=!0)},o(a){a&&(s||(s=z(t,F,{duration:250},!1)),s.run(0)),n=!1},d(a){a&&u(t),a&&s&&s.end()}}}function st(f){let t,o,s,n,a,l,i,e=f[0]&&O();return n=new tt({props:{src:et,class:"w-4 h-4"}}),{c(){t=m("div"),e&&e.c(),o=x(),s=m("button"),I(n.$$.fragment),this.h()},l(r){t=_(r,"DIV",{class:!0});var c=g(t);e&&e.l(c),o=T(c),s=_(c,"BUTTON",{class:!0,title:!0});var k=g(s);S(n.$$.fragment,k),k.forEach(u),c.forEach(u),this.h()},h(){h(s,"class","bg-white/80 border border-gray-950 rounded p-2 hover:bg-gray-200/80 active:bg-gray-400/80"),h(s,"title","Copy to Clipboard"),h(t,"class","relative")},m(r,c){d(r,t,c),e&&e.m(t,null),p(t,o),p(t,s),j(n,s,null),a=!0,l||(i=M(s,"click",f[1]),l=!0)},p(r,[c]){r[0]?e?c&1&&v(e,1):(e=O(),e.c(),v(e,1),e.m(t,o)):e&&(D(),E(e,1,1,()=>{e=null}),U())},i(r){a||(v(e),v(n.$$.fragment,r),a=!0)},o(r){E(e),E(n.$$.fragment,r),a=!1},d(r){r&&u(t),e&&e.d(),H(n),l=!1,i()}}}function rt(f,t,o){let{textToCopy:s=""}=t,n=!1;const a=()=>{navigator.clipboard.writeText(s),o(0,n=!0),setTimeout(()=>o(0,n=!1),1e3)};return f.$$set=l=>{"textToCopy"in l&&o(2,s=l.textToCopy)},[n,a,s]}class nt extends K{constructor(t){super(),L(this,t,rt,st,J,{textToCopy:2})}}function ot(f){let t,o="Unknown Error Encountered",s,n,a,l=f[0].status+"",i;return{c(){t=m("h1"),t.textContent=o,s=x(),n=m("span"),a=y("HTTP "),i=y(l),this.h()},l(e){t=_(e,"H1",{"data-svelte-h":!0}),A(t)!=="svelte-blh3ny"&&(t.textContent=o),s=T(e),n=_(e,"SPAN",{class:!0});var r=g(n);a=C(r,"HTTP "),i=C(r,l),r.forEach(u),this.h()},h(){h(n,"class","font-mono text-base")},m(e,r){d(e,t,r),d(e,s,r),d(e,n,r),p(n,a),p(n,i)},p(e,r){r&1&&l!==(l=e[0].status+"")&&w(i,l)},i:N,o:N,d(e){e&&(u(t),u(s),u(n))}}}function at(f){let t,o="Application Error",s,n,a,l,i=f[0].error.message&&R(f),e=(f[0].error.stack||f[0].error.cause)&&G(f);return{c(){t=m("h1"),t.textContent=o,s=x(),i&&i.c(),n=x(),e&&e.c(),a=P(),this.h()},l(r){t=_(r,"H1",{class:!0,"data-svelte-h":!0}),A(t)!=="svelte-zh66lr"&&(t.textContent=o),s=T(r),i&&i.l(r),n=T(r),e&&e.l(r),a=P(),this.h()},h(){h(t,"class","mt-0 mb-8 py-0")},m(r,c){d(r,t,c),d(r,s,c),i&&i.m(r,c),d(r,n,c),e&&e.m(r,c),d(r,a,c),l=!0},p(r,c){r[0].error.message?i?i.p(r,c):(i=R(r),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null),r[0].error.stack||r[0].error.cause?e?(e.p(r,c),c&1&&v(e,1)):(e=G(r),e.c(),v(e,1),e.m(a.parentNode,a)):e&&(D(),E(e,1,1,()=>{e=null}),U())},i(r){l||(v(e),l=!0)},o(r){E(e),l=!1},d(r){r&&(u(t),u(s),u(n),u(a)),i&&i.d(r),e&&e.d(r)}}}function lt(f){let t,o="Page Not Found",s,n,a,l=f[0].status+"",i,e,r,c=f[0].url.pathname+"",k,B;return{c(){t=m("h1"),t.textContent=o,s=x(),n=m("p"),a=m("span"),i=y(l),e=y(`: The page + `),r=m("span"),k=y(c),B=y(" can't be found in the project."),this.h()},l(b){t=_(b,"H1",{class:!0,"data-svelte-h":!0}),A(t)!=="svelte-s9jbdv"&&(t.textContent=o),s=T(b),n=_(b,"P",{});var $=g(n);a=_($,"SPAN",{class:!0});var V=g(a);i=C(V,l),V.forEach(u),e=C($,`: The page + `),r=_($,"SPAN",{class:!0});var q=g(r);k=C(q,c),q.forEach(u),B=C($," can't be found in the project."),$.forEach(u),this.h()},h(){h(t,"class","mt-0 mb-8 py-0"),h(a,"class","font-mono text-base"),h(r,"class","font-mono text-base bg-gray-200")},m(b,$){d(b,t,$),d(b,s,$),d(b,n,$),p(n,a),p(a,i),p(n,e),p(n,r),p(r,k),p(n,B)},p(b,$){$&1&&l!==(l=b[0].status+"")&&w(i,l),$&1&&c!==(c=b[0].url.pathname+"")&&w(k,c)},i:N,o:N,d(b){b&&(u(t),u(s),u(n))}}}function R(f){let t,o,s=f[0].status+"",n,a,l=f[0].error.message+"",i;return{c(){t=m("p"),o=m("span"),n=y(s),a=y(":"),i=y(l),this.h()},l(e){t=_(e,"P",{class:!0});var r=g(t);o=_(r,"SPAN",{class:!0});var c=g(o);n=C(c,s),c.forEach(u),a=C(r,":"),i=C(r,l),r.forEach(u),this.h()},h(){h(o,"class","font-mono text-base"),h(t,"class","font-mono text-sm bg-gray-200 px-2 py-2")},m(e,r){d(e,t,r),p(t,o),p(o,n),p(t,a),p(t,i)},p(e,r){r&1&&s!==(s=e[0].status+"")&&w(n,s),r&1&&l!==(l=e[0].error.message+"")&&w(i,l)},d(e){e&&u(t)}}}function G(f){let t,o;return t=new Y({props:{$$slots:{default:[ct]},$$scope:{ctx:f}}}),{c(){I(t.$$.fragment)},l(s){S(t.$$.fragment,s)},m(s,n){j(t,s,n),o=!0},p(s,n){const a={};n&10&&(a.$$scope={dirty:n,ctx:s}),t.$set(a)},i(s){o||(v(t.$$.fragment,s),o=!0)},o(s){E(t.$$.fragment,s),o=!1},d(s){H(t,s)}}}function it(f){let t,o,s,n,a,l,i;return s=new nt({props:{textToCopy:f[1]}}),{c(){t=m("div"),o=m("span"),I(s.$$.fragment),n=x(),a=m("pre"),l=y(f[1]),this.h()},l(e){t=_(e,"DIV",{class:!0});var r=g(t);o=_(r,"SPAN",{class:!0});var c=g(o);S(s.$$.fragment,c),c.forEach(u),n=T(r),a=_(r,"PRE",{class:!0});var k=g(a);l=C(k,f[1]),k.forEach(u),r.forEach(u),this.h()},h(){h(o,"class","absolute top-2 right-2"),h(a,"class","font-mono text-sm bg-gray-200 px-2 py-2 overflow-auto"),h(t,"class","relative")},m(e,r){d(e,t,r),p(t,o),j(s,o,null),p(t,n),p(t,a),p(a,l),i=!0},p(e,r){const c={};r&2&&(c.textToCopy=e[1]),s.$set(c),(!i||r&2)&&w(l,e[1])},i(e){i||(v(s.$$.fragment,e),i=!0)},o(e){E(s.$$.fragment,e),i=!1},d(e){e&&u(t),H(s)}}}function ct(f){let t,o;return t=new Z({props:{title:"Error Details",$$slots:{default:[it]},$$scope:{ctx:f}}}),{c(){I(t.$$.fragment)},l(s){S(t.$$.fragment,s)},m(s,n){j(t,s,n),o=!0},p(s,n){const a={};n&10&&(a.$$scope={dirty:n,ctx:s}),t.$set(a)},i(s){o||(v(t.$$.fragment,s),o=!0)},o(s){E(t.$$.fragment,s),o=!1},d(s){H(t,s)}}}function ft(f){let t,o,s,n;const a=[lt,at,ot],l=[];function i(e,r){return e[0].status===404?0:e[0].status===500?1:2}return t=i(f),o=l[t]=a[t](f),{c(){o.c(),s=P()},l(e){o.l(e),s=P()},m(e,r){l[t].m(e,r),d(e,s,r),n=!0},p(e,[r]){let c=t;t=i(e),t===c?l[t].p(e,r):(D(),E(l[c],1,1,()=>{l[c]=null}),U(),o=l[t],o?o.p(e,r):(o=l[t]=a[t](e),o.c()),v(o,1),o.m(s.parentNode,s))},i(e){n||(v(o),n=!0)},o(e){E(o),n=!1},d(e){e&&u(s),l[t].d(e)}}}function ut(f,t,o){let s,n;W(f,X,l=>o(0,n=l));{const l=document.getElementById("__evidence_project_splash");l==null||l.remove()}const a=l=>{let i="";return l.stack&&(i+=l.stack),l.cause&&(i+=` + +Caused By: + `,i+=a(l.cause).split(` +`).join(` + `)),i};return f.$$.update=()=>{f.$$.dirty&1&&o(1,s=a(n.error))},[n,s]}class $t extends K{constructor(t){super(),L(this,t,ut,ft,J,{})}}export{$t as component}; diff --git a/_app/immutable/nodes/4.tWFXFfna.js b/_app/immutable/nodes/4.tWFXFfna.js new file mode 100644 index 0000000000000000000000000000000000000000..14973b55c72d508f81600b144577b8b056b000df --- /dev/null +++ b/_app/immutable/nodes/4.tWFXFfna.js @@ -0,0 +1,136 @@ +import{s as xe,z as ri,e as ae,d as oe,g as ye,f as S,j as G,k as j,D as si,E as ai,F as oi,q as ni,b as Ce,u as Le,a8 as Pi,T as M,J as lt,K as rt,a as Y,c as K,L as Ri,H as Tn,l as ke,I as En,B as tt,a9 as vi,a7 as jn,aa as pt,ab as qi,O as Yt,P as Kt,t as An,i as On,m as pn,y as Gn,n as li,ad as Bn,h as Pn,o as qn,p as Nn,r as Rn}from"../chunks/scheduler.BZlHRu_0.js";import{S as He,i as We,t as O,b as I,j as xn,c as v,a as $,m as ee,g as Ie,d as Ee,e as te}from"../chunks/index.a_oafgNU.js";import{M as jt,N as Me,O as xi,R as Hi,S as Hn,U as Wn,V as Un,f as Vn,W as Ln,X as Xn,Y as kt,Z as Yn,_ as Kn,$ as pi,a0 as $i,a1 as en,a2 as tn,a3 as Gi,a4 as Qn,a5 as Re,a6 as it,a7 as Qt,a8 as nt,a9 as Mn,aa as Dn,ab as zn,ac as Zn,Q as Ke,H as Jn,K as vn,ad as $n,D as el,s as tl,p as il,ae as nn,af as Zt,r as ln,C as nl}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";import{w as Ni}from"../chunks/entry.p1-HE9Vh.js";import{e as ll,h as Ge,p as rl}from"../chunks/button.DH6vZO4W.js";import{p as sl}from"../chunks/stores.D7EENclZ.js";import{D as al,B as Jt,A as ol,Q as Pt}from"../chunks/AreaMap.Ua5Kysct.js";function rn(n){return t=>t.map(i=>{var r;const l={},s=Object.keys(i);for(const a of s){const o=(r=n[a])!=null?r:a;l[o]=i[a]}return l})}function fl(n,e){if(n.length===0||e.length===0)return{};const t=Object.keys(n[0]),i=Object.keys(e[0]),r={};for(const l of t)i.includes(l)&&(r[l]=l);return r}function ul(n,e,t){for(const i in t){const r=t[i];if(n[r]!==e[i])return!1}return!0}function cl(n,e){return i=>{if(!n.length)return i;const r=fl(i,n),l=Object.keys(n[0]);return i.flatMap(a=>{const o=n.filter(y=>ul(a,y,r));if(o.length)return o.map(y=>({...a,...y}));const f=Object.fromEntries(l.filter(y=>a[y]==null).map(y=>[y,void 0]));return{...a,...f}})}}function sn(n){return t=>{const i=t.map(r=>({...r}));for(const r in n){const l=n[r],s=typeof l=="function"?l(i):l,a=s!=null&&s[Symbol.iterator]&&typeof s!="string"?s:t.map(()=>s);let o=-1;for(const f of i)f[r]=a[++o]}return i}}function ml(n){return t=>{const i=yl(n),r=[];for(const l in i){const s=i[l];let a;typeof s=="function"?a=s(t):Array.isArray(s)?a=s:a=Array.from(new Set(t.map(o=>o[l]))),r.push(a.map(o=>({[l]:o})))}return dl(r)}}function dl(n){function e(i,r,l){if(!l.length&&r!=null){i.push(r);return}const s=l[0],a=l.slice(1);for(const o of s)e(i,{...r,...o},a)}const t=[];return e(t,null,n),t}function yl(n){if(Array.isArray(n)){const e={};for(const t of n)e[t]=t;return e}else if(typeof n=="object")return n;return{[n]:n}}function hl(n){return t=>{const i=[];for(const r of t){const l={...r};for(const s in n)l[s]==null&&(l[s]=n[s]);i.push(l)}return i}}function an(n,e){return i=>{const r=ml(n)(i),l=cl(i)(r);return e?hl(e)(l):l}}function on(n,e,t){return n==null||e==null?void 0:e===0&&n===0?0:!t&&e===0?void 0:n/e}function fn(n,e,t){const i=typeof n=="function"?n:a=>a[n],r=a=>a[e],{predicate:l,allowDivideByZero:s}={};return l==null?(a,o,f)=>{const y=r(a),c=i(a,o,f);return on(c,y,s)}:(a,o,f)=>{if(!l(a,o,f))return;const y=r(a),c=i(a,o,f);return on(c,y,s)}}function gl(n){let e,t,i;const r=n[5].default,l=ri(r,n,n[4],null);return{c(){e=ae("div"),l&&l.c(),this.h()},l(s){e=oe(s,"DIV",{class:!0});var a=ye(e);l&&l.l(a),a.forEach(S),this.h()},h(){G(e,"class",t="grid "+n[2][n[0]]+" "+n[3][n[1]])},m(s,a){j(s,e,a),l&&l.m(e,null),i=!0},p(s,[a]){l&&l.p&&(!i||a&16)&&si(l,r,s,s[4],i?oi(r,s[4],a,null):ai(s[4]),null),(!i||a&3&&t!==(t="grid "+s[2][s[0]]+" "+s[3][s[1]]))&&G(e,"class",t)},i(s){i||(O(l,s),i=!0)},o(s){I(l,s),i=!1},d(s){s&&S(e),l&&l.d(s)}}}function bl(n,e,t){let{$$slots:i={},$$scope:r}=e,{cols:l=2}=e,{gapSize:s="md"}=e;const a=Object.freeze({1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5",6:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6"}),o=Object.freeze({none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-8"}),f=Object.freeze({none:0,sm:8,md:16,lg:32});let y=`grid-${Date.now()}-${Math.round(Math.random()*1e3)}`,c=f[s];return ni("gridConfig",{gridId:y,cols:l,gapWidth:c}),n.$$set=g=>{"cols"in g&&t(0,l=g.cols),"gapSize"in g&&t(1,s=g.gapSize),"$$scope"in g&&t(4,r=g.$$scope)},[l,s,a,o,r,i]}class _l extends He{constructor(e){super(),We(this,e,bl,gl,xe,{cols:0,gapSize:1})}}const vt=Me.grey500,$t=Me.grey500,ei=Me.grey500,ti=Me.grey200,un="white",wl=Me.grey500,kl=Me.grey600,Cl=Me.grey500,Sl=Me.grey400,Tl="white",Al=Me.grey900,Ol=Me.grey800,Ll=Me.grey700,Wi={darkMode:!1,textStyle:{fontFamily:["Inter","sans-serif"]},grid:{left:"0%",right:"4%",bottom:"0%",top:"15%",containLabel:!0},color:jt,backgroundColor:"rgba(255, 255, 255, 0)",title:{padding:0,itemGap:7,textStyle:{fontSize:14,color:Ol},subtextStyle:{fontSize:13,color:Ll,overflow:"break"},top:"0%"},line:{itemStyle:{borderWidth:0},lineStyle:{width:2,join:"round"},symbolSize:0,symbol:"circle",smooth:!1},radar:{itemStyle:{borderWidth:0},lineStyle:{width:2},symbolSize:0,symbol:"circle",smooth:!1},pie:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},scatter:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},boxplot:{itemStyle:{borderWidth:1.5}},parallel:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},sankey:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},funnel:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},gauge:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},candlestick:{itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1}},graph:{itemStyle:{borderWidth:0,borderColor:"#cccccc"},lineStyle:{width:1,color:"#aaaaaa"},symbolSize:0,symbol:"circle",smooth:!1,color:["#923d59","#488f96","#518eca","#b3a9a0","#ffc857","#495867","#bfdbf7","#bc4749","#eeebd0"],label:{color:"#f2f2f2"}},map:{itemStyle:{areaColor:"#eee",borderColor:"#444",borderWidth:.5},label:{color:"#000"},emphasis:{itemStyle:{areaColor:"rgba(255,215,0,0.8)",borderColor:"#444",borderWidth:1},label:{color:"rgb(100,0,0)"}}},geo:{itemStyle:{areaColor:"#eee",borderColor:"#444",borderWidth:.5},label:{color:"#000"},emphasis:{itemStyle:{areaColor:"rgba(255,215,0,0.8)",borderColor:"#444",borderWidth:1},label:{color:"rgb(100,0,0)"}}},categoryAxis:{axisLine:{show:!0,lineStyle:{color:vt}},axisTick:{show:!1,lineStyle:{color:$t},length:3,alignWithLabel:!0},axisLabel:{show:!0,color:ei},splitLine:{show:!1,lineStyle:{color:[ti]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},valueAxis:{axisLine:{show:!1,lineStyle:{color:vt}},axisTick:{show:!1,lineStyle:{color:$t},length:2},axisLabel:{show:!0,color:ei},splitLine:{show:!0,lineStyle:{color:[ti],width:1}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}},nameTextStyle:{backgroundColor:un}},logAxis:{axisLine:{show:!1,lineStyle:{color:vt}},axisTick:{show:!1,lineStyle:{color:$t},length:2},axisLabel:{show:!0,color:ei},splitLine:{show:!0,lineStyle:{color:[ti]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}},nameTextStyle:{backgroundColor:un}},timeAxis:{axisLine:{show:!0,lineStyle:{color:vt}},axisTick:{show:!0,lineStyle:{color:$t},length:3},axisLabel:{show:!0,color:ei},splitLine:{show:!1,lineStyle:{color:[ti]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},toolbox:{iconStyle:{borderColor:"#999999"},emphasis:{iconStyle:{borderColor:"#459cde"}}},legend:{textStyle:{padding:[0,0,0,-7],color:wl},icon:"circle",pageIcons:{horizontal:["M 17 3 h 2 c 0.386 0 0.738 0.223 0.904 0.572 s 0.115 0.762 -0.13 1.062 L 11.292 15 l 8.482 10.367 c 0.245 0.299 0.295 0.712 0.13 1.062 S 19.386 27 19 27 h -2 c -0.3 0 -0.584 -0.135 -0.774 -0.367 l -9 -11 c -0.301 -0.369 -0.301 -0.898 0 -1.267 l 9 -11 C 16.416 3.135 16.7 3 17 3 Z","M 12 27 h -2 c -0.386 0 -0.738 -0.223 -0.904 -0.572 s -0.115 -0.762 0.13 -1.062 L 17.708 15 L 9.226 4.633 c -0.245 -0.299 -0.295 -0.712 -0.13 -1.062 S 9.614 3 10 3 h 2 c 0.3 0 0.584 0.135 0.774 0.367 l 9 11 c 0.301 0.369 0.301 0.898 0 1.267 l -9 11 C 12.584 26.865 12.3 27 12 27 Z"]},pageIconColor:kl,pageIconSize:12,pageTextStyle:{color:Cl},pageButtonItemGap:-2,animationDurationUpdate:300},tooltip:{axisPointer:{lineStyle:{color:"#cccccc",width:1},crossStyle:{color:"#cccccc",width:1}},borderRadius:4,borderWidth:1,borderColor:Sl,backgroundColor:Tl,textStyle:{color:Al,fontSize:12,fontWeight:400},padding:6},timeline:{lineStyle:{color:"#e3e3e3",width:2},itemStyle:{color:"#d6d6d6",borderWidth:1},controlStyle:{color:"#bfbfbf",borderColor:"#bfbfbf",borderWidth:1},checkpointStyle:{color:"#8f8f8f",borderColor:"#ffffff"},label:{color:"#c9c9c9"},emphasis:{itemStyle:{color:"#9c9c9c"},controlStyle:{color:"#bfbfbf",borderColor:"#bfbfbf",borderWidth:1},label:{color:"#c9c9c9"}}},visualMap:{color:["#c41621","#e39588","#f5ed98"]},dataZoom:{handleSize:"undefined%",textStyle:{}},markPoint:{label:{color:"#f2f2f2"},emphasis:{label:{color:"#f2f2f2"}}}},Ct=Symbol.for("__evidence-chart-window-debug__"),Ml=(n,e)=>{window[Ct]||(window[Ct]={}),window[Ct][n]=e},Dl=n=>{window[Ct]||(window[Ct]={}),delete window[Ct][n]},wt=500,zl=(n,e)=>{var T;const t=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)&&n.clientWidth*3*n.clientHeight*3>16777215;xi("evidence-light",Wi);const i=Hi(n,"evidence-light",{renderer:t?"svg":e.renderer??"canvas"});Ml(i.id,i),e.connectGroup&&(i.group=e.connectGroup,Hn(e.connectGroup));const r=()=>{if(e.seriesColors){const h=i.getOption();if(!h)return;const b={...h};for(const _ of Object.keys(e.seriesColors)){const A=h.series.findIndex(L=>L.name===_);A!==-1&&(b.series[A]={...b.series[A],itemStyle:{...b.series[A].itemStyle,color:e.seriesColors[_]}})}i.setOption(b)}},l=()=>{e.echartsOptions&&i.setOption({...e.echartsOptions})},s=()=>{let h=[];if(e.seriesOptions){const b=e.config.series.reduce((_,{evidenceSeriesType:A},L)=>((A==="reference_line"||A==="reference_area"||A==="reference_point")&&_.push(L),_),[]);for(let _=0;_{i.resize({animation:{duration:wt}}),c()},100);let y;window.ResizeObserver&&o?(y=new ResizeObserver(f),y.observe(o)):window.addEventListener("resize",f);const c=()=>{if(e.showAllXAxisLabels){const h=i.getOption();if(!h)return;const b=new Set(h.series.flatMap(L=>{var D;return(D=L.data)==null?void 0:D.map(z=>z[0])})),_=4/5,A=(n==null?void 0:n.clientWidth)??0;if(!e.swapXY){const L={xAxis:{axisLabel:{interval:0,overflow:"truncate",width:A*_/b.size}}};i.setOption(L)}}},g=h=>{e=h,i.setOption({...e.config,animationDuration:wt,animationDurationUpdate:wt},!0),r(),l(),s(),i.resize({animation:{duration:wt}}),c()};return f(),window[T=Symbol.for("chart renders")]??(window[T]=0),window[Symbol.for("chart renders")]++,{update(h){window[Symbol.for("chart renders")]++,g(h)},destroy(){y?y.unobserve(o):window.removeEventListener("resize",f),i.dispose(),Dl(i.id)}}},Fl=(n,e)=>{xi("evidence-light",Wi);const t=Hi(n,"evidence-light",{renderer:"canvas"});e.config.animation=!1,t.setOption(e.config);const i=()=>{if(e.seriesColors){const f=t.getOption();if(!f)return;const y={...f};for(const c of Object.keys(e.seriesColors)){const g=f.series.findIndex(T=>T.name===c);g!==-1&&(y.series[g]={...y.series[g],itemStyle:{...y.series[g].itemStyle,color:e.seriesColors[c]}})}t.setOption(y)}},r=()=>{e.echartsOptions&&t.setOption({...e.echartsOptions})},l=()=>{let f=[];if(e.seriesOptions){const y=e.config.series.reduce((c,{evidenceSeriesType:g},T)=>((g==="reference_line"||g==="reference_area"||g==="reference_point")&&c.push(T),c),[]);for(let c=0;c{xi("evidence-light",Wi);const{config:t,ratio:i,echartsOptions:r,seriesOptions:l,seriesColors:s,isMap:a,extraHeight:o,width:f}=e;let y={renderer:"canvas"};a&&(y.height=f*.5+o,n&&n.parentNode&&(n.style.height=y.height+"px",n.parentNode.style.height=y.height+"px"));const c=Hi(n,"evidence-light",y);t.animation=!1,c.setOption(t),r&&c.setOption(r);const g=()=>{if(s){const _=c.getOption();if(!_)return;const A={..._};for(const L of Object.keys(s)){const D=_.series.findIndex(z=>z.name===L);D!==-1&&(A.series[D]={...A.series[D],itemStyle:{...A.series[D].itemStyle,color:s[L]}})}c.setOption(A)}},T=()=>{r&&c.setOption({...r})},h=()=>{let _=[];if(l){const A=t.series.reduce((L,{evidenceSeriesType:D},z)=>((D==="reference_line"||D==="reference_area"||D==="reference_point")&&L.push(z),L),[]);for(let L=0;L`,e.config.animation=!0};function Il(n){let e;function t(l,s){return l[10]?pl:jl}let i=t(n),r=i(n);return{c(){r.c(),e=Ce()},l(l){r.l(l),e=Ce()},m(l,s){r.m(l,s),j(l,e,s)},p(l,s){i===(i=t(l))&&r?r.p(l,s):(r.d(1),r=i(l),r&&(r.c(),r.m(e.parentNode,e)))},d(l){l&&S(e),r.d(l)}}}function El(n){let e,t,i,r;return{c(){e=ae("div"),this.h()},l(l){e=oe(l,"DIV",{class:!0,style:!0}),ye(e).forEach(S),this.h()},h(){G(e,"class","chart"),M(e,"height",n[1]),M(e,"width",n[2]),M(e,"margin-left","0"),M(e,"margin-top","15px"),M(e,"margin-bottom","10px"),M(e,"overflow","visible"),M(e,"break-inside","avoid")},m(l,s){j(l,e,s),i||(r=lt(t=Gt.call(null,e,{config:n[0],ratio:2,echartsOptions:n[5],seriesOptions:n[6],seriesColors:n[7]})),i=!0)},p(l,s){s&2&&M(e,"height",l[1]),s&4&&M(e,"width",l[2]),t&&rt(t.update)&&s&225&&t.update.call(null,{config:l[0],ratio:2,echartsOptions:l[5],seriesOptions:l[6],seriesColors:l[7]})},d(l){l&&S(e),i=!1,r()}}}function jl(n){let e,t,i,r,l,s,a;return{c(){e=ae("div"),i=Y(),r=ae("div"),this.h()},l(o){e=oe(o,"DIV",{class:!0,style:!0}),ye(e).forEach(S),i=K(o),r=oe(o,"DIV",{class:!0,style:!0}),ye(r).forEach(S),this.h()},h(){G(e,"class","chart md:hidden"),M(e,"height",n[1]),M(e,"width","650px"),M(e,"margin-left","0"),M(e,"margin-top","15px"),M(e,"margin-bottom","10px"),M(e,"overflow","visible"),M(e,"break-inside","avoid"),G(r,"class","chart hidden md:block"),M(r,"height",n[1]),M(r,"width","841px"),M(r,"margin-left","0"),M(r,"margin-top","15px"),M(r,"margin-bottom","10px"),M(r,"overflow","visible"),M(r,"break-inside","avoid")},m(o,f){j(o,e,f),j(o,i,f),j(o,r,f),s||(a=[lt(t=Gt.call(null,e,{config:n[0],ratio:4,echartsOptions:n[5],seriesOptions:n[6],seriesColors:n[7],isMap:n[8],extraHeight:n[9],width:650})),lt(l=Gt.call(null,r,{config:n[0],ratio:4,echartsOptions:n[5],seriesOptions:n[6],seriesColors:n[7],isMap:n[8],extraHeight:n[9],width:841}))],s=!0)},p(o,f){f&2&&M(e,"height",o[1]),t&&rt(t.update)&&f&993&&t.update.call(null,{config:o[0],ratio:4,echartsOptions:o[5],seriesOptions:o[6],seriesColors:o[7],isMap:o[8],extraHeight:o[9],width:650}),f&2&&M(r,"height",o[1]),l&&rt(l.update)&&f&993&&l.update.call(null,{config:o[0],ratio:4,echartsOptions:o[5],seriesOptions:o[6],seriesColors:o[7],isMap:o[8],extraHeight:o[9],width:841})},d(o){o&&(S(e),S(i),S(r)),s=!1,Ri(a)}}}function pl(n){let e,t,i,r,l,s,a;return{c(){e=ae("div"),i=Y(),r=ae("div"),this.h()},l(o){e=oe(o,"DIV",{class:!0,style:!0}),ye(e).forEach(S),i=K(o),r=oe(o,"DIV",{class:!0,style:!0}),ye(r).forEach(S),this.h()},h(){G(e,"class","chart md:hidden"),M(e,"height",n[1]),M(e,"width",n[12]+"px"),M(e,"margin-left","0"),M(e,"margin-top","15px"),M(e,"margin-bottom","10px"),M(e,"overflow","visible"),M(e,"break-inside","avoid"),G(r,"class","chart hidden md:block"),M(r,"height",n[1]),M(r,"width",n[11]+"px"),M(r,"margin-left","0"),M(r,"margin-top","15px"),M(r,"margin-bottom","10px"),M(r,"overflow","visible"),M(r,"break-inside","avoid")},m(o,f){j(o,e,f),j(o,i,f),j(o,r,f),s||(a=[lt(t=Gt.call(null,e,{config:n[0],ratio:4,echartsOptions:n[5],seriesOptions:n[6],seriesColors:n[7],isMap:n[8],extraHeight:n[9],width:n[12]})),lt(l=Gt.call(null,r,{config:n[0],ratio:4,echartsOptions:n[5],seriesOptions:n[6],seriesColors:n[7],isMap:n[8],extraHeight:n[9],width:n[11]}))],s=!0)},p(o,f){f&2&&M(e,"height",o[1]),f&4096&&M(e,"width",o[12]+"px"),t&&rt(t.update)&&f&5089&&t.update.call(null,{config:o[0],ratio:4,echartsOptions:o[5],seriesOptions:o[6],seriesColors:o[7],isMap:o[8],extraHeight:o[9],width:o[12]}),f&2&&M(r,"height",o[1]),f&2048&&M(r,"width",o[11]+"px"),l&&rt(l.update)&&f&3041&&l.update.call(null,{config:o[0],ratio:4,echartsOptions:o[5],seriesOptions:o[6],seriesColors:o[7],isMap:o[8],extraHeight:o[9],width:o[11]})},d(o){o&&(S(e),S(i),S(r)),s=!1,Ri(a)}}}function Gl(n){let e;function t(l,s){if(l[3])return El;if(l[4])return Il}let i=t(n),r=i&&i(n);return{c(){r&&r.c(),e=Ce()},l(l){r&&r.l(l),e=Ce()},m(l,s){r&&r.m(l,s),j(l,e,s)},p(l,[s]){i===(i=t(l))&&r?r.p(l,s):(r&&r.d(1),r=i&&i(l),r&&(r.c(),r.m(e.parentNode,e)))},i:Le,o:Le,d(l){l&&S(e),r&&r.d(l)}}}function Bl(n,e,t){let i,r,l,s,{config:a=void 0}=e,{height:o="291px"}=e,{width:f="100%"}=e,{copying:y=!1}=e,{printing:c=!1}=e,{echartsOptions:g=void 0}=e,{seriesOptions:T=void 0}=e,{seriesColors:h=void 0}=e,{isMap:b=!1}=e,{extraHeight:_=void 0}=e,A=!1,L,D;const z=Pi("gridConfig");return z&&(A=!0,{cols:L,gapWidth:D}=z),n.$$set=E=>{"config"in E&&t(0,a=E.config),"height"in E&&t(1,o=E.height),"width"in E&&t(2,f=E.width),"copying"in E&&t(3,y=E.copying),"printing"in E&&t(4,c=E.printing),"echartsOptions"in E&&t(5,g=E.echartsOptions),"seriesOptions"in E&&t(6,T=E.seriesOptions),"seriesColors"in E&&t(7,h=E.seriesColors),"isMap"in E&&t(8,b=E.isMap),"extraHeight"in E&&t(9,_=E.extraHeight)},n.$$.update=()=>{n.$$.dirty&8192&&t(16,i=Math.min(Number(L),2)),n.$$.dirty&81920&&t(12,r=(650-Number(D)*(i-1))/i),n.$$.dirty&8192&&t(15,l=Math.min(Number(L),3)),n.$$.dirty&49152&&t(11,s=(841-Number(D)*(l-1))/l)},[a,o,f,y,c,g,T,h,b,_,A,s,r,L,D,l,i]}class Pl extends He{constructor(e){super(),We(this,e,Bl,Gl,xe,{config:0,height:1,width:2,copying:3,printing:4,echartsOptions:5,seriesOptions:6,seriesColors:7,isMap:8,extraHeight:9})}}function ql(n){let e,t,i="Loading...",r,l,s;return{c(){e=ae("div"),t=ae("span"),t.textContent=i,r=Y(),l=ae("div"),this.h()},l(a){e=oe(a,"DIV",{role:!0,class:!0});var o=ye(e);t=oe(o,"SPAN",{class:!0,"data-svelte-h":!0}),Tn(t)!=="svelte-1wtojot"&&(t.textContent=i),r=K(o),l=oe(o,"DIV",{class:!0,style:!0}),ye(l).forEach(S),o.forEach(S),this.h()},h(){G(t,"class","sr-only"),G(l,"class","bg-gray-200 rounded-md dark:bg-gray-400 max-w-[100%]"),M(l,"height",n[0]),M(l,"margin-top","15px"),M(l,"margin-bottom","31px"),G(e,"role","status"),G(e,"class","animate-pulse")},m(a,o){j(a,e,o),ke(e,t),ke(e,r),ke(e,l)},p(a,[o]){o&1&&M(l,"height",a[0])},i(a){a&&(s||En(()=>{s=xn(e,Vn,{}),s.start()}))},o:Le,d(a){a&&S(e)}}}function Nl(n,e,t){let{height:i="231px"}=e;return n.$$set=r=>{"height"in r&&t(0,i=r.height)},[i]}class Rl extends He{constructor(e){super(),We(this,e,Nl,ql,xe,{height:0})}}function cn(n){let e,t,i,r;const l=[Hl,xl],s=[];function a(o,f){return 1}return e=a(),t=s[e]=l[e](n),{c(){t.c(),i=Ce()},l(o){t.l(o),i=Ce()},m(o,f){s[e].m(o,f),j(o,i,f),r=!0},p(o,f){t.p(o,f)},i(o){r||(O(t),r=!0)},o(o){I(t),r=!1},d(o){o&&S(i),s[e].d(o)}}}function xl(n){let e,t,i,r;return{c(){e=ae("div"),this.h()},l(l){e=oe(l,"DIV",{class:!0,style:!0}),ye(e).forEach(S),this.h()},h(){G(e,"class","chart svelte-19r8f8"),M(e,"height",n[3]),M(e,"width",n[4]),M(e,"margin-left","0"),M(e,"margin-top","15px"),M(e,"margin-bottom","10px"),M(e,"overflow","visible"),M(e,"display",n[15]?"none":"inherit")},m(l,s){j(l,e,s),i||(r=lt(t=zl.call(null,e,{config:n[0],...n[19],echartsOptions:n[9],seriesOptions:n[10],dispatch:n[18],renderer:n[6],connectGroup:n[13],seriesColors:n[12]})),i=!0)},p(l,s){s&8&&M(e,"height",l[3]),s&16&&M(e,"width",l[4]),s&32768&&M(e,"display",l[15]?"none":"inherit"),t&&rt(t.update)&&s&538177&&t.update.call(null,{config:l[0],...l[19],echartsOptions:l[9],seriesOptions:l[10],dispatch:l[18],renderer:l[6],connectGroup:l[13],seriesColors:l[12]})},i:Le,o:Le,d(l){l&&S(e),i=!1,r()}}}function Hl(n){let e,t;return e=new Rl({props:{height:n[3]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,r){const l={};r&8&&(l.height=i[3]),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function mn(n){let e,t,i,r=n[8]&&dn(n),l=n[5]&&n[7]&&yn(n);return{c(){e=ae("div"),r&&r.c(),t=Y(),l&&l.c(),this.h()},l(s){e=oe(s,"DIV",{class:!0});var a=ye(e);r&&r.l(a),t=K(a),l&&l.l(a),a.forEach(S),this.h()},h(){G(e,"class","chart-footer svelte-19r8f8")},m(s,a){j(s,e,a),r&&r.m(e,null),ke(e,t),l&&l.m(e,null),i=!0},p(s,a){s[8]?r?(r.p(s,a),a&256&&O(r,1)):(r=dn(s),r.c(),O(r,1),r.m(e,t)):r&&(Ie(),I(r,1,1,()=>{r=null}),Ee()),s[5]&&s[7]?l?(l.p(s,a),a&160&&O(l,1)):(l=yn(s),l.c(),O(l,1),l.m(e,null)):l&&(Ie(),I(l,1,1,()=>{l=null}),Ee())},i(s){i||(O(r),O(l),i=!0)},o(s){I(r),I(l),i=!1},d(s){s&&S(e),r&&r.d(),l&&l.d()}}}function dn(n){let e,t;return e=new Ln({props:{text:"Save Image",class:"download-button",downloadData:n[25],display:n[17],queryID:n[1],$$slots:{default:[Wl]},$$scope:{ctx:n}}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,r){const l={};r&16384&&(l.downloadData=i[25]),r&131072&&(l.display=i[17]),r&2&&(l.queryID=i[1]),r&268435456&&(l.$$scope={dirty:r,ctx:i}),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Wl(n){let e,t,i,r;return{c(){e=Yt("svg"),t=Yt("rect"),i=Yt("circle"),r=Yt("path"),this.h()},l(l){e=Kt(l,"svg",{xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0});var s=ye(e);t=Kt(s,"rect",{x:!0,y:!0,width:!0,height:!0,rx:!0}),ye(t).forEach(S),i=Kt(s,"circle",{cx:!0,cy:!0,r:!0}),ye(i).forEach(S),r=Kt(s,"path",{d:!0}),ye(r).forEach(S),s.forEach(S),this.h()},h(){G(t,"x","3"),G(t,"y","3"),G(t,"width","18"),G(t,"height","18"),G(t,"rx","2"),G(i,"cx","8.5"),G(i,"cy","8.5"),G(i,"r","1.5"),G(r,"d","M20.4 14.5L16 10 4 20"),G(e,"xmlns","http://www.w3.org/2000/svg"),G(e,"width","12"),G(e,"height","12"),G(e,"viewBox","0 0 24 24"),G(e,"fill","none"),G(e,"stroke","#000"),G(e,"stroke-width","2"),G(e,"stroke-linecap","round"),G(e,"stroke-linejoin","round")},m(l,s){j(l,e,s),ke(e,t),ke(e,i),ke(e,r)},p:Le,d(l){l&&S(e)}}}function yn(n){let e,t;return e=new Ln({props:{text:"Download Data",data:n[5],queryID:n[1],class:"download-button",display:n[17]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,r){const l={};r&32&&(l.data=i[5]),r&2&&(l.queryID=i[1]),r&131072&&(l.display=i[17]),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function hn(n){let e,t;return e=new Xn({props:{source:JSON.stringify(n[0],void 0,3),copyToClipboard:!0,$$slots:{default:[Ul]},$$scope:{ctx:n}}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,r){const l={};r&1&&(l.source=JSON.stringify(i[0],void 0,3)),r&268435457&&(l.$$scope={dirty:r,ctx:i}),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Ul(n){let e=JSON.stringify(n[0],void 0,3)+"",t;return{c(){t=An(e)},l(i){t=On(i,e)},m(i,r){j(i,t,r)},p(i,r){r&1&&e!==(e=JSON.stringify(i[0],void 0,3)+"")&&pn(t,e)},d(i){i&&S(t)}}}function gn(n){let e,t,i,r;return{c(){e=ae("div"),this.h()},l(l){e=oe(l,"DIV",{class:!0,style:!0}),ye(e).forEach(S),this.h()},h(){G(e,"class","chart svelte-19r8f8"),M(e,"display","none"),M(e,"visibility","visible"),M(e,"height",n[3]),M(e,"width","666px"),M(e,"margin-left","0"),M(e,"margin-top","15px"),M(e,"margin-bottom","15px"),M(e,"overflow","visible")},m(l,s){j(l,e,s),i||(r=lt(t=Fl.call(null,e,{config:n[0],...n[19],echartsOptions:n[9],seriesOptions:n[10],seriesColors:n[12],queryID:n[1],evidenceChartTitle:n[2]})),i=!0)},p(l,s){s&8&&M(e,"height",l[3]),t&&rt(t.update)&&s&529927&&t.update.call(null,{config:l[0],...l[19],echartsOptions:l[9],seriesOptions:l[10],seriesColors:l[12],queryID:l[1],evidenceChartTitle:l[2]})},d(l){l&&S(e),i=!1,r()}}}function Vl(n){let e,t,i,r,l,s,a,o,f,y,c=!n[16]&&cn(n);i=new Pl({props:{config:n[0],height:n[3],width:n[4],copying:n[15],printing:n[16],echartsOptions:n[9],seriesOptions:n[10],seriesColors:n[12]}});let g=(n[7]||n[8])&&mn(n),T=n[11]&&!n[16]&&hn(n),h=n[14]&&gn(n);return{c(){e=ae("div"),c&&c.c(),t=Y(),v(i.$$.fragment),r=Y(),g&&g.c(),l=Y(),T&&T.c(),s=Y(),h&&h.c(),a=Ce(),this.h()},l(b){e=oe(b,"DIV",{role:!0,class:!0});var _=ye(e);c&&c.l(_),t=K(_),$(i.$$.fragment,_),r=K(_),g&&g.l(_),l=K(_),T&&T.l(_),_.forEach(S),s=K(b),h&&h.l(b),a=Ce(),this.h()},h(){G(e,"role","none"),G(e,"class","chart-container svelte-19r8f8")},m(b,_){j(b,e,_),c&&c.m(e,null),ke(e,t),ee(i,e,null),ke(e,r),g&&g.m(e,null),ke(e,l),T&&T.m(e,null),j(b,s,_),h&&h.m(b,_),j(b,a,_),o=!0,f||(y=[tt(window,"copy",n[20]),tt(window,"beforeprint",n[21]),tt(window,"afterprint",n[22]),tt(window,"export-beforeprint",n[23]),tt(window,"export-afterprint",n[24]),tt(e,"mouseenter",n[26]),tt(e,"mouseleave",n[27])],f=!0)},p(b,[_]){b[16]?c&&(Ie(),I(c,1,1,()=>{c=null}),Ee()):c?(c.p(b,_),_&65536&&O(c,1)):(c=cn(b),c.c(),O(c,1),c.m(e,t));const A={};_&1&&(A.config=b[0]),_&8&&(A.height=b[3]),_&16&&(A.width=b[4]),_&32768&&(A.copying=b[15]),_&65536&&(A.printing=b[16]),_&512&&(A.echartsOptions=b[9]),_&1024&&(A.seriesOptions=b[10]),_&4096&&(A.seriesColors=b[12]),i.$set(A),b[7]||b[8]?g?(g.p(b,_),_&384&&O(g,1)):(g=mn(b),g.c(),O(g,1),g.m(e,l)):g&&(Ie(),I(g,1,1,()=>{g=null}),Ee()),b[11]&&!b[16]?T?(T.p(b,_),_&67584&&O(T,1)):(T=hn(b),T.c(),O(T,1),T.m(e,null)):T&&(Ie(),I(T,1,1,()=>{T=null}),Ee()),b[14]?h?h.p(b,_):(h=gn(b),h.c(),h.m(a.parentNode,a)):h&&(h.d(1),h=null)},i(b){o||(O(c),O(i.$$.fragment,b),O(g),O(T),o=!0)},o(b){I(c),I(i.$$.fragment,b),I(g),I(T),o=!1},d(b){b&&(S(e),S(s),S(a)),c&&c.d(),te(i),g&&g.d(),T&&T.d(),h&&h.d(b),f=!1,Ri(y)}}}function Xl(n,e,t){const i=["config","queryID","evidenceChartTitle","height","width","data","renderer","downloadableData","downloadableImage","echartsOptions","seriesOptions","printEchartsConfig","seriesColors","connectGroup"];let r=vi(e,i),{config:l=void 0}=e,{queryID:s=void 0}=e,{evidenceChartTitle:a=void 0}=e,{height:o="291px"}=e,{width:f="100%"}=e,{data:y}=e,{renderer:c=void 0}=e,{downloadableData:g=void 0}=e,{downloadableImage:T=void 0}=e,{echartsOptions:h=void 0}=e,{seriesOptions:b=void 0}=e,{printEchartsConfig:_}=e,{seriesColors:A=void 0}=e,{connectGroup:L=void 0}=e;const D=jn();let z=!1,E=!1,V=!1,ne=!1;const q=()=>{t(15,E=!0),Gn(),setTimeout(()=>{t(15,E=!1)},0)},k=()=>t(16,V=!0),F=()=>t(16,V=!1),P=()=>t(16,V=!0),H=()=>t(16,V=!1),Z=()=>{t(14,z=!0),setTimeout(()=>{t(14,z=!1)},0)},x=()=>t(17,ne=!0),ie=()=>t(17,ne=!1);return n.$$set=B=>{e=pt(pt({},e),qi(B)),t(19,r=vi(e,i)),"config"in B&&t(0,l=B.config),"queryID"in B&&t(1,s=B.queryID),"evidenceChartTitle"in B&&t(2,a=B.evidenceChartTitle),"height"in B&&t(3,o=B.height),"width"in B&&t(4,f=B.width),"data"in B&&t(5,y=B.data),"renderer"in B&&t(6,c=B.renderer),"downloadableData"in B&&t(7,g=B.downloadableData),"downloadableImage"in B&&t(8,T=B.downloadableImage),"echartsOptions"in B&&t(9,h=B.echartsOptions),"seriesOptions"in B&&t(10,b=B.seriesOptions),"printEchartsConfig"in B&&t(11,_=B.printEchartsConfig),"seriesColors"in B&&t(12,A=B.seriesColors),"connectGroup"in B&&t(13,L=B.connectGroup)},[l,s,a,o,f,y,c,g,T,h,b,_,A,L,z,E,V,ne,D,r,q,k,F,P,H,Z,x,ie]}class Yl extends He{constructor(e){super(),We(this,e,Xl,Vl,xe,{config:0,queryID:1,evidenceChartTitle:2,height:3,width:4,data:5,renderer:6,downloadableData:7,downloadableImage:8,echartsOptions:9,seriesOptions:10,printEchartsConfig:11,seriesColors:12,connectGroup:13})}}function Bt(n,e){const t=new Set(n.map(i=>i[e]));return Array.from(t)}function Kl(n,e){return kt(n,Yn({count:Kn(e)}))[0].count}function Ql(n,e,t){let i;if(typeof t!="object")i=kt(n,$i(e,sn({xTotal:en(t)})),pi({percentOfX:fn(t,"xTotal")}),rn({percentOfX:t+"_pct"}));else{i=kt(n,pi({valueSum:0}));for(let r=0;r(i[e]{s[y]=null}),Ee(),t=s[e],t?t.p(o,f):(t=s[e]=l[e](o),t.c()),O(t,1),t.m(i.parentNode,i))},i(o){r||(O(t),r=!0)},o(o){I(t),r=!1},d(o){o&&S(i),s[e].d(o)}}}function $l(n,e,t){let i,{$$slots:r={},$$scope:l}=e,s=Ni({}),a=Ni({});li(n,a,d=>t(17,i=d));let{data:o=void 0}=e,{queryID:f=void 0}=e,{x:y=void 0}=e,{y:c=void 0}=e,{y2:g=void 0}=e,{series:T=void 0}=e,{size:h=void 0}=e,{tooltipTitle:b=void 0}=e,{showAllXAxisLabels:_=!1}=e,{printEchartsConfig:A=!1}=e,L=!!c,D=!!y,{swapXY:z=!1}=e,{title:E=void 0}=e,{subtitle:V=void 0}=e,{chartType:ne="Chart"}=e,{bubble:q=!1}=e,{hist:k=!1}=e,{boxplot:F=!1}=e,P,{xType:H=void 0}=e,{xAxisTitle:Z="false"}=e,{xBaseline:x=!0}=e,{xTickMarks:ie=!1}=e,{xGridlines:B=!1}=e,{xAxisLabels:se=!0}=e,{sort:J=!0}=e,{xFmt:Q=void 0}=e,{xMin:R=void 0}=e,{xMax:W=void 0}=e,{yLog:N=!1}=e,{yType:X=N===!0?"log":"value"}=e,{yLogBase:m=10}=e,{yAxisTitle:C="false"}=e,{yBaseline:U=!1}=e,{yTickMarks:fe=!1}=e,{yGridlines:ue=!0}=e,{yAxisLabels:ce=!0}=e,{yMin:he=void 0}=e,{yMax:me=void 0}=e,{yScale:de=!1}=e,{yFmt:ge=void 0}=e,{yAxisColor:Se="true"}=e,{y2AxisTitle:Te="false"}=e,{y2Baseline:De=!1}=e,{y2TickMarks:w=!1}=e,{y2Gridlines:be=!0}=e,{y2AxisLabels:Be=!0}=e,{y2Min:Qe=void 0}=e,{y2Max:st=void 0}=e,{y2Scale:Pe=!1}=e,{y2Fmt:Ue=void 0}=e,{y2AxisColor:ze="true"}=e,{sizeFmt:Ze=void 0}=e,{colorPalette:we=void 0}=e,{legend:Ae=void 0}=e,{echartsOptions:St=void 0}=e,{seriesOptions:Tt=void 0}=e,{seriesColors:At=void 0}=e,{stackType:at=void 0}=e,{stacked100:Ve=!1}=e,{chartAreaHeight:Oe}=e,{renderer:Ot=void 0}=e,{downloadableData:Xe=!0}=e,{downloadableImage:Ye=!0}=e,{connectGroup:Lt=void 0}=e,le,u,qt=[],ot=[],fi,Mt,je,ui,pe,_e,qe,Nt,ci,Dt,Rt,mi,xt,ft,di,yi,zt,ut,hi,gi,bi,_i,wi,ki,Ci,Si,Ti,Ai,Oi,ct,Ft,It,Ht,Wt,Li,Mi,mt,Di,zi,Ut,Ui,Fi,Je=[],dt=!0,Ne=[],Et=[],Fe,Vt,Ii,ve;return n.$$set=d=>{"data"in d&&t(0,o=d.data),"queryID"in d&&t(5,f=d.queryID),"x"in d&&t(19,y=d.x),"y"in d&&t(20,c=d.y),"y2"in d&&t(43,g=d.y2),"series"in d&&t(44,T=d.series),"size"in d&&t(45,h=d.size),"tooltipTitle"in d&&t(46,b=d.tooltipTitle),"showAllXAxisLabels"in d&&t(6,_=d.showAllXAxisLabels),"printEchartsConfig"in d&&t(1,A=d.printEchartsConfig),"swapXY"in d&&t(2,z=d.swapXY),"title"in d&&t(7,E=d.title),"subtitle"in d&&t(47,V=d.subtitle),"chartType"in d&&t(8,ne=d.chartType),"bubble"in d&&t(48,q=d.bubble),"hist"in d&&t(49,k=d.hist),"boxplot"in d&&t(50,F=d.boxplot),"xType"in d&&t(21,H=d.xType),"xAxisTitle"in d&&t(22,Z=d.xAxisTitle),"xBaseline"in d&&t(23,x=d.xBaseline),"xTickMarks"in d&&t(24,ie=d.xTickMarks),"xGridlines"in d&&t(25,B=d.xGridlines),"xAxisLabels"in d&&t(26,se=d.xAxisLabels),"sort"in d&&t(27,J=d.sort),"xFmt"in d&&t(51,Q=d.xFmt),"xMin"in d&&t(52,R=d.xMin),"xMax"in d&&t(53,W=d.xMax),"yLog"in d&&t(28,N=d.yLog),"yType"in d&&t(54,X=d.yType),"yLogBase"in d&&t(55,m=d.yLogBase),"yAxisTitle"in d&&t(29,C=d.yAxisTitle),"yBaseline"in d&&t(30,U=d.yBaseline),"yTickMarks"in d&&t(31,fe=d.yTickMarks),"yGridlines"in d&&t(32,ue=d.yGridlines),"yAxisLabels"in d&&t(33,ce=d.yAxisLabels),"yMin"in d&&t(56,he=d.yMin),"yMax"in d&&t(57,me=d.yMax),"yScale"in d&&t(34,de=d.yScale),"yFmt"in d&&t(58,ge=d.yFmt),"yAxisColor"in d&&t(59,Se=d.yAxisColor),"y2AxisTitle"in d&&t(35,Te=d.y2AxisTitle),"y2Baseline"in d&&t(36,De=d.y2Baseline),"y2TickMarks"in d&&t(37,w=d.y2TickMarks),"y2Gridlines"in d&&t(38,be=d.y2Gridlines),"y2AxisLabels"in d&&t(39,Be=d.y2AxisLabels),"y2Min"in d&&t(60,Qe=d.y2Min),"y2Max"in d&&t(61,st=d.y2Max),"y2Scale"in d&&t(40,Pe=d.y2Scale),"y2Fmt"in d&&t(62,Ue=d.y2Fmt),"y2AxisColor"in d&&t(63,ze=d.y2AxisColor),"sizeFmt"in d&&t(64,Ze=d.sizeFmt),"colorPalette"in d&&t(65,we=d.colorPalette),"legend"in d&&t(41,Ae=d.legend),"echartsOptions"in d&&t(9,St=d.echartsOptions),"seriesOptions"in d&&t(10,Tt=d.seriesOptions),"seriesColors"in d&&t(11,At=d.seriesColors),"stackType"in d&&t(66,at=d.stackType),"stacked100"in d&&t(67,Ve=d.stacked100),"chartAreaHeight"in d&&t(42,Oe=d.chartAreaHeight),"renderer"in d&&t(12,Ot=d.renderer),"downloadableData"in d&&t(3,Xe=d.downloadableData),"downloadableImage"in d&&t(4,Ye=d.downloadableImage),"connectGroup"in d&&t(13,Lt=d.connectGroup),"$$scope"in d&&t(122,l=d.$$scope)},n.$$.update=()=>{var d,Vi,Xi,Yi,Ki,Qi;if(n.$$.dirty[0]&2&&t(1,A=A==="true"||A===!0),n.$$.dirty[0]&4&&(z==="true"||z===!0?t(2,z=!0):t(2,z=!1)),n.$$.dirty[0]&8388608&&t(23,x=x==="true"||x===!0),n.$$.dirty[0]&16777216&&t(24,ie=ie==="true"||ie===!0),n.$$.dirty[0]&33554432&&t(25,B=B==="true"||B===!0),n.$$.dirty[0]&67108864&&t(26,se=se==="true"||se===!0),n.$$.dirty[0]&134217728&&t(27,J=J==="true"||J===!0),n.$$.dirty[0]&268435456&&t(28,N=N==="true"||N===!0),n.$$.dirty[0]&1073741824&&t(30,U=U==="true"||U===!0),n.$$.dirty[1]&1&&t(31,fe=fe==="true"||fe===!0),n.$$.dirty[1]&2&&t(32,ue=ue==="true"||ue===!0),n.$$.dirty[1]&4&&t(33,ce=ce==="true"||ce===!0),n.$$.dirty[1]&8&&t(34,de=de==="true"||de===!0),n.$$.dirty[1]&32&&t(36,De=De==="true"||De===!0),n.$$.dirty[1]&64&&t(37,w=w==="true"||w===!0),n.$$.dirty[1]&128&&t(38,be=be==="true"||be===!0),n.$$.dirty[1]&256&&t(39,Be=Be==="true"||Be===!0),n.$$.dirty[1]&512&&t(40,Pe=Pe==="true"||Pe===!0),n.$$.dirty[0]&8&&t(3,Xe=Xe==="true"||Xe===!0),n.$$.dirty[0]&16&&t(4,Ye=Ye==="true"||Ye===!0),n.$$.dirty[0]&2147008901|n.$$.dirty[1]&2147483647|n.$$.dirty[2]&2147483647|n.$$.dirty[3]&536870911)try{if(t(15,Vt=void 0),t(115,Je=[]),t(74,ot=[]),t(117,Ne=[]),t(118,Et=[]),t(76,Mt=[]),t(68,L=!!c),t(69,D=!!y),tn(o),t(71,le=Gi(o)),t(72,u=Object.keys(le)),D||t(19,y=u[0]),!L){t(73,qt=u.filter(function(p){return![y,T,h].includes(p)}));for(let p=0;p1?ot:ot[0])}q?t(70,P={x:y,y:c,size:h}):k?t(70,P={x:y}):F?t(70,P={}):t(70,P={x:y,y:c});for(let p in P)P[p]==null&&Je.push(p);if(Je.length===1)throw Error(new Intl.ListFormat().format(Je)+" is required");if(Je.length>1)throw Error(new Intl.ListFormat().format(Je)+" are required");if(Ve===!0&&c.includes("_pct")&&dt===!1)if(typeof c=="object"){for(let p=0;pp.type==="date")),t(121,ve=ve.map(p=>p.id)),ve.length>0)for(let p=0;p1),Ve===!0&&N===!0)throw Error("Log axis cannot be used in a 100% stacked chart");if(at==="stacked"&&ji>1&&N===!0)throw Error("Log axis cannot be used in a stacked chart");let ht;if(typeof c=="object"){ht=le[c[0]].columnUnitSummary.min;for(let p=0;p({...p,data:o,x:y,y:c,y2:g,series:T,swapXY:z,sort:J,xType:H,xFormat:pe,yFormat:_e,y2Format:qe,sizeFormat:Nt,xMismatch:ui,size:h,yMin:he,y2Min:Qe,columnSummary:le,xAxisTitle:Z,yAxisTitle:C,y2AxisTitle:Te,tooltipTitle:b,chartAreaHeight:Oe,chartType:ne,yCount:yt,y2Count:Ei})),t(86,mi=Bt(o,y));let Ji;if(z?t(87,xt={type:X,logBase:m,position:"top",axisLabel:{show:ce,hideOverlap:!0,showMaxLabel:!0,formatter(p){return Qt(p,_e,Dt)},margin:4},min:he,max:me,scale:de,splitLine:{show:ue},axisLine:{show:U,onZero:!1},axisTick:{show:fe},boundaryGap:!1,z:2}):t(87,xt={type:H,min:R,max:W,splitLine:{show:B},axisLine:{show:x},axisTick:{show:ie},axisLabel:{show:se,hideOverlap:!0,showMaxLabel:H==="category"||H==="value",formatter:H==="time"||H==="category"?!1:function(p){return Qt(p,pe,ci)},margin:6},scale:!0,z:2}),z?t(88,ft={type:H,inverse:"true",splitLine:{show:B},axisLine:{show:x},axisTick:{show:ie},axisLabel:{show:se,hideOverlap:!0},scale:!0,min:R,max:W,z:2}):(t(88,ft={type:X,logBase:m,splitLine:{show:ue},axisLine:{show:U,onZero:!1},axisTick:{show:fe},axisLabel:{show:ce,hideOverlap:!0,margin:4,formatter(p){return Qt(p,_e,Dt)},color:g?Se==="true"?we?we[0]:jt[0]:Se!=="false"?Se:void 0:void 0},name:C,nameLocation:"end",nameTextStyle:{align:"left",verticalAlign:"top",padding:[0,5,0,0],color:g?Se==="true"?we?we[0]:jt[0]:Se!=="false"?Se:void 0:void 0},nameGap:6,min:he,max:me,scale:de,boundaryGap:["0%","1%"],z:2}),Ji={type:"value",show:!1,alignTicks:!0,splitLine:{show:be},axisLine:{show:De,onZero:!1},axisTick:{show:w},axisLabel:{show:Be,hideOverlap:!0,margin:4,formatter(p){return Qt(p,qe,Rt)},color:ze==="true"?we?we[$e]:jt[$e]:ze!=="false"?ze:void 0},name:Te,nameLocation:"end",nameTextStyle:{align:"right",verticalAlign:"top",padding:[0,0,0,5],color:ze==="true"?we?we[$e]:jt[$e]:ze!=="false"?ze:void 0},nameGap:6,min:Qe,max:st,scale:Pe,boundaryGap:["0%","1%"],z:2},t(88,ft=[ft,Ji])),Oe){if(t(42,Oe=Number(Oe)),isNaN(Oe))throw Error("chartAreaHeight must be a number");if(Oe<=0)throw Error("chartAreaHeight must be a positive number")}else t(42,Oe=180);t(91,zt=!!E),t(92,ut=!!V),t(93,hi=Ae*(T!==null||typeof c=="object"&&c.length>1)),t(94,gi=C!==""&&z),t(95,bi=Z!==""&&!z),t(96,_i=15),t(97,wi=13),t(98,ki=6*ut),t(99,Ci=zt*_i+ut*wi+ki*Math.max(zt,ut)),t(100,Si=10),t(101,Ti=8),t(102,Ai=14),t(103,Oi=14),t(104,ct=15),t(104,ct=ct*hi),t(105,Ft=7),t(105,Ft=Ft*Math.max(zt,ut)),t(106,It=Ci+Ft),t(107,Ht=It+ct+Oi*gi+Si),t(108,Wt=bi*Ai+Ti),t(112,Di=8),t(114,Ut=1),z&&(t(113,zi=mi.length),t(114,Ut=Math.max(1,zi/Di))),t(109,Li=Oe*Ut+Ht+Wt),t(110,Mi=It+ct+7),t(16,Ui=Li+"px"),t(14,Fi="100%"),t(111,mt=z?C:Z),mt!==""&&t(111,mt=mt+" →"),t(89,di={id:"horiz-axis-title",type:"text",style:{text:mt,textAlign:"right",fill:Me.grey500},cursor:"auto",right:z?"2%":"3%",top:z?Mi:null,bottom:z?null:"2%"}),t(90,yi={title:{text:E,subtext:V,subtextStyle:{width:Fi}},tooltip:{trigger:"axis",formatter(p){let gt,bt,_t,Xt;if(ji>1){bt=p[0].value[z?1:0],gt=`${nt(bt,pe)}`;for(let et=p.length-1;et>=0;et--)p[et].seriesName!=="stackTotal"&&(_t=p[et].value[z?0:1],gt=gt+`
${p[et].marker} ${p[et].seriesName} ${nt(_t,Fn(p[et].componentIndex,yt,Ei)===0?_e:qe)}`)}else H==="value"?(bt=p[0].value[z?1:0],_t=p[0].value[z?0:1],Xt=p[0].seriesName,gt=`${it(y,pe)}: ${nt(bt,pe)}
${it(Xt,_e)}: ${nt(_t,_e)}`):(bt=p[0].value[z?1:0],_t=p[0].value[z?0:1],Xt=p[0].seriesName,gt=`${nt(bt,pe)}
${it(Xt,_e)}: ${nt(_t,_e)}`);return gt},confine:!0,axisPointer:{type:"shadow"},extraCssText:'box-shadow: 0 3px 6px rgba(0,0,0,.15); box-shadow: 0 2px 4px rgba(0,0,0,.12); z-index: 1; font-feature-settings: "cv02", "tnum";',order:"valueDesc"},legend:{show:Ae,type:"scroll",top:It,padding:[0,0,0,0],data:[]},grid:{left:"0.5%",right:z?"4%":"3%",bottom:Wt,top:Ht,containLabel:!0},xAxis:xt,yAxis:ft,series:[],animation:!0,graphic:di,color:we}),a.update(()=>yi)}catch(yt){t(15,Vt=yt.message),console.error("\x1B[31m%s\x1B[0m",`Error in ${ne}: ${yt.message}`),s.update($e=>({...$e,error:Vt}))}n.$$.dirty[0]&1},ni(Mn,s),ni(Dn,a),[o,A,z,Xe,Ye,f,_,E,ne,St,Tt,At,Ot,Lt,Fi,Vt,Ui,i,a,y,c,H,Z,x,ie,B,se,J,N,C,U,fe,ue,ce,de,Te,De,w,be,Be,Pe,Ae,Oe,g,T,h,b,V,q,k,F,Q,R,W,X,m,he,me,ge,Se,Qe,st,Ue,ze,Ze,we,at,Ve,L,D,P,le,u,qt,ot,fi,Mt,je,ui,pe,_e,qe,Nt,ci,Dt,Rt,mi,xt,ft,di,yi,zt,ut,hi,gi,bi,_i,wi,ki,Ci,Si,Ti,Ai,Oi,ct,Ft,It,Ht,Wt,Li,Mi,mt,Di,zi,Ut,Je,dt,Ne,Et,Fe,Ii,ve,l,r]}class er extends He{constructor(e){super(),We(this,e,$l,vl,xe,{data:0,queryID:5,x:19,y:20,y2:43,series:44,size:45,tooltipTitle:46,showAllXAxisLabels:6,printEchartsConfig:1,swapXY:2,title:7,subtitle:47,chartType:8,bubble:48,hist:49,boxplot:50,xType:21,xAxisTitle:22,xBaseline:23,xTickMarks:24,xGridlines:25,xAxisLabels:26,sort:27,xFmt:51,xMin:52,xMax:53,yLog:28,yType:54,yLogBase:55,yAxisTitle:29,yBaseline:30,yTickMarks:31,yGridlines:32,yAxisLabels:33,yMin:56,yMax:57,yScale:34,yFmt:58,yAxisColor:59,y2AxisTitle:35,y2Baseline:36,y2TickMarks:37,y2Gridlines:38,y2AxisLabels:39,y2Min:60,y2Max:61,y2Scale:40,y2Fmt:62,y2AxisColor:63,sizeFmt:64,colorPalette:65,legend:41,echartsOptions:9,seriesOptions:10,seriesColors:11,stackType:66,stacked100:67,chartAreaHeight:42,renderer:12,downloadableData:3,downloadableImage:4,connectGroup:13},null,[-1,-1,-1,-1,-1])}}function tr(n){let e;const t=n[6].default,i=ri(t,n,n[7],null);return{c(){i&&i.c()},l(r){i&&i.l(r)},m(r,l){i&&i.m(r,l),e=!0},p(r,l){i&&i.p&&(!e||l&128)&&si(i,t,r,r[7],e?oi(t,r[7],l,null):ai(r[7]),null)},i(r){e||(O(i,r),e=!0)},o(r){I(i,r),e=!1},d(r){i&&i.d(r)}}}function ir(n){let e,t;const i=[n[4],{data:Ke.isQuery(n[10])?Array.from(n[10]):n[10]},{queryID:n[5]}];let r={$$slots:{default:[tr]},$$scope:{ctx:n}};for(let l=0;l({10:i}),({loaded:i})=>i?1024:0],empty:[nr],default:[ir,({loaded:i})=>({10:i}),({loaded:i})=>i?1024:0]},$$scope:{ctx:n}}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,[r]){const l={};r&1&&(l.data=i[0]),r&1182&&(l.$$scope={dirty:r,ctx:i}),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function sr(n,e,t){let i,{$$slots:r={},$$scope:l}=e,{data:s}=e;const a=Ke.isQuery(s)?s.hash:void 0;let o=(s==null?void 0:s.hash)===a,{emptySet:f=void 0}=e,{emptyMessage:y=void 0}=e,c=s==null?void 0:s.id;return n.$$set=g=>{t(9,e=pt(pt({},e),qi(g))),"data"in g&&t(0,s=g.data),"emptySet"in g&&t(1,f=g.emptySet),"emptyMessage"in g&&t(2,y=g.emptyMessage),"$$scope"in g&&t(7,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(3,o=(s==null?void 0:s.hash)===a),t(4,i={...Object.fromEntries(Object.entries(e).filter(([,g])=>g!==void 0))})},e=qi(e),[s,f,y,o,i,c,r,l]}class ar extends He{constructor(e){super(),We(this,e,sr,rr,xe,{data:0,emptySet:1,emptyMessage:2})}}function or(n,e,t,i,r,l,s,a,o,f,y=void 0,c=void 0,g=void 0){function T(k,F,P,H){let Z={name:F,data:k,yAxisIndex:P};return Z={...H,...Z},Z}let h,b,_,A=[],L,D,z,E,V;function ne(k,F){const P=[];function H(x){return typeof x>"u"}function Z(x,ie){H(x)||(Array.isArray(x)?x.forEach(B=>P.push([B,ie])):P.push([x,ie]))}return Z(k,0),Z(F,1),P}let q=ne(t,g);if(i!=null&&q.length===1)for(E=Bt(n,i),h=0;hk[i]===E[h]),r?L=D.map(k=>[k[q[0][0]],a?k[e].toString():k[e]]):L=D.map(k=>[a?k[e].toString():k[e],k[q[0][0]]]),y){let k=D.map(F=>F[y]);L.forEach((F,P)=>F.push(k[P]))}if(c){let k=D.map(F=>F[c]);L.forEach((F,P)=>F.push(k[P]))}z=E[h]??"null",V=q[0][1],_=T(L,z,V,l),A.push(_)}if(i!=null&&q.length>1)for(E=Bt(n,i),h=0;hk[i]===E[h]),b=0;b[k[q[b][0]],a?k[e].toString():k[e]]):L=D.map(k=>[a?k[e].toString():k[e],k[q[b][0]]]),y){let k=D.map(F=>F[y]);L.forEach((F,P)=>F.push(k[P]))}if(c){let k=D.map(F=>F[c]);L.forEach((F,P)=>F.push(k[P]))}z=(E[h]??"null")+" - "+o[q[b][0]].title,V=q[b][1],_=T(L,z,V,l),A.push(_)}if(i==null&&q.length>1)for(h=0;h[k[q[h][0]],a?k[e].toString():k[e]]):L=n.map(k=>[a?k[e].toString():k[e],k[q[h][0]]]),y){let k=n.map(F=>F[y]);L.forEach((F,P)=>F.push(k[P]))}if(c){let k=n.map(F=>F[c]);L.forEach((F,P)=>F.push(k[P]))}z=o[q[h][0]].title,V=q[h][1],_=T(L,z,V,l),A.push(_)}if(i==null&&q.length===1){if(r?L=n.map(k=>[k[q[0][0]],a?k[e].toString():k[e]]):L=n.map(k=>[a?k[e].toString():k[e],k[q[0][0]]]),y){let k=n.map(F=>F[y]);L.forEach((F,P)=>F.push(k[P]))}if(c){let k=n.map(F=>F[c]);L.forEach((F,P)=>F.push(k[P]))}z=o[q[0][0]].title,V=q[0][1],_=T(L,z,V,l),A.push(_)}return f&&A.sort((k,F)=>f.indexOf(k.name)-f.indexOf(F.name)),A}function fr(n){let e=[];for(let t=1;t=r&&(t=i=r):(t>r&&(t=r),iIn(t,i))/1e8;return e=Math.round((e+Number.EPSILON)*1e8)/1e8,e}function bn(n,e,t,i,r=!1,l=!1){var T;let s=!1;const a=n.map(h=>Object.assign({},h,{[e]:h[e]instanceof Date?(s=!0,h[e].toISOString()):h[e]})).filter(h=>h[e]!==void 0&&h[e]!==null),o=Array.from(a).reduce((h,b)=>(b[e]instanceof Date&&(b[e]=b[e].toISOString(),s=!0),i?(h[b[i]??"null"]||(h[b[i]??"null"]=[]),h[b[i]??"null"].push(b)):(h.default||(h.default=[]),h.default.push(b)),h),{}),f={};let y;const c=((T=a.find(h=>h&&h[e]!==null&&h[e]!==void 0))==null?void 0:T[e])??null;switch(typeof c){case"object":throw c===null?new Error(`Column '${e}' is entirely null. Column must contain at least one non-null value.`):new Error("Unexpected object property, expected string, date, or number");case"number":if(y=Bt(a,e),l){const h=mr(y);f[e]=cr(y,h)}break;case"string":y=Bt(a,e),f[e]=y;break}const g=[];for(const h of Object.values(o)){const b=i?{[i]:null}:{};if(r)if(t instanceof Array)for(let A=0;A({...h,[e]:new Date(h[e])})):g.flat()}function dr(n,e,t){let i,r,l,s,a,o,f,y,c,g,T,h,b,_,A=Pi(Mn);li(n,A,w=>t(41,_=w));let L=Pi(Dn),{y:D=void 0}=e;const z=!!D;let{y2:E=void 0}=e;const V=!!E;let{series:ne=void 0}=e;const q=!!ne;let{options:k=void 0}=e,{name:F=void 0}=e,{lineColor:P=void 0}=e,{lineWidth:H=2}=e,{lineType:Z="solid"}=e,{lineOpacity:x=void 0}=e,{markers:ie=!1}=e,{markerShape:B="circle"}=e,{markerSize:se=8}=e,{labels:J=!1}=e,{labelSize:Q=11}=e,{labelPosition:R="top"}=e,{labelColor:W=void 0}=e,{labelFmt:N=void 0}=e,X;N&&(X=Re(N));let{yLabelFmt:m=void 0}=e,C;m&&(C=Re(m));let{y2LabelFmt:U=void 0}=e,fe;U&&(fe=Re(U));let{y2SeriesType:ue=void 0}=e,{showAllLabels:ce=!1}=e,{handleMissing:he="gap"}=e,{step:me=!1}=e,{stepPosition:de="end"}=e,{seriesOrder:ge=void 0}=e;const Se={above:"top",below:"bottom",middle:"inside"},Te={above:"right",below:"left",middle:"inside"};let De=l?"right":"top";return Bn(()=>{L.update(w=>{if(l)w.yAxis={...w.yAxis,...b.xAxis},w.xAxis={...w.xAxis,...b.yAxis};else if(w.yAxis[0]={...w.yAxis[0],...b.yAxis},w.xAxis={...w.xAxis,...b.xAxis},E&&(w.yAxis[1]={...w.yAxis[1],show:!0},["line","bar","scatter"].includes(ue)))for(let be=0;be{"y"in w&&t(1,D=w.y),"y2"in w&&t(2,E=w.y2),"series"in w&&t(3,ne=w.series),"options"in w&&t(9,k=w.options),"name"in w&&t(4,F=w.name),"lineColor"in w&&t(10,P=w.lineColor),"lineWidth"in w&&t(11,H=w.lineWidth),"lineType"in w&&t(12,Z=w.lineType),"lineOpacity"in w&&t(13,x=w.lineOpacity),"markers"in w&&t(5,ie=w.markers),"markerShape"in w&&t(14,B=w.markerShape),"markerSize"in w&&t(15,se=w.markerSize),"labels"in w&&t(6,J=w.labels),"labelSize"in w&&t(16,Q=w.labelSize),"labelPosition"in w&&t(7,R=w.labelPosition),"labelColor"in w&&t(17,W=w.labelColor),"labelFmt"in w&&t(18,N=w.labelFmt),"yLabelFmt"in w&&t(19,m=w.yLabelFmt),"y2LabelFmt"in w&&t(20,U=w.y2LabelFmt),"y2SeriesType"in w&&t(21,ue=w.y2SeriesType),"showAllLabels"in w&&t(22,ce=w.showAllLabels),"handleMissing"in w&&t(23,he=w.handleMissing),"step"in w&&t(8,me=w.step),"stepPosition"in w&&t(24,de=w.stepPosition),"seriesOrder"in w&&t(25,ge=w.seriesOrder)},n.$$.update=()=>{if(n.$$.dirty[0]&32&&t(5,ie=ie==="true"||ie===!0),n.$$.dirty[0]&64&&t(6,J=J==="true"||J===!0),n.$$.dirty[0]&256&&t(8,me=me==="true"||me===!0),n.$$.dirty[1]&1024&&t(38,i=_.data),n.$$.dirty[1]&1024&&t(37,r=_.x),n.$$.dirty[0]&2|n.$$.dirty[1]&1024&&t(1,D=z?D:_.y),n.$$.dirty[0]&4|n.$$.dirty[1]&1024&&t(2,E=V?E:_.y2),n.$$.dirty[1]&1024&&t(31,l=_.swapXY),n.$$.dirty[1]&1024&&t(40,s=_.yFormat),n.$$.dirty[1]&1024&&t(39,a=_.y2Format),n.$$.dirty[1]&1024&&t(29,o=_.yCount),n.$$.dirty[1]&1024&&t(30,f=_.y2Count),n.$$.dirty[1]&1024&&t(32,y=_.xType),n.$$.dirty[1]&1024&&t(35,c=_.xMismatch),n.$$.dirty[1]&1024&&t(34,g=_.columnSummary),n.$$.dirty[0]&8|n.$$.dirty[1]&1024&&t(3,ne=q?ne:_.series),n.$$.dirty[0]&26|n.$$.dirty[1]&200)if(!ne&&typeof D!="object")t(4,F=F??it(D,g[D].title));else try{t(38,i=bn(i,r,D,ne))}catch(w){console.warn("Failed to complete data",{e:w}),t(38,i=[])}if(n.$$.dirty[0]&8388618|n.$$.dirty[1]&192&&he==="zero")try{t(38,i=bn(i,r,D,ne,!0))}catch(w){console.warn("Failed to complete data",{e:w}),t(38,i=[])}n.$$.dirty[0]&128|n.$$.dirty[1]&1&&t(7,R=(l?Te[R]:Se[R])??De),n.$$.dirty[0]&2109996512|n.$$.dirty[1]&769&&t(36,T={type:"line",label:{show:J,formatter(w){return w.value[l?0:1]===0?"":nt(w.value[l?0:1],[C??X??s,fe??X??a][Fn(w.componentIndex,o,f)])},fontSize:Q,color:W,position:R,padding:3},labelLayout:{hideOverlap:!ce},connectNulls:he==="connect",emphasis:{focus:"series",endLabel:{show:!1},lineStyle:{opacity:1,width:3}},lineStyle:{width:parseInt(H),type:Z,opacity:x},itemStyle:{color:P,opacity:x},showSymbol:J||ie,symbol:B,symbolSize:J&&!ie?0:se,step:me?de:!1}),n.$$.dirty[0]&33554462|n.$$.dirty[1]&249&&t(33,h=or(i,r,D,ne,l,T,F,c,g,ge,void 0,void 0,E)),n.$$.dirty[1]&4&&L.update(w=>(w.series.push(...h),w.legend.data.push(...h.map(be=>be.name.toString())),w)),n.$$.dirty[0]&512&&k&&L.update(w=>({...w,...k})),n.$$.dirty[1]&2&&(b={yAxis:{boundaryGap:["0%","1%"]},xAxis:{boundaryGap:[y==="time"?"2%":"0%","2%"]}})},[A,D,E,ne,F,ie,J,R,me,k,P,H,Z,x,B,se,Q,W,N,m,U,ue,ce,he,de,ge,X,C,fe,o,f,l,y,h,g,c,T,r,i,a,s,_]}class yr extends He{constructor(e){super(),We(this,e,dr,null,xe,{y:1,y2:2,series:3,options:9,name:4,lineColor:10,lineWidth:11,lineType:12,lineOpacity:13,markers:5,markerShape:14,markerSize:15,labels:6,labelSize:16,labelPosition:7,labelColor:17,labelFmt:18,yLabelFmt:19,y2LabelFmt:20,y2SeriesType:21,showAllLabels:22,handleMissing:23,step:8,stepPosition:24,seriesOrder:25},null,[-1,-1])}}function hr(n){let e,t,i;e=new yr({props:{lineColor:n[36],lineWidth:n[39],lineOpacity:n[38],lineType:n[37],markers:n[41],markerShape:n[42],markerSize:n[43],handleMissing:n[44],step:n[45],stepPosition:n[46],labels:n[49],labelSize:n[50],labelPosition:n[51],labelColor:n[52],labelFmt:n[53],yLabelFmt:n[54],y2LabelFmt:n[55],showAllLabels:n[56],y2SeriesType:n[8],seriesOrder:n[68]}});const r=n[70].default,l=ri(r,n,n[71],null);return{c(){v(e.$$.fragment),t=Y(),l&&l.c()},l(s){$(e.$$.fragment,s),t=K(s),l&&l.l(s)},m(s,a){ee(e,s,a),j(s,t,a),l&&l.m(s,a),i=!0},p(s,a){const o={};a[1]&32&&(o.lineColor=s[36]),a[1]&256&&(o.lineWidth=s[39]),a[1]&128&&(o.lineOpacity=s[38]),a[1]&64&&(o.lineType=s[37]),a[1]&1024&&(o.markers=s[41]),a[1]&2048&&(o.markerShape=s[42]),a[1]&4096&&(o.markerSize=s[43]),a[1]&8192&&(o.handleMissing=s[44]),a[1]&16384&&(o.step=s[45]),a[1]&32768&&(o.stepPosition=s[46]),a[1]&262144&&(o.labels=s[49]),a[1]&524288&&(o.labelSize=s[50]),a[1]&1048576&&(o.labelPosition=s[51]),a[1]&2097152&&(o.labelColor=s[52]),a[1]&4194304&&(o.labelFmt=s[53]),a[1]&8388608&&(o.yLabelFmt=s[54]),a[1]&16777216&&(o.y2LabelFmt=s[55]),a[1]&33554432&&(o.showAllLabels=s[56]),a[0]&256&&(o.y2SeriesType=s[8]),a[2]&64&&(o.seriesOrder=s[68]),e.$set(o),l&&l.p&&(!i||a[2]&512)&&si(l,r,s,s[71],i?oi(r,s[71],a,null):ai(s[71]),null)},i(s){i||(O(e.$$.fragment,s),O(l,s),i=!0)},o(s){I(e.$$.fragment,s),I(l,s),i=!1},d(s){s&&S(t),te(e,s),l&&l.d(s)}}}function gr(n){let e,t;return e=new ar({props:{data:n[0],x:n[1],y:n[2],y2:n[3],xFmt:n[10],yFmt:n[9],y2Fmt:n[11],series:n[4],xType:n[5],yLog:n[6],yLogBase:n[7],legend:n[14],xAxisTitle:n[15],yAxisTitle:n[16],y2AxisTitle:n[17],xGridlines:n[18],yGridlines:n[19],y2Gridlines:n[20],xAxisLabels:n[21],yAxisLabels:n[22],y2AxisLabels:n[23],xBaseline:n[24],yBaseline:n[25],y2Baseline:n[26],xTickMarks:n[27],yTickMarks:n[28],y2TickMarks:n[29],yAxisColor:n[57],y2AxisColor:n[58],yMin:n[30],yMax:n[31],yScale:n[32],y2Min:n[33],y2Max:n[34],y2Scale:n[35],title:n[12],subtitle:n[13],chartType:"Line Chart",sort:n[47],chartAreaHeight:n[40],colorPalette:n[48],echartsOptions:n[59],seriesOptions:n[60],printEchartsConfig:n[61],emptySet:n[62],emptyMessage:n[63],renderer:n[64],downloadableData:n[65],downloadableImage:n[66],connectGroup:n[69],seriesColors:n[67],$$slots:{default:[hr]},$$scope:{ctx:n}}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,r){const l={};r[0]&1&&(l.data=i[0]),r[0]&2&&(l.x=i[1]),r[0]&4&&(l.y=i[2]),r[0]&8&&(l.y2=i[3]),r[0]&1024&&(l.xFmt=i[10]),r[0]&512&&(l.yFmt=i[9]),r[0]&2048&&(l.y2Fmt=i[11]),r[0]&16&&(l.series=i[4]),r[0]&32&&(l.xType=i[5]),r[0]&64&&(l.yLog=i[6]),r[0]&128&&(l.yLogBase=i[7]),r[0]&16384&&(l.legend=i[14]),r[0]&32768&&(l.xAxisTitle=i[15]),r[0]&65536&&(l.yAxisTitle=i[16]),r[0]&131072&&(l.y2AxisTitle=i[17]),r[0]&262144&&(l.xGridlines=i[18]),r[0]&524288&&(l.yGridlines=i[19]),r[0]&1048576&&(l.y2Gridlines=i[20]),r[0]&2097152&&(l.xAxisLabels=i[21]),r[0]&4194304&&(l.yAxisLabels=i[22]),r[0]&8388608&&(l.y2AxisLabels=i[23]),r[0]&16777216&&(l.xBaseline=i[24]),r[0]&33554432&&(l.yBaseline=i[25]),r[0]&67108864&&(l.y2Baseline=i[26]),r[0]&134217728&&(l.xTickMarks=i[27]),r[0]&268435456&&(l.yTickMarks=i[28]),r[0]&536870912&&(l.y2TickMarks=i[29]),r[1]&67108864&&(l.yAxisColor=i[57]),r[1]&134217728&&(l.y2AxisColor=i[58]),r[0]&1073741824&&(l.yMin=i[30]),r[1]&1&&(l.yMax=i[31]),r[1]&2&&(l.yScale=i[32]),r[1]&4&&(l.y2Min=i[33]),r[1]&8&&(l.y2Max=i[34]),r[1]&16&&(l.y2Scale=i[35]),r[0]&4096&&(l.title=i[12]),r[0]&8192&&(l.subtitle=i[13]),r[1]&65536&&(l.sort=i[47]),r[1]&512&&(l.chartAreaHeight=i[40]),r[1]&131072&&(l.colorPalette=i[48]),r[1]&268435456&&(l.echartsOptions=i[59]),r[1]&536870912&&(l.seriesOptions=i[60]),r[1]&1073741824&&(l.printEchartsConfig=i[61]),r[2]&1&&(l.emptySet=i[62]),r[2]&2&&(l.emptyMessage=i[63]),r[2]&4&&(l.renderer=i[64]),r[2]&8&&(l.downloadableData=i[65]),r[2]&16&&(l.downloadableImage=i[66]),r[2]&128&&(l.connectGroup=i[69]),r[2]&32&&(l.seriesColors=i[67]),r[0]&256|r[1]&66911712|r[2]&576&&(l.$$scope={dirty:r,ctx:i}),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function br(n,e,t){let{$$slots:i={},$$scope:r}=e,{data:l=void 0}=e,{x:s=void 0}=e,{y:a=void 0}=e,{y2:o=void 0}=e,{series:f=void 0}=e,{xType:y=void 0}=e,{yLog:c=void 0}=e,{yLogBase:g=void 0}=e,{y2SeriesType:T=void 0}=e,{yFmt:h=void 0}=e,{xFmt:b=void 0}=e,{y2Fmt:_=void 0}=e,{title:A=void 0}=e,{subtitle:L=void 0}=e,{legend:D=void 0}=e,{xAxisTitle:z=void 0}=e,{yAxisTitle:E=o?"true":void 0}=e,{y2AxisTitle:V=o?"true":void 0}=e,{xGridlines:ne=void 0}=e,{yGridlines:q=void 0}=e,{y2Gridlines:k=void 0}=e,{xAxisLabels:F=void 0}=e,{yAxisLabels:P=void 0}=e,{y2AxisLabels:H=void 0}=e,{xBaseline:Z=void 0}=e,{yBaseline:x=void 0}=e,{y2Baseline:ie=void 0}=e,{xTickMarks:B=void 0}=e,{yTickMarks:se=void 0}=e,{y2TickMarks:J=void 0}=e,{yMin:Q=void 0}=e,{yMax:R=void 0}=e,{yScale:W=void 0}=e,{y2Min:N=void 0}=e,{y2Max:X=void 0}=e,{y2Scale:m=void 0}=e,{lineColor:C=void 0}=e,{lineType:U=void 0}=e,{lineOpacity:fe=void 0}=e,{lineWidth:ue=void 0}=e,{chartAreaHeight:ce=void 0}=e,{markers:he=void 0}=e,{markerShape:me=void 0}=e,{markerSize:de=void 0}=e,{handleMissing:ge=void 0}=e,{step:Se=void 0}=e,{stepPosition:Te=void 0}=e,{sort:De=void 0}=e,{colorPalette:w=void 0}=e,{labels:be=void 0}=e,{labelSize:Be=void 0}=e,{labelPosition:Qe=void 0}=e,{labelColor:st=void 0}=e,{labelFmt:Pe=void 0}=e,{yLabelFmt:Ue=void 0}=e,{y2LabelFmt:ze=void 0}=e,{showAllLabels:Ze=void 0}=e,{yAxisColor:we=void 0}=e,{y2AxisColor:Ae=void 0}=e,{echartsOptions:St=void 0}=e,{seriesOptions:Tt=void 0}=e,{printEchartsConfig:At=!1}=e,{emptySet:at=void 0}=e,{emptyMessage:Ve=void 0}=e,{renderer:Oe=void 0}=e,{downloadableData:Ot=void 0}=e,{downloadableImage:Xe=void 0}=e,{seriesColors:Ye=void 0}=e,{seriesOrder:Lt=void 0}=e,{connectGroup:le=void 0}=e;return n.$$set=u=>{"data"in u&&t(0,l=u.data),"x"in u&&t(1,s=u.x),"y"in u&&t(2,a=u.y),"y2"in u&&t(3,o=u.y2),"series"in u&&t(4,f=u.series),"xType"in u&&t(5,y=u.xType),"yLog"in u&&t(6,c=u.yLog),"yLogBase"in u&&t(7,g=u.yLogBase),"y2SeriesType"in u&&t(8,T=u.y2SeriesType),"yFmt"in u&&t(9,h=u.yFmt),"xFmt"in u&&t(10,b=u.xFmt),"y2Fmt"in u&&t(11,_=u.y2Fmt),"title"in u&&t(12,A=u.title),"subtitle"in u&&t(13,L=u.subtitle),"legend"in u&&t(14,D=u.legend),"xAxisTitle"in u&&t(15,z=u.xAxisTitle),"yAxisTitle"in u&&t(16,E=u.yAxisTitle),"y2AxisTitle"in u&&t(17,V=u.y2AxisTitle),"xGridlines"in u&&t(18,ne=u.xGridlines),"yGridlines"in u&&t(19,q=u.yGridlines),"y2Gridlines"in u&&t(20,k=u.y2Gridlines),"xAxisLabels"in u&&t(21,F=u.xAxisLabels),"yAxisLabels"in u&&t(22,P=u.yAxisLabels),"y2AxisLabels"in u&&t(23,H=u.y2AxisLabels),"xBaseline"in u&&t(24,Z=u.xBaseline),"yBaseline"in u&&t(25,x=u.yBaseline),"y2Baseline"in u&&t(26,ie=u.y2Baseline),"xTickMarks"in u&&t(27,B=u.xTickMarks),"yTickMarks"in u&&t(28,se=u.yTickMarks),"y2TickMarks"in u&&t(29,J=u.y2TickMarks),"yMin"in u&&t(30,Q=u.yMin),"yMax"in u&&t(31,R=u.yMax),"yScale"in u&&t(32,W=u.yScale),"y2Min"in u&&t(33,N=u.y2Min),"y2Max"in u&&t(34,X=u.y2Max),"y2Scale"in u&&t(35,m=u.y2Scale),"lineColor"in u&&t(36,C=u.lineColor),"lineType"in u&&t(37,U=u.lineType),"lineOpacity"in u&&t(38,fe=u.lineOpacity),"lineWidth"in u&&t(39,ue=u.lineWidth),"chartAreaHeight"in u&&t(40,ce=u.chartAreaHeight),"markers"in u&&t(41,he=u.markers),"markerShape"in u&&t(42,me=u.markerShape),"markerSize"in u&&t(43,de=u.markerSize),"handleMissing"in u&&t(44,ge=u.handleMissing),"step"in u&&t(45,Se=u.step),"stepPosition"in u&&t(46,Te=u.stepPosition),"sort"in u&&t(47,De=u.sort),"colorPalette"in u&&t(48,w=u.colorPalette),"labels"in u&&t(49,be=u.labels),"labelSize"in u&&t(50,Be=u.labelSize),"labelPosition"in u&&t(51,Qe=u.labelPosition),"labelColor"in u&&t(52,st=u.labelColor),"labelFmt"in u&&t(53,Pe=u.labelFmt),"yLabelFmt"in u&&t(54,Ue=u.yLabelFmt),"y2LabelFmt"in u&&t(55,ze=u.y2LabelFmt),"showAllLabels"in u&&t(56,Ze=u.showAllLabels),"yAxisColor"in u&&t(57,we=u.yAxisColor),"y2AxisColor"in u&&t(58,Ae=u.y2AxisColor),"echartsOptions"in u&&t(59,St=u.echartsOptions),"seriesOptions"in u&&t(60,Tt=u.seriesOptions),"printEchartsConfig"in u&&t(61,At=u.printEchartsConfig),"emptySet"in u&&t(62,at=u.emptySet),"emptyMessage"in u&&t(63,Ve=u.emptyMessage),"renderer"in u&&t(64,Oe=u.renderer),"downloadableData"in u&&t(65,Ot=u.downloadableData),"downloadableImage"in u&&t(66,Xe=u.downloadableImage),"seriesColors"in u&&t(67,Ye=u.seriesColors),"seriesOrder"in u&&t(68,Lt=u.seriesOrder),"connectGroup"in u&&t(69,le=u.connectGroup),"$$scope"in u&&t(71,r=u.$$scope)},[l,s,a,o,f,y,c,g,T,h,b,_,A,L,D,z,E,V,ne,q,k,F,P,H,Z,x,ie,B,se,J,Q,R,W,N,X,m,C,U,fe,ue,ce,he,me,de,ge,Se,Te,De,w,be,Be,Qe,st,Pe,Ue,ze,Ze,we,Ae,St,Tt,At,at,Ve,Oe,Ot,Xe,Ye,Lt,le,i,r]}class ii extends He{constructor(e){super(),We(this,e,br,gr,xe,{data:0,x:1,y:2,y2:3,series:4,xType:5,yLog:6,yLogBase:7,y2SeriesType:8,yFmt:9,xFmt:10,y2Fmt:11,title:12,subtitle:13,legend:14,xAxisTitle:15,yAxisTitle:16,y2AxisTitle:17,xGridlines:18,yGridlines:19,y2Gridlines:20,xAxisLabels:21,yAxisLabels:22,y2AxisLabels:23,xBaseline:24,yBaseline:25,y2Baseline:26,xTickMarks:27,yTickMarks:28,y2TickMarks:29,yMin:30,yMax:31,yScale:32,y2Min:33,y2Max:34,y2Scale:35,lineColor:36,lineType:37,lineOpacity:38,lineWidth:39,chartAreaHeight:40,markers:41,markerShape:42,markerSize:43,handleMissing:44,step:45,stepPosition:46,sort:47,colorPalette:48,labels:49,labelSize:50,labelPosition:51,labelColor:52,labelFmt:53,yLabelFmt:54,y2LabelFmt:55,showAllLabels:56,yAxisColor:57,y2AxisColor:58,echartsOptions:59,seriesOptions:60,printEchartsConfig:61,emptySet:62,emptyMessage:63,renderer:64,downloadableData:65,downloadableImage:66,seriesColors:67,seriesOrder:68,connectGroup:69},null,[-1,-1,-1])}}function _r(n){let e,t=re.title+"",i;return{c(){e=ae("h1"),i=An(t),this.h()},l(r){e=oe(r,"H1",{class:!0});var l=ye(e);i=On(l,t),l.forEach(S),this.h()},h(){G(e,"class","title")},m(r,l){j(r,e,l),ke(e,i)},p:Le,d(r){r&&S(e)}}}function wr(n){return{c(){this.h()},l(e){this.h()},h(){document.title="Evidence"},m:Le,p:Le,d:Le}}function kr(n){let e,t,i,r,l;return document.title=e=re.title,{c(){t=Y(),i=ae("meta"),r=Y(),l=ae("meta"),this.h()},l(s){t=K(s),i=oe(s,"META",{property:!0,content:!0}),r=K(s),l=oe(s,"META",{name:!0,content:!0}),this.h()},h(){var s,a;G(i,"property","og:title"),G(i,"content",((s=re.og)==null?void 0:s.title)??re.title),G(l,"name","twitter:title"),G(l,"content",((a=re.og)==null?void 0:a.title)??re.title)},m(s,a){j(s,t,a),j(s,i,a),j(s,r,a),j(s,l,a)},p(s,a){a&0&&e!==(e=re.title)&&(document.title=e)},d(s){s&&(S(t),S(i),S(r),S(l))}}}function Cr(n){var l,s;let e,t,i=(re.description||((l=re.og)==null?void 0:l.description))&&Sr(),r=((s=re.og)==null?void 0:s.image)&&Tr();return{c(){i&&i.c(),e=Y(),r&&r.c(),t=Ce()},l(a){i&&i.l(a),e=K(a),r&&r.l(a),t=Ce()},m(a,o){i&&i.m(a,o),j(a,e,o),r&&r.m(a,o),j(a,t,o)},p(a,o){var f,y;(re.description||(f=re.og)!=null&&f.description)&&i.p(a,o),(y=re.og)!=null&&y.image&&r.p(a,o)},d(a){a&&(S(e),S(t)),i&&i.d(a),r&&r.d(a)}}}function Sr(n){let e,t,i,r,l;return{c(){e=ae("meta"),t=Y(),i=ae("meta"),r=Y(),l=ae("meta"),this.h()},l(s){e=oe(s,"META",{name:!0,content:!0}),t=K(s),i=oe(s,"META",{property:!0,content:!0}),r=K(s),l=oe(s,"META",{name:!0,content:!0}),this.h()},h(){var s,a,o;G(e,"name","description"),G(e,"content",re.description??((s=re.og)==null?void 0:s.description)),G(i,"property","og:description"),G(i,"content",((a=re.og)==null?void 0:a.description)??re.description),G(l,"name","twitter:description"),G(l,"content",((o=re.og)==null?void 0:o.description)??re.description)},m(s,a){j(s,e,a),j(s,t,a),j(s,i,a),j(s,r,a),j(s,l,a)},p:Le,d(s){s&&(S(e),S(t),S(i),S(r),S(l))}}}function Tr(n){let e,t,i;return{c(){e=ae("meta"),t=Y(),i=ae("meta"),this.h()},l(r){e=oe(r,"META",{property:!0,content:!0}),t=K(r),i=oe(r,"META",{name:!0,content:!0}),this.h()},h(){var r,l;G(e,"property","og:image"),G(e,"content",nn((r=re.og)==null?void 0:r.image)),G(i,"name","twitter:image"),G(i,"content",nn((l=re.og)==null?void 0:l.image))},m(r,l){j(r,e,l),j(r,t,l),j(r,i,l)},p:Le,d(r){r&&(S(e),S(t),S(i))}}}function _n(n){let e,t;return e=new Pt({props:{queryID:"date_range",queryResult:n[0]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,r){const l={};r[0]&1&&(l.queryResult=i[0]),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function wn(n){let e,t;return e=new Pt({props:{queryID:"aggregate_stats",queryResult:n[1]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,r){const l={};r[0]&2&&(l.queryResult=i[1]),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function kn(n){let e,t;return e=new Pt({props:{queryID:"fares_by_day",queryResult:n[2]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,r){const l={};r[0]&4&&(l.queryResult=i[2]),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Ar(n){let e,t,i,r,l,s,a,o;return e=new ii({props:{title:"Rides by Day",data:n[2],x:"day",y:"rides"}}),i=new ii({props:{title:"Fare Amount by Day",data:n[2],x:"day",y:"fare_amount",yFmt:"usd1m"}}),l=new ii({props:{title:"Trip Distance by Day",data:n[2],x:"day",y:"trip_distance"}}),a=new ii({props:{title:"Fare per Mile by Day",data:n[2],x:"day",y:"fare_per_mile"}}),{c(){v(e.$$.fragment),t=Y(),v(i.$$.fragment),r=Y(),v(l.$$.fragment),s=Y(),v(a.$$.fragment)},l(f){$(e.$$.fragment,f),t=K(f),$(i.$$.fragment,f),r=K(f),$(l.$$.fragment,f),s=K(f),$(a.$$.fragment,f)},m(f,y){ee(e,f,y),j(f,t,y),ee(i,f,y),j(f,r,y),ee(l,f,y),j(f,s,y),ee(a,f,y),o=!0},p(f,y){const c={};y[0]&4&&(c.data=f[2]),e.$set(c);const g={};y[0]&4&&(g.data=f[2]),i.$set(g);const T={};y[0]&4&&(T.data=f[2]),l.$set(T);const h={};y[0]&4&&(h.data=f[2]),a.$set(h)},i(f){o||(O(e.$$.fragment,f),O(i.$$.fragment,f),O(l.$$.fragment,f),O(a.$$.fragment,f),o=!0)},o(f){I(e.$$.fragment,f),I(i.$$.fragment,f),I(l.$$.fragment,f),I(a.$$.fragment,f),o=!1},d(f){f&&(S(t),S(r),S(s)),te(e,f),te(i,f),te(l,f),te(a,f)}}}function Cn(n){let e,t;return e=new Pt({props:{queryID:"fares_by_pickup_location",queryResult:n[3]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,r){const l={};r[0]&8&&(l.queryResult=i[3]),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Sn(n){let e,t;return e=new Pt({props:{queryID:"fares_by_pickup_borough",queryResult:n[4]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,r){ee(e,i,r),t=!0},p(i,r){const l={};r[0]&16&&(l.queryResult=i[4]),e.$set(l)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Or(n){let e,t,i,r,l,s,a,o;return e=new Zt({props:{id:"borough"}}),i=new Zt({props:{id:"rides",fmt:"num0"}}),l=new Zt({props:{id:"fare_amount",fmt:"usd1m"}}),a=new Zt({props:{id:"trip_distance",fmt:"num0"}}),{c(){v(e.$$.fragment),t=Y(),v(i.$$.fragment),r=Y(),v(l.$$.fragment),s=Y(),v(a.$$.fragment)},l(f){$(e.$$.fragment,f),t=K(f),$(i.$$.fragment,f),r=K(f),$(l.$$.fragment,f),s=K(f),$(a.$$.fragment,f)},m(f,y){ee(e,f,y),j(f,t,y),ee(i,f,y),j(f,r,y),ee(l,f,y),j(f,s,y),ee(a,f,y),o=!0},p:Le,i(f){o||(O(e.$$.fragment,f),O(i.$$.fragment,f),O(l.$$.fragment,f),O(a.$$.fragment,f),o=!0)},o(f){I(e.$$.fragment,f),I(i.$$.fragment,f),I(l.$$.fragment,f),I(a.$$.fragment,f),o=!1},d(f){f&&(S(t),S(r),S(s)),te(e,f),te(i,f),te(l,f),te(a,f)}}}function Lr(n){let e,t,i,r,l,s,a,o="This is an exploration of NYC taxi data in 2022. It includes a summary of the data, rides by day, and rides by pickup location.",f,y,c,g,T,h,b,_,A,L,D,z,E,V,ne,q,k,F,P,H,Z,x=typeof re<"u"&&re.title&&re.hide_title!==!0&&_r();function ie(m,C){return typeof re<"u"&&re.title?kr:wr}let se=ie()(n),J=typeof re=="object"&&Cr(),Q=n[0]&&_n(n);y=new al({props:{name:"date_range",data:n[0],dates:"day"}});let R=n[1]&&wn(n);T=new Jt({props:{data:n[1],value:"rides",fmt:"num0"}}),b=new Jt({props:{data:n[1],value:"fare_amount",fmt:"usd1m"}}),A=new Jt({props:{data:n[1],value:"trip_distance",fmt:'#,##0 "mi"'}}),D=new Jt({props:{data:n[1],value:"fare_per_mile",fmt:"usd2"}});let W=n[2]&&kn(n);V=new _l({props:{$$slots:{default:[Ar]},$$scope:{ctx:n}}});let N=n[3]&&Cn(n);k=new ol({props:{data:n[3],geoJsonUrl:"/taxi_zones.geojson",geoId:"objectid",areaCol:"pickup_location_id",value:"rides",valueFmt:"num0",title:"Rides by Pickup Location",labelCol:"zone",tooltip:[{id:"zone",showColumnName:!1,valueClass:"text-xl font-semibold"},{id:"borough",showColumnName:!1,valueClass:"text-sm text-gray-500"},{id:"rides",fmt:"num0",fieldClass:"text-[grey]",valueClass:"text-[green]"},{id:"fare_amount",fmt:"usd",fieldClass:"text-[grey]",valueClass:"text-[green]"},{id:"trip_distance",fmt:"num0",fieldClass:"text-[grey]",valueClass:"text-[green]"}]}});let X=n[4]&&Sn(n);return H=new el({props:{data:n[4],link:"borough_link",$$slots:{default:[Or]},$$scope:{ctx:n}}}),{c(){x&&x.c(),e=Y(),se.c(),t=ae("meta"),i=ae("meta"),J&&J.c(),r=Ce(),l=Y(),Q&&Q.c(),s=Y(),a=ae("p"),a.textContent=o,f=Y(),v(y.$$.fragment),c=Y(),R&&R.c(),g=Y(),v(T.$$.fragment),h=Y(),v(b.$$.fragment),_=Y(),v(A.$$.fragment),L=Y(),v(D.$$.fragment),z=Y(),W&&W.c(),E=Y(),v(V.$$.fragment),ne=Y(),N&&N.c(),q=Y(),v(k.$$.fragment),F=Y(),X&&X.c(),P=Y(),v(H.$$.fragment),this.h()},l(m){x&&x.l(m),e=K(m);const C=Pn("svelte-6lktun",document.head);se.l(C),t=oe(C,"META",{name:!0,content:!0}),i=oe(C,"META",{name:!0,content:!0}),J&&J.l(C),r=Ce(),C.forEach(S),l=K(m),Q&&Q.l(m),s=K(m),a=oe(m,"P",{class:!0,"data-svelte-h":!0}),Tn(a)!=="svelte-1oqfwol"&&(a.textContent=o),f=K(m),$(y.$$.fragment,m),c=K(m),R&&R.l(m),g=K(m),$(T.$$.fragment,m),h=K(m),$(b.$$.fragment,m),_=K(m),$(A.$$.fragment,m),L=K(m),$(D.$$.fragment,m),z=K(m),W&&W.l(m),E=K(m),$(V.$$.fragment,m),ne=K(m),N&&N.l(m),q=K(m),$(k.$$.fragment,m),F=K(m),X&&X.l(m),P=K(m),$(H.$$.fragment,m),this.h()},h(){G(t,"name","twitter:card"),G(t,"content","summary"),G(i,"name","twitter:site"),G(i,"content","@evidence_dev"),G(a,"class","markdown")},m(m,C){x&&x.m(m,C),j(m,e,C),se.m(document.head,null),ke(document.head,t),ke(document.head,i),J&&J.m(document.head,null),ke(document.head,r),j(m,l,C),Q&&Q.m(m,C),j(m,s,C),j(m,a,C),j(m,f,C),ee(y,m,C),j(m,c,C),R&&R.m(m,C),j(m,g,C),ee(T,m,C),j(m,h,C),ee(b,m,C),j(m,_,C),ee(A,m,C),j(m,L,C),ee(D,m,C),j(m,z,C),W&&W.m(m,C),j(m,E,C),ee(V,m,C),j(m,ne,C),N&&N.m(m,C),j(m,q,C),ee(k,m,C),j(m,F,C),X&&X.m(m,C),j(m,P,C),ee(H,m,C),Z=!0},p(m,C){typeof re<"u"&&re.title&&re.hide_title!==!0&&x.p(m,C),se.p(m,C),typeof re=="object"&&J.p(m,C),m[0]?Q?(Q.p(m,C),C[0]&1&&O(Q,1)):(Q=_n(m),Q.c(),O(Q,1),Q.m(s.parentNode,s)):Q&&(Ie(),I(Q,1,1,()=>{Q=null}),Ee());const U={};C[0]&1&&(U.data=m[0]),y.$set(U),m[1]?R?(R.p(m,C),C[0]&2&&O(R,1)):(R=wn(m),R.c(),O(R,1),R.m(g.parentNode,g)):R&&(Ie(),I(R,1,1,()=>{R=null}),Ee());const fe={};C[0]&2&&(fe.data=m[1]),T.$set(fe);const ue={};C[0]&2&&(ue.data=m[1]),b.$set(ue);const ce={};C[0]&2&&(ce.data=m[1]),A.$set(ce);const he={};C[0]&2&&(he.data=m[1]),D.$set(he),m[2]?W?(W.p(m,C),C[0]&4&&O(W,1)):(W=kn(m),W.c(),O(W,1),W.m(E.parentNode,E)):W&&(Ie(),I(W,1,1,()=>{W=null}),Ee());const me={};C[0]&4|C[1]&2048&&(me.$$scope={dirty:C,ctx:m}),V.$set(me),m[3]?N?(N.p(m,C),C[0]&8&&O(N,1)):(N=Cn(m),N.c(),O(N,1),N.m(q.parentNode,q)):N&&(Ie(),I(N,1,1,()=>{N=null}),Ee());const de={};C[0]&8&&(de.data=m[3]),k.$set(de),m[4]?X?(X.p(m,C),C[0]&16&&O(X,1)):(X=Sn(m),X.c(),O(X,1),X.m(P.parentNode,P)):X&&(Ie(),I(X,1,1,()=>{X=null}),Ee());const ge={};C[0]&16&&(ge.data=m[4]),C[1]&2048&&(ge.$$scope={dirty:C,ctx:m}),H.$set(ge)},i(m){Z||(O(Q),O(y.$$.fragment,m),O(R),O(T.$$.fragment,m),O(b.$$.fragment,m),O(A.$$.fragment,m),O(D.$$.fragment,m),O(W),O(V.$$.fragment,m),O(N),O(k.$$.fragment,m),O(X),O(H.$$.fragment,m),Z=!0)},o(m){I(Q),I(y.$$.fragment,m),I(R),I(T.$$.fragment,m),I(b.$$.fragment,m),I(A.$$.fragment,m),I(D.$$.fragment,m),I(W),I(V.$$.fragment,m),I(N),I(k.$$.fragment,m),I(X),I(H.$$.fragment,m),Z=!1},d(m){m&&(S(e),S(l),S(s),S(a),S(f),S(c),S(g),S(h),S(_),S(L),S(z),S(E),S(ne),S(q),S(F),S(P)),x&&x.d(m),se.d(m),S(t),S(i),J&&J.d(m),S(r),Q&&Q.d(m),te(y,m),R&&R.d(m),te(T,m),te(b,m),te(A,m),te(D,m),W&&W.d(m),te(V,m),N&&N.d(m),te(k,m),X&&X.d(m),te(H,m)}}}const re={title:"NYC Taxi Data 2022",sidebar:"never"};function Mr(n,e,t){let i,r;li(n,sl,U=>t(28,i=U)),li(n,ln,U=>t(33,r=U));let{data:l}=e,{data:s={},customFormattingSettings:a,__db:o,inputs:f}=l;qn(ln,r="6666cd76f96956469e7be39d750cc7d9",r);let y=ll(Ni(f));Nn(y.subscribe(U=>t(7,f=U))),ni(nl,{getCustomFormats:()=>a.customFormats||[]});const c=(U,fe)=>rl(o.query,U,{query_name:fe});tl(c),i.params,Rn(()=>!0);let g={initialData:void 0,initialError:void 0},T=Ge`select * from taxi.dates`,h="select * from taxi.dates";s.date_range_data&&(s.date_range_data instanceof Error?g.initialError=s.date_range_data:g.initialData=s.date_range_data,s.date_range_columns&&(g.knownColumns=s.date_range_columns));let b,_=!1;const A=Ke.createReactive({callback:U=>{t(0,b=U)},execFn:c},{id:"date_range",...g});A(h,{noResolve:T,...g}),globalThis[Symbol.for("date_range")]={get value(){return b}};let L={initialData:void 0,initialError:void 0},D=Ge`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary +where day between '${f.date_range.start}' and '${f.date_range.end}'`,z=`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary +where day between '${f.date_range.start}' and '${f.date_range.end}'`;s.aggregate_stats_data&&(s.aggregate_stats_data instanceof Error?L.initialError=s.aggregate_stats_data:L.initialData=s.aggregate_stats_data,s.aggregate_stats_columns&&(L.knownColumns=s.aggregate_stats_columns));let E,V=!1;const ne=Ke.createReactive({callback:U=>{t(1,E=U)},execFn:c},{id:"aggregate_stats",...L});ne(z,{noResolve:D,...L}),globalThis[Symbol.for("aggregate_stats")]={get value(){return E}};let q={initialData:void 0,initialError:void 0},k=Ge`select * +from taxi.daily +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by day`,F=`select * +from taxi.daily +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by day`;s.fares_by_day_data&&(s.fares_by_day_data instanceof Error?q.initialError=s.fares_by_day_data:q.initialData=s.fares_by_day_data,s.fares_by_day_columns&&(q.knownColumns=s.fares_by_day_columns));let P,H=!1;const Z=Ke.createReactive({callback:U=>{t(2,P=U)},execFn:c},{id:"fares_by_day",...q});Z(F,{noResolve:k,...q}),globalThis[Symbol.for("fares_by_day")]={get value(){return P}};let x={initialData:void 0,initialError:void 0},ie=Ge`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by rides desc`,B=`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by rides desc`;s.fares_by_pickup_location_data&&(s.fares_by_pickup_location_data instanceof Error?x.initialError=s.fares_by_pickup_location_data:x.initialData=s.fares_by_pickup_location_data,s.fares_by_pickup_location_columns&&(x.knownColumns=s.fares_by_pickup_location_columns));let se,J=!1;const Q=Ke.createReactive({callback:U=>{t(3,se=U)},execFn:c},{id:"fares_by_pickup_location",...x});Q(B,{noResolve:ie,...x}),globalThis[Symbol.for("fares_by_pickup_location")]={get value(){return se}};let R={initialData:void 0,initialError:void 0},W=Ge`select + borough, + '/borough/' || borough as borough_link, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +and borough is not null +group by all +order by rides desc`,N=`select + borough, + '/borough/' || borough as borough_link, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +and borough is not null +group by all +order by rides desc`;s.fares_by_pickup_borough_data&&(s.fares_by_pickup_borough_data instanceof Error?R.initialError=s.fares_by_pickup_borough_data:R.initialData=s.fares_by_pickup_borough_data,s.fares_by_pickup_borough_columns&&(R.knownColumns=s.fares_by_pickup_borough_columns));let X,m=!1;const C=Ke.createReactive({callback:U=>{t(4,X=U)},execFn:c},{id:"fares_by_pickup_borough",...R});return C(N,{noResolve:W,...R}),globalThis[Symbol.for("fares_by_pickup_borough")]={get value(){return X}},n.$$set=U=>{"data"in U&&t(5,l=U.data)},n.$$.update=()=>{n.$$.dirty[0]&32&&t(6,{data:s={},customFormattingSettings:a,__db:o}=l,s),n.$$.dirty[0]&64&&il.set(Object.keys(s).length>0),n.$$.dirty[0]&268435456&&i.params,n.$$.dirty[0]&3840&&(T||!_?T||(A(h,{noResolve:T,...g}),t(11,_=!0)):A(h,{noResolve:T})),n.$$.dirty[0]&128&&t(13,D=Ge`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary +where day between '${f.date_range.start}' and '${f.date_range.end}'`),n.$$.dirty[0]&128&&t(14,z=`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary +where day between '${f.date_range.start}' and '${f.date_range.end}'`),n.$$.dirty[0]&61440&&(D||!V?D||(ne(z,{noResolve:D,...L}),t(15,V=!0)):ne(z,{noResolve:D})),n.$$.dirty[0]&128&&t(17,k=Ge`select * +from taxi.daily +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by day`),n.$$.dirty[0]&128&&t(18,F=`select * +from taxi.daily +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by day`),n.$$.dirty[0]&983040&&(k||!H?k||(Z(F,{noResolve:k,...q}),t(19,H=!0)):Z(F,{noResolve:k})),n.$$.dirty[0]&128&&t(21,ie=Ge`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by rides desc`),n.$$.dirty[0]&128&&t(22,B=`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by rides desc`),n.$$.dirty[0]&15728640&&(ie||!J?ie||(Q(B,{noResolve:ie,...x}),t(23,J=!0)):Q(B,{noResolve:ie})),n.$$.dirty[0]&128&&t(25,W=Ge`select + borough, + '/borough/' || borough as borough_link, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +and borough is not null +group by all +order by rides desc`),n.$$.dirty[0]&128&&t(26,N=`select + borough, + '/borough/' || borough as borough_link, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +and borough is not null +group by all +order by rides desc`),n.$$.dirty[0]&251658240&&(W||!m?W||(C(N,{noResolve:W,...R}),t(27,m=!0)):C(N,{noResolve:W}))},t(9,T=Ge`select * from taxi.dates`),t(10,h="select * from taxi.dates"),[b,E,P,se,X,l,s,f,g,T,h,_,L,D,z,V,q,k,F,H,x,ie,B,J,R,W,N,m,i]}class Gr extends He{constructor(e){super(),We(this,e,Mr,Lr,xe,{data:5},null,[-1,-1])}}export{Gr as component}; diff --git a/_app/immutable/nodes/5.CK_OX4jb.js b/_app/immutable/nodes/5.CK_OX4jb.js new file mode 100644 index 0000000000000000000000000000000000000000..6e4db7d197aaddce3f28369eb32b5d6538bac6d8 --- /dev/null +++ b/_app/immutable/nodes/5.CK_OX4jb.js @@ -0,0 +1,81 @@ +import{s as ce,a as E,e as L,b as ie,t as ge,c as F,h as pe,d as X,f as c,g as _e,i as be,j as O,k as R,l as K,m as ye,n as le,o as $e,p as he,q as we,r as ke,u as W}from"../chunks/scheduler.BZlHRu_0.js";import{S as ve,i as ze,c as D,a as S,m as N,t as g,b,d as Z,e as H,g as ee}from"../chunks/index.a_oafgNU.js";import{s as Ce,Q as ae,p as Re,r as ue,C as qe}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";import{w as Ee}from"../chunks/entry.p1-HE9Vh.js";import{e as Fe,h as G,p as Te}from"../chunks/button.DH6vZO4W.js";import{p as Ie}from"../chunks/stores.D7EENclZ.js";import{D as je,B as Y,A as xe,Q as te}from"../chunks/AreaMap.Ua5Kysct.js";function De(o){return{c(){this.h()},l(n){this.h()},h(){document.title="Evidence"},m:W,p:W,d:W}}function me(o){let n,r;return n=new te({props:{queryID:"date_range",queryResult:o[1]}}),{c(){D(n.$$.fragment)},l(a){S(n.$$.fragment,a)},m(a,m){N(n,a,m),r=!0},p(a,m){const d={};m&2&&(d.queryResult=a[1]),n.$set(d)},i(a){r||(g(n.$$.fragment,a),r=!0)},o(a){b(n.$$.fragment,a),r=!1},d(a){H(n,a)}}}function fe(o){let n,r;return n=new te({props:{queryID:"aggregate_stats",queryResult:o[2]}}),{c(){D(n.$$.fragment)},l(a){S(n.$$.fragment,a)},m(a,m){N(n,a,m),r=!0},p(a,m){const d={};m&4&&(d.queryResult=a[2]),n.$set(d)},i(a){r||(g(n.$$.fragment,a),r=!0)},o(a){b(n.$$.fragment,a),r=!1},d(a){H(n,a)}}}function de(o){let n,r;return n=new te({props:{queryID:"fares_by_pickup_location",queryResult:o[3]}}),{c(){D(n.$$.fragment)},l(a){S(n.$$.fragment,a)},m(a,m){N(n,a,m),r=!0},p(a,m){const d={};m&8&&(d.queryResult=a[3]),n.$set(d)},i(a){r||(g(n.$$.fragment,a),r=!0)},o(a){b(n.$$.fragment,a),r=!1},d(a){H(n,a)}}}function Se(o){let n,r,a,m,d,i,I,A=o[0].borough+"",_,V,q,f,k,y,$,M,v,Q,p,z,h,U,T,C,w;function j(e,t){return De}let x=j()(o),l=o[1]&&me(o);f=new je({props:{name:"date_range",data:o[1],dates:"day"}});let u=o[2]&&fe(o);$=new Y({props:{data:o[2],value:"rides",fmt:"num0"}}),v=new Y({props:{data:o[2],value:"fare_amount",fmt:"usd1m"}}),p=new Y({props:{data:o[2],value:"trip_distance",fmt:'#,##0 "mi"'}}),h=new Y({props:{data:o[2],value:"fare_per_mile",fmt:"usd2"}});let s=o[3]&&de(o);return C=new xe({props:{data:o[3],geoJsonUrl:"/taxi_zones.geojson",geoId:"objectid",areaCol:"pickup_location_id",value:"rides",valueFmt:"num0",title:"Rides by Pickup Location",labelCol:"zone",tooltip:[{id:"zone",showColumnName:!1,valueClass:"text-xl font-semibold"},{id:"borough",showColumnName:!1,valueClass:"text-sm text-gray-500"},{id:"rides",fmt:"num0",fieldClass:"text-[grey]",valueClass:"text-[green]"},{id:"fare_amount",fmt:"usd",fieldClass:"text-[grey]",valueClass:"text-[green]"},{id:"trip_distance",fmt:"num0",fieldClass:"text-[grey]",valueClass:"text-[green]"}]}}),{c(){n=E(),x.c(),r=L("meta"),a=L("meta"),m=ie(),d=E(),i=L("h1"),I=L("a"),_=ge(A),V=E(),l&&l.c(),q=E(),D(f.$$.fragment),k=E(),u&&u.c(),y=E(),D($.$$.fragment),M=E(),D(v.$$.fragment),Q=E(),D(p.$$.fragment),z=E(),D(h.$$.fragment),U=E(),s&&s.c(),T=E(),D(C.$$.fragment),this.h()},l(e){n=F(e);const t=pe("svelte-6lktun",document.head);x.l(t),r=X(t,"META",{name:!0,content:!0}),a=X(t,"META",{name:!0,content:!0}),m=ie(),t.forEach(c),d=F(e),i=X(e,"H1",{class:!0,id:!0});var P=_e(i);I=X(P,"A",{href:!0});var J=_e(I);_=be(J,A),J.forEach(c),P.forEach(c),V=F(e),l&&l.l(e),q=F(e),S(f.$$.fragment,e),k=F(e),u&&u.l(e),y=F(e),S($.$$.fragment,e),M=F(e),S(v.$$.fragment,e),Q=F(e),S(p.$$.fragment,e),z=F(e),S(h.$$.fragment,e),U=F(e),s&&s.l(e),T=F(e),S(C.$$.fragment,e),this.h()},h(){O(r,"name","twitter:card"),O(r,"content","summary"),O(a,"name","twitter:site"),O(a,"content","@evidence_dev"),O(I,"href","#paramsborough"),O(i,"class","markdown"),O(i,"id","paramsborough")},m(e,t){R(e,n,t),x.m(document.head,null),K(document.head,r),K(document.head,a),K(document.head,m),R(e,d,t),R(e,i,t),K(i,I),K(I,_),R(e,V,t),l&&l.m(e,t),R(e,q,t),N(f,e,t),R(e,k,t),u&&u.m(e,t),R(e,y,t),N($,e,t),R(e,M,t),N(v,e,t),R(e,Q,t),N(p,e,t),R(e,z,t),N(h,e,t),R(e,U,t),s&&s.m(e,t),R(e,T,t),N(C,e,t),w=!0},p(e,[t]){x.p(e,t),(!w||t&1)&&A!==(A=e[0].borough+"")&&ye(_,A),e[1]?l?(l.p(e,t),t&2&&g(l,1)):(l=me(e),l.c(),g(l,1),l.m(q.parentNode,q)):l&&(ee(),b(l,1,1,()=>{l=null}),Z());const P={};t&2&&(P.data=e[1]),f.$set(P),e[2]?u?(u.p(e,t),t&4&&g(u,1)):(u=fe(e),u.c(),g(u,1),u.m(y.parentNode,y)):u&&(ee(),b(u,1,1,()=>{u=null}),Z());const J={};t&4&&(J.data=e[2]),$.$set(J);const re={};t&4&&(re.data=e[2]),v.$set(re);const oe={};t&4&&(oe.data=e[2]),p.$set(oe);const se={};t&4&&(se.data=e[2]),h.$set(se),e[3]?s?(s.p(e,t),t&8&&g(s,1)):(s=de(e),s.c(),g(s,1),s.m(T.parentNode,T)):s&&(ee(),b(s,1,1,()=>{s=null}),Z());const ne={};t&8&&(ne.data=e[3]),C.$set(ne)},i(e){w||(g(l),g(f.$$.fragment,e),g(u),g($.$$.fragment,e),g(v.$$.fragment,e),g(p.$$.fragment,e),g(h.$$.fragment,e),g(s),g(C.$$.fragment,e),w=!0)},o(e){b(l),b(f.$$.fragment,e),b(u),b($.$$.fragment,e),b(v.$$.fragment,e),b(p.$$.fragment,e),b(h.$$.fragment,e),b(s),b(C.$$.fragment,e),w=!1},d(e){e&&(c(n),c(d),c(i),c(V),c(q),c(k),c(y),c(M),c(Q),c(z),c(U),c(T)),x.d(e),c(r),c(a),c(m),l&&l.d(e),H(f,e),u&&u.d(e),H($,e),H(v,e),H(p,e),H(h,e),s&&s.d(e),H(C,e)}}}function Ne(o,n,r){let a,m;le(o,Ie,s=>r(19,a=s)),le(o,ue,s=>r(23,m=s));let{data:d}=n,{data:i={},customFormattingSettings:I,__db:A,inputs:_}=d;$e(ue,m="4e049e3b2a8bb91efd330a1ee52e17df",m);let V=Fe(Ee(_));he(V.subscribe(s=>r(6,_=s))),we(qe,{getCustomFormats:()=>I.customFormats||[]});const q=(s,e)=>Te(A.query,s,{query_name:e});Ce(q);let f=a.params;ke(()=>!0);let k={initialData:void 0,initialError:void 0},y=G`select * from taxi.dates`,$="select * from taxi.dates";i.date_range_data&&(i.date_range_data instanceof Error?k.initialError=i.date_range_data:k.initialData=i.date_range_data,i.date_range_columns&&(k.knownColumns=i.date_range_columns));let M,v=!1;const Q=ae.createReactive({callback:s=>{r(1,M=s)},execFn:q},{id:"date_range",...k});Q($,{noResolve:y,...k}),globalThis[Symbol.for("date_range")]={get value(){return M}};let p={initialData:void 0,initialError:void 0},z=G`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary_borough +left join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}')`,h=`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary_borough +left join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}')`;i.aggregate_stats_data&&(i.aggregate_stats_data instanceof Error?p.initialError=i.aggregate_stats_data:p.initialData=i.aggregate_stats_data,i.aggregate_stats_columns&&(p.knownColumns=i.aggregate_stats_columns));let U,T=!1;const C=ae.createReactive({callback:s=>{r(2,U=s)},execFn:q},{id:"aggregate_stats",...p});C(h,{noResolve:z,...p}),globalThis[Symbol.for("aggregate_stats")]={get value(){return U}};let w={initialData:void 0,initialError:void 0},j=G`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}') +group by all +order by 1`,B=`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}') +group by all +order by 1`;i.fares_by_pickup_location_data&&(i.fares_by_pickup_location_data instanceof Error?w.initialError=i.fares_by_pickup_location_data:w.initialData=i.fares_by_pickup_location_data,i.fares_by_pickup_location_columns&&(w.knownColumns=i.fares_by_pickup_location_columns));let x,l=!1;const u=ae.createReactive({callback:s=>{r(3,x=s)},execFn:q},{id:"fares_by_pickup_location",...w});return u(B,{noResolve:j,...w}),globalThis[Symbol.for("fares_by_pickup_location")]={get value(){return x}},o.$$set=s=>{"data"in s&&r(4,d=s.data)},o.$$.update=()=>{o.$$.dirty&16&&r(5,{data:i={},customFormattingSettings:I,__db:A}=d,i),o.$$.dirty&32&&Re.set(Object.keys(i).length>0),o.$$.dirty&524288&&r(0,f=a.params),o.$$.dirty&1920&&(y||!v?y||(Q($,{noResolve:y,...k}),r(10,v=!0)):Q($,{noResolve:y})),o.$$.dirty&65&&r(12,z=G`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary_borough +left join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}')`),o.$$.dirty&65&&r(13,h=`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary_borough +left join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}')`),o.$$.dirty&30720&&(z||!T?z||(C(h,{noResolve:z,...p}),r(14,T=!0)):C(h,{noResolve:z})),o.$$.dirty&65&&r(16,j=G`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}') +group by all +order by 1`),o.$$.dirty&65&&r(17,B=`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}') +group by all +order by 1`),o.$$.dirty&491520&&(j||!l?j||(u(B,{noResolve:j,...w}),r(18,l=!0)):u(B,{noResolve:j}))},r(8,y=G`select * from taxi.dates`),r(9,$="select * from taxi.dates"),[f,M,U,x,d,i,_,k,y,$,v,p,z,h,T,w,j,B,l,a]}class Be extends ve{constructor(n){super(),ze(this,n,Ne,Se,ce,{data:4})}}export{Be as component}; diff --git a/_app/immutable/nodes/6.DU1Lccse.js b/_app/immutable/nodes/6.DU1Lccse.js new file mode 100644 index 0000000000000000000000000000000000000000..196520f546e375488ed96d93b9e9e50885b072e6 --- /dev/null +++ b/_app/immutable/nodes/6.DU1Lccse.js @@ -0,0 +1 @@ +import{s as Y,e as S,a as v,d as R,H as te,c as D,g as B,f as h,j as C,k as y,l as Q,J as se,B as V,K as ne,L as le,r as re,b as L,t as A,i as N,m as ie,I as ae,u as Z,M as oe,N as ue}from"../chunks/scheduler.BZlHRu_0.js";import{S as $,i as x,t as k,g as M,b as E,d as O,c as I,a as H,m as P,e as z,f as T}from"../chunks/index.a_oafgNU.js";import{b as fe,c as j,d as ce,E as J,e as K,g as de,D as _e,h as W}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";import"../chunks/entry.p1-HE9Vh.js";import{B as F}from"../chunks/Button.DOpmxt6h.js";function G(r){let e,t,l,s,n;return t=new F({props:{size:"sm",outline:!0,icon:r[1]?J:K,$$slots:{default:[be]},$$scope:{ctx:r}}}),t.$on("click",r[10]),s=new F({props:{size:"sm",variant:"success",outline:!0,icon:de,$$slots:{default:[ge]},$$scope:{ctx:r}}}),s.$on("click",r[11]),{c(){e=S("div"),I(t.$$.fragment),l=v(),I(s.$$.fragment),this.h()},l(i){e=R(i,"DIV",{class:!0});var u=B(e);H(t.$$.fragment,u),l=D(u),H(s.$$.fragment,u),u.forEach(h),this.h()},h(){C(e,"class","absolute bottom-2 right-2 z-10 flex gap-2")},m(i,u){y(i,e,u),P(t,e,null),Q(e,l),P(s,e,null),n=!0},p(i,u){const b={};u&2&&(b.icon=i[1]?J:K),u&32770&&(b.$$scope={dirty:u,ctx:i}),t.$set(b);const g={};u&32768&&(g.$$scope={dirty:u,ctx:i}),s.$set(g)},i(i){n||(k(t.$$.fragment,i),k(s.$$.fragment,i),n=!0)},o(i){E(t.$$.fragment,i),E(s.$$.fragment,i),n=!1},d(i){i&&h(e),z(t),z(s)}}}function me(r){let e;return{c(){e=A("Show Results")},l(t){e=N(t,"Show Results")},m(t,l){y(t,e,l)},d(t){t&&h(e)}}}function he(r){let e;return{c(){e=A("Hide Results")},l(t){e=N(t,"Hide Results")},m(t,l){y(t,e,l)},d(t){t&&h(e)}}}function be(r){let e;function t(n,i){return n[1]?he:me}let l=t(r),s=l(r);return{c(){s.c(),e=L()},l(n){s.l(n),e=L()},m(n,i){s.m(n,i),y(n,e,i)},p(n,i){l!==(l=t(n))&&(s.d(1),s=l(n),s&&(s.c(),s.m(e.parentNode,e)))},d(n){n&&h(e),s.d(n)}}}function ge(r){let e;return{c(){e=A("Submit")},l(t){e=N(t,"Submit")},m(t,l){y(t,e,l)},d(t){t&&h(e)}}}function U(r){let e,t=r[8].error+"",l;return{c(){e=S("pre"),l=A(t),this.h()},l(s){e=R(s,"PRE",{class:!0});var n=B(e);l=N(n,t),n.forEach(h),this.h()},h(){C(e,"class","text-red-500 text-xs font-mono")},m(s,n){y(s,e,n),Q(e,l)},p(s,n){n&256&&t!==(t=s[8].error+"")&&ie(l,t)},d(s){s&&h(e)}}}function X(r){let e,t,l,s;return t=new _e({props:{data:r[8]}}),{c(){e=S("div"),I(t.$$.fragment)},l(n){e=R(n,"DIV",{});var i=B(e);H(t.$$.fragment,i),i.forEach(h)},m(n,i){y(n,e,i),P(t,e,null),s=!0},p(n,i){const u={};i&256&&(u.data=n[8]),t.$set(u)},i(n){s||(k(t.$$.fragment,n),n&&ae(()=>{s&&(l||(l=T(e,W,{},!0)),l.run(1))}),s=!0)},o(n){E(t.$$.fragment,n),n&&(l||(l=T(e,W,{},!1)),l.run(0)),s=!1},d(n){n&&h(e),z(t),n&&l&&l.end()}}}function pe(r){let e,t="SQL Console",l,s,n,i,u,b=r[8].error&&!r[2]&&!!r[4],g,m,w,p,a=!r[3]&&G(r),f=b&&U(r),c=r[1]&&X(r);return{c(){e=S("h1"),e.textContent=t,l=v(),s=S("section"),n=S("div"),a&&a.c(),u=v(),f&&f.c(),g=v(),c&&c.c(),this.h()},l(o){e=R(o,"H1",{class:!0,"data-svelte-h":!0}),te(e)!=="svelte-7ylf69"&&(e.textContent=t),l=D(o),s=R(o,"SECTION",{class:!0,role:!0});var _=B(s);n=R(_,"DIV",{class:!0});var q=B(n);a&&a.l(q),q.forEach(h),u=D(_),f&&f.l(_),g=D(_),c&&c.l(_),_.forEach(h),this.h()},h(){C(e,"class","markdown"),C(n,"class","w-full relative rounded border border-gray-300 min-h-[8rem] cursor-text"),C(s,"class","px-0 py-2 bg-white flex flex-col gap-2 min-h-[8rem] svelte-1bw0fbe"),C(s,"role","none")},m(o,_){y(o,e,_),y(o,l,_),y(o,s,_),Q(s,n),a&&a.m(n,null),r[12](n),Q(s,u),f&&f.m(s,null),Q(s,g),c&&c.m(s,null),m=!0,w||(p=[se(i=fe.call(null,n,r[5])),V(s,"click",r[13]),V(s,"keydown",r[14])],w=!0)},p(o,[_]){o[3]?a&&(M(),E(a,1,1,()=>{a=null}),O()):a?(a.p(o,_),_&8&&k(a,1)):(a=G(o),a.c(),k(a,1),a.m(n,null)),i&&ne(i.update)&&_&32&&i.update.call(null,o[5]),_&276&&(b=o[8].error&&!o[2]&&!!o[4]),b?f?f.p(o,_):(f=U(o),f.c(),f.m(s,g)):f&&(f.d(1),f=null),o[1]?c?(c.p(o,_),_&2&&k(c,1)):(c=X(o),c.c(),k(c,1),c.m(s,null)):c&&(M(),E(c,1,1,()=>{c=null}),O())},i(o){m||(k(a),k(c),m=!0)},o(o){E(a),E(c),m=!1},d(o){o&&(h(e),h(l),h(s)),a&&a.d(),r[12](null),f&&f.d(),c&&c.d(),w=!1,le(p)}}}function ke(r,e,t){let l,s=Z,n=()=>(s(),s=oe(p,d=>t(8,l=d)),p);r.$$.on_destroy.push(()=>s());let{hideErrors:i=!1}=e,{initialQuery:u="select 'ABC' as category, 123 as num, 26400000 as sales_usd"}=e,{showResults:b=!0}=e,{disabled:g=!1}=e,m=u,w=m,{data:p=j(m)}=e;n();let a,f;re(async()=>{p&&p.fetch(),t(5,f={initialState:u,disabled:g,schema:await ce(),onChange:d=>{d.docChanged&&w.trim()!==d.state.doc.toString().trim()&&t(6,w=d.state.doc.toString())},onSubmit:()=>(t(4,m=w.trim()),m.endsWith(";")&&t(4,m=m.substring(0,m.length-1)),t(1,b=!0),!0)})});const c=()=>t(1,b=!b),o=()=>{t(4,m=w),t(1,b=!0)};function _(d){ue[d?"unshift":"push"](()=>{a=d,t(7,a)})}const q=()=>a==null?void 0:a.focus(),ee=d=>d.key==="Enter"&&(a==null?void 0:a.focus());return r.$$set=d=>{"hideErrors"in d&&t(2,i=d.hideErrors),"initialQuery"in d&&t(9,u=d.initialQuery),"showResults"in d&&t(1,b=d.showResults),"disabled"in d&&t(3,g=d.disabled),"data"in d&&n(t(0,p=d.data))},r.$$.update=()=>{r.$$.dirty&17&&m&&(n(t(0,p=j(m))),p.fetch()),r.$$.dirty&40&&f&&t(5,f.disabled=g,f)},[p,b,i,g,m,f,w,a,l,u,c,o,_,q,ee]}class ye extends ${constructor(e){super(),x(this,e,ke,pe,Y,{hideErrors:2,initialQuery:9,showResults:1,disabled:3,data:0})}}function we(r){let e,t;return e=new ye({}),{c(){I(e.$$.fragment)},l(l){H(e.$$.fragment,l)},m(l,s){P(e,l,s),t=!0},p:Z,i(l){t||(k(e.$$.fragment,l),t=!0)},o(l){E(e.$$.fragment,l),t=!1},d(l){z(e,l)}}}class Be extends ${constructor(e){super(),x(this,e,null,we,Y,{})}}export{Be as component}; diff --git a/_app/immutable/nodes/7.CM8MxEZm.js b/_app/immutable/nodes/7.CM8MxEZm.js new file mode 100644 index 0000000000000000000000000000000000000000..8c7f1891473b6911a25aed0c6837b46b55b8af85 --- /dev/null +++ b/_app/immutable/nodes/7.CM8MxEZm.js @@ -0,0 +1,5 @@ +import{s as J,b as I,k as g,f as d,t as L,e as $,i as N,d as w,g as T,j as y,l as E,u as O,a as S,c as j,A,B as K,H as U}from"../chunks/scheduler.BZlHRu_0.js";import{S as Q,i as X,t as k,b as v,g as P,d as R,c as q,a as x,m as D,e as M}from"../chunks/index.a_oafgNU.js";import{i as H,u as Y,I as Z,j as te,o as ee,T as le,k as ae}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";import"../chunks/entry.p1-HE9Vh.js";import{h as ne,u as re}from"../chunks/await_block.Ctm0iWyv.js";function B(h,e,l){const t=h.slice();return t[8]=e[l][0],t[9]=e[l][1],t}function F(h,e,l){const t=h.slice();return t[12]=e[l][0],t[13]=e[l][1],t}function oe(h){let e,l,t=h[16].message+"",a;return{c(){e=L(`An error was encountered while loading project schema. + + `),l=$("pre"),a=L(t),this.h()},l(i){e=N(i,`An error was encountered while loading project schema. + + `),l=w(i,"PRE",{class:!0});var f=T(l);a=N(f,t),f.forEach(d),this.h()},h(){y(l,"class","px-4 py-2 bg-red-800 text-white")},m(i,f){g(i,e,f),g(i,l,f),E(l,a)},p:O,i:O,o:O,d(i){i&&(d(e),d(l))}}}function se(h){let e,l,t,a=[],i=new Map,f,m=H(Object.entries(h[7]));const c=n=>n[8];for(let n=0;nc[12];for(let c=0;c{o=null}),R())},i(u){r||(k(a.$$.fragment,u),k(o),r=!0)},o(u){v(a.$$.fragment,u),v(o),r=!1},d(u){u&&(d(l),d(c),d(n)),M(a),o&&o.d(u),_=!1,s()}}}function G(h,e){let l,t,a,i,f=e[8]+"",m,c,n,r,_,s;a=new Z({props:{src:te,class:"text-white w-5 h-5 mr-1"}});function p(){return e[4](e[8])}let o=e[1]===e[8]&&V(e);return{key:h,first:null,c(){l=$("li"),t=$("button"),q(a.$$.fragment),i=S(),m=L(f),c=S(),o&&o.c(),n=I(),this.h()},l(u){l=w(u,"LI",{class:!0});var b=T(l);t=w(b,"BUTTON",{class:!0});var C=T(t);x(a.$$.fragment,C),i=j(C),m=N(C,f),C.forEach(d),b.forEach(d),c=j(u),o&&o.l(u),n=I(),this.h()},h(){y(t,"class","bg-gray-500 px-2 py-1 rounded font-bold flex w-full hover:bg-blue-500"),A(t,"bg-blue-500",e[1]===e[8]),y(l,"class","font-mono m-0 text-sm text-white"),this.first=l},m(u,b){g(u,l,b),E(l,t),D(a,t,null),E(t,i),E(t,m),g(u,c,b),o&&o.m(u,b),g(u,n,b),r=!0,_||(s=K(t,"click",p),_=!0)},p(u,b){e=u,(!r||b&6)&&A(t,"bg-blue-500",e[1]===e[8]),e[1]===e[8]?o?(o.p(e,b),b&2&&k(o,1)):(o=V(e),o.c(),k(o,1),o.m(n.parentNode,n)):o&&(P(),v(o,1,1,()=>{o=null}),R())},i(u){r||(k(a.$$.fragment,u),k(o),r=!0)},o(u){v(a.$$.fragment,u),v(o),r=!1},d(u){u&&(d(l),d(c),d(n)),M(a),o&&o.d(u),_=!1,s()}}}function ce(h){let e;return{c(){e=L("Loading Schema Information...")},l(l){e=N(l,"Loading Schema Information...")},m(l,t){g(l,e,t)},p:O,i:O,o:O,d(l){l&&d(e)}}}function ie(h){let e,l,t={ctx:h,current:null,token:null,hasCatch:!0,pending:ce,then:se,catch:oe,value:7,error:16,blocks:[,,,]};return ne(h[2](),t),{c(){e=I(),t.block.c()},l(a){e=I(),t.block.l(a)},m(a,i){g(a,e,i),t.block.m(a,t.anchor=i),t.mount=()=>e.parentNode,t.anchor=e,l=!0},p(a,[i]){h=a,re(t,h,i)},i(a){l||(k(t.block),l=!0)},o(a){for(let i=0;i<3;i+=1){const f=t.blocks[i];v(f)}l=!1},d(a){a&&d(e),t.block.d(a),t.token=null,t=null}}}function ue(h,e,l){let{data:t}=e,{__db:a}=t;async function i(){const r=await a.query("SELECT * FROM information_schema.tables WHERE table_catalog = 'memory' AND table_name != 'stats'"),_={};return await Promise.all(r.map(async s=>{const p=await a.query(`SELECT * FROM information_schema.columns WHERE table_name = '${s.table_name}' AND table_schema = '${s.table_schema}'`);_[s.table_schema]||(_[s.table_schema]={}),_[s.table_schema][s.table_name]={table:s,columns:p}})),_}let f="",m="";const c=r=>{l(1,m=m===r?"":r),l(0,f="")},n=r=>{l(0,f=f===r?"":r)};return h.$$set=r=>{"data"in r&&l(3,t=r.data)},[f,m,i,t,c,n]}class fe extends Q{constructor(e){super(),X(this,e,ue,ie,J,{data:3})}}function he(h){let e,l="Project Schema",t,a,i="This page details the tables and columns that are currently loaded in your project.",f,m,c="Sources",n,r,_;return r=new fe({props:{data:h[0]}}),{c(){e=$("h1"),e.textContent=l,t=S(),a=$("p"),a.textContent=i,f=S(),m=$("h2"),m.textContent=c,n=S(),q(r.$$.fragment),this.h()},l(s){e=w(s,"H1",{class:!0,"data-svelte-h":!0}),U(e)!=="svelte-15777oi"&&(e.textContent=l),t=j(s),a=w(s,"P",{class:!0,"data-svelte-h":!0}),U(a)!=="svelte-ak948l"&&(a.textContent=i),f=j(s),m=w(s,"H2",{class:!0,"data-svelte-h":!0}),U(m)!=="svelte-9qt1ro"&&(m.textContent=c),n=j(s),x(r.$$.fragment,s),this.h()},h(){y(e,"class","markdown"),y(a,"class","markdown"),y(m,"class","markdown")},m(s,p){g(s,e,p),g(s,t,p),g(s,a,p),g(s,f,p),g(s,m,p),g(s,n,p),D(r,s,p),_=!0},p(s,[p]){const o={};p&1&&(o.data=s[0]),r.$set(o)},i(s){_||(k(r.$$.fragment,s),_=!0)},o(s){v(r.$$.fragment,s),_=!1},d(s){s&&(d(e),d(t),d(a),d(f),d(m),d(n)),M(r,s)}}}function me(h,e,l){let{data:t}=e;return h.$$set=a=>{"data"in a&&l(0,t=a.data)},[t]}class ke extends Q{constructor(e){super(),X(this,e,me,he,J,{data:0})}}export{ke as component}; diff --git a/_app/immutable/nodes/8.CtsUH2mo.js b/_app/immutable/nodes/8.CtsUH2mo.js new file mode 100644 index 0000000000000000000000000000000000000000..7b49ec50cf3d68238b6dbd21031ee2a276af882b --- /dev/null +++ b/_app/immutable/nodes/8.CtsUH2mo.js @@ -0,0 +1,63 @@ +import{s as be,e as b,t as Z,a as D,d as y,g as P,i as Q,f as h,c as j,j as _,k as N,l as m,ah as ce,B as de,u as ee,L as Ge,m as he,N as Xe,H as K,I as Ae,A as Ve,ai as Be,aj as Qt,ak as We,al as Le,a7 as vn,am as $t,b as me,an as bn,J as nl,Q as yn,R as kn,U as _s,K as es,z as ll,D as il,E as rl,F as ol}from"../chunks/scheduler.BZlHRu_0.js";import{S as ye,i as ke,k as Ze,c as G,a as X,m as Y,t as V,f as qe,b as H,e as J,g as _e,d as ve,j as yt}from"../chunks/index.a_oafgNU.js";import{i as pe,ao as wn,h as He,ap as Qe,aq as Cn,ar as ot,as as $n,at as Tn,au as Oe,av as rt,aw as ts,ax as ss,ay as ns,az as al,aA as et,aB as cl,aC as ul,aD as It,aE as Dt,aF as vs,aG as fl,aH as bs,aI as ys,aJ as Lt,aK as dl,aL as hl,aM as ls,aN as ml,aO as ze,aP as wt,aQ as Nt,aR as at,aS as ks,aT as pl,aU as gl,aV as _l,aW as is,aX as jt,aY as vl,aZ as bl,a_ as En,a$ as lt,b0 as Sn,b1 as yl,b2 as Pt,b3 as kl,b4 as In,b5 as wl,b6 as Cl,b7 as $l,b8 as Tl,b9 as El,ba as Sl,bb as Nn,bc as Il,bd as Nl,I as Me,j as Al,be as Ol,bf as Ll,bg as kt,bh as An,bi as Pl,a as Dl,bj as ct,bk as ut,bl as jl,u as Ml,bm as Fl,bn as rs,ae as Jt,bo as Vl,bp as Tt,bq as On,br as Ln}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.CDO3tsFU.js";import{p as Bl,i as ql,b as Hl}from"../chunks/entry.p1-HE9Vh.js";import{B as ft}from"../chunks/Button.DOpmxt6h.js";import{s as Xt}from"../chunks/index.CqVitEmB.js";import{A as Rl,a as Ul}from"../chunks/AccordionItem.CxgotlFR.js";import{C as Kl,P as Kt}from"../chunks/Prismjs.XAZNzsAo.js";function ws(l){let e,t;return{c(){e=b("span"),t=Z(l[1]),this.h()},l(s){e=y(s,"SPAN",{class:!0});var n=P(e);t=Q(n,l[1]),n.forEach(h),this.h()},h(){_(e,"class","text-red-500 font-bold text-sm")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&2&&he(t,s[1])},d(s){s&&h(e)}}}function xl(l){let e,t,s,n,i,r,o,a=l[1]&&ws(l);return{c(){e=b("label"),t=Z(`Source name + `),s=b("input"),n=D(),i=b("div"),a&&a.c(),this.h()},l(c){e=y(c,"LABEL",{for:!0,class:!0});var u=P(e);t=Q(u,`Source name + `),s=y(u,"INPUT",{name:!0,class:!0}),u.forEach(h),n=j(c),i=y(c,"DIV",{class:!0});var f=P(i);a&&a.l(f),f.forEach(h),this.h()},h(){s.required=!0,_(s,"name","sourceName"),_(s,"class","rounded border border-gray-300 p-1 ml-auto w-2/3 text-gray-950 align-middle text-sm"),_(e,"for","sourceName"),_(e,"class","flex justify-between w-full"),_(i,"class","flex justify-end w-full")},m(c,u){N(c,e,u),m(e,t),m(e,s),ce(s,l[0]),N(c,n,u),N(c,i,u),a&&a.m(i,null),r||(o=[de(s,"input",l[2]),de(s,"change",l[3])],r=!0)},p(c,[u]){u&1&&s.value!==c[0]&&ce(s,c[0]),c[1]?a?a.p(c,u):(a=ws(c),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},i:ee,o:ee,d(c){c&&(h(e),h(n),h(i)),a&&a.d(),r=!1,Ge(o)}}}const zl=/^[\w_]+$/,Pn=(l,e)=>l.length<1?"Source name must be set.":zl.test(l)?l&&e.some(t=>t.name===l)?`A source named ${l} already exists.`:"":"Source names can only contain letters, numbers, and underscores.";function Gl(l,e,t){let{sourceName:s}=e,{nameError:n}=e;function i(){s=this.value,t(0,s)}const r=()=>t(1,n="");return l.$$set=o=>{"sourceName"in o&&t(0,s=o.sourceName),"nameError"in o&&t(1,n=o.nameError)},[s,n,i,r]}class Dn extends ye{constructor(e){super(),ke(this,e,Gl,xl,be,{sourceName:0,nameError:1})}}function Cs(l,e,t){const s=l.slice();s[11]=e[t][0],s[12]=e[t][1];const n=s[12].package.package.evidence.datasources;return s[13]=n,s}function $s(l,e,t){const s=l.slice();return s[16]=e[t],s}function Yl(l){let e,t=l[16]+"",s,n;return{c(){e=b("option"),s=Z(t),this.h()},l(i){e=y(i,"OPTION",{});var r=P(e);s=Q(r,t),r.forEach(h),this.h()},h(){e.__value=n=l[16],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s)},p(i,r){r&1&&t!==(t=i[16]+"")&&he(s,t),r&1&&n!==(n=i[16])&&(e.__value=n,ce(e,e.__value))},d(i){i&&h(e)}}}function Jl(l){let e;function t(i,r){return i[16].length?Wl:Xl}let s=t(l),n=s(l);return{c(){n.c(),e=me()},l(i){n.l(i),e=me()},m(i,r){n.m(i,r),N(i,e,r)},p(i,r){s===(s=t(i))&&n?n.p(i,r):(n.d(1),n=s(i),n&&(n.c(),n.m(e.parentNode,e)))},d(i){i&&h(e),n.d(i)}}}function Xl(l){return{c:ee,l:ee,m:ee,p:ee,d:ee}}function Wl(l){let e,t=l[16][0]+"",s,n;return{c(){e=b("option"),s=Z(t),this.h()},l(i){e=y(i,"OPTION",{});var r=P(e);s=Q(r,t),r.forEach(h),this.h()},h(){e.__value=n=l[16][0],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s)},p(i,r){r&1&&t!==(t=i[16][0]+"")&&he(s,t),r&1&&n!==(n=i[16][0])&&(e.__value=n,ce(e,e.__value))},d(i){i&&h(e)}}}function Ts(l){let e,t;function s(r,o){return o&1&&(e=null),e==null&&(e=!!Array.isArray(r[16])),e?Jl:Yl}let n=s(l,-1),i=n(l);return{c(){i.c(),t=me()},l(r){i.l(r),t=me()},m(r,o){i.m(r,o),N(r,t,o)},p(r,o){n===(n=s(r,o))&&i?i.p(r,o):(i.d(1),i=n(r),i&&(i.c(),i.m(t.parentNode,t)))},d(r){r&&h(t),i.d(r)}}}function Es(l){let e,t,s=pe(l[13]),n=[];for(let i=0;iZe(f,"sourceName",R)),Xe.push(()=>Ze(f,"nameError",A)),v=new ft({props:{size:"md",icon:wn,variant:"success",type:"submit",$$slots:{default:[Zl]},$$scope:{ctx:l}}}),{c(){e=b("div"),t=b("form"),s=b("h3"),s.textContent=n,i=D(),r=b("label"),o=Z(`Datasource Type + `),a=b("select");for(let E=0;E<$.length;E+=1)$[E].c();c=D(),u=b("div"),G(f.$$.fragment),g=D(),k=b("div"),G(v.$$.fragment),this.h()},l(E){e=y(E,"DIV",{class:!0});var I=P(e);t=y(I,"FORM",{class:!0});var O=P(t);s=y(O,"H3",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-1dhduhd"&&(s.textContent=n),i=j(O),r=y(O,"LABEL",{for:!0,class:!0});var L=P(r);o=Q(L,`Datasource Type + `),a=y(L,"SELECT",{name:!0,class:!0});var T=P(a);for(let W=0;W<$.length;W+=1)$[W].l(T);T.forEach(h),L.forEach(h),c=j(O),u=y(O,"DIV",{});var q=P(u);X(f.$$.fragment,q),q.forEach(h),g=j(O),k=y(O,"DIV",{class:!0});var U=P(k);X(v.$$.fragment,U),U.forEach(h),O.forEach(h),I.forEach(h),this.h()},h(){_(s,"class","text-sm uppercase gray-600 font-bold text-left"),a.required=!0,_(a,"name","sourceType"),_(a,"class","rounded border border-gray-300 p-1 ml-auto w-2/3 text-gray-950 align-middle text-sm"),l[2]===void 0&&Ae(()=>l[7].call(a)),_(r,"for","sourceType"),_(r,"class","flex justify-between w-full"),_(k,"class","ml-auto"),_(t,"class","flex flex-col w-full gap-4"),_(e,"class","col-span-4 w-full flex justify-end items-end flex-col py-4 px-4 rounded"),Ve(e,"bg-gray-100",!l[1])},m(E,I){N(E,e,I),m(e,t),m(t,s),m(t,i),m(t,r),m(r,o),m(r,a);for(let O=0;O<$.length;O+=1)$[O]&&$[O].m(a,null);Be(a,l[2],!0),m(t,c),m(t,u),Y(f,u,null),m(t,g),m(t,k),Y(v,k,null),C=!0,S||(F=[de(a,"change",l[7]),de(t,"submit",Qt(l[5]))],S=!0)},p(E,[I]){if(I&1){M=pe(Object.entries(E[0]));let T;for(T=0;Td=!1)),!p&&I&16&&(p=!0,O.nameError=E[4],We(()=>p=!1)),f.$set(O);const L={};I&524288&&(L.$$scope={dirty:I,ctx:E}),v.$set(L),(!C||I&2)&&Ve(e,"bg-gray-100",!E[1])},i(E){C||(V(f.$$.fragment,E),V(v.$$.fragment,E),E&&Ae(()=>{C&&(w||(w=qe(e,He,{},!0)),w.run(1))}),C=!0)},o(E){H(f.$$.fragment,E),H(v.$$.fragment,E),E&&(w||(w=qe(e,He,{},!1)),w.run(0)),C=!1},d(E){E&&h(e),Le($,E),J(f),J(v),E&&w&&w.end(),S=!1,Ge(F)}}}function ei(l,e,t){let{availablePackages:s}=e,{ghost:n=!1}=e,{existingSources:i=[]}=e,r="",o="";const a=vn();let c="";function u(){t(4,c=Pn(o,i)),!c&&(a("newSource",{newSourceType:r,newSourceName:o}),t(3,o=""))}function f(){r=$t(this),t(2,r),t(0,s)}function d(g){o=g,t(3,o)}function p(g){c=g,t(4,c)}return l.$$set=g=>{"availablePackages"in g&&t(0,s=g.availablePackages),"ghost"in g&&t(1,n=g.ghost),"existingSources"in g&&t(6,i=g.existingSources)},[s,n,r,o,c,u,i,f,d,p]}class jn extends ye{constructor(e){super(),ke(this,e,ei,Ql,be,{availablePackages:0,ghost:1,existingSources:6})}}var ti={default:{a:{viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"},{d:"M9 17v-4"},{d:"M12 17v-1"},{d:"M15 17v-2"},{d:"M12 17v-1"}]}},si={default:{a:{viewBox:"0 0 200 200",style:"enable-background:new 0 0 791.9 221.6;"},path:[{fill:"currentColor",d:"M 13.53 126.114 C 13.53 126.114 64.492 162.546 67.591 164.363 C 70.582 166.179 74.963 166.606 78.808 165.111 C 82.655 163.615 85.54 160.196 86.395 156.777 C 87.356 153.358 99.002 91.819 99.002 91.819 C 99.108 90.964 99.428 88.507 98.147 86.156 C 96.331 82.951 92.271 81.242 88.638 82.31 C 85.754 83.165 84.258 85.302 83.83 86.049 C 83.19 87.224 82.014 89.148 79.877 90.857 C 78.275 92.139 76.672 92.887 75.924 93.208 C 69.407 95.879 62.142 93.635 57.975 88.293 C 55.411 84.981 50.817 83.699 46.757 85.302 C 42.697 86.904 40.347 91.071 40.667 95.238 C 41.415 101.862 37.676 108.486 31.052 111.156 C 27.526 112.546 23.787 112.546 20.475 111.477 C 19.727 111.263 17.056 110.623 14.385 112.118 C 11.073 113.828 9.363 117.887 10.218 121.52 C 10.859 123.978 12.783 125.58 13.53 126.114 Z",style:"transform-origin: 122.948px 117.753px;"},{fill:"currentColor",d:"M 98.467 46.305 C 98.467 46.305 116.63 106.349 117.912 109.554 C 119.194 112.866 122.399 115.858 126.352 117.032 C 130.306 118.101 134.686 117.247 137.463 115.11 C 140.242 112.973 187.143 71.412 187.143 71.412 C 187.785 70.879 189.494 69.062 189.922 66.391 C 190.455 62.759 188.212 58.912 184.793 57.523 C 182.015 56.455 179.451 57.203 178.703 57.523 C 177.528 58.057 175.391 58.805 172.72 58.912 C 170.583 59.019 168.981 58.592 168.126 58.378 C 161.395 56.455 156.908 50.259 156.908 43.528 C 156.802 39.361 154.023 35.515 149.857 34.339 C 145.583 33.164 141.203 34.98 138.959 38.506 C 135.434 44.275 128.489 47.16 121.651 45.237 C 118.019 44.168 115.027 41.925 113.104 39.04 C 112.57 38.399 110.86 36.263 107.869 35.728 C 104.236 35.087 100.283 37.224 98.788 40.536 C 97.612 43.1 98.254 45.451 98.467 46.305 Z",style:"transform-origin: 122.948px 117.753px;"}]}},ni={default:{a:{role:"img",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},title:[{}],path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"},{d:"M13.5 6.5l4 4"}]}};const Wt=Object.freeze(Object.defineProperty({__proto__:null,Clipboard:ti,Motherduck:si,Pencil:ni},Symbol.toStringTag,{value:"Module"}));function li(l){const e=JSON.parse(l);return e.data&&(e.data=Bl(e.data)),e}function Ss(l){return HTMLElement.prototype.cloneNode.call(l)}function ii(l,e=()=>{}){const t=async({action:n,result:i,reset:r=!0,invalidateAll:o=!0})=>{i.type==="success"&&(r&&HTMLFormElement.prototype.reset.call(l),o&&await ql()),(location.origin+location.pathname===n.origin+n.pathname||i.type==="redirect"||i.type==="error")&&Hl(i)};async function s(n){var g,k,v,w;if(((g=n.submitter)!=null&&g.hasAttribute("formmethod")?n.submitter.formMethod:Ss(l).method)!=="post")return;n.preventDefault();const r=new URL((k=n.submitter)!=null&&k.hasAttribute("formaction")?n.submitter.formAction:Ss(l).action),o=new FormData(l),a=(v=n.submitter)==null?void 0:v.getAttribute("name");a&&o.append(a,((w=n.submitter)==null?void 0:w.getAttribute("value"))??"");const c=new AbortController;let u=!1;const d=await e({action:r,cancel:()=>u=!0,controller:c,formData:o,formElement:l,submitter:n.submitter})??t;if(u)return;let p;try{const C=await fetch(r,{method:"POST",headers:{accept:"application/json","x-sveltekit-action":"true"},cache:"no-store",body:o,signal:c.signal});p=li(await C.text()),p.type==="error"&&(p.status=C.status)}catch(C){if((C==null?void 0:C.name)==="AbortError")return;p={type:"error",error:C}}d({action:r,formData:o,formElement:l,update:C=>t({action:r,result:p,reset:C==null?void 0:C.reset,invalidateAll:C==null?void 0:C.invalidateAll}),result:p})}return HTMLFormElement.prototype.addEventListener.call(l,"submit",s),{destroy(){HTMLFormElement.prototype.removeEventListener.call(l,"submit",s)}}}const ht={collection:"map",default:!0,nodeClass:Qe,tag:"tag:yaml.org,2002:map",resolve(l,e){return Cn(l)||e("Expected a mapping for this tag"),l},createNode:(l,e,t)=>Qe.from(l,e,t)},mt={collection:"seq",default:!0,nodeClass:ot,tag:"tag:yaml.org,2002:seq",resolve(l,e){return $n(l)||e("Expected a sequence for this tag"),l},createNode:(l,e,t)=>ot.from(l,e,t)},Mt={identify:l=>typeof l=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:l=>l,stringify(l,e,t,s){return e=Object.assign({actualString:!0},e),Tn(l,e,t,s)}},Ft={identify:l=>l==null,createNode:()=>new Oe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Oe(null),stringify:({source:l},e)=>typeof l=="string"&&Ft.test.test(l)?l:e.options.nullStr},os={identify:l=>typeof l=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:l=>new Oe(l[0]==="t"||l[0]==="T"),stringify({source:l,value:e},t){if(l&&os.test.test(l)){const s=l[0]==="t"||l[0]==="T";if(e===s)return l}return e?t.options.trueStr:t.options.falseStr}};function Fe({format:l,minFractionDigits:e,tag:t,value:s}){if(typeof s=="bigint")return String(s);const n=typeof s=="number"?s:Number(s);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let i=JSON.stringify(s);if(!l&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let r=i.indexOf(".");r<0&&(r=i.length,i+=".");let o=e-(i.length-r-1);for(;o-- >0;)i+="0"}return i}const Mn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:l=>l.slice(-3).toLowerCase()==="nan"?NaN:l[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fe},Fn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:l=>parseFloat(l),stringify(l){const e=Number(l.value);return isFinite(e)?e.toExponential():Fe(l)}},Vn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(l){const e=new Oe(parseFloat(l)),t=l.indexOf(".");return t!==-1&&l[l.length-1]==="0"&&(e.minFractionDigits=l.length-t-1),e},stringify:Fe},Vt=l=>typeof l=="bigint"||Number.isInteger(l),as=(l,e,t,{intAsBigInt:s})=>s?BigInt(l):parseInt(l.substring(e),t);function Bn(l,e,t){const{value:s}=l;return Vt(s)&&s>=0?t+s.toString(e):Fe(l)}const qn={identify:l=>Vt(l)&&l>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(l,e,t)=>as(l,2,8,t),stringify:l=>Bn(l,8,"0o")},Hn={identify:Vt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(l,e,t)=>as(l,0,10,t),stringify:Fe},Rn={identify:l=>Vt(l)&&l>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(l,e,t)=>as(l,2,16,t),stringify:l=>Bn(l,16,"0x")},ri=[ht,mt,Mt,Ft,os,qn,Hn,Rn,Mn,Fn,Vn];function Is(l){return typeof l=="bigint"||Number.isInteger(l)}const At=({value:l})=>JSON.stringify(l),oi=[{identify:l=>typeof l=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:l=>l,stringify:At},{identify:l=>l==null,createNode:()=>new Oe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:At},{identify:l=>typeof l=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:l=>l==="true",stringify:At},{identify:Is,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(l,e,{intAsBigInt:t})=>t?BigInt(l):parseInt(l,10),stringify:({value:l})=>Is(l)?l.toString():JSON.stringify(l)},{identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:l=>parseFloat(l),stringify:At}],ai={default:!0,tag:"",test:/^/,resolve(l,e){return e(`Unresolved plain scalar ${JSON.stringify(l)}`),l}},ci=[ht,mt].concat(oi,ai),cs={identify:l=>l instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(l,e){if(typeof Buffer=="function")return Buffer.from(l,"base64");if(typeof atob=="function"){const t=atob(l.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let n=0;nl===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Oe(!0),stringify:Un},xn={identify:l=>l===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Oe(!1),stringify:Un},ui={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:l=>l.slice(-3).toLowerCase()==="nan"?NaN:l[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fe},fi={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:l=>parseFloat(l.replace(/_/g,"")),stringify(l){const e=Number(l.value);return isFinite(e)?e.toExponential():Fe(l)}},di={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(l){const e=new Oe(parseFloat(l.replace(/_/g,""))),t=l.indexOf(".");if(t!==-1){const s=l.substring(t+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:Fe},Et=l=>typeof l=="bigint"||Number.isInteger(l);function Bt(l,e,t,{intAsBigInt:s}){const n=l[0];if((n==="-"||n==="+")&&(e+=1),l=l.substring(e).replace(/_/g,""),s){switch(t){case 2:l=`0b${l}`;break;case 8:l=`0o${l}`;break;case 16:l=`0x${l}`;break}const r=BigInt(l);return n==="-"?BigInt(-1)*r:r}const i=parseInt(l,t);return n==="-"?-1*i:i}function us(l,e,t){const{value:s}=l;if(Et(s)){const n=s.toString(e);return s<0?"-"+t+n.substr(1):t+n}return Fe(l)}const hi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(l,e,t)=>Bt(l,2,2,t),stringify:l=>us(l,2,"0b")},mi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(l,e,t)=>Bt(l,1,8,t),stringify:l=>us(l,8,"0")},pi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(l,e,t)=>Bt(l,0,10,t),stringify:Fe},gi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(l,e,t)=>Bt(l,2,16,t),stringify:l=>us(l,16,"0x")};function fs(l,e){const t=l[0],s=t==="-"||t==="+"?l.substring(1):l,n=r=>e?BigInt(r):Number(r),i=s.replace(/_/g,"").split(":").reduce((r,o)=>r*n(60)+n(o),n(0));return t==="-"?n(-1)*i:i}function zn(l){let{value:e}=l,t=r=>r;if(typeof e=="bigint")t=r=>BigInt(r);else if(isNaN(e)||!isFinite(e))return Fe(l);let s="";e<0&&(s="-",e*=t(-1));const n=t(60),i=[e%n];return e<60?i.unshift(0):(e=(e-i[0])/n,i.unshift(e%n),e>=60&&(e=(e-i[0])/n,i.unshift(e))),s+i.map(r=>String(r).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Gn={identify:l=>typeof l=="bigint"||Number.isInteger(l),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(l,e,{intAsBigInt:t})=>fs(l,t),stringify:zn},Yn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:l=>fs(l,!1),stringify:zn},qt={identify:l=>l instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(l){const e=l.match(qt.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,s,n,i,r,o]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(t,s-1,n,i||0,r||0,o||0,a);const u=e[8];if(u&&u!=="Z"){let f=fs(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:l})=>l.toISOString().replace(/(T00:00:00)?\.000Z$/,"")},Ns=[ht,mt,Mt,Ft,Kn,xn,hi,mi,pi,gi,ui,fi,di,cs,rt,ts,ss,ns,Gn,Yn,qt],As=new Map([["core",ri],["failsafe",[ht,mt,Mt]],["json",ci],["yaml11",Ns],["yaml-1.1",Ns]]),Os={binary:cs,bool:os,float:Vn,floatExp:Fn,floatNaN:Mn,floatTime:Yn,int:Hn,intHex:Rn,intOct:qn,intTime:Gn,map:ht,merge:rt,null:Ft,omap:ts,pairs:ss,seq:mt,set:ns,timestamp:qt},_i={"tag:yaml.org,2002:binary":cs,"tag:yaml.org,2002:merge":rt,"tag:yaml.org,2002:omap":ts,"tag:yaml.org,2002:pairs":ss,"tag:yaml.org,2002:set":ns,"tag:yaml.org,2002:timestamp":qt};function xt(l,e,t){const s=As.get(e);if(s&&!l)return t&&!s.includes(rt)?s.concat(rt):s.slice();let n=s;if(!n)if(Array.isArray(l))n=[];else{const i=Array.from(As.keys()).filter(r=>r!=="yaml11").map(r=>JSON.stringify(r)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(l))for(const i of l)n=n.concat(i);else typeof l=="function"&&(n=l(n.slice()));return t&&(n=n.concat(rt)),n.reduce((i,r)=>{const o=typeof r=="string"?Os[r]:r;if(!o){const a=JSON.stringify(r),c=Object.keys(Os).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${c}`)}return i.includes(o)||i.push(o),i},[])}const vi=(l,e)=>l.keye.key?1:0;class Ht{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:n,schema:i,sortMapEntries:r,toStringDefaults:o}){this.compat=Array.isArray(e)?xt(e,"compat"):e?xt(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=n?_i:{},this.tags=xt(t,this.name,s),this.toStringOptions=o??null,Object.defineProperty(this,al,{value:ht}),Object.defineProperty(this,et,{value:Mt}),Object.defineProperty(this,cl,{value:mt}),this.sortMapEntries=typeof r=="function"?r:r===!0?vi:null}clone(){const e=Object.create(Ht.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function bi(l,e){var a;const t=[];let s=e.directives===!0;if(e.directives!==!1&&l.directives){const c=l.directives.toString(l);c?(t.push(c),s=!0):l.directives.docStart&&(s=!0)}s&&t.push("---");const n=ul(l,e),{commentString:i}=n.options;if(l.commentBefore){t.length!==1&&t.unshift("");const c=i(l.commentBefore);t.unshift(It(c,""))}let r=!1,o=null;if(l.contents){if(Dt(l.contents)){if(l.contents.spaceBefore&&s&&t.push(""),l.contents.commentBefore){const f=i(l.contents.commentBefore);t.push(It(f,""))}n.forceBlockIndent=!!l.comment,o=l.contents.comment}const c=o?void 0:()=>r=!0;let u=vs(l.contents,n,()=>o=null,c);o&&(u+=fl(u,"",i(o))),(u[0]==="|"||u[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${u}`:t.push(u)}else t.push(vs(l.contents,n));if((a=l.directives)!=null&&a.docEnd)if(l.comment){const c=i(l.comment);c.includes(` +`)?(t.push("..."),t.push(It(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=l.comment;c&&r&&(c=c.replace(/^\n+/,"")),c&&((!r||o)&&t[t.length-1]!==""&&t.push(""),t.push(It(i(c),"")))}return t.join(` +`)+` +`}class pt{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,bs,{value:ys});let n=null;typeof t=="function"||Array.isArray(t)?n=t:s===void 0&&t&&(s=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:r}=i;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(r=this.directives.yaml.version)):this.directives=new Lt({version:r}),this.setSchema(r,s),this.contents=e===void 0?null:this.createNode(e,n,s)}clone(){const e=Object.create(pt.prototype,{[bs]:{value:ys}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Dt(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){st(this.contents)&&this.contents.add(e)}addIn(e,t){st(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=dl(this);e.anchor=!t||s.has(t)?hl(t||"a",s):t}return new ls(e.anchor)}createNode(e,t,s){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const v=C=>typeof C=="number"||C instanceof String||C instanceof Number,w=t.filter(v).map(String);w.length>0&&(t=t.concat(w)),n=t}else s===void 0&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:r,flow:o,keepUndefined:a,onTagObj:c,tag:u}=s??{},{onAnchor:f,setAnchors:d,sourceObjects:p}=_l(this,r||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:p},k=ml(e,u,g);return o&&ze(k)&&(k.flow=!0),d(),k}createPair(e,t,s={}){const n=this.createNode(e,null,s),i=this.createNode(t,null,s);return new wt(n,i)}delete(e){return st(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Nt(e)?this.contents==null?!1:(this.contents=null,!0):st(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return ze(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Nt(e)?!t&&at(this.contents)?this.contents.value:this.contents:ze(this.contents)?this.contents.getIn(e,t):void 0}has(e){return ze(this.contents)?this.contents.has(e):!1}hasIn(e){return Nt(e)?this.contents!==void 0:ze(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=ks(this.schema,[e],t):st(this.contents)&&this.contents.set(e,t)}setIn(e,t){Nt(e)?this.contents=t:this.contents==null?this.contents=ks(this.schema,Array.from(e),t):st(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Lt({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Lt({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new Ht(Object.assign(s,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:n,onAnchor:i,reviver:r}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=pl(this.contents,t??"",o);if(typeof i=="function")for(const{count:c,res:u}of o.anchors.values())i(u,c);return typeof r=="function"?gl(r,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return bi(this,e)}}function st(l){if(ze(l))return!0;throw new Error("Expected a YAML collection as document contents")}function dt(l,{flow:e,indicator:t,next:s,offset:n,onError:i,parentIndent:r,startOnNewline:o}){let a=!1,c=o,u=o,f="",d="",p=!1,g=!1,k=null,v=null,w=null,C=null,S=null,F=null,M=null;for(const A of l)switch(g&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&i(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),k&&(c&&A.type!=="comment"&&A.type!=="newline"&&i(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),k=null),A.type){case"space":!e&&(t!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&A.source.includes(" ")&&(k=A),u=!0;break;case"comment":{u||i(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const B=A.source.substring(1)||" ";f?f+=d+B:f=B,d="",c=!1;break}case"newline":c?f?f+=A.source:a=!0:d+=A.source,c=!0,p=!0,(v||w)&&(C=A),u=!0;break;case"anchor":v&&i(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&i(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=A,M===null&&(M=A.offset),c=!1,u=!1,g=!0;break;case"tag":{w&&i(A,"MULTIPLE_TAGS","A node can have at most one tag"),w=A,M===null&&(M=A.offset),c=!1,u=!1,g=!0;break}case t:(v||w)&&i(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),F&&i(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e??"collection"}`),F=A,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){S&&i(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),S=A,c=!1,u=!1;break}default:i(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),c=!1,u=!1}const $=l[l.length-1],R=$?$.offset+$.source.length:n;return g&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),k&&(c&&k.indent<=r||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&i(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:S,found:F,spaceBefore:a,comment:f,hasNewline:p,anchor:v,tag:w,newlineAfterProp:C,end:R,start:M??R}}function Ct(l){if(!l)return null;switch(l.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(l.source.includes(` +`))return!0;if(l.end){for(const e of l.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of l.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Ct(e.key)||Ct(e.value))return!0}return!1;default:return!0}}function Zt(l,e,t){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===l&&(s.source==="]"||s.source==="}")&&Ct(e)&&t(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Jn(l,e,t){const{uniqueKeys:s}=l.options;if(s===!1)return!1;const n=typeof s=="function"?s:(i,r)=>i===r||at(i)&&at(r)&&i.value===r.value;return e.some(i=>n(i.key,t))}const Ls="All mapping items must start at the same column";function yi({composeNode:l,composeEmptyNode:e},t,s,n,i){var u;const r=(i==null?void 0:i.nodeClass)??Qe,o=new r(t.schema);t.atRoot&&(t.atRoot=!1);let a=s.offset,c=null;for(const f of s.items){const{start:d,key:p,sep:g,value:k}=f,v=dt(d,{indicator:"explicit-key-ind",next:p??(g==null?void 0:g[0]),offset:a,onError:n,parentIndent:s.indent,startOnNewline:!0}),w=!v.found;if(w){if(p&&(p.type==="block-seq"?n(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==s.indent&&n(a,"BAD_INDENT",Ls)),!v.anchor&&!v.tag&&!g){c=v.end,v.comment&&(o.comment?o.comment+=` +`+v.comment:o.comment=v.comment);continue}(v.newlineAfterProp||Ct(p))&&n(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((u=v.found)==null?void 0:u.indent)!==s.indent&&n(a,"BAD_INDENT",Ls);t.atKey=!0;const C=v.end,S=p?l(t,p,v,n):e(t,C,d,null,v,n);t.schema.compat&&Zt(s.indent,p,n),t.atKey=!1,Jn(t,o.items,S)&&n(C,"DUPLICATE_KEY","Map keys must be unique");const F=dt(g??[],{indicator:"map-value-ind",next:k,offset:S.range[2],onError:n,parentIndent:s.indent,startOnNewline:!p||p.type==="block-scalar"});if(a=F.end,F.found){w&&((k==null?void 0:k.type)==="block-map"&&!F.hasNewline&&n(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&v.startl&&(l.type==="block-map"||l.type==="block-seq");function wi({composeNode:l,composeEmptyNode:e},t,s,n,i){const r=s.start.source==="{",o=r?"flow map":"flow sequence",a=(i==null?void 0:i.nodeClass)??(r?Qe:ot),c=new a(t.schema);c.flow=!0;const u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=s.offset+s.start.source.length;for(let v=0;v0){const v=jt(g,k,t.options.strict,n);v.comment&&(c.comment?c.comment+=` +`+v.comment:c.comment=v.comment),c.range=[s.offset,k,v.offset]}else c.range=[s.offset,k,k];return c}function Yt(l,e,t,s,n,i){const r=t.type==="block-map"?yi(l,e,t,s,i):t.type==="block-seq"?ki(l,e,t,s,i):wi(l,e,t,s,i),o=r.constructor;return n==="!"||n===o.tagName?(r.tag=o.tagName,r):(n&&(r.tag=n),r)}function Ci(l,e,t,s,n){var d;const i=s.tag,r=i?e.directives.tagName(i.source,p=>n(i,"TAG_RESOLVE_FAILED",p)):null;if(t.type==="block-seq"){const{anchor:p,newlineAfterProp:g}=s,k=p&&i?p.offset>i.offset?p:i:p??i;k&&(!g||g.offsetp.tag===r&&p.collection===o);if(!a){const p=e.schema.knownTags[r];if(p&&p.collection===o)e.schema.tags.push(Object.assign({},p,{default:!1})),a=p;else return p!=null&&p.collection?n(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${o} collection, but expects ${p.collection}`,!0):n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,!0),Yt(l,e,t,n,r)}const c=Yt(l,e,t,n,r,a),u=((d=a.resolve)==null?void 0:d.call(a,c,p=>n(i,"TAG_RESOLVE_FAILED",p),e.options))??c,f=Dt(u)?u:new Oe(u);return f.range=c.range,f.tag=r,a!=null&&a.format&&(f.format=a.format),f}function Xn(l,e,t,s){const{value:n,type:i,comment:r,range:o}=e.type==="block-scalar"?vl(l,e,s):bl(e,l.options.strict,s),a=t?l.directives.tagName(t.source,f=>s(t,"TAG_RESOLVE_FAILED",f)):null;let c;l.options.stringKeys&&l.atKey?c=l.schema[et]:a?c=$i(l.schema,n,a,t,s):e.type==="scalar"?c=Ti(l,n,e,s):c=l.schema[et];let u;try{const f=c.resolve(n,d=>s(t??e,"TAG_RESOLVE_FAILED",d),l.options);u=at(f)?f:new Oe(f)}catch(f){const d=f instanceof Error?f.message:String(f);s(t??e,"TAG_RESOLVE_FAILED",d),u=new Oe(n)}return u.range=o,u.source=n,i&&(u.type=i),a&&(u.tag=a),c.format&&(u.format=c.format),r&&(u.comment=r),u}function $i(l,e,t,s,n){var o;if(t==="!")return l[et];const i=[];for(const a of l.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)i.push(a);else return a;for(const a of i)if((o=a.test)!=null&&o.test(e))return a;const r=l.knownTags[t];return r&&!r.collection?(l.tags.push(Object.assign({},r,{default:!1,test:void 0})),r):(n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),l[et])}function Ti({atKey:l,directives:e,schema:t},s,n,i){const r=t.tags.find(o=>{var a;return(o.default===!0||l&&o.default==="key")&&((a=o.test)==null?void 0:a.test(s))})||t[et];if(t.compat){const o=t.compat.find(a=>{var c;return a.default&&((c=a.test)==null?void 0:c.test(s))})??t[et];if(r.tag!==o.tag){const a=e.tagString(r.tag),c=e.tagString(o.tag),u=`Value may be parsed as either ${a} or ${c}`;i(n,"TAG_RESOLVE_FAILED",u,!0)}}return r}function Ei(l,e,t){if(e){t===null&&(t=e.length);for(let s=t-1;s>=0;--s){let n=e[s];switch(n.type){case"space":case"comment":case"newline":l-=n.source.length;continue}for(n=e[++s];(n==null?void 0:n.type)==="space";)l+=n.source.length,n=e[++s];break}}return l}const Si={composeNode:Wn,composeEmptyNode:ds};function Wn(l,e,t,s){const n=l.atKey,{spaceBefore:i,comment:r,anchor:o,tag:a}=t;let c,u=!0;switch(e.type){case"alias":c=Ii(l,e,s),(o||a)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Xn(l,e,a,s),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=Ci(Si,l,e,t,s),o&&(c.anchor=o.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",f),c=ds(l,e.offset,void 0,null,t,s),u=!1}}return o&&c.anchor===""&&s(o,"BAD_ALIAS","Anchor cannot be an empty string"),n&&l.options.stringKeys&&(!at(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&s(a??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),r&&(e.type==="scalar"&&e.source===""?c.comment=r:c.commentBefore=r),l.options.keepSourceTokens&&u&&(c.srcToken=e),c}function ds(l,e,t,s,{spaceBefore:n,comment:i,anchor:r,tag:o,end:a},c){const u={type:"scalar",offset:Ei(e,t,s),indent:-1,source:""},f=Xn(l,u,o,c);return r&&(f.anchor=r.source.substring(1),f.anchor===""&&c(r,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=a),f}function Ii({options:l},{offset:e,source:t,end:s},n){const i=new ls(t.substring(1));i.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const r=e+t.length,o=jt(s,r,l.strict,n);return i.range=[e,r,o.offset],o.comment&&(i.comment=o.comment),i}function Ni(l,e,{offset:t,start:s,value:n,end:i},r){const o=Object.assign({_directives:e},l),a=new pt(void 0,o),c={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},u=dt(s,{indicator:"doc-start",next:n??(i==null?void 0:i[0]),offset:t,onError:r,parentIndent:0,startOnNewline:!0});u.found&&(a.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&r(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=n?Wn(c,n,u,r):ds(c,u.end,s,null,u,r);const f=a.contents.range[2],d=jt(i,f,!1,r);return d.comment&&(a.comment=d.comment),a.range=[t,f,d.offset],a}function bt(l){if(typeof l=="number")return[l,l+1];if(Array.isArray(l))return l.length===2?l:[l[0],l[1]];const{offset:e,source:t}=l;return[e,e+(typeof t=="string"?t.length:1)]}function Ps(l){var n;let e="",t=!1,s=!1;for(let i=0;i{const r=bt(t);i?this.warnings.push(new En(r,s,n)):this.errors.push(new lt(r,s,n))},this.directives=new Lt({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:s,afterEmptyLine:n}=Ps(this.prelude);if(s){const i=e.contents;if(t)e.comment=e.comment?`${e.comment} +${s}`:s;else if(n||e.directives.docStart||!i)e.commentBefore=s;else if(ze(i)&&!i.flow&&i.items.length>0){let r=i.items[0];is(r)&&(r=r.key);const o=r.commentBefore;r.commentBefore=o?`${s} +${o}`:s}else{const r=i.commentBefore;i.commentBefore=r?`${s} +${r}`:s}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ps(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(const n of e)yield*this.next(n);yield*this.end(t,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,s,n)=>{const i=bt(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",s,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=Ni(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new lt(bt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new lt(bt(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const t=jt(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const s=this.doc.comment;this.doc.comment=s?`${s} +${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new lt(bt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),n=new pt(void 0,s);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}}class Zn{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t>1;this.lineStarts[i]=0;)switch(l[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=l[++e])==null?void 0:t.type)==="space";);return l.splice(e,l.length)}function js(l){if(l.start.type==="flow-seq-start")for(const e of l.items)e.sep&&!e.value&&!Je(e.start,"explicit-key-ind")&&!Je(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Qn(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class ms{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Sn,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=yl(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const s=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in s?s.indent:0:t.type==="flow-collection"&&s.type==="document"&&(t.indent=0),t.type==="flow-collection"&&js(t),s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{const n=s.items[s.items.length-1];if(n.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{const n=s.items[s.items.length-1];n.value?s.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=s.items[s.items.length-1];!n||n.value?s.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Ds(n.start)===-1&&(t.indent===0||n.start.every(i=>i.type!=="comment"||i.indent=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let r=[];if(i&&t.sep&&!t.value){const o=[];for(let a=0;ae.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Je(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(Qn(t.key)&&!Je(t.sep,"newline")){const o=nt(t.start),a=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:c}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(Je(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const o=nt(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):Je(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){n&&o.type!=="block-seq"&&e.items.push({start:r}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var s;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,i=Array.isArray(n)?n[n.length-1]:void 0;(i==null?void 0:i.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],i=(s=n==null?void 0:n.value)==null?void 0:s.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Je(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s&&s.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const n=Ot(s),i=nt(n);js(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(` +`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(` +`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Ot(e),s=nt(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Ot(e),s=nt(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function el(l){const e=l.prettyErrors!==!1;return{lineCounter:l.lineCounter||e&&new Zn||null,prettyErrors:e}}function Ai(l,e={}){const{lineCounter:t,prettyErrors:s}=el(e),n=new ms(t==null?void 0:t.addNewLine),i=new hs(e),r=Array.from(i.compose(n.parse(l)));if(s&&t)for(const o of r)o.errors.forEach(Pt(l,t)),o.warnings.forEach(Pt(l,t));return r.length>0?r:Object.assign([],{empty:!0},i.streamInfo())}function tl(l,e={}){const{lineCounter:t,prettyErrors:s}=el(e),n=new ms(t==null?void 0:t.addNewLine),i=new hs(e);let r=null;for(const o of i.compose(n.parse(l),!0,l.length))if(!r)r=o;else if(r.options.logLevel!=="silent"){r.errors.push(new lt(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(r.errors.forEach(Pt(l,t)),r.warnings.forEach(Pt(l,t))),r}function Oi(l,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);const n=tl(l,t);if(!n)return null;if(n.warnings.forEach(i=>kl(n.options.logLevel,i)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:s},t))}function Li(l,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const n=Math.round(t);t=n<1?void 0:n>8?{indent:8}:{indent:n}}if(l===void 0){const{keepUndefined:n}=t??e??{};if(!n)return}return In(l)&&!s?l.toString(t):new pt(l,s,t).toString(t)}const Ms=Object.freeze(Object.defineProperty({__proto__:null,Alias:ls,CST:wl,Composer:hs,Document:pt,Lexer:Sn,LineCounter:Zn,Pair:wt,Parser:ms,Scalar:Oe,Schema:Ht,YAMLError:Cl,YAMLMap:Qe,YAMLParseError:lt,YAMLSeq:ot,YAMLWarning:En,isAlias:$l,isCollection:ze,isDocument:In,isMap:Cn,isNode:Dt,isPair:is,isScalar:at,isSeq:$n,parse:Oi,parseAllDocuments:Ai,parseDocument:tl,stringify:Li,visit:Tl,visitAsync:El},Symbol.toStringTag,{value:"Module"}));function Fs(l,e,t){const s=l.slice();return s[23]=e[t],s}function Vs(l){let e,t;return e=new Nn({props:{$$slots:{default:[Pi]},$$scope:{ctx:l}}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&67108865&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Pi(l){let e=l[0].description+"",t;return{c(){t=Z(e)},l(s){t=Q(s,e)},m(s,n){N(s,t,n)},p(s,n){n&1&&e!==(e=s[0].description+"")&&he(t,e)},d(s){s&&h(t)}}}function Bs(l){let e,t="*";return{c(){e=b("sup"),e.textContent=t,this.h()},l(s){e=y(s,"SUP",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1lfjahc"&&(e.textContent=t),this.h()},h(){_(e,"class","text-red-500")},m(s,n){N(s,e,n)},d(s){s&&h(e)}}}function Di(l){let e,t,s;return{c(){e=b("input"),this.h()},l(n){e=y(n,"INPUT",{type:!0,class:!0}),this.h()},h(){e.disabled=l[6],_(e,"type","file"),_(e,"class","svelte-wh0uj")},m(n,i){N(n,e,i),t||(s=de(e,"change",l[8]),t=!0)},p(n,i){i&64&&(e.disabled=n[6])},d(n){n&&h(e),t=!1,s()}}}function ji(l){let e,t,s,n,i,r=pe(l[0].options),o=[];for(let a=0;al[20].call(e))},m(a,c){N(a,e,c),m(e,t);for(let u=0;uZe(t,"options",i)),{c(){e=b("section"),G(t.$$.fragment),this.h()},l(a){e=y(a,"SECTION",{class:!0});var c=P(e);X(t.$$.fragment,c),c.forEach(h),this.h()},h(){_(e,"class","ml-4 flex flex-col gap-2 mt-2")},m(a,c){N(a,e,c),Y(t,e,null),n=!0},p(a,c){var f;const u={};c&2&&(u.rootOptions=a[1]),c&4&&(u.reveal=a[2]),c&64&&(u.disabled=a[6]),c&17&&(u.optionSpec=(f=a[0].children)==null?void 0:f[a[4]]),!s&&c&8&&(s=!0,u.options=a[3],We(()=>s=!1)),t.$set(u)},i(a){n||(V(t.$$.fragment,a),n=!0)},o(a){H(t.$$.fragment,a),n=!1},d(a){a&&h(e),J(t)}}}function Ki(l){var R,A;let e,t,s,n,i,r,o,a,c,u,f,d,p,g,k=Object.keys(((A=(R=l[0])==null?void 0:R.children)==null?void 0:A[l[4]])??{}).length,v,w=l[0].description&&Vs(l),C=l[0].required&&Bs();function S(B,E){if(E&1&&(p=null),B[0].type==="string")return Bi;if(B[0].type==="multiline")return Vi;if(B[0].type==="boolean")return Fi;if(B[0].type==="number")return Mi;if(p==null&&(p=!!(B[0].type==="select"&&Array.isArray(B[0].options))),p)return ji;if(B[0].type==="file")return Di}let F=S(l,-1),M=F&&F(l),$=k&&Hs(l);return{c(){e=b("div"),t=b("label"),s=b("div"),n=b("p"),w&&w.c(),i=D(),r=b("span"),o=Z(l[7]),a=D(),C&&C.c(),c=D(),u=b("p"),f=Z(l[5]),d=D(),M&&M.c(),g=D(),$&&$.c(),this.h()},l(B){e=y(B,"DIV",{class:!0});var E=P(e);t=y(E,"LABEL",{class:!0});var I=P(t);s=y(I,"DIV",{class:!0});var O=P(s);n=y(O,"P",{class:!0});var L=P(n);w&&w.l(L),i=j(L),r=y(L,"SPAN",{});var T=P(r);o=Q(T,l[7]),a=j(T),C&&C.l(T),T.forEach(h),L.forEach(h),c=j(O),u=y(O,"P",{class:!0});var q=P(u);f=Q(q,l[5]),q.forEach(h),O.forEach(h),d=j(I),M&&M.l(I),I.forEach(h),g=j(E),$&&$.l(E),E.forEach(h),this.h()},h(){_(n,"class","flex items-center gap-1"),_(u,"class","text-red-500 text-xs font-bold"),_(s,"class","mr-2 inline-flex flex-col gap-1"),_(t,"class","flex justify-between w-full items-start"),Ve(t,"h-11",l[0].type!=="multiline"),Ve(t,"h-auto",l[0].type==="multiline"),_(e,"class","w-full")},m(B,E){N(B,e,E),m(e,t),m(t,s),m(s,n),w&&w.m(n,null),m(n,i),m(n,r),m(r,o),m(r,a),C&&C.m(r,null),m(s,c),m(s,u),m(u,f),m(t,d),M&&M.m(t,null),m(e,g),$&&$.m(e,null),v=!0},p(B,[E]){var I,O;B[0].description?w?(w.p(B,E),E&1&&V(w,1)):(w=Vs(B),w.c(),V(w,1),w.m(n,i)):w&&(_e(),H(w,1,1,()=>{w=null}),ve()),(!v||E&128)&&he(o,B[7]),B[0].required?C||(C=Bs(),C.c(),C.m(r,null)):C&&(C.d(1),C=null),(!v||E&32)&&he(f,B[5]),F===(F=S(B,E))&&M?M.p(B,E):(M&&M.d(1),M=F&&F(B),M&&(M.c(),M.m(t,null))),(!v||E&1)&&Ve(t,"h-11",B[0].type!=="multiline"),(!v||E&1)&&Ve(t,"h-auto",B[0].type==="multiline"),E&17&&(k=Object.keys(((O=(I=B[0])==null?void 0:I.children)==null?void 0:O[B[4]])??{}).length),k?$?($.p(B,E),E&17&&V($,1)):($=Hs(B),$.c(),V($,1),$.m(e,null)):$&&(_e(),H($,1,1,()=>{$=null}),ve())},i(B){v||(V(w),V($),v=!0)},o(B){H(w),H($),v=!1},d(B){B&&h(e),w&&w.d(),C&&C.d(),M&&M.d(),$&&$.d()}}}function xi(l,e,t){let s,n,i,{spec:r}=e,{key:o}=e,{options:a}=e,{disabled:c}=e,{rootOptions:u}=e,{reveal:f}=e;const d=`_${o}`;let p,g;r.children?r.nest?(p=d,g=a[o]??{}):(p=o,g=a):(p=o,g={});let k=a[p],v={};async function w(E){if(!E.target)return;const{files:I}=E.target;if(!I)return;const[O]=I;switch(r.fileFormat){case"json":try{t(9,a[p]=await O.text().then(L=>JSON.parse(L)),a)}catch(L){t(5,C="Failed to parse YAML file"),console.warn(L)}break;case"yaml":try{t(9,a[p]=await O.text().then(L=>Ms.parse(L)),a)}catch(L){t(5,C="Failed to parse JSON file"),console.warn(L)}break;default:{const L=await O.text();try{t(9,a[p]=JSON.parse(L),a);break}catch{}try{t(9,a[p]=Ms.parse(L),a);break}catch{}t(9,a[p]=await O.text(),a);break}}}let C="";function S(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function F(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function M(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function $(){k=this.checked,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function R(){k=bn(this.value),t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function A(){k=$t(this),t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function B(E){g=E,t(3,g),t(0,r),t(4,k),t(10,o),t(9,a),t(13,v),t(12,p),t(14,n),t(1,u)}return l.$$set=E=>{"spec"in E&&t(0,r=E.spec),"key"in E&&t(10,o=E.key),"options"in E&&t(9,a=E.options),"disabled"in E&&t(11,c=E.disabled),"rootOptions"in E&&t(1,u=E.rootOptions),"reveal"in E&&t(2,f=E.reveal)},l.$$.update=()=>{var E,I,O;if(l.$$.dirty&1025&&t(7,s=r.title??o),l.$$.dirty&3&&t(14,n=r.references?Sl.query(u,r.references):null),l.$$.dirty&16384&&n!=null&&n.length&&t(4,k=n[0]),l.$$.dirty&13849)if(r!=null&&r.children&&!Object.keys(r.children[k]??{}).length){if(t(9,a[o]=k,a),delete a[d],typeof g=="object")for(const L of Object.keys(v))delete g[L];else console.warn(`child_value_target was unexpectedly not an object ${g}`,{key:o,options:a,spec:r});t(13,v=((E=r==null?void 0:r.children)==null?void 0:E[k])??{})}else(I=r==null?void 0:r.children)!=null&&I[k]&&(r.nest?(t(12,p=d),typeof a[o]!="object"&&t(9,a[o]={},a),t(3,g=a[o])):(t(12,p=o),t(3,g=a)),t(9,a[p]=k,a),t(13,v=((O=r==null?void 0:r.children)==null?void 0:O[k])??{}));l.$$.dirty&4112&&t(9,a[p]=k,a),l.$$.dirty&18433&&t(6,i=c||r.forceReference||r.references&&n!==null)},[r,u,f,g,k,C,i,s,w,a,o,c,p,v,n,S,F,M,$,R,A,B]}class zi extends ye{constructor(e){super(),ke(this,e,xi,Ki,be,{spec:0,key:10,options:9,disabled:11,rootOptions:1,reveal:2})}}function Rs(l,e,t){const s=l.slice();return s[6]=e[t][0],s[7]=e[t][1],s}function Us(l){let e,t,s;function n(r){l[5](r)}let i={reveal:l[4],disabled:l[2],key:l[6],spec:l[7],rootOptions:l[3]};return l[0]!==void 0&&(i.options=l[0]),e=new zi({props:i}),Xe.push(()=>Ze(e,"options",n)),{c(){G(e.$$.fragment)},l(r){X(e.$$.fragment,r)},m(r,o){Y(e,r,o),s=!0},p(r,o){const a={};o&16&&(a.reveal=r[4]),o&4&&(a.disabled=r[2]),o&2&&(a.key=r[6]),o&2&&(a.spec=r[7]),o&8&&(a.rootOptions=r[3]),!t&&o&1&&(t=!0,a.options=r[0],We(()=>t=!1)),e.$set(a)},i(r){s||(V(e.$$.fragment,r),s=!0)},o(r){H(e.$$.fragment,r),s=!1},d(r){J(e,r)}}}function Gi(l){let e,t,s=pe(Object.entries(l[1])),n=[];for(let r=0;rH(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;r{"optionSpec"in c&&t(1,s=c.optionSpec),"options"in c&&t(0,n=c.options),"disabled"in c&&t(2,i=c.disabled),"rootOptions"in c&&t(3,r=c.rootOptions),"reveal"in c&&t(4,o=c.reveal)},[n,s,i,r,o,a]}class sl extends ye{constructor(e){super(),ke(this,e,Yi,Gi,be,{optionSpec:1,options:0,disabled:2,rootOptions:3,reveal:4})}}function Ji(l){let e,t="Configuration Updated";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-c31ocd"&&(e.textContent=t),this.h()},h(){_(e,"class","text-green-500 font-bold text-xs")},m(s,n){N(s,e,n)},p:ee,d(s){s&&h(e)}}}function Xi(l){let e,t;return{c(){e=b("p"),t=Z(l[3]),this.h()},l(s){e=y(s,"P",{class:!0});var n=P(e);t=Q(n,l[3]),n.forEach(h),this.h()},h(){_(e,"class","text-red-500 font-bold text-xs")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&8&&he(t,s[3])},d(s){s&&h(e)}}}function Ks(l){let e,t,s,n="Source Options",i,r,o,a;function c(f){l[15](f)}let u={reveal:l[2],disabled:l[4]||l[7],rootOptions:l[0].options,optionSpec:l[1].options};return l[0].options!==void 0&&(u.options=l[0].options),r=new sl({props:u}),Xe.push(()=>Ze(r,"options",c)),{c(){e=b("hr"),t=D(),s=b("h4"),s.textContent=n,i=D(),G(r.$$.fragment),this.h()},l(f){e=y(f,"HR",{}),t=j(f),s=y(f,"H4",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-4l22ps"&&(s.textContent=n),i=j(f),X(r.$$.fragment,f),this.h()},h(){_(s,"class","text-xs uppercase text-gray-600 font-bold")},m(f,d){N(f,e,d),N(f,t,d),N(f,s,d),N(f,i,d),Y(r,f,d),a=!0},p(f,d){const p={};d&4&&(p.reveal=f[2]),d&144&&(p.disabled=f[4]||f[7]),d&1&&(p.rootOptions=f[0].options),d&2&&(p.optionSpec=f[1].options),!o&&d&1&&(o=!0,p.options=f[0].options,We(()=>o=!1)),r.$set(p)},i(f){a||(V(r.$$.fragment,f),a=!0)},o(f){H(r.$$.fragment,f),a=!1},d(f){f&&(h(e),h(t),h(s),h(i)),J(r,f)}}}function Wi(l){let e,t="Connection Successful!";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-odatav"&&(e.textContent=t),this.h()},h(){_(e,"class","text-green-500 font-bold text-xs")},m(s,n){N(s,e,n)},p:ee,d(s){s&&h(e)}}}function Zi(l){let e,t;return{c(){e=b("p"),t=Z(l[6]),this.h()},l(s){e=y(s,"P",{class:!0});var n=P(e);t=Q(n,l[6]),n.forEach(h),this.h()},h(){_(e,"class","text-red-500 font-bold text-xs")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&64&&he(t,s[6])},d(s){s&&h(e)}}}function Qi(l){let e=l[7]?"Loading...":"Test Connection",t;return{c(){t=Z(e)},l(s){t=Q(s,e)},m(s,n){N(s,t,n)},p(s,n){n&128&&e!==(e=s[7]?"Loading...":"Test Connection")&&he(t,e)},d(s){s&&h(t)}}}function er(l){let e;return{c(){e=Z("Confirm Changes")},l(t){e=Q(t,"Confirm Changes")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function tr(l){let e,t,s,n=l[0].name+"",i,r,o,a,c,u="Source Info",f,d,p,g,k,v,w,C,S,F,M,$,R,A,B=Object.keys(l[1].options).length,E,I,O,L,T,q,U,W,x,z,se,ne;function $e(te,le){if(te[3])return Xi;if(te[5])return Ji}let Ee=$e(l),ae=Ee&&Ee(l);function Se(te){l[12](te)}function ie(te){l[13](te)}let ue={};l[0].name!==void 0&&(ue.sourceName=l[0].name),l[9]!==void 0&&(ue.nameError=l[9]),d=new Dn({props:ue}),Xe.push(()=>Ze(d,"sourceName",Se)),Xe.push(()=>Ze(d,"nameError",ie));let oe=B&&Ks(l);function we(te,le){if(te[6])return Zi;if(te[8])return Wi}let Ce=we(l),re=Ce&&Ce(l);return U=new ft({props:{outline:!0,size:"md",formaction:"?/testSource",disabled:l[7]||l[4],icon:Il,$$slots:{default:[Qi]},$$scope:{ctx:l}}}),x=new ft({props:{variant:"success",icon:wn,size:"md",disabled:l[4]||l[7],type:"submit",$$slots:{default:[er]},$$scope:{ctx:l}}}),{c(){e=b("form"),t=b("h3"),s=Z("Configure "),i=Z(n),r=D(),o=b("section"),ae&&ae.c(),a=D(),c=b("h4"),c.textContent=u,f=D(),G(d.$$.fragment),k=D(),v=b("label"),w=Z(`Source Type + `),C=b("input"),F=D(),M=b("label"),$=Z(`Reveal Secret Values + `),R=b("input"),A=D(),oe&&oe.c(),E=D(),I=b("input"),L=D(),T=b("div"),re&&re.c(),q=D(),G(U.$$.fragment),W=D(),G(x.$$.fragment),this.h()},l(te){e=y(te,"FORM",{action:!0,method:!0,class:!0});var le=P(e);t=y(le,"H3",{class:!0});var Ne=P(t);s=Q(Ne,"Configure "),i=Q(Ne,n),Ne.forEach(h),r=j(le),o=y(le,"SECTION",{class:!0});var Te=P(o);ae&&ae.l(Te),a=j(Te),c=y(Te,"H4",{class:!0,"data-svelte-h":!0}),K(c)!=="svelte-1itqiv6"&&(c.textContent=u),f=j(Te),X(d.$$.fragment,Te),k=j(Te),v=y(Te,"LABEL",{class:!0});var De=P(v);w=Q(De,`Source Type + `),C=y(De,"INPUT",{class:!0}),De.forEach(h),F=j(Te),M=y(Te,"LABEL",{class:!0});var je=P(M);$=Q(je,`Reveal Secret Values + `),R=y(je,"INPUT",{type:!0,class:!0}),je.forEach(h),A=j(Te),oe&&oe.l(Te),Te.forEach(h),E=j(le),I=y(le,"INPUT",{type:!0,name:!0}),L=j(le),T=y(le,"DIV",{class:!0});var Re=P(T);re&&re.l(Re),q=j(Re),X(U.$$.fragment,Re),W=j(Re),X(x.$$.fragment,Re),Re.forEach(h),le.forEach(h),this.h()},h(){_(t,"class","text-sm uppercase gray-600 font-bold"),_(c,"class","text-xs uppercase text-gray-600 font-bold"),C.disabled=!0,C.value=S=l[0].type,_(C,"class","rounded border border-gray-300 p-1 ml-auto w-2/3 text-gray-950 align-middle text-sm"),_(v,"class","flex justify-between"),_(R,"type","checkbox"),_(R,"class","rounded border border-gray-300 p-1 ml-auto w-5 text-gray-950 align-middle text-sm"),_(M,"class","flex justify-between"),_(o,"class","flex flex-col gap-2"),_(I,"type","hidden"),I.value=O=JSON.stringify(l[0]),_(I,"name","source"),_(T,"class","flex gap-2 justify-end items-center mt-4"),_(e,"action","?/updateSource"),_(e,"method","POST"),_(e,"class","w-full bg-gray-100 px-4 py-2 rounded")},m(te,le){N(te,e,le),m(e,t),m(t,s),m(t,i),m(e,r),m(e,o),ae&&ae.m(o,null),m(o,a),m(o,c),m(o,f),Y(d,o,null),m(o,k),m(o,v),m(v,w),m(v,C),m(o,F),m(o,M),m(M,$),m(M,R),R.checked=l[2],m(o,A),oe&&oe.m(o,null),m(e,E),m(e,I),m(e,L),m(e,T),re&&re.m(T,null),m(T,q),Y(U,T,null),m(T,W),Y(x,T,null),z=!0,se||(ne=[de(R,"change",l[14]),nl(ii.call(null,e,l[10]))],se=!0)},p(te,[le]){(!z||le&1)&&n!==(n=te[0].name+"")&&he(i,n),Ee===(Ee=$e(te))&&ae?ae.p(te,le):(ae&&ae.d(1),ae=Ee&&Ee(te),ae&&(ae.c(),ae.m(o,a)));const Ne={};!p&&le&1&&(p=!0,Ne.sourceName=te[0].name,We(()=>p=!1)),!g&&le&512&&(g=!0,Ne.nameError=te[9],We(()=>g=!1)),d.$set(Ne),(!z||le&1&&S!==(S=te[0].type)&&C.value!==S)&&(C.value=S),le&4&&(R.checked=te[2]),le&2&&(B=Object.keys(te[1].options).length),B?oe?(oe.p(te,le),le&2&&V(oe,1)):(oe=Ks(te),oe.c(),V(oe,1),oe.m(o,null)):oe&&(_e(),H(oe,1,1,()=>{oe=null}),ve()),(!z||le&1&&O!==(O=JSON.stringify(te[0])))&&(I.value=O),Ce===(Ce=we(te))&&re?re.p(te,le):(re&&re.d(1),re=Ce&&Ce(te),re&&(re.c(),re.m(T,q)));const Te={};le&144&&(Te.disabled=te[7]||te[4]),le&131200&&(Te.$$scope={dirty:le,ctx:te}),U.$set(Te);const De={};le&144&&(De.disabled=te[4]||te[7]),le&131072&&(De.$$scope={dirty:le,ctx:te}),x.$set(De)},i(te){z||(V(d.$$.fragment,te),V(oe),V(U.$$.fragment,te),V(x.$$.fragment,te),z=!0)},o(te){H(d.$$.fragment,te),H(oe),H(U.$$.fragment,te),H(x.$$.fragment,te),z=!1},d(te){te&&h(e),ae&&ae.d(),J(d),oe&&oe.d(),re&&re.d(),J(U),J(x),se=!1,Ge(ne)}}}function sr(l,e,t){let{sourcePlugin:s}=e,{source:n}=e,{sources:i}=e;const r=vn();let o;n.initialName=n.name;let a="",c=!1,u=!1,f="",d=!1,p=!1,g="";const k=({action:F,cancel:M})=>{if(t(4,c=!1),t(7,d=!1),t(9,g=Pn(n.name,i.filter($=>$!==n))),g){M();return}switch(F.search){case"?/updateSource":t(4,c=!0),t(3,a=""),t(5,u=!1);break;case"?/testSource":t(7,d=!0),t(6,f=""),t(8,p=!1);break}return({result:$,action:R})=>{var A;if($.type==="failure"){if(typeof $.data=="string")t(3,a=$.data);else if(typeof $.data=="object"&&"message"in $.data)switch(R.search){case"?/updateSource":t(3,a=$.data.message);break;case"?/testSource":t(6,f=$.data.message);break}else t(3,a="Error saving datasource.");t(4,c=!1),t(5,u=!1),t(7,d=!1),t(8,p=!1);return}switch(R.search){case"?/updateSource":$.type==="success"&&Object.assign(n,(A=$.data)==null?void 0:A.updatedSource),t(4,c=!1),t(5,u=!0),r("sourceUpdated",n);break;case"?/testSource":$.type==="success"&&t(6,f=""),t(7,d=!1),t(8,p=!0);break}}};function v(F){l.$$.not_equal(n.name,F)&&(n.name=F,t(0,n))}function w(F){g=F,t(9,g)}function C(){o=this.checked,t(2,o)}function S(F){l.$$.not_equal(n.options,F)&&(n.options=F,t(0,n))}return l.$$set=F=>{"sourcePlugin"in F&&t(1,s=F.sourcePlugin),"source"in F&&t(0,n=F.source),"sources"in F&&t(11,i=F.sources)},[n,s,o,a,c,u,f,d,p,g,k,i,v,w,C,S]}class nr extends ye{constructor(e){super(),ke(this,e,sr,tr,be,{sourcePlugin:1,source:0,sources:11})}}function lr(l){let e,t;return e=new Me({props:{src:Al,class:"w-6 h-6"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function ir(l){let e,t;return e=new Me({props:{src:Ol,class:"w-6 h-6 text-red-500"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function rr(l){let e,t;return e=new Me({props:{src:Wt[l[4]],class:"w-6 h-6"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&16&&(i.src=Wt[s[4]]),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function or(l){let e,t;return e=new Me({props:{src:Xt[l[4]],class:"w-6 h-6"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&16&&(i.src=Xt[s[4]]),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function xs(l){let e,t,s=l[0].type+"",n,i,r,o,a;return o=new Nn({props:{$$slots:{default:[ar]},$$scope:{ctx:l}}}),{c(){e=b("p"),t=Z("No connector for "),n=Z(s),i=Z(" is available"),r=D(),G(o.$$.fragment),this.h()},l(c){e=y(c,"P",{class:!0});var u=P(e);t=Q(u,"No connector for "),n=Q(u,s),i=Q(u," is available"),u.forEach(h),r=j(c),X(o.$$.fragment,c),this.h()},h(){_(e,"class","text-red-500 font-bold")},m(c,u){N(c,e,u),m(e,t),m(e,n),m(e,i),N(c,r,u),Y(o,c,u),a=!0},p(c,u){(!a||u&1)&&s!==(s=c[0].type+"")&&he(n,s);const f={};u&2048&&(f.$$scope={dirty:u,ctx:c}),o.$set(f)},i(c){a||(V(o.$$.fragment,c),a=!0)},o(c){H(o.$$.fragment,c),a=!1},d(c){c&&(h(e),h(r)),J(o,c)}}}function ar(l){let e;return{c(){e=Z("Make sure you have installed it, and included it in your evidence.plugins.yaml file")},l(t){e=Q(t,"Make sure you have installed it, and included it in your evidence.plugins.yaml file")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function cr(l){let e;return{c(){e=Z("Edit")},l(t){e=Q(t,"Edit")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function zs(l){let e,t,s,n;return t=new nr({props:{sources:l[1],source:l[0],sourcePlugin:l[2]}}),t.$on("sourceUpdated",l[10]),{c(){e=b("div"),G(t.$$.fragment),this.h()},l(i){e=y(i,"DIV",{class:!0});var r=P(e);X(t.$$.fragment,r),r.forEach(h),this.h()},h(){_(e,"class","col-span-4")},m(i,r){N(i,e,r),Y(t,e,null),n=!0},p(i,r){const o={};r&2&&(o.sources=i[1]),r&1&&(o.source=i[0]),r&4&&(o.sourcePlugin=i[2]),t.$set(o)},i(i){n||(V(t.$$.fragment,i),i&&Ae(()=>{n&&(s||(s=qe(e,He,{},!0)),s.run(1))}),n=!0)},o(i){H(t.$$.fragment,i),i&&(s||(s=qe(e,He,{},!1)),s.run(0)),n=!1},d(i){i&&h(e),J(t),i&&s&&s.end()}}}function ur(l){let e,t,s,n,i,r,o,a=l[0].name+"",c,u,f,d,p=l[0].type+"",g,k,v,w,C,S,F,M,$;const R=[or,rr,ir,lr],A=[];function B(O,L){return L&16&&(t=null),L&16&&(s=null),t==null&&(t=!!O[5](O[4])),t?0:(s==null&&(s=!!O[6](O[4])),s?1:O[2]?3:2)}n=B(l,-1),i=A[n]=R[n](l);let E=!l[2]&&xs(l);S=new ft({props:{size:"md",icon:Nl,disabled:!l[2],$$slots:{default:[cr]},$$scope:{ctx:l}}}),S.$on("click",l[9]);let I=l[3]&&zs(l);return{c(){e=b("div"),i.c(),r=D(),o=b("p"),c=Z(a),u=D(),f=b("div"),d=b("p"),g=Z(p),v=D(),E&&E.c(),w=D(),C=b("div"),G(S.$$.fragment),F=D(),I&&I.c(),M=me(),this.h()},l(O){e=y(O,"DIV",{class:!0});var L=P(e);i.l(L),r=j(L),o=y(L,"P",{});var T=P(o);c=Q(T,a),T.forEach(h),u=j(L),f=y(L,"DIV",{class:!0});var q=P(f);d=y(q,"P",{title:!0});var U=P(d);g=Q(U,p),U.forEach(h),v=j(q),E&&E.l(q),q.forEach(h),w=j(L),C=y(L,"DIV",{class:!0});var W=P(C);X(S.$$.fragment,W),W.forEach(h),L.forEach(h),F=j(O),I&&I.l(O),M=me(),this.h()},h(){var O;_(d,"title",k=(O=l[2])==null?void 0:O.package.package.name),_(f,"class","flex gap-2 items-center"),_(C,"class","flex justify-end"),_(e,"class","contents text-xs odd:bg-gray-200")},m(O,L){N(O,e,L),A[n].m(e,null),m(e,r),m(e,o),m(o,c),m(e,u),m(e,f),m(f,d),m(d,g),m(f,v),E&&E.m(f,null),m(e,w),m(e,C),Y(S,C,null),N(O,F,L),I&&I.m(O,L),N(O,M,L),$=!0},p(O,[L]){var U;let T=n;n=B(O,L),n===T?A[n].p(O,L):(_e(),H(A[T],1,1,()=>{A[T]=null}),ve(),i=A[n],i?i.p(O,L):(i=A[n]=R[n](O),i.c()),V(i,1),i.m(e,r)),(!$||L&1)&&a!==(a=O[0].name+"")&&he(c,a),(!$||L&1)&&p!==(p=O[0].type+"")&&he(g,p),(!$||L&4&&k!==(k=(U=O[2])==null?void 0:U.package.package.name))&&_(d,"title",k),O[2]?E&&(_e(),H(E,1,1,()=>{E=null}),ve()):E?(E.p(O,L),L&4&&V(E,1)):(E=xs(O),E.c(),V(E,1),E.m(f,null));const q={};L&4&&(q.disabled=!O[2]),L&2048&&(q.$$scope={dirty:L,ctx:O}),S.$set(q),O[3]?I?(I.p(O,L),L&8&&V(I,1)):(I=zs(O),I.c(),V(I,1),I.m(M.parentNode,M)):I&&(_e(),H(I,1,1,()=>{I=null}),ve())},i(O){$||(V(i),V(E),V(S.$$.fragment,O),V(I),$=!0)},o(O){H(i),H(E),H(S.$$.fragment,O),H(I),$=!1},d(O){O&&(h(e),h(F),h(M)),A[n].d(),E&&E.d(),J(S),I&&I.d(O)}}}function fr(l,e,t){let s,n,{source:i}=e,{sources:r}=e,{availableSourcePlugins:o}=e,{startOpen:a=!1}=e,c=a;const u=g=>typeof g<"u"&&g in Xt,f=g=>typeof g<"u"&&g in Wt,d=()=>t(3,c=!c),p=g=>t(0,i=g.detail);return l.$$set=g=>{"source"in g&&t(0,i=g.source),"sources"in g&&t(1,r=g.sources),"availableSourcePlugins"in g&&t(7,o=g.availableSourcePlugins),"startOpen"in g&&t(8,a=g.startOpen)},l.$$.update=()=>{l.$$.dirty&129&&t(2,s=o==null?void 0:o[i.type]),l.$$.dirty&4&&t(4,n=s==null?void 0:s.package.package.evidence.icon)},[i,r,s,c,n,u,f,o,a,d,p]}class dr extends ye{constructor(e){super(),ke(this,e,fr,ur,be,{source:0,sources:1,availableSourcePlugins:7,startOpen:8})}}function Gs(l,e,t){const s=l.slice();return s[8]=e[t],s}function Ys(l,e,t){const s=l.slice();return s[11]=e[t],s}function hr(l){let e,t,s;return t=new jn({props:{ghost:!0,availablePackages:l[5]}}),t.$on("newSource",l[6]),{c(){e=b("section"),G(t.$$.fragment),this.h()},l(n){e=y(n,"SECTION",{class:!0});var i=P(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","col-span-4")},m(n,i){N(n,e,i),Y(t,e,null),s=!0},p(n,i){const r={};i&32&&(r.availablePackages=n[5]),t.$set(r)},i(n){s||(V(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function mr(l){let e,t='

Name

Type

',s,n,i,r,o,a,c,u,f=l[4].length&&Js(l),d=pe(l[1]),p=[];for(let v=0;vH(p[v],1,1,()=>{p[v]=null});o=new ft({props:{icon:Ll,size:"md",variant:"success",$$slots:{default:[pr]},$$scope:{ctx:l}}}),o.$on("click",l[7]);let k=l[2]&&Zs(l);return{c(){e=b("div"),e.innerHTML=t,s=D(),f&&f.c(),n=D();for(let v=0;v{k=null}),ve())},i(v){if(!u){for(let w=0;wConfiguring Data Sources →`,g;const k=[mr,hr],v=[];function w(C,S){return C[1].length>0?0:1}return o=w(l),a=v[o]=k[o](l),{c(){e=b("section"),t=b("div"),s=b("h2"),s.textContent=n,i=D(),r=b("div"),a.c(),c=D(),u=b("div"),f=D(),d=b("div"),d.innerHTML=p,this.h()},l(C){e=y(C,"SECTION",{class:!0});var S=P(e);t=y(S,"DIV",{class:!0});var F=P(t);s=y(F,"H2",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-timue1"&&(s.textContent=n),i=j(F),r=y(F,"DIV",{class:!0});var M=P(r);a.l(M),M.forEach(h),c=j(F),u=y(F,"DIV",{}),P(u).forEach(h),F.forEach(h),f=j(S),d=y(S,"DIV",{class:!0,"data-svelte-h":!0}),K(d)!=="svelte-ple3bn"&&(d.innerHTML=p),S.forEach(h),this.h()},h(){_(s,"class","font-semibold text-lg mb-2"),_(r,"class","grid grid-rows-auto source-config-table gap-x-2 gap-y-2 justify-center items-center w-full svelte-2j5e0k"),_(t,"class","p-3 rounded-t w-full border-gray-200 border-t border-l border-r"),_(d,"class","p-4 rounded-b w-full bg-gray-100 text-sm border-[1px] border-gray-200"),_(e,"class","w-full mt-8")},m(C,S){N(C,e,S),m(e,t),m(t,s),m(t,i),m(t,r),v[o].m(r,null),m(t,c),m(t,u),m(e,f),m(e,d),g=!0},p(C,[S]){let F=o;o=w(C),o===F?v[o].p(C,S):(_e(),H(v[F],1,1,()=>{v[F]=null}),ve(),a=v[o],a?a.p(C,S):(a=v[o]=k[o](C),a.c()),V(a,1),a.m(r,null))},i(C){g||(V(a),g=!0)},o(C){H(a),g=!1},d(C){C&&h(e),v[o].d()}}}function _r(l,e,t){let s,{availableSourcePlugins:n={}}=e,{sources:i=[]}=e,r=i.length===0,o;function a(f){const{newSourceType:d,newSourceName:p}=f.detail;d&&(i.push({name:p,type:d,options:{},environmentVariables:{}}),t(3,o=p),t(2,r=!1))}let c=[];const u=()=>t(2,r=!r);return l.$$set=f=>{"availableSourcePlugins"in f&&t(0,n=f.availableSourcePlugins),"sources"in f&&t(1,i=f.sources)},l.$$.update=()=>{if(l.$$.dirty&1&&t(5,s=Object.values(n).reduce((f,d)=>{const p=d.package.package;return f[p.name]||(f[p.name]=d),f},{})),l.$$.dirty&2&&i.length){const f=i.reduce((d,p)=>(d.sourceNames.has(p.name)&&d.duplicateNames.add(p.name),d.sourceNames.add(p.name),d),{sourceNames:new Set,duplicateNames:new Set});t(4,c=Array.from(f.duplicateNames))}},[n,i,r,o,c,s,a,u]}class vr extends ye{constructor(e){super(),ke(this,e,_r,gr,be,{availableSourcePlugins:0,sources:1})}}function br(l){let e,t="Deploying to Evidence Cloud",s,n,i="Evidence Cloud allows you to:",r,o,a,c,u,f="<",d,p,g=">",k,v,w,C,S="Authenticate users",F,M,$="Schedule updates to your data",R,A,B="Re-build when you push changes to your project",E,I,O='';return{c(){e=b("h2"),e.textContent=t,s=D(),n=b("p"),n.textContent=i,r=D(),o=b("ul"),a=b("li"),c=Z("Host your project at "),u=b("code"),d=Z(f),p=Z("project-name"),k=Z(g),v=Z(".evidence.app"),w=D(),C=b("li"),C.textContent=S,F=D(),M=b("li"),M.textContent=$,R=D(),A=b("li"),A.textContent=B,E=D(),I=b("div"),I.innerHTML=O,this.h()},l(L){e=y(L,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-18vqxr8"&&(e.textContent=t),s=j(L),n=y(L,"P",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1p7rrak"&&(n.textContent=i),r=j(L),o=y(L,"UL",{class:!0});var T=P(o);a=y(T,"LI",{class:!0});var q=P(a);c=Q(q,"Host your project at "),u=y(q,"CODE",{});var U=P(u);d=Q(U,f),p=Q(U,"project-name"),k=Q(U,g),v=Q(U,".evidence.app"),U.forEach(h),q.forEach(h),w=j(T),C=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-19f0lwd"&&(C.textContent=S),F=j(T),M=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(M)!=="svelte-lawnhl"&&(M.textContent=$),R=j(T),A=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(A)!=="svelte-1q65sxp"&&(A.textContent=B),T.forEach(h),E=j(L),I=y(L,"DIV",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-1ki3osy"&&(I.innerHTML=O),this.h()},h(){_(e,"class","svelte-1316edx"),_(n,"class","svelte-1316edx"),_(a,"class","svelte-1316edx"),_(C,"class","svelte-1316edx"),_(M,"class","svelte-1316edx"),_(A,"class","svelte-1316edx"),_(o,"class","svelte-1316edx"),_(I,"class","new-format-buttons my-3 svelte-1316edx")},m(L,T){N(L,e,T),N(L,s,T),N(L,n,T),N(L,r,T),N(L,o,T),m(o,a),m(a,c),m(a,u),m(u,d),m(u,p),m(u,k),m(u,v),m(o,w),m(o,C),m(o,F),m(o,M),m(o,R),m(o,A),N(L,E,T),N(L,I,T)},p:ee,i:ee,o:ee,d(L){L&&(h(e),h(s),h(n),h(r),h(o),h(E),h(I))}}}class yr extends ye{constructor(e){super(),ke(this,e,null,br,be,{})}}function kr(l){let e,t,s=(l[1]?"····················":l[0])+"",n;return{c(){e=b("span"),t=new yn(!1),this.h()},l(i){e=y(i,"SPAN",{});var r=P(e);t=kn(r,!1),r.forEach(h),this.h()},h(){t.a=null,Ve(e,"text-xs",l[2])},m(i,r){N(i,e,r),t.m(s,e)},p(i,r){r&3&&s!==(s=(i[1]?"····················":i[0])+"")&&t.p(s),r&4&&Ve(e,"text-xs",i[2])},i(i){i&&(n||Ae(()=>{n=yt(e,kt,{}),n.start()}))},o:ee,d(i){i&&h(e)}}}function wr(l){let e,t="Copied",s;return{c(){e=b("span"),e.textContent=t},l(n){e=y(n,"SPAN",{"data-svelte-h":!0}),K(e)!=="svelte-18eylsc"&&(e.textContent=t)},m(n,i){N(n,e,i)},p:ee,i(n){n&&(s||Ae(()=>{s=yt(e,kt,{}),s.start()}))},o:ee,d(n){n&&h(e)}}}function Cr(l){let e,t;return e=new An({props:{class:"bx--snippet__icon"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function $r(l){let e,t;return e=new An({props:{class:"bx--snippet__icon",color:"var(--green-900)"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Tr(l){let e,t,s,n,i,r,o,a,c;function u(v,w){return v[4]?wr:kr}let f=u(l),d=f(l);const p=[$r,Cr],g=[];function k(v,w){return v[4]?0:1}return i=k(l),r=g[i]=p[i](l),{c(){e=b("button"),t=b("span"),d.c(),s=D(),n=b("div"),r.c(),this.h()},l(v){e=y(v,"BUTTON",{type:!0,class:!0});var w=P(e);t=y(w,"SPAN",{class:!0});var C=P(t);d.l(C),C.forEach(h),s=j(w),n=y(w,"DIV",{class:!0});var S=P(n);r.l(S),S.forEach(h),w.forEach(h),this.h()},h(){_(t,"class","var-value svelte-1bkhr6m"),_(n,"class","w-4 h-4"),_(e,"type","button"),_(e,"class","container h-6 w-6 svelte-1bkhr6m"),Ve(e,"copied",l[4])},m(v,w){N(v,e,w),m(e,t),d.m(t,null),m(e,s),m(e,n),g[i].m(n,null),o=!0,a||(c=de(e,"click",l[5]),a=!0)},p(v,[w]){f===(f=u(v))&&d?d.p(v,w):(d.d(1),d=f(v),d&&(d.c(),V(d,1),d.m(t,null)));let C=i;i=k(v),i!==C&&(_e(),H(g[C],1,1,()=>{g[C]=null}),ve(),r=g[i],r||(r=g[i]=p[i](v),r.c()),V(r,1),r.m(n,null)),(!o||w&16)&&Ve(e,"copied",v[4])},i(v){o||(V(d),V(r),o=!0)},o(v){H(r),o=!1},d(v){v&&h(e),d.d(),g[i].d(),a=!1,c()}}}function Er(l,e,t){let{text:s=void 0}=e,{hideText:n=!1}=e,{small:i=!1}=e,r=!1;const o=function(){t(4,r=!1)};let{copy:a=async u=>{try{r||(await navigator.clipboard.writeText(u),t(4,r=!0),setTimeout(o,2e3))}catch{}}}=e;const c=()=>{s!==void 0&&a(s)};return l.$$set=u=>{"text"in u&&t(0,s=u.text),"hideText"in u&&t(1,n=u.hideText),"small"in u&&t(2,i=u.small),"copy"in u&&t(3,a=u.copy)},[s,n,i,a,r,c]}class Ke extends ye{constructor(e){super(),ke(this,e,Er,Tr,be,{text:0,hideText:1,small:2,copy:3})}}function Sr(l){let e,t="Deploying to Netlify",s,n,i='
  • Start a new netlify project →
  • Choose the repo containing this project
  • Update the site settings to match those below
  • ',r,o,a="Basic Build Settings",c,u,f,d="Build command",p,g,k,v,w,C,S="Publish directory",F,M,$,R,A,B="Advanced Build Settings",E,I,O=`Click 'Show Advanced' add your + environment variables.`,L;return k=new Ke({props:{text:"npm run sources && npm run build"}}),$=new Ke({props:{text:"build/"}}),{c(){e=b("h2"),e.textContent=t,s=D(),n=b("ol"),n.innerHTML=i,r=D(),o=b("div"),o.textContent=a,c=D(),u=b("div"),f=b("span"),f.textContent=d,p=D(),g=b("div"),G(k.$$.fragment),v=D(),w=b("div"),C=b("span"),C.textContent=S,F=D(),M=b("div"),G($.$$.fragment),R=D(),A=b("div"),A.textContent=B,E=D(),I=b("p"),I.innerHTML=O,this.h()},l(T){e=y(T,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-a8hbx"&&(e.textContent=t),s=j(T),n=y(T,"OL",{"data-svelte-h":!0}),K(n)!=="svelte-1krc6dk"&&(n.innerHTML=i),r=j(T),o=y(T,"DIV",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-dxwvxl"&&(o.textContent=a),c=j(T),u=y(T,"DIV",{class:!0});var q=P(u);f=y(q,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-1fx13w6"&&(f.textContent=d),p=j(q),g=y(q,"DIV",{class:!0});var U=P(g);X(k.$$.fragment,U),U.forEach(h),q.forEach(h),v=j(T),w=y(T,"DIV",{class:!0});var W=P(w);C=y(W,"SPAN",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-pc7ih"&&(C.textContent=S),F=j(W),M=y(W,"DIV",{class:!0});var x=P(M);X($.$$.fragment,x),x.forEach(h),W.forEach(h),R=j(T),A=y(T,"DIV",{class:!0,"data-svelte-h":!0}),K(A)!=="svelte-1rcjgh9"&&(A.textContent=B),E=j(T),I=y(T,"P",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-9upacm"&&(I.innerHTML=O),this.h()},h(){_(e,"class","svelte-xfr0fu"),_(o,"class","separator svelte-xfr0fu"),_(f,"class","setting svelte-xfr0fu"),_(g,"class","setting-value svelte-xfr0fu"),_(u,"class","setting-row svelte-xfr0fu"),_(C,"class","setting svelte-xfr0fu"),_(M,"class","setting-value svelte-xfr0fu"),_(w,"class","setting-row svelte-xfr0fu"),_(A,"class","separator svelte-xfr0fu"),_(I,"class","svelte-xfr0fu")},m(T,q){N(T,e,q),N(T,s,q),N(T,n,q),N(T,r,q),N(T,o,q),N(T,c,q),N(T,u,q),m(u,f),m(u,p),m(u,g),Y(k,g,null),N(T,v,q),N(T,w,q),m(w,C),m(w,F),m(w,M),Y($,M,null),N(T,R,q),N(T,A,q),N(T,E,q),N(T,I,q),L=!0},i(T){L||(V(k.$$.fragment,T),V($.$$.fragment,T),L=!0)},o(T){H(k.$$.fragment,T),H($.$$.fragment,T),L=!1},d(T){T&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(v),h(w),h(R),h(A),h(E),h(I)),J(k),J($)}}}function Ir(l){let e,t="You'll need to set up a git repo before deploying to netlify.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-drfbb5"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-xfr0fu")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Nr(l){let e,t="You'll need to connect to at least one datasource before deploying to netlify.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1wqvgt"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-xfr0fu")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Ar(l){let e,t,s,n;const i=[Nr,Ir,Sr],r=[];function o(a,c){return a[1].length?a[0].gitRepo?2:1:0}return e=o(l),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){let u=e;e=o(a),e!==u&&(_e(),H(r[u],1,1,()=>{r[u]=null}),ve(),t=r[e],t||(t=r[e]=i[e](a),t.c()),V(t,1),t.m(s.parentNode,s))},i(a){n||(V(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function Or(l,e,t){let{settings:s}=e,{sources:n}=e;return l.$$set=i=>{"settings"in i&&t(0,s=i.settings),"sources"in i&&t(1,n=i.sources)},[s,n]}class Lr extends ye{constructor(e){super(),ke(this,e,Or,Ar,be,{settings:0,sources:1})}}function Pr(l){let e,t="Deploying to Vercel",s,n,i='
  • Start a new Vercel project →
  • Choose the repo containing this project
  • Configure your project to match the settings below
  • ',r,o,a="Build and Output Settings",c,u,f,d="Build Command",p,g,k,v,w,C,S="Output Directory",F,M,$,R,A,B,E="Install Command",I,O,L,T;return k=new Ke({props:{text:"npm run sources && npm run build"}}),$=new Ke({props:{text:"build/"}}),L=new Ke({props:{text:"npm install"}}),{c(){e=b("h2"),e.textContent=t,s=D(),n=b("ol"),n.innerHTML=i,r=D(),o=b("div"),o.textContent=a,c=D(),u=b("div"),f=b("span"),f.textContent=d,p=D(),g=b("div"),G(k.$$.fragment),v=D(),w=b("div"),C=b("span"),C.textContent=S,F=D(),M=b("div"),G($.$$.fragment),R=D(),A=b("div"),B=b("span"),B.textContent=E,I=D(),O=b("div"),G(L.$$.fragment),this.h()},l(q){e=y(q,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-ly0hw5"&&(e.textContent=t),s=j(q),n=y(q,"OL",{"data-svelte-h":!0}),K(n)!=="svelte-13j0dqb"&&(n.innerHTML=i),r=j(q),o=y(q,"DIV",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-fbi9z5"&&(o.textContent=a),c=j(q),u=y(q,"DIV",{class:!0});var U=P(u);f=y(U,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-2ttm1i"&&(f.textContent=d),p=j(U),g=y(U,"DIV",{class:!0});var W=P(g);X(k.$$.fragment,W),W.forEach(h),U.forEach(h),v=j(q),w=y(q,"DIV",{class:!0});var x=P(w);C=y(x,"SPAN",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-wq73qv"&&(C.textContent=S),F=j(x),M=y(x,"DIV",{class:!0});var z=P(M);X($.$$.fragment,z),z.forEach(h),x.forEach(h),R=j(q),A=y(q,"DIV",{class:!0});var se=P(A);B=y(se,"SPAN",{class:!0,"data-svelte-h":!0}),K(B)!=="svelte-xn7157"&&(B.textContent=E),I=j(se),O=y(se,"DIV",{class:!0});var ne=P(O);X(L.$$.fragment,ne),ne.forEach(h),se.forEach(h),this.h()},h(){_(e,"class","svelte-1d62oiw"),_(o,"class","separator svelte-1d62oiw"),_(f,"class","setting svelte-1d62oiw"),_(g,"class","setting-value svelte-1d62oiw"),_(u,"class","setting-row svelte-1d62oiw"),_(C,"class","setting svelte-1d62oiw"),_(M,"class","setting-value svelte-1d62oiw"),_(w,"class","setting-row svelte-1d62oiw"),_(B,"class","setting svelte-1d62oiw"),_(O,"class","setting-value svelte-1d62oiw"),_(A,"class","setting-row svelte-1d62oiw")},m(q,U){N(q,e,U),N(q,s,U),N(q,n,U),N(q,r,U),N(q,o,U),N(q,c,U),N(q,u,U),m(u,f),m(u,p),m(u,g),Y(k,g,null),N(q,v,U),N(q,w,U),m(w,C),m(w,F),m(w,M),Y($,M,null),N(q,R,U),N(q,A,U),m(A,B),m(A,I),m(A,O),Y(L,O,null),T=!0},i(q){T||(V(k.$$.fragment,q),V($.$$.fragment,q),V(L.$$.fragment,q),T=!0)},o(q){H(k.$$.fragment,q),H($.$$.fragment,q),H(L.$$.fragment,q),T=!1},d(q){q&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(v),h(w),h(R),h(A)),J(k),J($),J(L)}}}function Dr(l){let e,t="You'll need to set up a git repo before deploying to Vercel.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1urjqdt"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-1d62oiw")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function jr(l){let e,t="You'll need to connect to at least one datasource before deploying to Vercel.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1evai4d"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-1d62oiw")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Mr(l){let e,t,s,n;const i=[jr,Dr,Pr],r=[];function o(a,c){return a[1].length?a[0].gitRepo?2:1:0}return e=o(l),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){let u=e;e=o(a),e!==u&&(_e(),H(r[u],1,1,()=>{r[u]=null}),ve(),t=r[e],t||(t=r[e]=i[e](a),t.c()),V(t,1),t.m(s.parentNode,s))},i(a){n||(V(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function Fr(l,e,t){let{settings:s}=e,{sources:n}=e;return l.$$set=i=>{"settings"in i&&t(0,s=i.settings),"sources"in i&&t(1,n=i.sources)},[s,n]}class Vr extends ye{constructor(e){super(),ke(this,e,Fr,Mr,be,{settings:0,sources:1})}}function Br(l){let e,t="Deploying your Project",s,n,i="In production, Evidence functions like a static site generator:",r,o,a=`
  • Running npm run build will build a static site in the /build directory + using the credentials in the datasource connections panel, which you can host in a variety of environments
  • `,c,u,f="Building Your Project",d,p,g,k="Build command",v,w,C,S,F,M,$="Publish directory",R,A,B,E;return C=new Ke({props:{text:"npm run sources && npm run build"}}),B=new Ke({props:{text:"build/"}}),{c(){e=b("h2"),e.textContent=t,s=D(),n=b("p"),n.textContent=i,r=D(),o=b("ol"),o.innerHTML=a,c=D(),u=b("div"),u.textContent=f,d=D(),p=b("div"),g=b("span"),g.textContent=k,v=D(),w=b("div"),G(C.$$.fragment),S=D(),F=b("div"),M=b("span"),M.textContent=$,R=D(),A=b("div"),G(B.$$.fragment),this.h()},l(I){e=y(I,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1bt7a83"&&(e.textContent=t),s=j(I),n=y(I,"P",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1gcreas"&&(n.textContent=i),r=j(I),o=y(I,"OL",{"data-svelte-h":!0}),K(o)!=="svelte-1dvvhh6"&&(o.innerHTML=a),c=j(I),u=y(I,"DIV",{class:!0,"data-svelte-h":!0}),K(u)!=="svelte-1sj8kng"&&(u.textContent=f),d=j(I),p=y(I,"DIV",{class:!0});var O=P(p);g=y(O,"SPAN",{class:!0,"data-svelte-h":!0}),K(g)!=="svelte-1fx13w6"&&(g.textContent=k),v=j(O),w=y(O,"DIV",{class:!0});var L=P(w);X(C.$$.fragment,L),L.forEach(h),O.forEach(h),S=j(I),F=y(I,"DIV",{class:!0});var T=P(F);M=y(T,"SPAN",{class:!0,"data-svelte-h":!0}),K(M)!=="svelte-pc7ih"&&(M.textContent=$),R=j(T),A=y(T,"DIV",{class:!0});var q=P(A);X(B.$$.fragment,q),q.forEach(h),T.forEach(h),this.h()},h(){_(e,"class","svelte-8zw4no"),_(n,"class","svelte-8zw4no"),_(u,"class","separator svelte-8zw4no"),_(g,"class","setting svelte-8zw4no"),_(w,"class","setting-value svelte-8zw4no"),_(p,"class","setting-row svelte-8zw4no"),_(M,"class","setting svelte-8zw4no"),_(A,"class","setting-value svelte-8zw4no"),_(F,"class","setting-row svelte-8zw4no")},m(I,O){N(I,e,O),N(I,s,O),N(I,n,O),N(I,r,O),N(I,o,O),N(I,c,O),N(I,u,O),N(I,d,O),N(I,p,O),m(p,g),m(p,v),m(p,w),Y(C,w,null),N(I,S,O),N(I,F,O),m(F,M),m(F,R),m(F,A),Y(B,A,null),E=!0},p:ee,i(I){E||(V(C.$$.fragment,I),V(B.$$.fragment,I),E=!0)},o(I){H(C.$$.fragment,I),H(B.$$.fragment,I),E=!1},d(I){I&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(d),h(p),h(S),h(F)),J(C),J(B)}}}class qr extends ye{constructor(e){super(),ke(this,e,null,Br,be,{})}}function Qs(l,e,t){const s=l.slice();return s[3]=e[t],s}function en(l,e,t){const s=l.slice();return s[6]=e[t][0],s[7]=e[t][1],s}function Hr(l){let e,t;return e=new Rl({props:{$$slots:{default:[zr]},$$scope:{ctx:l}}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&1025&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Rr(l){let e,t,s,n=`GCloud authentication isn't supported in cloud deployments, as it needs access to a browser. Set + up one of the other authentication options for a deployment.`;return{c(){e=b("hr"),t=D(),s=b("p"),s.textContent=n},l(i){e=y(i,"HR",{}),t=j(i),s=y(i,"P",{"data-svelte-h":!0}),K(s)!=="svelte-x2laf0"&&(s.textContent=n)},m(i,r){N(i,e,r),N(i,t,r),N(i,s,r)},p:ee,i:ee,o:ee,d(i){i&&(h(e),h(t),h(s))}}}function Ur(l){let e,t,s,n=`External browser authentication isn't supported in cloud deployments, as it needs access to a + browser. Set up one of the other authentication options for a deployment.`;return{c(){e=b("hr"),t=D(),s=b("p"),s.textContent=n},l(i){e=y(i,"HR",{}),t=j(i),s=y(i,"P",{"data-svelte-h":!0}),K(s)!=="svelte-1m8xj5p"&&(s.textContent=n)},m(i,r){N(i,e,r),N(i,t,r),N(i,s,r)},p:ee,i:ee,o:ee,d(i){i&&(h(e),h(t),h(s))}}}function Kr(l){let e;return{c(){e=Z("Copy All")},l(t){e=Q(t,"Copy All")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function tn(l){let e,t,s,n,i,r,o,a;return s=new Ke({props:{text:l[6]}}),r=new Ke({props:{text:l[7],hideText:!0}}),{c(){e=b("div"),t=b("div"),G(s.$$.fragment),n=D(),i=b("div"),G(r.$$.fragment),o=D(),this.h()},l(c){e=y(c,"DIV",{class:!0});var u=P(e);t=y(u,"DIV",{class:!0});var f=P(t);X(s.$$.fragment,f),f.forEach(h),n=j(u),i=y(u,"DIV",{class:!0});var d=P(i);X(r.$$.fragment,d),d.forEach(h),o=j(u),u.forEach(h),this.h()},h(){_(t,"class","var-name svelte-172eppj"),_(i,"class","var-value svelte-172eppj"),_(e,"class","environment-variable svelte-172eppj")},m(c,u){N(c,e,u),m(e,t),Y(s,t,null),m(e,n),m(e,i),Y(r,i,null),m(e,o),a=!0},p(c,u){const f={};u&1&&(f.text=c[6]),s.$set(f);const d={};u&1&&(d.text=c[7]),r.$set(d)},i(c){a||(V(s.$$.fragment,c),V(r.$$.fragment,c),a=!0)},o(c){H(s.$$.fragment,c),H(r.$$.fragment,c),a=!1},d(c){c&&h(e),J(s),J(r)}}}function sn(l){let e,t,s=pe(Object.entries(l[3].environmentVariables)),n=[];for(let r=0;rH(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;rH(u[d],1,1,()=>{u[d]=null});return{c(){e=b("div"),G(t.$$.fragment),s=D(),n=b("div"),n.innerHTML=i,r=D();for(let d=0;duse different environment variable values.`,s,n,i,r,o;const a=[Ur,Rr,Hr],c=[];function u(f,d){return f[1].authenticator==="externalbrowser"?0:f[1].authenticator==="gcloud-cli"?1:2}return n=u(l),i=c[n]=a[n](l),{c(){e=b("p"),e.innerHTML=t,s=D(),i.c(),r=me()},l(f){e=y(f,"P",{"data-svelte-h":!0}),K(e)!=="svelte-m9w29g"&&(e.innerHTML=t),s=j(f),i.l(f),r=me()},m(f,d){N(f,e,d),N(f,s,d),c[n].m(f,d),N(f,r,d),o=!0},p(f,[d]){i.p(f,d)},i(f){o||(V(i),o=!0)},o(f){H(i),o=!1},d(f){f&&(h(e),h(s),h(r)),c[n].d(f)}}}function Yr(l,e,t){let{sources:s}=e,n={};function i(){const r=s.reduce((o,a)=>[o,Object.entries(a.environmentVariables).map(([c,u])=>`${c}="${u.replace(/\\n/g,` +`)}"`).join(` +`)].join(` +`),"");navigator.clipboard.writeText(r),Pl.add({title:"",status:"success",message:"Copied environment variables to clipboard"})}return l.$$set=r=>{"sources"in r&&t(0,s=r.sources)},[s,n,i]}class Jr extends ye{constructor(e){super(),ke(this,e,Yr,Gr,be,{sources:0})}}function nn(l,e,t){const s=l.slice();return s[5]=e[t],s}function ln(l){let e,t=l[5].name+"",s,n;return{c(){e=b("option"),s=Z(t),n=D(),this.h()},l(i){e=y(i,"OPTION",{});var r=P(e);s=Q(r,t),n=j(r),r.forEach(h),this.h()},h(){e.__value=l[5],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s),m(e,n)},p:ee,d(i){i&&h(e)}}}function rn(l){let e,t,s,n;var i=l[2].FormComponent;function r(o,a){return{props:{settings:o[0],sources:o[1]}}}return i&&(t=_s(i,r(l))),{c(){e=b("div"),t&&G(t.$$.fragment),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=P(e);t&&X(t.$$.fragment,a),a.forEach(h),this.h()},h(){_(e,"class","panel svelte-1kcncuj")},m(o,a){N(o,e,a),t&&Y(t,e,null),n=!0},p(o,a){if(a&4&&i!==(i=o[2].FormComponent)){if(t){_e();const c=t;H(c.$$.fragment,1,0,()=>{J(c,1)}),ve()}i?(t=_s(i,r(o)),G(t.$$.fragment),V(t.$$.fragment,1),Y(t,e,null)):t=null}else if(i){const c={};a&1&&(c.settings=o[0]),a&2&&(c.sources=o[1]),t.$set(c)}},i(o){n||(t&&V(t.$$.fragment,o),o&&Ae(()=>{n&&(s||(s=qe(e,He,{},!0)),s.run(1))}),n=!0)},o(o){t&&H(t.$$.fragment,o),o&&(s||(s=qe(e,He,{},!1)),s.run(0)),n=!1},d(o){o&&h(e),t&&J(t),o&&s&&s.end()}}}function Xr(l){let e,t,s,n,i="Deployment",r,o,a=`Evidence projects can be deployed to a variety of cloud environments. The easiest way to + deploy your project is with Evidence Cloud.`,c,u,f="Environment Variables",d,p,g,k,v,w="Deployment Environment",C,S,F,M,$,R='Learn more about Deploying your Project →',A,B,E;g=new Jr({props:{sources:l[1]}});let I=pe(l[3]),O=[];for(let T=0;Tl[4].call(S)),_(s,"class","panel svelte-1kcncuj"),_(t,"class","deploy-settings-box svelte-1kcncuj"),_($,"class","svelte-1kcncuj"),_(e,"id","deploy"),_(e,"class","svelte-1kcncuj")},m(T,q){N(T,e,q),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),m(s,u),m(s,d),m(s,p),Y(g,p,null),m(s,k),m(s,v),m(s,C),m(s,S);for(let U=0;U{L=null}),ve())},i(T){A||(V(g.$$.fragment,T),V(L),A=!0)},o(T){H(g.$$.fragment,T),H(L),A=!1},d(T){T&&h(e),J(g),Le(O,T),L&&L.d(),B=!1,E()}}}function Wr(l,e,t){let{settings:s}=e,{sources:n}=e,i=[{id:"evidence",name:"Evidence Cloud",FormComponent:yr},{id:"netlify",name:"Netlify",FormComponent:Lr},{id:"vercel",name:"Vercel",FormComponent:Vr},{id:"other",name:"Self-host (other)",FormComponent:qr}],r=i[0];function o(){r=$t(this),t(2,r),t(3,i)}return l.$$set=a=>{"settings"in a&&t(0,s=a.settings),"sources"in a&&t(1,n=a.sources)},[s,n,r,i,o]}class Zr extends ye{constructor(e){super(),ke(this,e,Wr,Xr,be,{settings:0,sources:1})}}function on(l,e,t){const s=l.slice();return s[2]=e[t],s[3]=e,s[4]=t,s}function an(l){let e,t,s=l[2].formatTag+"",n,i,r,o=l[2].formatCode+"",a,c,u,f,d,p,g,k,v=ct(l[2])+"",w,C,S,F;function M(){l[1].call(f,l[3],l[4])}return{c(){e=b("tr"),t=b("td"),n=Z(s),i=D(),r=b("td"),a=Z(o),c=D(),u=b("td"),f=b("input"),g=D(),k=b("td"),w=Z(v),C=D(),this.h()},l($){e=y($,"TR",{});var R=P(e);t=y(R,"TD",{class:!0});var A=P(t);n=Q(A,s),A.forEach(h),i=j(R),r=y(R,"TD",{class:!0});var B=P(r);a=Q(B,o),B.forEach(h),c=j(R),u=y(R,"TD",{class:!0});var E=P(u);f=y(E,"INPUT",{id:!0,placeholder:!0,class:!0}),E.forEach(h),g=j(R),k=y(R,"TD",{class:!0});var I=P(k);w=Q(I,v),I.forEach(h),C=j(R),R.forEach(h),this.h()},h(){_(t,"class","svelte-6vtoxm"),_(r,"class","svelte-6vtoxm"),_(f,"id",d="id_format_row"+l[2].formatTag),_(f,"placeholder",p=l[2].exampleInput||ut(l[2].valueType)),_(f,"class","align_left input_box svelte-6vtoxm"),_(u,"class","svelte-6vtoxm"),_(k,"class","align_right svelte-6vtoxm")},m($,R){N($,e,R),m(e,t),m(t,n),m(e,i),m(e,r),m(r,a),m(e,c),m(e,u),m(u,f),ce(f,l[2].userInput),m(e,g),m(e,k),m(k,w),m(e,C),S||(F=[de(f,"input",M),de(f,"blur",function(){es(l[2].userInput=void 0)&&(l[2].userInput=void 0).apply(this,arguments)})],S=!0)},p($,R){l=$,R&1&&s!==(s=l[2].formatTag+"")&&he(n,s),R&1&&o!==(o=l[2].formatCode+"")&&he(a,o),R&1&&d!==(d="id_format_row"+l[2].formatTag)&&_(f,"id",d),R&1&&p!==(p=l[2].exampleInput||ut(l[2].valueType))&&_(f,"placeholder",p),R&1&&f.value!==l[2].userInput&&ce(f,l[2].userInput),R&1&&v!==(v=ct(l[2])+"")&&he(w,v)},d($){$&&h(e),S=!1,Ge(F)}}}function Qr(l){let e,t,s='Format Name Format Code Example Input Example Output',n,i=pe(l[0]),r=[];for(let o=0;o{"formats"in i&&t(0,s=i.formats)},[s,n]}class ps extends ye{constructor(e){super(),ke(this,e,eo,Qr,be,{formats:0})}}function cn(l){let e,t,s,n;const i=l[4].default,r=ll(i,l,l[3],null);return{c(){e=b("div"),r&&r.c(),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=P(e);r&&r.l(a),a.forEach(h),this.h()},h(){_(e,"class","collapsibleContents svelte-hde9ry"),e.hidden=t=!l[0]},m(o,a){N(o,e,a),r&&r.m(e,null),n=!0},p(o,a){r&&r.p&&(!n||a&8)&&il(r,i,o,o[3],n?ol(i,o[3],a,null):rl(o[3]),null),(!n||a&1&&t!==(t=!o[0]))&&(e.hidden=t)},i(o){n||(V(r,o),o&&Ae(()=>{n&&(s||(s=qe(e,He,{},!0)),s.run(1))}),n=!0)},o(o){H(r,o),o&&(s||(s=qe(e,He,{},!1)),s.run(0)),n=!1},d(o){o&&h(e),r&&r.d(o),o&&s&&s.end()}}}function to(l){let e,t,s,n,i,r,o,a,c,u,f;o=new Kl({props:{toggled:l[0],size:"16"}});let d=l[0]&&cn(l);return{c(){e=b("div"),t=b("collapsibleHeader"),s=b("button"),n=b("h3"),i=Z(l[1]),r=D(),G(o.$$.fragment),a=D(),d&&d.c(),this.h()},l(p){e=y(p,"DIV",{class:!0});var g=P(e);t=y(g,"COLLAPSIBLEHEADER",{class:!0});var k=P(t);s=y(k,"BUTTON",{"area-expanded":!0,class:!0});var v=P(s);n=y(v,"H3",{class:!0});var w=P(n);i=Q(w,l[1]),w.forEach(h),r=j(v),X(o.$$.fragment,v),v.forEach(h),k.forEach(h),a=j(g),d&&d.l(g),g.forEach(h),this.h()},h(){_(n,"class","svelte-hde9ry"),_(s,"area-expanded",l[0]),_(s,"class","svelte-hde9ry"),_(t,"class","svelte-hde9ry"),_(e,"class","collapsibleSection svelte-hde9ry")},m(p,g){N(p,e,g),m(e,t),m(t,s),m(s,n),m(n,i),m(s,r),Y(o,s,null),m(e,a),d&&d.m(e,null),c=!0,u||(f=de(s,"click",Qt(l[2])),u=!0)},p(p,[g]){(!c||g&2)&&he(i,p[1]);const k={};g&1&&(k.toggled=p[0]),o.$set(k),(!c||g&1)&&_(s,"area-expanded",p[0]),p[0]?d?(d.p(p,g),g&1&&V(d,1)):(d=cn(p),d.c(),V(d,1),d.m(e,null)):d&&(_e(),H(d,1,1,()=>{d=null}),ve())},i(p){c||(V(o.$$.fragment,p),V(d),c=!0)},o(p){H(o.$$.fragment,p),H(d),c=!1},d(p){p&&h(e),J(o),d&&d.d(),u=!1,f()}}}function so(l,e,t){let{$$slots:s={},$$scope:n}=e,{headerText:i}=e,{expanded:r=!0}=e,o=()=>{t(0,r=!r)};return l.$$set=a=>{"headerText"in a&&t(1,i=a.headerText),"expanded"in a&&t(0,r=a.expanded),"$$scope"in a&&t(3,n=a.$$scope)},[r,i,o,n,s]}class it extends ye{constructor(e){super(),ke(this,e,so,to,be,{headerText:1,expanded:0})}}function un(l,e,t){const s=l.slice();return s[5]=e[t],s[6]=e,s[7]=t,s}function no(l,e,t){const s=l.slice();return s[8]=e[t],s}function lo(l){let e,t=l[8].displayName+"",s;return{c(){e=b("option"),s=Z(t),this.h()},l(n){e=y(n,"OPTION",{name:!0,id:!0});var i=P(e);s=Q(i,t),i.forEach(h),this.h()},h(){_(e,"name",l[8].primaryCode),_(e,"id",l[8].primaryCode),e.__value=l[8].primaryCode,ce(e,e.__value)},m(n,i){N(n,e,i),m(e,s)},p:ee,d(n){n&&h(e)}}}function fn(l){let e,t,s,n='Format Name Format Code Example Input Example Output',i,r=[],o=new Map,a,c,u=pe(l[0].filter(l[3]));const f=d=>d[5].formatTag;for(let d=0;d{c&&(a||(a=qe(e,He,{},!0)),a.run(1))}),c=!0}},o(d){d&&(a||(a=qe(e,He,{},!1)),a.run(0)),c=!1},d(d){d&&h(e);for(let p=0;p{r=yt(s,kt,{}),r.start()})),E&&(f||Ae(()=>{f=yt(a,kt,{}),f.start()})),E&&(M||Ae(()=>{M=yt(C,kt,{}),M.start()}))},o:ee,d(E){E&&h(t),R=!1,Ge(A)}}}function io(l){let e,t,s="Choose a currency",n,i,r,o,a,c=pe(jl),u=[];for(let d=0;dl[2].call(e))},m(d,p){N(d,e,p),m(e,t),m(e,n);for(let g=0;g{f=null}),ve())},i(d){V(f)},o(d){H(f)},d(d){d&&(h(e),h(i),h(r)),Le(u,d),f&&f.d(d),o=!1,a()}}}function ro(l,e,t){let{formats:s}=e,n="Choose a currency";function i(){n=$t(this),t(1,n)}const r=a=>a.parentFormat===n;function o(a,c){a[c].userInput=this.value,t(0,s),t(1,n)}return l.$$set=a=>{"formats"in a&&t(0,s=a.formats)},[s,n,i,r,o]}class oo extends ye{constructor(e){super(),ke(this,e,ro,io,be,{formats:0})}}function hn(l,e,t){const s=l.slice();return s[4]=e[t],s[5]=e,s[6]=t,s}function mn(l){let e,t,s=l[4].formatTag+"",n,i,r,o=l[4].formatCode+"",a,c,u,f,d,p,g,k,v=ct(l[4])+"",w,C,S,F,M,$,R,A,B,E;function I(){l[2].call(f,l[5],l[6])}$=new Me({props:{src:rs}});function O(){return l[3](l[4])}return{c(){e=b("tr"),t=b("td"),n=Z(s),i=D(),r=b("td"),a=Z(o),c=D(),u=b("td"),f=b("input"),g=D(),k=b("td"),w=Z(v),C=D(),S=b("td"),F=b("button"),M=b("div"),G($.$$.fragment),R=D(),this.h()},l(L){e=y(L,"TR",{});var T=P(e);t=y(T,"TD",{class:!0});var q=P(t);n=Q(q,s),q.forEach(h),i=j(T),r=y(T,"TD",{class:!0});var U=P(r);a=Q(U,o),U.forEach(h),c=j(T),u=y(T,"TD",{class:!0});var W=P(u);f=y(W,"INPUT",{id:!0,placeholder:!0,class:!0}),W.forEach(h),g=j(T),k=y(T,"TD",{class:!0});var x=P(k);w=Q(x,v),x.forEach(h),C=j(T),S=y(T,"TD",{class:!0});var z=P(S);F=y(z,"BUTTON",{type:!0,tooltip:!0,class:!0});var se=P(F);M=y(se,"DIV",{class:!0});var ne=P(M);X($.$$.fragment,ne),ne.forEach(h),se.forEach(h),z.forEach(h),R=j(T),T.forEach(h),this.h()},h(){_(t,"class","svelte-hjwpz"),_(r,"class","svelte-hjwpz"),_(f,"id",d="id_format_row"+l[4].formatTag),_(f,"placeholder",p=l[4].exampleInput||ut(l[4].valueType)),_(f,"class","align_left input_box svelte-hjwpz"),_(u,"class","svelte-hjwpz"),_(k,"class","align_right svelte-hjwpz"),_(M,"class","deleteIcon svelte-hjwpz"),_(F,"type","button"),_(F,"tooltip","Remove"),_(F,"class","mb-0.5 svelte-hjwpz"),_(S,"class","svelte-hjwpz")},m(L,T){N(L,e,T),m(e,t),m(t,n),m(e,i),m(e,r),m(r,a),m(e,c),m(e,u),m(u,f),ce(f,l[4].userInput),m(e,g),m(e,k),m(k,w),m(e,C),m(e,S),m(S,F),m(F,M),Y($,M,null),m(e,R),A=!0,B||(E=[de(f,"input",I),de(f,"blur",function(){es(l[4].userInput=void 0)&&(l[4].userInput=void 0).apply(this,arguments)}),de(F,"click",O)],B=!0)},p(L,T){l=L,(!A||T&1)&&s!==(s=l[4].formatTag+"")&&he(n,s),(!A||T&1)&&o!==(o=l[4].formatCode+"")&&he(a,o),(!A||T&1&&d!==(d="id_format_row"+l[4].formatTag))&&_(f,"id",d),(!A||T&1&&p!==(p=l[4].exampleInput||ut(l[4].valueType)))&&_(f,"placeholder",p),T&1&&f.value!==l[4].userInput&&ce(f,l[4].userInput),(!A||T&1)&&v!==(v=ct(l[4])+"")&&he(w,v)},i(L){A||(V($.$$.fragment,L),A=!0)},o(L){H($.$$.fragment,L),A=!1},d(L){L&&h(e),J($),B=!1,Ge(E)}}}function ao(l){let e,t,s='Format Name Format Code Example Input Example Output ',n,i,r=pe(l[0]),o=[];for(let c=0;cH(o[c],1,1,()=>{o[c]=null});return{c(){e=b("table"),t=b("thead"),t.innerHTML=s,n=D();for(let c=0;cn(o);return l.$$set=o=>{"formats"in o&&t(0,s=o.formats),"deleteHandler"in o&&t(1,n=o.deleteHandler)},[s,n,i,r]}class uo extends ye{constructor(e){super(),ke(this,e,co,ao,be,{formats:0,deleteHandler:1})}}function pn(l,e,t){const s=l.slice();return s[14]=e[t],s}function gn(l){let e,t;return e=new it({props:{headerText:"Saved Custom Formats",expanded:!1,$$slots:{default:[fo]},$$scope:{ctx:l}}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&131073&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function fo(l){let e,t;return e=new uo({props:{formats:l[0].customFormats,deleteHandler:l[6]}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&1&&(i.formats=s[0].customFormats),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function _n(l){let e,t=l[14]+"",s,n;return{c(){e=b("option"),s=Z(t),n=D(),this.h()},l(i){e=y(i,"OPTION",{});var r=P(e);s=Q(r,t),n=j(r),r.forEach(h),this.h()},h(){e.__value=l[14],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s),m(e,n)},p:ee,d(i){i&&h(e)}}}function ho(l){let e,t,s,n,i="Value Type",r,o,a,c,u,f="Format Name",d,p,g,k,v,w="Format Code",C,S,F,M,$,R,A,B,E,I,O,L,T,q,U=l[0].customFormats&&l[0].customFormats.length>0&&gn(l),W=pe(l[5]),x=[];for(let z=0;zl[9].call(o)),_(s,"class","input-item svelte-19ljrgt"),_(u,"for","formatTag"),_(u,"class","svelte-19ljrgt"),_(p,"id","formatTag"),_(p,"type","text"),_(p,"placeholder","myformat"),_(p,"class","svelte-19ljrgt"),_(c,"class","input-item svelte-19ljrgt"),_(v,"for","formatCode"),_(v,"class","svelte-19ljrgt"),_(S,"id","formatCode"),_(S,"type","text"),_(S,"placeholder",F=l[3]==="date"?"mm/dd/yyyy":"$#,##0.0"),_(S,"class","svelte-19ljrgt"),_(k,"class","input-item svelte-19ljrgt"),_(R,"id","submitCustomFormatButton"),_(R,"type","submit"),R.disabled=B=!(l[1]&&l[2]),_(R,"class","svelte-19ljrgt"),_($,"class","new-format-buttons svelte-19ljrgt"),O.a=null,_(I,"class","error svelte-19ljrgt"),_(t,"autocomplete","off"),_(t,"class","addFormatForm")},m(z,se){U&&U.m(z,se),N(z,e,se),N(z,t,se),m(t,s),m(s,n),m(s,r),m(s,o);for(let ne=0;ne0?U?(U.p(z,se),se&1&&V(U,1)):(U=gn(z),U.c(),V(U,1),U.m(e.parentNode,e)):U&&(_e(),H(U,1,1,()=>{U=null}),ve()),se&32){W=pe(z[5]);let ne;for(ne=0;ne0)t(4,c=w.join("
    "));else{let S=await(await fetch(Jt("/api/customFormattingSettings.json"),{method:"POST",body:JSON.stringify({newCustomFormat:{formatTag:r,formatCode:o,valueType:a}})})).json();S?(t(0,n=S),d()):t(4,c=`Unable to create new custom format ${r}`)}}function d(){t(1,r=""),t(2,o=""),t(3,a="number"),t(4,c="")}function p(){var M;let w=[];/^[a-zA-Z][a-zA-Z0-9]*$/.test(r)||w.push(`"${r}" is not a valid format name. The format name should always start with a letter and only contain letters and numbers.`);let C=10,S,F;a==="date"&&(C=new Date);try{S=Vl.format(o,C)}catch($){F=$}return S||w.push(`Format "${o}" is invalid for type "${a}".`),F&&w.push(F),(s.find($=>$.formatTag===r)||(M=n.customFormats)!=null&&M.find($=>$.formatTag===r))&&w.push(`The format name "${r}"" is already assigned to an existing format.`),w}function g(){a=$t(this),t(3,a),t(5,i)}function k(){r=this.value,t(1,r)}function v(){o=this.value,t(2,o)}return l.$$set=w=>{"builtInFormats"in w&&t(8,s=w.builtInFormats),"customFormattingSettings"in w&&t(0,n=w.customFormattingSettings)},[n,r,o,a,c,i,u,f,s,g,k,v]}class po extends ye{constructor(e){super(),ke(this,e,mo,ho,be,{builtInFormats:8,customFormattingSettings:0})}}function go(l){let e,t;return e=new ps({props:{formats:Tt.filter(ko)}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function _o(l){let e,t;return e=new oo({props:{formats:Tt.filter(wo)}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function vo(l){let e,t;return e=new ps({props:{formats:Tt.filter(Co)}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function bo(l){let e,t;return e=new ps({props:{formats:Tt.filter($o)}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function yo(l){let e,t,s,n,i="Value Formatting",r,o,a=`Evidence supports built-in formats (like usd and pct) and + Excel-style formats (like $#,##0.0). The easiest way to apply these formats is + using component props. For example:`,c,u,f="In the Value component, you can use the fmt prop",d,p,g,k,v,w,C,S="In charts, you can use the xFmt and yFmt props",F,M,$,R,A,B,E,I=`You can also set formats within your SQL queries using SQL format tags. Use these by + aliasing your column names and appending a format. For example:`,O,L,T,q,U,W,x,z,se="Built-in Formats",ne,$e,Ee="All built-in formats are listed below for reference.",ae,Se,ie,ue,oe,we,Ce,re,te,le,Ne,Te="Custom Formats",De,je,Re='Add new formats to your project. Custom formats use excel-style format codes.',Rt,xe,Ut,Ye,gs='Learn more about formatting in Evidence →',St;return g=new Kt({props:{code:l[3]}}),$=new Kt({props:{code:l[2]}}),T=new Kt({props:{code:l[1]}}),Se=new it({props:{headerText:"Dates",expanded:!1,$$slots:{default:[go]},$$scope:{ctx:l}}}),ue=new it({props:{headerText:"Currencies",expanded:!1,$$slots:{default:[_o]},$$scope:{ctx:l}}}),we=new it({props:{headerText:"Numbers",expanded:!1,$$slots:{default:[vo]},$$scope:{ctx:l}}}),re=new it({props:{headerText:"Percentages",expanded:!1,$$slots:{default:[bo]},$$scope:{ctx:l}}}),xe=new po({props:{builtInFormats:Tt,customFormattingSettings:l[0]}}),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=D(),o=b("p"),o.innerHTML=a,c=D(),u=b("p"),u.innerHTML=f,d=D(),p=b("div"),G(g.$$.fragment),k=D(),v=b("br"),w=D(),C=b("p"),C.innerHTML=S,F=D(),M=b("div"),G($.$$.fragment),R=D(),A=b("br"),B=D(),E=b("p"),E.textContent=I,O=D(),L=b("div"),G(T.$$.fragment),q=D(),U=b("p"),W=D(),x=b("div"),z=b("h2"),z.textContent=se,ne=D(),$e=b("p"),$e.textContent=Ee,ae=D(),G(Se.$$.fragment),ie=D(),G(ue.$$.fragment),oe=D(),G(we.$$.fragment),Ce=D(),G(re.$$.fragment),te=D(),le=b("div"),Ne=b("h2"),Ne.textContent=Te,De=D(),je=b("p"),je.innerHTML=Re,Rt=D(),G(xe.$$.fragment),Ut=D(),Ye=b("footer"),Ye.innerHTML=gs,this.h()},l(fe){e=y(fe,"FORM",{id:!0,class:!0});var Ie=P(e);t=y(Ie,"DIV",{class:!0});var Ue=P(t);s=y(Ue,"DIV",{class:!0});var ge=P(s);n=y(ge,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1pt91sq"&&(n.textContent=i),r=j(ge),o=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-y867uy"&&(o.innerHTML=a),c=j(ge),u=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(u)!=="svelte-1b5sps4"&&(u.innerHTML=f),d=j(ge),p=y(ge,"DIV",{class:!0});var gt=P(p);X(g.$$.fragment,gt),gt.forEach(h),k=j(ge),v=y(ge,"BR",{}),w=j(ge),C=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-1uln7kb"&&(C.innerHTML=S),F=j(ge),M=y(ge,"DIV",{class:!0});var _t=P(M);X($.$$.fragment,_t),_t.forEach(h),R=j(ge),A=y(ge,"BR",{}),B=j(ge),E=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(E)!=="svelte-146t22d"&&(E.textContent=I),O=j(ge),L=y(ge,"DIV",{class:!0});var vt=P(L);X(T.$$.fragment,vt),vt.forEach(h),q=j(ge),U=y(ge,"P",{class:!0}),P(U).forEach(h),ge.forEach(h),W=j(Ue),x=y(Ue,"DIV",{class:!0});var Pe=P(x);z=y(Pe,"H2",{class:!0,"data-svelte-h":!0}),K(z)!=="svelte-ef4j4e"&&(z.textContent=se),ne=j(Pe),$e=y(Pe,"P",{class:!0,"data-svelte-h":!0}),K($e)!=="svelte-1uuy1j1"&&($e.textContent=Ee),ae=j(Pe),X(Se.$$.fragment,Pe),ie=j(Pe),X(ue.$$.fragment,Pe),oe=j(Pe),X(we.$$.fragment,Pe),Ce=j(Pe),X(re.$$.fragment,Pe),Pe.forEach(h),te=j(Ue),le=y(Ue,"DIV",{class:!0});var tt=P(le);Ne=y(tt,"H2",{class:!0,"data-svelte-h":!0}),K(Ne)!=="svelte-1avfhcl"&&(Ne.textContent=Te),De=j(tt),je=y(tt,"P",{class:!0,"data-svelte-h":!0}),K(je)!=="svelte-zf74ph"&&(je.innerHTML=Re),Rt=j(tt),X(xe.$$.fragment,tt),tt.forEach(h),Ue.forEach(h),Ut=j(Ie),Ye=y(Ie,"FOOTER",{class:!0,"data-svelte-h":!0}),K(Ye)!=="svelte-1yt3qws"&&(Ye.innerHTML=gs),Ie.forEach(h),this.h()},h(){_(n,"class","svelte-e6lr4p"),_(o,"class","svelte-e6lr4p"),_(u,"class","svelte-e6lr4p"),_(p,"class","code-container p-2 svelte-e6lr4p"),_(C,"class","svelte-e6lr4p"),_(M,"class","code-container p-2 svelte-e6lr4p"),_(E,"class","svelte-e6lr4p"),_(L,"class","code-container p-2 svelte-e6lr4p"),_(U,"class","svelte-e6lr4p"),_(s,"class","panel svelte-e6lr4p"),_(z,"class","svelte-e6lr4p"),_($e,"class","svelte-e6lr4p"),_(x,"class","panel svelte-e6lr4p"),_(Ne,"class","svelte-e6lr4p"),_(je,"class","svelte-e6lr4p"),_(le,"class","panel svelte-e6lr4p"),_(t,"class","formatting-settings-box svelte-e6lr4p"),_(Ye,"class","svelte-e6lr4p"),_(e,"id","formatting"),_(e,"class","svelte-e6lr4p")},m(fe,Ie){N(fe,e,Ie),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),m(s,u),m(s,d),m(s,p),Y(g,p,null),m(s,k),m(s,v),m(s,w),m(s,C),m(s,F),m(s,M),Y($,M,null),m(s,R),m(s,A),m(s,B),m(s,E),m(s,O),m(s,L),Y(T,L,null),m(s,q),m(s,U),m(t,W),m(t,x),m(x,z),m(x,ne),m(x,$e),m(x,ae),Y(Se,x,null),m(x,ie),Y(ue,x,null),m(x,oe),Y(we,x,null),m(x,Ce),Y(re,x,null),m(t,te),m(t,le),m(le,Ne),m(le,De),m(le,je),m(le,Rt),Y(xe,le,null),m(e,Ut),m(e,Ye),St=!0},p(fe,[Ie]){const Ue={};Ie&16&&(Ue.$$scope={dirty:Ie,ctx:fe}),Se.$set(Ue);const ge={};Ie&16&&(ge.$$scope={dirty:Ie,ctx:fe}),ue.$set(ge);const gt={};Ie&16&&(gt.$$scope={dirty:Ie,ctx:fe}),we.$set(gt);const _t={};Ie&16&&(_t.$$scope={dirty:Ie,ctx:fe}),re.$set(_t);const vt={};Ie&1&&(vt.customFormattingSettings=fe[0]),xe.$set(vt)},i(fe){St||(V(g.$$.fragment,fe),V($.$$.fragment,fe),V(T.$$.fragment,fe),V(Se.$$.fragment,fe),V(ue.$$.fragment,fe),V(we.$$.fragment,fe),V(re.$$.fragment,fe),V(xe.$$.fragment,fe),St=!0)},o(fe){H(g.$$.fragment,fe),H($.$$.fragment,fe),H(T.$$.fragment,fe),H(Se.$$.fragment,fe),H(ue.$$.fragment,fe),H(we.$$.fragment,fe),H(re.$$.fragment,fe),H(xe.$$.fragment,fe),St=!1},d(fe){fe&&h(e),J(g),J($),J(T),J(Se),J(ue),J(we),J(re),J(xe)}}}const ko=l=>l.formatCategory==="date",wo=l=>l.formatCategory==="currency",Co=l=>l.formatCategory==="number",$o=l=>l.formatCategory==="percent";function To(l,e,t){let{customFormattingSettings:s}=e,n=`select + growth as growth_pct, -- formatted as a percentage + sales as sales_usd -- formatted as US dollars +from table`,i=``,r="";return l.$$set=o=>{"customFormattingSettings"in o&&t(0,s=o.customFormattingSettings)},[s,n,i,r]}class Eo extends ye{constructor(e){super(),ke(this,e,To,yo,be,{customFormattingSettings:0})}}function So(l){let e,t,s="Each time you run a query, we get the following pieces of information:",n,i,r="
  • A random identifier that is stored in .evidence/customization/.profile.json
  • An anonymized identifier based on the git repository you're using for the project
  • Whether your project is running in development or build mode
  • Whether your query returned from the cache, from your datasource, or returned an error
  • The type of Evidence datasource connectors you are using (postgres, snowflake, etc.)
  • The operating system your project is running on (windows, mac, etc.)
  • ",o,a,c="Sharing anonymous usage data is one of the best ways you can support Evidence.",u,f,d,p="Share anonymous usage data",g,k,v,w,C,S,F;return{c(){e=b("div"),t=b("p"),t.textContent=s,n=D(),i=b("ol"),i.innerHTML=r,o=D(),a=b("p"),a.textContent=c,u=D(),f=b("div"),d=b("label"),d.textContent=p,g=D(),k=b("label"),v=b("input"),w=D(),C=b("span"),this.h()},l(M){e=y(M,"DIV",{});var $=P(e);t=y($,"P",{class:!0,"data-svelte-h":!0}),K(t)!=="svelte-5h9nz3"&&(t.textContent=s),n=j($),i=y($,"OL",{class:!0,"data-svelte-h":!0}),K(i)!=="svelte-1yd05qf"&&(i.innerHTML=r),o=j($),a=y($,"P",{class:!0,"data-svelte-h":!0}),K(a)!=="svelte-1o2o3k3"&&(a.textContent=c),u=j($),f=y($,"DIV",{class:!0});var R=P(f);d=y(R,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),K(d)!=="svelte-2u0hrt"&&(d.textContent=p),g=j(R),k=y(R,"LABEL",{class:!0});var A=P(k);v=y(A,"INPUT",{type:!0,id:!0,class:!0}),w=j(A),C=y(A,"SPAN",{class:!0}),P(C).forEach(h),A.forEach(h),R.forEach(h),$.forEach(h),this.h()},h(){_(t,"class","svelte-v1sgh9"),_(i,"class","list-decimal px-8"),_(a,"class","svelte-v1sgh9"),_(d,"for","telemetry-toggle"),_(d,"class","svelte-v1sgh9"),_(v,"type","checkbox"),_(v,"id","telemetry-toggle"),_(v,"class","svelte-v1sgh9"),_(C,"class","slider svelte-v1sgh9"),_(k,"class","switch svelte-v1sgh9"),_(f,"class","input-item svelte-v1sgh9")},m(M,$){N(M,e,$),m(e,t),m(e,n),m(e,i),m(e,o),m(e,a),m(e,u),m(e,f),m(f,d),m(f,g),m(f,k),m(k,v),v.checked=l[0],m(k,w),m(k,C),S||(F=[de(v,"change",l[3]),de(v,"change",l[1])],S=!0)},p(M,$){$&1&&(v.checked=M[0])},d(M){M&&h(e),S=!1,Ge(F)}}}function Io(l){let e,t,s,n,i="Telemetry",r,o,a=`Evidence collects anonymous usage data to help us understand how often the tool is being + used.`,c,u,f,d,p='The source code for our telemetry can be found here →',g;return u=new it({props:{headerText:"More",expanded:!1,$$slots:{default:[So]},$$scope:{ctx:l}}}),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=D(),o=b("p"),o.textContent=a,c=D(),G(u.$$.fragment),f=D(),d=b("footer"),d.innerHTML=p,this.h()},l(k){e=y(k,"FORM",{id:!0,class:!0});var v=P(e);t=y(v,"DIV",{class:!0});var w=P(t);s=y(w,"DIV",{class:!0});var C=P(s);n=y(C,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-picrrj"&&(n.textContent=i),r=j(C),o=y(C,"P",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-1tknaya"&&(o.textContent=a),c=j(C),X(u.$$.fragment,C),C.forEach(h),w.forEach(h),f=j(v),d=y(v,"FOOTER",{class:!0,"data-svelte-h":!0}),K(d)!=="svelte-1fitj1j"&&(d.innerHTML=p),v.forEach(h),this.h()},h(){_(n,"class","svelte-v1sgh9"),_(o,"class","svelte-v1sgh9"),_(s,"class","panel svelte-v1sgh9"),_(t,"class","telemetry-settings-box svelte-v1sgh9"),_(d,"class","svelte-v1sgh9"),_(e,"id","telemetry"),_(e,"class","svelte-v1sgh9")},m(k,v){N(k,e,v),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),Y(u,s,null),m(e,f),m(e,d),g=!0},p(k,[v]){const w={};v&17&&(w.$$scope={dirty:v,ctx:k}),u.$set(w)},i(k){g||(V(u.$$.fragment,k),g=!0)},o(k){H(u.$$.fragment,k),g=!1},d(k){k&&h(e),J(u)}}}function No(l,e,t){let{settings:s}=e,n=(s.send_anonymous_usage_stats??"yes")==="yes";async function i(){t(2,s.send_anonymous_usage_stats=n?"yes":"no",s),await fetch(Jt("/api/settings.json"),{method:"POST",body:JSON.stringify({settings:s})})}function r(){n=this.checked,t(0,n)}return l.$$set=o=>{"settings"in o&&t(2,s=o.settings)},[n,i,s,r]}class Ao extends ye{constructor(e){super(),ke(this,e,No,Io,be,{settings:2})}}function Oo(l){let e,t,s;return t=new Me({props:{src:rs,theme:"filled",class:"h-6 w-6 text-red-700"}}),{c(){e=b("span"),G(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=P(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitx-icon svelte-1riw2gy")},m(n,i){N(n,e,i),Y(t,e,null),s=!0},i(n){s||(V(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Lo(l){let e,t,s;return t=new Me({props:{src:On,theme:"filled",class:"h-6 w-6 text-green-700"}}),{c(){e=b("span"),G(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=P(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitcheck-icon svelte-1riw2gy")},m(n,i){N(n,e,i),Y(t,e,null),s=!0},i(n){s||(V(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Po(l){let e,t,s,n,i="Use your code editor to initialize a repo or run `git init` in a terminal",r;return t=new Me({props:{src:Ln,class:"h-5 w-5 pb-0.5"}}),{c(){e=b("span"),G(t.$$.fragment),s=D(),n=b("span"),n.textContent=i,this.h()},l(o){e=y(o,"SPAN",{class:!0});var a=P(e);X(t.$$.fragment,a),s=j(a),n=y(a,"SPAN",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-qlaf2o"&&(n.textContent=i),a.forEach(h),this.h()},h(){_(n,"class","info-msg svelte-1riw2gy"),_(e,"class","help-icon svelte-1riw2gy")},m(o,a){N(o,e,a),Y(t,e,null),m(e,s),m(e,n),r=!0},p:ee,i(o){r||(V(t.$$.fragment,o),r=!0)},o(o){H(t.$$.fragment,o),r=!1},d(o){o&&h(e),J(t)}}}function Do(l){let e,t,s,n=l[0].localGitRepo+"",i;return{c(){e=b("div"),t=b("span"),s=Z("Tracking "),i=Z(n),this.h()},l(r){e=y(r,"DIV",{class:!0});var o=P(e);t=y(o,"SPAN",{class:!0});var a=P(t);s=Q(a,"Tracking "),i=Q(a,n),a.forEach(h),o.forEach(h),this.h()},h(){_(t,"class","repo-location svelte-1riw2gy"),_(e,"class","result-msg svelte-1riw2gy")},m(r,o){N(r,e,o),m(e,t),m(t,s),m(t,i)},p(r,o){o&1&&n!==(n=r[0].localGitRepo+"")&&he(i,n)},i:ee,o:ee,d(r){r&&h(e)}}}function jo(l){let e,t,s;return t=new Me({props:{src:rs,theme:"filled",class:"h-6 w-6 text-red-700"}}),{c(){e=b("span"),G(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=P(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitx-icon svelte-1riw2gy")},m(n,i){N(n,e,i),Y(t,e,null),s=!0},i(n){s||(V(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Mo(l){let e,t,s;return t=new Me({props:{src:On,theme:"filled",class:"h-6 w-6 text-green-700"}}),{c(){e=b("span"),G(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=P(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitcheck-icon svelte-1riw2gy")},m(n,i){N(n,e,i),Y(t,e,null),s=!0},i(n){s||(V(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Fo(l){let e,t,s,n,i="Publish your git repo to a platform like GitHub or GitLab",r;return t=new Me({props:{src:Ln,class:"h-5 w-5 pb-0.5"}}),{c(){e=b("span"),G(t.$$.fragment),s=D(),n=b("span"),n.textContent=i,this.h()},l(o){e=y(o,"SPAN",{class:!0});var a=P(e);X(t.$$.fragment,a),s=j(a),n=y(a,"SPAN",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-mv1gko"&&(n.textContent=i),a.forEach(h),this.h()},h(){_(n,"class","info-msg svelte-1riw2gy"),_(e,"class","help-icon svelte-1riw2gy")},m(o,a){N(o,e,a),Y(t,e,null),m(e,s),m(e,n),r=!0},p:ee,i(o){r||(V(t.$$.fragment,o),r=!0)},o(o){H(t.$$.fragment,o),r=!1},d(o){o&&h(e),J(t)}}}function Vo(l){let e,t,s,n=l[0].gitRepo.replace(".git","")+"",i,r;return{c(){e=b("div"),t=b("a"),s=b("span"),i=Z(n),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=P(e);t=y(a,"A",{href:!0,target:!0,rel:!0});var c=P(t);s=y(c,"SPAN",{class:!0});var u=P(s);i=Q(u,n),u.forEach(h),c.forEach(h),a.forEach(h),this.h()},h(){_(s,"class","repo-location svelte-1riw2gy"),_(t,"href",r=l[0].gitRepo.replace(".git","")),_(t,"target","_blank"),_(t,"rel","noreferrer"),_(e,"class","result-msg svelte-1riw2gy")},m(o,a){N(o,e,a),m(e,t),m(t,s),m(s,i)},p(o,a){a&1&&n!==(n=o[0].gitRepo.replace(".git","")+"")&&he(i,n),a&1&&r!==(r=o[0].gitRepo.replace(".git",""))&&_(t,"href",r)},i:ee,o:ee,d(o){o&&h(e)}}}function Bo(l){let e,t,s,n,i="Version Control",r,o,a,c,u,f,d="Local Git Repo",p,g,k,v,w,C,S,F,M,$="Git Repo Published",R,A,B,E,I,O='Learn more about Setting Up Version Control →',L;const T=[Lo,Oo],q=[];function U(ie,ue){return ie[0].localGitRepo?0:1}a=U(l),c=q[a]=T[a](l);const W=[Do,Po],x=[];function z(ie,ue){return ie[0].localGitRepo?0:1}g=z(l),k=x[g]=W[g](l);const se=[Mo,jo],ne=[];function $e(ie,ue){return ie[0].gitRepo?0:1}C=$e(l),S=ne[C]=se[C](l);const Ee=[Vo,Fo],ae=[];function Se(ie,ue){return ie[0].gitRepo?0:1}return A=Se(l),B=ae[A]=Ee[A](l),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=Z(` + Use version control to keep track of changes to your project. A published git repo is needed if + you want to deploy your Evidence project online. + + `),o=b("div"),c.c(),u=D(),f=b("span"),f.textContent=d,p=D(),k.c(),v=D(),w=b("div"),S.c(),F=D(),M=b("span"),M.textContent=$,R=D(),B.c(),E=D(),I=b("footer"),I.innerHTML=O,this.h()},l(ie){e=y(ie,"FORM",{id:!0,class:!0});var ue=P(e);t=y(ue,"DIV",{class:!0});var oe=P(t);s=y(oe,"DIV",{class:!0});var we=P(s);n=y(we,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-n9hgtt"&&(n.textContent=i),r=Q(we,` + Use version control to keep track of changes to your project. A published git repo is needed if + you want to deploy your Evidence project online. + + `),o=y(we,"DIV",{class:!0});var Ce=P(o);c.l(Ce),u=j(Ce),f=y(Ce,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-moy7v6"&&(f.textContent=d),p=j(Ce),k.l(Ce),Ce.forEach(h),v=j(we),w=y(we,"DIV",{class:!0});var re=P(w);S.l(re),F=j(re),M=y(re,"SPAN",{class:!0,"data-svelte-h":!0}),K(M)!=="svelte-1wsobt7"&&(M.textContent=$),R=j(re),B.l(re),re.forEach(h),we.forEach(h),oe.forEach(h),E=j(ue),I=y(ue,"FOOTER",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-1e01ncp"&&(I.innerHTML=O),ue.forEach(h),this.h()},h(){_(n,"class","svelte-1riw2gy"),_(f,"class","item-label svelte-1riw2gy"),_(o,"class","git-item svelte-1riw2gy"),_(M,"class","item-label svelte-1riw2gy"),_(w,"class","git-item svelte-1riw2gy"),_(s,"class","panel svelte-1riw2gy"),_(t,"class","version-control-box svelte-1riw2gy"),_(I,"class","svelte-1riw2gy"),_(e,"id","version-control"),_(e,"class","svelte-1riw2gy")},m(ie,ue){N(ie,e,ue),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),q[a].m(o,null),m(o,u),m(o,f),m(o,p),x[g].m(o,null),m(s,v),m(s,w),ne[C].m(w,null),m(w,F),m(w,M),m(w,R),ae[A].m(w,null),m(e,E),m(e,I),L=!0},p(ie,[ue]){let oe=a;a=U(ie),a!==oe&&(_e(),H(q[oe],1,1,()=>{q[oe]=null}),ve(),c=q[a],c||(c=q[a]=T[a](ie),c.c()),V(c,1),c.m(o,u));let we=g;g=z(ie),g===we?x[g].p(ie,ue):(_e(),H(x[we],1,1,()=>{x[we]=null}),ve(),k=x[g],k?k.p(ie,ue):(k=x[g]=W[g](ie),k.c()),V(k,1),k.m(o,null));let Ce=C;C=$e(ie),C!==Ce&&(_e(),H(ne[Ce],1,1,()=>{ne[Ce]=null}),ve(),S=ne[C],S||(S=ne[C]=se[C](ie),S.c()),V(S,1),S.m(w,F));let re=A;A=Se(ie),A===re?ae[A].p(ie,ue):(_e(),H(ae[re],1,1,()=>{ae[re]=null}),ve(),B=ae[A],B?B.p(ie,ue):(B=ae[A]=Ee[A](ie),B.c()),V(B,1),B.m(w,null))},i(ie){L||(V(c),V(k),V(S),V(B),L=!0)},o(ie){H(c),H(k),H(S),H(B),L=!1},d(ie){ie&&h(e),q[a].d(),x[g].d(),ne[C].d(),ae[A].d()}}}function qo(l,e,t){let{settings:s}=e;return l.$$set=n=>{"settings"in n&&t(0,s=n.settings)},[s]}class Ho extends ye{constructor(e){super(),ke(this,e,qo,Bo,be,{settings:0})}}const Ro=async({fetch:l,data:e})=>({...e,settings:{},gitIgnore:""}),ta=Object.freeze(Object.defineProperty({__proto__:null,load:Ro},Symbol.toStringTag,{value:"Module"}));function Uo(l){let e,t="Settings are only available in development mode.";return{c(){e=b("p"),e.textContent=t},l(s){e=y(s,"P",{"data-svelte-h":!0}),K(e)!=="svelte-591hpj"&&(e.textContent=t)},m(s,n){N(s,e,n)},p:ee,i:ee,o:ee,d(s){s&&h(e)}}}function Ko(l){let e,t,s,n,i,r,o,a,c,u,f,d,p;return t=new Ho({props:{settings:l[0]}}),n=new vr({props:{availableSourcePlugins:l[3],sources:l[2]}}),r=new Zr({props:{settings:l[0],sources:l[2]}}),a=new Eo({props:{customFormattingSettings:l[1]}}),u=new Ao({props:{settings:l[0]}}),{c(){e=b("div"),G(t.$$.fragment),s=D(),G(n.$$.fragment),i=D(),G(r.$$.fragment),o=D(),G(a.$$.fragment),c=D(),G(u.$$.fragment),f=D(),d=b("br"),this.h()},l(g){e=y(g,"DIV",{class:!0});var k=P(e);X(t.$$.fragment,k),s=j(k),X(n.$$.fragment,k),i=j(k),X(r.$$.fragment,k),o=j(k),X(a.$$.fragment,k),c=j(k),X(u.$$.fragment,k),k.forEach(h),f=j(g),d=y(g,"BR",{}),this.h()},h(){_(e,"class","mt-12")},m(g,k){N(g,e,k),Y(t,e,null),m(e,s),Y(n,e,null),m(e,i),Y(r,e,null),m(e,o),Y(a,e,null),m(e,c),Y(u,e,null),N(g,f,k),N(g,d,k),p=!0},p(g,k){const v={};k&1&&(v.settings=g[0]),t.$set(v);const w={};k&8&&(w.availableSourcePlugins=g[3]),k&4&&(w.sources=g[2]),n.$set(w);const C={};k&1&&(C.settings=g[0]),k&4&&(C.sources=g[2]),r.$set(C);const S={};k&2&&(S.customFormattingSettings=g[1]),a.$set(S);const F={};k&1&&(F.settings=g[0]),u.$set(F)},i(g){p||(V(t.$$.fragment,g),V(n.$$.fragment,g),V(r.$$.fragment,g),V(a.$$.fragment,g),V(u.$$.fragment,g),p=!0)},o(g){H(t.$$.fragment,g),H(n.$$.fragment,g),H(r.$$.fragment,g),H(a.$$.fragment,g),H(u.$$.fragment,g),p=!1},d(g){g&&(h(e),h(f),h(d)),J(t),J(n),J(r),J(a),J(u)}}}function xo(l){let e,t,s,n;const i=[Ko,Uo],r=[];function o(a,c){return 1}return e=o(),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){t.p(a,c)},i(a){n||(V(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function zo(l,e,t){let{data:s}=e,{settings:n,customFormattingSettings:i,sources:r,plugins:o}=s;return console.log({settings:n,sources:r,plugins:o}),l.$$set=a=>{"data"in a&&t(4,s=a.data)},l.$$.update=()=>{l.$$.dirty&16&&t(0,{settings:n,customFormattingSettings:i,sources:r,plugins:o}=s,n,(t(1,i),t(4,s)),(t(2,r),t(4,s)),(t(3,o),t(4,s)))},[n,i,r,o,s]}class sa extends ye{constructor(e){super(),ke(this,e,zo,xo,be,{data:4})}}export{sa as component,ta as universal}; diff --git a/_app/version.json b/_app/version.json index 0abc9d2d4e0a5bb36f4fb974d163f8a8f36ead7b..19fccad3ebb967473483778eb93f13507e0d6d82 100644 --- a/_app/version.json +++ b/_app/version.json @@ -1 +1 @@ -{"version":"1733163122758"} \ No newline at end of file +{"version":"1733947409390"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/0011189de7016cf57b53729b0ea1fbf7/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/0011189de7016cf57b53729b0ea1fbf7/all-queries.json index 6da3ac41175d5aa256714bbbf2ca91b1ce17d2ce..09613370dc368166d3b6e7adb0e81caf54a0adb7 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/0011189de7016cf57b53729b0ea1fbf7/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/0011189de7016cf57b53729b0ea1fbf7/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"c29883ad8b0c6f4190c968f1377c3617","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"4137f6a4901fdfde0cfe3016c8ee00ab","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"f2d945ff02dcfdab3c06b33bc1a2b2b7","fares_by_pickup_location_data":"b2659e5ebb7b9ed878b5c32aeddc17b0"} \ No newline at end of file +{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"b40f637c4558906057724f4544a01fa8","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"f2d945ff02dcfdab3c06b33bc1a2b2b7","fares_by_pickup_location_data":"3b971f17d9961069d0124ac02cbc7c7c"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/352e3847f7de0b8eefc772140ff3542b/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/352e3847f7de0b8eefc772140ff3542b/all-queries.json index 76bd26b77f023b2c1b755d9ef61f07f1e1d96b3e..60d066c2ae86d00505d7f98b09cf15649854569c 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/352e3847f7de0b8eefc772140ff3542b/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/352e3847f7de0b8eefc772140ff3542b/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"c29883ad8b0c6f4190c968f1377c3617","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"08d27320231a93c245f679a58cb9d33a","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"e3908548cc2bc736bcf93c803bd2c41a","fares_by_pickup_location_data":"910219f408552fc7064e6d49f48eb5f8"} \ No newline at end of file +{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"d37e4f43c8888db3946520160c06f838","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"e3908548cc2bc736bcf93c803bd2c41a","fares_by_pickup_location_data":"4c503ca9cff53d1f55d94005cd109677"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/46162ca608616836bd81cf680ada81eb/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/46162ca608616836bd81cf680ada81eb/all-queries.json index bef2857ba7e2149d29ce7d91fd9859e740248921..e7036f0916c8897aa43a4dc4b59cb2ac631d97e3 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/46162ca608616836bd81cf680ada81eb/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/46162ca608616836bd81cf680ada81eb/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"c29883ad8b0c6f4190c968f1377c3617","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"13f5c7b8c6e480fd973036b730a6cb1b","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"7fe880bf15a93b8bae4f183f20cfd278","fares_by_pickup_location_data":"fd3d2f80793fddc347cfb829d7cc70ab"} \ No newline at end of file +{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"988b73fcc8fb1139fe897699ca754204","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"7fe880bf15a93b8bae4f183f20cfd278","fares_by_pickup_location_data":"1fcc01aa0762458f8dfaf4040df18491"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/cd3f4b14f1b959ee4e040fcd2a3c8e67/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/cd3f4b14f1b959ee4e040fcd2a3c8e67/all-queries.json index b4b99feefcdde08e9a4cf922301ea767d1b4f330..d4facdcdbbd7f2a24cc2ecda0186e79246c5a982 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/cd3f4b14f1b959ee4e040fcd2a3c8e67/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/cd3f4b14f1b959ee4e040fcd2a3c8e67/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"c29883ad8b0c6f4190c968f1377c3617","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"13423a2d582087402ceafaccafe59447","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"c8c9d62d2589778940803b887bcc59d0","fares_by_pickup_location_data":"b09a9a0e3bf69744e3494ddde1f34e2b"} \ No newline at end of file +{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"a2a66abf7f9cf00a0b180233784d1d68","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"c8c9d62d2589778940803b887bcc59d0","fares_by_pickup_location_data":"1eb40411e84c7124e6cf854646423c27"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/d07e56a477cd71bf36ecce2af6c517c3/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/d07e56a477cd71bf36ecce2af6c517c3/all-queries.json index 15c39e3645155dbdbb0cf337a19c3cfed320b4ab..6e93fc0d40125a491b42dd449c31c4550c18f50d 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/d07e56a477cd71bf36ecce2af6c517c3/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/d07e56a477cd71bf36ecce2af6c517c3/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"c29883ad8b0c6f4190c968f1377c3617","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"3267ffa35dd2c7b006781c144a001c29","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"79e2ecfc7f1033328692475b8592d706","fares_by_pickup_location_data":"7c077c78689c167f88496c986e18b5bd"} \ No newline at end of file +{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"d97cd91fc8787fa580a76b443f9eb84e","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"79e2ecfc7f1033328692475b8592d706","fares_by_pickup_location_data":"2121aac8a9e34684f539813908eb5d65"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/f0651133fe873ff649c5000577832cea/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/f0651133fe873ff649c5000577832cea/all-queries.json index 0ad1d63ca932256d571ee3d6cfccc69d68a7f045..b1d38f95213476125e37fa9520b798cae526e9c0 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/f0651133fe873ff649c5000577832cea/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/f0651133fe873ff649c5000577832cea/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"c29883ad8b0c6f4190c968f1377c3617","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"1f88b46b14da8cf3806ede28684e5591","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"50027c71871ec549d2ac65e37094d22e","fares_by_pickup_location_data":"fc2e8312fb3b509dc5a42d5811e6614f"} \ No newline at end of file +{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"21282200b8cff329bd8caad0c52dd0fb","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"50027c71871ec549d2ac65e37094d22e","fares_by_pickup_location_data":"6c4dad7dc6e61ed60b816f4f3c159f54"} \ No newline at end of file diff --git a/api/6666cd76f96956469e7be39d750cc7d9/d41d8cd98f00b204e9800998ecf8427e/all-queries.json b/api/6666cd76f96956469e7be39d750cc7d9/d41d8cd98f00b204e9800998ecf8427e/all-queries.json index edb10afe970f9484819a69abf74a5ebf26ff3a98..ad3c99906cd98017bad1740fc7b9367a123ab216 100644 --- a/api/6666cd76f96956469e7be39d750cc7d9/d41d8cd98f00b204e9800998ecf8427e/all-queries.json +++ b/api/6666cd76f96956469e7be39d750cc7d9/d41d8cd98f00b204e9800998ecf8427e/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"c29883ad8b0c6f4190c968f1377c3617","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"c0f2aa584943b9a5ff311220f92de0c9","fares_by_day_columns":"dd4f2b997eb7ab01a0d40a96741ba4f0","fares_by_day_length":"37b2f0f112a2b0031997f9aba8922f2f","fares_by_day_data":"19c9f4f25977587e480c3ff8bae925dd","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"b030f26c553a8559cfe61bef934c22d6","fares_by_pickup_location_data":"a68b4319004c623ab7f9cb134ebeee2a","fares_by_pickup_borough_columns":"1a756d542046c968c275b844b04bba01","fares_by_pickup_borough_length":"d6057bb060d5dc6b39a83ba03ee572a5","fares_by_pickup_borough_data":"f8bcdc7fb0821db164757308cd45c7f3"} \ No newline at end of file +{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"c0f2aa584943b9a5ff311220f92de0c9","fares_by_day_columns":"dd4f2b997eb7ab01a0d40a96741ba4f0","fares_by_day_length":"37b2f0f112a2b0031997f9aba8922f2f","fares_by_day_data":"19c9f4f25977587e480c3ff8bae925dd","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"b030f26c553a8559cfe61bef934c22d6","fares_by_pickup_location_data":"3b946f67842652892d8fd212bc0d0039","fares_by_pickup_borough_columns":"1a756d542046c968c275b844b04bba01","fares_by_pickup_borough_length":"d6057bb060d5dc6b39a83ba03ee572a5","fares_by_pickup_borough_data":"39b8934e87ac6a1c4ee81eeab88d6ec0"} \ No newline at end of file diff --git a/api/prerendered_queries/1eb40411e84c7124e6cf854646423c27.arrow b/api/prerendered_queries/1eb40411e84c7124e6cf854646423c27.arrow new file mode 100644 index 0000000000000000000000000000000000000000..4f78abc5f4f8b933cfeb0ee37c5d4d54f3015153 --- /dev/null +++ b/api/prerendered_queries/1eb40411e84c7124e6cf854646423c27.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e947433984ea4810091dec1b7e084dc277e826aa08f2a2154b1c1864c1acad42 +size 4624 diff --git a/api/prerendered_queries/1fcc01aa0762458f8dfaf4040df18491.arrow b/api/prerendered_queries/1fcc01aa0762458f8dfaf4040df18491.arrow new file mode 100644 index 0000000000000000000000000000000000000000..2e35fd7e9ac05b1e30847c0c506e541c846d817d --- /dev/null +++ b/api/prerendered_queries/1fcc01aa0762458f8dfaf4040df18491.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c72ec97f6ea93d0cb8d52d74a3d438af86773f23a2aa30082f6ff953d9e97c2b +size 3472 diff --git a/api/prerendered_queries/2121aac8a9e34684f539813908eb5d65.arrow b/api/prerendered_queries/2121aac8a9e34684f539813908eb5d65.arrow new file mode 100644 index 0000000000000000000000000000000000000000..cafd9fc1b59b5ac29df240038b2b2752d65181ca --- /dev/null +++ b/api/prerendered_queries/2121aac8a9e34684f539813908eb5d65.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c7b6ba239edd887982cf2e5bc0135644c5cbcfe6facafcc73367b2c5f0c6f2a +size 2200 diff --git a/api/prerendered_queries/21282200b8cff329bd8caad0c52dd0fb.arrow b/api/prerendered_queries/21282200b8cff329bd8caad0c52dd0fb.arrow new file mode 100644 index 0000000000000000000000000000000000000000..69e6ec4df194ef0532099de9ba9fb52bcd1e967b --- /dev/null +++ b/api/prerendered_queries/21282200b8cff329bd8caad0c52dd0fb.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4524fca9041bdc16b52b6ce1ac6dc69d0fd09b201534210043c37bf30c4852a +size 640 diff --git a/api/prerendered_queries/39b8934e87ac6a1c4ee81eeab88d6ec0.arrow b/api/prerendered_queries/39b8934e87ac6a1c4ee81eeab88d6ec0.arrow new file mode 100644 index 0000000000000000000000000000000000000000..b8b2071130fbbbb77d76f3b8e8894de645eb8ab0 --- /dev/null +++ b/api/prerendered_queries/39b8934e87ac6a1c4ee81eeab88d6ec0.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfa7ac239918a9f678baad2d40e75a7da6e6e2555481b8ce05484425826418b8 +size 1096 diff --git a/api/prerendered_queries/3b946f67842652892d8fd212bc0d0039.arrow b/api/prerendered_queries/3b946f67842652892d8fd212bc0d0039.arrow new file mode 100644 index 0000000000000000000000000000000000000000..25f8028cc4dabfdd8d914fa1652c7489917c2188 --- /dev/null +++ b/api/prerendered_queries/3b946f67842652892d8fd212bc0d0039.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99e4b81bd3948e76b293e67c4b9b7dbf095bdafee2a14733ed864272a55ea5dd +size 17056 diff --git a/api/prerendered_queries/3b971f17d9961069d0124ac02cbc7c7c.arrow b/api/prerendered_queries/3b971f17d9961069d0124ac02cbc7c7c.arrow new file mode 100644 index 0000000000000000000000000000000000000000..064c2593490f8e02871d4149f76a794193cb3763 --- /dev/null +++ b/api/prerendered_queries/3b971f17d9961069d0124ac02cbc7c7c.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14eafdad950b13fbe4146ae8b4e4c64dd80015c63a9172300b9c1ef554eaf045 +size 4872 diff --git a/api/prerendered_queries/4c503ca9cff53d1f55d94005cd109677.arrow b/api/prerendered_queries/4c503ca9cff53d1f55d94005cd109677.arrow new file mode 100644 index 0000000000000000000000000000000000000000..bdbe80d0b93a288cfc2be4ef0b5a817dfd86c93a --- /dev/null +++ b/api/prerendered_queries/4c503ca9cff53d1f55d94005cd109677.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d26be16c7bf0188df0d60dc999eef2f6a96b53b907c6ea851fb426746fd4de0e +size 936 diff --git a/api/prerendered_queries/6c4dad7dc6e61ed60b816f4f3c159f54.arrow b/api/prerendered_queries/6c4dad7dc6e61ed60b816f4f3c159f54.arrow new file mode 100644 index 0000000000000000000000000000000000000000..004a8583a223989c8d3f12c8771bff97e358cfe8 --- /dev/null +++ b/api/prerendered_queries/6c4dad7dc6e61ed60b816f4f3c159f54.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c58286730caa889fd0195f591c90dc31983bc2bf6b3e0c52d8f8cf48fa6a56f +size 5120 diff --git a/api/prerendered_queries/988b73fcc8fb1139fe897699ca754204.arrow b/api/prerendered_queries/988b73fcc8fb1139fe897699ca754204.arrow new file mode 100644 index 0000000000000000000000000000000000000000..8f34a8740317f7e30daad366a9d64106e790e8ea --- /dev/null +++ b/api/prerendered_queries/988b73fcc8fb1139fe897699ca754204.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2e138e2d0fced9dd1039793772df3b3f8aa65e6d66bb8225ca7c332af4d4d90 +size 640 diff --git a/api/prerendered_queries/a2a66abf7f9cf00a0b180233784d1d68.arrow b/api/prerendered_queries/a2a66abf7f9cf00a0b180233784d1d68.arrow new file mode 100644 index 0000000000000000000000000000000000000000..773f6e28c662e1f526b683823b47479ddd0fb864 --- /dev/null +++ b/api/prerendered_queries/a2a66abf7f9cf00a0b180233784d1d68.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e37a8e64fcd958d4265cbfbbfb8fb65c514097f5506aeca329226d81e1bba822 +size 640 diff --git a/api/prerendered_queries/b40f637c4558906057724f4544a01fa8.arrow b/api/prerendered_queries/b40f637c4558906057724f4544a01fa8.arrow new file mode 100644 index 0000000000000000000000000000000000000000..8f0a4d17a57f23091a03a979518f2703aa9abb7f --- /dev/null +++ b/api/prerendered_queries/b40f637c4558906057724f4544a01fa8.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd726054f64dcb1c90e43ea9f0ccb9867770ee3962fb4679015af8e6b5748327 +size 640 diff --git a/api/prerendered_queries/d08ab5b543346cc532f53725b8c5a51c.arrow b/api/prerendered_queries/d08ab5b543346cc532f53725b8c5a51c.arrow new file mode 100644 index 0000000000000000000000000000000000000000..e6a2bd529e270824611d6cafa23e4511b0be710d --- /dev/null +++ b/api/prerendered_queries/d08ab5b543346cc532f53725b8c5a51c.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23522930658e9f611d19e026fbb91e4c0f2d1e777bad8e4229eb4f7f4e1542b2 +size 2968 diff --git a/api/prerendered_queries/d37e4f43c8888db3946520160c06f838.arrow b/api/prerendered_queries/d37e4f43c8888db3946520160c06f838.arrow new file mode 100644 index 0000000000000000000000000000000000000000..883ebd7d49cb8dcebeb289b64c021b08dda34554 --- /dev/null +++ b/api/prerendered_queries/d37e4f43c8888db3946520160c06f838.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:828edf85bfa0049ee6d830a0cb5d2113a806e0d6eb6c04c5bbf670b64dd047ee +size 640 diff --git a/api/prerendered_queries/d97cd91fc8787fa580a76b443f9eb84e.arrow b/api/prerendered_queries/d97cd91fc8787fa580a76b443f9eb84e.arrow new file mode 100644 index 0000000000000000000000000000000000000000..a5207667ef47066b9804af98a88ad761304553df --- /dev/null +++ b/api/prerendered_queries/d97cd91fc8787fa580a76b443f9eb84e.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47191c845aed32f7e07721e042ef5531a992a04368932476452099e43b851baa +size 640 diff --git a/borough/Bronx/index.html b/borough/Bronx/index.html index 02172233d9f8891b189abae7a6b942f498c11f88..72449b89d03150d6b565b4b81f924a065ecd92d6 100644 --- a/borough/Bronx/index.html +++ b/borough/Bronx/index.html @@ -10,23 +10,23 @@ - - + + - + - + - - - - + + + + - - - - + + + + Evidence @@ -35,7 +35,7 @@
    -
    Home borough Bronx

    Bronx

    Home borough Bronx

    Bronx

    Rides

    47,271
    {"status":200,"statusText":"","headers":{},"body":"{\"queries\":[{\"id\":\"date_range\",\"compiledQueryString\":\"select * from taxi.dates\",\"inputQueryString\":\"select * from taxi.dates\",\"compiled\":false,\"inline\":true},{\"id\":\"aggregate_stats\",\"compiledQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"inputQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"compiled\":false,\"inline\":true},{\"id\":\"fares_by_pickup_location\",\"compiledQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"inputQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"compiled\":false,\"inline\":true}]}"}
    -

    Brooklyn

    Brooklyn

    Rides

    267,460
    {"status":200,"statusText":"","headers":{},"body":"{\"queries\":[{\"id\":\"date_range\",\"compiledQueryString\":\"select * from taxi.dates\",\"inputQueryString\":\"select * from taxi.dates\",\"compiled\":false,\"inline\":true},{\"id\":\"aggregate_stats\",\"compiledQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"inputQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"compiled\":false,\"inline\":true},{\"id\":\"fares_by_pickup_location\",\"compiledQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"inputQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"compiled\":false,\"inline\":true}]}"}
    -
    Home borough EWR

    EWR

    Home borough EWR

    EWR

    Rides

    9,171
    {"status":200,"statusText":"","headers":{},"body":"{\"queries\":[{\"id\":\"date_range\",\"compiledQueryString\":\"select * from taxi.dates\",\"inputQueryString\":\"select * from taxi.dates\",\"compiled\":false,\"inline\":true},{\"id\":\"aggregate_stats\",\"compiledQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"inputQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"compiled\":false,\"inline\":true},{\"id\":\"fares_by_pickup_location\",\"compiledQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"inputQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"compiled\":false,\"inline\":true}]}"}
    -

    Manhattan

    Manhattan

    Rides

    32,279,222
    {"status":200,"statusText":"","headers":{},"body":"{\"queries\":[{\"id\":\"date_range\",\"compiledQueryString\":\"select * from taxi.dates\",\"inputQueryString\":\"select * from taxi.dates\",\"compiled\":false,\"inline\":true},{\"id\":\"aggregate_stats\",\"compiledQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"inputQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"compiled\":false,\"inline\":true},{\"id\":\"fares_by_pickup_location\",\"compiledQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"inputQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"compiled\":false,\"inline\":true}]}"}
    -
    Home borough Queens

    Queens

    Home borough Queens

    Queens

    Rides

    3,140,654
    {"status":200,"statusText":"","headers":{},"body":"{\"queries\":[{\"id\":\"date_range\",\"compiledQueryString\":\"select * from taxi.dates\",\"inputQueryString\":\"select * from taxi.dates\",\"compiled\":false,\"inline\":true},{\"id\":\"aggregate_stats\",\"compiledQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"inputQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"compiled\":false,\"inline\":true},{\"id\":\"fares_by_pickup_location\",\"compiledQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"inputQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"compiled\":false,\"inline\":true}]}"}
    -

    Staten Island

    Staten Island

    Rides

    2,867
    {"status":200,"statusText":"","headers":{},"body":"{\"queries\":[{\"id\":\"date_range\",\"compiledQueryString\":\"select * from taxi.dates\",\"inputQueryString\":\"select * from taxi.dates\",\"compiled\":false,\"inline\":true},{\"id\":\"aggregate_stats\",\"compiledQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"inputQueryString\":\"select\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance,\\n sum(fare_amount)/sum(trip_distance) as fare_per_mile\\nfrom taxi.summary_borough\\nleft join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\",\"compiled\":false,\"inline\":true},{\"id\":\"fares_by_pickup_location\",\"compiledQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"inputQueryString\":\"select\\n pickup_location_id,\\n zone,\\n borough,\\n sum(rides) as rides,\\n sum(fare_amount) as fare_amount,\\n sum(trip_distance) as trip_distance\\nfrom taxi.location l\\nleft join zones.zones z on l.pickup_location_id = z.location_id\\nwhere day between '${inputs.date_range.start}' and '${inputs.date_range.end}'\\nand lower(borough) = lower('${params.borough}')\\ngroup by all\\norder by 1\",\"compiled\":false,\"inline\":true}]}"}
    -
    Home

    NYC Taxi Data 2022

    This is an exploration of NYC taxi data in 2022. It includes a summary of the data, rides by day, and rides by pickup location.

    Home

    NYC Taxi Data 2022

    This is an exploration of NYC taxi data in 2022. It includes a summary of the data, rides by day, and rides by pickup location.

    Rides

    36,255,983
    {"status":200,"statusText":"","headers":{},"body":"{\"label\":\"Home\",\"href\":\"/\",\"children\":{\"borough\":{\"label\":\"borough\",\"children\":{\"[borough]\":{\"children\":{},\"isTemplated\":true,\"isPage\":true}},\"frontMatter\":{},\"isTemplated\":false,\"isPage\":false}},\"frontMatter\":{\"title\":\"NYC Taxi Data 2022\",\"sidebar\":\"never\"},\"isTemplated\":false,\"isPage\":true}"}