diff --git "a/web/blueprint/build/_app/immutable/nodes/4.ddbe0492.js" "b/web/blueprint/build/_app/immutable/nodes/4.ddbe0492.js" new file mode 100644--- /dev/null +++ "b/web/blueprint/build/_app/immutable/nodes/4.ddbe0492.js" @@ -0,0 +1,32 @@ +import{S as pe,i as ve,s as be,E as Z,k as T,l as I,m as S,h,I as Ne,H as N,b as E,K as de,X as it,a7 as Yi,O as ye,$,P as Oe,D as he,F as ge,q as X,a as G,r as x,c as J,J as w,Q as ke,e as fe,v as ie,d as k,f as re,g as b,G as Re,L as He,M as Fe,N as Le,y as q,z as W,A as j,W as Ct,B as Y,a8 as Ui,w as je,x as Ye,T as Lt,a2 as ae,a3 as oe,n as z,a4 as Se,u as _e,C as ot,a9 as ol,aa as gr,ab as br,ac as pr,ad as Tt,R as ze,j as Xt,o as Wi,Y as dt,ae as vr,af as Nt,_ as Ki,t as kr,Z as wr,p as Pe,ag as We,ah as yt,a0 as Ke,a5 as Ge,ai as ht,aj as at,ak as Zi,U as xt,V as $t,al as Sr,a1 as Mt,am as Er}from"../chunks/index.d6a3d821.js";import{u as zr}from"../chunks/urlHashStore.b081783b.js";import{T as pt,g as yr,h as Je,i as Qe,t as ft,b as ut,j as rt,a as Mr,c as Vr,k as Cr,l as Tr,m as el,n as Ir,I as fl,o as Kt,q as Nr,S as St,p as Ar,r as Dr,s as Qi,C as Br,u as Pr,v as Rr,w as Hr,x as Fr,y as Lr}from"../chunks/ConceptView.fd839e0f.js";import{b as ct,g as At,s as Te,e as et,p as Ue,f as tl,h as Dt,L as Ze,i as Gi,V as nt,j as De,S as vt,v as Or,k as Ji,l as qr,m as jr,n as Xi,o as Yr,r as Ur,t as gt,u as xi,w as $i,x as ll,y as Wr,I as er,U as Kr,z as Zr,A as Vt,B as Bt,C as Zt,D as Qr,E as Gr,P as tr,F as Jr,G as Xr}from"../chunks/utils.af2136df.js";import{w as $e,d as ul}from"../chunks/index.5884c3e8.js";import{M as lr}from"../chunks/Modal.a017af0f.js";import{d as cl,W as xr,e as $r,B as tt}from"../chunks/taskMonitoringStore.aadb9e65.js";import{C as dl}from"../chunks/Checkmark.ba979c87.js";import{C as es}from"../chunks/JSONSchemaForm.3de641de.js";import{C as ts,S as nr,a as ir}from"../chunks/Toggle.4859458e.js";import{L as ls,a as ns,b as is,c as rs,C as ss}from"../chunks/ComboBox.3bf937e3.js";import{I as hl}from"../chunks/TrashCan.dd2b985e.js";function ml(n,e,t){const l=n.slice();return l[7]=e[t],l}function _l(n,e){let t,l,i,o;return{key:n,first:null,c(){t=T("div"),l=T("span"),i=X(" "),o=G(),this.h()},l(r){t=I(r,"DIV",{});var s=S(t);l=I(s,"SPAN",{});var a=S(l);i=x(a," "),a.forEach(h),o=J(s),s.forEach(h),this.h()},h(){N(l,"bx--link",!0),N(t,"bx--breadcrumb-item",!0),this.first=t},m(r,s){E(r,t,s),w(t,l),w(l,i),w(t,o)},p(r,s){},d(r){r&&h(t)}}}function as(n){let e,t=[],l=new Map,i,o,r=Array.from({length:n[1]},gl);const s=u=>u[7];for(let u=0;ue;function os(n,e,t){const l=["noTrailingSlash","count"];let i=he(e,l),{noTrailingSlash:o=!1}=e,{count:r=3}=e;function s(c){ke.call(this,n,c)}function a(c){ke.call(this,n,c)}function f(c){ke.call(this,n,c)}function u(c){ke.call(this,n,c)}return n.$$set=c=>{e=Z(Z({},e),ge(c)),t(2,i=he(e,l)),"noTrailingSlash"in c&&t(0,o=c.noTrailingSlash),"count"in c&&t(1,r=c.count)},[o,r,i,s,a,f,u]}class fs extends pe{constructor(e){super(),ve(this,e,os,as,be,{noTrailingSlash:0,count:1})}}const us=fs;function cs(n){let e,t,l,i,o;const r=n[4].default,s=Re(r,n,n[3],null);let a=[{"aria-label":"Breadcrumb"},n[2]],f={};for(let u=0;u{r[u]=null}),re(),t=r[e],t?t.p(a,f):(t=r[e]=o[e](a),t.c()),b(t,1),t.m(l.parentNode,l))},i(a){i||(b(t),i=!0)},o(a){k(t),i=!1},d(a){r[e].d(a),a&&h(l)}}}function ms(n,e,t){const l=["noTrailingSlash","skeleton"];let i=he(e,l),{$$slots:o={},$$scope:r}=e,{noTrailingSlash:s=!1}=e,{skeleton:a=!1}=e;function f(v){ke.call(this,n,v)}function u(v){ke.call(this,n,v)}function c(v){ke.call(this,n,v)}function d(v){ke.call(this,n,v)}function m(v){ke.call(this,n,v)}function _(v){ke.call(this,n,v)}function g(v){ke.call(this,n,v)}function p(v){ke.call(this,n,v)}return n.$$set=v=>{e=Z(Z({},e),ge(v)),t(2,i=he(e,l)),"noTrailingSlash"in v&&t(0,s=v.noTrailingSlash),"skeleton"in v&&t(1,a=v.skeleton),"$$scope"in v&&t(3,r=v.$$scope)},[s,a,i,r,o,f,u,c,d,m,_,g,p]}class _s extends pe{constructor(e){super(),ve(this,e,ms,hs,be,{noTrailingSlash:0,skeleton:1})}}const gs=_s,bs=n=>({}),bl=n=>({}),ps=n=>({}),pl=n=>({});function vs(n){let e,t,l,i,o,r;const s=n[10].default,a=Re(s,n,n[9],null);let f=!n[3]&&(n[8].icon||n[4])&&vl(n),u=[{rel:l=n[7].target==="_blank"?"noopener noreferrer":void 0},{href:n[2]},n[7]],c={};for(let d=0;d{f=null}),re()),Ne(e,c=ye(u,[(!i||m&128&&l!==(l=d[7].target==="_blank"?"noopener noreferrer":void 0))&&{rel:l},(!i||m&4)&&{href:d[2]},m&128&&d[7]])),N(e,"bx--link",!0),N(e,"bx--link--disabled",d[5]),N(e,"bx--link--inline",d[3]),N(e,"bx--link--visited",d[6]),N(e,"bx--link--sm",d[1]==="sm"),N(e,"bx--link--lg",d[1]==="lg")},i(d){i||(b(a,d),b(f),i=!0)},o(d){k(a,d),k(f),i=!1},d(d){d&&h(e),a&&a.d(d),f&&f.d(),n[20](null),o=!1,Oe(r)}}}function ks(n){let e,t,l,i,o;const r=n[10].default,s=Re(r,n,n[9],null);let a=!n[3]&&(n[8].icon||n[4])&&kl(n),f=[n[7]],u={};for(let c=0;c{a=null}),re()),Ne(e,u=ye(f,[d&128&&c[7]])),N(e,"bx--link",!0),N(e,"bx--link--disabled",c[5]),N(e,"bx--link--inline",c[3]),N(e,"bx--link--visited",c[6])},i(c){l||(b(s,c),b(a),l=!0)},o(c){k(s,c),k(a),l=!1},d(c){c&&h(e),s&&s.d(c),a&&a.d(),n[19](null),i=!1,Oe(o)}}}function vl(n){let e,t;const l=n[10].icon,i=Re(l,n,n[9],bl),o=i||ws(n);return{c(){e=T("div"),o&&o.c(),this.h()},l(r){e=I(r,"DIV",{});var s=S(e);o&&o.l(s),s.forEach(h),this.h()},h(){N(e,"bx--link__icon",!0)},m(r,s){E(r,e,s),o&&o.m(e,null),t=!0},p(r,s){i?i.p&&(!t||s&512)&&He(i,l,r,r[9],t?Le(l,r[9],s,bs):Fe(r[9]),bl):o&&o.p&&(!t||s&16)&&o.p(r,t?s:-1)},i(r){t||(b(o,r),t=!0)},o(r){k(o,r),t=!1},d(r){r&&h(e),o&&o.d(r)}}}function ws(n){let e,t,l;var i=n[4];function o(r){return{}}return i&&(e=Ye(i,o())),{c(){e&&q(e.$$.fragment),t=fe()},l(r){e&&W(e.$$.fragment,r),t=fe()},m(r,s){e&&j(e,r,s),E(r,t,s),l=!0},p(r,s){if(s&16&&i!==(i=r[4])){if(e){ie();const a=e;k(a.$$.fragment,1,0,()=>{Y(a,1)}),re()}i?(e=Ye(i,o()),q(e.$$.fragment),b(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}},i(r){l||(e&&b(e.$$.fragment,r),l=!0)},o(r){e&&k(e.$$.fragment,r),l=!1},d(r){r&&h(t),e&&Y(e,r)}}}function kl(n){let e,t;const l=n[10].icon,i=Re(l,n,n[9],pl),o=i||Ss(n);return{c(){e=T("div"),o&&o.c(),this.h()},l(r){e=I(r,"DIV",{});var s=S(e);o&&o.l(s),s.forEach(h),this.h()},h(){N(e,"bx--link__icon",!0)},m(r,s){E(r,e,s),o&&o.m(e,null),t=!0},p(r,s){i?i.p&&(!t||s&512)&&He(i,l,r,r[9],t?Le(l,r[9],s,ps):Fe(r[9]),pl):o&&o.p&&(!t||s&16)&&o.p(r,t?s:-1)},i(r){t||(b(o,r),t=!0)},o(r){k(o,r),t=!1},d(r){r&&h(e),o&&o.d(r)}}}function Ss(n){let e,t,l;var i=n[4];function o(r){return{}}return i&&(e=Ye(i,o())),{c(){e&&q(e.$$.fragment),t=fe()},l(r){e&&W(e.$$.fragment,r),t=fe()},m(r,s){e&&j(e,r,s),E(r,t,s),l=!0},p(r,s){if(s&16&&i!==(i=r[4])){if(e){ie();const a=e;k(a.$$.fragment,1,0,()=>{Y(a,1)}),re()}i?(e=Ye(i,o()),q(e.$$.fragment),b(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}},i(r){l||(e&&b(e.$$.fragment,r),l=!0)},o(r){e&&k(e.$$.fragment,r),l=!1},d(r){r&&h(t),e&&Y(e,r)}}}function Es(n){let e,t,l,i;const o=[ks,vs],r=[];function s(a,f){return a[5]?0:1}return e=s(n),t=r[e]=o[e](n),{c(){t.c(),l=fe()},l(a){t.l(a),l=fe()},m(a,f){r[e].m(a,f),E(a,l,f),i=!0},p(a,[f]){let u=e;e=s(a),e===u?r[e].p(a,f):(ie(),k(r[u],1,1,()=>{r[u]=null}),re(),t=r[e],t?t.p(a,f):(t=r[e]=o[e](a),t.c()),b(t,1),t.m(l.parentNode,l))},i(a){i||(b(t),i=!0)},o(a){k(t),i=!1},d(a){r[e].d(a),a&&h(l)}}}function zs(n,e,t){const l=["size","href","inline","icon","disabled","visited","ref"];let i=he(e,l),{$$slots:o={},$$scope:r}=e;const s=Ui(o);let{size:a=void 0}=e,{href:f=void 0}=e,{inline:u=!1}=e,{icon:c=void 0}=e,{disabled:d=!1}=e,{visited:m=!1}=e,{ref:_=null}=e;function g(A){ke.call(this,n,A)}function p(A){ke.call(this,n,A)}function v(A){ke.call(this,n,A)}function y(A){ke.call(this,n,A)}function V(A){ke.call(this,n,A)}function C(A){ke.call(this,n,A)}function D(A){ke.call(this,n,A)}function F(A){ke.call(this,n,A)}function B(A){je[A?"unshift":"push"](()=>{_=A,t(0,_)})}function L(A){je[A?"unshift":"push"](()=>{_=A,t(0,_)})}return n.$$set=A=>{e=Z(Z({},e),ge(A)),t(7,i=he(e,l)),"size"in A&&t(1,a=A.size),"href"in A&&t(2,f=A.href),"inline"in A&&t(3,u=A.inline),"icon"in A&&t(4,c=A.icon),"disabled"in A&&t(5,d=A.disabled),"visited"in A&&t(6,m=A.visited),"ref"in A&&t(0,_=A.ref),"$$scope"in A&&t(9,r=A.$$scope)},[_,a,f,u,c,d,m,i,s,r,o,g,p,v,y,V,C,D,F,B,L]}class ys extends pe{constructor(e){super(),ve(this,e,zs,Es,be,{size:1,href:2,inline:3,icon:4,disabled:5,visited:6,ref:0})}}const Ms=ys,Vs=n=>({props:n&4}),wl=n=>({props:{"aria-current":n[2]["aria-current"],class:"bx--link"}}),Cs=n=>({props:n&4}),Sl=n=>({props:{"aria-current":n[2]["aria-current"],class:"bx--link"}});function Ts(n){let e;const t=n[3].default,l=Re(t,n,n[8],wl);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,o){l&&l.m(i,o),e=!0},p(i,o){l&&l.p&&(!e||o&260)&&He(l,t,i,i[8],e?Le(t,i[8],o,Vs):Fe(i[8]),wl)},i(i){e||(b(l,i),e=!0)},o(i){k(l,i),e=!1},d(i){l&&l.d(i)}}}function Is(n){let e,t;return e=new Ms({props:{href:n[0],"aria-current":n[2]["aria-current"],$$slots:{default:[Ns]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i&1&&(o.href=l[0]),i&4&&(o["aria-current"]=l[2]["aria-current"]),i&260&&(o.$$scope={dirty:i,ctx:l}),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function Ns(n){let e;const t=n[3].default,l=Re(t,n,n[8],Sl);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,o){l&&l.m(i,o),e=!0},p(i,o){l&&l.p&&(!e||o&260)&&He(l,t,i,i[8],e?Le(t,i[8],o,Cs):Fe(i[8]),Sl)},i(i){e||(b(l,i),e=!0)},o(i){k(l,i),e=!1},d(i){l&&l.d(i)}}}function As(n){let e,t,l,i,o,r;const s=[Is,Ts],a=[];function f(d,m){return d[0]?0:1}t=f(n),l=a[t]=s[t](n);let u=[n[2]],c={};for(let d=0;d{a[_]=null}),re(),l=a[t],l?l.p(d,m):(l=a[t]=s[t](d),l.c()),b(l,1),l.m(e,null)),Ne(e,c=ye(u,[m&4&&d[2]])),N(e,"bx--breadcrumb-item",!0),N(e,"bx--breadcrumb-item--current",d[1]&&d[2]["aria-current"]!=="page")},i(d){i||(b(l),i=!0)},o(d){k(l),i=!1},d(d){d&&h(e),a[t].d(),o=!1,Oe(r)}}}function Ds(n,e,t){const l=["href","isCurrentPage"];let i=he(e,l),{$$slots:o={},$$scope:r}=e,{href:s=void 0}=e,{isCurrentPage:a=!1}=e;Lt("BreadcrumbItem",{});function f(m){ke.call(this,n,m)}function u(m){ke.call(this,n,m)}function c(m){ke.call(this,n,m)}function d(m){ke.call(this,n,m)}return n.$$set=m=>{e=Z(Z({},e),ge(m)),t(2,i=he(e,l)),"href"in m&&t(0,s=m.href),"isCurrentPage"in m&&t(1,a=m.isCurrentPage),"$$scope"in m&&t(8,r=m.$$scope)},[s,a,i,o,f,u,c,d,r]}class Bs extends pe{constructor(e){super(),ve(this,e,Ds,As,be,{href:0,isCurrentPage:1})}}const Yt=Bs;function El(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Ps(n){let e,t,l=n[1]&&El(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class Hs extends pe{constructor(e){super(),ve(this,e,Rs,Ps,be,{size:0,title:1})}}const Fs=Hs;function Ls(n){let e,t,l,i,o,r,s=[n[1]],a={};for(let f=0;f{e=Z(Z({},e),ge(u)),t(1,i=he(e,l)),"size"in u&&t(0,o=u.size)},[o,i,r,s,a,f]}class qs extends pe{constructor(e){super(),ve(this,e,Os,Ls,be,{size:0})}}const js=qs,Ys=n=>({}),zl=n=>({});function Us(n){let e,t,l,i,o,r,s,a,f,u,c,d,m,_,g,p;var v=n[14];function y(P){return{props:{class:"bx--search-magnifier-icon"}}}v&&(l=Ye(v,y()));const V=n[20].labelText,C=Re(V,n,n[19],zl),D=C||Ks(n);let F=[{type:"text"},{role:"searchbox"},{autofocus:f=n[11]===!0?!0:void 0},{autocomplete:n[10]},{disabled:n[7]},{id:n[15]},{placeholder:n[9]},n[18]],B={};for(let P=0;P{Y(O,1)}),re()}v?(l=Ye(v,y()),q(l.$$.fragment),b(l.$$.fragment,1),j(l,t,null)):l=null}C?C.p&&(!_||R[0]&524288)&&He(C,V,P,P[19],_?Le(V,P[19],R,Ys):Fe(P[19]),zl):D&&D.p&&(!_||R[0]&8192)&&D.p(P,_?R:[-1,-1]),(!_||R[0]&32768&&r!==(r=P[15]+"-search"))&&z(o,"id",r),(!_||R[0]&32768)&&z(o,"for",P[15]),Ne(a,B=ye(F,[{type:"text"},{role:"searchbox"},(!_||R[0]&2048&&f!==(f=P[11]===!0?!0:void 0))&&{autofocus:f},(!_||R[0]&1024)&&{autocomplete:P[10]},(!_||R[0]&128)&&{disabled:P[7]},(!_||R[0]&32768)&&{id:P[15]},(!_||R[0]&512)&&{placeholder:P[9]},R[0]&262144&&P[18]])),R[0]&4&&a.value!==P[2]&&ol(a,P[2]),N(a,"bx--search-input",!0);const K={};if(R[0]&8&&(K.size=P[3]==="xl"?20:16),L!==(L=cl)){if(d){ie();const O=d;k(O.$$.fragment,1,0,()=>{Y(O,1)}),re()}L?(d=Ye(L,A(P)),q(d.$$.fragment),b(d.$$.fragment,1),j(d,c,null)):d=null}else L&&d.$set(K);(!_||R[0]&4096)&&z(c,"aria-label",P[12]),(!_||R[0]&128)&&(c.disabled=P[7]),(!_||R[0]&4)&&N(c,"bx--search-close--hidden",P[2]===""),(!_||R[0]&32768&&m!==(m=P[15]+"-search"))&&z(e,"aria-labelledby",m),(!_||R[0]&16)&&z(e,"class",P[4]),(!_||R[0]&16)&&N(e,"bx--search",!0),(!_||R[0]&80)&&N(e,"bx--search--light",P[6]),(!_||R[0]&144)&&N(e,"bx--search--disabled",P[7]),(!_||R[0]&24)&&N(e,"bx--search--sm",P[3]==="sm"),(!_||R[0]&24)&&N(e,"bx--search--lg",P[3]==="lg"),(!_||R[0]&24)&&N(e,"bx--search--xl",P[3]==="xl"),(!_||R[0]&272)&&N(e,"bx--search--expandable",P[8]),(!_||R[0]&17)&&N(e,"bx--search--expanded",P[0])},i(P){_||(l&&b(l.$$.fragment,P),b(D,P),d&&b(d.$$.fragment,P),_=!0)},o(P){l&&k(l.$$.fragment,P),k(D,P),d&&k(d.$$.fragment,P),_=!1},d(P){P&&h(e),l&&Y(l),n[33](null),D&&D.d(P),n[35](null),d&&Y(d),g=!1,Oe(p)}}}function Ws(n){let e,t;const l=[{size:n[3]},n[18]];let i={};for(let o=0;o{r[u]=null}),re(),t=r[e],t?t.p(a,f):(t=r[e]=o[e](a),t.c()),b(t,1),t.m(l.parentNode,l))},i(a){i||(b(t),i=!0)},o(a){k(t),i=!1},d(a){r[e].d(a),a&&h(l)}}}function Qs(n,e,t){const l=["value","size","searchClass","skeleton","light","disabled","expandable","expanded","placeholder","autocomplete","autofocus","closeButtonLabelText","labelText","icon","id","ref"];let i=he(e,l),{$$slots:o={},$$scope:r}=e,{value:s=""}=e,{size:a="xl"}=e,{searchClass:f=""}=e,{skeleton:u=!1}=e,{light:c=!1}=e,{disabled:d=!1}=e,{expandable:m=!1}=e,{expanded:_=!1}=e,{placeholder:g="Search..."}=e,{autocomplete:p="off"}=e,{autofocus:v=!1}=e,{closeButtonLabelText:y="Clear search input"}=e,{labelText:V=""}=e,{icon:C=Fs}=e,{id:D="ccs-"+Math.random().toString(36)}=e,{ref:F=null}=e;const B=ot();let L=null;function A(U){ke.call(this,n,U)}function P(U){ke.call(this,n,U)}function R(U){ke.call(this,n,U)}function K(U){ke.call(this,n,U)}function O(U){ke.call(this,n,U)}function ne(U){ke.call(this,n,U)}function le(U){ke.call(this,n,U)}function te(U){ke.call(this,n,U)}function Q(U){ke.call(this,n,U)}function se(U){ke.call(this,n,U)}function we(U){ke.call(this,n,U)}function ue(U){ke.call(this,n,U)}function me(U){je[U?"unshift":"push"](()=>{L=U,t(16,L)})}const Ie=()=>{m&&t(0,_=!0)};function Me(U){je[U?"unshift":"push"](()=>{F=U,t(1,F)})}function ce(){s=this.value,t(2,s)}const Ee=()=>{m&&t(0,_=!0)},H=()=>{_&&s.trim().length===0&&t(0,_=!1)},M=({key:U})=>{U==="Escape"&&(t(2,s=""),B("clear"))},ee=()=>{t(2,s=""),F.focus(),B("clear")};return n.$$set=U=>{e=Z(Z({},e),ge(U)),t(18,i=he(e,l)),"value"in U&&t(2,s=U.value),"size"in U&&t(3,a=U.size),"searchClass"in U&&t(4,f=U.searchClass),"skeleton"in U&&t(5,u=U.skeleton),"light"in U&&t(6,c=U.light),"disabled"in U&&t(7,d=U.disabled),"expandable"in U&&t(8,m=U.expandable),"expanded"in U&&t(0,_=U.expanded),"placeholder"in U&&t(9,g=U.placeholder),"autocomplete"in U&&t(10,p=U.autocomplete),"autofocus"in U&&t(11,v=U.autofocus),"closeButtonLabelText"in U&&t(12,y=U.closeButtonLabelText),"labelText"in U&&t(13,V=U.labelText),"icon"in U&&t(14,C=U.icon),"id"in U&&t(15,D=U.id),"ref"in U&&t(1,F=U.ref),"$$scope"in U&&t(19,r=U.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&3&&_&&F&&F.focus(),n.$$.dirty[0]&1&&B(_?"expand":"collapse")},[_,F,s,a,f,u,c,d,m,g,p,v,y,V,C,D,L,B,i,r,o,A,P,R,K,O,ne,le,te,Q,se,we,ue,me,Ie,Me,ce,Ee,H,M,ee]}class Gs extends pe{constructor(e){super(),ve(this,e,Qs,Zs,be,{value:2,size:3,searchClass:4,skeleton:5,light:6,disabled:7,expandable:8,expanded:0,placeholder:9,autocomplete:10,autofocus:11,closeButtonLabelText:12,labelText:13,icon:14,id:15,ref:1},null,[-1,-1])}}const Js=Gs;function yl(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Xs(n){let e,t,l,i,o=n[1]&&yl(n),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],s={};for(let a=0;a{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class $s extends pe{constructor(e){super(),ve(this,e,xs,Xs,be,{size:0,title:1})}}const ea=$s;function Ml(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function ta(n){let e,t,l,i,o=n[1]&&Ml(n),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],s={};for(let a=0;a{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class na extends pe{constructor(e){super(),ve(this,e,la,ta,be,{size:0,title:1})}}const ia=na,ra=n=>({}),Vl=n=>({});function sa(n){let e,t,l;var i=n[1];function o(r){return{props:{"aria-label":r[10],title:r[10],class:"bx--overflow-menu__icon "+r[9]}}}return i&&(e=Ye(i,o(n))),{c(){e&&q(e.$$.fragment),t=fe()},l(r){e&&W(e.$$.fragment,r),t=fe()},m(r,s){e&&j(e,r,s),E(r,t,s),l=!0},p(r,s){const a={};if(s[0]&1024&&(a["aria-label"]=r[10]),s[0]&1024&&(a.title=r[10]),s[0]&512&&(a.class="bx--overflow-menu__icon "+r[9]),s[0]&2&&i!==(i=r[1])){if(e){ie();const f=e;k(f.$$.fragment,1,0,()=>{Y(f,1)}),re()}i?(e=Ye(i,o(r)),q(e.$$.fragment),b(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else i&&e.$set(a)},i(r){l||(e&&b(e.$$.fragment,r),l=!0)},o(r){e&&k(e.$$.fragment,r),l=!1},d(r){r&&h(t),e&&Y(e,r)}}}function Cl(n){let e,t;const l=n[24].default,i=Re(l,n,n[23],null);return{c(){e=T("ul"),i&&i.c(),this.h()},l(o){e=I(o,"UL",{role:!0,tabindex:!0,"aria-label":!0,"data-floating-menu-direction":!0,class:!0});var r=S(e);i&&i.l(r),r.forEach(h),this.h()},h(){z(e,"role","menu"),z(e,"tabindex","-1"),z(e,"aria-label",n[13]),z(e,"data-floating-menu-direction",n[5]),z(e,"class",n[8]),N(e,"bx--overflow-menu-options",!0),N(e,"bx--overflow-menu--flip",n[7]),N(e,"bx--overflow-menu-options--open",n[0]),N(e,"bx--overflow-menu-options--light",n[6]),N(e,"bx--overflow-menu-options--sm",n[4]==="sm"),N(e,"bx--overflow-menu-options--xl",n[4]==="xl"),N(e,"bx--breadcrumb-menu-options",!!n[14])},m(o,r){E(o,e,r),i&&i.m(e,null),n[31](e),t=!0},p(o,r){i&&i.p&&(!t||r[0]&8388608)&&He(i,l,o,o[23],t?Le(l,o[23],r,null):Fe(o[23]),null),(!t||r[0]&8192)&&z(e,"aria-label",o[13]),(!t||r[0]&32)&&z(e,"data-floating-menu-direction",o[5]),(!t||r[0]&256)&&z(e,"class",o[8]),(!t||r[0]&256)&&N(e,"bx--overflow-menu-options",!0),(!t||r[0]&384)&&N(e,"bx--overflow-menu--flip",o[7]),(!t||r[0]&257)&&N(e,"bx--overflow-menu-options--open",o[0]),(!t||r[0]&320)&&N(e,"bx--overflow-menu-options--light",o[6]),(!t||r[0]&272)&&N(e,"bx--overflow-menu-options--sm",o[4]==="sm"),(!t||r[0]&272)&&N(e,"bx--overflow-menu-options--xl",o[4]==="xl"),(!t||r[0]&16640)&&N(e,"bx--breadcrumb-menu-options",!!o[14])},i(o){t||(b(i,o),t=!0)},o(o){k(i,o),t=!1},d(o){o&&h(e),i&&i.d(o),n[31](null)}}}function aa(n){let e,t,l,i,o,r,s,a;const f=n[24].menu,u=Re(f,n,n[23],Vl),c=u||sa(n);let d=n[0]&&Cl(n),m=[{type:"button"},{"aria-haspopup":""},{"aria-expanded":n[0]},{"aria-label":n[13]},{id:n[11]},n[19]],_={};for(let g=0;g{d=null}),re()),Ne(i,_=ye(m,[{type:"button"},{"aria-haspopup":""},(!r||p[0]&1)&&{"aria-expanded":g[0]},(!r||p[0]&8192)&&{"aria-label":g[13]},(!r||p[0]&2048)&&{id:g[11]},p[0]&524288&&g[19]])),N(i,"bx--overflow-menu",!0),N(i,"bx--overflow-menu--open",g[0]),N(i,"bx--overflow-menu--light",g[6]),N(i,"bx--overflow-menu--sm",g[4]==="sm"),N(i,"bx--overflow-menu--xl",g[4]==="xl")},i(g){r||(b(c,g),b(d),r=!0)},o(g){k(c,g),k(d),r=!1},d(g){h(t),g&&e.d(),g&&h(l),g&&h(i),c&&c.d(g),d&&d.d(),n[32](null),s=!1,Oe(a)}}}function oa(n,e,t){let l,i;const o=["size","direction","open","light","flipped","menuOptionsClass","icon","iconClass","iconDescription","id","buttonRef","menuRef"];let r=he(e,o),s,a,f,{$$slots:u={},$$scope:c}=e,{size:d=void 0}=e,{direction:m="bottom"}=e,{open:_=!1}=e,{light:g=!1}=e,{flipped:p=!1}=e,{menuOptionsClass:v=void 0}=e,{icon:y=ea}=e,{iconClass:V=void 0}=e,{iconDescription:C="Open and close list of options"}=e,{id:D="ccs-"+Math.random().toString(36)}=e,{buttonRef:F=null}=e,{menuRef:B=null}=e;const L=Tt("BreadcrumbItem"),A=ot(),P=$e([]);ze(n,P,M=>t(22,a=M));const R=$e(void 0);ze(n,R,M=>t(37,f=M));const K=$e(void 0),O=$e(-1);ze(n,O,M=>t(21,s=M));let ne,le=!0;Lt("OverflowMenu",{focusedId:K,add:({id:M,text:ee,primaryFocus:U,disabled:Ae})=>{P.update(qe=>(U&&O.set(qe.length),[...qe,{id:M,text:ee,primaryFocus:U,disabled:Ae,index:qe.length}]))},update:M=>{R.set(M)},change:M=>{let ee=s+M;ee<0?ee=a.length-1:ee>=a.length&&(ee=0);let U=a[ee].disabled;for(;U;)ee=ee+M,ee<0?ee=a.length-1:ee>=a.length&&(ee=0),U=a[ee].disabled;O.set(ee)}}),Xt(()=>{if(f){const{index:M,text:ee}=a.filter(U=>U.id===f)[0];A("close",{index:M,text:ee}),t(0,_=!1)}if(_){const{width:M,height:ee}=F.getBoundingClientRect();t(20,ne=M),!le&&s<0&&B.focus(),p&&(t(3,B.style.left="auto",B),t(3,B.style.right=0,B)),m==="top"?(t(3,B.style.top="auto",B),t(3,B.style.bottom=ee+"px",B)):m==="bottom"&&t(3,B.style.top=ee+"px",B),L&&(t(3,B.style.top=ee+10+"px",B),t(3,B.style.left="-11px",B))}_||(P.set([]),R.set(void 0),O.set(0)),le=!1});function te(M){ke.call(this,n,M)}function Q(M){ke.call(this,n,M)}function se(M){ke.call(this,n,M)}function we(M){ke.call(this,n,M)}function ue(M){ke.call(this,n,M)}const me=({target:M})=>{F&&F.contains(M)||B&&!B.contains(M)&&t(0,_=!1)};function Ie(M){je[M?"unshift":"push"](()=>{B=M,t(3,B)})}function Me(M){je[M?"unshift":"push"](()=>{F=M,t(2,F)})}const ce=({target:M})=>{B&&B.contains(M)||(t(0,_=!_),_||A("close"))},Ee=M=>{_&&(["ArrowDown","ArrowLeft","ArrowRight","ArrowUp"].includes(M.key)?M.preventDefault():M.key==="Escape"&&(M.stopPropagation(),A("close"),t(0,_=!1),F.focus()))},H=M=>{_&&(F.contains(M.relatedTarget)||(A("close"),t(0,_=!1)))};return n.$$set=M=>{t(39,e=Z(Z({},e),ge(M))),t(19,r=he(e,o)),"size"in M&&t(4,d=M.size),"direction"in M&&t(5,m=M.direction),"open"in M&&t(0,_=M.open),"light"in M&&t(6,g=M.light),"flipped"in M&&t(7,p=M.flipped),"menuOptionsClass"in M&&t(8,v=M.menuOptionsClass),"icon"in M&&t(1,y=M.icon),"iconClass"in M&&t(9,V=M.iconClass),"iconDescription"in M&&t(10,C=M.iconDescription),"id"in M&&t(11,D=M.id),"buttonRef"in M&&t(2,F=M.buttonRef),"menuRef"in M&&t(3,B=M.menuRef),"$$scope"in M&&t(23,c=M.$$scope)},n.$$.update=()=>{t(13,l=e["aria-label"]||"menu"),n.$$.dirty[0]&6291456&&a[s]&&K.set(a[s].id),n.$$.dirty[0]&1050624&&t(12,i=``)},L&&t(1,y=ia),e=ge(e),[_,y,F,B,d,m,g,p,v,V,C,D,i,l,L,A,P,R,O,r,ne,s,a,c,u,te,Q,se,we,ue,me,Ie,Me,ce,Ee,H]}class fa extends pe{constructor(e){super(),ve(this,e,oa,aa,be,{size:4,direction:5,open:0,light:6,flipped:7,menuOptionsClass:8,icon:1,iconClass:9,iconDescription:10,id:11,buttonRef:2,menuRef:3},null,[-1,-1])}}const ua=fa;function ca(n){let e,t,l,i;const o=n[16].default,r=Re(o,n,n[15],null),s=r||ha(n);let a=[n[7]],f={};for(let u=0;u{r[d]=null}),re(),l=r[t],l?l.p(u,c):(l=r[t]=o[t](u),l.c()),b(l,1),l.m(e,null)),Ne(e,f=ye(a,[{role:"none"},(!i||c&64)&&{id:u[6]},c&2048&&u[11]])),N(e,"bx--overflow-menu-options__option",!0),N(e,"bx--overflow-menu--divider",u[4]),N(e,"bx--overflow-menu-options__option--danger",u[5]),N(e,"bx--overflow-menu-options__option--disabled",u[3])},i(u){i||(b(l),i=!0)},o(u){k(l),i=!1},d(u){u&&h(e),r[t].d()}}}function ga(n,e,t){let l;const i=["text","href","primaryFocus","disabled","hasDivider","danger","requireTitle","id","ref"];let o=he(e,i),r,{$$slots:s={},$$scope:a}=e;const f=Ui(s);let{text:u="Provide text"}=e,{href:c=""}=e,{primaryFocus:d=!1}=e,{disabled:m=!1}=e,{hasDivider:_=!1}=e,{danger:g=!1}=e,{requireTitle:p=!0}=e,{id:v="ccs-"+Math.random().toString(36)}=e,{ref:y=null}=e;const{focusedId:V,add:C,update:D,change:F}=Tt("OverflowMenu");ze(n,V,Q=>t(14,r=Q)),C({id:v,text:u,primaryFocus:d,disabled:m}),Xt(()=>{y&&d&&y.focus()});function B(Q){ke.call(this,n,Q)}function L(Q){ke.call(this,n,Q)}function A(Q){ke.call(this,n,Q)}function P(Q){ke.call(this,n,Q)}function R(Q){je[Q?"unshift":"push"](()=>{y=Q,t(0,y)})}const K=()=>{D(v)},O=({key:Q})=>{Q==="ArrowDown"?F(1):Q==="ArrowUp"&&F(-1)};function ne(Q){je[Q?"unshift":"push"](()=>{y=Q,t(0,y)})}const le=()=>{D(v)},te=({key:Q})=>{Q==="ArrowDown"?F(1):Q==="ArrowUp"&&F(-1)};return n.$$set=Q=>{e=Z(Z({},e),ge(Q)),t(11,o=he(e,i)),"text"in Q&&t(1,u=Q.text),"href"in Q&&t(2,c=Q.href),"primaryFocus"in Q&&t(12,d=Q.primaryFocus),"disabled"in Q&&t(3,m=Q.disabled),"hasDivider"in Q&&t(4,_=Q.hasDivider),"danger"in Q&&t(5,g=Q.danger),"requireTitle"in Q&&t(13,p=Q.requireTitle),"id"in Q&&t(6,v=Q.id),"ref"in Q&&t(0,y=Q.ref),"$$scope"in Q&&t(15,a=Q.$$scope)},n.$$.update=()=>{n.$$.dirty&16448&&t(12,d=r===v),n.$$.dirty&8206&&t(7,l={role:"menuitem",tabindex:"-1",class:"bx--overflow-menu-options__btn",disabled:c?void 0:m,href:c||void 0,title:p?f.default?void 0:u:void 0})},[y,u,c,m,_,g,v,l,V,D,F,o,d,p,r,a,s,B,L,A,P,R,K,O,ne,le,te]}class ba extends pe{constructor(e){super(),ve(this,e,ga,_a,be,{text:1,href:2,primaryFocus:12,disabled:3,hasDivider:4,danger:5,requireTitle:13,id:6,ref:0})}}const kt=ba;function Tl(n,e,t){const l=n.slice();return l[39]=e[t],l[41]=t,l}const pa=n=>({item:n[0]&8,index:n[0]&8}),Il=n=>({item:n[39],index:n[41]});function Nl(n){let e,t;return{c(){e=T("label"),t=X(n[10]),this.h()},l(l){e=I(l,"LABEL",{for:!0});var i=S(e);t=x(i,n[10]),i.forEach(h),this.h()},h(){z(e,"for",n[19]),N(e,"bx--label",!0),N(e,"bx--label--disabled",n[9]),N(e,"bx--visually-hidden",n[17])},m(l,i){E(l,e,i),w(e,t)},p(l,i){i[0]&1024&&_e(t,l[10]),i[0]&524288&&z(e,"for",l[19]),i[0]&512&&N(e,"bx--label--disabled",l[9]),i[0]&131072&&N(e,"bx--visually-hidden",l[17])},d(l){l&&h(e)}}}function Al(n){let e,t;return e=new xr({props:{class:"bx--list-box__invalid-icon"}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function Dl(n){let e,t;return e=new $r({props:{class:"bx--list-box__invalid-icon bx--list-box__invalid-icon--warning"}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function va(n){let e;return{c(){e=X(n[16])},l(t){e=x(t,n[16])},m(t,l){E(t,e,l)},p(t,l){l[0]&65536&&_e(e,t[16])},d(t){t&&h(e)}}}function ka(n){let e=n[4](n[22])+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){E(l,t,i)},p(l,i){i[0]&4194320&&e!==(e=l[4](l[22])+"")&&_e(t,e)},d(l){l&&h(t)}}}function Bl(n){let e,t;return e=new is({props:{"aria-labelledby":n[19],id:n[19],$$slots:{default:[Ea]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i[0]&524288&&(o["aria-labelledby"]=l[19]),i[0]&524288&&(o.id=l[19]),i[0]&2097181|i[1]&64&&(o.$$scope={dirty:i,ctx:l}),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function wa(n){let e=n[4](n[39])+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){E(l,t,i)},p(l,i){i[0]&24&&e!==(e=l[4](l[39])+"")&&_e(t,e)},d(l){l&&h(t)}}}function Sa(n){let e,t;const l=n[29].default,i=Re(l,n,n[37],Il),o=i||wa(n);return{c(){o&&o.c(),e=G()},l(r){o&&o.l(r),e=J(r)},m(r,s){o&&o.m(r,s),E(r,e,s),t=!0},p(r,s){i?i.p&&(!t||s[0]&8|s[1]&64)&&He(i,l,r,r[37],t?Le(l,r[37],s,pa):Fe(r[37]),Il):o&&o.p&&(!t||s[0]&24)&&o.p(r,t?s:[-1,-1])},i(r){t||(b(o,r),t=!0)},o(r){k(o,r),t=!1},d(r){o&&o.d(r),r&&h(e)}}}function Pl(n,e){let t,l,i;function o(...s){return e[34](e[39],...s)}function r(){return e[35](e[39],e[41])}return l=new rs({props:{id:e[39].id,active:e[0]===e[39].id,highlighted:e[21]===e[41],disabled:e[39].disabled,$$slots:{default:[Sa]},$$scope:{ctx:e}}}),l.$on("click",o),l.$on("mouseenter",r),{key:n,first:null,c(){t=fe(),q(l.$$.fragment),this.h()},l(s){t=fe(),W(l.$$.fragment,s),this.h()},h(){this.first=t},m(s,a){E(s,t,a),j(l,s,a),i=!0},p(s,a){e=s;const f={};a[0]&8&&(f.id=e[39].id),a[0]&9&&(f.active=e[0]===e[39].id),a[0]&2097160&&(f.highlighted=e[21]===e[41]),a[0]&8&&(f.disabled=e[39].disabled),a[0]&24|a[1]&64&&(f.$$scope={dirty:a,ctx:e}),l.$set(f)},i(s){i||(b(l.$$.fragment,s),i=!0)},o(s){k(l.$$.fragment,s),i=!1},d(s){s&&h(t),Y(l,s)}}}function Ea(n){let e=[],t=new Map,l,i,o=n[3];const r=s=>s[39].id;for(let s=0;s{d=null}),re()),!y[11]&&y[13]?m?V[0]&10240&&b(m,1):(m=Dl(),m.c(),b(m,1),m.m(t.parentNode,t)):m&&(ie(),k(m,1,1,()=>{m=null}),re()),g===(g=_(y))&&p?p.p(y,V):(p.d(1),p=g(y),p&&(p.c(),p.m(i,null)));const C={};V[0]&262144&&(C.translateWithId=y[18]),V[0]&2&&(C.open=y[1]),r.$set(C),(!f||V[0]&2)&&z(l,"aria-expanded",y[1]),(!f||V[0]&512)&&(l.disabled=y[9]),(!f||V[0]&262144)&&z(l,"translatewithid",y[18]),(!f||V[0]&524288)&&z(l,"id",y[19]),y[1]?v?(v.p(y,V),V[0]&2&&b(v,1)):(v=Bl(y),v.c(),b(v,1),v.m(a.parentNode,a)):v&&(ie(),k(v,1,1,()=>{v=null}),re())},i(y){f||(b(d),b(m),b(r.$$.fragment,y),b(v),f=!0)},o(y){k(d),k(m),k(r.$$.fragment,y),k(v),f=!1},d(y){d&&d.d(y),y&&h(e),m&&m.d(y),y&&h(t),y&&h(l),p.d(),Y(r),n[31](null),y&&h(s),v&&v.d(y),y&&h(a),u=!1,Oe(c)}}}function Rl(n){let e,t;return{c(){e=T("div"),t=X(n[15]),this.h()},l(l){e=I(l,"DIV",{});var i=S(e);t=x(i,n[15]),i.forEach(h),this.h()},h(){N(e,"bx--form__helper-text",!0),N(e,"bx--form__helper-text--disabled",n[9])},m(l,i){E(l,e,i),w(e,t)},p(l,i){i[0]&32768&&_e(t,l[15]),i[0]&512&&N(e,"bx--form__helper-text--disabled",l[9])},d(l){l&&h(e)}}}function ya(n){let e,t,l,i,o,r,s,a=n[10]&&Nl(n);l=new ls({props:{role:void 0,type:n[5],size:n[7],name:n[20],"aria-label":n[28]["aria-label"],class:`bx--dropdown + `+(n[6]==="top"&&"bx--list-box--up")+` + `+(n[11]&&"bx--dropdown--invalid")+` + `+(!n[11]&&n[13]&&"bx--dropdown--warning")+` + `+(n[1]&&"bx--dropdown--open")+` + `+(n[7]==="sm"&&"bx--dropdown--sm")+` + `+(n[7]==="xl"&&"bx--dropdown--xl")+` + `+(n[23]&&"bx--dropdown--inline")+` + `+(n[9]&&"bx--dropdown--disabled")+` + `+(n[8]&&"bx--dropdown--light"),disabled:n[9],open:n[1],invalid:n[11],invalidText:n[12],light:n[8],warn:n[13],warnText:n[14],$$slots:{default:[za]},$$scope:{ctx:n}}}),l.$on("click",n[36]);let f=!n[23]&&!n[11]&&!n[13]&&n[15]&&Rl(n),u=[n[27]],c={};for(let d=0;dH.text||H.id}=e,{selectedId:c}=e,{type:d="default"}=e,{direction:m="bottom"}=e,{size:_=void 0}=e,{open:g=!1}=e,{light:p=!1}=e,{disabled:v=!1}=e,{titleText:y=""}=e,{invalid:V=!1}=e,{invalidText:C=""}=e,{warn:D=!1}=e,{warnText:F=""}=e,{helperText:B=""}=e,{label:L=void 0}=e,{hideLabel:A=!1}=e,{translateWithId:P=void 0}=e,{id:R="ccs-"+Math.random().toString(36)}=e,{name:K=void 0}=e,{ref:O=null}=e;const ne=ot();let le=-1;function te(H){let M=le+H;if(f.length===0)return;M<0?M=f.length-1:M>=f.length&&(M=0);let ee=f[M].disabled;for(;ee;)M=M+H,M<0?M=f.length-1:M>=f.length&&(M=0),ee=f[M].disabled;t(21,le=M)}const Q=()=>{ne("select",{selectedId:c,selectedItem:f.find(H=>H.id===c)})},se=({target:H})=>{g&&O&&!O.contains(H)&&t(1,g=!1)};Wi(()=>(parent&&parent.addEventListener("click",se),()=>{parent&&parent.removeEventListener("click",se)}));const we=H=>{H.stopPropagation(),!v&&t(1,g=!g)};function ue(H){je[H?"unshift":"push"](()=>{O=H,t(2,O)})}const me=H=>{const{key:M}=H;["Enter","ArrowDown","ArrowUp"].includes(M)&&H.preventDefault(),M==="Enter"?(t(1,g=!g),le>-1&&f[le].id!==c&&(t(0,c=f[le].id),Q(),t(1,g=!1))):M==="Tab"?(t(1,g=!1),O.blur()):M==="ArrowDown"?(g||t(1,g=!0),te(1)):M==="ArrowUp"?(g||t(1,g=!0),te(-1)):M==="Escape"&&t(1,g=!1)},Ie=H=>{const{key:M}=H;if([" "].includes(M))H.preventDefault();else return;t(1,g=!g),le>-1&&f[le].id!==c&&(t(0,c=f[le].id),Q(),t(1,g=!1))},Me=(H,M)=>{if(H.disabled){M.stopPropagation();return}t(0,c=H.id),Q(),O.focus()},ce=(H,M)=>{H.disabled||t(21,le=M)},Ee=({target:H})=>{v||t(1,g=O.contains(H)?!g:!1)};return n.$$set=H=>{t(28,e=Z(Z({},e),ge(H))),t(27,r=he(e,o)),"items"in H&&t(3,f=H.items),"itemToString"in H&&t(4,u=H.itemToString),"selectedId"in H&&t(0,c=H.selectedId),"type"in H&&t(5,d=H.type),"direction"in H&&t(6,m=H.direction),"size"in H&&t(7,_=H.size),"open"in H&&t(1,g=H.open),"light"in H&&t(8,p=H.light),"disabled"in H&&t(9,v=H.disabled),"titleText"in H&&t(10,y=H.titleText),"invalid"in H&&t(11,V=H.invalid),"invalidText"in H&&t(12,C=H.invalidText),"warn"in H&&t(13,D=H.warn),"warnText"in H&&t(14,F=H.warnText),"helperText"in H&&t(15,B=H.helperText),"label"in H&&t(16,L=H.label),"hideLabel"in H&&t(17,A=H.hideLabel),"translateWithId"in H&&t(18,P=H.translateWithId),"id"in H&&t(19,R=H.id),"name"in H&&t(20,K=H.name),"ref"in H&&t(2,O=H.ref),"$$scope"in H&&t(37,a=H.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&32&&t(23,l=d==="inline"),n.$$.dirty[0]&9&&t(22,i=f.find(H=>H.id===c)),n.$$.dirty[0]&2&&(g||t(21,le=-1))},e=ge(e),[c,g,O,f,u,d,m,_,p,v,y,V,C,D,F,B,L,A,P,R,K,le,i,l,te,Q,se,r,e,s,we,ue,me,Ie,Me,ce,Ee,a]}class Va extends pe{constructor(e){super(),ve(this,e,Ma,ya,be,{items:3,itemToString:4,selectedId:0,type:5,direction:6,size:7,open:1,light:8,disabled:9,titleText:10,invalid:11,invalidText:12,warn:13,warnText:14,helperText:15,label:16,hideLabel:17,translateWithId:18,id:19,name:20,ref:2},null,[-1,-1])}}const Ca=Va;function Ta(n){const e=n-1;return e*e*e+1}function Hl(n,{delay:e=0,duration:t=400,easing:l=vr}={}){const i=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:l,css:o=>`opacity: ${o*i}`}}function bt(n,{delay:e=0,duration:t=400,easing:l=Ta,axis:i="y"}={}){const o=getComputedStyle(n),r=+o.opacity,s=i==="y"?"height":"width",a=parseFloat(o[s]),f=i==="y"?["top","bottom"]:["left","right"],u=f.map(v=>`${v[0].toUpperCase()}${v.slice(1)}`),c=parseFloat(o[`padding${u[0]}`]),d=parseFloat(o[`padding${u[1]}`]),m=parseFloat(o[`margin${u[0]}`]),_=parseFloat(o[`margin${u[1]}`]),g=parseFloat(o[`border${u[0]}Width`]),p=parseFloat(o[`border${u[1]}Width`]);return{delay:e,duration:t,easing:l,css:v=>`overflow: hidden;opacity: ${Math.min(v*20,1)*r};${s}: ${v*a}px;padding-${f[0]}: ${v*c}px;padding-${f[1]}: ${v*d}px;margin-${f[0]}: ${v*m}px;margin-${f[1]}: ${v*_}px;border-${f[0]}-width: ${v*g}px;border-${f[1]}-width: ${v*p}px;`}}const Ia=n=>({}),Fl=n=>({});function Ll(n){let e=n[3].label+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){E(l,t,i)},p(l,i){i[0]&8&&e!==(e=l[3].label+"")&&_e(t,e)},d(l){l&&h(t)}}}function Na(n){let e,t,l,i,o,r,s,a,f,u,c,d,m=n[3]&&Ll(n);o=new ts({props:{"aria-hidden":"true",title:n[1]}});const _=n[20].default,g=Re(_,n,n[19],null);let p=[{role:"navigation"},n[10]],v={};for(let C=0;Ct(18,f=ue));const C=ul(V,ue=>ue.reduce((me,Ie)=>({...me,[Ie.id]:Ie}),{}));ze(n,C,ue=>t(28,u=ue));const D=$e(g),F=$e(void 0);ze(n,F,ue=>t(16,s=ue));const B=$e([]);ze(n,B,ue=>t(17,a=ue));const L=ul(B,ue=>ue.reduce((me,Ie)=>({...me,[Ie.id]:Ie}),{})),A=$e(void 0);let P=null;Lt("Tabs",{tabs:V,contentById:L,selectedTab:F,selectedContent:A,useAutoWidth:D,add:ue=>{V.update(me=>[...me,{...ue,index:me.length}])},addContent:ue=>{B.update(me=>[...me,{...ue,index:me.length}])},update:ue=>{t(14,K=u[ue].index)},change:async ue=>{let me=K+ue;me<0?me=f.length-1:me>=f.length&&(me=0);let Ie=f[me].disabled;for(;Ie;)me=me+ue,me<0?me=f.length-1:me>=f.length&&(me=0),Ie=f[me].disabled;t(14,K=me),await kr();const Me=P==null?void 0:P.querySelectorAll("[role='tab']")[K];Me==null||Me.focus()}}),Xt(()=>{t(12,m=K),O>-1&&O!==K&&y("change",K),O=K});let R=!0,K=m,O=-1;function ne(ue){ke.call(this,n,ue)}function le(ue){ke.call(this,n,ue)}const te=()=>{t(5,R=!R)},Q=()=>{t(5,R=!R)},se=()=>{t(5,R=!R)};function we(ue){je[ue?"unshift":"push"](()=>{P=ue,t(4,P)})}return n.$$set=ue=>{t(11,e=Z(Z({},e),ge(ue))),t(10,r=he(e,o)),"selected"in ue&&t(12,m=ue.selected),"type"in ue&&t(0,_=ue.type),"autoWidth"in ue&&t(13,g=ue.autoWidth),"iconDescription"in ue&&t(1,p=ue.iconDescription),"triggerHref"in ue&&t(2,v=ue.triggerHref),"$$scope"in ue&&t(19,d=ue.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&4096&&t(14,K=m),n.$$.dirty[0]&278528&&t(3,l=f[K]||void 0),n.$$.dirty[0]&147456&&t(15,i=a[K]||void 0),n.$$.dirty[0]&32776&&(l&&F.set(l.id),i&&A.set(i.id)),n.$$.dirty[0]&65536&&s&&t(5,R=!0),n.$$.dirty[0]&8192&&D.set(g)},e=ge(e),[_,p,v,l,P,R,V,C,F,B,r,e,m,g,K,i,s,a,f,d,c,ne,le,te,Q,se,we]}class Da extends pe{constructor(e){super(),ve(this,e,Aa,Na,be,{selected:12,type:0,autoWidth:13,iconDescription:1,triggerHref:2},null,[-1,-1])}}const rr=Da;function Ba(n){let e;return{c(){e=X(n[1])},l(t){e=x(t,n[1])},m(t,l){E(t,e,l)},p(t,l){l&2&&_e(e,t[1])},d(t){t&&h(e)}}}function Pa(n){let e,t,l,i,o,r,s;const a=n[15].default,f=Re(a,n,n[14],null),u=f||Ba(n);let c=[{tabindex:"-1"},{role:"presentation"},n[12]],d={};for(let m=0;mt(13,r=K)),ze(n,v,K=>t(7,s=K)),y({id:_,label:u,disabled:d});function D(K){ke.call(this,n,K)}function F(K){ke.call(this,n,K)}function B(K){ke.call(this,n,K)}function L(K){ke.call(this,n,K)}function A(K){je[K?"unshift":"push"](()=>{g=K,t(0,g)})}const P=()=>{d||V(_)},R=({key:K})=>{d||(K==="ArrowRight"?C(1):K==="ArrowLeft"?C(-1):(K===" "||K==="Enter")&&V(_))};return n.$$set=K=>{e=Z(Z({},e),ge(K)),t(12,o=he(e,i)),"label"in K&&t(1,u=K.label),"href"in K&&t(2,c=K.href),"disabled"in K&&t(3,d=K.disabled),"tabindex"in K&&t(4,m=K.tabindex),"id"in K&&t(5,_=K.id),"ref"in K&&t(0,g=K.ref),"$$scope"in K&&t(14,f=K.$$scope)},n.$$.update=()=>{n.$$.dirty&8224&&t(6,l=r===_)},[g,u,c,d,m,_,l,s,p,v,V,C,o,r,f,a,D,F,B,L,A,P,R]}class Ha extends pe{constructor(e){super(),ve(this,e,Ra,Pa,be,{label:1,href:2,disabled:3,tabindex:4,id:5,ref:0})}}const Et=Ha;function Fa(n){let e,t,l,i;const o=n[12].default,r=Re(o,n,n[11],null);let s=[{role:"tabpanel"},{"aria-labelledby":n[1]},{"aria-hidden":t=!n[2]},{hidden:l=n[2]?void 0:""},{id:n[0]},n[6]],a={};for(let f=0;ft(10,u=y)),ze(n,p,y=>t(8,a=y)),ze(n,v,y=>t(9,f=y)),g({id:m}),n.$$set=y=>{e=Z(Z({},e),ge(y)),t(6,s=he(e,r)),"id"in y&&t(0,m=y.id),"$$scope"in y&&t(11,d=y.$$scope)},n.$$.update=()=>{n.$$.dirty&1025&&t(2,l=u===m),n.$$.dirty&513&&t(7,i=f[m].index),n.$$.dirty&384&&t(1,o=a[i].id)},[m,o,l,_,p,v,s,i,a,f,u,d,c]}class Oa extends pe{constructor(e){super(),ve(this,e,La,Fa,be,{id:0})}}const zt=Oa;function Ol(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function qa(n){let e,t,l=n[1]&&Ol(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class Ya extends pe{constructor(e){super(),ve(this,e,ja,qa,be,{size:0,title:1})}}function ql(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Ua(n){let e,t,l=n[1]&&ql(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class Ka extends pe{constructor(e){super(),ve(this,e,Wa,Ua,be,{size:0,title:1})}}function jl(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Za(n){let e,t,l=n[1]&&jl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class Ga extends pe{constructor(e){super(),ve(this,e,Qa,Za,be,{size:0,title:1})}}function Yl(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Ja(n){let e,t,l=n[1]&&Yl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class Qt extends pe{constructor(e){super(),ve(this,e,Xa,Ja,be,{size:0,title:1})}}function Ul(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function xa(n){let e,t,l,i=n[1]&&Ul(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}let eo=class extends pe{constructor(e){super(),ve(this,e,$a,xa,be,{size:0,title:1})}};function Wl(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function to(n){let e,t,l=n[1]&&Wl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class no extends pe{constructor(e){super(),ve(this,e,lo,to,be,{size:0,title:1})}}function Kl(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function io(n){let e,t,l,i,o=n[1]&&Kl(n),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],s={};for(let a=0;a{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class Ut extends pe{constructor(e){super(),ve(this,e,ro,io,be,{size:0,title:1})}}function Zl(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function so(n){let e,t,l,i=n[1]&&Zl(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class st extends pe{constructor(e){super(),ve(this,e,ao,so,be,{size:0,title:1})}}function Ql(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function oo(n){let e,t,l=n[1]&&Ql(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class uo extends pe{constructor(e){super(),ve(this,e,fo,oo,be,{size:0,title:1})}}function Gl(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function co(n){let e,t,l,i=n[1]&&Gl(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class mo extends pe{constructor(e){super(),ve(this,e,ho,co,be,{size:0,title:1})}}function Jl(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function _o(n){let e,t,l=n[1]&&Jl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class bo extends pe{constructor(e){super(),ve(this,e,go,_o,be,{size:0,title:1})}}function Xl(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function po(n){let e,t,l=n[1]&&Xl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class ko extends pe{constructor(e){super(),ve(this,e,vo,po,be,{size:0,title:1})}}function xl(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function wo(n){let e,t,l,i=n[1]&&xl(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class Pt extends pe{constructor(e){super(),ve(this,e,So,wo,be,{size:0,title:1})}}function $l(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Eo(n){let e,t,l=n[1]&&$l(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class yo extends pe{constructor(e){super(),ve(this,e,zo,Eo,be,{size:0,title:1})}}function en(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Mo(n){let e,t,l=n[1]&&en(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class Co extends pe{constructor(e){super(),ve(this,e,Vo,Mo,be,{size:0,title:1})}}function tn(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function To(n){let e,t,l=n[1]&&tn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class Rt extends pe{constructor(e){super(),ve(this,e,Io,To,be,{size:0,title:1})}}function ln(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function No(n){let e,t,l=n[1]&&ln(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class Ht extends pe{constructor(e){super(),ve(this,e,Ao,No,be,{size:0,title:1})}}function nn(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Do(n){let e,t,l=n[1]&&nn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class rn extends pe{constructor(e){super(),ve(this,e,Bo,Do,be,{size:0,title:1})}}function sn(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Po(n){let e,t,l=n[1]&&sn(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],o={};for(let r=0;r{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class an extends pe{constructor(e){super(),ve(this,e,Ro,Po,be,{size:0,title:1})}}function on(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Ho(n){let e,t,l,i=n[1]&&on(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class It extends pe{constructor(e){super(),ve(this,e,Fo,Ho,be,{size:0,title:1})}}function fn(n){let e,t;return{c(){e=ae("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=S(e);t=x(i,n[1]),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&2&&_e(t,l[1])},d(l){l&&h(e)}}}function Lo(n){let e,t,l,i=n[1]&&fn(n),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let s=0;s{t(5,e=Z(Z({},e),ge(f))),t(3,r=he(e,o)),"size"in f&&t(0,s=f.size),"title"in f&&t(1,a=f.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ge(e),[s,a,i,r,l]}class qo extends pe{constructor(e){super(),ve(this,e,Oo,Lo,be,{size:0,title:1})}}const jo=32,sr="itemScrollContainer";function Yo(n,e,t,l){if(e==null)return[];let i=[];return l==null?i=ct(t||e):i=At(l,t||e),i.filter(o=>or(n,o.path))}function Uo(n,e){return e.some(t=>Ue(t.path,n.path))}function Wo(n,e){const t=Ze.field(n);return t==null?!1:Uo(t,e)}function ar(n,e){const t={};let l;if(n.fields!=null){for(const[o,r]of Object.entries(n.fields))if(e.some(s=>Ue(s.path,r.path))){const s=ar(r,e);s!=null&&(t[o]=s)}}else n.repeated_field!=null&&(e.some(o=>{var r;return Ue(o.path,(r=n.repeated_field)==null?void 0:r.path)})?l=n.repeated_field:l=void 0);return l==null&&Object.keys(t).length===0?{...n,fields:void 0,repeated_field:void 0}:n.path.length===0||e.some(o=>Ue(o.path,n.path))?{...n,fields:t,repeated_field:l}:null}function Ko(n,e){var l,i;const t=[];for(const o of tl(n)){const r=e==null?void 0:e.find(a=>Ue(a.path,o.path)),s=(i=(l=r==null?void 0:r.stats)==null?void 0:l.data)==null?void 0:i.avg_text_length;s!=null&&s>jo&&t.push(o)}return t}function or(n,e){if(n==null)return!1;if(typeof e!="string"&&(e=Te(e)),n[e]!=null)return n[e];const t=et(e);return t.length>1?or(n,Te(t.slice(0,t.length-1))):!0}function fr(n,e){return n.searchPath!=null&&n.selectedColumns[n.searchPath]!=!1?et(n.searchPath):Zo(e)}function ur(n,e,t,l){if(t==null)return null;if(n.searchEmbedding!=null)return n.searchEmbedding;const i=nl(e,t);return(i!=null?[...l||[]].sort((r,s)=>{const a=i.includes(r),f=i.includes(s);return a&&f?0:a?-1:f?1:0}):[])[0]}function nl(n,e){var i;if(n.schema==null||e==null)return[];const t=new Set,l=ct(Dt(n.schema,e)).filter(o=>o.signal!=null&&ct(o).some(r=>r.dtype==="embedding"));for(const o of l)((i=o.signal)==null?void 0:i.signal_name)!=null&&t.add(o.signal.signal_name);return Array.from(t)}function Ot(n,e){return e==null||n==null?!1:(n.udfs||[]).some(t=>Gi(t.path,e))}function il(n,e){return e==null?n.queryOptions.searches||[]:(n.queryOptions.searches||[]).filter(t=>Ue(t.path,e))}function Zo(n){if(n.stats==null||n.stats.length===0)return null;const e=(n.visibleFields||[]).filter(t=>t.dtype==="string").map(t=>Te(t.path));for(const t of n.stats){const l=Te(t.path);if(e.indexOf(l)>=0)return t.path}return null}function Qo(n){var e,t;return(((t=(e=n.selectRowsSchema)==null?void 0:e.data)==null?void 0:t.sorts)||[])[0]||null}function Go(n){const e=` +`,t=n.split(e),l=[];let i=0;for(let o=0;o[a,0]));for(const a of t)e[a].sort((f,u)=>{var m,_;const c=((m=f[nt])==null?void 0:m.start)||0,d=((_=u[nt])==null?void 0:_.start)||0;return c-d});let o=0;const r=[];let s=Object.fromEntries(Object.entries(i).map(([a,f])=>[a,[e[a][f],e[a][f+1]]]));for(;oo&&(a=m.start),m.endo&&(a=m.end))}const f=Object.fromEntries(Object.entries(s).map(([c,d])=>[c,d.filter(m=>m!=null&&m[nt]!=null&&m[nt].starto)]));for(const c of Object.keys(f))f[c].length===0&&delete f[c];const u=Object.values(f).flat().map(c=>Ze.path(c)).map(c=>Te(c));r.push({text:n.slice(o,a),span:{start:o,end:a},originalSpans:f,paths:u});for(const c of Object.keys(i)){const d=i[c],m=(s[c][0]||{})[nt];if(!(m==null||d==null)&&m.end<=a){if(d>e[c].length){delete i[c];continue}i[c]++}}o=a,s=Object.fromEntries(Object.entries(i).map(([c,d])=>[c,[e[c][d],e[c][d+1]]]))}return o{if(!r)return;const V=y.target;p(V,s,i)<=l?(!u&&r&&(f("loadMore"),t(8,d=V.scrollHeight),t(9,m=V.scrollTop)),t(7,u=!0)):t(7,u=!1)},p=(y,V,C)=>{const D=y.documentElement?y.documentElement:y;return V?C?D.scrollLeft:D.scrollTop:C?D.scrollWidth-D.clientWidth-D.scrollLeft:D.scrollHeight-D.clientHeight-D.scrollTop};Wi(()=>{a?t(10,_=document):o?t(10,_=o):t(10,_=c.parentNode)}),wr(()=>{_&&(_.removeEventListener("scroll",g),_.removeEventListener("resize",g))});function v(y){je[y?"unshift":"push"](()=>{c=y,t(2,c)})}return n.$$set=y=>{"threshold"in y&&t(3,l=y.threshold),"horizontal"in y&&t(4,i=y.horizontal),"elementScroll"in y&&t(0,o=y.elementScroll),"hasMore"in y&&t(5,r=y.hasMore),"reverse"in y&&t(6,s=y.reverse),"window"in y&&t(1,a=y.window)},n.$$.update=()=>{n.$$.dirty&1088&&_&&(s&&t(10,_.scrollTop=_.scrollHeight,_),_.addEventListener("scroll",g),_.addEventListener("resize",g)),n.$$.dirty&1984&&u&&s&&t(10,_.scrollTop=_.scrollHeight-d+m,_)},[o,a,c,l,i,r,s,u,d,m,_,v]}class $o extends pe{constructor(e){super(),ve(this,e,xo,Xo,be,{threshold:3,horizontal:4,elementScroll:0,hasMore:5,reverse:6,window:1})}}function ef(n){let e,t,l,i,o,r,s,a;l=new yr({});const f=n[3].default,u=Re(f,n,n[6],null);return{c(){e=T("div"),t=T("button"),q(l.$$.fragment),i=G(),o=T("span"),u&&u.c(),this.h()},l(c){e=I(c,"DIV",{class:!0});var d=S(e);t=I(d,"BUTTON",{class:!0});var m=S(t);W(l.$$.fragment,m),m.forEach(h),i=J(d),o=I(d,"SPAN",{class:!0});var _=S(o);u&&u.l(_),_.forEach(h),d.forEach(h),this.h()},h(){z(t,"class","opacity-50 hover:opacity-100"),z(o,"class","truncate"),z(e,"class","removable-tag flex items-center gap-x-1")},m(c,d){E(c,e,d),w(e,t),j(l,t,null),w(e,i),w(e,o),u&&u.m(o,null),r=!0,s||(a=de(t,"click",Ki(n[4])),s=!0)},p(c,d){u&&u.p&&(!r||d&64)&&He(u,f,c,c[6],r?Le(f,c[6],d,null):Fe(c[6]),null)},i(c){r||(b(l.$$.fragment,c),b(u,c),r=!0)},o(c){k(l.$$.fragment,c),k(u,c),r=!1},d(c){c&&h(e),Y(l),u&&u.d(c),s=!1,a()}}}function tf(n){let e,t;const l=[{type:n[0]},n[2]];let i={$$slots:{default:[ef]},$$scope:{ctx:n}};for(let o=0;os("remove");function u(c){ke.call(this,n,c)}return n.$$set=c=>{e=Z(Z({},e),ge(c)),t(2,i=he(e,l)),"type"in c&&t(0,a=c.type),"$$scope"in c&&t(6,r=c.$$scope)},[a,s,i,o,f,u,r]}class qt extends pe{constructor(e){super(),ve(this,e,lf,tf,be,{type:0})}}function nf(n){let e=(n[2]?"":n[5])+"",t,l,i=n[0][n[1].op]+"",o,r,s;return{c(){t=X(e),l=G(),o=X(i),r=G(),s=X(n[4])},l(a){t=x(a,e),l=J(a),o=x(a,i),r=J(a),s=x(a,n[4])},m(a,f){E(a,t,f),E(a,l,f),E(a,o,f),E(a,r,f),E(a,s,f)},p(a,f){f&36&&e!==(e=(a[2]?"":a[5])+"")&&_e(t,e),f&2&&i!==(i=a[0][a[1].op]+"")&&_e(o,i),f&16&&_e(s,a[4])},d(a){a&&h(t),a&&h(l),a&&h(o),a&&h(r),a&&h(s)}}}function rf(n){let e,t,l,i,o,r;return t=new qt({props:{interactive:!0,type:"magenta",$$slots:{default:[nf]},$$scope:{ctx:n}}}),t.$on("click",n[9]),t.$on("remove",n[10]),{c(){e=T("div"),q(t.$$.fragment),this.h()},l(s){e=I(s,"DIV",{class:!0});var a=S(e);W(t.$$.fragment,a),a.forEach(h),this.h()},h(){z(e,"class","filter-pill items-center")},m(s,a){E(s,e,a),j(t,e,null),i=!0,o||(r=We(l=Je.call(null,e,{text:n[6]})),o=!0)},p(s,[a]){const f={};a&2102&&(f.$$scope={dirty:a,ctx:s}),t.$set(f),l&&yt(l.update)&&a&64&&l.update.call(null,{text:s[6]})},i(s){i||(b(t.$$.fragment,s),i=!0)},o(s){k(t.$$.fragment,s),i=!1},d(s){s&&h(e),Y(t),o=!1,r()}}}function sf(n,e,t){let l,i,o,r,s;const a={equals:"=",not_equal:"≠",less:"<",less_equal:"≤",greater:">",greater_equal:"≥",in:"in",exists:"exists"};let{filter:f}=e,{hidePath:u=!1}=e;const c=Qe();ze(n,c,_=>t(7,s=_));const d=()=>ft({command:ut.EditFilter,namespace:s.namespace,datasetName:s.datasetName,path:i}),m=()=>c.removeFilter(f);return n.$$set=_=>{"filter"in _&&t(1,f=_.filter),"hidePath"in _&&t(2,u=_.hidePath)},n.$$.update=()=>{n.$$.dirty&2&&t(4,l=De(f.value||"false")),n.$$.dirty&2&&t(3,i=et(f.path)),n.$$.dirty&18&&t(6,o=`${Te(f.path)} ${a[f.op]} ${l}`),n.$$.dirty&8&&t(5,r=i.at(-1))},[a,f,u,i,l,r,o,s,c,d,m]}class rl extends pe{constructor(e){super(),ve(this,e,sf,rf,be,{FILTER_SHORTHANDS:0,filter:1,hidePath:2})}get FILTER_SHORTHANDS(){return this.$$.ctx[0]}}function af(n){let e=(n[1]?"":n[0])+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){E(l,t,i)},p(l,i){i&3&&e!==(e=(l[1]?"":l[0])+"")&&_e(t,e)},d(l){l&&h(t)}}}function of(n){let e,t,l,i,o;const r=[n[2],{type:"purple"},{icon:Qt}];let s={$$slots:{default:[af]},$$scope:{ctx:n}};for(let a=0;a{e=Z(Z({},e),ge(s)),t(2,i=he(e,l)),"embedding"in s&&t(0,o=s.embedding),"hideEmbeddingName"in s&&t(1,r=s.hideEmbeddingName)},[o,r,i]}class jt extends pe{constructor(e){super(),ve(this,e,ff,of,be,{embedding:0,hideEmbeddingName:1})}}function uf(n){let e=Te(n[0].path)+"",t,l,i=n[0].query.type+"",o;return{c(){t=X(e),l=X(": "),o=X(i)},l(r){t=x(r,e),l=x(r,": "),o=x(r,i)},m(r,s){E(r,t,s),E(r,l,s),E(r,o,s)},p(r,s){s&1&&e!==(e=Te(r[0].path)+"")&&_e(t,e),s&1&&i!==(i=r[0].query.type+"")&&_e(o,i)},d(r){r&&h(t),r&&h(l),r&&h(o)}}}function cn(n){let e,t,l;return t=new jt({props:{embedding:n[0].query.embedding}}),{c(){e=T("div"),q(t.$$.fragment),this.h()},l(i){e=I(i,"DIV",{class:!0});var o=S(e);W(t.$$.fragment,o),o.forEach(h),this.h()},h(){z(e,"class","ml-2")},m(i,o){E(i,e,o),j(t,e,null),l=!0},p(i,o){const r={};o&1&&(r.embedding=i[0].query.embedding),t.$set(r)},i(i){l||(b(t.$$.fragment,i),l=!0)},o(i){k(t.$$.fragment,i),l=!1},d(i){i&&h(e),Y(t)}}}function dn(n){let e,t;return{c(){e=T("div"),t=X(n[2]),this.h()},l(l){e=I(l,"DIV",{class:!0});var i=S(e);t=x(i,n[2]),i.forEach(h),this.h()},h(){z(e,"class","mt-2 whitespace-pre-wrap text-left")},m(l,i){E(l,e,i),w(e,t)},p(l,i){i&4&&_e(t,l[2])},d(l){l&&h(e)}}}function cf(n){let e,t,l,i,o,r,s;l=new pt({props:{type:n[1],$$slots:{default:[uf]},$$scope:{ctx:n}}});let a=(n[0].query.type==="semantic"||n[0].query.type==="concept")&&cn(n),f=n[2]&&dn(n);return{c(){e=T("div"),t=T("div"),q(l.$$.fragment),i=G(),a&&a.c(),o=G(),f&&f.c(),r=fe(),this.h()},l(u){e=I(u,"DIV",{class:!0});var c=S(e);t=I(c,"DIV",{class:!0});var d=S(t);W(l.$$.fragment,d),d.forEach(h),i=J(c),a&&a.l(c),c.forEach(h),o=J(u),f&&f.l(u),r=fe(),this.h()},h(){z(t,"class","whitespace-nowrap"),z(e,"class","flex items-center justify-items-center")},m(u,c){E(u,e,c),w(e,t),j(l,t,null),w(e,i),a&&a.m(e,null),E(u,o,c),f&&f.m(u,c),E(u,r,c),s=!0},p(u,[c]){const d={};c&2&&(d.type=u[1]),c&9&&(d.$$scope={dirty:c,ctx:u}),l.$set(d),u[0].query.type==="semantic"||u[0].query.type==="concept"?a?(a.p(u,c),c&1&&b(a,1)):(a=cn(u),a.c(),b(a,1),a.m(e,null)):a&&(ie(),k(a,1,1,()=>{a=null}),re()),u[2]?f?f.p(u,c):(f=dn(u),f.c(),f.m(r.parentNode,r)):f&&(f.d(1),f=null)},i(u){s||(b(l.$$.fragment,u),b(a),s=!0)},o(u){k(l.$$.fragment,u),k(a),s=!1},d(u){u&&h(e),Y(l),a&&a.d(),u&&h(o),f&&f.d(u),u&&h(r)}}}function df(n,e,t){let l,{search:i}=e,{tagType:o="outline"}=e;return n.$$set=r=>{"search"in r&&t(0,i=r.search),"tagType"in r&&t(1,o=r.tagType)},n.$$.update=()=>{n.$$.dirty&1&&t(2,l=i.query.type==="concept"?"":i.query.search)},[i,o,l]}class hn extends pe{constructor(e){super(),ve(this,e,df,cf,be,{search:0,tagType:1})}}function hf(n){let e;return{c(){e=X(n[2])},l(t){e=x(t,n[2])},m(t,l){E(t,e,l)},p(t,l){l&4&&_e(e,t[2])},d(t){t&&h(e)}}}function mf(n){let e,t,l,i,o,r;return t=new qt({props:{title:"query",interactive:!0,type:n[1],$$slots:{default:[hf]},$$scope:{ctx:n}}}),t.$on("remove",n[7]),{c(){e=T("button"),q(t.$$.fragment),this.h()},l(s){e=I(s,"BUTTON",{class:!0});var a=S(e);W(t.$$.fragment,a),a.forEach(h),this.h()},h(){z(e,"class","search-pill items-center text-left")},m(s,a){E(s,e,a),j(t,e,null),i=!0,o||(r=[We(l=Je.call(null,e,{component:hn,props:{search:n[0],tagType:n[1]}})),de(e,"click",n[6])],o=!0)},p(s,[a]){const f={};a&2&&(f.type=s[1]),a&516&&(f.$$scope={dirty:a,ctx:s}),t.$set(f),l&&yt(l.update)&&a&3&&l.update.call(null,{component:hn,props:{search:s[0],tagType:s[1]}})},i(s){i||(b(t.$$.fragment,s),i=!0)},o(s){k(t.$$.fragment,s),i=!1},d(s){s&&h(e),Y(t),o=!1,Oe(r)}}}function _f(n,e,t){let l,i,o,{search:r}=e;const s={keyword:"outline",semantic:"teal",concept:"green"},a=Qe(),f=rt();ze(n,f,d=>t(3,o=d));function u(d){ke.call(this,n,d)}const c=()=>{var d;return a.removeSearch(r,((d=o.selectRowsSchema)==null?void 0:d.data)||null)};return n.$$set=d=>{"search"in d&&t(0,r=d.search)},n.$$.update=()=>{n.$$.dirty&1&&t(2,l=r.query.type==="concept"?`${r.query.concept_namespace}/${r.query.concept_name}`:r.query.search),n.$$.dirty&1&&t(1,i=r.query.type!=null?s[r.query.type]:"outline")},[r,i,l,o,a,f,u,c]}class cr extends pe{constructor(e){super(),ve(this,e,_f,mf,be,{search:0})}}function mn(n,e,t){const l=n.slice();return l[15]=e[t],l}function _n(n,e,t){const l=n.slice();return l[18]=e[t],l}function gn(n,e,t){const l=n.slice();return l[21]=e[t],l}function bn(n){let e,t,l=n[9][n[18]]+"",i,o,r,s,a,f=n[3][n[18]],u=[];for(let d=0;dk(u[d],1,1,()=>{u[d]=null});return{c(){e=T("div"),t=T("div"),i=X(l),o=G(),r=T("div");for(let d=0;d{l=null}),re())},i(i){t||(b(l),t=!0)},o(i){k(l),t=!1},d(i){l&&l.d(i),i&&h(e)}}}function kn(n){let e,t,l,i,o,r,s=n[4],a=[];for(let u=0;uk(a[u],1,1,()=>{a[u]=null});return{c(){e=T("div"),t=T("div"),l=X("Filters"),i=G(),o=T("div");for(let u=0;u{r[u]=null}),re()),~e?(t=r[e],t?t.p(a,f):(t=r[e]=o[e](a),t.c()),b(t,1),t.m(l.parentNode,l)):t=null)},i(a){i||(b(t),i=!0)},o(a){k(t),i=!1},d(a){~e&&r[e].d(a),a&&h(l)}}}function kf(n){let e,t,l,i,o,r,s,a,f=n[8],u=[];for(let g=0;gk(u[g],1,1,()=>{u[g]=null});let d=n[4]!=null&&n[4].length>0&&kn(n),m=n[0]&&n[1]&&Sn(n),_=n[2]&&En(n);return{c(){e=T("div"),t=T("div");for(let g=0;g0?d?(d.p(g,p),p&16&&b(d,1)):(d=kn(g),d.c(),b(d,1),d.m(t,null)):d&&(ie(),k(d,1,1,()=>{d=null}),re()),g[0]&&g[1]?m?m.p(g,p):(m=Sn(g),m.c(),m.m(o,null)):m&&(m.d(1),m=null),g[2]?_?(_.p(g,p),p&4&&b(_,1)):(_=En(g),_.c(),b(_,1),_.m(s.parentNode,s)):_&&(ie(),k(_,1,1,()=>{_=null}),re())},i(g){if(!a){for(let p=0;p(a(),a=Ge(l,C=>t(6,s=C)),l);n.$$.on_destroy.push(()=>a());let{totalNumRows:u}=e,{manifest:c}=e,d=Qe();ze(n,d,C=>t(12,r=C));let m=null;const _=["keyword","semantic","concept"],g={keyword:"Keyword",semantic:"Semantic",concept:"Concepts"};let p={};function v(C){if(C.query.type==="concept"){const D=C.query;t(2,m={namespace:D.concept_namespace,name:D.concept_name})}}const y=C=>v(C),V=()=>t(2,m=null);return n.$$set=C=>{"totalNumRows"in C&&t(0,u=C.totalNumRows),"manifest"in C&&t(1,c=C.manifest)},n.$$.update=()=>{if(n.$$.dirty&4&&f(t(5,l=m?Mr(m.namespace,m.name):void 0)),n.$$.dirty&4096&&t(11,i=il(r)),n.$$.dirty&4096&&t(4,o=r.queryOptions.filters),n.$$.dirty&2056){t(3,p={});for(const C of i)C.query.type&&(C.query.type in p||t(3,p[C.query.type]=[],p),p[C.query.type].push(C))}},[u,c,m,p,o,l,s,d,_,g,v,i,r,y,V]}class Sf extends pe{constructor(e){super(),ve(this,e,wf,kf,be,{totalNumRows:0,manifest:1})}}function Ef(n,e){const t=l=>n&&!n.contains(l.target)&&!l.defaultPrevented&&e();return document.addEventListener("click",t,!0),{destroy(){document.removeEventListener("click",t,!0)}}}function zn(n,e,t){const l=n.slice();return l[18]=e[t],l}function yn(n){let e,t,l=n[0].conceptNamespace+"",i,o,r=n[0].conceptName+"",s,a,f,u,c,d,m,_,g,p;return u=new Cr({}),m=new Tr({}),{c(){e=T("div"),t=T("span"),i=X(l),o=X(" / "),s=X(r),a=G(),f=T("button"),q(u.$$.fragment),c=G(),d=T("button"),q(m.$$.fragment),this.h()},l(v){e=I(v,"DIV",{class:!0});var y=S(e);t=I(y,"SPAN",{class:!0});var V=S(t);i=x(V,l),o=x(V," / "),s=x(V,r),V.forEach(h),a=J(y),f=I(y,"BUTTON",{class:!0});var C=S(f);W(u.$$.fragment,C),C.forEach(h),c=J(y),d=I(y,"BUTTON",{class:!0});var D=S(d);W(m.$$.fragment,D),D.forEach(h),y.forEach(h),this.h()},h(){z(t,"class","pr-4"),z(f,"class","px-2"),z(d,"class","px-2"),z(e,"class","flex flex-row px-4 pt-2")},m(v,y){E(v,e,y),w(e,t),w(t,i),w(t,o),w(t,s),w(e,a),w(e,f),j(u,f,null),w(e,c),w(e,d),j(m,d,null),_=!0,g||(p=[de(f,"click",n[13]),de(d,"click",n[14])],g=!0)},p(v,y){(!_||y&1)&&l!==(l=v[0].conceptNamespace+"")&&_e(i,l),(!_||y&1)&&r!==(r=v[0].conceptName+"")&&_e(s,r)},i(v){_||(b(u.$$.fragment,v),b(m.$$.fragment,v),_=!0)},o(v){k(u.$$.fragment,v),k(m.$$.fragment,v),_=!1},d(v){v&&h(e),Y(u),Y(m),g=!1,Oe(p)}}}function zf(n){let e,t,l,i;return t=new jt({props:{class:"hover:cursor-pointer",embedding:n[18]}}),{c(){e=X("Find similar "),q(t.$$.fragment),l=G()},l(o){e=x(o,"Find similar "),W(t.$$.fragment,o),l=J(o)},m(o,r){E(o,e,r),j(t,o,r),E(o,l,r),i=!0},p(o,r){const s={};r&16&&(s.embedding=o[18]),t.$set(s)},i(o){i||(b(t.$$.fragment,o),i=!0)},o(o){k(t.$$.fragment,o),i=!1},d(o){o&&h(e),Y(t,o),o&&h(l)}}}function Mn(n,e){let t,l,i;function o(){return e[15](e[18])}return l=new tt({props:{kind:"ghost",class:"w-full",size:"small",$$slots:{default:[zf]},$$scope:{ctx:e}}}),l.$on("click",o),{key:n,first:null,c(){t=fe(),q(l.$$.fragment),this.h()},l(r){t=fe(),W(l.$$.fragment,r),this.h()},h(){this.first=t},m(r,s){E(r,t,s),j(l,r,s),i=!0},p(r,s){e=r;const a={};s&2097168&&(a.$$scope={dirty:s,ctx:e}),l.$set(a)},i(r){i||(b(l.$$.fragment,r),i=!0)},o(r){k(l.$$.fragment,r),i=!1},d(r){r&&h(t),Y(l,r)}}}function yf(n){let e,t,l,i=[],o=new Map,r,s,a,f,u,c=n[0].conceptName!=null&&n[0].conceptNamespace!=null&&yn(n),d=n[4];const m=_=>_[18];for(let _=0;_{c=null}),re()),g&144&&(d=_[4],ie(),i=it(i,g,m,1,_,d,o,l,dt,Mn,null,zn),re()),(!a||g&2&&r!==(r=_[1]!=null?`left: ${_[1].x}px; top: ${_[1].y}px`:""))&&z(e,"style",r),(!a||g&16)&&N(e,"hidden",_[4].length===0)},i(_){if(!a){b(c);for(let g=0;g{a&&(s||(s=at(e,Hl,{duration:60},!0)),s.run(1))}),a=!0}},o(_){k(c);for(let g=0;g(s(),s=Ge(g,A=>t(11,r=A)),g),f,u=$,c=()=>(u(),u=Ge(_,A=>t(12,f=A)),_);n.$$.on_destroy.push(()=>s()),n.$$.on_destroy.push(()=>u());let{details:d}=e,{clickPosition:m}=e,{datasetViewStore:_}=e;c();let{datasetStore:g}=e;a();let{embeddings:p}=e,{addConceptLabel:v}=e;const y=ot();function V(A){if(!d.conceptName||!d.conceptNamespace)throw Error("Label could not be added, no active concept.");v(d.conceptNamespace,d.conceptName,d.text,A),y("click")}const C=A=>{l==null||i==null||(_.addSearch({path:[Te(l)],query:{type:"semantic",search:d.text,embedding:A}}),y("click"))},D=()=>V(!0),F=()=>V(!1),B=A=>C(A),L=()=>y("close");return n.$$set=A=>{"details"in A&&t(0,d=A.details),"clickPosition"in A&&t(1,m=A.clickPosition),"datasetViewStore"in A&&c(t(2,_=A.datasetViewStore)),"datasetStore"in A&&a(t(3,g=A.datasetStore)),"embeddings"in A&&t(8,p=A.embeddings),"addConceptLabel"in A&&t(9,v=A.addConceptLabel)},n.$$.update=()=>{n.$$.dirty&6144&&t(10,l=fr(f,r)),n.$$.dirty&7424&&(i=ur(f,r,l,p.map(A=>A.name))),n.$$.dirty&3072&&t(4,o=nl(r,l))},[d,m,_,g,o,y,V,C,p,v,l,r,f,D,F,B,L]}class Vf extends pe{constructor(e){super(),ve(this,e,Mf,yf,be,{details:0,clickPosition:1,datasetViewStore:2,datasetStore:3,embeddings:8,addConceptLabel:9})}}function Cf(n,e){let t,l=e;n.addEventListener("click",r=>i(r));function i(r){t=new Vf({props:{details:l.details(),clickPosition:{x:r.clientX,y:r.clientY},datasetViewStore:l.datasetViewStore,datasetStore:l.datasetStore,embeddings:l.embeddings,addConceptLabel:l.addConceptLabel},target:document.body}),t.$on("close",o),t.$on("click",o)}function o(){t==null||t.$destroy(),t=void 0}return{update(r){l=r,t==null||t.$set({details:l.details()})},destroy(){o()}}}const Wt=.5,Vn=.3,Tf=.8,Cn="#3366cc";function Gt(n){return`rgba(180,215,255,${n})`}function Jt(n){let e=0;if(n>Wt){const t=(n-Wt)/(1-Wt);e=Vn+t*(Tf-Vn)}return Gt(e)}function Tn(n,e,t){const l=n.slice();return l[7]=e[t],l}function In(n,e){let t,l,i=e[7].name+"",o,r,s,a,f=(typeof e[7].value=="number"?e[7].value.toFixed(3):e[7].value)+"",u,c;return{key:n,first:null,c(){t=T("div"),l=T("div"),o=X(i),r=G(),s=T("div"),a=T("span"),u=X(f),c=G(),this.h()},l(d){t=I(d,"DIV",{class:!0});var m=S(t);l=I(m,"DIV",{class:!0});var _=S(l);o=x(_,i),_.forEach(h),r=J(m),s=I(m,"DIV",{class:!0});var g=S(s);a=I(g,"SPAN",{class:!0});var p=S(a);u=x(p,f),p.forEach(h),g.forEach(h),c=J(m),m.forEach(h),this.h()},h(){z(l,"class","named-value-name table-cell max-w-xs truncate pr-2 svelte-1689hje"),z(a,"class","px-1"),N(a,"font-bold",e[7].isKeywordSearch||e[7].isNonNumericMetadata),Pe(a,"background-color",(e[7].isConcept||e[7].isSemanticSearch)&&typeof e[7].value=="number"?Jt(e[7].value):""),z(s,"class","table-cell rounded text-right"),z(t,"class","table-row"),this.first=t},m(d,m){E(d,t,m),w(t,l),w(l,o),w(t,r),w(t,s),w(s,a),w(a,u),w(t,c)},p(d,m){e=d,m&1&&i!==(i=e[7].name+"")&&_e(o,i),m&1&&f!==(f=(typeof e[7].value=="number"?e[7].value.toFixed(3):e[7].value)+"")&&_e(u,f),m&1&&N(a,"font-bold",e[7].isKeywordSearch||e[7].isNonNumericMetadata),m&1&&Pe(a,"background-color",(e[7].isConcept||e[7].isSemanticSearch)&&typeof e[7].value=="number"?Jt(e[7].value):"")},d(d){d&&h(t)}}}function If(n){let e,t,l=[],i=new Map,o,r=`${n[4]}px`,s=`${Math.min(n[1],n[3]-n[2]-20)}px`,a=n[0];const f=u=>u[7];for(let u=0;un[6].call(e)),N(e,"hidden",n[0].length===0),Pe(e,"top",r),Pe(e,"left",s)},m(u,c){E(u,e,c),w(e,t);for(let d=0;d{"namedValues"in u&&t(0,l=u.namedValues),"x"in u&&t(1,i=u.x),"y"in u&&t(5,o=u.y)},[l,i,s,r,a,o,f]}class Af extends pe{constructor(e){super(),ve(this,e,Nf,If,be,{namedValues:0,x:1,y:5})}}function Df(n,e){let t,l=e;const i=()=>r();l.isHovered&&o();function o(){const s=l.namedValues.filter(d=>Array.from(l.spansHovered).some(m=>Gi(et(d.spanPath),et(m))));l.itemScrollContainer!=null&&l.itemScrollContainer.addEventListener("scroll",i);const a=n.getBoundingClientRect(),f=window.getComputedStyle(n),u=parseInt(f.getPropertyValue("line-height")),c=a.height>u?a.x+n.offsetLeft||n.clientLeft:a.x;t=new Af({props:{namedValues:s,x:c,y:a.top},target:document.body})}function r(){t==null||t.$destroy(),t=void 0,l.itemScrollContainer!=null&&l.itemScrollContainer.removeEventListener("scroll",i)}return{update(s){l=s,l.isHovered?o():r()},destroy(){r()}}}const Bf=500;function Pf(n,e,t,l,i,o,r){var f,u,c;const s=[],a=new Set;for(const d of n){let m=!1;const _=[];for(const F of d.paths)a.has(F)||(_.push(F),a.add(F));const g=[];let p=!1,v=-1/0;for(const[F,B]of Object.entries(d.originalSpans)){const L=t[F],A=et(F);if(L.length!==0)for(const P of B)for(const R of L){const K=R.path.slice(A.length),O=Or(P,K);if(O==null)continue;const ne=Ze.value(O);if(ne==null)continue;if(R.dtype==="float32"){const Q=Ze.value(O);Q!=null&&(v=Math.max(v,Q))}const le=Te(Ze.path(P)),te=!_.includes(le);if(((f=R.signal)==null?void 0:f.signal_name)==="concept_score"){if(!te){const Q=R.signal;g.push({name:`${Q.namespace}/${Q.concept_name}`,value:ne,spanPath:F,isConcept:!0})}ne>.5&&(m=!0)}else if(((u=R.signal)==null?void 0:u.signal_name)==="semantic_similarity"){if(!te){const Q=R.signal;g.push({name:`similarity: ${Q.query}`,value:ne,spanPath:F,isSemanticSearch:!0})}ne>.5&&(m=!0)}else{let Q=!1;for(const se of i)if(Ji(R.path,se)&&e!=null){const we=Dt(e,et(se).slice(0,-1));if(((c=we==null?void 0:we.signal)==null?void 0:c.signal_name)==="concept_labels"){if(!te){const ue=we==null?void 0:we.signal;g.push({name:`${ue.namespace}/${ue.concept_name} label`,value:ne,spanPath:F})}Q=!0,m=!0}}if(!Q){const se=!qr(R.dtype);if(!te){const we=Te(R.path.slice(o.path.length));g.push({name:we,value:ne,spanPath:F,isNonNumericMetadata:se})}p=p||se,m=!0}}}}let y=!1;if(e!=null){for(const F of l)if(d.originalSpans[F]!=null){y=!0;const B=Dt(e,et(F).slice(0,-1)),L=B==null?void 0:B.signal;(L==null?void 0:L.signal_name)==="substring_search"&&(g.push({name:"keyword",value:L.query,spanPath:F,isKeywordSearch:!0}),m=!0)}}const V=i.some(F=>d.originalSpans[F]!=null),C=d.paths.some(F=>r.has(F)),D=C&&_.length>0&&Array.from(r).some(F=>_.includes(F));s.push({backgroundColor:Jt(v),isBlackBolded:y||p,isHighlightBolded:V,isShownSnippet:m,snippetScore:v,hoverInfo:g,paths:d.paths,text:d.text,snippetText:d.text,originalSpans:d.originalSpans,isHovered:C,isFirstHover:D})}return s}function Rf(n,e){var r,s,a;if(e)return{snippetSpans:n.map(f=>({renderSpan:f,isShown:!0})),someSnippetsHidden:!1};const t=[];let l=0;for(const f of n)f.isShownSnippet&&(l+=f.text.length);const i=n.filter(f=>!f.isShownSnippet).sort((f,u)=>u.snippetScore-f.snippetScore);for(const f of i)if(f.isShownSnippet=!0,l+=f.text.length,l>Bf)break;let o=!1;for(const[f,u]of n.entries())if(u.isShownSnippet)t.push({renderSpan:u,isShown:!0});else{const c=((r=n[f+1])==null?void 0:r.isShownSnippet)===!0,d=((s=n[f-1])==null?void 0:s.isShownSnippet)===!0,m=((a=t[t.length-1])==null?void 0:a.isShown)===!0;t.push({renderSpan:u,isShown:!1,isEllipsis:(c||d)&&m,hasNewline:u.text.includes(` +`)}),o=!0}return{snippetSpans:t,someSnippetsHidden:o}}function Nn(n,e,t){const l=n.slice();l[37]=e[t];const i=l[37].renderSpan;return l[38]=i,l}function Hf(n){let e,t,l,i,o,r=n[37].hasNewline&&An();return{c(){e=T("span"),t=X("..."),r&&r.c(),l=fe(),this.h()},l(s){e=I(s,"SPAN",{class:!0});var a=S(e);t=x(a,"..."),a.forEach(h),r&&r.l(s),l=fe(),this.h()},h(){z(e,"class","highlight-span text-sm leading-5 svelte-i4bfci")},m(s,a){E(s,e,a),w(e,t),r&&r.m(s,a),E(s,l,a),i||(o=We(Je.call(null,e,{text:`Some text was hidden to improve readability. +Click "Show all" to show the entire document.`})),i=!0)},p(s,a){s[37].hasNewline?r||(r=An(),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},d(s){s&&h(e),r&&r.d(s),s&&h(l),i=!1,o()}}}function Ff(n){let e,t=n[38].snippetText+"",l,i,o,r,s;function a(){return n[30](n[38])}function f(){return n[31](n[38])}function u(){return n[32](n[38])}return{c(){e=T("span"),l=X(t),this.h()},l(c){e=I(c,"SPAN",{class:!0});var d=S(e);l=x(d,t),d.forEach(h),this.h()},h(){z(e,"class","hover:cursor-poiner highlight-span text-sm leading-5 svelte-i4bfci"),N(e,"hover:cursor-pointer",n[0].length>0),N(e,"font-bold",n[38].isBlackBolded),N(e,"font-medium",n[38].isHighlightBolded&&!n[38].isBlackBolded),Pe(e,"color",n[38].isHighlightBolded&&!n[38].isBlackBolded?Cn:""),Pe(e,"background-color",n[38].isHovered?Gt(Pn):n[38].backgroundColor)},m(c,d){E(c,e,d),w(e,l),r||(s=[We(i=Df.call(null,e,{namedValues:n[38].hoverInfo,isHovered:n[38].isFirstHover,spansHovered:n[1],itemScrollContainer:n[5]})),We(o=Cf.call(null,e,{details:a,datasetViewStore:n[7],datasetStore:n[8],embeddings:n[6].data||[],addConceptLabel:n[14]})),de(e,"mouseenter",f),de(e,"mouseleave",u)],r=!0)},p(c,d){n=c,d[0]&16&&t!==(t=n[38].snippetText+"")&&_e(l,t),i&&yt(i.update)&&d[0]&50&&i.update.call(null,{namedValues:n[38].hoverInfo,isHovered:n[38].isFirstHover,spansHovered:n[1],itemScrollContainer:n[5]}),o&&yt(o.update)&&d[0]&80&&o.update.call(null,{details:a,datasetViewStore:n[7],datasetStore:n[8],embeddings:n[6].data||[],addConceptLabel:n[14]}),d[0]&1&&N(e,"hover:cursor-pointer",n[0].length>0),d[0]&16&&N(e,"font-bold",n[38].isBlackBolded),d[0]&16&&N(e,"font-medium",n[38].isHighlightBolded&&!n[38].isBlackBolded),d[0]&16&&Pe(e,"color",n[38].isHighlightBolded&&!n[38].isBlackBolded?Cn:""),d[0]&16&&Pe(e,"background-color",n[38].isHovered?Gt(Pn):n[38].backgroundColor)},d(c){c&&h(e),r=!1,Oe(s)}}}function An(n){let e,t;return{c(){e=T("span"),t=T("br")},l(l){e=I(l,"SPAN",{});var i=S(e);t=I(i,"BR",{}),i.forEach(h)},m(l,i){E(l,e,i),w(e,t)},d(l){l&&h(e)}}}function Dn(n){let e;function t(o,r){if(o[37].isShown)return Ff;if(o[37].isEllipsis)return Hf}let l=t(n),i=l&&l(n);return{c(){i&&i.c(),e=fe()},l(o){i&&i.l(o),e=fe()},m(o,r){i&&i.m(o,r),E(o,e,r)},p(o,r){l===(l=t(o))&&i?i.p(o,r):(i&&i.d(1),i=l&&l(o),i&&(i.c(),i.m(e.parentNode,e)))},d(o){i&&i.d(o),o&&h(e)}}}function Bn(n){let e,t,l,i,o;const r=[Of,Lf],s=[];function a(f,u){return f[2]?1:0}return l=a(n),i=s[l]=r[l](n),{c(){e=T("div"),t=T("div"),i.c(),this.h()},l(f){e=I(f,"DIV",{class:!0});var u=S(e);t=I(u,"DIV",{class:!0});var c=S(t);i.l(c),c.forEach(h),u.forEach(h),this.h()},h(){z(t,"class","w-30 mt-2 rounded border border-neutral-300 text-center"),z(e,"class","flex flex-row justify-center")},m(f,u){E(f,e,u),w(e,t),s[l].m(t,null),o=!0},p(f,u){let c=l;l=a(f),l===c?s[l].p(f,u):(ie(),k(s[c],1,1,()=>{s[c]=null}),re(),i=s[l],i?i.p(f,u):(i=s[l]=r[l](f),i.c()),b(i,1),i.m(t,null))},i(f){o||(b(i),o=!0)},o(f){k(i),o=!1},d(f){f&&h(e),s[l].d()}}}function Lf(n){let e,t;return e=new tt({props:{size:"small",class:"w-full",kind:"ghost",icon:Ga,$$slots:{default:[qf]},$$scope:{ctx:n}}}),e.$on("click",n[34]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i[1]&1024&&(o.$$scope={dirty:i,ctx:l}),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function Of(n){let e,t;return e=new tt({props:{size:"small",class:"w-full",kind:"ghost",icon:Ka,$$slots:{default:[jf]},$$scope:{ctx:n}}}),e.$on("click",n[33]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i[1]&1024&&(o.$$scope={dirty:i,ctx:l}),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function qf(n){let e;return{c(){e=X("Hide excess")},l(t){e=x(t,"Hide excess")},m(t,l){E(t,e,l)},d(t){t&&h(e)}}}function jf(n){let e;return{c(){e=X("Show all")},l(t){e=x(t,"Show all")},m(t,l){E(t,e,l)},d(t){t&&h(e)}}}function Yf(n){let e,t,l,i=n[4],o=[];for(let s=0;s{r=null}),re())},i(s){l||(b(r),l=!0)},o(s){k(r),l=!1},d(s){s&&h(e),Ke(o,s),r&&r.d()}}}const Pn=.9;function Uf(n,e,t){let l,i,o,r,s,a,f,u,c,d,m,_,g,{text:p}=e,{row:v}=e,{field:y}=e,{visibleKeywordSpanFields:V}=e,{visibleSpanFields:C}=e,{visibleLabelSpanFields:D}=e;const F=Qe(),B=rt();ze(n,B,ce=>t(29,m=ce));const L=el();ze(n,L,ce=>t(6,g=ce));let A,P=new Set;const R=ce=>{ce.paths.forEach(Ee=>P.add(Ee)),t(1,P)},K=ce=>{ce.paths.forEach(Ee=>P.delete(Ee)),t(1,P)};let O={};const ne=ce=>{const M={conceptName:null,conceptNamespace:null,text:f.filter(ee=>ee.paths.some(U=>((ce==null?void 0:ce.paths)||[]).some(Ae=>Ue(Ae,U)))).map(ee=>ee.text).join("")};for(const ee of Object.keys(ce.originalSpans))for(const U of A[ee]||[]){M.conceptName=U.signal.concept_name,M.conceptNamespace=U.signal.namespace;break}return M},le=Ir();ze(n,le,ce=>t(36,d=ce));const te=(ce,Ee,H,M)=>{if(!Ee||!ce)throw Error("Label could not be added, no active concept.");d.mutate([ce,Ee,{insert:[{text:H,label:M}]}])};let Q=!1,se=Tt(sr);ze(n,se,ce=>t(5,_=ce));const we=ce=>ne(ce),ue=ce=>R(ce),me=ce=>K(ce),Ie=()=>t(2,Q=!0),Me=()=>t(2,Q=!1);return n.$$set=ce=>{"text"in ce&&t(16,p=ce.text),"row"in ce&&t(17,v=ce.row),"field"in ce&&t(18,y=ce.field),"visibleKeywordSpanFields"in ce&&t(19,V=ce.visibleKeywordSpanFields),"visibleSpanFields"in ce&&t(0,C=ce.visibleSpanFields),"visibleLabelSpanFields"in ce&&t(20,D=ce.visibleLabelSpanFields)},n.$$.update=()=>{var ce,Ee;if(n.$$.dirty[0]&536870912&&t(27,l=(Ee=(ce=m.selectRowsSchema)==null?void 0:ce.data)==null?void 0:Ee.schema),n.$$.dirty[0]&524288&&t(25,i=V.map(H=>Te(H.path))),n.$$.dirty[0]&1048576&&t(24,o=D.map(H=>Te(H.path))),n.$$.dirty[0]&536870913&&t(26,r=Object.fromEntries(C.map(H=>[Te(H.path),tl(H).filter(M=>M.dtype!="string_span").filter(M=>{var ee;return(ee=m.visibleFields)==null?void 0:ee.some(U=>Ue(U.path,M.path))})]))),n.$$.dirty[0]&67108864&&(A=Object.fromEntries(Object.entries(r).map(([H,M])=>[H,M.filter(ee=>jr(ee.signal))]).filter(([H,M])=>M.length>0))),n.$$.dirty[0]&131073&&t(28,s=Object.fromEntries(C.map(H=>[Te(H.path),Xi(v,H.path)]))),n.$$.dirty[0]&268500992&&t(23,a=Jo(p,s)),n.$$.dirty[0]&260308994&&t(22,f=Pf(a,l,r,i,o,y,P)),n.$$.dirty[0]&10485760){t(21,O={});for(const H of a)for(const M of H.paths)t(21,O[M]=O[M]||[],O),O[M].push(H)}n.$$.dirty[0]&4194308&&t(4,{snippetSpans:u,someSnippetsHidden:c}=Rf(f,Q),u,(t(3,c),t(22,f),t(2,Q),t(23,a),t(27,l),t(26,r),t(25,i),t(24,o),t(18,y),t(1,P),t(16,p),t(28,s),t(29,m),t(0,C),t(19,V),t(20,D),t(17,v)))},[C,P,Q,c,u,_,g,F,B,L,R,K,ne,le,te,se,p,v,y,V,D,O,f,a,o,i,r,l,s,m,we,ue,me,Ie,Me]}class Wf extends pe{constructor(e){super(),ve(this,e,Uf,Yf,be,{text:16,row:17,field:18,visibleKeywordSpanFields:19,visibleSpanFields:0,visibleLabelSpanFields:20},null,[-1,-1])}}function Rn(n,e,t){const l=n.slice();l[8]=e[t],l[11]=t;const i=l[3].length>1?`[${l[11]}]`:"";return l[9]=i,l}function Hn(n){let e,t,l,i=n[0].join(".")+n[9]+"",o,r,s,a,f,u;return a=new Wf({props:{text:De(n[8]),field:n[2],row:n[1],visibleKeywordSpanFields:n[6],visibleSpanFields:n[5],visibleLabelSpanFields:n[4]}}),{c(){e=T("div"),t=T("div"),l=T("div"),o=X(i),r=G(),s=T("div"),q(a.$$.fragment),f=G(),this.h()},l(c){e=I(c,"DIV",{class:!0});var d=S(e);t=I(d,"DIV",{class:!0});var m=S(t);l=I(m,"DIV",{class:!0});var _=S(l);o=x(_,i),_.forEach(h),r=J(m),s=I(m,"DIV",{class:!0});var g=S(s);W(a.$$.fragment,g),g.forEach(h),m.forEach(h),f=J(d),d.forEach(h),this.h()},h(){z(l,"class","sticky top-0 z-10 w-full self-start border-t border-neutral-200 bg-neutral-100 px-2 py-2 pb-2 font-mono font-medium text-neutral-500"),z(s,"class","font-normal"),z(t,"class","flex w-full flex-col"),z(e,"class","flex flex-row")},m(c,d){E(c,e,d),w(e,t),w(t,l),w(l,o),w(t,r),w(t,s),j(a,s,null),w(e,f),u=!0},p(c,d){(!u||d&9)&&i!==(i=c[0].join(".")+c[9]+"")&&_e(o,i);const m={};d&8&&(m.text=De(c[8])),d&4&&(m.field=c[2]),d&2&&(m.row=c[1]),d&64&&(m.visibleKeywordSpanFields=c[6]),d&32&&(m.visibleSpanFields=c[5]),d&16&&(m.visibleLabelSpanFields=c[4]),a.$set(m)},i(c){u||(b(a.$$.fragment,c),u=!0)},o(c){k(a.$$.fragment,c),u=!1},d(c){c&&h(e),Y(a)}}}function Kf(n){let e,t,l=n[3],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{"path"in c&&t(0,a=c.path),"row"in c&&t(1,f=c.row),"field"in c&&t(2,u=c.field)},n.$$.update=()=>{n.$$.dirty&4&&t(7,l=ct(u)),n.$$.dirty&128&&t(6,i=l.filter(c=>{var d;return((d=c.signal)==null?void 0:d.signal_name)==="substring_search"}).flatMap(c=>At("string_span",c))),n.$$.dirty&128&&t(5,o=l.filter(c=>{var d;return((d=c.signal)==null?void 0:d.signal_name)!=="substring_search"}).filter(c=>c.dtype==="string_span")),n.$$.dirty&128&&t(4,r=l.filter(c=>{var d;return((d=c.signal)==null?void 0:d.signal_name)==="concept_labels"}).flatMap(c=>At("string_span",c))),n.$$.dirty&3&&t(3,s=Xi(f,a).map(c=>Ze.value(c)).filter(Yr))},[a,f,u,s,r,o,i,l]}class Qf extends pe{constructor(e){super(),ve(this,e,Zf,Kf,be,{path:0,row:1,field:2})}}function Gf(n){let e,t,l,i,o;const r=[n[3],{type:n[0]?"green":"blue"},{icon:n[2]}];let s={};for(let a=0;a{e=Z(Z({},e),ge(a)),t(3,i=he(e,l)),"isPreview"in a&&t(0,o=a.isPreview)},[o,r,s,i]}class sl extends pe{constructor(e){super(),ve(this,e,Jf,Gf,be,{isPreview:0})}}function Fn(n,e,t){const l=n.slice();return l[0]=e[t],l}function Ln(n){let e,t,l=[],i=new Map,o,r=n[1];const s=a=>Te(a[0].path);for(let a=0;a{D[A]=null}),re()),~u?(c=D[u],c?c.p(e,L):(c=D[u]=C[u](e),c.c()),b(c,1),c.m(f,null)):c=null),(!V||L&2)&&g!==(g=e[0].formattedValue+"")&&_e(p,g),(!V||L&2&&v!==(v=`${e[0].value}`))&&z(_,"title",v),(!V||L&2)&&N(_,"italic",e[0].formattedValue===null)},i(B){V||(b(c),V=!0)},o(B){k(c),V=!1},d(B){B&&h(t),~u&&D[u].d()}}}function $f(n){let e,t,l=n[1].length>0&&Ln(n);return{c(){l&&l.c(),e=fe()},l(i){l&&l.l(i),e=fe()},m(i,o){l&&l.m(i,o),E(i,e,o),t=!0},p(i,[o]){i[1].length>0?l?(l.p(i,o),o&2&&b(l,1)):(l=Ln(i),l.c(),b(l,1),l.m(e.parentNode,e)):l&&(ie(),k(l,1,1,()=>{l=null}),re())},i(i){t||(b(l),t=!0)},o(i){k(l),t=!1},d(i){l&&l.d(i),i&&h(e)}}}function eu(n,e,t){let l,i,o,{row:r}=e,{visibleFields:s}=e;const a=rt();ze(n,a,c=>t(5,i=c));const f=el();ze(n,f,c=>t(6,o=c));function u(c){const d=Ur(c).filter(_=>Wo(_,s)),m=d.filter(_=>{var g;return((g=Ze.field(_))==null?void 0:g.dtype)==="string_span"}).map(_=>Ze.path(_));return d.filter(_=>!m.some(g=>Ji(Ze.path(_),g))).map(_=>{var D,F;const g=Ze.field(_),p=Ze.path(_);let v=Ze.value(_);if(g.dtype==="string_span")return null;const y=((D=o.data)==null?void 0:D.some(B=>{var L;return B.name===((L=g.signal)==null?void 0:L.signal_name)}))||!1,V=gt(g);let C;return y||V&&g.dtype==null||g.dtype==="embedding"||g.repeated_field!=null?C="":v==null?C=null:C=De(v),{indentLevel:p.length-1,fieldName:p[p.length-1],field:g,path:p,isSignal:V,isPreviewSignal:Ot(((F=i.selectRowsSchema)==null?void 0:F.data)||null,p),isEmbeddingSignal:y,value:v,formattedValue:C}}).filter(_=>_!=null)}return n.$$set=c=>{"row"in c&&t(0,r=c.row),"visibleFields"in c&&t(4,s=c.visibleFields)},n.$$.update=()=>{n.$$.dirty&1&&t(1,l=u(r))},[r,l,a,f,s]}class tu extends pe{constructor(e){super(),ve(this,e,eu,$f,be,{row:0,visibleFields:4})}}function qn(n,e,t){const l=n.slice();return l[5]=e[t],l[7]=t,l}function jn(n){let e,t=[],l=new Map,i,o,r=n[1];const s=a=>Te(a[5].path);for(let a=0;an[4].call(e))},m(a,f){E(a,e,f);for(let u=0;u0&&jn(n);return s=new tu({props:{row:n[0],visibleFields:n[2]}}),{c(){e=T("div"),t=T("div"),u&&u.c(),l=G(),i=T("div"),o=T("div"),r=T("div"),q(s.$$.fragment),this.h()},l(c){e=I(c,"DIV",{class:!0});var d=S(e);t=I(d,"DIV",{class:!0});var m=S(t);u&&u.l(m),l=J(m),i=I(m,"DIV",{class:!0});var _=S(i);o=I(_,"DIV",{class:!0});var g=S(o);r=I(g,"DIV",{style:!0,class:!0});var p=S(r);W(s.$$.fragment,p),p.forEach(h),g.forEach(h),_.forEach(h),m.forEach(h),d.forEach(h),this.h()},h(){z(r,"style",a=`max-height: ${Math.max(Un,n[3])}px`),z(r,"class","overflow-y-auto"),z(o,"class","sticky top-0 self-start"),z(i,"class","flex h-full w-1/3 bg-neutral-100"),z(t,"class","flex h-full w-full flex-row"),z(e,"class","mx-4 mb-10 rounded border-x border-b border-neutral-200 shadow-md")},m(c,d){E(c,e,d),w(e,t),u&&u.m(t,null),w(t,l),w(t,i),w(i,o),w(o,r),j(s,r,null),f=!0},p(c,[d]){c[1].length>0?u?(u.p(c,d),d&2&&b(u,1)):(u=jn(c),u.c(),b(u,1),u.m(t,l)):u&&(ie(),k(u,1,1,()=>{u=null}),re());const m={};d&1&&(m.row=c[0]),d&4&&(m.visibleFields=c[2]),s.$set(m),(!f||d&8&&a!==(a=`max-height: ${Math.max(Un,c[3])}px`))&&z(r,"style",a)},i(c){f||(b(u),b(s.$$.fragment,c),f=!0)},o(c){k(u),k(s.$$.fragment,c),f=!1},d(c){c&&h(e),u&&u.d(),Y(s)}}}const Un=320;function nu(n,e,t){let{row:l}=e,{mediaFields:i}=e,{visibleFields:o}=e,r=0;function s(){r=this.clientHeight,t(3,r)}return n.$$set=a=>{"row"in a&&t(0,l=a.row),"mediaFields"in a&&t(1,i=a.mediaFields),"visibleFields"in a&&t(2,o=a.visibleFields)},[l,i,o,r,s]}class iu extends pe{constructor(e){super(),ve(this,e,nu,lu,be,{row:0,mediaFields:1,visibleFields:2})}}function Wn(n,e,t){const l=n.slice();return l[50]=e[t],l}function Kn(n,e,t){const l=n.slice();return l[53]=e[t],l}function ru(n){let e=St[0]+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){E(l,t,i)},p:$,d(l){l&&h(t)}}}function su(n){let e=St[1]+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){E(l,t,i)},p:$,d(l){l&&h(t)}}}function au(n){let e,t,l,i;return e=new Et({props:{$$slots:{default:[ru]},$$scope:{ctx:n}}}),l=new Et({props:{$$slots:{default:[su]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=G(),q(l.$$.fragment)},l(o){W(e.$$.fragment,o),t=J(o),W(l.$$.fragment,o)},m(o,r){j(e,o,r),E(o,t,r),j(l,o,r),i=!0},p(o,r){const s={};r[1]&67108864&&(s.$$scope={dirty:r,ctx:o}),e.$set(s);const a={};r[1]&67108864&&(a.$$scope={dirty:r,ctx:o}),l.$set(a)},i(o){i||(b(e.$$.fragment,o),b(l.$$.fragment,o),i=!0)},o(o){k(e.$$.fragment,o),k(l.$$.fragment,o),i=!1},d(o){Y(e,o),o&&h(t),Y(l,o)}}}function ou(n){let e,t=n[56].text+"",l;return{c(){e=T("div"),l=X(t)},l(i){e=I(i,"DIV",{});var o=S(e);l=x(o,t),o.forEach(h)},m(i,o){E(i,e,o),w(e,l)},p(i,o){o[1]&33554432&&t!==(t=i[56].text+"")&&_e(l,t)},i:$,o:$,d(i){i&&h(e)}}}function fu(n){let e,t,l,i,o,r=n[0]!=""?":":"",s,a,f,u;return t=new pt({props:{$$slots:{default:[uu]},$$scope:{ctx:n}}}),{c(){e=T("div"),q(t.$$.fragment),l=G(),i=T("div"),o=X("New concept"),s=X(r),a=G(),f=X(n[0]),this.h()},l(c){e=I(c,"DIV",{class:!0});var d=S(e);W(t.$$.fragment,d),l=J(d),i=I(d,"DIV",{class:!0});var m=S(i);o=x(m,"New concept"),s=x(m,r),a=J(m),f=x(m,n[0]),m.forEach(h),d.forEach(h),this.h()},h(){z(i,"class","ml-2"),z(e,"class","new-concept flex flex-row items-center justify-items-center")},m(c,d){E(c,e,d),j(t,e,null),w(e,l),w(e,i),w(i,o),w(i,s),w(i,a),w(i,f),u=!0},p(c,d){const m={};d[1]&67108864&&(m.$$scope={dirty:d,ctx:c}),t.$set(m),(!u||d[0]&1)&&r!==(r=c[0]!=""?":":"")&&_e(s,r),(!u||d[0]&1)&&_e(f,c[0])},i(c){u||(b(t.$$.fragment,c),u=!0)},o(c){k(t.$$.fragment,c),u=!1},d(c){c&&h(e),Y(t)}}}function uu(n){let e,t;return e=new Ya({}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function cu(n){let e,t,l,i;const o=[fu,ou],r=[];function s(a,f){return a[56].id==="new-concept"?0:1}return e=s(n),t=r[e]=o[e](n),{c(){t.c(),l=fe()},l(a){t.l(a),l=fe()},m(a,f){r[e].m(a,f),E(a,l,f),i=!0},p(a,f){let u=e;e=s(a),e===u?r[e].p(a,f):(ie(),k(r[u],1,1,()=>{r[u]=null}),re(),t=r[e],t?t.p(a,f):(t=r[e]=o[e](a),t.c()),b(t,1),t.m(l.parentNode,l))},i(a){i||(b(t),i=!0)},o(a){k(t),i=!1},d(a){r[e].d(a),a&&h(l)}}}function du(n){let e,t,l,i,o;function r(a){n[41](a)}let s={size:"xl",items:n[11],disabled:!n[7],shouldFilterItem:pu,placeholder:"Search by concept",$$slots:{default:[cu,({item:a})=>({56:a}),({item:a})=>[0,a?33554432:0]]},$$scope:{ctx:n}};return n[0]!==void 0&&(s.value=n[0]),l=new ss({props:s}),n[40](l),je.push(()=>xt(l,"value",r)),l.$on("select",n[26]),{c(){e=T("div"),t=T("div"),q(l.$$.fragment),this.h()},l(a){e=I(a,"DIV",{class:!0});var f=S(e);t=I(f,"DIV",{class:!0});var u=S(t);W(l.$$.fragment,u),u.forEach(h),f.forEach(h),this.h()},h(){z(t,"class","flex-grow"),z(e,"class","flex w-full flex-row items-start justify-items-start")},m(a,f){E(a,e,f),w(e,t),j(l,t,null),o=!0},p(a,f){const u={};f[0]&2048&&(u.items=a[11]),f[0]&128&&(u.disabled=!a[7]),f[0]&1|f[1]&100663296&&(u.$$scope={dirty:f,ctx:a}),!i&&f[0]&1&&(i=!0,u.value=a[0],$t(()=>i=!1)),l.$set(u)},i(a){o||(b(l.$$.fragment,a),o=!0)},o(a){k(l.$$.fragment,a),o=!1},d(a){a&&h(e),n[40](null),Y(l)}}}function hu(n){let e,t,l;function i(r){n[42](r)}let o={placeholder:"Search by keywords",disabled:!n[15]};return n[10]!==void 0&&(o.value=n[10]),e=new Js({props:o}),je.push(()=>xt(e,"value",i)),e.$on("keydown",n[43]),{c(){q(e.$$.fragment)},l(r){W(e.$$.fragment,r)},m(r,s){j(e,r,s),l=!0},p(r,s){const a={};s[0]&32768&&(a.disabled=!r[15]),!t&&s[0]&1024&&(t=!0,a.value=r[10],$t(()=>t=!1)),e.$set(a)},i(r){l||(b(e.$$.fragment,r),l=!0)},o(r){k(e.$$.fragment,r),l=!1},d(r){Y(e,r)}}}function mu(n){let e,t,l,i,o;return t=new zt({props:{class:"w-full",$$slots:{default:[du]},$$scope:{ctx:n}}}),i=new zt({props:{class:"w-full",$$slots:{default:[hu]},$$scope:{ctx:n}}}),{c(){e=T("div"),q(t.$$.fragment),l=G(),q(i.$$.fragment),this.h()},l(r){e=I(r,"DIV",{class:!0});var s=S(e);W(t.$$.fragment,s),l=J(s),W(i.$$.fragment,s),s.forEach(h),this.h()},h(){z(e,"class","flex flex-row")},m(r,s){E(r,e,s),j(t,e,null),w(e,l),j(i,e,null),o=!0},p(r,s){const a={};s[0]&6273|s[1]&67108864&&(a.$$scope={dirty:s,ctx:r}),t.$set(a);const f={};s[0]&33792|s[1]&67108864&&(f.$$scope={dirty:s,ctx:r}),i.$set(f)},i(r){o||(b(t.$$.fragment,r),b(i.$$.fragment,r),o=!0)},o(r){k(t.$$.fragment,r),k(i.$$.fragment,r),o=!1},d(r){r&&h(e),Y(t),Y(i)}}}function Zn(n){let e,t;return e=new ir({props:{value:Te(n[53]),text:Te(n[53])}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i[0]&131072&&(o.value=Te(l[53])),i[0]&131072&&(o.text=Te(l[53])),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function _u(n){let e,t,l=n[17],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{A=null}),re());const se={};ne[0]&32&&(se.selectedId=O[5]),ne[0]&8192&&(se.items=O[13]),V.$set(se);const we={};ne[0]&2&&(we.icon=((ue=O[1])==null?void 0:ue.order)==null?rn:((me=O[1])==null?void 0:me.order)==="ASC"?Rt:Ht),ne[0]&2&&(we.disabled=O[1]==null),ne[0]&2&&(we.iconDescription=((Ie=O[1])==null?void 0:Ie.order)==="ASC"?"Sorted ascending. Toggle to switch to descending.":"Sorted descending. Toggle to switch to ascending."),F.$set(we)},i(O){B||(b(l.$$.fragment,O),b(s.$$.fragment,O),b(L),b(_.$$.fragment,O),b(A),b(V.$$.fragment,O),b(F.$$.fragment,O),B=!0)},o(O){k(l.$$.fragment,O),k(s.$$.fragment,O),k(L),k(_.$$.fragment,O),k(A),k(V.$$.fragment,O),k(F.$$.fragment,O),B=!1},d(O){O&&h(e),Y(l),Y(s),L.d(O),Y(_),A&&A.d(),Y(V),Y(F)}}}const pu=(n,e)=>n.text.toLowerCase().includes(e.toLowerCase())||n.id==="new-concept";function vu(n,e,t){let l,i,o,r,s,a,f,u,c,d,m,_,g,p,v,y,V,C,D,F,B,L,A=Qe();ze(n,A,Ve=>t(37,F=Ve));let P=rt();ze(n,P,Ve=>t(36,D=Ve));let R;const K=xi();ze(n,K,Ve=>t(47,C=Ve));const O=el();ze(n,O,Ve=>t(9,L=Ve));const ne=(Ve,xe)=>`${Te(Ve||"")}_${xe}`;let le={};const te=Nr();ze(n,te,Ve=>t(38,B=Ve));let Q=[],se,we="",ue={};const me=()=>{if(s!=null&&o==="Keyword"){if(R=="")return;A.addSearch({path:[Te(s)],query:{type:"keyword",search:R}}),t(10,R="")}},Ie=Ve=>{t(2,u=Ve.target.value),A.setSearchEmbedding(Ve.target.value)},Me=()=>{u!=null&&(t(32,le[ne(s,u)]=!0,le),C.mutate([l,i,{leaf_path:et(s||[]),signal:{signal_name:u}}]))};let ce;const Ee=(Ve,xe)=>{s==null||u==null||(A.addSearch({path:[Te(s)],query:{type:"concept",concept_namespace:Ve,concept_name:xe,embedding:u}}),ce.clear())},H=Ve=>{if(!(s==null||u==null)){if(Ve.detail.selectedId==="new-concept"){we===se.id&&t(0,we="");const xe=we.split("/",2);let wt="",mt="";xe.length===2?[wt,mt]=xe:[mt]=xe,ft({command:ut.CreateConcept,namespace:wt,conceptName:mt,onCreate:Be=>Ee(Be.detail.namespace,Be.detail.name)}),ce.clear();return}Ee(Ve.detail.selectedId.namespace,Ve.detail.selectedId.name)}},M=Ve=>{A.setSearchPath(Ve.target.value)},ee=Ve=>{A.setSearchTab(St[Ve.detail])},U=Ve=>{if(Ve.detail.selectedId==null){A.setSortBy(null);return}A.setSortBy(et(Ve.detail.selectedId))},Ae=()=>{A.clearSorts()},qe=()=>{p!=null&&A.setSortBy(p.path),A.setSortOrder((p==null?void 0:p.order)==="ASC"?"DESC":"ASC")},Ce=()=>{d?me():Me()};function Xe(Ve){je[Ve?"unshift":"push"](()=>{ce=Ve,t(12,ce)})}function lt(Ve){we=Ve,t(0,we)}function mr(Ve){R=Ve,t(10,R)}const _r=Ve=>Ve.key=="Enter"?me():null;return n.$$.update=()=>{var Ve,xe,wt,mt;if(n.$$.dirty[1]&64&&(l=F.namespace),n.$$.dirty[1]&64&&(i=F.datasetName),n.$$.dirty[1]&64&&t(4,o=F.searchTab),n.$$.dirty[0]&16&&t(8,r=Object.values(St).findIndex(Be=>Be===o)),n.$$.dirty[1]&96&&t(3,s=fr(F,D)),n.$$.dirty[0]&8|n.$$.dirty[1]&64&&t(34,a=il(F,s)),n.$$.dirty[1]&32&&t(17,f=(D.visibleFields||[]).filter(Be=>Be.dtype==="string").map(Be=>Te(Be.path))),n.$$.dirty[0]&520|n.$$.dirty[1]&96&&t(2,u=ur(F,D,s,(L.data||[]).map(Be=>Be.name))),n.$$.dirty[0]&8|n.$$.dirty[1]&32&&t(35,c=nl(D,s)),n.$$.dirty[0]&4|n.$$.dirty[1]&16&&t(7,d=c!=null&&!!c.includes(u||"")),n.$$.dirty[0]&140|n.$$.dirty[1]&2&&t(16,m=!d&&le[ne(s,u)]),n.$$.dirty[0]&264&&t(15,_=St[r]==="Keyword"&&s!=null),n.$$.dirty[0]&144&&t(14,g=o==="Concepts"&&d),n.$$.dirty[0]&1&&t(33,se={id:"new-concept",text:we}),n.$$.dirty[1]&140&&t(11,Q=B!=null&&B.data?[se,...B.data.map(Be=>({id:{namespace:Be.namespace,name:Be.name},text:`${Be.namespace}/${Be.name}`,disabled:a.some(_t=>_t.query.type==="concept"&&_t.query.concept_namespace===Be.namespace&&_t.query.concept_name===Be.name)}))]:[]),n.$$.dirty[1]&32&&t(1,p=Qo(D)),n.$$.dirty[1]&32)for(const Be of((xe=(Ve=D.selectRowsSchema)==null?void 0:Ve.data)==null?void 0:xe.search_results)||[])ue[Te(Be.result_path)]=Be;n.$$.dirty[0]&2&&t(5,v=p!=null&&p.path?Te(p.path):null),n.$$.dirty[1]&64&&t(6,y=F.queryOptions.sort_by),n.$$.dirty[0]&96|n.$$.dirty[1]&32&&t(13,V=((mt=(wt=D.selectRowsSchema)==null?void 0:wt.data)==null?void 0:mt.schema)!=null?[{id:null,text:"None",disabled:y==null&&v!=null},...tl(D.selectRowsSchema.data.schema).map(Be=>{const _t=Te(Be.path);return{id:_t,text:_t}})]:[])},[we,p,u,s,o,v,y,d,r,L,R,Q,ce,V,g,_,m,f,A,P,K,O,te,me,Ie,Me,H,M,ee,U,Ae,qe,le,se,a,c,D,F,B,Ce,Xe,lt,mr,_r]}class ku extends pe{constructor(e){super(),ve(this,e,vu,bu,be,{},null,[-1,-1])}}function Xn(n,e,t){const l=n.slice();return l[21]=e[t],l}function wu(n){let e,t;return{c(){e=T("div"),t=X("No results."),this.h()},l(l){e=I(l,"DIV",{class:!0});var i=S(e);t=x(i,"No results."),i.forEach(h),this.h()},h(){z(e,"class","mx-4 mt-8 w-full text-gray-600")},m(l,i){E(l,e,i),w(e,t)},p:$,i:$,o:$,d(l){l&&h(e)}}}function Su(n){let e,t;return{c(){e=T("div"),t=X("Select fields to display"),this.h()},l(l){e=I(l,"DIV",{class:!0});var i=S(e);t=x(i,"Select fields to display"),i.forEach(h),this.h()},h(){z(e,"class","mt-12 w-full text-center text-gray-600")},m(l,i){E(l,e,i),w(e,t)},p:$,i:$,o:$,d(l){l&&h(e)}}}function Eu(n){let e,t;return e=new vt({props:{paragraph:!0,lines:3}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p:$,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function zu(n){var l,i;let e,t;return e=new er({props:{lowContrast:!0,title:"Could not fetch schema:",subtitle:((l=n[2].error.body)==null?void 0:l.detail)||((i=n[2])==null?void 0:i.error.message)}}),{c(){q(e.$$.fragment)},l(o){W(e.$$.fragment,o)},m(o,r){j(e,o,r),t=!0},p(o,r){var a,f;const s={};r&4&&(s.subtitle=((a=o[2].error.body)==null?void 0:a.detail)||((f=o[2])==null?void 0:f.error.message)),e.$set(s)},i(o){t||(b(e.$$.fragment,o),t=!0)},o(o){k(e.$$.fragment,o),t=!1},d(o){Y(e,o)}}}function yu(n){var l;let e,t;return e=new er({props:{lowContrast:!0,title:"Could not fetch rows:",subtitle:((l=n[3].error.body)==null?void 0:l.detail)||n[3].error.message}}),{c(){q(e.$$.fragment)},l(i){W(e.$$.fragment,i)},m(i,o){j(e,i,o),t=!0},p(i,o){var s;const r={};o&8&&(r.subtitle=((s=i[3].error.body)==null?void 0:s.detail)||i[3].error.message),e.$set(r)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){k(e.$$.fragment,i),t=!1},d(i){Y(e,i)}}}function xn(n){let e,t=[],l=new Map,i,o,r=n[6];const s=f=>Ze.value(f[21][Kr]);for(let f=0;f0&&ei(n);return{c(){e=T("div");for(let f=0;f0?a?(a.p(f,u),u&64&&b(a,1)):(a=ei(f),a.c(),b(a,1),a.m(e,null)):a&&(ie(),k(a,1,1,()=>{a=null}),re())},i(f){if(!o){for(let u=0;u0&&n[4].isSuccess&&n[5]!=null&&xn(n);return{c(){q(e.$$.fragment),t=G(),q(l.$$.fragment),i=G(),r&&r.c(),s=G(),m&&m.c(),a=fe()},l(_){W(e.$$.fragment,_),t=J(_),W(l.$$.fragment,_),i=J(_),r&&r.l(_),s=J(_),m&&m.l(_),a=fe()},m(_,g){j(e,_,g),E(_,t,g),j(l,_,g),E(_,i,g),~o&&c[o].m(_,g),E(_,s,g),m&&m.m(_,g),E(_,a,g),f=!0},p(_,[g]){const p={};g&128&&(p.totalNumRows=_[7]),g&1024&&(p.manifest=_[10].data),l.$set(p);let v=o;o=d(_),o===v?~o&&c[o].p(_,g):(r&&(ie(),k(c[v],1,1,()=>{c[v]=null}),re()),~o?(r=c[o],r?r.p(_,g):(r=c[o]=u[o](_),r.c()),b(r,1),r.m(s.parentNode,s)):r=null),_[6]&&_[1].length>0&&_[4].isSuccess&&_[5]!=null?m?(m.p(_,g),g&114&&b(m,1)):(m=xn(_),m.c(),b(m,1),m.m(a.parentNode,a)):m&&(ie(),k(m,1,1,()=>{m=null}),re())},i(_){f||(b(e.$$.fragment,_),b(l.$$.fragment,_),b(r),b(m),f=!0)},o(_){k(e.$$.fragment,_),k(l.$$.fragment,_),k(r),k(m),f=!1},d(_){Y(e,_),_&&h(t),Y(l,_),_&&h(i),~o&&c[o].d(_),_&&h(s),m&&m.d(_),_&&h(a)}}}function Vu(n,e,t){let l,i,o,r,s,a,f,u,c,d,m,_=$,g=()=>(_(),_=Ge(r,K=>t(3,m=K)),r),p,v,y=$,V=()=>(y(),y=Ge(l,K=>t(4,v=K)),l),C;n.$$.on_destroy.push(()=>_()),n.$$.on_destroy.push(()=>y());let D=Qe();ze(n,D,K=>t(17,p=K));let F=rt();ze(n,F,K=>t(16,d=K));const B=$i(p.namespace,p.datasetName);ze(n,B,K=>t(10,C=K));let L=null;const A=$e(L),P=()=>m==null?void 0:m.fetchNextPage();function R(K){je[K?"unshift":"push"](()=>{L=K,t(0,L)})}return n.$$.update=()=>{var K,O,ne,le;n.$$.dirty&131072&&V(t(9,l=ll(p.namespace,p.datasetName))),n.$$.dirty&131088&&t(15,i=v.isSuccess?Ar(p):void 0),n.$$.dirty&65536&&t(2,o=d.selectRowsSchema),n.$$.dirty&163844&&g(t(8,r=Wr(p.namespace,p.datasetName,i||{},o!=null&&o.isSuccess?o.data.schema:void 0))),n.$$.dirty&8&&t(7,s=(K=m.data)==null?void 0:K.pages[0].total_num_rows),n.$$.dirty&8&&t(6,a=(O=m.data)==null?void 0:O.pages.flatMap(te=>te.rows)),n.$$.dirty&65536&&t(1,f=(d.visibleFields||[]).sort((te,Q)=>Te(te.path)>Te(Q.path)?1:-1)),n.$$.dirty&6&&t(14,u=((ne=o==null?void 0:o.data)==null?void 0:ne.schema)!=null?ar((le=o==null?void 0:o.data)==null?void 0:le.schema,f):null),n.$$.dirty&81920&&t(5,c=u!=null?Ko(u,d.stats||[]):[]),n.$$.dirty&1&&A.set(L)},Lt(sr,A),[L,f,o,m,v,c,a,s,r,l,C,D,F,B,u,i,d,p,P,R]}class Cu extends pe{constructor(e){super(),ve(this,e,Vu,Mu,be,{})}}function Tu(n){let e,t;return e=new tt({props:{$$slots:{default:[Nu]},$$scope:{ctx:n}}}),e.$on("click",n[5]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i&512&&(o.$$scope={dirty:i,ctx:l}),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function Iu(n){let e,t;return{c(){e=T("span"),t=X("Invalid query"),this.h()},l(l){e=I(l,"SPAN",{class:!0});var i=S(e);t=x(i,"Invalid query"),i.forEach(h),this.h()},h(){z(e,"class","text-red-500")},m(l,i){E(l,e,i),w(e,t)},p:$,i:$,o:$,d(l){l&&h(e)}}}function Nu(n){let e;return{c(){e=X("Apply")},l(t){e=x(t,"Apply")},m(t,l){E(t,e,l)},d(t){t&&h(e)}}}function Au(n){let e,t,l,i,o,r,s,a,f,u,c;const d=[Iu,Tu],m=[];function _(g,p){return g[0]?g[3]?1:-1:0}return~(r=_(n))&&(s=m[r]=d[r](n)),{c(){e=T("pre"),t=X(""),l=X(n[2]),i=X(` +`),o=G(),s&&s.c(),a=fe(),this.h()},l(g){e=I(g,"PRE",{class:!0,contenteditable:!0});var p=S(e);t=x(p,""),l=x(p,n[2]),i=x(p,` +`),p.forEach(h),o=J(g),s&&s.l(g),a=fe(),this.h()},h(){z(e,"class","whitespace-pre bg-gray-50 p-4 font-mono"),z(e,"contenteditable",""),n[1]===void 0&&ht(()=>n[8].call(e)),N(e,"outline-red-500",!n[0])},m(g,p){E(g,e,p),w(e,t),w(e,l),w(e,i),n[1]!==void 0&&(e.innerText=n[1]),E(g,o,p),~r&&m[r].m(g,p),E(g,a,p),f=!0,u||(c=de(e,"input",n[8]),u=!0)},p(g,[p]){(!f||p&4)&&Sr(l,g[2]),p&2&&g[1]!==e.innerText&&(e.innerText=g[1]),(!f||p&1)&&N(e,"outline-red-500",!g[0]);let v=r;r=_(g),r===v?~r&&m[r].p(g,p):(s&&(ie(),k(m[v],1,1,()=>{m[v]=null}),re()),~r?(s=m[r],s?s.p(g,p):(s=m[r]=d[r](g),s.c()),b(s,1),s.m(a.parentNode,a)):s=null)},i(g){f||(b(s),f=!0)},o(g){k(s),f=!1},d(g){g&&h(e),g&&h(o),~r&&m[r].d(g),g&&h(a),u=!1,c()}}}function Du(n,e,t){let l,i,o,r,s;const a=Qe();ze(n,a,d=>t(7,s=d));let f=!0;function u(){Mt(a,s.queryOptions=JSON.parse(o),s)}function c(){o=this.innerText,t(1,o),t(2,i),t(6,l),t(7,s)}return n.$$.update=()=>{if(n.$$.dirty&128&&t(6,l=s.queryOptions),n.$$.dirty&64&&t(2,i=l?JSON.stringify(l,null,2):""),n.$$.dirty&4&&t(1,o=i),n.$$.dirty&2)try{JSON.parse(o),t(0,f=!0)}catch{t(0,f=!1)}n.$$.dirty&67&&t(3,r=f&&!Dr(JSON.parse(o),l))},[f,o,i,r,a,u,l,s,c]}class Bu extends pe{constructor(e){super(),ve(this,e,Du,Au,be,{})}}function ti(n){let e,t;return e=new ua({props:{light:!0,flipped:!0,$$slots:{default:[Pu]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i&67108927&&(o.$$scope={dirty:i,ctx:l}),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function li(n){let e,t;return e=new kt({props:{text:"Sort by"}}),e.$on("click",n[16]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p:$,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function ni(n){let e,t;return e=new kt({props:{text:"Filter"}}),e.$on("click",n[17]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p:$,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function ii(n){let e,t;return e=new kt({props:{text:"Compute embedding"}}),e.$on("click",n[18]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p:$,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function ri(n){let e,t;return e=new kt({props:{text:"Preview signal"}}),e.$on("click",n[19]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p:$,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function si(n){let e,t;return e=new kt({props:{text:"Compute signal"}}),e.$on("click",n[20]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p:$,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function ai(n){let e,t;return e=new kt({props:{text:"Delete signal"}}),e.$on("click",n[21]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p:$,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function Pu(n){let e=Bt(n[0]),t,l=Zt(n[0]),i,o,r,s,a,f,u=e&&li(n),c=l&&ni(n),d=!n[2]&&ii(n),m=!n[2]&&ri(n),_=!n[2]&&si(n),g=n[1]&&ai(n);return{c(){u&&u.c(),t=G(),c&&c.c(),i=G(),d&&d.c(),o=G(),m&&m.c(),r=G(),_&&_.c(),s=G(),g&&g.c(),a=fe()},l(p){u&&u.l(p),t=J(p),c&&c.l(p),i=J(p),d&&d.l(p),o=J(p),m&&m.l(p),r=J(p),_&&_.l(p),s=J(p),g&&g.l(p),a=fe()},m(p,v){u&&u.m(p,v),E(p,t,v),c&&c.m(p,v),E(p,i,v),d&&d.m(p,v),E(p,o,v),m&&m.m(p,v),E(p,r,v),_&&_.m(p,v),E(p,s,v),g&&g.m(p,v),E(p,a,v),f=!0},p(p,v){v&1&&(e=Bt(p[0])),e?u?(u.p(p,v),v&1&&b(u,1)):(u=li(p),u.c(),b(u,1),u.m(t.parentNode,t)):u&&(ie(),k(u,1,1,()=>{u=null}),re()),v&1&&(l=Zt(p[0])),l?c?(c.p(p,v),v&1&&b(c,1)):(c=ni(p),c.c(),b(c,1),c.m(i.parentNode,i)):c&&(ie(),k(c,1,1,()=>{c=null}),re()),p[2]?d&&(ie(),k(d,1,1,()=>{d=null}),re()):d?(d.p(p,v),v&4&&b(d,1)):(d=ii(p),d.c(),b(d,1),d.m(o.parentNode,o)),p[2]?m&&(ie(),k(m,1,1,()=>{m=null}),re()):m?(m.p(p,v),v&4&&b(m,1)):(m=ri(p),m.c(),b(m,1),m.m(r.parentNode,r)),p[2]?_&&(ie(),k(_,1,1,()=>{_=null}),re()):_?(_.p(p,v),v&4&&b(_,1)):(_=si(p),_.c(),b(_,1),_.m(s.parentNode,s)),p[1]?g?(g.p(p,v),v&2&&b(g,1)):(g=ai(p),g.c(),b(g,1),g.m(a.parentNode,a)):g&&(ie(),k(g,1,1,()=>{g=null}),re())},i(p){f||(b(u),b(c),b(d),b(m),b(_),b(g),f=!0)},o(p){k(u),k(c),k(d),k(m),k(_),k(g),f=!1},d(p){u&&u.d(p),p&&h(t),c&&c.d(p),p&&h(i),d&&d.d(p),p&&h(o),m&&m.d(p),p&&h(r),_&&_.d(p),p&&h(s),g&&g.d(p),p&&h(a)}}}function Ru(n){let e,t,l,i=Te(n[0].path)+"",o,r,s,a,f;return{c(){e=T("p"),t=X("Confirm deleting "),l=T("code"),o=X(i),r=X(" ?"),s=G(),a=T("p"),f=X("This is a permanent action and cannot be undone."),this.h()},l(u){e=I(u,"P",{class:!0});var c=S(e);t=x(c,"Confirm deleting "),l=I(c,"CODE",{});var d=S(l);o=x(d,i),d.forEach(h),r=x(c," ?"),c.forEach(h),s=J(u),a=I(u,"P",{class:!0});var m=S(a);f=x(m,"This is a permanent action and cannot be undone."),m.forEach(h),this.h()},h(){z(e,"class","!text-lg"),z(a,"class","mt-2")},m(u,c){E(u,e,c),w(e,t),w(e,l),w(l,o),w(e,r),E(u,s,c),E(u,a,c),w(a,f)},p(u,c){c&1&&i!==(i=Te(u[0].path)+"")&&_e(o,i)},d(u){u&&h(e),u&&h(s),u&&h(a)}}}function Hu(n){let e,t,l,i,o=n[6]&&ti(n);function r(a){n[22](a)}let s={danger:!0,modalHeading:"Delete signal",primaryButtonText:"Delete",primaryButtonIcon:n[7].isLoading?hl:void 0,secondaryButtonText:"Cancel",$$slots:{default:[Ru]},$$scope:{ctx:n}};return n[3]!==void 0&&(s.open=n[3]),t=new lr({props:s}),je.push(()=>xt(t,"open",r)),t.$on("click:button--secondary",n[23]),t.$on("open",n[24]),t.$on("close",n[25]),t.$on("submit",n[11]),{c(){o&&o.c(),e=G(),q(t.$$.fragment)},l(a){o&&o.l(a),e=J(a),W(t.$$.fragment,a)},m(a,f){o&&o.m(a,f),E(a,e,f),j(t,a,f),i=!0},p(a,[f]){a[6]?o?(o.p(a,f),f&64&&b(o,1)):(o=ti(a),o.c(),b(o,1),o.m(e.parentNode,e)):o&&(ie(),k(o,1,1,()=>{o=null}),re());const u={};f&128&&(u.primaryButtonIcon=a[7].isLoading?hl:void 0),f&67108865&&(u.$$scope={dirty:f,ctx:a}),!l&&f&8&&(l=!0,u.open=a[3],$t(()=>l=!1)),t.$set(u)},i(a){i||(b(o),b(t.$$.fragment,a),i=!0)},o(a){k(o),k(t.$$.fragment,a),i=!1},d(a){o&&o.d(a),a&&h(e),Y(t,a)}}}function Fu(n,e,t){let l,i,o,r,s,a,f,u,c,{field:d}=e,{schema:m}=e,_=!1;const g=Qe();ze(n,g,O=>t(15,c=O));const p=rt();ze(n,p,O=>t(14,u=O));const v=Zr();ze(n,v,O=>t(7,f=O));function y(){f.mutate([l,i,{signal_path:d.path}],{onSuccess:()=>{t(3,_=!1),g.deleteSignal(d.path)}})}const V=()=>g.addSortBy(d.path),C=()=>ft({command:ut.EditFilter,namespace:l,datasetName:i,path:d.path}),D=()=>ft({command:ut.ComputeEmbedding,namespace:l,datasetName:i,path:d==null?void 0:d.path}),F=()=>ft({command:ut.PreviewConcept,namespace:l,datasetName:i,path:d==null?void 0:d.path}),B=()=>ft({command:ut.ComputeSignal,namespace:l,datasetName:i,path:d==null?void 0:d.path}),L=()=>t(3,_=!0);function A(O){_=O,t(3,_)}const P=()=>t(3,_=!1);function R(O){ke.call(this,n,O)}function K(O){ke.call(this,n,O)}return n.$$set=O=>{"field"in O&&t(0,d=O.field),"schema"in O&&t(12,m=O.schema)},n.$$.update=()=>{var O;n.$$.dirty&32768&&t(5,l=c.namespace),n.$$.dirty&32768&&t(4,i=c.datasetName),n.$$.dirty&4097&&t(2,o=Vt(d,m)),n.$$.dirty&1&&t(1,r=gt(d)),n.$$.dirty&16385&&t(13,s=Ot(((O=u.selectRowsSchema)==null?void 0:O.data)||null,d.path)),n.$$.dirty&8199&&t(6,a=(Bt(d)||Zt(d)||!o||r)&&!s)},[d,r,o,_,i,l,a,f,g,p,v,y,m,s,u,c,V,C,D,F,B,L,A,P,R,K]}class dr extends pe{constructor(e){super(),ve(this,e,Fu,Hu,be,{field:0,schema:12})}}function oi(n,e,t){const l=n.slice();l[7]=e[t][0],l[8]=e[t][1];const i=l[2](l[7]);l[9]=i;const o=`${l[8]/l[1]*100}%`;l[10]=o;const r=De(l[8]);return l[11]=r,l}function fi(n){let e,t,l=n[9]+"",i,o,r,s,a,f=n[11]+"",u,c,d,m,_;function g(){return n[6](n[7])}return{c(){e=T("button"),t=T("div"),i=X(l),r=G(),s=T("div"),a=T("div"),u=X(f),d=G(),this.h()},l(p){e=I(p,"BUTTON",{class:!0});var v=S(e);t=I(v,"DIV",{title:!0,class:!0});var y=S(t);i=x(y,l),y.forEach(h),r=J(v),s=I(v,"DIV",{class:!0});var V=S(s);a=I(V,"DIV",{title:!0,class:!0});var C=S(a);u=x(C,f),C.forEach(h),V.forEach(h),d=J(v),v.forEach(h),this.h()},h(){z(t,"title",o=n[9]),z(t,"class","w-48 flex-none truncate px-2"),z(a,"title",c=n[11]),z(a,"class","histogram-bar my-px bg-indigo-200 pl-2 text-xs leading-5"),Pe(a,"width",n[10]),z(s,"class","w-36 border-l border-gray-300 pl-2"),z(e,"class","flex items-center text-left text-xs text-black hover:bg-gray-200")},m(p,v){E(p,e,v),w(e,t),w(t,i),w(e,r),w(e,s),w(s,a),w(a,u),w(e,d),m||(_=de(e,"click",g),m=!0)},p(p,v){n=p,v&1&&l!==(l=n[9]+"")&&_e(i,l),v&1&&o!==(o=n[9])&&z(t,"title",o),v&1&&f!==(f=n[11]+"")&&_e(u,f),v&1&&c!==(c=n[11])&&z(a,"title",c),v&3&&Pe(a,"width",n[10])},d(p){p&&h(e),m=!1,_()}}}function Lu(n){let e,t=n[0],l=[];for(let i=0;ia("row-click",{value:u});return n.$$set=u=>{"field"in u&&t(4,i=u.field),"counts"in u&&t(0,o=u.counts),"bins"in u&&t(5,r=u.bins)},n.$$.update=()=>{n.$$.dirty&1&&t(1,l=Math.max(...o.map(([u,c])=>c)))},[o,l,s,a,i,r,f]}class qu extends pe{constructor(e){super(),ve(this,e,Ou,Lu,be,{field:4,counts:0,bins:5})}}function ju(n){let e,t,l,i,o,r,s,a,f,u,c,d=De(n[4].total_count)+"",m,_,g,p,v,y,V,C,D,F,B,L,A=De(n[4].approx_count_distinct)+"",P,R,K,O,ne,le;r=new Pt({props:{class:"inline"}}),y=new Pt({props:{class:"inline"}});let te=n[4].avg_text_length&&ui(n),Q=n[4].min_val&&n[4].max_val&&ci(n);return{c(){e=T("table"),t=T("tbody"),l=T("tr"),i=T("td"),o=T("span"),q(r.$$.fragment),s=G(),a=T("span"),f=X("Total count"),u=G(),c=T("td"),m=X(d),_=G(),g=T("tr"),p=T("td"),v=T("span"),q(y.$$.fragment),V=G(),C=T("span"),D=X("Unique values"),F=G(),B=T("td"),L=X("~"),P=X(A),R=G(),te&&te.c(),K=G(),Q&&Q.c(),this.h()},l(se){e=I(se,"TABLE",{class:!0});var we=S(e);t=I(we,"TBODY",{});var ue=S(t);l=I(ue,"TR",{});var me=S(l);i=I(me,"TD",{class:!0});var Ie=S(i);o=I(Ie,"SPAN",{});var Me=S(o);W(r.$$.fragment,Me),Me.forEach(h),s=J(Ie),a=I(Ie,"SPAN",{});var ce=S(a);f=x(ce,"Total count"),ce.forEach(h),Ie.forEach(h),u=J(me),c=I(me,"TD",{class:!0});var Ee=S(c);m=x(Ee,d),Ee.forEach(h),me.forEach(h),_=J(ue),g=I(ue,"TR",{});var H=S(g);p=I(H,"TD",{class:!0});var M=S(p);v=I(M,"SPAN",{});var ee=S(v);W(y.$$.fragment,ee),ee.forEach(h),V=J(M),C=I(M,"SPAN",{});var U=S(C);D=x(U,"Unique values"),U.forEach(h),M.forEach(h),F=J(H),B=I(H,"TD",{class:!0});var Ae=S(B);L=x(Ae,"~"),P=x(Ae,A),Ae.forEach(h),H.forEach(h),R=J(ue),te&&te.l(ue),K=J(ue),Q&&Q.l(ue),ue.forEach(h),we.forEach(h),this.h()},h(){z(i,"class","svelte-1tctrjz"),z(c,"class","svelte-1tctrjz"),z(p,"class","svelte-1tctrjz"),z(B,"class","svelte-1tctrjz"),z(e,"class","stats-table w-full svelte-1tctrjz")},m(se,we){E(se,e,we),w(e,t),w(t,l),w(l,i),w(i,o),j(r,o,null),w(i,s),w(i,a),w(a,f),w(l,u),w(l,c),w(c,m),w(t,_),w(t,g),w(g,p),w(p,v),j(y,v,null),w(p,V),w(p,C),w(C,D),w(g,F),w(g,B),w(B,L),w(B,P),w(t,R),te&&te.m(t,null),w(t,K),Q&&Q.m(t,null),O=!0,ne||(le=[We(Je.call(null,o,{text:"Total number of rows where the value is defined."})),We(Je.call(null,v,{text:"An approximation of the total number of unique values."}))],ne=!0)},p(se,we){(!O||we&16)&&d!==(d=De(se[4].total_count)+"")&&_e(m,d),(!O||we&16)&&A!==(A=De(se[4].approx_count_distinct)+"")&&_e(P,A),se[4].avg_text_length?te?(te.p(se,we),we&16&&b(te,1)):(te=ui(se),te.c(),b(te,1),te.m(t,K)):te&&(ie(),k(te,1,1,()=>{te=null}),re()),se[4].min_val&&se[4].max_val?Q?(Q.p(se,we),we&16&&b(Q,1)):(Q=ci(se),Q.c(),b(Q,1),Q.m(t,null)):Q&&(ie(),k(Q,1,1,()=>{Q=null}),re())},i(se){O||(b(r.$$.fragment,se),b(y.$$.fragment,se),b(te),b(Q),O=!0)},o(se){k(r.$$.fragment,se),k(y.$$.fragment,se),k(te),k(Q),O=!1},d(se){se&&h(e),Y(r),Y(y),te&&te.d(),Q&&Q.d(),ne=!1,Oe(le)}}}function Yu(n){let e,t;return e=new vt({props:{paragraph:!0,width:"50%"}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p:$,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function Uu(n){let e,t,l=n[2].error.message+"",i;return{c(){e=T("p"),t=X("Error: "),i=X(l)},l(o){e=I(o,"P",{});var r=S(e);t=x(r,"Error: "),i=x(r,l),r.forEach(h)},m(o,r){E(o,e,r),w(e,t),w(e,i)},p(o,r){r&4&&l!==(l=o[2].error.message+"")&&_e(i,l)},i:$,o:$,d(o){o&&h(e)}}}function ui(n){let e,t,l,i,o,r,s,a,f,u=De(n[4].avg_text_length)+"",c,d,m,_;return i=new Pt({props:{class:"inline"}}),{c(){e=T("tr"),t=T("td"),l=T("span"),q(i.$$.fragment),o=G(),r=T("span"),s=X("Average text length"),a=G(),f=T("td"),c=X(u),this.h()},l(g){e=I(g,"TR",{});var p=S(e);t=I(p,"TD",{class:!0});var v=S(t);l=I(v,"SPAN",{});var y=S(l);W(i.$$.fragment,y),y.forEach(h),o=J(v),r=I(v,"SPAN",{});var V=S(r);s=x(V,"Average text length"),V.forEach(h),v.forEach(h),a=J(p),f=I(p,"TD",{class:!0});var C=S(f);c=x(C,u),C.forEach(h),p.forEach(h),this.h()},h(){z(t,"class","svelte-1tctrjz"),z(f,"class","svelte-1tctrjz")},m(g,p){E(g,e,p),w(e,t),w(t,l),j(i,l,null),w(t,o),w(t,r),w(r,s),w(e,a),w(e,f),w(f,c),d=!0,m||(_=We(Je.call(null,l,{text:"The average length of the text in characters."})),m=!0)},p(g,p){(!d||p&16)&&u!==(u=De(g[4].avg_text_length)+"")&&_e(c,u)},i(g){d||(b(i.$$.fragment,g),d=!0)},o(g){k(i.$$.fragment,g),d=!1},d(g){g&&h(e),Y(i),m=!1,_()}}}function ci(n){let e,t,l,i,o,r,s,a,f,u=De(n[4].min_val)+"",c,d,m=De(n[4].max_val)+"",_,g,p,v;return i=new Pt({props:{class:"inline"}}),{c(){e=T("tr"),t=T("td"),l=T("span"),q(i.$$.fragment),o=G(),r=T("span"),s=X("Range"),a=G(),f=T("td"),c=X(u),d=X(" .. "),_=X(m),this.h()},l(y){e=I(y,"TR",{});var V=S(e);t=I(V,"TD",{class:!0});var C=S(t);l=I(C,"SPAN",{});var D=S(l);W(i.$$.fragment,D),D.forEach(h),o=J(C),r=I(C,"SPAN",{});var F=S(r);s=x(F,"Range"),F.forEach(h),C.forEach(h),a=J(V),f=I(V,"TD",{class:!0});var B=S(f);c=x(B,u),d=x(B," .. "),_=x(B,m),B.forEach(h),V.forEach(h),this.h()},h(){z(t,"class","svelte-1tctrjz"),z(f,"class","svelte-1tctrjz")},m(y,V){E(y,e,V),w(e,t),w(t,l),j(i,l,null),w(t,o),w(t,r),w(r,s),w(e,a),w(e,f),w(f,c),w(f,d),w(f,_),g=!0,p||(v=We(Je.call(null,l,{text:"The minimum and maximum value across the dataset"})),p=!0)},p(y,V){(!g||V&16)&&u!==(u=De(y[4].min_val)+"")&&_e(c,u),(!g||V&16)&&m!==(m=De(y[4].max_val)+"")&&_e(_,m)},i(y){g||(b(i.$$.fragment,y),g=!0)},o(y){k(i.$$.fragment,y),g=!1},d(y){y&&h(e),Y(i),p=!1,v()}}}function Wu(n){let e,t,l;return t=new qu({props:{counts:n[5],bins:n[3],field:n[0]}}),t.$on("row-click",n[11]),{c(){e=T("div"),q(t.$$.fragment),this.h()},l(i){e=I(i,"DIV",{class:!0});var o=S(e);W(t.$$.fragment,o),o.forEach(h),this.h()},h(){z(e,"class","mt-4")},m(i,o){E(i,e,o),j(t,e,null),l=!0},p(i,o){const r={};o&32&&(r.counts=i[5]),o&8&&(r.bins=i[3]),o&1&&(r.field=i[0]),t.$set(r)},i(i){l||(b(t.$$.fragment,i),l=!0)},o(i){k(t.$$.fragment,i),l=!1},d(i){i&&h(e),Y(t)}}}function Ku(n){let e,t;return e=new vt({props:{paragraph:!0,width:"50%"}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p:$,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function Zu(n){let e,t,l=n[1].error.message+"",i;return{c(){e=T("p"),t=X("Error: "),i=X(l)},l(o){e=I(o,"P",{});var r=S(e);t=x(r,"Error: "),i=x(r,l),r.forEach(h)},m(o,r){E(o,e,r),w(e,t),w(e,i)},p(o,r){r&2&&l!==(l=o[1].error.message+"")&&_e(i,l)},i:$,o:$,d(o){o&&h(e)}}}function Qu(n){let e,t,l,i,o,r,s;const a=[Uu,Yu,ju],f=[];function u(_,g){return _[2].error?0:_[4]==null?1:2}t=u(n),l=f[t]=a[t](n);const c=[Zu,Ku,Wu],d=[];function m(_,g){return _[1].error?0:_[5]==null?1:_[5].length>0?2:-1}return~(o=m(n))&&(r=d[o]=c[o](n)),{c(){e=T("div"),l.c(),i=G(),r&&r.c(),this.h()},l(_){e=I(_,"DIV",{class:!0});var g=S(e);l.l(g),i=J(g),r&&r.l(g),g.forEach(h),this.h()},h(){z(e,"class","p-4")},m(_,g){E(_,e,g),f[t].m(e,null),w(e,i),~o&&d[o].m(e,null),s=!0},p(_,[g]){let p=t;t=u(_),t===p?f[t].p(_,g):(ie(),k(f[p],1,1,()=>{f[p]=null}),re(),l=f[t],l?l.p(_,g):(l=f[t]=a[t](_),l.c()),b(l,1),l.m(e,i));let v=o;o=m(_),o===v?~o&&d[o].p(_,g):(r&&(ie(),k(d[v],1,1,()=>{d[v]=null}),re()),~o?(r=d[o],r?r.p(_,g):(r=d[o]=c[o](_),r.c()),b(r,1),r.m(e,null)):r=null)},i(_){s||(b(l),b(r),s=!0)},o(_){k(l),k(r),s=!1},d(_){_&&h(e),f[t].d(),~o&&d[o].d()}}}function Gu(n,e,t){let l,i,o,r,s,a=$,f=()=>(a(),a=Ge(i,V=>t(1,s=V)),i),u,c=$,d=()=>(c(),c=Ge(l,V=>t(2,u=V)),l),m;n.$$.on_destroy.push(()=>a()),n.$$.on_destroy.push(()=>c());let{field:_}=e;const g=Qe();ze(n,g,V=>t(10,m=V));let p=null;function v(V){if(V==null)return;if(p!=null){const[D,F]=p[V.toString()];if(D!=null){const B={path:_.path,op:"greater_equal",value:D};g.addFilter(B)}if(F!=null){const B={path:_.path,op:"less",value:F};g.addFilter(B)}return}const C={path:_.path,op:"equals",value:V};g.addFilter(C)}const y=V=>v(V.detail.value);return n.$$set=V=>{"field"in V&&t(0,_=V.field)},n.$$.update=()=>{var V;if(n.$$.dirty&1025&&d(t(7,l=Qr(m.namespace,m.datasetName,{leaf_path:_.path}))),n.$$.dirty&1025&&f(t(6,i=Gr(m.namespace,m.datasetName,{leaf_path:_.path,filters:m.queryOptions.filters}))),n.$$.dirty&2&&t(5,o=s.data!=null?s.data.counts:null),n.$$.dirty&4&&t(4,r=u.data!=null?u.data:null),n.$$.dirty&2)if(((V=s.data)==null?void 0:V.bins)!=null){t(3,p={});for(const[C,D,F]of Object.values(s.data.bins))t(3,p[C]=[D,F],p)}else t(3,p=null)},[_,s,u,p,r,o,i,l,g,v,m,y]}class Ju extends pe{constructor(e){super(),ve(this,e,Gu,Qu,be,{field:0})}}const{Boolean:Ft}=Er;function di(n,e,t){const l=n.slice();return l[39]=e[t],l}function hi(n,e,t){const l=n.slice();return l[42]=e[t],l}function mi(n,e,t){const l=n.slice();return l[45]=e[t],l}function _i(n,e,t){const l=n.slice();return l[48]=e[t],l}function Xu(n){let e,t="{}",l;return{c(){e=T("span"),l=X(t),this.h()},l(i){e=I(i,"SPAN",{class:!0});var o=S(e);l=x(o,t),o.forEach(h),this.h()},h(){z(e,"class","font-mono")},m(i,o){E(i,e,o),w(e,l)},p:$,i:$,o:$,d(i){i&&h(e)}}}function xu(n){let e,t,l,i;var o=n[23][n[1].repeated_field.dtype];function r(s){return{props:{title:s[1].dtype}}}return o&&(t=Ye(o,r(n))),{c(){e=T("div"),t&&q(t.$$.fragment),l=X("[]"),this.h()},l(s){e=I(s,"DIV",{class:!0});var a=S(e);t&&W(t.$$.fragment,a),l=x(a,"[]"),a.forEach(h),this.h()},h(){z(e,"class","flex")},m(s,a){E(s,e,a),t&&j(t,e,null),w(e,l),i=!0},p(s,a){const f={};if(a[0]&2&&(f.title=s[1].dtype),a[0]&2&&o!==(o=s[23][s[1].repeated_field.dtype])){if(t){ie();const u=t;k(u.$$.fragment,1,0,()=>{Y(u,1)}),re()}o?(t=Ye(o,r(s)),q(t.$$.fragment),b(t.$$.fragment,1),j(t,e,l)):t=null}else o&&t.$set(f)},i(s){i||(t&&b(t.$$.fragment,s),i=!0)},o(s){t&&k(t.$$.fragment,s),i=!1},d(s){s&&h(e),t&&Y(t)}}}function $u(n){let e,t,l;var i=n[23][n[1].dtype];function o(r){return{props:{title:r[1].dtype}}}return i&&(e=Ye(i,o(n))),{c(){e&&q(e.$$.fragment),t=fe()},l(r){e&&W(e.$$.fragment,r),t=fe()},m(r,s){e&&j(e,r,s),E(r,t,s),l=!0},p(r,s){const a={};if(s[0]&2&&(a.title=r[1].dtype),s[0]&2&&i!==(i=r[23][r[1].dtype])){if(e){ie();const f=e;k(f.$$.fragment,1,0,()=>{Y(f,1)}),re()}i?(e=Ye(i,o(r)),q(e.$$.fragment),b(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else i&&e.$set(a)},i(r){l||(e&&b(e.$$.fragment,r),l=!0)},o(r){e&&k(e.$$.fragment,r),l=!1},d(r){r&&h(t),e&&Y(e,r)}}}function gi(n){let e,t;return e=new qt({props:{interactive:!0,type:"green",$$slots:{default:[lc]},$$scope:{ctx:n}}}),e.$on("click",n[33]),e.$on("remove",n[34]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i[0]&16384|i[1]&1048576&&(o.$$scope={dirty:i,ctx:l}),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function ec(n){let e,t;return e=new Ht({}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function tc(n){let e,t;return e=new Rt({}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function lc(n){let e,t,l,i,o,r,s,a;const f=[tc,ec],u=[];function c(d,m){return d[14]=="ASC"?0:1}return r=c(n),s=u[r]=f[r](n),{c(){e=T("div"),t=T("div"),l=X("Sorted"),i=G(),o=T("span"),s.c(),this.h()},l(d){e=I(d,"DIV",{class:!0});var m=S(e);t=I(m,"DIV",{class:!0});var _=S(t);l=x(_,"Sorted"),_.forEach(h),i=J(m),o=I(m,"SPAN",{});var g=S(o);s.l(g),g.forEach(h),m.forEach(h),this.h()},h(){z(t,"class","mr-1"),z(e,"class","flex flex-row")},m(d,m){E(d,e,m),w(e,t),w(t,l),w(e,i),w(e,o),u[r].m(o,null),a=!0},p(d,m){let _=r;r=c(d),r!==_&&(ie(),k(u[_],1,1,()=>{u[_]=null}),re(),s=u[r],s||(s=u[r]=f[r](d),s.c()),b(s,1),s.m(o,null))},i(d){a||(b(s),a=!0)},o(d){k(s),a=!1},d(d){d&&h(e),u[r].d()}}}function bi(n){let e,t,l=n[7],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{i&&(l||(l=at(e,bt,{},!0)),l.run(1))}),i=!0)},o(o){k(t.$$.fragment,o),o&&(l||(l=at(e,bt,{},!1)),l.run(0)),i=!1},d(o){o&&h(e),Y(t),o&&l&&l.end()}}}function zi(n){let e,t,l=n[18],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rk(se[M],1,1,()=>{se[M]=null});let ue=n[16],me=[];for(let M=0;Mk(me[M],1,1,()=>{me[M]=null});let Me=n[4]&&n[21]&&wi(n),ce=n[10]&&Si(n);C=new dr({props:{field:n[1],schema:n[0]}});let Ee=n[20]&&Ei(n),H=n[18].length&&zi(n);return{c(){e=T("div"),t=T("div"),l=T("div"),q(i.$$.fragment),o=G(),r=T("div"),a.c(),u=G(),c=T("button"),d=X(n[19]),m=G(),le&&le.c(),_=G(),te&&te.c(),g=G();for(let M=0;M{O[Ae]=null}),re(),a=O[s],a?a.p(M,ee):(a=O[s]=K[s](M),a.c()),b(a,1),a.m(r,null)),f&&yt(f.update)&&ee[0]&2048&&f.update.call(null,{text:M[11]}),(!A||ee[0]&32)&&N(r,"bg-blue-200",M[5]),(!A||ee[0]&524288)&&_e(d,M[19]),(!A||ee[0]&1024)&&N(c,"cursor-default",!M[10]),M[15]?le?(le.p(M,ee),ee[0]&32768&&b(le,1)):(le=gi(M),le.c(),b(le,1),le.m(t,_)):le&&(ie(),k(le,1,1,()=>{le=null}),re()),M[13]?te?(te.p(M,ee),ee[0]&8192&&b(te,1)):(te=bi(M),te.c(),b(te,1),te.m(t,g)):te&&(ie(),k(te,1,1,()=>{te=null}),re()),ee[0]&4096){Q=M[12];let Ce;for(Ce=0;Ce{Me=null}),re()),M[10]?ce?(ce.p(M,ee),ee[0]&1024&&b(ce,1)):(ce=Si(M),ce.c(),b(ce,1),ce.m(t,V)):ce&&(ie(),k(ce,1,1,()=>{ce=null}),re());const qe={};ee[0]&2&&(qe.field=M[1]),ee[0]&1&&(qe.schema=M[0]),C.$set(qe),(!A||ee[0]&32)&&N(t,"bg-blue-50",M[5]),(!A||ee[0]&16)&&N(t,"bg-emerald-100",M[4]),(!A||ee[0]&32)&&N(t,"hover:bg-blue-100",M[5]),M[20]?Ee?(Ee.p(M,ee),ee[0]&1048576&&b(Ee,1)):(Ee=Ei(M),Ee.c(),b(Ee,1),Ee.m(e,F)):Ee&&(ie(),k(Ee,1,1,()=>{Ee=null}),re()),M[18].length?H?(H.p(M,ee),ee[0]&262144&&b(H,1)):(H=zi(M),H.c(),b(H,1),H.m(B,null)):H&&(ie(),k(H,1,1,()=>{H=null}),re()),(!A||ee[0]&32)&&N(e,"border-b",!M[5])},i(M){if(!A){b(i.$$.fragment,M),b(a),b(le),b(te);for(let ee=0;ee{A&&(L||(L=at(B,bt,{},!0)),L.run(1))}),A=!0}},o(M){k(i.$$.fragment,M),k(a),k(le),k(te),se=se.filter(Ft);for(let ee=0;eet(22,A=H));const te=Qe();ze(n,te,H=>t(9,B=H));const Q=rt();ze(n,Q,H=>t(30,L=H));function se(H){return H!=null&&H.repeated_field?se(H.repeated_field):H!=null&&H.fields?[...Object.values(H.fields).filter(M=>M.path.at(-1)!==nt)].flatMap(M=>{const ee=se(M);return ee.some(U=>gt(U))?ee:[M]}).filter(M=>{var ee,U,Ae,qe;return!(M.dtype==="embedding"||M.signal!=null&&ct(M).some(Ce=>Ce.dtype==="embedding")||((ee=M.signal)==null?void 0:ee.signal_name)==="sentences"||((U=M.signal)==null?void 0:U.signal_name)==="substring_search"||((Ae=M.signal)==null?void 0:Ae.signal_name)==="semantic_similarity"||((qe=M.signal)==null?void 0:qe.signal_name)==="concept_labels")}):[]}const we=()=>{c?te.removeSelectedColumn(r):te.addSelectedColumn(r)},ue=()=>{F&&(s?te.removeExpandedColumn(r):te.addExpandedColumn(r))},me=()=>_==="ASC"?Mt(te,B.queryOptions.sort_order="DESC",B):Mt(te,B.queryOptions.sort_order="ASC",B),Ie=()=>te.removeSortBy(r),Me=()=>R.signal&&v&&K&&A.mutate([B.namespace,B.datasetName,{leaf_path:K.path,signal:R.signal}]),ce=()=>{var H;return R.signal&&v&&ft({command:ut.EditPreviewConcept,namespace:B.namespace,datasetName:B.datasetName,path:K==null?void 0:K.path,signalName:(H=R.signal)==null?void 0:H.signal_name,value:R.signal})},Ee=()=>{s?te.removeExpandedColumn(r):te.addExpandedColumn(r)};return n.$$set=H=>{"schema"in H&&t(0,P=H.schema),"field"in H&&t(1,R=H.field),"sourceField"in H&&t(2,K=H.sourceField),"indent"in H&&t(3,O=H.indent)},n.$$.update=()=>{var H,M,ee,U;n.$$.dirty[0]&3&&t(5,l=Vt(R,P)),n.$$.dirty[0]&2&&t(21,i=gt(R)),n.$$.dirty[0]&32&&t(8,o=!l),n.$$.dirty[0]&2&&t(6,r=R.path),n.$$.dirty[0]&576&&t(20,s=B.expandedColumns[Te(r)]||!1),n.$$.dirty[0]&64&&t(29,a=r.at(-1)===tr),n.$$.dirty[0]&536870976&&t(19,f=a?r.at(-2):r.at(-1)),n.$$.dirty[0]&2&&t(18,u=se(R)),n.$$.dirty[0]&1073741888&&t(17,c=(H=L.visibleFields)==null?void 0:H.some(Ae=>Ue(Ae.path,r))),n.$$.dirty[0]&258&&t(16,d=o?ct(R).filter(Ae=>Ae.signal!=null&&ct(Ae).some(qe=>qe.dtype==="embedding")):[]),n.$$.dirty[0]&576&&t(15,m=(M=B.queryOptions.sort_by)==null?void 0:M.some(Ae=>Ue(Ae,r))),n.$$.dirty[0]&512&&t(14,_=B.queryOptions.sort_order),n.$$.dirty[0]&576&&t(7,g=((ee=B.queryOptions.filters)==null?void 0:ee.filter(Ae=>Ue(Ae.path,r)))||[]),n.$$.dirty[0]&128&&t(13,p=g.length>0),n.$$.dirty[0]&1073741888&&t(4,v=Ot(((U=L.selectRowsSchema)==null?void 0:U.data)||null,r)),n.$$.dirty[0]&576&&t(12,y=il(B,r)),n.$$.dirty[0]&32&&t(27,V=l?". This field was generated by a signal":""),n.$$.dirty[0]&2&&t(28,C=R.dtype??(R.repeated_field&&R.repeated_field.dtype?`${R.repeated_field.dtype}[]`:"object")),n.$$.dirty[0]&402653184&&t(11,D=`Data type: ${C}${V}`),n.$$.dirty[0]&18&&t(10,F=Bt(R)&&!v)},[P,R,K,O,v,l,r,g,o,B,F,D,y,p,_,m,d,c,u,f,s,i,A,ne,le,te,Q,V,C,a,L,we,ue,me,Ie,Me,ce,Ee]}class hr extends pe{constructor(e){super(),ve(this,e,ic,nc,be,{schema:0,field:1,sourceField:2,indent:3},null,[-1,-1])}}function Mi(n,e,t){const l=n.slice();return l[28]=e[t],l}function Vi(n,e,t){const l=n.slice();return l[31]=e[t],l}function rc(n){var A;let e,t,l,i,o,r,s,a,f,u,c,d,m,_,g,p,v,y;l=new Qi({props:{labelText:"Show",hideLabel:!0,checked:n[14],disabled:n[10]}}),l.$on("change",n[23]);let V=n[15]&&Ci(n),C=n[13]&&Ti(n),D=n[11]&&Ii(n),F=n[17]&&Ai(n),B=((A=n[1])==null?void 0:A.dtype)&&Di(n);g=new dr({props:{field:n[1],schema:n[0]}});let L=n[8]&&Bi(n);return{c(){e=T("div"),t=T("div"),q(l.$$.fragment),i=G(),o=T("div"),V&&V.c(),r=G(),s=T("div"),a=X(n[16]),f=G(),C&&C.c(),u=G(),D&&D.c(),c=G(),F&&F.c(),d=G(),B&&B.c(),m=G(),_=T("div"),q(g.$$.fragment),p=G(),L&&L.c(),v=fe(),this.h()},l(P){e=I(P,"DIV",{class:!0});var R=S(e);t=I(R,"DIV",{class:!0});var K=S(t);W(l.$$.fragment,K),K.forEach(h),i=J(R),o=I(R,"DIV",{class:!0});var O=S(o);V&&V.l(O),O.forEach(h),r=J(R),s=I(R,"DIV",{class:!0,title:!0});var ne=S(s);a=x(ne,n[16]),ne.forEach(h),f=J(R),C&&C.l(R),u=J(R),D&&D.l(R),c=J(R),F&&F.l(R),d=J(R),B&&B.l(R),m=J(R),_=I(R,"DIV",{});var le=S(_);W(g.$$.fragment,le),le.forEach(h),R.forEach(h),p=J(P),L&&L.l(P),v=fe(),this.h()},h(){z(t,"class","w-6"),z(o,"class","w-6"),Pe(o,"margin-left",n[2]*24+"px"),z(s,"class","grow truncate whitespace-nowrap pr-2 text-gray-900"),z(s,"title",n[16]),z(e,"class","flex w-full flex-row items-center border-b border-gray-200 px-4 py-2 hover:bg-gray-100"),N(e,"bg-blue-50",n[18]),N(e,"hover:bg-blue-100",n[18])},m(P,R){E(P,e,R),w(e,t),j(l,t,null),w(e,i),w(e,o),V&&V.m(o,null),w(e,r),w(e,s),w(s,a),w(e,f),C&&C.m(e,null),w(e,u),D&&D.m(e,null),w(e,c),F&&F.m(e,null),w(e,d),B&&B.m(e,null),w(e,m),w(e,_),j(g,_,null),E(P,p,R),L&&L.m(P,R),E(P,v,R),y=!0},p(P,R){var ne;const K={};R[0]&16384&&(K.checked=P[14]),R[0]&1024&&(K.disabled=P[10]),l.$set(K),P[15]?V?(V.p(P,R),R[0]&32768&&b(V,1)):(V=Ci(P),V.c(),b(V,1),V.m(o,null)):V&&(ie(),k(V,1,1,()=>{V=null}),re()),R[0]&4&&Pe(o,"margin-left",P[2]*24+"px"),(!y||R[0]&65536)&&_e(a,P[16]),(!y||R[0]&65536)&&z(s,"title",P[16]),P[13]?C?(C.p(P,R),R[0]&8192&&b(C,1)):(C=Ti(P),C.c(),b(C,1),C.m(e,u)):C&&(ie(),k(C,1,1,()=>{C=null}),re()),P[11]?D?(D.p(P,R),R[0]&2048&&b(D,1)):(D=Ii(P),D.c(),b(D,1),D.m(e,c)):D&&(ie(),k(D,1,1,()=>{D=null}),re()),P[17]?F?(F.p(P,R),R[0]&131072&&b(F,1)):(F=Ai(P),F.c(),b(F,1),F.m(e,d)):F&&(ie(),k(F,1,1,()=>{F=null}),re()),(ne=P[1])!=null&&ne.dtype?B?B.p(P,R):(B=Di(P),B.c(),B.m(e,m)):B&&(B.d(1),B=null);const O={};R[0]&2&&(O.field=P[1]),R[0]&1&&(O.schema=P[0]),g.$set(O),(!y||R[0]&262144)&&N(e,"bg-blue-50",P[18]),(!y||R[0]&262144)&&N(e,"hover:bg-blue-100",P[18]),P[8]?L?(L.p(P,R),R[0]&256&&b(L,1)):(L=Bi(P),L.c(),b(L,1),L.m(v.parentNode,v)):L&&(ie(),k(L,1,1,()=>{L=null}),re())},i(P){y||(b(l.$$.fragment,P),b(V),b(C),b(D),b(F),b(g.$$.fragment,P),b(L),y=!0)},o(P){k(l.$$.fragment,P),k(V),k(C),k(D),k(F),k(g.$$.fragment,P),k(L),y=!1},d(P){P&&h(e),Y(l),V&&V.d(),C&&C.d(),D&&D.d(),F&&F.d(),B&&B.d(),Y(g),P&&h(p),L&&L.d(P),P&&h(v)}}}function sc(n){let e,t;return e=new al({props:{field:n[1].repeated_field,indent:n[2],schema:n[0]}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i[0]&2&&(o.field=l[1].repeated_field),i[0]&4&&(o.indent=l[2]),i[0]&1&&(o.schema=l[0]),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function Ci(n){let e,t,l,i,o;return t=new no({props:{class:"w-3"}}),{c(){e=T("button"),q(t.$$.fragment),this.h()},l(r){e=I(r,"BUTTON",{class:!0});var s=S(e);W(t.$$.fragment,s),s.forEach(h),this.h()},h(){z(e,"class","p-2 transition hover:opacity-60"),N(e,"rotate-180",!n[8])},m(r,s){E(r,e,s),j(t,e,null),l=!0,i||(o=de(e,"click",n[24]),i=!0)},p(r,s){(!l||s[0]&256)&&N(e,"rotate-180",!r[8])},i(r){l||(b(t.$$.fragment,r),l=!0)},o(r){k(t.$$.fragment,r),l=!1},d(r){r&&h(e),Y(t),i=!1,o()}}}function Ti(n){let e,t;return e=new qt({props:{interactive:!0,type:"green",$$slots:{default:[fc]},$$scope:{ctx:n}}}),e.$on("click",n[25]),e.$on("remove",n[26]),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i[0]&4096|i[1]&8&&(o.$$scope={dirty:i,ctx:l}),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function ac(n){let e,t;return e=new Ht({}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function oc(n){let e,t;return e=new Rt({}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function fc(n){let e,t,l,i,o;const r=[oc,ac],s=[];function a(f,u){return f[12]=="ASC"?0:1}return t=a(n),l=s[t]=r[t](n),{c(){e=X(`Sorted + `),l.c(),i=fe()},l(f){e=x(f,`Sorted + `),l.l(f),i=fe()},m(f,u){E(f,e,u),s[t].m(f,u),E(f,i,u),o=!0},p(f,u){let c=t;t=a(f),t!==c&&(ie(),k(s[c],1,1,()=>{s[c]=null}),re(),l=s[t],l||(l=s[t]=r[t](f),l.c()),b(l,1),l.m(i.parentNode,i))},i(f){o||(b(l),o=!0)},o(f){k(l),o=!1},d(f){f&&h(e),s[t].d(f),f&&h(i)}}}function Ii(n){let e,t,l=n[4],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{i=null}),re())},i(o){l||(b(i),o&&ht(()=>{l&&(t||(t=at(e,bt,{},!0)),t.run(1))}),l=!0)},o(o){k(i),o&&(t||(t=at(e,bt,{},!1)),t.run(0)),l=!1},d(o){o&&h(e),i&&i.d(),o&&t&&t.end()}}}function Pi(n){let e,t,l=n[5],i=[];for(let r=0;rk(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{r[u]=null}),re(),t=r[e],t?t.p(a,f):(t=r[e]=o[e](a),t.c()),b(t,1),t.m(l.parentNode,l))},i(a){i||(b(t),i=!0)},o(a){k(t),i=!1},d(a){r[e].d(a),a&&h(l)}}}function cc(n,e,t){let l,i,o,r,s,a,f,u,c,d,m,_,g,p,v,y,V,{schema:C}=e,{field:D}=e,{indent:F=0}=e;const B=Qe();ze(n,B,le=>t(7,V=le));const L=rt();ze(n,L,le=>t(22,y=le));let A=!0;function P(le){return le!=null&&le.fields?Object.values(le.fields).filter(te=>te.path.at(-1)!==nt):[]}const R=()=>{c?B.removeSelectedColumn(l):B.addSelectedColumn(l)},K=()=>t(8,A=!A),O=()=>m==="ASC"?Mt(B,V.queryOptions.sort_order="DESC",V):Mt(B,V.queryOptions.sort_order="ASC",V),ne=()=>B.removeSortBy(l);return n.$$set=le=>{"schema"in le&&t(0,C=le.schema),"field"in le&&t(1,D=le.field),"indent"in le&&t(2,F=le.indent)},n.$$.update=()=>{var le,te,Q,se;n.$$.dirty[0]&2&&t(3,l=D.path),n.$$.dirty[0]&3&&t(21,i=Dt(C,D.path.slice(0,-1))),n.$$.dirty[0]&3&&t(18,o=Vt(D,C)),n.$$.dirty[0]&2&&t(6,s=D.path.at(-1)===tr),n.$$.dirty[0]&2097218&&t(17,r=s&&i?gt(i):gt(D)),n.$$.dirty[0]&66&&t(16,a=s?D.path.at(-2):D.path.at(-1)),n.$$.dirty[0]&2&&t(5,f=P(D)),n.$$.dirty[0]&32&&t(15,u=f.length>0),n.$$.dirty[0]&4194312&&t(14,c=(le=y.visibleFields)==null?void 0:le.some(we=>Ue(we.path,l))),n.$$.dirty[0]&136&&t(13,d=(te=V.queryOptions.sort_by)==null?void 0:te.some(we=>Ue(we,l))),n.$$.dirty[0]&128&&t(12,m=V.queryOptions.sort_order),n.$$.dirty[0]&136&&t(4,_=((Q=V.queryOptions.filters)==null?void 0:Q.filter(we=>Ue(we.path,l)))||[]),n.$$.dirty[0]&16&&t(11,g=_.length>0),n.$$.dirty[0]&2&&t(10,p=!D.dtype||D.dtype==="embedding"),n.$$.dirty[0]&4194312&&t(9,v=Ot(((se=y.selectRowsSchema)==null?void 0:se.data)||null,l))},[C,D,F,l,_,f,s,V,A,v,p,g,m,d,c,u,a,r,o,B,L,i,y,R,K,O,ne]}class al extends pe{constructor(e){super(),ve(this,e,cc,uc,be,{schema:0,field:1,indent:2},null,[-1,-1])}}function Hi(n,e,t){const l=n.slice();return l[10]=e[t],l}function Fi(n,e,t){const l=n.slice();return l[10]=e[t],l}function dc(n){let e;return{c(){e=X("datasets")},l(t){e=x(t,"datasets")},m(t,l){E(t,e,l)},d(t){t&&h(e)}}}function hc(n){let e=n[1].namespace+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){E(l,t,i)},p(l,i){i&2&&e!==(e=l[1].namespace+"")&&_e(t,e)},d(l){l&&h(t)}}}function mc(n){let e=n[1].datasetName+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){E(l,t,i)},p(l,i){i&2&&e!==(e=l[1].datasetName+"")&&_e(t,e)},d(l){l&&h(t)}}}function _c(n){let e,t,l,i,o,r;return e=new Yt({props:{href:"/",$$slots:{default:[dc]},$$scope:{ctx:n}}}),l=new Yt({props:{href:"/",$$slots:{default:[hc]},$$scope:{ctx:n}}}),o=new Yt({props:{$$slots:{default:[mc]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=G(),q(l.$$.fragment),i=G(),q(o.$$.fragment)},l(s){W(e.$$.fragment,s),t=J(s),W(l.$$.fragment,s),i=J(s),W(o.$$.fragment,s)},m(s,a){j(e,s,a),E(s,t,a),j(l,s,a),E(s,i,a),j(o,s,a),r=!0},p(s,a){const f={};a&32768&&(f.$$scope={dirty:a,ctx:s}),e.$set(f);const u={};a&32770&&(u.$$scope={dirty:a,ctx:s}),l.$set(u);const c={};a&32770&&(c.$$scope={dirty:a,ctx:s}),o.$set(c)},i(s){r||(b(e.$$.fragment,s),b(l.$$.fragment,s),b(o.$$.fragment,s),r=!0)},o(s){k(e.$$.fragment,s),k(l.$$.fragment,s),k(o.$$.fragment,s),r=!1},d(s){Y(e,s),s&&h(t),Y(l,s),s&&h(i),Y(o,s)}}}function Li(n){let e,t=De(n[3].data.dataset_manifest.num_items)+"",l,i;return{c(){e=X("("),l=X(t),i=X(" rows)")},l(o){e=x(o,"("),l=x(o,t),i=x(o," rows)")},m(o,r){E(o,e,r),E(o,l,r),E(o,i,r)},p(o,r){r&8&&t!==(t=De(o[3].data.dataset_manifest.num_items)+"")&&_e(l,t)},d(o){o&&h(e),o&&h(l),o&&h(i)}}}function gc(n){let e,t,l,i,o,r;return e=new Et({props:{label:"Schema",class:"w-1/3"}}),l=new Et({props:{label:"Tree View",class:"w-1/3"}}),o=new Et({props:{label:"Raw Query",class:"w-1/3"}}),{c(){q(e.$$.fragment),t=G(),q(l.$$.fragment),i=G(),q(o.$$.fragment)},l(s){W(e.$$.fragment,s),t=J(s),W(l.$$.fragment,s),i=J(s),W(o.$$.fragment,s)},m(s,a){j(e,s,a),E(s,t,a),j(l,s,a),E(s,i,a),j(o,s,a),r=!0},p:$,i(s){r||(b(e.$$.fragment,s),b(l.$$.fragment,s),b(o.$$.fragment,s),r=!0)},o(s){k(e.$$.fragment,s),k(l.$$.fragment,s),k(o.$$.fragment,s),r=!1},d(s){Y(e,s),s&&h(t),Y(l,s),s&&h(i),Y(o,s)}}}function bc(n){let e=[],t=new Map,l,i,o=Object.keys(n[0].data.schema.fields);const r=s=>s[10];for(let s=0;s{r[u]=null}),re()),~e?(t=r[e],t?t.p(a,f):(t=r[e]=o[e](a),t.c()),b(t,1),t.m(l.parentNode,l)):t=null)},i(a){i||(b(t),i=!0)},o(a){k(t),i=!1},d(a){~e&&r[e].d(a),a&&h(l)}}}function kc(n){let e=[],t=new Map,l,i,o=Object.keys(n[0].data.schema.fields);const r=s=>s[10];for(let s=0;s{r[u]=null}),re()),~e?(t=r[e],t?t.p(a,f):(t=r[e]=o[e](a),t.c()),b(t,1),t.m(l.parentNode,l)):t=null)},i(a){i||(b(t),i=!0)},o(a){k(t),i=!1},d(a){~e&&r[e].d(a),a&&h(l)}}}function Ec(n){let e,t;return e=new Bu({}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function zc(n){let e,t,l,i,o,r,s;return t=new zt({props:{$$slots:{default:[vc]},$$scope:{ctx:n}}}),i=new zt({props:{$$slots:{default:[Sc]},$$scope:{ctx:n}}}),r=new zt({props:{$$slots:{default:[Ec]},$$scope:{ctx:n}}}),{c(){e=T("div"),q(t.$$.fragment),l=G(),q(i.$$.fragment),o=G(),q(r.$$.fragment),this.h()},l(a){e=I(a,"DIV",{class:!0,slot:!0});var f=S(e);W(t.$$.fragment,f),l=J(f),W(i.$$.fragment,f),o=J(f),W(r.$$.fragment,f),f.forEach(h),this.h()},h(){z(e,"class","h-full overflow-y-auto"),z(e,"slot","content")},m(a,f){E(a,e,f),j(t,e,null),w(e,l),j(i,e,null),w(e,o),j(r,e,null),s=!0},p(a,f){const u={};f&32769&&(u.$$scope={dirty:f,ctx:a}),t.$set(u);const c={};f&32769&&(c.$$scope={dirty:f,ctx:a}),i.$set(c);const d={};f&32768&&(d.$$scope={dirty:f,ctx:a}),r.$set(d)},i(a){s||(b(t.$$.fragment,a),b(i.$$.fragment,a),b(r.$$.fragment,a),s=!0)},o(a){k(t.$$.fragment,a),k(i.$$.fragment,a),k(r.$$.fragment,a),s=!1},d(a){a&&h(e),Y(t),Y(i),Y(r)}}}function yc(n){let e,t,l,i,o,r,s,a,f,u,c,d,m;i=new gs({props:{noTrailingSlash:!0,skeleton:n[2].isLoading,$$slots:{default:[_c]},$$scope:{ctx:n}}});let _=n[3].isSuccess&&Li(n);return a=new tt({props:{size:"field",kind:"ghost",icon:Co,iconDescription:"Reset View"}}),a.$on("click",n[4].reset),u=new tt({props:{size:"field",kind:"ghost",icon:bo,iconDescription:"Download selection"}}),u.$on("click",n[8]),d=new rr({props:{class:"overflow-hidden border-b border-gray-200",$$slots:{content:[zc],default:[gc]},$$scope:{ctx:n}}}),{c(){e=T("div"),t=T("div"),l=T("div"),q(i.$$.fragment),o=G(),_&&_.c(),r=G(),s=T("div"),q(a.$$.fragment),f=G(),q(u.$$.fragment),c=G(),q(d.$$.fragment),this.h()},l(g){e=I(g,"DIV",{class:!0});var p=S(e);t=I(p,"DIV",{class:!0});var v=S(t);l=I(v,"DIV",{class:!0});var y=S(l);W(i.$$.fragment,y),o=J(y),_&&_.l(y),y.forEach(h),r=J(v),s=I(v,"DIV",{class:!0});var V=S(s);W(a.$$.fragment,V),f=J(V),W(u.$$.fragment,V),V.forEach(h),v.forEach(h),c=J(p),W(d.$$.fragment,p),p.forEach(h),this.h()},h(){z(l,"class","flex items-center"),z(s,"class","flex"),z(t,"class","mb-2 flex w-full items-center justify-between gap-x-2 px-4"),z(e,"class","flex h-full flex-col pt-4")},m(g,p){E(g,e,p),w(e,t),w(t,l),j(i,l,null),w(l,o),_&&_.m(l,null),w(t,r),w(t,s),j(a,s,null),w(s,f),j(u,s,null),w(e,c),j(d,e,null),m=!0},p(g,[p]){const v={};p&4&&(v.skeleton=g[2].isLoading),p&32770&&(v.$$scope={dirty:p,ctx:g}),i.$set(v),g[3].isSuccess?_?_.p(g,p):(_=Li(g),_.c(),_.m(l,null)):_&&(_.d(1),_=null);const y={};p&32769&&(y.$$scope={dirty:p,ctx:g}),d.$set(y)},i(g){m||(b(i.$$.fragment,g),b(a.$$.fragment,g),b(u.$$.fragment,g),b(d.$$.fragment,g),m=!0)},o(g){k(i.$$.fragment,g),k(a.$$.fragment,g),k(u.$$.fragment,g),k(d.$$.fragment,g),m=!1},d(g){g&&h(e),Y(i),_&&_.d(),Y(a),Y(u),Y(d)}}}function Mc(n,e,t){let l,i,o,r,s;const a=Qe();ze(n,a,m=>t(1,o=m));const f=rt();ze(n,f,m=>t(9,i=m));const u=ll(o.namespace,o.datasetName);ze(n,u,m=>t(2,r=m));const c=$i(o.namespace,o.datasetName);ze(n,c,m=>t(3,s=m));async function d(){var y;const m=o.namespace,_=o.datasetName,g=o.queryOptions;g.columns=(y=i.visibleFields)==null?void 0:y.map(V=>V.path);const p=`/api/v1/datasets/${m}/${_}/select_rows_download?url_safe_options=${encodeURIComponent(JSON.stringify(g))}`,v=document.createElement("a");v.download=`${m}_${_}.json`,v.href=p,document.body.appendChild(v),v.click(),v.remove()}return n.$$.update=()=>{n.$$.dirty&512&&t(0,l=i.selectRowsSchema)},[l,o,r,s,a,f,u,c,d,i]}class Vc extends pe{constructor(e){super(),ve(this,e,Mc,yc,be,{})}}function Cc(n){let e,t,l,i,o,r,s,a,f;return l=new Vc({}),r=new Cu({}),a=new Br({}),{c(){e=T("div"),t=T("div"),q(l.$$.fragment),i=G(),o=T("div"),q(r.$$.fragment),s=G(),q(a.$$.fragment),this.h()},l(u){e=I(u,"DIV",{class:!0});var c=S(e);t=I(c,"DIV",{class:!0});var d=S(t);W(l.$$.fragment,d),d.forEach(h),i=J(c),o=I(c,"DIV",{class:!0});var m=S(o);W(r.$$.fragment,m),m.forEach(h),c.forEach(h),s=J(u),W(a.$$.fragment,u),this.h()},h(){z(t,"class","h-full w-1/3 border-r border-gray-200"),z(o,"class","h-full w-2/3"),z(e,"class","flex h-full w-full")},m(u,c){E(u,e,c),w(e,t),j(l,t,null),w(e,i),w(e,o),j(r,o,null),E(u,s,c),j(a,u,c),f=!0},p:$,i(u){f||(b(l.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),f=!0)},o(u){k(l.$$.fragment,u),k(r.$$.fragment,u),k(a.$$.fragment,u),f=!1},d(u){u&&h(e),Y(l),Y(r),u&&h(s),Y(a,u)}}}function Tc(n,e,t){let l,i,o,r,s,a,f=$,u=()=>(f(),f=Ge(s,L=>t(8,a=L)),s),c,d=$,m=()=>(d(),d=Ge(l,L=>t(9,c=L)),l),_,g=$,p=()=>(g(),g=Ge(i,L=>t(10,_=L)),i),v,y=$,V=()=>(y(),y=Ge(r,L=>t(11,v=L)),r);n.$$.on_destroy.push(()=>f()),n.$$.on_destroy.push(()=>d()),n.$$.on_destroy.push(()=>g()),n.$$.on_destroy.push(()=>y());let{namespace:C}=e,{datasetName:D}=e;const F=Pr(C,D);Rr(F);let B=null;return n.$$set=L=>{"namespace"in L&&t(4,C=L.namespace),"datasetName"in L&&t(5,D=L.datasetName)},n.$$.update=()=>{var L;if(n.$$.dirty&48&&m(t(0,l=Hr(C,D))),n.$$.dirty&1&&Fr(l),n.$$.dirty&512&&p(t(3,i=ll(c.namespace,c.datasetName))),n.$$.dirty&1024&&t(7,o=At("string",_.data)),n.$$.dirty&640&&V(t(2,r=Jr(o.map(A=>[c.namespace,c.datasetName,{leaf_path:A.path}])))),n.$$.dirty&512&&u(t(1,s=Xr(c.namespace,c.datasetName,Lr(c)))),n.$$.dirty&3200&&_.data!=null&&v.length>0&&!v.some(A=>A==null||A.isLoading)&&t(6,B=v.map((A,P)=>({path:o[P].path,stats:A})).sort((A,P)=>{var R,K;return A==null||P==null?0:(((R=P.stats.data)==null?void 0:R.avg_text_length)||0)-(((K=A.stats.data)==null?void 0:K.avg_text_length)||0)})),n.$$.dirty&1024&&_.data!=null&&F.setSchema(_.data),n.$$.dirty&256&&a!=null&&F.setSelectRowsSchema(a),n.$$.dirty&64&&B!=null&&F.setStats(B),n.$$.dirty&768){const A=Yo(c.selectedColumns,((L=a==null?void 0:a.data)==null?void 0:L.schema)||null);F.setVisibleFields(A)}},[l,s,r,i,C,D,B,o,a,c,_,v]}class Ic extends pe{constructor(e){super(),ve(this,e,Tc,Cc,be,{namespace:4,datasetName:5})}}function ji(n){let e,t;return e=new Ic({props:{namespace:n[0],datasetName:n[1]}}),{c(){q(e.$$.fragment)},l(l){W(e.$$.fragment,l)},m(l,i){j(e,l,i),t=!0},p(l,i){const o={};i&1&&(o.namespace=l[0]),i&2&&(o.datasetName=l[1]),e.$set(o)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){k(e.$$.fragment,l),t=!1},d(l){Y(e,l)}}}function Nc(n){let e,t,l=n[0]&&n[1]&&ji(n);return{c(){l&&l.c(),e=fe()},l(i){l&&l.l(i),e=fe()},m(i,o){l&&l.m(i,o),E(i,e,o),t=!0},p(i,[o]){i[0]&&i[1]?l?(l.p(i,o),o&3&&b(l,1)):(l=ji(i),l.c(),b(l,1),l.m(e.parentNode,e)):l&&(ie(),k(l,1,1,()=>{l=null}),re())},i(i){t||(b(l),t=!0)},o(i){k(l),t=!1},d(i){l&&l.d(i),i&&h(e)}}}function Ac(n,e,t){let l;ze(n,zr,r=>t(2,l=r));let i,o;return n.$$.update=()=>{n.$$.dirty&4&&l.onHashChange("/(?.+)/(?.+)",r=>{t(0,i=r.namespace),t(1,o=r.datasetName)})},[i,o,l]}class Kc extends pe{constructor(e){super(),ve(this,e,Ac,Nc,be,{})}}export{Kc as component};