1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,877072,e=>{"use strict";var t=e.i(125934),n=e.i(776403),r=e.i(71345),l=e.i(511356),i=e.i(675917),a=e.i(98181),s=e.i(897802),o=e.i(820667);function c(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function d(){this.buffer()}function u(e){let t=this.resume(),n=this.stack[this.stack.length-1];(0,s.ok)("footnoteDefinition"===n.type),n.label=t,n.identifier=(0,o.normalizeIdentifier)(this.sliceSerialize(e)).toLowerCase()}function m(e){this.exit(e)}function h(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function f(){this.buffer()}function p(e){let t=this.resume(),n=this.stack[this.stack.length-1];(0,s.ok)("footnoteReference"===n.type),n.label=t,n.identifier=(0,o.normalizeIdentifier)(this.sliceSerialize(e)).toLowerCase()}function g(e){this.exit(e)}function x(e,t,n,r){let l=n.createTracker(r),i=l.move("[^"),a=n.enter("footnoteReference"),s=n.enter("reference");return i+=l.move(n.safe(n.associationId(e),{...l.current(),before:i,after:"]"})),s(),a(),i+=l.move("]")}function v(e,t,n,r){let l=n.createTracker(r),i=l.move("[^"),a=n.enter("footnoteDefinition"),s=n.enter("label");return i+=l.move(n.safe(n.associationId(e),{...l.current(),before:i,after:"]"})),s(),i+=l.move("]:"+(e.children&&e.children.length>0?" ":"")),l.shift(4),i+=l.move(n.indentLines(n.containerFlow(e,l.current()),b)),a(),i}function b(e,t,n){return 0===t?e:(n?"":" ")+e}x.peek=function(){return"["};let y=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function k(e){this.enter({type:"delete",children:[]},e)}function w(e){this.exit(e)}function j(e,t,n,r){let l=n.createTracker(r),i=n.enter("strikethrough"),a=l.move("~~");return a+=n.containerPhrasing(e,{...l.current(),before:a,after:"~"}),a+=l.move("~~"),i(),a}j.peek=function(){return"~"};var C=e.i(930756),N=e.i(29339);function S(e){let t=e._align;(0,s.ok)(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function E(e){this.exit(e),this.data.inTable=void 0}function L(e){this.enter({type:"tableRow",children:[]},e)}function M(e){this.exit(e)}function T(e){this.enter({type:"tableCell",children:[]},e)}function V(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,H));let n=this.stack[this.stack.length-1];(0,s.ok)("inlineCode"===n.type),n.value=t,this.exit(e)}function H(e,t){return"|"===t?t:e}function I(e){let t=this.stack[this.stack.length-2];(0,s.ok)("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function A(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];(0,s.ok)("paragraph"===e.type);let n=e.children[0];if(n&&"text"===n.type){let r,l=t.children,i=-1;for(;++i<l.length;){let e=l[i];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function P(e,t,n,r){let l=e.children[0],i="boolean"==typeof e.checked&&l&&"paragraph"===l.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let o=N.defaultHandlers.listItem(e,t,n,{...r,...s.current()});return i&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),o}var z=e.i(256389);let R={};var F=e.i(136552),D=e.i(939049),O=e.i(824980),_=e.i(7284),q=e.i(479656),B=e.i(816220),$=e.i(465741),Z=e.i(158206),U=e.i(273638),K=e.i(899936),W=e.i(61634),G=e.i(722365),Q=e.i(720032),J=e.i(417798),Y=e.i(842965);let X={}.hasOwnProperty,ee=new Map,et=/[A-Z]/g,en=new Set(["table","tbody","thead","tfoot","tr"]),er=new Set(["td","th"]),el="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ei(e,t,n){var r,l,i,a,o,c,d,u,m;let h,f,p,g,x,v,b,y,k,w,j;return"element"===t.type?(r=e,l=t,i=n,f=h=r.schema,"svg"===l.tagName.toLowerCase()&&"html"===h.space&&(r.schema=W.svg),r.ancestors.push(l),p=ec(r,l.tagName,!1),g=function(e,t){let n,r,l={};for(r in t.properties)if("children"!==r&&X.call(t.properties,r)){let i=function(e,t,n){let r=(0,U.find)(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?(0,B.stringify)(n):(0,G.stringify)(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,Q.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new Y.VFileMessage("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});
1throw t.file=e.filePath||void 0,t.url=el+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)X.call(e,t)&&(n[function(e){let t=e.replace(et,eu);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?K.hastToReact[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(i){let[r,a]=i;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof a&&er.has(t.tagName)?n=a:l[r]=a}}return n&&((l.style||(l.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),l}(r,l),x=eo(r,l),en.has(l.tagName)&&(x=x.filter(function(e){return"string"!=typeof e||!(0,Z.whitespace)(e)})),ea(r,g,p,l),es(g,x),r.ancestors.pop(),r.schema=h,r.create(l,p,g,i)):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return(0,s.ok)("ExpressionStatement"===n.type),e.evaluater.evaluateExpression(n.expression)}ed(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(a=e,o=t,c=n,b=v=a.schema,"svg"===o.name&&"html"===v.space&&(a.schema=W.svg),a.ancestors.push(o),y=null===o.name?a.Fragment:ec(a,o.name,!0),k=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];(0,s.ok)("ExpressionStatement"===t.type);let l=t.expression;(0,s.ok)("ObjectExpression"===l.type);let i=l.properties[0];(0,s.ok)("SpreadElement"===i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else ed(e,t.position);else{let l,i=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];(0,s.ok)("ExpressionStatement"===t.type),l=e.evaluater.evaluateExpression(t.expression)}else ed(e,t.position);else l=null===r.value||r.value;n[i]=l}return n}(a,o),w=eo(a,o),ea(a,k,y,o),es(k,w),a.ancestors.pop(),a.schema=v,a.create(o,y,k,c)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ed(e,t.position)}(e,t):"root"===t.type?(d=e,u=t,m=n,es(j={},eo(d,u)),d.create(u,d.Fragment,j,m)):"text"===t.type?t.value:void 0}function ea(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function es(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function eo(e,t){let n=[],r=-1,l=e.passKeys?new Map:ee;for(;++r<t.children.length;){let i,a=t.children[r];if(e.passKeys){let e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){let t=l.get(e)||0;i=e+"-"+t,l.set(e,t+1)}}let s=ei(e,a,i);void 0!==s&&n.push(s)}return n}function ec(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),l=-1;for(;++l<n.length;){let t=(0,$.name)(n[l])?{type:"Identifier",name:n[l]}:{type:"Literal",value:n[l]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(l&&"Literal"===t.type),optional:!1}:t}(0,s.ok)(e,"always a result"),r=e}else r=(0,$.name)(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return X.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ed(e)}function ed(e,t){let n=new Y.VFileMessage("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=el+"#cannot-handle-mdx-estrees-without-createevaluater",n}function eu(e){return"-"+e.toLowerCase()}var em=e.i(722259),eh=e.i(12105),ef=e.i(872238),ep=e.i(540795),eg=e.i(455470);let ex={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,ep.factorySpace)(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let l=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=l),t=l,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return(0,eg.markdownLineEnding)(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}};var ev=e.i(559245);let eb={tokenize:function(e){let t,n,r,l=this,i=[],a=0;return s;function s(t){if(a<i.length){let n=i[a];return l.containerState=n[1],e.attempt(n[0].continuation,o,c)(t)}return c(t)}function o(e){if(a++,l.containerState._closeFlow){let n;l.containerState._closeFlow=void 0,t&&x();let r=l.events.length,i=r;for(;i--;)if("exit"===l.events[i][0]&&"chunkFlow"===l.events[i][1].type){n=l.events[i][1].end;break}g(a);let s=r;for(;s<l.events.length;)l.events[s][1].end=Object.assign({},n),s++;return(0,ev.splice)(l.events,i+1,0,l.events.slice(r)),l.events.length=s,c(e)}return s(e)}function c(n){if(a===i.length){if(!t)return m(n);if(t.currentConstruct&&t.currentConstruct.concrete)return f(n);l.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return l.containerState={},e.check(ey,d,u)(n)}function d(e){return t&&x(),g(a),m(e)}function u(e){return l.parser.lazy[l.now().line]=a!==i.length,r=l.now().offset,f(e)}function m(t){return l.containerState={},e.attempt(ey,h,f)(t)}function h(e){return a++,i.push([l.currentConstruct,l.containerState]),m(e)}function f(r){if(null===r){t&&x(),g(0),e.consume(r);return}return t=t||l.parser.flow(l.now()),e.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:t}),function t(n){if(null===n){p(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return(0,eg.markdownLineEnding)(n)?(e.consume(n),p(e.exit("chunkFlow")),a=0,l.interrupt=void 0,s):(e.consume(n),t)}(r)}function p(e,i){let s=l.sliceStream(e);
1if(i&&s.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(s),l.parser.lazy[e.start.line]){let e,n,i=t.events.length;for(;i--;)if(t.events[i][1].start.offset<r&&(!t.events[i][1].end||t.events[i][1].end.offset>r))return;let s=l.events.length,o=s;for(;o--;)if("exit"===l.events[o][0]&&"chunkFlow"===l.events[o][1].type){if(e){n=l.events[o][1].end;break}e=!0}for(g(a),i=s;i<l.events.length;)l.events[i][1].end=Object.assign({},n),i++;(0,ev.splice)(l.events,o+1,0,l.events.slice(s)),l.events.length=i}}function g(t){let n=i.length;for(;n-- >t;){let t=i[n];l.containerState=t[1],t[0].exit.call(l,e)}i.length=t}function x(){t.write([null]),n=void 0,t=void 0,l.containerState._closeFlow=void 0}}},ey={tokenize:function(e,t,n){return(0,ep.factorySpace)(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};var ek=e.i(434036),ew=e.i(744495);let ej={tokenize:function(e){let t=this,n=e.attempt(ek.blankLine,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,(0,ep.factorySpace)(e,e.attempt(this.parser.constructs.flow,r,e.attempt(ew.content,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},eC={resolveAll:eL()},eN=eE("string"),eS=eE("text");function eE(e){return{tokenize:function(t){let n=this,r=this.parser.constructs[e],l=t.attempt(r,i,a);return i;function i(e){return o(e)?l(e):a(e)}function a(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),s)}function s(e){return o(e)?(t.exit("data"),l(e)):(t.consume(e),s)}function o(e){if(null===e)return!0;let t=r[e],l=-1;if(t)for(;++l<t.length;){let e=t[l];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:eL("text"===e?eM:void 0)}}function eL(e){return function(t,n){let r,l=-1;for(;++l<=t.length;)void 0===r?t[l]&&"data"===t[l][1].type&&(r=l,l++):t[l]&&"data"===t[l][1].type||(l!==r+2&&(t[r][1].end=t[l-1][1].end,t.splice(r+2,l-r-2),l=r+2),r=void 0);return e?e(t,n):t}}function eM(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,l=e[n-1][1],i=t.sliceStream(l),a=i.length,s=-1,o=0;for(;a--;){let e=i[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)o++,s--;if(s)break;s=-1}else if(-2===e)r=!0,o++;else if(-1===e);else{a++;break}}if(o){let i={type:n===e.length||r||o<2?"lineSuffix":"hardBreakTrailing",start:{line:l.end.line,column:l.end.column-o,offset:l.end.offset-o,_index:l.start._index+a,_bufferIndex:a?s:l.start._bufferIndex+s},end:Object.assign({},l.end)};l.end=Object.assign({},i.start),l.start.offset===l.end.offset?Object.assign(l,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}var eT=e.i(705568),eV=e.i(521893),eH=e.i(705881),eI=e.i(300989),eA=e.i(727997),eP=e.i(871342),ez=e.i(172812),eR=e.i(928041),eF=e.i(372279),eD=e.i(167432),eO=e.i(124938),e_=e.i(171901),eq=e.i(387313),eB=e.i(527564),e$=e.i(184894),eZ=e.i(261787),eU=e.i(363384),eK=e.i(877442),eW=e.i(73178),eG=e.i(293783),eQ=e.i(959895);let eJ={42:eW.list,43:eW.list,45:eW.list,48:eW.list,49:eW.list,50:eW.list,51:eW.list,52:eW.list,53:eW.list,54:eW.list,55:eW.list,56:eW.list,57:eW.list,62:eI.blockQuote},eY={91:eD.definition},eX={[-2]:eR.codeIndented,[-1]:eR.codeIndented,32:eR.codeIndented},e0={35:e_.headingAtx,42:eQ.thematicBreak,45:[eG.setextUnderline,eQ.thematicBreak],60:eq.htmlFlow,61:eG.setextUnderline,95:eQ.thematicBreak,96:ez.codeFenced,126:ez.codeFenced},e1={38:eP.characterReference,92:eA.characterEscape},e5={[-5]:eK.lineEnding,[-4]:eK.lineEnding,[-3]:eK.lineEnding,33:eZ.labelStartImage,38:eP.characterReference,42:eV.attention,60:[eH.autolink,eB.htmlText],91:eU.labelStartLink,92:[eO.hardBreakEscape,eA.characterEscape],93:e$.labelEnd,95:eV.attention,96:eF.codeText},e2={null:[eV.attention,eC]};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,eY,"disable",0,{null:[]},"document",0,eJ,"flow",0,e0,"flowInitial",0,eX,"insideSpan",0,e2,"string",0,e1,"text",0,e5],689634);var e3=e.i(689634),e6=e.i(247874);let e9=/[\0\t\n\r]/g;var e4=e.i(805001),e7=e.i(339262),e8=e.i(465550),te=e.i(601533);let tt={}.hasOwnProperty;function tn(e){return{line:e.line,column:e.column,offset:e.offset}}function tr(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+(0,te.stringifyPosition)({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+(0,te.stringifyPosition)({start:t.start,end:t.end}
1)+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+(0,te.stringifyPosition)({start:t.start,end:t.end})+") is still open")}function tl(e){let t=this;t.parser=function(n){var r,l;let i,a,s,c;return"string"!=typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(l=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(v),autolinkProtocol:d,autolinkEmail:d,atxHeading:r(p),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:d,characterReference:d,codeFenced:r(f),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:r(f,l),codeText:r(function(){return{type:"inlineCode",value:""}},l),codeTextData:d,data:d,codeFlowValue:d,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(g),hardBreakTrailing:r(g),htmlFlow:r(x,l),htmlFlowData:d,htmlText:r(x,l),htmlTextData:d,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:l,link:r(v),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(b,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(b),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:r(p),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:a(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:a(),autolinkEmail:function(e){u.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){u.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:a(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:h,characterReferenceMarkerNumeric:h,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=(0,e4.decodeNumericCharacterReference)(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=(0,e8.decodeNamedCharacterReference)(n);let l=this.stack[this.stack.length-1];l.value+=t},characterReference:function(e){this.stack.pop().position.end=tn(e.end)},codeFenced:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:u,codeIndented:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:u,data:u,definition:a(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=(0,o.normalizeIdentifier)(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:a(),hardBreakEscape:a(m),hardBreakTrailing:a(m),htmlFlow:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:u,htmlText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:u,image:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=(0,e7.decodeString)(t),n.identifier=(0,o.normalizeIdentifier)(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=tn(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.t
1ype)&&(d.call(this,e),u.call(this,e))},link:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=(0,o.normalizeIdentifier)(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:a(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:a(),thematicBreak:a()}};!function e(t,n){let r=-1;for(;++r<n.length;){let l=n[r];Array.isArray(l)?e(t,l):function(e,t){let n;for(n in t)if(tt.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,l)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},a={stack:[r],tokenStack:[],config:t,enter:i,exit:s,buffer:l,resume:c,data:n},o=[],d=-1;for(;++d<e.length;)("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)&&("enter"===e[d][0]?o.push(d):d=function(e,t,n){let r,l,i,a,s=t-1,o=-1,c=!1;for(;++s<=n;){let t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?o++:o--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||o||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!o&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===o&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(l=void 0;a--;){let t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;l&&(e[l][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",l=a}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}i&&(!l||i<l)&&(r._spread=!0),r.end=Object.assign({},l?e[l][1].start:t[1].end),e.splice(l||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){let l={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=l,e.splice(s,0,["enter",l,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}(e,o.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];tt.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||tr).call(a,void 0,e[0])}for(r.position={start:tn(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tn(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r};function r(e,t){return function(n){i.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function i(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:tn(t.start),end:void 0}}function a(e){return function(t){e&&e.call(this,t),s.call(this,t)}}function s(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tr).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+(0,te.stringifyPosition)({start:e.start,end:e.end})+"): itâs not open");n.position.end=tn(e.end)}function c(){return(0,eh.toString)(this.stack.pop())}function d(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:tn(e.start),end:void 0},t.push(n)),this.stack.push(n)}function u(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tn(e.end)}function m(){this.data.atHardBreak=!0}function h(e){this.data.characterReferenceType=e.type}function f(){return{type:"code",lang:null,meta:null,value:""}}function p(){return{type:"heading",depth:0,children:[]}}function g(){return{type:"break"}}function x(){return{type:"html",value:""}}function v(){return{type:"link",title:null,url:"",children:[]}}function b(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(l)(function(e){for(;!(0,e6.subtokenize)(e););return e}((function(e){let t={defined:[],lazy:{},constructs:(0,ef.combineExtensions)([e3,...(e||{}).extensions||[]]),content:n(ex),document:n(eb),flow:n(ej),string:n(eN),text:n(eS)};return t;function n(e){return function(n){return function(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),l={},i=[],a=[],s=[],o={consume:function(e){(0,eg.markdownLineEnding)(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e}
1,enter:function(e,t){let n=t||{};return n.type=e,n.start=m(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){let t=s.pop();return t.end=m(),c.events.push(["exit",t,c]),t},attempt:f(function(e,t){p(e,t.from)}),check:f(h),interrupt:f(h,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:u,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,l=[];for(;++r<e.length;){let i,a=e[r];if("string"==typeof a)i=a;else switch(a){case -5:i="\r";break;case -4:i="\n";break;case -3:i="\r\n";break;case -2:i=t?" ":" ";break;case -1:if(!t&&n)continue;i=" ";break;default:i=String.fromCharCode(a)}n=-2===a,l.push(i)}return l.join("")}(u(e),t)},now:m,defineSkip:function(e){l[e.line]=e.column,g()},write:function(e){return(a=(0,ev.push)(a,e),function(){let e;for(;r._index<a.length;){let n=a[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),d=d(t)}else d=d(n)}}(),null!==a[a.length-1])?[]:(p(t,0),c.events=(0,eT.resolveAll)(i,c.events,c),c.events)}},d=t.tokenize.call(c,o);return t.resolveAll&&i.push(t),c;function u(e){return function(e,t){let n,r=t.start._index,l=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;if(r===i)n=[e[r].slice(l,a)];else{if(n=e.slice(r,i),l>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(l):n.shift()}a>0&&n.push(e[i].slice(0,a))}return n}(a,e)}function m(){let{line:e,column:t,offset:n,_index:l,_bufferIndex:i}=r;return{line:e,column:t,offset:n,_index:l,_bufferIndex:i}}function h(e,t){t.restore()}function f(e,t){return function(n,l,i){var a;let d,u,h,f;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):(a=n,function(e){let t=null!==e&&a[e],n=null!==e&&a.null;return p([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function p(e){return(d=e,u=0,0===e.length)?i:x(e[u])}function x(e){return function(n){let l,i,a,d,u;return(l=m(),i=c.previous,a=c.currentConstruct,d=c.events.length,u=Array.from(s),f={restore:function(){r=l,c.previous=i,c.currentConstruct=a,c.events.length=d,s=u,g()},from:d},h=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?b(n):e.tokenize.call(t?Object.assign(Object.create(c),t):c,o,v,b)(n)}}function v(t){return e(h,f),l}function b(e){return(f.restore(),++u<d.length)?x(d[u]):i}}}function p(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&(0,ev.splice)(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function g(){r.line in l&&r.column<2&&(r.column=l[r.line],r.offset+=l[r.line]-1)}}(t,e,n)}}})(l).document().write((a=1,s="",c=!0,function(e,t,n){let r,l,o,d,u,m=[];for(e=s+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),o=0,s="",c&&(65279===e.charCodeAt(0)&&o++,c=void 0);o<e.length;){if(e9.lastIndex=o,d=(r=e9.exec(e))&&void 0!==r.index?r.index:e.length,u=e.charCodeAt(d),!r){s=e.slice(o);break}if(10===u&&o===d&&i)m.push(-3),i=void 0;else switch(i&&(m.push(-5),i=void 0),o<d&&(m.push(e.slice(o,d)),a+=d-o),u){case 0:m.push(65533),a++;break;case 9:for(l=4*Math.ceil(a/4),m.push(-2);a++<l;)m.push(-1);break;case 10:m.push(-4),a=1;break;default:i=!0,a=1}o=d+1}return n&&(i&&m.push(-5),s&&m.push(s),m.push(null)),m})(n,r,!0))))}}var ti=e.i(652652),ta=e.i(879302),ts=e.i(446207),to=e.i(173182),tc=/\s/,td=/^\s+$/,tu=new Set(["code","pre","svg","math","annotation"]);function tm(e){var t,n,r,l;let i={animation:null!=(t=null==e?void 0:e.animation)?t:"fadeIn",duration:null!=(n=null==e?void 0:e.duration)?n:150,easing:null!=(r=null==e?void 0:e.easing)?r:"ease",sep:null!=(l=null==e?void 0:e.sep)?l:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>e=>{(0,D.visitParents)(e,"text",(e,t)=>((e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(t.some(e=>"object"==typeof e&&null!==e&&"type"in e&&"element"===e.type&&tu.has(e.tagName)))return D.SKIP;let l=r.children.indexOf(e);if(-1===l)return;let i=e.value;if(!i.trim())return;let a=("char"===n.sep?(e=>{let t=[],n="";
1for(let r of e)tc.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t})(i):(e=>{let t=[],n="",r=!1;for(let l of e){let e=tc.test(l);e!==r&&n&&(t.push(n),n=""),n+=l,r=e}return n&&t.push(n),t})(i)).map(e=>{let t,r,l;return td.test(e)?{type:"text",value:e}:(t=n.animation,r=n.duration,l=n.easing,{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${r}ms;--sd-easing:${l}`},children:[{type:"text",value:e}]})});return r.children.splice(l,1,...a),l+a.length})(e,t,i))}}}tm();var th=e=>(0,O.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,O.jsx)("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),tf=e=>(0,O.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,O.jsx)("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),tp=e=>(0,O.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,O.jsx)("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),tg=e=>(0,O.jsxs)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,O.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,O.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,O.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,O.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,O.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,O.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,O.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,O.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,O.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,O.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),tx=e=>(0,O.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,O.jsx)("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),tv=e=>(0,O.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,O.jsx)("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.025
17 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),tb=e=>(0,O.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,O.jsx)("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),ty=e=>(0,O.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,O.jsx)("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),tk=e=>(0,O.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,O.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),tw=e=>(0,O.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,O.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),tj=(...e)=>(0,q.twMerge)((0,_.clsx)(e)),tC=(e,t,n)=>{let r="string"==typeof t?new Blob([t],{type:n}):t,l=URL.createObjectURL(r),i=document.createElement("a");i.href=l,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(l)},tN=(0,t.createContext)({code:""}),tS=()=>(0,t.useContext)(tN),tE=({onCopy:e,onError:n,timeout:r=2e3,children:l,className:i,code:a,...s})=>{let[o,c]=(0,t.useState)(!1),d=(0,t.useRef)(0),{code:u}=tS(),{isAnimating:m}=(0,t.useContext)(nD),h=null!=a?a:u,f=async()=>{var t;if("u"<typeof window||!(null!=(t=null==navigator?void 0:navigator.clipboard)&&t.writeText)){null==n||n(Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(h),c(!0),null==e||e(),d.current=window.setTimeout(()=>c(!1),r))}catch(e){null==n||n(e)}};return(0,t.useEffect)(()=>()=>{window.clearTimeout(d.current)},[]),(0,O.jsx)("button",{className:tj("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:m,onClick:f,title:"Copy Code",type:"button",...s,children:null!=l?l:(0,O.jsx)(o?th:tf,{size:14})})},tL={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",da
1x:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",æè¨:"wy"},tM=({onDownload:e,onError:n,language:r,children:l,className:i,code:a,...s})=>{let{code:o}=tS(),{isAnimating:c}=(0,t.useContext)(nD),d=null!=a?a:o,u=`file.${r&&r in tL?tL[r]:"txt"}`;return(0,O.jsx)("button",{className:tj("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:c,onClick:()=>{try{tC(u,d,"text/plain"),null==e||e()}catch(e){null==n||n(e)}},title:"Download file",type:"button",...s,children:null!=l?l:(0,O.jsx)(tp,{size:14})})},tT=()=>(0,O.jsxs)("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[(0,O.jsx)("div",{className:"h-[46px] w-full bg-muted/80"}),(0,O.jsx)("div",{className:"flex w-full items-center justify-center p-4",children:(0,O.jsx)(tg,{className:"size-4 animate-spin"})})]}),tV=/\.[^/.]+$/,tH=0,tI=({url:e,isOpen:n,onClose:r,onConfirm:l})=>{let[i,a]=(0,t.useState)(!1),s=(0,t.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch(e){}},[e]),o=(0,t.useCallback)(()=>{l(),r()},[l,r]);return(0,t.useEffect)(()=>
1{if(n){1===(tH+=1)&&(document.body.style.overflow="hidden");let e=e=>{"Escape"===e.key&&r()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),0===(tH=Math.max(0,tH-1))&&(document.body.style.overflow="")}}},[n,r]),n?(0,O.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:r,onKeyDown:e=>{"Escape"===e.key&&r()},role:"button",tabIndex:0,children:(0,O.jsxs)("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:"presentation",children:[(0,O.jsx)("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:r,title:"Close",type:"button",children:(0,O.jsx)(tb,{size:16})}),(0,O.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,O.jsxs)("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[(0,O.jsx)(ty,{size:20}),(0,O.jsx)("span",{children:"Open external link?"})]}),(0,O.jsx)("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),(0,O.jsx)("div",{className:tj("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),(0,O.jsxs)("div",{className:"flex gap-2",children:[(0,O.jsx)("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(th,{size:14}),(0,O.jsx)("span",{children:"Copied"})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(tf,{size:14}),(0,O.jsx)("span",{children:"Copy link"})]})}),(0,O.jsxs)("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:o,type:"button",children:[(0,O.jsx)(ty,{size:14}),(0,O.jsx)("span",{children:"Open link"})]})]})]})}):null},tA=(0,t.createContext)(null),tP=()=>(0,t.useContext)(tA),tz=()=>{var e;let t=tP();return null!=(e=null==t?void 0:t.mermaid)?e:null},tR=({chart:e,children:n,className:r,onDownload:l,config:i,onError:a})=>{let[s,o]=(0,t.useState)(!1),c=(0,t.useRef)(null),{isAnimating:d}=(0,t.useContext)(nD),u=tz(),m=async t=>{try{if("mmd"===t){tC("diagram.mmd",e,"text/plain"),o(!1),null==l||l(t);return}if(!u){null==a||a(Error("Mermaid plugin not available"));return}let r=u.getMermaid(i),s=e.split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),c=`mermaid-${Math.abs(s)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:d}=await r.render(c,e);if(!d){null==a||a(Error("SVG not found. Please wait for the diagram to render."));return}if("svg"===t){tC("diagram.svg",d,"image/svg+xml"),o(!1),null==l||l(t);return}if("png"===t){var n;let e=await (n=d,new Promise((e,t)=>{let r="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n))),l=new Image;l.crossOrigin="anonymous",l.onload=()=>{let n=document.createElement("canvas"),r=5*l.width,i=5*l.height;n.width=r,n.height=i;let a=n.getContext("2d");a?(a.drawImage(l,0,0,r,i),n.toBlob(n=>{n?e(n):t(Error("Failed to create PNG blob"))},"image/png")):t(Error("Failed to create 2D canvas context for PNG export"))},l.onerror=()=>t(Error("Failed to load SVG image")),l.src=r}));tC("diagram.png",e,"image/png"),null==l||l(t),o(!1);return}}catch(e){null==a||a(e)}};return(0,t.useEffect)(()=>{let e=e=>{let t=e.composedPath();c.current&&!t.includes(c.current)&&o(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,O.jsxs)("div",{className:"relative",ref:c,children:[(0,O.jsx)("button",{className:tj("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:d,onClick:()=>o(!s),title:"Download diagram",type:"button",children:null!=n?n:(0,O.jsx)(tp,{size:14})}),s?(0,O.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,O.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>m("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),(0,O.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>m("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),(0,O.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>m("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},tF=0,tD=({chart:e,config:n,onFullscreen:r,onExit:l,className:i,...a})=>{let[s,o]=(0,t.useState)(!1),{isAnimating:c,controls:d}=(0,t.useContext)(nD),u=(()=>
1{if("boolean"==typeof d)return d;let e=d.mermaid;return!1!==e&&(!0===e||void 0===e||!1!==e.panZoom)})(),m=()=>{o(!s)};return(0,t.useEffect)(()=>{if(s){1===(tF+=1)&&(document.body.style.overflow="hidden");let e=e=>{"Escape"===e.key&&o(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),0===(tF=Math.max(0,tF-1))&&(document.body.style.overflow="")}}},[s]),(0,t.useEffect)(()=>{s?null==r||r():l&&l()},[s,r,l]),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("button",{className:tj("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:c,onClick:m,title:"View fullscreen",type:"button",...a,children:(0,O.jsx)(tx,{size:14})}),s?(0,O.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:m,onKeyDown:e=>{"Escape"===e.key&&m()},role:"button",tabIndex:0,children:[(0,O.jsx)("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:m,title:"Exit fullscreen",type:"button",children:(0,O.jsx)(tb,{size:20})}),(0,O.jsx)("div",{className:"flex size-full items-center justify-center p-4",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:"presentation",children:(0,O.jsx)(n$,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:n,fullscreen:!0,showControls:u})})]}):null]})},tO=e=>{var t,n;let r=[],l=[];for(let n of e.querySelectorAll("thead th"))r.push((null==(t=n.textContent)?void 0:t.trim())||"");for(let t of e.querySelectorAll("tbody tr")){let e=[];
1for(let r of t.querySelectorAll("td"))e.push((null==(n=r.textContent)?void 0:n.trim())||"");l.push(e)}return{headers:r,rows:l}},t_=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if('"'===r){t=!0,n=!0;break}(","===r||r===` 2`)&&(t=!0)}return t?n?`"${e.replace(/"/g,'""')}"`:`"${e}"`:e},l=Array(t.length>0?n.length+1:n.length),i=0;for(let e of(t.length>0&&(l[i]=t.map(r).join(","),i+=1),n))l[i]=e.map(r).join(","),i+=1;return l.join(` 3`)},tq=e=>{let t=!1;for(let n of e)if("\\"===n||"|"===n){t=!0;break}if(!t)return e;let n=[];for(let t of e)"\\"===t?n.push("\\\\"):"|"===t?n.push("\\|"):n.push(t);return n.join("")},tB=({children:e,className:n,onCopy:r,onError:l,timeout:i=2e3})=>{let[a,s]=(0,t.useState)(!1),[o,c]=(0,t.useState)(!1),d=(0,t.useRef)(null),u=(0,t.useRef)(0),{isAnimating:m}=(0,t.useContext)(nD),h=async e=>{var t,n;if("u"<typeof window||!(null!=(t=null==navigator?void 0:navigator.clipboard)&&t.write)){null==l||l(Error("Clipboard API not available"));return}try{let t=null==(n=d.current)?void 0:n.closest('[data-streamdown="table-wrapper"]'),a=null==t?void 0:t.querySelector("table");if(!a){null==l||l(Error("Table not found"));return}let o=tO(a),m="csv"===e?t_(o):(e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(" "===n||n===` 4`||"\r"===n){t=!0;break}if(!t)return e;let n=[];for(let t of e)" "===t?n.push("\\t"):t===` 5`?n.push("\\n"):"\r"===t?n.push("\\r"):n.push(t);return n.join("")},l=Array(t.length>0?n.length+1:n.length),i=0;for(let e of(t.length>0&&(l[i]=t.map(r).join(" "),i+=1),n))l[i]=e.map(r).join(" "),i+=1;return l.join(` 6`)})(o),h=new ClipboardItem({"text/plain":new Blob([m],{type:"text/plain"}),"text/html":new Blob([a.outerHTML],{type:"text/html"})});await navigator.clipboard.write([h]),c(!0),s(!1),null==r||r(e),u.current=window.setTimeout(()=>c(!1),i)}catch(e){null==l||l(e)}};return(0,t.useEffect)(()=>{let e=e=>{let t=e.composedPath();d.current&&!t.includes(d.current)&&s(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e),window.clearTimeout(u.current)}},[]),(0,O.jsxs)("div",{className:"relative",ref:d,children:[(0,O.jsx)("button",{className:tj("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:m,onClick:()=>s(!a),title:"Copy table",type:"button",children:null!=e?e:(0,O.jsx)(o?th:tf,{size:14})}),a?(0,O.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,O.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),(0,O.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},t$=({children:e,className:n,onDownload:r,onError:l})=>{let[i,a]=(0,t.useState)(!1),s=(0,t.useRef)(null),{isAnimating:o}=(0,t.useContext)(nD),c=e=>{var t;try{let n=null==(t=s.current)?void 0:t.closest('[data-streamdown="table-wrapper"]'),i=null==n?void 0:n.querySelector("table");if(!i){null==l||l(Error("Table not found"));return}let o=tO(i),c="csv"===e?t_(o):(e=>{let{headers:t,rows:n}=e;if(0===t.length)return"";let r=Array(n.length+2),l=0,i=t.map(e=>tq(e));r[l]=`| ${i.join(" | ")} |`,l+=1;let a=Array(t.length);for(let e=0;e<t.length;e+=1)a[e]="---";for(let e of(r[l]=`| ${a.join(" | ")} |`,l+=1,n))if(e.length<t.length){let n=Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=r<e.length?tq(e[r]):"";r[l]=`| ${n.join(" | ")} |`,l+=1}else{let t=e.map(e=>tq(e));r[l]=`| ${t.join(" | ")} |`,l+=1}return r.join(` 7`)})(o);tC(`table.${"csv"===e?"csv":"md"}`,c,"csv"===e?"text/csv":"text/markdown"),a(!1),null==r||r(e)}catch(e){null==l||l(e)}};return(0,t.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,O.jsxs)("div",{className:"relative",ref:s,children:[(0,O.jsx)("button",{className:tj("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:o,onClick:()=>a(!i),title:"Download table",type:"button",children:null!=e?e:(0,O.jsx)(tp,{size:14})}),i?(0,O.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,O.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),(0,O.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},tZ=({children:e,className:t,showControls:n,...r})=>(0,O.jsxs)("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?(0,O.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,O.jsx)(tB,{}),(0,O.jsx)(t$,{})]}):null,(0,O.jsx)("div",{className:"overflow-x-auto overscroll-y-auto",children:(0,O.jsx)("table",{className:tj("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),tU=(0,t.lazy)(()=>e.A(759070).then(e=>({default:e.CodeBlock}))),tK=(0,t.lazy)(()=>e.A(280015).then(e=>({default:e.Mermaid}))),tW=/language-([^\s]+)/;function tG(e,t){if(!(null!=e&&e.position||null!=t&&t.position))return!0;
7if(!(null!=e&&e.position&&null!=t&&t.position))return!1;let n=e.position.start,r=t.position.start,l=e.position.end,i=t.position.end;return(null==n?void 0:n.line)===(null==r?void 0:r.line)&&(null==n?void 0:n.column)===(null==r?void 0:r.column)&&(null==l?void 0:l.line)===(null==i?void 0:i.line)&&(null==l?void 0:l.column)===(null==i?void 0:i.column)}function tQ(e,t){return e.className===t.className&&tG(e.node,t.node)}var tJ=(e,t)=>"boolean"==typeof e?e:!1!==e[t],tY=(e,t)=>{if("boolean"==typeof e)return e;let n=e.mermaid;return!1!==n&&(!0===n||void 0===n||!1!==n[t])},tX=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("ol",{className:tj("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>tQ(e,t));tX.displayName="MarkdownOl";var t0=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("li",{className:tj("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&tG(e.node,t.node));t0.displayName="MarkdownLi";var t1=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("ul",{className:tj("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>tQ(e,t));t1.displayName="MarkdownUl";var t5=(0,t.memo)(({className:e,node:t,...n})=>(0,O.jsx)("hr",{className:tj("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>tQ(e,t));t5.displayName="MarkdownHr";var t2=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("span",{className:tj("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>tQ(e,t));t2.displayName="MarkdownStrong";var t3=(0,t.memo)(({children:e,className:n,href:r,node:l,...i})=>{let{linkSafety:a}=(0,t.useContext)(nD),[s,o]=(0,t.useState)(!1),c="streamdown:incomplete-link"===r,d=(0,t.useCallback)(async e=>{if(!(!(null!=a&&a.enabled&&r)||c)){if(e.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(r))return void window.open(r,"_blank","noreferrer");o(!0)}},[a,r,c]),u=(0,t.useCallback)(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),m={url:null!=r?r:"",isOpen:s,onClose:(0,t.useCallback)(()=>{o(!1)},[]),onConfirm:u};return null!=a&&a.enabled&&r?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("button",{className:tj("wrap-anywhere appearance-none text-left font-medium text-primary underline",n),"data-incomplete":c,"data-streamdown":"link",onClick:d,type:"button",children:e}),a.renderModal?a.renderModal(m):(0,O.jsx)(tI,{...m})]}):(0,O.jsx)("a",{className:tj("wrap-anywhere font-medium text-primary underline",n),"data-incomplete":c,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...i,children:e})},(e,t)=>tQ(e,t)&&e.href===t.href);t3.displayName="MarkdownA";var t6=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("h1",{className:tj("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>tQ(e,t));t6.displayName="MarkdownH1";var t9=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("h2",{className:tj("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>tQ(e,t));t9.displayName="MarkdownH2";var t4=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("h3",{className:tj("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>tQ(e,t));t4.displayName="MarkdownH3";var t7=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("h4",{className:tj("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>tQ(e,t));t7.displayName="MarkdownH4";var t8=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("h5",{className:tj("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>tQ(e,t));t8.displayName="MarkdownH5";var ne=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("h6",{className:tj("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>tQ(e,t));ne.displayName="MarkdownH6";var nt=(0,t.memo)(({children:e,className:n,node:r,...l})=>{let{controls:i}=(0,t.useContext)(nD),a=tJ(i,"table");return(0,O.jsx)(tZ,{className:n,showControls:a,...l,children:e})},(e,t)=>tQ(e,t));nt.displayName="MarkdownTable";var nn=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("thead",{className:tj("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>tQ(e,t));nn.displayName="MarkdownThead";var nr=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("tbody",{className:tj("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>tQ(e,t));nr.displayName="MarkdownTbody";var nl=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("tr",{className:tj("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>tQ(e,t));
7nl.displayName="MarkdownTr";var ni=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("th",{className:tj("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>tQ(e,t));ni.displayName="MarkdownTh";var na=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("td",{className:tj("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>tQ(e,t));na.displayName="MarkdownTd";var ns=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("blockquote",{className:tj("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>tQ(e,t));ns.displayName="MarkdownBlockquote";var no=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("sup",{className:tj("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>tQ(e,t));no.displayName="MarkdownSup";var nc=(0,t.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)("sub",{className:tj("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>tQ(e,t));nc.displayName="MarkdownSub";var nd=(0,t.memo)(({children:e,className:n,node:r,...l})=>{if("data-footnotes"in l){let r=Array.isArray(e)?e.map(e=>{if(!(0,t.isValidElement)(e))return e;if(e.type===tX){let n=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!(e=>{var n,r;if(!(0,t.isValidElement)(e))return!1;let l=Array.isArray(e.props.children)?e.props.children:[e.props.children],i=!1,a=!1;for(let e of l)if(e){if("string"==typeof e)""!==e.trim()&&(i=!0);else if((0,t.isValidElement)(e)){if((null==(n=e.props)?void 0:n["data-footnote-backref"])!==void 0)a=!0;else for(let n of Array.isArray(e.props.children)?e.props.children:[e.props.children])if("string"==typeof n&&""!==n.trim()||(0,t.isValidElement)(n)&&(null==(r=n.props)?void 0:r["data-footnote-backref"])===void 0){i=!0;break}}}return a&&!i})(e));return 0===n.length?null:{...e,props:{...e.props,children:n}}}return e}):e;return(Array.isArray(r)?r.some(e=>null!==e):null!==r)?(0,O.jsx)("section",{className:n,...l,children:r}):null}return(0,O.jsx)("section",{className:n,...l,children:e})},(e,t)=>tQ(e,t));nd.displayName="MarkdownSection";var nu=(0,t.memo)(({node:e,className:n,children:r,...l})=>{var i;let a=!("data-block"in l),{mermaid:s,controls:o}=(0,t.useContext)(nD),c=tz();if(a)return(0,O.jsx)("code",{className:tj("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",n),"data-streamdown":"inline-code",...l,children:r});let d=null==n?void 0:n.match(tW),u=null!=(i=null==d?void 0:d.at(1))?i:"",m="";if((0,t.isValidElement)(r)&&r.props&&"object"==typeof r.props&&"children"in r.props&&"string"==typeof r.props.children?m=r.props.children:"string"==typeof r&&(m=r),"mermaid"===u&&c){let e=tJ(o,"mermaid"),r=tY(o,"download"),l=tY(o,"copy"),i=tY(o,"fullscreen"),a=tY(o,"panZoom");return(0,O.jsx)(t.Suspense,{fallback:(0,O.jsx)(tT,{}),children:(0,O.jsxs)("div",{className:tj("group relative my-4 h-auto rounded-xl border p-4",n),"data-streamdown":"mermaid-block",children:[e&&(r||l||i)?(0,O.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[r?(0,O.jsx)(tR,{chart:m,config:null==s?void 0:s.config}):null,l?(0,O.jsx)(tE,{code:m}):null,i?(0,O.jsx)(tD,{chart:m,config:null==s?void 0:s.config}):null]}):null,(0,O.jsx)(tK,{chart:m,config:null==s?void 0:s.config,showControls:a})]})})}let h=tJ(o,"code");return(0,O.jsx)(t.Suspense,{fallback:(0,O.jsx)(tT,{}),children:(0,O.jsx)(tU,{className:tj("overflow-x-auto border-border border-t",n),code:m,language:u,children:h?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(tM,{code:m,language:u}),(0,O.jsx)(tE,{})]}):null})})},(e,t)=>e.className===t.className&&tG(e.node,t.node));nu.displayName="MarkdownCode";var nm=(0,t.memo)(({node:e,className:t,src:n,alt:r,...l})=>{let i=async()=>{if(n)try{let e=await (await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split("/").pop()||"",l=t.split(".").pop(),i=t.includes(".")&&void 0!==l&&l.length<=4,a="";if(i)a=t;else{let n=e.type,l="png";n.includes("jpeg")||n.includes("jpg")?l="jpg":n.includes("png")?l="png":n.includes("svg")?l="svg":n.includes("gif")?l="gif":n.includes("webp")&&(l="webp"),a=`${(r||t||"image").replace(tV,"")}.${l}`}tC(a,e,e.type)}catch(e){window.open(n,"_blank")}};return n?(0,O.jsxs)("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[(0,O.jsx)("img",{alt:r,className:tj("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...l}),(0,O.jsx)("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),(0,O.jsx)("button",{className:tj("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:i,title:"Download image",type:"button",children:(0,O.jsx)(tp,{size:14})})]}):null},(e,t)=>e.className===t.className&&tG(e.node,t.node));nm.displayName="MarkdownImg";var nh=(0,t.memo)(({children:e,className:n,node:r,...l})=>{let i=(Array.isArray(e)?e:[e]).filter(e=>null!=e&&""!==e);if(1===i.length&&(0,t.isValidElement)(i[0])){let t=i[0].props.node,n=null==t?void 0:t.tagName;if("img"===n||"code"===n&&"data-block"in i[0].props)return(0,O.jsx)(O.Fragment,{children:e})}return(0,O.jsx)("p",{className:n,...l,children:e})},(e,t)=>tQ(e,t));nh.displayName="MarkdownParagraph";var nf,np,ng={ol:tX,li:t0,ul:t1,hr:t5,strong:t2,a:t3,h1:t6,h2:t9,h3:t4,h4:t7,h5:t8,h6:ne,table:nt,thead:nn,tbody:nr,tr:nl,th:ni,td:na,blockquote:ns,code:nu,img:nm,pre:({children:e})=>(0,t.isValidElement)(e)?(0,t.cloneElement)(e,{"data-block":"true"}):e,sup:no,sub:nc,p:nh,section:nd},nx=()=>e=>{(0,ts.visit)(e,"html",(e,t,n)=>{n&&"number"==typeof t&&(n.children[t]={type:"text",value:e.value})})},nv=[],nb={allowDangerousHtml:!0},ny=new WeakMap,nk=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,l=e.remarkRehypeOptions;if(!(n||r||l)){let t="default";return this.keyCache.set(e,t),t}let i=e=>{if(!e||0===e.length)return"";let t="";for(let n=0;n<e.length;n+=1){let r=e[n];if(n>0&&(t+=","),Array.isArray(r)){let[e,n]=r;if("function"==typeof e){let n=ny.get(e);n||(n=e.name,ny.set(e,n)),t+=n}else t+=String(e);t+=":",t+=JSON.stringify(n)}else if("function"==typeof r){let e=ny.get(r);e||(e=r.name,ny.set(r,e)),t+=e}else t+=String(r)}return t},a=i(n),s=i(r),o=l?JSON.stringify(l):"",c=`${s}::${a}::${o}
7`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},nw=e=>{let t=nj(e),n=e.children||"";return nS(t.runSync(t.parse(n),n),e)},nj=e=>{let t=nk.get(e);if(t)return t;let n=nC(e);return nk.set(e,n),n},nC=e=>{let t=e.rehypePlugins||nv,n=e.remarkPlugins||nv,l=t.some(e=>Array.isArray(e)?e[0]===r.default:e===r.default)?n:[...n,nx],i=e.remarkRehypeOptions?{...nb,...e.remarkRehypeOptions}:nb;return(0,ta.unified)().use(tl).use(l).use(ti.default,i).use(t)},nN=e=>e,nS=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:l,skipHtml:i,unwrapDisallowed:a,urlTransform:s}=t;if(n||r||l||i||s){let t=s||nN;(0,ts.visit)(e,(e,s,o)=>{var c;let d;return"raw"===e.type&&o&&"number"==typeof s?(c=e.value,i?o.children.splice(s,1):o.children[s]={type:"text",value:c},s):"element"===e.type&&(((e,t)=>{var n;for(let r in em.urlAttributes)if(Object.hasOwn(em.urlAttributes,r)&&Object.hasOwn(e.properties,r)){let l=e.properties[r],i=em.urlAttributes[r];(null===i||i.includes(e.tagName))&&(e.properties[r]=null!=(n=t(String(l||""),r,e))?n:void 0)}})(e,t),d=!1,r?d=!r.includes(e.tagName):l&&(d=l.includes(e.tagName)),!d&&n&&"number"==typeof s&&(d=!n(e,s,o)),d&&o&&"number"==typeof s)?(a&&e.children?o.children.splice(s,1,...e.children):o.children.splice(s,1),s):void 0})}return function(e,t){var n,r,l,i;let a;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let s=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=s,r=t.jsxDEV,a=function(e,t,l,i){let a=Array.isArray(l.children),s=(0,J.pointStart)(e);return r(t,l,i,a,{columnNumber:s?s.column-1:void 0,fileName:n,lineNumber:s?s.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");
7if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");l=t.jsx,i=t.jsxs,a=function(e,t,n,r){let a=Array.isArray(n.children)?i:l;return r?a(t,n,r):a(t,n)}}let o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?W.svg:W.html,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},c=ei(o,e,void 0);return c&&"string"!=typeof c?c:o.create(e,o.Fragment,{children:c||void 0},void 0)}(e,{Fragment:O.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0})},nE=/\[\^[\w-]{1,200}\](?!:)/,nL=/\[\^[\w-]{1,200}\]:/,nM=/<\/(\w+)>/,nT=/<(\w+)[\s>]/,nV=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),nH=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)"$"===e[n]&&"$"===e[n+1]&&(t+=1,n+=1);return t},nI=e=>{let t=nE.test(e),n=nL.test(e);if(t||n)return[e];let r=to.Lexer.lex(e,{gfm:!0}),l=[],i=[],a=!1;for(let e of r){let t=e.raw,n=l.length;if(i.length>0){if(l[n-1]+=t,"html"===e.type){let e=t.match(nM);if(e){let t=e[1];i.at(-1)===t&&i.pop()}}continue}if("html"===e.type&&e.block){let e=t.match(nT);if(e){let n=e[1];t.includes(`</${n}>`)||nV.has(n.toLowerCase())||i.push(n)}}if(n>0&&!a){let e=l[n-1];if(nH(e)%2==1){l[n-1]=e+t;continue}}l.push(t),"space"!==e.type&&(a="code"===e.type)}return l},nA={...i.defaultSchema,protocols:{...i.defaultSchema.protocols,href:[...null!=(np=null==(nf=i.defaultSchema.protocols)?void 0:nf.href)?np:[],"tel"]}},nP={raw:r.default,sanitize:[l.default,nA],harden:[n.harden,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},nz=Object.values(nP),nR=Object.values({gfm:[function(e){let t=e||R,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),l=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push((0,z.gfm)(t)),l.push([(0,a.gfmAutolinkLiteralFromMarkdown)(),{enter:{gfmFootnoteDefinition:c,gfmFootnoteDefinitionLabelString:d,gfmFootnoteCall:h,gfmFootnoteCallString:f},exit:{gfmFootnoteDefinition:m,gfmFootnoteDefinitionLabelString:u,gfmFootnoteCall:g,gfmFootnoteCallString:p}},{canContainEols:["delete"],enter:{strikethrough:k},exit:{strikethrough:w}},{enter:{table:S,tableData:T,tableHeader:T,tableRow:L},exit:{codeText:V,table:E,tableData:M,tableHeader:M,tableRow:M}},{exit:{taskListCheckValueChecked:I,taskListCheckValueUnchecked:I,paragraph:A}}]),i.push({extensions:[(0,a.gfmAutolinkLiteralToMarkdown)(),{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:v,footnoteReference:x}},{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:y}],handlers:{delete:j}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,l=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=N.defaultHandlers.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return s(function(e,t,n){let r=e.children,l=-1,i=[],a=t.enter("table");for(;++l<r.length;)i[l]=o(r[l],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){let l=s([o(e,n,r)]);return l.slice(0,l.indexOf("\n"))}}};function a(e,t,n,r){let l=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),l(),s}function s(e,t){return(0,C.markdownTable)(e,{align:t,alignDelimiters:r,padding:n,stringLength:l})}function o(e,t,n){let r=e.children,l=-1,i=[],s=t.enter("tableRow");for(;++l<r.length;)i[l]=a(r[l],e,t,n);return s(),i}}(t),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:P}}]})},{}]}),nF={block:" â",circle:" â"},nD=(0,t.createContext)({shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}}),nO=(0,t.memo)(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>(0,O.jsx)(nw,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>{var r,l;return(null==(r=e.components)?void 0:r[n])!==(null==(l=t.components)?void 0:l[n])}))return!1}return e.rehypePlugins===t.rehypePlugins&&e.remarkPlugins===t.remarkPlugins});nO.displayName="Block";var n_=["github-light","github-dark"],nq=(0,t.memo)(({children:e,mode:n="streaming",parseIncompleteMarkdown:r=!0,
7components:i,rehypePlugins:a=nz,remarkPlugins:s=nR,className:o,shikiTheme:c=n_,mermaid:d,controls:u=!0,isAnimating:m=!1,animated:h,BlockComponent:f=nO,parseMarkdownIntoBlocksFn:p=nI,caret:g,plugins:x,remend:v,linkSafety:b={enabled:!0},allowedTags:y,...k})=>{let w=(0,t.useId)(),[j,C]=(0,t.useTransition)(),N=(0,t.useMemo)(()=>"string"!=typeof e?"":"streaming"===n&&r?(0,F.default)(e,v):e,[e,n,r,v]),S=(0,t.useMemo)(()=>p(N),[N,p]),[E,L]=(0,t.useState)(S);(0,t.useEffect)(()=>{"streaming"===n?C(()=>{L(S)}):L(S)},[S,n]);let M="streaming"===n?E:S,T=(0,t.useMemo)(()=>M.map((e,t)=>`${w}-${t}`),[M.length,w]),V=(0,t.useMemo)(()=>h?!0===h?tm():tm(h):null,[h]),H=(0,t.useMemo)(()=>{var e,t;return{shikiTheme:null!=(t=null==(e=null==x?void 0:x.code)?void 0:e.getThemes())?t:c,controls:u,isAnimating:m,mode:n,mermaid:d,linkSafety:b}},[c,u,m,n,d,b,null==x?void 0:x.code]),I=(0,t.useMemo)(()=>({...ng,...i}),[i]),A=(0,t.useMemo)(()=>{let e=[];return null!=x&&x.cjk&&(e=[...e,...x.cjk.remarkPluginsBefore]),e=[...e,...s],null!=x&&x.cjk&&(e=[...e,...x.cjk.remarkPluginsAfter]),null!=x&&x.math&&(e=[...e,x.math.remarkPlugin]),e},[s,null==x?void 0:x.math,null==x?void 0:x.cjk]),P=(0,t.useMemo)(()=>{var e;let t=a;if(y&&Object.keys(y).length>0&&a===nz){let n={...nA,tagNames:[...null!=(e=nA.tagNames)?e:[],...Object.keys(y)],attributes:{...nA.attributes,...y}};t=[nP.raw,[l.default,n],nP.harden]}return null!=x&&x.math&&(t=[...t,x.math.rehypePlugin]),V&&m&&(t=[...t,V.rehypePlugin]),t},[a,null==x?void 0:x.math,V,m,y]),z=(0,t.useMemo)(()=>g&&m?{"--streamdown-caret":`"${nF[g]}"`}:void 0,[g,m]);return"static"===n?(0,O.jsx)(tA.Provider,{value:null!=x?x:null,children:(0,O.jsx)(nD.Provider,{value:H,children:(0,O.jsx)("div",{className:tj("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",o),children:(0,O.jsx)(nw,{components:I,rehypePlugins:P,remarkPlugins:A,...k,children:e})})})}):(0,O.jsx)(tA.Provider,{value:null!=x?x:null,children:(0,O.jsx)(nD.Provider,{value:H,children:(0,O.jsxs)("div",{className:tj("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",g?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,o),style:z,children:[0===M.length&&g&&m&&(0,O.jsx)("span",{}),M.map((e,t)=>(0,O.jsx)(f,{components:I,content:e,index:t,rehypePlugins:P,remarkPlugins:A,shouldParseIncompleteMarkdown:r,...k},T[t]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);nq.displayName="Streamdown";var nB=({children:e,className:n,minZoom:r=.5,maxZoom:l=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let c=(0,t.useRef)(null),d=(0,t.useRef)(null),[u,m]=(0,t.useState)(s),[h,f]=(0,t.useState)({x:0,y:0}),[p,g]=(0,t.useState)(!1),[x,v]=(0,t.useState)({x:0,y:0}),[b,y]=(0,t.useState)({x:0,y:0}),k=(0,t.useCallback)(e=>{m(t=>Math.max(r,Math.min(l,t+e)))},[r,l]),w=(0,t.useCallback)(()=>{k(i)},[k,i]),j=(0,t.useCallback)(()=>{k(-i)},[k,i]),C=(0,t.useCallback)(()=>{m(s),f({x:0,y:0})},[s]),N=(0,t.useCallback)(e=>{e.preventDefault(),k(e.deltaY>0?-i:i)},[k,i]),S=(0,t.useCallback)(e=>{if(0!==e.button||!1===e.isPrimary)return;g(!0),v({x:e.clientX,y:e.clientY}),y(h);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[h]),E=(0,t.useCallback)(e=>{if(!p)return;e.preventDefault();let t=e.clientX-x.x,n=e.clientY-x.y;f({x:b.x+t,y:b.y+n})},[p,x,b]),L=(0,t.useCallback)(e=>{g(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,t.useEffect)(()=>{let e=c.current;if(e)return e.addEventListener("wheel",N,{passive:!1}),()=>{e.removeEventListener("wheel",N)}},[N]),(0,t.useEffect)(()=>{let e=d.current;if(e&&p)return document.body.style.userSelect="none",e.addEventListener("pointermove",E,{passive:!1}),e.addEventListener("pointerup",L),e.addEventListener("pointercancel",L),()=>{document.body.style.userSelect="",e.removeEventListener("pointermove",E),e.removeEventListener("pointerup",L),e.removeEventListener("pointercancel",L)}},[p,E,L]),(0,O.jsxs)("div",{className:tj("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",n),ref:c,style:{cursor:p?"grabbing":"grab"},children:[a?(0,O.jsxs)("div",{className:tj("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,O.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:u>=l,onClick:w,title:"Zoom in",type:"button",children:(0,O.jsx)(tk,{size:16})}),(0,O.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:u<=r,onClick:j,title:"Zoom out",type:"button",children:(0,O.jsx)(tw,{size:16})}),(0,O.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:C,title:"Reset zoom and pan",type:"button",children:(0,O.jsx)(tv,{size:16})})]}):null,(0,O.jsx)("div",{className:tj("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:S,ref:d,role:"application",style:{transform:`translate(${h.x}px, ${h.y}px) scale(${u})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},n$=({chart:e,className:n,config:r,fullscreen:l=!1,showControls:i=!0})=>{let[a,s]=(0,t.useState)(null),[o,c]=(0,t.useState)(!1),[d,u]=(0,t.useState)(""),[m,h]=(0,t.useState)(""),[f,p]=(0,t.useState)(0),{mermaid:g}=(0,t.useContext)(nD),x=tz(),v=null==g?void 0:g.errorComponent,{shouldRender:b,containerRef:y}=function(e={}){let{immediate:n=!1,debounceDelay:r=300,rootMargin:l="300px",idleTimeout:i=500}=e,[a,s]=(0,t.useState)(!1),o=(0,t.useRef)(null),c=(0,t.useRef)(null),d=(0,t.useRef)(null),u=(0,t.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),m=(0,t.useMemo)(()=>"u">typeof window&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),h=(0,t.useMemo)(()=>"u">typeof window&&window.cancelIdleCallback?e=>
7window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,t.useEffect)(()=>{if(n)return void s(!0);let e=o.current;if(!e)return;c.current&&(clearTimeout(c.current),c.current=null),d.current&&(h(d.current),d.current=null);let t=()=>{c.current&&(clearTimeout(c.current),c.current=null),d.current&&(h(d.current),d.current=null)},a=(e,n)=>{e.isIntersecting?(t(),c.current=window.setTimeout(()=>{var e,t;let r=n.takeRecords();(0===r.length||null!=(t=null==(e=r.at(-1))?void 0:e.isIntersecting)&&t)&&(d.current=m(e=>{e.timeRemaining()>0||e.didTimeout?(s(!0),n.disconnect()):d.current=m(()=>{s(!0),n.disconnect()},{timeout:i/2})},{timeout:i}))},r)):t()},u=new IntersectionObserver(e=>{for(let t of e)a(t,u)},{rootMargin:l,threshold:0});return u.observe(e),()=>{c.current&&clearTimeout(c.current),d.current&&h(d.current),u.disconnect()}},[n,r,l,i,h,m]),{shouldRender:a,containerRef:o}}({immediate:l});return((0,t.useEffect)(()=>{if(b){if(!x)return void s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");(async()=>{try{s(null),c(!0);let t=x.getMermaid(r),n=e.split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),l=`mermaid-${Math.abs(n)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:i}=await t.render(l,e);u(i),h(i)}catch(e){m||d||s(e instanceof Error?e.message:"Failed to render Mermaid chart")}finally{c(!1)}})()}},[e,r,f,b,x]),b||d||m)?!o||d||m?!a||d||m?(0,O.jsx)("div",{className:tj("size-full",n),"data-streamdown":"mermaid",ref:y,children:(0,O.jsx)(nB,{className:tj(l?"size-full overflow-hidden":"my-4 overflow-hidden",n),fullscreen:l,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,O.jsx)("div",{"aria-label":"Mermaid chart",className:tj("flex justify-center",l?"size-full items-center":null),dangerouslySetInnerHTML:{__html:d||m},role:"img"})})}):v?(0,O.jsx)("div",{ref:y,children:(0,O.jsx)(v,{chart:e,error:a,retry:()=>p(e=>e+1)})}):(0,O.jsxs)("div",{className:tj("rounded-lg border border-red-200 bg-red-50 p-4",n),ref:y,children:[(0,O.jsxs)("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),(0,O.jsxs)("details",{className:"mt-2",children:[(0,O.jsx)("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),(0,O.jsx)("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]}):(0,O.jsx)("div",{className:tj("my-4 flex justify-center p-4",n),ref:y,children:(0,O.jsxs)("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[(0,O.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),(0,O.jsx)("span",{className:"text-sm",children:"Loading diagram..."})]})}):(0,O.jsx)("div",{className:tj("my-4 min-h-[200px]",n),ref:y})};e.s(["b",0,tj,"c",0,tN,"d",0,()=>{var e;let t=tP();return null!=(e=null==t?void 0:t.code)?e:null},"e",0,n$,"j",0,nD,"l",0,nq],877072)}]);
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.