1import{t as e}from"./rolldown-runtime-C0FnF6B9.js";var t=e(((e,t)=>{var n=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,i=/\s|\uFEFF|\xA0/,a=/\r?\n[\x20\x09]+/g,o=/[;,"]/,s=/[;,"]|\s/,c=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/,l={IDLE:1,URI:2,ATTR:4};function u(e){return e.replace(r,``)}function d(e){return i.test(e)}function f(e,t){for(;d(e[t]);)t++;return t}function p(e){return s.test(e)||!c.test(e)}function m(e,t){return Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>n in t&&e[n]===t[n])}var h=class e{constructor(e){this.refs=[],e&&this.parse(e)}rel(e){for(var t=[],n=e.toLowerCase(),r=0;r<this.refs.length;r++)typeof this.refs[r].rel==`string`&&this.refs[r].rel.toLowerCase()===n&&t.push(this.refs[r]);return t}get(e,t){e=e.toLowerCase(),t=t.toLowerCase();for(var n=[],r=0;r<this.refs.length;r++)typeof this.refs[r][e]==`string`&&this.refs[r][e].toLowerCase()===t&&n.push(this.refs[r]);return n}set(e){return this.refs.push(e),this}setUnique(e){return this.refs.some(t=>m(t,e))||this.refs.push(e),this}has(e,t){e=e.toLowerCase(),t=t.toLowerCase();for(var n=0;n<this.refs.length;n++)if(typeof this.refs[n][e]==`string`&&this.refs[n][e].toLowerCase()===t)return!0;return!1}parse(t,n){n||=0,t=n?t.slice(n):t,t=u(t).replace(a,``);for(var r=l.IDLE,i=t.length,n=0,s=null;n<i;)if(r===l.IDLE){if(d(t[n])){n++;continue}if(t[n]===`<`){s!=null&&(s.rel==null?this.refs.push(s):this.refs.push(...e.expandRelations(s)));var c=t.indexOf(`>`,n);if(c===-1)throw Error(`Expected end of URI delimiter at offset `+n);s={uri:t.slice(n+1,c)},n=c,r=l.URI}else throw Error(`Unexpected character "`+t[n]+`" at offset `+n);n++}else if(r===l.URI){if(d(t[n])){n++;continue}if(t[n]===`;`)r=l.ATTR,n++;else if(t[n]===`,`)r=l.IDLE,n++;else throw Error(`Unexpected character "`+t[n]+`" at offset `+n)}else if(r===l.ATTR){if(t[n]===`;`||d(t[n])){n++;continue}var c=t.indexOf(`=`,n);c===-1&&(c=t.indexOf(`;`,n)),c===-1&&(c=t.length);var p=u(t.slice(n,c)).toLowerCase(),m=``;if(n=c+1,n=f(t,n),t[n]===`"`)for(n++;n<i;){if(t[n]===`"`){n++;break}t[n]===`\\`&&n++,m+=t[n],n++}else{for(var c=n+1;!o.test(t[c])&&c<i;)c++;m=t.slice(n,c),n=c}switch(s[p]&&e.isSingleOccurenceAttr(p)||(p[p.length-1]===`*`?s[p]=e.parseExtendedValue(m):(m=p===`type`?m.toLowerCase():m,s[p]==null?s[p]=m:Array.isArray(s[p])?s[p].push(m):s[p]=[s[p],m])),t[n]){case`,`:r=l.IDLE;break;case`;`:r=l.ATTR}n++}else throw Error(`Unknown parser state "`+r+`"`);return s!=null&&(s.rel==null?this.refs.push(s):this.refs.push(...e.expandRelations(s))),s=null,this}toString(){for(var t=[],n=``,r=null,i=0;i<this.refs.length;i++)r=this.refs[i],n=Object.keys(this.refs[i]).reduce(function(t,n){return n===`uri`?t:t+`; `+e.formatAttribute(n,r[n])},`<`+r.uri+`>`),t.push(n);return t.join(`, `)}};h.isCompatibleEncoding=function(e){return n.test(e)},h.parse=function(e,t){return new h().parse(e,t)},h.isSingleOccurenceAttr=function(e){return e===`rel`||e===`type`||e===`media`||e===`title`||e===`title*`},h.isTokenAttr=function(e){return e===`rel`||e===`type`||e===`anchor`},h.escapeQuotes=function(e){return e.replace(/"/g,`\\"`)},h.expandRelations=function(e){return e.rel.split(` `).map(function(t){var n=Object.assign({},e);return n.rel=t,n})},h.parseExtendedValue=function(e){var t=/([^']+)?(?:'([^']*)')?(.+)/.exec(e);return{language:t[2].toLowerCase(),encoding:h.isCompatibleEncoding(t[1])?null:t[1].toLowerCase(),value:h.isCompatibleEncoding(t[1])?decodeURIComponent(t[3]):t[3]}},h.formatExtendedAttribute=function(e,t){var n=(t.encoding||`utf-8`).toUpperCase(),r=t.language||`en`,i=``;return i=typeof Buffer<`u`&&Buffer.isBuffer(t.value)&&h.isCompatibleEncoding(n)?t.value.toString(n):typeof Buffer<`u`&&Buffer.isBuffer(t.value)?t.value.toString(`hex`).replace(/[0-9a-f]{2}/gi,`%$1`):encodeURIComponent(t.value),e+`=`+n+`'`+r+`'`+i},h.formatAttribute=function(e,t){return Array.isArray(t)?t.map(t=>h.formatAttribute(e,t)).join(`; `):e[e.length-1]===`*`||typeof t!=`string`?h.formatExtendedAttribute(e,t):(h.isTokenAttr(e)?t=p(t)?`"`+h.escapeQuotes(t)+`"`:h.escapeQuotes(t):p(t)&&(t=encodeURIComponent(t),t=t.replace(/%20/g,` `).replace(/%2C/g,`,`).replace(/%3B/g,`;`),t=`"`+t+`"`),e+`=`+t)},t.exports=h}));function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}function a(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}export{t as n,a as t}; 2//# sourceMappingURL=defineProperty-C0YrXxyM.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.