/* Socket Lib - Built with esbuild */
var o=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(e,r)=>{for(var t in r)o(e,t,{get:r[t],enumerable:!0})},g=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of c(r))!d.call(e,a)&&a!==t&&o(e,a,{get:()=>r[a],enumerable:!(n=f(r,a))||n.enumerable});return e};var m=e=>g(o({},"__esModule",{value:!0}),e);var x={};p(x,{createRelativeUrl:()=>b,isUrl:()=>S,parseUrl:()=>i,urlSearchParamAsArray:()=>u,urlSearchParamAsBoolean:()=>s,urlSearchParamAsNumber:()=>O,urlSearchParamAsString:()=>A,urlSearchParamsGetArray:()=>P,urlSearchParamsGetBoolean:()=>_});module.exports=m(x);const U=Boolean,h=URL;function S(e){return(typeof e=="string"&&e!==""||e!==null&&typeof e=="object")&&!!i(e)}function i(e){try{return new h(e)}catch{}}function u(e){return typeof e=="string"?e.trim().split(/, */).map(r=>r.trim()).filter(U):[]}function s(e,r){const{defaultValue:t=!1}={__proto__:null,...r};if(typeof e=="string"){const n=e.trim();return n==="1"||n.toLowerCase()==="true"}return e==null?!!t:!!e}function P(e,r){if(e&&typeof e.getAll=="function"){const t=e.getAll(r),n=t[0];return t.length===1&&n&&n.includes(",")?u(n):t}return[]}function _(e,r,t){const{defaultValue:n=!1}={__proto__:null,...t};if(e&&typeof e.get=="function"){const a=e.get(r);return a!==null?s(a,{defaultValue:n}):n}return n}function b(e,r){const{base:t=""}={__proto__:null,...r},n=e.replace(/^\//,"");if(t){let a=t;return a.endsWith("/")||(a+="/"),a+n}return n}function A(e,r,t){const{defaultValue:n=""}={__proto__:null,...t};if(e&&typeof e.get=="function"){const a=e.get(r);return a!==null?a:n}return n}function O(e,r,t){const{defaultValue:n=0}={__proto__:null,...t};if(e&&typeof e.get=="function"){const a=e.get(r);if(a!==null){const l=Number(a);return Number.isNaN(l)?n:l}}return n}0&&(module.exports={createRelativeUrl,isUrl,parseUrl,urlSearchParamAsArray,urlSearchParamAsBoolean,urlSearchParamAsNumber,urlSearchParamAsString,urlSearchParamsGetArray,urlSearchParamsGetBoolean});
//# sourceMappingURL=url.js.map
