// @generated by scripts/runtime-bundles/bundle-runtime.ts
// bundle: zenuml
globalThis.eval('globalThis.window=globalThis,globalThis.self=globalThis,globalThis.navigator={userAgent:"KatanA Rust-managed Mermaid runtime"},globalThis.location={href:"https://katana.local/",origin:"https://katana.local",protocol:"https:",host:"katana.local",hostname:"katana.local",pathname:"/",search:"",hash:""};const KATANA_DETERMINISTIC_NOW=Date.parse("2026-01-01T00:00:00.000Z");globalThis.Date.now=()=>KATANA_DETERMINISTIC_NOW,globalThis.performance={now:()=>Date.now()},globalThis.devicePixelRatio=1,globalThis.innerWidth=1520,globalThis.innerHeight=845,globalThis.screen={width:globalThis.innerWidth,height:globalThis.innerHeight,availWidth:globalThis.innerWidth,availHeight:globalThis.innerHeight},globalThis.localStorage=katanaStorage(),globalThis.sessionStorage=katanaStorage();const katanaIntl=globalThis.Intl??{};katanaIntl.Segmenter=class KatanaSegmenter{segment(value){const input=String(value);let index=0;return Array.from(input).map(segment=>{const entry={segment:segment,index:index,input:input};return index+=segment.length,entry})}},globalThis.Intl=katanaIntl,globalThis.crypto={getRandomValues(array){for(let index=0;index<array.length;index+=1)array[index]=katanaDeterministicByte(index);return array},randomUUID:()=>"00000000-0000-4000-8000-000000000000"},Math.random=function katanaDeterministicRandom(){return katanaRandomState=1664525*katanaRandomState+1013904223>>>0,katanaRandomState/4294967296};let katanaRandomState=305419896;function katanaDeterministicByte(index){return 73*index+41&255}function katanaStorage(){const values={};return{get length(){return Object.keys(values).length},clear(){Object.keys(values).forEach(key=>delete values[key])},getItem:key=>values[String(key)]??null,key:index=>Object.keys(values)[index]??null,removeItem(key){delete values[String(key)]},setItem(key,value){values[String(key)]=String(value)}}}globalThis.queueMicrotask=callback=>Promise.resolve().then(callback),globalThis.setTimeout=(callback,_delay,...args)=>callback(...args),globalThis.clearTimeout=()=>{},globalThis.setInterval=(callback,_delay,...args)=>callback(...args),globalThis.clearInterval=()=>{},globalThis.MessageChannel=class KatanaMessageChannel{constructor(){this.port1={onmessage:null},this.port2={postMessage:data=>{queueMicrotask(()=>this.port1.onmessage?.({data:data}))}}}};let katanaAnimationFrameDepth=0;function katanaBase64Chunk(chunk){const first=chunk.charCodeAt(0),second=chunk.charCodeAt(1),third=chunk.charCodeAt(2);return[first>>2,(3&first)<<4|second>>4,katanaThirdBase64Index(second,third),katanaFourthBase64Index(third)].map(index=>"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(index)).join("")}function katanaThirdBase64Index(second,third){return Number.isNaN(second)?64:(15&second)<<2|third>>6}function katanaFourthBase64Index(third){return Number.isNaN(third)?64:63&third}globalThis.requestAnimationFrame=callback=>function katanaRunAnimationFrame(callback){return katanaAnimationFrameDepth>4?0:function katanaInvokeAnimationFrame(callback){katanaAnimationFrameDepth+=1;try{return callback(Date.now())}finally{katanaAnimationFrameDepth-=1}}(callback)}(callback),globalThis.cancelAnimationFrame=()=>{},globalThis.addEventListener=()=>{},globalThis.removeEventListener=()=>{},globalThis.__katanaMissingSelectors=[],globalThis.btoa=value=>function katanaBase64Triplets(value){return value.match(/[\\s\\S]{1,3}/g)??[]}(unescape(encodeURIComponent(String(value)))).map(katanaBase64Chunk).join(""),globalThis.DOMPurify={sanitize:value=>String(value??""),addHook(){},removeHook(){}};class KatanaStyle{constructor(){this.values={}}setProperty(name,value){this.values[String(name)]=String(value)}getPropertyValue(name){return this.values[String(name)]??""}removeProperty(name){const value=this.getPropertyValue(name);return delete this.values[String(name)],value}set mixBlendMode(value){this.setProperty("mix-blend-mode",value)}get mixBlendMode(){return this.getPropertyValue("mix-blend-mode")}get cssText(){return Object.entries(this.values).map(([key,value])=>`${key}: ${value};`).join(" ")}clone(){const cloned=new KatanaStyle;return cloned.values={...this.values},cloned}}class KatanaCSSRule{constructor(cssText){this.cssText=String(cssText)}}function katanaEscapeSvgText(value){return String(value).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}globalThis.CSSStyleSheet=class KatanaCSSStyleSheet{constructor(){this.cssRules=[]}insertRule(rule,index=this.cssRules.length){const insertIndex=function katanaCssRuleInsertIndex(index,length){const parsed=Number(index);return Number.isFinite(parsed)?Math.max(0,Math.min(Math.trunc(parsed),length)):length}(index,this.cssRules.length);return this.cssRules.splice(insertIndex,0,new KatanaCSSRule(rule)),insertIndex}replaceSync(cssText){this.cssRules=function katanaStyleSheetRuleTexts(cssText){const source=String(cssText??"").trim();return 0===source.length?[]:source.match(/[^{}]+\\{[^{}]*\\}/g)??[source]}(cssText).map(it=>new KatanaCSSRule(it))}},globalThis.getComputedStyle=node=>({getPropertyValue:name=>node?.style?.getPropertyValue?.(name)??""});class KatanaNode{constructor(tagName,namespaceURI=null){const rawName=function katanaRawNodeName(tagName){return String(tagName||"")}(tagName),preservesCase=function katanaPreservesNodeCase(namespaceURI){return[katanaNamespaceIncludes(namespaceURI,"svg"),katanaNamespaceIncludes(namespaceURI,"xml")].includes(!0)}(namespaceURI);this.serializedName=function katanaSerializedNodeName(rawName,preservesCase){return preservesCase?rawName:rawName.toLowerCase()}(rawName,preservesCase),this.tagName=function katanaTagNodeName(rawName,preservesCase){return preservesCase?rawName:rawName.toUpperCase()}(rawName,preservesCase),this.nodeName=this.tagName,this.localName=rawName.toLowerCase(),this.namespaceURI=namespaceURI,this.children=[],this.childNodes=this.children,this.parentNode=null,this.ownerDocument=null,this.nodeType=function katanaNodeType(tagName){return"#text"===tagName?3:1}(tagName),this.attributes=[],this.attributeMap={},this.style=new KatanaStyle,this.dataset={},this._textContent="",this.className="",this.id=""}appendChild(child){return child.parentNode=this,child.ownerDocument=this.ownerDocument,this.children.push(child),this.childNodes=this.children,child}insertBefore(child,reference){child.parentNode=this,child.ownerDocument=this.ownerDocument;const index=this.children.indexOf(reference);return index<0?(this.children.push(child),this.childNodes=this.children,child):(this.children.splice(index,0,child),this.childNodes=this.children,child)}removeChild(child){return this.children=this.children.filter(candidate=>candidate!==child),this.childNodes=this.children,child}remove(){this.parentNode&&this.parentNode.removeChild(this)}get firstChild(){return this.children[0]??null}get lastChild(){return this.children[this.children.length-1]??null}get parentElement(){return this.parentNode}getRootNode(){return this.ownerDocument??document}hasChildNodes(){return this.children.length>0}compareDocumentPosition(other){return this===other?0:4}get nextSibling(){if(!this.parentNode)return null;const index=this.parentNode.children.indexOf(this);return this.parentNode.children[index+1]??null}get previousSibling(){if(!this.parentNode)return null;const index=this.parentNode.children.indexOf(this);return this.parentNode.children[index-1]??null}setAttribute(name,value){const normalized=String(name),attribute=function katanaUpsertAttribute(node,normalized){const attribute=node.attributeMap[normalized];return attribute||function katanaCreateAttribute(node,normalized){const attribute={name:normalized,nodeName:normalized,value:""};return node.attributeMap[normalized]=attribute,node.attributes.push(attribute),attribute}(node,normalized)}(this,normalized);attribute.value=String(value),function katanaSyncIdAttribute(node,normalized,value){"id"===normalized&&(node.id=String(value))}(this,normalized,value),function katanaSyncClassAttribute(node,normalized,value){"class"===normalized&&(node.className=String(value))}(this,normalized,value)}getAttribute(name){return this.attributeMap[String(name)]?.value??null}removeAttribute(name){const normalized=String(name);delete this.attributeMap[normalized],this.attributes=this.attributes.filter(attribute=>attribute.name!==normalized)}setAttributeNS(_namespace,name,value){this.setAttribute(name,value)}getAttributeNS(_namespace,name){return this.getAttribute(name)}hasAttribute(name){return Object.hasOwn(this.attributeMap,String(name))}querySelector(selector){const result=function katanaFirstQuerySelectorResult(node,selector){return node.querySelectorAll(selector)[0]??null}(this,selector);return null===result&&globalThis.__katanaMissingSelectors.push(`${this.localName}:${selector}`),result}querySelectorAll(selector){const compound=function queryCompoundSelector(root,selector){const parts=selector.split(/\\s+/).filter(Boolean);return parts.length<=1?null:function katanaQuerySelectorParts(candidates,parts){return parts.reduce((current,part)=>current.flatMap(candidate=>querySimpleSelector(candidate,part)),candidates)}([root],parts)}(this,String(selector));return null!==compound?compound:querySimpleSelector(this,String(selector))}getElementsByTagName(tagName){return this.querySelectorAll(String(tagName).toLowerCase())}addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}focus(){document.activeElement=this}click(){}get isConnected(){return this===document||document.documentElement.contains(this)}toJSON(){return{}}}function katanaNamespaceIncludes(namespaceURI,value){return String(namespaceURI||"").includes(value)}function katanaStyleCamelName(name){return String(name).replace(/-([a-z])/g,(_match,char)=>char.toUpperCase())}function katanaStyleKebabName(name){return String(name).replace(/[A-Z]/g,char=>`-${char.toLowerCase()}`)}["backgroundColor","border","borderBottom","borderColor","borderRadius","borderRightStyle","color","colorScheme","cursor","display","fill","fontFamily","fontSize","fontWeight","height","margin","marginBottom","maxHeight","maxWidth","opacity","overflow","padding","paddingBottom","position","right","stroke","stopColor","textAlign","top","verticalAlign","width","zIndex"].forEach(function katanaInstallStyleDirectProperty(camel){Object.getOwnPropertyDescriptor(KatanaStyle.prototype,camel)||Object.defineProperty(KatanaStyle.prototype,camel,{get(){return this.getPropertyValue(katanaStyleKebabName(camel))},set(value){this.setProperty(katanaStyleKebabName(camel),value)}})}),KatanaStyle.prototype.setProperty=function setProperty(name,value){const kebab=katanaStyleKebabName(name),camel=katanaStyleCamelName(name);this.values[kebab]=String(value),this.values[camel]=String(value),Object.getOwnPropertyDescriptor(KatanaStyle.prototype,camel)||(this[camel]=String(value))},KatanaStyle.prototype.getPropertyValue=function getPropertyValue(name){const key=String(name),kebab=katanaStyleKebabName(key),camel=katanaStyleCamelName(key);return this.values[key]??this.values[kebab]??this.values[camel]??function katanaStyleOwnValue(style,camel){return Object.hasOwn(style,camel)?style[camel]:""}(this,camel)},KatanaStyle.prototype.removeProperty=function removeProperty(name){const value=this.getPropertyValue(name);return delete this.values[String(name)],delete this.values[katanaStyleKebabName(name)],delete this.values[katanaStyleCamelName(name)],delete this[katanaStyleCamelName(name)],value},Object.defineProperty(KatanaStyle.prototype,"cssText",{get(){return Object.entries(this.values).filter(([key])=>key.includes("-")).map(([key,value])=>`${key}: ${value}`).join("; ")},set(value){this.values={},function katanaApplyCssText(style,value){(function katanaCssEntries(value){return String(value??"").split(";")})(value).forEach(entry=>{!function katanaApplyCssEntry(style,entry){const separator=entry.indexOf(":");separator<0||style.setProperty(entry.slice(0,separator).trim(),entry.slice(separator+1).trim())}(style,entry)})}(this,value)}});const katanaSetAttributeBase=KatanaNode.prototype.setAttribute;function parseInnerHtml(source,xmlMode=!1){const root={localName:"#root",children:[],appendChild(child){this.children.push(child)}},stack=[root];return Array.from(source.matchAll(/<\\/?([a-zA-Z0-9:_-]+)([^>]*)>|([^<]+)/g)).forEach(match=>{!function appendHtmlToken(stack,match,xmlMode){void 0===match[3]?function appendHtmlTag(stack,match,xmlMode){match[0].startsWith("</")?function popHtmlStack(stack,tagName){const normalized=String(tagName).toLowerCase(),index=stack.findLastIndex(node=>node.localName===normalized);index>0&&stack.splice(index)}(stack,match[1]):function appendHtmlStartTag(stack,match,xmlMode){const node=new KatanaNode(match[1],function katanaHtmlNamespace(xmlMode){return xmlMode?"katana-xml":null}(xmlMode));node.ownerDocument=document,function parseAttributes(source){return Array.from(source.matchAll(/([a-zA-Z0-9:_-]+)="([^"]*)"/g)).map(match=>[match[1],decodeHtmlEntities(match[2])])}(match[2]).forEach(([name,value])=>{node.setAttribute(name,value)}),stack[stack.length-1].appendChild(node),function pushHtmlElementIfOpen(stack,node,fullTag,tagName){(function katanaIsOpenHtmlTag(fullTag,tagName){return[!fullTag.endsWith("/>"),!isHtmlVoidTag(tagName)].every(Boolean)})(fullTag,tagName)&&stack.push(node)}(stack,node,match[0],match[1])}(stack,match,xmlMode)}(stack,match,xmlMode):function appendHtmlText(parent,value){const text=decodeHtmlEntities(value);text.length>0&&parent.appendChild(new KatanaTextNode(text))}(stack[stack.length-1],match[3])}(stack,match,xmlMode)}),root.children}function isHtmlVoidTag(tagName){return new Set(["br","hr","img","input","meta","link"]).has(String(tagName).toLowerCase())}function decodeHtmlEntities(value){return"block"===globalThis.__katanaMermaidDiagramType?function katanaDecodeHtmlEntitiesForBlock(value){return String(value).replace(/&nbsp;/g," ").replace(/
/gi,"\\n").replace(/ /g,"\\n").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,\'"\').replace(/'/g,"\'")}(value):String(value).replace(/&nbsp;/g," ").replace(/ /g," ").replace(/
/gi,"\\n").replace(/ /g,"\\n").replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,\'"\').replace(/'/g,"\'")}KatanaNode.prototype.setAttribute=function setAttribute(name,value){katanaSetAttributeBase.call(this,name,value),"style"===String(name).toLowerCase()&&(this.style.cssText=value)};class KatanaTextNode extends KatanaNode{constructor(value){super("#text"),this.textContent=String(value)}get outerHTML(){return katanaEscapeSvgText(this.textContent)}}function katanaStyleAttribute(node){return function katanaShouldSerializeStyle(node){return[node.style.cssText,!node.hasAttribute("style")].every(Boolean)}(node)?{style:node.style.cssText}:{}}KatanaNode.prototype.getBBox=function getBBox(){const text=function katanaNodeTextForBox(node){return String(function katanaFirstTextValue(values){return values.find(Boolean)??""}([node.textContent,node.innerText]))}(this),childWidth=function katanaNodeChildWidth(node){return node.children.reduce((max,child)=>Math.max(max,child.getBBox().width),0)}(this);return{x:0,y:0,width:Math.max(80,childWidth,katanaTextWidth(text)),height:Math.max(24,24*this.children.length)}},KatanaNode.prototype.getBoundingClientRect=function getBoundingClientRect(){const box=this.getBBox();return{...box,top:box.y,left:box.x,right:box.x+box.width,bottom:box.y+box.height}},KatanaNode.prototype.getComputedTextLength=function getComputedTextLength(){return Math.max(16,katanaTextWidth(String(this.textContent||"")))},KatanaNode.prototype.getContext=function getContext(){return{font:"",measureText:value=>({width:Math.max(16,katanaTextWidth(String(value||"")))})}},Object.defineProperty(KatanaNode.prototype,"innerHTML",{get(){return 0===this.children.length?this.textContent:this.children.map(child=>child.outerHTML??child.textContent??"").join("")},set(value){!function katanaClearInnerHtml(node){node.textContent="",node.children=[],node.childNodes=node.children}(this),function katanaApplyInnerHtml(node,value,parsed){0!==parsed.length?function katanaAppendParsedHtml(node,parsed){for(const child of parsed)node.appendChild(child)}(node,parsed):node.textContent=value}(this,String(value),parseInnerHtml(String(value)))}}),Object.defineProperty(KatanaNode.prototype,"outerHTML",{get(){const attrs=function katanaSerializedAttributeText(node){return Object.entries({...node.serializedAttributes(),...katanaStyleAttribute(node)}).map(([key,value])=>` ${key}="${function katanaEscapeSvgAttribute(value){return String(value).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}(value)}"`).join("")}(this),body=function katanaOuterHtmlBody(node){return 0===node.children.length?katanaEscapeSvgText(node.textContent):node.innerHTML}(this);return`<${this.serializedName}${attrs}>${body}</${this.serializedName}>`}}),KatanaNode.prototype.cloneNode=function cloneNode(deep=!1){const clone=function katanaShallowCloneNode(node){const clone=new KatanaNode(node.serializedName,node.namespaceURI);return node.attributes.forEach(attribute=>{clone.setAttribute(attribute.name,attribute.value)}),clone.style=node.style.clone(),clone._textContent=node._textContent??"",clone.className=node.className,clone.id=node.id,clone.ownerDocument=node.ownerDocument,clone}(this);return function katanaCloneChildrenIfDeep(node,clone,deep){deep&&function katanaCloneChildren(node,clone){for(const child of node.children)clone.appendChild(child.cloneNode(!0))}(node,clone)}(this,clone,deep),clone},KatanaNode.prototype.serializedAttributes=function serializedAttributes(){return Object.fromEntries(this.attributes.map(attribute=>[attribute.name,attribute.value]))};class KatanaCanvasContext{constructor(){this.font=""}measureText(value){return{width:katanaCanvasTextWidth(String(value??""),this.font)}}}function katanaCanvasTextWidth(text,font){const fontScale=function katanaCanvasFontScale(font){return katanaFiniteFontSize(function katanaCanvasFontSize(font){const match=String(font??"").match(/(\\d+(?:\\.\\d+)?)px/);return match?Number(match[1]):16}(font))/16}(font);return Array.from(katanaMeasuredTextValue(text)).map(char=>function katanaCanvasCharacterWidth(char){return 160===char.charCodeAt(0)?KATANA_CANVAS_ASCII_TEXT_WIDTHS[" "]:KATANA_CANVAS_ASCII_TEXT_WIDTHS[char]??katanaTextWidth(char)}(char)).reduce((width,charWidth)=>width+charWidth*fontScale,0)}KatanaNode.prototype.getContext=function getContext(){return new KatanaCanvasContext};const KATANA_CANVAS_ASCII_TEXT_WIDTHS={" ":4.445,"!":4.445,\'"\':5.68,"\'":3.055,"(":5.328,")":5.328,"-":5.328,".":4.445,"/":4.445,":":4.445,0:8.898,1:8.898,2:8.898,3:8.898,4:8.898,5:8.898,6:8.898,7:8.898,8:8.898,9:8.898,"=":9.344,A:10.672,B:10.672,C:11.555,D:11.555,E:10.672,F:9.773,G:12.445,H:11.555,I:4.445,J:8,K:10.672,L:8.898,M:13.328,N:11.555,O:12.445,P:10.672,Q:12.445,R:11.555,S:10.672,T:9.773,U:11.555,V:10.672,W:15.102,X:10.672,Y:10.672,Z:9.773,_:8.898,a:8.898,b:8.898,c:8,d:8.898,e:8.898,f:4.445,g:8.898,h:8.898,i:3.555,j:3.555,k:8,l:3.555,m:13.328,n:8.898,o:8.898,p:8.898,q:8.898,r:5.328,s:8,t:4.445,u:8.898,v:8,w:11.555,x:8,y:8,z:8};function matchesSelector(node,selector){const matcher=KATANA_SELECTOR_MATCHERS.find(entry=>entry.applies(selector));return matcher?matcher.matches(node,selector):function katanaMatchesTag(node,selector){return node.localName===selector.toLowerCase()}(node,selector)}const KATANA_SELECTOR_MATCHERS=[{applies:function katanaIsBareFirstChildSelector(selector){return[":first-child","::first-child"].includes(selector)},matches:katanaMatchesBareFirstChild},{applies:function katanaIsNestedFirstChildSelector(selector){return selector.endsWith(":first-child")},matches:function katanaMatchesNestedFirstChild(node,selector){return[matchesSelector(node,selector.replace(/:{1,2}first-child$/,"")),katanaMatchesBareFirstChild(node)].every(Boolean)}},{applies:function katanaIsWildcardSelector(selector){return"*"===selector},matches:function katanaMatchesWildcard(node){return node.nodeType===Node.ELEMENT_NODE}},{applies:function katanaIsTagIdSelector(selector){return/^([a-zA-Z0-9:_-]+)#(.+)$/.test(selector)},matches:function katanaMatchesTagId(node,selector){const match=selector.match(/^([a-zA-Z0-9:_-]+)#(.+)$/);return[node.localName===match[1].toLowerCase(),node.id===match[2]].every(Boolean)}},{applies:function katanaIsBodySelector(selector){return"body"===selector},matches:function katanaMatchesBody(node){return node===document.body}},{applies:function katanaIsIdSelector(selector){return selector.startsWith("#")},matches:function katanaMatchesId(node,selector){return node.id===selector.slice(1)}},{applies:function katanaIsIdAttributeSelector(selector){return/^\\[id="([^"]+)"\\]$/.test(selector)},matches:function katanaMatchesIdAttribute(node,selector){return node.id===selector.match(/^\\[id="([^"]+)"\\]$/)[1]}},{applies:function katanaIsClassSelector(selector){return selector.startsWith(".")},matches:function katanaMatchesClass(node,selector){return String(node.className).split(/\\s+/).includes(selector.slice(1))}}];function katanaMatchesBareFirstChild(node){return node.parentNode?.firstElementChild===node}function querySimpleSelector(root,selector){const results=[];return root.children.forEach(node=>{katanaVisitSelector(node,selector,results)}),results}function katanaVisitSelector(node,selector,results){!function katanaAddMatchingSelector(node,selector,results){matchesSelector(node,selector)&&results.push(node)}(node,selector,results),node.children.forEach(child=>{katanaVisitSelector(child,selector,results)})}const document={nodeType:9,currentScript:null,activeElement:null,addEventListener(){},removeEventListener(){},dispatchEvent:()=>!0,createElement(tagName){const node=new KatanaNode(tagName);return node.ownerDocument=document,node},createElementNS(namespaceURI,tagName){const node=new KatanaNode(tagName,namespaceURI);return node.ownerDocument=document,node},createTextNode(value){const node=new KatanaTextNode(value);return node.ownerDocument=document,node},createComment(value){return this.createTextNode(value)},createDocumentFragment(){const node=new KatanaNode("#document-fragment");return node.nodeType=11,node.ownerDocument=document,node},createNodeIterator(root){const nodes=[],visit=node=>{nodes.push(node),node.children.forEach(visit)};visit(root);let index=0;return{nextNode:()=>nodes[index++]??null}},getElementsByTagName(tagName){return this.documentElement.querySelectorAll(String(tagName).toLowerCase())},importNode(node,deep){const clone=node.cloneNode(deep);return clone.ownerDocument=document,clone},getElementById(id){const result=this.documentElement.querySelector(`#${id}`);return null===result&&globalThis.__katanaMissingSelectors.push(`document.getElementById:${id}`),result},querySelector(selector){return"body"===selector?this.body:this.documentElement.querySelector(selector)},querySelectorAll(selector){return this.documentElement.querySelectorAll(selector)},implementation:{createHTMLDocument:()=>createDetachedDocument()},fonts:{ready:Promise.resolve()}};function createDetachedDocument(){const detached=Object.create(document);return detached.documentElement=document.createElement("html"),detached.head=document.createElement("head"),detached.body=document.createElement("body"),detached.documentElement.ownerDocument=detached,detached.head.ownerDocument=detached,detached.body.ownerDocument=detached,detached.documentElement.appendChild(detached.head),detached.documentElement.appendChild(detached.body),detached.defaultView=globalThis,detached.nodeType=9,detached}function attachOwnerDocument(node,ownerDocument){node.ownerDocument=ownerDocument;for(const child of node.children)attachOwnerDocument(child,ownerDocument)}function katanaDetachChild(child){const parent=child?.parentNode;parent&&(function katanaReplaceChildList(parent,children){parent.children=children,parent.childNodes=children}(parent,function katanaChildList(parent){return[parent.children,parent.childNodes,[]].find(Array.isArray)}(parent).filter(candidate=>candidate!==child)),child.parentNode=null)}function katanaAdoptChild(parent,child){child.parentNode=parent,child.ownerDocument=parent.ownerDocument??parent}function katanaDocumentPath(node){const path=[];let current=node;for(;current?.parentNode;)path.unshift(current.parentNode.children.indexOf(current)),current=current.parentNode;return path}document.documentElement=document.createElement("html"),document.head=document.createElement("head"),document.body=document.createElement("body"),document.documentElement.appendChild(document.head),document.documentElement.appendChild(document.body),document.defaultView=globalThis,globalThis.document=document,globalThis.Element=KatanaNode,globalThis.HTMLElement=KatanaNode,globalThis.SVGElement=KatanaNode,globalThis.Node=KatanaNode,globalThis.Node.ELEMENT_NODE=1,globalThis.Node.TEXT_NODE=3,globalThis.Node.DOCUMENT_NODE=9,globalThis.Node.DOCUMENT_FRAGMENT_NODE=11,globalThis.DocumentFragment=KatanaNode,globalThis.HTMLTemplateElement=KatanaNode,globalThis.HTMLFormElement=KatanaNode,globalThis.HTMLButtonElement=KatanaNode,globalThis.HTMLCanvasElement=KatanaNode,globalThis.HTMLFieldSetElement=KatanaNode,globalThis.HTMLIFrameElement=KatanaNode,globalThis.HTMLImageElement=KatanaNode,globalThis.HTMLInputElement=KatanaNode,globalThis.HTMLLabelElement=KatanaNode,globalThis.HTMLLegendElement=KatanaNode,globalThis.HTMLSelectElement=KatanaNode,globalThis.HTMLTextAreaElement=KatanaNode,globalThis.HTMLVideoElement=KatanaNode,globalThis.SVGImageElement=KatanaNode,globalThis.NamedNodeMap=Array,globalThis.NodeFilter={SHOW_ELEMENT:1,SHOW_TEXT:4,SHOW_COMMENT:128},globalThis.MutationObserver=class{constructor(callback){this.callback=callback}observe(){}disconnect(){}takeRecords(){return[]}},globalThis.trustedTypes={createPolicy:()=>({createHTML:value=>String(value),createScriptURL:value=>String(value)})},globalThis.TextEncoder=class{encode(value){return new Uint8Array(Array.from(String(value)).flatMap(char=>function katanaUtf8Bytes(char){const code=char.charCodeAt(0);return code<128?[code]:function katanaMultibyteUtf8Bytes(code){return code<2048?[192|code>>6,128|63&code]:[224|code>>12,128|code>>6&63,128|63&code]}(code)}(char)))}},globalThis.TextDecoder=class{decode(value){return Array.from(value).map(byte=>String.fromCharCode(byte)).join("")}},globalThis.structuredClone=value=>JSON.parse(JSON.stringify(value)),globalThis.XMLSerializer=class{serializeToString(node){return node.outerHTML??""}},globalThis.DOMParser=class{parseFromString(source){const parsed=parseInnerHtml(String(source).trim(),!0),detached=createDetachedDocument(),root=parsed[0]??detached.createElement("xml");return attachOwnerDocument(root,detached),detached.documentElement=root,detached.body=root,detached}},KatanaNode.prototype.appendChild=function appendChild(child){return child.nodeType===Node.DOCUMENT_FRAGMENT_NODE?function katanaAppendFragment(parent,fragment){const nodes=[...fragment.childNodes];for(const node of nodes)parent.appendChild(node);return fragment}(this,child):(katanaDetachChild(child),katanaAdoptChild(this,child),this.children.push(child),this.childNodes=this.children,child)},KatanaNode.prototype.insertBefore=function insertBefore(child,reference){return child.nodeType===Node.DOCUMENT_FRAGMENT_NODE?function katanaInsertFragmentBefore(parent,fragment,reference){for(const node of fragment.childNodes)parent.insertBefore(node,reference);return fragment}(this,child,reference):function katanaInsertNodeBefore(parent,child,reference){return child===reference?child:function katanaInsertDetachedNodeBefore(parent,child,reference){return katanaDetachChild(child),katanaAdoptChild(parent,child),function katanaInsertAtReference(parent,child,reference){const index=parent.children.indexOf(reference);index<0?parent.children.push(child):parent.children.splice(index,0,child)}(parent,child,reference),parent.childNodes=parent.children,child}(parent,child,reference)}(this,child,reference)},KatanaNode.prototype.removeChild=function removeChild(child){return this.children=this.children.filter(candidate=>candidate!==child),this.childNodes=this.children,child.parentNode=null,child},Object.defineProperty(KatanaNode.prototype,"firstElementChild",{get(){return this.children.find(child=>child.nodeType===Node.ELEMENT_NODE)??null}}),KatanaNode.prototype.compareDocumentPosition=function compareDocumentPosition(other){return this===other?0:function katanaComparePath(left,right){const mismatch=function katanaFirstPathMismatch(left,right){return function katanaPathIndexes(left,right){return Array.from({length:Math.min(left.length,right.length)},(_value,index)=>index)}(left,right).find(index=>left[index]!==right[index])??null}(left,right);return null!==mismatch?function katanaPathMismatchPosition(left,right,index){return left[index]<right[index]?4:2}(left,right,mismatch):function katanaPathLengthPosition(left,right){return left.length===right.length?0:function katanaUnequalPathLengthPosition(left,right){return left.length<right.length?20:10}(left,right)}(left,right)}(katanaDocumentPath(this),katanaDocumentPath(other))},Node.DOCUMENT_POSITION_DISCONNECTED=1,Node.DOCUMENT_POSITION_PRECEDING=2,Node.DOCUMENT_POSITION_FOLLOWING=4,Node.DOCUMENT_POSITION_CONTAINS=8,Node.DOCUMENT_POSITION_CONTAINED_BY=16;const KATANA_HIDDEN_LAYOUT_TAGS=new Set(["style","script","defs","marker","lineargradient","radialgradient","stop","filter","fedropshadow","clippath","mask","pattern"]);function katanaOwnText(node){return String(node?._textContent??"")}function katanaTextContent(node){return node?`${katanaOwnText(node)}${function katanaTextContentChildren(node){return(node.children??[]).map(child=>katanaTextContent(child)).join("")}(node)}`:""}function katanaLayoutTextContent(node){return katanaIsHiddenLayoutNode(node)?"":`${katanaOwnText(node)}${function katanaLayoutTextChildren(node){return(node.children??[]).map(child=>katanaLayoutTextContent(child)).join("")}(node)}`}function katanaIsHiddenLayoutNode(node){return[!node,KATANA_HIDDEN_LAYOUT_TAGS.has(node?.localName)].includes(!0)}function katanaNodeValue(value){return value instanceof KatanaNode?value:document.createTextNode(function katanaStringValue(value){return String(value??"")}(value))}function katanaNumberAttr(node,name){return function katanaNullableNumber(rawValue){return function katanaHasNumberValue(rawValue){return![null,void 0,""].includes(rawValue)}(rawValue)?function katanaFiniteNumber(value){return Number.isFinite(value)?value:null}(Number(rawValue)):null}(node?.getAttribute?.(name))}function katanaBox(x,y,width,height){return{x:x,y:y,width:width,height:height,w:width,h:height}}function katanaUnionBox(boxes){if(0===boxes.length)return katanaBox(0,0,0,0);const minX=Math.min(...boxes.map(box=>box.x)),minY=Math.min(...boxes.map(box=>box.y));return katanaBox(minX,minY,Math.max(...boxes.map(box=>box.x+box.width))-minX,Math.max(...boxes.map(box=>box.y+box.height))-minY)}function katanaVisibleChildBoxes(node){return(node.children??[]).filter(child=>!KATANA_HIDDEN_LAYOUT_TAGS.has(child.localName)).map(child=>{const box=child.getBBox(),offset=function katanaNodeTranslate(node){const match=function katanaTransformValue(node){return String(node?.getAttribute?.("transform")??"")}(node).match(/translate\\(([-\\d.]+)[,\\s]+([-\\d.]+)\\)/);return match?[Number(match[1]),Number(match[2])]:[0,0]}(child);return katanaBox(box.x+offset[0],box.y+offset[1],box.width,box.height)})}function katanaExplicitMeasuredBox(node){const attrs=function katanaBoxAttributes(node){return{x:katanaNumberAttrOrDefault(node,"x",0),y:katanaNumberAttrOrDefault(node,"y",0),width:katanaNumberAttrOrDefault(node,"width",0),height:katanaNumberAttrOrDefault(node,"height",0)}}(node);return[attrs.width>0,attrs.height>0].includes(!0)?katanaBox(attrs.x,attrs.y,attrs.width,attrs.height):null}function katanaNumberAttrOrDefault(node,name,fallback){const value=katanaNumberAttr(node,name);return null===value?fallback:value}function katanaMeasuredNodeText(node,childBox){return katanaOwnText(node)||function katanaFallbackLayoutText(node,childBox){return 0===childBox.width?katanaLayoutTextContent(node):""}(node,childBox)}function katanaLineBox(node){return"line"!==node.localName?null:function katanaLineShapeBox(node){const x1=katanaNumberAttrOrDefault(node,"x1",0),y1=katanaNumberAttrOrDefault(node,"y1",0),x2=katanaNumberAttrOrDefault(node,"x2",0),y2=katanaNumberAttrOrDefault(node,"y2",0);return katanaBox(Math.min(x1,x2),Math.min(y1,y2),Math.abs(x2-x1),Math.abs(y2-y1))}(node)}function katanaCircleBox(node){return function katanaIsRoundSvgShape(node){return["circle","ellipse"].includes(node.localName)}(node)?function katanaRoundShapeBox(node){const cx=katanaNumberAttrOrDefault(node,"cx",0),cy=katanaNumberAttrOrDefault(node,"cy",0),rx=katanaRoundRadius(node,"rx"),ry=katanaRoundRadius(node,"ry");return katanaBox(cx-rx,cy-ry,2*rx,2*ry)}(node):null}function katanaRoundRadius(node,name){return katanaNumberAttr(node,name)??katanaNumberAttrOrDefault(node,"r",0)}const KATANA_DEFAULT_CLIENT_TAGS=new Set(["body","div","main","pre","section","article"]);function katanaExplicitClientWidth(node){return katanaCssLength(node.style?.getPropertyValue?.("width"))??katanaNumberAttr(node,"width")}function katanaExplicitClientHeight(node){return katanaCssLength(node.style?.getPropertyValue?.("height"))??katanaNumberAttr(node,"height")}function katanaDefaultViewportWidth(){return Number(globalThis.innerWidth??globalThis.screen?.width??800)}function katanaDefaultViewportHeight(){return Number(globalThis.innerHeight??globalThis.screen?.height??600)}function katanaNeedsDefaultClientBox(node){return[KATANA_DEFAULT_CLIENT_TAGS.has(node.localName),katanaHasSvgChild(node)].includes(!0)}function katanaCssLength(value){return value?function katanaFiniteCssLength(value){const number=Number(String(value).replace("px",""));return Number.isFinite(number)?number:null}(value):null}function katanaHasSvgChild(node){return(node.children??[]).some(child=>"svg"===child.localName)}function katanaNodeChildren(node){return node.children??[]}function katanaInnerText(node){return node?"br"===node.localName?"\\n":katanaIsHiddenLayoutNode(node)?"":`${katanaOwnText(node)}${katanaNodeChildren(node).map(katanaInnerText).join("")}`:""}function katanaElementClientBox(node){return function katanaMeasuredClientBox(node){const context=function katanaClientBoxContext(node){return{node:node,box:node.getBBox(),explicitWidth:katanaExplicitClientWidth(node),explicitHeight:katanaExplicitClientHeight(node)}}(node);return function katanaDefaultExplicitZeroBox(context){return[katanaNeedsDefaultClientBox(context.node),0===context.explicitWidth].every(Boolean)?katanaBox(0,0,katanaDefaultViewportWidth(),function katanaPositiveOrDefault(value,fallback){return value>0?value:fallback}(context.explicitHeight,katanaDefaultViewportHeight())):null}(context)??function katanaExplicitClientBox(context){return function katanaHasExplicitClientSize(context){return[null!==context.explicitWidth,null!==context.explicitHeight].includes(!0)}(context)?function katanaResolvedExplicitClientBox(context){return katanaBox(context.box.x,context.box.y,function katanaExplicitWidthValue(context){return context.explicitWidth??context.box.width}(context),function katanaExplicitHeightValue(context){return context.explicitHeight??context.box.height}(context))}(context):null}(context)??function katanaSvgClientBox(context){return"svg"===context.node.localName?function katanaSvgViewBoxClientBox(context){const viewBox=function katanaViewBoxSize(value){const values=function katanaViewBoxValues(value){return String(value??"").split(/\\s+/).map(it=>Number(it))}(value);return function katanaIsValidViewBox(values){return[4===values.length,values.every(it=>Number.isFinite(it))].every(Boolean)}(values)?[values[2],values[3]]:null}(context.node.getAttribute("viewBox"));return katanaBox(context.box.x,context.box.y,function katanaViewBoxWidth(context,viewBox){return viewBox?.[0]??Math.max(context.box.width,katanaDefaultViewportWidth())}(context,viewBox),function katanaViewBoxHeight(context,viewBox){return viewBox?.[1]??Math.max(context.box.height,katanaDefaultViewportHeight())}(context,viewBox))}(context):null}(context)??function katanaEmptyDefaultClientBox(context){return[katanaNeedsDefaultClientBox(context.node),(box=context.box,[0===box.width,0===box.height].every(Boolean))].every(Boolean)?katanaBox(0,0,katanaDefaultViewportWidth(),katanaDefaultViewportHeight()):null;var box}(context)??context.box}(node)}function katanaCssComputedStyleValue(node,name){return node?function katanaCssRuleValue(cssText,node,name){return Array.from(cssText.matchAll(/([^{}]+)\\{([^{}]+)\\}/g)).map(rule=>function katanaCssRuleDeclarationValue(rule,node,name){return[rule].filter(it=>function katanaCssRuleMatchesNode(selectorText,node){return selectorText.split(",").some(selector=>function katanaCssSelectorMatchesNode(node,selector){const parts=String(selector).trim().split(/\\s+/).filter(Boolean);return 0!==parts.length&&katanaCssSelectorTailMatches(node,parts,parts.length-1)}(node,selector))}(it[1],node)).map(it=>function katanaCssDeclarationValue(declarations,name){return String(declarations).split(";").map(declaration=>function katanaCssDeclarationEntry(declaration){const parts=String(declaration).split(":");return{name:String(parts.shift()??"").trim(),value:parts.join(":").trim()}}(declaration)).find(entry=>entry.name===name)?.value??""}(it[2],name))[0]??""}(rule,node,name)).filter(Boolean).at(-1)??""}(function katanaCssText(node){const root=function katanaCssRoot(node){return katanaCssRootNode(node)||document.documentElement}(node);return function katanaCssStyleNodes(root){return function katanaCssDescendantNodes(node){return[node].filter(Boolean).flatMap(katanaCssNodeWithDescendants)}(root).filter(katanaIsCssStyleNode)}(root).map(styleNode=>styleNode.textContent).join("\\n")}(node),node,name):""}function katanaCssRootNode(node){return KATANA_CSS_ROOT_READERS[Number(Boolean(katanaCssParentNode(node)))](node)}function katanaCssParentNode(node){return node?.parentNode||null}function katanaCssNodeWithDescendants(node){return[node].concat(Array.from(node.children||[]).flatMap(katanaCssNodeWithDescendants))}function katanaIsCssStyleNode(node){return"style"===node.localName}Object.defineProperty(KatanaNode.prototype,"textContent",{get(){return katanaTextContent(this)},set(value){this._textContent=String(value??""),this.children=[],this.childNodes=this.children}}),Object.defineProperty(KatanaNode.prototype,"innerText",{get(){return katanaInnerText(this)},set(value){this.textContent=value}}),Object.defineProperty(KatanaNode.prototype,"nodeValue",{get(){return 3===this.nodeType?this.textContent:null},set(value){3===this.nodeType&&(this.textContent=value)}}),KatanaNode.prototype.append=function append(...values){for(const value of values)this.appendChild(katanaNodeValue(value))},KatanaNode.prototype.prepend=function prepend(...values){for(const value of values.reverse())this.insertBefore(katanaNodeValue(value),this.firstChild)},KatanaNode.prototype.replaceChildren=function replaceChildren(...values){this.children=[],this.childNodes=this.children,this.append(...values)},KatanaNode.prototype.contains=function contains(candidate){return this===candidate||katanaNodeChildren(this).some(child=>child.contains(candidate))},KatanaNode.prototype.text=function text(...values){return 0===values.length?this.textContent:(this.textContent=values[0],this)},KatanaNode.prototype.getBBox=function getBBox(){return function katanaMeasuredBox(node){return KATANA_HIDDEN_LAYOUT_TAGS.has(node.localName)?katanaBox(0,0,0,0):function katanaVisibleMeasuredBox(node){return katanaExplicitMeasuredBox(node)??function katanaDirectShapeBox(node){return katanaLineBox(node)??katanaCircleBox(node)}(node)??function katanaChildTextMeasuredBox(node){const childBox=katanaUnionBox(katanaVisibleChildBoxes(node)),text=katanaMeasuredNodeText(node,childBox);return katanaBox(0,0,function katanaMeasuredTextWidth(text,childBox){return Math.max(16,function katanaTextWidthFallback(text){return 0===text.length?0:Math.max(16,katanaTextWidth(text))}(text),childBox.width)}(text,childBox),function katanaMeasuredTextHeight(text,childBox){return Math.max(24,function katanaTextHeightFallback(text){return 0===text.length?0:24}(text),childBox.height)}(text,childBox))}(node)}(node)}(this)},KatanaNode.prototype.getBoundingClientRect=function getBoundingClientRect(){const box=katanaElementClientBox(this);return{...box,top:box.y,left:box.x,right:box.x+box.width,bottom:box.y+box.height}},KatanaNode.prototype.getComputedTextLength=function getComputedTextLength(){if("block"===globalThis.__katanaMermaidDiagramType){const text=katanaTextContent(this);if(/^\\u00a0+$/.test(text))return Math.max(16,8*text.replace(/\\u00a0/g," ").length)}return Math.max(16,8*katanaTextContent(this).length)},KatanaNode.prototype.getScreenCTM=function getScreenCTM(){return{a:1,b:0,c:0,d:1,e:0,f:0,inverse:()=>this.getScreenCTM()}},KatanaNode.prototype.createSVGPoint=function createSVGPoint(){return{x:0,y:0,matrixTransform(){return{x:this.x,y:this.y}}}},Object.defineProperties(KatanaNode.prototype,{clientWidth:{get(){return Math.ceil(katanaElementClientBox(this).width)}},clientHeight:{get(){return Math.ceil(katanaElementClientBox(this).height)}},offsetWidth:{get(){return Math.ceil(katanaElementClientBox(this).width)}},offsetHeight:{get(){return Math.ceil(katanaElementClientBox(this).height)}},scrollWidth:{get(){return Math.ceil(katanaElementClientBox(this).width)}},scrollHeight:{get(){return Math.ceil(katanaElementClientBox(this).height)}}});const KATANA_CSS_ROOT_READERS=[node=>node,node=>katanaCssRootNode(katanaCssParentNode(node))];function katanaCssSelectorTailMatches(node,parts,index){return!(!node||!function katanaCssSimpleSelectorMatches(node,selector){const normalized=function katanaCssSimpleSelector(selector){return String(selector).trim().replace(/:{1,2}(?!root\\b)[a-zA-Z-]+(?:\\([^)]*\\))?/g,"")}(selector);return"*"===normalized||(":root"===normalized?node===document.documentElement:[katanaCssSelectorTagMatches(node,normalized),katanaCssSelectorIdMatches(node,normalized),katanaCssSelectorClassesMatch(node,normalized),katanaCssSelectorAttributesMatch(node,normalized)].every(Boolean))}(node,parts[index]))&&(0===index||katanaCssAncestorMatches(node.parentNode,parts,index-1))}function katanaCssAncestorMatches(node,parts,index){return!!node&&(!!katanaCssSelectorTailMatches(node,parts,index)||katanaCssAncestorMatches(node.parentNode,parts,index))}function katanaCssSelectorTagMatches(node,selector){const tag=selector.match(/^[a-zA-Z][a-zA-Z0-9:_-]*/)?.[0];return!tag||node.localName===tag.toLowerCase()}function katanaCssSelectorIdMatches(node,selector){const id=selector.match(/#([a-zA-Z0-9_-]+)/)?.[1];return!id||node.id===id}function katanaCssSelectorClassesMatch(node,selector){const classNames=String(node.className??"").split(/\\s+/).filter(Boolean);return Array.from(selector.matchAll(/\\.([a-zA-Z0-9_-]+)/g)).map(match=>match[1]).every(className=>classNames.includes(className))}function katanaCssSelectorAttributesMatch(node,selector){return Array.from(selector.matchAll(/\\[([a-zA-Z0-9:_-]+)(?:="([^"]*)")?\\]/g)).map(match=>function katanaCssSelectorAttributeMatches(node,name,value){const actual=node.getAttribute?.(name);return void 0===value?null!==actual:actual===value}(node,match[1],match[2])).every(Boolean)}function katanaComputedFontSize(node){return katanaComputedStyleValue(node,"font-size")||"16px"}function katanaComputedFontFamily(node){return katanaComputedStyleValue(node,"font-family")||"trebuchet ms, verdana, arial, sans-serif"}function katanaComputedStyleValue(node,name){return[katanaRawComputedStyleValue(node,name),katanaCssComputedStyleValue(node,name)].filter(Boolean).concat([katanaDefaultComputedStyleValue(name)])[0]??""}function katanaRawComputedStyleValue(node,name){return node?.style?.getPropertyValue?.(name)??""}function katanaDefaultComputedStyleValue(name){return/^(padding|margin|border).*/.test(name)?"0px":""}function katanaOptionalTextBox(node,text){return text?katanaAnchoredTextNodeBox(node,text,0,0):katanaBox(0,0,0,0)}function katanaHasArea(box){return[box.width>0,box.height>0].includes(!0)}function katanaOptionalNumberListBox(value){return value?function katanaNumberListBox(value){const numbers=Array.from(String(value).matchAll(/-?\\d+(?:\\.\\d+)?(?:e-?\\d+)?/gi)).map(match=>Number(match[0]));if(numbers.length<2)return null;const xs=numbers.filter((_value,index)=>index%2==0),ys=numbers.filter((_value,index)=>index%2==1);return katanaBox(Math.min(...xs),Math.min(...ys),Math.max(...xs)-Math.min(...xs),Math.max(...ys)-Math.min(...ys))}(value):null}function katanaLineValueOrDefault(value,fallback){return value??fallback}function katanaTextLines(node){return function katanaTextTspans(node){return function katanaDescendantElements(node,tagName){return Array.from(node.children).flatMap(child=>katanaDescendantElement(child,tagName))}(node,"tspan").filter(child=>katanaTextContent(child).length>0).filter(child=>!function katanaHasTextTspanAncestor(child,root){return function katanaTextTspanAncestors(child,root){return katanaTextTspanAncestorList(child.parentNode,root)}(child,root).some(katanaIsFilledTextTspan)}(child,node))}(node).reduce(katanaAppendTextLine,{lines:[],current:null}).lines}function katanaTextTspanAncestorList(node,root){return KATANA_TEXT_TSPAN_ANCESTOR_READERS[Number(function katanaHasTextAncestorNode(node,root){return Boolean(node)&&node!==root}(node,root))](node,root)}function katanaIsFilledTextTspan(node){return["tspan"===node.localName,katanaTextContent(node).length>0].every(Boolean)}function katanaAppendTextLine(state,tspan,index){const next=function katanaTextLineState(state,tspan,index){return KATANA_TEXT_LINE_STATE_READERS[Number(function katanaStartsTextLine(tspan,index){return[0===index,tspan.hasAttribute("x"),Math.abs(katanaSvgTextLengthAttr(tspan,"dy")??0)>=1].includes(!0)}(tspan,index))](state,tspan)}(state,tspan,index);return next.current.text+=katanaTextContent(tspan),next}function katanaTspanLineY(tspan){const values=[katanaSvgTextLengthAttr(tspan,"y"),katanaSvgTextLengthAttr(tspan,"dy")];return KATANA_TSPAN_LINE_Y_READERS[Number(values.some(katanaIsSvgTextLengthValue))](values)}function katanaIsSvgTextLengthValue(value){return null!==value}function katanaSvgTextLengthAttr(node,name){return[String(node.getAttribute?.(name)??"")].filter(Boolean).map(raw=>function katanaSvgTextLengthValue(node,raw){return[raw.match(/^(-?\\d+(?:\\.\\d+)?)([a-z%]*)$/i)].filter(Boolean).map(match=>function katanaSvgTextLengthMatchValue(node,match){return[Number(match[1])].filter(Number.isFinite).map(value=>function katanaSvgTextLengthPixels(node,value,unit){return(KATANA_SVG_TEXT_LENGTH_UNITS[unit]??KATANA_SVG_TEXT_LENGTH_UNITS.px)(node,value)}(node,value,match[2])).concat([null])[0]}(node,match)).concat([null])[0]}(node,raw)).concat([null])[0]}function katanaDescendantElement(child,tagName){return[katanaMatchingDescendantElement(child,tagName)].filter(Boolean).concat(Array.from(child.children).flatMap(node=>katanaDescendantElement(node,tagName)))}function katanaMatchingDescendantElement(child,tagName){return[child].filter(node=>node.localName===tagName)[0]??null}globalThis.getComputedStyle=node=>function katanaComputedStyle(node){const box=function katanaComputedStyleBox(node){return node?katanaElementClientBox(node):katanaBox(0,0,0,0)}(node);return{width:`${box.width}px`,height:`${box.height}px`,display:"block",fontSize:katanaComputedFontSize(node),fontFamily:katanaComputedFontFamily(node),getPropertyValue(name){return function katanaComputedPropertyValue(node,style,name){return katanaComputedStyleValue(node,name)||style[name]||""}(node,this,name)}}}(node),KatanaNode.prototype.getBBox=function getBBox(){return function katanaMeasuredBoxAccurate(node){return KATANA_HIDDEN_LAYOUT_TAGS.has(node.localName)?katanaBox(0,0,0,0):function katanaVisibleMeasuredBoxAccurate(node){return function katanaTextElementMeasuredBox(node){return"text"===node.localName?function katanaTextElementBox(node){const lines=katanaTextLines(node),text=function katanaTextElementText(node,lines){return 0===lines.length?katanaTextContent(node):lines.map(line=>line.text).join("")}(node,lines);return text?katanaUnionBox(function katanaTextLineValues(node,text,lines){return 0===lines.length?[{text:text,x:katanaNumberAttr(node,"x"),y:katanaNumberAttr(node,"y")}]:lines}(node,text,lines).map((line,index)=>function katanaTextLineBox(node,line,index){const x=katanaLineValueOrDefault(line.x,katanaNumberAttrOrDefault(node,"x",0)),y=katanaLineValueOrDefault(line.y,function katanaTextLineFallbackY(node,index){return(katanaNumberAttr(node,"y")??0)+index*katanaLineHeight(node)}(node,index));return katanaAnchoredTextNodeBox(node,line.text,x,y)}(node,line,index))):katanaBox(0,0,0,0)}(node):null}(node)??function katanaTextFragmentMeasuredBox(node){return["tspan","#text"].includes(node.localName)?function katanaTextFragmentBox(node){const text=function katanaFragmentText(node){return[katanaOwnText(node),katanaTextContent(node)].find(Boolean)??""}(node);return text?katanaAnchoredTextNodeBox(function katanaTextFragmentParent(node){return node.parentNode??node}(node),text,katanaNumberAttrOrDefault(node,"x",0),katanaNumberAttrOrDefault(node,"y",0)):katanaBox(0,0,0,0)}(node):null}(node)??katanaExplicitMeasuredBox(node)??function katanaDirectMeasuredBox(node){return katanaLineBox(node)??katanaCircleBox(node)??function katanaPathBox(node){return function katanaSvgPathBox(node){return"path"===node.localName?katanaOptionalNumberListBox(node.getAttribute("d")):null}(node)??function katanaSvgPointsBox(node){return["polygon","polyline"].includes(node.localName)?katanaOptionalNumberListBox(node.getAttribute("points")):null}(node)}(node)}(node)??function katanaChildTextBox(node){const childBox=katanaUnionBox(katanaVisibleChildBoxes(node));return katanaUnionBox([childBox,katanaOptionalTextBox(node,katanaMeasuredNodeText(node,childBox))].filter(katanaHasArea))}(node)}(node)}(this)};const KATANA_TEXT_TSPAN_ANCESTOR_READERS=[()=>[],(node,root)=>[node].concat(katanaTextTspanAncestorList(node.parentNode,root))],KATANA_TEXT_LINE_STATE_READERS=[state=>state,(state,tspan)=>function katanaStartTextLine(state,tspan){const line={text:"",x:katanaNumberAttr(tspan,"x"),y:katanaTspanLineY(tspan)};return{lines:[...state.lines,line],current:line}}(state,tspan)];function katanaOptionalSvgTextLength(value){return[value].filter(katanaIsSvgTextLengthValue).concat([0])[0]}const KATANA_TSPAN_LINE_Y_READERS=[()=>null,values=>function katanaSumTspanLineY(values){return katanaOptionalSvgTextLength(values[0])+katanaOptionalSvgTextLength(values[1])}(values)],KATANA_SVG_TEXT_LENGTH_UNITS={em:(node,value)=>value*katanaFiniteFontSize(Number(String(katanaLineHeightFontSize(node)).replace("px",""))),px:(_node,value)=>value},KATANA_ASCII_KERNING_PAIRS={\'"T\':-2.805,"n\'":-.993,"\'t":-.985,"\'w":-.984,"<<":.781,">>":.781,"E]":-2.117,"M]":-2.118,"P]":-2.125,Pa:-.75,Pe:-.743,Ph:-.742,Po:-.742,Pr:-.75,Re:-.649,Ro:-.649,Ta:-1.992,Te:-1.985,Ti:-.665,To:-1.984,Tu:-2.062,Tw:-2.211,Ty:-1.836,Ve:-1.031,Wa:-.883,We:-.735,Ye:-1.68,Yo:-1.836,"e\'":-.993,"e,":-2.118,"e?":-2.118,"k,":-2.117,"n,":-2.117,"p;":-2.117,\'s"\':-2.805,"s,":-2.118,"t!":-2.125,"u!":-2.117,"u?":-2.117,"v.":-2.149,"y?":-2.125,"y]":-2.125},KATANA_ASCII_TEXT_WIDTHS={" ":4.82,"\'":3.547,$:8.391,"(":5.875,")":5.875,"-":5.875,".":5.875,":":5.875,0:8.391,1:8.391,2:8.391,3:8.391,4:8.391,5:8.391,6:8.391,7:8.391,8:8.391,9:8.391,A:9.438,B:9.055,C:9.57,D:9.813,E:8.57,F:8.398,G:10.82,H:10.469,I:4.453,J:7.625,K:9.211,L:8.102,M:11.352,N:10.211,O:10.781,P:8.922,Q:10.813,R:9.313,S:7.695,T:9.289,U:10.375,V:9.398,W:13.633,X:8.906,Y:9.125,Z:8.805,_:8.391,a:8.406,b:8.914,c:7.922,d:8.914,e:8.727,f:5.914,g:8.031,h:8.742,i:4.563,j:5.867,k:8.07,l:4.719,m:13.281,n:8.742,o:8.586,p:8.914,q:8.914,r:6.219,s:6.477,t:6.344,u:8.742,v:7.836,w:11.906,x:8.016,y:7.891,z:7.594};function katanaAnchoredTextNodeBox(node,text,x,y){const width=Math.max(1,katanaTextNodeWidth(node,text)),height=katanaLineHeight(node);return katanaBox(function katanaAnchoredTextLeft(anchor,x,width){return(KATANA_TEXT_ANCHORS[anchor]??KATANA_TEXT_ANCHORS.start)(x,width)}(function katanaTextAnchor(node){return String(function katanaTextAnchorValues(node){return[node.getAttribute?.("text-anchor"),node.style?.getPropertyValue?.("text-anchor"),katanaCssComputedStyleValue(node,"text-anchor"),node.parentNode?.getAttribute?.("text-anchor"),katanaCssComputedStyleValue(node.parentNode,"text-anchor")]}(node).find(Boolean)??"start")}(node),x,width),y-height*function katanaTextBoxBaselineRatio(){return KATANA_TEXT_BOX_BASELINE_RATIOS[Number(katanaIsRequirementDiagram())]()}(),width,height)}const KATANA_TEXT_ANCHORS={end:(x,width)=>x-width,middle:(x,width)=>x-width/2,start:x=>x};function katanaLineHeight(node){return function katanaBrowserTextBoxHeight(fontSize){const measured=KATANA_TEXT_BOX_HEIGHTS[String(fontSize)];return measured||Math.max(12,Math.ceil(1.15*fontSize))}(katanaFiniteFontSize(Number(String(katanaLineHeightFontSize(node)).replace("px",""))))}const KATANA_TEXT_BOX_HEIGHTS={10:11,11:12.25,12:14,14:16,16:19,18:21,20:23};function katanaLineHeightFontSize(node){return function katanaLineHeightFontSizeValues(node){return[node.style?.getPropertyValue?.("font-size"),katanaCssComputedStyleValue(node,"font-size"),node.getAttribute?.("font-size"),node.parentNode?.style?.getPropertyValue?.("font-size"),katanaCssComputedStyleValue(node.parentNode,"font-size"),node.parentNode?.getAttribute?.("font-size")]}(node).find(Boolean)??"16"}function katanaFiniteFontSize(fontSize){return Number.isFinite(fontSize)?fontSize:16}function katanaTextNodeWidth(node,text){return katanaTextWidth(text)*function katanaTextWidthScale(node){return katanaFiniteFontSize(Number(String(katanaLineHeightFontSize(node)).replace("px","")))/16*function katanaTextWeightScale(node){return KATANA_TEXT_WEIGHT_SCALES[Number([katanaIsRequirementDiagram(),katanaHasBoldTextWeight(node)].every(Boolean))]()}(node)}(node)}function katanaHasBoldTextWeight(node){return function katanaTextWeightValues(node){return[node.style?.getPropertyValue?.("font-weight"),katanaCssComputedStyleValue(node,"font-weight"),node.getAttribute?.("font-weight"),node.parentNode?.style?.getPropertyValue?.("font-weight"),katanaCssComputedStyleValue(node.parentNode,"font-weight"),node.parentNode?.getAttribute?.("font-weight")]}(node).some(katanaIsBoldTextWeight)}function katanaIsBoldTextWeight(value){const normalized=String(value??"").trim().toLowerCase();return"bold"===normalized||Number(normalized)>=600}function katanaTextWidth(text){const chars=Array.from(katanaMeasuredTextValue(text));return chars.map(char=>function katanaCharacterWidth(char){return KATANA_CHARACTER_WIDTHS[Number(char.charCodeAt(0)>255)](char)}(char)).reduce((width,charWidth)=>width+charWidth,0)+function katanaTextKerningWidth(chars){return chars.slice(0,-1).map((char,index)=>function katanaKerningPairWidth(left,right){return KATANA_KERNING_PAIR_WIDTH_READERS[Number(function katanaHasWideKerningChar(left,right){return[left,right].some(katanaIsWideTextChar)}(left,right))](left,right)}(char,chars[index+1])).reduce((width,pairWidth)=>width+pairWidth,0)}(chars)}function katanaMeasuredTextValue(text){return"block"===globalThis.__katanaMermaidDiagramType?String(text):String(text).replace(/&(?:amp;)?nbsp;| /g," ")}function katanaIsWideTextChar(char){return char.charCodeAt(0)>255}const KATANA_WIDE_CHARACTER_WIDTHS=[function katanaDefaultWideCharacterWidth(char){return function katanaIsWidePunctuation(char){return["。","、"].includes(char)}(char)?20:KATANA_DEFAULT_WIDE_CHARACTER_WIDTHS[Number(function katanaIsCjkIdeograph(char){const codePoint=function katanaCharacterCodePoint(char){return char.codePointAt(0)??0}(char);return KATANA_CJK_IDEOGRAPH_RULES.every(rule=>rule(codePoint))}(char))]()},()=>12.5],KATANA_DEFAULT_WIDE_CHARACTER_WIDTHS=[()=>15.8,()=>16.3],KATANA_CJK_IDEOGRAPH_RULES=[function katanaIsCjkIdeographStart(codePoint){return codePoint>=19968},function katanaIsCjkIdeographEnd(codePoint){return codePoint<=40959}],KATANA_CHARACTER_WIDTHS=[function katanaAsciiCharacterWidth(char){return 160===char.charCodeAt(0)?KATANA_ASCII_TEXT_WIDTHS[" "]:[KATANA_ASCII_TEXT_WIDTHS[char]].filter(Boolean).concat([8])[0]},function katanaWideCharacterWidth(char){return KATANA_WIDE_CHARACTER_WIDTHS[Number("kanban"===globalThis.__katanaMermaidDiagramType)](char)}],KATANA_KERNING_PAIR_WIDTH_READERS=[(left,right)=>KATANA_ASCII_KERNING_PAIRS[`${left}${right}`]??0,()=>0],KATANA_TEXT_WEIGHT_SCALES=[()=>1,()=>1.055],KATANA_TEXT_BOX_BASELINE_RATIOS=[()=>.8,()=>.8421052631578947];function katanaIsRequirementDiagram(){return["requirement","requirementdiagram"].includes(globalThis.__katanaMermaidDiagramType)}KatanaNode.prototype.getComputedTextLength=function getComputedTextLength(){const lines=function katanaComputedTextLines(node){return"text"===node.localName?katanaTextLines(node).map(line=>line.text):[katanaTextContent(node)]}(this);return Math.max(1,...lines.map(line=>katanaTextNodeWidth(this,line)))},globalThis.katanaRunZenumlRuntime=function katanaRunZenumlRuntime(source,isDark){const stripped=String(source).replace(/^zenuml[^\\n]*\\n?/,"");let svg=zenuml.renderToSvg(stripped).svg;if(isDark){const darkStyle=\'<style>.frame-border-outer{fill:#4a5170}.frame-border-inner{fill:#111628}.frame-header-bg{fill:#1d2240}.frame-header-line{stroke:#cecfd2}.frame-title{fill:#cecfd2}.participant-box{fill:#5964f2;stroke:#cecfd2}.participant-label{fill:#cecfd2}.participant-icon{color:#cecfd2}.participant-icon [fill="currentColor"]:not([stroke]){stroke:#cecfd2}.lifeline{stroke:#cecfd2}.message-line{stroke:#536fff}.message-label{fill:#cecfd2}.arrow-head{fill:#536fff;stroke:#536fff}.occurrence{fill:#5964f2;stroke:#cecfd2}.fragment-border{stroke:#cecfd2}.fragment-header{fill:#5964f2}.fragment-label{fill:#cecfd2}.fragment-condition{fill:#cecfd2}.fragment-separator{stroke:#cecfd2}.fragment-section-label{fill:#cecfd2}.return-line{stroke:#536fff}.return-arrow{stroke:#536fff}.return-label{fill:#cecfd2}.return-icon{fill:#cecfd2}.divider-line{stroke:#536fff}.divider-bg{fill:#1d2240;stroke:#536fff}.divider-label{fill:#cecfd2}.comment-text{fill:#cecfd2}.seq-number{fill:#8890b0}.group-outline{stroke:#cecfd2}.group-title-bg{fill:#111628}.group-title-text{fill:#cecfd2}</style>\';svg=svg.replace("</svg>",darkStyle+"</svg>")}return svg},function katanaInstallMermaidZenumlRuntimeAdapter(){const zenumlDiagram=globalThis["mermaid-zenuml"];zenumlDiagram&&(globalThis.__katanaMermaidZenuml=zenumlDiagram)}();');