likec4 1.59.0 → 1.59.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import"../rolldown-runtime.mjs";String.fromCharCode;const e=/#/g,t=/&/g,n=/\//g,r=/=/g,i=/\+/g,a=/%5e/gi,o=/%60/gi,s=/%7c/gi,c=/%20/gi;function encode(e){return encodeURI(``+e).replace(s,`|`)}function encodeQueryValue(r){return encode(typeof r==`string`?r:JSON.stringify(r)).replace(i,`%2B`).replace(c,`+`).replace(e,`%23`).replace(t,`%26`).replace(o,"`").replace(a,`^`).replace(n,`%2F`)}function encodeQueryKey(e){return encodeQueryValue(e).replace(r,`%3D`)}function decode(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function decodeQueryKey(e){return decode(e.replace(i,` `))}function decodeQueryValue(e){return decode(e.replace(i,` `))}function parseQuery(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=decodeQueryKey(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=decodeQueryValue(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function encodeQueryItem(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${encodeQueryKey(e)}=${encodeQueryValue(t)}`).join(`&`):`${encodeQueryKey(e)}=${encodeQueryValue(t)}`:encodeQueryKey(e)}function stringifyQuery(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>encodeQueryItem(t,e[t])).filter(Boolean).join(`&`)}const l=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,u=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,d=/^([/\\]\s*){2,}[^/\\]/,f=/\/$|\/\?|\/#/,p=/^\.?\//;function isRelative(e){return[`./`,`../`].some(t=>e.startsWith(t))}function hasProtocol(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?l.test(e):u.test(e)||(t.acceptRelative?d.test(e):!1)}function hasTrailingSlash(e=``,t){return t?f.test(e):e.endsWith(`/`)}function withoutTrailingSlash(e=``,t){if(!t)return(hasTrailingSlash(e)?e.slice(0,-1):e)||`/`;if(!hasTrailingSlash(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function withTrailingSlash(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(hasTrailingSlash(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function hasLeadingSlash(e=``){return e.startsWith(`/`)}function withoutLeadingSlash(e=``){return(hasLeadingSlash(e)?e.slice(1):e)||`/`}function withLeadingSlash(e=``){return hasLeadingSlash(e)?e:`/`+e}function cleanDoubleSlashes(e=``){return e.split(`://`).map(e=>e.replace(/\/{2,}/g,`/`)).join(`://`)}function withoutBase(e,t){if(isEmptyURL(t))return e;let n=withoutTrailingSlash(t);if(!e.startsWith(n))return e;let r=e[n.length];return r&&r!==`/`&&r!==`?`?e:`/`+e.slice(n.length).replace(/^\/+/,``)}function withQuery(e,t){let n=parseURL(e);return n.search=stringifyQuery({...parseQuery(n.search),...t}),stringifyParsedURL(n)}function isEmptyURL(e){return!e||e===`/`}function isNonEmptyURL(e){return e&&e!==`/`}function joinURL(e,...t){let n=e||``;for(let e of t.filter(e=>isNonEmptyURL(e)))if(n){let t=e.replace(p,``);n=withTrailingSlash(n)+t}else n=e;return n}function joinRelativeURL(...e){let t=/\/(?!\/)/,n=e.filter(Boolean),r=[],i=0;for(let e of n)if(!(!e||e===`/`)){for(let[n,a]of e.split(t).entries())if(!(!a||a===`.`)){if(a===`..`){if(r.length===1&&hasProtocol(r[0]))continue;r.pop(),i--;continue}if(n===1&&r[r.length-1]?.endsWith(`:/`)){r[r.length-1]+=`/`+a;continue}r.push(a),i++}}let a=r.join(`/`);return i>=0?n[0]?.startsWith(`/`)&&!a.startsWith(`/`)?a=`/`+a:n[0]?.startsWith(`./`)&&!a.startsWith(`./`)&&(a=`./`+a):a=`../`.repeat(-1*i)+a,n[n.length-1]?.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`),a}function withoutProtocol(e){return withProtocol(e,``)}function withProtocol(e,t){let n=e.match(u);return n||=e.match(/^\/{2,}/),n?t+e.slice(n[0].length):t+e}const m=Symbol.for(`ufo:protocolRelative`);function parseURL(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!hasProtocol(e,{acceptRelative:!0}))return t?parseURL(t+e):parsePath(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=parsePath(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[m]:!r}}function parsePath(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function stringifyParsedURL(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[m]?(e.protocol||``)+`//`:``)+i+a+t+n+r}export{joinRelativeURL as a,withQuery as c,withoutLeadingSlash as d,withoutProtocol as f,isRelative as i,withTrailingSlash as l,hasLeadingSlash as n,joinURL as o,withoutTrailingSlash as p,hasProtocol as r,withLeadingSlash as s,cleanDoubleSlashes as t,withoutBase as u};
1
+ import"../rolldown-runtime.mjs";String.fromCharCode;const e=/#/g,t=/&/g,n=/\//g,r=/=/g,i=/\+/g,a=/%5e/gi,o=/%60/gi,s=/%7c/gi,c=/%20/gi;function encode(e){return encodeURI(``+e).replace(s,`|`)}function encodeQueryValue(r){return encode(typeof r==`string`?r:JSON.stringify(r)).replace(i,`%2B`).replace(c,`+`).replace(e,`%23`).replace(t,`%26`).replace(o,"`").replace(a,`^`).replace(n,`%2F`)}function encodeQueryKey(e){return encodeQueryValue(e).replace(r,`%3D`)}function decode(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function decodeQueryKey(e){return decode(e.replace(i,` `))}function decodeQueryValue(e){return decode(e.replace(i,` `))}function parseQuery(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=decodeQueryKey(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=decodeQueryValue(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function encodeQueryItem(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${encodeQueryKey(e)}=${encodeQueryValue(t)}`).join(`&`):`${encodeQueryKey(e)}=${encodeQueryValue(t)}`:encodeQueryKey(e)}function stringifyQuery(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>encodeQueryItem(t,e[t])).filter(Boolean).join(`&`)}const l=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,u=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,d=/^([/\\]\s*){2,}[^/\\]/,f=/\/$|\/\?|\/#/,p=/^\.?\//;function isRelative(e){return[`./`,`../`].some(t=>e.startsWith(t))}function hasProtocol(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?l.test(e):u.test(e)||(t.acceptRelative?d.test(e):!1)}function hasTrailingSlash(e=``,t){return t?f.test(e):e.endsWith(`/`)}function withoutTrailingSlash(e=``,t){if(!t)return(hasTrailingSlash(e)?e.slice(0,-1):e)||`/`;if(!hasTrailingSlash(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function withTrailingSlash(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(hasTrailingSlash(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function hasLeadingSlash(e=``){return e.startsWith(`/`)}function withoutLeadingSlash(e=``){return(hasLeadingSlash(e)?e.slice(1):e)||`/`}function withLeadingSlash(e=``){return hasLeadingSlash(e)?e:`/`+e}function cleanDoubleSlashes(e=``){return e.split(`://`).map(e=>e.replace(/\/{2,}/g,`/`)).join(`://`)}function withoutBase(e,t){if(isEmptyURL(t))return e;let n=withoutTrailingSlash(t);if(!e.startsWith(n))return e;let r=e[n.length];return r&&r!==`/`&&r!==`?`?e:`/`+e.slice(n.length).replace(/^\/+/,``)}function withQuery(e,t){let n=parseURL(e);return n.search=stringifyQuery({...parseQuery(n.search),...t}),stringifyParsedURL(n)}function isEmptyURL(e){return!e||e===`/`}function isNonEmptyURL(e){return e&&e!==`/`}function joinURL(e,...t){let n=e||``;for(let e of t.filter(e=>isNonEmptyURL(e)))if(n){let t=e.replace(p,``);n=withTrailingSlash(n)+t}else n=e;return n}function joinRelativeURL(...e){let t=/\/(?!\/)/,n=e.filter(Boolean),r=[],i=0;for(let e of n)if(!(!e||e===`/`)){for(let[n,a]of e.split(t).entries())if(!(!a||a===`.`)){if(a===`..`){if(r.length===1&&hasProtocol(r[0]))continue;r.pop(),i--;continue}if(n===1&&r[r.length-1]?.endsWith(`:/`)){r[r.length-1]+=`/`+a;continue}r.push(a),i++}}let a=r.join(`/`);return i>=0?n[0]?.startsWith(`/`)&&!a.startsWith(`/`)?a=`/`+a:n[0]?.startsWith(`./`)&&!a.startsWith(`./`)&&(a=`./`+a):a=`../`.repeat(-1*i)+a,n[n.length-1]?.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`),a}const m=Symbol.for(`ufo:protocolRelative`);function parseURL(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!hasProtocol(e,{acceptRelative:!0}))return t?parseURL(t+e):parsePath(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=parsePath(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[m]:!r}}function parsePath(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function stringifyParsedURL(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[m]?(e.protocol||``)+`//`:``)+i+a+t+n+r}export{joinRelativeURL as a,withQuery as c,withoutLeadingSlash as d,withoutTrailingSlash as f,isRelative as i,withTrailingSlash as l,hasLeadingSlash as n,joinURL as o,hasProtocol as r,withLeadingSlash as s,cleanDoubleSlashes as t,withoutBase as u};