nsthorat's picture
Push
df815f7
raw
history blame
No virus
24.6 kB
import{S as W,i as X,s as J,E as C,k as I,a as M,l as P,m as V,c as H,h as p,n as j,H as E,I as O,b as L,J as D,K as q,g as k,v as y,d as T,f as w,O as ie,P as ae,D as U,aj as Ve,ac as Re,R as le,F as se,G as re,L as oe,M as ue,N as fe,Q as B,w as z,q as Y,r as Z,u as ce,a1 as x,C as je,T as Ce,o as Me,a4 as _e,am as He,U as $,y as F,z as A,A as G,V as ee,B as R,e as Q,a5 as qe,a3 as Ke}from"../chunks/index.5fd689e7.js";import{P as Oe,g as Ue}from"../chunks/Page.ad40f1eb.js";import{T as de,a1 as ze,a2 as Je,a3 as Qe,G as We,I as Ne,S as Xe,R as Ye}from"../chunks/utils.ae90bc8b.js";import{f as Be,B as Ze}from"../chunks/taskQueries.ab6be53f.js";import{C as ye}from"../chunks/ComboBox.8f56cfc5.js";import{w as we}from"../chunks/taskMonitoringStore.741efe2c.js";import{w as Fe}from"../chunks/index.08894c4d.js";const xe=l=>({}),he=l=>({});function be(l){let e,t;const n=l[16].labelText,i=re(n,l,l[15],he),s=i||$e(l);return{c(){e=I("span"),s&&s.c(),this.h()},l(a){e=P(a,"SPAN",{});var o=V(e);s&&s.l(o),o.forEach(p),this.h()},h(){E(e,"bx--visually-hidden",l[7])},m(a,o){L(a,e,o),s&&s.m(e,null),t=!0},p(a,o){i?i.p&&(!t||o&32768)&&oe(i,n,a,a[15],t?fe(n,a[15],o,xe):ue(a[15]),he):s&&s.p&&(!t||o&64)&&s.p(a,t?o:-1),(!t||o&128)&&E(e,"bx--visually-hidden",a[7])},i(a){t||(k(s,a),t=!0)},o(a){T(s,a),t=!1},d(a){a&&p(e),s&&s.d(a)}}}function $e(l){let e;return{c(){e=Y(l[6])},l(t){e=Z(t,l[6])},m(t,n){L(t,e,n)},p(t,n){n&64&&ce(e,t[6])},d(t){t&&p(e)}}}function et(l){let e,t,n,i,s,a,o,r,u,d=(l[6]||l[13].labelText)&&be(l),h=[l[12]],c={};for(let m=0;m<h.length;m+=1)c=C(c,h[m]);return{c(){e=I("div"),t=I("input"),n=M(),i=I("label"),s=I("span"),a=M(),d&&d.c(),this.h()},l(m){e=P(m,"DIV",{});var v=V(e);t=P(v,"INPUT",{type:!0,id:!0,name:!0}),n=H(v),i=P(v,"LABEL",{for:!0});var f=V(i);s=P(f,"SPAN",{}),V(s).forEach(p),a=H(f),d&&d.l(f),f.forEach(p),v.forEach(p),this.h()},h(){j(t,"type","radio"),j(t,"id",l[8]),j(t,"name",l[9]),t.checked=l[0],t.disabled=l[3],t.required=l[4],t.value=l[2],E(t,"bx--radio-button",!0),E(s,"bx--radio-button__appearance",!0),j(i,"for",l[8]),E(i,"bx--radio-button__label",!0),O(e,c),E(e,"bx--radio-button-wrapper",!0),E(e,"bx--radio-button-wrapper--label-left",l[5]==="left")},m(m,v){L(m,e,v),D(e,t),l[18](t),D(e,n),D(e,i),D(i,s),D(i,a),d&&d.m(i,null),o=!0,r||(u=[q(t,"change",l[17]),q(t,"change",l[19])],r=!0)},p(m,[v]){(!o||v&256)&&j(t,"id",m[8]),(!o||v&512)&&j(t,"name",m[9]),(!o||v&1)&&(t.checked=m[0]),(!o||v&8)&&(t.disabled=m[3]),(!o||v&16)&&(t.required=m[4]),(!o||v&4)&&(t.value=m[2]),m[6]||m[13].labelText?d?(d.p(m,v),v&8256&&k(d,1)):(d=be(m),d.c(),k(d,1),d.m(i,null)):d&&(y(),T(d,1,1,()=>{d=null}),w()),(!o||v&256)&&j(i,"for",m[8]),O(e,c=ie(h,[v&4096&&m[12]])),E(e,"bx--radio-button-wrapper",!0),E(e,"bx--radio-button-wrapper--label-left",m[5]==="left")},i(m){o||(k(d),o=!0)},o(m){T(d),o=!1},d(m){m&&p(e),l[18](null),d&&d.d(),r=!1,ae(u)}}}function tt(l,e,t){const n=["value","checked","disabled","required","labelPosition","labelText","hideLabel","id","name","ref"];let i=U(e,n),s,{$$slots:a={},$$scope:o}=e;const r=Ve(a);let{value:u=""}=e,{checked:d=!1}=e,{disabled:h=!1}=e,{required:c=!1}=e,{labelPosition:m="right"}=e,{labelText:v=""}=e,{hideLabel:f=!1}=e,{id:b="ccs-"+Math.random().toString(36)}=e,{name:_=""}=e,{ref:N=null}=e;const K=Re("RadioButtonGroup"),te=K?K.selectedValue:Fe(d?u:void 0);le(l,te,S=>t(14,s=S)),K&&K.add({id:b,checked:d,disabled:h,value:u});function ne(S){B.call(this,l,S)}function g(S){z[S?"unshift":"push"](()=>{N=S,t(1,N)})}const me=()=>{K&&K.update(u)};return l.$$set=S=>{e=C(C({},e),se(S)),t(12,i=U(e,n)),"value"in S&&t(2,u=S.value),"checked"in S&&t(0,d=S.checked),"disabled"in S&&t(3,h=S.disabled),"required"in S&&t(4,c=S.required),"labelPosition"in S&&t(5,m=S.labelPosition),"labelText"in S&&t(6,v=S.labelText),"hideLabel"in S&&t(7,f=S.hideLabel),"id"in S&&t(8,b=S.id),"name"in S&&t(9,_=S.name),"ref"in S&&t(1,N=S.ref),"$$scope"in S&&t(15,o=S.$$scope)},l.$$.update=()=>{l.$$.dirty&16388&&t(0,d=s===u)},[d,N,u,h,c,m,v,f,b,_,K,te,i,r,s,o,a,ne,g,me]}class lt extends W{constructor(e){super(),X(this,e,tt,et,J,{value:2,checked:0,disabled:3,required:4,labelPosition:5,labelText:6,hideLabel:7,id:8,name:9,ref:1})}}const nt=lt;function it(l){let e,t,n,i;const s=l[3].default,a=re(s,l,l[2],null);let o=[l[1]],r={};for(let u=0;u<o.length;u+=1)r=C(r,o[u]);return{c(){e=I("form"),a&&a.c(),this.h()},l(u){e=P(u,"FORM",{});var d=V(e);a&&a.l(d),d.forEach(p),this.h()},h(){O(e,r),E(e,"bx--form",!0)},m(u,d){L(u,e,d),a&&a.m(e,null),l[10](e),t=!0,n||(i=[q(e,"click",l[4]),q(e,"keydown",l[5]),q(e,"mouseover",l[6]),q(e,"mouseenter",l[7]),q(e,"mouseleave",l[8]),q(e,"submit",l[9])],n=!0)},p(u,[d]){a&&a.p&&(!t||d&4)&&oe(a,s,u,u[2],t?fe(s,u[2],d,null):ue(u[2]),null),O(e,r=ie(o,[d&2&&u[1]])),E(e,"bx--form",!0)},i(u){t||(k(a,u),t=!0)},o(u){T(a,u),t=!1},d(u){u&&p(e),a&&a.d(u),l[10](null),n=!1,ae(i)}}}function at(l,e,t){const n=["ref"];let i=U(e,n),{$$slots:s={},$$scope:a}=e,{ref:o=null}=e;function r(f){B.call(this,l,f)}function u(f){B.call(this,l,f)}function d(f){B.call(this,l,f)}function h(f){B.call(this,l,f)}function c(f){B.call(this,l,f)}function m(f){B.call(this,l,f)}function v(f){z[f?"unshift":"push"](()=>{o=f,t(0,o)})}return l.$$set=f=>{e=C(C({},e),se(f)),t(1,i=U(e,n)),"ref"in f&&t(0,o=f.ref),"$$scope"in f&&t(2,a=f.$$scope)},[o,i,a,s,r,u,d,h,c,m,v]}class st extends W{constructor(e){super(),X(this,e,at,it,J,{ref:0})}}const rt=st;function ge(l){let e,t,n;return{c(){e=I("legend"),t=Y(l[4]),this.h()},l(i){e=P(i,"LEGEND",{id:!0});var s=V(e);t=Z(s,l[4]),s.forEach(p),this.h()},h(){j(e,"id",n=l[5]||l[6]["aria-labelledby"]),E(e,"bx--label",!0)},m(i,s){L(i,e,s),D(e,t)},p(i,s){s&16&&ce(t,i[4]),s&96&&n!==(n=i[5]||i[6]["aria-labelledby"])&&j(e,"id",n)},d(i){i&&p(e)}}}function ve(l){let e,t;return{c(){e=I("div"),t=Y(l[3]),this.h()},l(n){e=P(n,"DIV",{});var i=V(e);t=Z(i,l[3]),i.forEach(p),this.h()},h(){E(e,"bx--form__requirement",!0)},m(n,i){L(n,e,i),D(e,t)},p(n,i){i&8&&ce(t,n[3])},d(n){n&&p(e)}}}function ot(l){let e,t,n,i,s,a,o,r,u=l[4]&&ge(l);const d=l[8].default,h=re(d,l,l[7],null);let c=l[2]&&ve(l),m=[{"data-invalid":i=l[1]||void 0},{"aria-labelledby":s=l[6]["aria-labelledby"]||l[5]},l[6]],v={};for(let f=0;f<m.length;f+=1)v=C(v,m[f]);return{c(){e=I("fieldset"),u&&u.c(),t=M(),h&&h.c(),n=M(),c&&c.c(),this.h()},l(f){e=P(f,"FIELDSET",{"data-invalid":!0,"aria-labelledby":!0});var b=V(e);u&&u.l(b),t=H(b),h&&h.l(b),n=H(b),c&&c.l(b),b.forEach(p),this.h()},h(){O(e,v),E(e,"bx--fieldset",!0),E(e,"bx--fieldset--no-margin",l[0])},m(f,b){L(f,e,b),u&&u.m(e,null),D(e,t),h&&h.m(e,null),D(e,n),c&&c.m(e,null),a=!0,o||(r=[q(e,"click",l[9]),q(e,"mouseover",l[10]),q(e,"mouseenter",l[11]),q(e,"mouseleave",l[12])],o=!0)},p(f,[b]){f[4]?u?u.p(f,b):(u=ge(f),u.c(),u.m(e,t)):u&&(u.d(1),u=null),h&&h.p&&(!a||b&128)&&oe(h,d,f,f[7],a?fe(d,f[7],b,null):ue(f[7]),null),f[2]?c?c.p(f,b):(c=ve(f),c.c(),c.m(e,null)):c&&(c.d(1),c=null),O(e,v=ie(m,[(!a||b&2&&i!==(i=f[1]||void 0))&&{"data-invalid":i},(!a||b&96&&s!==(s=f[6]["aria-labelledby"]||f[5]))&&{"aria-labelledby":s},b&64&&f[6]])),E(e,"bx--fieldset",!0),E(e,"bx--fieldset--no-margin",f[0])},i(f){a||(k(h,f),a=!0)},o(f){T(h,f),a=!1},d(f){f&&p(e),u&&u.d(),h&&h.d(f),c&&c.d(),o=!1,ae(r)}}}function ut(l,e,t){const n=["noMargin","invalid","message","messageText","legendText","legendId"];let i=U(e,n),{$$slots:s={},$$scope:a}=e,{noMargin:o=!1}=e,{invalid:r=!1}=e,{message:u=!1}=e,{messageText:d=""}=e,{legendText:h=""}=e,{legendId:c=""}=e;function m(_){B.call(this,l,_)}function v(_){B.call(this,l,_)}function f(_){B.call(this,l,_)}function b(_){B.call(this,l,_)}return l.$$set=_=>{e=C(C({},e),se(_)),t(6,i=U(e,n)),"noMargin"in _&&t(0,o=_.noMargin),"invalid"in _&&t(1,r=_.invalid),"message"in _&&t(2,u=_.message),"messageText"in _&&t(3,d=_.messageText),"legendText"in _&&t(4,h=_.legendText),"legendId"in _&&t(5,c=_.legendId),"$$scope"in _&&t(7,a=_.$$scope)},[o,r,u,d,h,c,i,a,s,m,v,f,b]}class ft extends W{constructor(e){super(),X(this,e,ut,ot,J,{noMargin:0,invalid:1,message:2,messageText:3,legendText:4,legendId:5})}}const pe=ft;function dt(l){let e,t,n,i,s,a,o=[l[0]],r={};for(let u=0;u<o.length;u+=1)r=C(r,o[u]);return{c(){e=I("div"),t=I("div"),n=M(),i=I("span"),this.h()},l(u){e=P(u,"DIV",{});var d=V(e);t=P(d,"DIV",{}),V(t).forEach(p),n=H(d),i=P(d,"SPAN",{}),V(i).forEach(p),d.forEach(p),this.h()},h(){E(t,"bx--radio-button",!0),E(t,"bx--skeleton",!0),E(i,"bx--radio-button__label",!0),E(i,"bx--skeleton",!0),O(e,r),E(e,"bx--radio-button-wrapper",!0)},m(u,d){L(u,e,d),D(e,t),D(e,n),D(e,i),s||(a=[q(e,"click",l[1]),q(e,"mouseover",l[2]),q(e,"mouseenter",l[3]),q(e,"mouseleave",l[4])],s=!0)},p(u,[d]){O(e,r=ie(o,[d&1&&u[0]])),E(e,"bx--radio-button-wrapper",!0)},i:x,o:x,d(u){u&&p(e),s=!1,ae(a)}}}function ct(l,e,t){const n=[];let i=U(e,n);function s(u){B.call(this,l,u)}function a(u){B.call(this,l,u)}function o(u){B.call(this,l,u)}function r(u){B.call(this,l,u)}return l.$$set=u=>{e=C(C({},e),se(u)),t(0,i=U(e,n))},[i,s,a,o,r]}class mt extends W{constructor(e){super(),X(this,e,ct,dt,J,{})}}const _t=mt,ht=l=>({}),ke=l=>({});function Te(l){let e,t;const n=l[11].legendText,i=re(n,l,l[10],ke),s=i||bt(l);return{c(){e=I("legend"),s&&s.c(),this.h()},l(a){e=P(a,"LEGEND",{});var o=V(e);s&&s.l(o),o.forEach(p),this.h()},h(){E(e,"bx--label",!0),E(e,"bx--visually-hidden",l[2])},m(a,o){L(a,e,o),s&&s.m(e,null),t=!0},p(a,o){i?i.p&&(!t||o&1024)&&oe(i,n,a,a[10],t?fe(n,a[10],o,ht):ue(a[10]),ke):s&&s.p&&(!t||o&2)&&s.p(a,t?o:-1),(!t||o&4)&&E(e,"bx--visually-hidden",a[2])},i(a){t||(k(s,a),t=!0)},o(a){T(s,a),t=!1},d(a){a&&p(e),s&&s.d(a)}}}function bt(l){let e;return{c(){e=Y(l[1])},l(t){e=Z(t,l[1])},m(t,n){L(t,e,n)},p(t,n){n&2&&ce(e,t[1])},d(t){t&&p(e)}}}function gt(l){let e,t,n,i,s,a,o=(l[1]||l[8].legendText)&&Te(l);const r=l[11].default,u=re(r,l,l[10],null);let d=[{id:l[5]},l[7]],h={};for(let c=0;c<d.length;c+=1)h=C(h,d[c]);return{c(){e=I("div"),t=I("fieldset"),o&&o.c(),n=M(),u&&u.c(),this.h()},l(c){e=P(c,"DIV",{id:!0});var m=V(e);t=P(m,"FIELDSET",{});var v=V(t);o&&o.l(v),n=H(v),u&&u.l(v),v.forEach(p),m.forEach(p),this.h()},h(){t.disabled=l[0],E(t,"bx--radio-button-group",!0),E(t,"bx--radio-button-group--vertical",l[4]==="vertical"),E(t,"bx--radio-button-group--label-left",l[3]==="left"),E(t,"bx--radio-button-group--label-right",l[3]==="right"),O(e,h),E(e,"bx--form-item",!0)},m(c,m){L(c,e,m),D(e,t),o&&o.m(t,null),D(t,n),u&&u.m(t,null),i=!0,s||(a=[q(e,"click",l[12]),q(e,"mouseover",l[13]),q(e,"mouseenter",l[14]),q(e,"mouseleave",l[15])],s=!0)},p(c,[m]){c[1]||c[8].legendText?o?(o.p(c,m),m&258&&k(o,1)):(o=Te(c),o.c(),k(o,1),o.m(t,n)):o&&(y(),T(o,1,1,()=>{o=null}),w()),u&&u.p&&(!i||m&1024)&&oe(u,r,c,c[10],i?fe(r,c[10],m,null):ue(c[10]),null),(!i||m&1)&&(t.disabled=c[0]),(!i||m&16)&&E(t,"bx--radio-button-group--vertical",c[4]==="vertical"),(!i||m&8)&&E(t,"bx--radio-button-group--label-left",c[3]==="left"),(!i||m&8)&&E(t,"bx--radio-button-group--label-right",c[3]==="right"),O(e,h=ie(d,[(!i||m&32)&&{id:c[5]},m&128&&c[7]])),E(e,"bx--form-item",!0)},i(c){i||(k(o),k(u,c),i=!0)},o(c){T(o),T(u,c),i=!1},d(c){c&&p(e),o&&o.d(),u&&u.d(c),s=!1,ae(a)}}}function vt(l,e,t){const n=["selected","disabled","legendText","hideLegend","labelPosition","orientation","id"];let i=U(e,n),s,{$$slots:a={},$$scope:o}=e;const r=Ve(a);let{selected:u=void 0}=e,{disabled:d=!1}=e,{legendText:h=""}=e,{hideLegend:c=!1}=e,{labelPosition:m="right"}=e,{orientation:v="horizontal"}=e,{id:f=void 0}=e;const b=je(),_=Fe(u);le(l,_,g=>t(16,s=g)),Ce("RadioButtonGroup",{selectedValue:_,add:({checked:g,value:me})=>{g&&_.set(me)},update:g=>{t(9,u=g)}}),Me(()=>{_e(_,s=u,s)}),He(()=>{_e(_,s=u,s)}),_.subscribe(g=>{t(9,u=g),b("change",g)});function N(g){B.call(this,l,g)}function K(g){B.call(this,l,g)}function te(g){B.call(this,l,g)}function ne(g){B.call(this,l,g)}return l.$$set=g=>{e=C(C({},e),se(g)),t(7,i=U(e,n)),"selected"in g&&t(9,u=g.selected),"disabled"in g&&t(0,d=g.disabled),"legendText"in g&&t(1,h=g.legendText),"hideLegend"in g&&t(2,c=g.hideLegend),"labelPosition"in g&&t(3,m=g.labelPosition),"orientation"in g&&t(4,v=g.orientation),"id"in g&&t(5,f=g.id),"$$scope"in g&&t(10,o=g.$$scope)},[d,h,c,m,v,f,_,i,r,u,o,a,N,K,te,ne]}class pt extends W{constructor(e){super(),X(this,e,vt,gt,J,{selected:9,disabled:0,legendText:1,hideLegend:2,labelPosition:3,orientation:4,id:5})}}const kt=pt,Ae="huggingface",Ge=()=>Be({queryFn:()=>fetch("https://datasets-server.huggingface.co/valid").then(l=>l.json()),queryKey:[Ae,"listDatasets"],select:l=>l.valid}),Tt=l=>Be({queryFn:()=>fetch(`https://datasets-server.huggingface.co/splits?dataset=${l}`).then(e=>e.json()),queryKey:[Ae,"getSplits",l],select:e=>e.splits});function Et(l){let e,t,n;function i(a){l[6](a)}let s={invalid:l[1],invalidText:l[2],warn:!l[3],warnText:"Dataset doesn't exist"};return l[0]!==void 0&&(s.value=l[0]),e=new de({props:s}),z.push(()=>$(e,"value",i)),{c(){F(e.$$.fragment)},l(a){A(e.$$.fragment,a)},m(a,o){G(e,a,o),n=!0},p(a,[o]){const r={};o&2&&(r.invalid=a[1]),o&4&&(r.invalidText=a[2]),o&8&&(r.warn=!a[3]),!t&&o&1&&(t=!0,r.value=a[0],ee(()=>t=!1)),e.$set(r)},i(a){n||(k(e.$$.fragment,a),n=!0)},o(a){T(e.$$.fragment,a),n=!1},d(a){R(e,a)}}}function St(l,e,t){let n,i,{value:s}=e,{invalid:a}=e,{invalidText:o}=e;const r=Ge();le(l,r,d=>t(5,i=d));function u(d){s=d,t(0,s)}return l.$$set=d=>{"value"in d&&t(0,s=d.value),"invalid"in d&&t(1,a=d.invalid),"invalidText"in d&&t(2,o=d.invalidText)},l.$$.update=()=>{var d;l.$$.dirty&33&&t(3,n=(d=i.data)==null?void 0:d.includes(s))},[s,a,o,n,r,i,u]}class Ee extends W{constructor(e){super(),X(this,e,St,Et,J,{value:0,invalid:1,invalidText:2})}}function Dt(l){let e,t,n;function i(a){l[11](a)}let s={invalid:l[1],invalidText:l[2],labelText:"Split",placeholder:"(optional)"};return l[0]!==void 0&&(s.value=l[0]),e=new de({props:s}),z.push(()=>$(e,"value",i)),{c(){F(e.$$.fragment)},l(a){A(e.$$.fragment,a)},m(a,o){G(e,a,o),n=!0},p(a,o){const r={};o&2&&(r.invalid=a[1]),o&4&&(r.invalidText=a[2]),!t&&o&1&&(t=!0,r.value=a[0],ee(()=>t=!1)),e.$set(r)},i(a){n||(k(e.$$.fragment,a),n=!0)},o(a){T(e.$$.fragment,a),n=!1},d(a){R(e,a)}}}function It(l){var n,i;let e,t;return e=new ye({props:{value:l[0]||"",invalid:l[1],invalidText:l[2],warn:!l[3],warnText:"Dataset doesn't exist",titleText:"Split",placeholder:"(optional)",items:((i=(n=l[5])==null?void 0:n.data)==null?void 0:i.map(Se))||[]}}),e.$on("select",l[10]),{c(){F(e.$$.fragment)},l(s){A(e.$$.fragment,s)},m(s,a){G(e,s,a),t=!0},p(s,a){var r,u;const o={};a&1&&(o.value=s[0]||""),a&2&&(o.invalid=s[1]),a&4&&(o.invalidText=s[2]),a&8&&(o.warn=!s[3]),a&32&&(o.items=((u=(r=s[5])==null?void 0:r.data)==null?void 0:u.map(Se))||[]),e.$set(o)},i(s){t||(k(e.$$.fragment,s),t=!0)},o(s){T(e.$$.fragment,s),t=!1},d(s){R(e,s)}}}function Pt(l){let e,t,n,i;const s=[It,Dt],a=[];function o(r,u){var d;return(d=r[5])!=null&&d.data&&r[3]?0:1}return e=o(l),t=a[e]=s[e](l),{c(){t.c(),n=Q()},l(r){t.l(r),n=Q()},m(r,u){a[e].m(r,u),L(r,n,u),i=!0},p(r,[u]){let d=e;e=o(r),e===d?a[e].p(r,u):(y(),T(a[d],1,1,()=>{a[d]=null}),w(),t=a[e],t?t.p(r,u):(t=a[e]=s[e](r),t.c()),k(t,1),t.m(n.parentNode,n))},i(r){i||(k(t),i=!0)},o(r){T(t),i=!1},d(r){a[e].d(r),r&&p(n)}}}const Se=l=>({id:l.split,text:l.split});function Lt(l,e,t){let n,i,s,a,o,r=x,u=()=>(r(),r=qe(s,_=>t(5,o=_)),s);l.$$.on_destroy.push(()=>r());let{value:d}=e,{invalid:h}=e,{invalidText:c}=e,{rootValue:m}=e;const v=Ge();le(l,v,_=>t(9,a=_));const f=_=>{var N;return t(0,d=(N=_.detail.selectedItem)==null?void 0:N.id)};function b(_){d=_,t(0,d)}return l.$$set=_=>{"value"in _&&t(0,d=_.value),"invalid"in _&&t(1,h=_.invalid),"invalidText"in _&&t(2,c=_.invalidText),"rootValue"in _&&t(7,m=_.rootValue)},l.$$.update=()=>{var _;l.$$.dirty&128&&t(8,n=m.dataset_name),l.$$.dirty&768&&t(3,i=(_=a.data)==null?void 0:_.includes(n)),l.$$.dirty&264&&u(t(4,s=i?Tt(n):void 0))},[d,h,c,i,s,o,v,m,n,a,f,b]}class De extends W{constructor(e){super(),X(this,e,Lt,Pt,J,{value:0,invalid:1,invalidText:2,rootValue:7})}}function Vt(l){const e=l.slice(),t=e[7].data;return e[17]=t,e}function Ie(l,e,t){const n=l.slice();return n[18]=e[t],n}function qt(l){let e,t,n,i,s,a,o,r,u,d;function h(f){l[11](f)}let c={labelText:"namespace",invalid:!l[0]};l[0]!==void 0&&(c.value=l[0]),t=new de({props:c}),z.push(()=>$(t,"value",h));function m(f){l[12](f)}let v={labelText:"name",invalid:!l[1]};return l[1]!==void 0&&(v.value=l[1]),r=new de({props:v}),z.push(()=>$(r,"value",m)),{c(){e=I("div"),F(t.$$.fragment),i=M(),s=I("span"),a=Y("/"),o=M(),F(r.$$.fragment),this.h()},l(f){e=P(f,"DIV",{class:!0});var b=V(e);A(t.$$.fragment,b),i=H(b),s=P(b,"SPAN",{class:!0});var _=V(s);a=Z(_,"/"),_.forEach(p),o=H(b),A(r.$$.fragment,b),b.forEach(p),this.h()},h(){j(s,"class","mx-4 mt-6 text-lg"),j(e,"class","flex flex-row content-start")},m(f,b){L(f,e,b),G(t,e,null),D(e,i),D(e,s),D(s,a),D(e,o),G(r,e,null),d=!0},p(f,b){const _={};b&1&&(_.invalid=!f[0]),!n&&b&1&&(n=!0,_.value=f[0],ee(()=>n=!1)),t.$set(_);const N={};b&2&&(N.invalid=!f[1]),!u&&b&2&&(u=!0,N.value=f[1],ee(()=>u=!1)),r.$set(N)},i(f){d||(k(t.$$.fragment,f),k(r.$$.fragment,f),d=!0)},o(f){T(t.$$.fragment,f),T(r.$$.fragment,f),d=!1},d(f){f&&p(e),R(t),R(r)}}}function Nt(l){let e,t;return e=new _t({}),{c(){F(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,i){G(e,n,i),t=!0},p:x,i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){R(e,n)}}}function Bt(l){let e,t;return e=new Ne({props:{kind:"error",title:"Error",subtitle:l[6].error.message,hideCloseButton:!0}}),{c(){F(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,i){G(e,n,i),t=!0},p(n,i){const s={};i&64&&(s.subtitle=n[6].error.message),e.$set(s)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){R(e,n)}}}function Ft(l){let e,t,n,i;function s(o){l[13](o)}let a={$$slots:{default:[At]},$$scope:{ctx:l}};return l[2]!==void 0&&(a.selected=l[2]),t=new kt({props:a}),z.push(()=>$(t,"selected",s)),{c(){e=I("div"),F(t.$$.fragment)},l(o){e=P(o,"DIV",{});var r=V(e);A(t.$$.fragment,r),r.forEach(p)},m(o,r){L(o,e,r),G(t,e,null),i=!0},p(o,r){const u={};r&2097216&&(u.$$scope={dirty:r,ctx:o}),!n&&r&4&&(n=!0,u.selected=o[2],ee(()=>n=!1)),t.$set(u)},i(o){i||(k(t.$$.fragment,o),i=!0)},o(o){T(t.$$.fragment,o),i=!1},d(o){o&&p(e),R(t)}}}function Pe(l){let e,t;return e=new nt({props:{labelText:l[18],value:l[18]}}),{c(){F(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,i){G(e,n,i),t=!0},p(n,i){const s={};i&64&&(s.labelText=n[18]),i&64&&(s.value=n[18]),e.$set(s)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){R(e,n)}}}function At(l){let e,t,n=l[6].data.sources,i=[];for(let a=0;a<n.length;a+=1)i[a]=Pe(Ie(l,n,a));const s=a=>T(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;a<i.length;a+=1)i[a].c();e=Q()},l(a){for(let o=0;o<i.length;o+=1)i[o].l(a);e=Q()},m(a,o){for(let r=0;r<i.length;r+=1)i[r]&&i[r].m(a,o);L(a,e,o),t=!0},p(a,o){if(o&64){n=a[6].data.sources;let r;for(r=0;r<n.length;r+=1){const u=Ie(a,n,r);i[r]?(i[r].p(u,o),k(i[r],1)):(i[r]=Pe(u),i[r].c(),k(i[r],1),i[r].m(e.parentNode,e))}for(y(),r=n.length;r<i.length;r+=1)s(r);w()}},i(a){if(!t){for(let o=0;o<n.length;o+=1)k(i[o]);t=!0}},o(a){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)T(i[o]);t=!1},d(a){Ke(i,a),a&&p(e)}}}function Gt(l){let e,t,n,i,s,a;return s=new Xe({}),{c(){e=I("div"),t=I("h3"),n=Y("Schema"),i=M(),F(s.$$.fragment),this.h()},l(o){e=P(o,"DIV",{class:!0});var r=V(e);t=P(r,"H3",{class:!0});var u=V(t);n=Z(u,"Schema"),u.forEach(p),i=H(r),A(s.$$.fragment,r),r.forEach(p),this.h()},h(){j(t,"class","text-lg"),j(e,"class","mt-4")},m(o,r){L(o,e,r),D(e,t),D(t,n),D(e,i),G(s,e,null),a=!0},p:x,i(o){a||(k(s.$$.fragment,o),a=!0)},o(o){T(s.$$.fragment,o),a=!1},d(o){o&&p(e),R(s)}}}function Rt(l){let e,t;return e=new Ne({props:{kind:"error",title:"Error",hideCloseButton:!0,subtitle:l[7].error.message}}),{c(){F(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,i){G(e,n,i),t=!0},p(n,i){const s={};i&128&&(s.subtitle=n[7].error.message),e.$set(s)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){R(e,n)}}}function jt(l){let e=l[2],t,n,i=Le(l);return{c(){i.c(),t=Q()},l(s){i.l(s),t=Q()},m(s,a){i.m(s,a),L(s,t,a),n=!0},p(s,a){a&4&&J(e,e=s[2])?(y(),T(i,1,1,x),w(),i=Le(s),i.c(),k(i,1),i.m(t.parentNode,t)):i.p(s,a)},i(s){n||(k(i),n=!0)},o(s){T(i),n=!1},d(s){s&&p(t),i.d(s)}}}function Le(l){let e,t,n,i;function s(r){l[14](r)}function a(r){l[15](r)}let o={schema:l[17],hiddenProperties:["/source_name"],customComponents:l[2]==="huggingface"?{"/dataset_name":Ee,"/split":De}:{}};return l[4]!==void 0&&(o.value=l[4]),l[3]!==void 0&&(o.validationErrors=l[3]),e=new Ye({props:o}),z.push(()=>$(e,"value",s)),z.push(()=>$(e,"validationErrors",a)),{c(){F(e.$$.fragment)},l(r){A(e.$$.fragment,r)},m(r,u){G(e,r,u),i=!0},p(r,u){const d={};u&128&&(d.schema=r[17]),u&4&&(d.customComponents=r[2]==="huggingface"?{"/dataset_name":Ee,"/split":De}:{}),!t&&u&16&&(t=!0,d.value=r[4],ee(()=>t=!1)),!n&&u&8&&(n=!0,d.validationErrors=r[3],ee(()=>n=!1)),e.$set(d)},i(r){i||(k(e.$$.fragment,r),i=!0)},o(r){T(e.$$.fragment,r),i=!1},d(r){R(e,r)}}}function Ct(l){let e,t,n,i,s,a,o;const r=[Ft,Bt,Nt],u=[];function d(f,b){return f[6].isSuccess?0:f[6].isError?1:f[6].isLoading?2:-1}~(e=d(l))&&(t=u[e]=r[e](l));const h=[jt,Rt,Gt],c=[];function m(f,b){return f[7].isSuccess?0:f[7].isError?1:f[7].isLoading?2:-1}function v(f,b){return b===0?Vt(f):f}return~(i=m(l))&&(s=c[i]=h[i](v(l,i))),{c(){t&&t.c(),n=M(),s&&s.c(),a=Q()},l(f){t&&t.l(f),n=H(f),s&&s.l(f),a=Q()},m(f,b){~e&&u[e].m(f,b),L(f,n,b),~i&&c[i].m(f,b),L(f,a,b),o=!0},p(f,b){let _=e;e=d(f),e===_?~e&&u[e].p(f,b):(t&&(y(),T(u[_],1,1,()=>{u[_]=null}),w()),~e?(t=u[e],t?t.p(f,b):(t=u[e]=r[e](f),t.c()),k(t,1),t.m(n.parentNode,n)):t=null);let N=i;i=m(f),i===N?~i&&c[i].p(v(f,i),b):(s&&(y(),T(c[N],1,1,()=>{c[N]=null}),w()),~i?(s=c[i],s?s.p(v(f,i),b):(s=c[i]=h[i](v(f,i)),s.c()),k(s,1),s.m(a.parentNode,a)):s=null)},i(f){o||(k(t),k(s),o=!0)},o(f){T(t),T(s),o=!1},d(f){~e&&u[e].d(f),f&&p(n),~i&&c[i].d(f),f&&p(a)}}}function Mt(l){let e;return{c(){e=Y("Add")},l(t){e=Z(t,"Add")},m(t,n){L(t,e,n)},d(t){t&&p(e)}}}function Ht(l){var o;let e,t,n,i,s,a;return e=new pe({props:{legendText:"Name",$$slots:{default:[qt]},$$scope:{ctx:l}}}),n=new pe({props:{legendText:"Data Loader",$$slots:{default:[Ct]},$$scope:{ctx:l}}}),s=new Ze({props:{disabled:((o=l[3])==null?void 0:o.length)>0||!l[1]||!l[0],$$slots:{default:[Mt]},$$scope:{ctx:l}}}),s.$on("click",l[10]),{c(){F(e.$$.fragment),t=M(),F(n.$$.fragment),i=M(),F(s.$$.fragment)},l(r){A(e.$$.fragment,r),t=H(r),A(n.$$.fragment,r),i=H(r),A(s.$$.fragment,r)},m(r,u){G(e,r,u),L(r,t,u),G(n,r,u),L(r,i,u),G(s,r,u),a=!0},p(r,u){var m;const d={};u&2097155&&(d.$$scope={dirty:u,ctx:r}),e.$set(d);const h={};u&2097372&&(h.$$scope={dirty:u,ctx:r}),n.$set(h);const c={};u&11&&(c.disabled=((m=r[3])==null?void 0:m.length)>0||!r[1]||!r[0]),u&2097152&&(c.$$scope={dirty:u,ctx:r}),s.$set(c)},i(r){a||(k(e.$$.fragment,r),k(n.$$.fragment,r),k(s.$$.fragment,r),a=!0)},o(r){T(e.$$.fragment,r),T(n.$$.fragment,r),T(s.$$.fragment,r),a=!1},d(r){R(e,r),r&&p(t),R(n,r),r&&p(i),R(s,r)}}}function Kt(l){let e,t,n,i,s,a,o;return a=new rt({props:{class:"pt-8",$$slots:{default:[Ht]},$$scope:{ctx:l}}}),{c(){e=I("div"),t=I("div"),n=I("h2"),i=Y("Add dataset"),s=M(),F(a.$$.fragment),this.h()},l(r){e=P(r,"DIV",{class:!0});var u=V(e);t=P(u,"DIV",{class:!0});var d=V(t);n=P(d,"H2",{});var h=V(n);i=Z(h,"Add dataset"),h.forEach(p),s=H(d),A(a.$$.fragment,d),d.forEach(p),u.forEach(p),this.h()},h(){j(t,"class","mx-auto flex max-w-xl flex-col"),j(e,"class","h-full w-full overflow-y-auto py-8")},m(r,u){L(r,e,u),D(e,t),D(t,n),D(n,i),D(t,s),G(a,t,null),o=!0},p(r,u){const d={};u&2097375&&(d.$$scope={dirty:u,ctx:r}),a.$set(d)},i(r){o||(k(a.$$.fragment,r),o=!0)},o(r){T(a.$$.fragment,r),o=!1},d(r){r&&p(e),R(a)}}}function Ot(l){let e,t;return e=new Oe({props:{title:"Datasets",$$slots:{default:[Kt]},$$scope:{ctx:l}}}),{c(){F(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,i){G(e,n,i),t=!0},p(n,[i]){const s={};i&2097375&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){R(e,n)}}}function Ut(l,e,t){let n,i,s,a,o=x,r=()=>(o(),o=qe(n,g=>t(7,a=g)),n);l.$$.on_destroy.push(()=>o());const u=ze();le(l,u,g=>t(6,s=g));const d=Je();le(l,d,g=>t(16,i=g));let h="local",c="",m="huggingface",v=[],f={};function b(){v.length||i.mutate([m,{namespace:h,dataset_name:c,config:f}],{onSuccess:g=>{we(g.task_id,()=>{Ue(We(h,c))})}})}function _(g){h=g,t(0,h)}function N(g){c=g,t(1,c)}function K(g){m=g,t(2,m)}function te(g){f=g,t(4,f),t(0,h),t(1,c)}function ne(g){v=g,t(3,v)}return l.$$.update=()=>{l.$$.dirty&4&&r(t(5,n=Qe(m))),l.$$.dirty&3&&t(4,f.source_name=`${h}/${c}`,f)},[h,c,m,v,f,n,s,a,u,d,b,_,N,K,te,ne]}class yt extends W{constructor(e){super(),X(this,e,Ut,Ot,J,{})}}export{yt as component};