function m(a={}){const{classPrefix:o="__shiki_",classSuffix:e="",classReplacer:r=t=>t}=a,l=new Map;function i(t){return Object.entries(t).map(([n,s])=>`${n}:${s}`).join(";")}function c(t){const n=typeof t=="string"?t:i(t);let s=o+h(n)+e;return s=r(s),l.has(s)||l.set(s,typeof t=="string"?t:{...t}),s}return{name:"@shikijs/transformers:style-to-class",pre(t){if(!t.properties.style)return;const n=c(t.properties.style);delete t.properties.style,this.addClassToHast(t,n)},tokens(t){for(const n of t)for(const s of n){if(!s.htmlStyle)continue;const f=c(s.htmlStyle);s.htmlStyle={},s.htmlAttrs||={},s.htmlAttrs.class?s.htmlAttrs.class+=` ${f}`:s.htmlAttrs.class=f}},getClassRegistry(){return l},getCSS(){let t="";for(const[n,s]of l.entries())t+=`.${n}{${typeof s=="string"?s:i(s)}}`;return t},clearRegistry(){l.clear()}}}function h(a,o=0){let e=3735928559^o,r=1103547991^o;for(let l=0,i;l<a.length;l++)i=a.charCodeAt(l),e=Math.imul(e^i,2654435761),r=Math.imul(r^i,1597334677);return e=Math.imul(e^e>>>16,2246822507),e^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(e^e>>>13,3266489909),(4294967296*(2097151&r)+(e>>>0)).toString(36).slice(0,6)}export{m as t};
