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