import{e as C}from"./vendor-react-wBh_31cN.js";import{_ as k,a$ as R,p as L,a_ as q,h as f,i as c,aO as D,q as _,m as $,a9 as z,cE as x,aP as p,aE as S,cF as P,t as A,aZ as W,o as Z,n as B,cj as J,a as M,f as U,aY as V,b0 as H}from"./index-dNe6i2rS.js";import{c as Y}from"./converge-D7u3m7i4.js";import{a as K,l as d}from"./lensPath-D2xKReso.js";import{j}from"./join-oazOKFfj.js";import{a as Q}from"./always-oSAuSdys.js";import{i as v}from"./init-Dq_gEBi9.js";import{i as I}from"./ifElse-D151OpR6.js";import{l as X}from"./length-DKJxdznt.js";import{i as G}from"./inc-BMMaAqPC.js";import{a as N}from"./append-DQbPxMil.js";import{i as tt}from"./includes-ucXR_9jq.js";var et=k(function(e,s){return e||s}),st=R(function(e){return K(L(e),q(e))}),nt=function(t){return{value:t,"fantasy-land/map":function(){return this}}},u=k(function(e,s){return e(nt)(s).value}),w=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a,b,ot={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},m;function O(t){return w.lastIndex=0,w.test(t)?'"'+t.replace(w,function(e){var s=ot[e];return typeof s=="string"?s:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function y(t,e,s){var n,r,l,g,h=a,i,o=e[t];switch(o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(t)),typeof m=="function"&&(o=m.call(e,t,o)),typeof o){case"string":return O(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(a+=b,i=[],Object.prototype.toString.apply(o)==="[object Array]"){for(g=o.length,n=0;n<g;n+=1)i[n]=y(n,o,s)||"null";return l=i.length===0?"[]":a?a.length+i.join(", ").length+4>s?`[
`+a+i.join(`,
`+a)+`
`+h+"]":"[ "+i.join(", ")+" ]":"["+i.join(",")+"]",a=h,l}if(m&&typeof m=="object")for(g=m.length,n=0;n<g;n+=1)typeof m[n]=="string"&&(r=m[n],l=y(r,o,s),l&&i.push(O(r)+(a?": ":":")+l));else for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l=y(r,o,s),l&&i.push(O(r)+(a?": ":":")+l));return l=i.length===0?"{}":a?a.length+i.join(", ").length+4>s?`{
`+a+i.join(`,
`+a)+`
`+h+"}":"{ "+i.join(", ")+" }":"{"+i.join(",")+"}",a=h,l}}function rt(t,e,s,n){var r;if(a="",b="",n||(n=0),typeof n!="number")throw new Error("beaufifier: limit must be a number");if(typeof s=="number")for(r=0;r<s;r+=1)b+=" ";else typeof s=="string"&&(b=s);if(m=e,e&&typeof e!="function"&&(typeof e!="object"||typeof e.length!="number"))throw new Error("beautifier: wrong replacer parameter");return y("",{"":t},n)}var at=rt;const it=C(at),Zt=50,ft=d(["attributes","name"]),lt=d(["attributes","dir"]),ct=d(["attributes","id"]),pt=d(["attributes","modificationTime"]),ut=st("name"),mt=d(["attributes","owner"]),dt=d(["attributes","path"]),gt=d(["attributes","permission"]),ht=d(["attributes","size"]),Bt=u(lt);u(ct);u(pt);const bt=u(ft),yt=u(ut),Jt=Y(et,[yt,bt]);u(mt);const xt=u(dt);u(gt);u(ht);const jt=["csv","data","json","xml","parquet","pickle","tfrecord","orc","npy","xls","xlsx"],vt="db",Et=["ipynb","LICENSE","log","md","pdf","sum","test","html"],Pt="folder",wt=["gif","png","jpg","jpeg","svg"],Ot=["clj","cljs","dockerfile","go","jar","java","Makefile","hoodie_partition_metadata","properties","py","sh","sql","ts","tsx","yml","yaml"],St=["gz","tar","tgz","zip","xz","bz2"],Mt=["safetensors","bin","pt","pth","ckpt","onnx","gguf","ggml","pkl","pickle","h5","hdf5","joblib","npy","npz","tflite","pb","pptx","ppt","docx","doc","odt","odp","ods","mp3","mp4","mov","avi","mkv","webm","wav","flac","ogg","aac","m4a","exe","dll","so","dylib","class","ttf","otf","woff","woff2","iso","dmg"];var E=(t=>(t[t.data=0]="data",t[t.db=1]="db",t[t.file=2]="file",t[t.folder=3]="folder",t[t.image=4]="image",t[t.script=5]="script",t[t.zip=6]="zip",t))(E||{});const kt=[{fileGroup:0,extensions:jt},{fileGroup:1,extensions:vt},{fileGroup:2,extensions:Et},{fileGroup:3,extensions:Pt},{fileGroup:4,extensions:wt},{fileGroup:5,extensions:Ot},{fileGroup:6,extensions:St}],F=({isDir:t=!1,fileName:e})=>t?W(".db",e)?"db":"folder":f(p("."),A)(e),Lt=f(t=>U(V(tt(t),"extensions"),kt),M(E.file,"fileGroup")),T=f(F,Lt),Ut=t=>T(t)===E.zip,Vt=t=>F(t)==="ipynb",Ht=t=>T(t)===E.image,_t={cljs:"clojure",clj:"clojure",csv:"excel",data:"excel",dockerfile:"dockerfile",go:"go",ipynb:"xml",java:"java",json:"json",log:"haskell",Makefile:"makefile",md:"markdown",properties:"properties",hoodie_partition_metadata:"properties",py:"python",sh:"shell",test:"excel",ts:"typescript",tsx:"typescript",yml:"yaml",yaml:"yaml"},Yt=t=>L(t,_t)??"plaintext",Kt=(t,e=80)=>{try{return it(JSON.parse(t),null,2,e)}catch{return t}},Qt=t=>{if(!t)return!1;const e=t.slice(0,4096);let s=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);(r<32&&r!==9&&r!==10&&r!==13||r===65533)&&(s+=1)}return s/e.length>.05},Xt=t=>{const e=t.split("/")[0];return e.includes(".db")?e.includes("featurestore.db")?P.FEATURESTORE:P.HIVE:P.DATASET},Gt=f(S("/"),p("/"),H((t,e)=>e===".."?v(t):e==="."?t:N(e,t),[]),j("/")),te=J(2,(t,e)=>f(p("/"),v,N(t),j("/"))(e)),ee=f(c("/"),S("/"),p("/"),I(z(["Projects"]),x(2),x(3)),v,$(decodeURIComponent),D(_,Q(["root"])),j("/"),c("/")),se=f(c("/"),S("/"),p("/"),v,j("/")),ne=f(p("/"),A),oe=f(c("/"),p("/"),X,Z(1)),re=t=>t.slice(0,t.lastIndexOf(".")).replace(/\./g,"_").replace(/[^a-zA-Z0-9_]/g,""),ae=(t,e)=>c("/",t).split("/")[0].endsWith(".db")?`/apps/hive/warehouse/${c("/",t)}`:`/Projects/${e}/${c("/",t)}`,ie=(t,e)=>{const s=xt(t),n=f(c("/"),p("/"),B(_))(e);return f(c("/"),p("/"),I(z(["Projects"]),x(2),x(3)))(s).length===G(n.length)};export{E as F,ee as a,T as b,F as c,Yt as d,Kt as e,Ht as f,ne as g,xt as h,se as i,Jt as j,Xt as k,Qt as l,Mt as m,ae as n,Bt as o,oe as p,dt as q,Gt as r,ft as s,Ut as t,te as u,Vt as v,Zt as w,ie as x,re as y};
