/* Socket Lib - Built with esbuild */
var p=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var b=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},m=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of O(t))!y.call(e,r)&&r!==n&&p(e,r,{get:()=>t[r],enumerable:!(o=w(t,r))||o.enumerable});return e};var k=e=>m(p({},"__esModule",{value:!0}),e);var v={};b(v,{findTypesForSubpath:()=>d,getExportFilePaths:()=>P,getSubpaths:()=>j,isConditionalExports:()=>h,isSubpathExports:()=>N,resolvePackageJsonEntryExports:()=>S});module.exports=k(v);var g=require("#constants/core"),a=require("../arrays"),s=require("../objects");function d(e,t){const n=[e];let o=0;for(;o<n.length;){if(o===g.LOOP_SENTINEL)throw new Error("Detected infinite loop in entry exports crawl of getTypesForSubpath");const r=n[o++];if((0,a.isArray)(r))for(let i=0,{length:f}=r;i<f;i+=1){const u=r[i];if(u===t)return r.types;(0,s.isObject)(u)&&n.push(u)}else if((0,s.isObject)(r)){const i=Object.getOwnPropertyNames(r);for(let f=0,{length:u}=i;f<u;f+=1){const c=i[f],l=r[c];if(l===t)return r.types;(0,s.isObject)(l)&&n.push(l)}}}}function j(e){return(0,s.isObject)(e)?Object.getOwnPropertyNames(e).filter(t=>t.startsWith(".")):[]}function P(e){if(!(0,s.isObject)(e))return[];const t=[];for(const n of Object.getOwnPropertyNames(e)){if(!n.startsWith("."))continue;const o=e[n];if(typeof o=="string")t.push(o);else if((0,s.isObject)(o))for(const r of Object.getOwnPropertyNames(o)){const i=o[r];if(typeof i=="string")t.push(i);else if((0,a.isArray)(i)){for(const f of i)if(typeof f=="string")t.push(f);else if((0,s.isObject)(f))for(const u of Object.getOwnPropertyNames(f)){const c=f[u];typeof c=="string"&&t.push(c)}}}}return[...new Set(t)].filter(n=>n.startsWith("./"))}function h(e){if(!(0,s.isObjectObject)(e))return!1;const t=Object.getOwnPropertyNames(e),{length:n}=t;if(!n)return!1;for(let o=0;o<n;o+=1){const r=t[o];if(r.length>0&&r.charCodeAt(0)===46)return!1}return!0}function N(e){if((0,s.isObjectObject)(e)){const t=Object.getOwnPropertyNames(e);for(let n=0,{length:o}=t;n<o;n+=1)if(t[n]?.charCodeAt(0)===46)return!0}return!1}function S(e){return typeof e=="string"||(0,a.isArray)(e)?{".":e}:h(e)||(0,s.isObject)(e)?e:void 0}0&&(module.exports={findTypesForSubpath,getExportFilePaths,getSubpaths,isConditionalExports,isSubpathExports,resolvePackageJsonEntryExports});
//# sourceMappingURL=exports.js.map
