var e=/\d/,t=[`-`,`_`,`/`,`.`];function n(t=``){if(!e.test(t))return t!==t.toLowerCase()}function r(e,r){let i=r??t,a=[];if(!e||typeof e!=`string`)return a;let o=``,s,c;for(let t of e){let e=i.includes(t);if(e===!0){a.push(o),o=``,s=void 0;continue}let r=n(t);if(c===!1){if(s===!1&&r===!0){a.push(o),o=t,s=r;continue}if(s===!0&&r===!1&&o.length>1){let e=o.at(-1);a.push(o.slice(0,Math.max(0,o.length-1))),o=e+t,s=r;continue}}o+=t,s=r,c=e}return a.push(o),a}function i(e){return e?e[0].toUpperCase()+e.slice(1):``}function a(e,t){return e?(Array.isArray(e)?e:r(e)).map(e=>i(t?.normalize?e.toLowerCase():e)).join(``):``}function o(e,t){return e?(Array.isArray(e)?e:r(e)).map(e=>e.toLowerCase()).join(t??`-`):``}export{a as n,o as t};