easy_ml 0.2.0.pre.rc75 → 0.2.0.pre.rc77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/frontend/components/dataset/PreprocessingConfig.tsx +2 -2
  3. data/app/models/easy_ml/column/imputers/ordinal_encoder.rb +1 -5
  4. data/app/models/easy_ml/dataset/refresh_reasons.rb +12 -0
  5. data/app/models/easy_ml/dataset.rb +4 -49
  6. data/app/models/easy_ml/datasource.rb +4 -5
  7. data/app/models/easy_ml/feature.rb +16 -36
  8. data/app/serializers/easy_ml/dataset_serializer.rb +1 -1
  9. data/lib/easy_ml/data/dataset_manager/normalizer.rb +0 -0
  10. data/lib/easy_ml/data/dataset_manager/reader/base.rb +80 -0
  11. data/lib/easy_ml/data/dataset_manager/reader/batch.rb +106 -0
  12. data/lib/easy_ml/data/dataset_manager/reader/data_frame.rb +23 -0
  13. data/lib/easy_ml/data/dataset_manager/reader/file.rb +75 -0
  14. data/lib/easy_ml/data/dataset_manager/reader.rb +58 -0
  15. data/lib/easy_ml/data/dataset_manager/writer/append_only.rb +67 -0
  16. data/lib/easy_ml/data/dataset_manager/writer/base.rb +122 -0
  17. data/lib/easy_ml/data/dataset_manager/writer/named.rb +14 -0
  18. data/lib/easy_ml/data/dataset_manager/writer/partitioned/partition_reasons.rb +15 -0
  19. data/lib/easy_ml/data/dataset_manager/writer/partitioned.rb +150 -0
  20. data/lib/easy_ml/data/dataset_manager/writer.rb +76 -0
  21. data/lib/easy_ml/data/dataset_manager.rb +134 -0
  22. data/lib/easy_ml/data/partition/boundaries.rb +60 -0
  23. data/lib/easy_ml/data/partition.rb +7 -0
  24. data/lib/easy_ml/data/synced_directory.rb +1 -2
  25. data/lib/easy_ml/data.rb +2 -0
  26. data/lib/easy_ml/feature_store.rb +15 -185
  27. data/lib/easy_ml/reasons.rb +41 -0
  28. data/lib/easy_ml/version.rb +1 -1
  29. data/lib/easy_ml.rb +1 -1
  30. data/public/easy_ml/assets/.vite/manifest.json +2 -2
  31. data/public/easy_ml/assets/assets/Application-nnn_XLuL.css +1 -0
  32. data/public/easy_ml/assets/assets/entrypoints/{Application.tsx-Rrzo4ecT.js → Application.tsx-B1qLZuyu.js} +2 -2
  33. data/public/easy_ml/assets/assets/entrypoints/{Application.tsx-Rrzo4ecT.js.map → Application.tsx-B1qLZuyu.js.map} +1 -1
  34. metadata +23 -7
  35. data/lib/easy_ml/data/filter_extensions.rb +0 -31
  36. data/public/easy_ml/assets/assets/Application-Q7L6ioxr.css +0 -1
  37. /data/app/models/{lineage_history.rb → easy_ml/lineage_history.rb} +0 -0
@@ -444,7 +444,7 @@ __p += '`),Be&&(J+=`' +
444
444
  function print() { __p += __j.call(arguments, '') }
445
445
  `:`;
446
446
  `)+J+`return __p
