@storybook/codemod 8.5.3 → 8.5.5

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.
@@ -41,7 +41,7 @@ Defaulting to 2020, but this will stop working in the future.`)),options.ecmaVer
41
41
  `}var eol=/\r?\n|\r/g;function indentLines(value,map4){let result=[],start2=0,line=0,match;for(;match=eol.exec(value);)one3(value.slice(start2,match.index)),result.push(match[0]),start2=match.index+match[0].length,line++;return one3(value.slice(start2)),result.join("");function one3(value2){result.push(map4(value2,line,!value2))}}function safe(state,input,config){let value=(config.before||"")+(input||"")+(config.after||""),positions=[],result=[],infos={},index2=-1;for(;++index2<state.unsafe.length;){let pattern=state.unsafe[index2];if(!patternInScope(state.stack,pattern))continue;let expression=state.compilePattern(pattern),match;for(;match=expression.exec(value);){let before="before"in pattern||!!pattern.atBreak,after="after"in pattern,position2=match.index+(before?match[1].length:0);positions.includes(position2)?(infos[position2].before&&!before&&(infos[position2].before=!1),infos[position2].after&&!after&&(infos[position2].after=!1)):(positions.push(position2),infos[position2]={before,after})}}positions.sort(numerical);let start2=config.before?config.before.length:0,end=value.length-(config.after?config.after.length:0);for(index2=-1;++index2<positions.length;){let position2=positions[index2];position2<start2||position2>=end||position2+1<end&&positions[index2+1]===position2+1&&infos[position2].after&&!infos[position2+1].before&&!infos[position2+1].after||positions[index2-1]===position2-1&&infos[position2].before&&!infos[position2-1].before&&!infos[position2-1].after||(start2!==position2&&result.push(escapeBackslashes(value.slice(start2,position2),"\\")),start2=position2,/[!-/:-@[-`{-~]/.test(value.charAt(position2))&&(!config.encode||!config.encode.includes(value.charAt(position2)))?result.push("\\"):(result.push("&#x"+value.charCodeAt(position2).toString(16).toUpperCase()+";"),start2++))}return result.push(escapeBackslashes(value.slice(start2,end),config.after)),result.join("")}function numerical(a,b){return a-b}function escapeBackslashes(value,after){let expression=/\\(?=[!-/:-@[-`{-~])/g,positions=[],results=[],whole=value+after,index2=-1,start2=0,match;for(;match=expression.exec(whole);)positions.push(match.index);for(;++index2<positions.length;)start2!==positions[index2]&&results.push(value.slice(start2,positions[index2])),results.push("\\"),start2=positions[index2];return results.push(value.slice(start2)),results.join("")}function track(config){let options=config||{},now=options.now||{},lineShift=options.lineShift||0,line=now.line||1,column=now.column||1;return{move,current:current2,shift};function current2(){return{now:{line,column},lineShift}}function shift(value){lineShift+=value}function move(input){let value=input||"",chunks=value.split(/\r?\n|\r/g),tail=chunks[chunks.length-1];return line+=chunks.length-1,column=chunks.length===1?column+tail.length:1+tail.length+lineShift,value}}function toMarkdown(tree,options={}){let state={enter,indentLines,associationId:association,containerPhrasing:containerPhrasingBound,containerFlow:containerFlowBound,createTracker:track,compilePattern,safe:safeBound,stack:[],unsafe:[...unsafe],join:[...join],handlers:{...handle},options:{},indexStack:[],handle:void 0};configure2(state,options),state.options.tightDefinitions&&state.join.push(joinDefinition),state.handle=zwitch("type",{invalid,unknown,handlers:state.handlers});let result=state.handle(tree,void 0,state,{before:`
42
42
  `,after:`
43
43
  `,now:{line:1,column:1},lineShift:0});return result&&result.charCodeAt(result.length-1)!==10&&result.charCodeAt(result.length-1)!==13&&(result+=`
44
- `),result;function enter(name2){return state.stack.push(name2),exit2;function exit2(){state.stack.pop()}}}function invalid(value){throw new Error("Cannot handle value `"+value+"`, expected node")}function unknown(value){let node3=value;throw new Error("Cannot handle unknown node `"+node3.type+"`")}function joinDefinition(left,right){if(left.type==="definition"&&left.type===right.type)return 0}function containerPhrasingBound(parent,info){return containerPhrasing(parent,this,info)}function containerFlowBound(parent,info){return containerFlow(parent,this,info)}function safeBound(value,config){return safe(this,value,config)}function remarkStringify(options){let self2=this;self2.compiler=compiler2;function compiler2(tree){return toMarkdown(tree,{...self2.data("settings"),...options,extensions:self2.data("toMarkdownExtensions")||[]})}}function bail(error){if(error)throw error}var import_extend=__toESM(require_extend(),1);function isPlainObject(value){if(typeof value!="object"||value===null)return!1;let prototype=Object.getPrototypeOf(value);return(prototype===null||prototype===Object.prototype||Object.getPrototypeOf(prototype)===null)&&!(Symbol.toStringTag in value)&&!(Symbol.iterator in value)}function trough(){let fns=[],pipeline={run,use};return pipeline;function run(...values){let middlewareIndex=-1,callback=values.pop();if(typeof callback!="function")throw new TypeError("Expected function as last argument, not "+callback);next(null,...values);function next(error,...output){let fn=fns[++middlewareIndex],index2=-1;if(error){callback(error);return}for(;++index2<values.length;)(output[index2]===null||output[index2]===void 0)&&(output[index2]=values[index2]);values=output,fn?wrap(fn,next)(...output):callback(null,...output)}}function use(middelware){if(typeof middelware!="function")throw new TypeError("Expected `middelware` to be a function, not "+middelware);return fns.push(middelware),pipeline}}function wrap(middleware,callback){let called;return wrapped;function wrapped(...parameters){let fnExpectsCallback=middleware.length>parameters.length,result;fnExpectsCallback&&parameters.push(done);try{result=middleware.apply(this,parameters)}catch(error){let exception=error;if(fnExpectsCallback&&called)throw exception;return done(exception)}fnExpectsCallback||(result instanceof Promise?result.then(then,done):result instanceof Error?done(result):then(result))}function done(error,...output){called||(called=!0,callback(error,...output))}function then(value){done(null,value)}}var VFileMessage=class extends Error{constructor(causeOrReason,optionsOrParentOrPlace,origin){super(),typeof optionsOrParentOrPlace=="string"&&(origin=optionsOrParentOrPlace,optionsOrParentOrPlace=void 0);let reason="",options={},legacyCause=!1;if(optionsOrParentOrPlace&&("line"in optionsOrParentOrPlace&&"column"in optionsOrParentOrPlace?options={place:optionsOrParentOrPlace}:"start"in optionsOrParentOrPlace&&"end"in optionsOrParentOrPlace?options={place:optionsOrParentOrPlace}:"type"in optionsOrParentOrPlace?options={ancestors:[optionsOrParentOrPlace],place:optionsOrParentOrPlace.position}:options={...optionsOrParentOrPlace}),typeof causeOrReason=="string"?reason=causeOrReason:!options.cause&&causeOrReason&&(legacyCause=!0,reason=causeOrReason.message,options.cause=causeOrReason),!options.ruleId&&!options.source&&typeof origin=="string"){let index2=origin.indexOf(":");index2===-1?options.ruleId=origin:(options.source=origin.slice(0,index2),options.ruleId=origin.slice(index2+1))}if(!options.place&&options.ancestors&&options.ancestors){let parent=options.ancestors[options.ancestors.length-1];parent&&(options.place=parent.position)}let start2=options.place&&"start"in options.place?options.place.start:options.place;this.ancestors=options.ancestors||void 0,this.cause=options.cause||void 0,this.column=start2?start2.column:void 0,this.fatal=void 0,this.file,this.message=reason,this.line=start2?start2.line:void 0,this.name=stringifyPosition(options.place)||"1:1",this.place=options.place||void 0,this.reason=this.message,this.ruleId=options.ruleId||void 0,this.source=options.source||void 0,this.stack=legacyCause&&options.cause&&typeof options.cause.stack=="string"?options.cause.stack:"",this.actual,this.expected,this.note,this.url}};VFileMessage.prototype.file="";VFileMessage.prototype.name="";VFileMessage.prototype.reason="";VFileMessage.prototype.message="";VFileMessage.prototype.stack="";VFileMessage.prototype.column=void 0;VFileMessage.prototype.line=void 0;VFileMessage.prototype.ancestors=void 0;VFileMessage.prototype.cause=void 0;VFileMessage.prototype.fatal=void 0;VFileMessage.prototype.place=void 0;VFileMessage.prototype.ruleId=void 0;VFileMessage.prototype.source=void 0;var import_node_path=__toESM(require("path"),1);var import_node_process=__toESM(require("process"),1);var import_node_url=require("url");function isUrl(fileUrlOrPath){return!!(fileUrlOrPath!==null&&typeof fileUrlOrPath=="object"&&"href"in fileUrlOrPath&&fileUrlOrPath.href&&"protocol"in fileUrlOrPath&&fileUrlOrPath.protocol&&fileUrlOrPath.auth===void 0)}var order=["history","path","basename","stem","extname","dirname"],VFile=class{constructor(value){let options;value?isUrl(value)?options={path:value}:typeof value=="string"||isUint8Array(value)?options={value}:options=value:options={},this.cwd=import_node_process.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let index2=-1;for(;++index2<order.length;){let prop2=order[index2];prop2 in options&&options[prop2]!==void 0&&options[prop2]!==null&&(this[prop2]=prop2==="history"?[...options[prop2]]:options[prop2])}let prop;for(prop in options)order.includes(prop)||(this[prop]=options[prop])}get basename(){return typeof this.path=="string"?import_node_path.default.basename(this.path):void 0}set basename(basename2){assertNonEmpty(basename2,"basename"),assertPart(basename2,"basename"),this.path=import_node_path.default.join(this.dirname||"",basename2)}get dirname(){return typeof this.path=="string"?import_node_path.default.dirname(this.path):void 0}set dirname(dirname){assertPath(this.basename,"dirname"),this.path=import_node_path.default.join(dirname||"",this.basename)}get extname(){return typeof this.path=="string"?import_node_path.default.extname(this.path):void 0}set extname(extname){if(assertPart(extname,"extname"),assertPath(this.dirname,"extname"),extname){if(extname.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(extname.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=import_node_path.default.join(this.dirname,this.stem+(extname||""))}get path(){return this.history[this.history.length-1]}set path(path){isUrl(path)&&(path=(0,import_node_url.fileURLToPath)(path)),assertNonEmpty(path,"path"),this.path!==path&&this.history.push(path)}get stem(){return typeof this.path=="string"?import_node_path.default.basename(this.path,this.extname):void 0}set stem(stem){assertNonEmpty(stem,"stem"),assertPart(stem,"stem"),this.path=import_node_path.default.join(this.dirname||"",stem+(this.extname||""))}fail(causeOrReason,optionsOrParentOrPlace,origin){let message=this.message(causeOrReason,optionsOrParentOrPlace,origin);throw message.fatal=!0,message}info(causeOrReason,optionsOrParentOrPlace,origin){let message=this.message(causeOrReason,optionsOrParentOrPlace,origin);return message.fatal=void 0,message}message(causeOrReason,optionsOrParentOrPlace,origin){let message=new VFileMessage(causeOrReason,optionsOrParentOrPlace,origin);return this.path&&(message.name=this.path+":"+message.name,message.file=this.path),message.fatal=!1,this.messages.push(message),message}toString(encoding){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(encoding||void 0).decode(this.value)}};function assertPart(part,name2){if(part&&part.includes(import_node_path.default.sep))throw new Error("`"+name2+"` cannot be a path: did not expect `"+import_node_path.default.sep+"`")}function assertNonEmpty(part,name2){if(!part)throw new Error("`"+name2+"` cannot be empty")}function assertPath(path,name2){if(!path)throw new Error("Setting `"+name2+"` requires `path` to be set too")}function isUint8Array(value){return!!(value&&typeof value=="object"&&"byteLength"in value&&"byteOffset"in value)}var CallableInstance=function(property){let proto=this.constructor.prototype,func=proto[property],apply=function(){return func.apply(apply,arguments)};Object.setPrototypeOf(apply,proto);let names=Object.getOwnPropertyNames(func);for(let p of names){let descriptor=Object.getOwnPropertyDescriptor(func,p);descriptor&&Object.defineProperty(apply,p,descriptor)}return apply};var own5={}.hasOwnProperty,Processor=class _Processor extends CallableInstance{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=trough()}copy(){let destination=new _Processor,index2=-1;for(;++index2<this.attachers.length;){let attacher=this.attachers[index2];destination.use(...attacher)}return destination.data((0,import_extend.default)(!0,{},this.namespace)),destination}data(key,value){return typeof key=="string"?arguments.length===2?(assertUnfrozen("data",this.frozen),this.namespace[key]=value,this):own5.call(this.namespace,key)&&this.namespace[key]||void 0:key?(assertUnfrozen("data",this.frozen),this.namespace=key,this):this.namespace}freeze(){if(this.frozen)return this;let self2=this;for(;++this.freezeIndex<this.attachers.length;){let[attacher,...options]=this.attachers[this.freezeIndex];if(options[0]===!1)continue;options[0]===!0&&(options[0]=void 0);let transformer=attacher.call(self2,...options);typeof transformer=="function"&&this.transformers.use(transformer)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(file){this.freeze();let realFile=vfile(file),parser=this.parser||this.Parser;return assertParser("parse",parser),parser(String(realFile),realFile)}process(file,done){let self2=this;return this.freeze(),assertParser("process",this.parser||this.Parser),assertCompiler("process",this.compiler||this.Compiler),done?executor(void 0,done):new Promise(executor);function executor(resolve,reject){let realFile=vfile(file),parseTree=self2.parse(realFile);self2.run(parseTree,realFile,function(error,tree,file2){if(error||!tree||!file2)return realDone(error);let compileTree=tree,compileResult=self2.stringify(compileTree,file2);looksLikeAValue(compileResult)?file2.value=compileResult:file2.result=compileResult,realDone(error,file2)});function realDone(error,file2){error||!file2?reject(error):resolve?resolve(file2):done(void 0,file2)}}}processSync(file){let complete=!1,result;return this.freeze(),assertParser("processSync",this.parser||this.Parser),assertCompiler("processSync",this.compiler||this.Compiler),this.process(file,realDone),assertDone("processSync","process",complete),result;function realDone(error,file2){complete=!0,bail(error),result=file2}}run(tree,file,done){assertNode(tree),this.freeze();let transformers=this.transformers;return!done&&typeof file=="function"&&(done=file,file=void 0),done?executor(void 0,done):new Promise(executor);function executor(resolve,reject){let realFile=vfile(file);transformers.run(tree,realFile,realDone);function realDone(error,outputTree,file2){let resultingTree=outputTree||tree;error?reject(error):resolve?resolve(resultingTree):done(void 0,resultingTree,file2)}}}runSync(tree,file){let complete=!1,result;return this.run(tree,file,realDone),assertDone("runSync","run",complete),result;function realDone(error,tree2){bail(error),result=tree2,complete=!0}}stringify(tree,file){this.freeze();let realFile=vfile(file),compiler2=this.compiler||this.Compiler;return assertCompiler("stringify",compiler2),assertNode(tree),compiler2(tree,realFile)}use(value,...parameters){let attachers=this.attachers,namespace=this.namespace;if(assertUnfrozen("use",this.frozen),value!=null)if(typeof value=="function")addPlugin(value,parameters);else if(typeof value=="object")Array.isArray(value)?addList(value):addPreset(value);else throw new TypeError("Expected usable value, not `"+value+"`");return this;function add(value2){if(typeof value2=="function")addPlugin(value2,[]);else if(typeof value2=="object")if(Array.isArray(value2)){let[plugin,...parameters2]=value2;addPlugin(plugin,parameters2)}else addPreset(value2);else throw new TypeError("Expected usable value, not `"+value2+"`")}function addPreset(result){if(!("plugins"in result)&&!("settings"in result))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");addList(result.plugins),result.settings&&(namespace.settings=(0,import_extend.default)(!0,namespace.settings,result.settings))}function addList(plugins){let index2=-1;if(plugins!=null)if(Array.isArray(plugins))for(;++index2<plugins.length;){let thing=plugins[index2];add(thing)}else throw new TypeError("Expected a list of plugins, not `"+plugins+"`")}function addPlugin(plugin,parameters2){let index2=-1,entryIndex=-1;for(;++index2<attachers.length;)if(attachers[index2][0]===plugin){entryIndex=index2;break}if(entryIndex===-1)attachers.push([plugin,...parameters2]);else if(parameters2.length>0){let[primary,...rest]=parameters2,currentPrimary=attachers[entryIndex][1];isPlainObject(currentPrimary)&&isPlainObject(primary)&&(primary=(0,import_extend.default)(!0,currentPrimary,primary)),attachers[entryIndex]=[plugin,primary,...rest]}}}},unified=new Processor().freeze();function assertParser(name2,value){if(typeof value!="function")throw new TypeError("Cannot `"+name2+"` without `parser`")}function assertCompiler(name2,value){if(typeof value!="function")throw new TypeError("Cannot `"+name2+"` without `compiler`")}function assertUnfrozen(name2,frozen){if(frozen)throw new Error("Cannot call `"+name2+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(node3){if(!isPlainObject(node3)||typeof node3.type!="string")throw new TypeError("Expected node, got `"+node3+"`")}function assertDone(name2,asyncName,complete){if(!complete)throw new Error("`"+name2+"` finished async. Use `"+asyncName+"` instead")}function vfile(value){return looksLikeAVFile(value)?value:new VFile(value)}function looksLikeAVFile(value){return!!(value&&typeof value=="object"&&"message"in value&&"messages"in value)}function looksLikeAValue(value){return typeof value=="string"||isUint8Array2(value)}function isUint8Array2(value){return!!(value&&typeof value=="object"&&"byteLength"in value&&"byteOffset"in value)}var remark=unified().use(remarkParse).use(remarkStringify).freeze();function mdxExpressionFromMarkdown(){return{enter:{mdxFlowExpression:enterMdxFlowExpression,mdxTextExpression:enterMdxTextExpression},exit:{mdxFlowExpression:exitMdxExpression,mdxFlowExpressionChunk:exitMdxExpressionData,mdxTextExpression:exitMdxExpression,mdxTextExpressionChunk:exitMdxExpressionData}}}function mdxExpressionToMarkdown(){return{handlers:{mdxFlowExpression:handleMdxExpression,mdxTextExpression:handleMdxExpression},unsafe:[{character:"{",inConstruct:["phrasing"]},{atBreak:!0,character:"{"}]}}function enterMdxFlowExpression(token){this.enter({type:"mdxFlowExpression",value:""},token),this.buffer()}function enterMdxTextExpression(token){this.enter({type:"mdxTextExpression",value:""},token),this.buffer()}function exitMdxExpression(token){let value=this.resume(),estree=token.estree,node3=this.stack[this.stack.length-1];node3.type==="mdxFlowExpression"||node3.type,this.exit(token),node3.value=value,estree&&(node3.data={estree})}function exitMdxExpressionData(token){this.config.enter.data.call(this,token),this.config.exit.data.call(this,token)}function handleMdxExpression(node3){return"{"+(node3.value||"")+"}"}function ccount(value,character){let source=String(value);if(typeof character!="string")throw new TypeError("Expected character");let count=0,index2=source.indexOf(character);for(;index2!==-1;)count++,index2=source.indexOf(character,index2+character.length);return count}var characterEntitiesLegacy=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var characterReferenceInvalid={0:"\uFFFD",128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};function isDecimal(character){let code2=typeof character=="string"?character.charCodeAt(0):character;return code2>=48&&code2<=57}function isHexadecimal(character){let code2=typeof character=="string"?character.charCodeAt(0):character;return code2>=97&&code2<=102||code2>=65&&code2<=70||code2>=48&&code2<=57}function isAlphabetical(character){let code2=typeof character=="string"?character.charCodeAt(0):character;return code2>=97&&code2<=122||code2>=65&&code2<=90}function isAlphanumerical(character){return isAlphabetical(character)||isDecimal(character)}var fromCharCode=String.fromCharCode,messages=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function parseEntities(value,options={}){let additional=typeof options.additional=="string"?options.additional.charCodeAt(0):options.additional,result=[],index2=0,lines=-1,queue="",point3,indent2;options.position&&("start"in options.position||"indent"in options.position?(indent2=options.position.indent,point3=options.position.start):point3=options.position);let line=(point3?point3.line:0)||1,column=(point3?point3.column:0)||1,previous2=now(),character;for(index2--;++index2<=value.length;)if(character===10&&(column=(indent2?indent2[lines]:0)||1),character=value.charCodeAt(index2),character===38){let following=value.charCodeAt(index2+1);if(following===9||following===10||following===12||following===32||following===38||following===60||Number.isNaN(following)||additional&&following===additional){queue+=fromCharCode(character),column++;continue}let start2=index2+1,begin=start2,end=start2,type;if(following===35){end=++begin;let following2=value.charCodeAt(end);following2===88||following2===120?(type="hexadecimal",end=++begin):type="decimal"}else type="named";let characterReferenceCharacters="",characterReference2="",characters="",test=type==="named"?isAlphanumerical:type==="decimal"?isDecimal:isHexadecimal;for(end--;++end<=value.length;){let following2=value.charCodeAt(end);if(!test(following2))break;characters+=fromCharCode(following2),type==="named"&&characterEntitiesLegacy.includes(characters)&&(characterReferenceCharacters=characters,characterReference2=decodeNamedCharacterReference(characters))}let terminated=value.charCodeAt(end)===59;if(terminated){end++;let namedReference=type==="named"?decodeNamedCharacterReference(characters):!1;namedReference&&(characterReferenceCharacters=characters,characterReference2=namedReference)}let diff=1+end-start2,reference="";if(!(!terminated&&options.nonTerminated===!1))if(!characters)type!=="named"&&warning(4,diff);else if(type==="named"){if(terminated&&!characterReference2)warning(5,1);else if(characterReferenceCharacters!==characters&&(end=begin+characterReferenceCharacters.length,diff=1+end-begin,terminated=!1),!terminated){let reason=characterReferenceCharacters?1:3;if(options.attribute){let following2=value.charCodeAt(end);following2===61?(warning(reason,diff),characterReference2=""):isAlphanumerical(following2)?characterReference2="":warning(reason,diff)}else warning(reason,diff)}reference=characterReference2}else{terminated||warning(2,diff);let referenceCode=Number.parseInt(characters,type==="hexadecimal"?16:10);if(prohibited(referenceCode))warning(7,diff),reference=fromCharCode(65533);else if(referenceCode in characterReferenceInvalid)warning(6,diff),reference=characterReferenceInvalid[referenceCode];else{let output="";disallowed(referenceCode)&&warning(6,diff),referenceCode>65535&&(referenceCode-=65536,output+=fromCharCode(referenceCode>>>10|55296),referenceCode=56320|referenceCode&1023),reference=output+fromCharCode(referenceCode)}}if(reference){flush(),previous2=now(),index2=end-1,column+=end-start2+1,result.push(reference);let next=now();next.offset++,options.reference&&options.reference.call(options.referenceContext,reference,{start:previous2,end:next},value.slice(start2-1,end)),previous2=next}else characters=value.slice(start2-1,end),queue+=characters,column+=characters.length,index2=end-1}else character===10&&(line++,lines++,column=0),Number.isNaN(character)?flush():(queue+=fromCharCode(character),column++);return result.join("");function now(){return{line,column,offset:index2+((point3?point3.offset:0)||0)}}function warning(code2,offset2){let position2;options.warning&&(position2=now(),position2.column+=offset2,position2.offset+=offset2,options.warning.call(options.warningContext,messages[code2],position2,code2))}function flush(){queue&&(result.push(queue),options.text&&options.text.call(options.textContext,queue,{start:previous2,end:now()}),queue="")}}function prohibited(code2){return code2>=55296&&code2<=57343||code2>1114111}function disallowed(code2){return code2>=1&&code2<=8||code2===11||code2>=13&&code2<=31||code2>=127&&code2<=159||code2>=64976&&code2<=65007||(code2&65535)===65535||(code2&65535)===65534}function core(value,options){if(value=value.replace(options.subset?charactersToExpression(options.subset):/["&'<>`]/g,basic),options.subset||options.escapeOnly)return value;return value.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,surrogate).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,basic);function surrogate(pair,index2,all3){return options.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all3.charCodeAt(index2+2),options)}function basic(character,index2,all3){return options.format(character.charCodeAt(0),all3.charCodeAt(index2+1),options)}}function charactersToExpression(subset){let groups=[],index2=-1;for(;++index2<subset.length;)groups.push(subset[index2].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+groups.join("|")+")","g")}function formatBasic(code2){return"&#x"+code2.toString(16).toUpperCase()+";"}function stringifyEntitiesLight(value,options){return core(value,Object.assign({format:formatBasic},options))}var indent=" ";function mdxJsxFromMarkdown(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:enterMdxJsxTag,mdxJsxFlowTagClosingMarker:enterMdxJsxTagClosingMarker,mdxJsxFlowTagAttribute:enterMdxJsxTagAttribute,mdxJsxFlowTagExpressionAttribute:enterMdxJsxTagExpressionAttribute,mdxJsxFlowTagAttributeValueLiteral:buffer,mdxJsxFlowTagAttributeValueExpression:buffer,mdxJsxFlowTagSelfClosingMarker:enterMdxJsxTagSelfClosingMarker,mdxJsxTextTag:enterMdxJsxTag,mdxJsxTextTagClosingMarker:enterMdxJsxTagClosingMarker,mdxJsxTextTagAttribute:enterMdxJsxTagAttribute,mdxJsxTextTagExpressionAttribute:enterMdxJsxTagExpressionAttribute,mdxJsxTextTagAttributeValueLiteral:buffer,mdxJsxTextTagAttributeValueExpression:buffer,mdxJsxTextTagSelfClosingMarker:enterMdxJsxTagSelfClosingMarker},exit:{mdxJsxFlowTagClosingMarker:exitMdxJsxTagClosingMarker,mdxJsxFlowTagNamePrimary:exitMdxJsxTagNamePrimary,mdxJsxFlowTagNameMember:exitMdxJsxTagNameMember,mdxJsxFlowTagNameLocal:exitMdxJsxTagNameLocal,mdxJsxFlowTagExpressionAttribute:exitMdxJsxTagExpressionAttribute,mdxJsxFlowTagExpressionAttributeValue:data2,mdxJsxFlowTagAttributeNamePrimary:exitMdxJsxTagAttributeNamePrimary,mdxJsxFlowTagAttributeNameLocal:exitMdxJsxTagAttributeNameLocal,mdxJsxFlowTagAttributeValueLiteral:exitMdxJsxTagAttributeValueLiteral,mdxJsxFlowTagAttributeValueLiteralValue:data2,mdxJsxFlowTagAttributeValueExpression:exitMdxJsxTagAttributeValueExpression,mdxJsxFlowTagAttributeValueExpressionValue:data2,mdxJsxFlowTagSelfClosingMarker:exitMdxJsxTagSelfClosingMarker,mdxJsxFlowTag:exitMdxJsxTag,mdxJsxTextTagClosingMarker:exitMdxJsxTagClosingMarker,mdxJsxTextTagNamePrimary:exitMdxJsxTagNamePrimary,mdxJsxTextTagNameMember:exitMdxJsxTagNameMember,mdxJsxTextTagNameLocal:exitMdxJsxTagNameLocal,mdxJsxTextTagExpressionAttribute:exitMdxJsxTagExpressionAttribute,mdxJsxTextTagExpressionAttributeValue:data2,mdxJsxTextTagAttributeNamePrimary:exitMdxJsxTagAttributeNamePrimary,mdxJsxTextTagAttributeNameLocal:exitMdxJsxTagAttributeNameLocal,mdxJsxTextTagAttributeValueLiteral:exitMdxJsxTagAttributeValueLiteral,mdxJsxTextTagAttributeValueLiteralValue:data2,mdxJsxTextTagAttributeValueExpression:exitMdxJsxTagAttributeValueExpression,mdxJsxTextTagAttributeValueExpressionValue:data2,mdxJsxTextTagSelfClosingMarker:exitMdxJsxTagSelfClosingMarker,mdxJsxTextTag:exitMdxJsxTag}};function buffer(){this.buffer()}function data2(token){this.config.enter.data.call(this,token),this.config.exit.data.call(this,token)}function enterMdxJsxTag(token){let tag={name:void 0,attributes:[],close:!1,selfClosing:!1,start:token.start,end:token.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=tag,this.buffer()}function enterMdxJsxTagClosingMarker(token){let stack=this.data.mdxJsxTagStack;if(stack.length===0)throw new VFileMessage("Unexpected closing slash `/` in tag, expected an open tag first",{start:token.start,end:token.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function enterMdxJsxTagAnyAttribute(token){let tag=this.data.mdxJsxTag;if(tag.close)throw new VFileMessage("Unexpected attribute in closing tag, expected the end of the tag",{start:token.start,end:token.end},"mdast-util-mdx-jsx:unexpected-attribute")}function enterMdxJsxTagSelfClosingMarker(token){let tag=this.data.mdxJsxTag;if(tag.close)throw new VFileMessage("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:token.start,end:token.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function exitMdxJsxTagClosingMarker(){let tag=this.data.mdxJsxTag;tag.close=!0}function exitMdxJsxTagNamePrimary(token){let tag=this.data.mdxJsxTag;tag.name=this.sliceSerialize(token)}function exitMdxJsxTagNameMember(token){let tag=this.data.mdxJsxTag;tag.name+="."+this.sliceSerialize(token)}function exitMdxJsxTagNameLocal(token){let tag=this.data.mdxJsxTag;tag.name+=":"+this.sliceSerialize(token)}function enterMdxJsxTagAttribute(token){let tag=this.data.mdxJsxTag;enterMdxJsxTagAnyAttribute.call(this,token),tag.attributes.push({type:"mdxJsxAttribute",name:"",value:null})}function enterMdxJsxTagExpressionAttribute(token){let tag=this.data.mdxJsxTag;enterMdxJsxTagAnyAttribute.call(this,token),tag.attributes.push({type:"mdxJsxExpressionAttribute",value:""}),this.buffer()}function exitMdxJsxTagExpressionAttribute(token){let tag=this.data.mdxJsxTag;let tail=tag.attributes[tag.attributes.length-1];tail.type;let estree=token.estree;tail.value=this.resume(),estree&&(tail.data={estree})}function exitMdxJsxTagAttributeNamePrimary(token){let tag=this.data.mdxJsxTag;let node3=tag.attributes[tag.attributes.length-1];node3.type,node3.name=this.sliceSerialize(token)}function exitMdxJsxTagAttributeNameLocal(token){let tag=this.data.mdxJsxTag;let node3=tag.attributes[tag.attributes.length-1];node3.type,node3.name+=":"+this.sliceSerialize(token)}function exitMdxJsxTagAttributeValueLiteral(){let tag=this.data.mdxJsxTag;tag.attributes[tag.attributes.length-1].value=parseEntities(this.resume(),{nonTerminated:!1})}function exitMdxJsxTagAttributeValueExpression(token){let tag=this.data.mdxJsxTag;let tail=tag.attributes[tag.attributes.length-1];tail.type;let node3={type:"mdxJsxAttributeValueExpression",value:this.resume()},estree=token.estree;estree&&(node3.data={estree}),tail.value=node3}function exitMdxJsxTagSelfClosingMarker(){let tag=this.data.mdxJsxTag;tag.selfClosing=!0}function exitMdxJsxTag(token){let tag=this.data.mdxJsxTag;let stack=this.data.mdxJsxTagStack;let tail=stack[stack.length-1];if(tag.close&&tail.name!==tag.name)throw new VFileMessage("Unexpected closing tag `"+serializeAbbreviatedTag(tag)+"`, expected corresponding closing tag for `"+serializeAbbreviatedTag(tail)+"` ("+stringifyPosition(tail)+")",{start:token.start,end:token.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),tag.close?stack.pop():this.enter({type:token.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:tag.name||null,attributes:tag.attributes,children:[]},token,onErrorRightIsTag),tag.selfClosing||tag.close?this.exit(token,onErrorLeftIsTag):stack.push(tag)}function onErrorRightIsTag(closing,open){let tag=this.data.mdxJsxTag;let place=closing?" before the end of `"+closing.type+"`":"",position2=closing?{start:closing.start,end:closing.end}:void 0;throw new VFileMessage("Expected a closing tag for `"+serializeAbbreviatedTag(tag)+"` ("+stringifyPosition({start:open.start,end:open.end})+")"+place,position2,"mdast-util-mdx-jsx:end-tag-mismatch")}function onErrorLeftIsTag(a,b){let tag=this.data.mdxJsxTag;throw new VFileMessage("Expected the closing tag `"+serializeAbbreviatedTag(tag)+"` either after the end of `"+b.type+"` ("+stringifyPosition(b.end)+") or another opening tag after the start of `"+b.type+"` ("+stringifyPosition(b.start)+")",{start:a.start,end:a.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function serializeAbbreviatedTag(tag){return"<"+(tag.close?"/":"")+(tag.name||"")+">"}}function mdxJsxToMarkdown(options){let options_=options||{},quote=options_.quote||'"',quoteSmart=options_.quoteSmart||!1,tightSelfClosing=options_.tightSelfClosing||!1,printWidth=options_.printWidth||Number.POSITIVE_INFINITY,alternative=quote==='"'?"'":'"';if(quote!=='"'&&quote!=="'")throw new Error("Cannot serialize attribute values with `"+quote+"` for `options.quote`, expected `\"`, or `'`");return mdxElement.peek=peekElement,{handlers:{mdxJsxFlowElement:mdxElement,mdxJsxTextElement:mdxElement},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function mdxElement(node3,_,state,info){let flow3=node3.type==="mdxJsxFlowElement",selfClosing=node3.name?!node3.children||node3.children.length===0:!1,depth=inferDepth(state),currentIndent=createIndent(depth),trackerOneLine=state.createTracker(info),trackerMultiLine=state.createTracker(info),serializedAttributes=[],prefix=(flow3?currentIndent:"")+"<"+(node3.name||""),exit2=state.enter(node3.type);if(trackerOneLine.move(prefix),trackerMultiLine.move(prefix),node3.attributes&&node3.attributes.length>0){if(!node3.name)throw new Error("Cannot serialize fragment w/ attributes");let index2=-1;for(;++index2<node3.attributes.length;){let attribute=node3.attributes[index2],result;if(attribute.type==="mdxJsxExpressionAttribute")result="{"+(attribute.value||"")+"}";else{if(!attribute.name)throw new Error("Cannot serialize attribute w/o name");let value2=attribute.value,left=attribute.name,right="";if(value2!=null)if(typeof value2=="object")right="{"+(value2.value||"")+"}";else{let appliedQuote=quoteSmart&&ccount(value2,quote)>ccount(value2,alternative)?alternative:quote;right=appliedQuote+stringifyEntitiesLight(value2,{subset:[appliedQuote]})+appliedQuote}result=left+(right?"=":"")+right}serializedAttributes.push(result)}}let attributesOnTheirOwnLine=!1,attributesOnOneLine=serializedAttributes.join(" ");flow3&&(/\r?\n|\r/.test(attributesOnOneLine)||trackerOneLine.current().now.column+attributesOnOneLine.length+(selfClosing?tightSelfClosing?2:3:1)>printWidth)&&(attributesOnTheirOwnLine=!0);let tracker=trackerOneLine,value=prefix;if(attributesOnTheirOwnLine){tracker=trackerMultiLine;let index2=-1;for(;++index2<serializedAttributes.length;)serializedAttributes[index2]=currentIndent+indent+serializedAttributes[index2];value+=tracker.move(`
44
+ `),result;function enter(name2){return state.stack.push(name2),exit2;function exit2(){state.stack.pop()}}}function invalid(value){throw new Error("Cannot handle value `"+value+"`, expected node")}function unknown(value){let node3=value;throw new Error("Cannot handle unknown node `"+node3.type+"`")}function joinDefinition(left,right){if(left.type==="definition"&&left.type===right.type)return 0}function containerPhrasingBound(parent,info){return containerPhrasing(parent,this,info)}function containerFlowBound(parent,info){return containerFlow(parent,this,info)}function safeBound(value,config){return safe(this,value,config)}function remarkStringify(options){let self2=this;self2.compiler=compiler2;function compiler2(tree){return toMarkdown(tree,{...self2.data("settings"),...options,extensions:self2.data("toMarkdownExtensions")||[]})}}function bail(error){if(error)throw error}var import_extend=__toESM(require_extend(),1);function isPlainObject(value){if(typeof value!="object"||value===null)return!1;let prototype=Object.getPrototypeOf(value);return(prototype===null||prototype===Object.prototype||Object.getPrototypeOf(prototype)===null)&&!(Symbol.toStringTag in value)&&!(Symbol.iterator in value)}function trough(){let fns=[],pipeline={run,use};return pipeline;function run(...values){let middlewareIndex=-1,callback=values.pop();if(typeof callback!="function")throw new TypeError("Expected function as last argument, not "+callback);next(null,...values);function next(error,...output){let fn=fns[++middlewareIndex],index2=-1;if(error){callback(error);return}for(;++index2<values.length;)(output[index2]===null||output[index2]===void 0)&&(output[index2]=values[index2]);values=output,fn?wrap(fn,next)(...output):callback(null,...output)}}function use(middelware){if(typeof middelware!="function")throw new TypeError("Expected `middelware` to be a function, not "+middelware);return fns.push(middelware),pipeline}}function wrap(middleware,callback){let called;return wrapped;function wrapped(...parameters){let fnExpectsCallback=middleware.length>parameters.length,result;fnExpectsCallback&&parameters.push(done);try{result=middleware.apply(this,parameters)}catch(error){let exception=error;if(fnExpectsCallback&&called)throw exception;return done(exception)}fnExpectsCallback||(result instanceof Promise?result.then(then,done):result instanceof Error?done(result):then(result))}function done(error,...output){called||(called=!0,callback(error,...output))}function then(value){done(null,value)}}var VFileMessage=class extends Error{constructor(causeOrReason,optionsOrParentOrPlace,origin){super(),typeof optionsOrParentOrPlace=="string"&&(origin=optionsOrParentOrPlace,optionsOrParentOrPlace=void 0);let reason="",options={},legacyCause=!1;if(optionsOrParentOrPlace&&("line"in optionsOrParentOrPlace&&"column"in optionsOrParentOrPlace?options={place:optionsOrParentOrPlace}:"start"in optionsOrParentOrPlace&&"end"in optionsOrParentOrPlace?options={place:optionsOrParentOrPlace}:"type"in optionsOrParentOrPlace?options={ancestors:[optionsOrParentOrPlace],place:optionsOrParentOrPlace.position}:options={...optionsOrParentOrPlace}),typeof causeOrReason=="string"?reason=causeOrReason:!options.cause&&causeOrReason&&(legacyCause=!0,reason=causeOrReason.message,options.cause=causeOrReason),!options.ruleId&&!options.source&&typeof origin=="string"){let index2=origin.indexOf(":");index2===-1?options.ruleId=origin:(options.source=origin.slice(0,index2),options.ruleId=origin.slice(index2+1))}if(!options.place&&options.ancestors&&options.ancestors){let parent=options.ancestors[options.ancestors.length-1];parent&&(options.place=parent.position)}let start2=options.place&&"start"in options.place?options.place.start:options.place;this.ancestors=options.ancestors||void 0,this.cause=options.cause||void 0,this.column=start2?start2.column:void 0,this.fatal=void 0,this.file,this.message=reason,this.line=start2?start2.line:void 0,this.name=stringifyPosition(options.place)||"1:1",this.place=options.place||void 0,this.reason=this.message,this.ruleId=options.ruleId||void 0,this.source=options.source||void 0,this.stack=legacyCause&&options.cause&&typeof options.cause.stack=="string"?options.cause.stack:"",this.actual,this.expected,this.note,this.url}};VFileMessage.prototype.file="";VFileMessage.prototype.name="";VFileMessage.prototype.reason="";VFileMessage.prototype.message="";VFileMessage.prototype.stack="";VFileMessage.prototype.column=void 0;VFileMessage.prototype.line=void 0;VFileMessage.prototype.ancestors=void 0;VFileMessage.prototype.cause=void 0;VFileMessage.prototype.fatal=void 0;VFileMessage.prototype.place=void 0;VFileMessage.prototype.ruleId=void 0;VFileMessage.prototype.source=void 0;var import_node_path=__toESM(require("path"),1);var import_node_process=__toESM(require("process"),1);var import_node_url=require("url");function isUrl(fileUrlOrPath){return!!(fileUrlOrPath!==null&&typeof fileUrlOrPath=="object"&&"href"in fileUrlOrPath&&fileUrlOrPath.href&&"protocol"in fileUrlOrPath&&fileUrlOrPath.protocol&&fileUrlOrPath.auth===void 0)}var order=["history","path","basename","stem","extname","dirname"],VFile=class{constructor(value){let options;value?isUrl(value)?options={path:value}:typeof value=="string"||isUint8Array(value)?options={value}:options=value:options={},this.cwd="cwd"in options?"":import_node_process.default.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let index2=-1;for(;++index2<order.length;){let field2=order[index2];field2 in options&&options[field2]!==void 0&&options[field2]!==null&&(this[field2]=field2==="history"?[...options[field2]]:options[field2])}let field;for(field in options)order.includes(field)||(this[field]=options[field])}get basename(){return typeof this.path=="string"?import_node_path.default.basename(this.path):void 0}set basename(basename2){assertNonEmpty(basename2,"basename"),assertPart(basename2,"basename"),this.path=import_node_path.default.join(this.dirname||"",basename2)}get dirname(){return typeof this.path=="string"?import_node_path.default.dirname(this.path):void 0}set dirname(dirname){assertPath(this.basename,"dirname"),this.path=import_node_path.default.join(dirname||"",this.basename)}get extname(){return typeof this.path=="string"?import_node_path.default.extname(this.path):void 0}set extname(extname){if(assertPart(extname,"extname"),assertPath(this.dirname,"extname"),extname){if(extname.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(extname.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=import_node_path.default.join(this.dirname,this.stem+(extname||""))}get path(){return this.history[this.history.length-1]}set path(path){isUrl(path)&&(path=(0,import_node_url.fileURLToPath)(path)),assertNonEmpty(path,"path"),this.path!==path&&this.history.push(path)}get stem(){return typeof this.path=="string"?import_node_path.default.basename(this.path,this.extname):void 0}set stem(stem){assertNonEmpty(stem,"stem"),assertPart(stem,"stem"),this.path=import_node_path.default.join(this.dirname||"",stem+(this.extname||""))}fail(causeOrReason,optionsOrParentOrPlace,origin){let message=this.message(causeOrReason,optionsOrParentOrPlace,origin);throw message.fatal=!0,message}info(causeOrReason,optionsOrParentOrPlace,origin){let message=this.message(causeOrReason,optionsOrParentOrPlace,origin);return message.fatal=void 0,message}message(causeOrReason,optionsOrParentOrPlace,origin){let message=new VFileMessage(causeOrReason,optionsOrParentOrPlace,origin);return this.path&&(message.name=this.path+":"+message.name,message.file=this.path),message.fatal=!1,this.messages.push(message),message}toString(encoding){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(encoding||void 0).decode(this.value)}};function assertPart(part,name2){if(part&&part.includes(import_node_path.default.sep))throw new Error("`"+name2+"` cannot be a path: did not expect `"+import_node_path.default.sep+"`")}function assertNonEmpty(part,name2){if(!part)throw new Error("`"+name2+"` cannot be empty")}function assertPath(path,name2){if(!path)throw new Error("Setting `"+name2+"` requires `path` to be set too")}function isUint8Array(value){return!!(value&&typeof value=="object"&&"byteLength"in value&&"byteOffset"in value)}var CallableInstance=function(property){let proto=this.constructor.prototype,func=proto[property],apply=function(){return func.apply(apply,arguments)};Object.setPrototypeOf(apply,proto);let names=Object.getOwnPropertyNames(func);for(let p of names){let descriptor=Object.getOwnPropertyDescriptor(func,p);descriptor&&Object.defineProperty(apply,p,descriptor)}return apply};var own5={}.hasOwnProperty,Processor=class _Processor extends CallableInstance{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=trough()}copy(){let destination=new _Processor,index2=-1;for(;++index2<this.attachers.length;){let attacher=this.attachers[index2];destination.use(...attacher)}return destination.data((0,import_extend.default)(!0,{},this.namespace)),destination}data(key,value){return typeof key=="string"?arguments.length===2?(assertUnfrozen("data",this.frozen),this.namespace[key]=value,this):own5.call(this.namespace,key)&&this.namespace[key]||void 0:key?(assertUnfrozen("data",this.frozen),this.namespace=key,this):this.namespace}freeze(){if(this.frozen)return this;let self2=this;for(;++this.freezeIndex<this.attachers.length;){let[attacher,...options]=this.attachers[this.freezeIndex];if(options[0]===!1)continue;options[0]===!0&&(options[0]=void 0);let transformer=attacher.call(self2,...options);typeof transformer=="function"&&this.transformers.use(transformer)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(file){this.freeze();let realFile=vfile(file),parser=this.parser||this.Parser;return assertParser("parse",parser),parser(String(realFile),realFile)}process(file,done){let self2=this;return this.freeze(),assertParser("process",this.parser||this.Parser),assertCompiler("process",this.compiler||this.Compiler),done?executor(void 0,done):new Promise(executor);function executor(resolve,reject){let realFile=vfile(file),parseTree=self2.parse(realFile);self2.run(parseTree,realFile,function(error,tree,file2){if(error||!tree||!file2)return realDone(error);let compileTree=tree,compileResult=self2.stringify(compileTree,file2);looksLikeAValue(compileResult)?file2.value=compileResult:file2.result=compileResult,realDone(error,file2)});function realDone(error,file2){error||!file2?reject(error):resolve?resolve(file2):done(void 0,file2)}}}processSync(file){let complete=!1,result;return this.freeze(),assertParser("processSync",this.parser||this.Parser),assertCompiler("processSync",this.compiler||this.Compiler),this.process(file,realDone),assertDone("processSync","process",complete),result;function realDone(error,file2){complete=!0,bail(error),result=file2}}run(tree,file,done){assertNode(tree),this.freeze();let transformers=this.transformers;return!done&&typeof file=="function"&&(done=file,file=void 0),done?executor(void 0,done):new Promise(executor);function executor(resolve,reject){let realFile=vfile(file);transformers.run(tree,realFile,realDone);function realDone(error,outputTree,file2){let resultingTree=outputTree||tree;error?reject(error):resolve?resolve(resultingTree):done(void 0,resultingTree,file2)}}}runSync(tree,file){let complete=!1,result;return this.run(tree,file,realDone),assertDone("runSync","run",complete),result;function realDone(error,tree2){bail(error),result=tree2,complete=!0}}stringify(tree,file){this.freeze();let realFile=vfile(file),compiler2=this.compiler||this.Compiler;return assertCompiler("stringify",compiler2),assertNode(tree),compiler2(tree,realFile)}use(value,...parameters){let attachers=this.attachers,namespace=this.namespace;if(assertUnfrozen("use",this.frozen),value!=null)if(typeof value=="function")addPlugin(value,parameters);else if(typeof value=="object")Array.isArray(value)?addList(value):addPreset(value);else throw new TypeError("Expected usable value, not `"+value+"`");return this;function add(value2){if(typeof value2=="function")addPlugin(value2,[]);else if(typeof value2=="object")if(Array.isArray(value2)){let[plugin,...parameters2]=value2;addPlugin(plugin,parameters2)}else addPreset(value2);else throw new TypeError("Expected usable value, not `"+value2+"`")}function addPreset(result){if(!("plugins"in result)&&!("settings"in result))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");addList(result.plugins),result.settings&&(namespace.settings=(0,import_extend.default)(!0,namespace.settings,result.settings))}function addList(plugins){let index2=-1;if(plugins!=null)if(Array.isArray(plugins))for(;++index2<plugins.length;){let thing=plugins[index2];add(thing)}else throw new TypeError("Expected a list of plugins, not `"+plugins+"`")}function addPlugin(plugin,parameters2){let index2=-1,entryIndex=-1;for(;++index2<attachers.length;)if(attachers[index2][0]===plugin){entryIndex=index2;break}if(entryIndex===-1)attachers.push([plugin,...parameters2]);else if(parameters2.length>0){let[primary,...rest]=parameters2,currentPrimary=attachers[entryIndex][1];isPlainObject(currentPrimary)&&isPlainObject(primary)&&(primary=(0,import_extend.default)(!0,currentPrimary,primary)),attachers[entryIndex]=[plugin,primary,...rest]}}}},unified=new Processor().freeze();function assertParser(name2,value){if(typeof value!="function")throw new TypeError("Cannot `"+name2+"` without `parser`")}function assertCompiler(name2,value){if(typeof value!="function")throw new TypeError("Cannot `"+name2+"` without `compiler`")}function assertUnfrozen(name2,frozen){if(frozen)throw new Error("Cannot call `"+name2+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(node3){if(!isPlainObject(node3)||typeof node3.type!="string")throw new TypeError("Expected node, got `"+node3+"`")}function assertDone(name2,asyncName,complete){if(!complete)throw new Error("`"+name2+"` finished async. Use `"+asyncName+"` instead")}function vfile(value){return looksLikeAVFile(value)?value:new VFile(value)}function looksLikeAVFile(value){return!!(value&&typeof value=="object"&&"message"in value&&"messages"in value)}function looksLikeAValue(value){return typeof value=="string"||isUint8Array2(value)}function isUint8Array2(value){return!!(value&&typeof value=="object"&&"byteLength"in value&&"byteOffset"in value)}var remark=unified().use(remarkParse).use(remarkStringify).freeze();function mdxExpressionFromMarkdown(){return{enter:{mdxFlowExpression:enterMdxFlowExpression,mdxTextExpression:enterMdxTextExpression},exit:{mdxFlowExpression:exitMdxExpression,mdxFlowExpressionChunk:exitMdxExpressionData,mdxTextExpression:exitMdxExpression,mdxTextExpressionChunk:exitMdxExpressionData}}}function mdxExpressionToMarkdown(){return{handlers:{mdxFlowExpression:handleMdxExpression,mdxTextExpression:handleMdxExpression},unsafe:[{character:"{",inConstruct:["phrasing"]},{atBreak:!0,character:"{"}]}}function enterMdxFlowExpression(token){this.enter({type:"mdxFlowExpression",value:""},token),this.buffer()}function enterMdxTextExpression(token){this.enter({type:"mdxTextExpression",value:""},token),this.buffer()}function exitMdxExpression(token){let value=this.resume(),estree=token.estree,node3=this.stack[this.stack.length-1];node3.type==="mdxFlowExpression"||node3.type,this.exit(token),node3.value=value,estree&&(node3.data={estree})}function exitMdxExpressionData(token){this.config.enter.data.call(this,token),this.config.exit.data.call(this,token)}function handleMdxExpression(node3){return"{"+(node3.value||"")+"}"}function ccount(value,character){let source=String(value);if(typeof character!="string")throw new TypeError("Expected character");let count=0,index2=source.indexOf(character);for(;index2!==-1;)count++,index2=source.indexOf(character,index2+character.length);return count}var characterEntitiesLegacy=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var characterReferenceInvalid={0:"\uFFFD",128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};function isDecimal(character){let code2=typeof character=="string"?character.charCodeAt(0):character;return code2>=48&&code2<=57}function isHexadecimal(character){let code2=typeof character=="string"?character.charCodeAt(0):character;return code2>=97&&code2<=102||code2>=65&&code2<=70||code2>=48&&code2<=57}function isAlphabetical(character){let code2=typeof character=="string"?character.charCodeAt(0):character;return code2>=97&&code2<=122||code2>=65&&code2<=90}function isAlphanumerical(character){return isAlphabetical(character)||isDecimal(character)}var fromCharCode=String.fromCharCode,messages=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function parseEntities(value,options={}){let additional=typeof options.additional=="string"?options.additional.charCodeAt(0):options.additional,result=[],index2=0,lines=-1,queue="",point3,indent2;options.position&&("start"in options.position||"indent"in options.position?(indent2=options.position.indent,point3=options.position.start):point3=options.position);let line=(point3?point3.line:0)||1,column=(point3?point3.column:0)||1,previous2=now(),character;for(index2--;++index2<=value.length;)if(character===10&&(column=(indent2?indent2[lines]:0)||1),character=value.charCodeAt(index2),character===38){let following=value.charCodeAt(index2+1);if(following===9||following===10||following===12||following===32||following===38||following===60||Number.isNaN(following)||additional&&following===additional){queue+=fromCharCode(character),column++;continue}let start2=index2+1,begin=start2,end=start2,type;if(following===35){end=++begin;let following2=value.charCodeAt(end);following2===88||following2===120?(type="hexadecimal",end=++begin):type="decimal"}else type="named";let characterReferenceCharacters="",characterReference2="",characters="",test=type==="named"?isAlphanumerical:type==="decimal"?isDecimal:isHexadecimal;for(end--;++end<=value.length;){let following2=value.charCodeAt(end);if(!test(following2))break;characters+=fromCharCode(following2),type==="named"&&characterEntitiesLegacy.includes(characters)&&(characterReferenceCharacters=characters,characterReference2=decodeNamedCharacterReference(characters))}let terminated=value.charCodeAt(end)===59;if(terminated){end++;let namedReference=type==="named"?decodeNamedCharacterReference(characters):!1;namedReference&&(characterReferenceCharacters=characters,characterReference2=namedReference)}let diff=1+end-start2,reference="";if(!(!terminated&&options.nonTerminated===!1))if(!characters)type!=="named"&&warning(4,diff);else if(type==="named"){if(terminated&&!characterReference2)warning(5,1);else if(characterReferenceCharacters!==characters&&(end=begin+characterReferenceCharacters.length,diff=1+end-begin,terminated=!1),!terminated){let reason=characterReferenceCharacters?1:3;if(options.attribute){let following2=value.charCodeAt(end);following2===61?(warning(reason,diff),characterReference2=""):isAlphanumerical(following2)?characterReference2="":warning(reason,diff)}else warning(reason,diff)}reference=characterReference2}else{terminated||warning(2,diff);let referenceCode=Number.parseInt(characters,type==="hexadecimal"?16:10);if(prohibited(referenceCode))warning(7,diff),reference=fromCharCode(65533);else if(referenceCode in characterReferenceInvalid)warning(6,diff),reference=characterReferenceInvalid[referenceCode];else{let output="";disallowed(referenceCode)&&warning(6,diff),referenceCode>65535&&(referenceCode-=65536,output+=fromCharCode(referenceCode>>>10|55296),referenceCode=56320|referenceCode&1023),reference=output+fromCharCode(referenceCode)}}if(reference){flush(),previous2=now(),index2=end-1,column+=end-start2+1,result.push(reference);let next=now();next.offset++,options.reference&&options.reference.call(options.referenceContext,reference,{start:previous2,end:next},value.slice(start2-1,end)),previous2=next}else characters=value.slice(start2-1,end),queue+=characters,column+=characters.length,index2=end-1}else character===10&&(line++,lines++,column=0),Number.isNaN(character)?flush():(queue+=fromCharCode(character),column++);return result.join("");function now(){return{line,column,offset:index2+((point3?point3.offset:0)||0)}}function warning(code2,offset2){let position2;options.warning&&(position2=now(),position2.column+=offset2,position2.offset+=offset2,options.warning.call(options.warningContext,messages[code2],position2,code2))}function flush(){queue&&(result.push(queue),options.text&&options.text.call(options.textContext,queue,{start:previous2,end:now()}),queue="")}}function prohibited(code2){return code2>=55296&&code2<=57343||code2>1114111}function disallowed(code2){return code2>=1&&code2<=8||code2===11||code2>=13&&code2<=31||code2>=127&&code2<=159||code2>=64976&&code2<=65007||(code2&65535)===65535||(code2&65535)===65534}function core(value,options){if(value=value.replace(options.subset?charactersToExpression(options.subset):/["&'<>`]/g,basic),options.subset||options.escapeOnly)return value;return value.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,surrogate).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,basic);function surrogate(pair,index2,all3){return options.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all3.charCodeAt(index2+2),options)}function basic(character,index2,all3){return options.format(character.charCodeAt(0),all3.charCodeAt(index2+1),options)}}function charactersToExpression(subset){let groups=[],index2=-1;for(;++index2<subset.length;)groups.push(subset[index2].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+groups.join("|")+")","g")}function formatBasic(code2){return"&#x"+code2.toString(16).toUpperCase()+";"}function stringifyEntitiesLight(value,options){return core(value,Object.assign({format:formatBasic},options))}var indent=" ";function mdxJsxFromMarkdown(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:enterMdxJsxTag,mdxJsxFlowTagClosingMarker:enterMdxJsxTagClosingMarker,mdxJsxFlowTagAttribute:enterMdxJsxTagAttribute,mdxJsxFlowTagExpressionAttribute:enterMdxJsxTagExpressionAttribute,mdxJsxFlowTagAttributeValueLiteral:buffer,mdxJsxFlowTagAttributeValueExpression:buffer,mdxJsxFlowTagSelfClosingMarker:enterMdxJsxTagSelfClosingMarker,mdxJsxTextTag:enterMdxJsxTag,mdxJsxTextTagClosingMarker:enterMdxJsxTagClosingMarker,mdxJsxTextTagAttribute:enterMdxJsxTagAttribute,mdxJsxTextTagExpressionAttribute:enterMdxJsxTagExpressionAttribute,mdxJsxTextTagAttributeValueLiteral:buffer,mdxJsxTextTagAttributeValueExpression:buffer,mdxJsxTextTagSelfClosingMarker:enterMdxJsxTagSelfClosingMarker},exit:{mdxJsxFlowTagClosingMarker:exitMdxJsxTagClosingMarker,mdxJsxFlowTagNamePrimary:exitMdxJsxTagNamePrimary,mdxJsxFlowTagNameMember:exitMdxJsxTagNameMember,mdxJsxFlowTagNameLocal:exitMdxJsxTagNameLocal,mdxJsxFlowTagExpressionAttribute:exitMdxJsxTagExpressionAttribute,mdxJsxFlowTagExpressionAttributeValue:data2,mdxJsxFlowTagAttributeNamePrimary:exitMdxJsxTagAttributeNamePrimary,mdxJsxFlowTagAttributeNameLocal:exitMdxJsxTagAttributeNameLocal,mdxJsxFlowTagAttributeValueLiteral:exitMdxJsxTagAttributeValueLiteral,mdxJsxFlowTagAttributeValueLiteralValue:data2,mdxJsxFlowTagAttributeValueExpression:exitMdxJsxTagAttributeValueExpression,mdxJsxFlowTagAttributeValueExpressionValue:data2,mdxJsxFlowTagSelfClosingMarker:exitMdxJsxTagSelfClosingMarker,mdxJsxFlowTag:exitMdxJsxTag,mdxJsxTextTagClosingMarker:exitMdxJsxTagClosingMarker,mdxJsxTextTagNamePrimary:exitMdxJsxTagNamePrimary,mdxJsxTextTagNameMember:exitMdxJsxTagNameMember,mdxJsxTextTagNameLocal:exitMdxJsxTagNameLocal,mdxJsxTextTagExpressionAttribute:exitMdxJsxTagExpressionAttribute,mdxJsxTextTagExpressionAttributeValue:data2,mdxJsxTextTagAttributeNamePrimary:exitMdxJsxTagAttributeNamePrimary,mdxJsxTextTagAttributeNameLocal:exitMdxJsxTagAttributeNameLocal,mdxJsxTextTagAttributeValueLiteral:exitMdxJsxTagAttributeValueLiteral,mdxJsxTextTagAttributeValueLiteralValue:data2,mdxJsxTextTagAttributeValueExpression:exitMdxJsxTagAttributeValueExpression,mdxJsxTextTagAttributeValueExpressionValue:data2,mdxJsxTextTagSelfClosingMarker:exitMdxJsxTagSelfClosingMarker,mdxJsxTextTag:exitMdxJsxTag}};function buffer(){this.buffer()}function data2(token){this.config.enter.data.call(this,token),this.config.exit.data.call(this,token)}function enterMdxJsxTag(token){let tag={name:void 0,attributes:[],close:!1,selfClosing:!1,start:token.start,end:token.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=tag,this.buffer()}function enterMdxJsxTagClosingMarker(token){let stack=this.data.mdxJsxTagStack;if(stack.length===0)throw new VFileMessage("Unexpected closing slash `/` in tag, expected an open tag first",{start:token.start,end:token.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function enterMdxJsxTagAnyAttribute(token){let tag=this.data.mdxJsxTag;if(tag.close)throw new VFileMessage("Unexpected attribute in closing tag, expected the end of the tag",{start:token.start,end:token.end},"mdast-util-mdx-jsx:unexpected-attribute")}function enterMdxJsxTagSelfClosingMarker(token){let tag=this.data.mdxJsxTag;if(tag.close)throw new VFileMessage("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:token.start,end:token.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function exitMdxJsxTagClosingMarker(){let tag=this.data.mdxJsxTag;tag.close=!0}function exitMdxJsxTagNamePrimary(token){let tag=this.data.mdxJsxTag;tag.name=this.sliceSerialize(token)}function exitMdxJsxTagNameMember(token){let tag=this.data.mdxJsxTag;tag.name+="."+this.sliceSerialize(token)}function exitMdxJsxTagNameLocal(token){let tag=this.data.mdxJsxTag;tag.name+=":"+this.sliceSerialize(token)}function enterMdxJsxTagAttribute(token){let tag=this.data.mdxJsxTag;enterMdxJsxTagAnyAttribute.call(this,token),tag.attributes.push({type:"mdxJsxAttribute",name:"",value:null})}function enterMdxJsxTagExpressionAttribute(token){let tag=this.data.mdxJsxTag;enterMdxJsxTagAnyAttribute.call(this,token),tag.attributes.push({type:"mdxJsxExpressionAttribute",value:""}),this.buffer()}function exitMdxJsxTagExpressionAttribute(token){let tag=this.data.mdxJsxTag;let tail=tag.attributes[tag.attributes.length-1];tail.type;let estree=token.estree;tail.value=this.resume(),estree&&(tail.data={estree})}function exitMdxJsxTagAttributeNamePrimary(token){let tag=this.data.mdxJsxTag;let node3=tag.attributes[tag.attributes.length-1];node3.type,node3.name=this.sliceSerialize(token)}function exitMdxJsxTagAttributeNameLocal(token){let tag=this.data.mdxJsxTag;let node3=tag.attributes[tag.attributes.length-1];node3.type,node3.name+=":"+this.sliceSerialize(token)}function exitMdxJsxTagAttributeValueLiteral(){let tag=this.data.mdxJsxTag;tag.attributes[tag.attributes.length-1].value=parseEntities(this.resume(),{nonTerminated:!1})}function exitMdxJsxTagAttributeValueExpression(token){let tag=this.data.mdxJsxTag;let tail=tag.attributes[tag.attributes.length-1];tail.type;let node3={type:"mdxJsxAttributeValueExpression",value:this.resume()},estree=token.estree;estree&&(node3.data={estree}),tail.value=node3}function exitMdxJsxTagSelfClosingMarker(){let tag=this.data.mdxJsxTag;tag.selfClosing=!0}function exitMdxJsxTag(token){let tag=this.data.mdxJsxTag;let stack=this.data.mdxJsxTagStack;let tail=stack[stack.length-1];if(tag.close&&tail.name!==tag.name)throw new VFileMessage("Unexpected closing tag `"+serializeAbbreviatedTag(tag)+"`, expected corresponding closing tag for `"+serializeAbbreviatedTag(tail)+"` ("+stringifyPosition(tail)+")",{start:token.start,end:token.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),tag.close?stack.pop():this.enter({type:token.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:tag.name||null,attributes:tag.attributes,children:[]},token,onErrorRightIsTag),tag.selfClosing||tag.close?this.exit(token,onErrorLeftIsTag):stack.push(tag)}function onErrorRightIsTag(closing,open){let tag=this.data.mdxJsxTag;let place=closing?" before the end of `"+closing.type+"`":"",position2=closing?{start:closing.start,end:closing.end}:void 0;throw new VFileMessage("Expected a closing tag for `"+serializeAbbreviatedTag(tag)+"` ("+stringifyPosition({start:open.start,end:open.end})+")"+place,position2,"mdast-util-mdx-jsx:end-tag-mismatch")}function onErrorLeftIsTag(a,b){let tag=this.data.mdxJsxTag;throw new VFileMessage("Expected the closing tag `"+serializeAbbreviatedTag(tag)+"` either after the end of `"+b.type+"` ("+stringifyPosition(b.end)+") or another opening tag after the start of `"+b.type+"` ("+stringifyPosition(b.start)+")",{start:a.start,end:a.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function serializeAbbreviatedTag(tag){return"<"+(tag.close?"/":"")+(tag.name||"")+">"}}function mdxJsxToMarkdown(options){let options_=options||{},quote=options_.quote||'"',quoteSmart=options_.quoteSmart||!1,tightSelfClosing=options_.tightSelfClosing||!1,printWidth=options_.printWidth||Number.POSITIVE_INFINITY,alternative=quote==='"'?"'":'"';if(quote!=='"'&&quote!=="'")throw new Error("Cannot serialize attribute values with `"+quote+"` for `options.quote`, expected `\"`, or `'`");return mdxElement.peek=peekElement,{handlers:{mdxJsxFlowElement:mdxElement,mdxJsxTextElement:mdxElement},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function mdxElement(node3,_,state,info){let flow3=node3.type==="mdxJsxFlowElement",selfClosing=node3.name?!node3.children||node3.children.length===0:!1,depth=inferDepth(state),currentIndent=createIndent(depth),trackerOneLine=state.createTracker(info),trackerMultiLine=state.createTracker(info),serializedAttributes=[],prefix=(flow3?currentIndent:"")+"<"+(node3.name||""),exit2=state.enter(node3.type);if(trackerOneLine.move(prefix),trackerMultiLine.move(prefix),node3.attributes&&node3.attributes.length>0){if(!node3.name)throw new Error("Cannot serialize fragment w/ attributes");let index2=-1;for(;++index2<node3.attributes.length;){let attribute=node3.attributes[index2],result;if(attribute.type==="mdxJsxExpressionAttribute")result="{"+(attribute.value||"")+"}";else{if(!attribute.name)throw new Error("Cannot serialize attribute w/o name");let value2=attribute.value,left=attribute.name,right="";if(value2!=null)if(typeof value2=="object")right="{"+(value2.value||"")+"}";else{let appliedQuote=quoteSmart&&ccount(value2,quote)>ccount(value2,alternative)?alternative:quote;right=appliedQuote+stringifyEntitiesLight(value2,{subset:[appliedQuote]})+appliedQuote}result=left+(right?"=":"")+right}serializedAttributes.push(result)}}let attributesOnTheirOwnLine=!1,attributesOnOneLine=serializedAttributes.join(" ");flow3&&(/\r?\n|\r/.test(attributesOnOneLine)||trackerOneLine.current().now.column+attributesOnOneLine.length+(selfClosing?tightSelfClosing?2:3:1)>printWidth)&&(attributesOnTheirOwnLine=!0);let tracker=trackerOneLine,value=prefix;if(attributesOnTheirOwnLine){tracker=trackerMultiLine;let index2=-1;for(;++index2<serializedAttributes.length;)serializedAttributes[index2]=currentIndent+indent+serializedAttributes[index2];value+=tracker.move(`
45
45
  `+serializedAttributes.join(`
46
46
  `)+`
47
47
  `+currentIndent)}else attributesOnOneLine&&(value+=tracker.move(" "+attributesOnOneLine));return selfClosing&&(value+=tracker.move((tightSelfClosing||attributesOnTheirOwnLine?"":" ")+"/")),value+=tracker.move(">"),node3.children&&node3.children.length>0&&(node3.type==="mdxJsxTextElement"?value+=tracker.move(state.containerPhrasing(node3,{...tracker.current(),before:">",after:"<"})):(tracker.shift(2),value+=tracker.move(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/codemod",
3
- "version": "8.5.3",
3
+ "version": "8.5.5",
4
4
  "description": "A collection of codemod scripts written with JSCodeshift",
5
5
  "keywords": [
6
6
  "storybook"
@@ -57,7 +57,7 @@
57
57
  "@babel/core": "^7.24.4",
58
58
  "@babel/preset-env": "^7.24.4",
59
59
  "@babel/types": "^7.24.0",
60
- "@storybook/core": "8.5.3",
60
+ "@storybook/core": "8.5.5",
61
61
  "@storybook/csf": "0.1.12",
62
62
  "@types/cross-spawn": "^6.0.2",
63
63
  "cross-spawn": "^7.0.3",