import{g as t}from"./useEventListener-C0195JsF.js";import{t as l}from"./invariant-CkiqGLcK.js";function i(r){l(!1,`Unexpected object: ${r}`)}function n(r){return t.warn(`Unexpected object: ${JSON.stringify(r)}`),r}function e(r){return r?r.charAt(0).toUpperCase()+r.slice(1):""}function a(r){if(!r)return"";if(typeof r!="string")throw t.error(r),TypeError(`Expected string, got ${typeof r}`);return/[A-Za-z]/.test(r)?r.replaceAll(/([\da-z])([A-Z])/g,"$1 $2").replaceAll(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replaceAll(/[\s_-]+/g," ").trim().split(" ").map(e).join(" "):r}const s={startCase:a,htmlEscape:r=>r&&r.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;").replaceAll(`
`," "),withTrailingSlash(r){return r.endsWith("/")?r:`${r}/`},withoutTrailingSlash(r){return r.endsWith("/")?r.slice(0,-1):r},withoutLeadingSlash(r){return r.startsWith("/")?r.slice(1):r},asString:r=>{if(typeof r=="string")return r;try{return JSON.stringify(r)}catch{return String(r)}}};export{n as i,e as n,i as r,s as t};
