"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./prism-core.cjs.js"),h=require("../../../../hastscript@9.0.1/node_modules/hastscript/lib/index.cjs.js"),l=require("../../../../parse-entities@4.0.2/node_modules/parse-entities/lib/index.cjs.js");function a(){}a.prototype=p.Prism;const r=new a;r.highlight=u;r.register=y;r.alias=w;r.registered=d;r.listLanguages=b;r.util.encode=O;r.Token.stringify=f;function u(t,e){if(typeof t!="string")throw new TypeError("Expected `string` for `value`, got `"+t+"`");let n,i;if(e&&typeof e=="object")n=e;else{if(i=e,typeof i!="string")throw new TypeError("Expected `string` for `name`, got `"+i+"`");if(Object.hasOwn(r.languages,i))n=r.languages[i];else throw new Error("Unknown language: `"+i+"` is not registered")}return{type:"root",children:p.Prism.highlight.call(r,t,n,i)}}function y(t){if(typeof t!="function"||!t.displayName)throw new Error("Expected `function` for `syntax`, got `"+t+"`");Object.hasOwn(r.languages,t.displayName)||t(r)}function w(t,e){const n=r.languages;let i={};typeof t=="string"?e&&(i[t]=e):i=t;let s;for(s in i)if(Object.hasOwn(i,s)){const o=i[s],c=typeof o=="string"?[o]:o;let g=-1;for(;++g<c.length;)n[c[g]]=n[s]}}function d(t){if(typeof t!="string")throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+t+"`");return Object.hasOwn(r.languages,t)}function b(){const t=r.languages,e=[];let n;for(n in t)Object.hasOwn(t,n)&&typeof t[n]=="object"&&e.push(n);return e}function f(t,e){if(typeof t=="string")return{type:"text",value:t};if(Array.isArray(t)){const i=[];let s=-1;for(;++s<t.length;)t[s]!==null&&t[s]!==void 0&&t[s]!==""&&i.push(f(t[s],e));return i}const n={attributes:{},classes:["token",t.type],content:f(t.content,e),language:e,tag:"span",type:t.type};return t.alias&&n.classes.push(...typeof t.alias=="string"?[t.alias]:t.alias),r.hooks.run("wrap",n),h.h(n.tag+"."+n.classes.join("."),m(n.attributes),n.content)}function O(t){return t}function m(t){let e;for(e in t)Object.hasOwn(t,e)&&(t[e]=l.parseEntities(t[e]));return t}exports.refractor=r;
//# sourceMappingURL=core.cjs.js.map