447
- }`;var Le=yv(function(){return Ve(C,me+"return "+J).apply(n,P)});if(Le.source=J,Af(Le))throw Le;return Le}function m4(i){return Ge(i).toLowerCase()}function h4(i){return Ge(i).toUpperCase()}function g4(i,s,u){if(i=Ge(i),i&&(u||s===n))return E0(i);if(!i||!(s=Gn(s)))return i;var f=_r(i),v=_r(s),C=A0(f,v),P=P0(f,v)+1;return Ii(f,C,P).join("")}function x4(i,s,u){if(i=Ge(i),i&&(u||s===n))return i.slice(0,O0(i)+1);if(!i||!(s=Gn(s)))return i;var f=_r(i),v=P0(f,_r(s))+1;return Ii(f,0,v).join("")}function v4(i,s,u){if(i=Ge(i),i&&(u||s===n))return i.replace(So,"");if(!i||!(s=Gn(s)))return i;var f=_r(i),v=A0(f,_r(s));return Ii(f,v).join("")}function y4(i,s){var u=H,f=ce;if(_t(s)){var v="separator"in s?s.separator:v;u="length"in s?Re(s.length):u,f="omission"in s?Gn(s.omission):f}i=Ge(i);var C=i.length;if(cs(i)){var P=_r(i);C=P.length}if(u>=C)return i;var O=u-us(f);if(O<1)return f;var M=P?Ii(P,0,O).join(""):i.slice(0,O);if(v===n)return M+f;if(P&&(O+=M.length-O),Pf(v)){if(i.slice(O).search(v)){var V,G=M;for(v.global||(v=qp(v.source,Ge(ir.exec(v))+"g")),v.lastIndex=0;V=v.exec(G);)var J=V.index;M=M.slice(0,J===n?O:J)}}else if(i.indexOf(Gn(v),O)!=O){var ie=M.lastIndexOf(v);ie>-1&&(M=M.slice(0,ie))}return M+f}function b4(i){return i=Ge(i),i&&bo.test(i)?i.replace(oc,Q2):i}var w4=xs(function(i,s,u){return i+(u?" ":"")+s.toUpperCase()}),Rf=bx("toUpperCase");function vv(i,s,u){return i=Ge(i),s=u?n:s,s===n?H2(i)?J2(i):L2(i):i.match(s)||[]}var yv=Me(function(i,s){try{return Vt(i,n,s)}catch(u){return Af(u)?u:new ke(u)}}),_4=si(function(i,s){return sr(s,function(u){u=Ur(u),ii(i,u,Cf(i[u],i))}),i});function j4(i){var s=i==null?0:i.length,u=ye();return i=s?bt(i,function(f){if(typeof f[1]!="function")throw new or(c);return[u(f[0]),f[1]]}):[],Me(function(f){for(var v=-1;++v<s;){var C=i[v];if(Vt(C[0],this,f))return Vt(C[1],this,f)}})}function S4(i){return QS(cr(i,g))}function If(i){return function(){return i}}function N4(i,s){return i==null||i!==i?s:i}var k4=_x(),C4=_x(!0);function Tn(i){return i}function Lf(i){return J0(typeof i=="function"?i:cr(i,g))}function E4(i){return ex(cr(i,g))}function A4(i,s){return tx(i,cr(s,g))}var P4=Me(function(i,s){return function(u){return Fo(u,i,s)}}),T4=Me(function(i,s){return function(u){return Fo(i,u,s)}});function Mf(i,s,u){var f=Gt(s),v=Kc(s,f);u==null&&!(_t(s)&&(v.length||!f.length))&&(u=s,s=i,i=this,v=Kc(s,Gt(s)));var C=!(_t(u)&&"chain"in u)||!!u.chain,P=li(i);return sr(v,function(O){var M=s[O];i[O]=M,P&&(i.prototype[O]=function(){var V=this.__chain__;if(C||V){var G=i(this.__wrapped__),J=G.__actions__=En(this.__actions__);return J.push({func:M,args:arguments,thisArg:i}),G.__chain__=V,G}return M.apply(i,Ei([this.value()],arguments))})}),i}function O4(){return Ue._===this&&(Ue._=iS),this}function Df(){}function R4(i){return i=Re(i),Me(function(s){return nx(s,i)})}var I4=mf(bt),L4=mf(j0),M4=mf(Fp);function bv(i){return wf(i)?zp(Ur(i)):pN(i)}function D4(i){return function(s){return i==null?n:Sa(i,s)}}var F4=Sx(),z4=Sx(!0);function Ff(){return[]}function zf(){return!1}function $4(){return{}}function U4(){return""}function B4(){return!0}function W4(i,s){if(i=Re(i),i<1||i>K)return[];var u=pe,f=rn(i,pe);s=ye(s),i-=pe;for(var v=Bp(f,s);++u<i;)s(u);return v}function H4(i){return Pe(i)?bt(i,Ur):Kn(i)?[i]:En($x(Ge(i)))}function q4(i){var s=++nS;return Ge(i)+s}var V4=eu(function(i,s){return i+s},0),G4=hf("ceil"),K4=eu(function(i,s){return i/s},1),Q4=hf("floor");function X4(i){return i&&i.length?Gc(i,Tn,Zp):n}function Y4(i,s){return i&&i.length?Gc(i,ye(s,2),Zp):n}function J4(i){return k0(i,Tn)}function Z4(i,s){return k0(i,ye(s,2))}function e3(i){return i&&i.length?Gc(i,Tn,rf):n}function t3(i,s){return i&&i.length?Gc(i,ye(s,2),rf):n}var n3=eu(function(i,s){return i*s},1),r3=hf("round"),i3=eu(function(i,s){return i-s},0);function a3(i){return i&&i.length?Up(i,Tn):0}function s3(i,s){return i&&i.length?Up(i,ye(s,2)):0}return S.after=EC,S.ary=Yx,S.assign=hE,S.assignIn=dv,S.assignInWith=fu,S.assignWith=gE,S.at=xE,S.before=Jx,S.bind=Cf,S.bindAll=_4,S.bindKey=Zx,S.castArray=$C,S.chain=Kx,S.chunk=QN,S.compact=XN,S.concat=YN,S.cond=j4,S.conforms=S4,S.constant=If,S.countBy=aC,S.create=vE,S.curry=ev,S.curryRight=tv,S.debounce=nv,S.defaults=yE,S.defaultsDeep=bE,S.defer=AC,S.delay=PC,S.difference=JN,S.differenceBy=ZN,S.differenceWith=ek,S.drop=tk,S.dropRight=nk,S.dropRightWhile=rk,S.dropWhile=ik,S.fill=ak,S.filter=oC,S.flatMap=uC,S.flatMapDeep=dC,S.flatMapDepth=pC,S.flatten=Hx,S.flattenDeep=sk,S.flattenDepth=ok,S.flip=TC,S.flow=k4,S.flowRight=C4,S.fromPairs=lk,S.functions=CE,S.functionsIn=EE,S.groupBy=fC,S.initial=uk,S.intersection=dk,S.intersectionBy=pk,S.intersectionWith=fk,S.invert=PE,S.invertBy=TE,S.invokeMap=hC,S.iteratee=Lf,S.keyBy=gC,S.keys=Gt,S.keysIn=Pn,S.map=ou,S.mapKeys=RE,S.mapValues=IE,S.matches=E4,S.matchesProperty=A4,S.memoize=cu,S.merge=LE,S.mergeWith=pv,S.method=P4,S.methodOf=T4,S.mixin=Mf,S.negate=uu,S.nthArg=R4,S.omit=ME,S.omitBy=DE,S.once=OC,S.orderBy=xC,S.over=I4,S.overArgs=RC,S.overEvery=L4,S.overSome=M4,S.partial=Ef,S.partialRight=rv,S.partition=vC,S.pick=FE,S.pickBy=fv,S.property=bv,S.propertyOf=D4,S.pull=xk,S.pullAll=Vx,S.pullAllBy=vk,S.pullAllWith=yk,S.pullAt=bk,S.range=F4,S.rangeRight=z4,S.rearg=IC,S.reject=wC,S.remove=wk,S.rest=LC,S.reverse=Nf,S.sampleSize=jC,S.set=$E,S.setWith=UE,S.shuffle=SC,S.slice=_k,S.sortBy=CC,S.sortedUniq=Ak,S.sortedUniqBy=Pk,S.split=u4,S.spread=MC,S.tail=Tk,S.take=Ok,S.takeRight=Rk,S.takeRightWhile=Ik,S.takeWhile=Lk,S.tap=Xk,S.throttle=DC,S.thru=su,S.toArray=lv,S.toPairs=mv,S.toPairsIn=hv,S.toPath=H4,S.toPlainObject=uv,S.transform=BE,S.unary=FC,S.union=Mk,S.unionBy=Dk,S.unionWith=Fk,S.uniq=zk,S.uniqBy=$k,S.uniqWith=Uk,S.unset=WE,S.unzip=kf,S.unzipWith=Gx,S.update=HE,S.updateWith=qE,S.values=bs,S.valuesIn=VE,S.without=Bk,S.words=vv,S.wrap=zC,S.xor=Wk,S.xorBy=Hk,S.xorWith=qk,S.zip=Vk,S.zipObject=Gk,S.zipObjectDeep=Kk,S.zipWith=Qk,S.entries=mv,S.entriesIn=hv,S.extend=dv,S.extendWith=fu,Mf(S,S),S.add=V4,S.attempt=yv,S.camelCase=XE,S.capitalize=gv,S.ceil=G4,S.clamp=GE,S.clone=UC,S.cloneDeep=WC,S.cloneDeepWith=HC,S.cloneWith=BC,S.conformsTo=qC,S.deburr=xv,S.defaultTo=N4,S.divide=K4,S.endsWith=YE,S.eq=Sr,S.escape=JE,S.escapeRegExp=ZE,S.every=sC,S.find=lC,S.findIndex=Bx,S.findKey=wE,S.findLast=cC,S.findLastIndex=Wx,S.findLastKey=_E,S.floor=Q4,S.forEach=Qx,S.forEachRight=Xx,S.forIn=jE,S.forInRight=SE,S.forOwn=NE,S.forOwnRight=kE,S.get=Tf,S.gt=VC,S.gte=GC,S.has=AE,S.hasIn=Of,S.head=qx,S.identity=Tn,S.includes=mC,S.indexOf=ck,S.inRange=KE,S.invoke=OE,S.isArguments=Ca,S.isArray=Pe,S.isArrayBuffer=KC,S.isArrayLike=An,S.isArrayLikeObject=Ot,S.isBoolean=QC,S.isBuffer=Li,S.isDate=XC,S.isElement=YC,S.isEmpty=JC,S.isEqual=ZC,S.isEqualWith=eE,S.isError=Af,S.isFinite=tE,S.isFunction=li,S.isInteger=iv,S.isLength=du,S.isMap=av,S.isMatch=nE,S.isMatchWith=rE,S.isNaN=iE,S.isNative=aE,S.isNil=oE,S.isNull=sE,S.isNumber=sv,S.isObject=_t,S.isObjectLike=Ct,S.isPlainObject=Ho,S.isRegExp=Pf,S.isSafeInteger=lE,S.isSet=ov,S.isString=pu,S.isSymbol=Kn,S.isTypedArray=ys,S.isUndefined=cE,S.isWeakMap=uE,S.isWeakSet=dE,S.join=mk,S.kebabCase=e4,S.last=dr,S.lastIndexOf=hk,S.lowerCase=t4,S.lowerFirst=n4,S.lt=pE,S.lte=fE,S.max=X4,S.maxBy=Y4,S.mean=J4,S.meanBy=Z4,S.min=e3,S.minBy=t3,S.stubArray=Ff,S.stubFalse=zf,S.stubObject=$4,S.stubString=U4,S.stubTrue=B4,S.multiply=n3,S.nth=gk,S.noConflict=O4,S.noop=Df,S.now=lu,S.pad=r4,S.padEnd=i4,S.padStart=a4,S.parseInt=s4,S.random=QE,S.reduce=yC,S.reduceRight=bC,S.repeat=o4,S.replace=l4,S.result=zE,S.round=r3,S.runInContext=I,S.sample=_C,S.size=NC,S.snakeCase=c4,S.some=kC,S.sortedIndex=jk,S.sortedIndexBy=Sk,S.sortedIndexOf=Nk,S.sortedLastIndex=kk,S.sortedLastIndexBy=Ck,S.sortedLastIndexOf=Ek,S.startCase=d4,S.startsWith=p4,S.subtract=i3,S.sum=a3,S.sumBy=s3,S.template=f4,S.times=W4,S.toFinite=ci,S.toInteger=Re,S.toLength=cv,S.toLower=m4,S.toNumber=pr,S.toSafeInteger=mE,S.toString=Ge,S.toUpper=h4,S.trim=g4,S.trimEnd=x4,S.trimStart=v4,S.truncate=y4,S.unescape=b4,S.uniqueId=q4,S.upperCase=w4,S.upperFirst=Rf,S.each=Qx,S.eachRight=Xx,S.first=qx,Mf(S,function(){var i={};return zr(S,function(s,u){Qe.call(S.prototype,u)||(i[u]=s)}),i}(),{chain:!1}),S.VERSION=r,sr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){S[i].placeholder=S}),sr(["drop","take"],function(i,s){ze.prototype[i]=function(u){u=u===n?1:$t(Re(u),0);var f=this.__filtered__&&!s?new ze(this):this.clone();return f.__filtered__?f.__takeCount__=rn(u,f.__takeCount__):f.__views__.push({size:rn(u,pe),type:i+(f.__dir__<0?"Right":"")}),f},ze.prototype[i+"Right"]=function(u){return this.reverse()[i](u).reverse()}}),sr(["filter","map","takeWhile"],function(i,s){var u=s+1,f=u==ve||u==fe;ze.prototype[i]=function(v){var C=this.clone();return C.__iteratees__.push({iteratee:ye(v,3),type:u}),C.__filtered__=C.__filtered__||f,C}}),sr(["head","last"],function(i,s){var u="take"+(s?"Right":"");ze.prototype[i]=function(){return this[u](1).value()[0]}}),sr(["initial","tail"],function(i,s){var u="drop"+(s?"":"Right");ze.prototype[i]=function(){return this.__filtered__?new ze(this):this[u](1)}}),ze.prototype.compact=function(){return this.filter(Tn)},ze.prototype.find=function(i){return this.filter(i).head()},ze.prototype.findLast=function(i){return this.reverse().find(i)},ze.prototype.invokeMap=Me(function(i,s){return typeof i=="function"?new ze(this):this.map(function(u){return Fo(u,i,s)})}),ze.prototype.reject=function(i){return this.filter(uu(ye(i)))},ze.prototype.slice=function(i,s){i=Re(i);var u=this;return u.__filtered__&&(i>0||s<0)?new ze(u):(i<0?u=u.takeRight(-i):i&&(u=u.drop(i)),s!==n&&(s=Re(s),u=s<0?u.dropRight(-s):u.take(s-i)),u)},ze.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},ze.prototype.toArray=function(){return this.take(pe)},zr(ze.prototype,function(i,s){var u=/^(?:filter|find|map|reject)|While$/.test(s),f=/^(?:head|last)$/.test(s),v=S[f?"take"+(s=="last"?"Right":""):s],C=f||/^find/.test(s);v&&(S.prototype[s]=function(){var P=this.__wrapped__,O=f?[1]:arguments,M=P instanceof ze,V=O[0],G=M||Pe(P),J=function(De){var Be=v.apply(S,Ei([De],O));return f&&ie?Be[0]:Be};G&&u&&typeof V=="function"&&V.length!=1&&(M=G=!1);var ie=this.__chain__,me=!!this.__actions__.length,_e=C&&!ie,Le=M&&!me;if(!C&&G){P=Le?P:new ze(this);var je=i.apply(P,O);return je.__actions__.push({func:su,args:[J],thisArg:n}),new lr(je,ie)}return _e&&Le?i.apply(this,O):(je=this.thru(J),_e?f?je.value()[0]:je.value():je)})}),sr(["pop","push","shift","sort","splice","unshift"],function(i){var s=Oc[i],u=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",f=/^(?:pop|shift)$/.test(i);S.prototype[i]=function(){var v=arguments;if(f&&!this.__chain__){var C=this.value();return s.apply(Pe(C)?C:[],v)}return this[u](function(P){return s.apply(Pe(P)?P:[],v)})}}),zr(ze.prototype,function(i,s){var u=S[s];if(u){var f=u.name+"";Qe.call(ms,f)||(ms[f]=[]),ms[f].push({name:s,func:u})}}),ms[Zc(n,b).name]=[{name:"wrapper",func:n}],ze.prototype.clone=bS,ze.prototype.reverse=wS,ze.prototype.value=_S,S.prototype.at=Yk,S.prototype.chain=Jk,S.prototype.commit=Zk,S.prototype.next=eC,S.prototype.plant=nC,S.prototype.reverse=rC,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=iC,S.prototype.first=S.prototype.head,To&&(S.prototype[To]=tC),S},ds=Z2();Tt?((Tt.exports=ds)._=ds,at._=ds):Ue._=ds}).call(cn)})(ld,ld.exports);var Bt=ld.exports;const Qo=6;function PO({dataset:e}){const[t,n]=E.useState(!1),[r,a]=E.useState(1),l=e.sample_data[0]?Object.keys(e.sample_data[0]):[],c=Math.ceil(e.columns.length/Qo),d=e.columns.slice((r-1)*Qo,r*Qo);return o.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6",children:[o.jsxs("div",{className:"flex items-start justify-between mb-6",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(un,{className:"w-5 h-5 text-blue-600"}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:e.name})]}),o.jsx("p",{className:"text-gray-600 mt-1",children:e.description}),o.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:[e.num_rows.toLocaleString()," rows • ",o.jsx("span",{className:"font-medium",children:"Raw:"})," ",e.columns.length," columns • ",o.jsx("span",{className:"font-medium",children:"Processed:"})," ",l.length," columns • Last synced"," ",new Date(e.updated_at).toLocaleDateString()]})]}),o.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1 text-blue-600 hover:text-blue-800",children:[o.jsx(uO,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm font-medium",children:t?"Hide Statistics":"Show Statistics"}),t?o.jsx(Yl,{className:"w-4 h-4"}):o.jsx(mo,{className:"w-4 h-4"})]})]}),o.jsxs("div",{className:"space-y-6",children:[t&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(p=>o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2 gap-2",children:[o.jsx("h4",{className:"font-medium text-gray-900 break-normal max-w-[70%] word-break:break-word overflow-wrap:anywhere whitespace-pre-wrap",children:p.name.split("_").join("_​")}),o.jsx("span",{className:"text-xs font-medium text-gray-500 px-2 py-1 bg-gray-200 rounded-full flex-shrink-0",children:p.datatype})]}),o.jsx("p",{className:"text-sm text-gray-600 mb-3",children:p.description}),p.statistics&&o.jsx("div",{className:"space-y-1",children:Object.entries(p.statistics.raw).map(([m,h])=>{if(m==="counts"||m==="allowed_categories"||m==="value"||m==="label_encoder"||m==="label_decoder"||h===null||h===void 0)return null;let g;return typeof h=="number"?g=h.toLocaleString(void 0,{maximumFractionDigits:2}):typeof h=="object"?g=JSON.stringify(h):typeof h=="boolean"?g=h.toString():g=String(h),g.length>50&&(g=g.slice(0,47)+"..."),o.jsxs("div",{className:"flex justify-between text-sm gap-2",children:[o.jsxs("span",{className:"text-gray-500 flex-shrink-0",children:[m.charAt(0).toUpperCase()+m.slice(1),":"]}),o.jsx("span",{className:"font-medium text-gray-900 text-right break-all",children:g})]},m)})})]},p.name))}),c>1&&o.jsxs("div",{className:"flex items-center justify-between border-t pt-4",children:[o.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",(r-1)*Qo+1," to ",Math.min(r*Qo,e.columns.length)," of ",e.columns.length," columns"]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>a(p=>Math.max(1,p-1)),disabled:r===1,className:"p-1 rounded-md hover:bg-gray-100 disabled:opacity-50",children:o.jsx(qd,{className:"w-5 h-5"})}),o.jsxs("span",{className:"text-sm text-gray-600",children:["Page ",r," of ",c]}),o.jsx("button",{onClick:()=>a(p=>Math.min(c,p+1)),disabled:r===c,className:"p-1 rounded-md hover:bg-gray-100 disabled:opacity-50",children:o.jsx(Js,{className:"w-5 h-5"})})]})]})]}),o.jsx("div",{className:"overflow-x-auto",children:o.jsx("div",{className:"inline-block min-w-full align-middle",children:o.jsx("div",{className:"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5 rounded-lg",children:o.jsxs("table",{className:"min-w-full divide-y divide-gray-300",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsx("tr",{children:l.map(p=>o.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900",children:p},p))})}),o.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:e.sample_data.map((p,m)=>o.jsx("tr",{children:l.map(h=>o.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:p[h]===null||p[h]===void 0?"":typeof p[h]=="object"?JSON.stringify(p[h]):String(p[h])},`${m}-${h}`))},m))})]})})})})]})]})}function ww(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ww(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function TO(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ww(e))&&(r&&(r+=" "),r+=t);return r}const gy=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,xy=TO,OO=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:l}=t,c=Object.keys(a).map(m=>{const h=n==null?void 0:n[m],g=l==null?void 0:l[m];if(h===null)return null;const x=gy(h)||gy(g);return a[m][x]}),d=n&&Object.entries(n).reduce((m,h)=>{let[g,x]=h;return x===void 0||(m[g]=x),m},{}),p=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((m,h)=>{let{class:g,className:x,...j}=h;return Object.entries(j).every(y=>{let[_,N]=y;return Array.isArray(N)?N.includes({...l,...d}[_]):{...l,...d}[_]===N})?[...m,g,x]:m},[]);return xy(e,c,p,n==null?void 0:n.class,n==null?void 0:n.className)};function _w(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=_w(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function RO(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=_w(e))&&(r&&(r+=" "),r+=t);return r}const wg="-",IO=e=>{const t=MO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const d=c.split(wg);return d[0]===""&&d.length!==1&&d.shift(),jw(d,t)||LO(c)},getConflictingClassGroupIds:(c,d)=>{const p=n[c]||[];return d&&r[c]?[...p,...r[c]]:p}}},jw=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?jw(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const l=e.join(wg);return(c=t.validators.find(({validator:d})=>d(l)))==null?void 0:c.classGroupId},vy=/^\[(.+)\]$/,LO=e=>{if(vy.test(e)){const t=vy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},MO=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return FO(Object.entries(e.classGroups),n).forEach(([l,c])=>{th(c,r,l,t)}),r},th=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const l=a===""?t:yy(t,a);l.classGroupId=n;return}if(typeof a=="function"){if(DO(a)){th(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([l,c])=>{th(c,yy(t,l),n,r)})})},yy=(e,t)=>{let n=e;return t.split(wg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},DO=e=>e.isThemeGetter,FO=(e,t)=>t?e.map(([n,r])=>{const a=r.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,d])=>[t+c,d])):l);return[n,a]}):e,zO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(l,c)=>{n.set(l,c),t++,t>e&&(t=0,r=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=r.get(l))!==void 0)return a(l,c),c},set(l,c){n.has(l)?n.set(l,c):a(l,c)}}},Sw="!",$O=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],l=t.length,c=d=>{const p=[];let m=0,h=0,g;for(let N=0;N<d.length;N++){let b=d[N];if(m===0){if(b===a&&(r||d.slice(N,N+l)===t)){p.push(d.slice(h,N)),h=N+l;continue}if(b==="/"){g=N;continue}}b==="["?m++:b==="]"&&m--}const x=p.length===0?d:d.substring(h),j=x.startsWith(Sw),y=j?x.substring(1):x,_=g&&g>h?g-h:void 0;return{modifiers:p,hasImportantModifier:j,baseClassName:y,maybePostfixModifierPosition:_}};return n?d=>n({className:d,parseClassName:c}):c},UO=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},BO=e=>({cache:zO(e.cacheSize),parseClassName:$O(e),...IO(e)}),WO=/\s+/,HO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,l=[],c=e.trim().split(WO);let d="";for(let p=c.length-1;p>=0;p-=1){const m=c[p],{modifiers:h,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:j}=n(m);let y=!!j,_=r(y?x.substring(0,j):x);if(!_){if(!y){d=m+(d.length>0?" "+d:d);continue}if(_=r(x),!_){d=m+(d.length>0?" "+d:d);continue}y=!1}const N=UO(h).join(":"),b=g?N+Sw:N,w=b+_;if(l.includes(w))continue;l.push(w);const k=a(_,y);for(let R=0;R<k.length;++R){const D=k[R];l.push(b+D)}d=m+(d.length>0?" "+d:d)}return d};function qO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Nw(t))&&(r&&(r+=" "),r+=n);return r}const Nw=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Nw(e[r]))&&(n&&(n+=" "),n+=t);return n};function VO(e,...t){let n,r,a,l=c;function c(p){const m=t.reduce((h,g)=>g(h),e());return n=BO(m),r=n.cache.get,a=n.cache.set,l=d,d(p)}function d(p){const m=r(p);if(m)return m;const h=HO(p,n);return a(p,h),h}return function(){return l(qO.apply(null,arguments))}}const mt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kw=/^\[(?:([a-z-]+):)?(.+)\]$/i,GO=/^\d+\/\d+$/,KO=new Set(["px","full","screen"]),QO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,YO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,JO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pi=e=>$s(e)||KO.has(e)||GO.test(e),Di=e=>go(e,"length",oR),$s=e=>!!e&&!Number.isNaN(Number(e)),rm=e=>go(e,"number",$s),Xo=e=>!!e&&Number.isInteger(Number(e)),eR=e=>e.endsWith("%")&&$s(e.slice(0,-1)),Ie=e=>kw.test(e),Fi=e=>QO.test(e),tR=new Set(["length","size","percentage"]),nR=e=>go(e,tR,Cw),rR=e=>go(e,"position",Cw),iR=new Set(["image","url"]),aR=e=>go(e,iR,cR),sR=e=>go(e,"",lR),Yo=()=>!0,go=(e,t,n)=>{const r=kw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},oR=e=>XO.test(e)&&!YO.test(e),Cw=()=>!1,lR=e=>JO.test(e),cR=e=>ZO.test(e),uR=()=>{const e=mt("colors"),t=mt("spacing"),n=mt("blur"),r=mt("brightness"),a=mt("borderColor"),l=mt("borderRadius"),c=mt("borderSpacing"),d=mt("borderWidth"),p=mt("contrast"),m=mt("grayscale"),h=mt("hueRotate"),g=mt("invert"),x=mt("gap"),j=mt("gradientColorStops"),y=mt("gradientColorStopPositions"),_=mt("inset"),N=mt("margin"),b=mt("opacity"),w=mt("padding"),k=mt("saturate"),R=mt("scale"),D=mt("sepia"),T=mt("skew"),z=mt("space"),F=mt("translate"),W=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],ce=()=>["auto",Ie,t],se=()=>[Ie,t],be=()=>["",pi,Di],ve=()=>["auto",$s,Ie],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],fe=()=>["solid","dashed","dotted","double","none"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Ie],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],pe=()=>[$s,Ie];return{cacheSize:500,separator:":",theme:{colors:[Yo],spacing:[pi,Di],blur:["none","",Fi,Ie],brightness:pe(),borderColor:[e],borderRadius:["none","","full",Fi,Ie],borderSpacing:se(),borderWidth:be(),contrast:pe(),grayscale:ne(),hueRotate:pe(),invert:ne(),gap:se(),gradientColorStops:[e],gradientColorStopPositions:[eR,Di],inset:ce(),margin:ce(),opacity:pe(),padding:se(),saturate:pe(),scale:pe(),sepia:ne(),skew:pe(),space:se(),translate:se()},classGroups:{aspect:[{aspect:["auto","square","video",Ie]}],container:["container"],columns:[{columns:[Fi]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),Ie]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Xo,Ie]}],basis:[{basis:ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ie]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",Xo,Ie]}],"grid-cols":[{"grid-cols":[Yo]}],"col-start-end":[{col:["auto",{span:["full",Xo,Ie]},Ie]}],"col-start":[{"col-start":ve()}],"col-end":[{"col-end":ve()}],"grid-rows":[{"grid-rows":[Yo]}],"row-start-end":[{row:["auto",{span:[Xo,Ie]},Ie]}],"row-start":[{"row-start":ve()}],"row-end":[{"row-end":ve()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ie]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ie,t]}],"min-w":[{"min-w":[Ie,t,"min","max","fit"]}],"max-w":[{"max-w":[Ie,t,"none","full","min","max","fit","prose",{screen:[Fi]},Fi]}],h:[{h:[Ie,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ie,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fi,Di]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rm]}],"font-family":[{font:[Yo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ie]}],"line-clamp":[{"line-clamp":["none",$s,rm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pi,Ie]}],"list-image":[{"list-image":["none",Ie]}],"list-style-type":[{list:["none","disc","decimal",Ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pi,Di]}],"underline-offset":[{"underline-offset":["auto",pi,Ie]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:se()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),rR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},aR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[j]}],"gradient-via":[{via:[j]}],"gradient-to":[{to:[j]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...fe(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:fe()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...fe()]}],"outline-offset":[{"outline-offset":[pi,Ie]}],"outline-w":[{outline:[pi,Di]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[pi,Di]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fi,sR]}],"shadow-color":[{shadow:[Yo]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...ae(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ae()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",Fi,Ie]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[k]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ie]}],duration:[{duration:pe()}],ease:[{ease:["linear","in","out","in-out",Ie]}],delay:[{delay:pe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[Xo,Ie]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ie]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ie]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":se()}],"scroll-mx":[{"scroll-mx":se()}],"scroll-my":[{"scroll-my":se()}],"scroll-ms":[{"scroll-ms":se()}],"scroll-me":[{"scroll-me":se()}],"scroll-mt":[{"scroll-mt":se()}],"scroll-mr":[{"scroll-mr":se()}],"scroll-mb":[{"scroll-mb":se()}],"scroll-ml":[{"scroll-ml":se()}],"scroll-p":[{"scroll-p":se()}],"scroll-px":[{"scroll-px":se()}],"scroll-py":[{"scroll-py":se()}],"scroll-ps":[{"scroll-ps":se()}],"scroll-pe":[{"scroll-pe":se()}],"scroll-pt":[{"scroll-pt":se()}],"scroll-pr":[{"scroll-pr":se()}],"scroll-pb":[{"scroll-pb":se()}],"scroll-pl":[{"scroll-pl":se()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ie]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[pi,Di,rm]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},dR=VO(uR);function Pr(...e){return dR(RO(e))}const pR=OO("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",information:"border-transparent bg-blue-100 text-blue-800 hover:bg-blue-600",important:"border-transparent bg-red-100 text-red-800 hover:bg-red-600",warning:"border-transparent bg-yellow-100 text-yellow-800 hover:bg-yellow-600",success:"border-transparent bg-green-100 text-green-800 hover:bg-green-600"}},defaultVariants:{variant:"default"}});function Ia({className:e,variant:t,...n}){return o.jsx("div",{className:Pr(pR({variant:t}),e),...n})}const by=e=>e==="float"||e==="integer",vu=e=>{var t,n,r,a,l;return{method:(e==null?void 0:e.method)||"none",params:{constant:(t=e==null?void 0:e.params)==null?void 0:t.constant,categorical_min:((n=e==null?void 0:e.params)==null?void 0:n.categorical_min)??100,one_hot:((r=e==null?void 0:e.params)==null?void 0:r.one_hot)??!0,ordinal_encoding:((a=e==null?void 0:e.params)==null?void 0:a.ordinal_encoding)??!1,clip:(l=e==null?void 0:e.params)==null?void 0:l.clip}}};function fR({column:e,dataset:t,setColumnType:n,setDataset:r,constants:a,onUpdate:l}){var ve,U,fe,ae,K,ne,te,pe,Oe,dt,Je,Q,we,Ce,Ne,Y,de,xe,He,nn,Ke,fn,Bn,vt,Yt,yt,qt,Pt,mn,Nn,re,ge,tt,qe,nt,hn;const[c,d]=E.useState(!!((U=(ve=e.preprocessing_steps)==null?void 0:ve.inference)!=null&&U.method&&e.preprocessing_steps.inference.method!=="none")),p=e.datatype,[m,h]=E.useState(()=>{var ee;return vu((ee=e.preprocessing_steps)==null?void 0:ee.training)}),[g,x]=E.useState(()=>{var ee;return vu((ee=e.preprocessing_steps)==null?void 0:ee.inference)});E.useEffect(()=>{var ee,Ee;h(vu((ee=e.preprocessing_steps)==null?void 0:ee.training)),x(vu((Ee=e.preprocessing_steps)==null?void 0:Ee.inference))},[e.id]);const j=(ee,Ee)=>{let Se={};p==="categorical"&&(Ee==="categorical"?Se={...Se,categorical_min:100,one_hot:!0}:Ee!="none"&&(Se={...Se,one_hot:!0})),e.is_target&&(Se={...Se,ordinal_encoding:!0});const lt={method:Ee,params:Se};ee==="training"?(h(lt),l(lt,c?g:void 0,c)):(x(lt),l(m,lt,c))},y=(ee,Ee)=>{const Se=m,lt=h,Ze={...Se,params:{categorical_min:Se.params.categorical_min,one_hot:Se.params.one_hot,ordinal_encoding:Se.params.ordinal_encoding,...Ee}};lt(Ze),l(Ze,c?g:void 0,c)},_=(ee,Ee)=>{const Se=m,lt=h,Ze={...Se,params:{...Se.params,clip:{...Se.params.clip,...Ee}}};lt(Ze),l(Ze,c?g:void 0,c)},N=(ee,Ee)=>{const Se=ee==="training"?m:g,lt=ee==="training"?h:x,Ze={...Se,params:{...Se.params,constant:Ee}};lt(Ze),ee==="training"?l(Ze,c?g:void 0,c):l(m,Ze,c)},b=ee=>{var Se,lt;const Ee=ee==="training"?m:g;return Ee.method!=="constant"?null:o.jsxs("div",{className:"mt-4",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Constant Value"}),by(p)?o.jsx("input",{type:"number",value:((Se=Ee.params)==null?void 0:Se.constant)??"",onChange:Ze=>N(ee,Ze.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"Enter a number..."}):o.jsx("input",{type:"text",value:((lt=Ee.params)==null?void 0:lt.constant)??"",onChange:Ze=>N(ee,Ze.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"Enter a value..."})]})},[w,k]=E.useState(!1),R=ee=>{const Ee=t.columns.map(Se=>({...Se,drop_if_null:Se.name===e.name?ee.target.checked:Se.drop_if_null}));r({...t,columns:Ee})},D=ee=>{const Ee=t.columns.map(Se=>({...Se,description:Se.name===e.name?ee.target.value:Se.description}));r({...t,columns:Ee})},T=()=>{k(!1)},z=ee=>{ee.key==="Enter"?(ee.preventDefault(),k(!1)):ee.key==="Escape"&&k(!1)},F=()=>{k(!0)};let W=((fe=e.statistics)==null?void 0:fe.processed.null_count)||((K=(ae=e.statistics)==null?void 0:ae.raw)==null?void 0:K.null_count)||0;const H=W&&((ne=e.statistics)!=null&&ne.raw.num_rows)?W/e.statistics.raw.num_rows*100:0,ce=(pe=(te=e.statistics)==null?void 0:te.processed)!=null&&pe.null_count&&((Oe=e.statistics)!=null&&Oe.raw.num_rows)?e.statistics.processed.null_count/e.statistics.raw.num_rows*100:0,se=((dt=e.statistics)==null?void 0:dt.raw.num_rows)??0,be=ee=>{var lt,Ze,gn,Wn,Hn,Mr;const Ee=m;let Se;if(Ee.method==="most_frequent"&&((lt=e.statistics)==null?void 0:lt.raw.most_frequent_value)!==void 0)Se=`Most Frequent Value: ${e.statistics.raw.most_frequent_value}`;else if(Ee.method==="ffill"){const kn=(Ze=e.statistics)==null?void 0:Ze.raw.last_value;kn!==void 0?Se=`Forward Fill using Last Value: ${kn}`:Se="Set date column & apply preprocessing to see last value"}else if(Ee.method==="median"&&((Wn=(gn=e.statistics)==null?void 0:gn.raw)==null?void 0:Wn.median)!==void 0)Se=`Median: ${e.statistics.raw.median}`;else if(Ee.method==="mean"&&((Mr=(Hn=e.statistics)==null?void 0:Hn.raw)==null?void 0:Mr.mean)!==void 0)Se=`Mean: ${e.statistics.raw.mean}`;else return null;return o.jsx("div",{className:"mt-4 bg-yellow-50 rounded-lg p-4",children:o.jsx("span",{className:"text-sm font-medium text-yellow-700",children:Se})})};return o.jsxs("div",{className:"space-y-8",children:[o.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex-1 max-w-[70%]",children:[o.jsx("h2",{className:"text-2xl font-semibold text-gray-900",children:e.name}),o.jsx("div",{className:"mt-1 flex items-start gap-1",children:w?o.jsxs("div",{className:"flex-1",children:[o.jsx("textarea",{value:e.description||"",onChange:D,onBlur:T,onKeyDown:z,className:"w-full px-2 py-1 text-sm text-gray-900 border border-blue-500 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",rows:2,autoFocus:!0,placeholder:"Enter column description..."}),o.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Press Enter to save, Escape to cancel"})]}):o.jsxs("div",{className:"flex-3/4 flex items-start gap-1",children:[o.jsx("p",{className:"text-sm text-gray-500 cursor-pointer flex-grow truncate",onClick:F,children:e.description||"No description provided"}),o.jsx("button",{onClick:F,className:"p-1 text-gray-400 hover:text-gray-600 rounded-md hover:bg-gray-100 flex-shrink-0",children:o.jsx(NO,{className:"w-4 h-4"})})]})})]}),o.jsx("div",{className:"flex items-center gap-4 flex-shrink-0",children:o.jsxs("div",{className:"relative flex items-center gap-2",children:[o.jsxs("div",{className:"absolute right-0 -top-8 flex items-center gap-2",children:[e.required&&o.jsx(Ia,{variant:"secondary",className:"bg-blue-100 text-blue-800",children:"Required"}),e.is_computed&&o.jsxs(Ia,{variant:"secondary",className:"bg-purple-100 text-purple-800",children:[o.jsx(od,{className:"w-3 h-3 mr-1"}),"Computed"]})]}),e.is_target?o.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-purple-100 text-purple-800",children:"Target Column"}):o.jsx("div",{className:"flex items-center gap-2",children:o.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[o.jsx("input",{type:"checkbox",checked:e.drop_if_null,onChange:R,className:"rounded border-gray-300 text-red-600 focus:ring-red-500"}),o.jsxs("span",{className:"flex items-center gap-1 text-gray-700",children:[o.jsx(ho,{className:"w-4 h-4 text-gray-400"}),"Drop if null"]})]})})]})})]}),o.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-6",children:[o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(un,{className:"w-4 h-4 text-gray-500"}),o.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Raw Data Statistics"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Null Values:"}),o.jsx("span",{className:"font-medium text-gray-900",children:(Q=(Je=e.statistics)==null?void 0:Je.raw)==null?void 0:Q.null_count.toLocaleString()})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Total Rows:"}),o.jsx("span",{className:"font-medium text-gray-900",children:se.toLocaleString()})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Null Percentage:"}),o.jsxs("span",{className:"font-medium text-gray-900",children:[H.toFixed(2),"%"]})]}),o.jsx("div",{className:"mt-2",children:o.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-blue-600 rounded-full",style:{width:`${H}%`}})})})]})]}),o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(eh,{className:"w-4 h-4 text-gray-500"}),o.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Processed Data Statistics"})]}),(we=t==null?void 0:t.preprocessing_steps)!=null&&we.training?o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Null Values:"}),o.jsx("span",{className:"font-medium text-gray-900",children:(Y=(Ne=(Ce=e.statistics)==null?void 0:Ce.processed)==null?void 0:Ne.null_count)==null?void 0:Y.toLocaleString()})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Total Rows:"}),o.jsx("span",{className:"font-medium text-gray-900",children:(He=(xe=(de=e.statistics)==null?void 0:de.processed)==null?void 0:xe.num_rows)==null?void 0:He.toLocaleString()})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Null Percentage:"}),o.jsxs("span",{className:"font-medium text-gray-900",children:[ce.toFixed(2),"%"]})]}),o.jsx("div",{className:"mt-2",children:o.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-blue-600 rounded-full",style:{width:`${ce}%`}})})})]}):o.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No preprocessing configured"})]})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-6",children:[o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsx("span",{className:"text-sm text-gray-500",children:"Type"}),o.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:e.datatype})]}),o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsx("span",{className:"text-sm text-gray-500",children:"Unique Values"}),o.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:((fn=(Ke=(nn=e.statistics)==null?void 0:nn.processed)==null?void 0:Ke.unique_count)==null?void 0:fn.toLocaleString())??"N/A"})]}),o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsx("span",{className:"text-sm text-gray-500",children:"Null Values"}),o.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:((Yt=(vt=(Bn=e.statistics)==null?void 0:Bn.processed)==null?void 0:vt.null_count)==null?void 0:Yt.toLocaleString())??"0"})]})]}),(yt=e.statistics)!=null&&yt.processed.null_count?o.jsxs("div",{className:"mt-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Null Distribution"}),o.jsxs("span",{className:"text-sm text-gray-500",children:[H,"% of values are null"]})]}),o.jsx("div",{className:"relative h-2 bg-gray-100 rounded-full overflow-hidden",children:o.jsx("div",{className:"absolute top-0 left-0 h-full bg-yellow-400 rounded-full",style:{width:`${H}%`}})})]}):o.jsx("div",{className:"mt-6 bg-green-50 rounded-lg p-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full"}),o.jsx("span",{className:"text-sm text-green-700",children:"This column has no null values"})]})}),((Pt=(qt=e.statistics)==null?void 0:qt.raw)==null?void 0:Pt.sample_data)&&o.jsxs("div",{className:"mt-6",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Sample Values"}),o.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:o.jsx("div",{className:"flex flex-wrap gap-2",children:((Nn=(mn=e.statistics)==null?void 0:mn.raw)==null?void 0:Nn.sample_data)&&e.statistics.raw.sample_data.map((ee,Ee)=>o.jsx("span",{className:"px-2 py-1 bg-gray-100 rounded text-sm text-gray-700",children:String(ee)},Ee))})})]})]}),e.lineage&&e.lineage.length>0&&o.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[o.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(wO,{className:"w-5 h-5 text-gray-500"}),"Column Lineage"]}),o.jsx("div",{className:"space-y-4",children:e.lineage.map((ee,Ee)=>o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 ${ee.key==="raw_dataset"?"bg-gray-100":ee.key==="computed_by_feature"?"bg-purple-100":"bg-blue-100"}`,children:ee.key==="raw_dataset"?o.jsx(un,{className:"w-4 h-4 text-gray-600"}):ee.key==="computed_by_feature"?o.jsx(od,{className:"w-4 h-4 text-purple-600"}):o.jsx(aa,{className:"w-4 h-4 text-blue-600"})}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("p",{className:"text-sm font-medium text-gray-900",children:ee.description}),ee.timestamp&&o.jsx("span",{className:"text-xs text-gray-500",children:new Date(ee.timestamp).toLocaleString()})]}),Ee<e.lineage.length-1&&o.jsx("div",{className:"ml-4 mt-2 mb-2 w-0.5 h-4 bg-gray-200"})]})]},Ee))})]}),o.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[o.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(aa,{className:"w-5 h-5 text-gray-500"}),"Data Type"]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Column Type"}),o.jsx("select",{value:p,disabled:!0,className:"w-full rounded-md border-gray-300 bg-gray-50 shadow-sm text-gray-700 cursor-not-allowed",children:a.column_types.map(ee=>o.jsx("option",{value:ee.value,children:ee.label},ee.value))}),o.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Column type cannot be changed after creation"})]}),o.jsxs("div",{className:"bg-gray-50 rounded-md p-4",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Sample Data"}),o.jsx("div",{className:"space-y-2",children:Array.isArray(e.sample_values)?e.sample_values.slice(0,3).map((ee,Ee)=>o.jsx("span",{className:"m-1 flex-items items-center",children:o.jsx(Ia,{children:String(ee)})},Ee)):[]})]})]})]}),o.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[o.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(eh,{className:"w-5 h-5 text-gray-500"}),"Preprocessing Strategy"]}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Training Strategy"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"checkbox",id:"useDistinctInference",checked:c,onChange:ee=>{d(ee.target.checked),l(m,ee.target.checked?g:void 0,ee.target.checked)},className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),o.jsx("label",{htmlFor:"useDistinctInference",className:"text-sm text-gray-700",children:"Use different strategy for inference"})]})]}),o.jsxs("div",{className:c?"grid grid-cols-2 gap-6":"",children:[o.jsxs("div",{children:[o.jsxs("select",{value:m.method,onChange:ee=>j("training",ee.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",children:[o.jsx("option",{value:"none",children:"No preprocessing"}),(re=a.preprocessing_strategies[p])==null?void 0:re.map(ee=>o.jsx("option",{value:ee.value,children:ee.label},ee.value))]}),be(),b("training"),e.datatype==="categorical"&&m.method==="categorical"&&o.jsx("div",{className:"mt-4 space-y-4 bg-gray-50 rounded-lg p-4",children:o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Minimum Category Instances"}),o.jsx("input",{type:"number",min:"1",value:m.params.categorical_min,onChange:ee=>y("training",{categorical_min:parseInt(ee.target.value)}),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"}),o.jsx("p",{className:"mt-1 text-sm text-gray-500",children:'Categories with fewer instances will be grouped as "OTHER"'})]})}),e.datatype==="categorical"&&m.method!=="none"&&o.jsxs("div",{className:"mt-4 space-y-4 bg-gray-50 rounded-lg p-4",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Encoding"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"radio",id:"oneHotEncode",name:"encoding",checked:m.params.one_hot,onChange:()=>y("training",{one_hot:!0,ordinal_encoding:!1}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),o.jsx("label",{htmlFor:"oneHotEncode",className:"text-sm text-gray-700",children:"One-hot encode categories"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"radio",id:"ordinalEncode",name:"encoding",checked:m.params.ordinal_encoding,onChange:()=>y("training",{one_hot:!1,ordinal_encoding:!0}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),o.jsx("label",{htmlFor:"ordinalEncode",className:"text-sm text-gray-700",children:"Ordinal encode categories"})]})]})]}),c&&o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(xg,{className:"w-4 h-4 text-gray-400"}),o.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Inference Strategy"})]}),o.jsxs("select",{value:g.method,onChange:ee=>j("inference",ee.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",children:[o.jsx("option",{value:"none",children:"No preprocessing"}),(ge=a.preprocessing_strategies[p])==null?void 0:ge.map(ee=>o.jsx("option",{value:ee.value,children:ee.label},ee.value))]}),b("inference")]})]})]}),by(p)&&m.method!=="none"&&o.jsxs("div",{className:"border-t pt-4",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Clip Values"}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Min Value"}),o.jsx("input",{type:"number",value:((qe=(tt=m.params)==null?void 0:tt.clip)==null?void 0:qe.min)??"",onChange:ee=>{_("training",{min:ee.target.value?Number(ee.target.value):void 0})},className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"No minimum"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Max Value"}),o.jsx("input",{type:"number",value:((hn=(nt=m.params)==null?void 0:nt.clip)==null?void 0:hn.max)??"",onChange:ee=>{_("training",{max:ee.target.value?Number(ee.target.value):void 0})},className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"No maximum"})]})]})]})]})]})]})}function mR({columns:e,selectedColumn:t,onColumnSelect:n,onToggleHidden:r}){return Un().props,o.jsx("div",{className:"space-y-2 pb-2",children:e.map(a=>{var l,c,d;return o.jsxs("div",{className:`p-3 rounded-lg border ${t===a.name?"border-blue-500 bg-blue-50":a.is_target?"border-purple-500 bg-purple-50":a.hidden?"border-gray-200 bg-gray-50":"border-gray-200 hover:border-gray-300"} transition-colors duration-150`,children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[a.is_target&&o.jsx(bg,{className:"w-4 h-4 text-purple-500"}),o.jsx("span",{className:`font-medium ${a.hidden?"text-gray-500":"text-gray-900"}`,children:a.name}),o.jsx("span",{className:"text-xs px-2 py-0.5 bg-gray-100 text-gray-600 rounded-full",children:a.datatype})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[!a.is_target&&o.jsx("button",{onClick:()=>r(a.name),className:`p-1 rounded hover:bg-gray-100 ${a.hidden?"text-gray-500":"text-gray-400 hover:text-gray-600"}`,title:a.hidden?"Show column":"Hide column",children:a.hidden?o.jsx(Zm,{className:"w-4 h-4"}):o.jsx(fw,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>n(a.name),className:"p-1 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-100",title:"Configure preprocessing",children:o.jsx(aa,{className:"w-4 h-4"})})]})]}),o.jsxs("div",{className:"text-sm text-gray-500",children:[a.description&&o.jsx("p",{className:`mb-1 line-clamp-1 ${a.drop_if_null?"text-gray-400":""}`,children:a.description}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.required&&o.jsxs("div",{className:"flex items-center gap-1 text-blue-600",children:[o.jsx(CO,{className:"w-3 h-3"}),o.jsx("span",{className:"text-xs",children:"required"})]}),a.is_computed&&o.jsxs("div",{className:"flex items-center gap-1 text-purple-600",children:[o.jsx(od,{className:"w-3 h-3"}),o.jsx("span",{className:"text-xs",children:"computed"})]}),a.preprocessing_steps&&((l=a.preprocessing_steps)==null?void 0:l.training)&&((d=(c=a.preprocessing_steps)==null?void 0:c.training)==null?void 0:d.method)!=="none"&&o.jsxs("div",{className:"flex items-center gap-1 text-blue-600",children:[o.jsx(Mn,{className:"w-3 h-3"}),o.jsx("span",{className:"text-xs",children:"preprocessing configured"})]}),a.hidden&&o.jsxs("div",{className:"flex items-center gap-1 text-gray-400",children:[o.jsx(Zm,{className:"w-3 h-3"}),o.jsx("span",{className:"text-xs",children:"Hidden from training"})]})]})]})]},a.name)})})}const im=5;function hR({types:e,activeFilters:t,onFilterChange:n,columnStats:r,colHasPreprocessingSteps:a,columns:l}){const c=y=>{switch(y){case"training":return`${r.training} columns`;case"hidden":return`${r.hidden} columns`;case"preprocessed":return`${r.withPreprocessing} columns`;case"nulls":return`${r.withNulls} columns`;case"computed":return`${r.computed} columns`;case"required":return`${r.required} columns`;default:return`${r.total} columns`}},d=y=>{var _,N,b,w;return!((N=(_=y.statistics)==null?void 0:_.processed)!=null&&N.null_count)||!((w=(b=y.statistics)==null?void 0:b.processed)!=null&&w.num_rows)?0:y.statistics.processed.null_count/y.statistics.processed.num_rows*100},p=l.filter(y=>{var _,N,b,w;return((N=(_=y.statistics)==null?void 0:_.processed)==null?void 0:N.null_count)&&((w=(b=y.statistics)==null?void 0:b.processed)==null?void 0:w.null_count)>0}).sort((y,_)=>d(_)-d(y)),[m,h]=E.useState(1),g=Math.ceil(p.length/im),x=p.slice((m-1)*im,m*im),j=y=>{n({...t,types:t.types.includes(y)?t.types.filter(_=>_!==y):[...t.types,y]})};return o.jsxs("div",{className:"p-4 border-b space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h3",{className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[o.jsx(bO,{className:"w-4 h-4"}),"Column Views"]}),o.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",r.filtered," of ",r.total," columns"]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("button",{onClick:()=>n({...t,view:"all"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="all"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(un,{className:"w-4 h-4"}),"All",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("all"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"training"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="training"?"bg-green-100 text-green-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(fw,{className:"w-4 h-4"}),"Training",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("training"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"hidden"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="hidden"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(Zm,{className:"w-4 h-4"}),"Hidden",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("hidden"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"preprocessed"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="preprocessed"?"bg-blue-100 text-blue-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(eh,{className:"w-4 h-4"}),"Preprocessed",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("preprocessed"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"nulls"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="nulls"?"bg-yellow-100 text-yellow-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(bw,{className:"w-4 h-4"}),"Has Nulls",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("nulls"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"computed"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="computed"?"bg-purple-100 text-purple-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(od,{className:"w-4 h-4"}),"Computed",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("computed"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"required"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="required"?"bg-blue-100 text-blue-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(bg,{className:"w-4 h-4"}),"Required",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("required"),")"]})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"text-xs font-medium text-gray-700 mb-2 block",children:"Column Types"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(y=>o.jsx("button",{onClick:()=>j(y),className:`px-2 py-1 rounded-md text-xs font-medium ${t.types.includes(y)?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:y},y))})]}),t.view==="preprocessed"&&r.withPreprocessing>0&&o.jsxs("div",{className:"bg-blue-50 rounded-lg p-3",children:[o.jsx("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:"Preprocessing Overview"}),o.jsx("div",{className:"space-y-2",children:l.filter(a).map(y=>{var _;return o.jsxs("div",{className:"flex items-center justify-between text-sm",children:[o.jsx("span",{className:"text-blue-800",children:y.name}),o.jsx("span",{className:"text-blue-600",children:(_=y.preprocessing_steps)==null?void 0:_.training.method})]},y.name)})})]}),t.view==="nulls"&&p.length>0&&o.jsxs("div",{className:"bg-yellow-50 rounded-lg p-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx("h4",{className:"text-sm font-medium text-yellow-900",children:"Null Value Distribution"}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-yellow-700",children:[o.jsx("button",{onClick:()=>h(y=>Math.max(1,y-1)),disabled:m===1,className:"p-1 rounded hover:bg-yellow-100 disabled:opacity-50",children:o.jsx(qd,{className:"w-4 h-4"})}),o.jsxs("span",{children:["Page ",m," of ",g]}),o.jsx("button",{onClick:()=>h(y=>Math.min(g,y+1)),disabled:m===g,className:"p-1 rounded hover:bg-yellow-100 disabled:opacity-50",children:o.jsx(Js,{className:"w-4 h-4"})})]})]}),o.jsx("div",{className:"space-y-2",children:x.map(y=>{var _,N,b,w;return o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-yellow-800 text-sm min-w-[120px]",children:y.name}),o.jsx("div",{className:"flex-1 h-2 bg-yellow-100 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-yellow-400 rounded-full",style:{width:`${d(y)}%`}})}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("span",{className:"text-yellow-800 text-xs",children:[d(y).toFixed(1),"% null"]}),o.jsxs("span",{className:"text-yellow-600 text-xs",children:["(",(N=(_=y.statistics)==null?void 0:_.nullCount)==null?void 0:N.toLocaleString()," / ",(w=(b=y.statistics)==null?void 0:b.rowCount)==null?void 0:w.toLocaleString(),")"]})]})]},y.name)})}),o.jsxs("div",{className:"mt-3 text-sm text-yellow-700",children:[p.length," columns contain null values"]})]})]})]})}function gR({saving:e,saved:t,error:n}){return n?o.jsxs("div",{className:"flex items-center gap-2 text-red-600",children:[o.jsx(Mn,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm font-medium",children:n})]}):e?o.jsxs("div",{className:"flex items-center gap-2 text-blue-600",children:[o.jsx(qa,{className:"w-4 h-4 animate-spin"}),o.jsx("span",{className:"text-sm font-medium",children:"Saving changes..."})]}):t?o.jsxs("div",{className:"flex items-center gap-2 text-green-600",children:[o.jsx(yw,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm font-medium",children:"Changes saved"})]}):null}var Ew={exports:{}},nr={},Aw={exports:{}},Pw={};/**
447
+ }`;var Le=yv(function(){return Ve(C,me+"return "+J).apply(n,P)});if(Le.source=J,Af(Le))throw Le;return Le}function m4(i){return Ge(i).toLowerCase()}function h4(i){return Ge(i).toUpperCase()}function g4(i,s,u){if(i=Ge(i),i&&(u||s===n))return E0(i);if(!i||!(s=Gn(s)))return i;var f=_r(i),v=_r(s),C=A0(f,v),P=P0(f,v)+1;return Ii(f,C,P).join("")}function x4(i,s,u){if(i=Ge(i),i&&(u||s===n))return i.slice(0,O0(i)+1);if(!i||!(s=Gn(s)))return i;var f=_r(i),v=P0(f,_r(s))+1;return Ii(f,0,v).join("")}function v4(i,s,u){if(i=Ge(i),i&&(u||s===n))return i.replace(So,"");if(!i||!(s=Gn(s)))return i;var f=_r(i),v=A0(f,_r(s));return Ii(f,v).join("")}function y4(i,s){var u=H,f=ce;if(_t(s)){var v="separator"in s?s.separator:v;u="length"in s?Re(s.length):u,f="omission"in s?Gn(s.omission):f}i=Ge(i);var C=i.length;if(cs(i)){var P=_r(i);C=P.length}if(u>=C)return i;var O=u-us(f);if(O<1)return f;var M=P?Ii(P,0,O).join(""):i.slice(0,O);if(v===n)return M+f;if(P&&(O+=M.length-O),Pf(v)){if(i.slice(O).search(v)){var V,G=M;for(v.global||(v=qp(v.source,Ge(ir.exec(v))+"g")),v.lastIndex=0;V=v.exec(G);)var J=V.index;M=M.slice(0,J===n?O:J)}}else if(i.indexOf(Gn(v),O)!=O){var ie=M.lastIndexOf(v);ie>-1&&(M=M.slice(0,ie))}return M+f}function b4(i){return i=Ge(i),i&&bo.test(i)?i.replace(oc,Q2):i}var w4=xs(function(i,s,u){return i+(u?" ":"")+s.toUpperCase()}),Rf=bx("toUpperCase");function vv(i,s,u){return i=Ge(i),s=u?n:s,s===n?H2(i)?J2(i):L2(i):i.match(s)||[]}var yv=Me(function(i,s){try{return Vt(i,n,s)}catch(u){return Af(u)?u:new ke(u)}}),_4=si(function(i,s){return sr(s,function(u){u=Ur(u),ii(i,u,Cf(i[u],i))}),i});function j4(i){var s=i==null?0:i.length,u=ye();return i=s?bt(i,function(f){if(typeof f[1]!="function")throw new or(c);return[u(f[0]),f[1]]}):[],Me(function(f){for(var v=-1;++v<s;){var C=i[v];if(Vt(C[0],this,f))return Vt(C[1],this,f)}})}function S4(i){return QS(cr(i,g))}function If(i){return function(){return i}}function N4(i,s){return i==null||i!==i?s:i}var k4=_x(),C4=_x(!0);function Tn(i){return i}function Lf(i){return J0(typeof i=="function"?i:cr(i,g))}function E4(i){return ex(cr(i,g))}function A4(i,s){return tx(i,cr(s,g))}var P4=Me(function(i,s){return function(u){return Fo(u,i,s)}}),T4=Me(function(i,s){return function(u){return Fo(i,u,s)}});function Mf(i,s,u){var f=Gt(s),v=Kc(s,f);u==null&&!(_t(s)&&(v.length||!f.length))&&(u=s,s=i,i=this,v=Kc(s,Gt(s)));var C=!(_t(u)&&"chain"in u)||!!u.chain,P=li(i);return sr(v,function(O){var M=s[O];i[O]=M,P&&(i.prototype[O]=function(){var V=this.__chain__;if(C||V){var G=i(this.__wrapped__),J=G.__actions__=En(this.__actions__);return J.push({func:M,args:arguments,thisArg:i}),G.__chain__=V,G}return M.apply(i,Ei([this.value()],arguments))})}),i}function O4(){return Ue._===this&&(Ue._=iS),this}function Df(){}function R4(i){return i=Re(i),Me(function(s){return nx(s,i)})}var I4=mf(bt),L4=mf(j0),M4=mf(Fp);function bv(i){return wf(i)?zp(Ur(i)):pN(i)}function D4(i){return function(s){return i==null?n:Sa(i,s)}}var F4=Sx(),z4=Sx(!0);function Ff(){return[]}function zf(){return!1}function $4(){return{}}function U4(){return""}function B4(){return!0}function W4(i,s){if(i=Re(i),i<1||i>K)return[];var u=pe,f=rn(i,pe);s=ye(s),i-=pe;for(var v=Bp(f,s);++u<i;)s(u);return v}function H4(i){return Pe(i)?bt(i,Ur):Kn(i)?[i]:En($x(Ge(i)))}function q4(i){var s=++nS;return Ge(i)+s}var V4=eu(function(i,s){return i+s},0),G4=hf("ceil"),K4=eu(function(i,s){return i/s},1),Q4=hf("floor");function X4(i){return i&&i.length?Gc(i,Tn,Zp):n}function Y4(i,s){return i&&i.length?Gc(i,ye(s,2),Zp):n}function J4(i){return k0(i,Tn)}function Z4(i,s){return k0(i,ye(s,2))}function e3(i){return i&&i.length?Gc(i,Tn,rf):n}function t3(i,s){return i&&i.length?Gc(i,ye(s,2),rf):n}var n3=eu(function(i,s){return i*s},1),r3=hf("round"),i3=eu(function(i,s){return i-s},0);function a3(i){return i&&i.length?Up(i,Tn):0}function s3(i,s){return i&&i.length?Up(i,ye(s,2)):0}return S.after=EC,S.ary=Yx,S.assign=hE,S.assignIn=dv,S.assignInWith=fu,S.assignWith=gE,S.at=xE,S.before=Jx,S.bind=Cf,S.bindAll=_4,S.bindKey=Zx,S.castArray=$C,S.chain=Kx,S.chunk=QN,S.compact=XN,S.concat=YN,S.cond=j4,S.conforms=S4,S.constant=If,S.countBy=aC,S.create=vE,S.curry=ev,S.curryRight=tv,S.debounce=nv,S.defaults=yE,S.defaultsDeep=bE,S.defer=AC,S.delay=PC,S.difference=JN,S.differenceBy=ZN,S.differenceWith=ek,S.drop=tk,S.dropRight=nk,S.dropRightWhile=rk,S.dropWhile=ik,S.fill=ak,S.filter=oC,S.flatMap=uC,S.flatMapDeep=dC,S.flatMapDepth=pC,S.flatten=Hx,S.flattenDeep=sk,S.flattenDepth=ok,S.flip=TC,S.flow=k4,S.flowRight=C4,S.fromPairs=lk,S.functions=CE,S.functionsIn=EE,S.groupBy=fC,S.initial=uk,S.intersection=dk,S.intersectionBy=pk,S.intersectionWith=fk,S.invert=PE,S.invertBy=TE,S.invokeMap=hC,S.iteratee=Lf,S.keyBy=gC,S.keys=Gt,S.keysIn=Pn,S.map=ou,S.mapKeys=RE,S.mapValues=IE,S.matches=E4,S.matchesProperty=A4,S.memoize=cu,S.merge=LE,S.mergeWith=pv,S.method=P4,S.methodOf=T4,S.mixin=Mf,S.negate=uu,S.nthArg=R4,S.omit=ME,S.omitBy=DE,S.once=OC,S.orderBy=xC,S.over=I4,S.overArgs=RC,S.overEvery=L4,S.overSome=M4,S.partial=Ef,S.partialRight=rv,S.partition=vC,S.pick=FE,S.pickBy=fv,S.property=bv,S.propertyOf=D4,S.pull=xk,S.pullAll=Vx,S.pullAllBy=vk,S.pullAllWith=yk,S.pullAt=bk,S.range=F4,S.rangeRight=z4,S.rearg=IC,S.reject=wC,S.remove=wk,S.rest=LC,S.reverse=Nf,S.sampleSize=jC,S.set=$E,S.setWith=UE,S.shuffle=SC,S.slice=_k,S.sortBy=CC,S.sortedUniq=Ak,S.sortedUniqBy=Pk,S.split=u4,S.spread=MC,S.tail=Tk,S.take=Ok,S.takeRight=Rk,S.takeRightWhile=Ik,S.takeWhile=Lk,S.tap=Xk,S.throttle=DC,S.thru=su,S.toArray=lv,S.toPairs=mv,S.toPairsIn=hv,S.toPath=H4,S.toPlainObject=uv,S.transform=BE,S.unary=FC,S.union=Mk,S.unionBy=Dk,S.unionWith=Fk,S.uniq=zk,S.uniqBy=$k,S.uniqWith=Uk,S.unset=WE,S.unzip=kf,S.unzipWith=Gx,S.update=HE,S.updateWith=qE,S.values=bs,S.valuesIn=VE,S.without=Bk,S.words=vv,S.wrap=zC,S.xor=Wk,S.xorBy=Hk,S.xorWith=qk,S.zip=Vk,S.zipObject=Gk,S.zipObjectDeep=Kk,S.zipWith=Qk,S.entries=mv,S.entriesIn=hv,S.extend=dv,S.extendWith=fu,Mf(S,S),S.add=V4,S.attempt=yv,S.camelCase=XE,S.capitalize=gv,S.ceil=G4,S.clamp=GE,S.clone=UC,S.cloneDeep=WC,S.cloneDeepWith=HC,S.cloneWith=BC,S.conformsTo=qC,S.deburr=xv,S.defaultTo=N4,S.divide=K4,S.endsWith=YE,S.eq=Sr,S.escape=JE,S.escapeRegExp=ZE,S.every=sC,S.find=lC,S.findIndex=Bx,S.findKey=wE,S.findLast=cC,S.findLastIndex=Wx,S.findLastKey=_E,S.floor=Q4,S.forEach=Qx,S.forEachRight=Xx,S.forIn=jE,S.forInRight=SE,S.forOwn=NE,S.forOwnRight=kE,S.get=Tf,S.gt=VC,S.gte=GC,S.has=AE,S.hasIn=Of,S.head=qx,S.identity=Tn,S.includes=mC,S.indexOf=ck,S.inRange=KE,S.invoke=OE,S.isArguments=Ca,S.isArray=Pe,S.isArrayBuffer=KC,S.isArrayLike=An,S.isArrayLikeObject=Ot,S.isBoolean=QC,S.isBuffer=Li,S.isDate=XC,S.isElement=YC,S.isEmpty=JC,S.isEqual=ZC,S.isEqualWith=eE,S.isError=Af,S.isFinite=tE,S.isFunction=li,S.isInteger=iv,S.isLength=du,S.isMap=av,S.isMatch=nE,S.isMatchWith=rE,S.isNaN=iE,S.isNative=aE,S.isNil=oE,S.isNull=sE,S.isNumber=sv,S.isObject=_t,S.isObjectLike=Ct,S.isPlainObject=Ho,S.isRegExp=Pf,S.isSafeInteger=lE,S.isSet=ov,S.isString=pu,S.isSymbol=Kn,S.isTypedArray=ys,S.isUndefined=cE,S.isWeakMap=uE,S.isWeakSet=dE,S.join=mk,S.kebabCase=e4,S.last=dr,S.lastIndexOf=hk,S.lowerCase=t4,S.lowerFirst=n4,S.lt=pE,S.lte=fE,S.max=X4,S.maxBy=Y4,S.mean=J4,S.meanBy=Z4,S.min=e3,S.minBy=t3,S.stubArray=Ff,S.stubFalse=zf,S.stubObject=$4,S.stubString=U4,S.stubTrue=B4,S.multiply=n3,S.nth=gk,S.noConflict=O4,S.noop=Df,S.now=lu,S.pad=r4,S.padEnd=i4,S.padStart=a4,S.parseInt=s4,S.random=QE,S.reduce=yC,S.reduceRight=bC,S.repeat=o4,S.replace=l4,S.result=zE,S.round=r3,S.runInContext=I,S.sample=_C,S.size=NC,S.snakeCase=c4,S.some=kC,S.sortedIndex=jk,S.sortedIndexBy=Sk,S.sortedIndexOf=Nk,S.sortedLastIndex=kk,S.sortedLastIndexBy=Ck,S.sortedLastIndexOf=Ek,S.startCase=d4,S.startsWith=p4,S.subtract=i3,S.sum=a3,S.sumBy=s3,S.template=f4,S.times=W4,S.toFinite=ci,S.toInteger=Re,S.toLength=cv,S.toLower=m4,S.toNumber=pr,S.toSafeInteger=mE,S.toString=Ge,S.toUpper=h4,S.trim=g4,S.trimEnd=x4,S.trimStart=v4,S.truncate=y4,S.unescape=b4,S.uniqueId=q4,S.upperCase=w4,S.upperFirst=Rf,S.each=Qx,S.eachRight=Xx,S.first=qx,Mf(S,function(){var i={};return zr(S,function(s,u){Qe.call(S.prototype,u)||(i[u]=s)}),i}(),{chain:!1}),S.VERSION=r,sr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){S[i].placeholder=S}),sr(["drop","take"],function(i,s){ze.prototype[i]=function(u){u=u===n?1:$t(Re(u),0);var f=this.__filtered__&&!s?new ze(this):this.clone();return f.__filtered__?f.__takeCount__=rn(u,f.__takeCount__):f.__views__.push({size:rn(u,pe),type:i+(f.__dir__<0?"Right":"")}),f},ze.prototype[i+"Right"]=function(u){return this.reverse()[i](u).reverse()}}),sr(["filter","map","takeWhile"],function(i,s){var u=s+1,f=u==ve||u==fe;ze.prototype[i]=function(v){var C=this.clone();return C.__iteratees__.push({iteratee:ye(v,3),type:u}),C.__filtered__=C.__filtered__||f,C}}),sr(["head","last"],function(i,s){var u="take"+(s?"Right":"");ze.prototype[i]=function(){return this[u](1).value()[0]}}),sr(["initial","tail"],function(i,s){var u="drop"+(s?"":"Right");ze.prototype[i]=function(){return this.__filtered__?new ze(this):this[u](1)}}),ze.prototype.compact=function(){return this.filter(Tn)},ze.prototype.find=function(i){return this.filter(i).head()},ze.prototype.findLast=function(i){return this.reverse().find(i)},ze.prototype.invokeMap=Me(function(i,s){return typeof i=="function"?new ze(this):this.map(function(u){return Fo(u,i,s)})}),ze.prototype.reject=function(i){return this.filter(uu(ye(i)))},ze.prototype.slice=function(i,s){i=Re(i);var u=this;return u.__filtered__&&(i>0||s<0)?new ze(u):(i<0?u=u.takeRight(-i):i&&(u=u.drop(i)),s!==n&&(s=Re(s),u=s<0?u.dropRight(-s):u.take(s-i)),u)},ze.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},ze.prototype.toArray=function(){return this.take(pe)},zr(ze.prototype,function(i,s){var u=/^(?:filter|find|map|reject)|While$/.test(s),f=/^(?:head|last)$/.test(s),v=S[f?"take"+(s=="last"?"Right":""):s],C=f||/^find/.test(s);v&&(S.prototype[s]=function(){var P=this.__wrapped__,O=f?[1]:arguments,M=P instanceof ze,V=O[0],G=M||Pe(P),J=function(De){var Be=v.apply(S,Ei([De],O));return f&&ie?Be[0]:Be};G&&u&&typeof V=="function"&&V.length!=1&&(M=G=!1);var ie=this.__chain__,me=!!this.__actions__.length,_e=C&&!ie,Le=M&&!me;if(!C&&G){P=Le?P:new ze(this);var je=i.apply(P,O);return je.__actions__.push({func:su,args:[J],thisArg:n}),new lr(je,ie)}return _e&&Le?i.apply(this,O):(je=this.thru(J),_e?f?je.value()[0]:je.value():je)})}),sr(["pop","push","shift","sort","splice","unshift"],function(i){var s=Oc[i],u=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",f=/^(?:pop|shift)$/.test(i);S.prototype[i]=function(){var v=arguments;if(f&&!this.__chain__){var C=this.value();return s.apply(Pe(C)?C:[],v)}return this[u](function(P){return s.apply(Pe(P)?P:[],v)})}}),zr(ze.prototype,function(i,s){var u=S[s];if(u){var f=u.name+"";Qe.call(ms,f)||(ms[f]=[]),ms[f].push({name:s,func:u})}}),ms[Zc(n,b).name]=[{name:"wrapper",func:n}],ze.prototype.clone=bS,ze.prototype.reverse=wS,ze.prototype.value=_S,S.prototype.at=Yk,S.prototype.chain=Jk,S.prototype.commit=Zk,S.prototype.next=eC,S.prototype.plant=nC,S.prototype.reverse=rC,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=iC,S.prototype.first=S.prototype.head,To&&(S.prototype[To]=tC),S},ds=Z2();Tt?((Tt.exports=ds)._=ds,at._=ds):Ue._=ds}).call(cn)})(ld,ld.exports);var Bt=ld.exports;const Qo=6;function PO({dataset:e}){const[t,n]=E.useState(!1),[r,a]=E.useState(1),l=e.sample_data[0]?Object.keys(e.sample_data[0]):[],c=Math.ceil(e.columns.length/Qo),d=e.columns.slice((r-1)*Qo,r*Qo);return o.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6",children:[o.jsxs("div",{className:"flex items-start justify-between mb-6",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(un,{className:"w-5 h-5 text-blue-600"}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:e.name})]}),o.jsx("p",{className:"text-gray-600 mt-1",children:e.description}),o.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:[e.num_rows.toLocaleString()," rows • ",o.jsx("span",{className:"font-medium",children:"Raw:"})," ",e.columns.length," columns • ",o.jsx("span",{className:"font-medium",children:"Processed:"})," ",l.length," columns • Last synced"," ",new Date(e.updated_at).toLocaleDateString()]})]}),o.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1 text-blue-600 hover:text-blue-800",children:[o.jsx(uO,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm font-medium",children:t?"Hide Statistics":"Show Statistics"}),t?o.jsx(Yl,{className:"w-4 h-4"}):o.jsx(mo,{className:"w-4 h-4"})]})]}),o.jsxs("div",{className:"space-y-6",children:[t&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(p=>o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2 gap-2",children:[o.jsx("h4",{className:"font-medium text-gray-900 break-normal max-w-[70%] word-break:break-word overflow-wrap:anywhere whitespace-pre-wrap",children:p.name.split("_").join("_​")}),o.jsx("span",{className:"text-xs font-medium text-gray-500 px-2 py-1 bg-gray-200 rounded-full flex-shrink-0",children:p.datatype})]}),o.jsx("p",{className:"text-sm text-gray-600 mb-3",children:p.description}),p.statistics&&o.jsx("div",{className:"space-y-1",children:Object.entries(p.statistics.raw).map(([m,h])=>{if(m==="counts"||m==="allowed_categories"||m==="value"||m==="label_encoder"||m==="label_decoder"||h===null||h===void 0)return null;let g;return typeof h=="number"?g=h.toLocaleString(void 0,{maximumFractionDigits:2}):typeof h=="object"?g=JSON.stringify(h):typeof h=="boolean"?g=h.toString():g=String(h),g.length>50&&(g=g.slice(0,47)+"..."),o.jsxs("div",{className:"flex justify-between text-sm gap-2",children:[o.jsxs("span",{className:"text-gray-500 flex-shrink-0",children:[m.charAt(0).toUpperCase()+m.slice(1),":"]}),o.jsx("span",{className:"font-medium text-gray-900 text-right break-all",children:g})]},m)})})]},p.name))}),c>1&&o.jsxs("div",{className:"flex items-center justify-between border-t pt-4",children:[o.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",(r-1)*Qo+1," to ",Math.min(r*Qo,e.columns.length)," of ",e.columns.length," columns"]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>a(p=>Math.max(1,p-1)),disabled:r===1,className:"p-1 rounded-md hover:bg-gray-100 disabled:opacity-50",children:o.jsx(qd,{className:"w-5 h-5"})}),o.jsxs("span",{className:"text-sm text-gray-600",children:["Page ",r," of ",c]}),o.jsx("button",{onClick:()=>a(p=>Math.min(c,p+1)),disabled:r===c,className:"p-1 rounded-md hover:bg-gray-100 disabled:opacity-50",children:o.jsx(Js,{className:"w-5 h-5"})})]})]})]}),o.jsx("div",{className:"overflow-x-auto",children:o.jsx("div",{className:"inline-block min-w-full align-middle",children:o.jsx("div",{className:"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5 rounded-lg",children:o.jsxs("table",{className:"min-w-full divide-y divide-gray-300",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsx("tr",{children:l.map(p=>o.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900",children:p},p))})}),o.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:e.sample_data.map((p,m)=>o.jsx("tr",{children:l.map(h=>o.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:p[h]===null||p[h]===void 0?"":typeof p[h]=="object"?JSON.stringify(p[h]):String(p[h])},`${m}-${h}`))},m))})]})})})})]})]})}function ww(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ww(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function TO(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ww(e))&&(r&&(r+=" "),r+=t);return r}const gy=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,xy=TO,OO=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:l}=t,c=Object.keys(a).map(m=>{const h=n==null?void 0:n[m],g=l==null?void 0:l[m];if(h===null)return null;const x=gy(h)||gy(g);return a[m][x]}),d=n&&Object.entries(n).reduce((m,h)=>{let[g,x]=h;return x===void 0||(m[g]=x),m},{}),p=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((m,h)=>{let{class:g,className:x,...j}=h;return Object.entries(j).every(y=>{let[_,N]=y;return Array.isArray(N)?N.includes({...l,...d}[_]):{...l,...d}[_]===N})?[...m,g,x]:m},[]);return xy(e,c,p,n==null?void 0:n.class,n==null?void 0:n.className)};function _w(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=_w(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function RO(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=_w(e))&&(r&&(r+=" "),r+=t);return r}const wg="-",IO=e=>{const t=MO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const d=c.split(wg);return d[0]===""&&d.length!==1&&d.shift(),jw(d,t)||LO(c)},getConflictingClassGroupIds:(c,d)=>{const p=n[c]||[];return d&&r[c]?[...p,...r[c]]:p}}},jw=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?jw(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const l=e.join(wg);return(c=t.validators.find(({validator:d})=>d(l)))==null?void 0:c.classGroupId},vy=/^\[(.+)\]$/,LO=e=>{if(vy.test(e)){const t=vy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},MO=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return FO(Object.entries(e.classGroups),n).forEach(([l,c])=>{th(c,r,l,t)}),r},th=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const l=a===""?t:yy(t,a);l.classGroupId=n;return}if(typeof a=="function"){if(DO(a)){th(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([l,c])=>{th(c,yy(t,l),n,r)})})},yy=(e,t)=>{let n=e;return t.split(wg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},DO=e=>e.isThemeGetter,FO=(e,t)=>t?e.map(([n,r])=>{const a=r.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,d])=>[t+c,d])):l);return[n,a]}):e,zO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(l,c)=>{n.set(l,c),t++,t>e&&(t=0,r=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=r.get(l))!==void 0)return a(l,c),c},set(l,c){n.has(l)?n.set(l,c):a(l,c)}}},Sw="!",$O=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],l=t.length,c=d=>{const p=[];let m=0,h=0,g;for(let N=0;N<d.length;N++){let b=d[N];if(m===0){if(b===a&&(r||d.slice(N,N+l)===t)){p.push(d.slice(h,N)),h=N+l;continue}if(b==="/"){g=N;continue}}b==="["?m++:b==="]"&&m--}const x=p.length===0?d:d.substring(h),j=x.startsWith(Sw),y=j?x.substring(1):x,_=g&&g>h?g-h:void 0;return{modifiers:p,hasImportantModifier:j,baseClassName:y,maybePostfixModifierPosition:_}};return n?d=>n({className:d,parseClassName:c}):c},UO=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},BO=e=>({cache:zO(e.cacheSize),parseClassName:$O(e),...IO(e)}),WO=/\s+/,HO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,l=[],c=e.trim().split(WO);let d="";for(let p=c.length-1;p>=0;p-=1){const m=c[p],{modifiers:h,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:j}=n(m);let y=!!j,_=r(y?x.substring(0,j):x);if(!_){if(!y){d=m+(d.length>0?" "+d:d);continue}if(_=r(x),!_){d=m+(d.length>0?" "+d:d);continue}y=!1}const N=UO(h).join(":"),b=g?N+Sw:N,w=b+_;if(l.includes(w))continue;l.push(w);const k=a(_,y);for(let R=0;R<k.length;++R){const D=k[R];l.push(b+D)}d=m+(d.length>0?" "+d:d)}return d};function qO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Nw(t))&&(r&&(r+=" "),r+=n);return r}const Nw=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Nw(e[r]))&&(n&&(n+=" "),n+=t);return n};function VO(e,...t){let n,r,a,l=c;function c(p){const m=t.reduce((h,g)=>g(h),e());return n=BO(m),r=n.cache.get,a=n.cache.set,l=d,d(p)}function d(p){const m=r(p);if(m)return m;const h=HO(p,n);return a(p,h),h}return function(){return l(qO.apply(null,arguments))}}const mt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kw=/^\[(?:([a-z-]+):)?(.+)\]$/i,GO=/^\d+\/\d+$/,KO=new Set(["px","full","screen"]),QO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,YO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,JO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pi=e=>$s(e)||KO.has(e)||GO.test(e),Di=e=>go(e,"length",oR),$s=e=>!!e&&!Number.isNaN(Number(e)),rm=e=>go(e,"number",$s),Xo=e=>!!e&&Number.isInteger(Number(e)),eR=e=>e.endsWith("%")&&$s(e.slice(0,-1)),Ie=e=>kw.test(e),Fi=e=>QO.test(e),tR=new Set(["length","size","percentage"]),nR=e=>go(e,tR,Cw),rR=e=>go(e,"position",Cw),iR=new Set(["image","url"]),aR=e=>go(e,iR,cR),sR=e=>go(e,"",lR),Yo=()=>!0,go=(e,t,n)=>{const r=kw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},oR=e=>XO.test(e)&&!YO.test(e),Cw=()=>!1,lR=e=>JO.test(e),cR=e=>ZO.test(e),uR=()=>{const e=mt("colors"),t=mt("spacing"),n=mt("blur"),r=mt("brightness"),a=mt("borderColor"),l=mt("borderRadius"),c=mt("borderSpacing"),d=mt("borderWidth"),p=mt("contrast"),m=mt("grayscale"),h=mt("hueRotate"),g=mt("invert"),x=mt("gap"),j=mt("gradientColorStops"),y=mt("gradientColorStopPositions"),_=mt("inset"),N=mt("margin"),b=mt("opacity"),w=mt("padding"),k=mt("saturate"),R=mt("scale"),D=mt("sepia"),T=mt("skew"),z=mt("space"),F=mt("translate"),W=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],ce=()=>["auto",Ie,t],se=()=>[Ie,t],be=()=>["",pi,Di],ve=()=>["auto",$s,Ie],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],fe=()=>["solid","dashed","dotted","double","none"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>["start","end","center","between","around","evenly","stretch"],ne=()=>["","0",Ie],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],pe=()=>[$s,Ie];return{cacheSize:500,separator:":",theme:{colors:[Yo],spacing:[pi,Di],blur:["none","",Fi,Ie],brightness:pe(),borderColor:[e],borderRadius:["none","","full",Fi,Ie],borderSpacing:se(),borderWidth:be(),contrast:pe(),grayscale:ne(),hueRotate:pe(),invert:ne(),gap:se(),gradientColorStops:[e],gradientColorStopPositions:[eR,Di],inset:ce(),margin:ce(),opacity:pe(),padding:se(),saturate:pe(),scale:pe(),sepia:ne(),skew:pe(),space:se(),translate:se()},classGroups:{aspect:[{aspect:["auto","square","video",Ie]}],container:["container"],columns:[{columns:[Fi]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),Ie]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Xo,Ie]}],basis:[{basis:ce()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ie]}],grow:[{grow:ne()}],shrink:[{shrink:ne()}],order:[{order:["first","last","none",Xo,Ie]}],"grid-cols":[{"grid-cols":[Yo]}],"col-start-end":[{col:["auto",{span:["full",Xo,Ie]},Ie]}],"col-start":[{"col-start":ve()}],"col-end":[{"col-end":ve()}],"grid-rows":[{"grid-rows":[Yo]}],"row-start-end":[{row:["auto",{span:[Xo,Ie]},Ie]}],"row-start":[{"row-start":ve()}],"row-end":[{"row-end":ve()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ie]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...K()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...K(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...K(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ie,t]}],"min-w":[{"min-w":[Ie,t,"min","max","fit"]}],"max-w":[{"max-w":[Ie,t,"none","full","min","max","fit","prose",{screen:[Fi]},Fi]}],h:[{h:[Ie,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ie,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fi,Di]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rm]}],"font-family":[{font:[Yo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ie]}],"line-clamp":[{"line-clamp":["none",$s,rm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pi,Ie]}],"list-image":[{"list-image":["none",Ie]}],"list-style-type":[{list:["none","disc","decimal",Ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pi,Di]}],"underline-offset":[{"underline-offset":["auto",pi,Ie]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:se()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),rR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},aR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[j]}],"gradient-via":[{via:[j]}],"gradient-to":[{to:[j]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...fe(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:fe()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...fe()]}],"outline-offset":[{"outline-offset":[pi,Ie]}],"outline-w":[{outline:[pi,Di]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[pi,Di]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fi,sR]}],"shadow-color":[{shadow:[Yo]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...ae(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ae()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",Fi,Ie]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[k]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ie]}],duration:[{duration:pe()}],ease:[{ease:["linear","in","out","in-out",Ie]}],delay:[{delay:pe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[Xo,Ie]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ie]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ie]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":se()}],"scroll-mx":[{"scroll-mx":se()}],"scroll-my":[{"scroll-my":se()}],"scroll-ms":[{"scroll-ms":se()}],"scroll-me":[{"scroll-me":se()}],"scroll-mt":[{"scroll-mt":se()}],"scroll-mr":[{"scroll-mr":se()}],"scroll-mb":[{"scroll-mb":se()}],"scroll-ml":[{"scroll-ml":se()}],"scroll-p":[{"scroll-p":se()}],"scroll-px":[{"scroll-px":se()}],"scroll-py":[{"scroll-py":se()}],"scroll-ps":[{"scroll-ps":se()}],"scroll-pe":[{"scroll-pe":se()}],"scroll-pt":[{"scroll-pt":se()}],"scroll-pr":[{"scroll-pr":se()}],"scroll-pb":[{"scroll-pb":se()}],"scroll-pl":[{"scroll-pl":se()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ie]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[pi,Di,rm]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},dR=VO(uR);function Pr(...e){return dR(RO(e))}const pR=OO("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",information:"border-transparent bg-blue-100 text-blue-800 hover:bg-blue-600",important:"border-transparent bg-red-100 text-red-800 hover:bg-red-600",warning:"border-transparent bg-yellow-100 text-yellow-800 hover:bg-yellow-600",success:"border-transparent bg-green-100 text-green-800 hover:bg-green-600"}},defaultVariants:{variant:"default"}});function Ia({className:e,variant:t,...n}){return o.jsx("div",{className:Pr(pR({variant:t}),e),...n})}const by=e=>e==="float"||e==="integer",vu=e=>{var t,n,r,a,l;return{method:(e==null?void 0:e.method)||"none",params:{constant:(t=e==null?void 0:e.params)==null?void 0:t.constant,categorical_min:((n=e==null?void 0:e.params)==null?void 0:n.categorical_min)??100,one_hot:((r=e==null?void 0:e.params)==null?void 0:r.one_hot)??!0,ordinal_encoding:((a=e==null?void 0:e.params)==null?void 0:a.ordinal_encoding)??!1,clip:(l=e==null?void 0:e.params)==null?void 0:l.clip}}};function fR({column:e,dataset:t,setColumnType:n,setDataset:r,constants:a,onUpdate:l}){var ve,U,fe,ae,K,ne,te,pe,Oe,dt,Je,Q,we,Ce,Ne,Y,de,xe,He,nn,Ke,fn,Bn,vt,Yt,yt,qt,Pt,mn,Nn,re,ge,tt,qe,nt,hn;const[c,d]=E.useState(!!((U=(ve=e.preprocessing_steps)==null?void 0:ve.inference)!=null&&U.method&&e.preprocessing_steps.inference.method!=="none")),p=e.datatype,[m,h]=E.useState(()=>{var ee;return vu((ee=e.preprocessing_steps)==null?void 0:ee.training)}),[g,x]=E.useState(()=>{var ee;return vu((ee=e.preprocessing_steps)==null?void 0:ee.inference)});E.useEffect(()=>{var ee,Ee;h(vu((ee=e.preprocessing_steps)==null?void 0:ee.training)),x(vu((Ee=e.preprocessing_steps)==null?void 0:Ee.inference))},[e.id]);const j=(ee,Ee)=>{let Se={};p==="categorical"&&(Ee==="categorical"?Se={...Se,categorical_min:100,one_hot:!0}:Ee!="none"&&(Se={...Se,one_hot:!0})),e.is_target&&(Se={...Se,ordinal_encoding:!0});const lt={method:Ee,params:Se};ee==="training"?(h(lt),l(lt,c?g:void 0,c)):(x(lt),l(m,lt,c))},y=(ee,Ee)=>{const Se=m,lt=h,Ze={...Se,params:{categorical_min:Se.params.categorical_min,one_hot:Se.params.one_hot,ordinal_encoding:Se.params.ordinal_encoding,...Ee}};lt(Ze),l(Ze,c?g:void 0,c)},_=(ee,Ee)=>{const Se=m,lt=h,Ze={...Se,params:{...Se.params,clip:{...Se.params.clip,...Ee}}};lt(Ze),l(Ze,c?g:void 0,c)},N=(ee,Ee)=>{const Se=ee==="training"?m:g,lt=ee==="training"?h:x,Ze={...Se,params:{...Se.params,constant:Ee}};lt(Ze),ee==="training"?l(Ze,c?g:void 0,c):l(m,Ze,c)},b=ee=>{var Se,lt;const Ee=ee==="training"?m:g;return Ee.method!=="constant"?null:o.jsxs("div",{className:"mt-4",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Constant Value"}),by(p)?o.jsx("input",{type:"number",value:((Se=Ee.params)==null?void 0:Se.constant)??"",onChange:Ze=>N(ee,Ze.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"Enter a number..."}):o.jsx("input",{type:"text",value:((lt=Ee.params)==null?void 0:lt.constant)??"",onChange:Ze=>N(ee,Ze.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"Enter a value..."})]})},[w,k]=E.useState(!1),R=ee=>{const Ee=t.columns.map(Se=>({...Se,drop_if_null:Se.name===e.name?ee.target.checked:Se.drop_if_null}));r({...t,columns:Ee})},D=ee=>{const Ee=t.columns.map(Se=>({...Se,description:Se.name===e.name?ee.target.value:Se.description}));r({...t,columns:Ee})},T=()=>{k(!1)},z=ee=>{ee.key==="Enter"?(ee.preventDefault(),k(!1)):ee.key==="Escape"&&k(!1)},F=()=>{k(!0)};let W=((fe=e.statistics)==null?void 0:fe.processed.null_count)||((K=(ae=e.statistics)==null?void 0:ae.raw)==null?void 0:K.null_count)||0;const H=W&&((ne=e.statistics)!=null&&ne.raw.num_rows)?W/e.statistics.raw.num_rows*100:0,ce=(pe=(te=e.statistics)==null?void 0:te.processed)!=null&&pe.null_count&&((Oe=e.statistics)!=null&&Oe.raw.num_rows)?e.statistics.processed.null_count/e.statistics.raw.num_rows*100:0,se=((dt=e.statistics)==null?void 0:dt.raw.num_rows)??0,be=ee=>{var lt,Ze,gn,Wn,Hn,Mr;const Ee=m;let Se;if(Ee.method==="most_frequent"&&((lt=e.statistics)==null?void 0:lt.raw.most_frequent_value)!==void 0)Se=`Most Frequent Value: ${e.statistics.raw.most_frequent_value}`;else if(Ee.method==="ffill"){const kn=(Ze=e.statistics)==null?void 0:Ze.raw.last_value;kn!==void 0?Se=`Forward Fill using Last Value: ${kn}`:Se="Set date column & apply preprocessing to see last value"}else if(Ee.method==="median"&&((Wn=(gn=e.statistics)==null?void 0:gn.raw)==null?void 0:Wn.median)!==void 0)Se=`Median: ${e.statistics.raw.median}`;else if(Ee.method==="mean"&&((Mr=(Hn=e.statistics)==null?void 0:Hn.raw)==null?void 0:Mr.mean)!==void 0)Se=`Mean: ${e.statistics.raw.mean}`;else return null;return o.jsx("div",{className:"mt-4 bg-yellow-50 rounded-lg p-4",children:o.jsx("span",{className:"text-sm font-medium text-yellow-700",children:Se})})};return o.jsxs("div",{className:"space-y-8",children:[o.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex-1 max-w-[70%]",children:[o.jsx("h2",{className:"text-2xl font-semibold text-gray-900",children:e.name}),o.jsx("div",{className:"mt-1 flex items-start gap-1",children:w?o.jsxs("div",{className:"flex-1",children:[o.jsx("textarea",{value:e.description||"",onChange:D,onBlur:T,onKeyDown:z,className:"w-full px-2 py-1 text-sm text-gray-900 border border-blue-500 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",rows:2,autoFocus:!0,placeholder:"Enter column description..."}),o.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Press Enter to save, Escape to cancel"})]}):o.jsxs("div",{className:"flex items-start gap-1 max-w-[100%]",children:[o.jsx("p",{className:"text-sm text-gray-500 cursor-pointer flex-grow line-clamp-3",onClick:F,children:e.description||"No description provided"}),o.jsx("button",{onClick:F,className:"p-1 text-gray-400 hover:text-gray-600 rounded-md hover:bg-gray-100 flex-shrink-0",children:o.jsx(NO,{className:"w-4 h-4"})})]})})]}),o.jsx("div",{className:"flex items-center gap-4 flex-shrink-0",children:o.jsxs("div",{className:"relative flex items-center gap-2",children:[o.jsxs("div",{className:"absolute right-0 -top-8 flex items-center gap-2",children:[e.required&&o.jsx(Ia,{variant:"secondary",className:"bg-blue-100 text-blue-800",children:"Required"}),e.is_computed&&o.jsxs(Ia,{variant:"secondary",className:"bg-purple-100 text-purple-800",children:[o.jsx(od,{className:"w-3 h-3 mr-1"}),"Computed"]})]}),e.is_target?o.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-purple-100 text-purple-800",children:"Target Column"}):o.jsx("div",{className:"flex items-center gap-2",children:o.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[o.jsx("input",{type:"checkbox",checked:e.drop_if_null,onChange:R,className:"rounded border-gray-300 text-red-600 focus:ring-red-500"}),o.jsxs("span",{className:"flex items-center gap-1 text-gray-700",children:[o.jsx(ho,{className:"w-4 h-4 text-gray-400"}),"Drop if null"]})]})})]})})]}),o.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-6",children:[o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(un,{className:"w-4 h-4 text-gray-500"}),o.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Raw Data Statistics"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Null Values:"}),o.jsx("span",{className:"font-medium text-gray-900",children:(Q=(Je=e.statistics)==null?void 0:Je.raw)==null?void 0:Q.null_count.toLocaleString()})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Total Rows:"}),o.jsx("span",{className:"font-medium text-gray-900",children:se.toLocaleString()})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Null Percentage:"}),o.jsxs("span",{className:"font-medium text-gray-900",children:[H.toFixed(2),"%"]})]}),o.jsx("div",{className:"mt-2",children:o.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-blue-600 rounded-full",style:{width:`${H}%`}})})})]})]}),o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(eh,{className:"w-4 h-4 text-gray-500"}),o.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Processed Data Statistics"})]}),(we=t==null?void 0:t.preprocessing_steps)!=null&&we.training?o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Null Values:"}),o.jsx("span",{className:"font-medium text-gray-900",children:(Y=(Ne=(Ce=e.statistics)==null?void 0:Ce.processed)==null?void 0:Ne.null_count)==null?void 0:Y.toLocaleString()})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Total Rows:"}),o.jsx("span",{className:"font-medium text-gray-900",children:(He=(xe=(de=e.statistics)==null?void 0:de.processed)==null?void 0:xe.num_rows)==null?void 0:He.toLocaleString()})]}),o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Null Percentage:"}),o.jsxs("span",{className:"font-medium text-gray-900",children:[ce.toFixed(2),"%"]})]}),o.jsx("div",{className:"mt-2",children:o.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-blue-600 rounded-full",style:{width:`${ce}%`}})})})]}):o.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No preprocessing configured"})]})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-6",children:[o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsx("span",{className:"text-sm text-gray-500",children:"Type"}),o.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:e.datatype})]}),o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsx("span",{className:"text-sm text-gray-500",children:"Unique Values"}),o.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:((fn=(Ke=(nn=e.statistics)==null?void 0:nn.processed)==null?void 0:Ke.unique_count)==null?void 0:fn.toLocaleString())??"N/A"})]}),o.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[o.jsx("span",{className:"text-sm text-gray-500",children:"Null Values"}),o.jsx("p",{className:"text-lg font-medium text-gray-900 mt-1",children:((Yt=(vt=(Bn=e.statistics)==null?void 0:Bn.processed)==null?void 0:vt.null_count)==null?void 0:Yt.toLocaleString())??"0"})]})]}),(yt=e.statistics)!=null&&yt.processed.null_count?o.jsxs("div",{className:"mt-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Null Distribution"}),o.jsxs("span",{className:"text-sm text-gray-500",children:[H,"% of values are null"]})]}),o.jsx("div",{className:"relative h-2 bg-gray-100 rounded-full overflow-hidden",children:o.jsx("div",{className:"absolute top-0 left-0 h-full bg-yellow-400 rounded-full",style:{width:`${H}%`}})})]}):o.jsx("div",{className:"mt-6 bg-green-50 rounded-lg p-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full"}),o.jsx("span",{className:"text-sm text-green-700",children:"This column has no null values"})]})}),((Pt=(qt=e.statistics)==null?void 0:qt.raw)==null?void 0:Pt.sample_data)&&o.jsxs("div",{className:"mt-6",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Sample Values"}),o.jsx("div",{className:"bg-gray-50 rounded-lg p-4",children:o.jsx("div",{className:"flex flex-wrap gap-2",children:((Nn=(mn=e.statistics)==null?void 0:mn.raw)==null?void 0:Nn.sample_data)&&e.statistics.raw.sample_data.map((ee,Ee)=>o.jsx("span",{className:"px-2 py-1 bg-gray-100 rounded text-sm text-gray-700",children:String(ee)},Ee))})})]})]}),e.lineage&&e.lineage.length>0&&o.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[o.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(wO,{className:"w-5 h-5 text-gray-500"}),"Column Lineage"]}),o.jsx("div",{className:"space-y-4",children:e.lineage.map((ee,Ee)=>o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 ${ee.key==="raw_dataset"?"bg-gray-100":ee.key==="computed_by_feature"?"bg-purple-100":"bg-blue-100"}`,children:ee.key==="raw_dataset"?o.jsx(un,{className:"w-4 h-4 text-gray-600"}):ee.key==="computed_by_feature"?o.jsx(od,{className:"w-4 h-4 text-purple-600"}):o.jsx(aa,{className:"w-4 h-4 text-blue-600"})}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("p",{className:"text-sm font-medium text-gray-900",children:ee.description}),ee.timestamp&&o.jsx("span",{className:"text-xs text-gray-500",children:new Date(ee.timestamp).toLocaleString()})]}),Ee<e.lineage.length-1&&o.jsx("div",{className:"ml-4 mt-2 mb-2 w-0.5 h-4 bg-gray-200"})]})]},Ee))})]}),o.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[o.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(aa,{className:"w-5 h-5 text-gray-500"}),"Data Type"]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Column Type"}),o.jsx("select",{value:p,disabled:!0,className:"w-full rounded-md border-gray-300 bg-gray-50 shadow-sm text-gray-700 cursor-not-allowed",children:a.column_types.map(ee=>o.jsx("option",{value:ee.value,children:ee.label},ee.value))}),o.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Column type cannot be changed after creation"})]}),o.jsxs("div",{className:"bg-gray-50 rounded-md p-4",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Sample Data"}),o.jsx("div",{className:"space-y-2",children:Array.isArray(e.sample_values)?e.sample_values.slice(0,3).map((ee,Ee)=>o.jsx("span",{className:"m-1 flex-items items-center",children:o.jsx(Ia,{children:String(ee)})},Ee)):[]})]})]})]}),o.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-6",children:[o.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(eh,{className:"w-5 h-5 text-gray-500"}),"Preprocessing Strategy"]}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Training Strategy"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"checkbox",id:"useDistinctInference",checked:c,onChange:ee=>{d(ee.target.checked),l(m,ee.target.checked?g:void 0,ee.target.checked)},className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),o.jsx("label",{htmlFor:"useDistinctInference",className:"text-sm text-gray-700",children:"Use different strategy for inference"})]})]}),o.jsxs("div",{className:c?"grid grid-cols-2 gap-6":"",children:[o.jsxs("div",{children:[o.jsxs("select",{value:m.method,onChange:ee=>j("training",ee.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",children:[o.jsx("option",{value:"none",children:"No preprocessing"}),(re=a.preprocessing_strategies[p])==null?void 0:re.map(ee=>o.jsx("option",{value:ee.value,children:ee.label},ee.value))]}),be(),b("training"),e.datatype==="categorical"&&m.method==="categorical"&&o.jsx("div",{className:"mt-4 space-y-4 bg-gray-50 rounded-lg p-4",children:o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Minimum Category Instances"}),o.jsx("input",{type:"number",min:"1",value:m.params.categorical_min,onChange:ee=>y("training",{categorical_min:parseInt(ee.target.value)}),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500"}),o.jsx("p",{className:"mt-1 text-sm text-gray-500",children:'Categories with fewer instances will be grouped as "OTHER"'})]})}),e.datatype==="categorical"&&m.method!=="none"&&o.jsxs("div",{className:"mt-4 space-y-4 bg-gray-50 rounded-lg p-4",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Encoding"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"radio",id:"oneHotEncode",name:"encoding",checked:m.params.one_hot,onChange:()=>y("training",{one_hot:!0,ordinal_encoding:!1}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),o.jsx("label",{htmlFor:"oneHotEncode",className:"text-sm text-gray-700",children:"One-hot encode categories"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"radio",id:"ordinalEncode",name:"encoding",checked:m.params.ordinal_encoding,onChange:()=>y("training",{one_hot:!1,ordinal_encoding:!0}),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),o.jsx("label",{htmlFor:"ordinalEncode",className:"text-sm text-gray-700",children:"Ordinal encode categories"})]})]})]}),c&&o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(xg,{className:"w-4 h-4 text-gray-400"}),o.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Inference Strategy"})]}),o.jsxs("select",{value:g.method,onChange:ee=>j("inference",ee.target.value),className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",children:[o.jsx("option",{value:"none",children:"No preprocessing"}),(ge=a.preprocessing_strategies[p])==null?void 0:ge.map(ee=>o.jsx("option",{value:ee.value,children:ee.label},ee.value))]}),b("inference")]})]})]}),by(p)&&m.method!=="none"&&o.jsxs("div",{className:"border-t pt-4",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Clip Values"}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Min Value"}),o.jsx("input",{type:"number",value:((qe=(tt=m.params)==null?void 0:tt.clip)==null?void 0:qe.min)??"",onChange:ee=>{_("training",{min:ee.target.value?Number(ee.target.value):void 0})},className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"No minimum"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Max Value"}),o.jsx("input",{type:"number",value:((hn=(nt=m.params)==null?void 0:nt.clip)==null?void 0:hn.max)??"",onChange:ee=>{_("training",{max:ee.target.value?Number(ee.target.value):void 0})},className:"w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500",placeholder:"No maximum"})]})]})]})]})]})]})}function mR({columns:e,selectedColumn:t,onColumnSelect:n,onToggleHidden:r}){return Un().props,o.jsx("div",{className:"space-y-2 pb-2",children:e.map(a=>{var l,c,d;return o.jsxs("div",{className:`p-3 rounded-lg border ${t===a.name?"border-blue-500 bg-blue-50":a.is_target?"border-purple-500 bg-purple-50":a.hidden?"border-gray-200 bg-gray-50":"border-gray-200 hover:border-gray-300"} transition-colors duration-150`,children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[a.is_target&&o.jsx(bg,{className:"w-4 h-4 text-purple-500"}),o.jsx("span",{className:`font-medium ${a.hidden?"text-gray-500":"text-gray-900"}`,children:a.name}),o.jsx("span",{className:"text-xs px-2 py-0.5 bg-gray-100 text-gray-600 rounded-full",children:a.datatype})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[!a.is_target&&o.jsx("button",{onClick:()=>r(a.name),className:`p-1 rounded hover:bg-gray-100 ${a.hidden?"text-gray-500":"text-gray-400 hover:text-gray-600"}`,title:a.hidden?"Show column":"Hide column",children:a.hidden?o.jsx(Zm,{className:"w-4 h-4"}):o.jsx(fw,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>n(a.name),className:"p-1 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-100",title:"Configure preprocessing",children:o.jsx(aa,{className:"w-4 h-4"})})]})]}),o.jsxs("div",{className:"text-sm text-gray-500",children:[a.description&&o.jsx("p",{className:`mb-1 line-clamp-1 ${a.drop_if_null?"text-gray-400":""}`,children:a.description}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.required&&o.jsxs("div",{className:"flex items-center gap-1 text-blue-600",children:[o.jsx(CO,{className:"w-3 h-3"}),o.jsx("span",{className:"text-xs",children:"required"})]}),a.is_computed&&o.jsxs("div",{className:"flex items-center gap-1 text-purple-600",children:[o.jsx(od,{className:"w-3 h-3"}),o.jsx("span",{className:"text-xs",children:"computed"})]}),a.preprocessing_steps&&((l=a.preprocessing_steps)==null?void 0:l.training)&&((d=(c=a.preprocessing_steps)==null?void 0:c.training)==null?void 0:d.method)!=="none"&&o.jsxs("div",{className:"flex items-center gap-1 text-blue-600",children:[o.jsx(Mn,{className:"w-3 h-3"}),o.jsx("span",{className:"text-xs",children:"preprocessing configured"})]}),a.hidden&&o.jsxs("div",{className:"flex items-center gap-1 text-gray-400",children:[o.jsx(Zm,{className:"w-3 h-3"}),o.jsx("span",{className:"text-xs",children:"Hidden from training"})]})]})]})]},a.name)})})}const im=5;function hR({types:e,activeFilters:t,onFilterChange:n,columnStats:r,colHasPreprocessingSteps:a,columns:l}){const c=y=>{switch(y){case"training":return`${r.training} columns`;case"hidden":return`${r.hidden} columns`;case"preprocessed":return`${r.withPreprocessing} columns`;case"nulls":return`${r.withNulls} columns`;case"computed":return`${r.computed} columns`;case"required":return`${r.required} columns`;default:return`${r.total} columns`}},d=y=>{var _,N,b,w;return!((N=(_=y.statistics)==null?void 0:_.processed)!=null&&N.null_count)||!((w=(b=y.statistics)==null?void 0:b.processed)!=null&&w.num_rows)?0:y.statistics.processed.null_count/y.statistics.processed.num_rows*100},p=l.filter(y=>{var _,N,b,w;return((N=(_=y.statistics)==null?void 0:_.processed)==null?void 0:N.null_count)&&((w=(b=y.statistics)==null?void 0:b.processed)==null?void 0:w.null_count)>0}).sort((y,_)=>d(_)-d(y)),[m,h]=E.useState(1),g=Math.ceil(p.length/im),x=p.slice((m-1)*im,m*im),j=y=>{n({...t,types:t.types.includes(y)?t.types.filter(_=>_!==y):[...t.types,y]})};return o.jsxs("div",{className:"p-4 border-b space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h3",{className:"text-sm font-medium text-gray-900 flex items-center gap-2",children:[o.jsx(bO,{className:"w-4 h-4"}),"Column Views"]}),o.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",r.filtered," of ",r.total," columns"]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("button",{onClick:()=>n({...t,view:"all"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="all"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(un,{className:"w-4 h-4"}),"All",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("all"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"training"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="training"?"bg-green-100 text-green-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(fw,{className:"w-4 h-4"}),"Training",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("training"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"hidden"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="hidden"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(Zm,{className:"w-4 h-4"}),"Hidden",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("hidden"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"preprocessed"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="preprocessed"?"bg-blue-100 text-blue-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(eh,{className:"w-4 h-4"}),"Preprocessed",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("preprocessed"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"nulls"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="nulls"?"bg-yellow-100 text-yellow-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(bw,{className:"w-4 h-4"}),"Has Nulls",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("nulls"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"computed"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="computed"?"bg-purple-100 text-purple-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(od,{className:"w-4 h-4"}),"Computed",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("computed"),")"]})]}),o.jsxs("button",{onClick:()=>n({...t,view:"required"}),className:`inline-flex items-center gap-1 px-3 py-1.5 rounded-md text-sm font-medium ${t.view==="required"?"bg-blue-100 text-blue-900":"text-gray-600 hover:bg-gray-50"}`,children:[o.jsx(bg,{className:"w-4 h-4"}),"Required",o.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",c("required"),")"]})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"text-xs font-medium text-gray-700 mb-2 block",children:"Column Types"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(y=>o.jsx("button",{onClick:()=>j(y),className:`px-2 py-1 rounded-md text-xs font-medium ${t.types.includes(y)?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:y},y))})]}),t.view==="preprocessed"&&r.withPreprocessing>0&&o.jsxs("div",{className:"bg-blue-50 rounded-lg p-3",children:[o.jsx("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:"Preprocessing Overview"}),o.jsx("div",{className:"space-y-2",children:l.filter(a).map(y=>{var _;return o.jsxs("div",{className:"flex items-center justify-between text-sm",children:[o.jsx("span",{className:"text-blue-800",children:y.name}),o.jsx("span",{className:"text-blue-600",children:(_=y.preprocessing_steps)==null?void 0:_.training.method})]},y.name)})})]}),t.view==="nulls"&&p.length>0&&o.jsxs("div",{className:"bg-yellow-50 rounded-lg p-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx("h4",{className:"text-sm font-medium text-yellow-900",children:"Null Value Distribution"}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-yellow-700",children:[o.jsx("button",{onClick:()=>h(y=>Math.max(1,y-1)),disabled:m===1,className:"p-1 rounded hover:bg-yellow-100 disabled:opacity-50",children:o.jsx(qd,{className:"w-4 h-4"})}),o.jsxs("span",{children:["Page ",m," of ",g]}),o.jsx("button",{onClick:()=>h(y=>Math.min(g,y+1)),disabled:m===g,className:"p-1 rounded hover:bg-yellow-100 disabled:opacity-50",children:o.jsx(Js,{className:"w-4 h-4"})})]})]}),o.jsx("div",{className:"space-y-2",children:x.map(y=>{var _,N,b,w;return o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-yellow-800 text-sm min-w-[120px]",children:y.name}),o.jsx("div",{className:"flex-1 h-2 bg-yellow-100 rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-yellow-400 rounded-full",style:{width:`${d(y)}%`}})}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("span",{className:"text-yellow-800 text-xs",children:[d(y).toFixed(1),"% null"]}),o.jsxs("span",{className:"text-yellow-600 text-xs",children:["(",(N=(_=y.statistics)==null?void 0:_.nullCount)==null?void 0:N.toLocaleString()," / ",(w=(b=y.statistics)==null?void 0:b.rowCount)==null?void 0:w.toLocaleString(),")"]})]})]},y.name)})}),o.jsxs("div",{className:"mt-3 text-sm text-yellow-700",children:[p.length," columns contain null values"]})]})]})]})}function gR({saving:e,saved:t,error:n}){return n?o.jsxs("div",{className:"flex items-center gap-2 text-red-600",children:[o.jsx(Mn,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm font-medium",children:n})]}):e?o.jsxs("div",{className:"flex items-center gap-2 text-blue-600",children:[o.jsx(qa,{className:"w-4 h-4 animate-spin"}),o.jsx("span",{className:"text-sm font-medium",children:"Saving changes..."})]}):t?o.jsxs("div",{className:"flex items-center gap-2 text-green-600",children:[o.jsx(yw,{className:"w-4 h-4"}),o.jsx("span",{className:"text-sm font-medium",children:"Changes saved"})]}):null}var Ew={exports:{}},nr={},Aw={exports:{}},Pw={};/**
448
448
  * @license React
449
449
  * scheduler.production.min.js
450
450
  *
@@ -519,4 +519,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
519
519
  flex-grow: 1;
520
520
  }
521
521
  `},nonce:l}),o.jsx(Ni.div,{"data-radix-scroll-area-viewport":"",...c,asChild:a,ref:m,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...e.style},children:ZD({asChild:a,children:r},h=>o.jsx("div",{"data-radix-scroll-area-content":"",ref:d.onContentChange,style:{minWidth:d.scrollbarXEnabled?"fit-content":void 0},children:h}))})]})});d2.displayName=u2;var Jr="ScrollAreaScrollbar",g0=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=yr(Jr,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:c}=a,d=e.orientation==="horizontal";return E.useEffect(()=>(d?l(!0):c(!0),()=>{d?l(!1):c(!1)}),[d,l,c]),a.type==="hover"?o.jsx(HD,{...r,ref:t,forceMount:n}):a.type==="scroll"?o.jsx(qD,{...r,ref:t,forceMount:n}):a.type==="auto"?o.jsx(p2,{...r,ref:t,forceMount:n}):a.type==="always"?o.jsx(x0,{...r,ref:t}):null});g0.displayName=Jr;var HD=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=yr(Jr,e.__scopeScrollArea),[l,c]=E.useState(!1);return E.useEffect(()=>{const d=a.scrollArea;let p=0;if(d){const m=()=>{window.clearTimeout(p),c(!0)},h=()=>{p=window.setTimeout(()=>c(!1),a.scrollHideDelay)};return d.addEventListener("pointerenter",m),d.addEventListener("pointerleave",h),()=>{window.clearTimeout(p),d.removeEventListener("pointerenter",m),d.removeEventListener("pointerleave",h)}}},[a.scrollArea,a.scrollHideDelay]),o.jsx(yo,{present:n||l,children:o.jsx(p2,{"data-state":l?"visible":"hidden",...r,ref:t})})}),qD=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=yr(Jr,e.__scopeScrollArea),l=e.orientation==="horizontal",c=cp(()=>p("SCROLL_END"),100),[d,p]=BD("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return E.useEffect(()=>{if(d==="idle"){const m=window.setTimeout(()=>p("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(m)}},[d,a.scrollHideDelay,p]),E.useEffect(()=>{const m=a.viewport,h=l?"scrollLeft":"scrollTop";if(m){let g=m[h];const x=()=>{const j=m[h];g!==j&&(p("SCROLL"),c()),g=j};return m.addEventListener("scroll",x),()=>m.removeEventListener("scroll",x)}},[a.viewport,l,p,c]),o.jsx(yo,{present:n||d!=="hidden",children:o.jsx(x0,{"data-state":d==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ra(e.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:ra(e.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),p2=E.forwardRef((e,t)=>{const n=yr(Jr,e.__scopeScrollArea),{forceMount:r,...a}=e,[l,c]=E.useState(!1),d=e.orientation==="horizontal",p=cp(()=>{if(n.viewport){const m=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;c(d?m:h)}},10);return oo(n.viewport,p),oo(n.content,p),o.jsx(yo,{present:r||l,children:o.jsx(x0,{"data-state":l?"visible":"hidden",...a,ref:t})})}),x0=E.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=yr(Jr,e.__scopeScrollArea),l=E.useRef(null),c=E.useRef(0),[d,p]=E.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=x2(d.viewport,d.content),h={...r,sizes:d,onSizesChange:p,hasThumb:m>0&&m<1,onThumbChange:x=>l.current=x,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:x=>c.current=x};function g(x,j){return YD(x,c.current,d,j)}return n==="horizontal"?o.jsx(VD,{...h,ref:t,onThumbPositionChange:()=>{if(a.viewport&&l.current){const x=a.viewport.scrollLeft,j=Gb(x,d,a.dir);l.current.style.transform=`translate3d(${j}px, 0, 0)`}},onWheelScroll:x=>{a.viewport&&(a.viewport.scrollLeft=x)},onDragScroll:x=>{a.viewport&&(a.viewport.scrollLeft=g(x,a.dir))}}):n==="vertical"?o.jsx(GD,{...h,ref:t,onThumbPositionChange:()=>{if(a.viewport&&l.current){const x=a.viewport.scrollTop,j=Gb(x,d);l.current.style.transform=`translate3d(0, ${j}px, 0)`}},onWheelScroll:x=>{a.viewport&&(a.viewport.scrollTop=x)},onDragScroll:x=>{a.viewport&&(a.viewport.scrollTop=g(x))}}):null}),VD=E.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,l=yr(Jr,e.__scopeScrollArea),[c,d]=E.useState(),p=E.useRef(null),m=pa(t,p,l.onScrollbarXChange);return E.useEffect(()=>{p.current&&d(getComputedStyle(p.current))},[p]),o.jsx(m2,{"data-orientation":"horizontal",...a,ref:m,sizes:n,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":lp(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,g)=>{if(l.viewport){const x=l.viewport.scrollLeft+h.deltaX;e.onWheelScroll(x),y2(x,g)&&h.preventDefault()}},onResize:()=>{p.current&&l.viewport&&c&&r({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:Dd(c.paddingLeft),paddingEnd:Dd(c.paddingRight)}})}})}),GD=E.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,l=yr(Jr,e.__scopeScrollArea),[c,d]=E.useState(),p=E.useRef(null),m=pa(t,p,l.onScrollbarYChange);return E.useEffect(()=>{p.current&&d(getComputedStyle(p.current))},[p]),o.jsx(m2,{"data-orientation":"vertical",...a,ref:m,sizes:n,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":lp(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,g)=>{if(l.viewport){const x=l.viewport.scrollTop+h.deltaY;e.onWheelScroll(x),y2(x,g)&&h.preventDefault()}},onResize:()=>{p.current&&l.viewport&&c&&r({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:Dd(c.paddingTop),paddingEnd:Dd(c.paddingBottom)}})}})}),[KD,f2]=l2(Jr),m2=E.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:l,onThumbPointerUp:c,onThumbPointerDown:d,onThumbPositionChange:p,onDragScroll:m,onWheelScroll:h,onResize:g,...x}=e,j=yr(Jr,n),[y,_]=E.useState(null),N=pa(t,W=>_(W)),b=E.useRef(null),w=E.useRef(""),k=j.viewport,R=r.content-r.viewport,D=hi(h),T=hi(p),z=cp(g,10);function F(W){if(b.current){const H=W.clientX-b.current.left,ce=W.clientY-b.current.top;m({x:H,y:ce})}}return E.useEffect(()=>{const W=H=>{const ce=H.target;(y==null?void 0:y.contains(ce))&&D(H,R)};return document.addEventListener("wheel",W,{passive:!1}),()=>document.removeEventListener("wheel",W,{passive:!1})},[k,y,R,D]),E.useEffect(T,[r,T]),oo(y,z),oo(j.content,z),o.jsx(KD,{scope:n,scrollbar:y,hasThumb:a,onThumbChange:hi(l),onThumbPointerUp:hi(c),onThumbPositionChange:T,onThumbPointerDown:hi(d),children:o.jsx(Ni.div,{...x,ref:N,style:{position:"absolute",...x.style},onPointerDown:ra(e.onPointerDown,W=>{W.button===0&&(W.target.setPointerCapture(W.pointerId),b.current=y.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",j.viewport&&(j.viewport.style.scrollBehavior="auto"),F(W))}),onPointerMove:ra(e.onPointerMove,F),onPointerUp:ra(e.onPointerUp,W=>{const H=W.target;H.hasPointerCapture(W.pointerId)&&H.releasePointerCapture(W.pointerId),document.body.style.webkitUserSelect=w.current,j.viewport&&(j.viewport.style.scrollBehavior=""),b.current=null})})})}),Md="ScrollAreaThumb",h2=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=f2(Md,e.__scopeScrollArea);return o.jsx(yo,{present:n||a.hasThumb,children:o.jsx(QD,{ref:t,...r})})}),QD=E.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,l=yr(Md,n),c=f2(Md,n),{onThumbPositionChange:d}=c,p=pa(t,g=>c.onThumbChange(g)),m=E.useRef(),h=cp(()=>{m.current&&(m.current(),m.current=void 0)},100);return E.useEffect(()=>{const g=l.viewport;if(g){const x=()=>{if(h(),!m.current){const j=JD(g,d);m.current=j,d()}};return d(),g.addEventListener("scroll",x),()=>g.removeEventListener("scroll",x)}},[l.viewport,h,d]),o.jsx(Ni.div,{"data-state":c.hasThumb?"visible":"hidden",...a,ref:p,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ra(e.onPointerDownCapture,g=>{const j=g.target.getBoundingClientRect(),y=g.clientX-j.left,_=g.clientY-j.top;c.onThumbPointerDown({x:y,y:_})}),onPointerUp:ra(e.onPointerUp,c.onThumbPointerUp)})});h2.displayName=Md;var v0="ScrollAreaCorner",g2=E.forwardRef((e,t)=>{const n=yr(v0,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?o.jsx(XD,{...e,ref:t}):null});g2.displayName=v0;var XD=E.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=yr(v0,n),[l,c]=E.useState(0),[d,p]=E.useState(0),m=!!(l&&d);return oo(a.scrollbarX,()=>{var g;const h=((g=a.scrollbarX)==null?void 0:g.offsetHeight)||0;a.onCornerHeightChange(h),p(h)}),oo(a.scrollbarY,()=>{var g;const h=((g=a.scrollbarY)==null?void 0:g.offsetWidth)||0;a.onCornerWidthChange(h),c(h)}),m?o.jsx(Ni.div,{...r,ref:t,style:{width:l,height:d,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Dd(e){return e?parseInt(e,10):0}function x2(e,t){const n=e/t;return isNaN(n)?0:n}function lp(e){const t=x2(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function YD(e,t,n,r="ltr"){const a=lp(n),l=a/2,c=t||l,d=a-c,p=n.scrollbar.paddingStart+c,m=n.scrollbar.size-n.scrollbar.paddingEnd-d,h=n.content-n.viewport,g=r==="ltr"?[0,h]:[h*-1,0];return v2([p,m],g)(e)}function Gb(e,t,n="ltr"){const r=lp(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=t.scrollbar.size-a,c=t.content-t.viewport,d=l-r,p=n==="ltr"?[0,c]:[c*-1,0],m=UD(e,p);return v2([0,c],[0,d])(m)}function v2(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function y2(e,t){return e>0&&e<t}var JD=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const l={left:e.scrollLeft,top:e.scrollTop},c=n.left!==l.left,d=n.top!==l.top;(c||d)&&t(),n=l,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function cp(e,t){const n=hi(e),r=E.useRef(0);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),E.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function oo(e,t){const n=hi(t);Hl(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}function ZD(e,t){const{asChild:n,children:r}=e;if(!n)return typeof t=="function"?t(r):t;const a=E.Children.only(r);return E.cloneElement(a,{children:typeof t=="function"?t(a.props.children):t})}var b2=c2,eF=d2,tF=g2;const w2=E.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(b2,{ref:r,className:Pr("relative overflow-hidden",e),...n,children:[o.jsx(eF,{className:"h-full w-full rounded-[inherit]",children:t}),o.jsx(_2,{}),o.jsx(tF,{})]}));w2.displayName=b2.displayName;const _2=E.forwardRef(({className:e,orientation:t="vertical",...n},r)=>o.jsx(g0,{ref:r,orientation:t,className:Pr("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:o.jsx(h2,{className:"relative flex-1 rounded-full bg-border"})}));_2.displayName=g0.displayName;var nF="Separator",Kb="horizontal",rF=["horizontal","vertical"],j2=E.forwardRef((e,t)=>{const{decorative:n,orientation:r=Kb,...a}=e,l=iF(r)?r:Kb,d=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return o.jsx(Ni.div,{"data-orientation":l,...d,...a,ref:t})});j2.displayName=nF;function iF(e){return rF.includes(e)}var S2=j2;const N2=E.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>o.jsx(S2,{ref:a,decorative:n,orientation:t,className:Pr("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));N2.displayName=S2.displayName;function aF({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=sF({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:r,d=hi(n),p=E.useCallback(m=>{if(l){const g=typeof m=="function"?m(e):m;g!==e&&d(g)}else a(m)},[l,e,a,d]);return[c,p]}function sF({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,a=E.useRef(r),l=hi(t);return E.useEffect(()=>{a.current!==r&&(l(r),a.current=r)},[r,a,l]),n}var oF=S3.useId||(()=>{}),lF=0;function cF(e){const[t,n]=E.useState(oF());return Hl(()=>{e||n(r=>r??String(lF++))},[e]),e||(t?`radix-${t}`:"")}var y0="Collapsible",[uF,kF]=o2(y0),[dF,b0]=uF(y0),k2=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:l,onOpenChange:c,...d}=e,[p=!1,m]=aF({prop:r,defaultProp:a,onChange:c});return o.jsx(dF,{scope:n,disabled:l,contentId:cF(),open:p,onOpenToggle:E.useCallback(()=>m(h=>!h),[m]),children:o.jsx(Ni.div,{"data-state":_0(p),"data-disabled":l?"":void 0,...d,ref:t})})});k2.displayName=y0;var C2="CollapsibleTrigger",E2=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=b0(C2,n);return o.jsx(Ni.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":_0(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:ra(e.onClick,a.onOpenToggle)})});E2.displayName=C2;var w0="CollapsibleContent",A2=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=b0(w0,e.__scopeCollapsible);return o.jsx(yo,{present:n||a.open,children:({present:l})=>o.jsx(pF,{...r,ref:t,present:l})})});A2.displayName=w0;var pF=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...l}=e,c=b0(w0,n),[d,p]=E.useState(r),m=E.useRef(null),h=pa(t,m),g=E.useRef(0),x=g.current,j=E.useRef(0),y=j.current,_=c.open||d,N=E.useRef(_),b=E.useRef();return E.useEffect(()=>{const w=requestAnimationFrame(()=>N.current=!1);return()=>cancelAnimationFrame(w)},[]),Hl(()=>{const w=m.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const k=w.getBoundingClientRect();g.current=k.height,j.current=k.width,N.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),p(r)}},[c.open,r]),o.jsx(Ni.div,{"data-state":_0(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!_,...l,ref:h,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:_&&a})});function _0(e){return e?"open":"closed"}var fF=k2;const mF=fF,hF=E2,gF=A2;function Qb({href:e,className:t=l=>"",activeClassName:n="active",children:r,...a}){const{rootPath:l,url:c}=Un().props,d=c===e;let p=t(d);return o.jsx(Tr,{href:`${l}${e}`,className:Pr(p,d&&n),...a,children:r})}const xF=[{title:"Models",icon:Ki,href:"/",children:[{title:"All Models",icon:Ki,href:"/models"},{title:"New Model",icon:Ki,href:"/models/new"}]},{title:"Datasources",icon:zs,href:"/datasources",children:[{title:"All Datasources",icon:zs,href:"/datasources"},{title:"New Datasource",icon:zs,href:"/datasources/new"}]},{title:"Datasets",icon:un,href:"/datasets",children:[{title:"All Datasets",icon:un,href:"/datasets"},{title:"New Dataset",icon:un,href:"/datasets/new"}]}];function vF(e){const{rootPath:t}=Un().props,n=e.split("/").filter(Boolean),r=[];let a=t;if(n.length===0)return[];let l,c;switch(["datasources","datasets","models","settings"].includes(n[0])?(l=n[0],c=0):(l=n[1],c=1),l){case"models":r.push({title:"Models",href:`${t}/models`});break;case"datasources":r.push({title:"Datasources",href:`${t}/datasources`});break;case"datasets":r.push({title:"Datasets",href:`${t}/datasets`});break;case"settings":r.push({title:"Settings",href:`${t}/settings`});break;default:r.push({title:"Models",href:`${t}/models`})}for(let d=c+1;d<n.length;d++){const p=n[d];if(a+=`/${n[d]}`,n[d-1]==="datasets"&&p!=="new")r.push({title:"Details",href:a});else if(n[d-1]==="models"&&p!=="new")r.push({title:"Details",href:a});else{const m=p==="new"?"New":p==="edit"?"Edit":p.charAt(0).toUpperCase()+p.slice(1);r.push({title:m,href:a})}}return r}function yF({children:e}){const[t,n]=E.useState(!0),[r,a]=E.useState(["Models"]),l=vF(location.pathname),c=d=>{a(p=>p.includes(d)?p.filter(m=>m!==d):[...p,d])};return o.jsxs("div",{className:"min-h-screen bg-gray-50",children:[o.jsxs("div",{className:Pr("fixed left-0 top-0 z-40 h-screen bg-white border-r transition-all duration-300",t?"w-64":"w-16"),children:[o.jsxs("div",{className:"flex h-16 items-center border-b px-4",children:[t?o.jsxs(o.Fragment,{children:[o.jsx(Ki,{className:"w-8 h-8 text-blue-600"}),o.jsx("h1",{className:"text-xl font-bold text-gray-900 ml-2",children:"EasyML"})]}):o.jsx(Ki,{className:"w-8 h-8 text-blue-600"}),o.jsx("button",{onClick:()=>n(!t),className:"ml-auto p-2 hover:bg-gray-100 rounded-md",children:o.jsx(SO,{className:"w-4 h-4"})})]}),o.jsx(w2,{className:"h-[calc(100vh-4rem)] px-3",children:o.jsxs("div",{className:"space-y-2 py-4",children:[xF.map(d=>{var p;return o.jsxs(mF,{open:r.includes(d.title),onOpenChange:()=>c(d.title),children:[o.jsxs(hF,{className:"flex items-center w-full p-2 hover:bg-gray-100 rounded-md",children:[o.jsx(d.icon,{className:"w-4 h-4"}),t&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"ml-2 text-sm font-medium flex-1 text-left",children:d.title}),r.includes(d.title)?o.jsx(mo,{className:"w-4 h-4"}):o.jsx(Js,{className:"w-4 h-4"})]})]}),o.jsx(gF,{children:t&&((p=d.children)==null?void 0:p.map(m=>o.jsxs(Qb,{href:m.href,className:({isActive:h})=>Pr("flex items-center pl-8 pr-2 py-2 text-sm rounded-md",h?"bg-blue-50 text-blue-600":"text-gray-600 hover:bg-gray-50"),children:[o.jsx(m.icon,{className:"w-4 h-4"}),o.jsx("span",{className:"ml-2",children:m.title})]},m.href)))})]},d.title)}),o.jsx(N2,{className:"my-4"}),o.jsxs(Qb,{href:"/settings",className:({isActive:d})=>Pr("flex items-center w-full p-2 rounded-md",d?"bg-blue-50 text-blue-600":"text-gray-600 hover:bg-gray-50"),children:[o.jsx(aa,{className:"w-4 h-4"}),t&&o.jsx("span",{className:"ml-2 text-sm font-medium",children:"Settings"})]})]})})]}),o.jsxs("div",{className:Pr("transition-all duration-300",t?"ml-64":"ml-16"),children:[o.jsx(ED,{}),o.jsx("div",{className:"h-16 border-b bg-white flex items-center px-4",children:o.jsx("nav",{className:"flex","aria-label":"Breadcrumb",children:o.jsx("ol",{className:"flex items-center space-x-2",children:l.map((d,p)=>o.jsxs($n.Fragment,{children:[p>0&&o.jsx(Js,{className:"w-4 h-4 text-gray-400"}),o.jsx("li",{children:o.jsx(Tr,{href:d.href,className:Pr("text-sm",p===l.length-1?"text-blue-600 font-medium":"text-gray-500 hover:text-gray-700"),children:d.title})})]},d.href))})})}),o.jsx("main",{className:"min-h-[calc(100vh-4rem)]",children:e})]})]})}function bF({children:e}){const{showAlert:t}=i2(),{flash:n}=Un().props;return E.useEffect(()=>{n&&n.forEach(({type:r,message:a})=>{t(r,a)})},[n,t]),o.jsx(o.Fragment,{children:e})}function wF({children:e}){return o.jsx(CD,{children:o.jsx(bF,{children:o.jsx(yF,{children:e})})})}document.addEventListener("DOMContentLoaded",()=>{rO({resolve:e=>{let n=Object.assign({"../pages/DatasetDetailsPage.tsx":CL,"../pages/DatasetsPage.tsx":TL,"../pages/DatasourceFormPage.tsx":ML,"../pages/DatasourcesPage.tsx":FL,"../pages/EditModelPage.tsx":UL,"../pages/EditTransformationPage.tsx":VL,"../pages/ModelsPage.tsx":KM,"../pages/NewDatasetPage.tsx":dD,"../pages/NewModelPage.tsx":fD,"../pages/NewTransformationPage.tsx":hD,"../pages/SettingsPage.tsx":vD,"../pages/ShowModelPage.tsx":_D,"../pages/TransformationsPage.tsx":kD})[`../${e}.tsx`];if(!n.default){alert(`The page ${e} could not be found, you probably forgot to export default.`);return}return n.default.layout=n.default.layout||(r=>o.jsx(wF,{children:r})),n},setup({el:e,App:t,props:n}){n2(e).render(o.jsx(t,{...n}))}})});
522
- //# sourceMappingURL=Application.tsx-Rrzo4ecT.js.map
522
+ //# sourceMappingURL=Application.tsx-B1qLZuyu.js.map