1957 lines
3.3 MiB
1957 lines
3.3 MiB
var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});import sourceMapSupport from"source-map-support";import path12 from"path";import chalk from"chalk";import pretty from"pretty-time";var PerfTimer=class{static{__name(this,"PerfTimer")}evts;constructor(){this.evts={},this.addEvent("start")}addEvent(evtName){this.evts[evtName]=process.hrtime()}timeSince(evtName){return chalk.yellow(pretty(process.hrtime(this.evts[evtName??"start"])))}};import{rimraf}from"rimraf";import{isGitIgnored}from"globby";import chalk6 from"chalk";import esbuild from"esbuild";import remarkParse from"remark-parse";import remarkRehype from"remark-rehype";import{unified}from"unified";import{read}from"to-vfile";import{slug as slugAnchor}from"github-slugger";import rfdc from"rfdc";var clone=rfdc(),QUARTZ="quartz";function isRelativeURL(s){let validStart=/^\.{1,2}/.test(s),validEnding=!endsWith(s,"index");return validStart&&validEnding&&![".md",".html"].includes(_getFileExtension(s)??"")}__name(isRelativeURL,"isRelativeURL");function sluggify(s){return s.split("/").map(segment=>segment.replace(/\s/g,"-").replace(/&/g,"-and-").replace(/%/g,"-percent").replace(/\?/g,"").replace(/#/g,"")).join("/").replace(/\/$/,"")}__name(sluggify,"sluggify");function slugifyFilePath(fp,excludeExt){fp=stripSlashes(fp);let ext=_getFileExtension(fp),withoutFileExt=fp.replace(new RegExp(ext+"$"),"");(excludeExt||[".md",".html",void 0].includes(ext))&&(ext="");let slug=sluggify(withoutFileExt);return endsWith(slug,"_index")&&(slug=slug.replace(/_index$/,"index")),slug+ext}__name(slugifyFilePath,"slugifyFilePath");function simplifySlug(fp){let res=stripSlashes(trimSuffix(fp,"index"),!0);return res.length===0?"/":res}__name(simplifySlug,"simplifySlug");function transformInternalLink(link){let[fplike,anchor]=splitAnchor(decodeURI(link)),folderPath=isFolderPath(fplike),segments=fplike.split("/").filter(x=>x.length>0),prefix=segments.filter(isRelativeSegment).join("/"),fp=segments.filter(seg=>!isRelativeSegment(seg)&&seg!=="").join("/"),simpleSlug=simplifySlug(slugifyFilePath(fp)),joined=joinSegments(stripSlashes(prefix),stripSlashes(simpleSlug)),trail=folderPath?"/":"";return _addRelativeToStart(joined)+trail+anchor}__name(transformInternalLink,"transformInternalLink");var _rebaseHastElement=__name((el,attr,curBase,newBase)=>{if(el.properties?.[attr]){if(!isRelativeURL(String(el.properties[attr])))return;let rel=joinSegments(resolveRelative(curBase,newBase),"..",el.properties[attr]);el.properties[attr]=rel}},"_rebaseHastElement");function normalizeHastElement(rawEl,curBase,newBase){let el=clone(rawEl);return _rebaseHastElement(el,"src",curBase,newBase),_rebaseHastElement(el,"href",curBase,newBase),el.children&&(el.children=el.children.map(child=>normalizeHastElement(child,curBase,newBase))),el}__name(normalizeHastElement,"normalizeHastElement");function pathToRoot(slug){let rootPath=slug.split("/").filter(x=>x!=="").slice(0,-1).map(_=>"..").join("/");return rootPath.length===0&&(rootPath="."),rootPath}__name(pathToRoot,"pathToRoot");function resolveRelative(current,target){return joinSegments(pathToRoot(current),simplifySlug(target))}__name(resolveRelative,"resolveRelative");function splitAnchor(link){let[fp,anchor]=link.split("#",2);return fp.endsWith(".pdf")?[fp,anchor===void 0?"":`#${anchor}`]:(anchor=anchor===void 0?"":"#"+slugAnchor(anchor),[fp,anchor])}__name(splitAnchor,"splitAnchor");function slugTag(tag){return tag.split("/").map(tagSegment=>sluggify(tagSegment)).join("/")}__name(slugTag,"slugTag");function joinSegments(...args){return args.filter(segment=>segment!=="").join("/").replace(/\/\/+/g,"/")}__name(joinSegments,"joinSegments");function getAllSegmentPrefixes(tags){let segments=tags.split("/"),results=[];for(let i=0;i<segments.length;i++)results.push(segments.slice(0,i+1).join("/"));return results}__name(getAllSegmentPrefixes,"getAllSegmentPrefixes");function transformLink(src,target,opts){let targetSlug=transformInternalLink(target);if(opts.strategy==="relative")return targetSlug;{let folderTail=isFolderPath(targetSlug)?"/":"",canonicalSlug=stripSlashes(targetSlug.slice(1)),[targetCanonical,targetAnchor]=splitAnchor(canonicalSlug);if(opts.strategy==="shortest"){let matchingFileNames=opts.allSlugs.filter(slug=>{let fileName=slug.split("/").at(-1);return targetCanonical===fileName});if(matchingFileNames.length===1){let targetSlug2=matchingFileNames[0];return resolveRelative(src,targetSlug2)+targetAnchor}}return joinSegments(pathToRoot(src),canonicalSlug)+folderTail}}__name(transformLink,"transformLink");function isFolderPath(fplike){return fplike.endsWith("/")||endsWith(fplike,"index")||endsWith(fplike,"index.md")||endsWith(fplike,"index.html")}__name(isFolderPath,"isFolderPath");function endsWith(s,suffix){return s===suffix||s.endsWith("/"+suffix)}__name(endsWith,"endsWith");function trimSuffix(s,suffix){return endsWith(s,suffix)&&(s=s.slice(0,-suffix.length)),s}__name(trimSuffix,"trimSuffix");function _getFileExtension(s){return s.match(/\.[A-Za-z0-9]+$/)?.[0]}__name(_getFileExtension,"_getFileExtension");function isRelativeSegment(s){return/^\.{0,2}$/.test(s)}__name(isRelativeSegment,"isRelativeSegment");function stripSlashes(s,onlyStripPrefix){return s.startsWith("/")&&(s=s.substring(1)),!onlyStripPrefix&&s.endsWith("/")&&(s=s.slice(0,-1)),s}__name(stripSlashes,"stripSlashes");function _addRelativeToStart(s){return s===""&&(s="."),s.startsWith(".")||(s=joinSegments(".",s)),s}__name(_addRelativeToStart,"_addRelativeToStart");import path from"path";import workerpool,{Promise as WorkerPromise}from"workerpool";import{Spinner}from"cli-spinner";var QuartzLogger=class{static{__name(this,"QuartzLogger")}verbose;spinner;constructor(verbose){this.verbose=verbose}start(text){this.verbose?console.log(text):(this.spinner=new Spinner(`%s ${text}`),this.spinner.setSpinnerString(18),this.spinner.start())}end(text){this.verbose||this.spinner.stop(!0),text&&console.log(text)}};import chalk2 from"chalk";import process2 from"process";import{isMainThread}from"workerpool";var rootFile=/.*at file:/;function trace(msg,err){let stack=err.stack??"",lines=[];lines.push(""),lines.push(`
|
||
`+chalk2.bgRed.black.bold(" ERROR ")+`
|
||
|
||
`+chalk2.red(` ${msg}`)+(err.message.length>0?`: ${err.message}`:""));let reachedEndOfLegibleTrace=!1;for(let line of stack.split(`
|
||
`).slice(1)){if(reachedEndOfLegibleTrace)break;line.includes("node_modules")||(lines.push(` ${line}`),rootFile.test(line)&&(reachedEndOfLegibleTrace=!0))}let traceMsg=lines.join(`
|
||
`);if(isMainThread)console.error(traceMsg),process2.exit(1);else throw new Error(traceMsg)}__name(trace,"trace");function createProcessor(ctx){let transformers=ctx.cfg.plugins.transformers;return unified().use(remarkParse).use(transformers.filter(p=>p.markdownPlugins).flatMap(plugin=>plugin.markdownPlugins(ctx))).use(remarkRehype,{allowDangerousHtml:!0}).use(transformers.filter(p=>p.htmlPlugins).flatMap(plugin=>plugin.htmlPlugins(ctx)))}__name(createProcessor,"createProcessor");function*chunks(arr,n){for(let i=0;i<arr.length;i+=n)yield arr.slice(i,i+n)}__name(chunks,"chunks");async function transpileWorkerScript(){return esbuild.build({entryPoints:["./quartz/worker.ts"],outfile:path.join(QUARTZ,"./.quartz-cache/transpiled-worker.mjs"),bundle:!0,keepNames:!0,platform:"node",format:"esm",packages:"external",sourcemap:!0,sourcesContent:!1,plugins:[{name:"css-and-scripts-as-text",setup(build){build.onLoad({filter:/\.scss$/},_=>({contents:"",loader:"text"})),build.onLoad({filter:/\.inline\.(ts|js)$/},_=>({contents:"",loader:"text"}))}}]})}__name(transpileWorkerScript,"transpileWorkerScript");function createFileParser(ctx,fps){let{argv,cfg}=ctx;return async processor=>{let res=[];for(let fp of fps)try{let perf=new PerfTimer,file=await read(fp);file.value=file.value.toString().trim();for(let plugin of cfg.plugins.transformers.filter(p=>p.textTransform))file.value=plugin.textTransform(ctx,file.value.toString());file.data.filePath=file.path,file.data.relativePath=path.posix.relative(argv.directory,file.path),file.data.slug=slugifyFilePath(file.data.relativePath);let ast=processor.parse(file),newAst=await processor.run(ast,file);res.push([newAst,file]),argv.verbose&&console.log(`[process] ${fp} -> ${file.data.slug} (${perf.timeSince()})`)}catch(err){trace(`
|
||
Failed to process \`${fp}\``,err)}return res}}__name(createFileParser,"createFileParser");var clamp=__name((num,min,max)=>Math.min(Math.max(Math.round(num),min),max),"clamp");async function parseMarkdown(ctx,fps){let{argv}=ctx,perf=new PerfTimer,log=new QuartzLogger(argv.verbose),CHUNK_SIZE=128,concurrency=ctx.argv.concurrency??clamp(fps.length/CHUNK_SIZE,1,4),res=[];if(log.start(`Parsing input files using ${concurrency} threads`),concurrency===1)try{let processor=createProcessor(ctx);res=await createFileParser(ctx,fps)(processor)}catch(error){throw log.end(),error}else{await transpileWorkerScript();let pool=workerpool.pool("./quartz/bootstrap-worker.mjs",{minWorkers:"max",maxWorkers:concurrency,workerType:"thread"}),childPromises=[];for(let chunk of chunks(fps,CHUNK_SIZE))childPromises.push(pool.exec("parseFiles",[ctx.buildId,argv,chunk,ctx.allSlugs]));res=(await WorkerPromise.all(childPromises).catch(err=>{let errString=err.toString().slice(6);console.error(errString),process.exit(1)})).flat(),await pool.terminate()}return log.end(`Parsed ${res.length} Markdown files in ${perf.timeSince()}`),res}__name(parseMarkdown,"parseMarkdown");function filterContent(ctx,content){let{cfg,argv}=ctx,perf=new PerfTimer,initialLength=content.length;for(let plugin of cfg.plugins.filters){let updatedContent=content.filter(item=>plugin.shouldPublish(ctx,item));if(argv.verbose){let diff=content.filter(x=>!updatedContent.includes(x));for(let file of diff)console.log(`[filter:${plugin.name}] ${file[1].data.slug}`)}content=updatedContent}return console.log(`Filtered out ${initialLength-content.length} files in ${perf.timeSince()}`),content}__name(filterContent,"filterContent");import matter from"gray-matter";import remarkFrontmatter from"remark-frontmatter";import yaml from"js-yaml";import toml from"toml";var en_US_default={propertyDefaults:{title:"Untitled",description:"No description provided"},components:{callout:{note:"Note",abstract:"Abstract",info:"Info",todo:"Todo",tip:"Tip",success:"Success",question:"Question",warning:"Warning",failure:"Failure",danger:"Danger",bug:"Bug",example:"Example",quote:"Quote"},backlinks:{title:"Backlinks",noBacklinksFound:"No backlinks found"},themeToggle:{lightMode:"Light mode",darkMode:"Dark mode"},explorer:{title:"Explorer"},footer:{createdWith:"Created with"},graph:{title:"Graph View"},recentNotes:{title:"Recent Notes",seeRemainingMore:__name(({remaining})=>`See ${remaining} more \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transclude of ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link to original"},search:{title:"Search",searchBarPlaceholder:"Search for something"},tableOfContents:{title:"Table of Contents"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min read`,"readingTime")}},pages:{rss:{recentNotes:"Recent notes",lastFewNotes:__name(({count})=>`Last ${count} notes`,"lastFewNotes")},error:{title:"Not Found",notFound:"Either this page is private or doesn't exist.",home:"Return to Homepage"},folderContent:{folder:"Folder",itemsUnderFolder:__name(({count})=>count===1?"1 item under this folder.":`${count} items under this folder.`,"itemsUnderFolder")},tagContent:{tag:"Tag",tagIndex:"Tag Index",itemsUnderTag:__name(({count})=>count===1?"1 item with this tag.":`${count} items with this tag.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Showing first ${count} tags.`,"showingFirst"),totalTags:__name(({count})=>`Found ${count} total tags.`,"totalTags")}}};var en_GB_default={propertyDefaults:{title:"Untitled",description:"No description provided"},components:{callout:{note:"Note",abstract:"Abstract",info:"Info",todo:"To-Do",tip:"Tip",success:"Success",question:"Question",warning:"Warning",failure:"Failure",danger:"Danger",bug:"Bug",example:"Example",quote:"Quote"},backlinks:{title:"Backlinks",noBacklinksFound:"No backlinks found"},themeToggle:{lightMode:"Light mode",darkMode:"Dark mode"},explorer:{title:"Explorer"},footer:{createdWith:"Created with"},graph:{title:"Graph View"},recentNotes:{title:"Recent Notes",seeRemainingMore:__name(({remaining})=>`See ${remaining} more \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transclude of ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link to original"},search:{title:"Search",searchBarPlaceholder:"Search for something"},tableOfContents:{title:"Table of Contents"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min read`,"readingTime")}},pages:{rss:{recentNotes:"Recent notes",lastFewNotes:__name(({count})=>`Last ${count} notes`,"lastFewNotes")},error:{title:"Not Found",notFound:"Either this page is private or doesn't exist.",home:"Return to Homepage"},folderContent:{folder:"Folder",itemsUnderFolder:__name(({count})=>count===1?"1 item under this folder.":`${count} items under this folder.`,"itemsUnderFolder")},tagContent:{tag:"Tag",tagIndex:"Tag Index",itemsUnderTag:__name(({count})=>count===1?"1 item with this tag.":`${count} items with this tag.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Showing first ${count} tags.`,"showingFirst"),totalTags:__name(({count})=>`Found ${count} total tags.`,"totalTags")}}};var fr_FR_default={propertyDefaults:{title:"Sans titre",description:"Aucune description fournie"},components:{callout:{note:"Note",abstract:"R\xE9sum\xE9",info:"Info",todo:"\xC0 faire",tip:"Conseil",success:"Succ\xE8s",question:"Question",warning:"Avertissement",failure:"\xC9chec",danger:"Danger",bug:"Bogue",example:"Exemple",quote:"Citation"},backlinks:{title:"Liens retour",noBacklinksFound:"Aucun lien retour trouv\xE9"},themeToggle:{lightMode:"Mode clair",darkMode:"Mode sombre"},explorer:{title:"Explorateur"},footer:{createdWith:"Cr\xE9\xE9 avec"},graph:{title:"Vue Graphique"},recentNotes:{title:"Notes R\xE9centes",seeRemainingMore:__name(({remaining})=>`Voir ${remaining} de plus \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transclusion de ${targetSlug}`,"transcludeOf"),linkToOriginal:"Lien vers l'original"},search:{title:"Recherche",searchBarPlaceholder:"Rechercher quelque chose"},tableOfContents:{title:"Table des Mati\xE8res"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min de lecture`,"readingTime")}},pages:{rss:{recentNotes:"Notes r\xE9centes",lastFewNotes:__name(({count})=>`Les derni\xE8res ${count} notes`,"lastFewNotes")},error:{title:"Introuvable",notFound:"Cette page est soit priv\xE9e, soit elle n'existe pas.",home:"Retour \xE0 la page d'accueil"},folderContent:{folder:"Dossier",itemsUnderFolder:__name(({count})=>count===1?"1 \xE9l\xE9ment sous ce dossier.":`${count} \xE9l\xE9ments sous ce dossier.`,"itemsUnderFolder")},tagContent:{tag:"\xC9tiquette",tagIndex:"Index des \xE9tiquettes",itemsUnderTag:__name(({count})=>count===1?"1 \xE9l\xE9ment avec cette \xE9tiquette.":`${count} \xE9l\xE9ments avec cette \xE9tiquette.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Affichage des premi\xE8res ${count} \xE9tiquettes.`,"showingFirst"),totalTags:__name(({count})=>`Trouv\xE9 ${count} \xE9tiquettes au total.`,"totalTags")}}};var it_IT_default={propertyDefaults:{title:"Senza titolo",description:"Nessuna descrizione"},components:{callout:{note:"Nota",abstract:"Astratto",info:"Info",todo:"Da fare",tip:"Consiglio",success:"Completato",question:"Domanda",warning:"Attenzione",failure:"Errore",danger:"Pericolo",bug:"Bug",example:"Esempio",quote:"Citazione"},backlinks:{title:"Link entranti",noBacklinksFound:"Nessun link entrante"},themeToggle:{lightMode:"Tema chiaro",darkMode:"Tema scuro"},explorer:{title:"Esplora"},footer:{createdWith:"Creato con"},graph:{title:"Vista grafico"},recentNotes:{title:"Note recenti",seeRemainingMore:__name(({remaining})=>`Vedi ${remaining} altro \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transclusione di ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link all'originale"},search:{title:"Cerca",searchBarPlaceholder:"Cerca qualcosa"},tableOfContents:{title:"Tabella dei contenuti"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} minuti`,"readingTime")}},pages:{rss:{recentNotes:"Note recenti",lastFewNotes:__name(({count})=>`Ultime ${count} note`,"lastFewNotes")},error:{title:"Non trovato",notFound:"Questa pagina \xE8 privata o non esiste.",home:"Ritorna alla home page"},folderContent:{folder:"Cartella",itemsUnderFolder:__name(({count})=>count===1?"1 oggetto in questa cartella.":`${count} oggetti in questa cartella.`,"itemsUnderFolder")},tagContent:{tag:"Etichetta",tagIndex:"Indice etichette",itemsUnderTag:__name(({count})=>count===1?"1 oggetto con questa etichetta.":`${count} oggetti con questa etichetta.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Prime ${count} etichette.`,"showingFirst"),totalTags:__name(({count})=>`Trovate ${count} etichette totali.`,"totalTags")}}};var ja_JP_default={propertyDefaults:{title:"\u7121\u984C",description:"\u8AAC\u660E\u306A\u3057"},components:{callout:{note:"\u30CE\u30FC\u30C8",abstract:"\u6284\u9332",info:"\u60C5\u5831",todo:"\u3084\u308B\u3079\u304D\u3053\u3068",tip:"\u30D2\u30F3\u30C8",success:"\u6210\u529F",question:"\u8CEA\u554F",warning:"\u8B66\u544A",failure:"\u5931\u6557",danger:"\u5371\u967A",bug:"\u30D0\u30B0",example:"\u4F8B",quote:"\u5F15\u7528"},backlinks:{title:"\u30D0\u30C3\u30AF\u30EA\u30F3\u30AF",noBacklinksFound:"\u30D0\u30C3\u30AF\u30EA\u30F3\u30AF\u306F\u3042\u308A\u307E\u305B\u3093"},themeToggle:{lightMode:"\u30E9\u30A4\u30C8\u30E2\u30FC\u30C9",darkMode:"\u30C0\u30FC\u30AF\u30E2\u30FC\u30C9"},explorer:{title:"\u30A8\u30AF\u30B9\u30D7\u30ED\u30FC\u30E9\u30FC"},footer:{createdWith:"\u4F5C\u6210"},graph:{title:"\u30B0\u30E9\u30D5\u30D3\u30E5\u30FC"},recentNotes:{title:"\u6700\u8FD1\u306E\u8A18\u4E8B",seeRemainingMore:__name(({remaining})=>`\u3055\u3089\u306B${remaining}\u4EF6 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`${targetSlug}\u306E\u307E\u3068\u3081`,"transcludeOf"),linkToOriginal:"\u5143\u8A18\u4E8B\u3078\u306E\u30EA\u30F3\u30AF"},search:{title:"\u691C\u7D22",searchBarPlaceholder:"\u691C\u7D22\u30EF\u30FC\u30C9\u3092\u5165\u529B"},tableOfContents:{title:"\u76EE\u6B21"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min read`,"readingTime")}},pages:{rss:{recentNotes:"\u6700\u8FD1\u306E\u8A18\u4E8B",lastFewNotes:__name(({count})=>`\u6700\u65B0\u306E${count}\u4EF6`,"lastFewNotes")},error:{title:"Not Found",notFound:"\u30DA\u30FC\u30B8\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u975E\u516C\u958B\u8A2D\u5B9A\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002",home:"\u30DB\u30FC\u30E0\u30DA\u30FC\u30B8\u306B\u623B\u308B"},folderContent:{folder:"\u30D5\u30A9\u30EB\u30C0",itemsUnderFolder:__name(({count})=>`${count}\u4EF6\u306E\u30DA\u30FC\u30B8`,"itemsUnderFolder")},tagContent:{tag:"\u30BF\u30B0",tagIndex:"\u30BF\u30B0\u4E00\u89A7",itemsUnderTag:__name(({count})=>`${count}\u4EF6\u306E\u30DA\u30FC\u30B8`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u306E\u3046\u3061\u6700\u521D\u306E${count}\u4EF6\u3092\u8868\u793A\u3057\u3066\u3044\u307E\u3059`,"showingFirst"),totalTags:__name(({count})=>`\u5168${count}\u500B\u306E\u30BF\u30B0\u3092\u8868\u793A\u4E2D`,"totalTags")}}};var de_DE_default={propertyDefaults:{title:"Unbenannt",description:"Keine Beschreibung angegeben"},components:{callout:{note:"Hinweis",abstract:"Zusammenfassung",info:"Info",todo:"Zu erledigen",tip:"Tipp",success:"Erfolg",question:"Frage",warning:"Warnung",failure:"Misserfolg",danger:"Gefahr",bug:"Fehler",example:"Beispiel",quote:"Zitat"},backlinks:{title:"Backlinks",noBacklinksFound:"Keine Backlinks gefunden"},themeToggle:{lightMode:"Light Mode",darkMode:"Dark Mode"},explorer:{title:"Explorer"},footer:{createdWith:"Erstellt mit"},graph:{title:"Graphansicht"},recentNotes:{title:"Zuletzt bearbeitete Seiten",seeRemainingMore:__name(({remaining})=>`${remaining} weitere ansehen \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transklusion von ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link zum Original"},search:{title:"Suche",searchBarPlaceholder:"Suche nach etwas"},tableOfContents:{title:"Inhaltsverzeichnis"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min read`,"readingTime")}},pages:{rss:{recentNotes:"Zuletzt bearbeitete Seiten",lastFewNotes:__name(({count})=>`Letzte ${count} Seiten`,"lastFewNotes")},error:{title:"Nicht gefunden",notFound:"Diese Seite ist entweder nicht \xF6ffentlich oder existiert nicht.",home:"Return to Homepage"},folderContent:{folder:"Ordner",itemsUnderFolder:__name(({count})=>count===1?"1 Datei in diesem Ordner.":`${count} Dateien in diesem Ordner.`,"itemsUnderFolder")},tagContent:{tag:"Tag",tagIndex:"Tag-\xDCbersicht",itemsUnderTag:__name(({count})=>count===1?"1 Datei mit diesem Tag.":`${count} Dateien mit diesem Tag.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Die ersten ${count} Tags werden angezeigt.`,"showingFirst"),totalTags:__name(({count})=>`${count} Tags insgesamt.`,"totalTags")}}};var nl_NL_default={propertyDefaults:{title:"Naamloos",description:"Geen beschrijving gegeven."},components:{callout:{note:"Notitie",abstract:"Samenvatting",info:"Info",todo:"Te doen",tip:"Tip",success:"Succes",question:"Vraag",warning:"Waarschuwing",failure:"Mislukking",danger:"Gevaar",bug:"Bug",example:"Voorbeeld",quote:"Citaat"},backlinks:{title:"Backlinks",noBacklinksFound:"Geen backlinks gevonden"},themeToggle:{lightMode:"Lichte modus",darkMode:"Donkere modus"},explorer:{title:"Verkenner"},footer:{createdWith:"Gemaakt met"},graph:{title:"Grafiekweergave"},recentNotes:{title:"Recente notities",seeRemainingMore:__name(({remaining})=>`Zie ${remaining} meer \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Invoeging van ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link naar origineel"},search:{title:"Zoeken",searchBarPlaceholder:"Doorzoek de website"},tableOfContents:{title:"Inhoudsopgave"},contentMeta:{readingTime:__name(({minutes})=>minutes===1?"1 minuut leestijd":`${minutes} minuten leestijd`,"readingTime")}},pages:{rss:{recentNotes:"Recente notities",lastFewNotes:__name(({count})=>`Laatste ${count} notities`,"lastFewNotes")},error:{title:"Niet gevonden",notFound:"Deze pagina is niet zichtbaar of bestaat niet.",home:"Keer terug naar de start pagina"},folderContent:{folder:"Map",itemsUnderFolder:__name(({count})=>count===1?"1 item in deze map.":`${count} items in deze map.`,"itemsUnderFolder")},tagContent:{tag:"Label",tagIndex:"Label-index",itemsUnderTag:__name(({count})=>count===1?"1 item met dit label.":`${count} items met dit label.`,"itemsUnderTag"),showingFirst:__name(({count})=>count===1?"Eerste label tonen.":`Eerste ${count} labels tonen.`,"showingFirst"),totalTags:__name(({count})=>`${count} labels gevonden.`,"totalTags")}}};var ro_RO_default={propertyDefaults:{title:"F\u0103r\u0103 titlu",description:"Nici o descriere furnizat\u0103"},components:{callout:{note:"Not\u0103",abstract:"Rezumat",info:"Informa\u021Bie",todo:"De f\u0103cut",tip:"Sfat",success:"Succes",question:"\xCEntrebare",warning:"Avertisment",failure:"E\u0219ec",danger:"Pericol",bug:"Bug",example:"Exemplu",quote:"Citat"},backlinks:{title:"Leg\u0103turi \xEEnapoi",noBacklinksFound:"Nu s-au g\u0103sit leg\u0103turi \xEEnapoi"},themeToggle:{lightMode:"Modul luminos",darkMode:"Modul \xEEntunecat"},explorer:{title:"Explorator"},footer:{createdWith:"Creat cu"},graph:{title:"Graf"},recentNotes:{title:"Noti\u021Be recente",seeRemainingMore:__name(({remaining})=>`Vezi \xEEnc\u0103 ${remaining} \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Extras din ${targetSlug}`,"transcludeOf"),linkToOriginal:"Leg\u0103tur\u0103 c\u0103tre original"},search:{title:"C\u0103utare",searchBarPlaceholder:"Introduce\u021Bi termenul de c\u0103utare..."},tableOfContents:{title:"Cuprins"},contentMeta:{readingTime:__name(({minutes})=>minutes==1?"lectur\u0103 de 1 minut":`lectur\u0103 de ${minutes} minute`,"readingTime")}},pages:{rss:{recentNotes:"Noti\u021Be recente",lastFewNotes:__name(({count})=>`Ultimele ${count} noti\u021Be`,"lastFewNotes")},error:{title:"Pagina nu a fost g\u0103sit\u0103",notFound:"Fie aceast\u0103 pagin\u0103 este privat\u0103, fie nu exist\u0103.",home:"Reveni\u021Bi la pagina de pornire"},folderContent:{folder:"Dosar",itemsUnderFolder:__name(({count})=>count===1?"1 articol \xEEn acest dosar.":`${count} elemente \xEEn acest dosar.`,"itemsUnderFolder")},tagContent:{tag:"Etichet\u0103",tagIndex:"Indexul etichetelor",itemsUnderTag:__name(({count})=>count===1?"1 articol cu aceast\u0103 etichet\u0103.":`${count} articole cu aceast\u0103 etichet\u0103.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Se afi\u0219eaz\u0103 primele ${count} etichete.`,"showingFirst"),totalTags:__name(({count})=>`Au fost g\u0103site ${count} etichete \xEEn total.`,"totalTags")}}};var ca_ES_default={propertyDefaults:{title:"Sense t\xEDtol",description:"Sense descripci\xF3"},components:{callout:{note:"Nota",abstract:"Resum",info:"Informaci\xF3",todo:"Per fer",tip:"Consell",success:"\xC8xit",question:"Pregunta",warning:"Advert\xE8ncia",failure:"Fall",danger:"Perill",bug:"Error",example:"Exemple",quote:"Cita"},backlinks:{title:"Retroenlla\xE7",noBacklinksFound:"No s'han trobat retroenlla\xE7os"},themeToggle:{lightMode:"Mode clar",darkMode:"Mode fosc"},explorer:{title:"Explorador"},footer:{createdWith:"Creat amb"},graph:{title:"Vista Gr\xE0fica"},recentNotes:{title:"Notes Recents",seeRemainingMore:__name(({remaining})=>`Vegi ${remaining} m\xE9s \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transcluit de ${targetSlug}`,"transcludeOf"),linkToOriginal:"Enlla\xE7 a l'original"},search:{title:"Cercar",searchBarPlaceholder:"Cerca alguna cosa"},tableOfContents:{title:"Taula de Continguts"},contentMeta:{readingTime:__name(({minutes})=>`Es llegeix en ${minutes} min`,"readingTime")}},pages:{rss:{recentNotes:"Notes recents",lastFewNotes:__name(({count})=>`\xDAltimes ${count} notes`,"lastFewNotes")},error:{title:"No s'ha trobat.",notFound:"Aquesta p\xE0gina \xE9s privada o no existeix.",home:"Torna a la p\xE0gina principal"},folderContent:{folder:"Carpeta",itemsUnderFolder:__name(({count})=>count===1?"1 article en aquesta carpeta.":`${count} articles en esta carpeta.`,"itemsUnderFolder")},tagContent:{tag:"Etiqueta",tagIndex:"\xEDndex d'Etiquetes",itemsUnderTag:__name(({count})=>count===1?"1 article amb aquesta etiqueta.":`${count} article amb aquesta etiqueta.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Mostrant les primeres ${count} etiquetes.`,"showingFirst"),totalTags:__name(({count})=>`S'han trobat ${count} etiquetes en total.`,"totalTags")}}};var es_ES_default={propertyDefaults:{title:"Sin t\xEDtulo",description:"Sin descripci\xF3n"},components:{callout:{note:"Nota",abstract:"Resumen",info:"Informaci\xF3n",todo:"Por hacer",tip:"Consejo",success:"\xC9xito",question:"Pregunta",warning:"Advertencia",failure:"Fallo",danger:"Peligro",bug:"Error",example:"Ejemplo",quote:"Cita"},backlinks:{title:"Retroenlaces",noBacklinksFound:"No se han encontrado retroenlaces"},themeToggle:{lightMode:"Modo claro",darkMode:"Modo oscuro"},explorer:{title:"Explorador"},footer:{createdWith:"Creado con"},graph:{title:"Vista Gr\xE1fica"},recentNotes:{title:"Notas Recientes",seeRemainingMore:__name(({remaining})=>`Vea ${remaining} m\xE1s \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transcluido de ${targetSlug}`,"transcludeOf"),linkToOriginal:"Enlace al original"},search:{title:"Buscar",searchBarPlaceholder:"Busca algo"},tableOfContents:{title:"Tabla de Contenidos"},contentMeta:{readingTime:__name(({minutes})=>`Se lee en ${minutes} min`,"readingTime")}},pages:{rss:{recentNotes:"Notas recientes",lastFewNotes:__name(({count})=>`\xDAltimas ${count} notas`,"lastFewNotes")},error:{title:"No se ha encontrado.",notFound:"Esta p\xE1gina es privada o no existe.",home:"Regresa a la p\xE1gina principal"},folderContent:{folder:"Carpeta",itemsUnderFolder:__name(({count})=>count===1?"1 art\xEDculo en esta carpeta.":`${count} art\xEDculos en esta carpeta.`,"itemsUnderFolder")},tagContent:{tag:"Etiqueta",tagIndex:"\xCDndice de Etiquetas",itemsUnderTag:__name(({count})=>count===1?"1 art\xEDculo con esta etiqueta.":`${count} art\xEDculos con esta etiqueta.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Mostrando las primeras ${count} etiquetas.`,"showingFirst"),totalTags:__name(({count})=>`Se han encontrado ${count} etiquetas en total.`,"totalTags")}}};var ar_SA_default={propertyDefaults:{title:"\u063A\u064A\u0631 \u0645\u0639\u0646\u0648\u0646",description:"\u0644\u0645 \u064A\u062A\u0645 \u062A\u0642\u062F\u064A\u0645 \u0623\u064A \u0648\u0635\u0641"},components:{callout:{note:"\u0645\u0644\u0627\u062D\u0638\u0629",abstract:"\u0645\u0644\u062E\u0635",info:"\u0645\u0639\u0644\u0648\u0645\u0627\u062A",todo:"\u0644\u0644\u0642\u064A\u0627\u0645",tip:"\u0646\u0635\u064A\u062D\u0629",success:"\u0646\u062C\u0627\u062D",question:"\u0633\u0624\u0627\u0644",warning:"\u062A\u062D\u0630\u064A\u0631",failure:"\u0641\u0634\u0644",danger:"\u062E\u0637\u0631",bug:"\u062E\u0644\u0644",example:"\u0645\u062B\u0627\u0644",quote:"\u0627\u0642\u062A\u0628\u0627\u0633"},backlinks:{title:"\u0648\u0635\u0644\u0627\u062A \u0627\u0644\u0639\u0648\u062F\u0629",noBacklinksFound:"\u0644\u0627 \u064A\u0648\u062C\u062F \u0648\u0635\u0644\u0627\u062A \u0639\u0648\u062F\u0629"},themeToggle:{lightMode:"\u0627\u0644\u0648\u0636\u0639 \u0627\u0644\u0646\u0647\u0627\u0631\u064A",darkMode:"\u0627\u0644\u0648\u0636\u0639 \u0627\u0644\u0644\u064A\u0644\u064A"},explorer:{title:"\u0627\u0644\u0645\u0633\u062A\u0639\u0631\u0636"},footer:{createdWith:"\u0623\u064F\u0646\u0634\u0626 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645"},graph:{title:"\u0627\u0644\u062A\u0645\u062B\u064A\u0644 \u0627\u0644\u062A\u0641\u0627\u0639\u0644\u064A"},recentNotes:{title:"\u0622\u062E\u0631 \u0627\u0644\u0645\u0644\u0627\u062D\u0638\u0627\u062A",seeRemainingMore:__name(({remaining})=>`\u062A\u0635\u0641\u062D ${remaining} \u0623\u0643\u062B\u0631 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u0645\u0642\u062A\u0628\u0633 \u0645\u0646 ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u0648\u0635\u0644\u0629 \u0644\u0644\u0645\u0644\u0627\u062D\u0638\u0629 \u0627\u0644\u0631\u0626\u064A\u0633\u0629"},search:{title:"\u0628\u062D\u062B",searchBarPlaceholder:"\u0627\u0628\u062D\u062B \u0639\u0646 \u0634\u064A\u0621 \u0645\u0627"},tableOfContents:{title:"\u0641\u0647\u0631\u0633 \u0627\u0644\u0645\u062D\u062A\u0648\u064A\u0627\u062A"},contentMeta:{readingTime:__name(({minutes})=>minutes==1?"\u062F\u0642\u064A\u0642\u0629 \u0623\u0648 \u0623\u0642\u0644 \u0644\u0644\u0642\u0631\u0627\u0621\u0629":minutes==2?"\u062F\u0642\u064A\u0642\u062A\u0627\u0646 \u0644\u0644\u0642\u0631\u0627\u0621\u0629":`${minutes} \u062F\u0642\u0627\u0626\u0642 \u0644\u0644\u0642\u0631\u0627\u0621\u0629`,"readingTime")}},pages:{rss:{recentNotes:"\u0622\u062E\u0631 \u0627\u0644\u0645\u0644\u0627\u062D\u0638\u0627\u062A",lastFewNotes:__name(({count})=>`\u0622\u062E\u0631 ${count} \u0645\u0644\u0627\u062D\u0638\u0629`,"lastFewNotes")},error:{title:"\u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F",notFound:"\u0625\u0645\u0627 \u0623\u0646 \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u062E\u0627\u0635\u0629 \u0623\u0648 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F\u0629.",home:"\u0627\u0644\u0639\u0648\u062F\u0647 \u0644\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629"},folderContent:{folder:"\u0645\u062C\u0644\u062F",itemsUnderFolder:__name(({count})=>count===1?"\u064A\u0648\u062C\u062F \u0639\u0646\u0635\u0631 \u0648\u0627\u062D\u062F \u0641\u0642\u0637 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0645\u062C\u0644\u062F":`\u064A\u0648\u062C\u062F ${count} \u0639\u0646\u0627\u0635\u0631 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0645\u062C\u0644\u062F.`,"itemsUnderFolder")},tagContent:{tag:"\u0627\u0644\u0648\u0633\u0645",tagIndex:"\u0645\u0624\u0634\u0631 \u0627\u0644\u0648\u0633\u0645",itemsUnderTag:__name(({count})=>count===1?"\u064A\u0648\u062C\u062F \u0639\u0646\u0635\u0631 \u0648\u0627\u062D\u062F \u0641\u0642\u0637 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0648\u0633\u0645":`\u064A\u0648\u062C\u062F ${count} \u0639\u0646\u0627\u0635\u0631 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0648\u0633\u0645.`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u0625\u0638\u0647\u0627\u0631 \u0623\u0648\u0644 ${count} \u0623\u0648\u0633\u0645\u0629.`,"showingFirst"),totalTags:__name(({count})=>`\u064A\u0648\u062C\u062F ${count} \u0623\u0648\u0633\u0645\u0629.`,"totalTags")}}};var uk_UA_default={propertyDefaults:{title:"\u0411\u0435\u0437 \u043D\u0430\u0437\u0432\u0438",description:"\u041E\u043F\u0438\u0441 \u043D\u0435 \u043D\u0430\u0434\u0430\u043D\u043E"},components:{callout:{note:"\u041F\u0440\u0438\u043C\u0456\u0442\u043A\u0430",abstract:"\u0410\u0431\u0441\u0442\u0440\u0430\u043A\u0442",info:"\u0406\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u044F",todo:"\u0417\u0430\u0432\u0434\u0430\u043D\u043D\u044F",tip:"\u041F\u043E\u0440\u0430\u0434\u0430",success:"\u0423\u0441\u043F\u0456\u0445",question:"\u041F\u0438\u0442\u0430\u043D\u043D\u044F",warning:"\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u0436\u0435\u043D\u043D\u044F",failure:"\u041D\u0435\u0432\u0434\u0430\u0447\u0430",danger:"\u041D\u0435\u0431\u0435\u0437\u043F\u0435\u043A\u0430",bug:"\u0411\u0430\u0433",example:"\u041F\u0440\u0438\u043A\u043B\u0430\u0434",quote:"\u0426\u0438\u0442\u0430\u0442\u0430"},backlinks:{title:"\u0417\u0432\u043E\u0440\u043E\u0442\u043D\u0456 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F",noBacklinksFound:"\u0417\u0432\u043E\u0440\u043E\u0442\u043D\u0438\u0445 \u043F\u043E\u0441\u0438\u043B\u0430\u043D\u044C \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E"},themeToggle:{lightMode:"\u0421\u0432\u0456\u0442\u043B\u0438\u0439 \u0440\u0435\u0436\u0438\u043C",darkMode:"\u0422\u0435\u043C\u043D\u0438\u0439 \u0440\u0435\u0436\u0438\u043C"},explorer:{title:"\u041F\u0440\u043E\u0432\u0456\u0434\u043D\u0438\u043A"},footer:{createdWith:"\u0421\u0442\u0432\u043E\u0440\u0435\u043D\u043E \u0437\u0430 \u0434\u043E\u043F\u043E\u043C\u043E\u0433\u043E\u044E"},graph:{title:"\u0412\u0438\u0433\u043B\u044F\u0434 \u0433\u0440\u0430\u0444\u0430"},recentNotes:{title:"\u041E\u0441\u0442\u0430\u043D\u043D\u0456 \u043D\u043E\u0442\u0430\u0442\u043A\u0438",seeRemainingMore:__name(({remaining})=>`\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0449\u0435 ${remaining} \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u0412\u0438\u0434\u043E\u0431\u0443\u0442\u043E \u0437 ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u041F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F \u043D\u0430 \u043E\u0440\u0438\u0433\u0456\u043D\u0430\u043B"},search:{title:"\u041F\u043E\u0448\u0443\u043A",searchBarPlaceholder:"\u0428\u0443\u043A\u0430\u0442\u0438 \u0449\u043E\u0441\u044C"},tableOfContents:{title:"\u0417\u043C\u0456\u0441\u0442"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} \u0445\u0432 \u0447\u0438\u0442\u0430\u043D\u043D\u044F`,"readingTime")}},pages:{rss:{recentNotes:"\u041E\u0441\u0442\u0430\u043D\u043D\u0456 \u043D\u043E\u0442\u0430\u0442\u043A\u0438",lastFewNotes:__name(({count})=>`\u041E\u0441\u0442\u0430\u043D\u043D\u0456 \u043D\u043E\u0442\u0430\u0442\u043A\u0438: ${count}`,"lastFewNotes")},error:{title:"\u041D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E",notFound:"\u0426\u044F \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430 \u0430\u0431\u043E \u043F\u0440\u0438\u0432\u0430\u0442\u043D\u0430, \u0430\u0431\u043E \u043D\u0435 \u0456\u0441\u043D\u0443\u0454.",home:"\u041F\u043E\u0432\u0435\u0440\u043D\u0443\u0442\u0438\u0441\u044F \u043D\u0430 \u0433\u043E\u043B\u043E\u0432\u043D\u0443 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0443"},folderContent:{folder:"\u0422\u0435\u043A\u0430",itemsUnderFolder:__name(({count})=>count===1?"\u0423 \u0446\u0456\u0439 \u0442\u0435\u0446\u0456 1 \u0435\u043B\u0435\u043C\u0435\u043D\u0442.":`\u0415\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u0443 \u0446\u0456\u0439 \u0442\u0435\u0446\u0456: ${count}.`,"itemsUnderFolder")},tagContent:{tag:"\u041C\u0456\u0442\u043A\u0430",tagIndex:"\u0406\u043D\u0434\u0435\u043A\u0441 \u043C\u0456\u0442\u043A\u0438",itemsUnderTag:__name(({count})=>count===1?"1 \u0435\u043B\u0435\u043C\u0435\u043D\u0442 \u0437 \u0446\u0456\u0454\u044E \u043C\u0456\u0442\u043A\u043E\u044E.":`\u0415\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u0437 \u0446\u0456\u0454\u044E \u043C\u0456\u0442\u043A\u043E\u044E: ${count}.`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u041F\u043E\u043A\u0430\u0437 \u043F\u0435\u0440\u0448\u0438\u0445 ${count} \u043C\u0456\u0442\u043E\u043A.`,"showingFirst"),totalTags:__name(({count})=>`\u0412\u0441\u044C\u043E\u0433\u043E \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E \u043C\u0456\u0442\u043E\u043A: ${count}.`,"totalTags")}}};var ru_RU_default={propertyDefaults:{title:"\u0411\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F",description:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442"},components:{callout:{note:"\u0417\u0430\u043C\u0435\u0442\u043A\u0430",abstract:"\u0420\u0435\u0437\u044E\u043C\u0435",info:"\u0418\u043D\u0444\u043E",todo:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C",tip:"\u041F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0430",success:"\u0423\u0441\u043F\u0435\u0445",question:"\u0412\u043E\u043F\u0440\u043E\u0441",warning:"\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435",failure:"\u041D\u0435\u0443\u0434\u0430\u0447\u0430",danger:"\u041E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C",bug:"\u0411\u0430\u0433",example:"\u041F\u0440\u0438\u043C\u0435\u0440",quote:"\u0426\u0438\u0442\u0430\u0442\u0430"},backlinks:{title:"\u041E\u0431\u0440\u0430\u0442\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438",noBacklinksFound:"\u041E\u0431\u0440\u0430\u0442\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442"},themeToggle:{lightMode:"\u0421\u0432\u0435\u0442\u043B\u044B\u0439 \u0440\u0435\u0436\u0438\u043C",darkMode:"\u0422\u0451\u043C\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C"},explorer:{title:"\u041F\u0440\u043E\u0432\u043E\u0434\u043D\u0438\u043A"},footer:{createdWith:"\u0421\u043E\u0437\u0434\u0430\u043D\u043E \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E"},graph:{title:"\u0412\u0438\u0434 \u0433\u0440\u0430\u0444\u0430"},recentNotes:{title:"\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435 \u0437\u0430\u043C\u0435\u0442\u043A\u0438",seeRemainingMore:__name(({remaining})=>`\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043E\u0441\u0442\u0430\u0432\u0448${getForm(remaining,"\u0443\u044E\u0441\u044F","\u0438\u0435\u0441\u044F","\u0438\u0435\u0441\u044F")} ${remaining} \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u041F\u0435\u0440\u0435\u0445\u043E\u0434 \u0438\u0437 ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043E\u0440\u0438\u0433\u0438\u043D\u0430\u043B"},search:{title:"\u041F\u043E\u0438\u0441\u043A",searchBarPlaceholder:"\u041D\u0430\u0439\u0442\u0438 \u0447\u0442\u043E-\u043D\u0438\u0431\u0443\u0434\u044C"},tableOfContents:{title:"\u041E\u0433\u043B\u0430\u0432\u043B\u0435\u043D\u0438\u0435"},contentMeta:{readingTime:__name(({minutes})=>`\u0432\u0440\u0435\u043C\u044F \u0447\u0442\u0435\u043D\u0438\u044F ~${minutes} \u043C\u0438\u043D.`,"readingTime")}},pages:{rss:{recentNotes:"\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435 \u0437\u0430\u043C\u0435\u0442\u043A\u0438",lastFewNotes:__name(({count})=>`\u041F\u043E\u0441\u043B\u0435\u0434\u043D${getForm(count,"\u044F\u044F","\u0438\u0435","\u0438\u0435")} ${count} \u0437\u0430\u043C\u0435\u0442${getForm(count,"\u043A\u0430","\u043A\u0438","\u043E\u043A")}`,"lastFewNotes")},error:{title:"\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430",notFound:"\u042D\u0442\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043F\u0440\u0438\u0432\u0430\u0442\u043D\u0430\u044F \u0438\u043B\u0438 \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442",home:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443"},folderContent:{folder:"\u041F\u0430\u043F\u043A\u0430",itemsUnderFolder:__name(({count})=>`\u0432 \u044D\u0442\u043E\u0439 \u043F\u0430\u043F\u043A\u0435 ${count} \u044D\u043B\u0435\u043C\u0435\u043D\u0442${getForm(count,"","\u0430","\u043E\u0432")}`,"itemsUnderFolder")},tagContent:{tag:"\u0422\u0435\u0433",tagIndex:"\u0418\u043D\u0434\u0435\u043A\u0441 \u0442\u0435\u0433\u043E\u0432",itemsUnderTag:__name(({count})=>`\u0441 \u044D\u0442\u0438\u043C \u0442\u0435\u0433\u043E\u043C ${count} \u044D\u043B\u0435\u043C\u0435\u043D\u0442${getForm(count,"","\u0430","\u043E\u0432")}`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430${getForm(count,"\u0435\u0442\u0441\u044F","\u044E\u0442\u0441\u044F","\u044E\u0442\u0441\u044F")} ${count} \u0442\u0435\u0433${getForm(count,"","\u0430","\u043E\u0432")}`,"showingFirst"),totalTags:__name(({count})=>`\u0412\u0441\u0435\u0433\u043E ${count} \u0442\u0435\u0433${getForm(count,"","\u0430","\u043E\u0432")}`,"totalTags")}}};function getForm(number,form1,form2,form5){let remainder100=number%100,remainder10=remainder100%10;return remainder100>=10&&remainder100<=20?form5:remainder10>1&&remainder10<5?form2:remainder10==1?form1:form5}__name(getForm,"getForm");var ko_KR_default={propertyDefaults:{title:"\uC81C\uBAA9 \uC5C6\uC74C",description:"\uC124\uBA85 \uC5C6\uC74C"},components:{callout:{note:"\uB178\uD2B8",abstract:"\uAC1C\uC694",info:"\uC815\uBCF4",todo:"\uD560\uC77C",tip:"\uD301",success:"\uC131\uACF5",question:"\uC9C8\uBB38",warning:"\uC8FC\uC758",failure:"\uC2E4\uD328",danger:"\uC704\uD5D8",bug:"\uBC84\uADF8",example:"\uC608\uC2DC",quote:"\uC778\uC6A9"},backlinks:{title:"\uBC31\uB9C1\uD06C",noBacklinksFound:"\uBC31\uB9C1\uD06C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},themeToggle:{lightMode:"\uB77C\uC774\uD2B8 \uBAA8\uB4DC",darkMode:"\uB2E4\uD06C \uBAA8\uB4DC"},explorer:{title:"\uD0D0\uC0C9\uAE30"},footer:{createdWith:"Created with"},graph:{title:"\uADF8\uB798\uD504 \uBDF0"},recentNotes:{title:"\uCD5C\uADFC \uAC8C\uC2DC\uAE00",seeRemainingMore:__name(({remaining})=>`${remaining}\uAC74 \uB354\uBCF4\uAE30 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`${targetSlug}\uC758 \uD3EC\uD568`,"transcludeOf"),linkToOriginal:"\uC6D0\uBCF8 \uB9C1\uD06C"},search:{title:"\uAC80\uC0C9",searchBarPlaceholder:"\uAC80\uC0C9\uC5B4\uB97C \uC785\uB825\uD558\uC138\uC694"},tableOfContents:{title:"\uBAA9\uCC28"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min read`,"readingTime")}},pages:{rss:{recentNotes:"\uCD5C\uADFC \uAC8C\uC2DC\uAE00",lastFewNotes:__name(({count})=>`\uCD5C\uADFC ${count} \uAC74`,"lastFewNotes")},error:{title:"Not Found",notFound:"\uD398\uC774\uC9C0\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uAC70\uB098 \uBE44\uACF5\uAC1C \uC124\uC815\uC774 \uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",home:"\uD648\uD398\uC774\uC9C0\uB85C \uB3CC\uC544\uAC00\uAE30"},folderContent:{folder:"\uD3F4\uB354",itemsUnderFolder:__name(({count})=>`${count}\uAC74\uC758 \uD56D\uBAA9`,"itemsUnderFolder")},tagContent:{tag:"\uD0DC\uADF8",tagIndex:"\uD0DC\uADF8 \uBAA9\uB85D",itemsUnderTag:__name(({count})=>`${count}\uAC74\uC758 \uD56D\uBAA9`,"itemsUnderTag"),showingFirst:__name(({count})=>`\uCC98\uC74C ${count}\uAC1C\uC758 \uD0DC\uADF8`,"showingFirst"),totalTags:__name(({count})=>`\uCD1D ${count}\uAC1C\uC758 \uD0DC\uADF8\uB97C \uCC3E\uC558\uC2B5\uB2C8\uB2E4.`,"totalTags")}}};var zh_CN_default={propertyDefaults:{title:"\u65E0\u9898",description:"\u65E0\u63CF\u8FF0"},components:{callout:{note:"\u7B14\u8BB0",abstract:"\u6458\u8981",info:"\u63D0\u793A",todo:"\u5F85\u529E",tip:"\u63D0\u793A",success:"\u6210\u529F",question:"\u95EE\u9898",warning:"\u8B66\u544A",failure:"\u5931\u8D25",danger:"\u5371\u9669",bug:"\u9519\u8BEF",example:"\u793A\u4F8B",quote:"\u5F15\u7528"},backlinks:{title:"\u53CD\u5411\u94FE\u63A5",noBacklinksFound:"\u65E0\u6CD5\u627E\u5230\u53CD\u5411\u94FE\u63A5"},themeToggle:{lightMode:"\u4EAE\u8272\u6A21\u5F0F",darkMode:"\u6697\u8272\u6A21\u5F0F"},explorer:{title:"\u63A2\u7D22"},footer:{createdWith:"Created with"},graph:{title:"\u5173\u7CFB\u56FE\u8C31"},recentNotes:{title:"\u6700\u8FD1\u7684\u7B14\u8BB0",seeRemainingMore:__name(({remaining})=>`\u67E5\u770B\u66F4\u591A${remaining}\u7BC7\u7B14\u8BB0 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u5305\u542B${targetSlug}`,"transcludeOf"),linkToOriginal:"\u6307\u5411\u539F\u59CB\u7B14\u8BB0\u7684\u94FE\u63A5"},search:{title:"\u641C\u7D22",searchBarPlaceholder:"\u641C\u7D22\u4E9B\u4EC0\u4E48"},tableOfContents:{title:"\u76EE\u5F55"},contentMeta:{readingTime:__name(({minutes})=>`${minutes}\u5206\u949F\u9605\u8BFB`,"readingTime")}},pages:{rss:{recentNotes:"\u6700\u8FD1\u7684\u7B14\u8BB0",lastFewNotes:__name(({count})=>`\u6700\u8FD1\u7684${count}\u6761\u7B14\u8BB0`,"lastFewNotes")},error:{title:"\u65E0\u6CD5\u627E\u5230",notFound:"\u79C1\u6709\u7B14\u8BB0\u6216\u7B14\u8BB0\u4E0D\u5B58\u5728\u3002",home:"\u8FD4\u56DE\u9996\u9875"},folderContent:{folder:"\u6587\u4EF6\u5939",itemsUnderFolder:__name(({count})=>`\u6B64\u6587\u4EF6\u5939\u4E0B\u6709${count}\u6761\u7B14\u8BB0\u3002`,"itemsUnderFolder")},tagContent:{tag:"\u6807\u7B7E",tagIndex:"\u6807\u7B7E\u7D22\u5F15",itemsUnderTag:__name(({count})=>`\u6B64\u6807\u7B7E\u4E0B\u6709${count}\u6761\u7B14\u8BB0\u3002`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u663E\u793A\u524D${count}\u4E2A\u6807\u7B7E\u3002`,"showingFirst"),totalTags:__name(({count})=>`\u603B\u5171\u6709${count}\u4E2A\u6807\u7B7E\u3002`,"totalTags")}}};var zh_TW_default={propertyDefaults:{title:"\u7121\u984C",description:"\u7121\u63CF\u8FF0"},components:{callout:{note:"\u7B46\u8A18",abstract:"\u6458\u8981",info:"\u63D0\u793A",todo:"\u5F85\u8FA6",tip:"\u63D0\u793A",success:"\u6210\u529F",question:"\u554F\u984C",warning:"\u8B66\u544A",failure:"\u5931\u6557",danger:"\u5371\u96AA",bug:"\u932F\u8AA4",example:"\u7BC4\u4F8B",quote:"\u5F15\u7528"},backlinks:{title:"\u53CD\u5411\u9023\u7D50",noBacklinksFound:"\u7121\u6CD5\u627E\u5230\u53CD\u5411\u9023\u7D50"},themeToggle:{lightMode:"\u4EAE\u8272\u6A21\u5F0F",darkMode:"\u6697\u8272\u6A21\u5F0F"},explorer:{title:"\u63A2\u7D22"},footer:{createdWith:"Created with"},graph:{title:"\u95DC\u4FC2\u5716\u8B5C"},recentNotes:{title:"\u6700\u8FD1\u7684\u7B46\u8A18",seeRemainingMore:__name(({remaining})=>`\u67E5\u770B\u66F4\u591A ${remaining} \u7BC7\u7B46\u8A18 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u5305\u542B ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u6307\u5411\u539F\u59CB\u7B46\u8A18\u7684\u9023\u7D50"},search:{title:"\u641C\u5C0B",searchBarPlaceholder:"\u641C\u5C0B\u4E9B\u4EC0\u9EBC"},tableOfContents:{title:"\u76EE\u9304"},contentMeta:{readingTime:__name(({minutes})=>`\u95B1\u8B80\u6642\u9593\u7D04 ${minutes} \u5206\u9418`,"readingTime")}},pages:{rss:{recentNotes:"\u6700\u8FD1\u7684\u7B46\u8A18",lastFewNotes:__name(({count})=>`\u6700\u8FD1\u7684 ${count} \u689D\u7B46\u8A18`,"lastFewNotes")},error:{title:"\u7121\u6CD5\u627E\u5230",notFound:"\u79C1\u4EBA\u7B46\u8A18\u6216\u7B46\u8A18\u4E0D\u5B58\u5728\u3002",home:"\u8FD4\u56DE\u9996\u9801"},folderContent:{folder:"\u8CC7\u6599\u593E",itemsUnderFolder:__name(({count})=>`\u6B64\u8CC7\u6599\u593E\u4E0B\u6709 ${count} \u689D\u7B46\u8A18\u3002`,"itemsUnderFolder")},tagContent:{tag:"\u6A19\u7C64",tagIndex:"\u6A19\u7C64\u7D22\u5F15",itemsUnderTag:__name(({count})=>`\u6B64\u6A19\u7C64\u4E0B\u6709 ${count} \u689D\u7B46\u8A18\u3002`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u986F\u793A\u524D ${count} \u500B\u6A19\u7C64\u3002`,"showingFirst"),totalTags:__name(({count})=>`\u7E3D\u5171\u6709 ${count} \u500B\u6A19\u7C64\u3002`,"totalTags")}}};var vi_VN_default={propertyDefaults:{title:"Kh\xF4ng c\xF3 ti\xEAu \u0111\u1EC1",description:"Kh\xF4ng c\xF3 m\xF4 t\u1EA3 \u0111\u01B0\u1EE3c cung c\u1EA5p"},components:{callout:{note:"Ghi Ch\xFA",abstract:"T\xF3m T\u1EAFt",info:"Th\xF4ng tin",todo:"C\u1EA7n L\xE0m",tip:"G\u1EE3i \xDD",success:"Th\xE0nh C\xF4ng",question:"Nghi V\u1EA5n",warning:"C\u1EA3nh B\xE1o",failure:"Th\u1EA5t B\u1EA1i",danger:"Nguy Hi\u1EC3m",bug:"L\u1ED7i",example:"V\xED D\u1EE5",quote:"Tr\xEDch D\u1EABn"},backlinks:{title:"Li\xEAn K\u1EBFt Ng\u01B0\u1EE3c",noBacklinksFound:"Kh\xF4ng c\xF3 li\xEAn k\u1EBFt ng\u01B0\u1EE3c \u0111\u01B0\u1EE3c t\xECm th\u1EA5y"},themeToggle:{lightMode:"S\xE1ng",darkMode:"T\u1ED1i"},explorer:{title:"Trong b\xE0i n\xE0y"},footer:{createdWith:"\u0110\u01B0\u1EE3c t\u1EA1o b\u1EDFi"},graph:{title:"Bi\u1EC3u \u0110\u1ED3"},recentNotes:{title:"B\xE0i vi\u1EBFt g\u1EA7n \u0111\xE2y",seeRemainingMore:__name(({remaining})=>`Xem ${remaining} th\xEAm \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Bao g\u1ED3m ${targetSlug}`,"transcludeOf"),linkToOriginal:"Li\xEAn K\u1EBFt G\u1ED1c"},search:{title:"T\xECm Ki\u1EBFm",searchBarPlaceholder:"T\xECm ki\u1EBFm th\xF4ng tin"},tableOfContents:{title:"B\u1EA3ng N\u1ED9i Dung"},contentMeta:{readingTime:__name(({minutes})=>`\u0111\u1ECDc ${minutes} ph\xFAt`,"readingTime")}},pages:{rss:{recentNotes:"Nh\u1EEFng b\xE0i g\u1EA7n \u0111\xE2y",lastFewNotes:__name(({count})=>`${count} B\xE0i g\u1EA7n \u0111\xE2y`,"lastFewNotes")},error:{title:"Kh\xF4ng T\xECm Th\u1EA5y",notFound:"Trang n\xE0y \u0111\u01B0\u1EE3c b\u1EA3o m\u1EADt ho\u1EB7c kh\xF4ng t\u1ED3n t\u1EA1i.",home:"Tr\u1EDF v\u1EC1 trang ch\u1EE7"},folderContent:{folder:"Th\u01B0 M\u1EE5c",itemsUnderFolder:__name(({count})=>count===1?"1 m\u1EE5c trong th\u01B0 m\u1EE5c n\xE0y.":`${count} m\u1EE5c trong th\u01B0 m\u1EE5c n\xE0y.`,"itemsUnderFolder")},tagContent:{tag:"Th\u1EBB",tagIndex:"Th\u1EBB M\u1EE5c L\u1EE5c",itemsUnderTag:__name(({count})=>count===1?"1 m\u1EE5c g\u1EAFn th\u1EBB n\xE0y.":`${count} m\u1EE5c g\u1EAFn th\u1EBB n\xE0y.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Hi\u1EC3n th\u1ECB tr\u01B0\u1EDBc ${count} th\u1EBB.`,"showingFirst"),totalTags:__name(({count})=>`T\xECm th\u1EA5y ${count} th\u1EBB t\u1ED5ng c\u1ED9ng.`,"totalTags")}}};var pt_BR_default={propertyDefaults:{title:"Sem t\xEDtulo",description:"Sem descri\xE7\xE3o"},components:{callout:{note:"Nota",abstract:"Abstrato",info:"Info",todo:"Pend\xEAncia",tip:"Dica",success:"Sucesso",question:"Pergunta",warning:"Aviso",failure:"Falha",danger:"Perigo",bug:"Bug",example:"Exemplo",quote:"Cita\xE7\xE3o"},backlinks:{title:"Backlinks",noBacklinksFound:"Sem backlinks encontrados"},themeToggle:{lightMode:"Tema claro",darkMode:"Tema escuro"},explorer:{title:"Explorador"},footer:{createdWith:"Criado com"},graph:{title:"Vis\xE3o de gr\xE1fico"},recentNotes:{title:"Notas recentes",seeRemainingMore:__name(({remaining})=>`Veja mais ${remaining} \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Transcrever de ${targetSlug}`,"transcludeOf"),linkToOriginal:"Link ao original"},search:{title:"Pesquisar",searchBarPlaceholder:"Pesquisar por algo"},tableOfContents:{title:"Sum\xE1rio"},contentMeta:{readingTime:__name(({minutes})=>`Leitura de ${minutes} min`,"readingTime")}},pages:{rss:{recentNotes:"Notas recentes",lastFewNotes:__name(({count})=>`\xDAltimas ${count} notas`,"lastFewNotes")},error:{title:"N\xE3o encontrado",notFound:"Esta p\xE1gina \xE9 privada ou n\xE3o existe.",home:"Retornar a p\xE1gina inicial"},folderContent:{folder:"Arquivo",itemsUnderFolder:__name(({count})=>count===1?"1 item neste arquivo.":`${count} items neste arquivo.`,"itemsUnderFolder")},tagContent:{tag:"Tag",tagIndex:"Sum\xE1rio de Tags",itemsUnderTag:__name(({count})=>count===1?"1 item com esta tag.":`${count} items com esta tag.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Mostrando as ${count} primeiras tags.`,"showingFirst"),totalTags:__name(({count})=>`Encontradas ${count} tags.`,"totalTags")}}};var hu_HU_default={propertyDefaults:{title:"N\xE9vtelen",description:"Nincs le\xEDr\xE1s"},components:{callout:{note:"Jegyzet",abstract:"Abstract",info:"Inform\xE1ci\xF3",todo:"Tennival\xF3",tip:"Tipp",success:"Siker",question:"K\xE9rd\xE9s",warning:"Figyelmeztet\xE9s",failure:"Hiba",danger:"Vesz\xE9ly",bug:"Bug",example:"P\xE9lda",quote:"Id\xE9zet"},backlinks:{title:"Visszautal\xE1sok",noBacklinksFound:"Nincs visszautal\xE1s"},themeToggle:{lightMode:"Vil\xE1gos m\xF3d",darkMode:"S\xF6t\xE9t m\xF3d"},explorer:{title:"F\xE1jlb\xF6ng\xE9sz\u0151"},footer:{createdWith:"K\xE9sz\xEDtve ezzel:"},graph:{title:"Grafikonn\xE9zet"},recentNotes:{title:"Legut\xF3bbi jegyzetek",seeRemainingMore:__name(({remaining})=>`${remaining} tov\xE1bbi megtekint\xE9se \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`${targetSlug} \xE1thivatkoz\xE1sa`,"transcludeOf"),linkToOriginal:"Hivatkoz\xE1s az eredetire"},search:{title:"Keres\xE9s",searchBarPlaceholder:"Keress valamire"},tableOfContents:{title:"Tartalomjegyz\xE9k"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} perces olvas\xE1s`,"readingTime")}},pages:{rss:{recentNotes:"Legut\xF3bbi jegyzetek",lastFewNotes:__name(({count})=>`Legut\xF3bbi ${count} jegyzet`,"lastFewNotes")},error:{title:"Nem tal\xE1lhat\xF3",notFound:"Ez a lap vagy priv\xE1t vagy nem l\xE9tezik.",home:"Vissza a kezd\u0151lapra"},folderContent:{folder:"Mappa",itemsUnderFolder:__name(({count})=>`Ebben a mapp\xE1ban ${count} elem tal\xE1lhat\xF3.`,"itemsUnderFolder")},tagContent:{tag:"C\xEDmke",tagIndex:"C\xEDmke index",itemsUnderTag:__name(({count})=>`${count} elem tal\xE1lhat\xF3 ezzel a c\xEDmk\xE9vel.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Els\u0151 ${count} c\xEDmke megjelen\xEDtve.`,"showingFirst"),totalTags:__name(({count})=>`\xD6sszesen ${count} c\xEDmke tal\xE1lhat\xF3.`,"totalTags")}}};var fa_IR_default={propertyDefaults:{title:"\u0628\u062F\u0648\u0646 \u0639\u0646\u0648\u0627\u0646",description:"\u062A\u0648\u0636\u06CC\u062D \u062E\u0627\u0635\u06CC \u0627\u0636\u0627\u0641\u0647 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A"},components:{callout:{note:"\u06CC\u0627\u062F\u062F\u0627\u0634\u062A",abstract:"\u0686\u06A9\u06CC\u062F\u0647",info:"\u0627\u0637\u0644\u0627\u0639\u0627\u062A",todo:"\u0627\u0642\u062F\u0627\u0645",tip:"\u0646\u06A9\u062A\u0647",success:"\u062A\u06CC\u06A9",question:"\u0633\u0624\u0627\u0644",warning:"\u0647\u0634\u062F\u0627\u0631",failure:"\u0634\u06A9\u0633\u062A",danger:"\u062E\u0637\u0631",bug:"\u0628\u0627\u06AF",example:"\u0645\u062B\u0627\u0644",quote:"\u0646\u0642\u0644 \u0642\u0648\u0644"},backlinks:{title:"\u0628\u06A9\u200C\u0644\u06CC\u0646\u06A9\u200C\u0647\u0627",noBacklinksFound:"\u0628\u062F\u0648\u0646 \u0628\u06A9\u200C\u0644\u06CC\u0646\u06A9"},themeToggle:{lightMode:"\u062D\u0627\u0644\u062A \u0631\u0648\u0634\u0646",darkMode:"\u062D\u0627\u0644\u062A \u062A\u0627\u0631\u06CC\u06A9"},explorer:{title:"\u0645\u0637\u0627\u0644\u0628"},footer:{createdWith:"\u0633\u0627\u062E\u062A\u0647 \u0634\u062F\u0647 \u0628\u0627"},graph:{title:"\u0646\u0645\u0627\u06CC \u06AF\u0631\u0627\u0641"},recentNotes:{title:"\u06CC\u0627\u062F\u062F\u0627\u0634\u062A\u200C\u0647\u0627\u06CC \u0627\u062E\u06CC\u0631",seeRemainingMore:__name(({remaining})=>`${remaining} \u06CC\u0627\u062F\u062F\u0627\u0634\u062A \u062F\u06CC\u06AF\u0631 \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`\u0627\u0632 ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u067E\u06CC\u0648\u0646\u062F \u0628\u0647 \u0627\u0635\u0644\u06CC"},search:{title:"\u062C\u0633\u062A\u062C\u0648",searchBarPlaceholder:"\u0645\u0637\u0644\u0628\u06CC \u0631\u0627 \u062C\u0633\u062A\u062C\u0648 \u06A9\u0646\u06CC\u062F"},tableOfContents:{title:"\u0641\u0647\u0631\u0633\u062A"},contentMeta:{readingTime:__name(({minutes})=>`\u0632\u0645\u0627\u0646 \u062A\u0642\u0631\u06CC\u0628\u06CC \u0645\u0637\u0627\u0644\u0639\u0647: ${minutes} \u062F\u0642\u06CC\u0642\u0647`,"readingTime")}},pages:{rss:{recentNotes:"\u06CC\u0627\u062F\u062F\u0627\u0634\u062A\u200C\u0647\u0627\u06CC \u0627\u062E\u06CC\u0631",lastFewNotes:__name(({count})=>`${count} \u06CC\u0627\u062F\u062F\u0627\u0634\u062A \u0627\u062E\u06CC\u0631`,"lastFewNotes")},error:{title:"\u06CC\u0627\u0641\u062A \u0646\u0634\u062F",notFound:"\u0627\u06CC\u0646 \u0635\u0641\u062D\u0647 \u06CC\u0627 \u062E\u0635\u0648\u0635\u06CC \u0627\u0633\u062A \u06CC\u0627 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F",home:"\u0628\u0627\u0632\u06AF\u0634\u062A \u0628\u0647 \u0635\u0641\u062D\u0647 \u0627\u0635\u0644\u06CC"},folderContent:{folder:"\u067E\u0648\u0634\u0647",itemsUnderFolder:__name(({count})=>count===1?".\u06CC\u06A9 \u0645\u0637\u0644\u0628 \u062F\u0631 \u0627\u06CC\u0646 \u067E\u0648\u0634\u0647 \u0627\u0633\u062A":`${count} \u0645\u0637\u0644\u0628 \u062F\u0631 \u0627\u06CC\u0646 \u067E\u0648\u0634\u0647 \u0627\u0633\u062A.`,"itemsUnderFolder")},tagContent:{tag:"\u0628\u0631\u0686\u0633\u0628",tagIndex:"\u0641\u0647\u0631\u0633\u062A \u0628\u0631\u0686\u0633\u0628\u200C\u0647\u0627",itemsUnderTag:__name(({count})=>count===1?"\u06CC\u06A9 \u0645\u0637\u0644\u0628 \u0628\u0627 \u0627\u06CC\u0646 \u0628\u0631\u0686\u0633\u0628":`${count} \u0645\u0637\u0644\u0628 \u0628\u0627 \u0627\u06CC\u0646 \u0628\u0631\u0686\u0633\u0628.`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u062F\u0631 \u062D\u0627\u0644 \u0646\u0645\u0627\u06CC\u0634 ${count} \u0628\u0631\u0686\u0633\u0628.`,"showingFirst"),totalTags:__name(({count})=>`${count} \u0628\u0631\u0686\u0633\u0628 \u06CC\u0627\u0641\u062A \u0634\u062F.`,"totalTags")}}};var pl_PL_default={propertyDefaults:{title:"Bez nazwy",description:"Brak opisu"},components:{callout:{note:"Notatka",abstract:"Streszczenie",info:"informacja",todo:"Do zrobienia",tip:"Wskaz\xF3wka",success:"Zrobione",question:"Pytanie",warning:"Ostrze\u017Cenie",failure:"Usterka",danger:"Niebiezpiecze\u0144stwo",bug:"B\u0142\u0105d w kodzie",example:"Przyk\u0142ad",quote:"Cytat"},backlinks:{title:"Odno\u015Bniki zwrotne",noBacklinksFound:"Brak po\u0142\u0105cze\u0144 zwrotnych"},themeToggle:{lightMode:"Trzyb jasny",darkMode:"Tryb ciemny"},explorer:{title:"Przegl\u0105daj"},footer:{createdWith:"Stworzone z u\u017Cyciem"},graph:{title:"Graf"},recentNotes:{title:"Najnowsze notatki",seeRemainingMore:__name(({remaining})=>`Zobacz ${remaining} nastepnych \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Osadzone ${targetSlug}`,"transcludeOf"),linkToOriginal:"\u0141\u0105cze do orygina\u0142u"},search:{title:"Szukaj",searchBarPlaceholder:"Search for something"},tableOfContents:{title:"Spis tre\u015Bci"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min. czytania `,"readingTime")}},pages:{rss:{recentNotes:"Najnowsze notatki",lastFewNotes:__name(({count})=>`Ostatnie ${count} notatek`,"lastFewNotes")},error:{title:"Nie znaleziono",notFound:"Ta strona jest prywatna lub nie istnieje.",home:"Powr\xF3t do strony g\u0142\xF3wnej"},folderContent:{folder:"Folder",itemsUnderFolder:__name(({count})=>count===1?"W tym folderze jest 1 element.":`Element\xF3w w folderze: ${count}.`,"itemsUnderFolder")},tagContent:{tag:"Znacznik",tagIndex:"Spis znacznik\xF3w",itemsUnderTag:__name(({count})=>count===1?"Oznaczony 1 element.":`Element\xF3w z tym znacznikiem: ${count}.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Pokazuje ${count} pierwszych znacznik\xF3w.`,"showingFirst"),totalTags:__name(({count})=>`Znalezionych wszystkich znacznik\xF3w: ${count}.`,"totalTags")}}};var cs_CZ_default={propertyDefaults:{title:"Bez n\xE1zvu",description:"Nebyl uveden \u017E\xE1dn\xFD popis"},components:{callout:{note:"Pozn\xE1mka",abstract:"Abstract",info:"Info",todo:"Todo",tip:"Tip",success:"\xDAsp\u011Bch",question:"Ot\xE1zka",warning:"Upozorn\u011Bn\xED",failure:"Chyba",danger:"Nebezpe\u010D\xED",bug:"Bug",example:"P\u0159\xEDklad",quote:"Citace"},backlinks:{title:"P\u0159\xEDchoz\xED odkazy",noBacklinksFound:"Nenalezeny \u017E\xE1dn\xE9 p\u0159\xEDchoz\xED odkazy"},themeToggle:{lightMode:"Sv\u011Btl\xFD re\u017Eim",darkMode:"Tmav\xFD re\u017Eim"},explorer:{title:"Proch\xE1zet"},footer:{createdWith:"Vytvo\u0159eno pomoc\xED"},graph:{title:"Graf"},recentNotes:{title:"Nejnov\u011Bj\u0161\xED pozn\xE1mky",seeRemainingMore:__name(({remaining})=>`Zobraz ${remaining} dal\u0161\xEDch \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`Zobrazen\xED ${targetSlug}`,"transcludeOf"),linkToOriginal:"Odkaz na p\u016Fvodn\xED dokument"},search:{title:"Hledat",searchBarPlaceholder:"Hledejte n\u011Bco"},tableOfContents:{title:"Obsah"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} min \u010Dten\xED`,"readingTime")}},pages:{rss:{recentNotes:"Nejnov\u011Bj\u0161\xED pozn\xE1mky",lastFewNotes:__name(({count})=>`Posledn\xEDch ${count} pozn\xE1mek`,"lastFewNotes")},error:{title:"Nenalezeno",notFound:"Tato str\xE1nka je bu\u010F soukrom\xE1, nebo neexistuje.",home:"N\xE1vrat na domovskou str\xE1nku"},folderContent:{folder:"Slo\u017Eka",itemsUnderFolder:__name(({count})=>count===1?"1 polo\u017Eka v t\xE9to slo\u017Ece.":`${count} polo\u017Eek v t\xE9to slo\u017Ece.`,"itemsUnderFolder")},tagContent:{tag:"Tag",tagIndex:"Rejst\u0159\xEDk tag\u016F",itemsUnderTag:__name(({count})=>count===1?"1 polo\u017Eka s t\xEDmto tagem.":`${count} polo\u017Eek s t\xEDmto tagem.`,"itemsUnderTag"),showingFirst:__name(({count})=>`Zobrazuj\xED se prvn\xED ${count} tagy.`,"showingFirst"),totalTags:__name(({count})=>`Nalezeno celkem ${count} tag\u016F.`,"totalTags")}}};var tr_TR_default={propertyDefaults:{title:"\u0130simsiz",description:"Herhangi bir a\xE7\u0131klama eklenmedi"},components:{callout:{note:"Not",abstract:"\xD6zet",info:"Bilgi",todo:"Yap\u0131lacaklar",tip:"\u0130pucu",success:"Ba\u015Far\u0131l\u0131",question:"Soru",warning:"Uyar\u0131",failure:"Ba\u015Far\u0131s\u0131z",danger:"Tehlike",bug:"Hata",example:"\xD6rnek",quote:"Al\u0131nt\u0131"},backlinks:{title:"Backlinkler",noBacklinksFound:"Backlink bulunamad\u0131"},themeToggle:{lightMode:"A\xE7\u0131k mod",darkMode:"Koyu mod"},explorer:{title:"Gezgin"},footer:{createdWith:"\u015Eununla olu\u015Fturuldu"},graph:{title:"Grafik G\xF6r\xFCn\xFCm\xFC"},recentNotes:{title:"Son Notlar",seeRemainingMore:__name(({remaining})=>`${remaining} tane daha g\xF6r \u2192`,"seeRemainingMore")},transcludes:{transcludeOf:__name(({targetSlug})=>`${targetSlug} sayfas\u0131ndan al\u0131nt\u0131`,"transcludeOf"),linkToOriginal:"Orijinal ba\u011Flant\u0131"},search:{title:"Arama",searchBarPlaceholder:"Bir \u015Fey aray\u0131n"},tableOfContents:{title:"\u0130\xE7indekiler"},contentMeta:{readingTime:__name(({minutes})=>`${minutes} dakika okuma s\xFCresi`,"readingTime")}},pages:{rss:{recentNotes:"Son notlar",lastFewNotes:__name(({count})=>`Son ${count} not`,"lastFewNotes")},error:{title:"Bulunamad\u0131",notFound:"Bu sayfa ya \xF6zel ya da mevcut de\u011Fil.",home:"Anasayfaya geri d\xF6n"},folderContent:{folder:"Klas\xF6r",itemsUnderFolder:__name(({count})=>count===1?"Bu klas\xF6r alt\u0131nda 1 \xF6\u011Fe.":`Bu klas\xF6r alt\u0131ndaki ${count} \xF6\u011Fe.`,"itemsUnderFolder")},tagContent:{tag:"Etiket",tagIndex:"Etiket S\u0131ras\u0131",itemsUnderTag:__name(({count})=>count===1?"Bu etikete sahip 1 \xF6\u011Fe.":`Bu etiket alt\u0131ndaki ${count} \xF6\u011Fe.`,"itemsUnderTag"),showingFirst:__name(({count})=>`\u0130lk ${count} etiket g\xF6steriliyor.`,"showingFirst"),totalTags:__name(({count})=>`Toplam ${count} adet etiket bulundu.`,"totalTags")}}};var TRANSLATIONS={"en-US":en_US_default,"en-GB":en_GB_default,"fr-FR":fr_FR_default,"it-IT":it_IT_default,"ja-JP":ja_JP_default,"de-DE":de_DE_default,"nl-NL":nl_NL_default,"nl-BE":nl_NL_default,"ro-RO":ro_RO_default,"ro-MD":ro_RO_default,"ca-ES":ca_ES_default,"es-ES":es_ES_default,"ar-SA":ar_SA_default,"ar-AE":ar_SA_default,"ar-QA":ar_SA_default,"ar-BH":ar_SA_default,"ar-KW":ar_SA_default,"ar-OM":ar_SA_default,"ar-YE":ar_SA_default,"ar-IR":ar_SA_default,"ar-SY":ar_SA_default,"ar-IQ":ar_SA_default,"ar-JO":ar_SA_default,"ar-PL":ar_SA_default,"ar-LB":ar_SA_default,"ar-EG":ar_SA_default,"ar-SD":ar_SA_default,"ar-LY":ar_SA_default,"ar-MA":ar_SA_default,"ar-TN":ar_SA_default,"ar-DZ":ar_SA_default,"ar-MR":ar_SA_default,"uk-UA":uk_UA_default,"ru-RU":ru_RU_default,"ko-KR":ko_KR_default,"zh-CN":zh_CN_default,"zh-TW":zh_TW_default,"vi-VN":vi_VN_default,"pt-BR":pt_BR_default,"hu-HU":hu_HU_default,"fa-IR":fa_IR_default,"pl-PL":pl_PL_default,"cs-CZ":cs_CZ_default,"tr-TR":tr_TR_default},defaultTranslation="en-US",i18n=__name(locale=>TRANSLATIONS[locale??defaultTranslation],"i18n");var defaultOptions={delimiters:"---",language:"yaml"};function coalesceAliases(data,aliases){for(let alias of aliases)if(data[alias]!==void 0&&data[alias]!==null)return data[alias]}__name(coalesceAliases,"coalesceAliases");function coerceToArray(input){if(input!=null)return Array.isArray(input)||(input=input.toString().split(",").map(tag=>tag.trim())),input.filter(tag=>typeof tag=="string"||typeof tag=="number").map(tag=>tag.toString())}__name(coerceToArray,"coerceToArray");var FrontMatter=__name(userOpts=>{let opts={...defaultOptions,...userOpts};return{name:"FrontMatter",markdownPlugins({cfg}){return[[remarkFrontmatter,["yaml","toml"]],()=>(_,file)=>{let{data}=matter(Buffer.from(file.value),{...opts,engines:{yaml:__name(s=>yaml.load(s,{schema:yaml.JSON_SCHEMA}),"yaml"),toml:__name(s=>toml.parse(s),"toml")}});data.title!=null&&data.title.toString()!==""?data.title=data.title.toString():data.title=file.stem??i18n(cfg.configuration.locale).propertyDefaults.title;let tags=coerceToArray(coalesceAliases(data,["tags","tag"]));tags&&(data.tags=[...new Set(tags.map(tag=>slugTag(tag)))]);let aliases=coerceToArray(coalesceAliases(data,["aliases","alias"]));aliases&&(data.aliases=aliases);let cssclasses=coerceToArray(coalesceAliases(data,["cssclasses","cssclass"]));cssclasses&&(data.cssclasses=cssclasses);let socialImage=coalesceAliases(data,["socialImage","image","cover"]),created=coalesceAliases(data,["created","date"]);created&&(data.created=created);let modified=coalesceAliases(data,["modified","lastmod","updated","last-modified"]);modified&&(data.modified=modified);let published=coalesceAliases(data,["published","publishDate","date"]);published&&(data.published=published),socialImage&&(data.socialImage=socialImage),file.data.frontmatter=data}]}}},"FrontMatter");import remarkGfm from"remark-gfm";import smartypants from"remark-smartypants";import rehypeSlug from"rehype-slug";import rehypeAutolinkHeadings from"rehype-autolink-headings";var defaultOptions2={enableSmartyPants:!0,linkHeadings:!0},GitHubFlavoredMarkdown=__name(userOpts=>{let opts={...defaultOptions2,...userOpts};return{name:"GitHubFlavoredMarkdown",markdownPlugins(){return opts.enableSmartyPants?[remarkGfm,smartypants]:[remarkGfm]},htmlPlugins(){return opts.linkHeadings?[rehypeSlug,[rehypeAutolinkHeadings,{behavior:"append",properties:{role:"anchor",ariaHidden:!0,tabIndex:-1,"data-no-popover":!0},content:{type:"element",tagName:"svg",properties:{width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},children:[{type:"element",tagName:"path",properties:{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},children:[]},{type:"element",tagName:"path",properties:{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},children:[]}]}}]]:[]}}},"GitHubFlavoredMarkdown");import rehypeCitation from"rehype-citation";import{visit}from"unist-util-visit";import fs from"fs";import path2 from"path";import{Repository}from"@napi-rs/simple-git";import chalk3 from"chalk";var defaultOptions3={priority:["frontmatter","git","filesystem"]};function coerceDate(fp,d){let dt=new Date(d),invalidDate=isNaN(dt.getTime())||dt.getTime()===0;return invalidDate&&d!==void 0&&console.log(chalk3.yellow(`
|
||
Warning: found invalid date "${d}" in \`${fp}\`. Supported formats: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format`)),invalidDate?new Date:dt}__name(coerceDate,"coerceDate");var CreatedModifiedDate=__name(userOpts=>{let opts={...defaultOptions3,...userOpts};return{name:"CreatedModifiedDate",markdownPlugins(){return[()=>{let repo;return async(_tree,file)=>{let created,modified,published,fp=file.data.filePath,fullFp=path2.isAbsolute(fp)?fp:path2.posix.join(file.cwd,fp);for(let source of opts.priority)if(source==="filesystem"){let st=await fs.promises.stat(fullFp);created||=st.birthtimeMs,modified||=st.mtimeMs}else if(source==="frontmatter"&&file.data.frontmatter)created||=file.data.frontmatter.created,modified||=file.data.frontmatter.modified,published||=file.data.frontmatter.published;else if(source==="git"){repo||(repo=Repository.discover(file.cwd));try{modified||=await repo.getFileLatestModifiedDateAsync(file.data.filePath)}catch{console.log(chalk3.yellow(`
|
||
Warning: ${file.data.filePath} isn't yet tracked by git, last modification date is not available for this file`))}}file.data.dates={created:coerceDate(fp,created),modified:coerceDate(fp,modified),published:coerceDate(fp,published)}}}]}}},"CreatedModifiedDate");import remarkMath from"remark-math";import rehypeKatex from"rehype-katex";import rehypeMathjax from"rehype-mathjax/svg";import rehypeTypst from"@myriaddreamin/rehype-typst";var Latex=__name(opts=>{let engine=opts?.renderEngine??"katex",macros=opts?.customMacros??{};return{name:"Latex",markdownPlugins(){return[remarkMath]},htmlPlugins(){switch(engine){case"katex":return[[rehypeKatex,{output:"html",macros,...opts?.katexOptions??{}}]];case"typst":return[[rehypeTypst,opts?.typstOptions??{}]];case"mathjax":return[[rehypeMathjax,{macros,...opts?.mathJaxOptions??{}}]];default:return[[rehypeMathjax,{macros,...opts?.mathJaxOptions??{}}]]}},externalResources(){switch(engine){case"katex":return{css:[{content:"https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css"}],js:[{src:"https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/contrib/copy-tex.min.js",loadTime:"afterDOMReady",contentType:"external"}]};default:return{css:[],js:[]}}}}},"Latex");import{toString}from"hast-util-to-string";var escapeHTML=__name(unsafe=>unsafe.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"),"escapeHTML"),unescapeHTML=__name(html=>html.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"').replaceAll("'","'"),"unescapeHTML");var defaultOptions4={descriptionLength:150,replaceExternalLinks:!0},urlRegex=new RegExp(/(https?:\/\/)?(?<domain>([\da-z\.-]+)\.([a-z\.]{2,6})(:\d+)?)(?<path>[\/\w\.-]*)(\?[\/\w\.=&;-]*)?/,"g"),Description=__name(userOpts=>{let opts={...defaultOptions4,...userOpts};return{name:"Description",htmlPlugins(){return[()=>async(tree,file)=>{let frontMatterDescription=file.data.frontmatter?.description,text=escapeHTML(toString(tree));opts.replaceExternalLinks&&(frontMatterDescription=frontMatterDescription?.replace(urlRegex,"$<domain>$<path>"),text=text.replace(urlRegex,"$<domain>$<path>"));let sentences=(frontMatterDescription??text).replace(/\s+/g," ").split(/\.\s/),finalDesc=[],len=opts.descriptionLength,sentenceIdx=0,currentDescriptionLength=0;if(sentences[0]!==void 0&&sentences[0].length>=len){let firstSentence=sentences[0].split(" ");for(;currentDescriptionLength<len;){let sentence=firstSentence[sentenceIdx];if(!sentence)break;finalDesc.push(sentence),currentDescriptionLength+=sentence.length,sentenceIdx++}finalDesc.push("...")}else for(;currentDescriptionLength<len;){let sentence=sentences[sentenceIdx];if(!sentence)break;let currentSentence=sentence.endsWith(".")?sentence:sentence+".";finalDesc.push(currentSentence),currentDescriptionLength+=currentSentence.length,sentenceIdx++}file.data.description=finalDesc.join(" "),file.data.text=text}]}}},"Description");import path3 from"path";import{visit as visit2}from"unist-util-visit";import isAbsoluteUrl from"is-absolute-url";var defaultOptions5={markdownLinkResolution:"absolute",prettyLinks:!0,openLinksInNewTab:!1,lazyLoad:!1,externalLinkIcon:!0},CrawlLinks=__name(userOpts=>{let opts={...defaultOptions5,...userOpts};return{name:"LinkProcessing",htmlPlugins(ctx){return[()=>(tree,file)=>{let curSlug=simplifySlug(file.data.slug),outgoing=new Set,transformOptions={strategy:opts.markdownLinkResolution,allSlugs:ctx.allSlugs};visit2(tree,"element",(node,_index,_parent)=>{if(node.tagName==="a"&&node.properties&&typeof node.properties.href=="string"){let dest=node.properties.href,classes=node.properties.className??[],isExternal=isAbsoluteUrl(dest);classes.push(isExternal?"external":"internal"),isExternal&&opts.externalLinkIcon&&node.children.push({type:"element",tagName:"svg",properties:{"aria-hidden":"true",class:"external-icon",style:"max-width:0.8em;max-height:0.8em",viewBox:"0 0 512 512"},children:[{type:"element",tagName:"path",properties:{d:"M320 0H288V64h32 82.7L201.4 265.4 178.7 288 224 333.3l22.6-22.6L448 109.3V192v32h64V192 32 0H480 320zM32 32H0V64 480v32H32 456h32V480 352 320H424v32 96H64V96h96 32V32H160 32z"},children:[]}]}),node.children.length===1&&node.children[0].type==="text"&&node.children[0].value!==dest&&classes.push("alias"),node.properties.className=classes,isExternal&&opts.openLinksInNewTab&&(node.properties.target="_blank");let isInternal=!(isAbsoluteUrl(dest)||dest.startsWith("#"));if(isInternal){dest=node.properties.href=transformLink(file.data.slug,dest,transformOptions);let canonicalDest=new URL(dest,"https://base.com/"+stripSlashes(curSlug,!0)).pathname,[destCanonical,_destAnchor]=splitAnchor(canonicalDest);destCanonical.endsWith("/")&&(destCanonical+="index");let full=decodeURIComponent(stripSlashes(destCanonical,!0)),simple=simplifySlug(full);outgoing.add(simple),node.properties["data-slug"]=full}opts.prettyLinks&&isInternal&&node.children.length===1&&node.children[0].type==="text"&&!node.children[0].value.startsWith("#")&&(node.children[0].value=path3.basename(node.children[0].value))}if(["img","video","audio","iframe"].includes(node.tagName)&&node.properties&&typeof node.properties.src=="string"&&(opts.lazyLoad&&(node.properties.loading="lazy"),!isAbsoluteUrl(node.properties.src))){let dest=node.properties.src;dest=node.properties.src=transformLink(file.data.slug,dest,transformOptions),node.properties.src=dest}}),file.data.links=[...outgoing]}]}}},"CrawlLinks");import{findAndReplace as mdastFindReplace}from"mdast-util-find-and-replace";import rehypeRaw from"rehype-raw";import{SKIP,visit as visit3}from"unist-util-visit";import path4 from"path";var callout_inline_default=`function c(){let t=this.parentElement;t.classList.toggle("is-collapsed");let l=t.classList.contains("is-collapsed")?this.scrollHeight:t.scrollHeight;t.style.maxHeight=l+"px";let o=t,e=t.parentElement;for(;e;){if(!e.classList.contains("callout"))return;let n=e.classList.contains("is-collapsed")?e.scrollHeight:e.scrollHeight+o.scrollHeight;e.style.maxHeight=n+"px",o=e,e=e.parentElement}}function i(){let t=document.getElementsByClassName("callout is-collapsible");for(let s of t){let l=s.firstElementChild;if(l){l.addEventListener("click",c),window.addCleanup(()=>l.removeEventListener("click",c));let e=s.classList.contains("is-collapsed")?l.scrollHeight:s.scrollHeight;s.style.maxHeight=e+"px"}}}document.addEventListener("nav",i);window.addEventListener("resize",i);
|
||
`;var checkbox_inline_default='var m=Object.create;var f=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var j=(e,t,n,A)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of S(t))!b.call(e,i)&&i!==n&&f(e,i,{get:()=>t[i],enumerable:!(A=x(t,i))||A.enumerable});return e};var v=(e,t,n)=>(n=e!=null?m(y(e)):{},j(t||!e||!e.__esModule?f(n,"default",{value:e,enumerable:!0}):n,e));var p=R((_,g)=>{"use strict";g.exports=w;function B(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function w(e){if(e=e||{},e.circles)return L(e);let t=new Map;if(t.set(Date,F=>new Date(F)),t.set(Map,(F,E)=>new Map(A(Array.from(F),E))),t.set(Set,(F,E)=>new Set(A(Array.from(F),E))),e.constructorHandlers)for(let F of e.constructorHandlers)t.set(F[0],F[1]);let n=null;return e.proto?C:i;function A(F,E){let u=Object.keys(F),D=new Array(u.length);for(let l=0;l<u.length;l++){let r=u[l],s=F[r];typeof s!="object"||s===null?D[r]=s:s.constructor!==Object&&(n=t.get(s.constructor))?D[r]=n(s,E):ArrayBuffer.isView(s)?D[r]=B(s):D[r]=E(s)}return D}function i(F){if(typeof F!="object"||F===null)return F;if(Array.isArray(F))return A(F,i);if(F.constructor!==Object&&(n=t.get(F.constructor)))return n(F,i);let E={};for(let u in F){if(Object.hasOwnProperty.call(F,u)===!1)continue;let D=F[u];typeof D!="object"||D===null?E[u]=D:D.constructor!==Object&&(n=t.get(D.constructor))?E[u]=n(D,i):ArrayBuffer.isView(D)?E[u]=B(D):E[u]=i(D)}return E}function C(F){if(typeof F!="object"||F===null)return F;if(Array.isArray(F))return A(F,C);if(F.constructor!==Object&&(n=t.get(F.constructor)))return n(F,C);let E={};for(let u in F){let D=F[u];typeof D!="object"||D===null?E[u]=D:D.constructor!==Object&&(n=t.get(D.constructor))?E[u]=n(D,C):ArrayBuffer.isView(D)?E[u]=B(D):E[u]=C(D)}return E}}function L(e){let t=[],n=[],A=new Map;if(A.set(Date,u=>new Date(u)),A.set(Map,(u,D)=>new Map(C(Array.from(u),D))),A.set(Set,(u,D)=>new Set(C(Array.from(u),D))),e.constructorHandlers)for(let u of e.constructorHandlers)A.set(u[0],u[1]);let i=null;return e.proto?E:F;function C(u,D){let l=Object.keys(u),r=new Array(l.length);for(let s=0;s<l.length;s++){let c=l[s],o=u[c];if(typeof o!="object"||o===null)r[c]=o;else if(o.constructor!==Object&&(i=A.get(o.constructor)))r[c]=i(o,D);else if(ArrayBuffer.isView(o))r[c]=B(o);else{let a=t.indexOf(o);a!==-1?r[c]=n[a]:r[c]=D(o)}}return r}function F(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return C(u,F);if(u.constructor!==Object&&(i=A.get(u.constructor)))return i(u,F);let D={};t.push(u),n.push(D);for(let l in u){if(Object.hasOwnProperty.call(u,l)===!1)continue;let r=u[l];if(typeof r!="object"||r===null)D[l]=r;else if(r.constructor!==Object&&(i=A.get(r.constructor)))D[l]=i(r,F);else if(ArrayBuffer.isView(r))D[l]=B(r);else{let s=t.indexOf(r);s!==-1?D[l]=n[s]:D[l]=F(r)}}return t.pop(),n.pop(),D}function E(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return C(u,E);if(u.constructor!==Object&&(i=A.get(u.constructor)))return i(u,E);let D={};t.push(u),n.push(D);for(let l in u){let r=u[l];if(typeof r!="object"||r===null)D[l]=r;else if(r.constructor!==Object&&(i=A.get(r.constructor)))D[l]=i(r,E);else if(ArrayBuffer.isView(r))D[l]=B(r);else{let s=t.indexOf(r);s!==-1?D[l]=n[s]:D[l]=E(r)}}return t.pop(),n.pop(),D}}});var W=Object.hasOwnProperty;var d=v(p(),1),$=(0,d.default)();function h(e){return e.document.body.dataset.slug}var O=e=>`${h(window)}-checkbox-${e}`;document.addEventListener("nav",()=>{document.querySelectorAll("input.checkbox-toggle").forEach((t,n)=>{let A=O(n),i=C=>{let F=C.target?.checked?"true":"false";localStorage.setItem(A,F)};t.addEventListener("change",i),window.addCleanup(()=>t.removeEventListener("change",i)),localStorage.getItem(A)==="true"&&(t.checked=!0)})});\n';var mermaid_inline_default='var Wme=Object.create;var wE=Object.defineProperty;var Hme=Object.getOwnPropertyDescriptor;var qme=Object.getOwnPropertyNames;var Yme=Object.getPrototypeOf,Xme=Object.prototype.hasOwnProperty;var F=(t,e)=>()=>(t&&(e=t(t=0)),e);var yi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),mr=(t,e)=>{for(var r in e)wE(t,r,{get:e[r],enumerable:!0})},bE=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of qme(e))!Xme.call(t,i)&&i!==r&&wE(t,i,{get:()=>e[i],enumerable:!(n=Hme(e,i))||n.enumerable});return t},pr=(t,e,r)=>(bE(t,e,"default"),r&&bE(r,e,"default")),ga=(t,e,r)=>(r=t!=null?Wme(Yme(t)):{},bE(e||!t||!t.__esModule?wE(r,"default",{value:t,enumerable:!0}):r,t));var Ux=yi((kE,TE)=>{(function(t,e){typeof kE=="object"&&typeof TE<"u"?TE.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(kE,function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",s="hour",o="day",l="week",u="month",h="quarter",f="year",d="date",p="Invalid Date",g=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,m=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var I=["th","st","nd","rd"],A=T%100;return"["+T+(I[(A-20)%10]||I[A]||I[0])+"]"}},y=function(T,I,A){var D=String(T);return!D||D.length>=I?T:""+Array(I+1-D.length).join(A)+T},b={s:y,z:function(T){var I=-T.utcOffset(),A=Math.abs(I),D=Math.floor(A/60),N=A%60;return(I<=0?"+":"-")+y(D,2,"0")+":"+y(N,2,"0")},m:function T(I,A){if(I.date()<A.date())return-T(A,I);var D=12*(A.year()-I.year())+(A.month()-I.month()),N=I.clone().add(D,u),O=A-N<0,B=I.clone().add(D+(O?-1:1),u);return+(-(D+(A-N)/(O?N-B:B-N))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:u,y:f,w:l,d:o,D:d,h:s,m:a,s:i,ms:n,Q:h}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},w="en",_={};_[w]=x;var k="$isDayjsObject",E=function(T){return T instanceof M||!(!T||!T[k])},L=function T(I,A,D){var N;if(!I)return w;if(typeof I=="string"){var O=I.toLowerCase();_[O]&&(N=O),A&&(_[O]=A,N=O);var B=I.split("-");if(!N&&B.length>1)return T(B[0])}else{var P=I.name;_[P]=I,N=P}return!D&&N&&(w=N),N||!D&&w},S=function(T,I){if(E(T))return T.clone();var A=typeof I=="object"?I:{};return A.date=T,A.args=arguments,new M(A)},C=b;C.l=L,C.i=E,C.w=function(T,I){return S(T,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var M=function(){function T(A){this.$L=L(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[k]=!0}var I=T.prototype;return I.parse=function(A){this.$d=function(D){var N=D.date,O=D.utc;if(N===null)return new Date(NaN);if(C.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var B=N.match(g);if(B){var P=B[2]-1||0,$=(B[7]||"0").substring(0,3);return O?new Date(Date.UTC(B[1],P,B[3]||1,B[4]||0,B[5]||0,B[6]||0,$)):new Date(B[1],P,B[3]||1,B[4]||0,B[5]||0,B[6]||0,$)}}return new Date(N)}(A),this.init()},I.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},I.$utils=function(){return C},I.isValid=function(){return this.$d.toString()!==p},I.isSame=function(A,D){var N=S(A);return this.startOf(D)<=N&&N<=this.endOf(D)},I.isAfter=function(A,D){return S(A)<this.startOf(D)},I.isBefore=function(A,D){return this.endOf(D)<S(A)},I.$g=function(A,D,N){return C.u(A)?this[D]:this.set(N,A)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(A,D){var N=this,O=!!C.u(D)||D,B=C.p(A),P=function(ee,J){var W=C.w(N.$u?Date.UTC(N.$y,J,ee):new Date(N.$y,J,ee),N);return O?W:W.endOf(o)},$=function(ee,J){return C.w(N.toDate()[ee].apply(N.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(J)),N)},z=this.$W,H=this.$M,Z=this.$D,X="set"+(this.$u?"UTC":"");switch(B){case f:return O?P(1,0):P(31,11);case u:return O?P(1,H):P(0,H+1);case l:var ie=this.$locale().weekStart||0,K=(z<ie?z+7:z)-ie;return P(O?Z-K:Z+(6-K),H);case o:case d:return $(X+"Hours",0);case s:return $(X+"Minutes",1);case a:return $(X+"Seconds",2);case i:return $(X+"Milliseconds",3);default:return this.clone()}},I.endOf=function(A){return this.startOf(A,!1)},I.$set=function(A,D){var N,O=C.p(A),B="set"+(this.$u?"UTC":""),P=(N={},N[o]=B+"Date",N[d]=B+"Date",N[u]=B+"Month",N[f]=B+"FullYear",N[s]=B+"Hours",N[a]=B+"Minutes",N[i]=B+"Seconds",N[n]=B+"Milliseconds",N)[O],$=O===o?this.$D+(D-this.$W):D;if(O===u||O===f){var z=this.clone().set(d,1);z.$d[P]($),z.init(),this.$d=z.set(d,Math.min(this.$D,z.daysInMonth())).$d}else P&&this.$d[P]($);return this.init(),this},I.set=function(A,D){return this.clone().$set(A,D)},I.get=function(A){return this[C.p(A)]()},I.add=function(A,D){var N,O=this;A=Number(A);var B=C.p(D),P=function(H){var Z=S(O);return C.w(Z.date(Z.date()+Math.round(H*A)),O)};if(B===u)return this.set(u,this.$M+A);if(B===f)return this.set(f,this.$y+A);if(B===o)return P(1);if(B===l)return P(7);var $=(N={},N[a]=e,N[s]=r,N[i]=t,N)[B]||1,z=this.$d.getTime()+A*$;return C.w(z,this)},I.subtract=function(A,D){return this.add(-1*A,D)},I.format=function(A){var D=this,N=this.$locale();if(!this.isValid())return N.invalidDate||p;var O=A||"YYYY-MM-DDTHH:mm:ssZ",B=C.z(this),P=this.$H,$=this.$m,z=this.$M,H=N.weekdays,Z=N.months,X=N.meridiem,ie=function(J,W,Y,Q){return J&&(J[W]||J(D,O))||Y[W].slice(0,Q)},K=function(J){return C.s(P%12||12,J,"0")},ee=X||function(J,W,Y){var Q=J<12?"AM":"PM";return Y?Q.toLowerCase():Q};return O.replace(m,function(J,W){return W||function(Y){switch(Y){case"YY":return String(D.$y).slice(-2);case"YYYY":return C.s(D.$y,4,"0");case"M":return z+1;case"MM":return C.s(z+1,2,"0");case"MMM":return ie(N.monthsShort,z,Z,3);case"MMMM":return ie(Z,z);case"D":return D.$D;case"DD":return C.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return ie(N.weekdaysMin,D.$W,H,2);case"ddd":return ie(N.weekdaysShort,D.$W,H,3);case"dddd":return H[D.$W];case"H":return String(P);case"HH":return C.s(P,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return ee(P,$,!0);case"A":return ee(P,$,!1);case"m":return String($);case"mm":return C.s($,2,"0");case"s":return String(D.$s);case"ss":return C.s(D.$s,2,"0");case"SSS":return C.s(D.$ms,3,"0");case"Z":return B}return null}(J)||B.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(A,D,N){var O,B=this,P=C.p(D),$=S(A),z=($.utcOffset()-this.utcOffset())*e,H=this-$,Z=function(){return C.m(B,$)};switch(P){case f:O=Z()/12;break;case u:O=Z();break;case h:O=Z()/3;break;case l:O=(H-z)/6048e5;break;case o:O=(H-z)/864e5;break;case s:O=H/r;break;case a:O=H/e;break;case i:O=H/t;break;default:O=H}return N?O:C.a(O)},I.daysInMonth=function(){return this.endOf(u).$D},I.$locale=function(){return _[this.$L]},I.locale=function(A,D){if(!A)return this.$L;var N=this.clone(),O=L(A,D,!0);return O&&(N.$L=O),N},I.clone=function(){return C.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},T}(),R=M.prototype;return S.prototype=R,[["$ms",n],["$s",i],["$m",a],["$H",s],["$W",o],["$M",u],["$y",f],["$D",d]].forEach(function(T){R[T[1]]=function(I){return this.$g(I,T[0],T[1])}}),S.extend=function(T,I){return T.$i||(T(I,M,S),T.$i=!0),S},S.locale=L,S.isDayjs=E,S.unix=function(T){return S(1e3*T)},S.en=_[w],S.Ls=_,S.p={},S})});var Vx,JO,eP=F(()=>{Vx={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return Vx.hue2rgb(a,i,t+.3333333333333333)*255;case"g":return Vx.hue2rgb(a,i,t)*255;case"b":return Vx.hue2rgb(a,i,t-.3333333333333333)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;let i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;let o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}}},JO=Vx});var jme,tP,rP=F(()=>{jme={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},tP=jme});var Kme,nP,iP=F(()=>{Kme={dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},nP=Kme});var Zme,zt,Pl=F(()=>{eP();rP();iP();Zme={channel:JO,lang:tP,unit:nP},zt=Zme});var Fc,xi,t1=F(()=>{Pl();Fc={};for(let t=0;t<=255;t++)Fc[t]=zt.unit.dec2hex(t);xi={ALL:0,RGB:1,HSL:2}});var EE,aP,sP=F(()=>{t1();EE=class{constructor(){this.type=xi.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=xi.ALL}is(e){return this.type===e}},aP=EE});var SE,oP,lP=F(()=>{Pl();sP();t1();SE=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new aP}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=xi.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=zt.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=zt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=zt.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=zt.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=zt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=zt.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(xi.HSL)&&r!==void 0?r:(this._ensureHSL(),zt.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(xi.HSL)&&r!==void 0?r:(this._ensureHSL(),zt.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(xi.HSL)&&r!==void 0?r:(this._ensureHSL(),zt.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(xi.RGB)&&r!==void 0?r:(this._ensureRGB(),zt.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(xi.RGB)&&r!==void 0?r:(this._ensureRGB(),zt.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(xi.RGB)&&r!==void 0?r:(this._ensureRGB(),zt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(xi.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(xi.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(xi.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(xi.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(xi.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(xi.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},oP=SE});var Qme,Xu,r1=F(()=>{lP();Qme=new oP({r:0,g:0,b:0,a:0},"transparent"),Xu=Qme});var cP,bf,CE=F(()=>{r1();t1();cP={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(cP.re);if(!e)return;let r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,o=s?1:17,l=s?8:4,u=a?0:-1,h=s?255:15;return Xu.set({r:(n>>l*(u+3)&h)*o,g:(n>>l*(u+2)&h)*o,b:(n>>l*(u+1)&h)*o,a:a?(n&h)*o/255:1},t)},stringify:t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`#${Fc[Math.round(e)]}${Fc[Math.round(r)]}${Fc[Math.round(n)]}${Fc[Math.round(i*255)]}`:`#${Fc[Math.round(e)]}${Fc[Math.round(r)]}${Fc[Math.round(n)]}`}},bf=cP});var Wx,n1,uP=F(()=>{Pl();r1();Wx={re:/^hsla?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(?:deg|grad|rad|turn)?)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(%)?))?\\s*?\\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{let e=t.match(Wx.hueRe);if(e){let[,r,n]=e;switch(n){case"grad":return zt.channel.clamp.h(parseFloat(r)*.9);case"rad":return zt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return zt.channel.clamp.h(parseFloat(r)*360)}}return zt.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(Wx.re);if(!r)return;let[,n,i,a,s,o]=r;return Xu.set({h:Wx._hue2deg(n),s:zt.channel.clamp.s(parseFloat(i)),l:zt.channel.clamp.l(parseFloat(a)),a:s?zt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{let{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${zt.lang.round(e)}, ${zt.lang.round(r)}%, ${zt.lang.round(n)}%, ${i})`:`hsl(${zt.lang.round(e)}, ${zt.lang.round(r)}%, ${zt.lang.round(n)}%)`}},n1=Wx});var Hx,AE,hP=F(()=>{CE();Hx={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();let e=Hx.colors[t];if(e)return bf.parse(e)},stringify:t=>{let e=bf.stringify(t);for(let r in Hx.colors)if(Hx.colors[r]===e)return r}},AE=Hx});var fP,i1,dP=F(()=>{Pl();r1();fP={re:/^rgba?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?)))?\\s*?\\)$/i,parse:t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(fP.re);if(!r)return;let[,n,i,a,s,o,l,u,h]=r;return Xu.set({r:zt.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:zt.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:zt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?zt.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${zt.lang.round(e)}, ${zt.lang.round(r)}, ${zt.lang.round(n)}, ${zt.lang.round(i)})`:`rgb(${zt.lang.round(e)}, ${zt.lang.round(r)}, ${zt.lang.round(n)})`}},i1=fP});var Jme,bi,zc=F(()=>{CE();uP();hP();dP();t1();Jme={format:{keyword:AE,hex:bf,rgb:i1,rgba:i1,hsl:n1,hsla:n1},parse:t=>{if(typeof t!="string")return t;let e=bf.parse(t)||i1.parse(t)||n1.parse(t)||AE.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(xi.HSL)||t.data.r===void 0?n1.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?i1.stringify(t):bf.stringify(t)},bi=Jme});var e1e,qx,_E=F(()=>{Pl();zc();e1e=(t,e)=>{let r=bi.parse(t);for(let n in e)r[n]=zt.channel.clamp[n](e[n]);return bi.stringify(r)},qx=e1e});var t1e,Ns,LE=F(()=>{Pl();r1();zc();_E();t1e=(t,e,r=0,n=1)=>{if(typeof t!="number")return qx(t,{a:e});let i=Xu.set({r:zt.channel.clamp.r(t),g:zt.channel.clamp.g(e),b:zt.channel.clamp.b(r),a:zt.channel.clamp.a(n)});return bi.stringify(i)},Ns=t1e});var r1e,a1,pP=F(()=>{Pl();zc();r1e=(t,e)=>zt.lang.round(bi.parse(t)[e]),a1=r1e});var n1e,gP,mP=F(()=>{Pl();zc();n1e=t=>{let{r:e,g:r,b:n}=bi.parse(t),i=.2126*zt.channel.toLinear(e)+.7152*zt.channel.toLinear(r)+.0722*zt.channel.toLinear(n);return zt.lang.round(i)},gP=n1e});var i1e,vP,yP=F(()=>{mP();i1e=t=>gP(t)>=.5,vP=i1e});var a1e,Xi,xP=F(()=>{yP();a1e=t=>!vP(t),Xi=a1e});var s1e,Yx,RE=F(()=>{Pl();zc();s1e=(t,e,r)=>{let n=bi.parse(t),i=n[e],a=zt.channel.clamp[e](i+r);return i!==a&&(n[e]=a),bi.stringify(n)},Yx=s1e});var o1e,Et,bP=F(()=>{RE();o1e=(t,e)=>Yx(t,"l",e),Et=o1e});var l1e,It,wP=F(()=>{RE();l1e=(t,e)=>Yx(t,"l",-e),It=l1e});var c1e,Ne,kP=F(()=>{zc();_E();c1e=(t,e)=>{let r=bi.parse(t),n={};for(let i in e)e[i]&&(n[i]=r[i]+e[i]);return qx(t,n)},Ne=c1e});var u1e,TP,EP=F(()=>{zc();LE();u1e=(t,e,r=50)=>{let{r:n,g:i,b:a,a:s}=bi.parse(t),{r:o,g:l,b:u,a:h}=bi.parse(e),f=r/100,d=f*2-1,p=s-h,m=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,x=1-m,y=n*m+o*x,b=i*m+l*x,w=a*m+u*x,_=s*f+h*(1-f);return Ns(y,b,w,_)},TP=u1e});var h1e,ot,SP=F(()=>{zc();EP();h1e=(t,e=100)=>{let r=bi.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,TP(r,t,e)},ot=h1e});var CP=F(()=>{LE();pP();xP();bP();wP();kP();SP()});var so=F(()=>{CP()});function Is(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return PE(t,e,n)}}function v1e(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return BE(t,r)}}function vr(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Kx;_P&&_P(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){let a=r(i);a!==i&&(f1e(e)||(e[n]=a),i=a)}t[i]=!0}return t}function y1e(t){for(let e=0;e<t.length;e++)jo(t,e)||(t[e]=null);return t}function wf(t){let e=FP(null);for(let[r,n]of BP(t))jo(t,r)&&(Array.isArray(n)?e[r]=y1e(n):n&&typeof n=="object"&&n.constructor===Object?e[r]=wf(n):e[r]=n);return e}function c1(t,e){for(;t!==null;){let n=p1e(t,e);if(n){if(n.get)return Is(n.get);if(typeof n.value=="function")return Is(n.value)}t=d1e(t)}function r(){return null}return r}function GP(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:L1e(),e=vt=>GP(vt);if(e.version="3.2.3",e.removed=[],!t||!t.document||t.document.nodeType!==u1.document)return e.isSupported=!1,e;let{document:r}=t,n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:p}=t,g=l.prototype,m=c1(g,"cloneNode"),x=c1(g,"remove"),y=c1(g,"nextSibling"),b=c1(g,"childNodes"),w=c1(g,"parentNode");if(typeof s=="function"){let vt=r.createElement("template");vt.content&&vt.content.ownerDocument&&(r=vt.content.ownerDocument)}let _,k="",{implementation:E,createNodeIterator:L,createDocumentFragment:S,getElementsByTagName:C}=r,{importNode:M}=n,R=PP();e.isSupported=typeof BP=="function"&&typeof w=="function"&&E&&E.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:T,ERB_EXPR:I,TMPLIT_EXPR:A,DATA_ATTR:D,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:P}=OP,{IS_ALLOWED_URI:$}=OP,z=null,H=vr({},[...NP,...IE,...ME,...DE,...IP]),Z=null,X=vr({},[...MP,...OE,...DP,...jx]),ie=Object.seal(FP(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),K=null,ee=null,J=!0,W=!0,Y=!1,Q=!0,se=!1,ue=!0,ce=!1,te=!1,Le=!1,oe=!1,be=!1,Fe=!1,Be=!0,Ve=!1,We="user-content-",qe=!0,Re=!1,Me={},ye=null,q=vr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),de=null,ae=vr({},["audio","video","img","source","image","track"]),he=null,U=vr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ke="http://www.w3.org/1998/Math/MathML",j="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml",Se=me,Pe=!1,Ie=null,ge=vr({},[ke,j,me],NE),ze=vr({},["mi","mo","mn","ms","mtext"]),Ae=vr({},["annotation-xml"]),Ye=vr({},["title","style","font","a","script"]),it=null,wt=["application/xhtml+xml","text/html"],ft="text/html",He=null,ut=null,$e=r.createElement("form"),Ze=function(Ee){return Ee instanceof RegExp||Ee instanceof Function},at=function(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ut&&ut===Ee)){if((!Ee||typeof Ee!="object")&&(Ee={}),Ee=wf(Ee),it=wt.indexOf(Ee.PARSER_MEDIA_TYPE)===-1?ft:Ee.PARSER_MEDIA_TYPE,He=it==="application/xhtml+xml"?NE:Kx,z=jo(Ee,"ALLOWED_TAGS")?vr({},Ee.ALLOWED_TAGS,He):H,Z=jo(Ee,"ALLOWED_ATTR")?vr({},Ee.ALLOWED_ATTR,He):X,Ie=jo(Ee,"ALLOWED_NAMESPACES")?vr({},Ee.ALLOWED_NAMESPACES,NE):ge,he=jo(Ee,"ADD_URI_SAFE_ATTR")?vr(wf(U),Ee.ADD_URI_SAFE_ATTR,He):U,de=jo(Ee,"ADD_DATA_URI_TAGS")?vr(wf(ae),Ee.ADD_DATA_URI_TAGS,He):ae,ye=jo(Ee,"FORBID_CONTENTS")?vr({},Ee.FORBID_CONTENTS,He):q,K=jo(Ee,"FORBID_TAGS")?vr({},Ee.FORBID_TAGS,He):{},ee=jo(Ee,"FORBID_ATTR")?vr({},Ee.FORBID_ATTR,He):{},Me=jo(Ee,"USE_PROFILES")?Ee.USE_PROFILES:!1,J=Ee.ALLOW_ARIA_ATTR!==!1,W=Ee.ALLOW_DATA_ATTR!==!1,Y=Ee.ALLOW_UNKNOWN_PROTOCOLS||!1,Q=Ee.ALLOW_SELF_CLOSE_IN_ATTR!==!1,se=Ee.SAFE_FOR_TEMPLATES||!1,ue=Ee.SAFE_FOR_XML!==!1,ce=Ee.WHOLE_DOCUMENT||!1,oe=Ee.RETURN_DOM||!1,be=Ee.RETURN_DOM_FRAGMENT||!1,Fe=Ee.RETURN_TRUSTED_TYPE||!1,Le=Ee.FORCE_BODY||!1,Be=Ee.SANITIZE_DOM!==!1,Ve=Ee.SANITIZE_NAMED_PROPS||!1,qe=Ee.KEEP_CONTENT!==!1,Re=Ee.IN_PLACE||!1,$=Ee.ALLOWED_URI_REGEXP||zP,Se=Ee.NAMESPACE||me,ze=Ee.MATHML_TEXT_INTEGRATION_POINTS||ze,Ae=Ee.HTML_INTEGRATION_POINTS||Ae,ie=Ee.CUSTOM_ELEMENT_HANDLING||{},Ee.CUSTOM_ELEMENT_HANDLING&&Ze(Ee.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ie.tagNameCheck=Ee.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ee.CUSTOM_ELEMENT_HANDLING&&Ze(Ee.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ie.attributeNameCheck=Ee.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ee.CUSTOM_ELEMENT_HANDLING&&typeof Ee.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ie.allowCustomizedBuiltInElements=Ee.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),se&&(W=!1),be&&(oe=!0),Me&&(z=vr({},IP),Z=[],Me.html===!0&&(vr(z,NP),vr(Z,MP)),Me.svg===!0&&(vr(z,IE),vr(Z,OE),vr(Z,jx)),Me.svgFilters===!0&&(vr(z,ME),vr(Z,OE),vr(Z,jx)),Me.mathMl===!0&&(vr(z,DE),vr(Z,DP),vr(Z,jx))),Ee.ADD_TAGS&&(z===H&&(z=wf(z)),vr(z,Ee.ADD_TAGS,He)),Ee.ADD_ATTR&&(Z===X&&(Z=wf(Z)),vr(Z,Ee.ADD_ATTR,He)),Ee.ADD_URI_SAFE_ATTR&&vr(he,Ee.ADD_URI_SAFE_ATTR,He),Ee.FORBID_CONTENTS&&(ye===q&&(ye=wf(ye)),vr(ye,Ee.FORBID_CONTENTS,He)),qe&&(z["#text"]=!0),ce&&vr(z,["html","head","body"]),z.table&&(vr(z,["tbody"]),delete K.tbody),Ee.TRUSTED_TYPES_POLICY){if(typeof Ee.TRUSTED_TYPES_POLICY.createHTML!="function")throw l1(\'TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.\');if(typeof Ee.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw l1(\'TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.\');_=Ee.TRUSTED_TYPES_POLICY,k=_.createHTML("")}else _===void 0&&(_=R1e(p,i)),_!==null&&typeof k=="string"&&(k=_.createHTML(""));Ma&&Ma(Ee),ut=Ee}},mt=vr({},[...IE,...ME,...x1e]),Ut=vr({},[...DE,...b1e]),st=function(Ee){let tt=w(Ee);(!tt||!tt.tagName)&&(tt={namespaceURI:Se,tagName:"template"});let bt=Kx(Ee.tagName),ir=Kx(tt.tagName);return Ie[Ee.namespaceURI]?Ee.namespaceURI===j?tt.namespaceURI===me?bt==="svg":tt.namespaceURI===ke?bt==="svg"&&(ir==="annotation-xml"||ze[ir]):!!mt[bt]:Ee.namespaceURI===ke?tt.namespaceURI===me?bt==="math":tt.namespaceURI===j?bt==="math"&&Ae[ir]:!!Ut[bt]:Ee.namespaceURI===me?tt.namespaceURI===j&&!Ae[ir]||tt.namespaceURI===ke&&!ze[ir]?!1:!Ut[bt]&&(Ye[bt]||!mt[bt]):!!(it==="application/xhtml+xml"&&Ie[Ee.namespaceURI]):!1},Qe=function(Ee){s1(e.removed,{element:Ee});try{w(Ee).removeChild(Ee)}catch{x(Ee)}},lt=function(Ee,tt){try{s1(e.removed,{attribute:tt.getAttributeNode(Ee),from:tt})}catch{s1(e.removed,{attribute:null,from:tt})}if(tt.removeAttribute(Ee),Ee==="is")if(oe||be)try{Qe(tt)}catch{}else try{tt.setAttribute(Ee,"")}catch{}},kt=function(Ee){let tt=null,bt=null;if(Le)Ee="<remove></remove>"+Ee;else{let vn=RP(Ee,/^[\\r\\n\\t ]+/);bt=vn&&vn[0]}it==="application/xhtml+xml"&&Se===me&&(Ee=\'<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>\'+Ee+"</body></html>");let ir=_?_.createHTML(Ee):Ee;if(Se===me)try{tt=new d().parseFromString(ir,it)}catch{}if(!tt||!tt.documentElement){tt=E.createDocument(Se,"template",null);try{tt.documentElement.innerHTML=Pe?k:ir}catch{}}let ln=tt.body||tt.documentElement;return Ee&&bt&&ln.insertBefore(r.createTextNode(bt),ln.childNodes[0]||null),Se===me?C.call(tt,ce?"html":"body")[0]:ce?tt.documentElement:ln},ht=function(Ee){return L.call(Ee.ownerDocument||Ee,Ee,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Rt=function(Ee){return Ee instanceof f&&(typeof Ee.nodeName!="string"||typeof Ee.textContent!="string"||typeof Ee.removeChild!="function"||!(Ee.attributes instanceof h)||typeof Ee.removeAttribute!="function"||typeof Ee.setAttribute!="function"||typeof Ee.namespaceURI!="string"||typeof Ee.insertBefore!="function"||typeof Ee.hasChildNodes!="function")},An=function(Ee){return typeof o=="function"&&Ee instanceof o};function Vt(vt,Ee,tt){Xx(vt,bt=>{bt.call(e,Ee,tt,ut)})}let Jr=function(Ee){let tt=null;if(Vt(R.beforeSanitizeElements,Ee,null),Rt(Ee))return Qe(Ee),!0;let bt=He(Ee.nodeName);if(Vt(R.uponSanitizeElement,Ee,{tagName:bt,allowedTags:z}),Ee.hasChildNodes()&&!An(Ee.firstElementChild)&&Ia(/<[/\\w]/g,Ee.innerHTML)&&Ia(/<[/\\w]/g,Ee.textContent)||Ee.nodeType===u1.progressingInstruction||ue&&Ee.nodeType===u1.comment&&Ia(/<[/\\w]/g,Ee.data))return Qe(Ee),!0;if(!z[bt]||K[bt]){if(!K[bt]&&Dr(bt)&&(ie.tagNameCheck instanceof RegExp&&Ia(ie.tagNameCheck,bt)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(bt)))return!1;if(qe&&!ye[bt]){let ir=w(Ee)||Ee.parentNode,ln=b(Ee)||Ee.childNodes;if(ln&&ir){let vn=ln.length;for(let Ln=vn-1;Ln>=0;--Ln){let In=m(ln[Ln],!0);In.__removalCount=(Ee.__removalCount||0)+1,ir.insertBefore(In,y(Ee))}}}return Qe(Ee),!0}return Ee instanceof l&&!st(Ee)||(bt==="noscript"||bt==="noembed"||bt==="noframes")&&Ia(/<\\/no(script|embed|frames)/i,Ee.innerHTML)?(Qe(Ee),!0):(se&&Ee.nodeType===u1.text&&(tt=Ee.textContent,Xx([T,I,A],ir=>{tt=o1(tt,ir," ")}),Ee.textContent!==tt&&(s1(e.removed,{element:Ee.cloneNode()}),Ee.textContent=tt)),Vt(R.afterSanitizeElements,Ee,null),!1)},mn=function(Ee,tt,bt){if(Be&&(tt==="id"||tt==="name")&&(bt in r||bt in $e))return!1;if(!(W&&!ee[tt]&&Ia(D,tt))){if(!(J&&Ia(N,tt))){if(!Z[tt]||ee[tt]){if(!(Dr(Ee)&&(ie.tagNameCheck instanceof RegExp&&Ia(ie.tagNameCheck,Ee)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(Ee))&&(ie.attributeNameCheck instanceof RegExp&&Ia(ie.attributeNameCheck,tt)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(tt))||tt==="is"&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&Ia(ie.tagNameCheck,bt)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(bt))))return!1}else if(!he[tt]){if(!Ia($,o1(bt,B,""))){if(!((tt==="src"||tt==="xlink:href"||tt==="href")&&Ee!=="script"&&g1e(bt,"data:")===0&&de[Ee])){if(!(Y&&!Ia(O,o1(bt,B,"")))){if(bt)return!1}}}}}}return!0},Dr=function(Ee){return Ee!=="annotation-xml"&&RP(Ee,P)},jn=function(Ee){Vt(R.beforeSanitizeAttributes,Ee,null);let{attributes:tt}=Ee;if(!tt||Rt(Ee))return;let bt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0},ir=tt.length;for(;ir--;){let ln=tt[ir],{name:vn,namespaceURI:Ln,value:In}=ln,dt=He(vn),yt=vn==="value"?In:m1e(In);if(bt.attrName=dt,bt.attrValue=yt,bt.keepAttr=!0,bt.forceKeepAttr=void 0,Vt(R.uponSanitizeAttribute,Ee,bt),yt=bt.attrValue,Ve&&(dt==="id"||dt==="name")&&(lt(vn,Ee),yt=We+yt),ue&&Ia(/((--!?|])>)|<\\/(style|title)/i,yt)){lt(vn,Ee);continue}if(bt.forceKeepAttr||(lt(vn,Ee),!bt.keepAttr))continue;if(!Q&&Ia(/\\/>/i,yt)){lt(vn,Ee);continue}se&&Xx([T,I,A],Ue=>{yt=o1(yt,Ue," ")});let Tt=He(Ee.nodeName);if(mn(Tt,dt,yt)){if(_&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ln)switch(p.getAttributeType(Tt,dt)){case"TrustedHTML":{yt=_.createHTML(yt);break}case"TrustedScriptURL":{yt=_.createScriptURL(yt);break}}try{Ln?Ee.setAttributeNS(Ln,vn,yt):Ee.setAttribute(vn,yt),Rt(Ee)?Qe(Ee):LP(e.removed)}catch{}}}Vt(R.afterSanitizeAttributes,Ee,null)},_n=function vt(Ee){let tt=null,bt=ht(Ee);for(Vt(R.beforeSanitizeShadowDOM,Ee,null);tt=bt.nextNode();)Vt(R.uponSanitizeShadowNode,tt,null),Jr(tt),jn(tt),tt.content instanceof a&&vt(tt.content);Vt(R.afterSanitizeShadowDOM,Ee,null)};return e.sanitize=function(vt){let Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tt=null,bt=null,ir=null,ln=null;if(Pe=!vt,Pe&&(vt="<!-->"),typeof vt!="string"&&!An(vt))if(typeof vt.toString=="function"){if(vt=vt.toString(),typeof vt!="string")throw l1("dirty is not a string, aborting")}else throw l1("toString is not a function");if(!e.isSupported)return vt;if(te||at(Ee),e.removed=[],typeof vt=="string"&&(Re=!1),Re){if(vt.nodeName){let In=He(vt.nodeName);if(!z[In]||K[In])throw l1("root node is forbidden and cannot be sanitized in-place")}}else if(vt instanceof o)tt=kt("<!---->"),bt=tt.ownerDocument.importNode(vt,!0),bt.nodeType===u1.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?tt=bt:tt.appendChild(bt);else{if(!oe&&!se&&!ce&&vt.indexOf("<")===-1)return _&&Fe?_.createHTML(vt):vt;if(tt=kt(vt),!tt)return oe?null:Fe?k:""}tt&&Le&&Qe(tt.firstChild);let vn=ht(Re?vt:tt);for(;ir=vn.nextNode();)Jr(ir),jn(ir),ir.content instanceof a&&_n(ir.content);if(Re)return vt;if(oe){if(be)for(ln=S.call(tt.ownerDocument);tt.firstChild;)ln.appendChild(tt.firstChild);else ln=tt;return(Z.shadowroot||Z.shadowrootmode)&&(ln=M.call(n,ln,!0)),ln}let Ln=ce?tt.outerHTML:tt.innerHTML;return ce&&z["!doctype"]&&tt.ownerDocument&&tt.ownerDocument.doctype&&tt.ownerDocument.doctype.name&&Ia($P,tt.ownerDocument.doctype.name)&&(Ln="<!DOCTYPE "+tt.ownerDocument.doctype.name+`>\n`+Ln),se&&Xx([T,I,A],In=>{Ln=o1(Ln,In," ")}),_&&Fe?_.createHTML(Ln):Ln},e.setConfig=function(){let vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};at(vt),te=!0},e.clearConfig=function(){ut=null,te=!1},e.isValidAttribute=function(vt,Ee,tt){ut||at({});let bt=He(vt),ir=He(Ee);return mn(bt,ir,tt)},e.addHook=function(vt,Ee){typeof Ee=="function"&&s1(R[vt],Ee)},e.removeHook=function(vt){return LP(R[vt])},e.removeHooks=function(vt){R[vt]=[]},e.removeAllHooks=function(){R=PP()},e}var BP,_P,f1e,d1e,p1e,Ma,oo,FP,PE,BE,Xx,LP,s1,Kx,NE,RP,o1,g1e,m1e,jo,Ia,l1,NP,IE,ME,x1e,DE,b1e,IP,MP,OE,DP,jx,w1e,k1e,T1e,E1e,S1e,zP,C1e,A1e,$P,_1e,OP,u1,L1e,R1e,PP,ju,FE=F(()=>{({entries:BP,setPrototypeOf:_P,isFrozen:f1e,getPrototypeOf:d1e,getOwnPropertyDescriptor:p1e}=Object),{freeze:Ma,seal:oo,create:FP}=Object,{apply:PE,construct:BE}=typeof Reflect<"u"&&Reflect;Ma||(Ma=function(e){return e});oo||(oo=function(e){return e});PE||(PE=function(e,r,n){return e.apply(r,n)});BE||(BE=function(e,r){return new e(...r)});Xx=Is(Array.prototype.forEach),LP=Is(Array.prototype.pop),s1=Is(Array.prototype.push),Kx=Is(String.prototype.toLowerCase),NE=Is(String.prototype.toString),RP=Is(String.prototype.match),o1=Is(String.prototype.replace),g1e=Is(String.prototype.indexOf),m1e=Is(String.prototype.trim),jo=Is(Object.prototype.hasOwnProperty),Ia=Is(RegExp.prototype.test),l1=v1e(TypeError);NP=Ma(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),IE=Ma(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ME=Ma(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),x1e=Ma(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),DE=Ma(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),b1e=Ma(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),IP=Ma(["#text"]),MP=Ma(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),OE=Ma(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),DP=Ma(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jx=Ma(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),w1e=oo(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm),k1e=oo(/<%[\\w\\W]*|[\\w\\W]*%>/gm),T1e=oo(/\\$\\{[\\w\\W]*}/gm),E1e=oo(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/),S1e=oo(/^aria-[\\-\\w]+$/),zP=oo(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),C1e=oo(/^(?:\\w+script|data):/i),A1e=oo(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),$P=oo(/^html$/i),_1e=oo(/^[a-z][.\\w]*(-[.\\w]+)+$/i),OP=Object.freeze({__proto__:null,ARIA_ATTR:S1e,ATTR_WHITESPACE:A1e,CUSTOM_ELEMENT:_1e,DATA_ATTR:E1e,DOCTYPE_NAME:$P,ERB_EXPR:k1e,IS_ALLOWED_URI:zP,IS_SCRIPT_OR_DATA:C1e,MUSTACHE_EXPR:w1e,TMPLIT_EXPR:T1e}),u1={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},L1e=function(){return typeof window>"u"?null:window},R1e=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},PP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};ju=GP()});var pF={};mr(pF,{default:()=>Eye});function B1e(t){return String(t).replace(P1e,e=>O1e[e])}function G1e(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function X1e(t){for(var e=0;e<ZE.length;e++)for(var r=ZE[e],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(t>=i[0]&&t<=i[1])return r.name}return null}function bB(t){for(var e=0;e<cb.length;e+=2)if(t>=cb[e]&&t<=cb[e+1])return!0;return!1}function ave(t,e){zl[t]=e}function uS(t,e,r){if(!zl[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=zl[e][n];if(!i&&t[0]in VP&&(n=VP[t[0]].charCodeAt(0),i=zl[e][n]),!i&&r==="text"&&bB(n)&&(i=zl[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function sve(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!zE[e]){var r=zE[e]={cssEmPerMu:Zx.quad[e]/18};for(var n in Zx)Zx.hasOwnProperty(n)&&(r[n]=Zx[n][e])}return zE[e]}function qP(t){if(t instanceof ts)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function uve(t){if(t instanceof Sf)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}function G(t,e,r,n,i,a){yn[t][i]={font:e,group:r,replace:n},a&&n&&(yn[t][n]=yn[t][i])}function xt(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l<r.length;++l)RB[r[l]]=o;e&&(a&&(db[e]=a),s&&(pb[e]=s))}function Cf(t){var{type:e,htmlBuilder:r,mathmlBuilder:n}=t;xt({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}function ib(t,e){var r=Wc(["base"],t,e),n=Wc(["strut"]);return n.style.height=ct(r.height+r.depth),r.depth&&(n.style.verticalAlign=ct(-r.depth)),r.children.unshift(n),r}function rS(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=wi(t,e,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],s=[],o=0;o<n.length;o++)if(s.push(n[o]),n[o].hasClass("mbin")||n[o].hasClass("mrel")||n[o].hasClass("allowbreak")){for(var l=!1;o<n.length-1&&n[o+1].hasClass("mspace")&&!n[o+1].hasClass("newline");)o++,s.push(n[o]),n[o].hasClass("nobreak")&&(l=!0);l||(a.push(ib(s,e)),s=[])}else n[o].hasClass("newline")&&(s.pop(),s.length>0&&(a.push(ib(s,e)),s=[]),a.push(n[o]));s.length>0&&a.push(ib(s,e));var u;r?(u=ib(wi(r,e,!0)),u.classes=["tag"],a.push(u)):i&&a.push(i);var h=Wc(["katex-html"],a);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=ct(h.height+h.depth),h.depth&&(f.style.verticalAlign=ct(-h.depth))}return h}function IB(t){return new Ef(t)}function ZP(t,e,r,n,i){var a=rs(t,r),s;a.length===1&&a[0]instanceof es&&Yt.contains(["mrow","mtable"],a[0].type)?s=a[0]:s=new rt.MathNode("mrow",a);var o=new rt.MathNode("annotation",[new rt.TextNode(e)]);o.setAttribute("encoding","application/x-tex");var l=new rt.MathNode("semantics",[s,o]),u=new rt.MathNode("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var h=i?"katex":"katex-mathml";return De.makeSpan([h],[u])}function ur(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function pS(t){var e=bb(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function bb(t){return t&&(t.type==="atom"||fve.hasOwnProperty(t.type))?t:null}function PB(t,e){var r=wi(t.body,e,!0);return Uve([t.mclass],r,e)}function BB(t,e){var r,n=rs(t.body,e);return t.mclass==="minner"?r=new rt.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new rt.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new rt.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function Hve(t,e,r){var n=Vve[t];switch(n){case"\\\\\\\\cdrightarrow":case"\\\\\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\\\uparrow":case"\\\\downarrow":{var i=r.callFunction("\\\\\\\\cdleft",[e[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\\\Big",[a],[]),o=r.callFunction("\\\\\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[i,s,o]};return r.callFunction("\\\\\\\\cdparent",[l],[])}case"\\\\\\\\cdlongequal":return r.callFunction("\\\\\\\\cdlongequal",[],[]);case"\\\\Vert":{var u={type:"textord",text:"\\\\Vert",mode:"math"};return r.callFunction("\\\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function qve(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\\\cr","\\\\\\\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\\\\\")t.consume();else if(r==="\\\\end"){e[e.length-1].length===0&&e.pop();break}else throw new nt("Expected \\\\\\\\ or \\\\cr or \\\\end",t.nextToken)}for(var n=[],i=[n],a=0;a<e.length;a++){for(var s=e[a],o=QP(),l=0;l<s.length;l++)if(!JP(s[l]))o.body.push(s[l]);else{n.push(o),l+=1;var u=pS(s[l]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(u)>-1))if("<>AV".indexOf(u)>-1)for(var f=0;f<2;f++){for(var d=!0,p=l+1;p<s.length;p++){if(Wve(s[p],u)){d=!1,l=p;break}if(JP(s[p]))throw new nt("Missing a "+u+" character to complete a CD arrow.",s[p]);h[f].body.push(s[p])}if(d)throw new nt("Missing a "+u+" character to complete a CD arrow.",s[l])}else throw new nt(\'Expected one of "<>AV=|." after @\',s[l]);var g=Hve(u,h,t),m={type:"styling",body:[g],mode:"math",style:"display"};n.push(m),o=QP()}a%2===0?n.push(o):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var x=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:x,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function kb(t,e){var r=bb(t);if(r&&Yt.contains(aye,r.text))return r;throw r?new nt("Invalid delimiter \'"+r.text+"\' after \'"+e.funcName+"\'",t):new nt("Invalid delimiter type \'"+t.type+"\'",t)}function tB(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn\'t fully parsed.")}function Gl(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<r.length;++l)KB[r[l]]=o;a&&(db[e]=a),s&&(pb[e]=s)}function le(t,e){ZB[t]=e}function rB(t){var e=[];t.consumeSpaces();var r=t.fetch().text;for(r==="\\\\relax"&&(t.consume(),t.consumeSpaces(),r=t.fetch().text);r==="\\\\hline"||r==="\\\\hdashline";)t.consume(),e.push(r==="\\\\hdashline"),t.consumeSpaces(),r=t.fetch().text;return e}function xS(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function eh(t,e,r){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:s,colSeparationType:o,autoTag:l,singleRow:u,emptySingleRow:h,maxNumCols:f,leqno:d}=e;if(t.gullet.beginGroup(),u||t.gullet.macros.set("\\\\cr","\\\\\\\\\\\\relax"),!s){var p=t.gullet.expandMacroAsText("\\\\arraystretch");if(p==null)s=1;else if(s=parseFloat(p),!s||s<0)throw new nt("Invalid \\\\arraystretch: "+p)}t.gullet.beginGroup();var g=[],m=[g],x=[],y=[],b=l!=null?[]:void 0;function w(){l&&t.gullet.macros.set("\\\\@eqnsw","1",!0)}function _(){b&&(t.gullet.macros.get("\\\\df@tag")?(b.push(t.subparse([new co("\\\\df@tag")])),t.gullet.macros.set("\\\\df@tag",void 0,!0)):b.push(!!l&&t.gullet.macros.get("\\\\@eqnsw")==="1"))}for(w(),y.push(rB(t));;){var k=t.parseExpression(!1,u?"\\\\end":"\\\\\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),k={type:"ordgroup",mode:t.mode,body:k},r&&(k={type:"styling",mode:t.mode,style:r,body:[k]}),g.push(k);var E=t.fetch().text;if(E==="&"){if(f&&g.length===f){if(u||o)throw new nt("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(E==="\\\\end"){_(),g.length===1&&k.type==="styling"&&k.body[0].body.length===0&&(m.length>1||!h)&&m.pop(),y.length<m.length+1&&y.push([]);break}else if(E==="\\\\\\\\"){t.consume();var L=void 0;t.gullet.future().text!==" "&&(L=t.parseSizeGroup(!0)),x.push(L?L.value:null),_(),y.push(rB(t)),g=[],m.push(g),w()}else throw new nt("Expected & or \\\\\\\\ or \\\\cr or \\\\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:i,arraystretch:s,body:m,cols:a,rowGaps:x,hskipBeforeAndAfter:n,hLinesBeforeRow:y,colSeparationType:o,tags:b,leqno:d}}function bS(t){return t.slice(0,1)==="d"?"display":"text"}function sF(t,e,r){for(var n=wi(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var s=n[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[a].classes,e.sizingClasses(r)):n[a].classes[s+1]==="reset-size"+e.size&&(n[a].classes[s+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return De.makeFragment(n)}var Ms,co,nt,N1e,I1e,M1e,D1e,O1e,P1e,xB,F1e,z1e,$1e,Yt,lb,g1,Bl,cS,ub,O0,Uc,m1,lo,P0,Da,Fl,U1e,V1e,W1e,H1e,q1e,Y1e,jt,ZE,cb,D0,j1e,K1e,Z1e,Q1e,J1e,eve,tve,rve,nve,UP,ive,Ef,zl,Zx,VP,zE,ove,WP,HP,hb,QE,lve,wB,Vn,ct,Qu,kB,TB,EB,Sf,v1,JE,cve,ts,Zo,$l,y1,hve,fve,yn,V,et,ne,ve,Mn,St,Oa,B0,Xt,di,Ds,yb,we,qc,Ce,SB,YP,$E,Qx,XP,GE,Jx,fb,h1,eb,Jt,Gn,ma,$c,Ku,eS,f1,tb,rb,jP,dve,xb,Ko,pve,gve,mve,vve,yve,hS,Ja,CB,xve,bve,AB,wve,kve,Tve,Eve,nb,_B,LB,Sve,De,Un,kf,Gc,Cve,Ave,RB,db,pb,gb,ai,Wc,_ve,Lve,Rve,Nve,wi,KP,NB,Ive,tS,x1,Cr,es,Tf,nS,rt,uo,fS,dS,rs,Ju,cn,MB,DB,Mve,Dve,Ove,Pve,Bve,Fve,zve,$ve,Hc,gS,OB,Gve,ab,Uve,wb,Vve,QP,JP,Wve,FB,zB,iS,$B,Yve,GB,d1,mS,UB,Xve,jve,VB,UE,VE,aS,sb,Kve,Zve,WB,WE,HE,qE,Qve,HB,Jve,qB,p1,eye,tye,rye,YB,nye,XB,jB,iye,Vc,eB,aye,vS,yS,KB,ZB,Tb,Ul,sye,Vl,QB,nB,JB,eF,iB,tF,wS,kS,aB,sB,rF,oye,YE,oB,nF,iF,F0,b1,lye,cye,aF,uye,lB,hye,cB,fye,oF,XE,jE,uB,hB,fB,dye,dB,pB,Zu,lF,pye,gye,mye,vye,sS,yye,xye,mb,oS,bye,gB,TS,mB,ES,cF,uF,hF,lS,vB,ob,KE,yB,vb,SS,fF,wye,kye,dF,CS,Tye,Eye,gF=F(()=>{Ms=class t{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new t(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}},co=class t{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new t(r,Ms.range(this,e))}},nt=class t{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,a,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;i=s.start,a=s.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,a).replace(/[^]/g,"$&\\u0332"),u;i>15?u="\\u2026"+o.slice(i-15,i):u=o.slice(0,i);var h;a+15<o.length?h=o.slice(a,a+15)+"\\u2026":h=o.slice(a),n+=u+l+h}var f=new Error(n);return f.name="ParseError",f.__proto__=t.prototype,f.position=i,i!=null&&a!=null&&(f.length=a-i),f.rawMessage=e,f}};nt.prototype.__proto__=Error.prototype;N1e=function(e,r){return e.indexOf(r)!==-1},I1e=function(e,r){return e===void 0?r:e},M1e=/([A-Z])/g,D1e=function(e){return e.replace(M1e,"-$1").toLowerCase()},O1e={"&":"&",">":">","<":"<",\'"\':""","\'":"'"},P1e=/[&><"\']/g;xB=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},F1e=function(e){var r=xB(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},z1e=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},$1e=function(e){var r=/^[\\x00-\\x20]*([^\\\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},Yt={contains:N1e,deflt:I1e,escape:B1e,hyphenate:D1e,getBaseElem:xB,isCharacterBox:F1e,protocolFromUrl:$1e},lb={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\\\int and \\\\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format \'rgb\' or \'rrggbb\' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form \'\\\\foo:expansion\' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\\\sqrt` top lines, `{array}` vertical lines, `\\\\hline`, `\\\\hdashline`, `\\\\underline`, `\\\\overline`, and the borders of `\\\\fbox`, `\\\\boxed`, and `\\\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\\\color behave like LaTeX\'s 2-argument \\\\textcolor, instead of LaTeX\'s one-argument \\\\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\\\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\\\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};g1=class{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in lb)if(lb.hasOwnProperty(r)){var n=lb[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:G1e(n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new nt("LaTeX-incompatible input and strict mode is set to \'error\': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to \'warn\': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized \'"+i+"\': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to \'warn\': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized \'"+i+"\': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=Yt.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}},Bl=class{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return Fl[U1e[this.id]]}sub(){return Fl[V1e[this.id]]}fracNum(){return Fl[W1e[this.id]]}fracDen(){return Fl[H1e[this.id]]}cramp(){return Fl[q1e[this.id]]}text(){return Fl[Y1e[this.id]]}isTight(){return this.size>=2}},cS=0,ub=1,O0=2,Uc=3,m1=4,lo=5,P0=6,Da=7,Fl=[new Bl(cS,0,!1),new Bl(ub,0,!0),new Bl(O0,1,!1),new Bl(Uc,1,!0),new Bl(m1,2,!1),new Bl(lo,2,!0),new Bl(P0,3,!1),new Bl(Da,3,!0)],U1e=[m1,lo,m1,lo,P0,Da,P0,Da],V1e=[lo,lo,lo,lo,Da,Da,Da,Da],W1e=[O0,Uc,m1,lo,P0,Da,P0,Da],H1e=[Uc,Uc,lo,lo,Da,Da,Da,Da],q1e=[ub,ub,Uc,Uc,lo,lo,Da,Da],Y1e=[cS,ub,O0,Uc,O0,Uc,O0,Uc],jt={DISPLAY:Fl[cS],TEXT:Fl[O0],SCRIPT:Fl[m1],SCRIPTSCRIPT:Fl[P0]},ZE=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];cb=[];ZE.forEach(t=>t.blocks.forEach(e=>cb.push(...e)));D0=80,j1e=function(e,r){return"M95,"+(622+e+r)+`\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl`+e/2.075+" -"+e+`\nc5.3,-9.3,12,-14,20,-14\nH400000v`+(40+e)+`H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},K1e=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl`+e/2.084+" -"+e+`\nc4.7,-7.3,11,-11,19,-11\nH40000v`+(40+e)+`H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Z1e=function(e,r){return"M983 "+(10+e+r)+`\nl`+e/3.13+" -"+e+`\nc4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Q1e=function(e,r){return"M424,"+(2398+e+r)+`\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000\nv`+(40+e)+`H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+`\nh400000v`+(40+e)+"h-400000z"},J1e=function(e,r){return"M473,"+(2713+e+r)+`\nc339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`\nc3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},eve=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},tve=function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+`\nH742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},rve=function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=j1e(r,D0);break;case"sqrtSize1":i=K1e(r,D0);break;case"sqrtSize2":i=Z1e(r,D0);break;case"sqrtSize3":i=Q1e(r,D0);break;case"sqrtSize4":i=J1e(r,D0);break;case"sqrtTall":i=tve(r,D0,n)}return i},nve=function(e,r){switch(e){case"\\u239C":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"\\u2223":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"\\u2225":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"\\u239F":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"\\u23A2":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"\\u23A5":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"\\u23AA":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"\\u23D0":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"\\u2016":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},UP={doubleleftarrow:`M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z`,leftgroupunder:`M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},ive=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z\nM367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z\nM403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z\nM347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},Ef=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Yt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){for(var e="",r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e}toText(){var e=r=>r.toText();return this.children.map(e).join("")}},zl={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Zx={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},VP={\\u00C5:"A",\\u00D0:"D",\\u00DE:"o",\\u00E5:"a",\\u00F0:"d",\\u00FE:"o",\\u0410:"A",\\u0411:"B",\\u0412:"B",\\u0413:"F",\\u0414:"A",\\u0415:"E",\\u0416:"K",\\u0417:"3",\\u0418:"N",\\u0419:"N",\\u041A:"K",\\u041B:"N",\\u041C:"M",\\u041D:"H",\\u041E:"O",\\u041F:"N",\\u0420:"P",\\u0421:"C",\\u0422:"T",\\u0423:"y",\\u0424:"O",\\u0425:"X",\\u0426:"U",\\u0427:"h",\\u0428:"W",\\u0429:"W",\\u042A:"B",\\u042B:"X",\\u042C:"B",\\u042D:"3",\\u042E:"X",\\u042F:"R",\\u0430:"a",\\u0431:"b",\\u0432:"a",\\u0433:"r",\\u0434:"y",\\u0435:"e",\\u0436:"m",\\u0437:"e",\\u0438:"n",\\u0439:"n",\\u043A:"n",\\u043B:"n",\\u043C:"m",\\u043D:"n",\\u043E:"o",\\u043F:"n",\\u0440:"p",\\u0441:"c",\\u0442:"o",\\u0443:"y",\\u0444:"b",\\u0445:"x",\\u0446:"n",\\u0447:"n",\\u0448:"w",\\u0449:"w",\\u044A:"a",\\u044B:"m",\\u044C:"a",\\u044D:"e",\\u044E:"m",\\u044F:"r"};zE={};ove=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],WP=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],HP=function(e,r){return r.size<2?e:ove[e-1][r.size-1]},hb=class t{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||t.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=WP[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new t(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:HP(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:WP[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=HP(t.BASESIZE,e);return this.size===r&&this.textSize===t.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==t.BASESIZE?["sizing","reset-size"+this.size,"size"+t.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=sve(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};hb.BASESIZE=6;QE={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},lve={ex:!0,em:!0,mu:!0},wB=function(e){return typeof e!="string"&&(e=e.unit),e in QE||e in lve||e==="ex"},Vn=function(e,r){var n;if(e.unit in QE)n=QE[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new nt("Invalid unit: \'"+e.unit+"\'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},ct=function(e){return+e.toFixed(4)+"em"},Qu=function(e){return e.filter(r=>r).join(" ")},kB=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},TB=function(e){var r=document.createElement(e);r.className=Qu(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r},EB=function(e){var r="<"+e;this.classes.length&&(r+=\' class="\'+Yt.escape(Qu(this.classes))+\'"\');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Yt.hyphenate(i)+":"+this.style[i]+";");n&&(r+=\' style="\'+Yt.escape(n)+\'"\');for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&(r+=" "+a+\'="\'+Yt.escape(this.attributes[a])+\'"\');r+=">";for(var s=0;s<this.children.length;s++)r+=this.children[s].toMarkup();return r+="</"+e+">",r},Sf=class{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,kB.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return Yt.contains(this.classes,e)}toNode(){return TB.call(this,"span")}toMarkup(){return EB.call(this,"span")}},v1=class{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,kB.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return Yt.contains(this.classes,e)}toNode(){return TB.call(this,"a")}toMarkup(){return EB.call(this,"a")}},JE=class{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Yt.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e=\'<img src="\'+Yt.escape(this.src)+\'"\'+(\' alt="\'+Yt.escape(this.alt)+\'"\'),r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=Yt.hyphenate(n)+":"+this.style[n]+";");return r&&(e+=\' style="\'+Yt.escape(r)+\'"\'),e+="\'/>",e}},cve={\\u00EE:"\\u0131\\u0302",\\u00EF:"\\u0131\\u0308",\\u00ED:"\\u0131\\u0301",\\u00EC:"\\u0131\\u0300"},ts=class{constructor(e,r,n,i,a,s,o,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=r||0,this.depth=n||0,this.italic=i||0,this.skew=a||0,this.width=s||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var u=X1e(this.text.charCodeAt(0));u&&this.classes.push(u+"_fallback"),/[\xEE\xEF\xED\xEC]/.test(this.text)&&(this.text=cve[this.text])}hasClass(e){return Yt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=ct(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Qu(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="<span";this.classes.length&&(e=!0,r+=\' class="\',r+=Yt.escape(Qu(this.classes)),r+=\'"\');var n="";this.italic>0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Yt.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=\' style="\'+Yt.escape(n)+\'"\');var a=Yt.escape(this.text);return e?(r+=">",r+=a,r+="</span>",r):a}},Zo=class{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i<this.children.length;i++)r.appendChild(this.children[i].toNode());return r}toMarkup(){var e=\'<svg xmlns="http://www.w3.org/2000/svg"\';for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+\'="\'+Yt.escape(this.attributes[r])+\'"\');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}},$l=class{constructor(e,r){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=r}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",UP[this.pathName]),r}toMarkup(){return this.alternate?\'<path d="\'+Yt.escape(this.alternate)+\'"/>\':\'<path d="\'+Yt.escape(UP[this.pathName])+\'"/>\'}},y1=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e="<line";for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+\'="\'+Yt.escape(this.attributes[r])+\'"\');return e+="/>",e}};hve={bin:1,close:1,inner:1,open:1,punct:1,rel:1},fve={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},yn={math:{},text:{}};V="math",et="text",ne="main",ve="ams",Mn="accent-token",St="bin",Oa="close",B0="inner",Xt="mathord",di="op-token",Ds="open",yb="punct",we="rel",qc="spacing",Ce="textord";G(V,ne,we,"\\u2261","\\\\equiv",!0);G(V,ne,we,"\\u227A","\\\\prec",!0);G(V,ne,we,"\\u227B","\\\\succ",!0);G(V,ne,we,"\\u223C","\\\\sim",!0);G(V,ne,we,"\\u22A5","\\\\perp");G(V,ne,we,"\\u2AAF","\\\\preceq",!0);G(V,ne,we,"\\u2AB0","\\\\succeq",!0);G(V,ne,we,"\\u2243","\\\\simeq",!0);G(V,ne,we,"\\u2223","\\\\mid",!0);G(V,ne,we,"\\u226A","\\\\ll",!0);G(V,ne,we,"\\u226B","\\\\gg",!0);G(V,ne,we,"\\u224D","\\\\asymp",!0);G(V,ne,we,"\\u2225","\\\\parallel");G(V,ne,we,"\\u22C8","\\\\bowtie",!0);G(V,ne,we,"\\u2323","\\\\smile",!0);G(V,ne,we,"\\u2291","\\\\sqsubseteq",!0);G(V,ne,we,"\\u2292","\\\\sqsupseteq",!0);G(V,ne,we,"\\u2250","\\\\doteq",!0);G(V,ne,we,"\\u2322","\\\\frown",!0);G(V,ne,we,"\\u220B","\\\\ni",!0);G(V,ne,we,"\\u221D","\\\\propto",!0);G(V,ne,we,"\\u22A2","\\\\vdash",!0);G(V,ne,we,"\\u22A3","\\\\dashv",!0);G(V,ne,we,"\\u220B","\\\\owns");G(V,ne,yb,".","\\\\ldotp");G(V,ne,yb,"\\u22C5","\\\\cdotp");G(V,ne,Ce,"#","\\\\#");G(et,ne,Ce,"#","\\\\#");G(V,ne,Ce,"&","\\\\&");G(et,ne,Ce,"&","\\\\&");G(V,ne,Ce,"\\u2135","\\\\aleph",!0);G(V,ne,Ce,"\\u2200","\\\\forall",!0);G(V,ne,Ce,"\\u210F","\\\\hbar",!0);G(V,ne,Ce,"\\u2203","\\\\exists",!0);G(V,ne,Ce,"\\u2207","\\\\nabla",!0);G(V,ne,Ce,"\\u266D","\\\\flat",!0);G(V,ne,Ce,"\\u2113","\\\\ell",!0);G(V,ne,Ce,"\\u266E","\\\\natural",!0);G(V,ne,Ce,"\\u2663","\\\\clubsuit",!0);G(V,ne,Ce,"\\u2118","\\\\wp",!0);G(V,ne,Ce,"\\u266F","\\\\sharp",!0);G(V,ne,Ce,"\\u2662","\\\\diamondsuit",!0);G(V,ne,Ce,"\\u211C","\\\\Re",!0);G(V,ne,Ce,"\\u2661","\\\\heartsuit",!0);G(V,ne,Ce,"\\u2111","\\\\Im",!0);G(V,ne,Ce,"\\u2660","\\\\spadesuit",!0);G(V,ne,Ce,"\\xA7","\\\\S",!0);G(et,ne,Ce,"\\xA7","\\\\S");G(V,ne,Ce,"\\xB6","\\\\P",!0);G(et,ne,Ce,"\\xB6","\\\\P");G(V,ne,Ce,"\\u2020","\\\\dag");G(et,ne,Ce,"\\u2020","\\\\dag");G(et,ne,Ce,"\\u2020","\\\\textdagger");G(V,ne,Ce,"\\u2021","\\\\ddag");G(et,ne,Ce,"\\u2021","\\\\ddag");G(et,ne,Ce,"\\u2021","\\\\textdaggerdbl");G(V,ne,Oa,"\\u23B1","\\\\rmoustache",!0);G(V,ne,Ds,"\\u23B0","\\\\lmoustache",!0);G(V,ne,Oa,"\\u27EF","\\\\rgroup",!0);G(V,ne,Ds,"\\u27EE","\\\\lgroup",!0);G(V,ne,St,"\\u2213","\\\\mp",!0);G(V,ne,St,"\\u2296","\\\\ominus",!0);G(V,ne,St,"\\u228E","\\\\uplus",!0);G(V,ne,St,"\\u2293","\\\\sqcap",!0);G(V,ne,St,"\\u2217","\\\\ast");G(V,ne,St,"\\u2294","\\\\sqcup",!0);G(V,ne,St,"\\u25EF","\\\\bigcirc",!0);G(V,ne,St,"\\u2219","\\\\bullet",!0);G(V,ne,St,"\\u2021","\\\\ddagger");G(V,ne,St,"\\u2240","\\\\wr",!0);G(V,ne,St,"\\u2A3F","\\\\amalg");G(V,ne,St,"&","\\\\And");G(V,ne,we,"\\u27F5","\\\\longleftarrow",!0);G(V,ne,we,"\\u21D0","\\\\Leftarrow",!0);G(V,ne,we,"\\u27F8","\\\\Longleftarrow",!0);G(V,ne,we,"\\u27F6","\\\\longrightarrow",!0);G(V,ne,we,"\\u21D2","\\\\Rightarrow",!0);G(V,ne,we,"\\u27F9","\\\\Longrightarrow",!0);G(V,ne,we,"\\u2194","\\\\leftrightarrow",!0);G(V,ne,we,"\\u27F7","\\\\longleftrightarrow",!0);G(V,ne,we,"\\u21D4","\\\\Leftrightarrow",!0);G(V,ne,we,"\\u27FA","\\\\Longleftrightarrow",!0);G(V,ne,we,"\\u21A6","\\\\mapsto",!0);G(V,ne,we,"\\u27FC","\\\\longmapsto",!0);G(V,ne,we,"\\u2197","\\\\nearrow",!0);G(V,ne,we,"\\u21A9","\\\\hookleftarrow",!0);G(V,ne,we,"\\u21AA","\\\\hookrightarrow",!0);G(V,ne,we,"\\u2198","\\\\searrow",!0);G(V,ne,we,"\\u21BC","\\\\leftharpoonup",!0);G(V,ne,we,"\\u21C0","\\\\rightharpoonup",!0);G(V,ne,we,"\\u2199","\\\\swarrow",!0);G(V,ne,we,"\\u21BD","\\\\leftharpoondown",!0);G(V,ne,we,"\\u21C1","\\\\rightharpoondown",!0);G(V,ne,we,"\\u2196","\\\\nwarrow",!0);G(V,ne,we,"\\u21CC","\\\\rightleftharpoons",!0);G(V,ve,we,"\\u226E","\\\\nless",!0);G(V,ve,we,"\\uE010","\\\\@nleqslant");G(V,ve,we,"\\uE011","\\\\@nleqq");G(V,ve,we,"\\u2A87","\\\\lneq",!0);G(V,ve,we,"\\u2268","\\\\lneqq",!0);G(V,ve,we,"\\uE00C","\\\\@lvertneqq");G(V,ve,we,"\\u22E6","\\\\lnsim",!0);G(V,ve,we,"\\u2A89","\\\\lnapprox",!0);G(V,ve,we,"\\u2280","\\\\nprec",!0);G(V,ve,we,"\\u22E0","\\\\npreceq",!0);G(V,ve,we,"\\u22E8","\\\\precnsim",!0);G(V,ve,we,"\\u2AB9","\\\\precnapprox",!0);G(V,ve,we,"\\u2241","\\\\nsim",!0);G(V,ve,we,"\\uE006","\\\\@nshortmid");G(V,ve,we,"\\u2224","\\\\nmid",!0);G(V,ve,we,"\\u22AC","\\\\nvdash",!0);G(V,ve,we,"\\u22AD","\\\\nvDash",!0);G(V,ve,we,"\\u22EA","\\\\ntriangleleft");G(V,ve,we,"\\u22EC","\\\\ntrianglelefteq",!0);G(V,ve,we,"\\u228A","\\\\subsetneq",!0);G(V,ve,we,"\\uE01A","\\\\@varsubsetneq");G(V,ve,we,"\\u2ACB","\\\\subsetneqq",!0);G(V,ve,we,"\\uE017","\\\\@varsubsetneqq");G(V,ve,we,"\\u226F","\\\\ngtr",!0);G(V,ve,we,"\\uE00F","\\\\@ngeqslant");G(V,ve,we,"\\uE00E","\\\\@ngeqq");G(V,ve,we,"\\u2A88","\\\\gneq",!0);G(V,ve,we,"\\u2269","\\\\gneqq",!0);G(V,ve,we,"\\uE00D","\\\\@gvertneqq");G(V,ve,we,"\\u22E7","\\\\gnsim",!0);G(V,ve,we,"\\u2A8A","\\\\gnapprox",!0);G(V,ve,we,"\\u2281","\\\\nsucc",!0);G(V,ve,we,"\\u22E1","\\\\nsucceq",!0);G(V,ve,we,"\\u22E9","\\\\succnsim",!0);G(V,ve,we,"\\u2ABA","\\\\succnapprox",!0);G(V,ve,we,"\\u2246","\\\\ncong",!0);G(V,ve,we,"\\uE007","\\\\@nshortparallel");G(V,ve,we,"\\u2226","\\\\nparallel",!0);G(V,ve,we,"\\u22AF","\\\\nVDash",!0);G(V,ve,we,"\\u22EB","\\\\ntriangleright");G(V,ve,we,"\\u22ED","\\\\ntrianglerighteq",!0);G(V,ve,we,"\\uE018","\\\\@nsupseteqq");G(V,ve,we,"\\u228B","\\\\supsetneq",!0);G(V,ve,we,"\\uE01B","\\\\@varsupsetneq");G(V,ve,we,"\\u2ACC","\\\\supsetneqq",!0);G(V,ve,we,"\\uE019","\\\\@varsupsetneqq");G(V,ve,we,"\\u22AE","\\\\nVdash",!0);G(V,ve,we,"\\u2AB5","\\\\precneqq",!0);G(V,ve,we,"\\u2AB6","\\\\succneqq",!0);G(V,ve,we,"\\uE016","\\\\@nsubseteqq");G(V,ve,St,"\\u22B4","\\\\unlhd");G(V,ve,St,"\\u22B5","\\\\unrhd");G(V,ve,we,"\\u219A","\\\\nleftarrow",!0);G(V,ve,we,"\\u219B","\\\\nrightarrow",!0);G(V,ve,we,"\\u21CD","\\\\nLeftarrow",!0);G(V,ve,we,"\\u21CF","\\\\nRightarrow",!0);G(V,ve,we,"\\u21AE","\\\\nleftrightarrow",!0);G(V,ve,we,"\\u21CE","\\\\nLeftrightarrow",!0);G(V,ve,we,"\\u25B3","\\\\vartriangle");G(V,ve,Ce,"\\u210F","\\\\hslash");G(V,ve,Ce,"\\u25BD","\\\\triangledown");G(V,ve,Ce,"\\u25CA","\\\\lozenge");G(V,ve,Ce,"\\u24C8","\\\\circledS");G(V,ve,Ce,"\\xAE","\\\\circledR");G(et,ve,Ce,"\\xAE","\\\\circledR");G(V,ve,Ce,"\\u2221","\\\\measuredangle",!0);G(V,ve,Ce,"\\u2204","\\\\nexists");G(V,ve,Ce,"\\u2127","\\\\mho");G(V,ve,Ce,"\\u2132","\\\\Finv",!0);G(V,ve,Ce,"\\u2141","\\\\Game",!0);G(V,ve,Ce,"\\u2035","\\\\backprime");G(V,ve,Ce,"\\u25B2","\\\\blacktriangle");G(V,ve,Ce,"\\u25BC","\\\\blacktriangledown");G(V,ve,Ce,"\\u25A0","\\\\blacksquare");G(V,ve,Ce,"\\u29EB","\\\\blacklozenge");G(V,ve,Ce,"\\u2605","\\\\bigstar");G(V,ve,Ce,"\\u2222","\\\\sphericalangle",!0);G(V,ve,Ce,"\\u2201","\\\\complement",!0);G(V,ve,Ce,"\\xF0","\\\\eth",!0);G(et,ne,Ce,"\\xF0","\\xF0");G(V,ve,Ce,"\\u2571","\\\\diagup");G(V,ve,Ce,"\\u2572","\\\\diagdown");G(V,ve,Ce,"\\u25A1","\\\\square");G(V,ve,Ce,"\\u25A1","\\\\Box");G(V,ve,Ce,"\\u25CA","\\\\Diamond");G(V,ve,Ce,"\\xA5","\\\\yen",!0);G(et,ve,Ce,"\\xA5","\\\\yen",!0);G(V,ve,Ce,"\\u2713","\\\\checkmark",!0);G(et,ve,Ce,"\\u2713","\\\\checkmark");G(V,ve,Ce,"\\u2136","\\\\beth",!0);G(V,ve,Ce,"\\u2138","\\\\daleth",!0);G(V,ve,Ce,"\\u2137","\\\\gimel",!0);G(V,ve,Ce,"\\u03DD","\\\\digamma",!0);G(V,ve,Ce,"\\u03F0","\\\\varkappa");G(V,ve,Ds,"\\u250C","\\\\@ulcorner",!0);G(V,ve,Oa,"\\u2510","\\\\@urcorner",!0);G(V,ve,Ds,"\\u2514","\\\\@llcorner",!0);G(V,ve,Oa,"\\u2518","\\\\@lrcorner",!0);G(V,ve,we,"\\u2266","\\\\leqq",!0);G(V,ve,we,"\\u2A7D","\\\\leqslant",!0);G(V,ve,we,"\\u2A95","\\\\eqslantless",!0);G(V,ve,we,"\\u2272","\\\\lesssim",!0);G(V,ve,we,"\\u2A85","\\\\lessapprox",!0);G(V,ve,we,"\\u224A","\\\\approxeq",!0);G(V,ve,St,"\\u22D6","\\\\lessdot");G(V,ve,we,"\\u22D8","\\\\lll",!0);G(V,ve,we,"\\u2276","\\\\lessgtr",!0);G(V,ve,we,"\\u22DA","\\\\lesseqgtr",!0);G(V,ve,we,"\\u2A8B","\\\\lesseqqgtr",!0);G(V,ve,we,"\\u2251","\\\\doteqdot");G(V,ve,we,"\\u2253","\\\\risingdotseq",!0);G(V,ve,we,"\\u2252","\\\\fallingdotseq",!0);G(V,ve,we,"\\u223D","\\\\backsim",!0);G(V,ve,we,"\\u22CD","\\\\backsimeq",!0);G(V,ve,we,"\\u2AC5","\\\\subseteqq",!0);G(V,ve,we,"\\u22D0","\\\\Subset",!0);G(V,ve,we,"\\u228F","\\\\sqsubset",!0);G(V,ve,we,"\\u227C","\\\\preccurlyeq",!0);G(V,ve,we,"\\u22DE","\\\\curlyeqprec",!0);G(V,ve,we,"\\u227E","\\\\precsim",!0);G(V,ve,we,"\\u2AB7","\\\\precapprox",!0);G(V,ve,we,"\\u22B2","\\\\vartriangleleft");G(V,ve,we,"\\u22B4","\\\\trianglelefteq");G(V,ve,we,"\\u22A8","\\\\vDash",!0);G(V,ve,we,"\\u22AA","\\\\Vvdash",!0);G(V,ve,we,"\\u2323","\\\\smallsmile");G(V,ve,we,"\\u2322","\\\\smallfrown");G(V,ve,we,"\\u224F","\\\\bumpeq",!0);G(V,ve,we,"\\u224E","\\\\Bumpeq",!0);G(V,ve,we,"\\u2267","\\\\geqq",!0);G(V,ve,we,"\\u2A7E","\\\\geqslant",!0);G(V,ve,we,"\\u2A96","\\\\eqslantgtr",!0);G(V,ve,we,"\\u2273","\\\\gtrsim",!0);G(V,ve,we,"\\u2A86","\\\\gtrapprox",!0);G(V,ve,St,"\\u22D7","\\\\gtrdot");G(V,ve,we,"\\u22D9","\\\\ggg",!0);G(V,ve,we,"\\u2277","\\\\gtrless",!0);G(V,ve,we,"\\u22DB","\\\\gtreqless",!0);G(V,ve,we,"\\u2A8C","\\\\gtreqqless",!0);G(V,ve,we,"\\u2256","\\\\eqcirc",!0);G(V,ve,we,"\\u2257","\\\\circeq",!0);G(V,ve,we,"\\u225C","\\\\triangleq",!0);G(V,ve,we,"\\u223C","\\\\thicksim");G(V,ve,we,"\\u2248","\\\\thickapprox");G(V,ve,we,"\\u2AC6","\\\\supseteqq",!0);G(V,ve,we,"\\u22D1","\\\\Supset",!0);G(V,ve,we,"\\u2290","\\\\sqsupset",!0);G(V,ve,we,"\\u227D","\\\\succcurlyeq",!0);G(V,ve,we,"\\u22DF","\\\\curlyeqsucc",!0);G(V,ve,we,"\\u227F","\\\\succsim",!0);G(V,ve,we,"\\u2AB8","\\\\succapprox",!0);G(V,ve,we,"\\u22B3","\\\\vartriangleright");G(V,ve,we,"\\u22B5","\\\\trianglerighteq");G(V,ve,we,"\\u22A9","\\\\Vdash",!0);G(V,ve,we,"\\u2223","\\\\shortmid");G(V,ve,we,"\\u2225","\\\\shortparallel");G(V,ve,we,"\\u226C","\\\\between",!0);G(V,ve,we,"\\u22D4","\\\\pitchfork",!0);G(V,ve,we,"\\u221D","\\\\varpropto");G(V,ve,we,"\\u25C0","\\\\blacktriangleleft");G(V,ve,we,"\\u2234","\\\\therefore",!0);G(V,ve,we,"\\u220D","\\\\backepsilon");G(V,ve,we,"\\u25B6","\\\\blacktriangleright");G(V,ve,we,"\\u2235","\\\\because",!0);G(V,ve,we,"\\u22D8","\\\\llless");G(V,ve,we,"\\u22D9","\\\\gggtr");G(V,ve,St,"\\u22B2","\\\\lhd");G(V,ve,St,"\\u22B3","\\\\rhd");G(V,ve,we,"\\u2242","\\\\eqsim",!0);G(V,ne,we,"\\u22C8","\\\\Join");G(V,ve,we,"\\u2251","\\\\Doteq",!0);G(V,ve,St,"\\u2214","\\\\dotplus",!0);G(V,ve,St,"\\u2216","\\\\smallsetminus");G(V,ve,St,"\\u22D2","\\\\Cap",!0);G(V,ve,St,"\\u22D3","\\\\Cup",!0);G(V,ve,St,"\\u2A5E","\\\\doublebarwedge",!0);G(V,ve,St,"\\u229F","\\\\boxminus",!0);G(V,ve,St,"\\u229E","\\\\boxplus",!0);G(V,ve,St,"\\u22C7","\\\\divideontimes",!0);G(V,ve,St,"\\u22C9","\\\\ltimes",!0);G(V,ve,St,"\\u22CA","\\\\rtimes",!0);G(V,ve,St,"\\u22CB","\\\\leftthreetimes",!0);G(V,ve,St,"\\u22CC","\\\\rightthreetimes",!0);G(V,ve,St,"\\u22CF","\\\\curlywedge",!0);G(V,ve,St,"\\u22CE","\\\\curlyvee",!0);G(V,ve,St,"\\u229D","\\\\circleddash",!0);G(V,ve,St,"\\u229B","\\\\circledast",!0);G(V,ve,St,"\\u22C5","\\\\centerdot");G(V,ve,St,"\\u22BA","\\\\intercal",!0);G(V,ve,St,"\\u22D2","\\\\doublecap");G(V,ve,St,"\\u22D3","\\\\doublecup");G(V,ve,St,"\\u22A0","\\\\boxtimes",!0);G(V,ve,we,"\\u21E2","\\\\dashrightarrow",!0);G(V,ve,we,"\\u21E0","\\\\dashleftarrow",!0);G(V,ve,we,"\\u21C7","\\\\leftleftarrows",!0);G(V,ve,we,"\\u21C6","\\\\leftrightarrows",!0);G(V,ve,we,"\\u21DA","\\\\Lleftarrow",!0);G(V,ve,we,"\\u219E","\\\\twoheadleftarrow",!0);G(V,ve,we,"\\u21A2","\\\\leftarrowtail",!0);G(V,ve,we,"\\u21AB","\\\\looparrowleft",!0);G(V,ve,we,"\\u21CB","\\\\leftrightharpoons",!0);G(V,ve,we,"\\u21B6","\\\\curvearrowleft",!0);G(V,ve,we,"\\u21BA","\\\\circlearrowleft",!0);G(V,ve,we,"\\u21B0","\\\\Lsh",!0);G(V,ve,we,"\\u21C8","\\\\upuparrows",!0);G(V,ve,we,"\\u21BF","\\\\upharpoonleft",!0);G(V,ve,we,"\\u21C3","\\\\downharpoonleft",!0);G(V,ne,we,"\\u22B6","\\\\origof",!0);G(V,ne,we,"\\u22B7","\\\\imageof",!0);G(V,ve,we,"\\u22B8","\\\\multimap",!0);G(V,ve,we,"\\u21AD","\\\\leftrightsquigarrow",!0);G(V,ve,we,"\\u21C9","\\\\rightrightarrows",!0);G(V,ve,we,"\\u21C4","\\\\rightleftarrows",!0);G(V,ve,we,"\\u21A0","\\\\twoheadrightarrow",!0);G(V,ve,we,"\\u21A3","\\\\rightarrowtail",!0);G(V,ve,we,"\\u21AC","\\\\looparrowright",!0);G(V,ve,we,"\\u21B7","\\\\curvearrowright",!0);G(V,ve,we,"\\u21BB","\\\\circlearrowright",!0);G(V,ve,we,"\\u21B1","\\\\Rsh",!0);G(V,ve,we,"\\u21CA","\\\\downdownarrows",!0);G(V,ve,we,"\\u21BE","\\\\upharpoonright",!0);G(V,ve,we,"\\u21C2","\\\\downharpoonright",!0);G(V,ve,we,"\\u21DD","\\\\rightsquigarrow",!0);G(V,ve,we,"\\u21DD","\\\\leadsto");G(V,ve,we,"\\u21DB","\\\\Rrightarrow",!0);G(V,ve,we,"\\u21BE","\\\\restriction");G(V,ne,Ce,"\\u2018","`");G(V,ne,Ce,"$","\\\\$");G(et,ne,Ce,"$","\\\\$");G(et,ne,Ce,"$","\\\\textdollar");G(V,ne,Ce,"%","\\\\%");G(et,ne,Ce,"%","\\\\%");G(V,ne,Ce,"_","\\\\_");G(et,ne,Ce,"_","\\\\_");G(et,ne,Ce,"_","\\\\textunderscore");G(V,ne,Ce,"\\u2220","\\\\angle",!0);G(V,ne,Ce,"\\u221E","\\\\infty",!0);G(V,ne,Ce,"\\u2032","\\\\prime");G(V,ne,Ce,"\\u25B3","\\\\triangle");G(V,ne,Ce,"\\u0393","\\\\Gamma",!0);G(V,ne,Ce,"\\u0394","\\\\Delta",!0);G(V,ne,Ce,"\\u0398","\\\\Theta",!0);G(V,ne,Ce,"\\u039B","\\\\Lambda",!0);G(V,ne,Ce,"\\u039E","\\\\Xi",!0);G(V,ne,Ce,"\\u03A0","\\\\Pi",!0);G(V,ne,Ce,"\\u03A3","\\\\Sigma",!0);G(V,ne,Ce,"\\u03A5","\\\\Upsilon",!0);G(V,ne,Ce,"\\u03A6","\\\\Phi",!0);G(V,ne,Ce,"\\u03A8","\\\\Psi",!0);G(V,ne,Ce,"\\u03A9","\\\\Omega",!0);G(V,ne,Ce,"A","\\u0391");G(V,ne,Ce,"B","\\u0392");G(V,ne,Ce,"E","\\u0395");G(V,ne,Ce,"Z","\\u0396");G(V,ne,Ce,"H","\\u0397");G(V,ne,Ce,"I","\\u0399");G(V,ne,Ce,"K","\\u039A");G(V,ne,Ce,"M","\\u039C");G(V,ne,Ce,"N","\\u039D");G(V,ne,Ce,"O","\\u039F");G(V,ne,Ce,"P","\\u03A1");G(V,ne,Ce,"T","\\u03A4");G(V,ne,Ce,"X","\\u03A7");G(V,ne,Ce,"\\xAC","\\\\neg",!0);G(V,ne,Ce,"\\xAC","\\\\lnot");G(V,ne,Ce,"\\u22A4","\\\\top");G(V,ne,Ce,"\\u22A5","\\\\bot");G(V,ne,Ce,"\\u2205","\\\\emptyset");G(V,ve,Ce,"\\u2205","\\\\varnothing");G(V,ne,Xt,"\\u03B1","\\\\alpha",!0);G(V,ne,Xt,"\\u03B2","\\\\beta",!0);G(V,ne,Xt,"\\u03B3","\\\\gamma",!0);G(V,ne,Xt,"\\u03B4","\\\\delta",!0);G(V,ne,Xt,"\\u03F5","\\\\epsilon",!0);G(V,ne,Xt,"\\u03B6","\\\\zeta",!0);G(V,ne,Xt,"\\u03B7","\\\\eta",!0);G(V,ne,Xt,"\\u03B8","\\\\theta",!0);G(V,ne,Xt,"\\u03B9","\\\\iota",!0);G(V,ne,Xt,"\\u03BA","\\\\kappa",!0);G(V,ne,Xt,"\\u03BB","\\\\lambda",!0);G(V,ne,Xt,"\\u03BC","\\\\mu",!0);G(V,ne,Xt,"\\u03BD","\\\\nu",!0);G(V,ne,Xt,"\\u03BE","\\\\xi",!0);G(V,ne,Xt,"\\u03BF","\\\\omicron",!0);G(V,ne,Xt,"\\u03C0","\\\\pi",!0);G(V,ne,Xt,"\\u03C1","\\\\rho",!0);G(V,ne,Xt,"\\u03C3","\\\\sigma",!0);G(V,ne,Xt,"\\u03C4","\\\\tau",!0);G(V,ne,Xt,"\\u03C5","\\\\upsilon",!0);G(V,ne,Xt,"\\u03D5","\\\\phi",!0);G(V,ne,Xt,"\\u03C7","\\\\chi",!0);G(V,ne,Xt,"\\u03C8","\\\\psi",!0);G(V,ne,Xt,"\\u03C9","\\\\omega",!0);G(V,ne,Xt,"\\u03B5","\\\\varepsilon",!0);G(V,ne,Xt,"\\u03D1","\\\\vartheta",!0);G(V,ne,Xt,"\\u03D6","\\\\varpi",!0);G(V,ne,Xt,"\\u03F1","\\\\varrho",!0);G(V,ne,Xt,"\\u03C2","\\\\varsigma",!0);G(V,ne,Xt,"\\u03C6","\\\\varphi",!0);G(V,ne,St,"\\u2217","*",!0);G(V,ne,St,"+","+");G(V,ne,St,"\\u2212","-",!0);G(V,ne,St,"\\u22C5","\\\\cdot",!0);G(V,ne,St,"\\u2218","\\\\circ",!0);G(V,ne,St,"\\xF7","\\\\div",!0);G(V,ne,St,"\\xB1","\\\\pm",!0);G(V,ne,St,"\\xD7","\\\\times",!0);G(V,ne,St,"\\u2229","\\\\cap",!0);G(V,ne,St,"\\u222A","\\\\cup",!0);G(V,ne,St,"\\u2216","\\\\setminus",!0);G(V,ne,St,"\\u2227","\\\\land");G(V,ne,St,"\\u2228","\\\\lor");G(V,ne,St,"\\u2227","\\\\wedge",!0);G(V,ne,St,"\\u2228","\\\\vee",!0);G(V,ne,Ce,"\\u221A","\\\\surd");G(V,ne,Ds,"\\u27E8","\\\\langle",!0);G(V,ne,Ds,"\\u2223","\\\\lvert");G(V,ne,Ds,"\\u2225","\\\\lVert");G(V,ne,Oa,"?","?");G(V,ne,Oa,"!","!");G(V,ne,Oa,"\\u27E9","\\\\rangle",!0);G(V,ne,Oa,"\\u2223","\\\\rvert");G(V,ne,Oa,"\\u2225","\\\\rVert");G(V,ne,we,"=","=");G(V,ne,we,":",":");G(V,ne,we,"\\u2248","\\\\approx",!0);G(V,ne,we,"\\u2245","\\\\cong",!0);G(V,ne,we,"\\u2265","\\\\ge");G(V,ne,we,"\\u2265","\\\\geq",!0);G(V,ne,we,"\\u2190","\\\\gets");G(V,ne,we,">","\\\\gt",!0);G(V,ne,we,"\\u2208","\\\\in",!0);G(V,ne,we,"\\uE020","\\\\@not");G(V,ne,we,"\\u2282","\\\\subset",!0);G(V,ne,we,"\\u2283","\\\\supset",!0);G(V,ne,we,"\\u2286","\\\\subseteq",!0);G(V,ne,we,"\\u2287","\\\\supseteq",!0);G(V,ve,we,"\\u2288","\\\\nsubseteq",!0);G(V,ve,we,"\\u2289","\\\\nsupseteq",!0);G(V,ne,we,"\\u22A8","\\\\models");G(V,ne,we,"\\u2190","\\\\leftarrow",!0);G(V,ne,we,"\\u2264","\\\\le");G(V,ne,we,"\\u2264","\\\\leq",!0);G(V,ne,we,"<","\\\\lt",!0);G(V,ne,we,"\\u2192","\\\\rightarrow",!0);G(V,ne,we,"\\u2192","\\\\to");G(V,ve,we,"\\u2271","\\\\ngeq",!0);G(V,ve,we,"\\u2270","\\\\nleq",!0);G(V,ne,qc,"\\xA0","\\\\ ");G(V,ne,qc,"\\xA0","\\\\space");G(V,ne,qc,"\\xA0","\\\\nobreakspace");G(et,ne,qc,"\\xA0","\\\\ ");G(et,ne,qc,"\\xA0"," ");G(et,ne,qc,"\\xA0","\\\\space");G(et,ne,qc,"\\xA0","\\\\nobreakspace");G(V,ne,qc,null,"\\\\nobreak");G(V,ne,qc,null,"\\\\allowbreak");G(V,ne,yb,",",",");G(V,ne,yb,";",";");G(V,ve,St,"\\u22BC","\\\\barwedge",!0);G(V,ve,St,"\\u22BB","\\\\veebar",!0);G(V,ne,St,"\\u2299","\\\\odot",!0);G(V,ne,St,"\\u2295","\\\\oplus",!0);G(V,ne,St,"\\u2297","\\\\otimes",!0);G(V,ne,Ce,"\\u2202","\\\\partial",!0);G(V,ne,St,"\\u2298","\\\\oslash",!0);G(V,ve,St,"\\u229A","\\\\circledcirc",!0);G(V,ve,St,"\\u22A1","\\\\boxdot",!0);G(V,ne,St,"\\u25B3","\\\\bigtriangleup");G(V,ne,St,"\\u25BD","\\\\bigtriangledown");G(V,ne,St,"\\u2020","\\\\dagger");G(V,ne,St,"\\u22C4","\\\\diamond");G(V,ne,St,"\\u22C6","\\\\star");G(V,ne,St,"\\u25C3","\\\\triangleleft");G(V,ne,St,"\\u25B9","\\\\triangleright");G(V,ne,Ds,"{","\\\\{");G(et,ne,Ce,"{","\\\\{");G(et,ne,Ce,"{","\\\\textbraceleft");G(V,ne,Oa,"}","\\\\}");G(et,ne,Ce,"}","\\\\}");G(et,ne,Ce,"}","\\\\textbraceright");G(V,ne,Ds,"{","\\\\lbrace");G(V,ne,Oa,"}","\\\\rbrace");G(V,ne,Ds,"[","\\\\lbrack",!0);G(et,ne,Ce,"[","\\\\lbrack",!0);G(V,ne,Oa,"]","\\\\rbrack",!0);G(et,ne,Ce,"]","\\\\rbrack",!0);G(V,ne,Ds,"(","\\\\lparen",!0);G(V,ne,Oa,")","\\\\rparen",!0);G(et,ne,Ce,"<","\\\\textless",!0);G(et,ne,Ce,">","\\\\textgreater",!0);G(V,ne,Ds,"\\u230A","\\\\lfloor",!0);G(V,ne,Oa,"\\u230B","\\\\rfloor",!0);G(V,ne,Ds,"\\u2308","\\\\lceil",!0);G(V,ne,Oa,"\\u2309","\\\\rceil",!0);G(V,ne,Ce,"\\\\","\\\\backslash");G(V,ne,Ce,"\\u2223","|");G(V,ne,Ce,"\\u2223","\\\\vert");G(et,ne,Ce,"|","\\\\textbar",!0);G(V,ne,Ce,"\\u2225","\\\\|");G(V,ne,Ce,"\\u2225","\\\\Vert");G(et,ne,Ce,"\\u2225","\\\\textbardbl");G(et,ne,Ce,"~","\\\\textasciitilde");G(et,ne,Ce,"\\\\","\\\\textbackslash");G(et,ne,Ce,"^","\\\\textasciicircum");G(V,ne,we,"\\u2191","\\\\uparrow",!0);G(V,ne,we,"\\u21D1","\\\\Uparrow",!0);G(V,ne,we,"\\u2193","\\\\downarrow",!0);G(V,ne,we,"\\u21D3","\\\\Downarrow",!0);G(V,ne,we,"\\u2195","\\\\updownarrow",!0);G(V,ne,we,"\\u21D5","\\\\Updownarrow",!0);G(V,ne,di,"\\u2210","\\\\coprod");G(V,ne,di,"\\u22C1","\\\\bigvee");G(V,ne,di,"\\u22C0","\\\\bigwedge");G(V,ne,di,"\\u2A04","\\\\biguplus");G(V,ne,di,"\\u22C2","\\\\bigcap");G(V,ne,di,"\\u22C3","\\\\bigcup");G(V,ne,di,"\\u222B","\\\\int");G(V,ne,di,"\\u222B","\\\\intop");G(V,ne,di,"\\u222C","\\\\iint");G(V,ne,di,"\\u222D","\\\\iiint");G(V,ne,di,"\\u220F","\\\\prod");G(V,ne,di,"\\u2211","\\\\sum");G(V,ne,di,"\\u2A02","\\\\bigotimes");G(V,ne,di,"\\u2A01","\\\\bigoplus");G(V,ne,di,"\\u2A00","\\\\bigodot");G(V,ne,di,"\\u222E","\\\\oint");G(V,ne,di,"\\u222F","\\\\oiint");G(V,ne,di,"\\u2230","\\\\oiiint");G(V,ne,di,"\\u2A06","\\\\bigsqcup");G(V,ne,di,"\\u222B","\\\\smallint");G(et,ne,B0,"\\u2026","\\\\textellipsis");G(V,ne,B0,"\\u2026","\\\\mathellipsis");G(et,ne,B0,"\\u2026","\\\\ldots",!0);G(V,ne,B0,"\\u2026","\\\\ldots",!0);G(V,ne,B0,"\\u22EF","\\\\@cdots",!0);G(V,ne,B0,"\\u22F1","\\\\ddots",!0);G(V,ne,Ce,"\\u22EE","\\\\varvdots");G(V,ne,Mn,"\\u02CA","\\\\acute");G(V,ne,Mn,"\\u02CB","\\\\grave");G(V,ne,Mn,"\\xA8","\\\\ddot");G(V,ne,Mn,"~","\\\\tilde");G(V,ne,Mn,"\\u02C9","\\\\bar");G(V,ne,Mn,"\\u02D8","\\\\breve");G(V,ne,Mn,"\\u02C7","\\\\check");G(V,ne,Mn,"^","\\\\hat");G(V,ne,Mn,"\\u20D7","\\\\vec");G(V,ne,Mn,"\\u02D9","\\\\dot");G(V,ne,Mn,"\\u02DA","\\\\mathring");G(V,ne,Xt,"\\uE131","\\\\@imath");G(V,ne,Xt,"\\uE237","\\\\@jmath");G(V,ne,Ce,"\\u0131","\\u0131");G(V,ne,Ce,"\\u0237","\\u0237");G(et,ne,Ce,"\\u0131","\\\\i",!0);G(et,ne,Ce,"\\u0237","\\\\j",!0);G(et,ne,Ce,"\\xDF","\\\\ss",!0);G(et,ne,Ce,"\\xE6","\\\\ae",!0);G(et,ne,Ce,"\\u0153","\\\\oe",!0);G(et,ne,Ce,"\\xF8","\\\\o",!0);G(et,ne,Ce,"\\xC6","\\\\AE",!0);G(et,ne,Ce,"\\u0152","\\\\OE",!0);G(et,ne,Ce,"\\xD8","\\\\O",!0);G(et,ne,Mn,"\\u02CA","\\\\\'");G(et,ne,Mn,"\\u02CB","\\\\`");G(et,ne,Mn,"\\u02C6","\\\\^");G(et,ne,Mn,"\\u02DC","\\\\~");G(et,ne,Mn,"\\u02C9","\\\\=");G(et,ne,Mn,"\\u02D8","\\\\u");G(et,ne,Mn,"\\u02D9","\\\\.");G(et,ne,Mn,"\\xB8","\\\\c");G(et,ne,Mn,"\\u02DA","\\\\r");G(et,ne,Mn,"\\u02C7","\\\\v");G(et,ne,Mn,"\\xA8",\'\\\\"\');G(et,ne,Mn,"\\u02DD","\\\\H");G(et,ne,Mn,"\\u25EF","\\\\textcircled");SB={"--":!0,"---":!0,"``":!0,"\'\'":!0};G(et,ne,Ce,"\\u2013","--",!0);G(et,ne,Ce,"\\u2013","\\\\textendash");G(et,ne,Ce,"\\u2014","---",!0);G(et,ne,Ce,"\\u2014","\\\\textemdash");G(et,ne,Ce,"\\u2018","`",!0);G(et,ne,Ce,"\\u2018","\\\\textquoteleft");G(et,ne,Ce,"\\u2019","\'",!0);G(et,ne,Ce,"\\u2019","\\\\textquoteright");G(et,ne,Ce,"\\u201C","``",!0);G(et,ne,Ce,"\\u201C","\\\\textquotedblleft");G(et,ne,Ce,"\\u201D","\'\'",!0);G(et,ne,Ce,"\\u201D","\\\\textquotedblright");G(V,ne,Ce,"\\xB0","\\\\degree",!0);G(et,ne,Ce,"\\xB0","\\\\degree");G(et,ne,Ce,"\\xB0","\\\\textdegree",!0);G(V,ne,Ce,"\\xA3","\\\\pounds");G(V,ne,Ce,"\\xA3","\\\\mathsterling",!0);G(et,ne,Ce,"\\xA3","\\\\pounds");G(et,ne,Ce,"\\xA3","\\\\textsterling",!0);G(V,ve,Ce,"\\u2720","\\\\maltese");G(et,ve,Ce,"\\u2720","\\\\maltese");YP=\'0123456789/@."\';for(Qx=0;Qx<YP.length;Qx++)$E=YP.charAt(Qx),G(V,ne,Ce,$E,$E);XP=\'0123456789!@*()-=+";:?/.,\';for(Jx=0;Jx<XP.length;Jx++)GE=XP.charAt(Jx),G(et,ne,Ce,GE,GE);fb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(eb=0;eb<fb.length;eb++)h1=fb.charAt(eb),G(V,ne,Xt,h1,h1),G(et,ne,Ce,h1,h1);G(V,ve,Ce,"C","\\u2102");G(et,ve,Ce,"C","\\u2102");G(V,ve,Ce,"H","\\u210D");G(et,ve,Ce,"H","\\u210D");G(V,ve,Ce,"N","\\u2115");G(et,ve,Ce,"N","\\u2115");G(V,ve,Ce,"P","\\u2119");G(et,ve,Ce,"P","\\u2119");G(V,ve,Ce,"Q","\\u211A");G(et,ve,Ce,"Q","\\u211A");G(V,ve,Ce,"R","\\u211D");G(et,ve,Ce,"R","\\u211D");G(V,ve,Ce,"Z","\\u2124");G(et,ve,Ce,"Z","\\u2124");G(V,ne,Xt,"h","\\u210E");G(et,ne,Xt,"h","\\u210E");Jt="";for(ma=0;ma<fb.length;ma++)Gn=fb.charAt(ma),Jt=String.fromCharCode(55349,56320+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt),Jt=String.fromCharCode(55349,56372+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt),Jt=String.fromCharCode(55349,56424+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt),Jt=String.fromCharCode(55349,56580+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt),Jt=String.fromCharCode(55349,56684+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt),Jt=String.fromCharCode(55349,56736+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt),Jt=String.fromCharCode(55349,56788+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt),Jt=String.fromCharCode(55349,56840+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt),Jt=String.fromCharCode(55349,56944+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt),ma<26&&(Jt=String.fromCharCode(55349,56632+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt),Jt=String.fromCharCode(55349,56476+ma),G(V,ne,Xt,Gn,Jt),G(et,ne,Ce,Gn,Jt));Jt="\\u{1D55C}";G(V,ne,Xt,"k",Jt);G(et,ne,Ce,"k",Jt);for(Ku=0;Ku<10;Ku++)$c=Ku.toString(),Jt=String.fromCharCode(55349,57294+Ku),G(V,ne,Xt,$c,Jt),G(et,ne,Ce,$c,Jt),Jt=String.fromCharCode(55349,57314+Ku),G(V,ne,Xt,$c,Jt),G(et,ne,Ce,$c,Jt),Jt=String.fromCharCode(55349,57324+Ku),G(V,ne,Xt,$c,Jt),G(et,ne,Ce,$c,Jt),Jt=String.fromCharCode(55349,57334+Ku),G(V,ne,Xt,$c,Jt),G(et,ne,Ce,$c,Jt);eS="\\xD0\\xDE\\xFE";for(tb=0;tb<eS.length;tb++)f1=eS.charAt(tb),G(V,ne,Xt,f1,f1),G(et,ne,Ce,f1,f1);rb=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],jP=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],dve=function(e,r){var n=e.charCodeAt(0),i=e.charCodeAt(1),a=(n-55296)*1024+(i-56320)+65536,s=r==="math"?0:1;if(119808<=a&&a<120484){var o=Math.floor((a-119808)/26);return[rb[o][2],rb[o][s]]}else if(120782<=a&&a<=120831){var l=Math.floor((a-120782)/10);return[jP[l][2],jP[l][s]]}else{if(a===120485||a===120486)return[rb[0][2],rb[0][s]];if(120486<a&&a<120782)return["",""];throw new nt("Unsupported character: "+e)}},xb=function(e,r,n){return yn[n][e]&&yn[n][e].replace&&(e=yn[n][e].replace),{value:e,metrics:uS(e,r,n)}},Ko=function(e,r,n,i,a){var s=xb(e,r,n),o=s.metrics;e=s.value;var l;if(o){var u=o.italic;(n==="text"||i&&i.font==="mathit")&&(u=0),l=new ts(e,o.height,o.depth,u,o.skew,o.width,a)}else typeof console<"u"&&console.warn("No character metrics "+("for \'"+e+"\' in style \'"+r+"\' and mode \'"+n+"\'")),l=new ts(e,0,0,0,0,0,a);if(i){l.maxFontSize=i.sizeMultiplier,i.style.isTight()&&l.classes.push("mtight");var h=i.getColor();h&&(l.style.color=h)}return l},pve=function(e,r,n,i){return i===void 0&&(i=[]),n.font==="boldsymbol"&&xb(e,"Main-Bold",r).metrics?Ko(e,"Main-Bold",r,n,i.concat(["mathbf"])):e==="\\\\"||yn[r][e].font==="main"?Ko(e,"Main-Regular",r,n,i):Ko(e,"AMS-Regular",r,n,i.concat(["amsrm"]))},gve=function(e,r,n,i,a){return a!=="textord"&&xb(e,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},mve=function(e,r,n){var i=e.mode,a=e.text,s=["mord"],o=i==="math"||i==="text"&&r.font,l=o?r.font:r.fontFamily,u="",h="";if(a.charCodeAt(0)===55349&&([u,h]=dve(a,i)),u.length>0)return Ko(a,u,i,r,s.concat(h));if(l){var f,d;if(l==="boldsymbol"){var p=gve(a,i,r,s,n);f=p.fontName,d=[p.fontClass]}else o?(f=_B[l].fontName,d=[l]):(f=nb(l,r.fontWeight,r.fontShape),d=[l,r.fontWeight,r.fontShape]);if(xb(a,f,i).metrics)return Ko(a,f,i,r,s.concat(d));if(SB.hasOwnProperty(a)&&f.slice(0,10)==="Typewriter"){for(var g=[],m=0;m<a.length;m++)g.push(Ko(a[m],f,i,r,s.concat(d)));return AB(g)}}if(n==="mathord")return Ko(a,"Math-Italic",i,r,s.concat(["mathnormal"]));if(n==="textord"){var x=yn[i][a]&&yn[i][a].font;if(x==="ams"){var y=nb("amsrm",r.fontWeight,r.fontShape);return Ko(a,y,i,r,s.concat("amsrm",r.fontWeight,r.fontShape))}else if(x==="main"||!x){var b=nb("textrm",r.fontWeight,r.fontShape);return Ko(a,b,i,r,s.concat(r.fontWeight,r.fontShape))}else{var w=nb(x,r.fontWeight,r.fontShape);return Ko(a,w,i,r,s.concat(w,r.fontWeight,r.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},vve=(t,e)=>{if(Qu(t.classes)!==Qu(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},yve=t=>{for(var e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof ts&&n instanceof ts&&vve(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t},hS=function(e){for(var r=0,n=0,i=0,a=0;a<e.children.length;a++){var s=e.children[a];s.height>r&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},Ja=function(e,r,n,i){var a=new Sf(e,r,n,i);return hS(a),a},CB=(t,e,r,n)=>new Sf(t,e,r,n),xve=function(e,r,n){var i=Ja([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=ct(i.height),i.maxFontSize=1,i},bve=function(e,r,n,i){var a=new v1(e,r,n,i);return hS(a),a},AB=function(e){var r=new Ef(e);return hS(r),r},wve=function(e,r){return e instanceof Ef?Ja([],[e],r):e},kve=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,s=1;s<r.length;s++){var o=-r[s].shift-a-r[s].elem.depth,l=o-(r[s-1].elem.height+r[s-1].elem.depth);a=a+o,n.push({type:"kern",size:l}),n.push(r[s])}return{children:n,depth:i}}var u;if(e.positionType==="top"){for(var h=e.positionData,f=0;f<e.children.length;f++){var d=e.children[f];h-=d.type==="kern"?d.size:d.elem.height+d.elem.depth}u=h}else if(e.positionType==="bottom")u=-e.positionData;else{var p=e.children[0];if(p.type!=="elem")throw new Error(\'First child must have type "elem".\');if(e.positionType==="shift")u=-p.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")u=-p.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:u}},Tve=function(e,r){for(var{children:n,depth:i}=kve(e),a=0,s=0;s<n.length;s++){var o=n[s];if(o.type==="elem"){var l=o.elem;a=Math.max(a,l.maxFontSize,l.height)}}a+=2;var u=Ja(["pstrut"],[]);u.style.height=ct(a);for(var h=[],f=i,d=i,p=i,g=0;g<n.length;g++){var m=n[g];if(m.type==="kern")p+=m.size;else{var x=m.elem,y=m.wrapperClasses||[],b=m.wrapperStyle||{},w=Ja(y,[u,x],void 0,b);w.style.top=ct(-a-p-x.depth),m.marginLeft&&(w.style.marginLeft=m.marginLeft),m.marginRight&&(w.style.marginRight=m.marginRight),h.push(w),p+=x.height+x.depth}f=Math.min(f,p),d=Math.max(d,p)}var _=Ja(["vlist"],h);_.style.height=ct(d);var k;if(f<0){var E=Ja([],[]),L=Ja(["vlist"],[E]);L.style.height=ct(-f);var S=Ja(["vlist-s"],[new ts("\\u200B")]);k=[Ja(["vlist-r"],[_,S]),Ja(["vlist-r"],[L])]}else k=[Ja(["vlist-r"],[_])];var C=Ja(["vlist-t"],k);return k.length===2&&C.classes.push("vlist-t2"),C.height=d,C.depth=-f,C},Eve=(t,e)=>{var r=Ja(["mspace"],[],e),n=Vn(t,e);return r.style.marginRight=ct(n),r},nb=function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a},_B={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},LB={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Sve=function(e,r){var[n,i,a]=LB[e],s=new $l(n),o=new Zo([s],{width:ct(i),height:ct(a),style:"width:"+ct(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=CB(["overlay"],[o],r);return l.height=a,l.style.height=ct(a),l.style.width=ct(i),l},De={fontMap:_B,makeSymbol:Ko,mathsym:pve,makeSpan:Ja,makeSvgSpan:CB,makeLineSpan:xve,makeAnchor:bve,makeFragment:AB,wrapFragment:wve,makeVList:Tve,makeOrd:mve,makeGlue:Eve,staticSvg:Sve,svgData:LB,tryCombineChars:yve},Un={number:3,unit:"mu"},kf={number:4,unit:"mu"},Gc={number:5,unit:"mu"},Cve={mord:{mop:Un,mbin:kf,mrel:Gc,minner:Un},mop:{mord:Un,mop:Un,mrel:Gc,minner:Un},mbin:{mord:kf,mop:kf,mopen:kf,minner:kf},mrel:{mord:Gc,mop:Gc,mopen:Gc,minner:Gc},mopen:{},mclose:{mop:Un,mbin:kf,mrel:Gc,minner:Un},mpunct:{mord:Un,mop:Un,mrel:Gc,mopen:Un,mclose:Un,mpunct:Un,minner:Un},minner:{mord:Un,mop:Un,mbin:kf,mrel:Gc,mopen:Un,mpunct:Un,minner:Un}},Ave={mord:{mop:Un},mop:{mord:Un,mop:Un},mbin:{},mrel:{},mopen:{},mclose:{mop:Un},mpunct:{},minner:{mop:Un}},RB={},db={},pb={};gb=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},ai=function(e){return e.type==="ordgroup"?e.body:[e]},Wc=De.makeSpan,_ve=["leftmost","mbin","mopen","mrel","mop","mpunct"],Lve=["rightmost","mrel","mclose","mpunct"],Rve={display:jt.DISPLAY,text:jt.TEXT,script:jt.SCRIPT,scriptscript:jt.SCRIPTSCRIPT},Nve={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},wi=function(e,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],s=0;s<e.length;s++){var o=Cr(e[s],r);if(o instanceof Ef){var l=o.children;a.push(...l)}else a.push(o)}if(De.tryCombineChars(a),!n)return a;var u=r;if(e.length===1){var h=e[0];h.type==="sizing"?u=r.havingSize(h.size):h.type==="styling"&&(u=r.havingStyle(Rve[h.style]))}var f=Wc([i[0]||"leftmost"],[],r),d=Wc([i[1]||"rightmost"],[],r),p=n==="root";return KP(a,(g,m)=>{var x=m.classes[0],y=g.classes[0];x==="mbin"&&Yt.contains(Lve,y)?m.classes[0]="mord":y==="mbin"&&Yt.contains(_ve,x)&&(g.classes[0]="mord")},{node:f},d,p),KP(a,(g,m)=>{var x=tS(m),y=tS(g),b=x&&y?g.hasClass("mtight")?Ave[x][y]:Cve[x][y]:null;if(b)return De.makeGlue(b,u)},{node:f},d,p),a},KP=function t(e,r,n,i,a){i&&e.push(i);for(var s=0;s<e.length;s++){var o=e[s],l=NB(o);if(l){t(l.children,r,n,null,a);continue}var u=!o.hasClass("mspace");if(u){var h=r(o,n.node);h&&(n.insertAfter?n.insertAfter(h):(e.unshift(h),s++))}u?n.node=o:a&&o.hasClass("newline")&&(n.node=Wc(["leftmost"])),n.insertAfter=(f=>d=>{e.splice(f+1,0,d),s++})(s)}i&&e.pop()},NB=function(e){return e instanceof Ef||e instanceof v1||e instanceof Sf&&e.hasClass("enclosing")?e:null},Ive=function t(e,r){var n=NB(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left")}}return e},tS=function(e,r){return e?(r&&(e=Ive(e,r)),Nve[e.classes[0]]||null):null},x1=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Wc(r.concat(n))},Cr=function(e,r,n){if(!e)return Wc();if(db[e.type]){var i=db[e.type](e,r);if(n&&r.size!==n.size){i=Wc(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new nt("Got group of unknown type: \'"+e.type+"\'")};es=class{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=Qu(this.classes));for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+\'="\',e+=Yt.escape(this.attributes[r]),e+=\'"\');this.classes.length>0&&(e+=\' class ="\'+Yt.escape(Qu(this.classes))+\'"\'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}},Tf=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Yt.escape(this.toText())}toText(){return this.text}},nS=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\\u200A":e>=.1666&&e<=.1667?this.character="\\u2009":e>=.2222&&e<=.2223?this.character="\\u2005":e>=.2777&&e<=.2778?this.character="\\u2005\\u200A":e>=-.05556&&e<=-.05555?this.character="\\u200A\\u2063":e>=-.1667&&e<=-.1666?this.character="\\u2009\\u2063":e>=-.2223&&e<=-.2222?this.character="\\u205F\\u2063":e>=-.2778&&e<=-.2777?this.character="\\u2005\\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",ct(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":\'<mspace width="\'+ct(this.width)+\'"/>\'}toText(){return this.character?this.character:" "}},rt={MathNode:es,TextNode:Tf,SpaceNode:nS,newDocumentFragment:IB},uo=function(e,r,n){return yn[r][e]&&yn[r][e].replace&&e.charCodeAt(0)!==55349&&!(SB.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=yn[r][e].replace),new rt.TextNode(e)},fS=function(e){return e.length===1?e[0]:new rt.MathNode("mrow",e)},dS=function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=e.text;if(Yt.contains(["\\\\imath","\\\\jmath"],a))return null;yn[i][a]&&yn[i][a].replace&&(a=yn[i][a].replace);var s=De.fontMap[n].fontName;return uS(a,s,i)?De.fontMap[n].variant:null},rs=function(e,r,n){if(e.length===1){var i=cn(e[0],r);return n&&i instanceof es&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],s,o=0;o<e.length;o++){var l=cn(e[o],r);if(l instanceof es&&s instanceof es){if(l.type==="mtext"&&s.type==="mtext"&&l.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...l.children);continue}else if(l.type==="mn"&&s.type==="mn"){s.children.push(...l.children);continue}else if(l.type==="mi"&&l.children.length===1&&s.type==="mn"){var u=l.children[0];if(u instanceof Tf&&u.text==="."){s.children.push(...l.children);continue}}else if(s.type==="mi"&&s.children.length===1){var h=s.children[0];if(h instanceof Tf&&h.text==="\\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof Tf&&f.text.length>0&&(f.text=f.text.slice(0,1)+"\\u0338"+f.text.slice(1),a.pop())}}}a.push(l),s=l}return a},Ju=function(e,r,n){return fS(rs(e,r,n))},cn=function(e,r){if(!e)return new rt.MathNode("mrow");if(pb[e.type]){var n=pb[e.type](e,r);return n}else throw new nt("Got group of unknown type: \'"+e.type+"\'")};MB=function(e){return new hb({style:e.displayMode?jt.DISPLAY:jt.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},DB=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=De.makeSpan(n,[e])}return e},Mve=function(e,r,n){var i=MB(n),a;if(n.output==="mathml")return ZP(e,r,i,n.displayMode,!0);if(n.output==="html"){var s=rS(e,i);a=De.makeSpan(["katex"],[s])}else{var o=ZP(e,r,i,n.displayMode,!1),l=rS(e,i);a=De.makeSpan(["katex"],[o,l])}return DB(a,n)},Dve=function(e,r,n){var i=MB(n),a=rS(e,i),s=De.makeSpan(["katex"],[a]);return DB(s,n)},Ove={widehat:"^",widecheck:"\\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\\u2190",underleftarrow:"\\u2190",xleftarrow:"\\u2190",overrightarrow:"\\u2192",underrightarrow:"\\u2192",xrightarrow:"\\u2192",underbrace:"\\u23DF",overbrace:"\\u23DE",overgroup:"\\u23E0",undergroup:"\\u23E1",overleftrightarrow:"\\u2194",underleftrightarrow:"\\u2194",xleftrightarrow:"\\u2194",Overrightarrow:"\\u21D2",xRightarrow:"\\u21D2",overleftharpoon:"\\u21BC",xleftharpoonup:"\\u21BC",overrightharpoon:"\\u21C0",xrightharpoonup:"\\u21C0",xLeftarrow:"\\u21D0",xLeftrightarrow:"\\u21D4",xhookleftarrow:"\\u21A9",xhookrightarrow:"\\u21AA",xmapsto:"\\u21A6",xrightharpoondown:"\\u21C1",xleftharpoondown:"\\u21BD",xrightleftharpoons:"\\u21CC",xleftrightharpoons:"\\u21CB",xtwoheadleftarrow:"\\u219E",xtwoheadrightarrow:"\\u21A0",xlongequal:"=",xtofrom:"\\u21C4",xrightleftarrows:"\\u21C4",xrightequilibrium:"\\u21CC",xleftequilibrium:"\\u21CB","\\\\cdrightarrow":"\\u2192","\\\\cdleftarrow":"\\u2190","\\\\cdlongequal":"="},Pve=function(e){var r=new rt.MathNode("mo",[new rt.TextNode(Ove[e.replace(/^\\\\/,"")])]);return r.setAttribute("stretchy","true"),r},Bve={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Fve=function(e){return e.type==="ordgroup"?e.body.length:1},zve=function(e,r){function n(){var o=4e5,l=e.label.slice(1);if(Yt.contains(["widehat","widecheck","widetilde","utilde"],l)){var u=e,h=Fve(u.base),f,d,p;if(h>5)l==="widehat"||l==="widecheck"?(f=420,o=2364,p=.42,d=l+"4"):(f=312,o=2340,p=.34,d="tilde4");else{var g=[1,1,2,2,3,3][h];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][g],f=[0,239,300,360,420][g],p=[0,.24,.3,.3,.36,.42][g],d=l+g):(o=[0,600,1033,2339,2340][g],f=[0,260,286,306,312][g],p=[0,.26,.286,.3,.306,.34][g],d="tilde"+g)}var m=new $l(d),x=new Zo([m],{width:"100%",height:ct(p),viewBox:"0 0 "+o+" "+f,preserveAspectRatio:"none"});return{span:De.makeSvgSpan([],[x],r),minWidth:0,height:p}}else{var y=[],b=Bve[l],[w,_,k]=b,E=k/1e3,L=w.length,S,C;if(L===1){var M=b[3];S=["hide-tail"],C=[M]}else if(L===2)S=["halfarrow-left","halfarrow-right"],C=["xMinYMin","xMaxYMin"];else if(L===3)S=["brace-left","brace-center","brace-right"],C=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support\n `+L+" children.");for(var R=0;R<L;R++){var T=new $l(w[R]),I=new Zo([T],{width:"400em",height:ct(E),viewBox:"0 0 "+o+" "+k,preserveAspectRatio:C[R]+" slice"}),A=De.makeSvgSpan([S[R]],[I],r);if(L===1)return{span:A,minWidth:_,height:E};A.style.height=ct(E),y.push(A)}return{span:De.makeSpan(["stretchy"],y,r),minWidth:_,height:E}}}var{span:i,minWidth:a,height:s}=n();return i.height=s,i.style.height=ct(s),a>0&&(i.style.minWidth=ct(a)),i},$ve=function(e,r,n,i,a){var s,o=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=De.makeSpan(["stretchy",r],[],a),r==="fbox"){var l=a.color&&a.getColor();l&&(s.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new y1({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new y1({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new Zo(u,{width:"100%",height:ct(o)});s=De.makeSvgSpan([],[h],a)}return s.height=o,s.style.height=ct(o),s},Hc={encloseSpan:$ve,mathMLnode:Pve,svgSpan:zve};gS=(t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=ur(t.base,"accent"),r=n.base,t.base=r,i=uve(Cr(t,e)),t.base=n):(n=ur(t,"accent"),r=n.base);var a=Cr(r,e.havingCrampedStyle()),s=n.isShifty&&Yt.isCharacterBox(r),o=0;if(s){var l=Yt.getBaseElem(r),u=Cr(l,e.havingCrampedStyle());o=qP(u).skew}var h=n.label==="\\\\c",f=h?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight),d;if(n.isStretchy)d=Hc.svgSpan(n,e),d=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ct(2*o)+")",marginLeft:ct(2*o)}:void 0}]},e);else{var p,g;n.label==="\\\\vec"?(p=De.staticSvg("vec",e),g=De.svgData.vec[1]):(p=De.makeOrd({mode:n.mode,text:n.label},e,"textord"),p=qP(p),p.italic=0,g=p.width,h&&(f+=p.depth)),d=De.makeSpan(["accent-body"],[p]);var m=n.label==="\\\\textcircled";m&&(d.classes.push("accent-full"),f=a.height);var x=o;m||(x-=g/2),d.style.left=ct(x),n.label==="\\\\textcircled"&&(d.style.top=".2em"),d=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:d}]},e)}var y=De.makeSpan(["mord","accent"],[d],e);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},OB=(t,e)=>{var r=t.isStretchy?Hc.mathMLnode(t.label):new rt.MathNode("mo",[uo(t.label,t.mode)]),n=new rt.MathNode("mover",[cn(t.base,e),r]);return n.setAttribute("accent","true"),n},Gve=new RegExp(["\\\\acute","\\\\grave","\\\\ddot","\\\\tilde","\\\\bar","\\\\breve","\\\\check","\\\\hat","\\\\vec","\\\\dot","\\\\mathring"].map(t=>"\\\\"+t).join("|"));xt({type:"accent",names:["\\\\acute","\\\\grave","\\\\ddot","\\\\tilde","\\\\bar","\\\\breve","\\\\check","\\\\hat","\\\\vec","\\\\dot","\\\\mathring","\\\\widecheck","\\\\widehat","\\\\widetilde","\\\\overrightarrow","\\\\overleftarrow","\\\\Overrightarrow","\\\\overleftrightarrow","\\\\overgroup","\\\\overlinesegment","\\\\overleftharpoon","\\\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=gb(e[0]),n=!Gve.test(t.funcName),i=!n||t.funcName==="\\\\widehat"||t.funcName==="\\\\widetilde"||t.funcName==="\\\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:gS,mathmlBuilder:OB});xt({type:"accent",names:["\\\\\'","\\\\`","\\\\^","\\\\~","\\\\=","\\\\u","\\\\.",\'\\\\"\',"\\\\c","\\\\r","\\\\H","\\\\v","\\\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX\'s accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:gS,mathmlBuilder:OB});xt({type:"accentUnder",names:["\\\\underleftarrow","\\\\underrightarrow","\\\\underleftrightarrow","\\\\undergroup","\\\\underlinesegment","\\\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=Cr(t.base,e),n=Hc.svgSpan(t,e),i=t.label==="\\\\utilde"?.12:0,a=De.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return De.makeSpan(["mord","accentunder"],[a],e)},mathmlBuilder:(t,e)=>{var r=Hc.mathMLnode(t.label),n=new rt.MathNode("munder",[cn(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});ab=t=>{var e=new rt.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};xt({type:"xArrow",names:["\\\\xleftarrow","\\\\xrightarrow","\\\\xLeftarrow","\\\\xRightarrow","\\\\xleftrightarrow","\\\\xLeftrightarrow","\\\\xhookleftarrow","\\\\xhookrightarrow","\\\\xmapsto","\\\\xrightharpoondown","\\\\xrightharpoonup","\\\\xleftharpoondown","\\\\xleftharpoonup","\\\\xrightleftharpoons","\\\\xleftrightharpoons","\\\\xlongequal","\\\\xtwoheadrightarrow","\\\\xtwoheadleftarrow","\\\\xtofrom","\\\\xrightleftarrows","\\\\xrightequilibrium","\\\\xleftequilibrium","\\\\\\\\cdrightarrow","\\\\\\\\cdleftarrow","\\\\\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=De.wrapFragment(Cr(t.body,n,e),e),a=t.label.slice(0,2)==="\\\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;t.below&&(n=e.havingStyle(r.sub()),s=De.wrapFragment(Cr(t.below,n,e),e),s.classes.push(a+"-arrow-pad"));var o=Hc.svgSpan(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,u=-e.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||t.label==="\\\\xleftequilibrium")&&(u-=i.depth);var h;if(s){var f=-e.fontMetrics().axisHeight+s.height+.5*o.height+.111;h=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l},{type:"elem",elem:s,shift:f}]},e)}else h=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l}]},e);return h.children[0].children[0].children[1].classes.push("svg-align"),De.makeSpan(["mrel","x-arrow"],[h],e)},mathmlBuilder(t,e){var r=Hc.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=ab(cn(t.body,e));if(t.below){var a=ab(cn(t.below,e));n=new rt.MathNode("munderover",[r,a,i])}else n=new rt.MathNode("mover",[r,i])}else if(t.below){var s=ab(cn(t.below,e));n=new rt.MathNode("munder",[r,s])}else n=ab(),n=new rt.MathNode("mover",[r,n]);return n}});Uve=De.makeSpan;xt({type:"mclass",names:["\\\\mathord","\\\\mathbin","\\\\mathrel","\\\\mathopen","\\\\mathclose","\\\\mathpunct","\\\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:ai(i),isCharacterBox:Yt.isCharacterBox(i)}},htmlBuilder:PB,mathmlBuilder:BB});wb=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};xt({type:"mclass",names:["\\\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:wb(e[0]),body:ai(e[1]),isCharacterBox:Yt.isCharacterBox(e[1])}}});xt({type:"mclass",names:["\\\\stackrel","\\\\overset","\\\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],a=e[0],s;n!=="\\\\stackrel"?s=wb(i):s="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\\\stackrel",body:ai(i)},l={type:"supsub",mode:a.mode,base:o,sup:n==="\\\\underset"?null:a,sub:n==="\\\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[l],isCharacterBox:Yt.isCharacterBox(l)}},htmlBuilder:PB,mathmlBuilder:BB});xt({type:"pmb",names:["\\\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:wb(e[0]),body:ai(e[0])}},htmlBuilder(t,e){var r=wi(t.body,e,!0),n=De.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=rs(t.body,e),n=new rt.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});Vve={">":"\\\\\\\\cdrightarrow","<":"\\\\\\\\cdleftarrow","=":"\\\\\\\\cdlongequal",A:"\\\\uparrow",V:"\\\\downarrow","|":"\\\\Vert",".":"no arrow"},QP=()=>({type:"styling",body:[],mode:"math",style:"display"}),JP=t=>t.type==="textord"&&t.text==="@",Wve=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;xt({type:"cdlabel",names:["\\\\\\\\cdleft","\\\\\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=De.wrapFragment(Cr(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=ct(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new rt.MathNode("mrow",[cn(t.label,e)]);return r=new rt.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new rt.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});xt({type:"cdlabelparent",names:["\\\\\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=De.wrapFragment(Cr(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new rt.MathNode("mrow",[cn(t.fragment,e)])}});xt({type:"textord",names:["\\\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=ur(e[0],"ordgroup"),i=n.body,a="",s=0;s<i.length;s++){var o=ur(i[s],"textord");a+=o.text}var l=parseInt(a),u;if(isNaN(l))throw new nt("\\\\@char has non-numeric argument "+a);if(l<0||l>=1114111)throw new nt("\\\\@char with invalid code point "+a);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});FB=(t,e)=>{var r=wi(t.body,e.withColor(t.color),!1);return De.makeFragment(r)},zB=(t,e)=>{var r=rs(t.body,e.withColor(t.color)),n=new rt.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};xt({type:"color",names:["\\\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=ur(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:ai(i)}},htmlBuilder:FB,mathmlBuilder:zB});xt({type:"color",names:["\\\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=ur(e[0],"color-token").color;r.gullet.macros.set("\\\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:FB,mathmlBuilder:zB});xt({type:"cr",names:["\\\\\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\\\\\ or \\\\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&ur(i,"size").value}},htmlBuilder(t,e){var r=De.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=ct(Vn(t.size,e)))),r},mathmlBuilder(t,e){var r=new rt.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",ct(Vn(t.size,e)))),r}});iS={"\\\\global":"\\\\global","\\\\long":"\\\\\\\\globallong","\\\\\\\\globallong":"\\\\\\\\globallong","\\\\def":"\\\\gdef","\\\\gdef":"\\\\gdef","\\\\edef":"\\\\xdef","\\\\xdef":"\\\\xdef","\\\\let":"\\\\\\\\globallet","\\\\futurelet":"\\\\\\\\globalfuture"},$B=t=>{var e=t.text;if(/^(?:[\\\\{}$&#^_]|EOF)$/.test(e))throw new nt("Expected a control sequence",t);return e},Yve=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},GB=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};xt({type:"internal",names:["\\\\global","\\\\long","\\\\\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(iS[n.text])return(r==="\\\\global"||r==="\\\\\\\\globallong")&&(n.text=iS[n.text]),ur(e.parseFunction(),"internal");throw new nt("Invalid token after macro prefix",n)}});xt({type:"internal",names:["\\\\def","\\\\gdef","\\\\edef","\\\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\\\{}$&#^_]|EOF)$/.test(i))throw new nt("Expected a control sequence",n);for(var a=0,s,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),o[a].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new nt(\'Invalid argument number "\'+n.text+\'"\');if(parseInt(n.text)!==a+1)throw new nt(\'Argument number "\'+n.text+\'" out of order\');a++,o.push([])}else{if(n.text==="EOF")throw new nt("Expected a macro definition");o[a].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return s&&l.unshift(s),(r==="\\\\edef"||r==="\\\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:o},r===iS[r]),{type:"internal",mode:e.mode}}});xt({type:"internal",names:["\\\\let","\\\\\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=$B(e.gullet.popToken());e.gullet.consumeSpaces();var i=Yve(e);return GB(e,n,i,r==="\\\\\\\\globallet"),{type:"internal",mode:e.mode}}});xt({type:"internal",names:["\\\\futurelet","\\\\\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=$B(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return GB(e,n,a,r==="\\\\\\\\globalfuture"),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});d1=function(e,r,n){var i=yn.math[e]&&yn.math[e].replace,a=uS(i||e,r,n);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return a},mS=function(e,r,n,i){var a=n.havingBaseStyle(r),s=De.makeSpan(i.concat(a.sizingClasses(n)),[e],n),o=a.sizeMultiplier/n.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=a.sizeMultiplier,s},UB=function(e,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ct(a),e.height-=a,e.depth+=a},Xve=function(e,r,n,i,a,s){var o=De.makeSymbol(e,"Main-Regular",a,i),l=mS(o,r,i,s);return n&&UB(l,i,r),l},jve=function(e,r,n,i){return De.makeSymbol(e,"Size"+r+"-Regular",n,i)},VB=function(e,r,n,i,a,s){var o=jve(e,r,a,i),l=mS(De.makeSpan(["delimsizing","size"+r],[o],i),jt.TEXT,i,s);return n&&UB(l,i,jt.TEXT),l},UE=function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=De.makeSpan(["delimsizinginner",i],[De.makeSpan([],[De.makeSymbol(e,r,n)])]);return{type:"elem",elem:a}},VE=function(e,r,n){var i=zl["Size4-Regular"][e.charCodeAt(0)]?zl["Size4-Regular"][e.charCodeAt(0)][4]:zl["Size1-Regular"][e.charCodeAt(0)][4],a=new $l("inner",nve(e,Math.round(1e3*r))),s=new Zo([a],{width:ct(i),height:ct(r),style:"width:"+ct(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=De.makeSvgSpan([],[s],n);return o.height=r,o.style.height=ct(r),o.style.width=ct(i),{type:"elem",elem:o}},aS=.008,sb={type:"kern",size:-1*aS},Kve=["|","\\\\lvert","\\\\rvert","\\\\vert"],Zve=["\\\\|","\\\\lVert","\\\\rVert","\\\\Vert"],WB=function(e,r,n,i,a,s){var o,l,u,h,f="",d=0;o=u=h=e,l=null;var p="Size1-Regular";e==="\\\\uparrow"?u=h="\\u23D0":e==="\\\\Uparrow"?u=h="\\u2016":e==="\\\\downarrow"?o=u="\\u23D0":e==="\\\\Downarrow"?o=u="\\u2016":e==="\\\\updownarrow"?(o="\\\\uparrow",u="\\u23D0",h="\\\\downarrow"):e==="\\\\Updownarrow"?(o="\\\\Uparrow",u="\\u2016",h="\\\\Downarrow"):Yt.contains(Kve,e)?(u="\\u2223",f="vert",d=333):Yt.contains(Zve,e)?(u="\\u2225",f="doublevert",d=556):e==="["||e==="\\\\lbrack"?(o="\\u23A1",u="\\u23A2",h="\\u23A3",p="Size4-Regular",f="lbrack",d=667):e==="]"||e==="\\\\rbrack"?(o="\\u23A4",u="\\u23A5",h="\\u23A6",p="Size4-Regular",f="rbrack",d=667):e==="\\\\lfloor"||e==="\\u230A"?(u=o="\\u23A2",h="\\u23A3",p="Size4-Regular",f="lfloor",d=667):e==="\\\\lceil"||e==="\\u2308"?(o="\\u23A1",u=h="\\u23A2",p="Size4-Regular",f="lceil",d=667):e==="\\\\rfloor"||e==="\\u230B"?(u=o="\\u23A5",h="\\u23A6",p="Size4-Regular",f="rfloor",d=667):e==="\\\\rceil"||e==="\\u2309"?(o="\\u23A4",u=h="\\u23A5",p="Size4-Regular",f="rceil",d=667):e==="("||e==="\\\\lparen"?(o="\\u239B",u="\\u239C",h="\\u239D",p="Size4-Regular",f="lparen",d=875):e===")"||e==="\\\\rparen"?(o="\\u239E",u="\\u239F",h="\\u23A0",p="Size4-Regular",f="rparen",d=875):e==="\\\\{"||e==="\\\\lbrace"?(o="\\u23A7",l="\\u23A8",h="\\u23A9",u="\\u23AA",p="Size4-Regular"):e==="\\\\}"||e==="\\\\rbrace"?(o="\\u23AB",l="\\u23AC",h="\\u23AD",u="\\u23AA",p="Size4-Regular"):e==="\\\\lgroup"||e==="\\u27EE"?(o="\\u23A7",h="\\u23A9",u="\\u23AA",p="Size4-Regular"):e==="\\\\rgroup"||e==="\\u27EF"?(o="\\u23AB",h="\\u23AD",u="\\u23AA",p="Size4-Regular"):e==="\\\\lmoustache"||e==="\\u23B0"?(o="\\u23A7",h="\\u23AD",u="\\u23AA",p="Size4-Regular"):(e==="\\\\rmoustache"||e==="\\u23B1")&&(o="\\u23AB",h="\\u23A9",u="\\u23AA",p="Size4-Regular");var g=d1(o,p,a),m=g.height+g.depth,x=d1(u,p,a),y=x.height+x.depth,b=d1(h,p,a),w=b.height+b.depth,_=0,k=1;if(l!==null){var E=d1(l,p,a);_=E.height+E.depth,k=2}var L=m+w+_,S=Math.max(0,Math.ceil((r-L)/(k*y))),C=L+S*k*y,M=i.fontMetrics().axisHeight;n&&(M*=i.sizeMultiplier);var R=C/2-M,T=[];if(f.length>0){var I=C-m-w,A=Math.round(C*1e3),D=ive(f,Math.round(I*1e3)),N=new $l(f,D),O=(d/1e3).toFixed(3)+"em",B=(A/1e3).toFixed(3)+"em",P=new Zo([N],{width:O,height:B,viewBox:"0 0 "+d+" "+A}),$=De.makeSvgSpan([],[P],i);$.height=A/1e3,$.style.width=O,$.style.height=B,T.push({type:"elem",elem:$})}else{if(T.push(UE(h,p,a)),T.push(sb),l===null){var z=C-m-w+2*aS;T.push(VE(u,z,i))}else{var H=(C-m-w-_)/2+2*aS;T.push(VE(u,H,i)),T.push(sb),T.push(UE(l,p,a)),T.push(sb),T.push(VE(u,H,i))}T.push(sb),T.push(UE(o,p,a))}var Z=i.havingBaseStyle(jt.TEXT),X=De.makeVList({positionType:"bottom",positionData:R,children:T},Z);return mS(De.makeSpan(["delimsizing","mult"],[X],Z),jt.TEXT,i,s)},WE=80,HE=.08,qE=function(e,r,n,i,a){var s=rve(e,i,n),o=new $l(e,s),l=new Zo([o],{width:"400em",height:ct(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return De.makeSvgSpan(["hide-tail"],[l],a)},Qve=function(e,r){var n=r.havingBaseSizing(),i=XB("\\\\surd",e*n.sizeMultiplier,YB,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l=0,u=0,h=0,f;return i.type==="small"?(h=1e3+1e3*s+WE,e<1?a=1:e<1.4&&(a=.7),l=(1+s+HE)/a,u=(1+s)/a,o=qE("sqrtMain",l,h,s,r),o.style.minWidth="0.853em",f=.833/a):i.type==="large"?(h=(1e3+WE)*p1[i.size],u=(p1[i.size]+s)/a,l=(p1[i.size]+s+HE)/a,o=qE("sqrtSize"+i.size,l,h,s,r),o.style.minWidth="1.02em",f=1/a):(l=e+s+HE,u=e+s,h=Math.floor(1e3*e+s)+WE,o=qE("sqrtTall",l,h,s,r),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=ct(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},HB=["(","\\\\lparen",")","\\\\rparen","[","\\\\lbrack","]","\\\\rbrack","\\\\{","\\\\lbrace","\\\\}","\\\\rbrace","\\\\lfloor","\\\\rfloor","\\u230A","\\u230B","\\\\lceil","\\\\rceil","\\u2308","\\u2309","\\\\surd"],Jve=["\\\\uparrow","\\\\downarrow","\\\\updownarrow","\\\\Uparrow","\\\\Downarrow","\\\\Updownarrow","|","\\\\|","\\\\vert","\\\\Vert","\\\\lvert","\\\\rvert","\\\\lVert","\\\\rVert","\\\\lgroup","\\\\rgroup","\\u27EE","\\u27EF","\\\\lmoustache","\\\\rmoustache","\\u23B0","\\u23B1"],qB=["<",">","\\\\langle","\\\\rangle","/","\\\\backslash","\\\\lt","\\\\gt"],p1=[0,1.2,1.8,2.4,3],eye=function(e,r,n,i,a){if(e==="<"||e==="\\\\lt"||e==="\\u27E8"?e="\\\\langle":(e===">"||e==="\\\\gt"||e==="\\u27E9")&&(e="\\\\rangle"),Yt.contains(HB,e)||Yt.contains(qB,e))return VB(e,r,!1,n,i,a);if(Yt.contains(Jve,e))return WB(e,p1[r],!1,n,i,a);throw new nt("Illegal delimiter: \'"+e+"\'")},tye=[{type:"small",style:jt.SCRIPTSCRIPT},{type:"small",style:jt.SCRIPT},{type:"small",style:jt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],rye=[{type:"small",style:jt.SCRIPTSCRIPT},{type:"small",style:jt.SCRIPT},{type:"small",style:jt.TEXT},{type:"stack"}],YB=[{type:"small",style:jt.SCRIPTSCRIPT},{type:"small",style:jt.SCRIPT},{type:"small",style:jt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],nye=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type \'"+e.type+"\' here.")},XB=function(e,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;s<n.length&&n[s].type!=="stack";s++){var o=d1(e,nye(n[s]),"math"),l=o.height+o.depth;if(n[s].type==="small"){var u=i.havingBaseStyle(n[s].style);l*=u.sizeMultiplier}if(l>r)return n[s]}return n[n.length-1]},jB=function(e,r,n,i,a,s){e==="<"||e==="\\\\lt"||e==="\\u27E8"?e="\\\\langle":(e===">"||e==="\\\\gt"||e==="\\u27E9")&&(e="\\\\rangle");var o;Yt.contains(qB,e)?o=tye:Yt.contains(HB,e)?o=YB:o=rye;var l=XB(e,r,o,i);return l.type==="small"?Xve(e,l.style,n,i,a,s):l.type==="large"?VB(e,l.size,n,i,a,s):WB(e,r,n,i,a,s)},iye=function(e,r,n,i,a,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,h=Math.max(r-o,n+o),f=Math.max(h/500*l,2*h-u);return jB(e,f,!0,i,a,s)},Vc={sqrtImage:Qve,sizedDelim:eye,sizeToMaxHeight:p1,customSizedDelim:jB,leftRightDelim:iye},eB={"\\\\bigl":{mclass:"mopen",size:1},"\\\\Bigl":{mclass:"mopen",size:2},"\\\\biggl":{mclass:"mopen",size:3},"\\\\Biggl":{mclass:"mopen",size:4},"\\\\bigr":{mclass:"mclose",size:1},"\\\\Bigr":{mclass:"mclose",size:2},"\\\\biggr":{mclass:"mclose",size:3},"\\\\Biggr":{mclass:"mclose",size:4},"\\\\bigm":{mclass:"mrel",size:1},"\\\\Bigm":{mclass:"mrel",size:2},"\\\\biggm":{mclass:"mrel",size:3},"\\\\Biggm":{mclass:"mrel",size:4},"\\\\big":{mclass:"mord",size:1},"\\\\Big":{mclass:"mord",size:2},"\\\\bigg":{mclass:"mord",size:3},"\\\\Bigg":{mclass:"mord",size:4}},aye=["(","\\\\lparen",")","\\\\rparen","[","\\\\lbrack","]","\\\\rbrack","\\\\{","\\\\lbrace","\\\\}","\\\\rbrace","\\\\lfloor","\\\\rfloor","\\u230A","\\u230B","\\\\lceil","\\\\rceil","\\u2308","\\u2309","<",">","\\\\langle","\\u27E8","\\\\rangle","\\u27E9","\\\\lt","\\\\gt","\\\\lvert","\\\\rvert","\\\\lVert","\\\\rVert","\\\\lgroup","\\\\rgroup","\\u27EE","\\u27EF","\\\\lmoustache","\\\\rmoustache","\\u23B0","\\u23B1","/","\\\\backslash","|","\\\\vert","\\\\|","\\\\Vert","\\\\uparrow","\\\\Uparrow","\\\\downarrow","\\\\Downarrow","\\\\updownarrow","\\\\Updownarrow","."];xt({type:"delimsizing",names:["\\\\bigl","\\\\Bigl","\\\\biggl","\\\\Biggl","\\\\bigr","\\\\Bigr","\\\\biggr","\\\\Biggr","\\\\bigm","\\\\Bigm","\\\\biggm","\\\\Biggm","\\\\big","\\\\Big","\\\\bigg","\\\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var r=kb(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:eB[t.funcName].size,mclass:eB[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?De.makeSpan([t.mclass]):Vc.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(uo(t.delim,t.mode));var r=new rt.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=ct(Vc.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});xt({type:"leftright-right",names:["\\\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\\\current@color");if(r&&typeof r!="string")throw new nt("\\\\current@color set to non-string in \\\\right");return{type:"leftright-right",mode:t.parser.mode,delim:kb(e[0],t).text,color:r}}});xt({type:"leftright",names:["\\\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=kb(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\\\right",!1);var a=ur(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,e)=>{tB(t);for(var r=wi(t.body,e,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s<r.length;s++)r[s].isMiddle?a=!0:(n=Math.max(r[s].height,n),i=Math.max(r[s].depth,i));n*=e.sizeMultiplier,i*=e.sizeMultiplier;var o;if(t.left==="."?o=x1(e,["mopen"]):o=Vc.leftRightDelim(t.left,n,i,e,t.mode,["mopen"]),r.unshift(o),a)for(var l=1;l<r.length;l++){var u=r[l],h=u.isMiddle;h&&(r[l]=Vc.leftRightDelim(h.delim,n,i,h.options,t.mode,[]))}var f;if(t.right===".")f=x1(e,["mclose"]);else{var d=t.rightColor?e.withColor(t.rightColor):e;f=Vc.leftRightDelim(t.right,n,i,d,t.mode,["mclose"])}return r.push(f),De.makeSpan(["minner"],r,e)},mathmlBuilder:(t,e)=>{tB(t);var r=rs(t.body,e);if(t.left!=="."){var n=new rt.MathNode("mo",[uo(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new rt.MathNode("mo",[uo(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return fS(r)}});xt({type:"middle",names:["\\\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=kb(e[0],t);if(!t.parser.leftrightDepth)throw new nt("\\\\middle without preceding \\\\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if(t.delim===".")r=x1(e,[]);else{r=Vc.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\\\vert"||t.delim==="|"?uo("|","text"):uo(t.delim,t.mode),n=new rt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});vS=(t,e)=>{var r=De.wrapFragment(Cr(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,a,s=0,o=Yt.isCharacterBox(t.body);if(n==="sout")a=De.makeSpan(["stretchy","sout"]),a.height=e.fontMetrics().defaultRuleThickness/i,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=Vn({number:.6,unit:"pt"},e),u=Vn({number:.35,unit:"ex"},e),h=e.havingBaseSizing();i=i/h.sizeMultiplier;var f=r.height+r.depth+l+u;r.style.paddingLeft=ct(f/2+l);var d=Math.floor(1e3*f*i),p=eve(d),g=new Zo([new $l("phase",p)],{width:"400em",height:ct(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=De.makeSvgSpan(["hide-tail"],[g],e),a.style.height=ct(f),s=r.depth+l+u}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var m=0,x=0,y=0;/box/.test(n)?(y=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),m=e.fontMetrics().fboxsep+(n==="colorbox"?0:y),x=m):n==="angl"?(y=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),m=4*y,x=Math.max(0,.25-r.depth)):(m=o?.2:0,x=m),a=Hc.encloseSpan(r,n,m,x,e),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=ct(y)):n==="angl"&&y!==.049&&(a.style.borderTopWidth=ct(y),a.style.borderRightWidth=ct(y)),s=r.depth+x,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var b;if(t.backgroundColor)b=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]},e);else{var w=/cancel|phase/.test(n)?["svg-align"]:[];b=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:w}]},e)}return/cancel/.test(n)&&(b.height=r.height,b.depth=r.depth),/cancel/.test(n)&&!o?De.makeSpan(["mord","cancel-lap"],[b],e):De.makeSpan(["mord"],[b],e)},yS=(t,e)=>{var r=0,n=new rt.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[cn(t.body,e)]);switch(t.label){case"\\\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\\\phase":n.setAttribute("notation","phasorangle");break;case"\\\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\\\fbox":n.setAttribute("notation","box");break;case"\\\\angl":n.setAttribute("notation","actuarial");break;case"\\\\fcolorbox":case"\\\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};xt({type:"enclose",names:["\\\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=ur(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:vS,mathmlBuilder:yS});xt({type:"enclose",names:["\\\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=ur(e[0],"color-token").color,s=ur(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:vS,mathmlBuilder:yS});xt({type:"enclose",names:["\\\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\\\fbox",body:e[0]}}});xt({type:"enclose",names:["\\\\cancel","\\\\bcancel","\\\\xcancel","\\\\sout","\\\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:vS,mathmlBuilder:yS});xt({type:"enclose",names:["\\\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\\\angl",body:e[0]}}});KB={};ZB={};Tb=t=>{var e=t.parser.settings;if(!e.displayMode)throw new nt("{"+t.envName+"} can be used only in display mode.")};Ul=function(e,r){var n,i,a=e.body.length,s=e.hLinesBeforeRow,o=0,l=new Array(a),u=[],h=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,d=5*f;if(e.colSeparationType&&e.colSeparationType==="small"){var p=r.havingStyle(jt.SCRIPT).sizeMultiplier;d=.2778*(p/r.sizeMultiplier)}var g=e.colSeparationType==="CD"?Vn({number:3,unit:"ex"},r):12*f,m=3*f,x=e.arraystretch*g,y=.7*x,b=.3*x,w=0;function _(be){for(var Fe=0;Fe<be.length;++Fe)Fe>0&&(w+=.25),u.push({pos:w,isDashed:be[Fe]})}for(_(s[0]),n=0;n<e.body.length;++n){var k=e.body[n],E=y,L=b;o<k.length&&(o=k.length);var S=new Array(k.length);for(i=0;i<k.length;++i){var C=Cr(k[i],r);L<C.depth&&(L=C.depth),E<C.height&&(E=C.height),S[i]=C}var M=e.rowGaps[n],R=0;M&&(R=Vn(M,r),R>0&&(R+=b,L<R&&(L=R),R=0)),e.addJot&&(L+=m),S.height=E,S.depth=L,w+=E,S.pos=w,w+=L+R,l[n]=S,_(s[n+1])}var T=w/2+r.fontMetrics().axisHeight,I=e.cols||[],A=[],D,N,O=[];if(e.tags&&e.tags.some(be=>be))for(n=0;n<a;++n){var B=l[n],P=B.pos-T,$=e.tags[n],z=void 0;$===!0?z=De.makeSpan(["eqn-num"],[],r):$===!1?z=De.makeSpan([],[],r):z=De.makeSpan([],wi($,r,!0),r),z.depth=B.depth,z.height=B.height,O.push({type:"elem",elem:z,shift:P})}for(i=0,N=0;i<o||N<I.length;++i,++N){for(var H=I[N]||{},Z=!0;H.type==="separator";){if(Z||(D=De.makeSpan(["arraycolsep"],[]),D.style.width=ct(r.fontMetrics().doubleRuleSep),A.push(D)),H.separator==="|"||H.separator===":"){var X=H.separator==="|"?"solid":"dashed",ie=De.makeSpan(["vertical-separator"],[],r);ie.style.height=ct(w),ie.style.borderRightWidth=ct(h),ie.style.borderRightStyle=X,ie.style.margin="0 "+ct(-h/2);var K=w-T;K&&(ie.style.verticalAlign=ct(-K)),A.push(ie)}else throw new nt("Invalid separator type: "+H.separator);N++,H=I[N]||{},Z=!1}if(!(i>=o)){var ee=void 0;(i>0||e.hskipBeforeAndAfter)&&(ee=Yt.deflt(H.pregap,d),ee!==0&&(D=De.makeSpan(["arraycolsep"],[]),D.style.width=ct(ee),A.push(D)));var J=[];for(n=0;n<a;++n){var W=l[n],Y=W[i];if(Y){var Q=W.pos-T;Y.depth=W.depth,Y.height=W.height,J.push({type:"elem",elem:Y,shift:Q})}}J=De.makeVList({positionType:"individualShift",children:J},r),J=De.makeSpan(["col-align-"+(H.align||"c")],[J]),A.push(J),(i<o-1||e.hskipBeforeAndAfter)&&(ee=Yt.deflt(H.postgap,d),ee!==0&&(D=De.makeSpan(["arraycolsep"],[]),D.style.width=ct(ee),A.push(D)))}}if(l=De.makeSpan(["mtable"],A),u.length>0){for(var se=De.makeLineSpan("hline",r,h),ue=De.makeLineSpan("hdashline",r,h),ce=[{type:"elem",elem:l,shift:0}];u.length>0;){var te=u.pop(),Le=te.pos-T;te.isDashed?ce.push({type:"elem",elem:ue,shift:Le}):ce.push({type:"elem",elem:se,shift:Le})}l=De.makeVList({positionType:"individualShift",children:ce},r)}if(O.length===0)return De.makeSpan(["mord"],[l],r);var oe=De.makeVList({positionType:"individualShift",children:O},r);return oe=De.makeSpan(["tag"],[oe],r),De.makeFragment([l,oe])},sye={c:"center ",l:"left ",r:"right "},Vl=function(e,r){for(var n=[],i=new rt.MathNode("mtd",[],["mtr-glue"]),a=new rt.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var o=e.body[s],l=[],u=0;u<o.length;u++)l.push(new rt.MathNode("mtd",[cn(o[u],r)]));e.tags&&e.tags[s]&&(l.unshift(i),l.push(i),e.leqno?l.unshift(a):l.push(a)),n.push(new rt.MathNode("mtr",l))}var h=new rt.MathNode("mtable",n),f=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);h.setAttribute("rowspacing",ct(f));var d="",p="";if(e.cols&&e.cols.length>0){var g=e.cols,m="",x=!1,y=0,b=g.length;g[0].type==="separator"&&(d+="top ",y=1),g[g.length-1].type==="separator"&&(d+="bottom ",b-=1);for(var w=y;w<b;w++)g[w].type==="align"?(p+=sye[g[w].align],x&&(m+="none "),x=!0):g[w].type==="separator"&&x&&(m+=g[w].separator==="|"?"solid ":"dashed ",x=!1);h.setAttribute("columnalign",p.trim()),/[sd]/.test(m)&&h.setAttribute("columnlines",m.trim())}if(e.colSeparationType==="align"){for(var _=e.cols||[],k="",E=1;E<_.length;E++)k+=E%2?"0em ":"1em ";h.setAttribute("columnspacing",k.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?h.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?h.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?h.setAttribute("columnspacing","0.5em"):h.setAttribute("columnspacing","1em");var L="",S=e.hLinesBeforeRow;d+=S[0].length>0?"left ":"",d+=S[S.length-1].length>0?"right ":"";for(var C=1;C<S.length-1;C++)L+=S[C].length===0?"none ":S[C][0]?"dashed ":"solid ";return/[sd]/.test(L)&&h.setAttribute("rowlines",L.trim()),d!==""&&(h=new rt.MathNode("menclose",[h]),h.setAttribute("notation",d.trim())),e.arraystretch&&e.arraystretch<1&&(h=new rt.MathNode("mstyle",[h]),h.setAttribute("scriptlevel","1")),h},QB=function(e,r){e.envName.indexOf("ed")===-1&&Tb(e);var n=[],i=e.envName.indexOf("at")>-1?"alignat":"align",a=e.envName==="split",s=eh(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:xS(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),o,l=0,u={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var h="",f=0;f<r[0].body.length;f++){var d=ur(r[0].body[f],"textord");h+=d.text}o=Number(h),l=o*2}var p=!l;s.body.forEach(function(y){for(var b=1;b<y.length;b+=2){var w=ur(y[b],"styling"),_=ur(w.body[0],"ordgroup");_.body.unshift(u)}if(p)l<y.length&&(l=y.length);else{var k=y.length/2;if(o<k)throw new nt("Too many math in a row: "+("expected "+o+", but got "+k),y[0])}});for(var g=0;g<l;++g){var m="r",x=0;g%2===1?m="l":g>0&&p&&(x=1),n[g]={type:"align",align:m,pregap:x,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};Gl({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=bb(e[0]),n=r?[e[0]]:ur(e[0],"ordgroup").body,i=n.map(function(s){var o=pS(s),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new nt("Unknown column alignment: "+l,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return eh(t.parser,a,bS(t.envName))},htmlBuilder:Ul,mathmlBuilder:Vl});Gl({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\\\{","\\\\}"],vmatrix:["|","|"],Vmatrix:["\\\\Vert","\\\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new nt("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=eh(t.parser,n,bS(t.envName)),s=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:Ul,mathmlBuilder:Vl});Gl({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=eh(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:Ul,mathmlBuilder:Vl});Gl({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=bb(e[0]),n=r?[e[0]]:ur(e[0],"ordgroup").body,i=n.map(function(s){var o=pS(s),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new nt("Unknown column alignment: "+l,s)});if(i.length>1)throw new nt("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=eh(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new nt("{subarray} can contain only one column");return a},htmlBuilder:Ul,mathmlBuilder:Vl});Gl({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=eh(t.parser,e,bS(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\\\{",right:t.envName.indexOf("r")>-1?"\\\\}":".",rightColor:void 0}},htmlBuilder:Ul,mathmlBuilder:Vl});Gl({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:QB,htmlBuilder:Ul,mathmlBuilder:Vl});Gl({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){Yt.contains(["gather","gather*"],t.envName)&&Tb(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:xS(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return eh(t.parser,e,"display")},htmlBuilder:Ul,mathmlBuilder:Vl});Gl({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:QB,htmlBuilder:Ul,mathmlBuilder:Vl});Gl({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Tb(t);var e={autoTag:xS(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return eh(t.parser,e,"display")},htmlBuilder:Ul,mathmlBuilder:Vl});Gl({type:"array",names:["CD"],props:{numArgs:0},handler(t){return Tb(t),qve(t.parser)},htmlBuilder:Ul,mathmlBuilder:Vl});le("\\\\nonumber","\\\\gdef\\\\@eqnsw{0}");le("\\\\notag","\\\\nonumber");xt({type:"text",names:["\\\\hline","\\\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new nt(t.funcName+" valid only within array environment")}});nB=KB;xt({type:"environment",names:["\\\\begin","\\\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new nt("Invalid environment name",i);for(var a="",s=0;s<i.body.length;++s)a+=ur(i.body[s],"textord").text;if(n==="\\\\begin"){if(!nB.hasOwnProperty(a))throw new nt("No such environment: "+a,i);var o=nB[a],{args:l,optArgs:u}=r.parseArguments("\\\\begin{"+a+"}",o),h={mode:r.mode,envName:a,parser:r},f=o.handler(h,l,u);r.expect("\\\\end",!1);var d=r.nextToken,p=ur(r.parseFunction(),"environment");if(p.name!==a)throw new nt("Mismatch: \\\\begin{"+a+"} matched by \\\\end{"+p.name+"}",d);return f}return{type:"environment",mode:r.mode,name:a,nameGroup:i}}});JB=(t,e)=>{var r=t.font,n=e.withFont(r);return Cr(t.body,n)},eF=(t,e)=>{var r=t.font,n=e.withFont(r);return cn(t.body,n)},iB={"\\\\Bbb":"\\\\mathbb","\\\\bold":"\\\\mathbf","\\\\frak":"\\\\mathfrak","\\\\bm":"\\\\boldsymbol"};xt({type:"font",names:["\\\\mathrm","\\\\mathit","\\\\mathbf","\\\\mathnormal","\\\\mathbb","\\\\mathcal","\\\\mathfrak","\\\\mathscr","\\\\mathsf","\\\\mathtt","\\\\Bbb","\\\\bold","\\\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=gb(e[0]),a=n;return a in iB&&(a=iB[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:JB,mathmlBuilder:eF});xt({type:"mclass",names:["\\\\boldsymbol","\\\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],i=Yt.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:wb(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});xt({type:"font",names:["\\\\rm","\\\\sf","\\\\tt","\\\\bf","\\\\it","\\\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,s=r.parseExpression(!0,i),o="math"+n.slice(1);return{type:"font",mode:a,font:o,body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:JB,mathmlBuilder:eF});tF=(t,e)=>{var r=e;return t==="display"?r=r.id>=jt.SCRIPT.id?r.text():jt.DISPLAY:t==="text"&&r.size===jt.DISPLAY.size?r=jt.TEXT:t==="script"?r=jt.SCRIPT:t==="scriptscript"&&(r=jt.SCRIPTSCRIPT),r},wS=(t,e)=>{var r=tF(t.size,e.style),n=r.fracNum(),i=r.fracDen(),a;a=e.havingStyle(n);var s=Cr(t.numer,a,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height<o?o:s.height,s.depth=s.depth<l?l:s.depth}a=e.havingStyle(i);var u=Cr(t.denom,a,e),h,f,d;t.hasBarLine?(t.barSize?(f=Vn(t.barSize,e),h=De.makeLineSpan("frac-line",e,f)):h=De.makeLineSpan("frac-line",e),f=h.height,d=h.height):(h=null,f=0,d=e.fontMetrics().defaultRuleThickness);var p,g,m;r.size===jt.DISPLAY.size||t.size==="display"?(p=e.fontMetrics().num1,f>0?g=3*d:g=7*d,m=e.fontMetrics().denom1):(f>0?(p=e.fontMetrics().num2,g=d):(p=e.fontMetrics().num3,g=3*d),m=e.fontMetrics().denom2);var x;if(h){var b=e.fontMetrics().axisHeight;p-s.depth-(b+.5*f)<g&&(p+=g-(p-s.depth-(b+.5*f))),b-.5*f-(u.height-m)<g&&(m+=g-(b-.5*f-(u.height-m)));var w=-(b-.5*f);x=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:u,shift:m},{type:"elem",elem:h,shift:w},{type:"elem",elem:s,shift:-p}]},e)}else{var y=p-s.depth-(u.height-m);y<g&&(p+=.5*(g-y),m+=.5*(g-y)),x=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:u,shift:m},{type:"elem",elem:s,shift:-p}]},e)}a=e.havingStyle(r),x.height*=a.sizeMultiplier/e.sizeMultiplier,x.depth*=a.sizeMultiplier/e.sizeMultiplier;var _;r.size===jt.DISPLAY.size?_=e.fontMetrics().delim1:r.size===jt.SCRIPTSCRIPT.size?_=e.havingStyle(jt.SCRIPT).fontMetrics().delim2:_=e.fontMetrics().delim2;var k,E;return t.leftDelim==null?k=x1(e,["mopen"]):k=Vc.customSizedDelim(t.leftDelim,_,!0,e.havingStyle(r),t.mode,["mopen"]),t.continued?E=De.makeSpan([]):t.rightDelim==null?E=x1(e,["mclose"]):E=Vc.customSizedDelim(t.rightDelim,_,!0,e.havingStyle(r),t.mode,["mclose"]),De.makeSpan(["mord"].concat(a.sizingClasses(e)),[k,De.makeSpan(["mfrac"],[x]),E],e)},kS=(t,e)=>{var r=new rt.MathNode("mfrac",[cn(t.numer,e),cn(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=Vn(t.barSize,e);r.setAttribute("linethickness",ct(n))}var i=tF(t.size,e.style);if(i.size!==e.style.size){r=new rt.MathNode("mstyle",[r]);var a=i.size===jt.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var s=[];if(t.leftDelim!=null){var o=new rt.MathNode("mo",[new rt.TextNode(t.leftDelim.replace("\\\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(r),t.rightDelim!=null){var l=new rt.MathNode("mo",[new rt.TextNode(t.rightDelim.replace("\\\\",""))]);l.setAttribute("fence","true"),s.push(l)}return fS(s)}return r};xt({type:"genfrac",names:["\\\\dfrac","\\\\frac","\\\\tfrac","\\\\dbinom","\\\\binom","\\\\tbinom","\\\\\\\\atopfrac","\\\\\\\\bracefrac","\\\\\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1],s,o=null,l=null,u="auto";switch(n){case"\\\\dfrac":case"\\\\frac":case"\\\\tfrac":s=!0;break;case"\\\\\\\\atopfrac":s=!1;break;case"\\\\dbinom":case"\\\\binom":case"\\\\tbinom":s=!1,o="(",l=")";break;case"\\\\\\\\bracefrac":s=!1,o="\\\\{",l="\\\\}";break;case"\\\\\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\\\dfrac":case"\\\\dbinom":u="display";break;case"\\\\tfrac":case"\\\\tbinom":u="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:s,leftDelim:o,rightDelim:l,size:u,barSize:null}},htmlBuilder:wS,mathmlBuilder:kS});xt({type:"genfrac",names:["\\\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});xt({type:"infix",names:["\\\\over","\\\\choose","\\\\atop","\\\\brace","\\\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\\\over":i="\\\\frac";break;case"\\\\choose":i="\\\\binom";break;case"\\\\atop":i="\\\\\\\\atopfrac";break;case"\\\\brace":i="\\\\\\\\bracefrac";break;case"\\\\brack":i="\\\\\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});aB=["display","text","script","scriptscript"],sB=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};xt({type:"genfrac",names:["\\\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],a=gb(e[0]),s=a.type==="atom"&&a.family==="open"?sB(a.text):null,o=gb(e[1]),l=o.type==="atom"&&o.family==="close"?sB(o.text):null,u=ur(e[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var d="auto",p=e[3];if(p.type==="ordgroup"){if(p.body.length>0){var g=ur(p.body[0],"textord");d=aB[Number(g.text)]}}else p=ur(p,"textord"),d=aB[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:h,barSize:f,leftDelim:s,rightDelim:l,size:d}},htmlBuilder:wS,mathmlBuilder:kS});xt({type:"infix",names:["\\\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\\\\\abovefrac",size:ur(e[0],"size").value,token:i}}});xt({type:"genfrac",names:["\\\\\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=z1e(ur(e[1],"infix").size),s=e[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:wS,mathmlBuilder:kS});rF=(t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?Cr(t.sup,e.havingStyle(r.sup()),e):Cr(t.sub,e.havingStyle(r.sub()),e),i=ur(t.base,"horizBrace")):i=ur(t,"horizBrace");var a=Cr(i.base,e.havingBaseStyle(jt.DISPLAY)),s=Hc.svgSpan(i,e),o;if(i.isOver?(o=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},e),o.children[0].children[0].children[1].classes.push("svg-align")):(o=De.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},e),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=De.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e);i.isOver?o=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):o=De.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return De.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e)},oye=(t,e)=>{var r=Hc.mathMLnode(t.label);return new rt.MathNode(t.isOver?"mover":"munder",[cn(t.base,e),r])};xt({type:"horizBrace",names:["\\\\overbrace","\\\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\\\over/.test(n),base:e[0]}},htmlBuilder:rF,mathmlBuilder:oye});xt({type:"href",names:["\\\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=ur(e[0],"url").url;return r.settings.isTrusted({command:"\\\\href",url:i})?{type:"href",mode:r.mode,href:i,body:ai(n)}:r.formatUnsupportedCmd("\\\\href")},htmlBuilder:(t,e)=>{var r=wi(t.body,e,!1);return De.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=Ju(t.body,e);return r instanceof es||(r=new es("mrow",[r])),r.setAttribute("href",t.href),r}});xt({type:"href",names:["\\\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=ur(e[0],"url").url;if(!r.settings.isTrusted({command:"\\\\url",url:n}))return r.formatUnsupportedCmd("\\\\url");for(var i=[],a=0;a<n.length;a++){var s=n[a];s==="~"&&(s="\\\\textasciitilde"),i.push({type:"textord",mode:"text",text:s})}var o={type:"text",mode:r.mode,font:"\\\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:ai(o)}}});xt({type:"hbox",names:["\\\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:r}=t;return{type:"hbox",mode:r.mode,body:ai(e[0])}},htmlBuilder(t,e){var r=wi(t.body,e,!1);return De.makeFragment(r)},mathmlBuilder(t,e){return new rt.MathNode("mrow",rs(t.body,e))}});xt({type:"html",names:["\\\\htmlClass","\\\\htmlId","\\\\htmlStyle","\\\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,token:i}=t,a=ur(e[0],"raw").string,s=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\\\htmlClass":l.class=a,o={command:"\\\\htmlClass",class:a};break;case"\\\\htmlId":l.id=a,o={command:"\\\\htmlId",id:a};break;case"\\\\htmlStyle":l.style=a,o={command:"\\\\htmlStyle",style:a};break;case"\\\\htmlData":{for(var u=a.split(","),h=0;h<u.length;h++){var f=u[h].split("=");if(f.length!==2)throw new nt("Error parsing key-value for \\\\htmlData");l["data-"+f[0].trim()]=f[1].trim()}o={command:"\\\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(o)?{type:"html",mode:r.mode,attributes:l,body:ai(s)}:r.formatUnsupportedCmd(n)},htmlBuilder:(t,e)=>{var r=wi(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\\s+/));var i=De.makeSpan(n,r,e);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,e)=>Ju(t.body,e)});xt({type:"htmlmathml",names:["\\\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:ai(e[0]),mathml:ai(e[1])}},htmlBuilder:(t,e)=>{var r=wi(t.html,e,!1);return De.makeFragment(r)},mathmlBuilder:(t,e)=>Ju(t.mathml,e)});YE=function(e){if(/^[-+]? *(\\d+(\\.\\d*)?|\\.\\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\\d+(?:\\.\\d*)?|\\.\\d+) *([a-z]{2})/.exec(e);if(!r)throw new nt("Invalid size: \'"+e+"\' in \\\\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!wB(n))throw new nt("Invalid unit: \'"+n.unit+"\' in \\\\includegraphics.");return n};xt({type:"includegraphics",names:["\\\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var l=ur(r[0],"raw").string,u=l.split(","),h=0;h<u.length;h++){var f=u[h].split("=");if(f.length===2){var d=f[1].trim();switch(f[0].trim()){case"alt":o=d;break;case"width":i=YE(d);break;case"height":a=YE(d);break;case"totalheight":s=YE(d);break;default:throw new nt("Invalid key: \'"+f[0]+"\' in \\\\includegraphics.")}}}var p=ur(e[0],"url").url;return o===""&&(o=p,o=o.replace(/^.*[\\\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),n.settings.isTrusted({command:"\\\\includegraphics",url:p})?{type:"includegraphics",mode:n.mode,alt:o,width:i,height:a,totalheight:s,src:p}:n.formatUnsupportedCmd("\\\\includegraphics")},htmlBuilder:(t,e)=>{var r=Vn(t.height,e),n=0;t.totalheight.number>0&&(n=Vn(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=Vn(t.width,e));var a={height:ct(r+n)};i>0&&(a.width=ct(i)),n>0&&(a.verticalAlign=ct(-n));var s=new JE(t.src,t.alt,a);return s.height=r,s.depth=n,s},mathmlBuilder:(t,e)=>{var r=new rt.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=Vn(t.height,e),i=0;if(t.totalheight.number>0&&(i=Vn(t.totalheight,e)-n,r.setAttribute("valign",ct(-i))),r.setAttribute("height",ct(n+i)),t.width.number>0){var a=Vn(t.width,e);r.setAttribute("width",ct(a))}return r.setAttribute("src",t.src),r}});xt({type:"kern",names:["\\\\kern","\\\\mkern","\\\\hskip","\\\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=ur(e[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX\'s "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX\'s "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX\'s "+n+" doesn\'t support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return De.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=Vn(t.dimension,e);return new rt.SpaceNode(r)}});xt({type:"lap",names:["\\\\mathllap","\\\\mathrlap","\\\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=De.makeSpan([],[Cr(t.body,e)]),r=De.makeSpan(["inner"],[r],e)):r=De.makeSpan(["inner"],[Cr(t.body,e)]);var n=De.makeSpan(["fix"],[]),i=De.makeSpan([t.alignment],[r,n],e),a=De.makeSpan(["strut"]);return a.style.height=ct(i.height+i.depth),i.depth&&(a.style.verticalAlign=ct(-i.depth)),i.children.unshift(a),i=De.makeSpan(["thinbox"],[i],e),De.makeSpan(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new rt.MathNode("mpadded",[cn(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});xt({type:"styling",names:["\\\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a=r==="\\\\("?"\\\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s}}});xt({type:"text",names:["\\\\)","\\\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new nt("Mismatched "+t.funcName)}});oB=(t,e)=>{switch(e.style.size){case jt.DISPLAY.size:return t.display;case jt.TEXT.size:return t.text;case jt.SCRIPT.size:return t.script;case jt.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};xt({type:"mathchoice",names:["\\\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:ai(e[0]),text:ai(e[1]),script:ai(e[2]),scriptscript:ai(e[3])}},htmlBuilder:(t,e)=>{var r=oB(t,e),n=wi(r,e,!1);return De.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=oB(t,e);return Ju(r,e)}});nF=(t,e,r,n,i,a,s)=>{t=De.makeSpan([],[t]);var o=r&&Yt.isCharacterBox(r),l,u;if(e){var h=Cr(e,n.havingStyle(i.sup()),n);u={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-h.depth)}}if(r){var f=Cr(r,n.havingStyle(i.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var d;if(u&&l){var p=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s;d=De.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ct(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ct(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var g=t.height-s;d=De.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ct(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(u){var m=t.depth+s;d=De.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ct(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var x=[d];if(l&&a!==0&&!o){var y=De.makeSpan(["mspace"],[],n);y.style.marginRight=ct(a),x.unshift(y)}return De.makeSpan(["mop","op-limits"],x,n)},iF=["\\\\smallint"],F0=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=ur(t.base,"op"),i=!0):a=ur(t,"op");var s=e.style,o=!1;s.size===jt.DISPLAY.size&&a.symbol&&!Yt.contains(iF,a.name)&&(o=!0);var l;if(a.symbol){var u=o?"Size2-Regular":"Size1-Regular",h="";if((a.name==="\\\\oiint"||a.name==="\\\\oiiint")&&(h=a.name.slice(1),a.name=h==="oiint"?"\\\\iint":"\\\\iiint"),l=De.makeSymbol(a.name,u,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),h.length>0){var f=l.italic,d=De.staticSvg(h+"Size"+(o?"2":"1"),e);l=De.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:o?.08:0}]},e),a.name="\\\\"+h,l.classes.unshift("mop"),l.italic=f}}else if(a.body){var p=wi(a.body,e,!0);p.length===1&&p[0]instanceof ts?(l=p[0],l.classes[0]="mop"):l=De.makeSpan(["mop"],p,e)}else{for(var g=[],m=1;m<a.name.length;m++)g.push(De.mathsym(a.name[m],a.mode,e));l=De.makeSpan(["mop"],g,e)}var x=0,y=0;return(l instanceof ts||a.name==="\\\\oiint"||a.name==="\\\\oiiint")&&!a.suppressBaseShift&&(x=(l.height-l.depth)/2-e.fontMetrics().axisHeight,y=l.italic),i?nF(l,r,n,e,s,y,x):(x&&(l.style.position="relative",l.style.top=ct(x)),l)},b1=(t,e)=>{var r;if(t.symbol)r=new es("mo",[uo(t.name,t.mode)]),Yt.contains(iF,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new es("mo",rs(t.body,e));else{r=new es("mi",[new Tf(t.name.slice(1))]);var n=new es("mo",[uo("\\u2061","text")]);t.parentIsSupSub?r=new es("mrow",[r,n]):r=IB([r,n])}return r},lye={"\\u220F":"\\\\prod","\\u2210":"\\\\coprod","\\u2211":"\\\\sum","\\u22C0":"\\\\bigwedge","\\u22C1":"\\\\bigvee","\\u22C2":"\\\\bigcap","\\u22C3":"\\\\bigcup","\\u2A00":"\\\\bigodot","\\u2A01":"\\\\bigoplus","\\u2A02":"\\\\bigotimes","\\u2A04":"\\\\biguplus","\\u2A06":"\\\\bigsqcup"};xt({type:"op",names:["\\\\coprod","\\\\bigvee","\\\\bigwedge","\\\\biguplus","\\\\bigcap","\\\\bigcup","\\\\intop","\\\\prod","\\\\sum","\\\\bigotimes","\\\\bigoplus","\\\\bigodot","\\\\bigsqcup","\\\\smallint","\\u220F","\\u2210","\\u2211","\\u22C0","\\u22C1","\\u22C2","\\u22C3","\\u2A00","\\u2A01","\\u2A02","\\u2A04","\\u2A06"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=lye[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:F0,mathmlBuilder:b1});xt({type:"op",names:["\\\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ai(n)}},htmlBuilder:F0,mathmlBuilder:b1});cye={"\\u222B":"\\\\int","\\u222C":"\\\\iint","\\u222D":"\\\\iiint","\\u222E":"\\\\oint","\\u222F":"\\\\oiint","\\u2230":"\\\\oiiint"};xt({type:"op",names:["\\\\arcsin","\\\\arccos","\\\\arctan","\\\\arctg","\\\\arcctg","\\\\arg","\\\\ch","\\\\cos","\\\\cosec","\\\\cosh","\\\\cot","\\\\cotg","\\\\coth","\\\\csc","\\\\ctg","\\\\cth","\\\\deg","\\\\dim","\\\\exp","\\\\hom","\\\\ker","\\\\lg","\\\\ln","\\\\log","\\\\sec","\\\\sin","\\\\sinh","\\\\sh","\\\\tan","\\\\tanh","\\\\tg","\\\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:F0,mathmlBuilder:b1});xt({type:"op",names:["\\\\det","\\\\gcd","\\\\inf","\\\\lim","\\\\max","\\\\min","\\\\Pr","\\\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:F0,mathmlBuilder:b1});xt({type:"op",names:["\\\\int","\\\\iint","\\\\iiint","\\\\oint","\\\\oiint","\\\\oiiint","\\u222B","\\u222C","\\u222D","\\u222E","\\u222F","\\u2230"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=cye[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:F0,mathmlBuilder:b1});aF=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=ur(t.base,"operatorname"),i=!0):a=ur(t,"operatorname");var s;if(a.body.length>0){for(var o=a.body.map(f=>{var d=f.text;return typeof d=="string"?{type:"textord",mode:f.mode,text:d}:f}),l=wi(o,e.withFont("mathrm"),!0),u=0;u<l.length;u++){var h=l[u];h instanceof ts&&(h.text=h.text.replace(/\\u2212/,"-").replace(/\\u2217/,"*"))}s=De.makeSpan(["mop"],l,e)}else s=De.makeSpan(["mop"],[],e);return i?nF(s,r,n,e,e.style,0,0):s},uye=(t,e)=>{for(var r=rs(t.body,e.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof rt.SpaceNode))if(a instanceof rt.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var s=a.children[0];a.children.length===1&&s instanceof rt.TextNode?s.text=s.text.replace(/\\u2212/,"-").replace(/\\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var o=r.map(h=>h.toText()).join("");r=[new rt.TextNode(o)]}var l=new rt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var u=new rt.MathNode("mo",[uo("\\u2061","text")]);return t.parentIsSupSub?new rt.MathNode("mrow",[l,u]):rt.newDocumentFragment([l,u])};xt({type:"operatorname",names:["\\\\operatorname@","\\\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:ai(i),alwaysHandleSupSub:n==="\\\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:aF,mathmlBuilder:uye});le("\\\\operatorname","\\\\@ifstar\\\\operatornamewithlimits\\\\operatorname@");Cf({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?De.makeFragment(wi(t.body,e,!1)):De.makeSpan(["mord"],wi(t.body,e,!0),e)},mathmlBuilder(t,e){return Ju(t.body,e,!0)}});xt({type:"overline",names:["\\\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Cr(t.body,e.havingCrampedStyle()),n=De.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return De.makeSpan(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new rt.MathNode("mo",[new rt.TextNode("\\u203E")]);r.setAttribute("stretchy","true");var n=new rt.MathNode("mover",[cn(t.body,e),r]);return n.setAttribute("accent","true"),n}});xt({type:"phantom",names:["\\\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:ai(n)}},htmlBuilder:(t,e)=>{var r=wi(t.body,e.withPhantom(),!1);return De.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=rs(t.body,e);return new rt.MathNode("mphantom",r)}});xt({type:"hphantom",names:["\\\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=De.makeSpan([],[Cr(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),De.makeSpan(["mord"],[r],e)},mathmlBuilder:(t,e)=>{var r=rs(ai(t.body),e),n=new rt.MathNode("mphantom",r),i=new rt.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});xt({type:"vphantom",names:["\\\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=De.makeSpan(["inner"],[Cr(t.body,e.withPhantom())]),n=De.makeSpan(["fix"],[]);return De.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=rs(ai(t.body),e),n=new rt.MathNode("mphantom",r),i=new rt.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});xt({type:"raisebox",names:["\\\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=ur(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=Cr(t.body,e),n=Vn(t.dy,e);return De.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new rt.MathNode("mpadded",[cn(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});xt({type:"internal",names:["\\\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});xt({type:"rule",names:["\\\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=ur(e[0],"size"),s=ur(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&ur(i,"size").value,width:a.value,height:s.value}},htmlBuilder(t,e){var r=De.makeSpan(["mord","rule"],[],e),n=Vn(t.width,e),i=Vn(t.height,e),a=t.shift?Vn(t.shift,e):0;return r.style.borderRightWidth=ct(n),r.style.borderTopWidth=ct(i),r.style.bottom=ct(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Vn(t.width,e),n=Vn(t.height,e),i=t.shift?Vn(t.shift,e):0,a=e.color&&e.getColor()||"black",s=new rt.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",ct(r)),s.setAttribute("height",ct(n));var o=new rt.MathNode("mpadded",[s]);return i>=0?o.setAttribute("height",ct(i)):(o.setAttribute("height",ct(i)),o.setAttribute("depth",ct(-i))),o.setAttribute("voffset",ct(i)),o}});lB=["\\\\tiny","\\\\sixptsize","\\\\scriptsize","\\\\footnotesize","\\\\small","\\\\normalsize","\\\\large","\\\\Large","\\\\LARGE","\\\\huge","\\\\Huge"],hye=(t,e)=>{var r=e.havingSize(t.size);return sF(t.body,r,e)};xt({type:"sizing",names:lB,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:lB.indexOf(n)+1,body:a}},htmlBuilder:hye,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=rs(t.body,r),i=new rt.MathNode("mstyle",n);return i.setAttribute("mathsize",ct(r.sizeMultiplier)),i}});xt({type:"smash",names:["\\\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,a=!1,s=r[0]&&ur(r[0],"ordgroup");if(s)for(var o="",l=0;l<s.body.length;++l){var u=s.body[l];if(o=u.text,o==="t")i=!0;else if(o==="b")a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var h=e[0];return{type:"smash",mode:n.mode,body:h,smashHeight:i,smashDepth:a}},htmlBuilder:(t,e)=>{var r=De.makeSpan([],[Cr(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(t.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;var a=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e);return De.makeSpan(["mord"],[a],e)},mathmlBuilder:(t,e)=>{var r=new rt.MathNode("mpadded",[cn(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});xt({type:"sqrt",names:["\\\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,e){var r=Cr(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=De.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,a=i;e.style.id<jt.TEXT.id&&(a=e.fontMetrics().xHeight);var s=i+a/4,o=r.height+r.depth+s+i,{span:l,ruleWidth:u,advanceWidth:h}=Vc.sqrtImage(o,e),f=l.height-u;f>r.height+r.depth+s&&(s=(s+f-r.height-r.depth)/2);var d=l.height-r.height-s-u;r.style.paddingLeft=ct(h);var p=De.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:l},{type:"kern",size:u}]},e);if(t.index){var g=e.havingStyle(jt.SCRIPTSCRIPT),m=Cr(t.index,g,e),x=.6*(p.height-p.depth),y=De.makeVList({positionType:"shift",positionData:-x,children:[{type:"elem",elem:m}]},e),b=De.makeSpan(["root"],[y]);return De.makeSpan(["mord","sqrt"],[b,p],e)}else return De.makeSpan(["mord","sqrt"],[p],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new rt.MathNode("mroot",[cn(r,e),cn(n,e)]):new rt.MathNode("msqrt",[cn(r,e)])}});cB={display:jt.DISPLAY,text:jt.TEXT,script:jt.SCRIPT,scriptscript:jt.SCRIPTSCRIPT};xt({type:"styling",names:["\\\\displaystyle","\\\\textstyle","\\\\scriptstyle","\\\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(t,e){var r=cB[t.style],n=e.havingStyle(r).withFont("");return sF(t.body,n,e)},mathmlBuilder(t,e){var r=cB[t.style],n=e.havingStyle(r),i=rs(t.body,n),a=new rt.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[t.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});fye=function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===jt.DISPLAY.size||n.alwaysHandleSupSub);return i?F0:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===jt.DISPLAY.size||n.limits);return a?aF:null}else{if(n.type==="accent")return Yt.isCharacterBox(n.base)?gS:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?rF:null}else return null}else return null};Cf({type:"supsub",htmlBuilder(t,e){var r=fye(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:a}=t,s=Cr(n,e),o,l,u=e.fontMetrics(),h=0,f=0,d=n&&Yt.isCharacterBox(n);if(i){var p=e.havingStyle(e.style.sup());o=Cr(i,p,e),d||(h=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/e.sizeMultiplier)}if(a){var g=e.havingStyle(e.style.sub());l=Cr(a,g,e),d||(f=s.depth+g.fontMetrics().subDrop*g.sizeMultiplier/e.sizeMultiplier)}var m;e.style===jt.DISPLAY?m=u.sup1:e.style.cramped?m=u.sup3:m=u.sup2;var x=e.sizeMultiplier,y=ct(.5/u.ptPerEm/x),b=null;if(l){var w=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\\\oiint"||t.base.name==="\\\\oiiint");(s instanceof ts||w)&&(b=ct(-s.italic))}var _;if(o&&l){h=Math.max(h,m,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var k=u.defaultRuleThickness,E=4*k;if(h-o.depth-(l.height-f)<E){f=E-(h-o.depth)+l.height;var L=.8*u.xHeight-(h-o.depth);L>0&&(h+=L,f-=L)}var S=[{type:"elem",elem:l,shift:f,marginRight:y,marginLeft:b},{type:"elem",elem:o,shift:-h,marginRight:y}];_=De.makeVList({positionType:"individualShift",children:S},e)}else if(l){f=Math.max(f,u.sub1,l.height-.8*u.xHeight);var C=[{type:"elem",elem:l,marginLeft:b,marginRight:y}];_=De.makeVList({positionType:"shift",positionData:f,children:C},e)}else if(o)h=Math.max(h,m,o.depth+.25*u.xHeight),_=De.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:y}]},e);else throw new Error("supsub must have either sup or sub.");var M=tS(s,"right")||"mord";return De.makeSpan([M],[s,De.makeSpan(["msupsub"],[_])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[cn(t.base,e)];t.sub&&a.push(cn(t.sub,e)),t.sup&&a.push(cn(t.sup,e));var s;if(r)s=n?"mover":"munder";else if(t.sub)if(t.sup){var u=t.base;u&&u.type==="op"&&u.limits&&e.style===jt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(e.style===jt.DISPLAY||u.limits)?s="munderover":s="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===jt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===jt.DISPLAY)?s="munder":s="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===jt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===jt.DISPLAY)?s="mover":s="msup"}return new rt.MathNode(s,a)}});Cf({type:"atom",htmlBuilder(t,e){return De.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new rt.MathNode("mo",[uo(t.text,t.mode)]);if(t.family==="bin"){var n=dS(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});oF={mi:"italic",mn:"normal",mtext:"normal"};Cf({type:"mathord",htmlBuilder(t,e){return De.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new rt.MathNode("mi",[uo(t.text,t.mode,e)]),n=dS(t,e)||"italic";return n!==oF[r.type]&&r.setAttribute("mathvariant",n),r}});Cf({type:"textord",htmlBuilder(t,e){return De.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=uo(t.text,t.mode,e),n=dS(t,e)||"normal",i;return t.mode==="text"?i=new rt.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new rt.MathNode("mn",[r]):t.text==="\\\\prime"?i=new rt.MathNode("mo",[r]):i=new rt.MathNode("mi",[r]),n!==oF[i.type]&&i.setAttribute("mathvariant",n),i}});XE={"\\\\nobreak":"nobreak","\\\\allowbreak":"allowbreak"},jE={" ":{},"\\\\ ":{},"~":{className:"nobreak"},"\\\\space":{},"\\\\nobreakspace":{className:"nobreak"}};Cf({type:"spacing",htmlBuilder(t,e){if(jE.hasOwnProperty(t.text)){var r=jE[t.text].className||"";if(t.mode==="text"){var n=De.makeOrd(t,e,"textord");return n.classes.push(r),n}else return De.makeSpan(["mspace",r],[De.mathsym(t.text,t.mode,e)],e)}else{if(XE.hasOwnProperty(t.text))return De.makeSpan(["mspace",XE[t.text]],[],e);throw new nt(\'Unknown type of space "\'+t.text+\'"\')}},mathmlBuilder(t,e){var r;if(jE.hasOwnProperty(t.text))r=new rt.MathNode("mtext",[new rt.TextNode("\\xA0")]);else{if(XE.hasOwnProperty(t.text))return new rt.MathNode("mspace");throw new nt(\'Unknown type of space "\'+t.text+\'"\')}return r}});uB=()=>{var t=new rt.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};Cf({type:"tag",mathmlBuilder(t,e){var r=new rt.MathNode("mtable",[new rt.MathNode("mtr",[uB(),new rt.MathNode("mtd",[Ju(t.body,e)]),uB(),new rt.MathNode("mtd",[Ju(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});hB={"\\\\text":void 0,"\\\\textrm":"textrm","\\\\textsf":"textsf","\\\\texttt":"texttt","\\\\textnormal":"textrm"},fB={"\\\\textbf":"textbf","\\\\textmd":"textmd"},dye={"\\\\textit":"textit","\\\\textup":"textup"},dB=(t,e)=>{var r=t.font;if(r){if(hB[r])return e.withTextFontFamily(hB[r]);if(fB[r])return e.withTextFontWeight(fB[r]);if(r==="\\\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(dye[r])};xt({type:"text",names:["\\\\text","\\\\textrm","\\\\textsf","\\\\texttt","\\\\textnormal","\\\\textbf","\\\\textmd","\\\\textit","\\\\textup","\\\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:ai(i),font:n}},htmlBuilder(t,e){var r=dB(t,e),n=wi(t.body,r,!0);return De.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=dB(t,e);return Ju(t.body,r)}});xt({type:"underline",names:["\\\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Cr(t.body,e),n=De.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=De.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return De.makeSpan(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new rt.MathNode("mo",[new rt.TextNode("\\u203E")]);r.setAttribute("stretchy","true");var n=new rt.MathNode("munder",[cn(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});xt({type:"vcenter",names:["\\\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Cr(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return De.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new rt.MathNode("mpadded",[cn(t.body,e)],["vcenter"])}});xt({type:"verb",names:["\\\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new nt("\\\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=pB(t),n=[],i=e.havingStyle(e.style.text()),a=0;a<r.length;a++){var s=r[a];s==="~"&&(s="\\\\textasciitilde"),n.push(De.makeSymbol(s,"Typewriter-Regular",t.mode,i,["mord","texttt"]))}return De.makeSpan(["mord","text"].concat(i.sizingClasses(e)),De.tryCombineChars(n),i)},mathmlBuilder(t,e){var r=new rt.TextNode(pB(t)),n=new rt.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});pB=t=>t.body.replace(/ /g,t.star?"\\u2423":"\\xA0"),Zu=RB,lF=`[ \\r\n ]`,pye="\\\\\\\\[a-zA-Z@]+",gye="\\\\\\\\[^\\uD800-\\uDFFF]",mye="("+pye+")"+lF+"*",vye=`\\\\\\\\(\n|[ \\r ]+\n?)[ \\r ]*`,sS="[\\u0300-\\u036F]",yye=new RegExp(sS+"+$"),xye="("+lF+"+)|"+(vye+"|")+"([!-\\\\[\\\\]-\\u2027\\u202A-\\uD7FF\\uF900-\\uFFFF]"+(sS+"*")+"|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]"+(sS+"*")+"|\\\\\\\\verb\\\\*([^]).*?\\\\4|\\\\\\\\verb([^*a-zA-Z]).*?\\\\5"+("|"+mye)+("|"+gye+")"),mb=class{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(xye,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new co("EOF",new Ms(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new nt("Unexpected character: \'"+e[r]+"\'",new co(e[r],new Ms(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\\\ ":" ");if(this.catcodes[i]===14){var a=e.indexOf(`\n`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new co(i,new Ms(this,r,this.tokenRegex.lastIndex))}},oS=class{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new nt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}},bye=ZB;le("\\\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});le("\\\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});le("\\\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});le("\\\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});le("\\\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});le("\\\\@ifstar","\\\\@ifnextchar *{\\\\@firstoftwo{#1}}");le("\\\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});gB={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};le("\\\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="\'")r=8,e=t.popToken();else if(e.text===\'"\')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new nt("\\\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=gB[e.text],n==null||n>=r)throw new nt("Invalid base-"+r+" digit "+e.text);for(var i;(i=gB[t.future().text])!=null&&i<r;)n*=r,n+=i,t.popToken()}return"\\\\@char{"+n+"}"});TS=(t,e,r)=>{var n=t.consumeArg().tokens;if(n.length!==1)throw new nt("\\\\newcommand\'s first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!e)throw new nt("\\\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\\\renewcommand"));if(!a&&!r)throw new nt("\\\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\\\newcommand");var s=0;if(n=t.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var o="",l=t.expandNextToken();l.text!=="]"&&l.text!=="EOF";)o+=l.text,l=t.expandNextToken();if(!o.match(/^\\s*[0-9]+\\s*$/))throw new nt("Invalid number of arguments: "+o);s=parseInt(o),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:s}),""};le("\\\\newcommand",t=>TS(t,!1,!0));le("\\\\renewcommand",t=>TS(t,!0,!1));le("\\\\providecommand",t=>TS(t,!0,!0));le("\\\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});le("\\\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});le("\\\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Zu[r],yn.math[r],yn.text[r]),""});le("\\\\bgroup","{");le("\\\\egroup","}");le("~","\\\\nobreakspace");le("\\\\lq","`");le("\\\\rq","\'");le("\\\\aa","\\\\r a");le("\\\\AA","\\\\r A");le("\\\\textcopyright","\\\\html@mathml{\\\\textcircled{c}}{\\\\char`\\xA9}");le("\\\\copyright","\\\\TextOrMath{\\\\textcopyright}{\\\\text{\\\\textcopyright}}");le("\\\\textregistered","\\\\html@mathml{\\\\textcircled{\\\\scriptsize R}}{\\\\char`\\xAE}");le("\\u212C","\\\\mathscr{B}");le("\\u2130","\\\\mathscr{E}");le("\\u2131","\\\\mathscr{F}");le("\\u210B","\\\\mathscr{H}");le("\\u2110","\\\\mathscr{I}");le("\\u2112","\\\\mathscr{L}");le("\\u2133","\\\\mathscr{M}");le("\\u211B","\\\\mathscr{R}");le("\\u212D","\\\\mathfrak{C}");le("\\u210C","\\\\mathfrak{H}");le("\\u2128","\\\\mathfrak{Z}");le("\\\\Bbbk","\\\\Bbb{k}");le("\\xB7","\\\\cdotp");le("\\\\llap","\\\\mathllap{\\\\textrm{#1}}");le("\\\\rlap","\\\\mathrlap{\\\\textrm{#1}}");le("\\\\clap","\\\\mathclap{\\\\textrm{#1}}");le("\\\\mathstrut","\\\\vphantom{(}");le("\\\\underbar","\\\\underline{\\\\text{#1}}");le("\\\\not",\'\\\\html@mathml{\\\\mathrel{\\\\mathrlap\\\\@not}}{\\\\char"338}\');le("\\\\neq","\\\\html@mathml{\\\\mathrel{\\\\not=}}{\\\\mathrel{\\\\char`\\u2260}}");le("\\\\ne","\\\\neq");le("\\u2260","\\\\neq");le("\\\\notin","\\\\html@mathml{\\\\mathrel{{\\\\in}\\\\mathllap{/\\\\mskip1mu}}}{\\\\mathrel{\\\\char`\\u2209}}");le("\\u2209","\\\\notin");le("\\u2258","\\\\html@mathml{\\\\mathrel{=\\\\kern{-1em}\\\\raisebox{0.4em}{$\\\\scriptsize\\\\frown$}}}{\\\\mathrel{\\\\char`\\u2258}}");le("\\u2259","\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\wedge}{=}}{\\\\mathrel{\\\\char`\\u2258}}");le("\\u225A","\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\vee}{=}}{\\\\mathrel{\\\\char`\\u225A}}");le("\\u225B","\\\\html@mathml{\\\\stackrel{\\\\scriptsize\\\\star}{=}}{\\\\mathrel{\\\\char`\\u225B}}");le("\\u225D","\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\mathrm{def}}{=}}{\\\\mathrel{\\\\char`\\u225D}}");le("\\u225E","\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\mathrm{m}}{=}}{\\\\mathrel{\\\\char`\\u225E}}");le("\\u225F","\\\\html@mathml{\\\\stackrel{\\\\tiny?}{=}}{\\\\mathrel{\\\\char`\\u225F}}");le("\\u27C2","\\\\perp");le("\\u203C","\\\\mathclose{!\\\\mkern-0.8mu!}");le("\\u220C","\\\\notni");le("\\u231C","\\\\ulcorner");le("\\u231D","\\\\urcorner");le("\\u231E","\\\\llcorner");le("\\u231F","\\\\lrcorner");le("\\xA9","\\\\copyright");le("\\xAE","\\\\textregistered");le("\\uFE0F","\\\\textregistered");le("\\\\ulcorner",\'\\\\html@mathml{\\\\@ulcorner}{\\\\mathop{\\\\char"231c}}\');le("\\\\urcorner",\'\\\\html@mathml{\\\\@urcorner}{\\\\mathop{\\\\char"231d}}\');le("\\\\llcorner",\'\\\\html@mathml{\\\\@llcorner}{\\\\mathop{\\\\char"231e}}\');le("\\\\lrcorner",\'\\\\html@mathml{\\\\@lrcorner}{\\\\mathop{\\\\char"231f}}\');le("\\\\vdots","\\\\mathord{\\\\varvdots\\\\rule{0pt}{15pt}}");le("\\u22EE","\\\\vdots");le("\\\\varGamma","\\\\mathit{\\\\Gamma}");le("\\\\varDelta","\\\\mathit{\\\\Delta}");le("\\\\varTheta","\\\\mathit{\\\\Theta}");le("\\\\varLambda","\\\\mathit{\\\\Lambda}");le("\\\\varXi","\\\\mathit{\\\\Xi}");le("\\\\varPi","\\\\mathit{\\\\Pi}");le("\\\\varSigma","\\\\mathit{\\\\Sigma}");le("\\\\varUpsilon","\\\\mathit{\\\\Upsilon}");le("\\\\varPhi","\\\\mathit{\\\\Phi}");le("\\\\varPsi","\\\\mathit{\\\\Psi}");le("\\\\varOmega","\\\\mathit{\\\\Omega}");le("\\\\substack","\\\\begin{subarray}{c}#1\\\\end{subarray}");le("\\\\colon","\\\\nobreak\\\\mskip2mu\\\\mathpunct{}\\\\mathchoice{\\\\mkern-3mu}{\\\\mkern-3mu}{}{}{:}\\\\mskip6mu\\\\relax");le("\\\\boxed","\\\\fbox{$\\\\displaystyle{#1}$}");le("\\\\iff","\\\\DOTSB\\\\;\\\\Longleftrightarrow\\\\;");le("\\\\implies","\\\\DOTSB\\\\;\\\\Longrightarrow\\\\;");le("\\\\impliedby","\\\\DOTSB\\\\;\\\\Longleftarrow\\\\;");mB={",":"\\\\dotsc","\\\\not":"\\\\dotsb","+":"\\\\dotsb","=":"\\\\dotsb","<":"\\\\dotsb",">":"\\\\dotsb","-":"\\\\dotsb","*":"\\\\dotsb",":":"\\\\dotsb","\\\\DOTSB":"\\\\dotsb","\\\\coprod":"\\\\dotsb","\\\\bigvee":"\\\\dotsb","\\\\bigwedge":"\\\\dotsb","\\\\biguplus":"\\\\dotsb","\\\\bigcap":"\\\\dotsb","\\\\bigcup":"\\\\dotsb","\\\\prod":"\\\\dotsb","\\\\sum":"\\\\dotsb","\\\\bigotimes":"\\\\dotsb","\\\\bigoplus":"\\\\dotsb","\\\\bigodot":"\\\\dotsb","\\\\bigsqcup":"\\\\dotsb","\\\\And":"\\\\dotsb","\\\\longrightarrow":"\\\\dotsb","\\\\Longrightarrow":"\\\\dotsb","\\\\longleftarrow":"\\\\dotsb","\\\\Longleftarrow":"\\\\dotsb","\\\\longleftrightarrow":"\\\\dotsb","\\\\Longleftrightarrow":"\\\\dotsb","\\\\mapsto":"\\\\dotsb","\\\\longmapsto":"\\\\dotsb","\\\\hookrightarrow":"\\\\dotsb","\\\\doteq":"\\\\dotsb","\\\\mathbin":"\\\\dotsb","\\\\mathrel":"\\\\dotsb","\\\\relbar":"\\\\dotsb","\\\\Relbar":"\\\\dotsb","\\\\xrightarrow":"\\\\dotsb","\\\\xleftarrow":"\\\\dotsb","\\\\DOTSI":"\\\\dotsi","\\\\int":"\\\\dotsi","\\\\oint":"\\\\dotsi","\\\\iint":"\\\\dotsi","\\\\iiint":"\\\\dotsi","\\\\iiiint":"\\\\dotsi","\\\\idotsint":"\\\\dotsi","\\\\DOTSX":"\\\\dotsx"};le("\\\\dots",function(t){var e="\\\\dotso",r=t.expandAfterFuture().text;return r in mB?e=mB[r]:(r.slice(0,4)==="\\\\not"||r in yn.math&&Yt.contains(["bin","rel"],yn.math[r].group))&&(e="\\\\dotsb"),e});ES={")":!0,"]":!0,"\\\\rbrack":!0,"\\\\}":!0,"\\\\rbrace":!0,"\\\\rangle":!0,"\\\\rceil":!0,"\\\\rfloor":!0,"\\\\rgroup":!0,"\\\\rmoustache":!0,"\\\\right":!0,"\\\\bigr":!0,"\\\\biggr":!0,"\\\\Bigr":!0,"\\\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};le("\\\\dotso",function(t){var e=t.future().text;return e in ES?"\\\\ldots\\\\,":"\\\\ldots"});le("\\\\dotsc",function(t){var e=t.future().text;return e in ES&&e!==","?"\\\\ldots\\\\,":"\\\\ldots"});le("\\\\cdots",function(t){var e=t.future().text;return e in ES?"\\\\@cdots\\\\,":"\\\\@cdots"});le("\\\\dotsb","\\\\cdots");le("\\\\dotsm","\\\\cdots");le("\\\\dotsi","\\\\!\\\\cdots");le("\\\\dotsx","\\\\ldots\\\\,");le("\\\\DOTSI","\\\\relax");le("\\\\DOTSB","\\\\relax");le("\\\\DOTSX","\\\\relax");le("\\\\tmspace","\\\\TextOrMath{\\\\kern#1#3}{\\\\mskip#1#2}\\\\relax");le("\\\\,","\\\\tmspace+{3mu}{.1667em}");le("\\\\thinspace","\\\\,");le("\\\\>","\\\\mskip{4mu}");le("\\\\:","\\\\tmspace+{4mu}{.2222em}");le("\\\\medspace","\\\\:");le("\\\\;","\\\\tmspace+{5mu}{.2777em}");le("\\\\thickspace","\\\\;");le("\\\\!","\\\\tmspace-{3mu}{.1667em}");le("\\\\negthinspace","\\\\!");le("\\\\negmedspace","\\\\tmspace-{4mu}{.2222em}");le("\\\\negthickspace","\\\\tmspace-{5mu}{.277em}");le("\\\\enspace","\\\\kern.5em ");le("\\\\enskip","\\\\hskip.5em\\\\relax");le("\\\\quad","\\\\hskip1em\\\\relax");le("\\\\qquad","\\\\hskip2em\\\\relax");le("\\\\tag","\\\\@ifstar\\\\tag@literal\\\\tag@paren");le("\\\\tag@paren","\\\\tag@literal{({#1})}");le("\\\\tag@literal",t=>{if(t.macros.get("\\\\df@tag"))throw new nt("Multiple \\\\tag");return"\\\\gdef\\\\df@tag{\\\\text{#1}}"});le("\\\\bmod","\\\\mathchoice{\\\\mskip1mu}{\\\\mskip1mu}{\\\\mskip5mu}{\\\\mskip5mu}\\\\mathbin{\\\\rm mod}\\\\mathchoice{\\\\mskip1mu}{\\\\mskip1mu}{\\\\mskip5mu}{\\\\mskip5mu}");le("\\\\pod","\\\\allowbreak\\\\mathchoice{\\\\mkern18mu}{\\\\mkern8mu}{\\\\mkern8mu}{\\\\mkern8mu}(#1)");le("\\\\pmod","\\\\pod{{\\\\rm mod}\\\\mkern6mu#1}");le("\\\\mod","\\\\allowbreak\\\\mathchoice{\\\\mkern18mu}{\\\\mkern12mu}{\\\\mkern12mu}{\\\\mkern12mu}{\\\\rm mod}\\\\,\\\\,#1");le("\\\\newline","\\\\\\\\\\\\relax");le("\\\\TeX","\\\\textrm{\\\\html@mathml{T\\\\kern-.1667em\\\\raisebox{-.5ex}{E}\\\\kern-.125emX}{TeX}}");cF=ct(zl["Main-Regular"][84][1]-.7*zl["Main-Regular"][65][1]);le("\\\\LaTeX","\\\\textrm{\\\\html@mathml{"+("L\\\\kern-.36em\\\\raisebox{"+cF+"}{\\\\scriptstyle A}")+"\\\\kern-.15em\\\\TeX}{LaTeX}}");le("\\\\KaTeX","\\\\textrm{\\\\html@mathml{"+("K\\\\kern-.17em\\\\raisebox{"+cF+"}{\\\\scriptstyle A}")+"\\\\kern-.15em\\\\TeX}{KaTeX}}");le("\\\\hspace","\\\\@ifstar\\\\@hspacer\\\\@hspace");le("\\\\@hspace","\\\\hskip #1\\\\relax");le("\\\\@hspacer","\\\\rule{0pt}{0pt}\\\\hskip #1\\\\relax");le("\\\\ordinarycolon",":");le("\\\\vcentcolon","\\\\mathrel{\\\\mathop\\\\ordinarycolon}");le("\\\\dblcolon",\'\\\\html@mathml{\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-.9mu}\\\\vcentcolon}}{\\\\mathop{\\\\char"2237}}\');le("\\\\coloneqq",\'\\\\html@mathml{\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}=}}{\\\\mathop{\\\\char"2254}}\');le("\\\\Coloneqq",\'\\\\html@mathml{\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}=}}{\\\\mathop{\\\\char"2237\\\\char"3d}}\');le("\\\\coloneq",\'\\\\html@mathml{\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\mathrel{-}}}{\\\\mathop{\\\\char"3a\\\\char"2212}}\');le("\\\\Coloneq",\'\\\\html@mathml{\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\mathrel{-}}}{\\\\mathop{\\\\char"2237\\\\char"2212}}\');le("\\\\eqqcolon",\'\\\\html@mathml{\\\\mathrel{=\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}}{\\\\mathop{\\\\char"2255}}\');le("\\\\Eqqcolon",\'\\\\html@mathml{\\\\mathrel{=\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}}{\\\\mathop{\\\\char"3d\\\\char"2237}}\');le("\\\\eqcolon",\'\\\\html@mathml{\\\\mathrel{\\\\mathrel{-}\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}}{\\\\mathop{\\\\char"2239}}\');le("\\\\Eqcolon",\'\\\\html@mathml{\\\\mathrel{\\\\mathrel{-}\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}}{\\\\mathop{\\\\char"2212\\\\char"2237}}\');le("\\\\colonapprox",\'\\\\html@mathml{\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\approx}}{\\\\mathop{\\\\char"3a\\\\char"2248}}\');le("\\\\Colonapprox",\'\\\\html@mathml{\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\approx}}{\\\\mathop{\\\\char"2237\\\\char"2248}}\');le("\\\\colonsim",\'\\\\html@mathml{\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\sim}}{\\\\mathop{\\\\char"3a\\\\char"223c}}\');le("\\\\Colonsim",\'\\\\html@mathml{\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\sim}}{\\\\mathop{\\\\char"2237\\\\char"223c}}\');le("\\u2237","\\\\dblcolon");le("\\u2239","\\\\eqcolon");le("\\u2254","\\\\coloneqq");le("\\u2255","\\\\eqqcolon");le("\\u2A74","\\\\Coloneqq");le("\\\\ratio","\\\\vcentcolon");le("\\\\coloncolon","\\\\dblcolon");le("\\\\colonequals","\\\\coloneqq");le("\\\\coloncolonequals","\\\\Coloneqq");le("\\\\equalscolon","\\\\eqqcolon");le("\\\\equalscoloncolon","\\\\Eqqcolon");le("\\\\colonminus","\\\\coloneq");le("\\\\coloncolonminus","\\\\Coloneq");le("\\\\minuscolon","\\\\eqcolon");le("\\\\minuscoloncolon","\\\\Eqcolon");le("\\\\coloncolonapprox","\\\\Colonapprox");le("\\\\coloncolonsim","\\\\Colonsim");le("\\\\simcolon","\\\\mathrel{\\\\sim\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}");le("\\\\simcoloncolon","\\\\mathrel{\\\\sim\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}");le("\\\\approxcolon","\\\\mathrel{\\\\approx\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}");le("\\\\approxcoloncolon","\\\\mathrel{\\\\approx\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}");le("\\\\notni","\\\\html@mathml{\\\\not\\\\ni}{\\\\mathrel{\\\\char`\\u220C}}");le("\\\\limsup","\\\\DOTSB\\\\operatorname*{lim\\\\,sup}");le("\\\\liminf","\\\\DOTSB\\\\operatorname*{lim\\\\,inf}");le("\\\\injlim","\\\\DOTSB\\\\operatorname*{inj\\\\,lim}");le("\\\\projlim","\\\\DOTSB\\\\operatorname*{proj\\\\,lim}");le("\\\\varlimsup","\\\\DOTSB\\\\operatorname*{\\\\overline{lim}}");le("\\\\varliminf","\\\\DOTSB\\\\operatorname*{\\\\underline{lim}}");le("\\\\varinjlim","\\\\DOTSB\\\\operatorname*{\\\\underrightarrow{lim}}");le("\\\\varprojlim","\\\\DOTSB\\\\operatorname*{\\\\underleftarrow{lim}}");le("\\\\gvertneqq","\\\\html@mathml{\\\\@gvertneqq}{\\u2269}");le("\\\\lvertneqq","\\\\html@mathml{\\\\@lvertneqq}{\\u2268}");le("\\\\ngeqq","\\\\html@mathml{\\\\@ngeqq}{\\u2271}");le("\\\\ngeqslant","\\\\html@mathml{\\\\@ngeqslant}{\\u2271}");le("\\\\nleqq","\\\\html@mathml{\\\\@nleqq}{\\u2270}");le("\\\\nleqslant","\\\\html@mathml{\\\\@nleqslant}{\\u2270}");le("\\\\nshortmid","\\\\html@mathml{\\\\@nshortmid}{\\u2224}");le("\\\\nshortparallel","\\\\html@mathml{\\\\@nshortparallel}{\\u2226}");le("\\\\nsubseteqq","\\\\html@mathml{\\\\@nsubseteqq}{\\u2288}");le("\\\\nsupseteqq","\\\\html@mathml{\\\\@nsupseteqq}{\\u2289}");le("\\\\varsubsetneq","\\\\html@mathml{\\\\@varsubsetneq}{\\u228A}");le("\\\\varsubsetneqq","\\\\html@mathml{\\\\@varsubsetneqq}{\\u2ACB}");le("\\\\varsupsetneq","\\\\html@mathml{\\\\@varsupsetneq}{\\u228B}");le("\\\\varsupsetneqq","\\\\html@mathml{\\\\@varsupsetneqq}{\\u2ACC}");le("\\\\imath","\\\\html@mathml{\\\\@imath}{\\u0131}");le("\\\\jmath","\\\\html@mathml{\\\\@jmath}{\\u0237}");le("\\\\llbracket","\\\\html@mathml{\\\\mathopen{[\\\\mkern-3.2mu[}}{\\\\mathopen{\\\\char`\\u27E6}}");le("\\\\rrbracket","\\\\html@mathml{\\\\mathclose{]\\\\mkern-3.2mu]}}{\\\\mathclose{\\\\char`\\u27E7}}");le("\\u27E6","\\\\llbracket");le("\\u27E7","\\\\rrbracket");le("\\\\lBrace","\\\\html@mathml{\\\\mathopen{\\\\{\\\\mkern-3.2mu[}}{\\\\mathopen{\\\\char`\\u2983}}");le("\\\\rBrace","\\\\html@mathml{\\\\mathclose{]\\\\mkern-3.2mu\\\\}}}{\\\\mathclose{\\\\char`\\u2984}}");le("\\u2983","\\\\lBrace");le("\\u2984","\\\\rBrace");le("\\\\minuso","\\\\mathbin{\\\\html@mathml{{\\\\mathrlap{\\\\mathchoice{\\\\kern{0.145em}}{\\\\kern{0.145em}}{\\\\kern{0.1015em}}{\\\\kern{0.0725em}}\\\\circ}{-}}}{\\\\char`\\u29B5}}");le("\\u29B5","\\\\minuso");le("\\\\darr","\\\\downarrow");le("\\\\dArr","\\\\Downarrow");le("\\\\Darr","\\\\Downarrow");le("\\\\lang","\\\\langle");le("\\\\rang","\\\\rangle");le("\\\\uarr","\\\\uparrow");le("\\\\uArr","\\\\Uparrow");le("\\\\Uarr","\\\\Uparrow");le("\\\\N","\\\\mathbb{N}");le("\\\\R","\\\\mathbb{R}");le("\\\\Z","\\\\mathbb{Z}");le("\\\\alef","\\\\aleph");le("\\\\alefsym","\\\\aleph");le("\\\\Alpha","\\\\mathrm{A}");le("\\\\Beta","\\\\mathrm{B}");le("\\\\bull","\\\\bullet");le("\\\\Chi","\\\\mathrm{X}");le("\\\\clubs","\\\\clubsuit");le("\\\\cnums","\\\\mathbb{C}");le("\\\\Complex","\\\\mathbb{C}");le("\\\\Dagger","\\\\ddagger");le("\\\\diamonds","\\\\diamondsuit");le("\\\\empty","\\\\emptyset");le("\\\\Epsilon","\\\\mathrm{E}");le("\\\\Eta","\\\\mathrm{H}");le("\\\\exist","\\\\exists");le("\\\\harr","\\\\leftrightarrow");le("\\\\hArr","\\\\Leftrightarrow");le("\\\\Harr","\\\\Leftrightarrow");le("\\\\hearts","\\\\heartsuit");le("\\\\image","\\\\Im");le("\\\\infin","\\\\infty");le("\\\\Iota","\\\\mathrm{I}");le("\\\\isin","\\\\in");le("\\\\Kappa","\\\\mathrm{K}");le("\\\\larr","\\\\leftarrow");le("\\\\lArr","\\\\Leftarrow");le("\\\\Larr","\\\\Leftarrow");le("\\\\lrarr","\\\\leftrightarrow");le("\\\\lrArr","\\\\Leftrightarrow");le("\\\\Lrarr","\\\\Leftrightarrow");le("\\\\Mu","\\\\mathrm{M}");le("\\\\natnums","\\\\mathbb{N}");le("\\\\Nu","\\\\mathrm{N}");le("\\\\Omicron","\\\\mathrm{O}");le("\\\\plusmn","\\\\pm");le("\\\\rarr","\\\\rightarrow");le("\\\\rArr","\\\\Rightarrow");le("\\\\Rarr","\\\\Rightarrow");le("\\\\real","\\\\Re");le("\\\\reals","\\\\mathbb{R}");le("\\\\Reals","\\\\mathbb{R}");le("\\\\Rho","\\\\mathrm{P}");le("\\\\sdot","\\\\cdot");le("\\\\sect","\\\\S");le("\\\\spades","\\\\spadesuit");le("\\\\sub","\\\\subset");le("\\\\sube","\\\\subseteq");le("\\\\supe","\\\\supseteq");le("\\\\Tau","\\\\mathrm{T}");le("\\\\thetasym","\\\\vartheta");le("\\\\weierp","\\\\wp");le("\\\\Zeta","\\\\mathrm{Z}");le("\\\\argmin","\\\\DOTSB\\\\operatorname*{arg\\\\,min}");le("\\\\argmax","\\\\DOTSB\\\\operatorname*{arg\\\\,max}");le("\\\\plim","\\\\DOTSB\\\\mathop{\\\\operatorname{plim}}\\\\limits");le("\\\\bra","\\\\mathinner{\\\\langle{#1}|}");le("\\\\ket","\\\\mathinner{|{#1}\\\\rangle}");le("\\\\braket","\\\\mathinner{\\\\langle{#1}\\\\rangle}");le("\\\\Bra","\\\\left\\\\langle#1\\\\right|");le("\\\\Ket","\\\\left|#1\\\\right\\\\rangle");uF=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\\\|");e.macros.beginGroup();var l=f=>d=>{t&&(d.macros.set("|",s),i.length&&d.macros.set("\\\\|",o));var p=f;if(!f&&i.length){var g=d.future();g.text==="|"&&(d.popToken(),p=!0)}return{tokens:p?i:n,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\\\|",l(!0));var u=e.consumeArg().tokens,h=e.expandTokens([...a,...u,...r]);return e.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};le("\\\\bra@ket",uF(!1));le("\\\\bra@set",uF(!0));le("\\\\Braket","\\\\bra@ket{\\\\left\\\\langle}{\\\\,\\\\middle\\\\vert\\\\,}{\\\\,\\\\middle\\\\vert\\\\,}{\\\\right\\\\rangle}");le("\\\\Set","\\\\bra@set{\\\\left\\\\{\\\\:}{\\\\;\\\\middle\\\\vert\\\\;}{\\\\;\\\\middle\\\\Vert\\\\;}{\\\\:\\\\right\\\\}}");le("\\\\set","\\\\bra@set{\\\\{\\\\,}{\\\\mid}{}{\\\\,\\\\}}");le("\\\\angln","{\\\\angl n}");le("\\\\blue","\\\\textcolor{##6495ed}{#1}");le("\\\\orange","\\\\textcolor{##ffa500}{#1}");le("\\\\pink","\\\\textcolor{##ff00af}{#1}");le("\\\\red","\\\\textcolor{##df0030}{#1}");le("\\\\green","\\\\textcolor{##28ae7b}{#1}");le("\\\\gray","\\\\textcolor{gray}{#1}");le("\\\\purple","\\\\textcolor{##9d38bd}{#1}");le("\\\\blueA","\\\\textcolor{##ccfaff}{#1}");le("\\\\blueB","\\\\textcolor{##80f6ff}{#1}");le("\\\\blueC","\\\\textcolor{##63d9ea}{#1}");le("\\\\blueD","\\\\textcolor{##11accd}{#1}");le("\\\\blueE","\\\\textcolor{##0c7f99}{#1}");le("\\\\tealA","\\\\textcolor{##94fff5}{#1}");le("\\\\tealB","\\\\textcolor{##26edd5}{#1}");le("\\\\tealC","\\\\textcolor{##01d1c1}{#1}");le("\\\\tealD","\\\\textcolor{##01a995}{#1}");le("\\\\tealE","\\\\textcolor{##208170}{#1}");le("\\\\greenA","\\\\textcolor{##b6ffb0}{#1}");le("\\\\greenB","\\\\textcolor{##8af281}{#1}");le("\\\\greenC","\\\\textcolor{##74cf70}{#1}");le("\\\\greenD","\\\\textcolor{##1fab54}{#1}");le("\\\\greenE","\\\\textcolor{##0d923f}{#1}");le("\\\\goldA","\\\\textcolor{##ffd0a9}{#1}");le("\\\\goldB","\\\\textcolor{##ffbb71}{#1}");le("\\\\goldC","\\\\textcolor{##ff9c39}{#1}");le("\\\\goldD","\\\\textcolor{##e07d10}{#1}");le("\\\\goldE","\\\\textcolor{##a75a05}{#1}");le("\\\\redA","\\\\textcolor{##fca9a9}{#1}");le("\\\\redB","\\\\textcolor{##ff8482}{#1}");le("\\\\redC","\\\\textcolor{##f9685d}{#1}");le("\\\\redD","\\\\textcolor{##e84d39}{#1}");le("\\\\redE","\\\\textcolor{##bc2612}{#1}");le("\\\\maroonA","\\\\textcolor{##ffbde0}{#1}");le("\\\\maroonB","\\\\textcolor{##ff92c6}{#1}");le("\\\\maroonC","\\\\textcolor{##ed5fa6}{#1}");le("\\\\maroonD","\\\\textcolor{##ca337c}{#1}");le("\\\\maroonE","\\\\textcolor{##9e034e}{#1}");le("\\\\purpleA","\\\\textcolor{##ddd7ff}{#1}");le("\\\\purpleB","\\\\textcolor{##c6b9fc}{#1}");le("\\\\purpleC","\\\\textcolor{##aa87ff}{#1}");le("\\\\purpleD","\\\\textcolor{##7854ab}{#1}");le("\\\\purpleE","\\\\textcolor{##543b78}{#1}");le("\\\\mintA","\\\\textcolor{##f5f9e8}{#1}");le("\\\\mintB","\\\\textcolor{##edf2df}{#1}");le("\\\\mintC","\\\\textcolor{##e0e5cc}{#1}");le("\\\\grayA","\\\\textcolor{##f6f7f7}{#1}");le("\\\\grayB","\\\\textcolor{##f0f1f2}{#1}");le("\\\\grayC","\\\\textcolor{##e3e5e6}{#1}");le("\\\\grayD","\\\\textcolor{##d6d8da}{#1}");le("\\\\grayE","\\\\textcolor{##babec2}{#1}");le("\\\\grayF","\\\\textcolor{##888d93}{#1}");le("\\\\grayG","\\\\textcolor{##626569}{#1}");le("\\\\grayH","\\\\textcolor{##3b3e40}{#1}");le("\\\\grayI","\\\\textcolor{##21242c}{#1}");le("\\\\kaBlue","\\\\textcolor{##314453}{#1}");le("\\\\kaGreen","\\\\textcolor{##71B307}{#1}");hF={"^":!0,_:!0,"\\\\limits":!0,"\\\\nolimits":!0},lS=class{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new oS(bye,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new mb(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new co("EOF",n.loc)),this.pushTokens(i),r.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),a,s=0,o=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new nt("Extra }",a)}else if(a.text==="EOF")throw new nt("Unexpected end of input in a macro argument, expected \'"+(e&&n?e[o]:"}")+"\'",a);if(e&&n)if((s===0||s===1&&e[o]==="{")&&a.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(s!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new nt("The length of delimiters doesn\'t match the number of args!");for(var n=r[0],i=0;i<n.length;i++){var a=this.popToken();if(n[i]!==a.text)throw new nt("Use of the macro doesn\'t match its definition",a)}}for(var s=[],o=0;o<e;o++)s.push(this.consumeArg(r&&r[o+1]).tokens);return s}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new nt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\\\"&&!this.isDefined(n))throw new nt("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new nt("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...s[+l.text-1]);else throw new nt("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new co(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var s=i.replace(/##/g,"");s.indexOf("#"+(a+1))!==-1;)++a;for(var o=new mb(i,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var h={tokens:l,numArgs:a};return h}return i}isDefined(e){return this.macros.has(e)||Zu.hasOwnProperty(e)||yn.math.hasOwnProperty(e)||yn.text.hasOwnProperty(e)||hF.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Zu.hasOwnProperty(e)&&!Zu[e].primitive}},vB=/^[\u208A\u208B\u208C\u208D\u208E\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1D62\u2C7C\u2096\u2097\u2098\u2099\u2092\u209A\u1D63\u209B\u209C\u1D64\u1D65\u2093\u1D66\u1D67\u1D68\u1D69\u1D6A]/,ob=Object.freeze({"\\u208A":"+","\\u208B":"-","\\u208C":"=","\\u208D":"(","\\u208E":")","\\u2080":"0","\\u2081":"1","\\u2082":"2","\\u2083":"3","\\u2084":"4","\\u2085":"5","\\u2086":"6","\\u2087":"7","\\u2088":"8","\\u2089":"9","\\u2090":"a","\\u2091":"e","\\u2095":"h","\\u1D62":"i","\\u2C7C":"j","\\u2096":"k","\\u2097":"l","\\u2098":"m","\\u2099":"n","\\u2092":"o","\\u209A":"p","\\u1D63":"r","\\u209B":"s","\\u209C":"t","\\u1D64":"u","\\u1D65":"v","\\u2093":"x","\\u1D66":"\\u03B2","\\u1D67":"\\u03B3","\\u1D68":"\\u03C1","\\u1D69":"\\u03D5","\\u1D6A":"\\u03C7","\\u207A":"+","\\u207B":"-","\\u207C":"=","\\u207D":"(","\\u207E":")","\\u2070":"0","\\xB9":"1","\\xB2":"2","\\xB3":"3","\\u2074":"4","\\u2075":"5","\\u2076":"6","\\u2077":"7","\\u2078":"8","\\u2079":"9","\\u1D2C":"A","\\u1D2E":"B","\\u1D30":"D","\\u1D31":"E","\\u1D33":"G","\\u1D34":"H","\\u1D35":"I","\\u1D36":"J","\\u1D37":"K","\\u1D38":"L","\\u1D39":"M","\\u1D3A":"N","\\u1D3C":"O","\\u1D3E":"P","\\u1D3F":"R","\\u1D40":"T","\\u1D41":"U","\\u2C7D":"V","\\u1D42":"W","\\u1D43":"a","\\u1D47":"b","\\u1D9C":"c","\\u1D48":"d","\\u1D49":"e","\\u1DA0":"f","\\u1D4D":"g",\\u02B0:"h","\\u2071":"i",\\u02B2:"j","\\u1D4F":"k",\\u02E1:"l","\\u1D50":"m",\\u207F:"n","\\u1D52":"o","\\u1D56":"p",\\u02B3:"r",\\u02E2:"s","\\u1D57":"t","\\u1D58":"u","\\u1D5B":"v",\\u02B7:"w",\\u02E3:"x",\\u02B8:"y","\\u1DBB":"z","\\u1D5D":"\\u03B2","\\u1D5E":"\\u03B3","\\u1D5F":"\\u03B4","\\u1D60":"\\u03D5","\\u1D61":"\\u03C7","\\u1DBF":"\\u03B8"}),KE={"\\u0301":{text:"\\\\\'",math:"\\\\acute"},"\\u0300":{text:"\\\\`",math:"\\\\grave"},"\\u0308":{text:\'\\\\"\',math:"\\\\ddot"},"\\u0303":{text:"\\\\~",math:"\\\\tilde"},"\\u0304":{text:"\\\\=",math:"\\\\bar"},"\\u0306":{text:"\\\\u",math:"\\\\breve"},"\\u030C":{text:"\\\\v",math:"\\\\check"},"\\u0302":{text:"\\\\^",math:"\\\\hat"},"\\u0307":{text:"\\\\.",math:"\\\\dot"},"\\u030A":{text:"\\\\r",math:"\\\\mathring"},"\\u030B":{text:"\\\\H"},"\\u0327":{text:"\\\\c"}},yB={\\u00E1:"a\\u0301",\\u00E0:"a\\u0300",\\u00E4:"a\\u0308",\\u01DF:"a\\u0308\\u0304",\\u00E3:"a\\u0303",\\u0101:"a\\u0304",\\u0103:"a\\u0306",\\u1EAF:"a\\u0306\\u0301",\\u1EB1:"a\\u0306\\u0300",\\u1EB5:"a\\u0306\\u0303",\\u01CE:"a\\u030C",\\u00E2:"a\\u0302",\\u1EA5:"a\\u0302\\u0301",\\u1EA7:"a\\u0302\\u0300",\\u1EAB:"a\\u0302\\u0303",\\u0227:"a\\u0307",\\u01E1:"a\\u0307\\u0304",\\u00E5:"a\\u030A",\\u01FB:"a\\u030A\\u0301",\\u1E03:"b\\u0307",\\u0107:"c\\u0301",\\u1E09:"c\\u0327\\u0301",\\u010D:"c\\u030C",\\u0109:"c\\u0302",\\u010B:"c\\u0307",\\u00E7:"c\\u0327",\\u010F:"d\\u030C",\\u1E0B:"d\\u0307",\\u1E11:"d\\u0327",\\u00E9:"e\\u0301",\\u00E8:"e\\u0300",\\u00EB:"e\\u0308",\\u1EBD:"e\\u0303",\\u0113:"e\\u0304",\\u1E17:"e\\u0304\\u0301",\\u1E15:"e\\u0304\\u0300",\\u0115:"e\\u0306",\\u1E1D:"e\\u0327\\u0306",\\u011B:"e\\u030C",\\u00EA:"e\\u0302",\\u1EBF:"e\\u0302\\u0301",\\u1EC1:"e\\u0302\\u0300",\\u1EC5:"e\\u0302\\u0303",\\u0117:"e\\u0307",\\u0229:"e\\u0327",\\u1E1F:"f\\u0307",\\u01F5:"g\\u0301",\\u1E21:"g\\u0304",\\u011F:"g\\u0306",\\u01E7:"g\\u030C",\\u011D:"g\\u0302",\\u0121:"g\\u0307",\\u0123:"g\\u0327",\\u1E27:"h\\u0308",\\u021F:"h\\u030C",\\u0125:"h\\u0302",\\u1E23:"h\\u0307",\\u1E29:"h\\u0327",\\u00ED:"i\\u0301",\\u00EC:"i\\u0300",\\u00EF:"i\\u0308",\\u1E2F:"i\\u0308\\u0301",\\u0129:"i\\u0303",\\u012B:"i\\u0304",\\u012D:"i\\u0306",\\u01D0:"i\\u030C",\\u00EE:"i\\u0302",\\u01F0:"j\\u030C",\\u0135:"j\\u0302",\\u1E31:"k\\u0301",\\u01E9:"k\\u030C",\\u0137:"k\\u0327",\\u013A:"l\\u0301",\\u013E:"l\\u030C",\\u013C:"l\\u0327",\\u1E3F:"m\\u0301",\\u1E41:"m\\u0307",\\u0144:"n\\u0301",\\u01F9:"n\\u0300",\\u00F1:"n\\u0303",\\u0148:"n\\u030C",\\u1E45:"n\\u0307",\\u0146:"n\\u0327",\\u00F3:"o\\u0301",\\u00F2:"o\\u0300",\\u00F6:"o\\u0308",\\u022B:"o\\u0308\\u0304",\\u00F5:"o\\u0303",\\u1E4D:"o\\u0303\\u0301",\\u1E4F:"o\\u0303\\u0308",\\u022D:"o\\u0303\\u0304",\\u014D:"o\\u0304",\\u1E53:"o\\u0304\\u0301",\\u1E51:"o\\u0304\\u0300",\\u014F:"o\\u0306",\\u01D2:"o\\u030C",\\u00F4:"o\\u0302",\\u1ED1:"o\\u0302\\u0301",\\u1ED3:"o\\u0302\\u0300",\\u1ED7:"o\\u0302\\u0303",\\u022F:"o\\u0307",\\u0231:"o\\u0307\\u0304",\\u0151:"o\\u030B",\\u1E55:"p\\u0301",\\u1E57:"p\\u0307",\\u0155:"r\\u0301",\\u0159:"r\\u030C",\\u1E59:"r\\u0307",\\u0157:"r\\u0327",\\u015B:"s\\u0301",\\u1E65:"s\\u0301\\u0307",\\u0161:"s\\u030C",\\u1E67:"s\\u030C\\u0307",\\u015D:"s\\u0302",\\u1E61:"s\\u0307",\\u015F:"s\\u0327",\\u1E97:"t\\u0308",\\u0165:"t\\u030C",\\u1E6B:"t\\u0307",\\u0163:"t\\u0327",\\u00FA:"u\\u0301",\\u00F9:"u\\u0300",\\u00FC:"u\\u0308",\\u01D8:"u\\u0308\\u0301",\\u01DC:"u\\u0308\\u0300",\\u01D6:"u\\u0308\\u0304",\\u01DA:"u\\u0308\\u030C",\\u0169:"u\\u0303",\\u1E79:"u\\u0303\\u0301",\\u016B:"u\\u0304",\\u1E7B:"u\\u0304\\u0308",\\u016D:"u\\u0306",\\u01D4:"u\\u030C",\\u00FB:"u\\u0302",\\u016F:"u\\u030A",\\u0171:"u\\u030B",\\u1E7D:"v\\u0303",\\u1E83:"w\\u0301",\\u1E81:"w\\u0300",\\u1E85:"w\\u0308",\\u0175:"w\\u0302",\\u1E87:"w\\u0307",\\u1E98:"w\\u030A",\\u1E8D:"x\\u0308",\\u1E8B:"x\\u0307",\\u00FD:"y\\u0301",\\u1EF3:"y\\u0300",\\u00FF:"y\\u0308",\\u1EF9:"y\\u0303",\\u0233:"y\\u0304",\\u0177:"y\\u0302",\\u1E8F:"y\\u0307",\\u1E99:"y\\u030A",\\u017A:"z\\u0301",\\u017E:"z\\u030C",\\u1E91:"z\\u0302",\\u017C:"z\\u0307",\\u00C1:"A\\u0301",\\u00C0:"A\\u0300",\\u00C4:"A\\u0308",\\u01DE:"A\\u0308\\u0304",\\u00C3:"A\\u0303",\\u0100:"A\\u0304",\\u0102:"A\\u0306",\\u1EAE:"A\\u0306\\u0301",\\u1EB0:"A\\u0306\\u0300",\\u1EB4:"A\\u0306\\u0303",\\u01CD:"A\\u030C",\\u00C2:"A\\u0302",\\u1EA4:"A\\u0302\\u0301",\\u1EA6:"A\\u0302\\u0300",\\u1EAA:"A\\u0302\\u0303",\\u0226:"A\\u0307",\\u01E0:"A\\u0307\\u0304",\\u00C5:"A\\u030A",\\u01FA:"A\\u030A\\u0301",\\u1E02:"B\\u0307",\\u0106:"C\\u0301",\\u1E08:"C\\u0327\\u0301",\\u010C:"C\\u030C",\\u0108:"C\\u0302",\\u010A:"C\\u0307",\\u00C7:"C\\u0327",\\u010E:"D\\u030C",\\u1E0A:"D\\u0307",\\u1E10:"D\\u0327",\\u00C9:"E\\u0301",\\u00C8:"E\\u0300",\\u00CB:"E\\u0308",\\u1EBC:"E\\u0303",\\u0112:"E\\u0304",\\u1E16:"E\\u0304\\u0301",\\u1E14:"E\\u0304\\u0300",\\u0114:"E\\u0306",\\u1E1C:"E\\u0327\\u0306",\\u011A:"E\\u030C",\\u00CA:"E\\u0302",\\u1EBE:"E\\u0302\\u0301",\\u1EC0:"E\\u0302\\u0300",\\u1EC4:"E\\u0302\\u0303",\\u0116:"E\\u0307",\\u0228:"E\\u0327",\\u1E1E:"F\\u0307",\\u01F4:"G\\u0301",\\u1E20:"G\\u0304",\\u011E:"G\\u0306",\\u01E6:"G\\u030C",\\u011C:"G\\u0302",\\u0120:"G\\u0307",\\u0122:"G\\u0327",\\u1E26:"H\\u0308",\\u021E:"H\\u030C",\\u0124:"H\\u0302",\\u1E22:"H\\u0307",\\u1E28:"H\\u0327",\\u00CD:"I\\u0301",\\u00CC:"I\\u0300",\\u00CF:"I\\u0308",\\u1E2E:"I\\u0308\\u0301",\\u0128:"I\\u0303",\\u012A:"I\\u0304",\\u012C:"I\\u0306",\\u01CF:"I\\u030C",\\u00CE:"I\\u0302",\\u0130:"I\\u0307",\\u0134:"J\\u0302",\\u1E30:"K\\u0301",\\u01E8:"K\\u030C",\\u0136:"K\\u0327",\\u0139:"L\\u0301",\\u013D:"L\\u030C",\\u013B:"L\\u0327",\\u1E3E:"M\\u0301",\\u1E40:"M\\u0307",\\u0143:"N\\u0301",\\u01F8:"N\\u0300",\\u00D1:"N\\u0303",\\u0147:"N\\u030C",\\u1E44:"N\\u0307",\\u0145:"N\\u0327",\\u00D3:"O\\u0301",\\u00D2:"O\\u0300",\\u00D6:"O\\u0308",\\u022A:"O\\u0308\\u0304",\\u00D5:"O\\u0303",\\u1E4C:"O\\u0303\\u0301",\\u1E4E:"O\\u0303\\u0308",\\u022C:"O\\u0303\\u0304",\\u014C:"O\\u0304",\\u1E52:"O\\u0304\\u0301",\\u1E50:"O\\u0304\\u0300",\\u014E:"O\\u0306",\\u01D1:"O\\u030C",\\u00D4:"O\\u0302",\\u1ED0:"O\\u0302\\u0301",\\u1ED2:"O\\u0302\\u0300",\\u1ED6:"O\\u0302\\u0303",\\u022E:"O\\u0307",\\u0230:"O\\u0307\\u0304",\\u0150:"O\\u030B",\\u1E54:"P\\u0301",\\u1E56:"P\\u0307",\\u0154:"R\\u0301",\\u0158:"R\\u030C",\\u1E58:"R\\u0307",\\u0156:"R\\u0327",\\u015A:"S\\u0301",\\u1E64:"S\\u0301\\u0307",\\u0160:"S\\u030C",\\u1E66:"S\\u030C\\u0307",\\u015C:"S\\u0302",\\u1E60:"S\\u0307",\\u015E:"S\\u0327",\\u0164:"T\\u030C",\\u1E6A:"T\\u0307",\\u0162:"T\\u0327",\\u00DA:"U\\u0301",\\u00D9:"U\\u0300",\\u00DC:"U\\u0308",\\u01D7:"U\\u0308\\u0301",\\u01DB:"U\\u0308\\u0300",\\u01D5:"U\\u0308\\u0304",\\u01D9:"U\\u0308\\u030C",\\u0168:"U\\u0303",\\u1E78:"U\\u0303\\u0301",\\u016A:"U\\u0304",\\u1E7A:"U\\u0304\\u0308",\\u016C:"U\\u0306",\\u01D3:"U\\u030C",\\u00DB:"U\\u0302",\\u016E:"U\\u030A",\\u0170:"U\\u030B",\\u1E7C:"V\\u0303",\\u1E82:"W\\u0301",\\u1E80:"W\\u0300",\\u1E84:"W\\u0308",\\u0174:"W\\u0302",\\u1E86:"W\\u0307",\\u1E8C:"X\\u0308",\\u1E8A:"X\\u0307",\\u00DD:"Y\\u0301",\\u1EF2:"Y\\u0300",\\u0178:"Y\\u0308",\\u1EF8:"Y\\u0303",\\u0232:"Y\\u0304",\\u0176:"Y\\u0302",\\u1E8E:"Y\\u0307",\\u0179:"Z\\u0301",\\u017D:"Z\\u030C",\\u1E90:"Z\\u0302",\\u017B:"Z\\u0307",\\u03AC:"\\u03B1\\u0301",\\u1F70:"\\u03B1\\u0300",\\u1FB1:"\\u03B1\\u0304",\\u1FB0:"\\u03B1\\u0306",\\u03AD:"\\u03B5\\u0301",\\u1F72:"\\u03B5\\u0300",\\u03AE:"\\u03B7\\u0301",\\u1F74:"\\u03B7\\u0300",\\u03AF:"\\u03B9\\u0301",\\u1F76:"\\u03B9\\u0300",\\u03CA:"\\u03B9\\u0308",\\u0390:"\\u03B9\\u0308\\u0301",\\u1FD2:"\\u03B9\\u0308\\u0300",\\u1FD1:"\\u03B9\\u0304",\\u1FD0:"\\u03B9\\u0306",\\u03CC:"\\u03BF\\u0301",\\u1F78:"\\u03BF\\u0300",\\u03CD:"\\u03C5\\u0301",\\u1F7A:"\\u03C5\\u0300",\\u03CB:"\\u03C5\\u0308",\\u03B0:"\\u03C5\\u0308\\u0301",\\u1FE2:"\\u03C5\\u0308\\u0300",\\u1FE1:"\\u03C5\\u0304",\\u1FE0:"\\u03C5\\u0306",\\u03CE:"\\u03C9\\u0301",\\u1F7C:"\\u03C9\\u0300",\\u038E:"\\u03A5\\u0301",\\u1FEA:"\\u03A5\\u0300",\\u03AB:"\\u03A5\\u0308",\\u1FE9:"\\u03A5\\u0304",\\u1FE8:"\\u03A5\\u0306",\\u038F:"\\u03A9\\u0301",\\u1FFA:"\\u03A9\\u0300"},vb=class t{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new lS(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new nt("Expected \'"+e+"\', got \'"+this.fetch().text+"\'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\\\color","\\\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new co("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(t.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&Zu[i.text]&&Zu[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i<e.length;i++)if(e[i].type==="infix"){if(r!==-1)throw new nt("only one infix operator per group",e[i].token);r=i,n=e[i].replaceWith}if(r!==-1&&n){var a,s,o=e.slice(0,r),l=e.slice(r+1);o.length===1&&o[0].type==="ordgroup"?a=o[0]:a={type:"ordgroup",mode:this.mode,body:o},l.length===1&&l[0].type==="ordgroup"?s=l[0]:s={type:"ordgroup",mode:this.mode,body:l};var u;return n==="\\\\\\\\abovefrac"?u=this.callFunction(n,[a,e[r],s],[]):u=this.callFunction(n,[a,s],[]),[u]}else return e}handleSupSubscript(e){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var i=this.parseGroup(e);if(!i)throw new nt("Expected group after \'"+n+"\'",r);return i}formatUnsupportedCmd(e){for(var r=[],n=0;n<e.length;n++)r.push({type:"textord",mode:"text",text:e[n]});var i={type:"text",mode:this.mode,body:r},a={type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]};return a}parseAtom(e){var r=this.parseGroup("atom",e);if(this.mode==="text")return r;for(var n,i;;){this.consumeSpaces();var a=this.fetch();if(a.text==="\\\\limits"||a.text==="\\\\nolimits"){if(r&&r.type==="op"){var s=a.text==="\\\\limits";r.limits=s,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=a.text==="\\\\limits");else throw new nt("Limit controls must follow a math operator",a);this.consume()}else if(a.text==="^"){if(n)throw new nt("Double superscript",a);n=this.handleSupSubscript("superscript")}else if(a.text==="_"){if(i)throw new nt("Double subscript",a);i=this.handleSupSubscript("subscript")}else if(a.text==="\'"){if(n)throw new nt("Double superscript",a);var o={type:"textord",mode:this.mode,text:"\\\\prime"},l=[o];for(this.consume();this.fetch().text==="\'";)l.push(o),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:l}}else if(ob[a.text]){var u=vB.test(a.text),h=[];for(h.push(new co(ob[a.text])),this.consume();;){var f=this.fetch().text;if(!ob[f]||vB.test(f)!==u)break;h.unshift(new co(ob[f])),this.consume()}var d=this.subparse(h);u?i={type:"ordgroup",mode:"math",body:d}:n={type:"ordgroup",mode:"math",body:d}}else break}return n||i?{type:"supsub",mode:this.mode,base:r,sup:n,sub:i}:r}parseFunction(e,r){var n=this.fetch(),i=n.text,a=Zu[i];if(!a)return null;if(this.consume(),r&&r!=="atom"&&!a.allowedInArgument)throw new nt("Got function \'"+i+"\' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!a.allowedInText)throw new nt("Can\'t use function \'"+i+"\' in text mode",n);if(this.mode==="math"&&a.allowedInMath===!1)throw new nt("Can\'t use function \'"+i+"\' in math mode",n);var{args:s,optArgs:o}=this.parseArguments(i,a);return this.callFunction(i,s,o,n,e)}callFunction(e,r,n,i,a){var s={funcName:e,parser:this,token:i,breakOnTokenText:a},o=Zu[e];if(o&&o.handler)return o.handler(s,r,n);throw new nt("No function handler for "+e)}parseArguments(e,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var i=[],a=[],s=0;s<n;s++){var o=r.argTypes&&r.argTypes[s],l=s<r.numOptionalArgs;(r.primitive&&o==null||r.type==="sqrt"&&s===1&&a[0]==null)&&(o="primitive");var u=this.parseGroupOfType("argument to \'"+e+"\'",o,l);if(l)a.push(u);else if(u!=null)i.push(u);else throw new nt("Null argument, please report this as a bug")}return{args:i,optArgs:a}}parseGroupOfType(e,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var i=this.parseArgumentGroup(n,"text");return i!=null?{type:"styling",mode:i.mode,body:[i],style:"text"}:null}case"raw":{var a=this.parseStringGroup("raw",n);return a!=null?{type:"raw",mode:"text",string:a.text}:null}case"primitive":{if(n)throw new nt("A primitive argument cannot be optional");var s=this.parseGroup(e);if(s==null)throw new nt("Expected group as "+e,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new nt("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var i="",a;(a=this.fetch()).text!=="EOF";)i+=a.text,this.consume();return this.consume(),n.text=i,n}parseRegexGroup(e,r){for(var n=this.fetch(),i=n,a="",s;(s=this.fetch()).text!=="EOF"&&e.test(a+s.text);)i=s,a+=i.text,this.consume();if(a==="")throw new nt("Invalid "+r+": \'"+n.text+"\'",n);return n.range(i,a)}parseColorGroup(e){var r=this.parseStringGroup("color",e);if(r==null)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new nt("Invalid color: \'"+r.text+"\'",r);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(e){var r,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\\d+|\\d+\\.\\d*|\\.\\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",e),!r)return null;!e&&r.text.length===0&&(r.text="0pt",n=!0);var i=/([-+]?) *(\\d+(?:\\.\\d*)?|\\.\\d+) *([a-z]{2})/.exec(r.text);if(!i)throw new nt("Invalid size: \'"+r.text+"\'",r);var a={number:+(i[1]+i[2]),unit:i[3]};if(!wB(a))throw new nt("Invalid unit: \'"+a.unit+"\'",r);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,r){var n=this.gullet.scanArgument(e);if(n==null)return null;var i=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return r&&this.switchMode(i),s}parseGroup(e,r){var n=this.fetch(),i=n.text,a;if(i==="{"||i==="\\\\begingroup"){this.consume();var s=i==="{"?"}":"\\\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,s),l=this.fetch();this.expect(s),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:Ms.range(n,l),body:o,semisimple:i==="\\\\begingroup"||void 0}}else if(a=this.parseFunction(r,e)||this.parseSymbol(),a==null&&i[0]==="\\\\"&&!hF.hasOwnProperty(i)){if(this.settings.throwOnError)throw new nt("Undefined control sequence: "+i,n);a=this.formatUnsupportedCmd(i),this.consume()}return a}formLigatures(e){for(var r=e.length-1,n=0;n<r;++n){var i=e[n],a=i.text;a==="-"&&e[n+1].text==="-"&&(n+1<r&&e[n+2].text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:Ms.range(i,e[n+2]),text:"---"}),r-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Ms.range(i,e[n+1]),text:"--"}),r-=1)),(a==="\'"||a==="`")&&e[n+1].text===a&&(e.splice(n,2,{type:"textord",mode:"text",loc:Ms.range(i,e[n+1]),text:a+a}),r-=1)}}parseSymbol(){var e=this.fetch(),r=e.text;if(/^\\\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),i=n.charAt(0)==="*";if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new nt(`\\\\verb assertion failed --\n please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:i}}yB.hasOwnProperty(r[0])&&!yn[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",\'Accented Unicode text character "\'+r[0]+\'" used in math mode\',e),r=yB[r[0]]+r.slice(1));var a=yye.exec(r);a&&(r=r.substring(0,a.index),r==="i"?r="\\u0131":r==="j"&&(r="\\u0237"));var s;if(yn[this.mode][r]){this.settings.strict&&this.mode==="math"&&eS.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",\'Latin-1/Unicode text character "\'+r[0]+\'" used in math mode\',e);var o=yn[this.mode][r].group,l=Ms.range(e),u;if(hve.hasOwnProperty(o)){var h=o;u={type:"atom",mode:this.mode,family:h,loc:l,text:r}}else u={type:o,mode:this.mode,loc:l,text:r};s=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(bB(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",\'Unicode text character "\'+r[0]+\'" used in math mode\',e):this.settings.reportNonstrict("unknownSymbol",\'Unrecognized Unicode character "\'+r[0]+\'"\'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Ms.range(e),text:r};else return null;if(this.consume(),a)for(var f=0;f<a[0].length;f++){var d=a[0][f];if(!KE[d])throw new nt("Unknown accent \' "+d+"\'",e);var p=KE[d][this.mode]||KE[d].text;if(!p)throw new nt("Accent "+d+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:Ms.range(e),label:p,isStretchy:!1,isShifty:!0,base:s}}return s}};vb.endOfExpression=["}","\\\\endgroup","\\\\end","\\\\right","&"];SS=function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new vb(e,r);delete n.gullet.macros.current["\\\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\\\current@color"],delete n.gullet.macros.current["\\\\color"],n.gullet.macros.get("\\\\df@tag")){if(!r.displayMode)throw new nt("\\\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new co("\\\\df@tag")])}]}return i},fF=function(e,r,n){r.textContent="";var i=CS(e,n).toNode();r.appendChild(i)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn\'t work in quirks mode. Make sure your website has a suitable doctype."),fF=function(){throw new nt("KaTeX doesn\'t work in quirks mode.")});wye=function(e,r){var n=CS(e,r).toMarkup();return n},kye=function(e,r){var n=new g1(r);return SS(e,n)},dF=function(e,r,n){if(n.throwOnError||!(e instanceof nt))throw e;var i=De.makeSpan(["katex-error"],[new ts(r)]);return i.setAttribute("title",e.toString()),i.setAttribute("style","color:"+n.errorColor),i},CS=function(e,r){var n=new g1(r);try{var i=SS(e,n);return Mve(i,e,n)}catch(a){return dF(a,e,n)}},Tye=function(e,r){var n=new g1(r);try{var i=SS(e,n);return Dve(i,e,n)}catch(a){return dF(a,e,n)}},Eye={version:"0.16.11",render:fF,renderToString:wye,ParseError:nt,SETTINGS_SCHEMA:lb,__parse:kye,__renderToDomTree:CS,__renderToHTMLTree:Tye,__setFontMetrics:ave,__defineSymbol:G,__defineFunction:xt,__defineMacro:le,__domTree:{Span:Sf,Anchor:v1,SymbolNode:ts,SvgNode:Zo,PathNode:$l,LineNode:y1}}});function MF(){let t="data-temp-href-target";ju.addHook("beforeSanitizeAttributes",e=>{e instanceof Element&&e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),ju.addHook("afterSanitizeAttributes",e=>{e instanceof Element&&e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}var wF,bF,v,RS,Yc,re,Cb,ho,NS,$0,Sye,IS,Af,T1,MS,kF,TF,AS,Wn,Ab,_b,Pa,Cye,Aye,_ye,Lye,Rye,E1,Nye,Iye,Mye,Dye,Wl,th,EF,SF,Oye,sr,k1,Pye,_f,ns,CF,z0,w1,Lb,AF,_F,LF,DS,OS,Or,RF,NF,S1,Bye,mF,Fye,IF,Lf,zye,$ye,DF,vF,yr,Gye,Uye,Vye,Wye,OF,Hye,Vr,qye,Yye,Xc,_S,Xye,jye,yF,LS,ki,G0,rh,je,Kye,Zye,Wr,Qo,Eb,Qye,Jye,PF,Rb,PS,BS,FS,zS,xr,Tr,Ar,_r,Lr,en,Hr,xF,e2e,pe,$S,Nb,GS,US,t2e,Sb,C1,Ib,r2e,or=F(()=>{wF=ga(Ux(),1);so();so();so();so();so();so();FE();bF=Object.defineProperty,v=(t,e)=>bF(t,"name",{value:e,configurable:!0}),RS=(t,e)=>{for(var r in e)bF(t,r,{get:e[r],enumerable:!0})},Yc={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},re={trace:v((...t)=>{},"trace"),debug:v((...t)=>{},"debug"),info:v((...t)=>{},"info"),warn:v((...t)=>{},"warn"),error:v((...t)=>{},"error"),fatal:v((...t)=>{},"fatal")},Cb=v(function(t="fatal"){let e=Yc.fatal;typeof t=="string"?t.toLowerCase()in Yc&&(e=Yc[t]):typeof t=="number"&&(e=t),re.trace=()=>{},re.debug=()=>{},re.info=()=>{},re.warn=()=>{},re.error=()=>{},re.fatal=()=>{},e<=Yc.fatal&&(re.fatal=console.error?console.error.bind(console,ho("FATAL"),"color: orange"):console.log.bind(console,"\\x1B[35m",ho("FATAL"))),e<=Yc.error&&(re.error=console.error?console.error.bind(console,ho("ERROR"),"color: orange"):console.log.bind(console,"\\x1B[31m",ho("ERROR"))),e<=Yc.warn&&(re.warn=console.warn?console.warn.bind(console,ho("WARN"),"color: orange"):console.log.bind(console,"\\x1B[33m",ho("WARN"))),e<=Yc.info&&(re.info=console.info?console.info.bind(console,ho("INFO"),"color: lightblue"):console.log.bind(console,"\\x1B[34m",ho("INFO"))),e<=Yc.debug&&(re.debug=console.debug?console.debug.bind(console,ho("DEBUG"),"color: lightgreen"):console.log.bind(console,"\\x1B[32m",ho("DEBUG"))),e<=Yc.trace&&(re.trace=console.debug?console.debug.bind(console,ho("TRACE"),"color: lightgreen"):console.log.bind(console,"\\x1B[32m",ho("TRACE")))},"setLogLevel"),ho=v(t=>`%c${(0,wF.default)().format("ss.SSS")} : ${t} : `,"format"),NS=/^-{3}\\s*[\\n\\r](.*?)[\\n\\r]-{3}\\s*[\\n\\r]+/s,$0=/%{2}{\\s*(?:(\\w+)\\s*:|(\\w+))\\s*(?:(\\w+)|((?:(?!}%{2}).|\\r?\\n)*))?\\s*(?:}%{2})?/gi,Sye=/\\s*%%.*\\n/gm,IS=class extends Error{static{v(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},Af={},T1=v(function(t,e){t=t.replace(NS,"").replace($0,"").replace(Sye,`\n`);for(let[r,{detector:n}]of Object.entries(Af))if(n(t,e))return r;throw new IS(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),MS=v((...t)=>{for(let{id:e,detector:r,loader:n}of t)kF(e,r,n)},"registerLazyLoadedDiagrams"),kF=v((t,e,r)=>{Af[t]&&re.warn(`Detector with key ${t} already exists. Overwriting.`),Af[t]={detector:e,loader:r},re.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),TF=v(t=>Af[t].loader,"getDiagramLoader"),AS=v((t,e,{depth:r=2,clobber:n=!1}={})=>{let i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>AS(t,a,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=AS(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),Wn=AS,Ab="#ffffff",_b="#f2f2f2",Pa=v((t,e)=>e?Ne(t,{s:-40,l:10}):Ne(t,{s:-40,l:-10}),"mkBorder"),Cye=class{static{v(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily=\'"trebuchet ms", verdana, arial, sans-serif\',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ne(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ne(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Pa(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Pa(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Pa(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Pa(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ot(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ot(this.tertiaryColor),this.lineColor=this.lineColor||ot(this.background),this.arrowheadColor=this.arrowheadColor||ot(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||It(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ot(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Et(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ne(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ne(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ne(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ne(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ne(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ne(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ne(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ne(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ne(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=It(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=It(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ot(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||Et(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||It(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Ne(this.mainBkg,{h:180,s:-15,l:t*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Ne(this.mainBkg,{h:180,s:-15,l:t*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Ne(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Ne(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Ne(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Ne(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Ne(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Ne(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Ne(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ne(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Ne(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Ne(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ne(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ne(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ne(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Ne(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Ne(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ne(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ne(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ne(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ne(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ne(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ne(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?Et(this.quadrant1Fill):It(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Ne(this.primaryColor,{h:-30}),this.git4=this.git4||Ne(this.primaryColor,{h:-60}),this.git5=this.git5||Ne(this.primaryColor,{h:-90}),this.git6=this.git6||Ne(this.primaryColor,{h:60}),this.git7=this.git7||Ne(this.primaryColor,{h:120}),this.darkMode?(this.git0=Et(this.git0,25),this.git1=Et(this.git1,25),this.git2=Et(this.git2,25),this.git3=Et(this.git3,25),this.git4=Et(this.git4,25),this.git5=Et(this.git5,25),this.git6=Et(this.git6,25),this.git7=Et(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||ot(this.git0),this.gitInv1=this.gitInv1||ot(this.git1),this.gitInv2=this.gitInv2||ot(this.git2),this.gitInv3=this.gitInv3||ot(this.git3),this.gitInv4=this.gitInv4||ot(this.git4),this.gitInv5=this.gitInv5||ot(this.git5),this.gitInv6=this.gitInv6||ot(this.git6),this.gitInv7=this.gitInv7||ot(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ab,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_b}calculate(t){if(typeof t!="object"){this.updateColors();return}let e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},Aye=v(t=>{let e=new Cye;return e.calculate(t),e},"getThemeVariables"),_ye=class{static{v(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Et(this.primaryColor,16),this.tertiaryColor=Ne(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.background),this.secondaryBorderColor=Pa(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Pa(this.tertiaryColor,this.darkMode),this.primaryTextColor=ot(this.primaryColor),this.secondaryTextColor=ot(this.secondaryColor),this.tertiaryTextColor=ot(this.tertiaryColor),this.lineColor=ot(this.background),this.textColor=ot(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Et(ot("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ns(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily=\'"trebuchet ms", verdana, arial, sans-serif\',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=It("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=It(this.sectionBkgColor,10),this.taskBorderColor=Ns(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ns(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=Et(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Et(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Et(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Ne(this.primaryColor,{h:64}),this.fillType3=Ne(this.secondaryColor,{h:64}),this.fillType4=Ne(this.primaryColor,{h:-64}),this.fillType5=Ne(this.secondaryColor,{h:-64}),this.fillType6=Ne(this.primaryColor,{h:128}),this.fillType7=Ne(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ne(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ne(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ne(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ne(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ne(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ne(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ne(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ne(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ne(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||ot(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||Et(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ne(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ne(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ne(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ne(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ne(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ne(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ne(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ne(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?Et(this.quadrant1Fill):It(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?It(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Et(this.secondaryColor,20),this.git1=Et(this.pie2||this.secondaryColor,20),this.git2=Et(this.pie3||this.tertiaryColor,20),this.git3=Et(this.pie4||Ne(this.primaryColor,{h:-30}),20),this.git4=Et(this.pie5||Ne(this.primaryColor,{h:-60}),20),this.git5=Et(this.pie6||Ne(this.primaryColor,{h:-90}),10),this.git6=Et(this.pie7||Ne(this.primaryColor,{h:60}),10),this.git7=Et(this.pie8||Ne(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ot(this.git0),this.gitInv1=this.gitInv1||ot(this.git1),this.gitInv2=this.gitInv2||ot(this.git2),this.gitInv3=this.gitInv3||ot(this.git3),this.gitInv4=this.gitInv4||ot(this.git4),this.gitInv5=this.gitInv5||ot(this.git5),this.gitInv6=this.gitInv6||ot(this.git6),this.gitInv7=this.gitInv7||ot(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ot(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ot(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Et(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Et(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}let e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},Lye=v(t=>{let e=new _ye;return e.calculate(t),e},"getThemeVariables"),Rye=class{static{v(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Ne(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Ne(this.primaryColor,{h:-160}),this.primaryBorderColor=Pa(this.primaryColor,this.darkMode),this.secondaryBorderColor=Pa(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Pa(this.tertiaryColor,this.darkMode),this.primaryTextColor=ot(this.primaryColor),this.secondaryTextColor=ot(this.secondaryColor),this.tertiaryTextColor=ot(this.tertiaryColor),this.lineColor=ot(this.background),this.textColor=ot(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily=\'"trebuchet ms", verdana, arial, sans-serif\',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Ns(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ne(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ne(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ne(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ne(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ne(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ne(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ne(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ne(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ne(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||It(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||It(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Ne(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ne(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ne(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||ot(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ot(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Et(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Ne(this.primaryColor,{h:64}),this.fillType3=Ne(this.secondaryColor,{h:64}),this.fillType4=Ne(this.primaryColor,{h:-64}),this.fillType5=Ne(this.secondaryColor,{h:-64}),this.fillType6=Ne(this.primaryColor,{h:128}),this.fillType7=Ne(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Ne(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Ne(this.primaryColor,{l:-10}),this.pie5=this.pie5||Ne(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ne(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Ne(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Ne(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Ne(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Ne(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Ne(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Ne(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ne(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ne(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ne(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ne(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ne(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ne(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?Et(this.quadrant1Fill):It(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Ne(this.primaryColor,{h:-30}),this.git4=this.git4||Ne(this.primaryColor,{h:-60}),this.git5=this.git5||Ne(this.primaryColor,{h:-90}),this.git6=this.git6||Ne(this.primaryColor,{h:60}),this.git7=this.git7||Ne(this.primaryColor,{h:120}),this.darkMode?(this.git0=Et(this.git0,25),this.git1=Et(this.git1,25),this.git2=Et(this.git2,25),this.git3=Et(this.git3,25),this.git4=Et(this.git4,25),this.git5=Et(this.git5,25),this.git6=Et(this.git6,25),this.git7=Et(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||It(ot(this.git0),25),this.gitInv1=this.gitInv1||ot(this.git1),this.gitInv2=this.gitInv2||ot(this.git2),this.gitInv3=this.gitInv3||ot(this.git3),this.gitInv4=this.gitInv4||ot(this.git4),this.gitInv5=this.gitInv5||ot(this.git5),this.gitInv6=this.gitInv6||ot(this.git6),this.gitInv7=this.gitInv7||ot(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ot(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ot(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ab,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_b}calculate(t){if(typeof t!="object"){this.updateColors();return}let e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},E1=v(t=>{let e=new Rye;return e.calculate(t),e},"getThemeVariables"),Nye=class{static{v(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily=\'"trebuchet ms", verdana, arial, sans-serif\',this.fontSize="16px",this.tertiaryColor=Et("#cde498",10),this.primaryBorderColor=Pa(this.primaryColor,this.darkMode),this.secondaryBorderColor=Pa(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Pa(this.tertiaryColor,this.darkMode),this.primaryTextColor=ot(this.primaryColor),this.secondaryTextColor=ot(this.secondaryColor),this.tertiaryTextColor=ot(this.primaryColor),this.lineColor=ot(this.background),this.textColor=ot(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=It(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ne(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ne(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ne(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ne(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ne(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ne(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ne(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ne(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ne(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||It(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||It(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=It(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||Ne(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ne(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ne(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Ne(this.primaryColor,{h:64}),this.fillType3=Ne(this.secondaryColor,{h:64}),this.fillType4=Ne(this.primaryColor,{h:-64}),this.fillType5=Ne(this.secondaryColor,{h:-64}),this.fillType6=Ne(this.primaryColor,{h:128}),this.fillType7=Ne(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Ne(this.primaryColor,{l:-30}),this.pie5=this.pie5||Ne(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Ne(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Ne(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Ne(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Ne(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Ne(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Ne(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Ne(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ne(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ne(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ne(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ne(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ne(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ne(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?Et(this.quadrant1Fill):It(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Ne(this.primaryColor,{h:-30}),this.git4=this.git4||Ne(this.primaryColor,{h:-60}),this.git5=this.git5||Ne(this.primaryColor,{h:-90}),this.git6=this.git6||Ne(this.primaryColor,{h:60}),this.git7=this.git7||Ne(this.primaryColor,{h:120}),this.darkMode?(this.git0=Et(this.git0,25),this.git1=Et(this.git1,25),this.git2=Et(this.git2,25),this.git3=Et(this.git3,25),this.git4=Et(this.git4,25),this.git5=Et(this.git5,25),this.git6=Et(this.git6,25),this.git7=Et(this.git7,25)):(this.git0=It(this.git0,25),this.git1=It(this.git1,25),this.git2=It(this.git2,25),this.git3=It(this.git3,25),this.git4=It(this.git4,25),this.git5=It(this.git5,25),this.git6=It(this.git6,25),this.git7=It(this.git7,25)),this.gitInv0=this.gitInv0||ot(this.git0),this.gitInv1=this.gitInv1||ot(this.git1),this.gitInv2=this.gitInv2||ot(this.git2),this.gitInv3=this.gitInv3||ot(this.git3),this.gitInv4=this.gitInv4||ot(this.git4),this.gitInv5=this.gitInv5||ot(this.git5),this.gitInv6=this.gitInv6||ot(this.git6),this.gitInv7=this.gitInv7||ot(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ot(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ot(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ab,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_b}calculate(t){if(typeof t!="object"){this.updateColors();return}let e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},Iye=v(t=>{let e=new Nye;return e.calculate(t),e},"getThemeVariables"),Mye=class{static{v(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Et(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Ne(this.primaryColor,{h:-160}),this.primaryBorderColor=Pa(this.primaryColor,this.darkMode),this.secondaryBorderColor=Pa(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Pa(this.tertiaryColor,this.darkMode),this.primaryTextColor=ot(this.primaryColor),this.secondaryTextColor=ot(this.secondaryColor),this.tertiaryTextColor=ot(this.tertiaryColor),this.lineColor=ot(this.background),this.textColor=ot(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily=\'"trebuchet ms", verdana, arial, sans-serif\',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=Et(this.contrast,55),this.border2=this.contrast,this.actorBorder=Et(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||ot(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||Et(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||It(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||Ne(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||Ne(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=Et(this.contrast,30),this.sectionBkgColor2=Et(this.contrast,30),this.taskBorderColor=It(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Et(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=It(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Ne(this.primaryColor,{h:64}),this.fillType3=Ne(this.secondaryColor,{h:64}),this.fillType4=Ne(this.primaryColor,{h:-64}),this.fillType5=Ne(this.secondaryColor,{h:-64}),this.fillType6=Ne(this.primaryColor,{h:128}),this.fillType7=Ne(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Ne(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Ne(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Ne(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Ne(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Ne(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Ne(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?Et(this.quadrant1Fill):It(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=It(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Ne(this.primaryColor,{h:-30}),this.git4=this.pie5||Ne(this.primaryColor,{h:-60}),this.git5=this.pie6||Ne(this.primaryColor,{h:-90}),this.git6=this.pie7||Ne(this.primaryColor,{h:60}),this.git7=this.pie8||Ne(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ot(this.git0),this.gitInv1=this.gitInv1||ot(this.git1),this.gitInv2=this.gitInv2||ot(this.git2),this.gitInv3=this.gitInv3||ot(this.git3),this.gitInv4=this.gitInv4||ot(this.git4),this.gitInv5=this.gitInv5||ot(this.git5),this.gitInv6=this.gitInv6||ot(this.git6),this.gitInv7=this.gitInv7||ot(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ab,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_b}calculate(t){if(typeof t!="object"){this.updateColors();return}let e=Object.keys(t);e.forEach(r=>{this[r]=t[r]}),this.updateColors(),e.forEach(r=>{this[r]=t[r]})}},Dye=v(t=>{let e=new Mye;return e.calculate(t),e},"getThemeVariables"),Wl={base:{getThemeVariables:Aye},dark:{getThemeVariables:Lye},default:{getThemeVariables:E1},forest:{getThemeVariables:Iye},neutral:{getThemeVariables:Dye}},th={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:\'"Open Sans", sans-serif\',actorFontWeight:400,noteFontSize:14,noteFontFamily:\'"trebuchet ms", verdana, arial, sans-serif\',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:\'"trebuchet ms", verdana, arial, sans-serif\',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:\'"Open Sans", sans-serif\',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:\'"Open Sans", sans-serif\',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:\'"Open Sans", sans-serif\',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:\'"Open Sans", sans-serif\',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:\'"Open Sans", sans-serif\',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:\'"Open Sans", sans-serif\',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:\'"Open Sans", sans-serif\',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:\'"Open Sans", sans-serif\',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:\'"Open Sans", sans-serif\',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:\'"Open Sans", sans-serif\',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:\'"Open Sans", sans-serif\',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:\'"Open Sans", sans-serif\',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:\'"Open Sans", sans-serif\',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:\'"Open Sans", sans-serif\',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:\'"Open Sans", sans-serif\',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:\'"Open Sans", sans-serif\',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:\'"Open Sans", sans-serif\',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:\'"Open Sans", sans-serif\',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:\'"Open Sans", sans-serif\',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:\'"Open Sans", sans-serif\',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:\'"Open Sans", sans-serif\',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:\'"Open Sans", sans-serif\',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:\'"Open Sans", sans-serif\',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:\'"Open Sans", sans-serif\',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:\'"trebuchet ms", verdana, arial, sans-serif;\',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},EF={...th,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Wl.default.getThemeVariables(),sequence:{...th.sequence,messageFont:v(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:v(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:v(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...th.gantt,tickInterval:void 0,useWidth:void 0},c4:{...th.c4,useWidth:void 0,personFont:v(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:v(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:v(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:v(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:v(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:v(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:v(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:v(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:v(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:v(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:v(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:v(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:v(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:v(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:v(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:v(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:v(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:v(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:v(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:v(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:v(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:v(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...th.pie,useWidth:984},xyChart:{...th.xyChart,useWidth:void 0},requirement:{...th.requirement,useWidth:void 0},packet:{...th.packet}},SF=v((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...SF(t[n],"")]:[...r,e+n],[]),"keyify"),Oye=new Set(SF(EF,"")),sr=EF,k1=v(t=>{if(re.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>k1(e));return}for(let e of Object.keys(t)){if(re.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Oye.has(e)||t[e]==null){re.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){re.debug("sanitizing object",e),k1(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)e.includes(n)&&(re.debug("sanitizing css option",e),t[e]=Pye(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}re.debug("After sanitization",t)}},"sanitizeDirective"),Pye=v(t=>{let e=0,r=0;for(let n of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),_f=Object.freeze(sr),ns=Wn({},_f),z0=[],w1=Wn({},_f),Lb=v((t,e)=>{let r=Wn({},t),n={};for(let i of e)RF(i),n=Wn(n,i);if(r=Wn(r,n),n.theme&&n.theme in Wl){let i=Wn({},CF),a=Wn(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in Wl&&(r.themeVariables=Wl[r.theme].getThemeVariables(a))}return w1=r,IF(w1),w1},"updateCurrentConfig"),AF=v(t=>(ns=Wn({},_f),ns=Wn(ns,t),t.theme&&Wl[t.theme]&&(ns.themeVariables=Wl[t.theme].getThemeVariables(t.themeVariables)),Lb(ns,z0),ns),"setSiteConfig"),_F=v(t=>{CF=Wn({},t)},"saveConfigFromInitialize"),LF=v(t=>(ns=Wn(ns,t),Lb(ns,z0),ns),"updateSiteConfig"),DS=v(()=>Wn({},ns),"getSiteConfig"),OS=v(t=>(IF(t),Wn(w1,t),Or()),"setConfig"),Or=v(()=>Wn({},w1),"getConfig"),RF=v(t=>{t&&(["secure",...ns.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(re.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&RF(t[e])}))},"sanitize"),NF=v(t=>{k1(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),z0.push(t),Lb(ns,z0)},"addDirective"),S1=v((t=ns)=>{z0=[],Lb(t,z0)},"reset"),Bye={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},mF={},Fye=v(t=>{mF[t]||(re.warn(Bye[t]),mF[t]=!0)},"issueWarning"),IF=v(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Fye("LAZY_LOAD_DEPRECATED")},"checkConfig"),Lf=/<br\\s*\\/?>/gi,zye=v(t=>t?OF(t).replace(/\\\\n/g,"#br#").split("#br#"):[""],"getRows"),$ye=(()=>{let t=!1;return()=>{t||(MF(),t=!0)}})();v(MF,"setupDompurifyHooks");DF=v(t=>($ye(),ju.sanitize(t)),"removeScript"),vF=v((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=DF(t):r!=="loose"&&(t=OF(t),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(/=/g,"="),t=Wye(t))}return t},"sanitizeMore"),yr=v((t,e)=>t&&(e.dompurifyConfig?t=ju.sanitize(vF(t,e),e.dompurifyConfig).toString():t=ju.sanitize(vF(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),Gye=v((t,e)=>typeof t=="string"?yr(t,e):t.flat().map(r=>yr(r,e)),"sanitizeTextOrArray"),Uye=v(t=>Lf.test(t),"hasBreaks"),Vye=v(t=>t.split(Lf),"splitBreaks"),Wye=v(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),OF=v(t=>t.replace(Lf,"#br#"),"breakToPlaceholder"),Hye=v(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\\(/g,"\\\\("),e=e.replaceAll(/\\)/g,"\\\\)")),e},"getUrl"),Vr=v(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),qye=v(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),Yye=v(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),Xc=v(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let i=e[n];if(i===","&&n>0&&n+1<e.length){let a=e[n-1],s=e[n+1];Xye(a,s)&&(i=a+","+s,n++,r.pop())}r.push(jye(i))}return r.join("")},"parseGenericTypes"),_S=v((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Xye=v((t,e)=>{let r=_S(t,"~"),n=_S(e,"~");return r===1&&n===1},"shouldCombineSets"),jye=v(t=>{let e=_S(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),yF=v(()=>window.MathMLElement!==void 0,"isMathMLSupported"),LS=/\\$\\$(.*)\\$\\$/g,ki=v(t=>(t.match(LS)?.length??0)>0,"hasKatex"),G0=v(async(t,e)=>{t=await rh(t,e);let r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),rh=v(async(t,e)=>{if(!ki(t))return t;if(!(yF()||e.legacyMathML||e.forceLegacyMathML))return t.replace(LS,"MathML is unsupported in this environment.");let{default:r}=await Promise.resolve().then(()=>(gF(),pF)),n=e.forceLegacyMathML||!yF()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Lf).map(i=>ki(i)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${i}</div>`:`<div>${i}</div>`).join("").replace(LS,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\\n/g," ").replace(/<annotation.*<\\/annotation>/g,""))},"renderKatex"),je={getRows:zye,sanitizeText:yr,sanitizeTextOrArray:Gye,hasBreaks:Uye,splitBreaks:Vye,lineBreakRegex:Lf,removeScript:DF,getUrl:Hye,evaluate:Vr,getMax:qye,getMin:Yye},Kye=v(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),Zye=v(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),Wr=v(function(t,e,r,n){let i=Zye(e,r,n);Kye(t,i)},"configureSvgSize"),Qo=v(function(t,e,r,n){let i=e.node().getBBox(),a=i.width,s=i.height;re.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;re.info(`Graph bounds: ${o}x${l}`,t),o=a+r*2,l=s+r*2,re.info(`Calculated bounds: ${o}x${l}`),Wr(e,l,o,n);let u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",u)},"setupGraphViewbox"),Eb={},Qye=v((t,e,r)=>{let n="";return t in Eb&&Eb[t]?n=Eb[t](r):re.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${n}\n\n ${e}\n`},"getStyles"),Jye=v((t,e)=>{e!==void 0&&(Eb[t]=e)},"addStylesForDiagram"),PF=Qye,Rb={};RS(Rb,{clear:()=>xr,getAccDescription:()=>Lr,getAccTitle:()=>Ar,getDiagramTitle:()=>Hr,setAccDescription:()=>_r,setAccTitle:()=>Tr,setDiagramTitle:()=>en});PS="",BS="",FS="",zS=v(t=>yr(t,Or()),"sanitizeText"),xr=v(()=>{PS="",FS="",BS=""},"clear"),Tr=v(t=>{PS=zS(t).replace(/^\\s+/g,"")},"setAccTitle"),Ar=v(()=>PS,"getAccTitle"),_r=v(t=>{FS=zS(t).replace(/\\n\\s+/g,`\n`)},"setAccDescription"),Lr=v(()=>FS,"getAccDescription"),en=v(t=>{BS=zS(t)},"setDiagramTitle"),Hr=v(()=>BS,"getDiagramTitle"),xF=re,e2e=Cb,pe=Or,$S=OS,Nb=_f,GS=v(t=>yr(t,pe()),"sanitizeText"),US=Qo,t2e=v(()=>Rb,"getCommonDb"),Sb={},C1=v((t,e,r)=>{Sb[t]&&xF.warn(`Diagram with id ${t} already registered. Overwriting.`),Sb[t]=e,r&&kF(t,r),Jye(t,e.styles),e.injectUtils?.(xF,e2e,pe,GS,US,t2e(),()=>{})},"registerDiagram"),Ib=v(t=>{if(t in Sb)return Sb[t];throw new r2e(t)},"getDiagram"),r2e=class extends Error{static{v(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}});function aC(t){return typeof t>"u"||t===null}function zF(t){return typeof t=="object"&&t!==null}function $F(t){return Array.isArray(t)?t:aC(t)?[]:[t]}function GF(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;r<n;r+=1)i=a[r],t[i]=e[i];return t}function UF(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r}function VF(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}function sC(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+=\'in "\'+t.mark.name+\'" \'),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`\n\n`+t.mark.snippet),n+" "+r):n}function W0(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=sC(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}function Mb(t,e,r,n,i){var a="",s="",o=Math.floor(i/2)-1;return n-e>o&&(a=" ... ",e=n-o+a.length),r-n>o&&(s=" ...",r=n+o-s.length),{str:a+t.slice(e,r).replace(/\\t/g,"\\u2192")+s,pos:n-e+a.length}}function Db(t,e){return Ti.repeat(" ",e-t.length)+t}function WF(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\\r?\\n|\\r|\\0/g,n=[0],i=[],a,s=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var o="",l,u,h=Math.min(t.line+e.linesAfter,i.length).toString().length,f=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(s-l<0);l++)u=Mb(t.buffer,n[s-l],i[s-l],t.position-(n[s]-n[s-l]),f),o=Ti.repeat(" ",e.indent)+Db((t.line-l+1).toString(),h)+" | "+u.str+`\n`+o;for(u=Mb(t.buffer,n[s],i[s],t.position,f),o+=Ti.repeat(" ",e.indent)+Db((t.line+1).toString(),h)+" | "+u.str+`\n`,o+=Ti.repeat("-",e.indent+h+3+u.pos)+`^\n`,l=1;l<=e.linesAfter&&!(s+l>=i.length);l++)u=Mb(t.buffer,n[s+l],i[s+l],t.position-(n[s]-n[s+l]),f),o+=Ti.repeat(" ",e.indent)+Db((t.line+l+1).toString(),h)+" | "+u.str+`\n`;return o.replace(/\\n$/,"")}function HF(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function qF(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(u2e.indexOf(r)===-1)throw new is(\'Unknown option "\'+r+\'" is met in definition of "\'+t+\'" YAML type.\')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=HF(e.styleAliases||null),h2e.indexOf(this.kind)===-1)throw new is(\'Unknown kind "\'+this.kind+\'" is specified for "\'+t+\'" YAML type.\')}function WS(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=s)}),r[i]=n}),r}function YF(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(v(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}function Ob(t){return this.extend(t)}function XF(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function jF(){return null}function KF(t){return t===null}function ZF(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function QF(t){return t==="true"||t==="True"||t==="TRUE"}function JF(t){return Object.prototype.toString.call(t)==="[object Boolean]"}function ez(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function tz(t){return 48<=t&&t<=55}function rz(t){return 48<=t&&t<=57}function nz(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!ez(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!tz(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(!rz(t.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}function iz(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function az(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Ti.isNegativeZero(t)}function sz(t){return!(t===null||!b2e.test(t)||t[t.length-1]==="_")}function oz(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}function lz(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ti.isNegativeZero(t))return"-0.0";return r=t.toString(10),w2e.test(r)?r.replace("e",".e"):r}function cz(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Ti.isNegativeZero(t))}function dz(t){return t===null?!1:hz.exec(t)!==null||fz.exec(t)!==null}function pz(t){var e,r,n,i,a,s,o,l=0,u=null,h,f,d;if(e=hz.exec(t),e===null&&(e=fz.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],f=+(e[11]||0),u=(h*60+f)*6e4,e[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,i,a,s,o,l)),u&&d.setTime(d.getTime()-u),d}function gz(t){return t.toISOString()}function mz(t){return t==="<<"||t===null}function vz(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=oC;for(r=0;r<i;r++)if(e=a.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}function yz(t){var e,r,n=t.replace(/[\\r\\n=]/g,""),i=n.length,a=oC,s=0,o=[];for(e=0;e<i;e++)e%4===0&&e&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}function xz(t){var e="",r=0,n,i,a=t.length,s=oC;for(n=0;n<a;n++)n%3===0&&n&&(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):i===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):i===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}function bz(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function wz(t){if(t===null)return!0;var e=[],r,n,i,a,s,o=t;for(r=0,n=o.length;r<n;r+=1){if(i=o[r],s=!1,_2e.call(i)!=="[object Object]")return!1;for(a in i)if(A2e.call(i,a))if(!s)s=!0;else return!1;if(!s)return!1;if(e.indexOf(a)===-1)e.push(a);else return!1}return!0}function kz(t){return t!==null?t:[]}function Tz(t){if(t===null)return!0;var e,r,n,i,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1){if(n=s[e],R2e.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;a[e]=[i[0],n[i[0]]]}return!0}function Ez(t){if(t===null)return[];var e,r,n,i,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1)n=s[e],i=Object.keys(n),a[e]=[i[0],n[i[0]]];return a}function Sz(t){if(t===null)return!0;var e,r=t;for(e in r)if(I2e.call(r,e)&&r[e]!==null)return!1;return!0}function Cz(t){return t!==null?t:{}}function HS(t){return Object.prototype.toString.call(t)}function Jo(t){return t===10||t===13}function nh(t){return t===9||t===32}function Ba(t){return t===9||t===32||t===10||t===13}function Nf(t){return t===44||t===91||t===93||t===123||t===125}function Iz(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function Mz(t){return t===120?2:t===117?4:t===85?8:0}function Dz(t){return 48<=t&&t<=57?t-48:-1}function qS(t){return t===48?"\\0":t===97?"\\x07":t===98?"\\b":t===116||t===9?" ":t===110?`\n`:t===118?"\\v":t===102?"\\f":t===114?"\\r":t===101?"\\x1B":t===32?" ":t===34?\'"\':t===47?"/":t===92?"\\\\":t===78?"\\x85":t===95?"\\xA0":t===76?"\\u2028":t===80?"\\u2029":""}function Oz(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function Fz(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Az,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function lC(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=c2e(r),new is(e,r)}function $t(t,e){throw lC(t,e)}function A1(t,e){t.onWarning&&t.onWarning.call(null,lC(t,e))}function jc(t,e,r,n){var i,a,s,o;if(e<r){if(o=t.input.slice(e,r),n)for(i=0,a=o.length;i<a;i+=1)s=o.charCodeAt(i),s===9||32<=s&&s<=1114111||$t(t,"expected valid JSON character");else O2e.test(o)&&$t(t,"the stream contains non-printable characters");t.result+=o}}function YS(t,e,r,n){var i,a,s,o;for(Ti.isObject(r)||$t(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),s=0,o=i.length;s<o;s+=1)a=i[s],ih.call(e,a)||(e[a]=r[a],n[a]=!0)}function If(t,e,r,n,i,a,s,o,l){var u,h;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),u=0,h=i.length;u<h;u+=1)Array.isArray(i[u])&&$t(t,"nested arrays are not supported inside keys"),typeof i=="object"&&HS(i[u])==="[object Object]"&&(i[u]="[object Object]");if(typeof i=="object"&&HS(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(u=0,h=a.length;u<h;u+=1)YS(t,e,a[u],r);else YS(t,e,a,r);else!t.json&&!ih.call(r,i)&&ih.call(e,i)&&(t.line=s||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,$t(t,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[i]=a,delete r[i];return e}function Gb(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):$t(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function si(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;nh(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(Jo(i))for(Gb(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&A1(t,"deficient indentation"),n}function N1(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Ba(r)))}function Ub(t,e){e===1?t.result+=" ":e>1&&(t.result+=Ti.repeat(`\n`,e-1))}function zz(t,e,r){var n,i,a,s,o,l,u,h,f=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),Ba(p)||Nf(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=t.input.charCodeAt(t.position+1),Ba(i)||r&&Nf(i)))return!1;for(t.kind="scalar",t.result="",a=s=t.position,o=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),Ba(i)||r&&Nf(i))break}else if(p===35){if(n=t.input.charCodeAt(t.position-1),Ba(n))break}else{if(t.position===t.lineStart&&N1(t)||r&&Nf(p))break;if(Jo(p))if(l=t.line,u=t.lineStart,h=t.lineIndent,si(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=l,t.lineStart=u,t.lineIndent=h;break}}o&&(jc(t,a,s,!1),Ub(t,t.line-l),a=s=t.position,o=!1),nh(p)||(s=t.position+1),p=t.input.charCodeAt(++t.position)}return jc(t,a,s,!1),t.result?!0:(t.kind=f,t.result=d,!1)}function $z(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(jc(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Jo(r)?(jc(t,n,i,!0),Ub(t,si(t,!1,e)),n=i=t.position):t.position===t.lineStart&&N1(t)?$t(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);$t(t,"unexpected end of the stream within a single quoted scalar")}function Gz(t,e){var r,n,i,a,s,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return jc(t,r,t.position,!0),t.position++,!0;if(o===92){if(jc(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Jo(o))si(t,!1,e);else if(o<256&&Pz[o])t.result+=Bz[o],t.position++;else if((s=Mz(o))>0){for(i=s,a=0;i>0;i--)o=t.input.charCodeAt(++t.position),(s=Iz(o))>=0?a=(a<<4)+s:$t(t,"expected hexadecimal character");t.result+=Oz(a),t.position++}else $t(t,"unknown escape sequence");r=n=t.position}else Jo(o)?(jc(t,r,n,!0),Ub(t,si(t,!1,e)),r=n=t.position):t.position===t.lineStart&&N1(t)?$t(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}$t(t,"unexpected end of the stream within a double quoted scalar")}function Uz(t,e){var r=!0,n,i,a,s=t.tag,o,l=t.anchor,u,h,f,d,p,g=Object.create(null),m,x,y,b;if(b=t.input.charCodeAt(t.position),b===91)h=93,p=!1,o=[];else if(b===123)h=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),b=t.input.charCodeAt(++t.position);b!==0;){if(si(t,!0,e),b=t.input.charCodeAt(t.position),b===h)return t.position++,t.tag=s,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;r?b===44&&$t(t,"expected the node content, but found \',\'"):$t(t,"missed comma between flow collection entries"),x=m=y=null,f=d=!1,b===63&&(u=t.input.charCodeAt(t.position+1),Ba(u)&&(f=d=!0,t.position++,si(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,Mf(t,e,Pb,!1,!0),x=t.tag,m=t.result,si(t,!0,e),b=t.input.charCodeAt(t.position),(d||t.line===n)&&b===58&&(f=!0,b=t.input.charCodeAt(++t.position),si(t,!0,e),Mf(t,e,Pb,!1,!0),y=t.result),p?If(t,o,g,x,m,y,n,i,a):f?o.push(If(t,null,g,x,m,y,n,i,a)):o.push(m),si(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}$t(t,"unexpected end of the stream within a flow collection")}function Vz(t,e){var r,n,i=VS,a=!1,s=!1,o=e,l=0,u=!1,h,f;if(f=t.input.charCodeAt(t.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)VS===i?i=f===43?BF:D2e:$t(t,"repeat of a chomping mode identifier");else if((h=Dz(f))>=0)h===0?$t(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?$t(t,"repeat of an indentation width identifier"):(o=e+h-1,s=!0);else break;if(nh(f)){do f=t.input.charCodeAt(++t.position);while(nh(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Jo(f)&&f!==0)}for(;f!==0;){for(Gb(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!s||t.lineIndent<o)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>o&&(o=t.lineIndent),Jo(f)){l++;continue}if(t.lineIndent<o){i===BF?t.result+=Ti.repeat(`\n`,a?1+l:l):i===VS&&a&&(t.result+=`\n`);break}for(n?nh(f)?(u=!0,t.result+=Ti.repeat(`\n`,a?1+l:l)):u?(u=!1,t.result+=Ti.repeat(`\n`,l+1)):l===0?a&&(t.result+=" "):t.result+=Ti.repeat(`\n`,l):t.result+=Ti.repeat(`\n`,a?1+l:l),a=!0,s=!0,l=0,r=t.position;!Jo(f)&&f!==0;)f=t.input.charCodeAt(++t.position);jc(t,r,t.position,!1)}return!0}function XS(t,e){var r,n=t.tag,i=t.anchor,a=[],s,o=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,$t(t,"tab characters must not be used in indentation")),!(l!==45||(s=t.input.charCodeAt(t.position+1),!Ba(s))));){if(o=!0,t.position++,si(t,!0,-1)&&t.lineIndent<=e){a.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Mf(t,e,Lz,!1,!0),a.push(t.result),si(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)$t(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=a,!0):!1}function Wz(t,e,r){var n,i,a,s,o,l,u=t.tag,h=t.anchor,f={},d=Object.create(null),p=null,g=null,m=null,x=!1,y=!1,b;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),b=t.input.charCodeAt(t.position);b!==0;){if(!x&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,$t(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),a=t.line,(b===63||b===58)&&Ba(n))b===63?(x&&(If(t,f,d,p,g,null,s,o,l),p=g=m=null),y=!0,x=!0,i=!0):x?(x=!1,i=!0):$t(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,b=n;else{if(s=t.line,o=t.lineStart,l=t.position,!Mf(t,r,_z,!1,!0))break;if(t.line===a){for(b=t.input.charCodeAt(t.position);nh(b);)b=t.input.charCodeAt(++t.position);if(b===58)b=t.input.charCodeAt(++t.position),Ba(b)||$t(t,"a whitespace character is expected after the key-value separator within a block mapping"),x&&(If(t,f,d,p,g,null,s,o,l),p=g=m=null),y=!0,x=!1,i=!1,p=t.tag,g=t.result;else if(y)$t(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=h,!0}else if(y)$t(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=h,!0}if((t.line===a||t.lineIndent>e)&&(x&&(s=t.line,o=t.lineStart,l=t.position),Mf(t,e,Bb,!0,i)&&(x?g=t.result:m=t.result),x||(If(t,f,d,p,g,m,s,o,l),p=g=m=null),si(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)$t(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return x&&If(t,f,d,p,g,null,s,o,l),y&&(t.tag=u,t.anchor=h,t.kind="mapping",t.result=f),y}function Hz(t){var e,r=!1,n=!1,i,a,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&$t(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(r=!0,s=t.input.charCodeAt(++t.position)):s===33?(n=!0,i="!!",s=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(a=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):$t(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Ba(s);)s===33&&(n?$t(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),Rz.test(i)||$t(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);a=t.input.slice(e,t.position),B2e.test(a)&&$t(t,"tag suffix cannot contain flow indicator characters")}a&&!Nz.test(a)&&$t(t,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{$t(t,"tag name is malformed: "+a)}return r?t.tag=a:ih.call(t.tagMap,i)?t.tag=t.tagMap[i]+a:i==="!"?t.tag="!"+a:i==="!!"?t.tag="tag:yaml.org,2002:"+a:$t(t,\'undeclared tag handle "\'+i+\'"\'),!0}function qz(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&$t(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Ba(r)&&!Nf(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&$t(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Yz(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!Ba(n)&&!Nf(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&$t(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),ih.call(t.anchorMap,r)||$t(t,\'unidentified alias "\'+r+\'"\'),t.result=t.anchorMap[r],si(t,!0,-1),!0}function Mf(t,e,r,n,i){var a,s,o,l=1,u=!1,h=!1,f,d,p,g,m,x;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=o=Bb===r||Lz===r,n&&si(t,!0,-1)&&(u=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;Hz(t)||qz(t);)si(t,!0,-1)?(u=!0,o=a,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=u||i),(l===1||Bb===r)&&(Pb===r||_z===r?m=e:m=e+1,x=t.position-t.lineStart,l===1?o&&(XS(t,x)||Wz(t,x,m))||Uz(t,m)?h=!0:(s&&Vz(t,m)||$z(t,m)||Gz(t,m)?h=!0:Yz(t)?(h=!0,(t.tag!==null||t.anchor!==null)&&$t(t,"alias node should not have any properties")):zz(t,m,Pb===r)&&(h=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(h=o&&XS(t,x))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&$t(t,\'unacceptable node kind for !<?> tag; it should be "scalar", not "\'+t.kind+\'"\'),f=0,d=t.implicitTypes.length;f<d;f+=1)if(g=t.implicitTypes[f],g.resolve(t.result)){t.result=g.construct(t.result),t.tag=g.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(ih.call(t.typeMap[t.kind||"fallback"],t.tag))g=t.typeMap[t.kind||"fallback"][t.tag];else for(g=null,p=t.typeMap.multi[t.kind||"fallback"],f=0,d=p.length;f<d;f+=1)if(t.tag.slice(0,p[f].tag.length)===p[f].tag){g=p[f];break}g||$t(t,"unknown tag !<"+t.tag+">"),t.result!==null&&g.kind!==t.kind&&$t(t,"unacceptable node kind for !<"+t.tag+\'> tag; it should be "\'+g.kind+\'", not "\'+t.kind+\'"\'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):$t(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}function Xz(t){var e=t.position,r,n,i,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(si(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!Ba(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&$t(t,"directive name must not be less than one character in length");s!==0;){for(;nh(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Jo(s));break}if(Jo(s))break;for(r=t.position;s!==0&&!Ba(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}s!==0&&Gb(t),ih.call(FF,n)?FF[n](t,n,i):A1(t,\'unknown document directive "\'+n+\'"\')}if(si(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,si(t,!0,-1)):a&&$t(t,"directives end mark is expected"),Mf(t,t.lineIndent-1,Bb,!1,!0),si(t,!0,-1),t.checkLineBreaks&&P2e.test(t.input.slice(e,t.position))&&A1(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&N1(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,si(t,!0,-1));return}if(t.position<t.length-1)$t(t,"end of the stream or a document separator is expected");else return}function cC(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`\n`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new Fz(t,e),n=t.indexOf("\\0");for(n!==-1&&(r.position=n,$t(r,"null byte is not allowed in input")),r.input+="\\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Xz(r);return r.documents}function jz(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=cC(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;i<a;i+=1)e(n[i])}function Kz(t,e){var r=cC(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new is("expected a single document in the stream, but found more")}}function a$(t,e){var r,n,i,a,s,o,l;if(e===null)return{};for(r={},n=Object.keys(e),i=0,a=n.length;i<a;i+=1)s=n[i],o=String(e[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=t.compiledTypeMap.fallback[s],l&&Jz.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}function s$(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new is("code point within a string may not be greater than 0xFFFFFFFF");return"\\\\"+r+Ti.repeat("0",n-e.length)+e}function o$(t){this.schema=t.schema||Az,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Ti.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=a$(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType===\'"\'?L1:ixe,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function KS(t,e){for(var r=Ti.repeat(" ",e),n=0,i=-1,a="",s,o=t.length;n<o;)i=t.indexOf(`\n`,n),i===-1?(s=t.slice(n),n=o):(s=t.slice(n,i+1),n=i+1),s.length&&s!==`\n`&&(a+=r),a+=s;return a}function zb(t,e){return`\n`+Ti.repeat(" ",t.indent*e)}function l$(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1}function R1(t){return t===U2e||t===$2e}function H0(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==uC||65536<=t&&t<=1114111}function ZS(t){return H0(t)&&t!==uC&&t!==G2e&&t!==_1}function QS(t,e,r){var n=ZS(t),i=n&&!R1(t);return(r?n:n&&t!==e$&&t!==t$&&t!==r$&&t!==n$&&t!==i$)&&t!==jS&&!(e===Fb&&!i)||ZS(e)&&!R1(e)&&t===jS||e===Fb&&i}function c$(t){return H0(t)&&t!==uC&&!R1(t)&&t!==j2e&&t!==Q2e&&t!==Fb&&t!==e$&&t!==t$&&t!==r$&&t!==n$&&t!==i$&&t!==jS&&t!==q2e&&t!==X2e&&t!==V2e&&t!==txe&&t!==K2e&&t!==Z2e&&t!==Y2e&&t!==W2e&&t!==H2e&&t!==J2e&&t!==exe}function u$(t){return!R1(t)&&t!==Fb}function V0(t,e){var r=t.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function hC(t){var e=/^\\n* /;return e.test(t)}function p$(t,e,r,n,i,a,s,o){var l,u=0,h=null,f=!1,d=!1,p=n!==-1,g=-1,m=c$(V0(t,0))&&u$(V0(t,t.length-1));if(e||s)for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=V0(t,l),!H0(u))return U0;m=m&&QS(u,h,o),h=u}else{for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=V0(t,l),u===_1)f=!0,p&&(d=d||l-g-1>n&&t[g+1]!==" ",g=l);else if(!H0(u))return U0;m=m&&QS(u,h,o),h=u}d=d||p&&l-g-1>n&&t[g+1]!==" "}return!f&&!d?m&&!s&&!i(t)?h$:a===L1?U0:JS:r>9&&hC(t)?U0:s?a===L1?U0:JS:d?d$:f$}function g$(t,e,r,n,i){t.dump=function(){if(e.length===0)return t.quotingType===L1?\'""\':"\'\'";if(!t.noCompatMode&&(rxe.indexOf(e)!==-1||nxe.test(e)))return t.quotingType===L1?\'"\'+e+\'"\':"\'"+e+"\'";var a=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),o=n||t.flowLevel>-1&&r>=t.flowLevel;function l(u){return l$(t,u)}switch(v(l,"testAmbiguity"),p$(e,o,t.indent,s,l,t.quotingType,t.forceQuotes&&!n,i)){case h$:return e;case JS:return"\'"+e.replace(/\'/g,"\'\'")+"\'";case f$:return"|"+eC(e,t.indent)+tC(KS(e,a));case d$:return">"+eC(e,t.indent)+tC(KS(m$(e,s),a));case U0:return\'"\'+v$(e)+\'"\';default:throw new is("impossible error: invalid scalar style")}}()}function eC(t,e){var r=hC(t)?String(e):"",n=t[t.length-1]===`\n`,i=n&&(t[t.length-2]===`\n`||t===`\n`),a=i?"+":n?"":"-";return r+a+`\n`}function tC(t){return t[t.length-1]===`\n`?t.slice(0,-1):t}function m$(t,e){for(var r=/(\\n+)([^\\n]*)/g,n=function(){var u=t.indexOf(`\n`);return u=u!==-1?u:t.length,r.lastIndex=u,rC(t.slice(0,u),e)}(),i=t[0]===`\n`||t[0]===" ",a,s;s=r.exec(t);){var o=s[1],l=s[2];a=l[0]===" ",n+=o+(!i&&!a&&l!==""?`\n`:"")+rC(l,e),i=a}return n}function rC(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,a,s=0,o=0,l="";n=r.exec(t);)o=n.index,o-i>e&&(a=s>i?s:o,l+=`\n`+t.slice(i,a),i=a+1),s=o;return l+=`\n`,t.length-i>e&&s>i?l+=t.slice(i,s)+`\n`+t.slice(s+1):l+=t.slice(i),l.slice(1)}function v$(t){for(var e="",r=0,n,i=0;i<t.length;r>=65536?i+=2:i++)r=V0(t,i),n=ya[r],!n&&H0(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||s$(r);return e}function y$(t,e,r){var n="",i=t.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],t.replacer&&(o=t.replacer.call(r,String(a),o)),(Hl(t,e,o,!1,!1)||typeof o>"u"&&Hl(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function nC(t,e,r,n){var i="",a=t.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],t.replacer&&(l=t.replacer.call(r,String(s),l)),(Hl(t,e+1,l,!0,!0,!1,!0)||typeof l>"u"&&Hl(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=zb(t,e)),t.dump&&_1===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=a,t.dump=i||"[]"}function x$(t,e,r){var n="",i=t.tag,a=Object.keys(r),s,o,l,u,h;for(s=0,o=a.length;s<o;s+=1)h="",n!==""&&(h+=", "),t.condenseFlow&&(h+=\'"\'),l=a[s],u=r[l],t.replacer&&(u=t.replacer.call(r,l,u)),Hl(t,e,l,!1,!1)&&(t.dump.length>1024&&(h+="? "),h+=t.dump+(t.condenseFlow?\'"\':"")+":"+(t.condenseFlow?"":" "),Hl(t,e,u,!1,!1)&&(h+=t.dump,n+=h));t.tag=i,t.dump="{"+n+"}"}function b$(t,e,r,n){var i="",a=t.tag,s=Object.keys(r),o,l,u,h,f,d;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new is("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)d="",(!n||i!=="")&&(d+=zb(t,e)),u=s[o],h=r[u],t.replacer&&(h=t.replacer.call(r,u,h)),Hl(t,e+1,u,!0,!0,!0)&&(f=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,f&&(t.dump&&_1===t.dump.charCodeAt(0)?d+="?":d+="? "),d+=t.dump,f&&(d+=zb(t,e)),Hl(t,e+1,h,!0,f)&&(t.dump&&_1===t.dump.charCodeAt(0)?d+=":":d+=": ",d+=t.dump,i+=d));t.tag=a,t.dump=i||"{}"}function iC(t,e,r){var n,i,a,s,o,l;for(i=r?t.explicitTypes:t.implicitTypes,a=0,s=i.length;a<s;a+=1)if(o=i[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof e=="object"&&e instanceof o.instanceOf)&&(!o.predicate||o.predicate(e))){if(r?o.multi&&o.representName?t.tag=o.representName(e):t.tag=o.tag:t.tag="?",o.represent){if(l=t.styleMap[o.tag]||o.defaultStyle,Qz.call(o.represent)==="[object Function]")n=o.represent(e,l);else if(Jz.call(o.represent,l))n=o.represent[l](e,l);else throw new is("!<"+o.tag+\'> tag resolver accepts not "\'+l+\'" style\');t.dump=n}return!0}return!1}function Hl(t,e,r,n,i,a,s){t.tag=null,t.dump=r,iC(t,r,!1)||iC(t,r,!0);var o=Qz.call(t.dump),l=n,u;n&&(n=t.flowLevel<0||t.flowLevel>e);var h=o==="[object Object]"||o==="[object Array]",f,d;if(h&&(f=t.duplicates.indexOf(r),d=f!==-1),(t.tag!==null&&t.tag!=="?"||d||t.indent!==2&&e>0)&&(i=!1),d&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(h&&d&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),o==="[object Object]")n&&Object.keys(t.dump).length!==0?(b$(t,e,t.dump,i),d&&(t.dump="&ref_"+f+t.dump)):(x$(t,e,t.dump),d&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?nC(t,e-1,t.dump,i):nC(t,e,t.dump,i),d&&(t.dump="&ref_"+f+t.dump)):(y$(t,e,t.dump),d&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&g$(t,t.dump,e,a,l);else{if(o==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new is("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(u=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",t.dump=u+" "+t.dump)}return!0}function w$(t,e){var r=[],n=[],i,a;for($b(t,r,n),i=0,a=n.length;i<a;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(a)}function $b(t,e,r){var n,i,a;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)$b(t[i],e,r);else for(n=Object.keys(t),i=0,a=n.length;i<a;i+=1)$b(t[n[i]],e,r)}function k$(t,e){e=e||{};var r=new o$(e);r.noRefs||w$(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Hl(r,0,n,!0,!0)?r.dump+`\n`:""}function Vb(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var n2e,i2e,a2e,s2e,o2e,l2e,Ti,is,c2e,u2e,h2e,va,f2e,d2e,p2e,g2e,m2e,v2e,y2e,x2e,b2e,w2e,k2e,uz,T2e,hz,fz,E2e,S2e,oC,C2e,A2e,_2e,L2e,R2e,N2e,I2e,M2e,Az,ih,Pb,_z,Lz,Bb,VS,D2e,BF,O2e,P2e,B2e,Rz,Nz,Pz,Bz,Rf,FF,F2e,z2e,Zz,Qz,Jz,uC,$2e,_1,G2e,U2e,V2e,W2e,jS,H2e,q2e,Y2e,X2e,e$,j2e,Fb,K2e,Z2e,Q2e,J2e,t$,r$,exe,n$,txe,i$,ya,rxe,nxe,ixe,L1,h$,JS,f$,d$,U0,axe,sxe,q0,Y0,snt,ont,lnt,cnt,unt,Wb=F(()=>{or();v(aC,"isNothing");v(zF,"isObject");v($F,"toArray");v(GF,"extend");v(UF,"repeat");v(VF,"isNegativeZero");n2e=aC,i2e=zF,a2e=$F,s2e=UF,o2e=VF,l2e=GF,Ti={isNothing:n2e,isObject:i2e,toArray:a2e,repeat:s2e,isNegativeZero:o2e,extend:l2e};v(sC,"formatError");v(W0,"YAMLException$1");W0.prototype=Object.create(Error.prototype);W0.prototype.constructor=W0;W0.prototype.toString=v(function(e){return this.name+": "+sC(this,e)},"toString");is=W0;v(Mb,"getLine");v(Db,"padStart");v(WF,"makeSnippet");c2e=WF,u2e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],h2e=["scalar","sequence","mapping"];v(HF,"compileStyleAliases");v(qF,"Type$1");va=qF;v(WS,"compileList");v(YF,"compileMap");v(Ob,"Schema$1");Ob.prototype.extend=v(function(e){var r=[],n=[];if(e instanceof va)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new is("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof va))throw new is("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new is("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new is("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof va))throw new is("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Ob.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=WS(i,"implicit"),i.compiledExplicit=WS(i,"explicit"),i.compiledTypeMap=YF(i.compiledImplicit,i.compiledExplicit),i},"extend");f2e=Ob,d2e=new va("tag:yaml.org,2002:str",{kind:"scalar",construct:v(function(t){return t!==null?t:""},"construct")}),p2e=new va("tag:yaml.org,2002:seq",{kind:"sequence",construct:v(function(t){return t!==null?t:[]},"construct")}),g2e=new va("tag:yaml.org,2002:map",{kind:"mapping",construct:v(function(t){return t!==null?t:{}},"construct")}),m2e=new f2e({explicit:[d2e,p2e,g2e]});v(XF,"resolveYamlNull");v(jF,"constructYamlNull");v(KF,"isNull");v2e=new va("tag:yaml.org,2002:null",{kind:"scalar",resolve:XF,construct:jF,predicate:KF,represent:{canonical:v(function(){return"~"},"canonical"),lowercase:v(function(){return"null"},"lowercase"),uppercase:v(function(){return"NULL"},"uppercase"),camelcase:v(function(){return"Null"},"camelcase"),empty:v(function(){return""},"empty")},defaultStyle:"lowercase"});v(ZF,"resolveYamlBoolean");v(QF,"constructYamlBoolean");v(JF,"isBoolean");y2e=new va("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ZF,construct:QF,predicate:JF,represent:{lowercase:v(function(t){return t?"true":"false"},"lowercase"),uppercase:v(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:v(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});v(ez,"isHexCode");v(tz,"isOctCode");v(rz,"isDecCode");v(nz,"resolveYamlInteger");v(iz,"constructYamlInteger");v(az,"isInteger");x2e=new va("tag:yaml.org,2002:int",{kind:"scalar",resolve:nz,construct:iz,predicate:az,represent:{binary:v(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:v(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:v(function(t){return t.toString(10)},"decimal"),hexadecimal:v(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),b2e=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$");v(sz,"resolveYamlFloat");v(oz,"constructYamlFloat");w2e=/^[-+]?[0-9]+e/;v(lz,"representYamlFloat");v(cz,"isFloat");k2e=new va("tag:yaml.org,2002:float",{kind:"scalar",resolve:sz,construct:oz,predicate:cz,represent:lz,defaultStyle:"lowercase"}),uz=m2e.extend({implicit:[v2e,y2e,x2e,k2e]}),T2e=uz,hz=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),fz=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");v(dz,"resolveYamlTimestamp");v(pz,"constructYamlTimestamp");v(gz,"representYamlTimestamp");E2e=new va("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:dz,construct:pz,instanceOf:Date,represent:gz});v(mz,"resolveYamlMerge");S2e=new va("tag:yaml.org,2002:merge",{kind:"scalar",resolve:mz}),oC=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\\r`;v(vz,"resolveYamlBinary");v(yz,"constructYamlBinary");v(xz,"representYamlBinary");v(bz,"isBinary");C2e=new va("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vz,construct:yz,predicate:bz,represent:xz}),A2e=Object.prototype.hasOwnProperty,_2e=Object.prototype.toString;v(wz,"resolveYamlOmap");v(kz,"constructYamlOmap");L2e=new va("tag:yaml.org,2002:omap",{kind:"sequence",resolve:wz,construct:kz}),R2e=Object.prototype.toString;v(Tz,"resolveYamlPairs");v(Ez,"constructYamlPairs");N2e=new va("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Tz,construct:Ez}),I2e=Object.prototype.hasOwnProperty;v(Sz,"resolveYamlSet");v(Cz,"constructYamlSet");M2e=new va("tag:yaml.org,2002:set",{kind:"mapping",resolve:Sz,construct:Cz}),Az=T2e.extend({implicit:[E2e,S2e],explicit:[C2e,L2e,N2e,M2e]}),ih=Object.prototype.hasOwnProperty,Pb=1,_z=2,Lz=3,Bb=4,VS=1,D2e=2,BF=3,O2e=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,P2e=/[\\x85\\u2028\\u2029]/,B2e=/[,\\[\\]\\{\\}]/,Rz=/^(?:!|!!|![a-z\\-]+!)$/i,Nz=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*\'\\(\\)\\[\\]])*$/i;v(HS,"_class");v(Jo,"is_EOL");v(nh,"is_WHITE_SPACE");v(Ba,"is_WS_OR_EOL");v(Nf,"is_FLOW_INDICATOR");v(Iz,"fromHexCode");v(Mz,"escapedHexLen");v(Dz,"fromDecimalCode");v(qS,"simpleEscapeSequence");v(Oz,"charFromCodepoint");Pz=new Array(256),Bz=new Array(256);for(Rf=0;Rf<256;Rf++)Pz[Rf]=qS(Rf)?1:0,Bz[Rf]=qS(Rf);v(Fz,"State$1");v(lC,"generateError");v($t,"throwError");v(A1,"throwWarning");FF={YAML:v(function(e,r,n){var i,a,s;e.version!==null&&$t(e,"duplication of %YAML directive"),n.length!==1&&$t(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\\.([0-9]+)$/.exec(n[0]),i===null&&$t(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&$t(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&A1(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:v(function(e,r,n){var i,a;n.length!==2&&$t(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],Rz.test(i)||$t(e,"ill-formed tag handle (first argument) of the TAG directive"),ih.call(e.tagMap,i)&&$t(e,\'there is a previously declared suffix for "\'+i+\'" tag handle\'),Nz.test(a)||$t(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{$t(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};v(jc,"captureSegment");v(YS,"mergeMappings");v(If,"storeMappingPair");v(Gb,"readLineBreak");v(si,"skipSeparationSpace");v(N1,"testDocumentSeparator");v(Ub,"writeFoldedLines");v(zz,"readPlainScalar");v($z,"readSingleQuotedScalar");v(Gz,"readDoubleQuotedScalar");v(Uz,"readFlowCollection");v(Vz,"readBlockScalar");v(XS,"readBlockSequence");v(Wz,"readBlockMapping");v(Hz,"readTagProperty");v(qz,"readAnchorProperty");v(Yz,"readAlias");v(Mf,"composeNode");v(Xz,"readDocument");v(cC,"loadDocuments");v(jz,"loadAll$1");v(Kz,"load$1");F2e=jz,z2e=Kz,Zz={loadAll:F2e,load:z2e},Qz=Object.prototype.toString,Jz=Object.prototype.hasOwnProperty,uC=65279,$2e=9,_1=10,G2e=13,U2e=32,V2e=33,W2e=34,jS=35,H2e=37,q2e=38,Y2e=39,X2e=42,e$=44,j2e=45,Fb=58,K2e=61,Z2e=62,Q2e=63,J2e=64,t$=91,r$=93,exe=96,n$=123,txe=124,i$=125,ya={};ya[0]="\\\\0";ya[7]="\\\\a";ya[8]="\\\\b";ya[9]="\\\\t";ya[10]="\\\\n";ya[11]="\\\\v";ya[12]="\\\\f";ya[13]="\\\\r";ya[27]="\\\\e";ya[34]=\'\\\\"\';ya[92]="\\\\\\\\";ya[133]="\\\\N";ya[160]="\\\\_";ya[8232]="\\\\L";ya[8233]="\\\\P";rxe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],nxe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;v(a$,"compileStyleMap");v(s$,"encodeHex");ixe=1,L1=2;v(o$,"State");v(KS,"indentString");v(zb,"generateNextLine");v(l$,"testImplicitResolving");v(R1,"isWhitespace");v(H0,"isPrintable");v(ZS,"isNsCharOrWhitespace");v(QS,"isPlainSafe");v(c$,"isPlainSafeFirst");v(u$,"isPlainSafeLast");v(V0,"codePointAt");v(hC,"needIndentIndicator");h$=1,JS=2,f$=3,d$=4,U0=5;v(p$,"chooseScalarStyle");v(g$,"writeScalar");v(eC,"blockHeader");v(tC,"dropEndingNewline");v(m$,"foldString");v(rC,"foldLine");v(v$,"escapeString");v(y$,"writeFlowSequence");v(nC,"writeBlockSequence");v(x$,"writeFlowMapping");v(b$,"writeBlockMapping");v(iC,"detectType");v(Hl,"writeNode");v(w$,"getDuplicateReferences");v($b,"inspectNode");v(k$,"dump$1");axe=k$,sxe={dump:axe};v(Vb,"renamed");q0=uz,Y0=Zz.load,snt=Zz.loadAll,ont=sxe.dump,lnt=Vb("safeLoad","load"),cnt=Vb("safeLoadAll","loadAll"),unt=Vb("safeDump","dump");});var oxe,X0,fC,T$,Hb=F(()=>{oxe=Object.freeze({left:0,top:0,width:16,height:16}),X0=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fC=Object.freeze({...oxe,...X0}),T$=Object.freeze({...fC,body:"",hidden:!1})});var lxe,E$,S$=F(()=>{Hb();lxe=Object.freeze({width:null,height:null}),E$=Object.freeze({...lxe,...X0})});var qb,dC,Yb,C$=F(()=>{qb=/^[a-z0-9]+(-[a-z0-9]+)*$/,dC=(t,e,r,n="")=>{let i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let o=i.pop(),l=i.pop(),u={provider:i.length>0?i[0]:n,prefix:l,name:o};return e&&!Yb(u)?null:u}let a=i[0],s=a.split("-");if(s.length>1){let o={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!Yb(o)?null:o}if(r&&n===""){let o={provider:n,prefix:"",name:a};return e&&!Yb(o,r)?null:o}return null},Yb=(t,e)=>t?!!((t.provider===""||t.provider.match(qb))&&(e&&t.prefix===""||t.prefix.match(qb))&&t.name.match(qb)):!1});function A$(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}var _$=F(()=>{});function pC(t,e){let r=A$(t,e);for(let n in T$)n in X0?n in t&&!(n in r)&&(r[n]=X0[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}var L$=F(()=>{Hb();_$()});function R$(t,e){let r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);function a(s){if(r[s])return i[s]=[];if(!(s in i)){i[s]=null;let o=n[s]&&n[s].parent,l=o&&a(o);l&&(i[s]=[o].concat(l))}return i[s]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(a),i}var N$=F(()=>{});function I$(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function s(o){a=pC(n[o]||i[o],a)}return s(e),r.forEach(s),pC(t,a)}function gC(t,e){if(t.icons[e])return I$(t,e,[]);let r=R$(t,[e])[e];return r?I$(t,e,r):null}var M$=F(()=>{L$();N$()});function mC(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;let n=t.split(cxe);if(n===null||!n.length)return t;let i=[],a=n.shift(),s=uxe.test(a);for(;;){if(s){let o=parseFloat(a);isNaN(o)?i.push(a):i.push(Math.ceil(o*e*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");s=!s}}var cxe,uxe,D$=F(()=>{cxe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uxe=/^-?[0-9.]*[0-9]+[0-9.]*$/g});function hxe(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;n>=0;){let i=t.indexOf(">",n),a=t.indexOf("</"+e);if(i===-1||a===-1)break;let s=t.indexOf(">",a);if(s===-1)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function fxe(t,e){return t?"<defs>"+t+"</defs>"+e:e}function O$(t,e,r){let n=hxe(t);return fxe(n.defs,e+n.content+r)}var P$=F(()=>{});function vC(t,e){let r={...fC,...t},n={...E$,...e},i={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,n].forEach(m=>{let x=[],y=m.hFlip,b=m.vFlip,w=m.rotate;y?b?w+=2:(x.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),x.push("scale(-1 1)"),i.top=i.left=0):b&&(x.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),x.push("scale(1 -1)"),i.top=i.left=0);let _;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:_=i.height/2+i.top,x.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:x.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:_=i.width/2+i.left,x.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}w%2===1&&(i.left!==i.top&&(_=i.left,i.left=i.top,i.top=_),i.width!==i.height&&(_=i.width,i.width=i.height,i.height=_)),x.length&&(a=O$(a,\'<g transform="\'+x.join(" ")+\'">\',"</g>"))});let s=n.width,o=n.height,l=i.width,u=i.height,h,f;s===null?(f=o===null?"1em":o==="auto"?u:o,h=mC(f,l/u)):(h=s==="auto"?l:s,f=o===null?mC(h,u/l):o==="auto"?u:o);let d={},p=(m,x)=>{dxe(x)||(d[m]=x.toString())};p("width",h),p("height",f);let g=[i.left,i.top,l,u];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}var dxe,B$=F(()=>{Hb();S$();D$();P$();dxe=t=>t==="unset"||t==="undefined"||t==="none"});function yC(t,e=gxe){let r=[],n;for(;n=pxe.exec(t);)r.push(n[1]);if(!r.length)return t;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{let s=typeof e=="function"?e(a):e+(mxe++).toString(),o=a.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&");t=t.replace(new RegExp(\'([#;"])(\'+o+\')([")]|\\\\.[a-z])\',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}var pxe,gxe,mxe,F$=F(()=>{pxe=/\\sid="(\\S+)"/g,gxe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),mxe=0});function xC(t,e){let r=t.indexOf("xlink:")===-1?"":\' xmlns:xlink="http://www.w3.org/1999/xlink"\';for(let n in e)r+=" "+n+\'="\'+e[n]+\'"\';return\'<svg xmlns="http://www.w3.org/2000/svg"\'+r+">"+t+"</svg>"}var z$=F(()=>{});var G$=yi((Mnt,$$)=>{var j0=1e3,K0=j0*60,Z0=K0*60,Df=Z0*24,vxe=Df*7,yxe=Df*365.25;$$.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return xxe(t);if(r==="number"&&isFinite(t))return e.long?wxe(t):bxe(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function xxe(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*yxe;case"weeks":case"week":case"w":return r*vxe;case"days":case"day":case"d":return r*Df;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Z0;case"minutes":case"minute":case"mins":case"min":case"m":return r*K0;case"seconds":case"second":case"secs":case"sec":case"s":return r*j0;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function bxe(t){var e=Math.abs(t);return e>=Df?Math.round(t/Df)+"d":e>=Z0?Math.round(t/Z0)+"h":e>=K0?Math.round(t/K0)+"m":e>=j0?Math.round(t/j0)+"s":t+"ms"}function wxe(t){var e=Math.abs(t);return e>=Df?Xb(t,e,Df,"day"):e>=Z0?Xb(t,e,Z0,"hour"):e>=K0?Xb(t,e,K0,"minute"):e>=j0?Xb(t,e,j0,"second"):t+" ms"}function Xb(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var V$=yi((Dnt,U$)=>{function kxe(t){r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=i,r.enabled=s,r.humanize=G$(),r.destroy=u,Object.keys(t).forEach(h=>{r[h]=t[h]}),r.names=[],r.skips=[],r.formatters={};function e(h){let f=0;for(let d=0;d<h.length;d++)f=(f<<5)-f+h.charCodeAt(d),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=e;function r(h){let f,d=null,p,g;function m(...x){if(!m.enabled)return;let y=m,b=Number(new Date),w=b-(f||b);y.diff=w,y.prev=f,y.curr=b,f=b,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let _=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(E,L)=>{if(E==="%%")return"%";_++;let S=r.formatters[L];if(typeof S=="function"){let C=x[_];E=S.call(y,C),x.splice(_,1),_--}return E}),r.formatArgs.call(y,x),(y.log||r.log).apply(y,x)}return m.namespace=h,m.useColors=r.useColors(),m.color=r.selectColor(h),m.extend=n,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,g=r.enabled(h)),g),set:x=>{d=x}}),typeof r.init=="function"&&r.init(m),m}function n(h,f){let d=r(this.namespace+(typeof f>"u"?":":f)+h);return d.log=this.log,d}function i(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let f,d=(typeof h=="string"?h:"").split(/[\\s,]+/),p=d.length;for(f=0;f<p;f++)d[f]&&(h=d[f].replace(/\\*/g,".*?"),h[0]==="-"?r.skips.push(new RegExp("^"+h.slice(1)+"$")):r.names.push(new RegExp("^"+h+"$")))}function a(){let h=[...r.names.map(o),...r.skips.map(o).map(f=>"-"+f)].join(",");return r.enable(""),h}function s(h){if(h[h.length-1]==="*")return!0;let f,d;for(f=0,d=r.skips.length;f<d;f++)if(r.skips[f].test(h))return!1;for(f=0,d=r.names.length;f<d;f++)if(r.names[f].test(h))return!0;return!1}function o(h){return h.toString().substring(2,h.toString().length-2).replace(/\\.\\*\\?$/,"*")}function l(h){return h instanceof Error?h.stack||h.message:h}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}U$.exports=kxe});var W$=yi((Os,jb)=>{Os.formatArgs=Exe;Os.save=Sxe;Os.load=Cxe;Os.useColors=Txe;Os.storage=Axe();Os.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Os.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Txe(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}function Exe(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+jb.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}Os.log=console.debug||console.log||(()=>{});function Sxe(t){try{t?Os.storage.setItem("debug",t):Os.storage.removeItem("debug")}catch{}}function Cxe(){let t;try{t=Os.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Axe(){try{return localStorage}catch{}}jb.exports=V$()(Os);var{formatters:_xe}=jb.exports;_xe.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Ont,H$=F(()=>{C$();M$();B$();F$();z$();Ont=ga(W$(),1)});var wC,bC,q$,Kb,Lxe,Kc,el=F(()=>{or();H$();wC={body:\'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>\',height:80,width:80},bC=new Map,q$=new Map,Kb=v(t=>{for(let e of t){if(!e.name)throw new Error(\'Invalid icon loader. Must have a "name" property with non-empty string value.\');if(re.debug("Registering icon pack:",e.name),"loader"in e)q$.set(e.name,e.loader);else if("icons"in e)bC.set(e.name,e.icons);else throw re.error("Invalid icon loader:",e),new Error(\'Invalid icon loader. Must have either "icons" or "loader" property.\')}},"registerIconPacks"),Lxe=v(async(t,e)=>{let r=dC(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);let n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=bC.get(n);if(!i){let s=q$.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await s(),prefix:n},bC.set(n,i)}catch(o){throw re.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=gC(i,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),Kc=v(async(t,e)=>{let r;try{r=await Lxe(t,e?.fallbackPrefix)}catch(a){re.error(a),r=wC}let n=vC(r,e);return xC(yC(n.body),n.attributes)},"getIconSVG")});var Zc,fo=F(()=>{or();Zc=v(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});var Y$=yi(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.BLANK_URL=zi.relativeFirstCharacters=zi.whitespaceEscapeCharsRegex=zi.urlSchemeRegex=zi.ctrlCharactersRegex=zi.htmlCtrlEntityRegex=zi.htmlEntitiesRegex=zi.invalidProtocolRegex=void 0;zi.invalidProtocolRegex=/^([^\\w]*)(javascript|data|vbscript)/im;zi.htmlEntitiesRegex=/&#(\\w+)(^\\w|;)?/g;zi.htmlCtrlEntityRegex=/&(newline|tab);/gi;zi.ctrlCharactersRegex=/[\\u0000-\\u001F\\u007F-\\u009F\\u2000-\\u200D\\uFEFF]/gim;zi.urlSchemeRegex=/^.+(:|:)/gim;zi.whitespaceEscapeCharsRegex=/(\\\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;zi.relativeFirstCharacters=[".","/"];zi.BLANK_URL="about:blank"});var Q0=yi(Zb=>{"use strict";Object.defineProperty(Zb,"__esModule",{value:!0});Zb.sanitizeUrl=void 0;var xa=Y$();function Rxe(t){return xa.relativeFirstCharacters.indexOf(t[0])>-1}function Nxe(t){var e=t.replace(xa.ctrlCharactersRegex,"");return e.replace(xa.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}function Ixe(t){return URL.canParse(t)}function X$(t){try{return decodeURIComponent(t)}catch{return t}}function Mxe(t){if(!t)return xa.BLANK_URL;var e,r=X$(t.trim());do r=Nxe(r).replace(xa.htmlCtrlEntityRegex,"").replace(xa.ctrlCharactersRegex,"").replace(xa.whitespaceEscapeCharsRegex,"").trim(),r=X$(r),e=r.match(xa.ctrlCharactersRegex)||r.match(xa.htmlEntitiesRegex)||r.match(xa.htmlCtrlEntityRegex)||r.match(xa.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return xa.BLANK_URL;if(Rxe(n))return n;var i=n.trimStart(),a=i.match(xa.urlSchemeRegex);if(!a)return n;var s=a[0].toLowerCase().trim();if(xa.invalidProtocolRegex.test(s))return xa.BLANK_URL;var o=i.replace(/\\\\/g,"/");if(s==="mailto:"||s.includes("://"))return o;if(s==="http:"||s==="https:"){if(!Ixe(o))return xa.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}Zb.sanitizeUrl=Mxe});function Of(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}var kC=F(()=>{});function TC(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}var j$=F(()=>{});function Pf(t){let e,r,n;t.length!==2?(e=Of,r=(o,l)=>Of(t(o),l),n=(o,l)=>t(o)-l):(e=t===Of||t===TC?t:Dxe,r=t,n=t);function i(o,l,u=0,h=o.length){if(u<h){if(e(l,l)!==0)return h;do{let f=u+h>>>1;r(o[f],l)<0?u=f+1:h=f}while(u<h)}return u}function a(o,l,u=0,h=o.length){if(u<h){if(e(l,l)!==0)return h;do{let f=u+h>>>1;r(o[f],l)<=0?u=f+1:h=f}while(u<h)}return u}function s(o,l,u=0,h=o.length){let f=i(o,l,u,h-1);return f>u&&n(o[f-1],l)>-n(o[f],l)?f-1:f}return{left:i,center:s,right:a}}function Dxe(){return 0}var EC=F(()=>{kC();j$()});function SC(t){return t===null?NaN:+t}var K$=F(()=>{});var Z$,Q$,Oxe,Pxe,CC,J$=F(()=>{kC();EC();K$();Z$=Pf(Of),Q$=Z$.right,Oxe=Z$.left,Pxe=Pf(SC).center,CC=Q$});function eG({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function Bxe({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function Fxe({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function zxe(t){return t!==null&&typeof t=="object"?t.valueOf():t}var J0,tG=F(()=>{J0=class extends Map{constructor(e,r=zxe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[n,i]of e)this.set(n,i)}get(e){return super.get(eG(this,e))}has(e){return super.has(eG(this,e))}set(e,r){return super.set(Bxe(this,e),r)}delete(e){return super.delete(Fxe(this,e))}}});function Qb(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=$xe?10:a>=Gxe?5:a>=Uxe?2:1,o,l,u;return i<0?(u=Math.pow(10,-i)/s,o=Math.round(t*u),l=Math.round(e*u),o/u<t&&++o,l/u>e&&--l,u=-u):(u=Math.pow(10,i)*s,o=Math.round(t/u),l=Math.round(e/u),o*u<t&&++o,l*u>e&&--l),l<o&&.5<=r&&r<2?Qb(t,e,r*2):[o,l,u]}function Jb(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let n=e<t,[i,a,s]=n?Qb(e,t,r):Qb(t,e,r);if(!(a>=i))return[];let o=a-i+1,l=new Array(o);if(n)if(s<0)for(let u=0;u<o;++u)l[u]=(a-u)/-s;else for(let u=0;u<o;++u)l[u]=(a-u)*s;else if(s<0)for(let u=0;u<o;++u)l[u]=(i+u)/-s;else for(let u=0;u<o;++u)l[u]=(i+u)*s;return l}function I1(t,e,r){return e=+e,t=+t,r=+r,Qb(t,e,r)[2]}function ep(t,e,r){e=+e,t=+t,r=+r;let n=e<t,i=n?I1(e,t,r):I1(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}var $xe,Gxe,Uxe,rG=F(()=>{$xe=Math.sqrt(50),Gxe=Math.sqrt(10),Uxe=Math.sqrt(2)});function e4(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}var nG=F(()=>{});function t4(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var iG=F(()=>{});function r4(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n<i;)a[n]=t+n*r;return a}var aG=F(()=>{});var ah=F(()=>{J$();EC();nG();iG();aG();rG();tG()});function sG(t){return t}var oG=F(()=>{});function Vxe(t){return"translate("+t+",0)"}function Wxe(t){return"translate(0,"+t+")"}function Hxe(t){return e=>+t(e)}function qxe(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function Yxe(){return!this.__axis}function cG(t,e){var r=[],n=null,i=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===i4||t===n4?-1:1,h=t===n4||t===AC?"x":"y",f=t===i4||t===_C?Vxe:Wxe;function d(p){var g=n??(e.ticks?e.ticks.apply(e,r):e.domain()),m=i??(e.tickFormat?e.tickFormat.apply(e,r):sG),x=Math.max(a,0)+o,y=e.range(),b=+y[0]+l,w=+y[y.length-1]+l,_=(e.bandwidth?qxe:Hxe)(e.copy(),l),k=p.selection?p.selection():p,E=k.selectAll(".domain").data([null]),L=k.selectAll(".tick").data(g,e).order(),S=L.exit(),C=L.enter().append("g").attr("class","tick"),M=L.select("line"),R=L.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),L=L.merge(C),M=M.merge(C.append("line").attr("stroke","currentColor").attr(h+"2",u*a)),R=R.merge(C.append("text").attr("fill","currentColor").attr(h,u*x).attr("dy",t===i4?"0em":t===_C?"0.71em":"0.32em")),p!==k&&(E=E.transition(p),L=L.transition(p),M=M.transition(p),R=R.transition(p),S=S.transition(p).attr("opacity",lG).attr("transform",function(T){return isFinite(T=_(T))?f(T+l):this.getAttribute("transform")}),C.attr("opacity",lG).attr("transform",function(T){var I=this.parentNode.__axis;return f((I&&isFinite(I=I(T))?I:_(T))+l)})),S.remove(),E.attr("d",t===n4||t===AC?s?"M"+u*s+","+b+"H"+l+"V"+w+"H"+u*s:"M"+l+","+b+"V"+w:s?"M"+b+","+u*s+"V"+l+"H"+w+"V"+u*s:"M"+b+","+l+"H"+w),L.attr("opacity",1).attr("transform",function(T){return f(_(T)+l)}),M.attr(h+"2",u*a),R.attr(h,u*x).text(m),k.filter(Yxe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===AC?"start":t===n4?"end":"middle"),k.each(function(){this.__axis=_})}return d.scale=function(p){return arguments.length?(e=p,d):e},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),d):r.slice()},d.tickValues=function(p){return arguments.length?(n=p==null?null:Array.from(p),d):n&&n.slice()},d.tickFormat=function(p){return arguments.length?(i=p,d):i},d.tickSize=function(p){return arguments.length?(a=s=+p,d):a},d.tickSizeInner=function(p){return arguments.length?(a=+p,d):a},d.tickSizeOuter=function(p){return arguments.length?(s=+p,d):s},d.tickPadding=function(p){return arguments.length?(o=+p,d):o},d.offset=function(p){return arguments.length?(l=+p,d):l},d}function LC(t){return cG(i4,t)}function RC(t){return cG(_C,t)}var i4,AC,_C,n4,lG,uG=F(()=>{oG();i4=1,AC=2,_C=3,n4=4,lG=1e-6});var hG=F(()=>{uG()});function dG(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new a4(r)}function a4(t){this._=t}function jxe(t,e){return t.trim().split(/^|\\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function Kxe(t,e){for(var r=0,n=t.length,i;r<n;++r)if((i=t[r]).name===e)return i.value}function fG(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=Xxe,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var Xxe,NC,pG=F(()=>{Xxe={value:()=>{}};a4.prototype=dG.prototype={constructor:a4,on:function(t,e){var r=this._,n=jxe(t+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a<s;)if((i=(t=n[a]).type)&&(i=Kxe(r[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<s;)if(i=(t=n[a]).type)r[i]=fG(r[i],t.name,e);else if(e==null)for(i in r)r[i]=fG(r[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new a4(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,a;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],n=0,i=a.length;n<i;++n)a[n].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)}};NC=dG});var IC=F(()=>{pG()});var s4,MC,DC=F(()=>{s4="http://www.w3.org/1999/xhtml",MC={svg:"http://www.w3.org/2000/svg",xhtml:s4,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Qc(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),MC.hasOwnProperty(e)?{space:MC[e],local:t}:t}var o4=F(()=>{DC()});function Zxe(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===s4&&e.documentElement.namespaceURI===s4?e.createElement(t):e.createElementNS(r,t)}}function Qxe(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function l4(t){var e=Qc(t);return(e.local?Qxe:Zxe)(e)}var OC=F(()=>{o4();DC()});function Jxe(){}function Bf(t){return t==null?Jxe:function(){return this.querySelector(t)}}var c4=F(()=>{});function gG(t){typeof t!="function"&&(t=Bf(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,o=n[i]=new Array(s),l,u,h=0;h<s;++h)(l=a[h])&&(u=t.call(l,l.__data__,h,a))&&("__data__"in l&&(u.__data__=l.__data__),o[h]=u);return new Kn(n,this._parents)}var mG=F(()=>{tl();c4()});function PC(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}var vG=F(()=>{});function ebe(){return[]}function M1(t){return t==null?ebe:function(){return this.querySelectorAll(t)}}var BC=F(()=>{});function tbe(t){return function(){return PC(t.apply(this,arguments))}}function yG(t){typeof t=="function"?t=tbe(t):t=M1(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a<r;++a)for(var s=e[a],o=s.length,l,u=0;u<o;++u)(l=s[u])&&(n.push(t.call(l,l.__data__,u,s)),i.push(l));return new Kn(n,i)}var xG=F(()=>{tl();vG();BC()});function D1(t){return function(){return this.matches(t)}}function u4(t){return function(e){return e.matches(t)}}var O1=F(()=>{});function nbe(t){return function(){return rbe.call(this.children,t)}}function ibe(){return this.firstElementChild}function bG(t){return this.select(t==null?ibe:nbe(typeof t=="function"?t:u4(t)))}var rbe,wG=F(()=>{O1();rbe=Array.prototype.find});function sbe(){return Array.from(this.children)}function obe(t){return function(){return abe.call(this.children,t)}}function kG(t){return this.selectAll(t==null?sbe:obe(typeof t=="function"?t:u4(t)))}var abe,TG=F(()=>{O1();abe=Array.prototype.filter});function EG(t){typeof t!="function"&&(t=D1(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,o=n[i]=[],l,u=0;u<s;++u)(l=a[u])&&t.call(l,l.__data__,u,a)&&o.push(l);return new Kn(n,this._parents)}var SG=F(()=>{tl();O1()});function h4(t){return new Array(t.length)}var FC=F(()=>{});function CG(){return new Kn(this._enter||this._groups.map(h4),this._parents)}function P1(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var zC=F(()=>{FC();tl();P1.prototype={constructor:P1,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}}});function AG(t){return function(){return t}}var _G=F(()=>{});function lbe(t,e,r,n,i,a){for(var s=0,o,l=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],n[s]=o):r[s]=new P1(t,a[s]);for(;s<l;++s)(o=e[s])&&(i[s]=o)}function cbe(t,e,r,n,i,a,s){var o,l,u=new Map,h=e.length,f=a.length,d=new Array(h),p;for(o=0;o<h;++o)(l=e[o])&&(d[o]=p=s.call(l,l.__data__,o,e)+"",u.has(p)?i[o]=l:u.set(p,l));for(o=0;o<f;++o)p=s.call(t,a[o],o,a)+"",(l=u.get(p))?(n[o]=l,l.__data__=a[o],u.delete(p)):r[o]=new P1(t,a[o]);for(o=0;o<h;++o)(l=e[o])&&u.get(d[o])===l&&(i[o]=l)}function ube(t){return t.__data__}function LG(t,e){if(!arguments.length)return Array.from(this,ube);var r=e?cbe:lbe,n=this._parents,i=this._groups;typeof t!="function"&&(t=AG(t));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),u=0;u<a;++u){var h=n[u],f=i[u],d=f.length,p=hbe(t.call(h,h&&h.__data__,u,n)),g=p.length,m=o[u]=new Array(g),x=s[u]=new Array(g),y=l[u]=new Array(d);r(h,f,m,x,y,p,e);for(var b=0,w=0,_,k;b<g;++b)if(_=m[b]){for(b>=w&&(w=b+1);!(k=x[w])&&++w<g;);_._next=k||null}}return s=new Kn(s,n),s._enter=o,s._exit=l,s}function hbe(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var RG=F(()=>{tl();zC();_G()});function NG(){return new Kn(this._exit||this._groups.map(h4),this._parents)}var IG=F(()=>{FC();tl()});function MG(t,e,r){var n=this.enter(),i=this,a=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}var DG=F(()=>{});function OG(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,s=Math.min(i,a),o=new Array(i),l=0;l<s;++l)for(var u=r[l],h=n[l],f=u.length,d=o[l]=new Array(f),p,g=0;g<f;++g)(p=u[g]||h[g])&&(d[g]=p);for(;l<i;++l)o[l]=r[l];return new Kn(o,this._parents)}var PG=F(()=>{tl()});function BG(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],i=n.length-1,a=n[i],s;--i>=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}var FG=F(()=>{});function zG(t){t||(t=fbe);function e(f,d){return f&&d?t(f.__data__,d.__data__):!f-!d}for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a){for(var s=r[a],o=s.length,l=i[a]=new Array(o),u,h=0;h<o;++h)(u=s[h])&&(l[h]=u);l.sort(e)}return new Kn(i,this._parents).order()}function fbe(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var $G=F(()=>{tl()});function GG(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var UG=F(()=>{});function VG(){return Array.from(this)}var WG=F(()=>{});function HG(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length;i<a;++i){var s=n[i];if(s)return s}return null}var qG=F(()=>{});function YG(){let t=0;for(let e of this)++t;return t}var XG=F(()=>{});function jG(){return!this.node()}var KG=F(()=>{});function ZG(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],a=0,s=i.length,o;a<s;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this}var QG=F(()=>{});function dbe(t){return function(){this.removeAttribute(t)}}function pbe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function gbe(t,e){return function(){this.setAttribute(t,e)}}function mbe(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function vbe(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function ybe(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function JG(t,e){var r=Qc(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?pbe:dbe:typeof e=="function"?r.local?ybe:vbe:r.local?mbe:gbe)(r,e))}var eU=F(()=>{o4()});function f4(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var $C=F(()=>{});function xbe(t){return function(){this.style.removeProperty(t)}}function bbe(t,e,r){return function(){this.style.setProperty(t,e,r)}}function wbe(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function tU(t,e,r){return arguments.length>1?this.each((e==null?xbe:typeof e=="function"?wbe:bbe)(t,e,r??"")):sh(this.node(),t)}function sh(t,e){return t.style.getPropertyValue(e)||f4(t).getComputedStyle(t,null).getPropertyValue(e)}var GC=F(()=>{$C()});function kbe(t){return function(){delete this[t]}}function Tbe(t,e){return function(){this[t]=e}}function Ebe(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function rU(t,e){return arguments.length>1?this.each((e==null?kbe:typeof e=="function"?Ebe:Tbe)(t,e)):this.node()[t]}var nU=F(()=>{});function iU(t){return t.trim().split(/^|\\s+/)}function UC(t){return t.classList||new aU(t)}function aU(t){this._node=t,this._names=iU(t.getAttribute("class")||"")}function sU(t,e){for(var r=UC(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function oU(t,e){for(var r=UC(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function Sbe(t){return function(){sU(this,t)}}function Cbe(t){return function(){oU(this,t)}}function Abe(t,e){return function(){(e.apply(this,arguments)?sU:oU)(this,t)}}function lU(t,e){var r=iU(t+"");if(arguments.length<2){for(var n=UC(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof e=="function"?Abe:e?Sbe:Cbe)(r,e))}var cU=F(()=>{aU.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}}});function _be(){this.textContent=""}function Lbe(t){return function(){this.textContent=t}}function Rbe(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function uU(t){return arguments.length?this.each(t==null?_be:(typeof t=="function"?Rbe:Lbe)(t)):this.node().textContent}var hU=F(()=>{});function Nbe(){this.innerHTML=""}function Ibe(t){return function(){this.innerHTML=t}}function Mbe(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function fU(t){return arguments.length?this.each(t==null?Nbe:(typeof t=="function"?Mbe:Ibe)(t)):this.node().innerHTML}var dU=F(()=>{});function Dbe(){this.nextSibling&&this.parentNode.appendChild(this)}function pU(){return this.each(Dbe)}var gU=F(()=>{});function Obe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mU(){return this.each(Obe)}var vU=F(()=>{});function yU(t){var e=typeof t=="function"?t:l4(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var xU=F(()=>{OC()});function Pbe(){return null}function bU(t,e){var r=typeof t=="function"?t:l4(t),n=e==null?Pbe:typeof e=="function"?e:Bf(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var wU=F(()=>{OC();c4()});function Bbe(){var t=this.parentNode;t&&t.removeChild(this)}function kU(){return this.each(Bbe)}var TU=F(()=>{});function Fbe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function zbe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function EU(t){return this.select(t?zbe:Fbe)}var SU=F(()=>{});function CU(t){return arguments.length?this.property("__data__",t):this.node().__data__}var AU=F(()=>{});function $be(t){return function(e){t.call(this,e,this.__data__)}}function Gbe(t){return t.trim().split(/^|\\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function Ube(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r<i;++r)a=e[r],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++n]=a;++n?e.length=n:delete this.__on}}}function Vbe(t,e,r){return function(){var n=this.__on,i,a=$be(e);if(n){for(var s=0,o=n.length;s<o;++s)if((i=n[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),i.value=e;return}}this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},n?n.push(i):this.__on=[i]}}function _U(t,e,r){var n=Gbe(t+""),i,a=n.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,u=o.length,h;l<u;++l)for(i=0,h=o[l];i<a;++i)if((s=n[i]).type===h.type&&s.name===h.name)return h.value}return}for(o=e?Vbe:Ube,i=0;i<a;++i)this.each(o(n[i],e,r));return this}var LU=F(()=>{});function RU(t,e,r){var n=f4(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Wbe(t,e){return function(){return RU(this,t,e)}}function Hbe(t,e){return function(){return RU(this,t,e.apply(this,arguments))}}function NU(t,e){return this.each((typeof e=="function"?Hbe:Wbe)(t,e))}var IU=F(()=>{$C()});function*MU(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length,s;i<a;++i)(s=n[i])&&(yield s)}var DU=F(()=>{});function Kn(t,e){this._groups=t,this._parents=e}function OU(){return new Kn([[document.documentElement]],VC)}function qbe(){return this}var VC,Jc,tl=F(()=>{mG();xG();wG();TG();SG();RG();zC();IG();DG();PG();FG();$G();UG();WG();qG();XG();KG();QG();eU();GC();nU();cU();hU();dU();gU();vU();xU();wU();TU();SU();AU();LU();IU();DU();VC=[null];Kn.prototype=OU.prototype={constructor:Kn,select:gG,selectAll:yG,selectChild:bG,selectChildren:kG,filter:EG,data:LG,enter:CG,exit:NG,join:MG,merge:OG,selection:qbe,order:BG,sort:zG,call:GG,nodes:VG,node:HG,size:YG,empty:jG,each:ZG,attr:JG,style:tU,property:rU,classed:lU,text:uU,html:fU,raise:pU,lower:mU,append:yU,insert:bU,remove:kU,clone:EU,datum:CU,on:_U,dispatch:NU,[Symbol.iterator]:MU};Jc=OU});function Ge(t){return typeof t=="string"?new Kn([[document.querySelector(t)]],[document.documentElement]):new Kn([[t]],VC)}var PU=F(()=>{tl()});var rl=F(()=>{O1();o4();PU();tl();c4();BC();GC()});var BU=F(()=>{});function Ff(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function tp(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}var WC=F(()=>{});function oh(){}function zU(){return this.rgb().formatHex()}function e4e(){return this.rgb().formatHex8()}function t4e(){return qU(this).formatHsl()}function $U(){return this.rgb().formatRgb()}function il(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Ybe.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?GU(e):r===3?new ji(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?d4(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?d4(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Xbe.exec(t))?new ji(e[1],e[2],e[3],1):(e=jbe.exec(t))?new ji(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Kbe.exec(t))?d4(e[1],e[2],e[3],e[4]):(e=Zbe.exec(t))?d4(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Qbe.exec(t))?WU(e[1],e[2]/100,e[3]/100,1):(e=Jbe.exec(t))?WU(e[1],e[2]/100,e[3]/100,e[4]):FU.hasOwnProperty(t)?GU(FU[t]):t==="transparent"?new ji(NaN,NaN,NaN,0):null}function GU(t){return new ji(t>>16&255,t>>8&255,t&255,1)}function d4(t,e,r,n){return n<=0&&(t=e=r=NaN),new ji(t,e,r,n)}function qC(t){return t instanceof oh||(t=il(t)),t?(t=t.rgb(),new ji(t.r,t.g,t.b,t.opacity)):new ji}function np(t,e,r,n){return arguments.length===1?qC(t):new ji(t,e,r,n??1)}function ji(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function UU(){return`#${zf(this.r)}${zf(this.g)}${zf(this.b)}`}function r4e(){return`#${zf(this.r)}${zf(this.g)}${zf(this.b)}${zf((isNaN(this.opacity)?1:this.opacity)*255)}`}function VU(){let t=m4(this.opacity);return`${t===1?"rgb(":"rgba("}${$f(this.r)}, ${$f(this.g)}, ${$f(this.b)}${t===1?")":`, ${t})`}`}function m4(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function $f(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function zf(t){return t=$f(t),(t<16?"0":"")+t.toString(16)}function WU(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new nl(t,e,r,n)}function qU(t){if(t instanceof nl)return new nl(t.h,t.s,t.l,t.opacity);if(t instanceof oh||(t=il(t)),!t)return new nl;if(t instanceof nl)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(e===a?s=(r-n)/o+(r<n)*6:r===a?s=(n-e)/o+2:s=(e-r)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new nl(s,o,l,t.opacity)}function YU(t,e,r,n){return arguments.length===1?qU(t):new nl(t,e,r,n??1)}function nl(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function HU(t){return t=(t||0)%360,t<0?t+360:t}function p4(t){return Math.max(0,Math.min(1,t||0))}function HC(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var B1,g4,rp,F1,ql,Ybe,Xbe,jbe,Kbe,Zbe,Qbe,Jbe,FU,YC=F(()=>{WC();B1=.7,g4=1/B1,rp="\\\\s*([+-]?\\\\d+)\\\\s*",F1="\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*",ql="\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*",Ybe=/^#([0-9a-f]{3,8})$/,Xbe=new RegExp(`^rgb\\\\(${rp},${rp},${rp}\\\\)$`),jbe=new RegExp(`^rgb\\\\(${ql},${ql},${ql}\\\\)$`),Kbe=new RegExp(`^rgba\\\\(${rp},${rp},${rp},${F1}\\\\)$`),Zbe=new RegExp(`^rgba\\\\(${ql},${ql},${ql},${F1}\\\\)$`),Qbe=new RegExp(`^hsl\\\\(${F1},${ql},${ql}\\\\)$`),Jbe=new RegExp(`^hsla\\\\(${F1},${ql},${ql},${F1}\\\\)$`),FU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ff(oh,il,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:zU,formatHex:zU,formatHex8:e4e,formatHsl:t4e,formatRgb:$U,toString:$U});Ff(ji,np,tp(oh,{brighter(t){return t=t==null?g4:Math.pow(g4,t),new ji(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?B1:Math.pow(B1,t),new ji(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ji($f(this.r),$f(this.g),$f(this.b),m4(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:UU,formatHex:UU,formatHex8:r4e,formatRgb:VU,toString:VU}));Ff(nl,YU,tp(oh,{brighter(t){return t=t==null?g4:Math.pow(g4,t),new nl(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?B1:Math.pow(B1,t),new nl(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new ji(HC(t>=240?t-240:t+120,i,n),HC(t,i,n),HC(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new nl(HU(this.h),p4(this.s),p4(this.l),m4(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=m4(this.opacity);return`${t===1?"hsl(":"hsla("}${HU(this.h)}, ${p4(this.s)*100}%, ${p4(this.l)*100}%${t===1?")":`, ${t})`}`}}))});var XU,jU,KU=F(()=>{XU=Math.PI/180,jU=180/Math.PI});function rV(t){if(t instanceof Yl)return new Yl(t.l,t.a,t.b,t.opacity);if(t instanceof eu)return nV(t);t instanceof ji||(t=qC(t));var e=ZC(t.r),r=ZC(t.g),n=ZC(t.b),i=XC((.2225045*e+.7168786*r+.0606169*n)/QU),a,s;return e===r&&r===n?a=s=i:(a=XC((.4360747*e+.3850649*r+.1430804*n)/ZU),s=XC((.0139322*e+.0971045*r+.7141733*n)/JU)),new Yl(116*i-16,500*(a-i),200*(i-s),t.opacity)}function QC(t,e,r,n){return arguments.length===1?rV(t):new Yl(t,e,r,n??1)}function Yl(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function XC(t){return t>n4e?Math.pow(t,1/3):t/tV+eV}function jC(t){return t>ip?t*t*t:tV*(t-eV)}function KC(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ZC(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function i4e(t){if(t instanceof eu)return new eu(t.h,t.c,t.l,t.opacity);if(t instanceof Yl||(t=rV(t)),t.a===0&&t.b===0)return new eu(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*jU;return new eu(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function z1(t,e,r,n){return arguments.length===1?i4e(t):new eu(t,e,r,n??1)}function eu(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function nV(t){if(isNaN(t.h))return new Yl(t.l,0,0,t.opacity);var e=t.h*XU;return new Yl(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}var v4,ZU,QU,JU,eV,ip,tV,n4e,iV=F(()=>{WC();YC();KU();v4=18,ZU=.96422,QU=1,JU=.82521,eV=4/29,ip=6/29,tV=3*ip*ip,n4e=ip*ip*ip;Ff(Yl,QC,tp(oh,{brighter(t){return new Yl(this.l+v4*(t??1),this.a,this.b,this.opacity)},darker(t){return new Yl(this.l-v4*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=ZU*jC(e),t=QU*jC(t),r=JU*jC(r),new ji(KC(3.1338561*e-1.6168667*t-.4906146*r),KC(-.9787684*e+1.9161415*t+.033454*r),KC(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));Ff(eu,z1,tp(oh,{brighter(t){return new eu(this.h,this.c,this.l+v4*(t??1),this.opacity)},darker(t){return new eu(this.h,this.c,this.l-v4*(t??1),this.opacity)},rgb(){return nV(this).rgb()}}))});var ap=F(()=>{YC();iV()});function JC(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}function aV(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],s=n>0?t[n-1]:2*i-a,o=n<e-1?t[n+2]:2*a-i;return JC((r-n/e)*e,s,i,a,o)}}var e7=F(()=>{});function sV(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],a=t[n%e],s=t[(n+1)%e],o=t[(n+2)%e];return JC((r-n/e)*e,i,a,s,o)}}var oV=F(()=>{e7()});var sp,t7=F(()=>{sp=t=>()=>t});function lV(t,e){return function(r){return t+r*e}}function a4e(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function cV(t,e){var r=e-t;return r?lV(t,r>180||r<-180?r-360*Math.round(r/360):r):sp(isNaN(t)?e:t)}function uV(t){return(t=+t)==1?tu:function(e,r){return r-e?a4e(e,r,t):sp(isNaN(e)?r:e)}}function tu(t,e){var r=e-t;return r?lV(t,r):sp(isNaN(t)?e:t)}var r7=F(()=>{t7()});function hV(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),s,o;for(s=0;s<r;++s)o=np(e[s]),n[s]=o.r||0,i[s]=o.g||0,a[s]=o.b||0;return n=t(n),i=t(i),a=t(a),o.opacity=1,function(l){return o.r=n(l),o.g=i(l),o.b=a(l),o+""}}}var Gf,s4e,o4e,n7=F(()=>{ap();e7();oV();r7();Gf=function t(e){var r=uV(e);function n(i,a){var s=r((i=np(i)).r,(a=np(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),u=tu(i.opacity,a.opacity);return function(h){return i.r=s(h),i.g=o(h),i.b=l(h),i.opacity=u(h),i+""}}return n.gamma=t,n}(1);s4e=hV(aV),o4e=hV(sV)});function fV(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n}}function dV(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var pV=F(()=>{});function gV(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=Uf(t[s],e[s]);for(;s<r;++s)a[s]=e[s];return function(o){for(s=0;s<n;++s)a[s]=i[s](o);return a}}var mV=F(()=>{y4()});function vV(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}var yV=F(()=>{});function Ki(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var $1=F(()=>{});function xV(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=Uf(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var bV=F(()=>{y4()});function l4e(t){return function(){return t}}function c4e(t){return function(e){return t(e)+""}}function G1(t,e){var r=a7.lastIndex=i7.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(t=t+"",e=e+"";(n=a7.exec(t))&&(i=i7.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:Ki(n,i)})),r=i7.lastIndex;return r<e.length&&(a=e.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?c4e(l[0].x):l4e(e):(e=l.length,function(u){for(var h=0,f;h<e;++h)o[(f=l[h]).i]=f.x(u);return o.join("")})}var a7,i7,s7=F(()=>{$1();a7=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,i7=new RegExp(a7.source,"g")});function Uf(t,e){var r=typeof e,n;return e==null||r==="boolean"?sp(e):(r==="number"?Ki:r==="string"?(n=il(e))?(e=n,Gf):G1:e instanceof il?Gf:e instanceof Date?vV:dV(e)?fV:Array.isArray(e)?gV:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?xV:Ki)(t,e)}var y4=F(()=>{ap();n7();mV();yV();$1();bV();s7();t7();pV()});function o7(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var wV=F(()=>{});function l7(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n<e*r&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*kV,skewX:Math.atan(l)*kV,scaleX:s,scaleY:o}}var kV,x4,TV=F(()=>{kV=180/Math.PI,x4={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function EV(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?x4:l7(e.a,e.b,e.c,e.d,e.e,e.f)}function SV(t){return t==null?x4:(b4||(b4=document.createElementNS("http://www.w3.org/2000/svg","g")),b4.setAttribute("transform",t),(t=b4.transform.baseVal.consolidate())?(t=t.matrix,l7(t.a,t.b,t.c,t.d,t.e,t.f)):x4)}var b4,CV=F(()=>{TV()});function AV(t,e,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,h,f,d,p,g){if(u!==f||h!==d){var m=p.push("translate(",null,e,null,r);g.push({i:m-4,x:Ki(u,f)},{i:m-2,x:Ki(h,d)})}else(f||d)&&p.push("translate("+f+e+d+r)}function s(u,h,f,d){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),d.push({i:f.push(i(f)+"rotate(",null,n)-2,x:Ki(u,h)})):h&&f.push(i(f)+"rotate("+h+n)}function o(u,h,f,d){u!==h?d.push({i:f.push(i(f)+"skewX(",null,n)-2,x:Ki(u,h)}):h&&f.push(i(f)+"skewX("+h+n)}function l(u,h,f,d,p,g){if(u!==f||h!==d){var m=p.push(i(p)+"scale(",null,",",null,")");g.push({i:m-4,x:Ki(u,f)},{i:m-2,x:Ki(h,d)})}else(f!==1||d!==1)&&p.push(i(p)+"scale("+f+","+d+")")}return function(u,h){var f=[],d=[];return u=t(u),h=t(h),a(u.translateX,u.translateY,h.translateX,h.translateY,f,d),s(u.rotate,h.rotate,f,d),o(u.skewX,h.skewX,f,d),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,d),u=h=null,function(p){for(var g=-1,m=d.length,x;++g<m;)f[(x=d[g]).i]=x.x(p);return f.join("")}}}var c7,u7,_V=F(()=>{$1();CV();c7=AV(EV,"px, ","px)","deg)"),u7=AV(SV,", ",")",")")});function LV(t){return function(e,r){var n=t((e=z1(e)).h,(r=z1(r)).h),i=tu(e.c,r.c),a=tu(e.l,r.l),s=tu(e.opacity,r.opacity);return function(o){return e.h=n(o),e.c=i(o),e.l=a(o),e.opacity=s(o),e+""}}}var h7,u4e,RV=F(()=>{ap();r7();h7=LV(cV),u4e=LV(tu)});var op=F(()=>{y4();$1();wV();s7();_V();n7();RV()});function Y1(){return Vf||(MV(h4e),Vf=H1.now()+T4)}function h4e(){Vf=0}function q1(){this._call=this._time=this._next=null}function E4(t,e,r){var n=new q1;return n.restart(t,e,r),n}function DV(){Y1(),++lp;for(var t=w4,e;t;)(e=Vf-t._time)>=0&&t._call.call(void 0,e),t=t._next;--lp}function NV(){Vf=(k4=H1.now())+T4,lp=V1=0;try{DV()}finally{lp=0,d4e(),Vf=0}}function f4e(){var t=H1.now(),e=t-k4;e>IV&&(T4-=e,k4=t)}function d4e(){for(var t,e=w4,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:w4=r);W1=t,f7(n)}function f7(t){if(!lp){V1&&(V1=clearTimeout(V1));var e=t-Vf;e>24?(t<1/0&&(V1=setTimeout(NV,t-H1.now()-T4)),U1&&(U1=clearInterval(U1))):(U1||(k4=H1.now(),U1=setInterval(f4e,IV)),lp=1,MV(NV))}}var lp,V1,U1,IV,w4,W1,k4,Vf,T4,H1,MV,d7=F(()=>{lp=0,V1=0,U1=0,IV=1e3,k4=0,Vf=0,T4=0,H1=typeof performance=="object"&&performance.now?performance:Date,MV=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};q1.prototype=E4.prototype={constructor:q1,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?Y1():+r)+(e==null?0:+e),!this._next&&W1!==this&&(W1?W1._next=this:w4=this,W1=this),this._call=t,this._time=r,f7()},stop:function(){this._call&&(this._call=null,this._time=1/0,f7())}}});function S4(t,e,r){var n=new q1;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var OV=F(()=>{d7()});var C4=F(()=>{d7();OV()});function lh(t,e,r,n,i,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;m4e(t,r,{name:e,index:n,group:i,on:p4e,tween:g4e,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:FV})}function j1(t,e){var r=Ei(t,e);if(r.state>FV)throw new Error("too late; already scheduled");return r}function Zi(t,e){var r=Ei(t,e);if(r.state>A4)throw new Error("too late; already running");return r}function Ei(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function m4e(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=E4(a,0,r.time);function a(u){r.state=PV,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var h,f,d,p;if(r.state!==PV)return l();for(h in n)if(p=n[h],p.name===r.name){if(p.state===A4)return S4(s);p.state===BV?(p.state=X1,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete n[h]):+h<e&&(p.state=X1,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete n[h])}if(S4(function(){r.state===A4&&(r.state=BV,r.timer.restart(o,r.delay,r.time),o(u))}),r.state=_4,r.on.call("start",t,t.__data__,r.index,r.group),r.state===_4){for(r.state=A4,i=new Array(d=r.tween.length),h=0,f=-1;h<d;++h)(p=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++f]=p);i.length=f+1}}function o(u){for(var h=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(l),r.state=L4,1),f=-1,d=i.length;++f<d;)i[f].call(t,h);r.state===L4&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=X1,r.timer.stop(),delete n[e];for(var u in n)return;delete t.__transition}}var p4e,g4e,FV,PV,_4,A4,BV,L4,X1,as=F(()=>{IC();C4();p4e=NC("start","end","cancel","interrupt"),g4e=[],FV=0,PV=1,_4=2,A4=3,BV=4,L4=5,X1=6});function R4(t,e){var r=t.__transition,n,i,a=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((n=r[s]).name!==e){a=!1;continue}i=n.state>_4&&n.state<L4,n.state=X1,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[s]}a&&delete t.__transition}}var zV=F(()=>{as()});function $V(t){return this.each(function(){R4(this,t)})}var GV=F(()=>{zV()});function v4e(t,e){var r,n;return function(){var i=Zi(this,t),a=i.tween;if(a!==r){n=r=a;for(var s=0,o=n.length;s<o;++s)if(n[s].name===e){n=n.slice(),n.splice(s,1);break}}i.tween=n}}function y4e(t,e,r){var n,i;if(typeof r!="function")throw new Error;return function(){var a=Zi(this,t),s=a.tween;if(s!==n){i=(n=s).slice();for(var o={name:e,value:r},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=o;break}l===u&&i.push(o)}a.tween=i}}function UV(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=Ei(this.node(),r).tween,i=0,a=n.length,s;i<a;++i)if((s=n[i]).name===t)return s.value;return null}return this.each((e==null?v4e:y4e)(r,t,e))}function cp(t,e,r){var n=t._id;return t.each(function(){var i=Zi(this,n);(i.value||(i.value={}))[e]=r.apply(this,arguments)}),function(i){return Ei(i,n).value[e]}}var K1=F(()=>{as()});function N4(t,e){var r;return(typeof e=="number"?Ki:e instanceof il?Gf:(r=il(e))?(e=r,Gf):G1)(t,e)}var p7=F(()=>{ap();op()});function x4e(t){return function(){this.removeAttribute(t)}}function b4e(t){return function(){this.removeAttributeNS(t.space,t.local)}}function w4e(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttribute(t);return s===i?null:s===n?a:a=e(n=s,r)}}function k4e(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===n?a:a=e(n=s,r)}}function T4e(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function E4e(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function VV(t,e){var r=Qc(t),n=r==="transform"?u7:N4;return this.attrTween(t,typeof e=="function"?(r.local?E4e:T4e)(r,n,cp(this,"attr."+t,e)):e==null?(r.local?b4e:x4e)(r):(r.local?k4e:w4e)(r,n,e))}var WV=F(()=>{op();rl();K1();p7()});function S4e(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function C4e(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function A4e(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&C4e(t,a)),r}return i._value=e,i}function _4e(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&S4e(t,a)),r}return i._value=e,i}function HV(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=Qc(t);return this.tween(r,(n.local?A4e:_4e)(n,e))}var qV=F(()=>{rl()});function L4e(t,e){return function(){j1(this,t).delay=+e.apply(this,arguments)}}function R4e(t,e){return e=+e,function(){j1(this,t).delay=e}}function YV(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?L4e:R4e)(e,t)):Ei(this.node(),e).delay}var XV=F(()=>{as()});function N4e(t,e){return function(){Zi(this,t).duration=+e.apply(this,arguments)}}function I4e(t,e){return e=+e,function(){Zi(this,t).duration=e}}function jV(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?N4e:I4e)(e,t)):Ei(this.node(),e).duration}var KV=F(()=>{as()});function M4e(t,e){if(typeof e!="function")throw new Error;return function(){Zi(this,t).ease=e}}function ZV(t){var e=this._id;return arguments.length?this.each(M4e(e,t)):Ei(this.node(),e).ease}var QV=F(()=>{as()});function D4e(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Zi(this,t).ease=r}}function JV(t){if(typeof t!="function")throw new Error;return this.each(D4e(this._id,t))}var eW=F(()=>{as()});function tW(t){typeof t!="function"&&(t=D1(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,o=n[i]=[],l,u=0;u<s;++u)(l=a[u])&&t.call(l,l.__data__,u,a)&&o.push(l);return new Fa(n,this._parents,this._name,this._id)}var rW=F(()=>{rl();Wf()});function nW(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,a=Math.min(n,i),s=new Array(n),o=0;o<a;++o)for(var l=e[o],u=r[o],h=l.length,f=s[o]=new Array(h),d,p=0;p<h;++p)(d=l[p]||u[p])&&(f[p]=d);for(;o<n;++o)s[o]=e[o];return new Fa(s,this._parents,this._name,this._id)}var iW=F(()=>{Wf()});function O4e(t){return(t+"").trim().split(/^|\\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function P4e(t,e,r){var n,i,a=O4e(e)?j1:Zi;return function(){var s=a(this,t),o=s.on;o!==n&&(i=(n=o).copy()).on(e,r),s.on=i}}function aW(t,e){var r=this._id;return arguments.length<2?Ei(this.node(),r).on.on(t):this.each(P4e(r,t,e))}var sW=F(()=>{as()});function B4e(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function oW(){return this.on("end.remove",B4e(this._id))}var lW=F(()=>{});function cW(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Bf(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var o=n[s],l=o.length,u=a[s]=new Array(l),h,f,d=0;d<l;++d)(h=o[d])&&(f=t.call(h,h.__data__,d,o))&&("__data__"in h&&(f.__data__=h.__data__),u[d]=f,lh(u[d],e,r,d,u,Ei(h,r)));return new Fa(a,this._parents,e,r)}var uW=F(()=>{rl();Wf();as()});function hW(t){var e=this._name,r=this._id;typeof t!="function"&&(t=M1(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o<i;++o)for(var l=n[o],u=l.length,h,f=0;f<u;++f)if(h=l[f]){for(var d=t.call(h,h.__data__,f,l),p,g=Ei(h,r),m=0,x=d.length;m<x;++m)(p=d[m])&&lh(p,e,r,m,d,g);a.push(d),s.push(h)}return new Fa(a,s,e,r)}var fW=F(()=>{rl();Wf();as()});function dW(){return new F4e(this._groups,this._parents)}var F4e,pW=F(()=>{rl();F4e=Jc.prototype.constructor});function z4e(t,e){var r,n,i;return function(){var a=sh(this,t),s=(this.style.removeProperty(t),sh(this,t));return a===s?null:a===r&&s===n?i:i=e(r=a,n=s)}}function gW(t){return function(){this.style.removeProperty(t)}}function $4e(t,e,r){var n,i=r+"",a;return function(){var s=sh(this,t);return s===i?null:s===n?a:a=e(n=s,r)}}function G4e(t,e,r){var n,i,a;return function(){var s=sh(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),sh(this,t))),s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o))}}function U4e(t,e){var r,n,i,a="style."+e,s="end."+a,o;return function(){var l=Zi(this,t),u=l.on,h=l.value[a]==null?o||(o=gW(e)):void 0;(u!==r||i!==h)&&(n=(r=u).copy()).on(s,i=h),l.on=n}}function mW(t,e,r){var n=(t+="")=="transform"?c7:N4;return e==null?this.styleTween(t,z4e(t,n)).on("end.style."+t,gW(t)):typeof e=="function"?this.styleTween(t,G4e(t,n,cp(this,"style."+t,e))).each(U4e(this._id,t)):this.styleTween(t,$4e(t,n,e),r).on("end.style."+t,null)}var vW=F(()=>{op();rl();as();K1();p7()});function V4e(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function W4e(t,e,r){var n,i;function a(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&V4e(t,s,r)),n}return a._value=e,a}function yW(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,W4e(t,e,r??""))}var xW=F(()=>{});function H4e(t){return function(){this.textContent=t}}function q4e(t){return function(){var e=t(this);this.textContent=e??""}}function bW(t){return this.tween("text",typeof t=="function"?q4e(cp(this,"text",t)):H4e(t==null?"":t+""))}var wW=F(()=>{K1()});function Y4e(t){return function(e){this.textContent=t.call(this,e)}}function X4e(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&Y4e(i)),e}return n._value=t,n}function kW(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,X4e(t))}var TW=F(()=>{});function EW(){for(var t=this._name,e=this._id,r=I4(),n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,l,u=0;u<o;++u)if(l=s[u]){var h=Ei(l,e);lh(l,t,r,u,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Fa(n,this._parents,t,r)}var SW=F(()=>{Wf();as()});function CW(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};r.each(function(){var u=Zi(this,n),h=u.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),i===0&&a()})}var AW=F(()=>{as()});function Fa(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function _W(t){return Jc().transition(t)}function I4(){return++j4e}var j4e,ru,Wf=F(()=>{rl();WV();qV();XV();KV();QV();eW();rW();iW();sW();lW();uW();fW();pW();vW();xW();wW();TW();SW();K1();AW();j4e=0;ru=Jc.prototype;Fa.prototype=_W.prototype={constructor:Fa,select:cW,selectAll:hW,selectChild:ru.selectChild,selectChildren:ru.selectChildren,filter:tW,merge:nW,selection:dW,transition:EW,call:ru.call,nodes:ru.nodes,node:ru.node,size:ru.size,empty:ru.empty,each:ru.each,on:aW,attr:VV,attrTween:HV,style:mW,styleTween:yW,text:bW,textTween:kW,remove:oW,tween:UV,delay:YV,duration:jV,ease:ZV,easeVarying:JV,end:CW,[Symbol.iterator]:ru[Symbol.iterator]}});function M4(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var LW=F(()=>{});var g7=F(()=>{LW()});function Z4e(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function RW(t){var e,r;t instanceof Fa?(e=t._id,t=t._name):(e=I4(),(r=K4e).time=Y1(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,l,u=0;u<o;++u)(l=s[u])&&lh(l,t,e,u,s,r||Z4e(l,e));return new Fa(n,this._parents,t,e)}var K4e,NW=F(()=>{Wf();as();g7();C4();K4e={time:null,delay:0,duration:250,ease:M4}});var IW=F(()=>{rl();GV();NW();Jc.prototype.interrupt=$V;Jc.prototype.transition=RW});var D4=F(()=>{IW()});var MW=F(()=>{});var DW=F(()=>{});var OW=F(()=>{});function PW(t){return[+t[0],+t[1]]}function Q4e(t){return[PW(t[0]),PW(t[1])]}function m7(t){return{type:t}}var Zct,Qct,Jct,eut,tut,rut,BW=F(()=>{D4();MW();DW();OW();({abs:Zct,max:Qct,min:Jct}=Math);eut={name:"x",handles:["w","e"].map(m7),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},tut={name:"y",handles:["n","s"].map(m7),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},rut={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(m7),input:function(t){return t==null?null:Q4e(t)},output:function(t){return t}}});var FW=F(()=>{BW()});function zW(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function e3e(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return zW;let r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}function $W(){return new qf}var v7,y7,Hf,J4e,qf,GW=F(()=>{v7=Math.PI,y7=2*v7,Hf=1e-6,J4e=y7-Hf;qf=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?zW:e3e(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=n-e,u=i-r,h=s-e,f=o-r,d=h*h+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(d>Hf)if(!(Math.abs(f*l-u*h)>Hf)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let p=n-s,g=i-o,m=l*l+u*u,x=p*p+g*g,y=Math.sqrt(m),b=Math.sqrt(d),w=a*Math.tan((v7-Math.acos((m+d-x)/(2*y*b)))/2),_=w/b,k=w/y;Math.abs(_-1)>Hf&&this._append`L${e+_*h},${r+_*f}`,this._append`A${a},${a},0,0,${+(f*p>h*g)},${this._x1=e+k*l},${this._y1=r+k*u}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),l=n*Math.sin(i),u=e+o,h=r+l,f=1^s,d=s?i-a:a-i;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>Hf||Math.abs(this._y1-h)>Hf)&&this._append`L${u},${h}`,n&&(d<0&&(d=d%y7+y7),d>J4e?this._append`A${n},${n},0,1,${f},${e-o},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=h}`:d>Hf&&this._append`A${n},${n},0,${+(d>=v7)},${f},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};$W.prototype=qf.prototype});var x7=F(()=>{GW()});var UW=F(()=>{});var VW=F(()=>{});var WW=F(()=>{});var HW=F(()=>{});var qW=F(()=>{});var YW=F(()=>{});var XW=F(()=>{});function jW(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Yf(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}var Z1=F(()=>{});function Xl(t){return t=Yf(Math.abs(t)),t?t[1]:NaN}var Q1=F(()=>{Z1()});function KW(t,e){return function(r,n){for(var i=r.length,a=[],s=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=t[s=(s+1)%t.length];return a.reverse().join(e)}}var ZW=F(()=>{});function QW(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var JW=F(()=>{});function ch(t){if(!(e=t3e.exec(t)))throw new Error("invalid format: "+t);var e;return new O4({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function O4(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}var t3e,b7=F(()=>{t3e=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;ch.prototype=O4.prototype;O4.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type}});function eH(t){e:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var tH=F(()=>{});function rH(t,e){var r=Yf(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(w7=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Yf(t,Math.max(0,e+a-1))[0]}var w7,k7=F(()=>{Z1()});function T7(t,e){var r=Yf(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var nH=F(()=>{Z1()});var E7,iH=F(()=>{Z1();k7();nH();E7={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:jW,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>T7(t*100,e),r:T7,s:rH,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)}});function S7(t){return t}var aH=F(()=>{});function lH(t){var e=t.grouping===void 0||t.thousands===void 0?S7:KW(sH.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?S7:QW(sH.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"\\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=ch(f);var d=f.fill,p=f.align,g=f.sign,m=f.symbol,x=f.zero,y=f.width,b=f.comma,w=f.precision,_=f.trim,k=f.type;k==="n"?(b=!0,k="g"):E7[k]||(w===void 0&&(w=12),_=!0,k="g"),(x||d==="0"&&p==="=")&&(x=!0,d="0",p="=");var E=m==="$"?r:m==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",L=m==="$"?n:/[%p]/.test(k)?s:"",S=E7[k],C=/[defgprs%]/.test(k);w=w===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(R){var T=E,I=L,A,D,N;if(k==="c")I=S(R)+I,R="";else{R=+R;var O=R<0||1/R<0;if(R=isNaN(R)?l:S(Math.abs(R),w),_&&(R=eH(R)),O&&+R==0&&g!=="+"&&(O=!1),T=(O?g==="("?g:o:g==="-"||g==="("?"":g)+T,I=(k==="s"?oH[8+w7/3]:"")+I+(O&&g==="("?")":""),C){for(A=-1,D=R.length;++A<D;)if(N=R.charCodeAt(A),48>N||N>57){I=(N===46?i+R.slice(A+1):R.slice(A))+I,R=R.slice(0,A);break}}}b&&!x&&(R=e(R,1/0));var B=T.length+R.length+I.length,P=B<y?new Array(y-B+1).join(d):"";switch(b&&x&&(R=e(P+R,P.length?y-I.length:1/0),P=""),p){case"<":R=T+R+I+P;break;case"=":R=T+P+R+I;break;case"^":R=P.slice(0,B=P.length>>1)+T+R+I+P.slice(B);break;default:R=P+T+R+I;break}return a(R)}return M.toString=function(){return f+""},M}function h(f,d){var p=u((f=ch(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Xl(d)/3)))*3,m=Math.pow(10,-g),x=oH[8+g/3];return function(y){return p(m*y)+x}}return{format:u,formatPrefix:h}}var sH,oH,cH=F(()=>{Q1();ZW();JW();b7();tH();iH();k7();aH();sH=Array.prototype.map,oH=["y","z","a","f","p","n","\\xB5","m","","k","M","G","T","P","E","Z","Y"]});function C7(t){return P4=lH(t),B4=P4.format,F4=P4.formatPrefix,P4}var P4,B4,F4,uH=F(()=>{cH();C7({thousands:",",grouping:[3],currency:["$",""]})});function A7(t){return Math.max(0,-Xl(Math.abs(t)))}var hH=F(()=>{Q1()});function _7(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Xl(e)/3)))*3-Xl(Math.abs(t)))}var fH=F(()=>{Q1()});function L7(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Xl(e)-Xl(t))+1}var dH=F(()=>{Q1()});var R7=F(()=>{uH();b7();hH();fH();dH()});var pH=F(()=>{});var gH=F(()=>{});var mH=F(()=>{});var vH=F(()=>{});function uh(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var J1=F(()=>{});function nu(){var t=new J0,e=[],r=[],n=N7;function i(a){let s=t.get(a);if(s===void 0){if(n!==N7)return n;t.set(a,s=e.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new J0;for(let s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return nu(e,r).unknown(n)},uh.apply(i,arguments),i}var N7,I7=F(()=>{ah();J1();N7=Symbol("implicit")});function up(){var t=nu().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,o=!1,l=0,u=0,h=.5;delete t.unknown;function f(){var d=e().length,p=i<n,g=p?i:n,m=p?n:i;a=(m-g)/Math.max(1,d-l+u*2),o&&(a=Math.floor(a)),g+=(m-g-a*(d-l))*h,s=a*(1-l),o&&(g=Math.round(g),s=Math.round(s));var x=r4(d).map(function(y){return g+a*y});return r(p?x.reverse():x)}return t.domain=function(d){return arguments.length?(e(d),f()):e()},t.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,f()):[n,i]},t.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,o=!0,f()},t.bandwidth=function(){return s},t.step=function(){return a},t.round=function(d){return arguments.length?(o=!!d,f()):o},t.padding=function(d){return arguments.length?(l=Math.min(1,u=+d),f()):l},t.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),f()):l},t.paddingOuter=function(d){return arguments.length?(u=+d,f()):u},t.align=function(d){return arguments.length?(h=Math.max(0,Math.min(1,d)),f()):h},t.copy=function(){return up(e(),[n,i]).round(o).paddingInner(l).paddingOuter(u).align(h)},uh.apply(f(),arguments)}var yH=F(()=>{ah();J1();I7()});function M7(t){return function(){return t}}var xH=F(()=>{});function D7(t){return+t}var bH=F(()=>{});function hp(t){return t}function O7(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:M7(isNaN(e)?NaN:.5)}function r3e(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function n3e(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i<n?(n=O7(i,n),a=r(s,a)):(n=O7(n,i),a=r(a,s)),function(o){return a(n(o))}}function i3e(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=O7(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(o){var l=CC(t,o,1,n)-1;return a[l](i[l](o))}}function z4(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function a3e(){var t=wH,e=wH,r=Uf,n,i,a,s=hp,o,l,u;function h(){var d=Math.min(t.length,e.length);return s!==hp&&(s=r3e(t[0],t[d-1])),o=d>2?i3e:n3e,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=o(t.map(n),e,r)))(n(s(d)))}return f.invert=function(d){return s(i((u||(u=o(e,t.map(n),Ki)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,D7),h()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),h()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=o7,h()},f.clamp=function(d){return arguments.length?(s=d?!0:hp,h()):s!==hp},f.interpolate=function(d){return arguments.length?(r=d,h()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,p){return n=d,i=p,h()}}function ev(){return a3e()(hp,hp)}var wH,P7=F(()=>{ah();op();xH();bH();wH=[0,1]});function B7(t,e,r,n){var i=ep(t,e,r),a;switch(n=ch(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=_7(i,s))&&(n.precision=a),F4(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=L7(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=A7(i))&&(n.precision=a-(n.type==="%")*2);break}}return B4(n)}var kH=F(()=>{ah();R7()});function s3e(t){var e=t.domain;return t.ticks=function(r){var n=e();return Jb(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return B7(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],o=n[a],l,u,h=10;for(o<s&&(u=s,s=o,o=u,u=i,i=a,a=u);h-- >0;){if(u=I1(s,o,r),u===l)return n[i]=s,n[a]=o,e(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function al(){var t=ev();return t.copy=function(){return z4(t,al())},uh.apply(t,arguments),s3e(t)}var TH=F(()=>{ah();P7();J1();kH()});function F7(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),t[r]=e.floor(i),t[n]=e.ceil(a),t}var EH=F(()=>{});function un(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{let s=i(a),o=i.ceil(a);return a-s<o-a?s:o},i.offset=(a,s)=>(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{let l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return l;let u;do l.push(u=new Date(+a)),e(a,o),t(a);while(u<a&&a<s);return l},i.filter=a=>un(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!a(s););else for(;--o>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(z7.setTime(+a),$7.setTime(+s),t(z7),t($7),Math.floor(r(z7,$7))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}var z7,$7,iu=F(()=>{z7=new Date,$7=new Date});var jl,SH,G7=F(()=>{iu();jl=un(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);jl.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?un(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):jl);SH=jl.range});var Ps,CH,U7=F(()=>{iu();Ps=un(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),CH=Ps.range});var au,o3e,$4,l3e,V7=F(()=>{iu();au=un(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),o3e=au.range,$4=un(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),l3e=$4.range});var su,c3e,G4,u3e,W7=F(()=>{iu();su=un(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),c3e=su.range,G4=un(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),u3e=G4.range});var po,h3e,rv,f3e,U4,d3e,H7=F(()=>{iu();po=un(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),h3e=po.range,rv=un(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),f3e=rv.range,U4=un(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),d3e=U4.range});function Kf(t){return un(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}function Zf(t){return un(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var sl,hh,V4,W4,Zl,H4,q4,_H,p3e,g3e,m3e,v3e,y3e,x3e,Qf,fp,LH,RH,fh,NH,IH,MH,b3e,w3e,k3e,T3e,E3e,S3e,q7=F(()=>{iu();sl=Kf(0),hh=Kf(1),V4=Kf(2),W4=Kf(3),Zl=Kf(4),H4=Kf(5),q4=Kf(6),_H=sl.range,p3e=hh.range,g3e=V4.range,m3e=W4.range,v3e=Zl.range,y3e=H4.range,x3e=q4.range;Qf=Zf(0),fp=Zf(1),LH=Zf(2),RH=Zf(3),fh=Zf(4),NH=Zf(5),IH=Zf(6),MH=Qf.range,b3e=fp.range,w3e=LH.range,k3e=RH.range,T3e=fh.range,E3e=NH.range,S3e=IH.range});var ou,C3e,Y4,A3e,Y7=F(()=>{iu();ou=un(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),C3e=ou.range,Y4=un(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),A3e=Y4.range});var Bs,_3e,ol,L3e,X7=F(()=>{iu();Bs=un(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Bs.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:un(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});_3e=Bs.range,ol=un(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());ol.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:un(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});L3e=ol.range});function OH(t,e,r,n,i,a){let s=[[Ps,1,1e3],[Ps,5,5*1e3],[Ps,15,15*1e3],[Ps,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function o(u,h,f){let d=h<u;d&&([u,h]=[h,u]);let p=f&&typeof f.range=="function"?f:l(u,h,f),g=p?p.range(u,+h+1):[];return d?g.reverse():g}function l(u,h,f){let d=Math.abs(h-u)/f,p=Pf(([,,x])=>x).right(s,d);if(p===s.length)return t.every(ep(u/31536e6,h/31536e6,f));if(p===0)return jl.every(Math.max(ep(u,h,f),1));let[g,m]=s[d/s[p-1][2]<s[p][2]/d?p-1:p];return g.every(m)}return[o,l]}var N3e,I3e,j7,K7,PH=F(()=>{ah();G7();U7();V7();W7();H7();q7();Y7();X7();[N3e,I3e]=OH(ol,Y4,Qf,U4,G4,$4),[j7,K7]=OH(Bs,ou,sl,po,su,au)});var X4=F(()=>{G7();U7();V7();W7();H7();q7();Y7();X7();PH()});function Z7(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Q7(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function nv(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function J7(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,u=iv(i),h=av(i),f=iv(a),d=av(a),p=iv(s),g=av(s),m=iv(o),x=av(o),y=iv(l),b=av(l),w={a:O,A:B,b:P,B:$,c:null,d:UH,e:UH,f:t5e,g:h5e,G:d5e,H:Q3e,I:J3e,j:e5e,L:YH,m:r5e,M:n5e,p:z,q:H,Q:HH,s:qH,S:i5e,u:a5e,U:s5e,V:o5e,w:l5e,W:c5e,x:null,X:null,y:u5e,Y:f5e,Z:p5e,"%":WH},_={a:Z,A:X,b:ie,B:K,c:null,d:VH,e:VH,f:y5e,g:_5e,G:R5e,H:g5e,I:m5e,j:v5e,L:jH,m:x5e,M:b5e,p:ee,q:J,Q:HH,s:qH,S:w5e,u:k5e,U:T5e,V:E5e,w:S5e,W:C5e,x:null,X:null,y:A5e,Y:L5e,Z:N5e,"%":WH},k={a:M,A:R,b:T,B:I,c:A,d:$H,e:$H,f:X3e,g:zH,G:FH,H:GH,I:GH,j:W3e,L:Y3e,m:V3e,M:H3e,p:C,q:U3e,Q:K3e,s:Z3e,S:q3e,u:B3e,U:F3e,V:z3e,w:P3e,W:$3e,x:D,X:N,y:zH,Y:FH,Z:G3e,"%":j3e};w.x=E(r,w),w.X=E(n,w),w.c=E(e,w),_.x=E(r,_),_.X=E(n,_),_.c=E(e,_);function E(W,Y){return function(Q){var se=[],ue=-1,ce=0,te=W.length,Le,oe,be;for(Q instanceof Date||(Q=new Date(+Q));++ue<te;)W.charCodeAt(ue)===37&&(se.push(W.slice(ce,ue)),(oe=BH[Le=W.charAt(++ue)])!=null?Le=W.charAt(++ue):oe=Le==="e"?" ":"0",(be=Y[Le])&&(Le=be(Q,oe)),se.push(Le),ce=ue+1);return se.push(W.slice(ce,ue)),se.join("")}}function L(W,Y){return function(Q){var se=nv(1900,void 0,1),ue=S(se,W,Q+="",0),ce,te;if(ue!=Q.length)return null;if("Q"in se)return new Date(se.Q);if("s"in se)return new Date(se.s*1e3+("L"in se?se.L:0));if(Y&&!("Z"in se)&&(se.Z=0),"p"in se&&(se.H=se.H%12+se.p*12),se.m===void 0&&(se.m="q"in se?se.q:0),"V"in se){if(se.V<1||se.V>53)return null;"w"in se||(se.w=1),"Z"in se?(ce=Q7(nv(se.y,0,1)),te=ce.getUTCDay(),ce=te>4||te===0?fp.ceil(ce):fp(ce),ce=rv.offset(ce,(se.V-1)*7),se.y=ce.getUTCFullYear(),se.m=ce.getUTCMonth(),se.d=ce.getUTCDate()+(se.w+6)%7):(ce=Z7(nv(se.y,0,1)),te=ce.getDay(),ce=te>4||te===0?hh.ceil(ce):hh(ce),ce=po.offset(ce,(se.V-1)*7),se.y=ce.getFullYear(),se.m=ce.getMonth(),se.d=ce.getDate()+(se.w+6)%7)}else("W"in se||"U"in se)&&("w"in se||(se.w="u"in se?se.u%7:"W"in se?1:0),te="Z"in se?Q7(nv(se.y,0,1)).getUTCDay():Z7(nv(se.y,0,1)).getDay(),se.m=0,se.d="W"in se?(se.w+6)%7+se.W*7-(te+5)%7:se.w+se.U*7-(te+6)%7);return"Z"in se?(se.H+=se.Z/100|0,se.M+=se.Z%100,Q7(se)):Z7(se)}}function S(W,Y,Q,se){for(var ue=0,ce=Y.length,te=Q.length,Le,oe;ue<ce;){if(se>=te)return-1;if(Le=Y.charCodeAt(ue++),Le===37){if(Le=Y.charAt(ue++),oe=k[Le in BH?Y.charAt(ue++):Le],!oe||(se=oe(W,Q,se))<0)return-1}else if(Le!=Q.charCodeAt(se++))return-1}return se}function C(W,Y,Q){var se=u.exec(Y.slice(Q));return se?(W.p=h.get(se[0].toLowerCase()),Q+se[0].length):-1}function M(W,Y,Q){var se=p.exec(Y.slice(Q));return se?(W.w=g.get(se[0].toLowerCase()),Q+se[0].length):-1}function R(W,Y,Q){var se=f.exec(Y.slice(Q));return se?(W.w=d.get(se[0].toLowerCase()),Q+se[0].length):-1}function T(W,Y,Q){var se=y.exec(Y.slice(Q));return se?(W.m=b.get(se[0].toLowerCase()),Q+se[0].length):-1}function I(W,Y,Q){var se=m.exec(Y.slice(Q));return se?(W.m=x.get(se[0].toLowerCase()),Q+se[0].length):-1}function A(W,Y,Q){return S(W,e,Y,Q)}function D(W,Y,Q){return S(W,r,Y,Q)}function N(W,Y,Q){return S(W,n,Y,Q)}function O(W){return s[W.getDay()]}function B(W){return a[W.getDay()]}function P(W){return l[W.getMonth()]}function $(W){return o[W.getMonth()]}function z(W){return i[+(W.getHours()>=12)]}function H(W){return 1+~~(W.getMonth()/3)}function Z(W){return s[W.getUTCDay()]}function X(W){return a[W.getUTCDay()]}function ie(W){return l[W.getUTCMonth()]}function K(W){return o[W.getUTCMonth()]}function ee(W){return i[+(W.getUTCHours()>=12)]}function J(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var Y=E(W+="",w);return Y.toString=function(){return W},Y},parse:function(W){var Y=L(W+="",!1);return Y.toString=function(){return W},Y},utcFormat:function(W){var Y=E(W+="",_);return Y.toString=function(){return W},Y},utcParse:function(W){var Y=L(W+="",!0);return Y.toString=function(){return W},Y}}}function Pr(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function O3e(t){return t.replace(D3e,"\\\\$&")}function iv(t){return new RegExp("^(?:"+t.map(O3e).join("|")+")","i")}function av(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function P3e(t,e,r){var n=$i.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function B3e(t,e,r){var n=$i.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function F3e(t,e,r){var n=$i.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function z3e(t,e,r){var n=$i.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function $3e(t,e,r){var n=$i.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function FH(t,e,r){var n=$i.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function zH(t,e,r){var n=$i.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function G3e(t,e,r){var n=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function U3e(t,e,r){var n=$i.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function V3e(t,e,r){var n=$i.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function $H(t,e,r){var n=$i.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function W3e(t,e,r){var n=$i.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function GH(t,e,r){var n=$i.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function H3e(t,e,r){var n=$i.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function q3e(t,e,r){var n=$i.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Y3e(t,e,r){var n=$i.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function X3e(t,e,r){var n=$i.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function j3e(t,e,r){var n=M3e.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function K3e(t,e,r){var n=$i.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Z3e(t,e,r){var n=$i.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function UH(t,e){return Pr(t.getDate(),e,2)}function Q3e(t,e){return Pr(t.getHours(),e,2)}function J3e(t,e){return Pr(t.getHours()%12||12,e,2)}function e5e(t,e){return Pr(1+po.count(Bs(t),t),e,3)}function YH(t,e){return Pr(t.getMilliseconds(),e,3)}function t5e(t,e){return YH(t,e)+"000"}function r5e(t,e){return Pr(t.getMonth()+1,e,2)}function n5e(t,e){return Pr(t.getMinutes(),e,2)}function i5e(t,e){return Pr(t.getSeconds(),e,2)}function a5e(t){var e=t.getDay();return e===0?7:e}function s5e(t,e){return Pr(sl.count(Bs(t)-1,t),e,2)}function XH(t){var e=t.getDay();return e>=4||e===0?Zl(t):Zl.ceil(t)}function o5e(t,e){return t=XH(t),Pr(Zl.count(Bs(t),t)+(Bs(t).getDay()===4),e,2)}function l5e(t){return t.getDay()}function c5e(t,e){return Pr(hh.count(Bs(t)-1,t),e,2)}function u5e(t,e){return Pr(t.getFullYear()%100,e,2)}function h5e(t,e){return t=XH(t),Pr(t.getFullYear()%100,e,2)}function f5e(t,e){return Pr(t.getFullYear()%1e4,e,4)}function d5e(t,e){var r=t.getDay();return t=r>=4||r===0?Zl(t):Zl.ceil(t),Pr(t.getFullYear()%1e4,e,4)}function p5e(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Pr(e/60|0,"0",2)+Pr(e%60,"0",2)}function VH(t,e){return Pr(t.getUTCDate(),e,2)}function g5e(t,e){return Pr(t.getUTCHours(),e,2)}function m5e(t,e){return Pr(t.getUTCHours()%12||12,e,2)}function v5e(t,e){return Pr(1+rv.count(ol(t),t),e,3)}function jH(t,e){return Pr(t.getUTCMilliseconds(),e,3)}function y5e(t,e){return jH(t,e)+"000"}function x5e(t,e){return Pr(t.getUTCMonth()+1,e,2)}function b5e(t,e){return Pr(t.getUTCMinutes(),e,2)}function w5e(t,e){return Pr(t.getUTCSeconds(),e,2)}function k5e(t){var e=t.getUTCDay();return e===0?7:e}function T5e(t,e){return Pr(Qf.count(ol(t)-1,t),e,2)}function KH(t){var e=t.getUTCDay();return e>=4||e===0?fh(t):fh.ceil(t)}function E5e(t,e){return t=KH(t),Pr(fh.count(ol(t),t)+(ol(t).getUTCDay()===4),e,2)}function S5e(t){return t.getUTCDay()}function C5e(t,e){return Pr(fp.count(ol(t)-1,t),e,2)}function A5e(t,e){return Pr(t.getUTCFullYear()%100,e,2)}function _5e(t,e){return t=KH(t),Pr(t.getUTCFullYear()%100,e,2)}function L5e(t,e){return Pr(t.getUTCFullYear()%1e4,e,4)}function R5e(t,e){var r=t.getUTCDay();return t=r>=4||r===0?fh(t):fh.ceil(t),Pr(t.getUTCFullYear()%1e4,e,4)}function N5e(){return"+0000"}function WH(){return"%"}function HH(t){return+t}function qH(t){return Math.floor(+t/1e3)}var BH,$i,M3e,D3e,ZH=F(()=>{X4();BH={"-":"",_:" ",0:"0"},$i=/^\\s*\\d+/,M3e=/^%/,D3e=/[\\\\^$*+?|[\\]().{}]/g});function e8(t){return dp=J7(t),Jf=dp.format,QH=dp.parse,JH=dp.utcFormat,eq=dp.utcParse,dp}var dp,Jf,QH,JH,eq,tq=F(()=>{ZH();e8({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})});var t8=F(()=>{tq()});function I5e(t){return new Date(t)}function M5e(t){return t instanceof Date?+t:+new Date(+t)}function rq(t,e,r,n,i,a,s,o,l,u){var h=ev(),f=h.invert,d=h.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),x=u("%I %p"),y=u("%a %d"),b=u("%b %d"),w=u("%B"),_=u("%Y");function k(E){return(l(E)<E?p:o(E)<E?g:s(E)<E?m:a(E)<E?x:n(E)<E?i(E)<E?y:b:r(E)<E?w:_)(E)}return h.invert=function(E){return new Date(f(E))},h.domain=function(E){return arguments.length?d(Array.from(E,M5e)):d().map(I5e)},h.ticks=function(E){var L=d();return t(L[0],L[L.length-1],E??10)},h.tickFormat=function(E,L){return L==null?k:u(L)},h.nice=function(E){var L=d();return(!E||typeof E.range!="function")&&(E=e(L[0],L[L.length-1],E??10)),E?d(F7(L,E)):h},h.copy=function(){return z4(h,rq(t,e,r,n,i,a,s,o,l,u))},h}function j4(){return uh.apply(rq(j7,K7,Bs,ou,sl,po,su,au,Ps,Jf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var nq=F(()=>{X4();t8();P7();J1();EH()});var iq=F(()=>{yH();TH();I7();nq()});function aq(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(n*6,++n*6);return r}var sq=F(()=>{});var r8,oq=F(()=>{sq();r8=aq("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var lq=F(()=>{oq()});function Dn(t){return function(){return t}}var K4=F(()=>{});function uq(t){return t>1?0:t<-1?pp:Math.acos(t)}function i8(t){return t>=1?sv:t<=-1?-sv:Math.asin(t)}var n8,Qi,dh,cq,Z4,ll,ed,Gi,pp,sv,gp,Q4=F(()=>{n8=Math.abs,Qi=Math.atan2,dh=Math.cos,cq=Math.max,Z4=Math.min,ll=Math.sin,ed=Math.sqrt,Gi=1e-12,pp=Math.PI,sv=pp/2,gp=2*pp});function J4(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new qf(e)}var a8=F(()=>{x7()});function D5e(t){return t.innerRadius}function O5e(t){return t.outerRadius}function P5e(t){return t.startAngle}function B5e(t){return t.endAngle}function F5e(t){return t&&t.padAngle}function z5e(t,e,r,n,i,a,s,o){var l=r-t,u=n-e,h=s-i,f=o-a,d=f*l-h*u;if(!(d*d<Gi))return d=(h*(e-a)-f*(t-i))/d,[t+d*l,e+d*u]}function e3(t,e,r,n,i,a,s){var o=t-r,l=e-n,u=(s?a:-a)/ed(o*o+l*l),h=u*l,f=-u*o,d=t+h,p=e+f,g=r+h,m=n+f,x=(d+g)/2,y=(p+m)/2,b=g-d,w=m-p,_=b*b+w*w,k=i-a,E=d*m-g*p,L=(w<0?-1:1)*ed(cq(0,k*k*_-E*E)),S=(E*w-b*L)/_,C=(-E*b-w*L)/_,M=(E*w+b*L)/_,R=(-E*b+w*L)/_,T=S-x,I=C-y,A=M-x,D=R-y;return T*T+I*I>A*A+D*D&&(S=M,C=R),{cx:S,cy:C,x01:-h,y01:-f,x11:S*(i/k-1),y11:C*(i/k-1)}}function Ql(){var t=D5e,e=O5e,r=Dn(0),n=null,i=P5e,a=B5e,s=F5e,o=null,l=J4(u);function u(){var h,f,d=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-sv,m=a.apply(this,arguments)-sv,x=n8(m-g),y=m>g;if(o||(o=h=l()),p<d&&(f=p,p=d,d=f),!(p>Gi))o.moveTo(0,0);else if(x>gp-Gi)o.moveTo(p*dh(g),p*ll(g)),o.arc(0,0,p,g,m,!y),d>Gi&&(o.moveTo(d*dh(m),d*ll(m)),o.arc(0,0,d,m,g,y));else{var b=g,w=m,_=g,k=m,E=x,L=x,S=s.apply(this,arguments)/2,C=S>Gi&&(n?+n.apply(this,arguments):ed(d*d+p*p)),M=Z4(n8(p-d)/2,+r.apply(this,arguments)),R=M,T=M,I,A;if(C>Gi){var D=i8(C/d*ll(S)),N=i8(C/p*ll(S));(E-=D*2)>Gi?(D*=y?1:-1,_+=D,k-=D):(E=0,_=k=(g+m)/2),(L-=N*2)>Gi?(N*=y?1:-1,b+=N,w-=N):(L=0,b=w=(g+m)/2)}var O=p*dh(b),B=p*ll(b),P=d*dh(k),$=d*ll(k);if(M>Gi){var z=p*dh(w),H=p*ll(w),Z=d*dh(_),X=d*ll(_),ie;if(x<pp)if(ie=z5e(O,B,Z,X,z,H,P,$)){var K=O-ie[0],ee=B-ie[1],J=z-ie[0],W=H-ie[1],Y=1/ll(uq((K*J+ee*W)/(ed(K*K+ee*ee)*ed(J*J+W*W)))/2),Q=ed(ie[0]*ie[0]+ie[1]*ie[1]);R=Z4(M,(d-Q)/(Y-1)),T=Z4(M,(p-Q)/(Y+1))}else R=T=0}L>Gi?T>Gi?(I=e3(Z,X,O,B,p,T,y),A=e3(z,H,P,$,p,T,y),o.moveTo(I.cx+I.x01,I.cy+I.y01),T<M?o.arc(I.cx,I.cy,T,Qi(I.y01,I.x01),Qi(A.y01,A.x01),!y):(o.arc(I.cx,I.cy,T,Qi(I.y01,I.x01),Qi(I.y11,I.x11),!y),o.arc(0,0,p,Qi(I.cy+I.y11,I.cx+I.x11),Qi(A.cy+A.y11,A.cx+A.x11),!y),o.arc(A.cx,A.cy,T,Qi(A.y11,A.x11),Qi(A.y01,A.x01),!y))):(o.moveTo(O,B),o.arc(0,0,p,b,w,!y)):o.moveTo(O,B),!(d>Gi)||!(E>Gi)?o.lineTo(P,$):R>Gi?(I=e3(P,$,z,H,d,-R,y),A=e3(O,B,Z,X,d,-R,y),o.lineTo(I.cx+I.x01,I.cy+I.y01),R<M?o.arc(I.cx,I.cy,R,Qi(I.y01,I.x01),Qi(A.y01,A.x01),!y):(o.arc(I.cx,I.cy,R,Qi(I.y01,I.x01),Qi(I.y11,I.x11),!y),o.arc(0,0,d,Qi(I.cy+I.y11,I.cx+I.x11),Qi(A.cy+A.y11,A.cx+A.x11),y),o.arc(A.cx,A.cy,R,Qi(A.y11,A.x11),Qi(A.y01,A.x01),!y))):o.arc(0,0,d,k,_,y)}if(o.closePath(),h)return o=null,h+""||null}return u.centroid=function(){var h=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-pp/2;return[dh(f)*h,ll(f)*h]},u.innerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:Dn(+h),u):t},u.outerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:Dn(+h),u):e},u.cornerRadius=function(h){return arguments.length?(r=typeof h=="function"?h:Dn(+h),u):r},u.padRadius=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:Dn(+h),u):n},u.startAngle=function(h){return arguments.length?(i=typeof h=="function"?h:Dn(+h),u):i},u.endAngle=function(h){return arguments.length?(a=typeof h=="function"?h:Dn(+h),u):a},u.padAngle=function(h){return arguments.length?(s=typeof h=="function"?h:Dn(+h),u):s},u.context=function(h){return arguments.length?(o=h??null,u):o},u}var hq=F(()=>{K4();Q4();a8()});function t3(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var Xft,s8=F(()=>{Xft=Array.prototype.slice});function fq(t){this._context=t}function ov(t){return new fq(t)}var o8=F(()=>{fq.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}}});function dq(t){return t[0]}function pq(t){return t[1]}var gq=F(()=>{});function ss(t,e){var r=Dn(!0),n=null,i=ov,a=null,s=J4(o);t=typeof t=="function"?t:t===void 0?dq:Dn(t),e=typeof e=="function"?e:e===void 0?pq:Dn(e);function o(l){var u,h=(l=t3(l)).length,f,d=!1,p;for(n==null&&(a=i(p=s())),u=0;u<=h;++u)!(u<h&&r(f=l[u],u,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(f,u,l),+e(f,u,l));if(p)return a=null,p+""||null}return o.x=function(l){return arguments.length?(t=typeof l=="function"?l:Dn(+l),o):t},o.y=function(l){return arguments.length?(e=typeof l=="function"?l:Dn(+l),o):e},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Dn(!!l),o):r},o.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),o):i},o.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),o):n},o}var mq=F(()=>{s8();K4();o8();a8();gq()});function vq(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}var yq=F(()=>{});function xq(t){return t}var bq=F(()=>{});function l8(){var t=xq,e=vq,r=null,n=Dn(0),i=Dn(gp),a=Dn(0);function s(o){var l,u=(o=t3(o)).length,h,f,d=0,p=new Array(u),g=new Array(u),m=+n.apply(this,arguments),x=Math.min(gp,Math.max(-gp,i.apply(this,arguments)-m)),y,b=Math.min(Math.abs(x)/u,a.apply(this,arguments)),w=b*(x<0?-1:1),_;for(l=0;l<u;++l)(_=g[p[l]=l]=+t(o[l],l,o))>0&&(d+=_);for(e!=null?p.sort(function(k,E){return e(g[k],g[E])}):r!=null&&p.sort(function(k,E){return r(o[k],o[E])}),l=0,f=d?(x-u*w)/d:0;l<u;++l,m=y)h=p[l],_=g[h],y=m+(_>0?_*f:0)+w,g[h]={data:o[h],index:l,value:_,startAngle:m,endAngle:y,padAngle:b};return g}return s.value=function(o){return arguments.length?(t=typeof o=="function"?o:Dn(+o),s):t},s.sortValues=function(o){return arguments.length?(e=o,r=null,s):e},s.sort=function(o){return arguments.length?(r=o,e=null,s):r},s.startAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Dn(+o),s):n},s.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Dn(+o),s):i},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Dn(+o),s):a},s}var wq=F(()=>{s8();K4();yq();bq();Q4()});function c8(t){return new r3(t,!0)}function u8(t){return new r3(t,!1)}var r3,kq=F(()=>{r3=class{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}});function go(){}var lv=F(()=>{});function mp(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function cv(t){this._context=t}function cl(t){return new cv(t)}var uv=F(()=>{cv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mp(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function Tq(t){this._context=t}function h8(t){return new Tq(t)}var Eq=F(()=>{lv();uv();Tq.prototype={areaStart:go,areaEnd:go,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:mp(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function Sq(t){this._context=t}function f8(t){return new Sq(t)}var Cq=F(()=>{uv();Sq.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:mp(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function Aq(t,e){this._basis=new cv(t),this._beta=e}var d8,_q=F(()=>{uv();Aq.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],i=e[0],a=t[r]-n,s=e[r]-i,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(n+l*a),this._beta*e[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};d8=function t(e){function r(n){return e===1?new cv(n):new Aq(n,e)}return r.beta=function(n){return t(+n)},r}(.85)});function vp(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function n3(t,e){this._context=t,this._k=(1-e)/6}var p8,hv=F(()=>{n3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:vp(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:vp(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};p8=function t(e){function r(n){return new n3(n,e)}return r.tension=function(n){return t(+n)},r}(0)});function i3(t,e){this._context=t,this._k=(1-e)/6}var g8,m8=F(()=>{lv();hv();i3.prototype={areaStart:go,areaEnd:go,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:vp(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};g8=function t(e){function r(n){return new i3(n,e)}return r.tension=function(n){return t(+n)},r}(0)});function a3(t,e){this._context=t,this._k=(1-e)/6}var v8,y8=F(()=>{hv();a3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vp(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};v8=function t(e){function r(n){return new a3(n,e)}return r.tension=function(n){return t(+n)},r}(0)});function fv(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>Gi){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Gi){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*u+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2)}function Lq(t,e){this._context=t,this._alpha=e}var x8,s3=F(()=>{Q4();hv();Lq.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:fv(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};x8=function t(e){function r(n){return e?new Lq(n,e):new n3(n,0)}return r.alpha=function(n){return t(+n)},r}(.5)});function Rq(t,e){this._context=t,this._alpha=e}var b8,Nq=F(()=>{m8();lv();s3();Rq.prototype={areaStart:go,areaEnd:go,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:fv(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};b8=function t(e){function r(n){return e?new Rq(n,e):new i3(n,0)}return r.alpha=function(n){return t(+n)},r}(.5)});function Iq(t,e){this._context=t,this._alpha=e}var w8,Mq=F(()=>{y8();s3();Iq.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:fv(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};w8=function t(e){function r(n){return e?new Iq(n,e):new a3(n,0)}return r.alpha=function(n){return t(+n)},r}(.5)});function Dq(t){this._context=t}function k8(t){return new Dq(t)}var Oq=F(()=>{lv();Dq.prototype={areaStart:go,areaEnd:go,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}}});function Pq(t){return t<0?-1:1}function Bq(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(Pq(a)+Pq(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Fq(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function T8(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-n)/3;t._context.bezierCurveTo(n+o,i+o*e,a-o,s-o*r,a,s)}function o3(t){this._context=t}function zq(t){this._context=new $q(t)}function $q(t){this._context=t}function E8(t){return new o3(t)}function S8(t){return new zq(t)}var Gq=F(()=>{o3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:T8(this,this._t0,Fq(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,T8(this,Fq(this,r=Bq(this,t,e)),r);break;default:T8(this,this._t0,r=Bq(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};(zq.prototype=Object.create(o3.prototype)).point=function(t,e){o3.prototype.point.call(this,e,t)};$q.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}}});function Vq(t){this._context=t}function Uq(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function C8(t){return new Vq(t)}var Wq=F(()=>{Vq.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=Uq(t),i=Uq(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}}});function l3(t,e){this._context=t,this._t=e}function A8(t){return new l3(t,.5)}function _8(t){return new l3(t,0)}function L8(t){return new l3(t,1)}var Hq=F(()=>{l3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}}});var qq=F(()=>{hq();mq();wq();Eq();Cq();uv();kq();_q();m8();y8();hv();Nq();Mq();s3();Oq();o8();Gq();Wq();Hq()});var Yq=F(()=>{});var Xq=F(()=>{});function ph(t,e,r){this.k=t,this.x=e,this.y=r}function N8(t){for(;!t.__zoom;)if(!(t=t.parentNode))return R8;return t.__zoom}var R8,I8=F(()=>{ph.prototype={constructor:ph,scale:function(t){return t===1?this:new ph(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ph(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};R8=new ph(1,0,0);N8.prototype=ph.prototype});var jq=F(()=>{});var Kq=F(()=>{D4();Yq();Xq();I8();jq()});var Zq=F(()=>{Kq();I8()});var lr=F(()=>{ah();hG();FW();UW();ap();VW();WW();IC();BU();HW();g7();qW();XW();R7();pH();gH();op();x7();mH();YW();vH();iq();lq();rl();qq();X4();t8();C4();D4();Zq()});var $5e,c3,M8=F(()=>{$5e=typeof global=="object"&&global&&global.Object===Object&&global,c3=$5e});var G5e,U5e,Zn,mo=F(()=>{M8();G5e=typeof self=="object"&&self&&self.Object===Object&&self,U5e=c3||G5e||Function("return this")(),Zn=U5e});var V5e,Ui,td=F(()=>{mo();V5e=Zn.Symbol,Ui=V5e});function q5e(t){var e=W5e.call(t,dv),r=t[dv];try{t[dv]=void 0;var n=!0}catch{}var i=H5e.call(t);return n&&(e?t[dv]=r:delete t[dv]),i}var Qq,W5e,H5e,dv,Jq,eY=F(()=>{td();Qq=Object.prototype,W5e=Qq.hasOwnProperty,H5e=Qq.toString,dv=Ui?Ui.toStringTag:void 0;Jq=q5e});function j5e(t){return X5e.call(t)}var Y5e,X5e,tY,rY=F(()=>{Y5e=Object.prototype,X5e=Y5e.toString;tY=j5e});function Q5e(t){return t==null?t===void 0?Z5e:K5e:nY&&nY in Object(t)?Jq(t):tY(t)}var K5e,Z5e,nY,Ji,lu=F(()=>{td();eY();rY();K5e="[object Null]",Z5e="[object Undefined]",nY=Ui?Ui.toStringTag:void 0;Ji=Q5e});function J5e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var hn,Fs=F(()=>{hn=J5e});function iwe(t){if(!hn(t))return!1;var e=Ji(t);return e==twe||e==rwe||e==ewe||e==nwe}var ewe,twe,rwe,nwe,pi,pv=F(()=>{lu();Fs();ewe="[object AsyncFunction]",twe="[object Function]",rwe="[object GeneratorFunction]",nwe="[object Proxy]";pi=iwe});var awe,u3,iY=F(()=>{mo();awe=Zn["__core-js_shared__"],u3=awe});function swe(t){return!!aY&&aY in t}var aY,sY,oY=F(()=>{iY();aY=function(){var t=/[^.]+$/.exec(u3&&u3.keys&&u3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();sY=swe});function cwe(t){if(t!=null){try{return lwe.call(t)}catch{}try{return t+""}catch{}}return""}var owe,lwe,cu,D8=F(()=>{owe=Function.prototype,lwe=owe.toString;cu=cwe});function vwe(t){if(!hn(t)||sY(t))return!1;var e=pi(t)?mwe:hwe;return e.test(cu(t))}var uwe,hwe,fwe,dwe,pwe,gwe,mwe,lY,cY=F(()=>{pv();oY();Fs();D8();uwe=/[\\\\^$.*+?()[\\]{}|]/g,hwe=/^\\[object .+?Constructor\\]$/,fwe=Function.prototype,dwe=Object.prototype,pwe=fwe.toString,gwe=dwe.hasOwnProperty,mwe=RegExp("^"+pwe.call(gwe).replace(uwe,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");lY=vwe});function ywe(t,e){return t?.[e]}var uY,hY=F(()=>{uY=ywe});function xwe(t,e){var r=uY(t,e);return lY(r)?r:void 0}var os,gh=F(()=>{cY();hY();os=xwe});var bwe,uu,gv=F(()=>{gh();bwe=os(Object,"create"),uu=bwe});function wwe(){this.__data__=uu?uu(null):{},this.size=0}var fY,dY=F(()=>{gv();fY=wwe});function kwe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var pY,gY=F(()=>{pY=kwe});function Cwe(t){var e=this.__data__;if(uu){var r=e[t];return r===Twe?void 0:r}return Swe.call(e,t)?e[t]:void 0}var Twe,Ewe,Swe,mY,vY=F(()=>{gv();Twe="__lodash_hash_undefined__",Ewe=Object.prototype,Swe=Ewe.hasOwnProperty;mY=Cwe});function Lwe(t){var e=this.__data__;return uu?e[t]!==void 0:_we.call(e,t)}var Awe,_we,yY,xY=F(()=>{gv();Awe=Object.prototype,_we=Awe.hasOwnProperty;yY=Lwe});function Nwe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=uu&&e===void 0?Rwe:e,this}var Rwe,bY,wY=F(()=>{gv();Rwe="__lodash_hash_undefined__";bY=Nwe});function yp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var O8,kY=F(()=>{dY();gY();vY();xY();wY();yp.prototype.clear=fY;yp.prototype.delete=pY;yp.prototype.get=mY;yp.prototype.has=yY;yp.prototype.set=bY;O8=yp});function Iwe(){this.__data__=[],this.size=0}var TY,EY=F(()=>{TY=Iwe});function Mwe(t,e){return t===e||t!==t&&e!==e}var vo,rd=F(()=>{vo=Mwe});function Dwe(t,e){for(var r=t.length;r--;)if(vo(t[r][0],e))return r;return-1}var mh,mv=F(()=>{rd();mh=Dwe});function Bwe(t){var e=this.__data__,r=mh(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Pwe.call(e,r,1),--this.size,!0}var Owe,Pwe,SY,CY=F(()=>{mv();Owe=Array.prototype,Pwe=Owe.splice;SY=Bwe});function Fwe(t){var e=this.__data__,r=mh(e,t);return r<0?void 0:e[r][1]}var AY,_Y=F(()=>{mv();AY=Fwe});function zwe(t){return mh(this.__data__,t)>-1}var LY,RY=F(()=>{mv();LY=zwe});function $we(t,e){var r=this.__data__,n=mh(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var NY,IY=F(()=>{mv();NY=$we});function xp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var vh,vv=F(()=>{EY();CY();_Y();RY();IY();xp.prototype.clear=TY;xp.prototype.delete=SY;xp.prototype.get=AY;xp.prototype.has=LY;xp.prototype.set=NY;vh=xp});var Gwe,yh,h3=F(()=>{gh();mo();Gwe=os(Zn,"Map"),yh=Gwe});function Uwe(){this.size=0,this.__data__={hash:new O8,map:new(yh||vh),string:new O8}}var MY,DY=F(()=>{kY();vv();h3();MY=Uwe});function Vwe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var OY,PY=F(()=>{OY=Vwe});function Wwe(t,e){var r=t.__data__;return OY(e)?r[typeof e=="string"?"string":"hash"]:r.map}var xh,yv=F(()=>{PY();xh=Wwe});function Hwe(t){var e=xh(this,t).delete(t);return this.size-=e?1:0,e}var BY,FY=F(()=>{yv();BY=Hwe});function qwe(t){return xh(this,t).get(t)}var zY,$Y=F(()=>{yv();zY=qwe});function Ywe(t){return xh(this,t).has(t)}var GY,UY=F(()=>{yv();GY=Ywe});function Xwe(t,e){var r=xh(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var VY,WY=F(()=>{yv();VY=Xwe});function bp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var nd,f3=F(()=>{DY();FY();$Y();UY();WY();bp.prototype.clear=MY;bp.prototype.delete=BY;bp.prototype.get=zY;bp.prototype.has=GY;bp.prototype.set=VY;nd=bp});function P8(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(jwe);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(P8.Cache||nd),r}var jwe,wp,B8=F(()=>{f3();jwe="Expected a function";P8.Cache=nd;wp=P8});function Kwe(){this.__data__=new vh,this.size=0}var HY,qY=F(()=>{vv();HY=Kwe});function Zwe(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var YY,XY=F(()=>{YY=Zwe});function Qwe(t){return this.__data__.get(t)}var jY,KY=F(()=>{jY=Qwe});function Jwe(t){return this.__data__.has(t)}var ZY,QY=F(()=>{ZY=Jwe});function tke(t,e){var r=this.__data__;if(r instanceof vh){var n=r.__data__;if(!yh||n.length<eke-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new nd(n)}return r.set(t,e),this.size=r.size,this}var eke,JY,eX=F(()=>{vv();h3();f3();eke=200;JY=tke});function kp(t){var e=this.__data__=new vh(t);this.size=e.size}var Jl,xv=F(()=>{vv();qY();XY();KY();QY();eX();kp.prototype.clear=HY;kp.prototype.delete=YY;kp.prototype.get=jY;kp.prototype.has=ZY;kp.prototype.set=JY;Jl=kp});var rke,Tp,F8=F(()=>{gh();rke=function(){try{var t=os(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Tp=rke});function nke(t,e,r){e=="__proto__"&&Tp?Tp(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var ec,Ep=F(()=>{F8();ec=nke});function ike(t,e,r){(r!==void 0&&!vo(t[e],r)||r===void 0&&!(e in t))&&ec(t,e,r)}var bv,z8=F(()=>{Ep();rd();bv=ike});function ake(t){return function(e,r,n){for(var i=-1,a=Object(e),s=n(e),o=s.length;o--;){var l=s[t?o:++i];if(r(a[l],l,a)===!1)break}return e}}var tX,rX=F(()=>{tX=ake});var ske,Sp,d3=F(()=>{rX();ske=tX(),Sp=ske});function lke(t,e){if(e)return t.slice();var r=t.length,n=aX?aX(r):new t.constructor(r);return t.copy(n),n}var sX,nX,oke,iX,aX,p3,$8=F(()=>{mo();sX=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nX=sX&&typeof module=="object"&&module&&!module.nodeType&&module,oke=nX&&nX.exports===sX,iX=oke?Zn.Buffer:void 0,aX=iX?iX.allocUnsafe:void 0;p3=lke});var cke,Cp,G8=F(()=>{mo();cke=Zn.Uint8Array,Cp=cke});function uke(t){var e=new t.constructor(t.byteLength);return new Cp(e).set(new Cp(t)),e}var Ap,g3=F(()=>{G8();Ap=uke});function hke(t,e){var r=e?Ap(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var m3,U8=F(()=>{g3();m3=hke});function fke(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var v3,V8=F(()=>{v3=fke});var oX,dke,lX,cX=F(()=>{Fs();oX=Object.create,dke=function(){function t(){}return function(e){if(!hn(e))return{};if(oX)return oX(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),lX=dke});function pke(t,e){return function(r){return t(e(r))}}var y3,W8=F(()=>{y3=pke});var gke,_p,x3=F(()=>{W8();gke=y3(Object.getPrototypeOf,Object),_p=gke});function vke(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||mke;return t===r}var mke,tc,Lp=F(()=>{mke=Object.prototype;tc=vke});function yke(t){return typeof t.constructor=="function"&&!tc(t)?lX(_p(t)):{}}var b3,H8=F(()=>{cX();x3();Lp();b3=yke});function xke(t){return t!=null&&typeof t=="object"}var Hn,yo=F(()=>{Hn=xke});function wke(t){return Hn(t)&&Ji(t)==bke}var bke,q8,uX=F(()=>{lu();yo();bke="[object Arguments]";q8=wke});var hX,kke,Tke,Eke,ul,Rp=F(()=>{uX();yo();hX=Object.prototype,kke=hX.hasOwnProperty,Tke=hX.propertyIsEnumerable,Eke=q8(function(){return arguments}())?q8:function(t){return Hn(t)&&kke.call(t,"callee")&&!Tke.call(t,"callee")},ul=Eke});var Ske,At,On=F(()=>{Ske=Array.isArray,At=Ske});function Ake(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Cke}var Cke,Np,w3=F(()=>{Cke=9007199254740991;Np=Ake});function _ke(t){return t!=null&&Np(t.length)&&!pi(t)}var Qn,xo=F(()=>{pv();w3();Qn=_ke});function Lke(t){return Hn(t)&&Qn(t)}var id,k3=F(()=>{xo();yo();id=Lke});function Rke(){return!1}var fX,dX=F(()=>{fX=Rke});var mX,pX,Nke,gX,Ike,Mke,hl,Ip=F(()=>{mo();dX();mX=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pX=mX&&typeof module=="object"&&module&&!module.nodeType&&module,Nke=pX&&pX.exports===mX,gX=Nke?Zn.Buffer:void 0,Ike=gX?gX.isBuffer:void 0,Mke=Ike||fX,hl=Mke});function zke(t){if(!Hn(t)||Ji(t)!=Dke)return!1;var e=_p(t);if(e===null)return!0;var r=Bke.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&vX.call(r)==Fke}var Dke,Oke,Pke,vX,Bke,Fke,yX,xX=F(()=>{lu();x3();yo();Dke="[object Object]",Oke=Function.prototype,Pke=Object.prototype,vX=Oke.toString,Bke=Pke.hasOwnProperty,Fke=vX.call(Object);yX=zke});function uTe(t){return Hn(t)&&Np(t.length)&&!!Rn[Ji(t)]}var $ke,Gke,Uke,Vke,Wke,Hke,qke,Yke,Xke,jke,Kke,Zke,Qke,Jke,eTe,tTe,rTe,nTe,iTe,aTe,sTe,oTe,lTe,cTe,Rn,bX,wX=F(()=>{lu();w3();yo();$ke="[object Arguments]",Gke="[object Array]",Uke="[object Boolean]",Vke="[object Date]",Wke="[object Error]",Hke="[object Function]",qke="[object Map]",Yke="[object Number]",Xke="[object Object]",jke="[object RegExp]",Kke="[object Set]",Zke="[object String]",Qke="[object WeakMap]",Jke="[object ArrayBuffer]",eTe="[object DataView]",tTe="[object Float32Array]",rTe="[object Float64Array]",nTe="[object Int8Array]",iTe="[object Int16Array]",aTe="[object Int32Array]",sTe="[object Uint8Array]",oTe="[object Uint8ClampedArray]",lTe="[object Uint16Array]",cTe="[object Uint32Array]",Rn={};Rn[tTe]=Rn[rTe]=Rn[nTe]=Rn[iTe]=Rn[aTe]=Rn[sTe]=Rn[oTe]=Rn[lTe]=Rn[cTe]=!0;Rn[$ke]=Rn[Gke]=Rn[Jke]=Rn[Uke]=Rn[eTe]=Rn[Vke]=Rn[Wke]=Rn[Hke]=Rn[qke]=Rn[Yke]=Rn[Xke]=Rn[jke]=Rn[Kke]=Rn[Zke]=Rn[Qke]=!1;bX=uTe});function hTe(t){return function(e){return t(e)}}var bo,ad=F(()=>{bo=hTe});var kX,wv,fTe,Y8,dTe,wo,kv=F(()=>{M8();kX=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wv=kX&&typeof module=="object"&&module&&!module.nodeType&&module,fTe=wv&&wv.exports===kX,Y8=fTe&&c3.process,dTe=function(){try{var t=wv&&wv.require&&wv.require("util").types;return t||Y8&&Y8.binding&&Y8.binding("util")}catch{}}(),wo=dTe});var TX,pTe,bh,Tv=F(()=>{wX();ad();kv();TX=wo&&wo.isTypedArray,pTe=TX?bo(TX):bX,bh=pTe});function gTe(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Ev,X8=F(()=>{Ev=gTe});function yTe(t,e,r){var n=t[e];(!(vTe.call(t,e)&&vo(n,r))||r===void 0&&!(e in t))&&ec(t,e,r)}var mTe,vTe,rc,Mp=F(()=>{Ep();rd();mTe=Object.prototype,vTe=mTe.hasOwnProperty;rc=yTe});function xTe(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var o=e[a],l=n?n(r[o],t[o],o,r,t):void 0;l===void 0&&(l=t[o]),i?ec(r,o,l):rc(r,o,l)}return r}var ko,sd=F(()=>{Mp();Ep();ko=xTe});function bTe(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var EX,SX=F(()=>{EX=bTe});function TTe(t,e){var r=typeof t;return e=e??wTe,!!e&&(r=="number"||r!="symbol"&&kTe.test(t))&&t>-1&&t%1==0&&t<e}var wTe,kTe,wh,Sv=F(()=>{wTe=9007199254740991,kTe=/^(?:0|[1-9]\\d*)$/;wh=TTe});function CTe(t,e){var r=At(t),n=!r&&ul(t),i=!r&&!n&&hl(t),a=!r&&!n&&!i&&bh(t),s=r||n||i||a,o=s?EX(t.length,String):[],l=o.length;for(var u in t)(e||STe.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||wh(u,l)))&&o.push(u);return o}var ETe,STe,T3,j8=F(()=>{SX();Rp();On();Ip();Sv();Tv();ETe=Object.prototype,STe=ETe.hasOwnProperty;T3=CTe});function ATe(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var CX,AX=F(()=>{CX=ATe});function RTe(t){if(!hn(t))return CX(t);var e=tc(t),r=[];for(var n in t)n=="constructor"&&(e||!LTe.call(t,n))||r.push(n);return r}var _Te,LTe,_X,LX=F(()=>{Fs();Lp();AX();_Te=Object.prototype,LTe=_Te.hasOwnProperty;_X=RTe});function NTe(t){return Qn(t)?T3(t,!0):_X(t)}var ls,kh=F(()=>{j8();LX();xo();ls=NTe});function ITe(t){return ko(t,ls(t))}var RX,NX=F(()=>{sd();kh();RX=ITe});function MTe(t,e,r,n,i,a,s){var o=Ev(t,r),l=Ev(e,r),u=s.get(l);if(u){bv(t,r,u);return}var h=a?a(o,l,r+"",t,e,s):void 0,f=h===void 0;if(f){var d=At(l),p=!d&&hl(l),g=!d&&!p&&bh(l);h=l,d||p||g?At(o)?h=o:id(o)?h=v3(o):p?(f=!1,h=p3(l,!0)):g?(f=!1,h=m3(l,!0)):h=[]:yX(l)||ul(l)?(h=o,ul(o)?h=RX(o):(!hn(o)||pi(o))&&(h=b3(l))):f=!1}f&&(s.set(l,h),i(h,l,n,a,s),s.delete(l)),bv(t,r,h)}var IX,MX=F(()=>{z8();$8();U8();V8();H8();Rp();On();k3();Ip();pv();Fs();xX();Tv();X8();NX();IX=MTe});function DX(t,e,r,n,i){t!==e&&Sp(e,function(a,s){if(i||(i=new Jl),hn(a))IX(t,e,s,r,DX,n,i);else{var o=n?n(Ev(t,s),a,s+"",t,e,i):void 0;o===void 0&&(o=a),bv(t,s,o)}},ls)}var OX,PX=F(()=>{xv();z8();d3();MX();Fs();kh();X8();OX=DX});function DTe(t){return t}var Vi,hu=F(()=>{Vi=DTe});function OTe(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var BX,FX=F(()=>{BX=OTe});function PTe(t,e,r){return e=zX(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=zX(n.length-e,0),s=Array(a);++i<a;)s[i]=n[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=n[i];return o[e]=r(s),BX(t,this,o)}}var zX,E3,K8=F(()=>{FX();zX=Math.max;E3=PTe});function BTe(t){return function(){return t}}var cs,Z8=F(()=>{cs=BTe});var FTe,$X,GX=F(()=>{Z8();F8();hu();FTe=Tp?function(t,e){return Tp(t,"toString",{configurable:!0,enumerable:!1,value:cs(e),writable:!0})}:Vi,$X=FTe});function UTe(t){var e=0,r=0;return function(){var n=GTe(),i=$Te-(n-r);if(r=n,i>0){if(++e>=zTe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var zTe,$Te,GTe,UX,VX=F(()=>{zTe=800,$Te=16,GTe=Date.now;UX=UTe});var VTe,S3,Q8=F(()=>{GX();VX();VTe=UX($X),S3=VTe});function WTe(t,e){return S3(E3(t,e,Vi),t+"")}var nc,Dp=F(()=>{hu();K8();Q8();nc=WTe});function HTe(t,e,r){if(!hn(r))return!1;var n=typeof e;return(n=="number"?Qn(r)&&wh(e,r.length):n=="string"&&e in r)?vo(r[e],t):!1}var zs,od=F(()=>{rd();xo();Sv();Fs();zs=HTe});function qTe(t){return nc(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&zs(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var o=r[n];o&&t(e,o,n,a)}return e})}var C3,J8=F(()=>{Dp();od();C3=qTe});var YTe,Th,eA=F(()=>{PX();J8();YTe=C3(function(t,e,r){OX(t,e,r)}),Th=YTe});function _3(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return XTe[r]??e}function jX(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,qX.sanitizeUrl)(r):r}function rA(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function KX(t){let e,r=0;t.forEach(i=>{r+=rA(i,e),e=i});let n=r/2;return nA(t,n)}function ZX(t){return t.length===1?t[0]:KX(t)}function QX(t,e,r){let n=structuredClone(r);re.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();let i=25+t,a=nA(n,i),s=10+t*.5,o=Math.atan2(n[0].y-a.y,n[0].x-a.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(n[0].y+a.y)/2):e==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(n[0].y+a.y)/2-5):e==="end_left"?(l.x=Math.sin(o)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2),l}function L3(t){let e="",r="";for(let n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function JX(t){let e="",r="0123456789abcdef",n=r.length;for(let i=0;i<t;i++)e+=r.charAt(Math.floor(Math.random()*n));return e}function Cv(t,e){return oA(t,e).height}function us(t,e){return oA(t,e).width}function R3(t){return"str"in t}function hs(t,e){return Th({},t,e)}function ba(t){return t??null}var qX,tA,XTe,jTe,KTe,YX,XX,ZTe,QTe,WX,nA,JTe,HX,iA,aA,e6e,t6e,sA,r6e,oA,n6e,A3,i6e,a6e,To,Wt,ej,$s,N3,xn=F(()=>{or();qX=ga(Q0(),1);lr();B8();eA();tA="\\u200B",XTe={curveBasis:cl,curveBasisClosed:h8,curveBasisOpen:f8,curveBumpX:c8,curveBumpY:u8,curveBundle:d8,curveCardinalClosed:g8,curveCardinalOpen:v8,curveCardinal:p8,curveCatmullRomClosed:b8,curveCatmullRomOpen:w8,curveCatmullRom:x8,curveLinear:ov,curveLinearClosed:k8,curveMonotoneX:E8,curveMonotoneY:S8,curveNatural:C8,curveStep:A8,curveStepAfter:L8,curveStepBefore:_8},jTe=/\\s*(?:(\\w+)(?=:):|(\\w+))\\s*(?:(\\w+)|((?:(?!}%{2}).|\\r?\\n)*))?\\s*(?:}%{2})?/gi,KTe=v(function(t,e){let r=YX(t,/(?:init\\b)|(?:initialize\\b)/),n={};if(Array.isArray(r)){let s=r.map(o=>o.args);k1(s),n=Wn(n,[...s])}else n=r.args;if(!n)return;let i=T1(t,e),a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),YX=v(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${jTe.source})(?=[}][%]{2}).*\n`,"ig");t=t.trim().replace(r,"").replace(/\'/gm,\'"\'),re.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n,i=[];for(;(n=$0.exec(t))!==null;)if(n.index===$0.lastIndex&&$0.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){let a=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:s})}return i.length===0?{type:t,args:null}:i.length===1?i[0]:i}catch(r){return re.error(`ERROR: ${r.message} - Unable to parse directive type: \'${e}\' based on the text: \'${t}\'`),{type:void 0,args:null}}},"detectDirective"),XX=v(function(t){return t.replace($0,"")},"removeDirectives"),ZTe=v(function(t,e){for(let[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");v(_3,"interpolateToCurve");v(jX,"formatUrl");QTe=v((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let s=0;s<n;s++)if(a=a[r[s]],!a){re.error(`Function name: ${t} not found in window`);return}a[i](...e)},"runFunc");v(rA,"distance");v(KX,"traverseEdge");v(ZX,"calcLabelPosition");WX=v((t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),nA=v((t,e)=>{let r,n=e;for(let i of t){if(r){let a=rA(i,r);if(a<n)n-=a;else{let s=n/a;if(s<=0)return r;if(s>=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:WX((1-s)*r.x+s*i.x,5),y:WX((1-s)*r.y+s*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),JTe=v((t,e,r)=>{re.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=nA(e,25),a=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(e[0].x+i.x)/2,o.y=-Math.cos(s)*a+(e[0].y+i.y)/2,o},"calcCardinalityPosition");v(QX,"calcTerminalLabelPosition");v(L3,"getStylesFromArray");HX=0,iA=v(()=>(HX++,"id-"+Math.random().toString(36).substr(2,12)+"-"+HX),"generateId");v(JX,"makeRandomHex");aA=v(t=>JX(t.length),"random"),e6e=v(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),t6e=v(function(t,e){let r=e.text.replace(je.lineBreakRegex," "),[,n]=To(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);let a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},"drawSimpleText"),sA=wp((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),je.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((s,o)=>{let l=us(`${s} `,r),u=us(a,r);if(l>e){let{hyphenatedStrings:d,remainingWord:p}=r6e(s,e,"-",r);i.push(a,...d),a=p}else u+l>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),r6e=wp((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],s="";return i.forEach((o,l)=>{let u=`${s}${o}`;if(us(u,n)>=e){let f=l+1,d=i.length===f,p=`${u}${r}`;a.push(d?u:p),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);v(Cv,"calculateTextHeight");v(us,"calculateTextWidth");oA=wp((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=To(r),s=["sans-serif",n],o=t.split(je.lineBreakRegex),l=[],u=Ge("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let h=u.append("svg");for(let d of s){let p=0,g={width:0,height:0,lineHeight:0};for(let m of o){let x=e6e();x.text=m||tA;let y=t6e(h,x).style("font-size",a).style("font-weight",i).style("font-family",d),b=(y._groups||y)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}h.remove();let f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),n6e=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{v(this,"InitIDGenerator")}},i6e=v(function(t){return A3=A3||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),A3.innerHTML=t,unescape(A3.textContent)},"entityDecode");v(R3,"isDetailedError");a6e=v((t,e,r,n)=>{if(!n)return;let i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),To=v(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");v(hs,"cleanAndMerge");Wt={assignWithDepth:Wn,wrapLabel:sA,calculateTextHeight:Cv,calculateTextWidth:us,calculateTextDimensions:oA,cleanAndMerge:hs,detectInit:KTe,detectDirective:YX,isSubstringInArray:ZTe,interpolateToCurve:_3,calcLabelPosition:ZX,calcCardinalityPosition:JTe,calcTerminalLabelPosition:QX,formatUrl:jX,getStylesFromArray:L3,generateId:iA,random:aA,runFunc:QTe,entityDecode:i6e,insertTitle:a6e,parseFontSize:To,InitIDGenerator:n6e},ej=v(function(t){let e=t;return e=e.replace(/style.*:\\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\\w+;/g,function(r){let n=r.substring(1,r.length-1);return/^\\+?\\d+$/.test(n)?"\\uFB02\\xB0\\xB0"+n+"\\xB6\\xDF":"\\uFB02\\xB0"+n+"\\xB6\\xDF"}),e},"encodeEntities"),$s=v(function(t){return t.replace(/\uFB02\xB0\xB0/g,"&#").replace(/\uFB02\xB0/g,"&").replace(/\xB6\xDF/g,";")},"decodeEntities"),N3=v((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");v(ba,"handleUndefinedAttr")});function uA(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function sj(t){cd=t}function Gs(t,e){if(e){if(oj.test(t))return t.replace(s6e,tj)}else if(lj.test(t))return t.replace(o6e,tj);return t}function u6e(t){return t.replace(c6e,(e,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}function an(t,e){let r=typeof t=="string"?t:t.source;e=e||"";let n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(h6e,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}function rj(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function nj(t,e){let r=t.replace(/\\|/g,(a,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\\\";)l=!l;return l?"|":" |"}),n=r.split(/ \\|/),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\\\\|/g,"|");return n}function Av(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n;){let a=t.charAt(n-i-1);if(a===e&&!r)i++;else if(a!==e&&r)i++;else break}return t.slice(0,n-i)}function f6e(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}function ij(t,e,r,n){let i=e.href,a=e.title?Gs(e.title):null,s=t[1].replace(/\\\\([\\[\\]])/g,"$1");if(t[0].charAt(0)!=="!"){n.state.inLink=!0;let o={type:"link",raw:r,href:i,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,o}return{type:"image",raw:r,href:i,title:a,text:Gs(s)}}function d6e(t,e){let r=t.match(/^(\\s+)(?:```)/);if(r===null)return e;let n=r[1];return e.split(`\n`).map(i=>{let a=i.match(/^\\s+/);if(a===null)return i;let[s]=a;return s.length>=n.length?i.slice(n.length):i}).join(`\n`)}function qr(t,e){return ld.parse(t,e)}var cd,oj,s6e,lj,o6e,l6e,tj,c6e,h6e,Lv,Pp,p6e,g6e,m6e,Nv,v6e,cj,uj,hA,y6e,fA,x6e,b6e,D3,dA,w6e,hj,k6e,pA,aj,T6e,E6e,fj,S6e,dj,C6e,Iv,A6e,_6e,L6e,R6e,N6e,I6e,M6e,D6e,O6e,M3,P6e,pj,gj,B6e,gA,F6e,lA,z6e,I3,_v,fu,Bp,Rv,du,Op,cA,ld,Wvt,Hvt,qvt,Yvt,Xvt,jvt,Kvt,mj=F(()=>{cd=uA();oj=/[&<>"\']/,s6e=new RegExp(oj.source,"g"),lj=/[<>"\']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,o6e=new RegExp(lj.source,"g"),l6e={"&":"&","<":"<",">":">",\'"\':""","\'":"'"},tj=t=>l6e[t];c6e=/&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;h6e=/(^|[^\\[])\\^/g;Lv={exec:()=>null};Pp=class{options;rules;lexer;constructor(e){this.options=e||cd}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Av(n,`\n`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],i=d6e(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(/#$/.test(n)){let i=Av(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Av(r[0],`\n`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=Av(r[0],`\n`).split(`\n`),i="",a="",s=[];for(;n.length>0;){let o=!1,l=[],u;for(u=0;u<n.length;u++)if(/^ {0,3}>/.test(n[u]))l.push(n[u]),o=!0;else if(!o)l.push(n[u]);else break;n=n.slice(u);let h=l.join(`\n`),f=h.replace(/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g,`\n $1`).replace(/^ {0,3}>[ \\t]?/gm,"");i=i?`${i}\n${h}`:h,a=a?`${a}\n${f}`:f;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,s,!0),this.lexer.state.top=d,n.length===0)break;let p=s[s.length-1];if(p?.type==="code")break;if(p?.type==="blockquote"){let g=p,m=g.raw+`\n`+n.join(`\n`),x=this.blockquote(m);s[s.length-1]=x,i=i.substring(0,i.length-g.raw.length)+x.raw,a=a.substring(0,a.length-g.text.length)+x.text;break}else if(p?.type==="list"){let g=p,m=g.raw+`\n`+n.join(`\n`),x=this.list(m);s[s.length-1]=x,i=i.substring(0,i.length-p.raw.length)+x.raw,a=a.substring(0,a.length-g.raw.length)+x.raw,n=m.substring(s[s.length-1].raw.length).split(`\n`);continue}}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\\\d{1,9}\\\\${n.slice(-1)}`:`\\\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let s=new RegExp(`^( {0,3}${n})((?:[ ][^\\\\n]*)?(?:\\\\n|$))`),o=!1;for(;e;){let l=!1,u="",h="";if(!(r=s.exec(e))||this.rules.block.hr.test(e))break;u=r[0],e=e.substring(u.length);let f=r[2].split(`\n`,1)[0].replace(/^\\t+/,y=>" ".repeat(3*y.length)),d=e.split(`\n`,1)[0],p=!f.trim(),g=0;if(this.options.pedantic?(g=2,h=f.trimStart()):p?g=r[1].length+1:(g=r[2].search(/[^ ]/),g=g>4?1:g,h=f.slice(g),g+=r[1].length),p&&/^ *$/.test(d)&&(u+=d+`\n`,e=e.substring(d.length+1),l=!0),!l){let y=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ ][^\\\\n]*)?(?:\\\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,g-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:\\`\\`\\`|~~~)`),_=new RegExp(`^ {0,${Math.min(3,g-1)}}#`);for(;e;){let k=e.split(`\n`,1)[0];if(d=k,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),w.test(d)||_.test(d)||y.test(d)||b.test(e))break;if(d.search(/[^ ]/)>=g||!d.trim())h+=`\n`+d.slice(g);else{if(p||f.search(/[^ ]/)>=4||w.test(f)||_.test(f)||b.test(f))break;h+=`\n`+d}!p&&!d.trim()&&(p=!0),u+=k+`\n`,e=e.substring(k.length+1),f=d.slice(g)}}a.loose||(o?a.loose=!0:/\\n *\\n *$/.test(u)&&(o=!0));let m=null,x;this.options.gfm&&(m=/^\\[[ xX]\\] /.exec(h),m&&(x=m[0]!=="[ ] ",h=h.replace(/^\\[[ xX]\\] +/,""))),a.items.push({type:"list_item",raw:u,task:!!m,checked:x,loose:!1,text:h,tokens:[]}),a.raw+=u}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let l=0;l<a.items.length;l++)if(this.lexer.state.top=!1,a.items[l].tokens=this.lexer.blockTokens(a.items[l].text,[]),!a.loose){let u=a.items[l].tokens.filter(f=>f.type==="space"),h=u.length>0&&u.some(f=>/\\n.*\\n/.test(f.raw));a.loose=h}if(a.loose)for(let l=0;l<a.items.length;l++)a.items[l].loose=!0;return a}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(/\\s+/g," "),i=r[2]?r[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(e){let r=this.rules.block.table.exec(e);if(!r||!/[:|]/.test(r[2]))return;let n=nj(r[1]),i=r[2].replace(/^\\||\\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\\n[ \\t]*$/,"").split(`\n`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let o of i)/^ *-+: *$/.test(o)?s.align.push("right"):/^ *:-+: *$/.test(o)?s.align.push("center"):/^ *:-+ *$/.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<n.length;o++)s.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(nj(o,s.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[u]})));return s}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`\n`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:Gs(r[1])}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&/^<a /i.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\\/a>/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\\/(pre|code|kbd|script)(\\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;let s=Av(n.slice(0,-1),"\\\\");if((n.length-s.length)%2===0)return}else{let s=f6e(r[2],"()");if(s>-1){let l=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let s=/^([^\'"]*[^\\s])\\s+([\'"])(.*)\\2/.exec(i);s&&(i=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),ij(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(/\\s+/g," "),a=r[i.toLowerCase()];if(!a){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return ij(n,a,n[0],this.lexer)}}emStrong(e,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&n.match(/[\\p{L}\\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let s=[...i[0]].length-1,o,l,u=s,h=0,f=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,r=r.slice(-1*e.length+s);(i=f.exec(r))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(l=[...o].length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&s%3&&!((s+l)%3)){h+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+h);let d=[...i[0]][0].length,p=e.slice(0,s+i.index+d+l);if(Math.min(s,l)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(/\\n/g," "),i=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return i&&a&&(n=n.substring(1,n.length-1)),n=Gs(n,!0),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=Gs(r[1]),i="mailto:"+n):(n=Gs(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let n,i;if(r[2]==="@")n=Gs(r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=Gs(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=Gs(r[0]),{type:"text",raw:r[0],text:n}}}},p6e=/^(?: *(?:\\n|$))+/,g6e=/^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,m6e=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,Nv=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,v6e=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,cj=/(?:[*+-]|\\d{1,9}[.)])/,uj=an(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/).replace(/bull/g,cj).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\\n>]+>\\n/).getRegex(),hA=/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,y6e=/^[^\\n]+/,fA=/(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/,x6e=an(/^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/).replace("label",fA).replace("title",/(?:"(?:\\\\"?|[^"\\\\])*"|\'[^\'\\n]*(?:\\n[^\'\\n]+)*\\n?\'|\\([^()]*\\))/).getRegex(),b6e=an(/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/).replace(/bull/g,cj).getRegex(),D3="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",dA=/<!--(?:-?>|[\\s\\S]*?(?:-->|$))/,w6e=an("^ {0,3}(?:<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)|comment[^\\\\n]*(\\\\n+|$)|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)|<![A-Z][\\\\s\\\\S]*?(?:>\\\\n*|$)|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>\\\\n*|$)|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)|</(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$))","i").replace("comment",dA).replace("tag",D3).replace("attribute",/ +[a-zA-Z:_][\\w.:-]*(?: *= *"[^"\\n]*"| *= *\'[^\'\\n]*\'| *= *[^\\s"\'=<>`]+)?/).getRegex(),hj=an(hA).replace("hr",Nv).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D3).getRegex(),k6e=an(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/).replace("paragraph",hj).getRegex(),pA={blockquote:k6e,code:g6e,def:x6e,fences:m6e,heading:v6e,hr:Nv,html:w6e,lheading:uj,list:b6e,newline:p6e,paragraph:hj,table:Lv,text:y6e},aj=an("^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)").replace("hr",Nv).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D3).getRegex(),T6e={...pA,table:aj,paragraph:an(hA).replace("hr",Nv).replace("heading"," {0,3}#{1,6}(?:\\\\s|$)").replace("|lheading","").replace("table",aj).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D3).getRegex()},E6e={...pA,html:an(`^ *(?:comment *(?:\\\\n|\\\\s*$)|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)|<tag(?:"[^"]*"|\'[^\']*\'|\\\\s[^\'"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))`).replace("comment",dA).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b").getRegex(),def:/^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +(["(][^\\n]+[")]))? *(?:\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\n+|$)/,fences:Lv,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:an(hA).replace("hr",Nv).replace("heading",` *#{1,6} *[^\n]`).replace("lheading",uj).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},fj=/^\\\\([!"#$%&\'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,S6e=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,dj=/^( {2,}|\\\\)\\n(?!\\s*$)/,C6e=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,Iv="\\\\p{P}\\\\p{S}",A6e=an(/^((?![*_])[\\spunctuation])/,"u").replace(/punctuation/g,Iv).getRegex(),_6e=/\\[[^[\\]]*?\\]\\([^\\(\\)]*?\\)|`[^`]*?`|<[^<>]*?>/g,L6e=an(/^(?:\\*+(?:((?!\\*)[punct])|[^\\s*]))|^_+(?:((?!_)[punct])|([^\\s_]))/,"u").replace(/punct/g,Iv).getRegex(),R6e=an("^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)[punct](\\\\*+)(?=[\\\\s]|$)|[^punct\\\\s](\\\\*+)(?!\\\\*)(?=[punct\\\\s]|$)|(?!\\\\*)[punct\\\\s](\\\\*+)(?=[^punct\\\\s])|[\\\\s](\\\\*+)(?!\\\\*)(?=[punct])|(?!\\\\*)[punct](\\\\*+)(?!\\\\*)(?=[punct])|[^punct\\\\s](\\\\*+)(?=[^punct\\\\s])","gu").replace(/punct/g,Iv).getRegex(),N6e=an("^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\\\s]|$)|[^punct\\\\s](_+)(?!_)(?=[punct\\\\s]|$)|(?!_)[punct\\\\s](_+)(?=[^punct\\\\s])|[\\\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Iv).getRegex(),I6e=an(/\\\\([punct])/,"gu").replace(/punct/g,Iv).getRegex(),M6e=an(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),D6e=an(dA).replace("(?:-->|$)","-->").getRegex(),O6e=an("^comment|^</[a-zA-Z][\\\\w:-]*\\\\s*>|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>|^<\\\\?[\\\\s\\\\S]*?\\\\?>|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>").replace("comment",D6e).replace("attribute",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*"[^"]*"|\\s*=\\s*\'[^\']*\'|\\s*=\\s*[^\\s"\'=<>`]+)?/).getRegex(),M3=/(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/,P6e=an(/^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/).replace("label",M3).replace("href",/<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/).replace("title",/"(?:\\\\"?|[^"\\\\])*"|\'(?:\\\\\'?|[^\'\\\\])*\'|\\((?:\\\\\\)?|[^)\\\\])*\\)/).getRegex(),pj=an(/^!?\\[(label)\\]\\[(ref)\\]/).replace("label",M3).replace("ref",fA).getRegex(),gj=an(/^!?\\[(ref)\\](?:\\[\\])?/).replace("ref",fA).getRegex(),B6e=an("reflink|nolink(?!\\\\()","g").replace("reflink",pj).replace("nolink",gj).getRegex(),gA={_backpedal:Lv,anyPunctuation:I6e,autolink:M6e,blockSkip:_6e,br:dj,code:S6e,del:Lv,emStrongLDelim:L6e,emStrongRDelimAst:R6e,emStrongRDelimUnd:N6e,escape:fj,link:P6e,nolink:gj,punctuation:A6e,reflink:pj,reflinkSearch:B6e,tag:O6e,text:C6e,url:Lv},F6e={...gA,link:an(/^!?\\[(label)\\]\\((.*?)\\)/).replace("label",M3).getRegex(),reflink:an(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace("label",M3).getRegex()},lA={...gA,escape:an(fj).replace("])","~|])").getRegex(),url:an(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_\'"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_\'"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&\'*+\\/=?_`{\\|}~-]+@)))/},z6e={...lA,br:an(dj).replace("{2,}","*").getRegex(),text:an(lA.text).replace("\\\\b_","\\\\b_| {2,}\\\\n").replace(/\\{2,\\}/g,"*").getRegex()},I3={normal:pA,gfm:T6e,pedantic:E6e},_v={normal:gA,gfm:lA,breaks:z6e,pedantic:F6e},fu=class t{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||cd,this.options.tokenizer=this.options.tokenizer||new Pp,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={block:I3.normal,inline:_v.normal};this.options.pedantic?(r.block=I3.pedantic,r.inline=_v.pedantic):this.options.gfm&&(r.block=I3.gfm,this.options.breaks?r.inline=_v.breaks:r.inline=_v.gfm),this.tokenizer.rules=r}static get rules(){return{block:I3,inline:_v}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(e){e=e.replace(/\\r\\n|\\r/g,`\n`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){this.options.pedantic?e=e.replace(/\\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\\t+)/gm,(o,l,u)=>l+" ".repeat(u.length));let i,a,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(i=o.call({lexer:this},e,r))?(e=e.substring(i.raw.length),r.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&r.length>0?r[r.length-1].raw+=`\n`:r.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`\n`+i.raw,a.text+=`\n`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=`\n`+i.raw,a.text+=`\n`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startBlock){let o=1/0,l=e.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},l),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(s=e.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){a=r[r.length-1],n&&a?.type==="paragraph"?(a.raw+=`\n`+i.raw,a.text+=`\n`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i),n=s.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&a.type==="text"?(a.raw+=`\n`+i.raw,a.text+=`\n`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(e){let o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let n,i,a,s=e,o,l,u;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)h.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(n=h.call({lexer:this},e,r))?(e=e.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(e,s,u)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),r.push(n);continue}if(a=e,this.options.extensions&&this.options.extensions.startInline){let h=1/0,f=e.slice(1),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},f),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(a=e.substring(0,h+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),l=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},Bp=class{options;parser;constructor(e){this.options=e||cd}space(e){return""}code({text:e,lang:r,escaped:n}){let i=(r||"").match(/^\\S*/)?.[0],a=e.replace(/\\n$/,"")+`\n`;return i?\'<pre><code class="language-\'+Gs(i)+\'">\'+(n?a:Gs(a,!0))+`</code></pre>\n`:"<pre><code>"+(n?a:Gs(a,!0))+`</code></pre>\n`}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>\n`}hr(e){return`<hr>\n`}list(e){let r=e.ordered,n=e.start,i="";for(let o=0;o<e.items.length;o++){let l=e.items[o];i+=this.listitem(l)}let a=r?"ol":"ul",s=r&&n!==1?\' start="\'+n+\'"\':"";return"<"+a+s+`>\n`+i+"</"+a+`>\n`}listitem(e){let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>\n`}checkbox({checked:e}){return"<input "+(e?\'checked="" \':"")+\'disabled="" type="checkbox">\'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let r="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<e.rows.length;a++){let s=e.rows[a];n="";for(let o=0;o<s.length;o++)n+=this.tablecell(s[o]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>\n<thead>\n`+r+`</thead>\n`+i+`</table>\n`}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),a=rj(e);if(a===null)return i;e=a;let s=\'<a href="\'+e+\'"\';return r&&(s+=\' title="\'+r+\'"\'),s+=">"+i+"</a>",s}image({href:e,title:r,text:n}){let i=rj(e);if(i===null)return n;e=i;let a=`<img src="${e}" alt="${n}"`;return r&&(a+=` title="${r}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}},Rv=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},du=class t{options;renderer;textRenderer;constructor(e){this.options=e||cd,this.options.renderer=this.options.renderer||new Bp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Rv}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(e,r=!0){let n="";for(let i=0;i<e.length;i++){let a=e[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(o.type)){n+=l||"";continue}}let s=a;switch(s.type){case"space":{n+=this.renderer.space(s);continue}case"hr":{n+=this.renderer.hr(s);continue}case"heading":{n+=this.renderer.heading(s);continue}case"code":{n+=this.renderer.code(s);continue}case"table":{n+=this.renderer.table(s);continue}case"blockquote":{n+=this.renderer.blockquote(s);continue}case"list":{n+=this.renderer.list(s);continue}case"html":{n+=this.renderer.html(s);continue}case"paragraph":{n+=this.renderer.paragraph(s);continue}case"text":{let o=s,l=this.renderer.text(o);for(;i+1<e.length&&e[i+1].type==="text";)o=e[++i],l+=`\n`+this.renderer.text(o);r?n+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l}]}):n+=l;continue}default:{let o=\'Token with "\'+s.type+\'" type was not found.\';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(e,r){r=r||this.renderer;let n="";for(let i=0;i<e.length;i++){let a=e[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=o||"";continue}}let s=a;switch(s.type){case"escape":{n+=r.text(s);break}case"html":{n+=r.html(s);break}case"link":{n+=r.link(s);break}case"image":{n+=r.image(s);break}case"strong":{n+=r.strong(s);break}case"em":{n+=r.em(s);break}case"codespan":{n+=r.codespan(s);break}case"br":{n+=r.br(s);break}case"del":{n+=r.del(s);break}case"text":{n+=r.text(s);break}default:{let o=\'Token with "\'+s.type+\'" type was not found.\';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},Op=class{options;constructor(e){this.options=e||cd}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}},cA=class{defaults=uA();options=this.setOptions;parse=this.#e(fu.lex,du.parse);parseInline=this.#e(fu.lexInline,du.parseInline);Parser=du;Renderer=Bp;TextRenderer=Rv;Lexer=fu;Tokenizer=Pp;Hooks=Op;constructor(...e){this.use(...e)}walkTokens(e,r){let n=[];for(let i of e)switch(n=n.concat(r.call(this,i)),i.type){case"table":{let a=i;for(let s of a.header)n=n.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)n=n.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=i;n=n.concat(this.walkTokens(a.items,r));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);n=n.concat(this.walkTokens(o,r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be \'block\' or \'inline\'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new Bp(this.defaults);for(let s in n.renderer){if(!(s in a))throw new Error(`renderer \'${s}\' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=n.renderer[o];n.useNewRenderer||(l=this.#t(l,o,a));let u=a[o];a[o]=(...h)=>{let f=l.apply(a,h);return f===!1&&(f=u.apply(a,h)),f||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new Pp(this.defaults);for(let s in n.tokenizer){if(!(s in a))throw new Error(`tokenizer \'${s}\' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=n.tokenizer[o],u=a[o];a[o]=(...h)=>{let f=l.apply(a,h);return f===!1&&(f=u.apply(a,h)),f}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Op;for(let s in n.hooks){if(!(s in a))throw new Error(`hook \'${s}\' does not exist`);if(s==="options")continue;let o=s,l=n.hooks[o],u=a[o];Op.passThroughHooks.has(s)?a[o]=h=>{if(this.defaults.async)return Promise.resolve(l.call(a,h)).then(d=>u.call(a,d));let f=l.call(a,h);return u.call(a,f)}:a[o]=(...h)=>{let f=l.apply(a,h);return f===!1&&(f=u.apply(a,h)),f}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}#t(e,r,n){switch(r){case"heading":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,n.parser.parseInline(i.tokens),i.depth,u6e(n.parser.parseInline(i.tokens,n.parser.textRenderer)))};case"code":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text,i.lang,!!i.escaped)};case"table":return function(i){if(!i.type||i.type!==r)return e.apply(this,arguments);let a="",s="";for(let l=0;l<i.header.length;l++)s+=this.tablecell({text:i.header[l].text,tokens:i.header[l].tokens,header:!0,align:i.align[l]});a+=this.tablerow({text:s});let o="";for(let l=0;l<i.rows.length;l++){let u=i.rows[l];s="";for(let h=0;h<u.length;h++)s+=this.tablecell({text:u[h].text,tokens:u[h].tokens,header:!1,align:i.align[h]});o+=this.tablerow({text:s})}return e.call(this,a,o)};case"blockquote":return function(i){if(!i.type||i.type!==r)return e.apply(this,arguments);let a=this.parser.parse(i.tokens);return e.call(this,a)};case"list":return function(i){if(!i.type||i.type!==r)return e.apply(this,arguments);let a=i.ordered,s=i.start,o=i.loose,l="";for(let u=0;u<i.items.length;u++){let h=i.items[u],f=h.checked,d=h.task,p="";if(h.task){let g=this.checkbox({checked:!!f});o?h.tokens.length>0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=g+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=g+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:g+" "}):p+=g+" "}p+=this.parser.parse(h.tokens,o),l+=this.listitem({type:"list_item",raw:p,text:p,task:d,checked:!!f,loose:o,tokens:h.tokens})}return e.call(this,l,a,s)};case"html":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text,i.block)};case"paragraph":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"escape":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)};case"link":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.href,i.title,this.parser.parseInline(i.tokens))};case"image":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.href,i.title,i.text)};case"strong":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"em":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"codespan":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)};case"del":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"text":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)}}return e}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return fu.lex(e,r??this.defaults)}parser(e,r){return du.parse(e,r??this.defaults)}#e(e,r){return(n,i)=>{let a={...i},s={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);let o=this.#r(!!s.silent,!!s.async);if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(l=>e(l,s)).then(l=>s.hooks?s.hooks.processAllTokens(l):l).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>r(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(o);try{s.hooks&&(n=s.hooks.preprocess(n));let l=e(n,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let u=r(l,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(l){return o(l)}}}#r(e,r){return n=>{if(n.message+=`\nPlease report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+Gs(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},ld=new cA;qr.options=qr.setOptions=function(t){return ld.setOptions(t),qr.defaults=ld.defaults,sj(qr.defaults),qr};qr.getDefaults=uA;qr.defaults=cd;qr.use=function(...t){return ld.use(...t),qr.defaults=ld.defaults,sj(qr.defaults),qr};qr.walkTokens=function(t,e){return ld.walkTokens(t,e)};qr.parseInline=ld.parseInline;qr.Parser=du;qr.parser=du.parse;qr.Renderer=Bp;qr.TextRenderer=Rv;qr.Lexer=fu;qr.lexer=fu.lex;qr.Tokenizer=Pp;qr.Hooks=Op;qr.parse=qr;Wvt=qr.options,Hvt=qr.setOptions,qvt=qr.use,Yvt=qr.walkTokens,Xvt=qr.parseInline,jvt=du.parse,Kvt=fu.lex});function O3(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\\r?\\n([\\t ]*)$/,"");var i=n.reduce(function(o,l){var u=l.match(/\\n([\\t ]+|(?!\\s).)/g);return u?o.concat(u.map(function(h){var f,d;return(d=(f=h.match(/[\\t ]/g))===null||f===void 0?void 0:f.length)!==null&&d!==void 0?d:0})):o},[]);if(i.length){var a=new RegExp(`\n[ ]{`+Math.min.apply(Math,i)+"}","g");n=n.map(function(o){return o.replace(a,`\n`)})}n[0]=n[0].replace(/^\\r?\\n/,"");var s=n[0];return e.forEach(function(o,l){var u=s.match(/(?:^|\\n)( *)$/),h=u?u[1]:"",f=o;typeof o=="string"&&o.includes(`\n`)&&(f=String(o).split(`\n`).map(function(d,p){return p===0?d:""+h+d}).join(`\n`)),s+=f+n[l+1]}),s}var mA=F(()=>{});function vj(t,{markdownAutoWrap:e}){let n=t.replace(/<br\\/>/g,`\n`).replace(/\\n{2,}/g,`\n`),i=O3(n);return e===!1?i.replace(/ /g," "):i}function yj(t,e={}){let r=vj(t,e),n=qr.lexer(r),i=[[]],a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`\n`).forEach((h,f)=>{f!==0&&(a++,i.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"\'"),d&&i[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(u=>{s(u,o.type)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}return v(s,"processNode"),n.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}),i}function xj(t,{markdownAutoWrap:e}={}){let r=qr.lexer(t);function n(i){return i.type==="text"?e===!1?i.text.replace(/\\n */g,"<br/>").replace(/ /g," "):i.text.replace(/\\n */g,"<br/>"):i.type==="strong"?`<strong>${i.tokens?.map(n).join("")}</strong>`:i.type==="em"?`<em>${i.tokens?.map(n).join("")}</em>`:i.type==="paragraph"?`<p>${i.tokens?.map(n).join("")}</p>`:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:`Unsupported markdown: ${i.type}`}return v(n,"output"),r.map(n).join("")}function bj(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function wj(t,e){let r=bj(e.content);return yA(t,[],r,e.type)}function yA(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];let[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?yA(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function kj(t,e){if(t.some(({content:r})=>r.includes(`\n`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return P3(t,e)}function P3(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());let a=t.shift()??{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),e(s))return P3(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[o,l]=wj(e,a);r.push([o]),l.content&&t.unshift(l)}return P3(t,e,r)}function vA(t,e){e&&t.attr("style",e)}async function Tj(t,e,r,n,i=!1){let a=t.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);let s=a.append("xhtml:div"),o=e.label;e.label&&ki(e.label)&&(o=await rh(e.label.replace(je.lineBreakRegex,`\n`),pe()));let l=e.isNode?"nodeLabel":"edgeLabel",u=s.append("span");u.html(o),vA(u,e.labelStyle),u.attr("class",`${l} ${n}`),vA(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),h=s.node().getBoundingClientRect()),a.node()}function B3(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function Ej(t,e,r){let n=t.append("text"),i=B3(n,1,e);F3(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function xA(t,e,r){let n=t.append("text"),i=B3(n,1,e);F3(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function Sj(t,e,r,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1"),l=0;for(let u of r){let h=v(d=>Ej(a,1.1,d)<=t,"checkWidth"),f=h(u)?[u]:kj(u,h);for(let d of f){let p=B3(o,l,1.1);F3(p,d),l++}}if(n){let u=o.node().getBBox(),h=2;return s.attr("x",u.x-h).attr("y",u.y-h).attr("width",u.width+2*h).attr("height",u.height+2*h),a.node()}else return o.node()}function F3(t,e){t.text(""),e.forEach((r,n)=>{let i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}function z3(t){return t.replace(/fa[bklrs]?:fa-[\\w-]+/g,e=>`<i class=\'${e.replace(":"," ")}\'></i>`)}var ea,za=F(()=>{xn();or();lr();mj();mA();v(vj,"preprocessMarkdown");v(yj,"markdownToLines");v(xj,"markdownToHTML");v(bj,"splitTextToChars");v(wj,"splitWordToFitWidth");v(yA,"splitWordToFitWidthRecursion");v(kj,"splitLineToFitWidth");v(P3,"splitLineToFitWidthRecursion");v(vA,"applyStyle");v(Tj,"addHtmlSpan");v(B3,"createTspan");v(Ej,"computeWidthOfText");v(xA,"computeDimensionOfText");v(Sj,"createFormattedText");v(F3,"updateTextContentAndStyles");v(z3,"replaceIconSubstring");ea=v(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},u)=>{if(re.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a){let h=xj(e,u),f=z3($s(h)),d=e.replace(/\\\\\\\\/g,"\\\\"),p={isNode:s,label:ki(e)?d:f,labelStyle:r.replace("fill:","color:")};return await Tj(t,p,o,i,l)}else{let h=e.replace(/<br\\s*\\/?>/g,"<br/>"),f=yj(h.replace("<br>","<br/>"),u),d=Sj(o,t,f,e?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ge(d).attr("style",p)}else{let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Ge(d).select("rect").attr("style",p.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ge(d).select("text").attr("style",g)}return d}},"createText")});function bA(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(let l of t){let[u,h]=l;l[0]=(u-n)*s-(h-i)*o+n,l[1]=(u-n)*o+(h-i)*s+i}}}function $6e(t,e){return t[0]===e[0]&&t[1]===e[1]}function G6e(t,e,r,n=1){let i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(i)for(let u of s)bA(u,o,i);let l=function(u,h,f){let d=[];for(let b of u){let w=[...b];$6e(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}let p=[];h=Math.max(h,.1);let g=[];for(let b of d)for(let w=0;w<b.length-1;w++){let _=b[w],k=b[w+1];if(_[1]!==k[1]){let E=Math.min(_[1],k[1]);g.push({ymin:E,ymax:Math.max(_[1],k[1]),x:E===_[1]?_[0]:k[0],islope:(k[0]-_[0])/(k[1]-_[1])})}}if(g.sort((b,w)=>b.ymin<w.ymin?-1:b.ymin>w.ymin?1:b.x<w.x?-1:b.x>w.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!g.length)return p;let m=[],x=g[0].ymin,y=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let w=0;w<g.length&&!(g[w].ymin>x);w++)b=w;g.splice(0,b+1).forEach(w=>{m.push({s:x,edge:w})})}if(m=m.filter(b=>!(b.edge.ymax<=x)),m.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(f!==1||y%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){let w=b+1;if(w>=m.length)break;let _=m[b].edge,k=m[w].edge;p.push([[Math.round(_.x),x],[Math.round(k.x),x]])}x+=f,m.forEach(b=>{b.edge.x=b.edge.x+f*b.edge.islope}),y++}return p}(s,a,n);if(i){for(let u of s)bA(u,o,-i);(function(u,h,f){let d=[];u.forEach(p=>d.push(...p)),bA(d,h,f)})(l,o,-i)}return l}function Pv(t,e){var r;let n=e.hachureAngle+90,i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),G6e(t,i,n,a||1)}function X3(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}function kA(t,e){return t.type===e}function PA(t){let e=[],r=function(s){let o=new Array;for(;s!=="";)if(s.match(/^([ \\t\\r\\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:U6e,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\\.[0-9]*)?|[-+]?\\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:wA,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:Cj,text:""},o}(t),n="BOD",i=0,a=r[i];for(;!kA(a,Cj);){let s=0,o=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return PA("M0,0"+t);i++,s=$3[a.text],n=a.text}else kA(a,wA)?s=$3[n]:(i++,s=$3[a.text],n=a.text);if(!(i+s<r.length))throw new Error("Path data ended short");for(let l=i;l<i+s;l++){let u=r[l];if(!kA(u,wA))throw new Error("Param not a number: "+n+","+u.text);o[o.length]=+u.text}if(typeof $3[n]!="number")throw new Error("Bad segment: "+n);{let l={key:n,data:o};e.push(l),i+=s,a=r[i],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function Dj(t){let e=0,r=0,n=0,i=0,a=[];for(let{key:s,data:o}of t)switch(s){case"M":a.push({key:"M",data:[...o]}),[e,r]=o,[n,i]=o;break;case"m":e+=o[0],r+=o[1],a.push({key:"M",data:[e,r]}),n=e,i=r;break;case"L":a.push({key:"L",data:[...o]}),[e,r]=o;break;case"l":e+=o[0],r+=o[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...o]}),e=o[4],r=o[5];break;case"c":{let l=o.map((u,h)=>h%2?u+r:u+e);a.push({key:"C",data:l}),e=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{let l=o.map((u,h)=>h%2?u+r:u+e);a.push({key:"Q",data:l}),e=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{let l=o.map((u,h)=>h%2?u+r:u+e);a.push({key:"S",data:l}),e=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function Oj(t){let e=[],r="",n=0,i=0,a=0,s=0,o=0,l=0;for(let{key:u,data:h}of t){switch(u){case"M":e.push({key:"M",data:[...h]}),[n,i]=h,[a,s]=h;break;case"C":e.push({key:"C",data:[...h]}),n=h[4],i=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[n,i]=h;break;case"H":n=h[0],e.push({key:"L",data:[n,i]});break;case"V":i=h[0],e.push({key:"L",data:[n,i]});break;case"S":{let f=0,d=0;r==="C"||r==="S"?(f=n+(n-o),d=i+(i-l)):(f=n,d=i),e.push({key:"C",data:[f,d,...h]}),o=h[0],l=h[1],n=h[2],i=h[3];break}case"T":{let[f,d]=h,p=0,g=0;r==="Q"||r==="T"?(p=n+(n-o),g=i+(i-l)):(p=n,g=i);let m=n+2*(p-n)/3,x=i+2*(g-i)/3,y=f+2*(p-f)/3,b=d+2*(g-d)/3;e.push({key:"C",data:[m,x,y,b,f,d]}),o=p,l=g,n=f,i=d;break}case"Q":{let[f,d,p,g]=h,m=n+2*(f-n)/3,x=i+2*(d-i)/3,y=p+2*(f-p)/3,b=g+2*(d-g)/3;e.push({key:"C",data:[m,x,y,b,p,g]}),o=f,l=d,n=p,i=g;break}case"A":{let f=Math.abs(h[0]),d=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],x=h[5],y=h[6];f===0||d===0?(e.push({key:"C",data:[n,i,x,y,x,y]}),n=x,i=y):(n!==x||i!==y)&&(Pj(n,i,x,y,f,d,p,g,m).forEach(function(b){e.push({key:"C",data:b})}),n=x,i=y);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=u}return e}function Mv(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Pj(t,e,r,n,i,a,s,o,l,u){let h=(f=s,Math.PI*f/180);var f;let d=[],p=0,g=0,m=0,x=0;if(u)[p,g,m,x]=u;else{[t,e]=Mv(t,e,-h),[r,n]=Mv(r,n,-h);let I=(t-r)/2,A=(e-n)/2,D=I*I/(i*i)+A*A/(a*a);D>1&&(D=Math.sqrt(D),i*=D,a*=D);let N=i*i,O=a*a,B=N*O-N*A*A-O*I*I,P=N*A*A+O*I*I,$=(o===l?-1:1)*Math.sqrt(Math.abs(B/P));m=$*i*A/a+(t+r)/2,x=$*-a*I/i+(e+n)/2,p=Math.asin(parseFloat(((e-x)/a).toFixed(9))),g=Math.asin(parseFloat(((n-x)/a).toFixed(9))),t<m&&(p=Math.PI-p),r<m&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let y=g-p;if(Math.abs(y)>120*Math.PI/180){let I=g,A=r,D=n;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=Pj(r=m+i*Math.cos(g),n=x+a*Math.sin(g),A,D,i,a,s,0,l,[g,I,m,x])}y=g-p;let b=Math.cos(p),w=Math.sin(p),_=Math.cos(g),k=Math.sin(g),E=Math.tan(y/4),L=4/3*i*E,S=4/3*a*E,C=[t,e],M=[t+L*w,e-S*b],R=[r+L*k,n-S*_],T=[r,n];if(M[0]=2*C[0]-M[0],M[1]=2*C[1]-M[1],u)return[M,R,T].concat(d);{d=[M,R,T].concat(d);let I=[];for(let A=0;A<d.length;A+=3){let D=Mv(d[A][0],d[A][1],h),N=Mv(d[A+1][0],d[A+1][1],h),O=Mv(d[A+2][0],d[A+2][1],h);I.push([D[0],D[1],N[0],N[1],O[0],O[1]])}return I}}function Bj(t,e,r,n,i){return{type:"path",ops:Eh(t,e,r,n,i)}}function V3(t,e,r){let n=(t||[]).length;if(n>2){let i=[];for(let a=0;a<n-1;a++)i.push(...Eh(t[a][0],t[a][1],t[a+1][0],t[a+1][1],r));return e&&i.push(...Eh(t[n-1][0],t[n-1][1],t[0][0],t[0][1],r)),{type:"path",ops:i}}return n===2?Bj(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function W6e(t,e,r,n,i){return function(a,s){return V3(a,!0,s)}([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],i)}function Aj(t,e){if(t.length){let r=typeof t[0][0]=="number"?[t]:t,n=G3(r[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:G3(r[0],1.5*(1+.22*e.roughness),Rj(e));for(let a=1;a<r.length;a++){let s=r[a];if(s.length){let o=G3(s,1*(1+.2*e.roughness),e),l=e.disableMultiStroke?[]:G3(s,1.5*(1+.22*e.roughness),Rj(e));for(let u of o)u.op!=="move"&&n.push(u);for(let u of l)u.op!=="move"&&i.push(u)}}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function Fj(t,e,r){let n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/i,s=Math.abs(t/2),o=Math.abs(e/2),l=1-r.curveFitting;return s+=Kt(s*l,r),o+=Kt(o*l,r),{increment:a,rx:s,ry:o}}function NA(t,e,r,n){let[i,a]=Nj(n.increment,t,e,n.rx,n.ry,1,n.increment*H3(.1,H3(.4,1,r),r),r),s=q3(i,null,r);if(!r.disableMultiStroke&&r.roughness!==0){let[o]=Nj(n.increment,t,e,n.rx,n.ry,1.5,0,r),l=q3(o,null,r);s=s.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function _j(t,e,r,n,i,a,s,o,l){let u=t,h=e,f=Math.abs(r/2),d=Math.abs(n/2);f+=Kt(.01*f,l),d+=Kt(.01*d,l);let p=i,g=a;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);let m=2*Math.PI/l.curveStepCount,x=Math.min(m/2,(g-p)/2),y=Ij(x,u,h,f,d,p,g,1,l);if(!l.disableMultiStroke){let b=Ij(x,u,h,f,d,p,g,1.5,l);y.push(...b)}return s&&(o?y.push(...Eh(u,h,u+f*Math.cos(p),h+d*Math.sin(p),l),...Eh(u,h,u+f*Math.cos(g),h+d*Math.sin(g),l)):y.push({op:"lineTo",data:[u,h]},{op:"lineTo",data:[u+f*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:y}}function Lj(t,e){let r=Oj(Dj(PA(t))),n=[],i=[0,0],a=[0,0];for(let{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...Eh(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{let[l,u,h,f,d,p]=o;n.push(...H6e(l,u,h,f,d,p,a,e)),a=[d,p];break}case"Z":n.push(...Eh(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function TA(t,e){let r=[];for(let n of t)if(n.length){let i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+Kt(i,e),n[0][1]+Kt(i,e)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[n[s][0]+Kt(i,e),n[s][1]+Kt(i,e)]})}}return{type:"fillPath",ops:r}}function Fp(t,e){return function(r,n){let i=r.fillStyle||"hachure";if(!fs[i])switch(i){case"zigzag":fs[i]||(fs[i]=new SA(n));break;case"cross-hatch":fs[i]||(fs[i]=new CA(n));break;case"dots":fs[i]||(fs[i]=new AA(n));break;case"dashed":fs[i]||(fs[i]=new _A(n));break;case"zigzag-line":fs[i]||(fs[i]=new LA(n));break;default:i="hachure",fs[i]||(fs[i]=new Ov(n))}return fs[i]}(e,V6e).fillPolygons(t,e)}function Rj(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function zj(t){return t.randomizer||(t.randomizer=new RA(t.seed||0)),t.randomizer.next()}function H3(t,e,r,n=1){return r.roughness*n*(zj(r)*(e-t)+t)}function Kt(t,e,r=1){return H3(-t,t,e,r)}function Eh(t,e,r,n,i,a=!1){let s=a?i.disableMultiStrokeFill:i.disableMultiStroke,o=IA(t,e,r,n,i,!0,!1);if(s)return o;let l=IA(t,e,r,n,i,!0,!0);return o.concat(l)}function IA(t,e,r,n,i,a,s){let o=Math.pow(t-r,2)+Math.pow(e-n,2),l=Math.sqrt(o),u=1;u=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);let f=h/2,d=.2+.2*zj(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=Kt(p,i,u),g=Kt(g,i,u);let m=[],x=()=>Kt(f,i,u),y=()=>Kt(h,i,u),b=i.preserveVertices;return a&&(s?m.push({op:"move",data:[t+(b?0:x()),e+(b?0:x())]}):m.push({op:"move",data:[t+(b?0:Kt(h,i,u)),e+(b?0:Kt(h,i,u))]})),s?m.push({op:"bcurveTo",data:[p+t+(r-t)*d+x(),g+e+(n-e)*d+x(),p+t+2*(r-t)*d+x(),g+e+2*(n-e)*d+x(),r+(b?0:x()),n+(b?0:x())]}):m.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),g+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),g+e+2*(n-e)*d+y(),r+(b?0:y()),n+(b?0:y())]}),m}function G3(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+Kt(e,r),t[0][1]+Kt(e,r)]),n.push([t[0][0]+Kt(e,r),t[0][1]+Kt(e,r)]);for(let i=1;i<t.length;i++)n.push([t[i][0]+Kt(e,r),t[i][1]+Kt(e,r)]),i===t.length-1&&n.push([t[i][0]+Kt(e,r),t[i][1]+Kt(e,r)]);return q3(n,null,r)}function q3(t,e,r){let n=t.length,i=[];if(n>3){let a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+2<n;o++){let l=t[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*t[o+1][0]-s*t[o-1][0])/6,l[1]+(s*t[o+1][1]-s*t[o-1][1])/6],a[2]=[t[o+1][0]+(s*t[o][0]-s*t[o+2][0])/6,t[o+1][1]+(s*t[o][1]-s*t[o+2][1])/6],a[3]=[t[o+1][0],t[o+1][1]],i.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let o=r.maxRandomnessOffset;i.push({op:"lineTo",data:[e[0]+Kt(o,r),e[1]+Kt(o,r)]})}}else n===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):n===2&&i.push(...IA(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return i}function Nj(t,e,r,n,i,a,s,o){let l=[],u=[];if(o.roughness===0){t/=4,u.push([e+n*Math.cos(-t),r+i*Math.sin(-t)]);for(let h=0;h<=2*Math.PI;h+=t){let f=[e+n*Math.cos(h),r+i*Math.sin(h)];l.push(f),u.push(f)}u.push([e+n*Math.cos(0),r+i*Math.sin(0)]),u.push([e+n*Math.cos(t),r+i*Math.sin(t)])}else{let h=Kt(.5,o)-Math.PI/2;u.push([Kt(a,o)+e+.9*n*Math.cos(h-t),Kt(a,o)+r+.9*i*Math.sin(h-t)]);let f=2*Math.PI+h-.01;for(let d=h;d<f;d+=t){let p=[Kt(a,o)+e+n*Math.cos(d),Kt(a,o)+r+i*Math.sin(d)];l.push(p),u.push(p)}u.push([Kt(a,o)+e+n*Math.cos(h+2*Math.PI+.5*s),Kt(a,o)+r+i*Math.sin(h+2*Math.PI+.5*s)]),u.push([Kt(a,o)+e+.98*n*Math.cos(h+s),Kt(a,o)+r+.98*i*Math.sin(h+s)]),u.push([Kt(a,o)+e+.9*n*Math.cos(h+.5*s),Kt(a,o)+r+.9*i*Math.sin(h+.5*s)])}return[u,l]}function Ij(t,e,r,n,i,a,s,o,l){let u=a+Kt(.1,l),h=[];h.push([Kt(o,l)+e+.9*n*Math.cos(u-t),Kt(o,l)+r+.9*i*Math.sin(u-t)]);for(let f=u;f<=s;f+=t)h.push([Kt(o,l)+e+n*Math.cos(f),Kt(o,l)+r+i*Math.sin(f)]);return h.push([e+n*Math.cos(s),r+i*Math.sin(s)]),h.push([e+n*Math.cos(s),r+i*Math.sin(s)]),q3(h,null,l)}function H6e(t,e,r,n,i,a,s,o){let l=[],u=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3],h=[0,0],f=o.disableMultiStroke?1:2,d=o.preserveVertices;for(let p=0;p<f;p++)p===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(d?0:Kt(u[0],o)),s[1]+(d?0:Kt(u[0],o))]}),h=d?[i,a]:[i+Kt(u[p],o),a+Kt(u[p],o)],l.push({op:"bcurveTo",data:[t+Kt(u[p],o),e+Kt(u[p],o),r+Kt(u[p],o),n+Kt(u[p],o),h[0],h[1]]});return l}function Dv(t){return[...t]}function Mj(t,e=0){let r=t.length;if(r<3)throw new Error("A curve must have at least three points.");let n=[];if(r===3)n.push(Dv(t[0]),Dv(t[1]),Dv(t[2]),Dv(t[2]));else{let i=[];i.push(t[0],t[0]);for(let o=1;o<t.length;o++)i.push(t[o]),o===t.length-1&&i.push(t[o]);let a=[],s=1-e;n.push(Dv(i[0]));for(let o=1;o+2<i.length;o++){let l=i[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*i[o+1][0]-s*i[o-1][0])/6,l[1]+(s*i[o+1][1]-s*i[o-1][1])/6],a[2]=[i[o+1][0]+(s*i[o][0]-s*i[o+2][0])/6,i[o+1][1]+(s*i[o][1]-s*i[o+2][1])/6],a[3]=[i[o+1][0],i[o+1][1]],n.push(a[1],a[2],a[3])}}return n}function W3(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function q6e(t,e,r){let n=W3(e,r);if(n===0)return W3(t,e);let i=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/n;return i=Math.max(0,Math.min(1,i)),W3(t,ud(e,r,i))}function ud(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function MA(t,e,r,n){let i=n||[];if(function(o,l){let u=o[l+0],h=o[l+1],f=o[l+2],d=o[l+3],p=3*h[0]-2*u[0]-d[0];p*=p;let g=3*h[1]-2*u[1]-d[1];g*=g;let m=3*f[0]-2*d[0]-u[0];m*=m;let x=3*f[1]-2*d[1]-u[1];return x*=x,p<m&&(p=m),g<x&&(g=x),p+g}(t,e)<r){let o=t[e+0];i.length?(a=i[i.length-1],s=o,Math.sqrt(W3(a,s))>1&&i.push(o)):i.push(o),i.push(t[e+3])}else{let l=t[e+0],u=t[e+1],h=t[e+2],f=t[e+3],d=ud(l,u,.5),p=ud(u,h,.5),g=ud(h,f,.5),m=ud(d,p,.5),x=ud(p,g,.5),y=ud(m,x,.5);MA([l,d,m,y],0,r,i),MA([y,x,g,f],0,r,i)}var a,s;return i}function Y6e(t,e){return Y3(t,0,t.length,e)}function Y3(t,e,r,n,i){let a=i||[],s=t[e],o=t[r-1],l=0,u=1;for(let h=e+1;h<r-1;++h){let f=q6e(t[h],s,o);f>l&&(l=f,u=h)}return Math.sqrt(l)>n?(Y3(t,e,u+1,n,a),Y3(t,u,r,n,a)):(a.length||a.push(s),a.push(o)),a}function EA(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a<i;a++)MA(t,3*a,e,n);return r&&r>0?Y3(n,0,n.length,r):n}var Ov,SA,CA,AA,_A,LA,fs,RA,U6e,wA,Cj,$3,V6e,Us,zp,DA,U3,OA,Xe,Gt=F(()=>{Ov=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=Pv(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){let n=[];for(let i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};SA=class extends Ov{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=Pv(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*n*Math.cos(a),l=.5*n*Math.sin(a);for(let[u,h]of i)X3([u,h])&&s.push([[u[0]-o,u[1]+l],[...h]],[[u[0]+o,u[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},CA=class extends Ov{fillPolygons(e,r){let n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n}},AA=class{constructor(e){this.helper=e}fillPolygons(e,r){let n=Pv(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let s=i/4;for(let o of e){let l=X3(o),u=l/i,h=Math.ceil(u)-1,f=l-h*i,d=(o[0][0]+o[1][0])/2-i/4,p=Math.min(o[0][1],o[1][1]);for(let g=0;g<h;g++){let m=p+f+g*i,x=d-s+2*Math.random()*s,y=m-s+2*Math.random()*s,b=this.helper.ellipse(x,y,a,a,r);n.push(...b.ops)}}return{type:"fillSketch",ops:n}}},_A=class{constructor(e){this.helper=e}fillPolygons(e,r){let n=Pv(e,r);return{type:"fillSketch",ops:this.dashedLine(n,r)}}dashedLine(e,r){let n=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,i=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return e.forEach(s=>{let o=X3(s),l=Math.floor(o/(n+i)),u=(o+i-l*(n+i))/2,h=s[0],f=s[1];h[0]>f[0]&&(h=s[1],f=s[0]);let d=Math.atan((f[1]-h[1])/(f[0]-h[0]));for(let p=0;p<l;p++){let g=p*(n+i),m=g+n,x=[h[0]+g*Math.cos(d)+u*Math.cos(d),h[1]+g*Math.sin(d)+u*Math.sin(d)],y=[h[0]+m*Math.cos(d)+u*Math.cos(d),h[1]+m*Math.sin(d)+u*Math.sin(d)];a.push(...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],r))}}),a}},LA=class{constructor(e){this.helper=e}fillPolygons(e,r){let n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,i=r.zigzagOffset<0?n:r.zigzagOffset,a=Pv(e,r=Object.assign({},r,{hachureGap:n+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,r)}}zigzagLines(e,r,n){let i=[];return e.forEach(a=>{let s=X3(a),o=Math.round(s/(2*r)),l=a[0],u=a[1];l[0]>u[0]&&(l=a[1],u=a[0]);let h=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f<o;f++){let d=2*f*r,p=2*(f+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],y=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(m[0],m[1],y[0],y[1],n),...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],n))}}),i}},fs={},RA=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},U6e=0,wA=1,Cj=2,$3={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};V6e={randOffset:function(t,e){return Kt(t,e)},randOffsetWithRange:function(t,e,r){return H3(t,e,r)},ellipse:function(t,e,r,n,i){let a=Fj(r,n,i);return NA(t,e,i,a).opset},doubleLineOps:function(t,e,r,n,i){return Eh(t,e,r,n,i,!0)}};Us="none",zp=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,n){return{shape:e,sets:r||[],options:n||this.defaultOptions}}line(e,r,n,i,a){let s=this._o(a);return this._d("line",[Bj(e,r,n,i,s)],s)}rectangle(e,r,n,i,a){let s=this._o(a),o=[],l=W6e(e,r,n,i,s);if(s.fill){let u=[[e,r],[e+n,r],[e+n,r+i],[e,r+i]];s.fillStyle==="solid"?o.push(TA([u],s)):o.push(Fp([u],s))}return s.stroke!==Us&&o.push(l),this._d("rectangle",o,s)}ellipse(e,r,n,i,a){let s=this._o(a),o=[],l=Fj(n,i,s),u=NA(e,r,s,l);if(s.fill)if(s.fillStyle==="solid"){let h=NA(e,r,s,l).opset;h.type="fillPath",o.push(h)}else o.push(Fp([u.estimatedPoints],s));return s.stroke!==Us&&o.push(u.opset),this._d("ellipse",o,s)}circle(e,r,n,i){let a=this.ellipse(e,r,n,n,i);return a.shape="circle",a}linearPath(e,r){let n=this._o(r);return this._d("linearPath",[V3(e,!1,n)],n)}arc(e,r,n,i,a,s,o=!1,l){let u=this._o(l),h=[],f=_j(e,r,n,i,a,s,o,!0,u);if(o&&u.fill)if(u.fillStyle==="solid"){let d=Object.assign({},u);d.disableMultiStroke=!0;let p=_j(e,r,n,i,a,s,!0,!1,d);p.type="fillPath",h.push(p)}else h.push(function(d,p,g,m,x,y,b){let w=d,_=p,k=Math.abs(g/2),E=Math.abs(m/2);k+=Kt(.01*k,b),E+=Kt(.01*E,b);let L=x,S=y;for(;L<0;)L+=2*Math.PI,S+=2*Math.PI;S-L>2*Math.PI&&(L=0,S=2*Math.PI);let C=(S-L)/b.curveStepCount,M=[];for(let R=L;R<=S;R+=C)M.push([w+k*Math.cos(R),_+E*Math.sin(R)]);return M.push([w+k*Math.cos(S),_+E*Math.sin(S)]),M.push([w,_]),Fp([M],b)}(e,r,n,i,a,s,u));return u.stroke!==Us&&h.push(f),this._d("arc",h,u)}curve(e,r){let n=this._o(r),i=[],a=Aj(e,n);if(n.fill&&n.fill!==Us)if(n.fillStyle==="solid"){let s=Aj(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],o=e;if(o.length){let l=typeof o[0][0]=="number"?[o]:o;for(let u of l)u.length<3?s.push(...u):u.length===3?s.push(...EA(Mj([u[0],u[0],u[1],u[2]]),10,(1+n.roughness)/2)):s.push(...EA(Mj(u),10,(1+n.roughness)/2))}s.length&&i.push(Fp([s],n))}return n.stroke!==Us&&i.push(a),this._d("curve",i,n)}polygon(e,r){let n=this._o(r),i=[],a=V3(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(TA([e],n)):i.push(Fp([e],n))),n.stroke!==Us&&i.push(a),this._d("polygon",i,n)}path(e,r){let n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\\n/g," ").replace(/(-\\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==Us,s=n.stroke!==Us,o=!!(n.simplification&&n.simplification<1),l=function(h,f,d){let p=Oj(Dj(PA(h))),g=[],m=[],x=[0,0],y=[],b=()=>{y.length>=4&&m.push(...EA(y,f)),y=[]},w=()=>{b(),m.length&&(g.push(m),m=[])};for(let{key:k,data:E}of p)switch(k){case"M":w(),x=[E[0],E[1]],m.push(x);break;case"L":b(),m.push([E[0],E[1]]);break;case"C":if(!y.length){let L=m.length?m[m.length-1]:x;y.push([L[0],L[1]])}y.push([E[0],E[1]]),y.push([E[2],E[3]]),y.push([E[4],E[5]]);break;case"Z":b(),m.push([x[0],x[1]])}if(w(),!d)return g;let _=[];for(let k of g){let E=Y6e(k,d);E.length&&_.push(E)}return _}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),u=Lj(e,n);if(a)if(n.fillStyle==="solid")if(l.length===1){let h=Lj(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(TA(l,n));else i.push(Fp(l,n));return s&&(o?l.forEach(h=>{i.push(V3(h,!1,n))}):i.push(u)),this._d("path",i,n)}opsToPath(e,r){let n="";for(let i of e.ops){let a=typeof r=="number"&&r>=0?i.data.map(s=>+s.toFixed(r)):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(e){let r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(let a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Us};break;case"fillPath":s={d:this.opsToPath(a),stroke:Us,strokeWidth:0,fill:n.fill||Us};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Us,strokeWidth:n,fill:Us}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}},DA=class{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new zp(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,o),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(let a of r.ops){let s=typeof n=="number"&&n>=0?a.data.map(o=>+o.toFixed(n)):a.data;switch(a.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s),s}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s),s}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s),s}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a),a}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,a,s,o=!1,l){let u=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(u),u}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){let n=this.gen.path(e,r);return this.draw(n),n}},U3="http://www.w3.org/2000/svg",OA=class{constructor(e,r){this.svg=e,this.gen=new zp(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(U3,"g"),s=e.options.fixedDecimalPlaceDigits;for(let o of r){let l=null;switch(o.type){case"path":l=i.createElementNS(U3,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",n.stroke),l.setAttribute("stroke-width",n.strokeWidth+""),l.setAttribute("fill","none"),n.strokeLineDash&&l.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(U3,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,o,n)}l&&a.appendChild(l)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=e.createElementNS(U3,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s)}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s)}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s)}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a)}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,a,s,o=!1,l){let u=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(u)}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n)}path(e,r){let n=this.gen.path(e,r);return this.draw(n)}},Xe={canvas:(t,e)=>new DA(t,e),svg:(t,e)=>new OA(t,e),generator:t=>new zp(t),newSeed:()=>zp.newSeed()}});function Er(t){let e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}function Sh(t,e,r,n,i,a){let s=[],l=r-t,u=n-e,h=l/a,f=2*Math.PI/h,d=e+u/2;for(let p=0;p<=50;p++){let g=p/50,m=t+g*l,x=d+i*Math.sin(f*(m-t));s.push({x:m,y:x})}return s}function $A(t,e,r,n,i,a){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;f<n;f++){let d=o+f*h,p=t+r*Math.cos(d),g=e+r*Math.sin(d);s.push({x:-p,y:-g})}return s}function $j(t,e){e&&t.attr("style",e)}async function Gj(t){let e=Ge(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;t.label&&ki(t.label)&&(n=await rh(t.label.replace(je.lineBreakRegex,`\n`),pe()));let i=t.isNode?"nodeLabel":"edgeLabel";return r.html(\'<span class="\'+i+\'" \'+(t.labelStyle?\'style="\'+t.labelStyle+\'"\':"")+">"+n+"</span>"),$j(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}function Hj(t,e){return t.intersect(e)}function qj(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x<i&&(u=-u);var h=Math.abs(e*r*o/l);return n.y<a&&(h=-h),{x:i+u,y:a+h}}function Xj(t,e,r){return Yj(t,e,e,r)}function jj(t,e,r,n){var i,a,s,o,l,u,h,f,d,p,g,m,x,y,b;if(i=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,d=i*r.x+s*r.y+l,p=i*n.x+s*n.y+l,!(d!==0&&p!==0&&FA(d,p))&&(a=n.y-r.y,o=r.x-n.x,u=n.x*r.y-r.x*n.y,h=a*t.x+o*t.y+u,f=a*e.x+o*e.y+u,!(h!==0&&f!==0&&FA(h,f))&&(g=i*o-a*s,g!==0)))return m=Math.abs(g/2),x=s*u-o*l,y=x<0?(x-m)/g:(x+m)/g,x=a*l-i*u,b=x<0?(x-m)/g:(x+m)/g,{x:y,y:b}}function FA(t,e){return t*e>0}function Kj(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=n-t.width/2-s,u=i-t.height/2-o;for(let h=0;h<e.length;h++){let f=e[h],d=e[h<e.length-1?h+1:0],p=sEe(t,r,{x:l+f.x,y:u+f.y},{x:l+d.x,y:u+d.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(h,f){let d=h.x-r.x,p=h.y-r.y,g=Math.sqrt(d*d+p*p),m=f.x-r.x,x=f.y-r.y,y=Math.sqrt(m*m+x*x);return g<y?-1:g===y?0:1}),a[0]):t}function Zj(t,e){let{labelStyles:r}=Ht(e);e.labelStyle=r;let n=tr(e),i=n;n||(i="anchor");let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=1,{cssStyles:o}=e,l=Xe.svg(a),u=Ft(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(u.roughness=0);let h=l.circle(0,0,s*2,u),f=a.insert(()=>h,":first-child");return f.attr("class","anchor").attr("style",ba(o)),Bt(e,f),e.intersect=function(d){return re.info("Circle intersect",e,s,d),Mt.circle(e,s,d)},a}function zA(t,e,r,n,i,a,s){let l=(t+r)/2,u=(e+n)/2,h=Math.atan2(n-e,r-t),f=(r-t)/2,d=(n-e)/2,p=f/i,g=d/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");let x=Math.sqrt(1-m**2),y=l+x*a*Math.sin(h)*(s?-1:1),b=u-x*i*Math.cos(h)*(s?-1:1),w=Math.atan2((e-b)/a,(t-y)/i),k=Math.atan2((n-b)/a,(r-y)/i)-w;s&&k<0&&(k+=2*Math.PI),!s&&k>0&&(k-=2*Math.PI);let E=[];for(let L=0;L<20;L++){let S=L/19,C=w+S*k,M=y+i*Math.cos(C),R=b+a*Math.sin(C);E.push({x:M,y:R})}return E}async function Qj(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=a.width+e.padding+20,o=a.height+e.padding,l=o/2,u=l/(2.5+o/50),{cssStyles:h}=e,f=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...zA(-s/2,-o/2,-s/2,o/2,u,l,!1),{x:s/2,y:o/2},...zA(s/2,o/2,s/2,-o/2,u,l,!0)],d=Xe.svg(i),p=Ft(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=Er(f),m=d.path(g,p),x=i.insert(()=>m,":first-child");return x.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${u/2}, 0)`),Bt(e,x),e.intersect=function(y){return Mt.polygon(e,f,y)},i}function vu(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function Jj(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=a.height+e.padding,o=12,l=a.width+e.padding+o,u=0,h=l,f=-s,d=0,p=[{x:u+o,y:f},{x:h,y:f},{x:h,y:d},{x:u,y:d},{x:u,y:f+o},{x:u+o,y:f}],g,{cssStyles:m}=e;if(e.look==="handDrawn"){let x=Xe.svg(i),y=Ft(e,{}),b=Er(p),w=x.path(b,y);g=i.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&g.attr("style",m)}else g=vu(i,l,s,p);return n&&g.attr("style",n),Bt(e,g),e.intersect=function(x){return Mt.polygon(e,p,x)},i}function eK(t,e){let{nodeStyles:r}=Ht(e);e.label="";let n=t.insert("g").attr("class",tr(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=Xe.svg(n),l=Ft(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=Er(s),h=o.path(u,l),f=n.insert(()=>h,":first-child");return i&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",i),r&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(d){return Mt.polygon(e,s,d)},n}async function tK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await er(t,e,tr(e)),o=a.width/2+s,l,{cssStyles:u}=e;if(e.look==="handDrawn"){let h=Xe.svg(i),f=Ft(e,{}),d=h.circle(0,0,o*2,f);l=i.insert(()=>d,":first-child"),l.attr("class","basic label-container").attr("style",ba(u))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",o).attr("cx",0).attr("cy",0);return Bt(e,l),e.intersect=function(h){return re.info("Circle intersect",e,o,h),Mt.circle(e,o,h)},i}function rK(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,i={x:n/2*e,y:n/2*r},a={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},o={x:n/2*e,y:-(n/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}\n M ${i.x},${i.y} L ${s.x},${s.y}`}function nK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",tr(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,o=Xe.svg(i),l=Ft(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=o.circle(0,0,a*2,l),h=rK(a),f=o.path(h,l),d=i.insert(()=>u,":first-child");return d.insert(()=>f),s&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Bt(e,d),e.intersect=function(p){return re.info("crossedCircle intersect",e,{radius:a,point:p}),Mt.circle(e,a,p)},i}function pu(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;f<n;f++){let d=o+f*h,p=t+r*Math.cos(d),g=e+r*Math.sin(d);s.push({x:-p,y:-g})}return s}async function iK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),u=Math.max(5,l*.1),{cssStyles:h}=e,f=[...pu(o/2,-l/2,u,30,-90,0),{x:-o/2-u,y:u},...pu(o/2+u*2,-u,u,20,-180,-270),...pu(o/2+u*2,u,u,20,-90,-180),{x:-o/2-u,y:-l/2},...pu(o/2,l/2,u,20,0,90)],d=[{x:o/2,y:-l/2-u},{x:-o/2,y:-l/2-u},...pu(o/2,-l/2,u,20,-90,0),{x:-o/2-u,y:-u},...pu(o/2+o*.1,-u,u,20,-180,-270),...pu(o/2+o*.1,u,u,20,-90,-180),{x:-o/2-u,y:l/2},...pu(o/2,l/2,u,20,0,90),{x:-o/2,y:l/2+u},{x:o/2,y:l/2+u}],p=Xe.svg(i),g=Ft(e,{fill:"none"});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=Er(f).replace("Z",""),y=p.path(x,g),b=Er(d),w=p.path(b,{...g}),_=i.insert("g",":first-child");return _.insert(()=>w,":first-child").attr("stroke-opacity",0),_.insert(()=>y,":first-child"),_.attr("class","text"),h&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${u}, 0)`),s.attr("transform",`translate(${-o/2+u-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Bt(e,_),e.intersect=function(k){return Mt.polygon(e,d,k)},i}function gu(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;f<n;f++){let d=o+f*h,p=t+r*Math.cos(d),g=e+r*Math.sin(d);s.push({x:p,y:g})}return s}async function aK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),u=Math.max(5,l*.1),{cssStyles:h}=e,f=[...gu(o/2,-l/2,u,20,-90,0),{x:o/2+u,y:-u},...gu(o/2+u*2,-u,u,20,-180,-270),...gu(o/2+u*2,u,u,20,-90,-180),{x:o/2+u,y:l/2},...gu(o/2,l/2,u,20,0,90)],d=[{x:-o/2,y:-l/2-u},{x:o/2,y:-l/2-u},...gu(o/2,-l/2,u,20,-90,0),{x:o/2+u,y:-u},...gu(o/2+u*2,-u,u,20,-180,-270),...gu(o/2+u*2,u,u,20,-90,-180),{x:o/2+u,y:l/2},...gu(o/2,l/2,u,20,0,90),{x:o/2,y:l/2+u},{x:-o/2,y:l/2+u}],p=Xe.svg(i),g=Ft(e,{fill:"none"});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=Er(f).replace("Z",""),y=p.path(x,g),b=Er(d),w=p.path(b,{...g}),_=i.insert("g",":first-child");return _.insert(()=>w,":first-child").attr("stroke-opacity",0),_.insert(()=>y,":first-child"),_.attr("class","text"),h&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${-u}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Bt(e,_),e.intersect=function(k){return Mt.polygon(e,d,k)},i}function ta(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;f<n;f++){let d=o+f*h,p=t+r*Math.cos(d),g=e+r*Math.sin(d);s.push({x:-p,y:-g})}return s}async function sK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),u=Math.max(5,l*.1),{cssStyles:h}=e,f=[...ta(o/2,-l/2,u,30,-90,0),{x:-o/2-u,y:u},...ta(o/2+u*2,-u,u,20,-180,-270),...ta(o/2+u*2,u,u,20,-90,-180),{x:-o/2-u,y:-l/2},...ta(o/2,l/2,u,20,0,90)],d=[...ta(-o/2+u+u/2,-l/2,u,20,-90,-180),{x:o/2-u/2,y:u},...ta(-o/2-u/2,-u,u,20,0,90),...ta(-o/2-u/2,u,u,20,-90,0),{x:o/2-u/2,y:-u},...ta(-o/2+u+u/2,l/2,u,30,-180,-270)],p=[{x:o/2,y:-l/2-u},{x:-o/2,y:-l/2-u},...ta(o/2,-l/2,u,20,-90,0),{x:-o/2-u,y:-u},...ta(o/2+u*2,-u,u,20,-180,-270),...ta(o/2+u*2,u,u,20,-90,-180),{x:-o/2-u,y:l/2},...ta(o/2,l/2,u,20,0,90),{x:-o/2,y:l/2+u},{x:o/2-u-u/2,y:l/2+u},...ta(-o/2+u+u/2,-l/2,u,20,-90,-180),{x:o/2-u/2,y:u},...ta(-o/2-u/2,-u,u,20,0,90),...ta(-o/2-u/2,u,u,20,-90,0),{x:o/2-u/2,y:-u},...ta(-o/2+u+u/2,l/2,u,30,-180,-270)],g=Xe.svg(i),m=Ft(e,{fill:"none"});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=Er(f).replace("Z",""),b=g.path(y,m),_=Er(d).replace("Z",""),k=g.path(_,m),E=Er(p),L=g.path(E,{...m}),S=i.insert("g",":first-child");return S.insert(()=>L,":first-child").attr("stroke-opacity",0),S.insert(()=>b,":first-child"),S.insert(()=>k,":first-child"),S.attr("class","text"),h&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${u-u/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Bt(e,S),e.intersect=function(C){return Mt.polygon(e,p,C)},i}async function oK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=80,o=20,l=Math.max(s,(a.width+(e.padding??0)*2)*1.25,e?.width??0),u=Math.max(o,a.height+(e.padding??0)*2,e?.height??0),h=u/2,{cssStyles:f}=e,d=Xe.svg(i),p=Ft(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=l,m=u,x=g-h,y=m/4,b=[{x,y:0},{x:y,y:0},{x:0,y:m/2},{x:y,y:m},{x,y:m},...$A(-x,-m/2,h,50,270,90)],w=Er(b),_=d.path(w,p),k=i.insert(()=>_,":first-child");return k.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",n),k.attr("transform",`translate(${-l/2}, ${-u/2})`),Bt(e,k),e.intersect=function(E){return Mt.polygon(e,b,E)},i}async function lK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Math.max(a.width+e.padding,e.width??0),l=o/2,u=l/(2.5+o/50),h=Math.max(a.height+u+e.padding,e.height??0),f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Xe.svg(i),g=cEe(0,0,o,h,l,u),m=uEe(0,u,o,h,l,u),x=p.path(g,Ft(e,{})),y=p.path(m,Ft(e,{fill:"none"}));f=i.insert(()=>y,":first-child"),f=i.insert(()=>x,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{let p=lEe(0,0,o,h,l,u);f=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",ba(d)).attr("style",n)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),Bt(e,f),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(p){let g=Mt.rect(e,p),m=g.x-(e.x??0);if(l!=0&&(Math.abs(m)<(e.width??0)/2||Math.abs(m)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-u)){let x=u*u*(1-m*m/(l*l));x>0&&(x=Math.sqrt(x)),x=u-x,p.y-(e.y??0)>0&&(x=-x),g.y+=x}return g},i}async function cK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=a.width+e.padding,l=a.height+e.padding,u=l*.2,h=-o/2,f=-l/2-u/2,{cssStyles:d}=e,p=Xe.svg(i),g=Ft(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=[{x:h,y:f+u},{x:-h,y:f+u},{x:-h,y:-f},{x:h,y:-f},{x:h,y:f},{x:-h,y:f},{x:-h,y:f+u}],x=p.polygon(m.map(b=>[b.x,b.y]),g),y=i.insert(()=>x,":first-child");return y.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${h+(e.padding??0)/2-(a.x-(a.left??0))}, ${f+u+(e.padding??0)/2-(a.y-(a.top??0))})`),Bt(e,y),e.intersect=function(b){return Mt.rect(e,b)},i}async function uK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await er(t,e,tr(e)),l=a.width/2+s+5,u=a.width/2+s,h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Xe.svg(i),p=Ft(e,{roughness:.2,strokeWidth:2.5}),g=Ft(e,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,p),x=d.circle(0,0,u*2,g);h=i.insert("g",":first-child"),h.attr("class",ba(e.cssClasses)).attr("style",ba(f)),h.node()?.appendChild(m),h.node()?.appendChild(x)}else{h=i.insert("g",":first-child");let d=h.insert("circle",":first-child"),p=h.insert("circle");h.attr("class","basic label-container").attr("style",n),d.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0)}return Bt(e,h),e.intersect=function(d){return re.info("DoubleCircle intersect",e,l,d),Mt.circle(e,l,d)},i}function hK(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Ht(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",tr(e)).attr("id",e.domId??e.id),s=7,{cssStyles:o}=e,l=Xe.svg(a),{nodeBorder:u}=r,h=Ft(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);let f=l.circle(0,0,s*2,h),d=a.insert(()=>f,":first-child");return d.selectAll("path").attr("style",`fill: ${u} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Bt(e,d),e.intersect=function(p){return re.info("filledCircle intersect",e,{radius:s,point:p}),Mt.circle(e,s,p)},a}async function fK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=a.width+(e.padding??0),l=o+a.height,u=o+a.height,h=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:f}=e,d=Xe.svg(i),p=Ft(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=Er(h),m=d.path(g,p),x=i.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),e.width=o,e.height=l,Bt(e,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(y){return re.info("Triangle intersect",e,h,y),Mt.polygon(e,h,y)},i}function dK(t,e,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:a}=Ht(e);e.label="";let s=t.insert("g").attr("class",tr(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,l=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);r==="LR"&&(l=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));let h=-1*l/2,f=-1*u/2,d=Xe.svg(s),p=Ft(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=d.rectangle(h,f,l,u,p),m=s.insert(()=>g,":first-child");o&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Bt(e,m);let x=n?.padding??0;return e.width&&e.height&&(e.width+=x/2||0,e.height+=x/2||0),e.intersect=function(y){return Mt.rect(e,y)},s}async function pK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let i=80,a=50,{shapeSvg:s,bbox:o}=await er(t,e,tr(e)),l=Math.max(i,o.width+(e.padding??0)*2,e?.width??0),u=Math.max(a,o.height+(e.padding??0)*2,e?.height??0),h=u/2,{cssStyles:f}=e,d=Xe.svg(s),p=Ft(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-l/2,y:-u/2},{x:l/2-h,y:-u/2},...$A(-l/2+h,0,h,50,90,270),{x:l/2-h,y:u/2},{x:-l/2,y:u/2}],m=Er(g),x=d.path(m,p),y=s.insert(()=>x,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),Bt(e,y),e.intersect=function(b){return re.info("Pill intersect",e,{radius:h,point:b}),Mt.polygon(e,g,b)},s}async function gK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=4,o=a.height+e.padding,l=o/s,u=a.width+2*l+e.padding,h=[{x:l,y:0},{x:u-l,y:0},{x:u,y:-o/2},{x:u-l,y:-o},{x:l,y:-o},{x:0,y:-o/2}],f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Xe.svg(i),g=Ft(e,{}),m=hEe(0,0,u,o,l),x=p.path(m,g);f=i.insert(()=>x,":first-child").attr("transform",`translate(${-u/2}, ${o/2})`),d&&f.attr("style",d)}else f=vu(i,u,o,h);return n&&f.attr("style",n),e.width=u,e.height=o,Bt(e,f),e.intersect=function(p){return Mt.polygon(e,h,p)},i}async function mK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.label="",e.labelStyle=r;let{shapeSvg:i}=await er(t,e,tr(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,l=Xe.svg(i),u=Ft(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],f=Er(h),d=l.path(f,u),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container"),o&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",o),n&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),p.attr("transform",`translate(${-a/2}, ${-s/2})`),Bt(e,p),e.intersect=function(g){return re.info("Pill intersect",e,{points:h}),Mt.polygon(e,h,g)},i}async function vK(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Ht(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await er(t,e,"icon-shape default"),d=e.pos==="t",p=o,g=o,{nodeBorder:m}=r,{stylesMap:x}=Gp(e),y=-g/2,b=-p/2,w=e.label?8:0,_=Xe.svg(u),k=Ft(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let E=_.rectangle(y,b,g,p,k),L=Math.max(g,h.width),S=p+h.height+w,C=_.rectangle(-L/2,-S/2,L,S,{...k,fill:"transparent",stroke:"none"}),M=u.insert(()=>E,":first-child"),R=u.insert(()=>C);if(e.icon){let T=u.append("g");T.html(`<g>${await Kc(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);let I=T.node().getBBox(),A=I.width,D=I.height,N=I.x,O=I.y;T.attr("transform",`translate(${-A/2-N},${d?h.height/2+w/2-D/2-O:-h.height/2-w/2-D/2-O})`),T.attr("style",`color: ${x.get("stroke")??m};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-S/2:S/2-h.height})`),M.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Bt(e,R),e.intersect=function(T){if(re.info("iconSquare intersect",e,T),!e.label)return Mt.rect(e,T);let I=e.x??0,A=e.y??0,D=e.height??0,N=[];return d?N=[{x:I-h.width/2,y:A-D/2},{x:I+h.width/2,y:A-D/2},{x:I+h.width/2,y:A-D/2+h.height+w},{x:I+g/2,y:A-D/2+h.height+w},{x:I+g/2,y:A+D/2},{x:I-g/2,y:A+D/2},{x:I-g/2,y:A-D/2+h.height+w},{x:I-h.width/2,y:A-D/2+h.height+w}]:N=[{x:I-g/2,y:A-D/2},{x:I+g/2,y:A-D/2},{x:I+g/2,y:A-D/2+p},{x:I+h.width/2,y:A-D/2+p},{x:I+h.width/2/2,y:A+D/2},{x:I-h.width/2,y:A+D/2},{x:I-h.width/2,y:A-D/2+p},{x:I-g/2,y:A-D/2+p}],Mt.polygon(e,N,T)},u}async function yK(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Ht(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await er(t,e,"icon-shape default"),d=20,p=e.label?8:0,g=e.pos==="t",{nodeBorder:m,mainBkg:x}=r,{stylesMap:y}=Gp(e),b=Xe.svg(u),w=Ft(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let _=y.get("fill");w.stroke=_??x;let k=u.append("g");e.icon&&k.html(`<g>${await Kc(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);let E=k.node().getBBox(),L=E.width,S=E.height,C=E.x,M=E.y,R=Math.max(L,S)*Math.SQRT2+d*2,T=b.circle(0,0,R,w),I=Math.max(R,h.width),A=R+h.height+p,D=b.rectangle(-I/2,-A/2,I,A,{...w,fill:"transparent",stroke:"none"}),N=u.insert(()=>T,":first-child"),O=u.insert(()=>D);return k.attr("transform",`translate(${-L/2-C},${g?h.height/2+p/2-S/2-M:-h.height/2-p/2-S/2-M})`),k.attr("style",`color: ${y.get("stroke")??m};`),f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-A/2:A/2-h.height})`),N.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),Bt(e,O),e.intersect=function(B){return re.info("iconSquare intersect",e,B),Mt.rect(e,B)},u}async function xK(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Ht(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await er(t,e,"icon-shape default"),p=e.pos==="t",g=o+f*2,m=o+f*2,{nodeBorder:x,mainBkg:y}=r,{stylesMap:b}=Gp(e),w=-m/2,_=-g/2,k=e.label?8:0,E=Xe.svg(u),L=Ft(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");let S=b.get("fill");L.stroke=S??y;let C=E.path(mu(w,_,m,g,5),L),M=Math.max(m,h.width),R=g+h.height+k,T=E.rectangle(-M/2,-R/2,M,R,{...L,fill:"transparent",stroke:"none"}),I=u.insert(()=>C,":first-child").attr("class","icon-shape2"),A=u.insert(()=>T);if(e.icon){let D=u.append("g");D.html(`<g>${await Kc(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);let N=D.node().getBBox(),O=N.width,B=N.height,P=N.x,$=N.y;D.attr("transform",`translate(${-O/2-P},${p?h.height/2+k/2-B/2-$:-h.height/2-k/2-B/2-$})`),D.attr("style",`color: ${b.get("stroke")??x};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-R/2:R/2-h.height})`),I.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),Bt(e,A),e.intersect=function(D){if(re.info("iconSquare intersect",e,D),!e.label)return Mt.rect(e,D);let N=e.x??0,O=e.y??0,B=e.height??0,P=[];return p?P=[{x:N-h.width/2,y:O-B/2},{x:N+h.width/2,y:O-B/2},{x:N+h.width/2,y:O-B/2+h.height+k},{x:N+m/2,y:O-B/2+h.height+k},{x:N+m/2,y:O+B/2},{x:N-m/2,y:O+B/2},{x:N-m/2,y:O-B/2+h.height+k},{x:N-h.width/2,y:O-B/2+h.height+k}]:P=[{x:N-m/2,y:O-B/2},{x:N+m/2,y:O-B/2},{x:N+m/2,y:O-B/2+g},{x:N+h.width/2,y:O-B/2+g},{x:N+h.width/2/2,y:O+B/2},{x:N-h.width/2,y:O+B/2},{x:N-h.width/2,y:O-B/2+g},{x:N-m/2,y:O-B/2+g}],Mt.polygon(e,P,D)},u}async function bK(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Ht(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await er(t,e,"icon-shape default"),p=e.pos==="t",g=o+f*2,m=o+f*2,{nodeBorder:x,mainBkg:y}=r,{stylesMap:b}=Gp(e),w=-m/2,_=-g/2,k=e.label?8:0,E=Xe.svg(u),L=Ft(e,{});e.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");let S=b.get("fill");L.stroke=S??y;let C=E.path(mu(w,_,m,g,.1),L),M=Math.max(m,h.width),R=g+h.height+k,T=E.rectangle(-M/2,-R/2,M,R,{...L,fill:"transparent",stroke:"none"}),I=u.insert(()=>C,":first-child"),A=u.insert(()=>T);if(e.icon){let D=u.append("g");D.html(`<g>${await Kc(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);let N=D.node().getBBox(),O=N.width,B=N.height,P=N.x,$=N.y;D.attr("transform",`translate(${-O/2-P},${p?h.height/2+k/2-B/2-$:-h.height/2-k/2-B/2-$})`),D.attr("style",`color: ${b.get("stroke")??x};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-R/2:R/2-h.height})`),I.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),Bt(e,A),e.intersect=function(D){if(re.info("iconSquare intersect",e,D),!e.label)return Mt.rect(e,D);let N=e.x??0,O=e.y??0,B=e.height??0,P=[];return p?P=[{x:N-h.width/2,y:O-B/2},{x:N+h.width/2,y:O-B/2},{x:N+h.width/2,y:O-B/2+h.height+k},{x:N+m/2,y:O-B/2+h.height+k},{x:N+m/2,y:O+B/2},{x:N-m/2,y:O+B/2},{x:N-m/2,y:O-B/2+h.height+k},{x:N-h.width/2,y:O-B/2+h.height+k}]:P=[{x:N-m/2,y:O-B/2},{x:N+m/2,y:O-B/2},{x:N+m/2,y:O-B/2+g},{x:N+h.width/2,y:O-B/2+g},{x:N+h.width/2/2,y:O+B/2},{x:N-h.width/2,y:O+B/2},{x:N-h.width/2,y:O-B/2+g},{x:N-m/2,y:O-B/2+g}],Mt.polygon(e,P,D)},u}async function wK(t,e,{config:{flowchart:r}}){let n=new Image;n.src=e?.img??"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;let{labelStyles:s}=Ht(e);e.labelStyle=s;let o=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let l=Math.max(e.label?o??0:0,e?.assetWidth??i),u=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,h=e.constraint==="on"?u/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(u,o??0);let{shapeSvg:f,bbox:d,label:p}=await er(t,e,"image-shape default"),g=e.pos==="t",m=-u/2,x=-h/2,y=e.label?8:0,b=Xe.svg(f),w=Ft(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let _=b.rectangle(m,x,u,h,w),k=Math.max(u,d.width),E=h+d.height+y,L=b.rectangle(-k/2,-E/2,k,E,{...w,fill:"none",stroke:"none"}),S=f.insert(()=>_,":first-child"),C=f.insert(()=>L);if(e.img){let M=f.append("image");M.attr("href",e.img),M.attr("width",u),M.attr("height",h),M.attr("preserveAspectRatio","none"),M.attr("transform",`translate(${-u/2},${g?E/2-h:-E/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-y/2:h/2-d.height/2+y/2})`),S.attr("transform",`translate(0,${g?d.height/2+y/2:-d.height/2-y/2})`),Bt(e,C),e.intersect=function(M){if(re.info("iconSquare intersect",e,M),!e.label)return Mt.rect(e,M);let R=e.x??0,T=e.y??0,I=e.height??0,A=[];return g?A=[{x:R-d.width/2,y:T-I/2},{x:R+d.width/2,y:T-I/2},{x:R+d.width/2,y:T-I/2+d.height+y},{x:R+u/2,y:T-I/2+d.height+y},{x:R+u/2,y:T+I/2},{x:R-u/2,y:T+I/2},{x:R-u/2,y:T-I/2+d.height+y},{x:R-d.width/2,y:T-I/2+d.height+y}]:A=[{x:R-u/2,y:T-I/2},{x:R+u/2,y:T-I/2},{x:R+u/2,y:T-I/2+h},{x:R+d.width/2,y:T-I/2+h},{x:R+d.width/2/2,y:T+I/2},{x:R-d.width/2,y:T+I/2},{x:R-d.width/2,y:T-I/2+h},{x:R-u/2,y:T-I/2+h}],Mt.polygon(e,A,M)},f}async function kK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),o=Math.max(a.height+(e.padding??0)*2,e?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Xe.svg(i),d=Ft(e,{}),p=Er(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=vu(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Bt(e,u),e.intersect=function(f){return Mt.polygon(e,l,f)},i}async function j3(t,e,r){let{labelStyles:n,nodeStyles:i}=Ht(e);e.labelStyle=n;let{shapeSvg:a,bbox:s}=await er(t,e,tr(e)),o=Math.max(s.width+r.labelPaddingX*2,e?.width||0),l=Math.max(s.height+r.labelPaddingY*2,e?.height||0),u=-o/2,h=-l/2,f,{rx:d,ry:p}=e,{cssStyles:g}=e;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),e.look==="handDrawn"){let m=Xe.svg(a),x=Ft(e,{}),y=d||p?m.path(mu(u,h,o,l,d||0),x):m.rectangle(u,h,o,l,x);f=a.insert(()=>y,":first-child"),f.attr("class","basic label-container").attr("style",ba(g))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",i).attr("rx",ba(d)).attr("ry",ba(p)).attr("x",u).attr("y",h).attr("width",o).attr("height",l);return Bt(e,f),e.intersect=function(m){return Mt.rect(e,m)},a}async function TK(t,e){let{shapeSvg:r,bbox:n,label:i}=await er(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Bt(e,a),e.intersect=function(l){return Mt.rect(e,l)},r}async function EK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Xe.svg(i),d=Ft(e,{}),p=Er(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=vu(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Bt(e,u),e.intersect=function(f){return Mt.polygon(e,l,f)},i}async function SK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Xe.svg(i),d=Ft(e,{}),p=Er(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=vu(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Bt(e,u),e.intersect=function(f){return Mt.polygon(e,l,f)},i}function CK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",tr(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),l=7,u=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=Xe.svg(i),f=Ft(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=Er(u),p=h.path(d,f),g=i.insert(()=>p,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${s/2},${-o})`),Bt(e,g),e.intersect=function(m){return re.info("lightningBolt intersect",e,m),Mt.polygon(e,u,m)},i}async function AK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Math.max(a.width+(e.padding??0),e.width??0),l=o/2,u=l/(2.5+o/50),h=Math.max(a.height+u+(e.padding??0),e.height??0),f=h*.1,d,{cssStyles:p}=e;if(e.look==="handDrawn"){let g=Xe.svg(i),m=dEe(0,0,o,h,l,u,f),x=pEe(0,u,o,h,l,u),y=Ft(e,{}),b=g.path(m,y),w=g.path(x,y);i.insert(()=>w,":first-child").attr("class","line"),d=i.insert(()=>b,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let g=fEe(0,0,o,h,l,u,f);d=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",ba(p)).attr("style",n)}return d.attr("label-offset-y",u),d.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),Bt(e,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+u-(a.y-(a.top??0))})`),e.intersect=function(g){let m=Mt.rect(e,g),x=m.x-(e.x??0);if(l!=0&&(Math.abs(x)<(e.width??0)/2||Math.abs(x)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-u)){let y=u*u*(1-x*x/(l*l));y>0&&(y=Math.sqrt(y)),y=u-y,g.y-(e.y??0)>0&&(y=-y),m.y+=y}return m},i}async function _K(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=l+u,{cssStyles:f}=e,d=Xe.svg(i),p=Ft(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Sh(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,u,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=d.polygon(g.map(y=>[y.x,y.y]),p),x=i.insert(()=>m,":first-child");return x.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),Bt(e,x),e.intersect=function(y){return Mt.polygon(e,g,y)},i}async function LK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=5,h=-o/2,f=-l/2,{cssStyles:d}=e,p=Xe.svg(i),g=Ft(e,{}),m=[{x:h-u,y:f+u},{x:h-u,y:f+l+u},{x:h+o-u,y:f+l+u},{x:h+o-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f+l-u},{x:h+o+u,y:f+l-u},{x:h+o+u,y:f-u},{x:h+u,y:f-u},{x:h+u,y:f},{x:h,y:f},{x:h,y:f+u}],x=[{x:h,y:f+u},{x:h+o-u,y:f+u},{x:h+o-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f},{x:h,y:f}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=Er(m),b=p.path(y,g),w=Er(x),_=p.path(w,{...g,fill:"none"}),k=i.insert(()=>_,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)+u-(a.y-(a.top??0))})`),Bt(e,k),e.intersect=function(E){return Mt.polygon(e,m,E)},i}async function RK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=l+u,f=-o/2,d=-h/2,p=5,{cssStyles:g}=e,m=Sh(f-p,d+h+p,f+o-p,d+h+p,u,.8),x=m?.[m.length-1],y=[{x:f-p,y:d+p},{x:f-p,y:d+h+p},...m,{x:f+o-p,y:x.y-p},{x:f+o,y:x.y-p},{x:f+o,y:x.y-2*p},{x:f+o+p,y:x.y-2*p},{x:f+o+p,y:d-p},{x:f+p,y:d-p},{x:f+p,y:d},{x:f,y:d},{x:f,y:d+p}],b=[{x:f,y:d+p},{x:f+o-p,y:d+p},{x:f+o-p,y:x.y-p},{x:f+o,y:x.y-p},{x:f+o,y:d},{x:f,y:d}],w=Xe.svg(i),_=Ft(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let k=Er(y),E=w.path(k,_),L=Er(b),S=w.path(L,_),C=i.insert(()=>E,":first-child");return C.insert(()=>S),C.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-(a.width/2)-p-(a.x-(a.left??0))}, ${-(a.height/2)+p-u/2-(a.y-(a.top??0))})`),Bt(e,C),e.intersect=function(M){return Mt.polygon(e,y,M)},i}async function NK(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Ht(e);e.labelStyle=n,e.useHtmlLabels||Or().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:o}=await er(t,e,tr(e)),l=Math.max(o.width+(e.padding??0)*2,e?.width??0),u=Math.max(o.height+(e.padding??0)*2,e?.height??0),h=-l/2,f=-u/2,{cssStyles:d}=e,p=Xe.svg(s),g=Ft(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=p.rectangle(h,f,l,u,g),x=s.insert(()=>m,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),Bt(e,x),e.intersect=function(y){return Mt.rect(e,y)},s}async function IK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=a.width+e.padding,o=a.height+e.padding,l=s+o,u=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Xe.svg(i),p=Ft(e,{}),g=gEe(0,0,l),m=d.path(g,p);h=i.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),f&&h.attr("style",f)}else h=vu(i,l,l,u);return n&&h.attr("style",n),Bt(e,h),e.intersect=function(d){return re.debug(`APA12 Intersect called SPLIT\npoint:`,d,`\nnode:\n`,e,`\nres:`,Mt.polygon(e,u,d)),Mt.polygon(e,u,d)},i}async function MK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),u=-o/2,h=-l/2,f=h/2,d=[{x:u+f,y:h},{x:u,y:0},{x:u+f,y:-h},{x:-u,y:-h},{x:-u,y:h}],{cssStyles:p}=e,g=Xe.svg(i),m=Ft(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let x=Er(d),y=g.path(x,m),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-f/2},0)`),s.attr("transform",`translate(${-f/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Bt(e,b),e.intersect=function(w){return Mt.polygon(e,d,w)},i}async function DK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",n),l=e.description,u=e.label,h=o.node().appendChild(await Ch(u,e.labelStyle,!0,!0)),f={width:0,height:0};if(Vr(pe()?.flowchart?.htmlLabels)){let S=h.children[0],C=Ge(h);f=S.getBoundingClientRect(),C.attr("width",f.width),C.attr("height",f.height)}re.info("Text 2",l);let d=l||[],p=h.getBBox(),g=o.node().appendChild(await Ch(d.join?d.join("<br/>"):d,e.labelStyle,!0,!0)),m=g.children[0],x=Ge(g);f=m.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height);let y=(e.padding||0)/2;Ge(g).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+y+5)+")"),Ge(h).attr("transform","translate( "+(f.width<p.width?0:-(p.width-f.width)/2)+", 0)"),f=o.node().getBBox(),o.attr("transform","translate("+-f.width/2+", "+(-f.height/2-y+3)+")");let b=f.width+(e.padding||0),w=f.height+(e.padding||0),_=-f.width/2-y,k=-f.height/2-y,E,L;if(e.look==="handDrawn"){let S=Xe.svg(a),C=Ft(e,{}),M=S.path(mu(_,k,b,w,e.rx||0),C),R=S.line(-f.width/2-y,-f.height/2-y+p.height+y,f.width/2+y,-f.height/2-y+p.height+y,C);L=a.insert(()=>(re.debug("Rough node insert CXC",M),R),":first-child"),E=a.insert(()=>(re.debug("Rough node insert CXC",M),M),":first-child")}else E=s.insert("rect",":first-child"),L=s.insert("line"),E.attr("class","outer title-state").attr("style",n).attr("x",-f.width/2-y).attr("y",-f.height/2-y).attr("width",f.width+(e.padding||0)).attr("height",f.height+(e.padding||0)),L.attr("class","divider").attr("x1",-f.width/2-y).attr("x2",f.width/2+y).attr("y1",-f.height/2-y+p.height+y).attr("y2",-f.height/2-y+p.height+y);return Bt(e,E),e.intersect=function(S){return Mt.rect(e,S)},a}async function OK(t,e){let r={rx:5,ry:5,classes:"",labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return j3(t,e,r)}async function PK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=e?.padding??0,l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=-a.width/2-o,f=-a.height/2-o,{cssStyles:d}=e,p=Xe.svg(i),g=Ft(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=[{x:h,y:f},{x:h+l+8,y:f},{x:h+l+8,y:f+u},{x:h-8,y:f+u},{x:h-8,y:f},{x:h,y:f},{x:h,y:f+u}],x=p.polygon(m.map(b=>[b.x,b.y]),g),y=i.insert(()=>x,":first-child");return y.attr("class","basic label-container").attr("style",ba(d)),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),d&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-l/2+4+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-(a.y-(a.top??0))})`),Bt(e,y),e.intersect=function(b){return Mt.rect(e,b)},i}async function BK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=-o/2,h=-l/2,{cssStyles:f}=e,d=Xe.svg(i),p=Ft(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let g=[{x:u,y:h},{x:u,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h-l/2}],m=Er(g),x=d.path(m,p),y=i.insert(()=>x,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),Bt(e,y),e.intersect=function(b){return Mt.polygon(e,g,b)},i}async function FK(t,e){let r={rx:0,ry:0,classes:"",labelPaddingX:(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return j3(t,e,r)}async function zK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=a.height+e.padding,o=a.width+s/4+e.padding,l,{cssStyles:u}=e;if(e.look==="handDrawn"){let h=Xe.svg(i),f=Ft(e,{}),d=mu(-o/2,-s/2,o,s,s/2),p=h.path(d,f);l=i.insert(()=>p,":first-child"),l.attr("class","basic label-container").attr("style",ba(u))}else l=i.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return Bt(e,l),e.intersect=function(h){return Mt.rect(e,h)},i}async function $K(t,e){return j3(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function GK(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Ht(e);e.labelStyle=n;let{cssStyles:a}=e,{lineColor:s,stateBorder:o,nodeBorder:l}=r,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=Xe.svg(u),f=Ft(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=h.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),p=o??l,g=h.circle(0,0,5,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=u.insert(()=>d,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),i&&m.selectAll("path").attr("style",i),Bt(e,m),e.intersect=function(x){return Mt.circle(e,7,x)},u}function UK(t,e,{config:{themeVariables:r}}){let{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if(e.look==="handDrawn"){let o=Xe.svg(i).circle(0,0,14,K6e(n));a=i.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Bt(e,a),e.intersect=function(s){return Mt.circle(e,7,s)},i}async function VK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=(e?.padding||0)/2,o=a.width+e.padding,l=a.height+e.padding,u=-a.width/2-s,h=-a.height/2-s,f=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(e.look==="handDrawn"){let d=Xe.svg(i),p=Ft(e,{}),g=d.rectangle(u-8,h,o+16,l,p),m=d.line(u,h,u,h+l,p),x=d.line(u+o,h,u+o,h+l,p);i.insert(()=>m,":first-child"),i.insert(()=>x,":first-child");let y=i.insert(()=>g,":first-child"),{cssStyles:b}=e;y.attr("class","basic label-container").attr("style",ba(b)),Bt(e,y)}else{let d=vu(i,o,l,f);n&&d.attr("style",n),Bt(e,d)}return e.intersect=function(d){return Mt.polygon(e,f,d)},i}async function WK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),o=Math.max(a.height+(e.padding??0)*2,e?.height??0),l=-s/2,u=-o/2,h=.2*o,f=.2*o,{cssStyles:d}=e,p=Xe.svg(i),g=Ft(e,{}),m=[{x:l-h/2,y:u},{x:l+s+h/2,y:u},{x:l+s+h/2,y:u+o},{x:l-h/2,y:u+o}],x=[{x:l+s-h/2,y:u+o},{x:l+s+h/2,y:u+o},{x:l+s+h/2,y:u+o-f}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=Er(m),b=p.path(y,g),w=Er(x),_=p.path(w,{...g,fillStyle:"solid"}),k=i.insert(()=>_,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),Bt(e,k),e.intersect=function(E){return Mt.polygon(e,m,E)},i}async function HK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=.2*o,f=.2*l,d=l+u,{cssStyles:p}=e,g=Xe.svg(i),m=Ft(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let x=[{x:-o/2-o/2*.1,y:d/2},...Sh(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,u,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],y=-o/2+o/2*.1,b=-d/2-f*.4,w=[{x:y+o-h,y:(b+l)*1.4},{x:y+o,y:b+l-f},{x:y+o,y:(b+l)*.9},...Sh(y+o,(b+l)*1.3,y+o-h,(b+l)*1.5,-l*.03,.5)],_=Er(x),k=g.path(_,m),E=Er(w),L=g.path(E,{...m,fillStyle:"solid"}),S=i.insert(()=>L,":first-child");return S.insert(()=>k,":first-child"),S.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),Bt(e,S),e.intersect=function(C){return Mt.polygon(e,x,C)},i}async function qK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=Math.max(a.width+e.padding,e?.width||0),o=Math.max(a.height+e.padding,e?.height||0),l=-s/2,u=-o/2,h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",u).attr("width",s).attr("height",o),Bt(e,h),e.intersect=function(f){return Mt.rect(e,f)},i}async function YK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s,halfPadding:o}=await er(t,e,tr(e)),l=e.look==="neo"?o*2:o,u=a.height+l,h=u/2,f=h/(2.5+u/50),d=a.width+f+l,{cssStyles:p}=e,g;if(e.look==="handDrawn"){let m=Xe.svg(i),x=vEe(0,0,d,u,f,h),y=yEe(0,0,d,u,f,h),b=m.path(x,Ft(e,{})),w=m.path(y,Ft(e,{fill:"none"}));g=i.insert(()=>w,":first-child"),g=i.insert(()=>b,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{let m=mEe(0,0,d,u,f,h);g=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",ba(p)).attr("style",n),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",f),g.attr("transform",`translate(${-d/2}, ${u/2} )`),s.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Bt(e,g),e.intersect=function(m){let x=Mt.rect(e,m),y=x.y-(e.y??0);if(h!=0&&(Math.abs(y)<(e.height??0)/2||Math.abs(y)==(e.height??0)/2&&Math.abs(x.x-(e.x??0))>(e.width??0)/2-f)){let b=f*f*(1-y*y/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=f-b,m.x-(e.x??0)>0&&(b=-b),x.x+=b}return x},i}async function XK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=a.width+e.padding,o=a.height+e.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Xe.svg(i),d=Ft(e,{}),p=Er(l),g=f.path(p,d);u=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=vu(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Bt(e,u),e.intersect=function(f){return Mt.polygon(e,l,f)},i}async function jK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=60,o=20,l=Math.max(s,a.width+(e.padding??0)*2,e?.width??0),u=Math.max(o,a.height+(e.padding??0)*2,e?.height??0),{cssStyles:h}=e,f=Xe.svg(i),d=Ft(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],g=Er(p),m=f.path(g,d),x=i.insert(()=>m,":first-child");return x.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),Bt(e,x),e.intersect=function(y){return Mt.polygon(e,p,y)},i}async function KK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Vr(pe().flowchart?.htmlLabels),l=a.width+(e.padding??0),u=l+a.height,h=l+a.height,f=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-u}],{cssStyles:d}=e,p=Xe.svg(i),g=Ft(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=Er(f),x=p.path(m,g),y=i.insert(()=>x,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),e.width=l,e.height=u,Bt(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${u/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(b){return re.info("Triangle intersect",e,f,b),Mt.polygon(e,f,b)},i}async function ZK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/8,h=l+u,{cssStyles:f}=e,p=70-o,g=p>0?p/2:0,m=Xe.svg(i),x=Ft(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let y=[{x:-o/2-g,y:h/2},...Sh(-o/2-g,h/2,o/2+g,h/2,u,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],b=Er(y),w=m.path(b,x),_=i.insert(()=>w,":first-child");return _.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u-(a.y-(a.top??0))})`),Bt(e,_),e.intersect=function(k){return Mt.polygon(e,y,k)},i}async function QK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await er(t,e,tr(e)),s=100,o=50,l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=l/u,f=l,d=u;f>d*h?d=f/h:f=d*h,f=Math.max(f,s),d=Math.max(d,o);let p=Math.min(d*.2,d/4),g=d+p*2,{cssStyles:m}=e,x=Xe.svg(i),y=Ft(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let b=[{x:-f/2,y:g/2},...Sh(-f/2,g/2,f/2,g/2,p,1),{x:f/2,y:-g/2},...Sh(f/2,-g/2,-f/2,-g/2,p,-1)],w=Er(b),_=x.path(w,y),k=i.insert(()=>_,":first-child");return k.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),Bt(e,k),e.intersect=function(E){return Mt.polygon(e,b,E)},i}async function JK(t,e){let{labelStyles:r,nodeStyles:n}=Ht(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await er(t,e,tr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=5,h=-o/2,f=-l/2,{cssStyles:d}=e,p=Xe.svg(i),g=Ft(e,{}),m=[{x:h-u,y:f-u},{x:h-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f-u}],x=`M${h-u},${f-u} L${h+o},${f-u} L${h+o},${f+l} L${h-u},${f+l} L${h-u},${f-u}\n M${h-u},${f} L${h+o},${f}\n M${h},${f-u} L${h},${f+l}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=p.path(x,g),b=i.insert(()=>y,":first-child");return b.attr("transform",`translate(${u/2}, ${u/2})`),b.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+u/2-(a.x-(a.left??0))}, ${-(a.height/2)+u/2-(a.y-(a.top??0))})`),Bt(e,b),e.intersect=function(w){return Mt.polygon(e,m,w)},i}async function eZ(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",tr(e)).attr("id",e.domId||e.id),o=null,l=null,u=null,h=null,f=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let b=e.annotations[0];await Bv(o,{text:`\\xAB${b}\\xBB`},0),f=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await Bv(l,e,0,["font-weight: bolder"]);let g=l.node().getBBox();d=g.height,u=s.insert("g").attr("class","members-group text");let m=0;for(let b of e.members){let w=await Bv(u,b,m,[b.parseClassifier()]);m+=w+a}p=u.node().getBBox().height,p<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let x=0;for(let b of e.methods){let w=await Bv(h,b,x,[b.parseClassifier()]);x+=w+a}let y=s.node().getBBox();if(o!==null){let b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${f})`),y=s.node().getBBox(),u.attr("transform",`translate(0, ${f+d+i*2})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${f+d+(p?p+i*4:i*2)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function Bv(t,e,r,n=[]){let i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=Or(),s="useHtmlLabels"in e?e.useHtmlLabels:Vr(a.htmlLabels)??!0,o="";"text"in e?o=e.text:o=e.label,!s&&o.startsWith("\\\\")&&(o=o.substring(1)),ki(o)&&(s=!0);let l=await ea(i,GS($s(o)),{width:us(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),u,h=1;if(s){let f=l.children[0],d=Ge(l);h=f.innerHTML.split("<br>").length,f.innerHTML.includes("</math>")&&(h+=f.innerHTML.split("<mrow>").length-1);let p=f.getElementsByTagName("img");if(p){let g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(x=>{function y(){if(m.style.display="flex",m.style.flexDirection="column",g){let b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,_=parseInt(b,10)*5+"px";m.style.minWidth=_,m.style.maxWidth=_}else m.style.width="100%";x(m)}v(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{n.includes("font-weight: bolder")&&Ge(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;let f=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(f.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),u=l.getBBox()}return i.attr("transform","translate(0,"+(-u.height/(2*h)+r)+")"),u.height}async function tZ(t,e){let r=pe(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??Vr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:o,bbox:l}=await eZ(t,e,r,a,i),{labelStyles:u,nodeStyles:h}=Ht(e);e.labelStyle=u,e.cssStyles=s.styles||"";let f=s.styles?.join(";")||h||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let d=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,p=Xe.svg(o),g=Ft(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=l.width,x=l.height;s.members.length===0&&s.methods.length===0?x+=i:s.members.length>0&&s.methods.length===0&&(x+=i*2);let y=-m/2,b=-x/2,w=p.rectangle(y-n,b-n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0),m+2*n,x+2*n+(d?n*2:s.members.length===0&&s.methods.length===0?-n:0),g),_=o.insert(()=>w,":first-child");_.attr("class","basic label-container");let k=_.node().getBBox();o.selectAll(".text").each((C,M,R)=>{let T=Ge(R[M]),I=T.attr("transform"),A=0;if(I){let B=RegExp(/translate\\(([^,]+),([^)]+)\\)/).exec(I);B&&(A=parseFloat(B[2]))}let D=A+b+n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(D-=4);let N=y;(T.attr("class").includes("label-group")||T.attr("class").includes("annotation-group"))&&(N=-T.node()?.getBBox().width/2||0,o.selectAll("text").each(function(O,B,P){window.getComputedStyle(P[B]).textAnchor==="middle"&&(N=0)})),T.attr("transform",`translate(${N}, ${D})`)});let E=o.select(".annotation-group").node().getBBox().height-(d?n/2:0)||0,L=o.select(".label-group").node().getBBox().height-(d?n/2:0)||0,S=o.select(".members-group").node().getBBox().height-(d?n/2:0)||0;if(s.members.length>0||s.methods.length>0||d){let C=p.line(k.x,E+L+b+n,k.x+k.width,E+L+b+n,g);o.insert(()=>C).attr("class","divider").attr("style",f)}if(d||s.members.length>0||s.methods.length>0){let C=p.line(k.x,E+L+S+b+i*2+n,k.x+k.width,E+L+S+b+n+i*2,g);o.insert(()=>C).attr("class","divider").attr("style",f)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",f),_.select(":nth-child(2)").attr("style",f),o.selectAll(".divider").select("path").attr("style",f),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",f),!a){let C=RegExp(/color\\s*:\\s*([^;]*)/),M=C.exec(f);if(M){let R=M[0].replace("color","fill");o.selectAll("tspan").attr("style",R)}else if(u){let R=C.exec(u);if(R){let T=R[0].replace("color","fill");o.selectAll("tspan").attr("style",T)}}}return Bt(e,_),e.intersect=function(C){return Mt.rect(e,C)},o}async function rZ(t,e,{config:r}){let{labelStyles:n,nodeStyles:i}=Ht(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:o,bbox:l,label:u}=await er(t,e,tr(e)),h=e.padding||10,f="",d;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let p={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},g,m;d?{label:g,bbox:m}=await BA(d,"ticket"in e&&e.ticket||"",p):{label:g,bbox:m}=await BA(o,"ticket"in e&&e.ticket||"",p);let{label:x,bbox:y}=await BA(o,"assigned"in e&&e.assigned||"",p);e.width=s;let b=10,w=e?.width||0,_=Math.max(m.height,y.height)/2,k=Math.max(l.height+b*2,e?.height||0)+_,E=-w/2,L=-k/2;u.attr("transform","translate("+(h-w/2)+", "+(-_-l.height/2)+")"),g.attr("transform","translate("+(h-w/2)+", "+(-_+l.height/2)+")"),x.attr("transform","translate("+(h+w/2-y.width-2*a)+", "+(-_+l.height/2)+")");let S,{rx:C,ry:M}=e,{cssStyles:R}=e;if(e.look==="handDrawn"){let T=Xe.svg(o),I=Ft(e,{}),A=C||M?T.path(mu(E,L,w,k,C||0),I):T.rectangle(E,L,w,k,I);S=o.insert(()=>A,":first-child"),S.attr("class","basic label-container").attr("style",R||null)}else{S=o.insert("rect",":first-child"),S.attr("class","basic label-container __APA__").attr("style",i).attr("rx",C??5).attr("ry",M??5).attr("x",E).attr("y",L).attr("width",w).attr("height",k);let T="priority"in e&&e.priority;if(T){let I=o.append("line"),A=E+2,D=L+Math.floor((C??0)/2),N=L+k-Math.floor((C??0)/2);I.attr("x1",A).attr("y1",D).attr("x2",A).attr("y2",N).attr("stroke-width","4").attr("stroke",xEe(T))}}return Bt(e,S),e.height=k,e.intersect=function(T){return Mt.rect(e,T)},o}function GA(t){return t in nZ}async function hd(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?nZ[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),K3.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var er,BA,Bt,tr,X6e,$p,j6e,Ch,mu,K6e,Gp,Z6e,Ht,Ft,Uj,Q6e,J6e,eEe,tEe,rEe,nEe,Vj,Up,Wj,iEe,Yj,aEe,sEe,oEe,Mt,lEe,cEe,uEe,hEe,fEe,dEe,pEe,gEe,mEe,vEe,yEe,xEe,bEe,wEe,nZ,K3,iZ,aZ,Fv,fl=F(()=>{el();fo();za();xn();or();lr();lr();Gt();lr();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();lr();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();lr();Gt();lr();Gt();er=v(async(t,e,r)=>{let n,i=e.useHtmlLabels||Vr(pe()?.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",ba(e.labelStyle)),o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];let l=await ea(s,yr($s(o),pe()),{useHtmlLabels:i,width:e.width||pe().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),u=l.getBBox(),h=(e?.padding??0)/2;if(i){let f=l.children[0],d=Ge(l),p=f.getElementsByTagName("img");if(p){let g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(x=>{function y(){if(m.style.display="flex",m.style.flexDirection="column",g){let b=pe().fontSize?pe().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[_=sr.fontSize]=To(b),k=_*w+"px";m.style.minWidth=k,m.style.maxWidth=k}else m.style.width="100%";x(m)}v(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}return i?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:h,label:s}},"labelHelper"),BA=v(async(t,e,r)=>{let n=r.useHtmlLabels||Vr(pe()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await ea(i,yr($s(e),pe()),{useHtmlLabels:n,width:r.width||pe()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2;if(Vr(pe()?.flowchart?.htmlLabels)){let l=a.children[0],u=Ge(a);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}},"insertLabel"),Bt=v((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),tr=v((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");v(Er,"createPathFromPoints");v(Sh,"generateFullSineWavePoints");v($A,"generateCirclePoints");X6e=v((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),$p=X6e;v($j,"applyStyle");v(Gj,"addHtmlLabel");j6e=v(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),Vr(pe().flowchart.htmlLabels)){i=i.replace(/\\\\n|\\n/g,"<br />"),re.info("vertexText"+i);let a={isNode:n,label:$s(i).replace(/fa[blrs]?:fa-[\\w-]+/g,o=>`<i class=\'${o.replace(":"," ")}\'></i>`),labelStyle:e&&e.replace("fill:","color:")};return await Gj(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\\\n|\\n|<br\\s*\\/?>/gi):Array.isArray(i)?s=i:s=[];for(let o of s){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Ch=j6e,mu=v((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),K6e=v(t=>{let{handDrawnSeed:e}=pe();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),Gp=v(t=>{let e=Z6e([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),Z6e=v(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),Ht=v(t=>{let{stylesArray:e}=Gp(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let o=s[0];o==="color"||o==="font-size"||o==="font-family"||o==="font-weight"||o==="font-style"||o==="text-decoration"||o==="text-align"||o==="text-transform"||o==="line-height"||o==="letter-spacing"||o==="word-spacing"||o==="text-shadow"||o==="text-overflow"||o==="white-space"||o==="word-wrap"||o==="word-break"||o==="overflow-wrap"||o==="hyphens"?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&i.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),Ft=v((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=pe(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=Gp(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides"),Uj=v(async(t,e)=>{re.info("Creating subgraph rect for ",e.id,e);let r=pe(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=Ht(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=Vr(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),g=await ea(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0}),m=g.getBBox();if(Vr(r.flowchart.htmlLabels)){let L=g.children[0],S=Ge(g);m=L.getBoundingClientRect(),S.attr("width",m.width),S.attr("height",m.height)}let x=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let y=e.height,b=e.x-x/2,w=e.y-y/2;re.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let L=Xe.svg(f),S=Ft(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),C=L.path(mu(b,w,x,y,0),S);_=f.insert(()=>(re.debug("Rough node insert CXC",C),C),":first-child"),_.select("path:nth-child(2)").attr("style",u.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=f.insert("rect",":first-child"),_.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",x).attr("height",y);let{subGraphTitleTopMargin:k}=Zc(r);if(p.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+k})`),o){let L=p.select("span");L&&L.attr("style",o)}let E=_.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=m.height-e.padding/2,e.intersect=function(L){return $p(e,L)},{cluster:f,labelBBox:m}},"rect"),Q6e=v((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return $p(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),J6e=v(async(t,e)=>{let r=pe(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=f.node().appendChild(await Ch(e.label,e.labelStyle,void 0,!0)),g=p.getBBox();if(Vr(r.flowchart.htmlLabels)){let C=p.children[0],M=Ge(p);g=C.getBoundingClientRect(),M.attr("width",g.width),M.attr("height",g.height)}let m=0*e.padding,x=m/2,y=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+m;e.width<=g.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+m,w=e.height+m-g.height-6,_=e.x-y/2,k=e.y-b/2;e.width=y;let E=e.y-e.height/2-x+g.height+2,L;if(e.look==="handDrawn"){let C=e.cssClasses.includes("statediagram-cluster-alt"),M=Xe.svg(u),R=e.rx||e.ry?M.path(mu(_,k,y,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):M.rectangle(_,k,y,b,{seed:i});L=u.insert(()=>R,":first-child");let T=M.rectangle(_,E,y,w,{fill:C?a:s,fillStyle:C?"hachure":"solid",stroke:l,seed:i});L=u.insert(()=>R,":first-child"),d=u.insert(()=>T)}else L=h.insert("rect",":first-child"),L.attr("class","outer").attr("x",_).attr("y",k).attr("width",y).attr("height",b).attr("data-look",e.look),d.attr("class","inner").attr("x",_).attr("y",E).attr("width",y).attr("height",w);f.attr("transform",`translate(${e.x-g.width/2}, ${k+1-(Vr(r.flowchart.htmlLabels)?0:3)})`);let S=L.node().getBBox();return e.height=S.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(C){return $p(e,C)},{cluster:u,labelBBox:g}},"roundedWithTitle"),eEe=v(async(t,e)=>{re.info("Creating subgraph rect for ",e.id,e);let r=pe(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=Ht(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=Vr(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),g=await ea(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width}),m=g.getBBox();if(Vr(r.flowchart.htmlLabels)){let L=g.children[0],S=Ge(g);m=L.getBoundingClientRect(),S.attr("width",m.width),S.attr("height",m.height)}let x=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let y=e.height,b=e.x-x/2,w=e.y-y/2;re.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let L=Xe.svg(f),S=Ft(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),C=L.path(mu(b,w,x,y,e.rx),S);_=f.insert(()=>(re.debug("Rough node insert CXC",C),C),":first-child"),_.select("path:nth-child(2)").attr("style",u.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=f.insert("rect",":first-child"),_.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",x).attr("height",y);let{subGraphTitleTopMargin:k}=Zc(r);if(p.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+k})`),o){let L=p.select("span");L&&L.attr("style",o)}let E=_.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=m.height-e.padding/2,e.intersect=function(L){return $p(e,L)},{cluster:f,labelBBox:m}},"kanbanSection"),tEe=v((t,e)=>{let r=pe(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),l=0*e.padding,u=e.width+l;e.diff=-e.padding;let h=e.height+l,f=e.x-u/2,d=e.y-h/2;e.width=u;let p;if(e.look==="handDrawn"){let x=Xe.svg(s).rectangle(f,d,u,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});p=s.insert(()=>x,":first-child")}else p=o.insert("rect",":first-child"),p.attr("class","divider").attr("x",f).attr("y",d).attr("width",u).attr("height",h).attr("data-look",e.look);let g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(m){return $p(e,m)},{cluster:s,labelBBox:{}}},"divider"),rEe=Uj,nEe={rect:Uj,squareRect:rEe,roundedWithTitle:J6e,noteGroup:Q6e,divider:tEe,kanbanSection:eEe},Vj=new Map,Up=v(async(t,e)=>{let r=e.shape||"rect",n=await nEe[r](t,e);return Vj.set(e.id,n),n},"insertCluster"),Wj=v(()=>{Vj=new Map},"clear");v(Hj,"intersectNode");iEe=Hj;v(qj,"intersectEllipse");Yj=qj;v(Xj,"intersectCircle");aEe=Xj;v(jj,"intersectLine");v(FA,"sameSign");sEe=jj;v(Kj,"intersectPolygon");oEe=Kj,Mt={node:iEe,circle:aEe,ellipse:Yj,polygon:oEe,rect:$p};v(Zj,"anchor");v(zA,"generateArcPoints");v(Qj,"bowTieRect");v(vu,"insertPolygonShape");v(Jj,"card");v(eK,"choice");v(tK,"circle");v(rK,"createLine");v(nK,"crossedCircle");v(pu,"generateCirclePoints");v(iK,"curlyBraceLeft");v(gu,"generateCirclePoints");v(aK,"curlyBraceRight");v(ta,"generateCirclePoints");v(sK,"curlyBraces");v(oK,"curvedTrapezoid");lEe=v((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),cEe=v((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),uEe=v((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");v(lK,"cylinder");v(cK,"dividedRectangle");v(uK,"doublecircle");v(hK,"filledCircle");v(fK,"flippedTriangle");v(dK,"forkJoin");v(pK,"halfRoundedRectangle");hEe=v((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");v(gK,"hexagon");v(mK,"hourglass");v(vK,"icon");v(yK,"iconCircle");v(xK,"iconRounded");v(bK,"iconSquare");v(wK,"imageSquare");v(kK,"inv_trapezoid");v(j3,"drawRect");v(TK,"labelRect");v(EK,"lean_left");v(SK,"lean_right");v(CK,"lightningBolt");fEe=v((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),dEe=v((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),pEe=v((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");v(AK,"linedCylinder");v(_K,"linedWaveEdgedRect");v(LK,"multiRect");v(RK,"multiWaveEdgedRectangle");v(NK,"note");gEe=v((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");v(IK,"question");v(MK,"rect_left_inv_arrow");v(DK,"rectWithTitle");v(OK,"roundedRect");v(PK,"shadedProcess");v(BK,"slopedRect");v(FK,"squareRect");v(zK,"stadium");v($K,"state");v(GK,"stateEnd");v(UK,"stateStart");v(VK,"subroutine");v(WK,"taggedRect");v(HK,"taggedWaveEdgedRectangle");v(qK,"text");mEe=v((t,e,r,n,i,a)=>`M${t},${e}\n a${i},${a} 0,0,1 0,${-n}\n l${r},0\n a${i},${a} 0,0,1 0,${n}\n M${r},${-n}\n a${i},${a} 0,0,0 0,${n}\n l${-r},0`,"createCylinderPathD"),vEe=v((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),yEe=v((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");v(YK,"tiltedCylinder");v(XK,"trapezoid");v(jK,"trapezoidalPentagon");v(KK,"triangle");v(ZK,"waveEdgedRectangle");v(QK,"waveRectangle");v(JK,"windowPane");v(eZ,"textHelper");v(Bv,"addText");v(tZ,"classBox");xEe=v(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");v(rZ,"kanbanItem");bEe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:FK},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:OK},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:zK},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:VK},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:lK},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:tK},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:IK},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:gK},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:SK},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:EK},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:XK},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:kK},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:uK},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:qK},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Jj},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:PK},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:UK},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:GK},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:dK},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:mK},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:iK},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:aK},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:sK},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:CK},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ZK},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:pK},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:YK},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:AK},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:oK},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:cK},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:KK},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:JK},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:hK},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:jK},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:fK},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:BK},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:RK},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:LK},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Qj},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:nK},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:HK},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:WK},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:QK},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:MK},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:_K}],wEe=v(()=>{let e=[...Object.entries({state:$K,choice:eK,note:NK,rectWithTitle:DK,labelRect:TK,iconSquare:bK,iconCircle:yK,icon:vK,iconRounded:xK,imageSquare:wK,anchor:Zj,kanbanItem:rZ,classBox:tZ}),...bEe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),nZ=wEe();v(GA,"isValidShape");K3=new Map;v(hd,"insertNode");iZ=v((t,e)=>{K3.set(e.id,t)},"setNodeElem"),aZ=v(()=>{K3.clear()},"clear"),Fv=v(t=>{let e=K3.get(t.id);re.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});function zv(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=Pn(t),e=Pn(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,o=a-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}var Eo,Pn,Z3,ic=F(()=>{or();Eo={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};v(zv,"calculateDeltaAndAngle");Pn=v(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),Z3=v(t=>({x:v(function(e,r,n){let i=0,a=Pn(n[0]).x<Pn(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Eo,t.arrowTypeStart)){let{angle:p,deltaX:g}=zv(n[0],n[1]);i=Eo[t.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Eo,t.arrowTypeEnd)){let{angle:p,deltaX:g}=zv(n[n.length-1],n[n.length-2]);i=Eo[t.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}let s=Math.abs(Pn(e).x-Pn(n[n.length-1]).x),o=Math.abs(Pn(e).y-Pn(n[n.length-1]).y),l=Math.abs(Pn(e).x-Pn(n[0]).x),u=Math.abs(Pn(e).y-Pn(n[0]).y),h=Eo[t.arrowTypeStart],f=Eo[t.arrowTypeEnd],d=1;if(s<f&&s>0&&o<f){let p=f+d-s;p*=a==="right"?-1:1,i-=p}if(l<h&&l>0&&u<h){let p=h+d-l;p*=a==="right"?-1:1,i+=p}return Pn(e).x+i},"x"),y:v(function(e,r,n){let i=0,a=Pn(n[0]).y<Pn(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Eo,t.arrowTypeStart)){let{angle:p,deltaY:g}=zv(n[0],n[1]);i=Eo[t.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Eo,t.arrowTypeEnd)){let{angle:p,deltaY:g}=zv(n[n.length-1],n[n.length-2]);i=Eo[t.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}let s=Math.abs(Pn(e).y-Pn(n[n.length-1]).y),o=Math.abs(Pn(e).x-Pn(n[n.length-1]).x),l=Math.abs(Pn(e).y-Pn(n[0]).y),u=Math.abs(Pn(e).x-Pn(n[0]).x),h=Eo[t.arrowTypeStart],f=Eo[t.arrowTypeEnd],d=1;if(s<f&&s>0&&o<f){let p=f+d-s;p*=a==="up"?-1:1,i-=p}if(l<h&&l>0&&u<h){let p=h+d-l;p*=a==="up"?-1:1,i+=p}return Pn(e).y+i},"y")}),"getLineFunctionsWithOffset")});function Gv(t,e){pe().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function uZ(t){let e=[],r=[];for(let n=1;n<t.length-1;n++){let i=t[n-1],a=t[n],s=t[n+1];(i.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}var kEe,TEe,sZ,Q3,ra,cZ,$v,J3,e5,EEe,SEe,oZ,lZ,CEe,t5,AEe,_Ee,LEe,REe,NEe,IEe,MEe,DEe,OEe,PEe,BEe,r5,yu=F(()=>{fl();ic();fo();za();xn();or();lr();Gt();kEe=v((t,e,r,n,i)=>{e.arrowTypeStart&&sZ(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&sZ(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),TEe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},sZ=v((t,e,r,n,i,a)=>{let s=TEe[r];if(!s){re.warn(`Unknown arrow type: ${r}`);return}let o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${o})`)},"addEdgeMarker"),Q3=new Map,ra=new Map,cZ=v(()=>{Q3.clear(),ra.clear()},"clear"),$v=v(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),J3=v(async(t,e)=>{let r=Vr(pe().flowchart.htmlLabels),n=await ea(t,e.label,{style:$v(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});re.info("abc82",e,e.labelType);let i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);let s=n.getBBox();if(r){let l=n.children[0],u=Ge(n);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Q3.set(e.id,i),e.width=s.width,e.height=s.height;let o;if(e.startLabelLeft){let l=await Ch(e.startLabelLeft,$v(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),ra.get(e.id)||ra.set(e.id,{}),ra.get(e.id).startLeft=u,Gv(o,e.startLabelLeft)}if(e.startLabelRight){let l=await Ch(e.startLabelRight,$v(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=u.node().appendChild(l),h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),ra.get(e.id)||ra.set(e.id,{}),ra.get(e.id).startRight=u,Gv(o,e.startLabelRight)}if(e.endLabelLeft){let l=await Ch(e.endLabelLeft,$v(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.node().appendChild(l),ra.get(e.id)||ra.set(e.id,{}),ra.get(e.id).endLeft=u,Gv(o,e.endLabelLeft)}if(e.endLabelRight){let l=await Ch(e.endLabelRight,$v(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.node().appendChild(l),ra.get(e.id)||ra.set(e.id,{}),ra.get(e.id).endRight=u,Gv(o,e.endLabelRight)}return n},"insertEdgeLabel");v(Gv,"setTerminalWidth");e5=v((t,e)=>{re.debug("Moving label abc88 ",t.id,t.label,Q3.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=pe(),{subGraphTitleTotalMargin:i}=Zc(n);if(t.label){let a=Q3.get(t.id),s=t.x,o=t.y;if(r){let l=Wt.calcLabelPosition(r);re.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){let a=ra.get(t.id).startLeft,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let a=ra.get(t.id).startRight,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let a=ra.get(t.id).endLeft,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let a=ra.get(t.id).endRight,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),EEe=v((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),SEe=v((t,e,r)=>{re.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,o=r.x<e.x?s-a:s+a,l=t.height/2,u=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(n-e.x)*l){let f=r.y<e.y?e.y-l-i:i-l-e.y;o=h*f/u;let d={x:r.x<e.x?r.x+o:r.x-h+o,y:r.y<e.y?r.y+u-f:r.y-u+f};return o===0&&(d.x=e.x,d.y=e.y),h===0&&(d.x=e.x),u===0&&(d.y=e.y),re.debug(`abc89 top/bottom calc, Q ${u}, q ${f}, R ${h}, r ${o}`,d),d}else{r.x<e.x?o=e.x-s-n:o=n-s-e.x;let f=u*o/h,d=r.x<e.x?r.x+h-o:r.x-h+o,p=r.y<e.y?r.y+f:r.y-f;return re.debug(`sides calc abc89, Q ${u}, q ${f}, R ${h}, r ${o}`,{_x:d,_y:p}),o===0&&(d=e.x,p=e.y),h===0&&(d=e.x),u===0&&(p=e.y),{x:d,y:p}}},"intersection"),oZ=v((t,e)=>{re.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(re.info("abc88 checking point",a,e),!EEe(e,a)&&!i){let s=SEe(e,n,a);re.debug("abc88 inside",a,n,s),re.debug("abc88 intersection",s,e);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?re.warn("abc88 no intersect",s,r):r.push(s),i=!0}else re.warn("abc88 outside",a,n),n=a,i||r.push(a)}),re.debug("returning points",r),r},"cutPathAtIntersect");v(uZ,"extractCornerPoints");lZ=v(function(t,e,r){let n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:e.x-s*n,y:e.y-s*i}},"findAdjacentPoint"),CEe=v(function(t){let{cornerPointPositions:e}=uZ(t),r=[];for(let n=0;n<t.length;n++)if(e.includes(n)){let i=t[n-1],a=t[n+1],s=t[n],o=lZ(i,s,5),l=lZ(a,s,5),u=l.x-o.x,h=l.y-o.y;r.push(o);let f=Math.sqrt(2)*2,d={x:s.x,y:s.y};if(Math.abs(a.x-i.x)>10&&Math.abs(a.y-i.y)>=10){re.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let p=5;s.x===o.x?d={x:u<0?o.x-p+f:o.x+p-f,y:h<0?o.y-f:o.y+f}:d={x:u<0?o.x-f:o.x+f,y:h<0?o.y-p+f:o.y+p-f}}else re.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(d,l)}else r.push(t[n]);return r},"fixCorners"),t5=v(function(t,e,r,n,i,a,s){let{handDrawnSeed:o}=pe(),l=e.points,u=!1,h=i;var f=a;f.intersect&&h.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(h.intersect(l[0])),re.debug("Last point APA12",e.start,"-->",e.end,l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1]))),e.toCluster&&(re.info("to cluster abc88",r.get(e.toCluster)),l=oZ(e.points,r.get(e.toCluster).node),u=!0),e.fromCluster&&(re.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=oZ(l.reverse(),r.get(e.fromCluster).node).reverse(),u=!0);let d=l.filter(L=>!Number.isNaN(L.y));d=CEe(d);let p=cl;e.curve&&(p=e.curve);let{x:g,y:m}=Z3(e),x=ss().x(g).y(m).curve(p),y;switch(e.thickness){case"normal":y="edge-thickness-normal";break;case"thick":y="edge-thickness-thick";break;case"invisible":y="edge-thickness-invisible";break;default:y="edge-thickness-normal"}switch(e.pattern){case"solid":y+=" edge-pattern-solid";break;case"dotted":y+=" edge-pattern-dotted";break;case"dashed":y+=" edge-pattern-dashed";break;default:y+=" edge-pattern-solid"}let b,w=x(d),_=Array.isArray(e.style)?e.style:[e.style];if(e.look==="handDrawn"){let L=Xe.svg(t);Object.assign([],d);let S=L.path(w,{roughness:.3,seed:o});y+=" transition",b=Ge(S).select("path").attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",_?_.reduce((M,R)=>M+";"+R,""):"");let C=b.attr("d");b.attr("d",C),t.node().appendChild(b.node())}else b=t.append("path").attr("d",w).attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",_?_.reduce((L,S)=>L+";"+S,""):"");let k="";(pe().flowchart.arrowMarkerAbsolute||pe().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\\(/g,"\\\\(").replace(/\\)/g,"\\\\)")),re.info("arrowTypeStart",e.arrowTypeStart),re.info("arrowTypeEnd",e.arrowTypeEnd),kEe(b,e,k,s,n);let E={};return u&&(E.updatedPath=l),E.originalPath=e.points,E},"insertEdge"),AEe=v((t,e,r,n)=>{e.forEach(i=>{BEe[i](t,r,n)})},"insertMarkers"),_Ee=v((t,e,r)=>{re.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),LEe=v((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),REe=v((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),NEe=v((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),IEe=v((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),MEe=v((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),DEe=v((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),OEe=v((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),PEe=v((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),BEe={extension:_Ee,composition:LEe,aggregation:REe,dependency:NEe,lollipop:IEe,point:MEe,circle:DEe,cross:OEe,barb:PEe},r5=AEe});function zEe(t){return typeof t=="symbol"||Hn(t)&&Ji(t)==FEe}var FEe,Vs,fd=F(()=>{lu();yo();FEe="[object Symbol]";Vs=zEe});function $Ee(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var ds,dd=F(()=>{ds=$Ee});function dZ(t){if(typeof t=="string")return t;if(At(t))return ds(t,dZ)+"";if(Vs(t))return fZ?fZ.call(t):"";var e=t+"";return e=="0"&&1/t==-GEe?"-0":e}var GEe,hZ,fZ,pZ,gZ=F(()=>{td();dd();On();fd();GEe=1/0,hZ=Ui?Ui.prototype:void 0,fZ=hZ?hZ.toString:void 0;pZ=dZ});function VEe(t){for(var e=t.length;e--&&UEe.test(t.charAt(e)););return e}var UEe,mZ,vZ=F(()=>{UEe=/\\s/;mZ=VEe});function HEe(t){return t&&t.slice(0,mZ(t)+1).replace(WEe,"")}var WEe,yZ,xZ=F(()=>{vZ();WEe=/^\\s+/;yZ=HEe});function KEe(t){if(typeof t=="number")return t;if(Vs(t))return bZ;if(hn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=hn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=yZ(t);var r=YEe.test(t);return r||XEe.test(t)?jEe(t.slice(2),r?2:8):qEe.test(t)?bZ:+t}var bZ,qEe,YEe,XEe,jEe,wZ,kZ=F(()=>{xZ();Fs();fd();bZ=NaN,qEe=/^[-+]0x[0-9a-f]+$/i,YEe=/^0b[01]+$/i,XEe=/^0o[0-7]+$/i,jEe=parseInt;wZ=KEe});function QEe(t){if(!t)return t===0?t:0;if(t=wZ(t),t===TZ||t===-TZ){var e=t<0?-1:1;return e*ZEe}return t===t?t:0}var TZ,ZEe,Vp,UA=F(()=>{kZ();TZ=1/0,ZEe=17976931348623157e292;Vp=QEe});function JEe(t){var e=Vp(t),r=e%1;return e===e?r?e-r:e:0}var ac,Wp=F(()=>{UA();ac=JEe});var eSe,n5,EZ=F(()=>{gh();mo();eSe=os(Zn,"WeakMap"),n5=eSe});function tSe(){}var qn,VA=F(()=>{qn=tSe});function rSe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var i5,WA=F(()=>{i5=rSe});function nSe(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}var a5,HA=F(()=>{a5=nSe});function iSe(t){return t!==t}var SZ,CZ=F(()=>{SZ=iSe});function aSe(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var AZ,_Z=F(()=>{AZ=aSe});function sSe(t,e,r){return e===e?AZ(t,e,r):a5(t,SZ,r)}var Hp,s5=F(()=>{HA();CZ();_Z();Hp=sSe});function oSe(t,e){var r=t==null?0:t.length;return!!r&&Hp(t,e,0)>-1}var o5,qA=F(()=>{s5();o5=oSe});var lSe,LZ,RZ=F(()=>{W8();lSe=y3(Object.keys,Object),LZ=lSe});function hSe(t){if(!tc(t))return LZ(t);var e=[];for(var r in Object(t))uSe.call(t,r)&&r!="constructor"&&e.push(r);return e}var cSe,uSe,qp,l5=F(()=>{Lp();RZ();cSe=Object.prototype,uSe=cSe.hasOwnProperty;qp=hSe});function fSe(t){return Qn(t)?T3(t):qp(t)}var Rr,sc=F(()=>{j8();l5();xo();Rr=fSe});var dSe,pSe,gSe,na,NZ=F(()=>{Mp();sd();J8();xo();Lp();sc();dSe=Object.prototype,pSe=dSe.hasOwnProperty,gSe=C3(function(t,e){if(tc(e)||Qn(e)){ko(e,Rr(e),t);return}for(var r in e)pSe.call(e,r)&&rc(t,r,e[r])}),na=gSe});function ySe(t,e){if(At(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Vs(t)?!0:vSe.test(t)||!mSe.test(t)||e!=null&&t in Object(e)}var mSe,vSe,Yp,c5=F(()=>{On();fd();mSe=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,vSe=/^\\w*$/;Yp=ySe});function bSe(t){var e=wp(t,function(n){return r.size===xSe&&r.clear(),n}),r=e.cache;return e}var xSe,IZ,MZ=F(()=>{B8();xSe=500;IZ=bSe});var wSe,kSe,TSe,DZ,OZ=F(()=>{MZ();wSe=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,kSe=/\\\\(\\\\)?/g,TSe=IZ(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(wSe,function(r,n,i,a){e.push(i?a.replace(kSe,"$1"):n||r)}),e}),DZ=TSe});function ESe(t){return t==null?"":pZ(t)}var u5,YA=F(()=>{gZ();u5=ESe});function SSe(t,e){return At(t)?t:Yp(t,e)?[t]:DZ(u5(t))}var Ah,Uv=F(()=>{On();c5();OZ();YA();Ah=SSe});function ASe(t){if(typeof t=="string"||Vs(t))return t;var e=t+"";return e=="0"&&1/t==-CSe?"-0":e}var CSe,oc,Xp=F(()=>{fd();CSe=1/0;oc=ASe});function _Se(t,e){e=Ah(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[oc(e[r++])];return r&&r==n?t:void 0}var _h,Vv=F(()=>{Uv();Xp();_h=_Se});function LSe(t,e,r){var n=t==null?void 0:_h(t,e);return n===void 0?r:n}var PZ,BZ=F(()=>{Vv();PZ=LSe});function RSe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var jp,h5=F(()=>{jp=RSe});function NSe(t){return At(t)||ul(t)||!!(FZ&&t&&t[FZ])}var FZ,zZ,$Z=F(()=>{td();Rp();On();FZ=Ui?Ui.isConcatSpreadable:void 0;zZ=NSe});function GZ(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=zZ),i||(i=[]);++a<s;){var o=t[a];e>0&&r(o)?e>1?GZ(o,e-1,r,n,i):jp(i,o):n||(i[i.length]=o)}return i}var lc,Kp=F(()=>{h5();$Z();lc=GZ});function ISe(t){var e=t==null?0:t.length;return e?lc(t,1):[]}var Br,f5=F(()=>{Kp();Br=ISe});function MSe(t){return S3(E3(t,void 0,Br),t+"")}var UZ,VZ=F(()=>{f5();K8();Q8();UZ=MSe});function DSe(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}var d5,XA=F(()=>{d5=DSe});function VSe(t){return USe.test(t)}var OSe,PSe,BSe,FSe,zSe,$Se,GSe,USe,WZ,HZ=F(()=>{OSe="\\\\ud800-\\\\udfff",PSe="\\\\u0300-\\\\u036f",BSe="\\\\ufe20-\\\\ufe2f",FSe="\\\\u20d0-\\\\u20ff",zSe=PSe+BSe+FSe,$Se="\\\\ufe0e\\\\ufe0f",GSe="\\\\u200d",USe=RegExp("["+GSe+OSe+zSe+$Se+"]");WZ=VSe});function WSe(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r}var qZ,YZ=F(()=>{qZ=WSe});function HSe(t,e){return t&&ko(e,Rr(e),t)}var XZ,jZ=F(()=>{sd();sc();XZ=HSe});function qSe(t,e){return t&&ko(e,ls(e),t)}var KZ,ZZ=F(()=>{sd();kh();KZ=qSe});function YSe(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[i++]=s)}return a}var Zp,p5=F(()=>{Zp=YSe});function XSe(){return[]}var g5,jA=F(()=>{g5=XSe});var jSe,KSe,QZ,ZSe,Qp,m5=F(()=>{p5();jA();jSe=Object.prototype,KSe=jSe.propertyIsEnumerable,QZ=Object.getOwnPropertySymbols,ZSe=QZ?function(t){return t==null?[]:(t=Object(t),Zp(QZ(t),function(e){return KSe.call(t,e)}))}:g5,Qp=ZSe});function QSe(t,e){return ko(t,Qp(t),e)}var JZ,eQ=F(()=>{sd();m5();JZ=QSe});var JSe,eCe,v5,KA=F(()=>{h5();x3();m5();jA();JSe=Object.getOwnPropertySymbols,eCe=JSe?function(t){for(var e=[];t;)jp(e,Qp(t)),t=_p(t);return e}:g5,v5=eCe});function tCe(t,e){return ko(t,v5(t),e)}var tQ,rQ=F(()=>{sd();KA();tQ=tCe});function rCe(t,e,r){var n=e(t);return At(t)?n:jp(n,r(t))}var y5,ZA=F(()=>{h5();On();y5=rCe});function nCe(t){return y5(t,Rr,Qp)}var Wv,QA=F(()=>{ZA();m5();sc();Wv=nCe});function iCe(t){return y5(t,ls,v5)}var x5,JA=F(()=>{ZA();KA();kh();x5=iCe});var aCe,b5,nQ=F(()=>{gh();mo();aCe=os(Zn,"DataView"),b5=aCe});var sCe,w5,iQ=F(()=>{gh();mo();sCe=os(Zn,"Promise"),w5=sCe});var oCe,Lh,e_=F(()=>{gh();mo();oCe=os(Zn,"Set"),Lh=oCe});var aQ,lCe,sQ,oQ,lQ,cQ,cCe,uCe,hCe,fCe,dCe,pd,Ws,gd=F(()=>{nQ();h3();iQ();e_();EZ();lu();D8();aQ="[object Map]",lCe="[object Object]",sQ="[object Promise]",oQ="[object Set]",lQ="[object WeakMap]",cQ="[object DataView]",cCe=cu(b5),uCe=cu(yh),hCe=cu(w5),fCe=cu(Lh),dCe=cu(n5),pd=Ji;(b5&&pd(new b5(new ArrayBuffer(1)))!=cQ||yh&&pd(new yh)!=aQ||w5&&pd(w5.resolve())!=sQ||Lh&&pd(new Lh)!=oQ||n5&&pd(new n5)!=lQ)&&(pd=function(t){var e=Ji(t),r=e==lCe?t.constructor:void 0,n=r?cu(r):"";if(n)switch(n){case cCe:return cQ;case uCe:return aQ;case hCe:return sQ;case fCe:return oQ;case dCe:return lQ}return e});Ws=pd});function mCe(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&gCe.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var pCe,gCe,uQ,hQ=F(()=>{pCe=Object.prototype,gCe=pCe.hasOwnProperty;uQ=mCe});function vCe(t,e){var r=e?Ap(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var fQ,dQ=F(()=>{g3();fQ=vCe});function xCe(t){var e=new t.constructor(t.source,yCe.exec(t));return e.lastIndex=t.lastIndex,e}var yCe,pQ,gQ=F(()=>{yCe=/\\w*$/;pQ=xCe});function bCe(t){return vQ?Object(vQ.call(t)):{}}var mQ,vQ,yQ,xQ=F(()=>{td();mQ=Ui?Ui.prototype:void 0,vQ=mQ?mQ.valueOf:void 0;yQ=bCe});function $Ce(t,e,r){var n=t.constructor;switch(e){case LCe:return Ap(t);case wCe:case kCe:return new n(+t);case RCe:return fQ(t,r);case NCe:case ICe:case MCe:case DCe:case OCe:case PCe:case BCe:case FCe:case zCe:return m3(t,r);case TCe:return new n;case ECe:case ACe:return new n(t);case SCe:return pQ(t);case CCe:return new n;case _Ce:return yQ(t)}}var wCe,kCe,TCe,ECe,SCe,CCe,ACe,_Ce,LCe,RCe,NCe,ICe,MCe,DCe,OCe,PCe,BCe,FCe,zCe,bQ,wQ=F(()=>{g3();dQ();gQ();xQ();U8();wCe="[object Boolean]",kCe="[object Date]",TCe="[object Map]",ECe="[object Number]",SCe="[object RegExp]",CCe="[object Set]",ACe="[object String]",_Ce="[object Symbol]",LCe="[object ArrayBuffer]",RCe="[object DataView]",NCe="[object Float32Array]",ICe="[object Float64Array]",MCe="[object Int8Array]",DCe="[object Int16Array]",OCe="[object Int32Array]",PCe="[object Uint8Array]",BCe="[object Uint8ClampedArray]",FCe="[object Uint16Array]",zCe="[object Uint32Array]";bQ=$Ce});function UCe(t){return Hn(t)&&Ws(t)==GCe}var GCe,kQ,TQ=F(()=>{gd();yo();GCe="[object Map]";kQ=UCe});var EQ,VCe,SQ,CQ=F(()=>{TQ();ad();kv();EQ=wo&&wo.isMap,VCe=EQ?bo(EQ):kQ,SQ=VCe});function HCe(t){return Hn(t)&&Ws(t)==WCe}var WCe,AQ,_Q=F(()=>{gd();yo();WCe="[object Set]";AQ=HCe});var LQ,qCe,RQ,NQ=F(()=>{_Q();ad();kv();LQ=wo&&wo.isSet,qCe=LQ?bo(LQ):AQ,RQ=qCe});function k5(t,e,r,n,i,a){var s,o=e&YCe,l=e&XCe,u=e&jCe;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!hn(t))return t;var h=At(t);if(h){if(s=uQ(t),!o)return v3(t,s)}else{var f=Ws(t),d=f==MQ||f==e7e;if(hl(t))return p3(t,o);if(f==DQ||f==IQ||d&&!i){if(s=l||d?{}:b3(t),!o)return l?tQ(t,KZ(s,t)):JZ(t,XZ(s,t))}else{if(!bn[f])return i?t:{};s=bQ(t,f,o)}}a||(a=new Jl);var p=a.get(t);if(p)return p;a.set(t,s),RQ(t)?t.forEach(function(x){s.add(k5(x,e,r,x,t,a))}):SQ(t)&&t.forEach(function(x,y){s.set(y,k5(x,e,r,y,t,a))});var g=u?l?x5:Wv:l?ls:Rr,m=h?void 0:g(t);return i5(m||t,function(x,y){m&&(y=x,x=t[y]),rc(s,y,k5(x,e,r,y,t,a))}),s}var YCe,XCe,jCe,IQ,KCe,ZCe,QCe,JCe,MQ,e7e,t7e,r7e,DQ,n7e,i7e,a7e,s7e,o7e,l7e,c7e,u7e,h7e,f7e,d7e,p7e,g7e,m7e,v7e,y7e,bn,T5,t_=F(()=>{xv();WA();Mp();jZ();ZZ();$8();V8();eQ();rQ();QA();JA();gd();hQ();wQ();H8();On();Ip();CQ();Fs();NQ();sc();kh();YCe=1,XCe=2,jCe=4,IQ="[object Arguments]",KCe="[object Array]",ZCe="[object Boolean]",QCe="[object Date]",JCe="[object Error]",MQ="[object Function]",e7e="[object GeneratorFunction]",t7e="[object Map]",r7e="[object Number]",DQ="[object Object]",n7e="[object RegExp]",i7e="[object Set]",a7e="[object String]",s7e="[object Symbol]",o7e="[object WeakMap]",l7e="[object ArrayBuffer]",c7e="[object DataView]",u7e="[object Float32Array]",h7e="[object Float64Array]",f7e="[object Int8Array]",d7e="[object Int16Array]",p7e="[object Int32Array]",g7e="[object Uint8Array]",m7e="[object Uint8ClampedArray]",v7e="[object Uint16Array]",y7e="[object Uint32Array]",bn={};bn[IQ]=bn[KCe]=bn[l7e]=bn[c7e]=bn[ZCe]=bn[QCe]=bn[u7e]=bn[h7e]=bn[f7e]=bn[d7e]=bn[p7e]=bn[t7e]=bn[r7e]=bn[DQ]=bn[n7e]=bn[i7e]=bn[a7e]=bn[s7e]=bn[g7e]=bn[m7e]=bn[v7e]=bn[y7e]=!0;bn[JCe]=bn[MQ]=bn[o7e]=!1;T5=k5});function b7e(t){return T5(t,x7e)}var x7e,Xr,r_=F(()=>{t_();x7e=4;Xr=b7e});function T7e(t){return T5(t,w7e|k7e)}var w7e,k7e,n_,OQ=F(()=>{t_();w7e=1,k7e=4;n_=T7e});function E7e(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e<r;){var a=t[e];a&&(i[n++]=a)}return i}var cc,PQ=F(()=>{cc=E7e});function C7e(t){return this.__data__.set(t,S7e),this}var S7e,BQ,FQ=F(()=>{S7e="__lodash_hash_undefined__";BQ=C7e});function A7e(t){return this.__data__.has(t)}var zQ,$Q=F(()=>{zQ=A7e});function E5(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new nd;++e<r;)this.add(t[e])}var Jp,S5=F(()=>{f3();FQ();$Q();E5.prototype.add=E5.prototype.push=BQ;E5.prototype.has=zQ;Jp=E5});function _7e(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var C5,i_=F(()=>{C5=_7e});function L7e(t,e){return t.has(e)}var eg,A5=F(()=>{eg=L7e});function I7e(t,e,r,n,i,a){var s=r&R7e,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var u=a.get(t),h=a.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=r&N7e?new Jp:void 0;for(a.set(t,e),a.set(e,t);++f<o;){var g=t[f],m=e[f];if(n)var x=s?n(m,g,f,e,t,a):n(g,m,f,t,e,a);if(x!==void 0){if(x)continue;d=!1;break}if(p){if(!C5(e,function(y,b){if(!eg(p,b)&&(g===y||i(g,y,r,n,a)))return p.push(b)})){d=!1;break}}else if(!(g===m||i(g,m,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}var R7e,N7e,_5,a_=F(()=>{S5();i_();A5();R7e=1,N7e=2;_5=I7e});function M7e(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var GQ,UQ=F(()=>{GQ=M7e});function D7e(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var tg,L5=F(()=>{tg=D7e});function X7e(t,e,r,n,i,a,s){switch(r){case Y7e:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case q7e:return!(t.byteLength!=e.byteLength||!a(new Cp(t),new Cp(e)));case B7e:case F7e:case G7e:return vo(+t,+e);case z7e:return t.name==e.name&&t.message==e.message;case U7e:case W7e:return t==e+"";case $7e:var o=GQ;case V7e:var l=n&O7e;if(o||(o=tg),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;n|=P7e,s.set(t,e);var h=_5(o(t),o(e),n,i,a,s);return s.delete(t),h;case H7e:if(s_)return s_.call(t)==s_.call(e)}return!1}var O7e,P7e,B7e,F7e,z7e,$7e,G7e,U7e,V7e,W7e,H7e,q7e,Y7e,VQ,s_,WQ,HQ=F(()=>{td();G8();rd();a_();UQ();L5();O7e=1,P7e=2,B7e="[object Boolean]",F7e="[object Date]",z7e="[object Error]",$7e="[object Map]",G7e="[object Number]",U7e="[object RegExp]",V7e="[object Set]",W7e="[object String]",H7e="[object Symbol]",q7e="[object ArrayBuffer]",Y7e="[object DataView]",VQ=Ui?Ui.prototype:void 0,s_=VQ?VQ.valueOf:void 0;WQ=X7e});function Q7e(t,e,r,n,i,a){var s=r&j7e,o=Wv(t),l=o.length,u=Wv(e),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in e:Z7e.call(e,d)))return!1}var p=a.get(t),g=a.get(e);if(p&&g)return p==e&&g==t;var m=!0;a.set(t,e),a.set(e,t);for(var x=s;++f<l;){d=o[f];var y=t[d],b=e[d];if(n)var w=s?n(b,y,d,e,t,a):n(y,b,d,t,e,a);if(!(w===void 0?y===b||i(y,b,r,n,a):w)){m=!1;break}x||(x=d=="constructor")}if(m&&!x){var _=t.constructor,k=e.constructor;_!=k&&"constructor"in t&&"constructor"in e&&!(typeof _=="function"&&_ instanceof _&&typeof k=="function"&&k instanceof k)&&(m=!1)}return a.delete(t),a.delete(e),m}var j7e,K7e,Z7e,qQ,YQ=F(()=>{QA();j7e=1,K7e=Object.prototype,Z7e=K7e.hasOwnProperty;qQ=Q7e});function t8e(t,e,r,n,i,a){var s=At(t),o=At(e),l=s?jQ:Ws(t),u=o?jQ:Ws(e);l=l==XQ?R5:l,u=u==XQ?R5:u;var h=l==R5,f=u==R5,d=l==u;if(d&&hl(t)){if(!hl(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Jl),s||bh(t)?_5(t,e,r,n,i,a):WQ(t,e,l,r,n,i,a);if(!(r&J7e)){var p=h&&KQ.call(t,"__wrapped__"),g=f&&KQ.call(e,"__wrapped__");if(p||g){var m=p?t.value():t,x=g?e.value():e;return a||(a=new Jl),i(m,x,r,n,a)}}return d?(a||(a=new Jl),qQ(t,e,r,n,i,a)):!1}var J7e,XQ,jQ,R5,e8e,KQ,ZQ,QQ=F(()=>{xv();a_();HQ();YQ();gd();On();Ip();Tv();J7e=1,XQ="[object Arguments]",jQ="[object Array]",R5="[object Object]",e8e=Object.prototype,KQ=e8e.hasOwnProperty;ZQ=t8e});function JQ(t,e,r,n,i){return t===e?!0:t==null||e==null||!Hn(t)&&!Hn(e)?t!==t&&e!==e:ZQ(t,e,r,n,JQ,i)}var N5,o_=F(()=>{QQ();yo();N5=JQ});function i8e(t,e,r,n){var i=r.length,a=i,s=!n;if(t==null)return!a;for(t=Object(t);i--;){var o=r[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<a;){o=r[i];var l=o[0],u=t[l],h=o[1];if(s&&o[2]){if(u===void 0&&!(l in t))return!1}else{var f=new Jl;if(n)var d=n(u,h,l,t,e,f);if(!(d===void 0?N5(h,u,r8e|n8e,n,f):d))return!1}}return!0}var r8e,n8e,eJ,tJ=F(()=>{xv();o_();r8e=1,n8e=2;eJ=i8e});function a8e(t){return t===t&&!hn(t)}var I5,l_=F(()=>{Fs();I5=a8e});function s8e(t){for(var e=Rr(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,I5(i)]}return e}var rJ,nJ=F(()=>{l_();sc();rJ=s8e});function o8e(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var M5,c_=F(()=>{M5=o8e});function l8e(t){var e=rJ(t);return e.length==1&&e[0][2]?M5(e[0][0],e[0][1]):function(r){return r===t||eJ(r,t,e)}}var iJ,aJ=F(()=>{tJ();nJ();c_();iJ=l8e});function c8e(t,e){return t!=null&&e in Object(t)}var sJ,oJ=F(()=>{sJ=c8e});function u8e(t,e,r){e=Ah(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var s=oc(e[n]);if(!(a=t!=null&&r(t,s)))break;t=t[s]}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&Np(i)&&wh(s,i)&&(At(t)||ul(t)))}var D5,u_=F(()=>{Uv();Rp();On();Sv();w3();Xp();D5=u8e});function h8e(t,e){return t!=null&&D5(t,e,sJ)}var O5,h_=F(()=>{oJ();u_();O5=h8e});function p8e(t,e){return Yp(t)&&I5(e)?M5(oc(t),e):function(r){var n=PZ(r,t);return n===void 0&&n===e?O5(r,t):N5(e,n,f8e|d8e)}}var f8e,d8e,lJ,cJ=F(()=>{o_();BZ();h_();c5();l_();c_();Xp();f8e=1,d8e=2;lJ=p8e});function g8e(t){return function(e){return e?.[t]}}var P5,f_=F(()=>{P5=g8e});function m8e(t){return function(e){return _h(e,t)}}var uJ,hJ=F(()=>{Vv();uJ=m8e});function v8e(t){return Yp(t)?P5(oc(t)):uJ(t)}var fJ,dJ=F(()=>{f_();hJ();c5();Xp();fJ=v8e});function y8e(t){return typeof t=="function"?t:t==null?Vi:typeof t=="object"?At(t)?lJ(t[0],t[1]):iJ(t):fJ(t)}var sn,$a=F(()=>{aJ();cJ();hu();On();dJ();sn=y8e});function x8e(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;){var s=t[i];e(n,s,r(s),t)}return n}var pJ,gJ=F(()=>{pJ=x8e});function b8e(t,e){return t&&Sp(t,e,Rr)}var rg,B5=F(()=>{d3();sc();rg=b8e});function w8e(t,e){return function(r,n){if(r==null)return r;if(!Qn(r))return t(r,n);for(var i=r.length,a=e?i:-1,s=Object(r);(e?a--:++a<i)&&n(s[a],a,s)!==!1;);return r}}var mJ,vJ=F(()=>{xo();mJ=w8e});var k8e,ps,Rh=F(()=>{B5();vJ();k8e=mJ(rg),ps=k8e});function T8e(t,e,r,n){return ps(t,function(i,a,s){e(n,i,r(i),s)}),n}var yJ,xJ=F(()=>{Rh();yJ=T8e});function E8e(t,e){return function(r,n){var i=At(r)?pJ:yJ,a=e?e():{};return i(r,t,sn(n,2),a)}}var bJ,wJ=F(()=>{gJ();xJ();$a();On();bJ=E8e});var S8e,F5,kJ=F(()=>{mo();S8e=function(){return Zn.Date.now()},F5=S8e});var TJ,C8e,A8e,Nh,EJ=F(()=>{Dp();rd();od();kh();TJ=Object.prototype,C8e=TJ.hasOwnProperty,A8e=nc(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&zs(e[0],e[1],i)&&(n=1);++r<n;)for(var a=e[r],s=ls(a),o=-1,l=s.length;++o<l;){var u=s[o],h=t[u];(h===void 0||vo(h,TJ[u])&&!C8e.call(t,u))&&(t[u]=a[u])}return t}),Nh=A8e});function _8e(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var z5,d_=F(()=>{z5=_8e});function R8e(t,e,r,n){var i=-1,a=o5,s=!0,o=t.length,l=[],u=e.length;if(!o)return l;r&&(e=ds(e,bo(r))),n?(a=z5,s=!1):e.length>=L8e&&(a=eg,s=!1,e=new Jp(e));e:for(;++i<o;){var h=t[i],f=r==null?h:r(h);if(h=n||h!==0?h:0,s&&f===f){for(var d=u;d--;)if(e[d]===f)continue e;l.push(h)}else a(e,f,n)||l.push(h)}return l}var L8e,SJ,CJ=F(()=>{S5();qA();d_();dd();ad();A5();L8e=200;SJ=R8e});var N8e,Ih,AJ=F(()=>{CJ();Kp();Dp();k3();N8e=nc(function(t,e){return id(t)?SJ(t,lc(e,1,id,!0)):[]}),Ih=N8e});function I8e(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var ia,_J=F(()=>{ia=I8e});function M8e(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:ac(e),d5(t,e<0?0:e,n)):[]}var oi,LJ=F(()=>{XA();Wp();oi=M8e});function D8e(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:ac(e),e=n-e,d5(t,0,e<0?0:e)):[]}var xu,RJ=F(()=>{XA();Wp();xu=D8e});function O8e(t){return typeof t=="function"?t:Vi}var ng,$5=F(()=>{hu();ng=O8e});function P8e(t,e){var r=At(t)?i5:ps;return r(t,ng(e))}var Te,G5=F(()=>{WA();Rh();$5();On();Te=P8e});var NJ=F(()=>{G5()});function B8e(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var IJ,MJ=F(()=>{IJ=B8e});function F8e(t,e){var r=!0;return ps(t,function(n,i,a){return r=!!e(n,i,a),r}),r}var DJ,OJ=F(()=>{Rh();DJ=F8e});function z8e(t,e,r){var n=At(t)?IJ:DJ;return r&&zs(t,e,r)&&(e=void 0),n(t,sn(e,3))}var wa,PJ=F(()=>{MJ();OJ();$a();On();od();wa=z8e});function $8e(t,e){var r=[];return ps(t,function(n,i,a){e(n,i,a)&&r.push(n)}),r}var U5,p_=F(()=>{Rh();U5=$8e});function G8e(t,e){var r=At(t)?Zp:U5;return r(t,sn(e,3))}var Fr,g_=F(()=>{p5();p_();$a();On();Fr=G8e});function U8e(t){return function(e,r,n){var i=Object(e);if(!Qn(e)){var a=sn(r,3);e=Rr(e),r=function(o){return a(i[o],o,i)}}var s=t(e,r,n);return s>-1?i[a?e[s]:s]:void 0}}var BJ,FJ=F(()=>{$a();xo();sc();BJ=U8e});function W8e(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:ac(r);return i<0&&(i=V8e(n+i,0)),a5(t,sn(e,3),i)}var V8e,zJ,$J=F(()=>{HA();$a();Wp();V8e=Math.max;zJ=W8e});var H8e,Ga,GJ=F(()=>{FJ();$J();H8e=BJ(zJ),Ga=H8e});function q8e(t){return t&&t.length?t[0]:void 0}var Wi,UJ=F(()=>{Wi=q8e});var VJ=F(()=>{UJ()});function Y8e(t,e){var r=-1,n=Qn(t)?Array(t.length):[];return ps(t,function(i,a,s){n[++r]=e(i,a,s)}),n}var V5,m_=F(()=>{Rh();xo();V5=Y8e});function X8e(t,e){var r=At(t)?ds:V5;return r(t,sn(e,3))}var Ke,ig=F(()=>{dd();$a();m_();On();Ke=X8e});function j8e(t,e){return lc(Ke(t,e),1)}var aa,v_=F(()=>{Kp();ig();aa=j8e});function K8e(t,e){return t==null?t:Sp(t,ng(e),ls)}var y_,WJ=F(()=>{d3();$5();kh();y_=K8e});function Z8e(t,e){return t&&rg(t,ng(e))}var x_,HJ=F(()=>{B5();$5();x_=Z8e});var Q8e,J8e,eAe,b_,qJ=F(()=>{Ep();wJ();Q8e=Object.prototype,J8e=Q8e.hasOwnProperty,eAe=bJ(function(t,e,r){J8e.call(t,r)?t[r].push(e):ec(t,r,[e])}),b_=eAe});function tAe(t,e){return t>e}var YJ,XJ=F(()=>{YJ=tAe});function iAe(t,e){return t!=null&&nAe.call(t,e)}var rAe,nAe,jJ,KJ=F(()=>{rAe=Object.prototype,nAe=rAe.hasOwnProperty;jJ=iAe});function aAe(t,e){return t!=null&&D5(t,e,jJ)}var _t,ZJ=F(()=>{KJ();u_();_t=aAe});function oAe(t){return typeof t=="string"||!At(t)&&Hn(t)&&Ji(t)==sAe}var sAe,li,W5=F(()=>{lu();On();yo();sAe="[object String]";li=oAe});function lAe(t,e){return ds(e,function(r){return t[r]})}var QJ,JJ=F(()=>{dd();QJ=lAe});function cAe(t){return t==null?[]:QJ(t,Rr(t))}var hr,w_=F(()=>{JJ();sc();hr=cAe});function hAe(t,e,r,n){t=Qn(t)?t:hr(t),r=r&&!n?ac(r):0;var i=t.length;return r<0&&(r=uAe(i+r,0)),li(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Hp(t,e,r)>-1}var uAe,Bn,eee=F(()=>{s5();xo();W5();Wp();w_();uAe=Math.max;Bn=hAe});function dAe(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:ac(r);return i<0&&(i=fAe(n+i,0)),Hp(t,e,i)}var fAe,H5,tee=F(()=>{s5();Wp();fAe=Math.max;H5=dAe});function yAe(t){if(t==null)return!0;if(Qn(t)&&(At(t)||typeof t=="string"||typeof t.splice=="function"||hl(t)||bh(t)||ul(t)))return!t.length;var e=Ws(t);if(e==pAe||e==gAe)return!t.size;if(tc(t))return!qp(t).length;for(var r in t)if(vAe.call(t,r))return!1;return!0}var pAe,gAe,mAe,vAe,nr,q5=F(()=>{l5();gd();Rp();On();xo();Ip();Lp();Tv();pAe="[object Map]",gAe="[object Set]",mAe=Object.prototype,vAe=mAe.hasOwnProperty;nr=yAe});function bAe(t){return Hn(t)&&Ji(t)==xAe}var xAe,ree,nee=F(()=>{lu();yo();xAe="[object RegExp]";ree=bAe});var iee,wAe,So,aee=F(()=>{nee();ad();kv();iee=wo&&wo.isRegExp,wAe=iee?bo(iee):ree,So=wAe});function kAe(t){return t===void 0}var ar,see=F(()=>{ar=kAe});function TAe(t,e){return t<e}var Y5,k_=F(()=>{Y5=TAe});function EAe(t,e){var r={};return e=sn(e,3),rg(t,function(n,i,a){ec(r,i,e(n,i,a))}),r}var md,oee=F(()=>{Ep();B5();$a();md=EAe});function SAe(t,e,r){for(var n=-1,i=t.length;++n<i;){var a=t[n],s=e(a);if(s!=null&&(o===void 0?s===s&&!Vs(s):r(s,o)))var o=s,l=a}return l}var ag,X5=F(()=>{fd();ag=SAe});function CAe(t){return t&&t.length?ag(t,Vi,YJ):void 0}var gs,lee=F(()=>{X5();XJ();hu();gs=CAe});function AAe(t){return t&&t.length?ag(t,Vi,Y5):void 0}var dl,T_=F(()=>{X5();k_();hu();dl=AAe});function _Ae(t,e){return t&&t.length?ag(t,sn(e,2),Y5):void 0}var vd,cee=F(()=>{X5();$a();k_();vd=_Ae});function RAe(t){if(typeof t!="function")throw new TypeError(LAe);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var LAe,uee,hee=F(()=>{LAe="Expected a function";uee=RAe});function NAe(t,e,r,n){if(!hn(t))return t;e=Ah(e,t);for(var i=-1,a=e.length,s=a-1,o=t;o!=null&&++i<a;){var l=oc(e[i]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=s){var h=o[l];u=n?n(h,l,o):void 0,u===void 0&&(u=hn(h)?h:wh(e[i+1])?[]:{})}rc(o,l,u),o=o[l]}return t}var fee,dee=F(()=>{Mp();Uv();Sv();Fs();Xp();fee=NAe});function IAe(t,e,r){for(var n=-1,i=e.length,a={};++n<i;){var s=e[n],o=_h(t,s);r(o,s)&&fee(a,Ah(s,t),o)}return a}var j5,E_=F(()=>{Vv();dee();Uv();j5=IAe});function MAe(t,e){if(t==null)return{};var r=ds(x5(t),function(n){return[n]});return e=sn(e),j5(t,r,function(n,i){return e(n,i[0])})}var ms,pee=F(()=>{dd();$a();E_();JA();ms=MAe});function DAe(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var gee,mee=F(()=>{gee=DAe});function OAe(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,a=Vs(t),s=e!==void 0,o=e===null,l=e===e,u=Vs(e);if(!o&&!u&&!a&&t>e||a&&s&&l&&!o&&!u||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&t<e||u&&r&&i&&!n&&!a||o&&r&&i||!s&&i||!l)return-1}return 0}var vee,yee=F(()=>{fd();vee=OAe});function PAe(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,o=r.length;++n<s;){var l=vee(i[n],a[n]);if(l){if(n>=o)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return t.index-e.index}var xee,bee=F(()=>{yee();xee=PAe});function BAe(t,e,r){e.length?e=ds(e,function(a){return At(a)?function(s){return _h(s,a.length===1?a[0]:a)}:a}):e=[Vi];var n=-1;e=ds(e,bo(sn));var i=V5(t,function(a,s,o){var l=ds(e,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return gee(i,function(a,s){return xee(a,s,r)})}var wee,kee=F(()=>{dd();Vv();$a();m_();mee();ad();bee();hu();On();wee=BAe});var FAe,Tee,Eee=F(()=>{f_();FAe=P5("length"),Tee=FAe});function KAe(t){for(var e=See.lastIndex=0;See.test(t);)++e;return e}var Cee,zAe,$Ae,GAe,UAe,VAe,WAe,S_,C_,HAe,Aee,_ee,Lee,qAe,Ree,Nee,YAe,XAe,jAe,See,Iee,Mee=F(()=>{Cee="\\\\ud800-\\\\udfff",zAe="\\\\u0300-\\\\u036f",$Ae="\\\\ufe20-\\\\ufe2f",GAe="\\\\u20d0-\\\\u20ff",UAe=zAe+$Ae+GAe,VAe="\\\\ufe0e\\\\ufe0f",WAe="["+Cee+"]",S_="["+UAe+"]",C_="\\\\ud83c[\\\\udffb-\\\\udfff]",HAe="(?:"+S_+"|"+C_+")",Aee="[^"+Cee+"]",_ee="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",Lee="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",qAe="\\\\u200d",Ree=HAe+"?",Nee="["+VAe+"]?",YAe="(?:"+qAe+"(?:"+[Aee,_ee,Lee].join("|")+")"+Nee+Ree+")*",XAe=Nee+Ree+YAe,jAe="(?:"+[Aee+S_+"?",S_,_ee,Lee,WAe].join("|")+")",See=RegExp(C_+"(?="+C_+")|"+jAe+XAe,"g");Iee=KAe});function ZAe(t){return WZ(t)?Iee(t):Tee(t)}var Dee,Oee=F(()=>{Eee();HZ();Mee();Dee=ZAe});function QAe(t,e){return j5(t,e,function(r,n){return O5(t,n)})}var Pee,Bee=F(()=>{E_();h_();Pee=QAe});var JAe,yd,Fee=F(()=>{Bee();VZ();JAe=UZ(function(t,e){return t==null?{}:Pee(t,e)}),yd=JAe});function r_e(t,e,r,n){for(var i=-1,a=t_e(e_e((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var e_e,t_e,zee,$ee=F(()=>{e_e=Math.ceil,t_e=Math.max;zee=r_e});function n_e(t){return function(e,r,n){return n&&typeof n!="number"&&zs(e,r,n)&&(r=n=void 0),e=Vp(e),r===void 0?(r=e,e=0):r=Vp(r),n=n===void 0?e<r?1:-1:Vp(n),zee(e,r,n,t)}}var Gee,Uee=F(()=>{$ee();od();UA();Gee=n_e});var i_e,Co,Vee=F(()=>{Uee();i_e=Gee(),Co=i_e});function a_e(t,e,r,n,i){return i(t,function(a,s,o){r=n?(n=!1,a):e(r,a,s,o)}),r}var Wee,Hee=F(()=>{Wee=a_e});function s_e(t,e,r){var n=At(t)?qZ:Wee,i=arguments.length<3;return n(t,sn(e,4),r,i,ps)}var zr,A_=F(()=>{YZ();Rh();$a();Hee();On();zr=s_e});function o_e(t,e){var r=At(t)?Zp:U5;return r(t,uee(sn(e,3)))}var Mh,qee=F(()=>{p5();p_();$a();On();hee();Mh=o_e});function u_e(t){if(t==null)return 0;if(Qn(t))return li(t)?Dee(t):t.length;var e=Ws(t);return e==l_e||e==c_e?t.size:qp(t).length}var l_e,c_e,__,Yee=F(()=>{l5();gd();xo();W5();Oee();l_e="[object Map]",c_e="[object Set]";__=u_e});function h_e(t,e){var r;return ps(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}var Xee,jee=F(()=>{Rh();Xee=h_e});function f_e(t,e,r){var n=At(t)?C5:Xee;return r&&zs(t,e,r)&&(e=void 0),n(t,sn(e,3))}var Hv,Kee=F(()=>{i_();$a();jee();On();od();Hv=f_e});var d_e,uc,Zee=F(()=>{Kp();kee();Dp();od();d_e=nc(function(t,e){if(t==null)return[];var r=e.length;return r>1&&zs(t,e[0],e[1])?e=[]:r>2&&zs(e[0],e[1],e[2])&&(e=[e[0]]),wee(t,lc(e,1),[])}),uc=d_e});var p_e,g_e,Qee,Jee=F(()=>{e_();VA();L5();p_e=1/0,g_e=Lh&&1/tg(new Lh([,-0]))[1]==p_e?function(t){return new Lh(t)}:qn,Qee=g_e});function v_e(t,e,r){var n=-1,i=o5,a=t.length,s=!0,o=[],l=o;if(r)s=!1,i=z5;else if(a>=m_e){var u=e?null:Qee(t);if(u)return tg(u);s=!1,i=eg,l=new Jp}else l=e?[]:o;e:for(;++n<a;){var h=t[n],f=e?e(h):h;if(h=r||h!==0?h:0,s&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue e;e&&l.push(f),o.push(h)}else i(l,f,r)||(l!==o&&l.push(f),o.push(h))}return o}var m_e,sg,K5=F(()=>{S5();qA();d_();A5();Jee();L5();m_e=200;sg=v_e});var y_e,L_,ete=F(()=>{Kp();Dp();K5();k3();y_e=nc(function(t){return sg(lc(t,1,id,!0))}),L_=y_e});function x_e(t){return t&&t.length?sg(t):[]}var og,tte=F(()=>{K5();og=x_e});function b_e(t,e){return t&&t.length?sg(t,sn(e,2)):[]}var rte,nte=F(()=>{$a();K5();rte=b_e});function k_e(t){var e=++w_e;return u5(t)+e}var w_e,xd,ite=F(()=>{YA();w_e=0;xd=k_e});function T_e(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n<i;){var o=n<a?e[n]:void 0;r(s,t[n],o)}return s}var ate,ste=F(()=>{ate=T_e});function E_e(t,e){return ate(t||[],e||[],rc)}var Z5,ote=F(()=>{Mp();ste();Z5=E_e});var Pt=F(()=>{NZ();r_();OQ();PQ();Z8();EJ();AJ();LJ();RJ();NJ();PJ();g_();GJ();VJ();v_();f5();G5();WJ();HJ();qJ();ZJ();hu();eee();tee();On();q5();pv();Fs();aee();W5();see();sc();_J();ig();oee();lee();eA();T_();cee();VA();kJ();Fee();pee();Vee();A_();qee();Yee();Kee();Zee();ete();tte();ite();w_();ote();});function cte(t,e){t[e]?t[e]++:t[e]=1}function ute(t,e){--t[e]||delete t[e]}function qv(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+lte+a+lte+(ar(n)?S_e:n)}function C_e(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}var o={v:i,w:a};return n&&(o.name=n),o}function R_(t,e){return qv(t,e.v,e.w,e.name)}var S_e,bd,lte,Sr,Q5=F(()=>{Pt();S_e="\\0",bd="\\0",lte="",Sr=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=cs(void 0),this._defaultEdgeLabelFn=cs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[bd]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return pi(e)||(e=cs(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Rr(this._nodes)}sources(){var e=this;return Fr(this.nodes(),function(r){return nr(e._in[r])})}sinks(){var e=this;return Fr(this.nodes(),function(r){return nr(e._out[r])})}setNodes(e,r){var n=arguments,i=this;return Te(e,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=bd,this._children[e]={},this._children[bd][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Te(this.children(e),n=>{this.setParent(n)}),delete this._children[e]),Te(Rr(this._in[e]),r),delete this._in[e],delete this._preds[e],Te(Rr(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ar(r))r=bd;else{r+="";for(var n=r;!ar(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==bd)return r}}children(e){if(ar(e)&&(e=bd),this._isCompound){var r=this._children[e];if(r)return Rr(r)}else{if(e===bd)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return Rr(r)}successors(e){var r=this._sucs[e];if(r)return Rr(r)}neighbors(e){var r=this.predecessors(e);if(r)return L_(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;Te(this._nodes,function(s,o){e(o)&&r.setNode(o,s)}),Te(this._edgeObjs,function(s){r.hasNode(s.v)&&r.hasNode(s.w)&&r.setEdge(s,n.edge(s))});var i={};function a(s){var o=n.parent(s);return o===void 0||r.hasNode(o)?(i[s]=o,o):o in i?i[o]:a(o)}return this._isCompound&&Te(r.nodes(),function(s){r.setParent(s,a(s))}),r}setDefaultEdgeLabel(e){return pi(e)||(e=cs(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return hr(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return zr(e,function(a,s){return i.length>1?n.setEdge(a,s,r):n.setEdge(a,s),s}),this}setEdge(){var e,r,n,i,a=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,r=s.w,n=s.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=s,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,ar(n)||(n=""+n);var o=qv(this._isDirected,e,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return a&&(this._edgeLabels[o]=i),this;if(!ar(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=a?i:this._defaultEdgeLabelFn(e,r,n);var l=C_e(this._isDirected,e,r,n);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,cte(this._preds[r],e),cte(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?R_(this._isDirected,arguments[0]):qv(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?R_(this._isDirected,arguments[0]):qv(this._isDirected,e,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?R_(this._isDirected,arguments[0]):qv(this._isDirected,e,r,n),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],ute(this._preds[r],e),ute(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var i=hr(n);return r?Fr(i,function(a){return a.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=hr(n);return r?Fr(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}};Sr.prototype._nodeCount=0;Sr.prototype._edgeCount=0});var vs=F(()=>{Q5()});function hte(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function A_e(t,e){if(t!=="_next"&&t!=="_prev")return e}var J5,fte=F(()=>{J5=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return hte(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&hte(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,A_e)),n=n._prev;return"["+e.join(", ")+"]"}}});function dte(t,e){if(t.nodeCount()<=1)return[];var r=R_e(t,e||__e),n=L_e(r.graph,r.buckets,r.zeroIdx);return Br(Ke(n,function(i){return t.outEdges(i.v,i.w)}))}function L_e(t,e,r){for(var n=[],i=e[e.length-1],a=e[0],s;t.nodeCount();){for(;s=a.dequeue();)N_(t,e,r,s);for(;s=i.dequeue();)N_(t,e,r,s);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(s=e[o].dequeue(),s){n=n.concat(N_(t,e,r,s,!0));break}}}return n}function N_(t,e,r,n,i){var a=i?[]:void 0;return Te(t.inEdges(n.v),function(s){var o=t.edge(s),l=t.node(s.v);i&&a.push({v:s.v,w:s.w}),l.out-=o,I_(e,r,l)}),Te(t.outEdges(n.v),function(s){var o=t.edge(s),l=s.w,u=t.node(l);u.in-=o,I_(e,r,u)}),t.removeNode(n.v),a}function R_e(t,e){var r=new Sr,n=0,i=0;Te(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),Te(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=e(o),h=l+u;r.setEdge(o.v,o.w,h),i=Math.max(i,r.node(o.v).out+=u),n=Math.max(n,r.node(o.w).in+=u)});var a=Co(i+n+3).map(function(){return new J5}),s=n+1;return Te(r.nodes(),function(o){I_(a,s,r.node(o))}),{graph:r,buckets:a,zeroIdx:s}}function I_(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}var __e,pte=F(()=>{Pt();vs();fte();__e=cs(1)});function gte(t){var e=t.graph().acyclicer==="greedy"?dte(t,r(t)):N_e(t);Te(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,xd("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function N_e(t){var e=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,Te(t.outEdges(a),function(s){Object.prototype.hasOwnProperty.call(r,s.w)?e.push(s):i(s.w)}),delete r[a])}return Te(t.nodes(),i),e}function mte(t){Te(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}var M_=F(()=>{Pt();pte()});function hc(t,e,r,n){var i;do i=xd(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function yte(t){var e=new Sr().setGraph(t.graph());return Te(t.nodes(),function(r){e.setNode(r,t.node(r))}),Te(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function ew(t){var e=new Sr({multigraph:t.isMultigraph()}).setGraph(t.graph());return Te(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),Te(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function D_(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=o*i/a,u=o):(i<0&&(s=-s),l=s,u=s*a/i),{x:r+l,y:n+u}}function Dh(t){var e=Ke(Co(P_(t)+1),function(){return[]});return Te(t.nodes(),function(r){var n=t.node(r),i=n.rank;ar(i)||(e[i][n.order]=r)}),e}function xte(t){var e=dl(Ke(t.nodes(),function(r){return t.node(r).rank}));Te(t.nodes(),function(r){var n=t.node(r);_t(n,"rank")&&(n.rank-=e)})}function bte(t){var e=dl(Ke(t.nodes(),function(a){return t.node(a).rank})),r=[];Te(t.nodes(),function(a){var s=t.node(a).rank-e;r[s]||(r[s]=[]),r[s].push(a)});var n=0,i=t.graph().nodeRankFactor;Te(r,function(a,s){ar(a)&&s%i!==0?--n:n&&Te(a,function(o){t.node(o).rank+=n})})}function O_(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),hc(t,"border",i,e)}function P_(t){return gs(Ke(t.nodes(),function(e){var r=t.node(e).rank;if(!ar(r))return r}))}function wte(t,e){var r={lhs:[],rhs:[]};return Te(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function kte(t,e){var r=F5();try{return e()}finally{console.log(t+" time: "+(F5()-r)+"ms")}}function Tte(t,e){return e()}var fc=F(()=>{Pt();vs()});function Ste(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&&Te(n,e),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,s=i.maxRank+1;a<s;++a)Ete(t,"borderLeft","_bl",r,i,a),Ete(t,"borderRight","_br",r,i,a)}}Te(t.children(),e)}function Ete(t,e,r,n,i,a){var s={width:0,height:0,rank:a,borderType:e},o=i[e][a-1],l=hc(t,"border",s,r);i[e][a]=l,t.setParent(l,n),o&&t.setEdge(o,l,{weight:1})}var Cte=F(()=>{Pt();fc()});function _te(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Rte(t)}function Lte(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&I_e(t),(e==="lr"||e==="rl")&&(M_e(t),Rte(t))}function Rte(t){Te(t.nodes(),function(e){Ate(t.node(e))}),Te(t.edges(),function(e){Ate(t.edge(e))})}function Ate(t){var e=t.width;t.width=t.height,t.height=e}function I_e(t){Te(t.nodes(),function(e){B_(t.node(e))}),Te(t.edges(),function(e){var r=t.edge(e);Te(r.points,B_),Object.prototype.hasOwnProperty.call(r,"y")&&B_(r)})}function B_(t){t.y=-t.y}function M_e(t){Te(t.nodes(),function(e){F_(t.node(e))}),Te(t.edges(),function(e){var r=t.edge(e);Te(r.points,F_),Object.prototype.hasOwnProperty.call(r,"x")&&F_(r)})}function F_(t){var e=t.x;t.x=t.y,t.y=e}var Nte=F(()=>{Pt()});function Ite(t){t.graph().dummyChains=[],Te(t.edges(),function(e){O_e(t,e)})}function O_e(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==n+1){t.removeEdge(e);var u=void 0,h,f;for(f=0,++n;n<a;++f,++n)o.points=[],u={width:0,height:0,edgeLabel:o,edgeObj:e,rank:n},h=hc(t,"edge",u,"_d"),n===l&&(u.width=o.width,u.height=o.height,u.dummy="edge-label",u.labelpos=o.labelpos),t.setEdge(r,h,{weight:o.weight},s),f===0&&t.graph().dummyChains.push(h),r=h;t.setEdge(r,i,{weight:o.weight},s)}}function Mte(t){Te(t.graph().dummyChains,function(e){var r=t.node(e),n=r.edgeLabel,i;for(t.setEdge(r.edgeObj,n);r.dummy;)i=t.successors(e)[0],t.removeNode(e),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),e=i,r=t.node(e)})}var z_=F(()=>{Pt();fc()});function Yv(t){var e={};function r(n){var i=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return i.rank;e[n]=!0;var a=dl(Ke(t.outEdges(n),function(s){return r(s.w)-t.edge(s).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}Te(t.sources(),r)}function wd(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var tw=F(()=>{Pt()});function rw(t){var e=new Sr({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;P_e(e,t)<n;)i=B_e(e,t),a=e.hasNode(i.v)?wd(t,i):-wd(t,i),F_e(e,t,a);return e}function P_e(t,e){function r(n){Te(e.nodeEdges(n),function(i){var a=i.v,s=n===a?i.w:a;!t.hasNode(s)&&!wd(e,i)&&(t.setNode(s,{}),t.setEdge(n,s,{}),r(s))})}return Te(t.nodes(),r),t.nodeCount()}function B_e(t,e){return vd(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return wd(e,r)})}function F_e(t,e,r){Te(t.nodes(),function(n){e.node(n).rank+=r})}var $_=F(()=>{Pt();vs();tw()});var Ote=F(()=>{});var G_=F(()=>{});var ZSt,U_=F(()=>{Pt();G_();ZSt=cs(1)});var Pte=F(()=>{U_()});var V_=F(()=>{});var Bte=F(()=>{V_()});var iCt,Fte=F(()=>{Pt();iCt=cs(1)});function W_(t){var e={},r={},n=[];function i(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new Xv;Object.prototype.hasOwnProperty.call(e,a)||(r[a]=!0,e[a]=!0,Te(t.predecessors(a),i),delete r[a],n.push(a))}if(Te(t.sinks(),i),__(e)!==t.nodeCount())throw new Xv;return n}function Xv(){}var H_=F(()=>{Pt();W_.CycleException=Xv;Xv.prototype=new Error});var zte=F(()=>{H_()});function nw(t,e,r){At(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return Te(e,function(s){if(!t.hasNode(s))throw new Error("Graph does not have node: "+s);$te(t,s,r==="post",a,n,i)}),i}function $te(t,e,r,n,i,a){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||a.push(e),Te(i(e),function(s){$te(t,s,r,n,i,a)}),r&&a.push(e))}var q_=F(()=>{Pt()});function Y_(t,e){return nw(t,e,"post")}var Gte=F(()=>{q_()});function X_(t,e){return nw(t,e,"pre")}var Ute=F(()=>{q_()});var Vte=F(()=>{G_();Q5()});var Wte=F(()=>{Ote();U_();Pte();Bte();Fte();zte();Gte();Ute();Vte();V_();H_()});function Ph(t){t=yte(t),Yv(t);var e=rw(t);K_(e),j_(e,t);for(var r,n;r=Xte(e);)n=jte(e,t,r),Kte(e,t,r,n)}function j_(t,e){var r=Y_(t,t.nodes());r=r.slice(0,r.length-1),Te(r,function(n){V_e(t,e,n)})}function V_e(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=qte(t,e,r)}function qte(t,e,r){var n=t.node(r),i=n.parent,a=!0,s=e.edge(r,i),o=0;return s||(a=!1,s=e.edge(i,r)),o=s.weight,Te(e.nodeEdges(r),function(l){var u=l.v===r,h=u?l.w:l.v;if(h!==i){var f=u===a,d=e.edge(l).weight;if(o+=f?d:-d,H_e(t,r,h)){var p=t.edge(r,h).cutvalue;o+=f?-p:p}}}),o}function K_(t,e){arguments.length<2&&(e=t.nodes()[0]),Yte(t,{},1,e)}function Yte(t,e,r,n,i){var a=r,s=t.node(n);return e[n]=!0,Te(t.neighbors(n),function(o){Object.prototype.hasOwnProperty.call(e,o)||(r=Yte(t,e,r,o,n))}),s.low=a,s.lim=r++,i?s.parent=i:delete s.parent,r}function Xte(t){return Ga(t.edges(),function(e){return t.edge(e).cutvalue<0})}function jte(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),s=t.node(i),o=a,l=!1;a.lim>s.lim&&(o=s,l=!0);var u=Fr(e.edges(),function(h){return l===Hte(t,t.node(h.v),o)&&l!==Hte(t,t.node(h.w),o)});return vd(u,function(h){return wd(e,h)})}function Kte(t,e,r,n){var i=r.v,a=r.w;t.removeEdge(i,a),t.setEdge(n.v,n.w,{}),K_(t),j_(t,e),W_e(t,e)}function W_e(t,e){var r=Ga(t.nodes(),function(i){return!e.node(i).parent}),n=X_(t,r);n=n.slice(1),Te(n,function(i){var a=t.node(i).parent,s=e.edge(i,a),o=!1;s||(s=e.edge(a,i),o=!0),e.node(i).rank=e.node(a).rank+(o?s.minlen:-s.minlen)})}function H_e(t,e,r){return t.hasEdge(e,r)}function Hte(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var Zte=F(()=>{Pt();Wte();fc();$_();tw();Ph.initLowLimValues=K_;Ph.initCutValues=j_;Ph.calcCutValue=qte;Ph.leaveEdge=Xte;Ph.enterEdge=jte;Ph.exchangeEdges=Kte});function Z_(t){switch(t.graph().ranker){case"network-simplex":Qte(t);break;case"tight-tree":Y_e(t);break;case"longest-path":q_e(t);break;default:Qte(t)}}function Y_e(t){Yv(t),rw(t)}function Qte(t){Ph(t)}var q_e,Q_=F(()=>{$_();Zte();tw();q_e=Yv});function Jte(t){var e=hc(t,"root",{},"_root"),r=X_e(t),n=gs(hr(r))-1,i=2*n+1;t.graph().nestingRoot=e,Te(t.edges(),function(s){t.edge(s).minlen*=i});var a=j_e(t)+1;Te(t.children(),function(s){ere(t,e,i,a,n,r,s)}),t.graph().nodeRankFactor=i}function ere(t,e,r,n,i,a,s){var o=t.children(s);if(!o.length){s!==e&&t.setEdge(e,s,{weight:0,minlen:r});return}var l=O_(t,"_bt"),u=O_(t,"_bb"),h=t.node(s);t.setParent(l,s),h.borderTop=l,t.setParent(u,s),h.borderBottom=u,Te(o,function(f){ere(t,e,r,n,i,a,f);var d=t.node(f),p=d.borderTop?d.borderTop:f,g=d.borderBottom?d.borderBottom:f,m=d.borderTop?n:2*n,x=p!==g?1:i-a[s]+1;t.setEdge(l,p,{weight:m,minlen:x,nestingEdge:!0}),t.setEdge(g,u,{weight:m,minlen:x,nestingEdge:!0})}),t.parent(s)||t.setEdge(e,l,{weight:0,minlen:i+a[s]})}function X_e(t){var e={};function r(n,i){var a=t.children(n);a&&a.length&&Te(a,function(s){r(s,i+1)}),e[n]=i}return Te(t.children(),function(n){r(n,1)}),e}function j_e(t){return zr(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function tre(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,Te(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}var rre=F(()=>{Pt();fc()});function nre(t,e,r){var n={},i;Te(r,function(a){for(var s=t.parent(a),o,l;s;){if(o=t.parent(s),o?(l=n[o],n[o]=s):(l=i,i=s),l&&l!==s){e.setEdge(l,s);return}s=o}})}var ire=F(()=>{Pt()});function are(t,e,r){var n=Z_e(t),i=new Sr({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return t.node(a)});return Te(t.nodes(),function(a){var s=t.node(a),o=t.parent(a);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(i.setNode(a),i.setParent(a,o||n),Te(t[r](a),function(l){var u=l.v===a?l.w:l.v,h=i.edge(u,a),f=ar(h)?0:h.weight;i.setEdge(u,a,{weight:t.edge(l).weight+f})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&i.setNode(a,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))}),i}function Z_e(t){for(var e;t.hasNode(e=xd("_root")););return e}var sre=F(()=>{Pt();vs()});function ore(t,e){for(var r=0,n=1;n<e.length;++n)r+=Q_e(t,e[n-1],e[n]);return r}function Q_e(t,e,r){for(var n=Z5(r,Ke(r,function(u,h){return h})),i=Br(Ke(e,function(u){return uc(Ke(t.outEdges(u),function(h){return{pos:n[h.w],weight:t.edge(h).weight}}),"pos")})),a=1;a<r.length;)a<<=1;var s=2*a-1;a-=1;var o=Ke(new Array(s),function(){return 0}),l=0;return Te(i.forEach(function(u){var h=u.pos+a;o[h]+=u.weight;for(var f=0;h>0;)h%2&&(f+=o[h+1]),h=h-1>>1,o[h]+=u.weight;l+=u.weight*f})),l}var lre=F(()=>{Pt()});function cre(t){var e={},r=Fr(t.nodes(),function(o){return!t.children(o).length}),n=gs(Ke(r,function(o){return t.node(o).rank})),i=Ke(Co(n+1),function(){return[]});function a(o){if(!_t(e,o)){e[o]=!0;var l=t.node(o);i[l.rank].push(o),Te(t.successors(o),a)}}var s=uc(r,function(o){return t.node(o).rank});return Te(s,a),i}var ure=F(()=>{Pt()});function hre(t,e){return Ke(e,function(r){var n=t.inEdges(r);if(n.length){var i=zr(n,function(a,s){var o=t.edge(s),l=t.node(s.v);return{sum:a.sum+o.weight*l.order,weight:a.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var fre=F(()=>{Pt()});function dre(t,e){var r={};Te(t,function(i,a){var s=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};ar(i.barycenter)||(s.barycenter=i.barycenter,s.weight=i.weight)}),Te(e.edges(),function(i){var a=r[i.v],s=r[i.w];!ar(a)&&!ar(s)&&(s.indegree++,a.out.push(r[i.w]))});var n=Fr(r,function(i){return!i.indegree});return J_e(n)}function J_e(t){var e=[];function r(a){return function(s){s.merged||(ar(s.barycenter)||ar(a.barycenter)||s.barycenter>=a.barycenter)&&e9e(a,s)}}function n(a){return function(s){s.in.push(a),--s.indegree===0&&t.push(s)}}for(;t.length;){var i=t.pop();e.push(i),Te(i.in.reverse(),r(i)),Te(i.out,n(i))}return Ke(Fr(e,function(a){return!a.merged}),function(a){return yd(a,["vs","i","barycenter","weight"])})}function e9e(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var pre=F(()=>{Pt()});function mre(t,e){var r=wte(t,function(h){return Object.prototype.hasOwnProperty.call(h,"barycenter")}),n=r.lhs,i=uc(r.rhs,function(h){return-h.i}),a=[],s=0,o=0,l=0;n.sort(t9e(!!e)),l=gre(a,i,l),Te(n,function(h){l+=h.vs.length,a.push(h.vs),s+=h.barycenter*h.weight,o+=h.weight,l=gre(a,i,l)});var u={vs:Br(a)};return o&&(u.barycenter=s/o,u.weight=o),u}function gre(t,e,r){for(var n;e.length&&(n=ia(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function t9e(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}var vre=F(()=>{Pt();fc()});function J_(t,e,r,n){var i=t.children(e),a=t.node(e),s=a?a.borderLeft:void 0,o=a?a.borderRight:void 0,l={};s&&(i=Fr(i,function(g){return g!==s&&g!==o}));var u=hre(t,i);Te(u,function(g){if(t.children(g.v).length){var m=J_(t,g.v,r,n);l[g.v]=m,Object.prototype.hasOwnProperty.call(m,"barycenter")&&n9e(g,m)}});var h=dre(u,r);r9e(h,l);var f=mre(h,n);if(s&&(f.vs=Br([s,f.vs,o]),t.predecessors(s).length)){var d=t.node(t.predecessors(s)[0]),p=t.node(t.predecessors(o)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f}function r9e(t,e){Te(t,function(r){r.vs=Br(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function n9e(t,e){ar(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var yre=F(()=>{Pt();fre();pre();vre()});function wre(t){var e=P_(t),r=xre(t,Co(1,e+1),"inEdges"),n=xre(t,Co(e-1,-1,-1),"outEdges"),i=cre(t);bre(t,i);for(var a=Number.POSITIVE_INFINITY,s,o=0,l=0;l<4;++o,++l){i9e(o%2?r:n,o%4>=2),i=Dh(t);var u=ore(t,i);u<a&&(l=0,s=n_(i),a=u)}bre(t,s)}function xre(t,e,r){return Ke(e,function(n){return are(t,n,r)})}function i9e(t,e){var r=new Sr;Te(t,function(n){var i=n.graph().root,a=J_(n,i,r,e);Te(a.vs,function(s,o){n.node(s).order=o}),nre(n,r,a.vs)})}function bre(t,e){Te(e,function(r){Te(r,function(n,i){t.node(n).order=i})})}var kre=F(()=>{Pt();vs();fc();ire();sre();lre();ure();yre()});function Tre(t){var e=s9e(t);Te(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=a9e(t,e,i.v,i.w),s=a.path,o=a.lca,l=0,u=s[l],h=!0;r!==i.w;){if(n=t.node(r),h){for(;(u=s[l])!==o&&t.node(u).maxRank<n.rank;)l++;u===o&&(h=!1)}if(!h){for(;l<s.length-1&&t.node(u=s[l+1]).minRank<=n.rank;)l++;u=s[l]}t.setParent(r,u),r=t.successors(r)[0]}})}function a9e(t,e,r,n){var i=[],a=[],s=Math.min(e[r].low,e[n].low),o=Math.max(e[r].lim,e[n].lim),l,u;l=r;do l=t.parent(l),i.push(l);while(l&&(e[l].low>s||o>e[l].lim));for(u=l,l=n;(l=t.parent(l))!==u;)a.push(l);return{path:i.concat(a.reverse()),lca:u}}function s9e(t){var e={},r=0;function n(i){var a=r;Te(t.children(i),n),e[i]={low:a,lim:r++}}return Te(t.children(),n),e}var Ere=F(()=>{Pt()});function o9e(t,e){var r={};function n(i,a){var s=0,o=0,l=i.length,u=ia(a);return Te(a,function(h,f){var d=c9e(t,h),p=d?t.node(d).order:l;(d||h===u)&&(Te(a.slice(o,f+1),function(g){Te(t.predecessors(g),function(m){var x=t.node(m),y=x.order;(y<s||p<y)&&!(x.dummy&&t.node(g).dummy)&&Sre(r,m,g)})}),o=f+1,s=p)}),a}return zr(e,n),r}function l9e(t,e){var r={};function n(a,s,o,l,u){var h;Te(Co(s,o),function(f){h=a[f],t.node(h).dummy&&Te(t.predecessors(h),function(d){var p=t.node(d);p.dummy&&(p.order<l||p.order>u)&&Sre(r,d,h)})})}function i(a,s){var o=-1,l,u=0;return Te(s,function(h,f){if(t.node(h).dummy==="border"){var d=t.predecessors(h);d.length&&(l=t.node(d[0]).order,n(s,u,f,o,l),u=f,o=l)}n(s,u,s.length,l,a.length)}),s}return zr(e,i),r}function c9e(t,e){if(t.node(e).dummy)return Ga(t.predecessors(e),function(r){return t.node(r).dummy})}function Sre(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function u9e(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function h9e(t,e,r,n){var i={},a={},s={};return Te(e,function(o){Te(o,function(l,u){i[l]=l,a[l]=l,s[l]=u})}),Te(e,function(o){var l=-1;Te(o,function(u){var h=n(u);if(h.length){h=uc(h,function(m){return s[m]});for(var f=(h.length-1)/2,d=Math.floor(f),p=Math.ceil(f);d<=p;++d){var g=h[d];a[u]===u&&l<s[g]&&!u9e(r,u,g)&&(a[g]=u,a[u]=i[u]=i[g],l=s[g])}}})}),{root:i,align:a}}function f9e(t,e,r,n,i){var a={},s=d9e(t,e,r,i),o=i?"borderLeft":"borderRight";function l(f,d){for(var p=s.nodes(),g=p.pop(),m={};g;)m[g]?f(g):(m[g]=!0,p.push(g),p=p.concat(d(g))),g=p.pop()}function u(f){a[f]=s.inEdges(f).reduce(function(d,p){return Math.max(d,a[p.v]+s.edge(p))},0)}function h(f){var d=s.outEdges(f).reduce(function(g,m){return Math.min(g,a[m.w]-s.edge(m))},Number.POSITIVE_INFINITY),p=t.node(f);d!==Number.POSITIVE_INFINITY&&p.borderType!==o&&(a[f]=Math.max(a[f],d))}return l(u,s.predecessors.bind(s)),l(h,s.successors.bind(s)),Te(n,function(f){a[f]=a[r[f]]}),a}function d9e(t,e,r,n){var i=new Sr,a=t.graph(),s=v9e(a.nodesep,a.edgesep,n);return Te(e,function(o){var l;Te(o,function(u){var h=r[u];if(i.setNode(h),l){var f=r[l],d=i.edge(f,h);i.setEdge(f,h,Math.max(s(t,u,l),d||0))}l=u})}),i}function p9e(t,e){return vd(hr(e),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return y_(r,function(a,s){var o=y9e(t,s)/2;n=Math.max(a+o,n),i=Math.min(a-o,i)}),n-i})}function g9e(t,e){var r=hr(e),n=dl(r),i=gs(r);Te(["u","d"],function(a){Te(["l","r"],function(s){var o=a+s,l=t[o],u;if(l!==e){var h=hr(l);u=s==="l"?n-dl(h):i-gs(h),u&&(t[o]=md(l,function(f){return f+u}))}})})}function m9e(t,e){return md(t.ul,function(r,n){if(e)return t[e.toLowerCase()][n];var i=uc(Ke(t,n));return(i[1]+i[2])/2})}function Cre(t){var e=Dh(t),r=Th(o9e(t,e),l9e(t,e)),n={},i;Te(["u","d"],function(s){i=s==="u"?e:hr(e).reverse(),Te(["l","r"],function(o){o==="r"&&(i=Ke(i,function(f){return hr(f).reverse()}));var l=(s==="u"?t.predecessors:t.successors).bind(t),u=h9e(t,i,r,l),h=f9e(t,i,u.root,u.align,o==="r");o==="r"&&(h=md(h,function(f){return-f})),n[s+o]=h})});var a=p9e(t,n);return g9e(n,a),m9e(n,t.graph().align)}function v9e(t,e,r){return function(n,i,a){var s=n.node(i),o=n.node(a),l=0,u;if(l+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=-s.width/2;break;case"r":u=s.width/2;break}if(u&&(l+=r?u:-u),u=0,l+=(s.dummy?e:t)/2,l+=(o.dummy?e:t)/2,l+=o.width/2,Object.prototype.hasOwnProperty.call(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":u=o.width/2;break;case"r":u=-o.width/2;break}return u&&(l+=r?u:-u),u=0,l}}function y9e(t,e){return t.node(e).width}var Are=F(()=>{Pt();vs();fc()});function _re(t){t=ew(t),x9e(t),x_(Cre(t),function(e,r){t.node(r).x=e})}function x9e(t){var e=Dh(t),r=t.graph().ranksep,n=0;Te(e,function(i){var a=gs(Ke(i,function(s){return t.node(s).height}));Te(i,function(s){t.node(s).y=n+a/2}),n+=a+r})}var Lre=F(()=>{Pt();fc();Are()});function bu(t,e){var r=e&&e.debugTiming?kte:Tte;r("layout",()=>{var n=r(" buildLayoutGraph",()=>R9e(t));r(" runLayout",()=>b9e(n,r)),r(" updateInputGraph",()=>w9e(t,n))})}function b9e(t,e){e(" makeSpaceForEdgeLabels",()=>N9e(t)),e(" removeSelfEdges",()=>$9e(t)),e(" acyclic",()=>gte(t)),e(" nestingGraph.run",()=>Jte(t)),e(" rank",()=>Z_(ew(t))),e(" injectEdgeLabelProxies",()=>I9e(t)),e(" removeEmptyRanks",()=>bte(t)),e(" nestingGraph.cleanup",()=>tre(t)),e(" normalizeRanks",()=>xte(t)),e(" assignRankMinMax",()=>M9e(t)),e(" removeEdgeLabelProxies",()=>D9e(t)),e(" normalize.run",()=>Ite(t)),e(" parentDummyChains",()=>Tre(t)),e(" addBorderSegments",()=>Ste(t)),e(" order",()=>wre(t)),e(" insertSelfEdges",()=>G9e(t)),e(" adjustCoordinateSystem",()=>_te(t)),e(" position",()=>_re(t)),e(" positionSelfEdges",()=>U9e(t)),e(" removeBorderNodes",()=>z9e(t)),e(" normalize.undo",()=>Mte(t)),e(" fixupEdgeLabelCoords",()=>B9e(t)),e(" undoCoordinateSystem",()=>Lte(t)),e(" translateGraph",()=>O9e(t)),e(" assignNodeIntersects",()=>P9e(t)),e(" reversePoints",()=>F9e(t)),e(" acyclic.undo",()=>mte(t))}function w9e(t,e){Te(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),Te(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function R9e(t){var e=new Sr({multigraph:!0,compound:!0}),r=t9(t.graph());return e.setGraph(Th({},T9e,e9(r,k9e),yd(r,E9e))),Te(t.nodes(),function(n){var i=t9(t.node(n));e.setNode(n,Nh(e9(i,S9e),C9e)),e.setParent(n,t.parent(n))}),Te(t.edges(),function(n){var i=t9(t.edge(n));e.setEdge(n,Th({},_9e,e9(i,A9e),yd(i,L9e)))}),e}function N9e(t){var e=t.graph();e.ranksep/=2,Te(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function I9e(t){Te(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e};hc(t,"edge-proxy",a,"_ep")}})}function M9e(t){var e=0;Te(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=gs(e,n.maxRank))}),t.graph().maxRank=e}function D9e(t){Te(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function O9e(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),s=a.marginx||0,o=a.marginy||0;function l(u){var h=u.x,f=u.y,d=u.width,p=u.height;e=Math.min(e,h-d/2),r=Math.max(r,h+d/2),n=Math.min(n,f-p/2),i=Math.max(i,f+p/2)}Te(t.nodes(),function(u){l(t.node(u))}),Te(t.edges(),function(u){var h=t.edge(u);Object.prototype.hasOwnProperty.call(h,"x")&&l(h)}),e-=s,n-=o,Te(t.nodes(),function(u){var h=t.node(u);h.x-=e,h.y-=n}),Te(t.edges(),function(u){var h=t.edge(u);Te(h.points,function(f){f.x-=e,f.y-=n}),Object.prototype.hasOwnProperty.call(h,"x")&&(h.x-=e),Object.prototype.hasOwnProperty.call(h,"y")&&(h.y-=n)}),a.width=r-e+s,a.height=i-n+o}function P9e(t){Te(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=i,s=n),r.points.unshift(D_(n,a)),r.points.push(D_(i,s))})}function B9e(t){Te(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function F9e(t){Te(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function z9e(t){Te(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(ia(r.borderLeft)),s=t.node(ia(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),Te(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function $9e(t){Te(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function G9e(t){var e=Dh(t);Te(e,function(r){var n=0;Te(r,function(i,a){var s=t.node(i);s.order=a+n,Te(s.selfEdges,function(o){hc(t,"selfedge",{width:o.label.width,height:o.label.height,rank:s.rank,order:a+ ++n,e:o.e,label:o.label},"_se")}),delete s.selfEdges})})}function U9e(t){Te(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,s=r.x-i,o=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{x:i+s,y:a},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],r.label.x=r.x,r.label.y=r.y}})}function e9(t,e){return md(yd(t,e),Number)}function t9(t){var e={};return Te(t,function(r,n){e[n.toLowerCase()]=r}),e}var k9e,T9e,E9e,S9e,C9e,A9e,_9e,L9e,Rre=F(()=>{Pt();vs();Cte();Nte();M_();z_();Q_();rre();kre();Ere();Lre();fc();k9e=["nodesep","edgesep","ranksep","marginx","marginy"],T9e={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E9e=["acyclicer","ranker","rankdir","align"],S9e=["width","height"],C9e={width:0,height:0},A9e=["minlen","weight","width","height","labeloffset"],_9e={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L9e=["labelpos"]});var jv=F(()=>{M_();Rre();z_();Q_()});function Ao(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:V9e(t),edges:W9e(t)};return ar(t.graph())||(e.value=Xr(t.graph())),e}function V9e(t){return Ke(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return ar(r)||(i.value=r),ar(n)||(i.parent=n),i})}function W9e(t){return Ke(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return ar(e.name)||(n.name=e.name),ar(r)||(n.value=r),n})}var r9=F(()=>{Pt();Q5()});var zre={};mr(zre,{render:()=>K9e});var fr,kd,Mre,H9e,iw,q9e,Dre,Ore,Y9e,Kv,Ire,X9e,Pre,Bre,j9e,Fre,K9e,$re=F(()=>{yu();fl();el();ic();fo();za();xn();or();jv();r9();vs();vs();r9();fr=new Map,kd=new Map,Mre=new Map,H9e=v(()=>{kd.clear(),Mre.clear(),fr.clear()},"clear"),iw=v((t,e)=>{let r=kd.get(e)||[];return re.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),q9e=v((t,e)=>{let r=kd.get(e)||[];return re.info("Descendants of ",e," is ",r),re.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||iw(t.v,e)||iw(t.w,e)||r.includes(t.w):(re.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),Dre=v((t,e,r,n)=>{re.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),re.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)Dre(a,e,r,n);else{let s=e.node(a);re.info("cp ",a," to ",n," with parent ",t),r.setNode(a,s),n!==e.parent(a)&&(re.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(re.debug("Setting parent",a,t),r.setParent(a,t)):(re.info("In copy ",t,"root",n,"data",e.node(t),n),re.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let o=e.edges(a);re.debug("Copying Edges",o),o.forEach(l=>{re.info("Edge",l);let u=e.edge(l.v,l.w,l.name);re.info("Edge data",u,n);try{q9e(l,n)?(re.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),re.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):re.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(h){re.error(h)}})}re.debug("Removing node",a),e.removeNode(a)})},"copy"),Ore=v((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)Mre.set(i,t),n=[...n,...Ore(i,e)];return n},"extractDescendants"),Y9e=v((t,e,r)=>{let n=t.edges().filter(l=>l.v===e||l.w===e),i=t.edges().filter(l=>l.v===r||l.w===r),a=n.map(l=>({v:l.v===e?r:l.v,w:l.w===e?e:l.w})),s=i.map(l=>({v:l.v,w:l.w}));return a.filter(l=>s.some(u=>l.v===u.v&&l.w===u.w))},"findCommonEdges"),Kv=v((t,e,r)=>{let n=e.children(t);if(re.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(let a of n){let s=Kv(a,e,r),o=Y9e(e,r,s);if(s)if(o.length>0)i=s;else return s}return i},"findNonClusterChild"),Ire=v(t=>!fr.has(t)||!fr.get(t).externalConnections?t:fr.has(t)?fr.get(t).id:t,"getAnchorId"),X9e=v((t,e)=>{if(!t||e>10){re.debug("Opting out, no graph ");return}else re.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(re.warn("Cluster identified",r," Replacement id in edges: ",Kv(r,t,r)),kd.set(r,Ore(r,t)),fr.set(r,{id:Kv(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(re.debug("Cluster identified",r,kd),i.forEach(a=>{let s=iw(a.v,r),o=iw(a.w,r);s^o&&(re.warn("Edge: ",a," leaves cluster ",r),re.warn("Descendants of XXX ",r,": ",kd.get(r)),fr.get(r).externalConnections=!0)})):re.debug("Not a cluster ",r,kd)});for(let r of fr.keys()){let n=fr.get(r).id,i=t.parent(n);i!==r&&fr.has(i)&&!fr.get(i).externalConnections&&(fr.get(r).id=i)}t.edges().forEach(function(r){let n=t.edge(r);re.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),re.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(re.warn("Fix XXX",fr,"ids:",r.v,r.w,"Translating: ",fr.get(r.v)," --- ",fr.get(r.w)),fr.get(r.v)||fr.get(r.w)){if(re.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Ire(r.v),a=Ire(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let s=t.parent(i);fr.get(s).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let s=t.parent(a);fr.get(s).externalConnections=!0,n.toCluster=r.w}re.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),re.warn("Adjusted Graph",Ao(t)),Pre(t,0),re.trace(fr)},"adjustClustersAndEdges"),Pre=v((t,e)=>{if(re.warn("extractor - ",e,Ao(t),t.children("D")),e>10){re.error("Bailing out");return}let r=t.nodes(),n=!1;for(let i of r){let a=t.children(i);n=n||a.length>0}if(!n){re.debug("Done, no node has children",t.nodes());return}re.debug("Nodes = ",r,e);for(let i of r)if(re.debug("Extracting node",i,fr,fr.has(i)&&!fr.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!fr.has(i))re.debug("Not a cluster",i,e);else if(!fr.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){re.warn("Cluster without external connections, without a parent and with children",i,e);let s=t.graph().rankdir==="TB"?"LR":"TB";fr.get(i)?.clusterData?.dir&&(s=fr.get(i).clusterData.dir,re.warn("Fixing dir",fr.get(i).clusterData.dir,s));let o=new Sr({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});re.warn("Old graph before copy",Ao(t)),Dre(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:fr.get(i).clusterData,label:fr.get(i).label,graph:o}),re.warn("New graph after copy node: (",i,")",Ao(o)),re.debug("Old graph after copy",Ao(t))}else re.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!fr.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),re.debug(fr);r=t.nodes(),re.warn("New list of nodes",r);for(let i of r){let a=t.node(i);re.warn(" Now next level",i,a),a?.clusterNode&&Pre(a.graph,e+1)}},"extractor"),Bre=v((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{let i=t.children(n),a=Bre(t,i);r=[...r,...a]}),r},"sorter"),j9e=v(t=>Bre(t,t.children()),"sortNodesByHierarchy"),Fre=v(async(t,e,r,n,i,a)=>{re.warn("Graph in recursive render:XAX",Ao(e),i);let s=e.graph().rankdir;re.trace("Dir in recursive render - dir:",s);let o=t.insert("g").attr("class","root");e.nodes()?re.info("Recursive render XXX",e.nodes()):re.info("No nodes found for",e),e.edges().length>0&&re.info("Recursive edges",e.edge(e.edges()[0]));let l=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),h=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(m){let x=e.node(m);if(i!==void 0){let y=JSON.parse(JSON.stringify(i.clusterData));re.trace(`Setting data for parent cluster XXX\n Node.id = `,m,`\n data=`,y.height,`\nParent cluster`,i.height),e.setNode(i.id,y),e.parent(m)||(re.trace("Setting parent",m,i.id),e.setParent(m,i.id,y))}if(re.info("(Insert) Node XXX"+m+": "+JSON.stringify(e.node(m))),x?.clusterNode){re.info("Cluster identified XBX",m,x.width,e.node(m));let{ranksep:y,nodesep:b}=e.graph();x.graph.setGraph({...x.graph.graph(),ranksep:y+25,nodesep:b});let w=await Fre(f,x.graph,r,n,e.node(m),a),_=w.elem;Bt(x,_),x.diff=w.diff||0,re.info("New compound node after recursive render XAX",m,"width",x.width,"height",x.height),iZ(_,x)}else e.children(m).length>0?(re.trace("Cluster - the non recursive path XBX",m,x.id,x,x.width,"Graph:",e),re.trace(Kv(x.id,e)),fr.set(x.id,{id:Kv(x.id,e),node:x})):(re.trace("Node - the non recursive path XAX",m,f,e.node(m),s),await hd(f,e.node(m),{config:a,dir:s}))})),await v(async()=>{let m=e.edges().map(async function(x){let y=e.edge(x.v,x.w,x.name);re.info("Edge "+x.v+" -> "+x.w+": "+JSON.stringify(x)),re.info("Edge "+x.v+" -> "+x.w+": ",x," ",JSON.stringify(e.edge(x))),re.info("Fix",fr,"ids:",x.v,x.w,"Translating: ",fr.get(x.v),fr.get(x.w)),await J3(h,y)});await Promise.all(m)},"processEdges")(),re.info("Graph before layout:",JSON.stringify(Ao(e))),re.info("############################################# XXX"),re.info("### Layout ### XXX"),re.info("############################################# XXX"),bu(e),re.info("Graph after layout:",JSON.stringify(Ao(e)));let p=0,{subGraphTitleTotalMargin:g}=Zc(a);return await Promise.all(j9e(e).map(async function(m){let x=e.node(m);if(re.info("Position XBX => "+m+": ("+x.x,","+x.y,") width: ",x.width," height: ",x.height),x?.clusterNode)x.y+=g,re.info("A tainted cluster node XBX1",m,x.id,x.width,x.height,x.x,x.y,e.parent(m)),fr.get(x.id).node=x,Fv(x);else if(e.children(m).length>0){re.info("A pure cluster node XBX1",m,x.id,x.x,x.y,x.width,x.height,e.parent(m)),x.height+=g,e.node(x.parentId);let y=x?.padding/2||0,b=x?.labelBBox?.height||0,w=b-y||0;re.debug("OffsetY",w,"labelHeight",b,"halfPadding",y),await Up(l,x),fr.get(x.id).node=x}else{let y=e.node(x.parentId);x.y+=g/2,re.info("A regular node XBX1 - using the padding",x.id,"parent",x.parentId,x.width,x.height,x.x,x.y,"offsetY",x.offsetY,"parent",y,y?.offsetY,x),Fv(x)}})),e.edges().forEach(function(m){let x=e.edge(m);re.info("Edge "+m.v+" -> "+m.w+": "+JSON.stringify(x),x),x.points.forEach(_=>_.y+=g/2);let y=e.node(m.v);var b=e.node(m.w);let w=t5(u,x,fr,r,y,b,n);e5(x,w)}),e.nodes().forEach(function(m){let x=e.node(m);re.info(m,x.type,x.diff),x.isGroup&&(p=x.diff)}),re.warn("Returning from recursive render XAX",o,p),{elem:o,diff:p}},"recursiveRender"),K9e=v(async(t,e)=>{let r=new Sr({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=e.select("g");r5(n,t.markers,t.type,t.diagramId),aZ(),cZ(),Wj(),H9e(),t.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),re.debug("Edges:",t.edges),t.edges.forEach(a=>{if(a.start===a.end){let s=a.start,o=s+"---"+s+"---1",l=s+"---"+s+"---2",u=r.node(s);r.setNode(o,{domId:o,id:o,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(o,u.parentId),r.setNode(l,{domId:l,id:l,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(l,u.parentId);let h=structuredClone(a),f=structuredClone(a),d=structuredClone(a);h.label="",h.arrowTypeEnd="none",h.id=s+"-cyclic-special-1",f.arrowTypeEnd="none",f.id=s+"-cyclic-special-mid",d.label="",u.isGroup&&(h.fromCluster=s,d.toCluster=s),d.id=s+"-cyclic-special-2",r.setEdge(s,o,h,s+"-cyclic-special-0"),r.setEdge(o,l,f,s+"-cyclic-special-1"),r.setEdge(l,s,d,s+"-cyc<lic-special-2")}else r.setEdge(a.start,a.end,{...a},a.id)}),re.warn("Graph at first:",JSON.stringify(Ao(r))),X9e(r),re.warn("Graph after XAX:",JSON.stringify(Ao(r)));let i=pe();await Fre(n,r,t.type,t.diagramId,void 0,i)},"render")});var Z9e,Zv,n9,Q9e,cg,aw,wu=F(()=>{yu();fl();xn();or();Z9e={common:je,getConfig:Or,insertCluster:Up,insertEdge:t5,insertEdgeLabel:J3,insertMarkers:r5,insertNode:hd,interpolateToCurve:_3,labelHelper:er,log:re,positionEdgeLabel:e5},Zv={},n9=v(t=>{for(let e of t)Zv[e.name]=e},"registerLayoutLoaders"),Q9e=v(()=>{n9([{name:"dagre",loader:v(async()=>await Promise.resolve().then(()=>($re(),zre)),"loader")}])},"registerDefaultLayoutLoaders");Q9e();cg=v(async(t,e)=>{if(!(t.layoutAlgorithm in Zv))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=Zv[t.layoutAlgorithm];return(await r.loader()).render(t,e,Z9e,{algorithm:r.algorithm})},"render"),aw=v((t="",{fallback:e="dagre"}={})=>{if(t in Zv)return t;if(e in Zv)return re.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")});var Qv,i9=F(()=>{Qv="11.4.1"});var ka,ku=F(()=>{or();lr();ka=v(t=>{let{securityLevel:e}=pe(),r=Ge("body");if(e==="sandbox"){let a=Ge(`#i${t}`).node()?.contentDocument??document;r=Ge(a.body)}return r.select(`#${t}`)},"selectSvgElement")});var o9,Ed,mw,ane,sne,one,dc,vw,yw=F(()=>{or();o9=ga(Q0(),1),Ed=v((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),e.attrs!==void 0)for(let n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),mw=v((t,e)=>{let r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};Ed(t,r).lower()},"drawBackgroundRect"),ane=v((t,e)=>{let r=e.text.replace(Lf," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),sne=v((t,e,r,n)=>{let i=t.append("image");i.attr("x",e),i.attr("y",r);let a=(0,o9.sanitizeUrl)(n);i.attr("xlink:href",a)},"drawImage"),one=v((t,e,r,n)=>{let i=t.append("use");i.attr("x",e),i.attr("y",r);let a=(0,o9.sanitizeUrl)(n);i.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),dc=v(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),vw=v(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")});var xne={};mr(xne,{diagram:()=>YLe});function No(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=sA(e[t].text,i,n),e[t].textLines=e[t].text.split(je.lineBreakRegex).length,e[t].width=i,e[t].height=Cv(e[t].text,n);else{let a=e[t].text.split(je.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(let o of a)e[t].width=Math.max(us(o,n),e[t].width),s=Cv(o,n),e[t].height=e[t].height+s}}function p9(t,e,r,n,i){let a=new mne(i);a.data.widthLimit=r.data.widthLimit/Math.min(c9,n.length);for(let[s,o]of n.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&Dt.wrap,h=xw(Dt);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",No("label",o,u,h,a.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let g=xw(Dt);No("type",o,u,g,a.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let g=xw(Dt);g.fontSize=g.fontSize-2,No("descr",o,u,g,a.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(s==0||s%c9===0){let g=r.data.startx+Dt.diagramMarginX,m=r.data.stopy+Dt.diagramMarginY+l;a.setData(g,g,m,m)}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+Dt.diagramMarginX:a.data.startx,m=a.data.starty;a.setData(g,g,m,m)}a.name=o.alias;let f=i.db.getC4ShapeArray(o.alias),d=i.db.getC4ShapeKeys(o.alias);d.length>0&&yne(a,t,f,d),e=o.alias;let p=i.db.getBoundarys(e);p.length>0&&p9(t,e,a,p,i),o.alias!=="global"&&vne(t,o,a),r.data.stopy=Math.max(a.data.stopy+Dt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+Dt.c4ShapeMargin,r.data.stopx),Tw=Math.max(Tw,r.data.stopx),Ew=Math.max(Ew,r.data.stopy)}}var dne,bw,eLe,gl,Fh,Ua,pl,gc,ny,h9,f9,ww,kw,une,tLe,rLe,nLe,iLe,aLe,sLe,oLe,lLe,cLe,uLe,hLe,fLe,dLe,pLe,gLe,mLe,vLe,hne,yLe,xLe,fne,bLe,wLe,kLe,TLe,zh,ELe,SLe,CLe,ALe,_Le,l9,d9,pne,LLe,RLe,NLe,ILe,MLe,DLe,OLe,PLe,BLe,FLe,zLe,$Le,Eu,pc,Tw,Ew,gne,c9,Dt,mne,u9,ry,xw,GLe,vne,yne,Ro,lne,ULe,VLe,WLe,cne,HLe,qLe,YLe,bne=F(()=>{yw();xn();or();lr();dne=ga(Q0(),1),bw=function(){var t=v(function(qe,Re,Me,ye){for(Me=Me||{},ye=qe.length;ye--;Me[qe[ye]]=Re);return Me},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],s=[1,63],o=[1,64],l=[1,65],u=[1,66],h=[1,67],f=[1,68],d=[1,69],p=[1,29],g=[1,30],m=[1,31],x=[1,32],y=[1,33],b=[1,34],w=[1,35],_=[1,36],k=[1,37],E=[1,38],L=[1,39],S=[1,40],C=[1,41],M=[1,42],R=[1,43],T=[1,44],I=[1,45],A=[1,46],D=[1,47],N=[1,48],O=[1,50],B=[1,51],P=[1,52],$=[1,53],z=[1,54],H=[1,55],Z=[1,56],X=[1,57],ie=[1,58],K=[1,59],ee=[1,60],J=[14,42],W=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Y=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Q=[1,82],se=[1,83],ue=[1,84],ce=[1,85],te=[12,14,42],Le=[12,14,33,42],oe=[12,14,33,42,76,77,79,80],be=[12,33],Fe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Be={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:v(function(Re,Me,ye,q,de,ae,he){var U=ae.length-1;switch(de){case 3:q.setDirection("TB");break;case 4:q.setDirection("BT");break;case 5:q.setDirection("RL");break;case 6:q.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:q.setC4Type(ae[U-3]);break;case 19:q.setTitle(ae[U].substring(6)),this.$=ae[U].substring(6);break;case 20:q.setAccDescription(ae[U].substring(15)),this.$=ae[U].substring(15);break;case 21:this.$=ae[U].trim(),q.setTitle(this.$);break;case 22:case 23:this.$=ae[U].trim(),q.setAccDescription(this.$);break;case 28:ae[U].splice(2,0,"ENTERPRISE"),q.addPersonOrSystemBoundary(...ae[U]),this.$=ae[U];break;case 29:ae[U].splice(2,0,"SYSTEM"),q.addPersonOrSystemBoundary(...ae[U]),this.$=ae[U];break;case 30:q.addPersonOrSystemBoundary(...ae[U]),this.$=ae[U];break;case 31:ae[U].splice(2,0,"CONTAINER"),q.addContainerBoundary(...ae[U]),this.$=ae[U];break;case 32:q.addDeploymentNode("node",...ae[U]),this.$=ae[U];break;case 33:q.addDeploymentNode("nodeL",...ae[U]),this.$=ae[U];break;case 34:q.addDeploymentNode("nodeR",...ae[U]),this.$=ae[U];break;case 35:q.popBoundaryParseStack();break;case 39:q.addPersonOrSystem("person",...ae[U]),this.$=ae[U];break;case 40:q.addPersonOrSystem("external_person",...ae[U]),this.$=ae[U];break;case 41:q.addPersonOrSystem("system",...ae[U]),this.$=ae[U];break;case 42:q.addPersonOrSystem("system_db",...ae[U]),this.$=ae[U];break;case 43:q.addPersonOrSystem("system_queue",...ae[U]),this.$=ae[U];break;case 44:q.addPersonOrSystem("external_system",...ae[U]),this.$=ae[U];break;case 45:q.addPersonOrSystem("external_system_db",...ae[U]),this.$=ae[U];break;case 46:q.addPersonOrSystem("external_system_queue",...ae[U]),this.$=ae[U];break;case 47:q.addContainer("container",...ae[U]),this.$=ae[U];break;case 48:q.addContainer("container_db",...ae[U]),this.$=ae[U];break;case 49:q.addContainer("container_queue",...ae[U]),this.$=ae[U];break;case 50:q.addContainer("external_container",...ae[U]),this.$=ae[U];break;case 51:q.addContainer("external_container_db",...ae[U]),this.$=ae[U];break;case 52:q.addContainer("external_container_queue",...ae[U]),this.$=ae[U];break;case 53:q.addComponent("component",...ae[U]),this.$=ae[U];break;case 54:q.addComponent("component_db",...ae[U]),this.$=ae[U];break;case 55:q.addComponent("component_queue",...ae[U]),this.$=ae[U];break;case 56:q.addComponent("external_component",...ae[U]),this.$=ae[U];break;case 57:q.addComponent("external_component_db",...ae[U]),this.$=ae[U];break;case 58:q.addComponent("external_component_queue",...ae[U]),this.$=ae[U];break;case 60:q.addRel("rel",...ae[U]),this.$=ae[U];break;case 61:q.addRel("birel",...ae[U]),this.$=ae[U];break;case 62:q.addRel("rel_u",...ae[U]),this.$=ae[U];break;case 63:q.addRel("rel_d",...ae[U]),this.$=ae[U];break;case 64:q.addRel("rel_l",...ae[U]),this.$=ae[U];break;case 65:q.addRel("rel_r",...ae[U]),this.$=ae[U];break;case 66:q.addRel("rel_b",...ae[U]),this.$=ae[U];break;case 67:ae[U].splice(0,1),q.addRel("rel",...ae[U]),this.$=ae[U];break;case 68:q.updateElStyle("update_el_style",...ae[U]),this.$=ae[U];break;case 69:q.updateRelStyle("update_rel_style",...ae[U]),this.$=ae[U];break;case 70:q.updateLayoutConfig("update_layout_config",...ae[U]),this.$=ae[U];break;case 71:this.$=[ae[U]];break;case 72:ae[U].unshift(ae[U-1]),this.$=ae[U];break;case 73:case 75:this.$=ae[U].trim();break;case 74:let ke={};ke[ae[U-1].trim()]=ae[U].trim(),this.$=ke;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:x,48:y,49:b,50:w,51:_,52:k,53:E,54:L,55:S,56:C,57:M,58:R,59:T,60:I,61:A,62:D,63:N,64:O,65:B,66:P,67:$,68:z,69:H,70:Z,71:X,72:ie,73:K,74:ee},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:x,48:y,49:b,50:w,51:_,52:k,53:E,54:L,55:S,56:C,57:M,58:R,59:T,60:I,61:A,62:D,63:N,64:O,65:B,66:P,67:$,68:z,69:H,70:Z,71:X,72:ie,73:K,74:ee},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:x,48:y,49:b,50:w,51:_,52:k,53:E,54:L,55:S,56:C,57:M,58:R,59:T,60:I,61:A,62:D,63:N,64:O,65:B,66:P,67:$,68:z,69:H,70:Z,71:X,72:ie,73:K,74:ee},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:x,48:y,49:b,50:w,51:_,52:k,53:E,54:L,55:S,56:C,57:M,58:R,59:T,60:I,61:A,62:D,63:N,64:O,65:B,66:P,67:$,68:z,69:H,70:Z,71:X,72:ie,73:K,74:ee},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:x,48:y,49:b,50:w,51:_,52:k,53:E,54:L,55:S,56:C,57:M,58:R,59:T,60:I,61:A,62:D,63:N,64:O,65:B,66:P,67:$,68:z,69:H,70:Z,71:X,72:ie,73:K,74:ee},{14:[1,74]},t(J,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:g,46:m,47:x,48:y,49:b,50:w,51:_,52:k,53:E,54:L,55:S,56:C,57:M,58:R,59:T,60:I,61:A,62:D,63:N,64:O,65:B,66:P,67:$,68:z,69:H,70:Z,71:X,72:ie,73:K,74:ee}),t(J,[2,14]),t(W,[2,16],{12:[1,76]}),t(J,[2,36],{12:[1,77]}),t(Y,[2,19]),t(Y,[2,20]),{25:[1,78]},{27:[1,79]},t(Y,[2,23]),{35:80,75:81,76:Q,77:se,79:ue,80:ce},{35:86,75:81,76:Q,77:se,79:ue,80:ce},{35:87,75:81,76:Q,77:se,79:ue,80:ce},{35:88,75:81,76:Q,77:se,79:ue,80:ce},{35:89,75:81,76:Q,77:se,79:ue,80:ce},{35:90,75:81,76:Q,77:se,79:ue,80:ce},{35:91,75:81,76:Q,77:se,79:ue,80:ce},{35:92,75:81,76:Q,77:se,79:ue,80:ce},{35:93,75:81,76:Q,77:se,79:ue,80:ce},{35:94,75:81,76:Q,77:se,79:ue,80:ce},{35:95,75:81,76:Q,77:se,79:ue,80:ce},{35:96,75:81,76:Q,77:se,79:ue,80:ce},{35:97,75:81,76:Q,77:se,79:ue,80:ce},{35:98,75:81,76:Q,77:se,79:ue,80:ce},{35:99,75:81,76:Q,77:se,79:ue,80:ce},{35:100,75:81,76:Q,77:se,79:ue,80:ce},{35:101,75:81,76:Q,77:se,79:ue,80:ce},{35:102,75:81,76:Q,77:se,79:ue,80:ce},{35:103,75:81,76:Q,77:se,79:ue,80:ce},{35:104,75:81,76:Q,77:se,79:ue,80:ce},t(te,[2,59]),{35:105,75:81,76:Q,77:se,79:ue,80:ce},{35:106,75:81,76:Q,77:se,79:ue,80:ce},{35:107,75:81,76:Q,77:se,79:ue,80:ce},{35:108,75:81,76:Q,77:se,79:ue,80:ce},{35:109,75:81,76:Q,77:se,79:ue,80:ce},{35:110,75:81,76:Q,77:se,79:ue,80:ce},{35:111,75:81,76:Q,77:se,79:ue,80:ce},{35:112,75:81,76:Q,77:se,79:ue,80:ce},{35:113,75:81,76:Q,77:se,79:ue,80:ce},{35:114,75:81,76:Q,77:se,79:ue,80:ce},{35:115,75:81,76:Q,77:se,79:ue,80:ce},{20:116,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:g,46:m,47:x,48:y,49:b,50:w,51:_,52:k,53:E,54:L,55:S,56:C,57:M,58:R,59:T,60:I,61:A,62:D,63:N,64:O,65:B,66:P,67:$,68:z,69:H,70:Z,71:X,72:ie,73:K,74:ee},{12:[1,118],33:[1,117]},{35:119,75:81,76:Q,77:se,79:ue,80:ce},{35:120,75:81,76:Q,77:se,79:ue,80:ce},{35:121,75:81,76:Q,77:se,79:ue,80:ce},{35:122,75:81,76:Q,77:se,79:ue,80:ce},{35:123,75:81,76:Q,77:se,79:ue,80:ce},{35:124,75:81,76:Q,77:se,79:ue,80:ce},{35:125,75:81,76:Q,77:se,79:ue,80:ce},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(J,[2,15]),t(W,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(J,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:i,28:a,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:g,46:m,47:x,48:y,49:b,50:w,51:_,52:k,53:E,54:L,55:S,56:C,57:M,58:R,59:T,60:I,61:A,62:D,63:N,64:O,65:B,66:P,67:$,68:z,69:H,70:Z,71:X,72:ie,73:K,74:ee}),t(Y,[2,21]),t(Y,[2,22]),t(te,[2,39]),t(Le,[2,71],{75:81,35:132,76:Q,77:se,79:ue,80:ce}),t(oe,[2,73]),{78:[1,133]},t(oe,[2,75]),t(oe,[2,76]),t(te,[2,40]),t(te,[2,41]),t(te,[2,42]),t(te,[2,43]),t(te,[2,44]),t(te,[2,45]),t(te,[2,46]),t(te,[2,47]),t(te,[2,48]),t(te,[2,49]),t(te,[2,50]),t(te,[2,51]),t(te,[2,52]),t(te,[2,53]),t(te,[2,54]),t(te,[2,55]),t(te,[2,56]),t(te,[2,57]),t(te,[2,58]),t(te,[2,60]),t(te,[2,61]),t(te,[2,62]),t(te,[2,63]),t(te,[2,64]),t(te,[2,65]),t(te,[2,66]),t(te,[2,67]),t(te,[2,68]),t(te,[2,69]),t(te,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(be,[2,28]),t(be,[2,29]),t(be,[2,30]),t(be,[2,31]),t(be,[2,32]),t(be,[2,33]),t(be,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(W,[2,18]),t(J,[2,38]),t(Le,[2,72]),t(oe,[2,74]),t(te,[2,24]),t(te,[2,35]),t(Fe,[2,25]),t(Fe,[2,26],{12:[1,138]}),t(Fe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:v(function(Re,Me){if(Me.recoverable)this.trace(Re);else{var ye=new Error(Re);throw ye.hash=Me,ye}},"parseError"),parse:v(function(Re){var Me=this,ye=[0],q=[],de=[null],ae=[],he=this.table,U="",ke=0,j=0,me=0,Se=2,Pe=1,Ie=ae.slice.call(arguments,1),ge=Object.create(this.lexer),ze={yy:{}};for(var Ae in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ae)&&(ze.yy[Ae]=this.yy[Ae]);ge.setInput(Re,ze.yy),ze.yy.lexer=ge,ze.yy.parser=this,typeof ge.yylloc>"u"&&(ge.yylloc={});var Ye=ge.yylloc;ae.push(Ye);var it=ge.options&&ge.options.ranges;typeof ze.yy.parseError=="function"?this.parseError=ze.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function wt(Rt){ye.length=ye.length-2*Rt,de.length=de.length-Rt,ae.length=ae.length-Rt}v(wt,"popStack");function ft(){var Rt;return Rt=q.pop()||ge.lex()||Pe,typeof Rt!="number"&&(Rt instanceof Array&&(q=Rt,Rt=q.pop()),Rt=Me.symbols_[Rt]||Rt),Rt}v(ft,"lex");for(var He,ut,$e,Ze,at,mt,Ut={},st,Qe,lt,kt;;){if($e=ye[ye.length-1],this.defaultActions[$e]?Ze=this.defaultActions[$e]:((He===null||typeof He>"u")&&(He=ft()),Ze=he[$e]&&he[$e][He]),typeof Ze>"u"||!Ze.length||!Ze[0]){var ht="";kt=[];for(st in he[$e])this.terminals_[st]&&st>Se&&kt.push("\'"+this.terminals_[st]+"\'");ge.showPosition?ht="Parse error on line "+(ke+1)+`:\n`+ge.showPosition()+`\nExpecting `+kt.join(", ")+", got \'"+(this.terminals_[He]||He)+"\'":ht="Parse error on line "+(ke+1)+": Unexpected "+(He==Pe?"end of input":"\'"+(this.terminals_[He]||He)+"\'"),this.parseError(ht,{text:ge.match,token:this.terminals_[He]||He,line:ge.yylineno,loc:Ye,expected:kt})}if(Ze[0]instanceof Array&&Ze.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$e+", token: "+He);switch(Ze[0]){case 1:ye.push(He),de.push(ge.yytext),ae.push(ge.yylloc),ye.push(Ze[1]),He=null,ut?(He=ut,ut=null):(j=ge.yyleng,U=ge.yytext,ke=ge.yylineno,Ye=ge.yylloc,me>0&&me--);break;case 2:if(Qe=this.productions_[Ze[1]][1],Ut.$=de[de.length-Qe],Ut._$={first_line:ae[ae.length-(Qe||1)].first_line,last_line:ae[ae.length-1].last_line,first_column:ae[ae.length-(Qe||1)].first_column,last_column:ae[ae.length-1].last_column},it&&(Ut._$.range=[ae[ae.length-(Qe||1)].range[0],ae[ae.length-1].range[1]]),mt=this.performAction.apply(Ut,[U,j,ke,ze.yy,Ze[1],de,ae].concat(Ie)),typeof mt<"u")return mt;Qe&&(ye=ye.slice(0,-1*Qe*2),de=de.slice(0,-1*Qe),ae=ae.slice(0,-1*Qe)),ye.push(this.productions_[Ze[1]][0]),de.push(Ut.$),ae.push(Ut._$),lt=he[ye[ye.length-2]][ye[ye.length-1]],ye.push(lt);break;case 3:return!0}}return!0},"parse")},Ve=function(){var qe={EOF:1,parseError:v(function(Me,ye){if(this.yy.parser)this.yy.parser.parseError(Me,ye);else throw new Error(Me)},"parseError"),setInput:v(function(Re,Me){return this.yy=Me||this.yy||{},this._input=Re,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var Re=this._input[0];this.yytext+=Re,this.yyleng++,this.offset++,this.match+=Re,this.matched+=Re;var Me=Re.match(/(?:\\r\\n?|\\n).*/g);return Me?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Re},"input"),unput:v(function(Re){var Me=Re.length,ye=Re.split(/(?:\\r\\n?|\\n)/g);this._input=Re+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Me),this.offset-=Me;var q=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ye.length-1&&(this.yylineno-=ye.length-1);var de=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ye?(ye.length===q.length?this.yylloc.first_column:0)+q[q.length-ye.length].length-ye[0].length:this.yylloc.first_column-Me},this.options.ranges&&(this.yylloc.range=[de[0],de[0]+this.yyleng-Me]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(Re){this.unput(this.match.slice(Re))},"less"),pastInput:v(function(){var Re=this.matched.substr(0,this.matched.length-this.match.length);return(Re.length>20?"...":"")+Re.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var Re=this.match;return Re.length<20&&(Re+=this._input.substr(0,20-Re.length)),(Re.substr(0,20)+(Re.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var Re=this.pastInput(),Me=new Array(Re.length+1).join("-");return Re+this.upcomingInput()+`\n`+Me+"^"},"showPosition"),test_match:v(function(Re,Me){var ye,q,de;if(this.options.backtrack_lexer&&(de={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(de.yylloc.range=this.yylloc.range.slice(0))),q=Re[0].match(/(?:\\r\\n?|\\n).*/g),q&&(this.yylineno+=q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:q?q[q.length-1].length-q[q.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+Re[0].length},this.yytext+=Re[0],this.match+=Re[0],this.matches=Re,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Re[0].length),this.matched+=Re[0],ye=this.performAction.call(this,this.yy,this,Me,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ye)return ye;if(this._backtrack){for(var ae in de)this[ae]=de[ae];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Re,Me,ye,q;this._more||(this.yytext="",this.match="");for(var de=this._currentRules(),ae=0;ae<de.length;ae++)if(ye=this._input.match(this.rules[de[ae]]),ye&&(!Me||ye[0].length>Me[0].length)){if(Me=ye,q=ae,this.options.backtrack_lexer){if(Re=this.test_match(ye,de[ae]),Re!==!1)return Re;if(this._backtrack){Me=!1;continue}else return!1}else if(!this.options.flex)break}return Me?(Re=this.test_match(Me,de[q]),Re!==!1?Re:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var Me=this.next();return Me||this.lex()},"lex"),begin:v(function(Me){this.conditionStack.push(Me)},"begin"),popState:v(function(){var Me=this.conditionStack.length-1;return Me>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(Me){return Me=this.conditionStack.length-1-Math.abs(Me||0),Me>=0?this.conditionStack[Me]:"INITIAL"},"topState"),pushState:v(function(Me){this.begin(Me)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:v(function(Me,ye,q,de){var ae=de;switch(q){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:title\\s[^#\\n;]+)/,/^(?:accDescription\\s[^#\\n;]+)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/,/^(?:%%[^\\n]*(\\r?\\n)*)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:C4Context\\b)/,/^(?:C4Container\\b)/,/^(?:C4Component\\b)/,/^(?:C4Dynamic\\b)/,/^(?:C4Deployment\\b)/,/^(?:Person_Ext\\b)/,/^(?:Person\\b)/,/^(?:SystemQueue_Ext\\b)/,/^(?:SystemDb_Ext\\b)/,/^(?:System_Ext\\b)/,/^(?:SystemQueue\\b)/,/^(?:SystemDb\\b)/,/^(?:System\\b)/,/^(?:Boundary\\b)/,/^(?:Enterprise_Boundary\\b)/,/^(?:System_Boundary\\b)/,/^(?:ContainerQueue_Ext\\b)/,/^(?:ContainerDb_Ext\\b)/,/^(?:Container_Ext\\b)/,/^(?:ContainerQueue\\b)/,/^(?:ContainerDb\\b)/,/^(?:Container\\b)/,/^(?:Container_Boundary\\b)/,/^(?:ComponentQueue_Ext\\b)/,/^(?:ComponentDb_Ext\\b)/,/^(?:Component_Ext\\b)/,/^(?:ComponentQueue\\b)/,/^(?:ComponentDb\\b)/,/^(?:Component\\b)/,/^(?:Deployment_Node\\b)/,/^(?:Node\\b)/,/^(?:Node_L\\b)/,/^(?:Node_R\\b)/,/^(?:Rel\\b)/,/^(?:BiRel\\b)/,/^(?:Rel_Up\\b)/,/^(?:Rel_U\\b)/,/^(?:Rel_Down\\b)/,/^(?:Rel_D\\b)/,/^(?:Rel_Left\\b)/,/^(?:Rel_L\\b)/,/^(?:Rel_Right\\b)/,/^(?:Rel_R\\b)/,/^(?:Rel_Back\\b)/,/^(?:RelIndex\\b)/,/^(?:UpdateElementStyle\\b)/,/^(?:UpdateRelStyle\\b)/,/^(?:UpdateLayoutConfig\\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\\{)/,/^(?:\\})/,/^(?:[\\s]+)/,/^(?:[\\n\\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return qe}();Be.lexer=Ve;function We(){this.yy={}}return v(We,"Parser"),We.prototype=Be,Be.Parser=We,new We}();bw.parser=bw;eLe=bw,gl=[],Fh=[""],Ua="global",pl="",gc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],ny=[],h9="",f9=!1,ww=4,kw=2,tLe=v(function(){return une},"getC4Type"),rLe=v(function(t){une=yr(t,pe())},"setC4Type"),nLe=v(function(t,e,r,n,i,a,s,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let u={},h=ny.find(f=>f.from===e&&f.to===r);if(h?u=h:ny.push(u),u.type=t,u.from=e,u.to=r,u.label={text:n},i==null)u.techn={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.techn={text:i};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]={text:d}}else u.descr={text:a};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.sprite=s;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=zh()},"addRel"),iLe=v(function(t,e,r,n,i,a,s){if(e===null||r===null)return;let o={},l=gl.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,gl.push(o)),r==null?o.label={text:""}:o.label={text:r},n==null)o.descr={text:""};else if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]={text:h}}else o.descr={text:n};if(typeof i=="object"){let[u,h]=Object.entries(i)[0];o[u]=h}else o.sprite=i;if(typeof a=="object"){let[u,h]=Object.entries(a)[0];o[u]=h}else o.tags=a;if(typeof s=="object"){let[u,h]=Object.entries(s)[0];o[u]=h}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=Ua,o.wrap=zh()},"addPersonOrSystem"),aLe=v(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=gl.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,gl.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.sprite=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=zh(),l.typeC4Shape={text:t},l.parentBoundary=Ua},"addContainer"),sLe=v(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=gl.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,gl.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.sprite=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=zh(),l.typeC4Shape={text:t},l.parentBoundary=Ua},"addComponent"),oLe=v(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=gc.find(o=>o.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,gc.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.link=i;a.parentBoundary=Ua,a.wrap=zh(),pl=Ua,Ua=t,Fh.push(pl)},"addPersonOrSystemBoundary"),lLe=v(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=gc.find(o=>o.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,gc.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.link=i;a.parentBoundary=Ua,a.wrap=zh(),pl=Ua,Ua=t,Fh.push(pl)},"addContainerBoundary"),cLe=v(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=gc.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,gc.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.type={text:"node"};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.type={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.nodeType=t,l.parentBoundary=Ua,l.wrap=zh(),pl=Ua,Ua=e,Fh.push(pl)},"addDeploymentNode"),uLe=v(function(){Ua=pl,Fh.pop(),pl=Fh.pop(),Fh.push(pl)},"popBoundaryParseStack"),hLe=v(function(t,e,r,n,i,a,s,o,l,u,h){let f=gl.find(d=>d.alias===e);if(!(f===void 0&&(f=gc.find(d=>d.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[d,p]=Object.entries(r)[0];f[d]=p}else f.bgColor=r;if(n!=null)if(typeof n=="object"){let[d,p]=Object.entries(n)[0];f[d]=p}else f.fontColor=n;if(i!=null)if(typeof i=="object"){let[d,p]=Object.entries(i)[0];f[d]=p}else f.borderColor=i;if(a!=null)if(typeof a=="object"){let[d,p]=Object.entries(a)[0];f[d]=p}else f.shadowing=a;if(s!=null)if(typeof s=="object"){let[d,p]=Object.entries(s)[0];f[d]=p}else f.shape=s;if(o!=null)if(typeof o=="object"){let[d,p]=Object.entries(o)[0];f[d]=p}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[d,p]=Object.entries(l)[0];f[d]=p}else f.techn=l;if(u!=null)if(typeof u=="object"){let[d,p]=Object.entries(u)[0];f[d]=p}else f.legendText=u;if(h!=null)if(typeof h=="object"){let[d,p]=Object.entries(h)[0];f[d]=p}else f.legendSprite=h}},"updateElStyle"),fLe=v(function(t,e,r,n,i,a,s){let o=ny.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.textColor=n;if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.lineColor=i;if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(s)}},"updateRelStyle"),dLe=v(function(t,e,r){let n=ww,i=kw;if(typeof e=="object"){let a=Object.values(e)[0];n=parseInt(a)}else n=parseInt(e);if(typeof r=="object"){let a=Object.values(r)[0];i=parseInt(a)}else i=parseInt(r);n>=1&&(ww=n),i>=1&&(kw=i)},"updateLayoutConfig"),pLe=v(function(){return ww},"getC4ShapeInRow"),gLe=v(function(){return kw},"getC4BoundaryInRow"),mLe=v(function(){return Ua},"getCurrentBoundaryParse"),vLe=v(function(){return pl},"getParentBoundaryParse"),hne=v(function(t){return t==null?gl:gl.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),yLe=v(function(t){return gl.find(e=>e.alias===t)},"getC4Shape"),xLe=v(function(t){return Object.keys(hne(t))},"getC4ShapeKeys"),fne=v(function(t){return t==null?gc:gc.filter(e=>e.parentBoundary===t)},"getBoundaries"),bLe=fne,wLe=v(function(){return ny},"getRels"),kLe=v(function(){return h9},"getTitle"),TLe=v(function(t){f9=t},"setWrap"),zh=v(function(){return f9},"autoWrap"),ELe=v(function(){gl=[],gc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],pl="",Ua="global",Fh=[""],ny=[],Fh=[""],h9="",f9=!1,ww=4,kw=2},"clear"),SLe={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},CLe={FILLED:0,OPEN:1},ALe={LEFTOF:0,RIGHTOF:1,OVER:2},_Le=v(function(t){h9=yr(t,pe())},"setTitle"),l9={addPersonOrSystem:iLe,addPersonOrSystemBoundary:oLe,addContainer:aLe,addContainerBoundary:lLe,addComponent:sLe,addDeploymentNode:cLe,popBoundaryParseStack:uLe,addRel:nLe,updateElStyle:hLe,updateRelStyle:fLe,updateLayoutConfig:dLe,autoWrap:zh,setWrap:TLe,getC4ShapeArray:hne,getC4Shape:yLe,getC4ShapeKeys:xLe,getBoundaries:fne,getBoundarys:bLe,getCurrentBoundaryParse:mLe,getParentBoundaryParse:vLe,getRels:wLe,getTitle:kLe,getC4Type:tLe,getC4ShapeInRow:pLe,getC4BoundaryInRow:gLe,setAccTitle:Tr,getAccTitle:Ar,getAccDescription:Lr,setAccDescription:_r,getConfig:v(()=>pe().c4,"getConfig"),clear:ELe,LINETYPE:SLe,ARROWTYPE:CLe,PLACEMENT:ALe,setTitle:_Le,setC4Type:rLe},d9=v(function(t,e){return Ed(t,e)},"drawRect"),pne=v(function(t,e,r,n,i,a){let s=t.append("image");s.attr("width",e),s.attr("height",r),s.attr("x",n),s.attr("y",i);let o=a.startsWith("data:image/png;base64")?a:(0,dne.sanitizeUrl)(a);s.attr("xlink:href",o)},"drawImage"),LLe=v((t,e,r)=>{let n=t.append("g"),i=0;for(let a of e){let s=a.textColor?a.textColor:"#444444",o=a.lineColor?a.lineColor:"#444444",l=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,h="";if(i===0){let d=n.append("line");d.attr("x1",a.startPoint.x),d.attr("y1",a.startPoint.y),d.attr("x2",a.endPoint.x),d.attr("y2",a.endPoint.y),d.attr("stroke-width","1"),d.attr("stroke",o),d.style("fill","none"),a.type!=="rel_b"&&d.attr("marker-end","url("+h+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&d.attr("marker-start","url("+h+"#arrowend)"),i=-1}else{let d=n.append("path");d.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&d.attr("marker-end","url("+h+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&d.attr("marker-start","url("+h+"#arrowend)")}let f=r.messageFont();Eu(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+l,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:s},f),a.techn&&a.techn.text!==""&&(f=r.messageFont(),Eu(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+l,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:s,"font-style":"italic"},f))}},"drawRels"),RLe=v(function(t,e,r){let n=t.append("g"),i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};d9(n,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,Eu(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},u),e.type&&e.type.text!==""&&(u=r.boundaryFont(),u.fontColor=s,Eu(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},u)),e.descr&&e.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=s,Eu(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},u))},"drawBoundary"),NLe=v(function(t,e,r){let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let o=t.append("g");o.attr("class","person-man");let l=dc();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=n,l.width=e.width,l.height=e.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},d9(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=$Le(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":pne(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s);break}let h=r[e.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,Eu(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},h),h=r[e.typeC4Shape.text+"Font"](),h.fontColor=a,e.techn&&e.techn?.text!==""?Eu(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},h):e.type&&e.type.text!==""&&Eu(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},h),e.descr&&e.descr.text!==""&&(h=r.personFont(),h.fontColor=a,Eu(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},h)),e.height},"drawC4Shape"),ILe=v(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),MLe=v(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),DLe=v(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),OLe=v(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),PLe=v(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),BLe=v(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),FLe=v(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),zLe=v(function(t){let r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),$Le=v((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),Eu=function(){function t(i,a,s,o,l,u,h){let f=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(i);n(f,h)}v(t,"byText");function e(i,a,s,o,l,u,h,f){let{fontSize:d,fontFamily:p,fontWeight:g}=f,m=i.split(je.lineBreakRegex);for(let x=0;x<m.length;x++){let y=x*d-d*(m.length-1)/2,b=a.append("text").attr("x",s+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",d).style("font-weight",g).style("font-family",p);b.append("tspan").attr("dy",y).text(m[x]).attr("alignment-baseline","mathematical"),n(b,h)}}v(e,"byTspan");function r(i,a,s,o,l,u,h,f){let d=a.append("switch"),g=d.append("foreignObject").attr("x",s).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,d,s,o,l,u,h,f),n(g,h)}v(r,"byFo");function n(i,a){for(let s in a)a.hasOwnProperty(s)&&i.attr(s,a[s])}return v(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),pc={drawRect:d9,drawBoundary:RLe,drawC4Shape:NLe,drawRels:LLe,drawImage:pne,insertArrowHead:OLe,insertArrowEnd:PLe,insertArrowFilledHead:BLe,insertDynamicNumber:FLe,insertArrowCrossHead:zLe,insertDatabaseIcon:ILe,insertComputerIcon:MLe,insertClockIcon:DLe},Tw=0,Ew=0,gne=4,c9=2;bw.yy=l9;Dt={},mne=class{static{v(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,u9(t.db.getConfig())}setData(t,e,r,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=n}updateVal(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+t.margin*2,r=e+t.width,n=this.nextData.starty+t.margin*2,i=n+t.height;(e>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>gne)&&(e=this.nextData.startx+t.margin+Dt.nextLinePaddingX,n=this.nextData.stopy+t.margin*2,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},u9(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},u9=v(function(t){Wn(Dt,t),t.fontFamily&&(Dt.personFontFamily=Dt.systemFontFamily=Dt.messageFontFamily=t.fontFamily),t.fontSize&&(Dt.personFontSize=Dt.systemFontSize=Dt.messageFontSize=t.fontSize),t.fontWeight&&(Dt.personFontWeight=Dt.systemFontWeight=Dt.messageFontWeight=t.fontWeight)},"setConf"),ry=v((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),xw=v(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),GLe=v(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");v(No,"calcC4ShapeTextWH");vne=v(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Dt.c4ShapeMargin-35;let n=e.wrap&&Dt.wrap,i=xw(Dt);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=us(e.label.text,i);No("label",e,n,i,a),pc.drawBoundary(t,e,Dt)},"drawBoundary"),yne=v(function(t,e,r,n){let i=0;for(let a of n){i=0;let s=r[a],o=ry(Dt,s.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,s.typeC4Shape.width=us("\\xAB"+s.typeC4Shape.text+"\\xBB",o),s.typeC4Shape.height=o.fontSize+2,s.typeC4Shape.Y=Dt.c4ShapePadding,i=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height);let l=s.wrap&&Dt.wrap,u=Dt.width-Dt.c4ShapePadding*2,h=ry(Dt,s.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",No("label",s,l,h,u),s.label.Y=i+8,i=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let p=ry(Dt,s.typeC4Shape.text);No("type",s,l,p,u),s.type.Y=i+5,i=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let p=ry(Dt,s.techn.text);No("techn",s,l,p,u),s.techn.Y=i+5,i=s.techn.Y+s.techn.height}let f=i,d=s.label.width;if(s.descr&&s.descr.text!==""){let p=ry(Dt,s.typeC4Shape.text);No("descr",s,l,p,u),s.descr.Y=i+20,i=s.descr.Y+s.descr.height,d=Math.max(s.label.width,s.descr.width),f=i-s.descr.textLines*5}d=d+Dt.c4ShapePadding,s.width=Math.max(s.width||Dt.width,d,Dt.width),s.height=Math.max(s.height||Dt.height,f,Dt.height),s.margin=s.margin||Dt.c4ShapeMargin,t.insert(s),pc.drawC4Shape(e,s,Dt)}t.bumpLastMargin(Dt.c4ShapeMargin)},"drawC4ShapeArray"),Ro=class{static{v(this,"Point")}constructor(t,e){this.x=t,this.y=e}},lne=v(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,o=n+t.height/2,l=Math.abs(r-i),u=Math.abs(n-a),h=u/l,f=t.height/t.width,d=null;return n==a&&r<i?d=new Ro(r+t.width,o):n==a&&r>i?d=new Ro(r,o):r==i&&n<a?d=new Ro(s,n+t.height):r==i&&n>a&&(d=new Ro(s,n)),r>i&&n<a?f>=h?d=new Ro(r,o+h*t.width/2):d=new Ro(s-l/u*t.height/2,n+t.height):r<i&&n<a?f>=h?d=new Ro(r+t.width,o+h*t.width/2):d=new Ro(s+l/u*t.height/2,n+t.height):r<i&&n>a?f>=h?d=new Ro(r+t.width,o-h*t.width/2):d=new Ro(s+t.height/2*l/u,n):r>i&&n>a&&(f>=h?d=new Ro(r,o-t.width/2*h):d=new Ro(s-t.height/2*l/u,n)),d},"getIntersectPoint"),ULe=v(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=lne(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=lne(e,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),VLe=v(function(t,e,r,n){let i=0;for(let a of e){i=i+1;let s=a.wrap&&Dt.wrap,o=GLe(Dt);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let u=us(a.label.text,o);No("label",a,s,o,u),a.techn&&a.techn.text!==""&&(u=us(a.techn.text,o),No("techn",a,s,o,u)),a.descr&&a.descr.text!==""&&(u=us(a.descr.text,o),No("descr",a,s,o,u));let h=r(a.from),f=r(a.to),d=ULe(h,f);a.startPoint=d.startPoint,a.endPoint=d.endPoint}pc.drawRels(t,e,Dt)},"drawRels");v(p9,"drawInsideBoundary");WLe=v(function(t,e,r,n){Dt=pe().c4;let i=pe().securityLevel,a;i==="sandbox"&&(a=Ge("#i"+e));let s=i==="sandbox"?Ge(a.nodes()[0].contentDocument.body):Ge("body"),o=n.db;n.db.setWrap(Dt.wrap),gne=o.getC4ShapeInRow(),c9=o.getC4BoundaryInRow(),re.debug(`C:${JSON.stringify(Dt,null,2)}`);let l=i==="sandbox"?s.select(`[id="${e}"]`):Ge(`[id="${e}"]`);pc.insertComputerIcon(l),pc.insertDatabaseIcon(l),pc.insertClockIcon(l);let u=new mne(n);u.setData(Dt.diagramMarginX,Dt.diagramMarginX,Dt.diagramMarginY,Dt.diagramMarginY),u.data.widthLimit=screen.availWidth,Tw=Dt.diagramMarginX,Ew=Dt.diagramMarginY;let h=n.db.getTitle(),f=n.db.getBoundarys("");p9(l,"",u,f,n),pc.insertArrowHead(l),pc.insertArrowEnd(l),pc.insertArrowCrossHead(l),pc.insertArrowFilledHead(l),VLe(l,n.db.getRels(),n.db.getC4Shape,n),u.data.stopx=Tw,u.data.stopy=Ew;let d=u.data,g=d.stopy-d.starty+2*Dt.diagramMarginY,x=d.stopx-d.startx+2*Dt.diagramMarginX;h&&l.append("text").text(h).attr("x",(d.stopx-d.startx)/2-4*Dt.diagramMarginX).attr("y",d.starty+Dt.diagramMarginY),Wr(l,g,x,Dt.useMaxWidth);let y=h?60:0;l.attr("viewBox",d.startx-Dt.diagramMarginX+" -"+(Dt.diagramMarginY+y)+" "+x+" "+(g+y)),re.debug("models:",d)},"draw"),cne={drawPersonOrSystemArray:yne,drawBoundary:vne,setConf:u9,draw:WLe},HLe=v(t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,"getStyles"),qLe=HLe,YLe={parser:eLe,db:l9,renderer:cne,styles:qLe,init:v(({c4:t,wrap:e})=>{cne.setConf(t),l9.setWrap(e)},"init")}});var pg,gg,XLe,jLe,$h=F(()=>{or();lr();pg=v((t,e)=>{let r;return e==="sandbox"&&(r=Ge("#i"+t)),(e==="sandbox"?Ge(r.nodes()[0].contentDocument.body):Ge("body")).select(`[id="${t}"]`)},"getDiagramElement"),gg=v((t,e,r,n)=>{t.attr("class",r);let{width:i,height:a,x:s,y:o}=XLe(t,e);Wr(t,a,i,n);let l=jLe(s,o,i,a,e);t.attr("viewBox",l),re.debug(`viewBox configured: ${l} with padding: ${e}`)},"setupViewPortForSVG"),XLe=v((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+e*2,height:r.height+e*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),jLe=v((t,e,r,n,i)=>`${t-i} ${e-i} ${r} ${n}`,"createViewBox")});var Nw={};mr(Nw,{diagram:()=>ORe});function Cw(t){let e=[];for(let r of t){let n=ay.get(r);n?.styles&&(e=[...e,...n.styles??[]].map(i=>i.trim())),n?.textStyles&&(e=[...e,...n.textStyles??[]].map(i=>i.trim()))}return e}var KLe,wne,mg,Gh,ys,ay,Su,y9,x9,Sw,m9,Io,Aw,_w,Lw,Rw,ZLe,QLe,JLe,eRe,tRe,rRe,nRe,b9,iRe,aRe,sRe,kne,oRe,lRe,Tne,Ene,Sne,cRe,Cne,uRe,hRe,fRe,dRe,pRe,iy,Ane,_ne,gRe,mRe,Lne,vRe,yRe,xRe,bRe,wRe,Rne,Nne,kRe,TRe,ERe,SRe,CRe,ARe,g9,_Re,LRe,RRe,v9,NRe,IRe,MRe,DRe,ORe,Iw=F(()=>{$h();Wb();wu();yu();fl();el();ic();fo();za();xn();or();lr();lr();so();KLe="flowchart-",wne=0,mg=pe(),Gh=new Map,ys=[],ay=new Map,Su=[],y9=new Map,x9=new Map,Sw=0,m9=!0,_w=[],Lw=v(t=>je.sanitizeText(t,mg),"sanitizeText"),Rw=v(function(t){for(let e of Gh.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),ZLe=v(function(t,e,r,n,i,a,s={},o){if(!t||t.trim().length===0)return;let l,u=Gh.get(t);if(u===void 0&&(u={id:t,labelType:"text",domId:KLe+t+"-"+wne,styles:[],classes:[]},Gh.set(t,u)),wne++,e!==void 0?(mg=pe(),l=Lw(e.text.trim()),u.labelType=e.type,l.startsWith(\'"\')&&l.endsWith(\'"\')&&(l=l.substring(1,l.length-1)),u.text=l):u.text===void 0&&(u.text=t),r!==void 0&&(u.type=r),n?.forEach(function(h){u.styles.push(h)}),i?.forEach(function(h){u.classes.push(h)}),a!==void 0&&(u.dir=a),u.props===void 0?u.props=s:s!==void 0&&Object.assign(u.props,s),o!==void 0){let h;o.includes(`\n`)?h=o+`\n`:h=`{\n`+o+`\n}`;let f=Y0(h,{schema:q0});if(f.shape){if(f.shape!==f.shape.toLowerCase()||f.shape.includes("_"))throw new Error(`No such shape: ${f.shape}. Shape names should be lowercase.`);if(!GA(f.shape))throw new Error(`No such shape: ${f.shape}.`);u.type=f?.shape}f?.label&&(u.text=f?.label),f?.icon&&(u.icon=f?.icon,!f.label?.trim()&&u.text===t&&(u.text="")),f?.form&&(u.form=f?.form),f?.pos&&(u.pos=f?.pos),f?.img&&(u.img=f?.img,!f.label?.trim()&&u.text===t&&(u.text="")),f?.constraint&&(u.constraint=f.constraint),f.w&&(u.assetWidth=Number(f.w)),f.h&&(u.assetHeight=Number(f.h))}},"addVertex"),QLe=v(function(t,e,r){let a={start:t,end:e,type:void 0,text:"",labelType:"text"};re.info("abc78 Got edge...",a);let s=r.text;if(s!==void 0&&(a.text=Lw(s.text.trim()),a.text.startsWith(\'"\')&&a.text.endsWith(\'"\')&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=s.type),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),ys.length<(mg.maxEdges??500))re.info("Pushing edge..."),ys.push(a);else throw new Error(`Edge limit exceeded. ${ys.length} edges found, but the limit is ${mg.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`)},"addSingleLink"),JLe=v(function(t,e,r){re.info("addLink",t,e,r);for(let n of t)for(let i of e)QLe(n,i,r)},"addLink"),eRe=v(function(t,e){t.forEach(function(r){r==="default"?ys.defaultInterpolate=e:ys[r].interpolate=e})},"updateLinkInterpolate"),tRe=v(function(t,e){t.forEach(function(r){if(typeof r=="number"&&r>=ys.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${ys.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);r==="default"?ys.defaultStyle=e:(ys[r].style=e,(ys[r]?.style?.length??0)>0&&!ys[r]?.style?.some(n=>n?.startsWith("fill"))&&ys[r]?.style?.push("fill:none"))})},"updateLink"),rRe=v(function(t,e){t.split(",").forEach(function(r){let n=ay.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},ay.set(r,n)),e?.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)})})},"addClass"),nRe=v(function(t){Io=t,/.*</.exec(Io)&&(Io="RL"),/.*\\^/.exec(Io)&&(Io="BT"),/.*>/.exec(Io)&&(Io="LR"),/.*v/.exec(Io)&&(Io="TB"),Io==="TD"&&(Io="TB")},"setDirection"),b9=v(function(t,e){for(let r of t.split(",")){let n=Gh.get(r);n&&n.classes.push(e);let i=y9.get(r);i&&i.classes.push(e)}},"setClass"),iRe=v(function(t,e){if(e!==void 0){e=Lw(e);for(let r of t.split(","))x9.set(Aw==="gen-1"?Rw(r):r,e)}},"setTooltip"),aRe=v(function(t,e,r){let n=Rw(t);if(pe().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<i.length;s++){let o=i[s].trim();o.startsWith(\'"\')&&o.endsWith(\'"\')&&(o=o.substr(1,o.length-2)),i[s]=o}}i.length===0&&i.push(t);let a=Gh.get(t);a&&(a.haveCallback=!0,_w.push(function(){let s=document.querySelector(`[id="${n}"]`);s!==null&&s.addEventListener("click",function(){Wt.runFunc(e,...i)},!1)}))},"setClickFun"),sRe=v(function(t,e,r){t.split(",").forEach(function(n){let i=Gh.get(n);i!==void 0&&(i.link=Wt.formatUrl(e,mg),i.linkTarget=r)}),b9(t,"clickable")},"setLink"),kne=v(function(t){return x9.get(t)},"getTooltip"),oRe=v(function(t,e,r){t.split(",").forEach(function(n){aRe(n,e,r)}),b9(t,"clickable")},"setClickEvent"),lRe=v(function(t){_w.forEach(function(e){e(t)})},"bindFunctions"),Tne=v(function(){return Io.trim()},"getDirection"),Ene=v(function(){return Gh},"getVertices"),Sne=v(function(){return ys},"getEdges"),cRe=v(function(){return ay},"getClasses"),Cne=v(function(t){let e=Ge(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=Ge("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Ge(t).select("svg").selectAll("g.node").on("mouseover",function(){let i=Ge(this);if(i.attr("title")===null)return;let s=this?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(i.attr("title")).style("left",window.scrollX+s.left+(s.right-s.left)/2+"px").style("top",window.scrollY+s.bottom+"px"),e.html(e.html().replace(/<br\\/>/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),Ge(this).classed("hover",!1)})},"setupToolTips");_w.push(Cne);uRe=v(function(t="gen-1"){Gh=new Map,ay=new Map,ys=[],_w=[Cne],Su=[],y9=new Map,Sw=0,x9=new Map,m9=!0,Aw=t,mg=pe(),xr()},"clear"),hRe=v(t=>{Aw=t||"gen-2"},"setGen"),fRe=v(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),dRe=v(function(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\\s/.exec(r.text)&&(n=void 0);function a(u){let h={boolean:{},number:{},string:{}},f=[],d;return{nodeList:u.filter(function(g){let m=typeof g;return g.stmt&&g.stmt==="dir"?(d=g.value,!1):g.trim()===""?!1:m in h?h[m].hasOwnProperty(g)?!1:h[m][g]=!0:f.includes(g)?!1:f.push(g)}),dir:d}}v(a,"uniq");let{nodeList:s,dir:o}=a(e.flat());if(Aw==="gen-1")for(let u=0;u<s.length;u++)s[u]=Rw(s[u]);n=n??"subGraph"+Sw,i=i||"",i=Lw(i),Sw=Sw+1;let l={id:n,nodes:s,title:i.trim(),classes:[],dir:o,labelType:r.type};return re.info("Adding",l.id,l.nodes,l.dir),l.nodes=Nne(l,Su).nodes,Su.push(l),y9.set(n,l),n},"addSubGraph"),pRe=v(function(t){for(let[e,r]of Su.entries())if(r.id===t)return e;return-1},"getPosForId"),iy=-1,Ane=[],_ne=v(function(t,e){let r=Su[e].nodes;if(iy=iy+1,iy>2e3)return{result:!1,count:0};if(Ane[iy]=e,Su[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n<r.length;){let a=pRe(r[n]);if(a>=0){let s=_ne(t,a);if(s.result)return{result:!0,count:i+s.count};i=i+s.count}n=n+1}return{result:!1,count:i}},"indexNodes2"),gRe=v(function(t){return Ane[t]},"getDepthFirstPos"),mRe=v(function(){iy=-1,Su.length>0&&_ne("none",Su.length-1)},"indexNodes"),Lne=v(function(){return Su},"getSubGraphs"),vRe=v(()=>m9?(m9=!1,!0):!1,"firstGraph"),yRe=v(t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}},"destructStartLink"),xRe=v((t,e)=>{let r=e.length,n=0;for(let i=0;i<r;++i)e[i]===t&&++n;return n},"countChar"),bRe=v(t=>{let e=t.trim(),r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1));break}let i="normal",a=r.length-1;r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible");let s=xRe(".",r);return s&&(i="dotted",a=s),{type:n,stroke:i,length:a}},"destructEndLink"),wRe=v((t,e)=>{let r=bRe(t),n;if(e){if(n=yRe(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=r.length,n}return r},"destructLink"),Rne=v((t,e)=>{for(let r of t)if(r.nodes.includes(e))return!0;return!1},"exists"),Nne=v((t,e)=>{let r=[];return t.nodes.forEach((n,i)=>{Rne(e,n)||r.push(t.nodes[i])}),{nodes:r}},"makeUniq"),kRe={firstGraph:vRe},TRe=v(t=>{if(t.img)return"imageSquare";if(t.icon)return t.form==="circle"?"iconCircle":t.form==="square"?"iconSquare":t.form==="rounded"?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}},"getTypeFromVertex"),ERe=v((t,e)=>t.find(r=>r.id===e),"findNode"),SRe=v(t=>{let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e;break}return{arrowTypeStart:e,arrowTypeEnd:r}},"destructEdgeType"),CRe=v((t,e,r,n,i,a)=>{let s=r.get(t.id),o=n.get(t.id)??!1,l=ERe(e,t.id);if(l)l.cssStyles=t.styles,l.cssCompiledStyles=Cw(t.classes),l.cssClasses=t.classes.join(" ");else{let u={id:t.id,label:t.text,labelStyle:"",parentId:s,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:Cw(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:kne(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};o?e.push({...u,isGroup:!0,shape:"rect"}):e.push({...u,isGroup:!1,shape:TRe(t)})}},"addNodeFromVertex");v(Cw,"getCompiledStyles");ARe=v(()=>{let t=pe(),e=[],r=[],n=Lne(),i=new Map,a=new Map;for(let l=n.length-1;l>=0;l--){let u=n[l];u.nodes.length>0&&a.set(u.id,!0);for(let h of u.nodes)i.set(h,u.id)}for(let l=n.length-1;l>=0;l--){let u=n[l];e.push({id:u.id,label:u.title,labelStyle:"",parentId:i.get(u.id),padding:8,cssCompiledStyles:Cw(u.classes),cssClasses:u.classes.join(" "),shape:"rect",dir:u.dir,isGroup:!0,look:t.look})}Ene().forEach(l=>{CRe(l,e,i,a,t,t.look||"classic")});let o=Sne();return o.forEach((l,u)=>{let{arrowTypeStart:h,arrowTypeEnd:f}=SRe(l.type),d=[...o.defaultStyle??[]];l.style&&d.push(...l.style);let p={id:N3(l.start,l.end,{counter:u,prefix:"L"}),start:l.start,end:l.end,type:l.type??"normal",label:l.text,labelpos:"c",thickness:l.stroke,minlen:l.length,classes:l?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:l?.stroke==="invisible"?"none":h,arrowTypeEnd:l?.stroke==="invisible"?"none":f,arrowheadStyle:"fill: #333",labelStyle:d,style:d,pattern:l.stroke,look:t.look};r.push(p)}),{nodes:e,edges:r,other:{},config:t}},"getData"),g9={defaultConfig:v(()=>Nb.flowchart,"defaultConfig"),setAccTitle:Tr,getAccTitle:Ar,getAccDescription:Lr,getData:ARe,setAccDescription:_r,addVertex:ZLe,lookUpDomId:Rw,addLink:JLe,updateLinkInterpolate:eRe,updateLink:tRe,addClass:rRe,setDirection:nRe,setClass:b9,setTooltip:iRe,getTooltip:kne,setClickEvent:oRe,setLink:sRe,bindFunctions:lRe,getDirection:Tne,getVertices:Ene,getEdges:Sne,getClasses:cRe,clear:uRe,setGen:hRe,defaultStyle:fRe,addSubGraph:dRe,getDepthFirstPos:gRe,indexNodes:mRe,getSubGraphs:Lne,destructLink:wRe,lex:kRe,exists:Rne,makeUniq:Nne,setDiagramTitle:en,getDiagramTitle:Hr},_Re=v(function(t,e){return e.db.getClasses()},"getClasses"),LRe=v(async function(t,e,r,n){re.info("REF0:"),re.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=pe(),o;i==="sandbox"&&(o=Ge("#i"+e));let l=i==="sandbox"?o.nodes()[0].contentDocument:document;re.debug("Before getData: ");let u=n.db.getData();re.debug("Data: ",u);let h=pg(e,i),f=Tne();u.type=n.type,u.layoutAlgorithm=aw(s),u.layoutAlgorithm==="dagre"&&s==="elk"&&re.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),u.direction=f,u.nodeSpacing=a?.nodeSpacing||50,u.rankSpacing=a?.rankSpacing||50,u.markers=["point","circle","cross"],u.diagramId=e,re.debug("REF1:",u),await cg(u,h);let d=u.config.flowchart?.diagramPadding??8;Wt.insertTitle(h,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),gg(h,d,"flowchart",a?.useMaxWidth||!1);for(let p of u.nodes){let g=Ge(`#${e} [id="${p.id}"]`);if(!g||!p.link)continue;let m=l.createElementNS("http://www.w3.org/2000/svg","a");m.setAttributeNS("http://www.w3.org/2000/svg","class",p.cssClasses),m.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?m.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):p.linkTarget&&m.setAttributeNS("http://www.w3.org/2000/svg","target",p.linkTarget);let x=g.insert(function(){return m},":first-child"),y=g.select(".label-container");y&&x.append(function(){return y.node()});let b=g.select(".label");b&&x.append(function(){return b.node()})}},"draw"),RRe={getClasses:_Re,draw:LRe},v9=function(){var t=v(function(In,dt,yt,Tt){for(yt=yt||{},Tt=In.length;Tt--;yt[In[Tt]]=dt);return yt},"o"),e=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],a=[2,2],s=[1,13],o=[1,14],l=[1,15],u=[1,16],h=[1,23],f=[1,25],d=[1,26],p=[1,27],g=[1,49],m=[1,48],x=[1,29],y=[1,30],b=[1,31],w=[1,32],_=[1,33],k=[1,44],E=[1,46],L=[1,42],S=[1,47],C=[1,43],M=[1,50],R=[1,45],T=[1,51],I=[1,52],A=[1,34],D=[1,35],N=[1,36],O=[1,37],B=[1,57],P=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],$=[1,61],z=[1,60],H=[1,62],Z=[8,9,11,75,77],X=[1,77],ie=[1,90],K=[1,95],ee=[1,94],J=[1,91],W=[1,87],Y=[1,93],Q=[1,89],se=[1,96],ue=[1,92],ce=[1,97],te=[1,88],Le=[8,9,10,11,40,75,77],oe=[8,9,10,11,40,46,75,77],be=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],Fe=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],Be=[44,60,88,101,104,105,108,110,113,114,115],Ve=[1,123],We=[1,122],qe=[1,130],Re=[1,144],Me=[1,145],ye=[1,146],q=[1,147],de=[1,132],ae=[1,134],he=[1,138],U=[1,139],ke=[1,140],j=[1,141],me=[1,142],Se=[1,143],Pe=[1,148],Ie=[1,149],ge=[1,128],ze=[1,129],Ae=[1,136],Ye=[1,131],it=[1,135],wt=[1,133],ft=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],He=[1,151],ut=[1,153],$e=[8,9,11],Ze=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],at=[1,173],mt=[1,169],Ut=[1,170],st=[1,174],Qe=[1,171],lt=[1,172],kt=[77,115,118],ht=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],Rt=[10,105],An=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],Vt=[1,242],Jr=[1,240],mn=[1,244],Dr=[1,238],jn=[1,239],_n=[1,241],vt=[1,243],Ee=[1,245],tt=[1,263],bt=[8,9,11,105],ir=[8,9,10,11,60,83,104,105,108,109,110,111],ln={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:v(function(dt,yt,Tt,Ue,Ct,fe,fi){var xe=fe.length-1;switch(Ct){case 2:this.$=[];break;case 3:(!Array.isArray(fe[xe])||fe[xe].length>0)&&fe[xe-1].push(fe[xe]),this.$=fe[xe-1];break;case 4:case 181:this.$=fe[xe];break;case 11:Ue.setDirection("TB"),this.$="TB";break;case 12:Ue.setDirection(fe[xe-1]),this.$=fe[xe-1];break;case 27:this.$=fe[xe-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=Ue.addSubGraph(fe[xe-6],fe[xe-1],fe[xe-4]);break;case 34:this.$=Ue.addSubGraph(fe[xe-3],fe[xe-1],fe[xe-3]);break;case 35:this.$=Ue.addSubGraph(void 0,fe[xe-1],void 0);break;case 37:this.$=fe[xe].trim(),Ue.setAccTitle(this.$);break;case 38:case 39:this.$=fe[xe].trim(),Ue.setAccDescription(this.$);break;case 43:this.$=fe[xe-1]+fe[xe];break;case 44:this.$=fe[xe];break;case 45:Ue.addVertex(fe[xe-1][0],void 0,void 0,void 0,void 0,void 0,void 0,fe[xe]),Ue.addLink(fe[xe-3].stmt,fe[xe-1],fe[xe-2]),this.$={stmt:fe[xe-1],nodes:fe[xe-1].concat(fe[xe-3].nodes)};break;case 46:Ue.addLink(fe[xe-2].stmt,fe[xe],fe[xe-1]),this.$={stmt:fe[xe],nodes:fe[xe].concat(fe[xe-2].nodes)};break;case 47:Ue.addLink(fe[xe-3].stmt,fe[xe-1],fe[xe-2]),this.$={stmt:fe[xe-1],nodes:fe[xe-1].concat(fe[xe-3].nodes)};break;case 48:this.$={stmt:fe[xe-1],nodes:fe[xe-1]};break;case 49:Ue.addVertex(fe[xe-1][0],void 0,void 0,void 0,void 0,void 0,void 0,fe[xe]),this.$={stmt:fe[xe-1],nodes:fe[xe-1],shapeData:fe[xe]};break;case 50:this.$={stmt:fe[xe],nodes:fe[xe]};break;case 51:this.$=[fe[xe]];break;case 52:Ue.addVertex(fe[xe-5][0],void 0,void 0,void 0,void 0,void 0,void 0,fe[xe-4]),this.$=fe[xe-5].concat(fe[xe]);break;case 53:this.$=fe[xe-4].concat(fe[xe]);break;case 54:this.$=fe[xe];break;case 55:this.$=fe[xe-2],Ue.setClass(fe[xe-2],fe[xe]);break;case 56:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"square");break;case 57:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"doublecircle");break;case 58:this.$=fe[xe-5],Ue.addVertex(fe[xe-5],fe[xe-2],"circle");break;case 59:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"ellipse");break;case 60:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"stadium");break;case 61:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"subroutine");break;case 62:this.$=fe[xe-7],Ue.addVertex(fe[xe-7],fe[xe-1],"rect",void 0,void 0,void 0,Object.fromEntries([[fe[xe-5],fe[xe-3]]]));break;case 63:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"cylinder");break;case 64:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"round");break;case 65:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"diamond");break;case 66:this.$=fe[xe-5],Ue.addVertex(fe[xe-5],fe[xe-2],"hexagon");break;case 67:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"odd");break;case 68:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"trapezoid");break;case 69:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"inv_trapezoid");break;case 70:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"lean_right");break;case 71:this.$=fe[xe-3],Ue.addVertex(fe[xe-3],fe[xe-1],"lean_left");break;case 72:this.$=fe[xe],Ue.addVertex(fe[xe]);break;case 73:fe[xe-1].text=fe[xe],this.$=fe[xe-1];break;case 74:case 75:fe[xe-2].text=fe[xe-1],this.$=fe[xe-2];break;case 76:this.$=fe[xe];break;case 77:var io=Ue.destructLink(fe[xe],fe[xe-2]);this.$={type:io.type,stroke:io.stroke,length:io.length,text:fe[xe-1]};break;case 78:this.$={text:fe[xe],type:"text"};break;case 79:this.$={text:fe[xe-1].text+""+fe[xe],type:fe[xe-1].type};break;case 80:this.$={text:fe[xe],type:"string"};break;case 81:this.$={text:fe[xe],type:"markdown"};break;case 82:var io=Ue.destructLink(fe[xe]);this.$={type:io.type,stroke:io.stroke,length:io.length};break;case 83:this.$=fe[xe-1];break;case 84:this.$={text:fe[xe],type:"text"};break;case 85:this.$={text:fe[xe-1].text+""+fe[xe],type:fe[xe-1].type};break;case 86:this.$={text:fe[xe],type:"string"};break;case 87:case 102:this.$={text:fe[xe],type:"markdown"};break;case 99:this.$={text:fe[xe],type:"text"};break;case 100:this.$={text:fe[xe-1].text+""+fe[xe],type:fe[xe-1].type};break;case 101:this.$={text:fe[xe],type:"text"};break;case 103:this.$=fe[xe-4],Ue.addClass(fe[xe-2],fe[xe]);break;case 104:this.$=fe[xe-4],Ue.setClass(fe[xe-2],fe[xe]);break;case 105:case 113:this.$=fe[xe-1],Ue.setClickEvent(fe[xe-1],fe[xe]);break;case 106:case 114:this.$=fe[xe-3],Ue.setClickEvent(fe[xe-3],fe[xe-2]),Ue.setTooltip(fe[xe-3],fe[xe]);break;case 107:this.$=fe[xe-2],Ue.setClickEvent(fe[xe-2],fe[xe-1],fe[xe]);break;case 108:this.$=fe[xe-4],Ue.setClickEvent(fe[xe-4],fe[xe-3],fe[xe-2]),Ue.setTooltip(fe[xe-4],fe[xe]);break;case 109:this.$=fe[xe-2],Ue.setLink(fe[xe-2],fe[xe]);break;case 110:this.$=fe[xe-4],Ue.setLink(fe[xe-4],fe[xe-2]),Ue.setTooltip(fe[xe-4],fe[xe]);break;case 111:this.$=fe[xe-4],Ue.setLink(fe[xe-4],fe[xe-2],fe[xe]);break;case 112:this.$=fe[xe-6],Ue.setLink(fe[xe-6],fe[xe-4],fe[xe]),Ue.setTooltip(fe[xe-6],fe[xe-2]);break;case 115:this.$=fe[xe-1],Ue.setLink(fe[xe-1],fe[xe]);break;case 116:this.$=fe[xe-3],Ue.setLink(fe[xe-3],fe[xe-2]),Ue.setTooltip(fe[xe-3],fe[xe]);break;case 117:this.$=fe[xe-3],Ue.setLink(fe[xe-3],fe[xe-2],fe[xe]);break;case 118:this.$=fe[xe-5],Ue.setLink(fe[xe-5],fe[xe-4],fe[xe]),Ue.setTooltip(fe[xe-5],fe[xe-2]);break;case 119:this.$=fe[xe-4],Ue.addVertex(fe[xe-2],void 0,void 0,fe[xe]);break;case 120:this.$=fe[xe-4],Ue.updateLink([fe[xe-2]],fe[xe]);break;case 121:this.$=fe[xe-4],Ue.updateLink(fe[xe-2],fe[xe]);break;case 122:this.$=fe[xe-8],Ue.updateLinkInterpolate([fe[xe-6]],fe[xe-2]),Ue.updateLink([fe[xe-6]],fe[xe]);break;case 123:this.$=fe[xe-8],Ue.updateLinkInterpolate(fe[xe-6],fe[xe-2]),Ue.updateLink(fe[xe-6],fe[xe]);break;case 124:this.$=fe[xe-6],Ue.updateLinkInterpolate([fe[xe-4]],fe[xe]);break;case 125:this.$=fe[xe-6],Ue.updateLinkInterpolate(fe[xe-4],fe[xe]);break;case 126:case 128:this.$=[fe[xe]];break;case 127:case 129:fe[xe-2].push(fe[xe]),this.$=fe[xe-2];break;case 131:this.$=fe[xe-1]+fe[xe];break;case 179:this.$=fe[xe];break;case 180:this.$=fe[xe-1]+""+fe[xe];break;case 182:this.$=fe[xe-1]+""+fe[xe];break;case 183:this.$={stmt:"dir",value:"TB"};break;case 184:this.$={stmt:"dir",value:"BT"};break;case 185:this.$={stmt:"dir",value:"RL"};break;case 186:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,83:x,84:y,85:b,86:w,87:_,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I,120:A,121:D,122:N,123:O},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:B,15:53,18:56},t(P,[2,3]),t(P,[2,4]),t(P,[2,5]),t(P,[2,6]),t(P,[2,7]),t(P,[2,8]),{8:$,9:z,11:H,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:$,9:z,11:H,21:66},{8:$,9:z,11:H,21:67},{8:$,9:z,11:H,21:68},{8:$,9:z,11:H,21:69},{8:$,9:z,11:H,21:70},{8:$,9:z,10:[1,71],11:H,21:72},t(P,[2,36]),{35:[1,73]},{37:[1,74]},t(P,[2,39]),t(Z,[2,50],{18:75,39:76,10:B,40:X}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:ie,44:K,60:ee,79:[1,85],88:J,94:[1,82],96:[1,83],100:84,104:W,105:Y,108:Q,110:se,113:ue,114:ce,115:te,119:86},t(P,[2,183]),t(P,[2,184]),t(P,[2,185]),t(P,[2,186]),t(Le,[2,51]),t(Le,[2,54],{46:[1,98]}),t(oe,[2,72],{112:111,29:[1,99],44:g,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:m,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:k,101:E,104:L,105:S,108:C,110:M,113:R,114:T,115:I}),t(be,[2,179]),t(be,[2,140]),t(be,[2,141]),t(be,[2,142]),t(be,[2,143]),t(be,[2,144]),t(be,[2,145]),t(be,[2,146]),t(be,[2,147]),t(be,[2,148]),t(be,[2,149]),t(be,[2,150]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,112]},t(Fe,[2,26],{18:113,10:B}),t(P,[2,27]),{42:114,43:38,44:g,45:39,47:40,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I},t(P,[2,40]),t(P,[2,41]),t(P,[2,42]),t(Be,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:Ve,118:We},t([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),t(P,[2,28]),t(P,[2,29]),t(P,[2,30]),t(P,[2,31]),t(P,[2,32]),{10:qe,12:Re,14:Me,27:ye,28:124,32:q,44:de,60:ae,75:he,79:[1,126],80:[1,127],82:137,83:U,84:ke,85:j,86:me,87:Se,88:Pe,89:Ie,90:125,104:ge,108:ze,110:Ae,113:Ye,114:it,115:wt},t(ft,a,{5:150}),t(P,[2,37]),t(P,[2,38]),t(Z,[2,48],{44:He}),t(Z,[2,49],{18:152,10:B,40:ut}),t(Le,[2,44]),{44:g,47:154,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I},{101:[1,155],102:156,104:[1,157]},{44:g,47:158,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I},{44:g,47:159,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I},t($e,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},t($e,[2,113],{119:164,10:[1,163],14:ie,44:K,60:ee,88:J,104:W,105:Y,108:Q,110:se,113:ue,114:ce,115:te}),t($e,[2,115],{10:[1,165]}),t(Ze,[2,181]),t(Ze,[2,168]),t(Ze,[2,169]),t(Ze,[2,170]),t(Ze,[2,171]),t(Ze,[2,172]),t(Ze,[2,173]),t(Ze,[2,174]),t(Ze,[2,175]),t(Ze,[2,176]),t(Ze,[2,177]),t(Ze,[2,178]),{44:g,47:166,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I},{30:167,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{30:175,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{30:177,50:[1,176],67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{30:178,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{30:179,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{30:180,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{108:[1,181]},{30:182,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{30:183,65:[1,184],67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{30:185,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{30:186,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{30:187,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},t(be,[2,180]),t(i,[2,20]),t(Fe,[2,25]),t(Z,[2,46],{39:188,18:189,10:B,40:X}),t(Be,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{77:[1,193],78:194,115:Ve,118:We},t(kt,[2,78]),t(kt,[2,80]),t(kt,[2,81]),t(kt,[2,166]),t(kt,[2,167]),{8:$,9:z,10:qe,11:H,12:Re,14:Me,21:196,27:ye,29:[1,195],32:q,44:de,60:ae,75:he,82:137,83:U,84:ke,85:j,86:me,87:Se,88:Pe,89:Ie,90:197,104:ge,108:ze,110:Ae,113:Ye,114:it,115:wt},t(ht,[2,99]),t(ht,[2,101]),t(ht,[2,102]),t(ht,[2,155]),t(ht,[2,156]),t(ht,[2,157]),t(ht,[2,158]),t(ht,[2,159]),t(ht,[2,160]),t(ht,[2,161]),t(ht,[2,162]),t(ht,[2,163]),t(ht,[2,164]),t(ht,[2,165]),t(ht,[2,88]),t(ht,[2,89]),t(ht,[2,90]),t(ht,[2,91]),t(ht,[2,92]),t(ht,[2,93]),t(ht,[2,94]),t(ht,[2,95]),t(ht,[2,96]),t(ht,[2,97]),t(ht,[2,98]),{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,198],33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,83:x,84:y,85:b,86:w,87:_,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I,120:A,121:D,122:N,123:O},{10:B,18:199},{44:[1,200]},t(Le,[2,43]),{10:[1,201],44:g,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:111,113:R,114:T,115:I},{10:[1,202]},{10:[1,203],105:[1,204]},t(Rt,[2,126]),{10:[1,205],44:g,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:111,113:R,114:T,115:I},{10:[1,206],44:g,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:111,113:R,114:T,115:I},{79:[1,207]},t($e,[2,107],{10:[1,208]}),t($e,[2,109],{10:[1,209]}),{79:[1,210]},t(Ze,[2,182]),{79:[1,211],97:[1,212]},t(Le,[2,55],{112:111,44:g,60:m,88:k,101:E,104:L,105:S,108:C,110:M,113:R,114:T,115:I}),{31:[1,213],67:at,81:214,115:st,116:Qe,117:lt},t(An,[2,84]),t(An,[2,86]),t(An,[2,87]),t(An,[2,151]),t(An,[2,152]),t(An,[2,153]),t(An,[2,154]),{49:[1,215],67:at,81:214,115:st,116:Qe,117:lt},{30:216,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{51:[1,217],67:at,81:214,115:st,116:Qe,117:lt},{53:[1,218],67:at,81:214,115:st,116:Qe,117:lt},{55:[1,219],67:at,81:214,115:st,116:Qe,117:lt},{57:[1,220],67:at,81:214,115:st,116:Qe,117:lt},{60:[1,221]},{64:[1,222],67:at,81:214,115:st,116:Qe,117:lt},{66:[1,223],67:at,81:214,115:st,116:Qe,117:lt},{30:224,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},{31:[1,225],67:at,81:214,115:st,116:Qe,117:lt},{67:at,69:[1,226],71:[1,227],81:214,115:st,116:Qe,117:lt},{67:at,69:[1,229],71:[1,228],81:214,115:st,116:Qe,117:lt},t(Z,[2,45],{18:152,10:B,40:ut}),t(Z,[2,47],{44:He}),t(Be,[2,75]),t(Be,[2,74]),{62:[1,230],67:at,81:214,115:st,116:Qe,117:lt},t(Be,[2,77]),t(kt,[2,79]),{30:231,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},t(ft,a,{5:232}),t(ht,[2,100]),t(P,[2,35]),{43:233,44:g,45:39,47:40,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I},{10:B,18:234},{10:Vt,60:Jr,83:mn,91:235,104:Dr,106:236,107:237,108:jn,109:_n,110:vt,111:Ee},{10:Vt,60:Jr,83:mn,91:246,103:[1,247],104:Dr,106:236,107:237,108:jn,109:_n,110:vt,111:Ee},{10:Vt,60:Jr,83:mn,91:248,103:[1,249],104:Dr,106:236,107:237,108:jn,109:_n,110:vt,111:Ee},{104:[1,250]},{10:Vt,60:Jr,83:mn,91:251,104:Dr,106:236,107:237,108:jn,109:_n,110:vt,111:Ee},{44:g,47:252,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I},t($e,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},t($e,[2,114]),t($e,[2,116],{10:[1,256]}),t($e,[2,117]),t(oe,[2,56]),t(An,[2,85]),t(oe,[2,57]),{51:[1,257],67:at,81:214,115:st,116:Qe,117:lt},t(oe,[2,64]),t(oe,[2,59]),t(oe,[2,60]),t(oe,[2,61]),{108:[1,258]},t(oe,[2,63]),t(oe,[2,65]),{66:[1,259],67:at,81:214,115:st,116:Qe,117:lt},t(oe,[2,67]),t(oe,[2,68]),t(oe,[2,70]),t(oe,[2,69]),t(oe,[2,71]),t([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:at,81:214,115:st,116:Qe,117:lt},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,261],33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,83:x,84:y,85:b,86:w,87:_,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I,120:A,121:D,122:N,123:O},t(Le,[2,53]),{43:262,44:g,45:39,47:40,60:m,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I},t($e,[2,119],{105:tt}),t(bt,[2,128],{107:264,10:Vt,60:Jr,83:mn,104:Dr,108:jn,109:_n,110:vt,111:Ee}),t(ir,[2,130]),t(ir,[2,132]),t(ir,[2,133]),t(ir,[2,134]),t(ir,[2,135]),t(ir,[2,136]),t(ir,[2,137]),t(ir,[2,138]),t(ir,[2,139]),t($e,[2,120],{105:tt}),{10:[1,265]},t($e,[2,121],{105:tt}),{10:[1,266]},t(Rt,[2,127]),t($e,[2,103],{105:tt}),t($e,[2,104],{112:111,44:g,60:m,88:k,101:E,104:L,105:S,108:C,110:M,113:R,114:T,115:I}),t($e,[2,108]),t($e,[2,110],{10:[1,267]}),t($e,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:$,9:z,11:H,21:272},t(P,[2,34]),t(Le,[2,52]),{10:Vt,60:Jr,83:mn,104:Dr,106:273,107:237,108:jn,109:_n,110:vt,111:Ee},t(ir,[2,131]),{14:ie,44:K,60:ee,88:J,100:274,104:W,105:Y,108:Q,110:se,113:ue,114:ce,115:te,119:86},{14:ie,44:K,60:ee,88:J,100:275,104:W,105:Y,108:Q,110:se,113:ue,114:ce,115:te,119:86},{97:[1,276]},t($e,[2,118]),t(oe,[2,58]),{30:277,67:at,79:mt,80:Ut,81:168,115:st,116:Qe,117:lt},t(oe,[2,66]),t(ft,a,{5:278}),t(bt,[2,129],{107:264,10:Vt,60:Jr,83:mn,104:Dr,108:jn,109:_n,110:vt,111:Ee}),t($e,[2,124],{119:164,10:[1,279],14:ie,44:K,60:ee,88:J,104:W,105:Y,108:Q,110:se,113:ue,114:ce,115:te}),t($e,[2,125],{119:164,10:[1,280],14:ie,44:K,60:ee,88:J,104:W,105:Y,108:Q,110:se,113:ue,114:ce,115:te}),t($e,[2,112]),{31:[1,281],67:at,81:214,115:st,116:Qe,117:lt},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,282],33:24,34:f,36:d,38:p,42:28,43:38,44:g,45:39,47:40,60:m,83:x,84:y,85:b,86:w,87:_,88:k,101:E,104:L,105:S,108:C,110:M,112:41,113:R,114:T,115:I,120:A,121:D,122:N,123:O},{10:Vt,60:Jr,83:mn,91:283,104:Dr,106:236,107:237,108:jn,109:_n,110:vt,111:Ee},{10:Vt,60:Jr,83:mn,91:284,104:Dr,106:236,107:237,108:jn,109:_n,110:vt,111:Ee},t(oe,[2,62]),t(P,[2,33]),t($e,[2,122],{105:tt}),t($e,[2,123],{105:tt})],defaultActions:{},parseError:v(function(dt,yt){if(yt.recoverable)this.trace(dt);else{var Tt=new Error(dt);throw Tt.hash=yt,Tt}},"parseError"),parse:v(function(dt){var yt=this,Tt=[0],Ue=[],Ct=[null],fe=[],fi=this.table,xe="",io=0,YO=0,XO=0,$me=2,jO=1,Gme=fe.slice.call(arguments,1),Fi=Object.create(this.lexer),yf={yy:{}};for(var gE in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gE)&&(yf.yy[gE]=this.yy[gE]);Fi.setInput(dt,yf.yy),yf.yy.lexer=Fi,yf.yy.parser=this,typeof Fi.yylloc>"u"&&(Fi.yylloc={});var mE=Fi.yylloc;fe.push(mE);var Ume=Fi.options&&Fi.options.ranges;typeof yf.yy.parseError=="function"?this.parseError=yf.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vme(Rs){Tt.length=Tt.length-2*Rs,Ct.length=Ct.length-Rs,fe.length=fe.length-Rs}v(Vme,"popStack");function KO(){var Rs;return Rs=Ue.pop()||Fi.lex()||jO,typeof Rs!="number"&&(Rs instanceof Array&&(Ue=Rs,Rs=Ue.pop()),Rs=yt.symbols_[Rs]||Rs),Rs}v(KO,"lex");for(var Na,vE,xf,ao,vtt,yE,M0={},$x,Bc,ZO,Gx;;){if(xf=Tt[Tt.length-1],this.defaultActions[xf]?ao=this.defaultActions[xf]:((Na===null||typeof Na>"u")&&(Na=KO()),ao=fi[xf]&&fi[xf][Na]),typeof ao>"u"||!ao.length||!ao[0]){var xE="";Gx=[];for($x in fi[xf])this.terminals_[$x]&&$x>$me&&Gx.push("\'"+this.terminals_[$x]+"\'");Fi.showPosition?xE="Parse error on line "+(io+1)+`:\n`+Fi.showPosition()+`\nExpecting `+Gx.join(", ")+", got \'"+(this.terminals_[Na]||Na)+"\'":xE="Parse error on line "+(io+1)+": Unexpected "+(Na==jO?"end of input":"\'"+(this.terminals_[Na]||Na)+"\'"),this.parseError(xE,{text:Fi.match,token:this.terminals_[Na]||Na,line:Fi.yylineno,loc:mE,expected:Gx})}if(ao[0]instanceof Array&&ao.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xf+", token: "+Na);switch(ao[0]){case 1:Tt.push(Na),Ct.push(Fi.yytext),fe.push(Fi.yylloc),Tt.push(ao[1]),Na=null,vE?(Na=vE,vE=null):(YO=Fi.yyleng,xe=Fi.yytext,io=Fi.yylineno,mE=Fi.yylloc,XO>0&&XO--);break;case 2:if(Bc=this.productions_[ao[1]][1],M0.$=Ct[Ct.length-Bc],M0._$={first_line:fe[fe.length-(Bc||1)].first_line,last_line:fe[fe.length-1].last_line,first_column:fe[fe.length-(Bc||1)].first_column,last_column:fe[fe.length-1].last_column},Ume&&(M0._$.range=[fe[fe.length-(Bc||1)].range[0],fe[fe.length-1].range[1]]),yE=this.performAction.apply(M0,[xe,YO,io,yf.yy,ao[1],Ct,fe].concat(Gme)),typeof yE<"u")return yE;Bc&&(Tt=Tt.slice(0,-1*Bc*2),Ct=Ct.slice(0,-1*Bc),fe=fe.slice(0,-1*Bc)),Tt.push(this.productions_[ao[1]][0]),Ct.push(M0.$),fe.push(M0._$),ZO=fi[Tt[Tt.length-2]][Tt[Tt.length-1]],Tt.push(ZO);break;case 3:return!0}}return!0},"parse")},vn=function(){var In={EOF:1,parseError:v(function(yt,Tt){if(this.yy.parser)this.yy.parser.parseError(yt,Tt);else throw new Error(yt)},"parseError"),setInput:v(function(dt,yt){return this.yy=yt||this.yy||{},this._input=dt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var dt=this._input[0];this.yytext+=dt,this.yyleng++,this.offset++,this.match+=dt,this.matched+=dt;var yt=dt.match(/(?:\\r\\n?|\\n).*/g);return yt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),dt},"input"),unput:v(function(dt){var yt=dt.length,Tt=dt.split(/(?:\\r\\n?|\\n)/g);this._input=dt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-yt),this.offset-=yt;var Ue=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Tt.length-1&&(this.yylineno-=Tt.length-1);var Ct=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Tt?(Tt.length===Ue.length?this.yylloc.first_column:0)+Ue[Ue.length-Tt.length].length-Tt[0].length:this.yylloc.first_column-yt},this.options.ranges&&(this.yylloc.range=[Ct[0],Ct[0]+this.yyleng-yt]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(dt){this.unput(this.match.slice(dt))},"less"),pastInput:v(function(){var dt=this.matched.substr(0,this.matched.length-this.match.length);return(dt.length>20?"...":"")+dt.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var dt=this.match;return dt.length<20&&(dt+=this._input.substr(0,20-dt.length)),(dt.substr(0,20)+(dt.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var dt=this.pastInput(),yt=new Array(dt.length+1).join("-");return dt+this.upcomingInput()+`\n`+yt+"^"},"showPosition"),test_match:v(function(dt,yt){var Tt,Ue,Ct;if(this.options.backtrack_lexer&&(Ct={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ct.yylloc.range=this.yylloc.range.slice(0))),Ue=dt[0].match(/(?:\\r\\n?|\\n).*/g),Ue&&(this.yylineno+=Ue.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ue?Ue[Ue.length-1].length-Ue[Ue.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+dt[0].length},this.yytext+=dt[0],this.match+=dt[0],this.matches=dt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(dt[0].length),this.matched+=dt[0],Tt=this.performAction.call(this,this.yy,this,yt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Tt)return Tt;if(this._backtrack){for(var fe in Ct)this[fe]=Ct[fe];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var dt,yt,Tt,Ue;this._more||(this.yytext="",this.match="");for(var Ct=this._currentRules(),fe=0;fe<Ct.length;fe++)if(Tt=this._input.match(this.rules[Ct[fe]]),Tt&&(!yt||Tt[0].length>yt[0].length)){if(yt=Tt,Ue=fe,this.options.backtrack_lexer){if(dt=this.test_match(Tt,Ct[fe]),dt!==!1)return dt;if(this._backtrack){yt=!1;continue}else return!1}else if(!this.options.flex)break}return yt?(dt=this.test_match(yt,Ct[Ue]),dt!==!1?dt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var yt=this.next();return yt||this.lex()},"lex"),begin:v(function(yt){this.conditionStack.push(yt)},"begin"),popState:v(function(){var yt=this.conditionStack.length-1;return yt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(yt){return yt=this.conditionStack.length-1-Math.abs(yt||0),yt>=0?this.conditionStack[yt]:"INITIAL"},"topState"),pushState:v(function(yt){this.begin(yt)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:v(function(yt,Tt,Ue,Ct){var fe=Ct;switch(Ue){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),Tt.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let fi=/\\n\\s*/g;return Tt.yytext=Tt.yytext.replace(fi,"<br/>"),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 17:this.popState();break;case 18:return 95;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 87;case 35:return yt.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return yt.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return yt.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return 27;case 39:return 32;case 40:return 97;case 41:return 97;case 42:return 97;case 43:return 97;case 44:return this.popState(),13;break;case 45:return this.popState(),14;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:return 110;case 61:return 46;case 62:return 60;case 63:return 44;case 64:return 8;case 65:return 105;case 66:return 114;case 67:return this.popState(),77;break;case 68:return this.pushState("edgeText"),75;break;case 69:return 118;case 70:return this.popState(),77;break;case 71:return this.pushState("thickEdgeText"),75;break;case 72:return 118;case 73:return this.popState(),77;break;case 74:return this.pushState("dottedEdgeText"),75;break;case 75:return 118;case 76:return 77;case 77:return this.popState(),53;break;case 78:return"TEXT";case 79:return this.pushState("ellipseText"),52;break;case 80:return this.popState(),55;break;case 81:return this.pushState("text"),54;break;case 82:return this.popState(),57;break;case 83:return this.pushState("text"),56;break;case 84:return 58;case 85:return this.pushState("text"),67;break;case 86:return this.popState(),64;break;case 87:return this.pushState("text"),63;break;case 88:return this.popState(),49;break;case 89:return this.pushState("text"),48;break;case 90:return this.popState(),69;break;case 91:return this.popState(),71;break;case 92:return 116;case 93:return this.pushState("trapText"),68;break;case 94:return this.pushState("trapText"),70;break;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 100:return 114;case 101:return 110;case 102:return 44;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;break;case 107:return this.pushState("text"),62;break;case 108:return this.popState(),51;break;case 109:return this.pushState("text"),50;break;case 110:return this.popState(),31;break;case 111:return this.pushState("text"),29;break;case 112:return this.popState(),66;break;case 113:return this.pushState("text"),65;break;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118:return 11}},"anonymous"),rules:[/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:@\\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\\"]+)/,/^(?:[^}^"]+)/,/^(?:\\})/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\\b)/,/^(?:default\\b)/,/^(?:linkStyle\\b)/,/^(?:interpolate\\b)/,/^(?:classDef\\b)/,/^(?:class\\b)/,/^(?:href[\\s])/,/^(?:click[\\s]+)/,/^(?:[\\s\\n])/,/^(?:[^\\s\\n]*)/,/^(?:flowchart-elk\\b)/,/^(?:graph\\b)/,/^(?:flowchart\\b)/,/^(?:subgraph\\b)/,/^(?:end\\b\\s*)/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:(\\r?\\n)*\\s*\\n)/,/^(?:\\s*LR\\b)/,/^(?:\\s*RL\\b)/,/^(?:\\s*TB\\b)/,/^(?:\\s*BT\\b)/,/^(?:\\s*TD\\b)/,/^(?:\\s*BR\\b)/,/^(?:\\s*<)/,/^(?:\\s*>)/,/^(?:\\s*\\^)/,/^(?:\\s*v\\b)/,/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\\*)/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?--\\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?==\\s*)/,/^(?:[^=]|=(?!))/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?:\\s*[xo<]?-\\.\\s*)/,/^(?:[^\\.]|\\.(?!))/,/^(?:\\s*~~[\\~]+\\s*)/,/^(?:[-/\\)][\\)])/,/^(?:[^\\(\\)\\[\\]\\{\\}]|!\\)+)/,/^(?:\\(-)/,/^(?:\\]\\))/,/^(?:\\(\\[)/,/^(?:\\]\\])/,/^(?:\\[\\[)/,/^(?:\\[\\|)/,/^(?:>)/,/^(?:\\)\\])/,/^(?:\\[\\()/,/^(?:\\)\\)\\))/,/^(?:\\(\\(\\()/,/^(?:[\\\\(?=\\])][\\]])/,/^(?:\\/(?=\\])\\])/,/^(?:\\/(?!\\])|\\\\(?!\\])|[^\\\\\\[\\]\\(\\)\\{\\}\\/]+)/,/^(?:\\[\\/)/,/^(?:\\[\\\\)/,/^(?:<)/,/^(?:>)/,/^(?:\\^)/,/^(?:\\\\\\|)/,/^(?:v\\b)/,/^(?:\\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\\#$%&\'*+\\.`?\\\\_\\/]|-(?=[^\\>\\-\\.])|(?!))+)/,/^(?:-)/,/^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\|)/,/^(?:\\|)/,/^(?:\\))/,/^(?:\\()/,/^(?:\\])/,/^(?:\\[)/,/^(?:(\\}))/,/^(?:\\{)/,/^(?:[^\\[\\]\\(\\)\\{\\}\\|\\"]+)/,/^(?:")/,/^(?:(\\r?\\n)+)/,/^(?:\\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}};return In}();ln.lexer=vn;function Ln(){this.yy={}}return v(Ln,"Parser"),Ln.prototype=ln,ln.Parser=Ln,new Ln}();v9.parser=v9;NRe=v9,IRe=v((t,e)=>{let r=a1,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return Ns(n,i,a,e)},"fade"),MRe=v(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${t.lineColor} !important;\n stroke-width: 0;\n stroke: ${t.lineColor};\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${IRe(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n padding: 2px;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n`,"getStyles"),DRe=MRe,ORe={parser:NRe,db:g9,renderer:RRe,styles:DRe,init:v(t=>{t.flowchart||(t.flowchart={}),t.layout&&$S({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,$S({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),g9.clear(),g9.setGen("gen-2")},"init")}});var Ine,Mne=F(()=>{Ine=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function PRe(t){return typeof t=="string"&&Ine.test(t)}var Dne,One=F(()=>{Mne();Dne=PRe});function Pne(t,e=0){return sa[t[e+0]]+sa[t[e+1]]+sa[t[e+2]]+sa[t[e+3]]+"-"+sa[t[e+4]]+sa[t[e+5]]+"-"+sa[t[e+6]]+sa[t[e+7]]+"-"+sa[t[e+8]]+sa[t[e+9]]+"-"+sa[t[e+10]]+sa[t[e+11]]+sa[t[e+12]]+sa[t[e+13]]+sa[t[e+14]]+sa[t[e+15]]}var sa,Bne=F(()=>{sa=[];for(let t=0;t<256;++t)sa.push((t+256).toString(16).slice(1))});function BRe(t){if(!Dne(t))throw TypeError("Invalid UUID");let e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}var Fne,zne=F(()=>{One();Fne=BRe});function FRe(t){t=unescape(encodeURIComponent(t));let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}function w9(t,e,r){function n(i,a,s,o){var l;if(typeof i=="string"&&(i=FRe(i)),typeof a=="string"&&(a=Fne(a)),((l=a)===null||l===void 0?void 0:l.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+i.length);if(u.set(a),u.set(i,a.length),u=r(u),u[6]=u[6]&15|e,u[8]=u[8]&63|128,s){o=o||0;for(let h=0;h<16;++h)s[o+h]=u[h];return s}return Pne(u)}try{n.name=t}catch{}return n.DNS=zRe,n.URL=$Re,n}var zRe,$Re,$ne=F(()=>{Bne();zne();zRe="6ba7b810-9dad-11d1-80b4-00c04fd430c8",$Re="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});function GRe(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function k9(t,e){return t<<e|t>>>32-e}function URe(t){let e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){let s=unescape(encodeURIComponent(t));t=[];for(let o=0;o<s.length;++o)t.push(s.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);let n=t.length/4+2,i=Math.ceil(n/16),a=new Array(i);for(let s=0;s<i;++s){let o=new Uint32Array(16);for(let l=0;l<16;++l)o[l]=t[s*64+l*4]<<24|t[s*64+l*4+1]<<16|t[s*64+l*4+2]<<8|t[s*64+l*4+3];a[s]=o}a[i-1][14]=(t.length-1)*8/Math.pow(2,32),a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=(t.length-1)*8&4294967295;for(let s=0;s<i;++s){let o=new Uint32Array(80);for(let p=0;p<16;++p)o[p]=a[s][p];for(let p=16;p<80;++p)o[p]=k9(o[p-3]^o[p-8]^o[p-14]^o[p-16],1);let l=r[0],u=r[1],h=r[2],f=r[3],d=r[4];for(let p=0;p<80;++p){let g=Math.floor(p/20),m=k9(l,5)+GRe(g,u,h,f)+d+e[g]+o[p]>>>0;d=f,f=h,h=k9(u,30)>>>0,u=l,l=m}r[0]=r[0]+l>>>0,r[1]=r[1]+u>>>0,r[2]=r[2]+h>>>0,r[3]=r[3]+f>>>0,r[4]=r[4]+d>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Gne,Une=F(()=>{Gne=URe});var VRe,T9,Vne=F(()=>{$ne();Une();VRe=w9("v5",80,Gne),T9=VRe});var Wne=F(()=>{Vne()});var jne={};mr(jne,{diagram:()=>fNe});function Xne(t="",e=""){let r=t.replace(eNe,"");return`${S9(e)}${S9(r)}${T9(t,lNe)}`}function S9(t=""){return t.length>0?`${t}-`:""}var E9,WRe,Sd,C9,HRe,qRe,qne,YRe,XRe,jRe,KRe,ZRe,QRe,ml,JRe,vl,eNe,Si,sy,tNe,rNe,nNe,iNe,Yne,aNe,Hne,sNe,oNe,lNe,cNe,uNe,hNe,fNe,Kne=F(()=>{xn();or();vs();lr();jv();Wne();E9=function(){var t=v(function(S,C,M,R){for(M=M||{},R=S.length;R--;M[S[R]]=C);return M},"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],n=[1,11],i=[1,12],a=[1,13],s=[1,14],o=[1,15],l=[1,21],u=[1,22],h=[1,23],f=[1,24],d=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],g=[1,34],m=[27,28,46,47],x=[41,42,43,44,45],y=[17,34],b=[1,54],w=[1,53],_=[17,34,36,38],k={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:v(function(C,M,R,T,I,A,D){var N=A.length-1;switch(I){case 1:break;case 2:this.$=[];break;case 3:A[N-1].push(A[N]),this.$=A[N-1];break;case 4:case 5:this.$=A[N];break;case 6:case 7:this.$=[];break;case 8:T.addEntity(A[N-4]),T.addEntity(A[N-2]),T.addRelationship(A[N-4],A[N],A[N-2],A[N-3]);break;case 9:T.addEntity(A[N-3]),T.addAttributes(A[N-3],A[N-1]);break;case 10:T.addEntity(A[N-2]);break;case 11:T.addEntity(A[N]);break;case 12:T.addEntity(A[N-6],A[N-4]),T.addAttributes(A[N-6],A[N-1]);break;case 13:T.addEntity(A[N-5],A[N-3]);break;case 14:T.addEntity(A[N-3],A[N-1]);break;case 15:case 16:this.$=A[N].trim(),T.setAccTitle(this.$);break;case 17:case 18:this.$=A[N].trim(),T.setAccDescription(this.$);break;case 19:case 43:this.$=A[N];break;case 20:case 41:case 42:this.$=A[N].replace(/"/g,"");break;case 21:case 29:this.$=[A[N]];break;case 22:A[N].push(A[N-1]),this.$=A[N];break;case 23:this.$={attributeType:A[N-1],attributeName:A[N]};break;case 24:this.$={attributeType:A[N-2],attributeName:A[N-1],attributeKeyTypeList:A[N]};break;case 25:this.$={attributeType:A[N-2],attributeName:A[N-1],attributeComment:A[N]};break;case 26:this.$={attributeType:A[N-3],attributeName:A[N-2],attributeKeyTypeList:A[N-1],attributeComment:A[N]};break;case 27:case 28:case 31:this.$=A[N];break;case 30:A[N-2].push(A[N]),this.$=A[N-2];break;case 32:this.$=A[N].replace(/"/g,"");break;case 33:this.$={cardA:A[N],relType:A[N-1],cardB:A[N-2]};break;case 34:this.$=T.Cardinality.ZERO_OR_ONE;break;case 35:this.$=T.Cardinality.ZERO_OR_MORE;break;case 36:this.$=T.Cardinality.ONE_OR_MORE;break;case 37:this.$=T.Cardinality.ONLY_ONE;break;case 38:this.$=T.Cardinality.MD_PARENT;break;case 39:this.$=T.Identification.NON_IDENTIFYING;break;case 40:this.$=T.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:n,24:i,26:a,27:s,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:n,24:i,26:a,27:s,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:l,42:u,43:h,44:f,45:d}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:s,28:o},{16:30,17:[1,31],29:32,30:33,34:g},{11:35,27:s,28:o},{40:36,46:[1,37],47:[1,38]},t(m,[2,34]),t(m,[2,35]),t(m,[2,36]),t(m,[2,37]),t(m,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:g},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:l,42:u,43:h,44:f,45:d},t(x,[2,39]),t(x,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(y,[2,23],{32:50,33:51,35:52,37:b,38:w}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(y,[2,24],{33:56,36:[1,57],38:w}),t(y,[2,25]),t(_,[2,29]),t(y,[2,32]),t(_,[2,31]),{16:58,17:[1,59],29:32,30:33,34:g},t(y,[2,26]),{35:60,37:b},{17:[1,61]},t(e,[2,13]),t(_,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:v(function(C,M){if(M.recoverable)this.trace(C);else{var R=new Error(C);throw R.hash=M,R}},"parseError"),parse:v(function(C){var M=this,R=[0],T=[],I=[null],A=[],D=this.table,N="",O=0,B=0,P=0,$=2,z=1,H=A.slice.call(arguments,1),Z=Object.create(this.lexer),X={yy:{}};for(var ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ie)&&(X.yy[ie]=this.yy[ie]);Z.setInput(C,X.yy),X.yy.lexer=Z,X.yy.parser=this,typeof Z.yylloc>"u"&&(Z.yylloc={});var K=Z.yylloc;A.push(K);var ee=Z.options&&Z.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function J(We){R.length=R.length-2*We,I.length=I.length-We,A.length=A.length-We}v(J,"popStack");function W(){var We;return We=T.pop()||Z.lex()||z,typeof We!="number"&&(We instanceof Array&&(T=We,We=T.pop()),We=M.symbols_[We]||We),We}v(W,"lex");for(var Y,Q,se,ue,ce,te,Le={},oe,be,Fe,Be;;){if(se=R[R.length-1],this.defaultActions[se]?ue=this.defaultActions[se]:((Y===null||typeof Y>"u")&&(Y=W()),ue=D[se]&&D[se][Y]),typeof ue>"u"||!ue.length||!ue[0]){var Ve="";Be=[];for(oe in D[se])this.terminals_[oe]&&oe>$&&Be.push("\'"+this.terminals_[oe]+"\'");Z.showPosition?Ve="Parse error on line "+(O+1)+`:\n`+Z.showPosition()+`\nExpecting `+Be.join(", ")+", got \'"+(this.terminals_[Y]||Y)+"\'":Ve="Parse error on line "+(O+1)+": Unexpected "+(Y==z?"end of input":"\'"+(this.terminals_[Y]||Y)+"\'"),this.parseError(Ve,{text:Z.match,token:this.terminals_[Y]||Y,line:Z.yylineno,loc:K,expected:Be})}if(ue[0]instanceof Array&&ue.length>1)throw new Error("Parse Error: multiple actions possible at state: "+se+", token: "+Y);switch(ue[0]){case 1:R.push(Y),I.push(Z.yytext),A.push(Z.yylloc),R.push(ue[1]),Y=null,Q?(Y=Q,Q=null):(B=Z.yyleng,N=Z.yytext,O=Z.yylineno,K=Z.yylloc,P>0&&P--);break;case 2:if(be=this.productions_[ue[1]][1],Le.$=I[I.length-be],Le._$={first_line:A[A.length-(be||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(be||1)].first_column,last_column:A[A.length-1].last_column},ee&&(Le._$.range=[A[A.length-(be||1)].range[0],A[A.length-1].range[1]]),te=this.performAction.apply(Le,[N,B,O,X.yy,ue[1],I,A].concat(H)),typeof te<"u")return te;be&&(R=R.slice(0,-1*be*2),I=I.slice(0,-1*be),A=A.slice(0,-1*be)),R.push(this.productions_[ue[1]][0]),I.push(Le.$),A.push(Le._$),Fe=D[R[R.length-2]][R[R.length-1]],R.push(Fe);break;case 3:return!0}}return!0},"parse")},E=function(){var S={EOF:1,parseError:v(function(M,R){if(this.yy.parser)this.yy.parser.parseError(M,R);else throw new Error(M)},"parseError"),setInput:v(function(C,M){return this.yy=M||this.yy||{},this._input=C,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var M=C.match(/(?:\\r\\n?|\\n).*/g);return M?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),C},"input"),unput:v(function(C){var M=C.length,R=C.split(/(?:\\r\\n?|\\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-M),this.offset-=M;var T=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),R.length-1&&(this.yylineno-=R.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:R?(R.length===T.length?this.yylloc.first_column:0)+T[T.length-R.length].length-R[0].length:this.yylloc.first_column-M},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-M]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(C){this.unput(this.match.slice(C))},"less"),pastInput:v(function(){var C=this.matched.substr(0,this.matched.length-this.match.length);return(C.length>20?"...":"")+C.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var C=this.match;return C.length<20&&(C+=this._input.substr(0,20-C.length)),(C.substr(0,20)+(C.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var C=this.pastInput(),M=new Array(C.length+1).join("-");return C+this.upcomingInput()+`\n`+M+"^"},"showPosition"),test_match:v(function(C,M){var R,T,I;if(this.options.backtrack_lexer&&(I={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(I.yylloc.range=this.yylloc.range.slice(0))),T=C[0].match(/(?:\\r\\n?|\\n).*/g),T&&(this.yylineno+=T.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:T?T[T.length-1].length-T[T.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+C[0].length},this.yytext+=C[0],this.match+=C[0],this.matches=C,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(C[0].length),this.matched+=C[0],R=this.performAction.call(this,this.yy,this,M,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),R)return R;if(this._backtrack){for(var A in I)this[A]=I[A];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,M,R,T;this._more||(this.yytext="",this.match="");for(var I=this._currentRules(),A=0;A<I.length;A++)if(R=this._input.match(this.rules[I[A]]),R&&(!M||R[0].length>M[0].length)){if(M=R,T=A,this.options.backtrack_lexer){if(C=this.test_match(R,I[A]),C!==!1)return C;if(this._backtrack){M=!1;continue}else return!1}else if(!this.options.flex)break}return M?(C=this.test_match(M,I[T]),C!==!1?C:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var M=this.next();return M||this.lex()},"lex"),begin:v(function(M){this.conditionStack.push(M)},"begin"),popState:v(function(){var M=this.conditionStack.length-1;return M>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},"topState"),pushState:v(function(M){this.begin(M)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(M,R,T,I){var A=I;switch(T){case 0:return this.begin("acc_title"),22;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),24;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;break;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;break;case 22:return R.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return R.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:[\\s]+)/i,/^(?:"[^"%\\r\\n\\v\\b\\\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\\b)/i,/^(?:\\{)/i,/^(?:,)/i,/^(?:\\s+)/i,/^(?:\\b((?:PK)|(?:FK)|(?:UK))\\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\\*A-Za-z_][A-Za-z0-9\\-_\\[\\]\\(\\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\\n]+)/i,/^(?:\\})/i,/^(?:.)/i,/^(?:\\[)/i,/^(?:\\])/i,/^(?:one or zero\\b)/i,/^(?:one or more\\b)/i,/^(?:one or many\\b)/i,/^(?:1\\+)/i,/^(?:\\|o\\b)/i,/^(?:zero or one\\b)/i,/^(?:zero or more\\b)/i,/^(?:zero or many\\b)/i,/^(?:0\\+)/i,/^(?:\\}o\\b)/i,/^(?:many\\(0\\))/i,/^(?:many\\(1\\))/i,/^(?:many\\b)/i,/^(?:\\}\\|)/i,/^(?:one\\b)/i,/^(?:only one\\b)/i,/^(?:1\\b)/i,/^(?:\\|\\|)/i,/^(?:o\\|)/i,/^(?:o\\{)/i,/^(?:\\|\\{)/i,/^(?:\\s*u\\b)/i,/^(?:\\.\\.)/i,/^(?:--)/i,/^(?:to\\b)/i,/^(?:optionally to\\b)/i,/^(?:\\.-)/i,/^(?:-\\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return S}();k.lexer=E;function L(){this.yy={}}return v(L,"Parser"),L.prototype=k,k.Parser=L,new L}();E9.parser=E9;WRe=E9,Sd=new Map,C9=[],HRe={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},qRe={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},qne=v(function(t,e=void 0){return Sd.has(t)?!Sd.get(t).alias&&e&&(Sd.get(t).alias=e,re.info(`Add alias \'${e}\' to entity \'${t}\'`)):(Sd.set(t,{attributes:[],alias:e}),re.info("Added new entity :",t)),Sd.get(t)},"addEntity"),YRe=v(()=>Sd,"getEntities"),XRe=v(function(t,e){let r=qne(t),n;for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),re.debug("Added attribute ",e[n].attributeName)},"addAttributes"),jRe=v(function(t,e,r,n){let i={entityA:t,roleA:e,entityB:r,relSpec:n};C9.push(i),re.debug("Added new relationship :",i)},"addRelationship"),KRe=v(()=>C9,"getRelationships"),ZRe=v(function(){Sd=new Map,C9=[],xr()},"clear"),QRe={Cardinality:HRe,Identification:qRe,getConfig:v(()=>pe().er,"getConfig"),addEntity:qne,addAttributes:XRe,getEntities:YRe,addRelationship:jRe,getRelationships:KRe,clear:ZRe,setAccTitle:Tr,getAccTitle:Ar,setAccDescription:_r,getAccDescription:Lr,setDiagramTitle:en,getDiagramTitle:Hr},ml={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},JRe=v(function(t,e){let r;t.append("defs").append("marker").attr("id",ml.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",ml.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",ml.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",ml.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",ml.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",ml.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),vl={ERMarkers:ml,insertMarkers:JRe},eNe=/[^\\dA-Za-z](\\W)*/g,Si={},sy=new Map,tNe=v(function(t){let e=Object.keys(t);for(let r of e)Si[r]=t[r]},"setConf"),rNe=v((t,e,r)=>{let n=Si.entityPadding/3,i=Si.entityPadding/3,a=Si.fontSize*.85,s=e.node().getBBox(),o=[],l=!1,u=!1,h=0,f=0,d=0,p=0,g=s.height+n*2,m=1;r.forEach(w=>{w.attributeKeyTypeList!==void 0&&w.attributeKeyTypeList.length>0&&(l=!0),w.attributeComment!==void 0&&(u=!0)}),r.forEach(w=>{let _=`${e.node().id}-attr-${m}`,k=0,E=Xc(w.attributeType),L=t.append("text").classed("er entityLabel",!0).attr("id",`${_}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",pe().fontFamily).style("font-size",a+"px").text(E),S=t.append("text").classed("er entityLabel",!0).attr("id",`${_}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",pe().fontFamily).style("font-size",a+"px").text(w.attributeName),C={};C.tn=L,C.nn=S;let M=L.node().getBBox(),R=S.node().getBBox();if(h=Math.max(h,M.width),f=Math.max(f,R.width),k=Math.max(M.height,R.height),l){let T=w.attributeKeyTypeList!==void 0?w.attributeKeyTypeList.join(","):"",I=t.append("text").classed("er entityLabel",!0).attr("id",`${_}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",pe().fontFamily).style("font-size",a+"px").text(T);C.kn=I;let A=I.node().getBBox();d=Math.max(d,A.width),k=Math.max(k,A.height)}if(u){let T=t.append("text").classed("er entityLabel",!0).attr("id",`${_}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",pe().fontFamily).style("font-size",a+"px").text(w.attributeComment||"");C.cn=T;let I=T.node().getBBox();p=Math.max(p,I.width),k=Math.max(k,I.height)}C.height=k,o.push(C),g+=k+n*2,m+=1});let x=4;l&&(x+=2),u&&(x+=2);let y=h+f+d+p,b={width:Math.max(Si.minEntityWidth,Math.max(s.width+Si.entityPadding*2,y+i*x)),height:r.length>0?g:Math.max(Si.minEntityHeight,s.height+Si.entityPadding*2)};if(r.length>0){let w=Math.max(0,(b.width-y-i*x)/(x/2));e.attr("transform","translate("+b.width/2+","+(n+s.height/2)+")");let _=s.height+n*2,k="attributeBoxOdd";o.forEach(E=>{let L=_+n+E.height/2;E.tn.attr("transform","translate("+i+","+L+")");let S=t.insert("rect","#"+E.tn.node().id).classed(`er ${k}`,!0).attr("x",0).attr("y",_).attr("width",h+i*2+w).attr("height",E.height+n*2),C=parseFloat(S.attr("x"))+parseFloat(S.attr("width"));E.nn.attr("transform","translate("+(C+i)+","+L+")");let M=t.insert("rect","#"+E.nn.node().id).classed(`er ${k}`,!0).attr("x",C).attr("y",_).attr("width",f+i*2+w).attr("height",E.height+n*2),R=parseFloat(M.attr("x"))+parseFloat(M.attr("width"));if(l){E.kn.attr("transform","translate("+(R+i)+","+L+")");let T=t.insert("rect","#"+E.kn.node().id).classed(`er ${k}`,!0).attr("x",R).attr("y",_).attr("width",d+i*2+w).attr("height",E.height+n*2);R=parseFloat(T.attr("x"))+parseFloat(T.attr("width"))}u&&(E.cn.attr("transform","translate("+(R+i)+","+L+")"),t.insert("rect","#"+E.cn.node().id).classed(`er ${k}`,"true").attr("x",R).attr("y",_).attr("width",p+i*2+w).attr("height",E.height+n*2)),_+=E.height+n*2,k=k==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else b.height=Math.max(Si.minEntityHeight,g),e.attr("transform","translate("+b.width/2+","+b.height/2+")");return b},"drawAttributes"),nNe=v(function(t,e,r){let n=[...e.keys()],i;return n.forEach(function(a){let s=Xne(a,"entity");sy.set(a,s);let o=t.append("g").attr("id",s);i=i===void 0?s:i;let l="text-"+s,u=o.append("text").classed("er entityLabel",!0).attr("id",l).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",pe().fontFamily).style("font-size",Si.fontSize+"px").text(e.get(a).alias??a),{width:h,height:f}=rNe(o,u,e.get(a).attributes),p=o.insert("rect","#"+l).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",h).attr("height",f).node().getBBox();r.setNode(s,{width:p.width,height:p.height,shape:"rect",id:s})}),i},"drawEntities"),iNe=v(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},"adjustEntities"),Yne=v(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\\s/g,"")},"getEdgeName"),aNe=v(function(t,e){return t.forEach(function(r){e.setEdge(sy.get(r.entityA),sy.get(r.entityB),{relationship:r},Yne(r))}),t},"addRelationships"),Hne=0,sNe=v(function(t,e,r,n,i){Hne++;let a=r.edge(sy.get(e.entityA),sy.get(e.entityB),Yne(e)),s=ss().x(function(m){return m.x}).y(function(m){return m.y}).curve(cl),o=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",s(a.points)).style("stroke",Si.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(Si.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\\(/g,"\\\\("),l=l.replace(/\\)/g,"\\\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+vl.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+vl.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+vl.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+vl.ERMarkers.ONLY_ONE_END+")");break;case i.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+l+"#"+vl.ERMarkers.MD_PARENT_END+")");break}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+vl.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+vl.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+vl.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+vl.ERMarkers.ONLY_ONE_START+")");break;case i.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+l+"#"+vl.ERMarkers.MD_PARENT_START+")");break}let u=o.node().getTotalLength(),h=o.node().getPointAtLength(u*.5),f="rel"+Hne,d=e.roleA.split(/<br ?\\/>/g),p=t.append("text").classed("er relationshipLabel",!0).attr("id",f).attr("x",h.x).attr("y",h.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",pe().fontFamily).style("font-size",Si.fontSize+"px");if(d.length==1)p.text(e.roleA);else{let m=-(d.length-1)*.5;d.forEach((x,y)=>{p.append("tspan").attr("x",h.x).attr("dy",`${y===0?m:1}em`).text(x)})}let g=p.node().getBBox();t.insert("rect","#"+f).classed("er relationshipLabelBox",!0).attr("x",h.x-g.width/2).attr("y",h.y-g.height/2).attr("width",g.width).attr("height",g.height)},"drawRelationshipFromLayout"),oNe=v(function(t,e,r,n){Si=pe().er,re.info("Drawing ER diagram");let i=pe().securityLevel,a;i==="sandbox"&&(a=Ge("#i"+e));let o=(i==="sandbox"?Ge(a.nodes()[0].contentDocument.body):Ge("body")).select(`[id=\'${e}\']`);vl.insertMarkers(o,Si);let l;l=new Sr({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Si.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let u=nNe(o,n.db.getEntities(),l),h=aNe(n.db.getRelationships(),l);bu(l),iNe(o,l),h.forEach(function(m){sNe(o,m,l,u,n)});let f=Si.diagramPadding;Wt.insertTitle(o,"entityTitleText",Si.titleTopMargin,n.db.getDiagramTitle());let d=o.node().getBBox(),p=d.width+f*2,g=d.height+f*2;Wr(o,g,p,Si.useMaxWidth),o.attr("viewBox",`${d.x-f} ${d.y-f} ${p} ${g}`)},"draw"),lNe="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";v(Xne,"generateId");v(S9,"strWithHyphen");cNe={setConf:tNe,draw:oNe},uNe=v(t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n`,"getStyles"),hNe=uNe,fNe={parser:WRe,db:QRe,renderer:cNe,styles:hNe}});function Cu(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var oy=F(()=>{or();v(Cu,"populateCommonDb")});var vg,Mw=F(()=>{or();vg=class{constructor(t){this.init=t,this.records=this.init()}static{v(this,"ImperativeState")}reset(){this.records=this.init()}}});function Yn(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function oa(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"}function A9(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Ad(t){return typeof t=="object"&&t!==null&&Yn(t.container)&&oa(t.reference)&&typeof t.message=="string"}function qs(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Uh(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function ly(t){return qs(t)&&typeof t.fullText=="string"}var Cd,Mo=F(()=>{Cd=class{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,r){return Yn(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});let i=n[r];if(i!==void 0)return i;{let a=this.computeIsSubtype(e,r);return n[r]=a,a}}getAllSubTypes(e){let r=this.allSubtypes[e];if(r)return r;{let n=this.getAllTypes(),i=[];for(let a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}});function dNe(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Dw(t){return!!t&&typeof t[Symbol.iterator]=="function"}function Yr(...t){if(t.length===1){let e=t[0];if(e instanceof Ys)return e;if(Dw(e))return new Ys(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new Ys(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:Va)}return t.length>1?new Ys(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){let r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){let r=t[e.collIndex++];Dw(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return Va}):cy}var Ys,cy,Va,mc,yg,xs=F(()=>{Ys=class t{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){let e=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){let n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){let r=e[Symbol.iterator]();return new t(()=>({first:this.startFn(),firstDone:!1}),n=>{let i;if(!n.firstDone){do if(i=this.nextFn(n.first),!i.done)return i;while(!i.done);n.firstDone=!0}do if(i=r.next(),!i.done)return i;while(!i.done);return Va})}join(e=","){let r=this.iterator(),n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=dNe(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){let n=this.iterator(),i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new t(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?Va:{done:!1,value:e(i)}})}filter(e){return new t(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Va})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){let n=this.iterator(),i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){let i=e.next();if(i.done)return n;let a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}let{done:n,value:i}=this.nextFn(r.this);if(!n){let a=e(i);if(Dw(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Va})}flat(e){if(e===void 0&&(e=1),e<=0)return this;let r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}let{done:i,value:a}=r.nextFn(n.this);if(!i)if(Dw(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Va})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new t(()=>{let r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new t(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Va:this.nextFn(r.state)))}distinct(e){let r=new Set;return this.filter(n=>{let i=e?e(n):n;return r.has(i)?!1:(r.add(i),!0)})}exclude(e,r){let n=new Set;for(let i of e){let a=r?r(i):i;n.add(a)}return this.filter(i=>{let a=r?r(i):i;return!n.has(a)})}};cy=new Ys(()=>{},()=>Va),Va=Object.freeze({done:!0,value:void 0});mc=class extends Ys{constructor(e,r,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return Va})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}};(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(yg||(yg={}))});var Pw={};mr(Pw,{DefaultNameRegexp:()=>Ow,RangeComparison:()=>Au,compareRange:()=>Qne,findCommentNode:()=>N9,findDeclarationNodeAtOffset:()=>gNe,findLeafNodeAtOffset:()=>I9,findLeafNodeBeforeOffset:()=>Jne,flattenCst:()=>pNe,getInteriorNodes:()=>yNe,getNextNode:()=>mNe,getPreviousNode:()=>tie,getStartlineNode:()=>vNe,inRange:()=>R9,isChildNode:()=>L9,isCommentNode:()=>_9,streamCst:()=>_d,toDocumentSegment:()=>Ld,tokenToRange:()=>xg});function _d(t){return new mc(t,e=>qs(e)?e.content:[],{includeRoot:!0})}function pNe(t){return _d(t).filter(Uh)}function L9(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function xg(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Ld(t){if(!t)return;let{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}function Qne(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<t.start.character)return Au.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>e.end.character)return Au.After;let r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?Au.Inside:r?Au.OverlapBack:Au.OverlapFront}function R9(t,e){return Qne(t,e)>Au.After}function gNe(t,e,r=Ow){if(t){if(e>0){let n=e-t.offset,i=t.text.charAt(n);r.test(i)||e--}return I9(t,e)}}function N9(t,e){if(t){let r=tie(t,!0);if(r&&_9(r,e))return r;if(ly(t)){let n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let a=t.content[i];if(_9(a,e))return a}}}}function _9(t,e){return Uh(t)&&e.includes(t.tokenType.name)}function I9(t,e){if(Uh(t))return t;if(qs(t)){let r=eie(t,e,!1);if(r)return I9(r,e)}}function Jne(t,e){if(Uh(t))return t;if(qs(t)){let r=eie(t,e,!0);if(r)return Jne(r,e)}}function eie(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){let s=Math.floor((n+i)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(a=r?o:void 0,n=s+1):i=s-1}return a}function tie(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t);for(;n>0;){n--;let i=r.content[n];if(e||!i.hidden)return i}t=r}}function mNe(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t),i=r.content.length-1;for(;n<i;){n++;let a=r.content[n];if(e||!a.hidden)return a}t=r}}function vNe(t){if(t.range.start.character===0)return t;let e=t.range.start.line,r=t,n;for(;t.container;){let i=t.container,a=n??i.content.indexOf(t);if(a===0?(t=i,n=void 0):(n=a-1,t=i.content[n]),t.range.start.line!==e)break;r=t}return r}function yNe(t,e){let r=xNe(t,e);return r?r.parent.content.slice(r.a+1,r.b):[]}function xNe(t,e){let r=Zne(t),n=Zne(e),i;for(let a=0;a<r.length&&a<n.length;a++){let s=r[a],o=n[a];if(s.parent===o.parent)i={parent:s.parent,a:s.index,b:o.index};else break}return i}function Zne(t){let e=[];for(;t.container;){let r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r}return e.reverse()}var Au,Ow,yl=F(()=>{Mo();xs();(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside"})(Au||(Au={}));Ow=/^[\\w\\p{L}]$/u});function Vh(t){throw new Error("Error! The input value was not handled.")}var Rd,Bw=F(()=>{Rd=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}});var py={};mr(py,{AbstractElement:()=>D9,AbstractRule:()=>uy,AbstractType:()=>hy,Action:()=>lL,Alternatives:()=>cL,ArrayLiteral:()=>O9,ArrayType:()=>P9,Assignment:()=>uL,BooleanLiteral:()=>F9,CharacterRange:()=>hL,Condition:()=>Fw,Conjunction:()=>$9,CrossReference:()=>dL,Disjunction:()=>U9,EndOfFile:()=>pL,Grammar:()=>W9,GrammarImport:()=>nie,Group:()=>mL,InferredType:()=>H9,Interface:()=>q9,Keyword:()=>vL,LangiumGrammarAstReflection:()=>bg,LangiumGrammarTerminals:()=>bNe,NamedArgument:()=>iie,NegatedToken:()=>yL,Negation:()=>Y9,NumberLiteral:()=>j9,Parameter:()=>K9,ParameterReference:()=>Z9,ParserRule:()=>J9,ReferenceType:()=>eL,RegexToken:()=>bL,ReturnType:()=>aie,RuleCall:()=>kL,SimpleType:()=>nL,StringLiteral:()=>iL,TerminalAlternatives:()=>TL,TerminalGroup:()=>SL,TerminalRule:()=>$w,TerminalRuleCall:()=>AL,Type:()=>aL,TypeAttribute:()=>sie,TypeDefinition:()=>M9,UnionType:()=>sL,UnorderedGroup:()=>_L,UntilToken:()=>LL,ValueLiteral:()=>zw,Wildcard:()=>NL,isAbstractElement:()=>fy,isAbstractRule:()=>wNe,isAbstractType:()=>kNe,isAction:()=>_u,isAlternatives:()=>Ww,isArrayLiteral:()=>ANe,isArrayType:()=>B9,isAssignment:()=>xl,isBooleanLiteral:()=>z9,isCharacterRange:()=>fL,isCondition:()=>TNe,isConjunction:()=>G9,isCrossReference:()=>Nd,isDisjunction:()=>V9,isEndOfFile:()=>gL,isFeatureName:()=>ENe,isGrammar:()=>_Ne,isGrammarImport:()=>LNe,isGroup:()=>Wh,isInferredType:()=>Gw,isInterface:()=>Uw,isKeyword:()=>Oo,isNamedArgument:()=>RNe,isNegatedToken:()=>xL,isNegation:()=>X9,isNumberLiteral:()=>NNe,isParameter:()=>INe,isParameterReference:()=>Q9,isParserRule:()=>Ta,isPrimitiveType:()=>rie,isReferenceType:()=>tL,isRegexToken:()=>wL,isReturnType:()=>rL,isRuleCall:()=>bl,isSimpleType:()=>Vw,isStringLiteral:()=>MNe,isTerminalAlternatives:()=>EL,isTerminalGroup:()=>CL,isTerminalRule:()=>Do,isTerminalRuleCall:()=>Hw,isType:()=>dy,isTypeAttribute:()=>DNe,isTypeDefinition:()=>SNe,isUnionType:()=>oL,isUnorderedGroup:()=>qw,isUntilToken:()=>RL,isValueLiteral:()=>CNe,isWildcard:()=>IL,reflection:()=>rr});function wNe(t){return rr.isInstance(t,uy)}function kNe(t){return rr.isInstance(t,hy)}function TNe(t){return rr.isInstance(t,Fw)}function ENe(t){return rie(t)||t==="current"||t==="entry"||t==="extends"||t==="false"||t==="fragment"||t==="grammar"||t==="hidden"||t==="import"||t==="interface"||t==="returns"||t==="terminal"||t==="true"||t==="type"||t==="infer"||t==="infers"||t==="with"||typeof t=="string"&&/\\^?[_a-zA-Z][\\w_]*/.test(t)}function rie(t){return t==="string"||t==="number"||t==="boolean"||t==="Date"||t==="bigint"}function SNe(t){return rr.isInstance(t,M9)}function CNe(t){return rr.isInstance(t,zw)}function fy(t){return rr.isInstance(t,D9)}function ANe(t){return rr.isInstance(t,O9)}function B9(t){return rr.isInstance(t,P9)}function z9(t){return rr.isInstance(t,F9)}function G9(t){return rr.isInstance(t,$9)}function V9(t){return rr.isInstance(t,U9)}function _Ne(t){return rr.isInstance(t,W9)}function LNe(t){return rr.isInstance(t,nie)}function Gw(t){return rr.isInstance(t,H9)}function Uw(t){return rr.isInstance(t,q9)}function RNe(t){return rr.isInstance(t,iie)}function X9(t){return rr.isInstance(t,Y9)}function NNe(t){return rr.isInstance(t,j9)}function INe(t){return rr.isInstance(t,K9)}function Q9(t){return rr.isInstance(t,Z9)}function Ta(t){return rr.isInstance(t,J9)}function tL(t){return rr.isInstance(t,eL)}function rL(t){return rr.isInstance(t,aie)}function Vw(t){return rr.isInstance(t,nL)}function MNe(t){return rr.isInstance(t,iL)}function Do(t){return rr.isInstance(t,$w)}function dy(t){return rr.isInstance(t,aL)}function DNe(t){return rr.isInstance(t,sie)}function oL(t){return rr.isInstance(t,sL)}function _u(t){return rr.isInstance(t,lL)}function Ww(t){return rr.isInstance(t,cL)}function xl(t){return rr.isInstance(t,uL)}function fL(t){return rr.isInstance(t,hL)}function Nd(t){return rr.isInstance(t,dL)}function gL(t){return rr.isInstance(t,pL)}function Wh(t){return rr.isInstance(t,mL)}function Oo(t){return rr.isInstance(t,vL)}function xL(t){return rr.isInstance(t,yL)}function wL(t){return rr.isInstance(t,bL)}function bl(t){return rr.isInstance(t,kL)}function EL(t){return rr.isInstance(t,TL)}function CL(t){return rr.isInstance(t,SL)}function Hw(t){return rr.isInstance(t,AL)}function qw(t){return rr.isInstance(t,_L)}function RL(t){return rr.isInstance(t,LL)}function IL(t){return rr.isInstance(t,NL)}var bNe,uy,hy,Fw,M9,zw,D9,O9,P9,F9,$9,U9,W9,nie,H9,q9,iie,Y9,j9,K9,Z9,J9,eL,aie,nL,iL,$w,aL,sie,sL,lL,cL,uL,hL,dL,pL,mL,vL,yL,bL,kL,TL,SL,AL,_L,LL,NL,bg,rr,vc=F(()=>{Mo();bNe={ID:/\\^?[_a-zA-Z][\\w_]*/,STRING:/"(\\\\.|[^"\\\\])*"|\'(\\\\.|[^\'\\\\])*\'/,NUMBER:/NaN|-?((\\d*\\.\\d+|\\d+)([Ee][+-]?\\d+)?|Infinity)/,RegexLiteral:/\\/(?![*+?])(?:[^\\r\\n\\[/\\\\]|\\\\.|\\[(?:[^\\r\\n\\]\\\\]|\\\\.)*\\])+\\/[a-z]*/,WS:/\\s+/,ML_COMMENT:/\\/\\*[\\s\\S]*?\\*\\//,SL_COMMENT:/\\/\\/[^\\n\\r]*/},uy="AbstractRule";hy="AbstractType";Fw="Condition";M9="TypeDefinition";zw="ValueLiteral";D9="AbstractElement";O9="ArrayLiteral";P9="ArrayType";F9="BooleanLiteral";$9="Conjunction";U9="Disjunction";W9="Grammar";nie="GrammarImport";H9="InferredType";q9="Interface";iie="NamedArgument";Y9="Negation";j9="NumberLiteral";K9="Parameter";Z9="ParameterReference";J9="ParserRule";eL="ReferenceType";aie="ReturnType";nL="SimpleType";iL="StringLiteral";$w="TerminalRule";aL="Type";sie="TypeAttribute";sL="UnionType";lL="Action";cL="Alternatives";uL="Assignment";hL="CharacterRange";dL="CrossReference";pL="EndOfFile";mL="Group";vL="Keyword";yL="NegatedToken";bL="RegexToken";kL="RuleCall";TL="TerminalAlternatives";SL="TerminalGroup";AL="TerminalRuleCall";_L="UnorderedGroup";LL="UntilToken";NL="Wildcard";bg=class extends Cd{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,r){switch(e){case lL:case cL:case uL:case hL:case dL:case pL:case mL:case vL:case yL:case bL:case kL:case TL:case SL:case AL:case _L:case LL:case NL:return this.isSubtype(D9,r);case O9:case j9:case iL:return this.isSubtype(zw,r);case P9:case eL:case nL:case sL:return this.isSubtype(M9,r);case F9:return this.isSubtype(Fw,r)||this.isSubtype(zw,r);case $9:case U9:case Y9:case Z9:return this.isSubtype(Fw,r);case H9:case q9:case aL:return this.isSubtype(hy,r);case J9:return this.isSubtype(uy,r)||this.isSubtype(hy,r);case $w:return this.isSubtype(uy,r);default:return!1}}getReferenceType(e){let r=`${e.container.$type}:${e.property}`;switch(r){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return hy;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return uy;case"Grammar:usedGrammars":return W9;case"NamedArgument:parameter":case"ParameterReference:parameter":return K9;case"TerminalRuleCall:rule":return $w;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},rr=new bg});var Xw={};mr(Xw,{assignMandatoryProperties:()=>OL,copyAstNode:()=>DL,findLocalReferences:()=>PNe,findRootNode:()=>oie,getContainerOfType:()=>Id,getDocument:()=>Ci,hasContainerOfType:()=>ONe,linkContentToContainer:()=>Yw,streamAllContents:()=>yc,streamAst:()=>Po,streamContents:()=>gy,streamReferences:()=>wg});function Yw(t){for(let[e,r]of Object.entries(t))e.startsWith("$")||(Array.isArray(r)?r.forEach((n,i)=>{Yn(n)&&(n.$container=t,n.$containerProperty=e,n.$containerIndex=i)}):Yn(r)&&(r.$container=t,r.$containerProperty=e))}function Id(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function ONe(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function Ci(t){let r=oie(t).$document;if(!r)throw new Error("AST node has no document.");return r}function oie(t){for(;t.$container;)t=t.$container;return t}function gy(t,e){if(!t)throw new Error("Node must be an AstNode.");let r=e?.range;return new Ys(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){let i=n.keys[n.keyIndex];if(!i.startsWith("$")){let a=t[i];if(Yn(a)){if(n.keyIndex++,ML(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){let s=n.arrayIndex++,o=a[s];if(Yn(o)&&ML(o,r))return{done:!1,value:o}}n.arrayIndex=0}}n.keyIndex++}return Va})}function yc(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new mc(t,r=>gy(r,e))}function Po(t,e){if(t){if(e?.range&&!ML(t,e.range))return new mc(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new mc(t,r=>gy(r,e),{includeRoot:!0})}function ML(t,e){var r;if(!e)return!0;let n=(r=t.$cstNode)===null||r===void 0?void 0:r.range;return n?R9(n,e):!1}function wg(t){return new Ys(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){let r=e.keys[e.keyIndex];if(!r.startsWith("$")){let n=t[r];if(oa(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){let i=e.arrayIndex++,a=n[i];if(oa(a))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Va})}function PNe(t,e=Ci(t).parseResult.value){let r=[];return Po(e).forEach(n=>{wg(n).forEach(i=>{i.reference.ref===t&&r.push(i.reference)})}),Yr(r)}function OL(t,e){let r=t.getTypeMetaData(e.$type),n=e;for(let i of r.properties)i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=lie(i.defaultValue))}function lie(t){return Array.isArray(t)?[...t.map(lie)]:t}function DL(t,e){let r={$type:t.$type};for(let[n,i]of Object.entries(t))if(!n.startsWith("$"))if(Yn(i))r[n]=DL(i,e);else if(oa(i))r[n]=e(r,n,i.$refNode,i.$refText);else if(Array.isArray(i)){let a=[];for(let s of i)Yn(s)?a.push(DL(s,e)):oa(s)?a.push(e(r,n,s.$refNode,s.$refText)):a.push(s);r[n]=a}else r[n]=i;return Yw(r),r}var Wa=F(()=>{Mo();xs();yl()});function Qt(t){return t.charCodeAt(0)}function jw(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function kg(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function Md(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function my(){throw Error("Internal Error - Should never get here!")}function PL(t){return t.type==="Character"}var BL=F(()=>{});var vy,yy,FL,cie=F(()=>{BL();vy=[];for(let t=Qt("0");t<=Qt("9");t++)vy.push(t);yy=[Qt("_")].concat(vy);for(let t=Qt("a");t<=Qt("z");t++)yy.push(t);for(let t=Qt("A");t<=Qt("Z");t++)yy.push(t);FL=[Qt(" "),Qt("\\f"),Qt(`\n`),Qt("\\r"),Qt(" "),Qt("\\v"),Qt(" "),Qt("\\xA0"),Qt("\\u1680"),Qt("\\u2000"),Qt("\\u2001"),Qt("\\u2002"),Qt("\\u2003"),Qt("\\u2004"),Qt("\\u2005"),Qt("\\u2006"),Qt("\\u2007"),Qt("\\u2008"),Qt("\\u2009"),Qt("\\u200A"),Qt("\\u2028"),Qt("\\u2029"),Qt("\\u202F"),Qt("\\u205F"),Qt("\\u3000"),Qt("\\uFEFF")]});var BNe,Kw,FNe,Dd,uie=F(()=>{BL();cie();BNe=/[0-9a-fA-F]/,Kw=/[0-9]/,FNe=/[1-9]/,Dd=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":kg(n,"global");break;case"i":kg(n,"ignoreCase");break;case"m":kg(n,"multiLine");break;case"u":kg(n,"unicode");break;case"y":kg(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}Md(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return my()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;Md(r);break}if(!(e===!0&&r===void 0)&&Md(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Md(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):my()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Qt(`\n`),Qt("\\r"),Qt("\\u2028"),Qt("\\u2029")]}}atomEscape(){switch(this.consumeChar("\\\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=vy;break;case"D":e=vy,r=!0;break;case"s":e=FL;break;case"S":e=FL,r=!0;break;case"w":e=yy;break;case"W":e=yy,r=!0;break}return Md(e)?{type:"Set",value:e,complement:r}:my()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Qt("\\f");break;case"n":e=Qt(`\n`);break;case"r":e=Qt("\\r");break;case"t":e=Qt(" ");break;case"v":e=Qt("\\v");break}return Md(e)?{type:"Character",value:e}:my()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Qt("\\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:Qt(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`\n`:case"\\r":case"\\u2028":case"\\u2029":case"\\\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:Qt(e)}}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(PL(n)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),s=a.type==="Character";if(PL(a)){if(a.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:a.value})}else jw(n.value,e),e.push(Qt("-")),jw(a.value,e)}else jw(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:r,value:e}}classAtom(){switch(this.peekChar()){case"]":case`\n`:case"\\r":case"\\u2028":case"\\u2029":throw Error("TBD");case"\\\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Qt("\\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(FNe.test(e)===!1)throw Error("Expecting a positive integer");for(;Kw.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Kw.test(e)===!1)throw Error("Expecting an integer");for(;Kw.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`\n`:case"\\r":case"\\u2028":case"\\u2029":case"^":case"$":case"\\\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Qt(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return Kw.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`\n`:case"\\r":case"\\u2028":case"\\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`\n`:case"\\r":case"\\u2028":case"\\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let i=0;i<e;i++){let a=this.popChar();if(BNe.test(a)===!1)throw Error("Expecting a HexDecimal digits");r+=a}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: \'"+e+"\' but found: \'"+this.input[this.idx]+"\' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}});var xc,hie=F(()=>{xc=class{visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}});var xy=F(()=>{uie();hie()});var Qw={};mr(Qw,{NEWLINE_REGEXP:()=>$L,escapeRegExp:()=>Pd,getCaseInsensitivePattern:()=>UL,getTerminalParts:()=>zNe,isMultilineComment:()=>GL,isWhitespace:()=>Zw,partialMatches:()=>VL,partialRegExp:()=>die});function zNe(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;let e=fie.pattern(t),r=[];for(let n of e.value.value)Od.reset(t),Od.visit(n),r.push({start:Od.startRegexp,end:Od.endRegex});return r}catch{return[]}}function GL(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Od.reset(t),Od.visit(fie.pattern(t)),Od.multiline}catch{return!1}}function Zw(t){return(typeof t=="string"?new RegExp(t):t).test(" ")}function Pd(t){return t.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function UL(t){return Array.prototype.map.call(t,e=>/\\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:Pd(e)).join("")}function VL(t,e){let r=die(t),n=e.match(r);return!!n&&n[0].length>0}function die(t){typeof t=="string"&&(t=new RegExp(t));let e=t,r=t.source,n=0;function i(){let a="",s;function o(u){a+=r.substr(n,u),n+=u}function l(u){a+="(?:"+r.substr(n,u)+"|$)",n+=u}for(;n<r.length;)switch(r[n]){case"\\\\":switch(r[n+1]){case"c":l(3);break;case"x":l(4);break;case"u":e.unicode?r[n+2]==="{"?l(r.indexOf("}",n)-n+1):l(6):l(2);break;case"p":case"P":e.unicode?l(r.indexOf("}",n)-n+1):l(2);break;case"k":l(r.indexOf(">",n)-n+1);break;default:l(2);break}break;case"[":s=/\\[(?:\\\\.|.)*?\\]/g,s.lastIndex=n,s=s.exec(r)||[],l(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":s=/\\{\\d+,?\\d*\\}/g,s.lastIndex=n,s=s.exec(r),s?o(s[0].length):l(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":s=n,n+=3,i(),a+=r.substr(s,n-s);break;case"<":switch(r[n+3]){case"=":case"!":s=n,n+=4,i(),a+=r.substr(s,n-s);break;default:o(r.indexOf(">",n)-n+1),a+=i()+"|$)";break}break}else o(1),a+=i()+"|$)";break;case")":return++n,a;default:l(1);break}return a}return new RegExp(i(),t.flags)}var $L,fie,zL,Od,Tg=F(()=>{xy();$L=/\\r?\\n/gm,fie=new Dd,zL=class extends xc{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let r=String.fromCharCode(e.value);if(!this.multiline&&r===`\n`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=Pd(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){let r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!`\n`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},Od=new zL});var ek={};mr(ek,{findAssignment:()=>QL,findNameAssignment:()=>Jw,findNodeForKeyword:()=>KL,findNodeForProperty:()=>wy,findNodesForKeyword:()=>$Ne,findNodesForKeywordInternal:()=>ZL,findNodesForProperty:()=>XL,getActionAtElement:()=>yie,getActionType:()=>bie,getAllReachableRules:()=>by,getCrossReferenceTerminal:()=>qL,getEntryRule:()=>pie,getExplicitRuleType:()=>JL,getHiddenRules:()=>gie,getRuleType:()=>eR,getTypeName:()=>Bd,isArrayCardinality:()=>UNe,isArrayOperator:()=>VNe,isCommentTerminal:()=>YL,isDataType:()=>WNe,isDataTypeRule:()=>ky,isOptionalCardinality:()=>GNe,terminalRegex:()=>Eg});function pie(t){return t.rules.find(e=>Ta(e)&&e.entry)}function gie(t){return t.rules.filter(e=>Do(e)&&e.hidden)}function by(t,e){let r=new Set,n=pie(t);if(!n)return new Set(t.rules);let i=[n].concat(gie(t));for(let s of i)mie(s,r,e);let a=new Set;for(let s of t.rules)(r.has(s.name)||Do(s)&&s.hidden)&&a.add(s);return a}function mie(t,e,r){e.add(t.name),yc(t).forEach(n=>{if(bl(n)||r&&Hw(n)){let i=n.rule.ref;i&&!e.has(i.name)&&mie(i,e,r)}})}function qL(t){if(t.terminal)return t.terminal;if(t.type.ref){let e=Jw(t.type.ref);return e?.terminal}}function YL(t){return t.hidden&&!Eg(t).test(" ")}function XL(t,e){return!t||!e?[]:jL(t,e,t.astNode,!0)}function wy(t,e,r){if(!t||!e)return;let n=jL(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function jL(t,e,r,n){if(!n){let i=Id(t.grammarSource,xl);if(i&&i.feature===e)return[t]}return qs(t)&&t.astNode===r?t.content.flatMap(i=>jL(i,e,r,!1)):[]}function $Ne(t,e){return t?ZL(t,e,t?.astNode):[]}function KL(t,e,r){if(!t)return;let n=ZL(t,e,t?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function ZL(t,e,r){if(t.astNode!==r)return[];if(Oo(t.grammarSource)&&t.grammarSource.value===e)return[t];let n=_d(t).iterator(),i,a=[];do if(i=n.next(),!i.done){let s=i.value;s.astNode===r?Oo(s.grammarSource)&&s.grammarSource.value===e&&a.push(s):n.prune()}while(!i.done);return a}function QL(t){var e;let r=t.astNode;for(;r===((e=t.container)===null||e===void 0?void 0:e.astNode);){let n=Id(t.grammarSource,xl);if(n)return n;t=t.container}}function Jw(t){let e=t;return Gw(e)&&(_u(e.$container)?e=e.$container.$container:Ta(e.$container)?e=e.$container:Vh(e.$container)),vie(t,e,new Map)}function vie(t,e,r){var n;function i(a,s){let o;return Id(a,xl)||(o=vie(s,s,r)),r.set(t,o),o}if(r.has(t))return r.get(t);r.set(t,void 0);for(let a of yc(e)){if(xl(a)&&a.feature.toLowerCase()==="name")return r.set(t,a),a;if(bl(a)&&Ta(a.rule.ref))return i(a,a.rule.ref);if(Vw(a)&&(!((n=a.typeRef)===null||n===void 0)&&n.ref))return i(a,a.typeRef.ref)}}function yie(t){let e=t.$container;if(Wh(e)){let r=e.elements,n=r.indexOf(t);for(let i=n-1;i>=0;i--){let a=r[i];if(_u(a))return a;{let s=yc(r[i]).find(_u);if(s)return s}}}if(fy(e))return yie(e)}function GNe(t,e){return t==="?"||t==="*"||Wh(e)&&!!e.guardCondition}function UNe(t){return t==="*"||t==="+"}function VNe(t){return t==="+="}function ky(t){return xie(t,new Set)}function xie(t,e){if(e.has(t))return!0;e.add(t);for(let r of yc(t))if(bl(r)){if(!r.rule.ref||Ta(r.rule.ref)&&!xie(r.rule.ref,e))return!1}else{if(xl(r))return!1;if(_u(r))return!1}return!!t.definition}function WNe(t){return HL(t.type,new Set)}function HL(t,e){if(e.has(t))return!0;if(e.add(t),B9(t))return!1;if(tL(t))return!1;if(oL(t))return t.types.every(r=>HL(r,e));if(Vw(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){let r=t.typeRef.ref;return dy(r)?HL(r.type,e):!1}else return!1}else return!1}function JL(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){let e=t.returnType.ref;if(e){if(Ta(e))return e.name;if(Uw(e)||dy(e))return e.name}}}function Bd(t){var e;if(Ta(t))return ky(t)?t.name:(e=JL(t))!==null&&e!==void 0?e:t.name;if(Uw(t)||dy(t)||rL(t))return t.name;if(_u(t)){let r=bie(t);if(r)return r}else if(Gw(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function bie(t){var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return Bd(t.type.ref)}function eR(t){var e,r,n;return Do(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":ky(t)?t.name:(n=JL(t))!==null&&n!==void 0?n:t.name}function Eg(t){let e={s:!1,i:!1,u:!1},r=Sg(t.definition,e),n=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}function Sg(t,e){if(EL(t))return HNe(t);if(CL(t))return qNe(t);if(fL(t))return jNe(t);if(Hw(t)){let r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return Lu(Sg(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else{if(xL(t))return XNe(t);if(RL(t))return YNe(t);if(wL(t)){let r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),i=t.regex.substring(r+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),Lu(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else{if(IL(t))return Lu(tR,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t?.$type}`)}}}function HNe(t){return Lu(t.elements.map(e=>Sg(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function qNe(t){return Lu(t.elements.map(e=>Sg(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function YNe(t){return Lu(`${tR}*?${Sg(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function XNe(t){return Lu(`(?!${Sg(t.terminal)})${tR}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function jNe(t){return t.right?Lu(`[${WL(t.left)}-${WL(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):Lu(WL(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function WL(t){return Pd(t.value)}function Lu(t,e){var r;return(e.wrap!==!1||e.lookahead)&&(t=`(${(r=e.lookahead)!==null&&r!==void 0?r:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t}var tR,wl=F(()=>{Bw();vc();Mo();Wa();yl();Tg();tR=/[\\s\\S]/.source});function rR(t){let e=[],r=t.Grammar;for(let n of r.rules)Do(n)&&YL(n)&&GL(Eg(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:Ow}}var nR=F(()=>{yl();wl();Tg();vc()});var iR=F(()=>{});function Cg(t){console&&console.error&&console.error(`Error: ${t}`)}function Ty(t){console&&console.warn&&console.warn(`Warning: ${t}`)}var wie=F(()=>{});function Ey(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}var kie=F(()=>{});function Sy(t){function e(){}e.prototype=t;let r=new e;function n(){return typeof r.bar}return n(),n(),t;(0,eval)(t)}var Tie=F(()=>{});var Ag=F(()=>{wie();kie();Tie()});function KNe(t){return ZNe(t)?t.LABEL:t.name}function ZNe(t){return li(t.LABEL)&&t.LABEL!==""}function tk(t){return Ke(t,_g)}function _g(t){function e(r){return Ke(r,_g)}if(t instanceof jr){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return li(t.label)&&(r.label=t.label),r}else{if(t instanceof wn)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Kr)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof kn)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Tn)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:_g(new dr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof fn)return{type:"RepetitionWithSeparator",idx:t.idx,separator:_g(new dr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof br)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof dn)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof dr){let r={type:"Terminal",name:t.terminalType.name,label:KNe(t.terminalType),idx:t.idx};li(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=So(n)?n.source:n),r}else{if(t instanceof Ha)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var Xs,jr,Ha,wn,Kr,kn,Tn,br,fn,dn,dr,rk=F(()=>{Pt();Xs=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),Te(this.definition,r=>{r.accept(e)})}},jr=class extends Xs{constructor(e){super([]),this.idx=1,na(this,ms(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Ha=class extends Xs{constructor(e){super(e.definition),this.orgText="",na(this,ms(e,r=>r!==void 0))}},wn=class extends Xs{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,na(this,ms(e,r=>r!==void 0))}},Kr=class extends Xs{constructor(e){super(e.definition),this.idx=1,na(this,ms(e,r=>r!==void 0))}},kn=class extends Xs{constructor(e){super(e.definition),this.idx=1,na(this,ms(e,r=>r!==void 0))}},Tn=class extends Xs{constructor(e){super(e.definition),this.idx=1,na(this,ms(e,r=>r!==void 0))}},br=class extends Xs{constructor(e){super(e.definition),this.idx=1,na(this,ms(e,r=>r!==void 0))}},fn=class extends Xs{constructor(e){super(e.definition),this.idx=1,na(this,ms(e,r=>r!==void 0))}},dn=class extends Xs{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,na(this,ms(e,r=>r!==void 0))}},dr=class{constructor(e){this.idx=1,na(this,ms(e,r=>r!==void 0))}accept(e){e.visit(this)}}});var qa,Eie=F(()=>{rk();qa=class{visit(e){let r=e;switch(r.constructor){case jr:return this.visitNonTerminal(r);case wn:return this.visitAlternative(r);case Kr:return this.visitOption(r);case kn:return this.visitRepetitionMandatory(r);case Tn:return this.visitRepetitionMandatoryWithSeparator(r);case fn:return this.visitRepetitionWithSeparator(r);case br:return this.visitRepetition(r);case dn:return this.visitAlternation(r);case dr:return this.visitTerminal(r);case Ha:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}});function aR(t){return t instanceof wn||t instanceof Kr||t instanceof br||t instanceof kn||t instanceof Tn||t instanceof fn||t instanceof dr||t instanceof Ha}function Fd(t,e=[]){return t instanceof Kr||t instanceof br||t instanceof fn?!0:t instanceof dn?Hv(t.definition,n=>Fd(n,e)):t instanceof jr&&Bn(e,t)?!1:t instanceof Xs?(t instanceof jr&&e.push(t),wa(t.definition,n=>Fd(n,e))):!1}function sR(t){return t instanceof dn}function bs(t){if(t instanceof jr)return"SUBRULE";if(t instanceof Kr)return"OPTION";if(t instanceof dn)return"OR";if(t instanceof kn)return"AT_LEAST_ONE";if(t instanceof Tn)return"AT_LEAST_ONE_SEP";if(t instanceof fn)return"MANY_SEP";if(t instanceof br)return"MANY";if(t instanceof dr)return"CONSUME";throw Error("non exhaustive match")}var Sie=F(()=>{Pt();rk()});var Ya=F(()=>{rk();Eie();Sie()});function Cie(t,e,r){return[new Kr({definition:[new dr({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var Ru,nk=F(()=>{Pt();Ya();Ru=class{walk(e,r=[]){Te(e.definition,(n,i)=>{let a=oi(e.definition,i+1);if(n instanceof jr)this.walkProdRef(n,a,r);else if(n instanceof dr)this.walkTerminal(n,a,r);else if(n instanceof wn)this.walkFlat(n,a,r);else if(n instanceof Kr)this.walkOption(n,a,r);else if(n instanceof kn)this.walkAtLeastOne(n,a,r);else if(n instanceof Tn)this.walkAtLeastOneSep(n,a,r);else if(n instanceof fn)this.walkManySep(n,a,r);else if(n instanceof br)this.walkMany(n,a,r);else if(n instanceof dn)this.walkOr(n,a,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i)}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i)}walkAtLeastOne(e,r,n){let i=[new Kr({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=Cie(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new Kr({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=Cie(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);Te(e.definition,a=>{let s=new wn({definition:[a]});this.walk(s,i)})}}});function zd(t){if(t instanceof jr)return zd(t.referencedRule);if(t instanceof dr)return eIe(t);if(aR(t))return QNe(t);if(sR(t))return JNe(t);throw Error("non exhaustive match")}function QNe(t){let e=[],r=t.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=Fd(a),e=e.concat(zd(a)),n=n+1,i=r.length>n;return og(e)}function JNe(t){let e=Ke(t.definition,r=>zd(r));return og(Br(e))}function eIe(t){return[t.terminalType]}var oR=F(()=>{Pt();Ya()});var ik,lR=F(()=>{ik="_~IN~_"});function Aie(t){let e={};return Te(t,r=>{let n=new cR(r).startWalking();na(e,n)}),e}function tIe(t,e){return t.name+e+ik}var cR,_ie=F(()=>{nk();oR();Pt();lR();Ya();cR=class extends Ru{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=tIe(e.referencedRule,e.idx)+this.topProd.name,a=r.concat(n),s=new wn({definition:a}),o=zd(s);this.follows[i]=o}}});function Lg(t){let e=t.toString();if(ak.hasOwnProperty(e))return ak[e];{let r=rIe.pattern(e);return ak[e]=r,r}}function Lie(){ak={}}var ak,rIe,sk=F(()=>{xy();ak={},rIe=new Dd});function Iie(t,e=!1){try{let r=Lg(t);return uR(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Nie)e&&Ty(`${Cy} Unable to optimize: < ${t.toString()} >\n Complement Sets cannot be automatically optimized.\n This will disable the lexer\'s first char optimizations.\n See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n=`\n This will disable the lexer\'s first char optimizations.\n See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Cg(`${Cy}\n Failed parsing: < ${t.toString()} >\n Using the @chevrotain/regexp-to-ast library\n Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function uR(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)uR(t.value[i],e,r);break;case"Alternative":let n=t.value;for(let i=0;i<n.length;i++){let a=n[i];switch(a.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let s=a;switch(s.type){case"Character":ok(s.value,e,r);break;case"Set":if(s.complement===!0)throw Error(Nie);Te(s.value,l=>{if(typeof l=="number")ok(l,e,r);else{let u=l;if(r===!0)for(let h=u.from;h<=u.to;h++)ok(h,e,r);else{for(let h=u.from;h<=u.to&&h<Rg;h++)ok(h,e,r);if(u.to>=Rg){let h=u.from>=Rg?u.from:Rg,f=u.to,d=bc(h),p=bc(f);for(let g=d;g<=p;g++)e[g]=g}}}});break;case"Group":uR(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}let o=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&hR(s)===!1||s.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return hr(e)}function ok(t,e,r){let n=bc(t);e[n]=n,r===!0&&nIe(t,e)}function nIe(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=bc(n.charCodeAt(0));e[i]=i}else{let i=r.toLowerCase();if(i!==r){let a=bc(i.charCodeAt(0));e[a]=a}}}function Rie(t,e){return Ga(t.value,r=>{if(typeof r=="number")return Bn(e,r);{let n=r;return Ga(e,i=>n.from<=i&&i<=n.to)!==void 0}})}function hR(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?At(t.value)?wa(t.value,hR):hR(t.value):!1}function lk(t,e){if(e instanceof RegExp){let r=Lg(e),n=new fR(t);return n.visit(r),n.found}else return Ga(e,r=>Bn(t,r.charCodeAt(0)))!==void 0}var Nie,Cy,fR,Mie=F(()=>{xy();Pt();Ag();sk();dR();Nie="Complement Sets are not supported for first char optimization",Cy=`Unable to use "first char" lexer optimizations:\n`;fR=class extends xc{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){Bn(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Rie(e,this.targetCharCodes)===void 0&&(this.found=!0):Rie(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}});function Pie(t,e){e=Nh(e,{useSticky:gR,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\\r",`\n`],tracer:(b,w)=>w()});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{wIe()});let n;r("Reject Lexer.NA",()=>{n=Mh(t,b=>b[$d]===Jn.NA)});let i=!1,a;r("Transform Patterns",()=>{i=!1,a=Ke(n,b=>{let w=b[$d];if(So(w)){let _=w.source;return _.length===1&&_!=="^"&&_!=="$"&&_!=="."&&!w.ignoreCase?_:_.length===2&&_[0]==="\\\\"&&!Bn(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],_[1])?_[1]:e.useSticky?Oie(w):Die(w)}else{if(pi(w))return i=!0,{exec:w};if(typeof w=="object")return i=!0,w;if(typeof w=="string"){if(w.length===1)return w;{let _=w.replace(/[\\\\^$.*+?()[\\]{}|]/g,"\\\\$&"),k=new RegExp(_);return e.useSticky?Oie(k):Die(k)}}else throw Error("non exhaustive match")}})});let s,o,l,u,h;r("misc mapping",()=>{s=Ke(n,b=>b.tokenTypeIdx),o=Ke(n,b=>{let w=b.GROUP;if(w!==Jn.SKIPPED){if(li(w))return w;if(ar(w))return!1;throw Error("non exhaustive match")}}),l=Ke(n,b=>{let w=b.LONGER_ALT;if(w)return At(w)?Ke(w,k=>H5(n,k)):[H5(n,w)]}),u=Ke(n,b=>b.PUSH_MODE),h=Ke(n,b=>_t(b,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let b=Wie(e.lineTerminatorCharacters);f=Ke(n,w=>!1),e.positionTracking!=="onlyOffset"&&(f=Ke(n,w=>_t(w,"LINE_BREAKS")?!!w.LINE_BREAKS:Vie(w,b)===!1&&lk(b,w.PATTERN)))});let d,p,g,m;r("Misc Mapping #2",()=>{d=Ke(n,Gie),p=Ke(a,xIe),g=zr(n,(b,w)=>{let _=w.GROUP;return li(_)&&_!==Jn.SKIPPED&&(b[_]=[]),b},{}),m=Ke(a,(b,w)=>({pattern:a[w],longerAlt:l[w],canLineTerminator:f[w],isCustom:d[w],short:p[w],group:o[w],push:u[w],pop:h[w],tokenTypeIdx:s[w],tokenType:n[w]}))});let x=!0,y=[];return e.safeMode||r("First Char Optimization",()=>{y=zr(n,(b,w,_)=>{if(typeof w.PATTERN=="string"){let k=w.PATTERN.charCodeAt(0),E=bc(k);pR(b,E,m[_])}else if(At(w.START_CHARS_HINT)){let k;Te(w.START_CHARS_HINT,E=>{let L=typeof E=="string"?E.charCodeAt(0):E,S=bc(L);k!==S&&(k=S,pR(b,S,m[_]))})}else if(So(w.PATTERN))if(w.PATTERN.unicode)x=!1,e.ensureOptimizations&&Cg(`${Cy} Unable to analyze < ${w.PATTERN.toString()} > pattern.\n The regexp unicode flag is not currently supported by the regexp-to-ast library.\n This will disable the lexer\'s first char optimizations.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let k=Iie(w.PATTERN,e.ensureOptimizations);nr(k)&&(x=!1),Te(k,E=>{pR(b,E,m[_])})}else e.ensureOptimizations&&Cg(`${Cy} TokenType: <${w.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n This will disable the lexer\'s first char optimizations.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),x=!1;return b},[])}),{emptyGroups:g,patternIdxToConfig:m,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:x}}function Bie(t,e){let r=[],n=aIe(t);r=r.concat(n.errors);let i=sIe(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(iIe(a)),r=r.concat(pIe(a)),r=r.concat(gIe(a,e)),r=r.concat(mIe(a)),r}function iIe(t){let e=[],r=Fr(t,n=>So(n[$d]));return e=e.concat(lIe(r)),e=e.concat(hIe(r)),e=e.concat(fIe(r)),e=e.concat(dIe(r)),e=e.concat(cIe(r)),e}function aIe(t){let e=Fr(t,i=>!_t(i,$d)),r=Ke(e,i=>({message:"Token Type: ->"+i.name+"<- missing static \'PATTERN\' property",type:Fn.MISSING_PATTERN,tokenTypes:[i]})),n=Ih(t,e);return{errors:r,valid:n}}function sIe(t){let e=Fr(t,i=>{let a=i[$d];return!So(a)&&!pi(a)&&!_t(a,"exec")&&!li(a)}),r=Ke(e,i=>({message:"Token Type: ->"+i.name+"<- static \'PATTERN\' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Fn.INVALID_PATTERN,tokenTypes:[i]})),n=Ih(t,e);return{errors:r,valid:n}}function lIe(t){class e extends xc{constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}let r=Fr(t,i=>{let a=i.PATTERN;try{let s=Lg(a),o=new e;return o.visit(s),o.found}catch{return oIe.test(a.source)}});return Ke(r,i=>({message:`Unexpected RegExp Anchor Error:\n Token Type: ->`+i.name+`<- static \'PATTERN\' cannot contain end of input anchor \'$\'\n See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Fn.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function cIe(t){let e=Fr(t,n=>n.PATTERN.test(""));return Ke(e,n=>({message:"Token Type: ->"+n.name+"<- static \'PATTERN\' must not match an empty string",type:Fn.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function hIe(t){class e extends xc{constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}let r=Fr(t,i=>{let a=i.PATTERN;try{let s=Lg(a),o=new e;return o.visit(s),o.found}catch{return uIe.test(a.source)}});return Ke(r,i=>({message:`Unexpected RegExp Anchor Error:\n Token Type: ->`+i.name+`<- static \'PATTERN\' cannot contain start of input anchor \'^\'\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Fn.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function fIe(t){let e=Fr(t,n=>{let i=n[$d];return i instanceof RegExp&&(i.multiline||i.global)});return Ke(e,n=>({message:"Token Type: ->"+n.name+"<- static \'PATTERN\' may NOT contain global(\'g\') or multiline(\'m\')",type:Fn.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function dIe(t){let e=[],r=Ke(t,a=>zr(t,(s,o)=>(a.PATTERN.source===o.PATTERN.source&&!Bn(e,o)&&o.PATTERN!==Jn.NA&&(e.push(o),s.push(o)),s),[]));r=cc(r);let n=Fr(r,a=>a.length>1);return Ke(n,a=>{let s=Ke(a,l=>l.name);return{message:`The same RegExp pattern ->${Wi(a).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:Fn.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}function pIe(t){let e=Fr(t,n=>{if(!_t(n,"GROUP"))return!1;let i=n.GROUP;return i!==Jn.SKIPPED&&i!==Jn.NA&&!li(i)});return Ke(e,n=>({message:"Token Type: ->"+n.name+"<- static \'GROUP\' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Fn.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function gIe(t,e){let r=Fr(t,i=>i.PUSH_MODE!==void 0&&!Bn(e,i.PUSH_MODE));return Ke(r,i=>({message:`Token Type: ->${i.name}<- static \'PUSH_MODE\' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Fn.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function mIe(t){let e=[],r=zr(t,(n,i,a)=>{let s=i.PATTERN;return s===Jn.NA||(li(s)?n.push({str:s,idx:a,tokenType:i}):So(s)&&yIe(s)&&n.push({str:s.source,idx:a,tokenType:i})),n},[]);return Te(t,(n,i)=>{Te(r,({str:a,idx:s,tokenType:o})=>{if(i<s&&vIe(a,n.PATTERN)){let l=`Token: ->${o.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${n.name}<-in the lexer\'s definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:l,type:Fn.UNREACHABLE_PATTERN,tokenTypes:[n,o]})}})}),e}function vIe(t,e){if(So(e)){let r=e.exec(t);return r!==null&&r.index===0}else{if(pi(e))return e(t,0,[],{});if(_t(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function yIe(t){return Ga([".","\\\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}function Die(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Oie(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function Fie(t,e,r){let n=[];return _t(t,Ng)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ng+`> property in its definition\n`,type:Fn.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),_t(t,ck)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+ck+`> property in its definition\n`,type:Fn.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),_t(t,ck)&&_t(t,Ng)&&!_t(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Ng}: <${t.defaultMode}>which does not exist\n`,type:Fn.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),_t(t,ck)&&Te(t.modes,(i,a)=>{Te(i,(s,o)=>{if(ar(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${o}>\n`,type:Fn.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(_t(s,"LONGER_ALT")){let l=At(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];Te(l,u=>{!ar(u)&&!Bn(i,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${s.name}> outside of mode <${a}>\n`,type:Fn.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function zie(t,e,r){let n=[],i=!1,a=cc(Br(hr(t.modes))),s=Mh(a,l=>l[$d]===Jn.NA),o=Wie(r);return e&&Te(s,l=>{let u=Vie(l,o);if(u!==!1){let f={message:bIe(l,u),type:u.issue,tokenType:l};n.push(f)}else _t(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(i=!0):lk(o,l.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.\n This Lexer has been defined to track line and column information,\n But none of the Token Types can be identified as matching a line terminator.\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n for details.`,type:Fn.NO_LINE_BREAKS_FLAGS}),n}function $ie(t){let e={},r=Rr(t);return Te(r,n=>{let i=t[n];if(At(i))e[n]=[];else throw Error("non exhaustive match")}),e}function Gie(t){let e=t.PATTERN;if(So(e))return!1;if(pi(e))return!0;if(_t(e,"exec"))return!0;if(li(e))return!1;throw Error("non exhaustive match")}function xIe(t){return li(t)&&t.length===1?t.charCodeAt(0):!1}function Vie(t,e){if(_t(t,"LINE_BREAKS"))return!1;if(So(t.PATTERN)){try{lk(e,t.PATTERN)}catch(r){return{issue:Fn.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(li(t.PATTERN))return!1;if(Gie(t))return{issue:Fn.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function bIe(t,e){if(e.issue===Fn.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n The problem is in the <${t.name}> Token Type\n Root cause: ${e.errMsg}.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Fn.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.\n The problem is in the <${t.name}> Token Type\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function Wie(t){return Ke(t,r=>li(r)?r.charCodeAt(0):r)}function pR(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function bc(t){return t<Rg?t:uk[t]}function wIe(){if(nr(uk)){uk=new Array(65536);for(let t=0;t<65536;t++)uk[t]=t>255?255+~~(t/255):t}}var $d,Ng,ck,gR,oIe,uIe,Uie,Rg,uk,dR=F(()=>{xy();Ay();Pt();Ag();Mie();sk();$d="PATTERN",Ng="defaultMode",ck="modes",gR=typeof new RegExp("(?:)").sticky=="boolean";oIe=/[^\\\\][$]/;uIe=/[^\\\\[][\\^]|^\\^/;Uie={test:function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};Rg=256,uk=[]});function Nu(t,e){let r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}function Ig(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}function Iu(t){let e=kIe(t);TIe(e),SIe(e),EIe(e),Te(e,r=>{r.isParent=r.categoryMatches.length>0})}function kIe(t){let e=Xr(t),r=t,n=!0;for(;n;){r=cc(Br(Ke(r,a=>a.CATEGORIES)));let i=Ih(r,e);e=e.concat(i),nr(i)?n=!1:r=i}return e}function TIe(t){Te(t,e=>{mR(e)||(Yie[Hie]=e,e.tokenTypeIdx=Hie++),qie(e)&&!At(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),qie(e)||(e.CATEGORIES=[]),CIe(e)||(e.categoryMatches=[]),AIe(e)||(e.categoryMatchesMap={})})}function EIe(t){Te(t,e=>{e.categoryMatches=[],Te(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(Yie[n].tokenTypeIdx)})})}function SIe(t){Te(t,e=>{Xie([],e)})}function Xie(t,e){Te(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),Te(e.CATEGORIES,r=>{let n=t.concat(e);Bn(n,r)||Xie(n,r)})}function mR(t){return _t(t,"tokenTypeIdx")}function qie(t){return _t(t,"CATEGORIES")}function CIe(t){return _t(t,"categoryMatches")}function AIe(t){return _t(t,"categoryMatchesMap")}function jie(t){return _t(t,"tokenTypeIdx")}var Hie,Yie,Gd=F(()=>{Pt();Hie=1,Yie={}});var vR,yR=F(()=>{vR={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}});var Fn,_y,Jn,Ay=F(()=>{dR();Pt();Ag();Gd();yR();sk();(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Fn||(Fn={}));_y={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\\n|\\r\\n?/g,lineTerminatorCharacters:[`\n`,"\\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:vR,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(_y);Jn=class{constructor(e,r=_y){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${s}--> <${i}>`);let{time:o,value:l}=Ey(a),u=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&u(`${s}<-- <${i}> time: ${o}ms`),this.traceInitIndent--,l}else return a()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported`);this.config=na({},_y,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===_y.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Uie;else if(this.config.lineTerminatorCharacters===_y.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error(\'"safeMode" and "ensureOptimizations" flags are mutually exclusive.\');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),At(e)?i={modes:{defaultMode:Xr(e)},defaultMode:Ng}:(a=!1,i=Xr(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Fie(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(zie(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},Te(i.modes,(o,l)=>{i.modes[l]=Mh(o,u=>ar(u))});let s=Rr(i.modes);if(Te(i.modes,(o,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Bie(o,s))}),nr(this.lexerDefinitionErrors)){Iu(o);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=Pie(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=u.charCodeToPatternIdxToConfig,this.emptyGroups=na({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=i.defaultMode,!nr(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let l=Ke(this.lexerDefinitionErrors,u=>u.message).join(`-----------------------\n`);throw new Error(`Errors detected in definition of Lexer:\n`+l)}Te(this.lexerDefinitionWarning,o=>{Ty(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(gR?(this.chopInput=Vi,this.match=this.matchWithTest):(this.updateLastIndex=qn,this.match=this.matchWithExec),a&&(this.handleModes=qn),this.trackStartLines===!1&&(this.computeNewColumn=Vi),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=qn),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let o=zr(this.canModeBeOptimized,(l,u,h)=>(u===!1&&l.push(h),l),[]);if(r.ensureOptimizations&&!nr(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized.\n Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Lie()}),this.TRACE_INIT("toFastProperties",()=>{Sy(this)})})}tokenize(e,r=this.defaultMode){if(!nr(this.lexerDefinitionErrors)){let i=Ke(this.lexerDefinitionErrors,a=>a.message).join(`-----------------------\n`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:\n`+i)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,i,a,s,o,l,u,h,f,d,p,g,m,x,y,b,w=e,_=w.length,k=0,E=0,L=this.hasCustom?0:Math.floor(e.length/10),S=new Array(L),C=[],M=this.trackStartLines?1:void 0,R=this.trackStartLines?1:void 0,T=$ie(this.emptyGroups),I=this.trackStartLines,A=this.config.lineTerminatorsPattern,D=0,N=[],O=[],B=[],P=[];Object.freeze(P);let $;function z(){return N}function H(ee){let J=bc(ee),W=O[J];return W===void 0?P:W}let Z=ee=>{if(B.length===1&&ee.tokenType.PUSH_MODE===void 0){let J=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(ee);C.push({offset:ee.startOffset,line:ee.startLine,column:ee.startColumn,length:ee.image.length,message:J})}else{B.pop();let J=ia(B);N=this.patternIdxToConfig[J],O=this.charCodeToPatternIdxToConfig[J],D=N.length;let W=this.canModeBeOptimized[J]&&this.config.safeMode===!1;O&&W?$=H:$=z}};function X(ee){B.push(ee),O=this.charCodeToPatternIdxToConfig[ee],N=this.patternIdxToConfig[ee],D=N.length,D=N.length;let J=this.canModeBeOptimized[ee]&&this.config.safeMode===!1;O&&J?$=H:$=z}X.call(this,r);let ie,K=this.config.recoveryEnabled;for(;k<_;){l=null;let ee=w.charCodeAt(k),J=$(ee),W=J.length;for(n=0;n<W;n++){ie=J[n];let Y=ie.pattern;u=null;let Q=ie.short;if(Q!==!1?ee===Q&&(l=Y):ie.isCustom===!0?(b=Y.exec(w,k,S,T),b!==null?(l=b[0],b.payload!==void 0&&(u=b.payload)):l=null):(this.updateLastIndex(Y,k),l=this.match(Y,e,k)),l!==null){if(o=ie.longerAlt,o!==void 0){let se=o.length;for(a=0;a<se;a++){let ue=N[o[a]],ce=ue.pattern;if(h=null,ue.isCustom===!0?(b=ce.exec(w,k,S,T),b!==null?(s=b[0],b.payload!==void 0&&(h=b.payload)):s=null):(this.updateLastIndex(ce,k),s=this.match(ce,e,k)),s&&s.length>l.length){l=s,u=h,ie=ue;break}}}break}}if(l!==null){if(f=l.length,d=ie.group,d!==void 0&&(p=ie.tokenTypeIdx,g=this.createTokenInstance(l,k,p,ie.tokenType,M,R,f),this.handlePayload(g,u),d===!1?E=this.addToken(S,E,g):T[d].push(g)),e=this.chopInput(e,f),k=k+f,R=this.computeNewColumn(R,f),I===!0&&ie.canLineTerminator===!0){let Y=0,Q,se;A.lastIndex=0;do Q=A.test(l),Q===!0&&(se=A.lastIndex-1,Y++);while(Q===!0);Y!==0&&(M=M+Y,R=f-se,this.updateTokenEndLineColumnLocation(g,d,se,Y,M,R,f))}this.handleModes(ie,Z,X,g)}else{let Y=k,Q=M,se=R,ue=K===!1;for(;ue===!1&&k<_;)for(e=this.chopInput(e,1),k++,i=0;i<D;i++){let ce=N[i],te=ce.pattern,Le=ce.short;if(Le!==!1?w.charCodeAt(k)===Le&&(ue=!0):ce.isCustom===!0?ue=te.exec(w,k,S,T)!==null:(this.updateLastIndex(te,k),ue=te.exec(e)!==null),ue===!0)break}if(m=k-Y,R=this.computeNewColumn(R,m),y=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(w,Y,m,Q,se),C.push({offset:Y,line:Q,column:se,length:m,message:y}),K===!1)break}}return this.hasCustom||(S.length=E),{tokens:S,groups:T,errors:C}}handleModes(e,r,n,i){if(e.pop===!0){let a=e.push;r(i),a!==void 0&&n.call(this,a)}else e.push!==void 0&&n.call(this,e.push)}chopInput(e,r){return e.substring(r)}updateLastIndex(e,r){e.lastIndex=r}updateTokenEndLineColumnLocation(e,r,n,i,a,s,o){let l,u;r!==void 0&&(l=n===o-1,u=l?-1:0,i===1&&l===!0||(e.endLine=a+u,e.endColumn=s-1+-u))}computeNewColumn(e,r){return e+r}createOffsetOnlyToken(e,r,n,i){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(e,r,n,i,a,s){return{image:e,startOffset:r,startLine:a,startColumn:s,tokenTypeIdx:n,tokenType:i}}createFullToken(e,r,n,i,a,s,o){return{image:e,startOffset:r,endOffset:r+o-1,startLine:a,endLine:a,startColumn:s,endColumn:s+o-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(e,r,n){return e.push(n),r}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r)}matchWithTest(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null}matchWithExec(e,r){let n=e.exec(r);return n!==null?n[0]:null}};Jn.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";Jn.NA=/NOT_APPLICABLE/});function Mu(t){return xR(t)?t.LABEL:t.name}function xR(t){return li(t.LABEL)&&t.LABEL!==""}function hk(t){return LIe(t)}function LIe(t){let e=t.pattern,r={};if(r.name=t.name,ar(e)||(r.PATTERN=e),_t(t,_Ie))throw`The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return _t(t,Kie)&&(r.CATEGORIES=t[Kie]),Iu([r]),_t(t,Zie)&&(r.LABEL=t[Zie]),_t(t,Qie)&&(r.GROUP=t[Qie]),_t(t,eae)&&(r.POP_MODE=t[eae]),_t(t,Jie)&&(r.PUSH_MODE=t[Jie]),_t(t,tae)&&(r.LONGER_ALT=t[tae]),_t(t,rae)&&(r.LINE_BREAKS=t[rae]),_t(t,nae)&&(r.START_CHARS_HINT=t[nae]),r}function Ud(t,e,r,n,i,a,s,o){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function Ly(t,e){return Nu(t,e)}var _Ie,Kie,Zie,Qie,Jie,eae,tae,rae,nae,js,Vd=F(()=>{Pt();Ay();Gd();_Ie="parent",Kie="categories",Zie="label",Qie="group",Jie="push_mode",eae="pop_mode",tae="longer_alt",rae="line_breaks",nae="start_chars_hint";js=hk({name:"EOF",pattern:Jn.NA});Iu([js])});var Du,iae,kl,Mg=F(()=>{Vd();Pt();Ya();Du={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${xR(t)?`--> ${Mu(t)} <--`:`token of type --> ${t.name} <--`} but found --> \'${e.image}\' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){let a="Expecting: ",o=`\nbut found: \'`+Wi(e).image+"\'";if(n)return a+n+o;{let l=zr(t,(d,p)=>d.concat(p),[]),u=Ke(l,d=>`[${Ke(d,p=>Mu(p)).join(", ")}]`),f=`one of these possible Token sequences:\n${Ke(u,(d,p)=>` ${p+1}. ${d}`).join(`\n`)}`;return a+f+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){let i="Expecting: ",s=`\nbut found: \'`+Wi(e).image+"\'";if(r)return i+r+s;{let l=`expecting at least one iteration which starts with one of these possible Token sequences::\n <${Ke(t,u=>`[${Ke(u,h=>Mu(h)).join(",")}]`).join(" ,")}>`;return i+l+s}}};Object.freeze(Du);iae={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-\ninside top level rule: ->`+t.name+"<-"}},kl={buildDuplicateFoundError(t,e){function r(h){return h instanceof dr?h.terminalType.name:h instanceof jr?h.nonTerminalName:""}let n=t.name,i=Wi(e),a=i.idx,s=bs(i),o=r(i),l=a>0,u=`->${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${e.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return u=u.replace(/[ \\t]+/g," "),u=u.replace(/\\s\\s+/g,`\n`),u},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){let e=Ke(t.prefixPath,i=>Mu(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin <OR${r}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(t){let e=Ke(t.prefixPath,i=>Mu(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.`,n},buildEmptyRepetitionError(t){let e=bs(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:\n<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.\n has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=Ke(t.leftRecursionPath,a=>a.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar.\nrule: <${e}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${n}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof Ha?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function aae(t,e){let r=new bR(t,e);return r.resolveRefs(),r.errors}var bR,sae=F(()=>{ws();Pt();Ya();bR=class extends qa{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){Te(hr(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:Ai.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}});function gk(t,e,r=[]){r=Xr(r);let n=[],i=0;function a(o){return o.concat(oi(t,i+1))}function s(o){let l=gk(a(o),e,r);return n.concat(l)}for(;r.length<e&&i<t.length;){let o=t[i];if(o instanceof wn)return s(o.definition);if(o instanceof jr)return s(o.definition);if(o instanceof Kr)n=s(o.definition);else if(o instanceof kn){let l=o.definition.concat([new br({definition:o.definition})]);return s(l)}else if(o instanceof Tn){let l=[new wn({definition:o.definition}),new br({definition:[new dr({terminalType:o.separator})].concat(o.definition)})];return s(l)}else if(o instanceof fn){let l=o.definition.concat([new br({definition:[new dr({terminalType:o.separator})].concat(o.definition)})]);n=s(l)}else if(o instanceof br){let l=o.definition.concat([new br({definition:o.definition})]);n=s(l)}else{if(o instanceof dn)return Te(o.definition,l=>{nr(l.definition)===!1&&(n=s(l.definition))}),n;if(o instanceof dr)r.push(o.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:oi(t,i)}),n}function mk(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=e.length,u=l-n-1,h=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!nr(f);){let d=f.pop();if(d===s){o&&ia(f).idx<=u&&f.pop();continue}let p=d.def,g=d.idx,m=d.ruleStack,x=d.occurrenceStack;if(nr(p))continue;let y=p[0];if(y===i){let b={idx:g,def:oi(p),ruleStack:xu(m),occurrenceStack:xu(x)};f.push(b)}else if(y instanceof dr)if(g<l-1){let b=g+1,w=e[b];if(r(w,y.terminalType)){let _={idx:b,def:oi(p),ruleStack:m,occurrenceStack:x};f.push(_)}}else if(g===l-1)h.push({nextTokenType:y.terminalType,nextTokenOccurrence:y.idx,ruleStack:m,occurrenceStack:x}),o=!0;else throw Error("non exhaustive match");else if(y instanceof jr){let b=Xr(m);b.push(y.nonTerminalName);let w=Xr(x);w.push(y.idx);let _={idx:g,def:y.definition.concat(a,oi(p)),ruleStack:b,occurrenceStack:w};f.push(_)}else if(y instanceof Kr){let b={idx:g,def:oi(p),ruleStack:m,occurrenceStack:x};f.push(b),f.push(s);let w={idx:g,def:y.definition.concat(oi(p)),ruleStack:m,occurrenceStack:x};f.push(w)}else if(y instanceof kn){let b=new br({definition:y.definition,idx:y.idx}),w=y.definition.concat([b],oi(p)),_={idx:g,def:w,ruleStack:m,occurrenceStack:x};f.push(_)}else if(y instanceof Tn){let b=new dr({terminalType:y.separator}),w=new br({definition:[b].concat(y.definition),idx:y.idx}),_=y.definition.concat([w],oi(p)),k={idx:g,def:_,ruleStack:m,occurrenceStack:x};f.push(k)}else if(y instanceof fn){let b={idx:g,def:oi(p),ruleStack:m,occurrenceStack:x};f.push(b),f.push(s);let w=new dr({terminalType:y.separator}),_=new br({definition:[w].concat(y.definition),idx:y.idx}),k=y.definition.concat([_],oi(p)),E={idx:g,def:k,ruleStack:m,occurrenceStack:x};f.push(E)}else if(y instanceof br){let b={idx:g,def:oi(p),ruleStack:m,occurrenceStack:x};f.push(b),f.push(s);let w=new br({definition:y.definition,idx:y.idx}),_=y.definition.concat([w],oi(p)),k={idx:g,def:_,ruleStack:m,occurrenceStack:x};f.push(k)}else if(y instanceof dn)for(let b=y.definition.length-1;b>=0;b--){let w=y.definition[b],_={idx:g,def:w.definition.concat(oi(p)),ruleStack:m,occurrenceStack:x};f.push(_),f.push(s)}else if(y instanceof wn)f.push({idx:g,def:y.definition.concat(oi(p)),ruleStack:m,occurrenceStack:x});else if(y instanceof Ha)f.push(RIe(y,g,m,x));else throw Error("non exhaustive match")}return h}function RIe(t,e,r,n){let i=Xr(r);i.push(t.name);let a=Xr(n);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}var wR,fk,Dg,dk,Ry,pk,Ny,Iy=F(()=>{Pt();oR();nk();Ya();wR=class extends Ru{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker\'s top Rule!");return this.ruleStack=Xr(this.path.ruleStack).reverse(),this.occurrenceStack=Xr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){nr(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},fk=class extends wR{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),a=new wn({definition:i});this.possibleTokTypes=zd(a),this.found=!0}}},Dg=class extends Ru{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},dk=class extends Dg{walkMany(e,r,n){if(e.idx===this.occurrence){let i=Wi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof dr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},Ry=class extends Dg{walkManySep(e,r,n){if(e.idx===this.occurrence){let i=Wi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof dr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},pk=class extends Dg{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=Wi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof dr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},Ny=class extends Dg{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=Wi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof dr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}}});function My(t){if(t instanceof Kr||t==="Option")return zn.OPTION;if(t instanceof br||t==="Repetition")return zn.REPETITION;if(t instanceof kn||t==="RepetitionMandatory")return zn.REPETITION_MANDATORY;if(t instanceof Tn||t==="RepetitionMandatoryWithSeparator")return zn.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof fn||t==="RepetitionWithSeparator")return zn.REPETITION_WITH_SEPARATOR;if(t instanceof dn||t==="Alternation")return zn.ALTERNATION;throw Error("non exhaustive match")}function yk(t){let{occurrence:e,rule:r,prodType:n,maxLookahead:i}=t,a=My(n);return a===zn.ALTERNATION?Og(e,r,i):Pg(e,r,a,i)}function lae(t,e,r,n,i,a){let s=Og(t,e,r),o=pae(s)?Ig:Nu;return a(s,n,o,i)}function cae(t,e,r,n,i,a){let s=Pg(t,e,i,r),o=pae(s)?Ig:Nu;return a(s[0],o,n)}function uae(t,e,r,n){let i=t.length,a=wa(t,s=>wa(s,o=>o.length===1));if(e)return function(s){let o=Ke(s,l=>l.GATE);for(let l=0;l<i;l++){let u=t[l],h=u.length,f=o[l];if(!(f!==void 0&&f.call(this)===!1))e:for(let d=0;d<h;d++){let p=u[d],g=p.length;for(let m=0;m<g;m++){let x=this.LA(m+1);if(r(x,p[m])===!1)continue e}return l}}};if(a&&!n){let s=Ke(t,l=>Br(l)),o=zr(s,(l,u,h)=>(Te(u,f=>{_t(l,f.tokenTypeIdx)||(l[f.tokenTypeIdx]=h),Te(f.categoryMatches,d=>{_t(l,d)||(l[d]=h)})}),l),{});return function(){let l=this.LA(1);return o[l.tokenTypeIdx]}}else return function(){for(let s=0;s<i;s++){let o=t[s],l=o.length;e:for(let u=0;u<l;u++){let h=o[u],f=h.length;for(let d=0;d<f;d++){let p=this.LA(d+1);if(r(p,h[d])===!1)continue e}return s}}}}function hae(t,e,r){let n=wa(t,a=>a.length===1),i=t.length;if(n&&!r){let a=Br(t);if(a.length===1&&nr(a[0].categoryMatches)){let o=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{let s=zr(a,(o,l,u)=>(o[l.tokenTypeIdx]=!0,Te(l.categoryMatches,h=>{o[h]=!0}),o),[]);return function(){let o=this.LA(1);return s[o.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;a<i;a++){let s=t[a],o=s.length;for(let l=0;l<o;l++){let u=this.LA(l+1);if(e(u,s[l])===!1)continue e}return!0}return!1}}function oae(t){let e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}function kR(t){let e=[""];for(let r=0;r<t.length;r++){let n=t[r],i=[];for(let a=0;a<e.length;a++){let s=e[a];i.push(s+"_"+n.tokenTypeIdx);for(let o=0;o<n.categoryMatches.length;o++){let l="_"+n.categoryMatches[o];i.push(s+l)}}e=i}return e}function NIe(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;let i=t[n];for(let a=0;a<e.length;a++){let s=e[a];if(i[s]===!0)return!1}}return!0}function fae(t,e){let r=Ke(t,s=>gk([s],1)),n=oae(r.length),i=Ke(r,s=>{let o={};return Te(s,l=>{let u=kR(l.partialPath);Te(u,h=>{o[h]=!0})}),o}),a=r;for(let s=1;s<=e;s++){let o=a;a=oae(o.length);for(let l=0;l<o.length;l++){let u=o[l];for(let h=0;h<u.length;h++){let f=u[h].partialPath,d=u[h].suffixDef,p=kR(f);if(NIe(i,p,l)||nr(d)||f.length===e){let m=n[l];if(xk(m,f)===!1){m.push(f);for(let x=0;x<p.length;x++){let y=p[x];i[l][y]=!0}}}else{let m=gk(d,s+1,f);a[l]=a[l].concat(m),Te(m,x=>{let y=kR(x.partialPath);Te(y,b=>{i[l][b]=!0})})}}}}return n}function Og(t,e,r,n){let i=new vk(t,zn.ALTERNATION,n);return e.accept(i),fae(i.result,r)}function Pg(t,e,r,n){let i=new vk(t,r);e.accept(i);let a=i.result,o=new TR(e,t,r).startWalking(),l=new wn({definition:a}),u=new wn({definition:o});return fae([l,u],n)}function xk(t,e){e:for(let r=0;r<t.length;r++){let n=t[r];if(n.length===e.length){for(let i=0;i<n.length;i++){let a=e[i],s=n[i];if((a===s||s.categoryMatchesMap[a.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function dae(t,e){return t.length<e.length&&wa(t,(r,n)=>{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function pae(t){return wa(t,e=>wa(e,r=>wa(r,n=>nr(n.categoryMatches))))}var zn,TR,vk,Bg=F(()=>{Pt();Iy();nk();Gd();Ya();(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(zn||(zn={}));TR=class extends Ru{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,zn.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,zn.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,zn.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,zn.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,zn.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},vk=class extends qa{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,zn.OPTION)}visitRepetition(e){this.checkIsTarget(e,zn.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,zn.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,zn.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,zn.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,zn.ALTERNATION)}}});function gae(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return Ke(e,r=>Object.assign({type:Ai.CUSTOM_LOOKAHEAD_VALIDATION},r))}function mae(t,e,r,n){let i=aa(t,l=>IIe(l,r)),a=FIe(t,e,r),s=aa(t,l=>OIe(l,r)),o=aa(t,l=>DIe(l,t,n,r));return i.concat(a,s,o)}function IIe(t,e){let r=new ER;t.accept(r);let n=r.allProductions,i=b_(n,MIe),a=ms(i,o=>o.length>1);return Ke(hr(a),o=>{let l=Wi(o),u=e.buildDuplicateFoundError(t,o),h=bs(l),f={message:u,type:Ai.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:h,occurrence:l.idx},d=vae(l);return d&&(f.parameter=d),f})}function MIe(t){return`${bs(t)}_#_${t.idx}_#_${vae(t)}`}function vae(t){return t instanceof dr?t.terminalType.name:t instanceof jr?t.nonTerminalName:""}function DIe(t,e,r,n){let i=[];if(zr(e,(s,o)=>o.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:s,type:Ai.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function yae(t,e,r){let n=[],i;return Bn(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Ai.INVALID_RULE_OVERRIDE,ruleName:t})),n}function CR(t,e,r,n=[]){let i=[],a=bk(e.definition);if(nr(a))return[];{let s=t.name;Bn(a,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:Ai.LEFT_RECURSION,ruleName:s});let l=Ih(a,n.concat([t])),u=aa(l,h=>{let f=Xr(n);return f.push(h),CR(t,h,r,f)});return i.concat(u)}}function bk(t){let e=[];if(nr(t))return e;let r=Wi(t);if(r instanceof jr)e.push(r.referencedRule);else if(r instanceof wn||r instanceof Kr||r instanceof kn||r instanceof Tn||r instanceof fn||r instanceof br)e=e.concat(bk(r.definition));else if(r instanceof dn)e=Br(Ke(r.definition,a=>bk(a.definition)));else if(!(r instanceof dr))throw Error("non exhaustive match");let n=Fd(r),i=t.length>1;if(n&&i){let a=oi(t);return e.concat(bk(a))}else return e}function xae(t,e){let r=new Dy;t.accept(r);let n=r.alternations;return aa(n,a=>{let s=xu(a.definition);return aa(s,(o,l)=>{let u=mk([o],[],Nu,1);return nr(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:a,emptyChoiceIdx:l}),type:Ai.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:a.idx,alternative:l+1}]:[]})})}function bae(t,e,r){let n=new Dy;t.accept(n);let i=n.alternations;return i=Mh(i,s=>s.ignoreAmbiguities===!0),aa(i,s=>{let o=s.idx,l=s.maxLookahead||e,u=Og(o,t,l,s),h=PIe(u,s,t,r),f=BIe(u,s,t,r);return h.concat(f)})}function OIe(t,e){let r=new Dy;t.accept(r);let n=r.alternations;return aa(n,a=>a.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:a}),type:Ai.TOO_MANY_ALTS,ruleName:t.name,occurrence:a.idx}]:[])}function wae(t,e,r){let n=[];return Te(t,i=>{let a=new SR;i.accept(a);let s=a.allProductions;Te(s,o=>{let l=My(o),u=o.maxLookahead||e,h=o.idx,d=Pg(h,i,l,u)[0];if(nr(Br(d))){let p=r.buildEmptyRepetitionError({topLevelRule:i,repetition:o});n.push({message:p,type:Ai.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function PIe(t,e,r,n){let i=[],a=zr(t,(o,l,u)=>(e.definition[u].ignoreAmbiguities===!0||Te(l,h=>{let f=[u];Te(t,(d,p)=>{u!==p&&xk(d,h)&&e.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!xk(i,h)&&(i.push(h),o.push({alts:f,path:h}))}),o),[]);return Ke(a,o=>{let l=Ke(o.alts,h=>h+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:l,prefixPath:o.path}),type:Ai.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:o.alts}})}function BIe(t,e,r,n){let i=zr(t,(s,o,l)=>{let u=Ke(o,h=>({idx:l,path:h}));return s.concat(u)},[]);return cc(aa(i,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let l=s.idx,u=s.path,h=Fr(i,d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx<l&&dae(d.path,u));return Ke(h,d=>{let p=[d.idx+1,l+1],g=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:p,prefixPath:d.path}),type:Ai.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:p}})}))}function FIe(t,e,r){let n=[],i=Ke(e,a=>a.name);return Te(t,a=>{let s=a.name;if(Bn(i,s)){let o=r.buildNamespaceConflictError(a);n.push({message:o,type:Ai.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}var ER,Dy,SR,Oy=F(()=>{Pt();ws();Ya();Bg();Iy();Gd();ER=class extends qa{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};Dy=class extends qa{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};SR=class extends qa{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}});function kae(t){let e=Nh(t,{errMsgProvider:iae}),r={};return Te(t.rules,n=>{r[n.name]=n}),aae(r,e.errMsgProvider)}function Tae(t){return t=Nh(t,{errMsgProvider:kl}),mae(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var Eae=F(()=>{Pt();sae();Oy();Mg()});function Hh(t){return Bn(Lae,t.name)}var Sae,Cae,Aae,_ae,Lae,Fg,Wd,Py,By,Fy,zg=F(()=>{Pt();Sae="MismatchedTokenException",Cae="NoViableAltException",Aae="EarlyExitException",_ae="NotAllInputParsedException",Lae=[Sae,Cae,Aae,_ae];Object.freeze(Lae);Fg=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Wd=class extends Fg{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Sae}},Py=class extends Fg{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Cae}},By=class extends Fg{constructor(e,r){super(e,r),this.name=_ae}},Fy=class extends Fg{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Aae}}});function zIe(t,e,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o];if(l===void 0){let d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];l=new a(p,i).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,h=l.occurrence,f=l.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=js,h=1),!(u===void 0||h===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,h,s)&&this.tryInRepetitionRecovery(t,e,r,u)}var AR,LR,_R,wk,RR=F(()=>{Vd();Pt();zg();lR();ws();AR={},LR="InRuleRecoveryException",_R=class extends Error{constructor(e){super(e),this.name=LR}},wk=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=_t(e,"recoveryEnabled")?e.recoveryEnabled:Xa.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=zIe)}getTokenToInsert(e){let r=Ud(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,i){let a=this.findReSyncTokenType(),s=this.exportLexerState(),o=[],l=!1,u=this.LA(1),h=this.LA(1),f=()=>{let d=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:u,previous:d,ruleName:this.getCurrRuleFullName()}),g=new Wd(p,u,this.LA(0));g.resyncedTokens=xu(o),this.SAVE_ERROR(g)};for(;!l;)if(this.tokenMatcher(h,i)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(h,a)?l=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,o));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new _R("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||nr(r))return!1;let n=this.LA(1);return Ga(r,a=>this.tokenMatcher(n,a))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return Bn(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=Ga(e,a=>Ly(r,a));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return AR;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return Ke(e,(n,i)=>i===0?AR:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=Ke(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return Br(e)}getFollowSetFromFollowKey(e){if(e===AR)return[js];let r=e.ruleName+e.idxInCallingRule+ik+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,js)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return xu(r)}attemptInRepetitionRecovery(e,r,n,i,a,s,o){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=Xr(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return Ke(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}});function kk(t,e,r){return r|e|t}var Tk=F(()=>{});var Ou,NR=F(()=>{Pt();Mg();ws();Oy();Bg();Ou=class{constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:Xa.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(nr(r)){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...a]}return r}validateNoLeftRecursion(e){return aa(e,r=>CR(r,r,kl))}validateEmptyOrAlternatives(e){return aa(e,r=>xae(r,kl))}validateAmbiguousAlternationAlternatives(e,r){return aa(e,n=>bae(n,r,kl))}validateSomeNonEmptyLookaheadPath(e,r){return wae(e,r,kl)}buildLookaheadForAlternation(e){return lae(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,uae)}buildLookaheadForOptional(e){return cae(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,My(e.prodType),hae)}}});function $Ie(t){Ek.reset(),t.accept(Ek);let e=Ek.dslMethods;return Ek.reset(),e}var Sk,IR,Ek,Rae=F(()=>{Pt();ws();Tk();Ya();NR();Sk=class{initLooksAhead(e){this.dynamicTokensEnabled=_t(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Xa.dynamicTokensEnabled,this.maxLookahead=_t(e,"maxLookahead")?e.maxLookahead:Xa.maxLookahead,this.lookaheadStrategy=_t(e,"lookaheadStrategy")?e.lookaheadStrategy:new Ou({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){Te(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=$Ie(r);Te(n,u=>{let h=u.idx===0?"":u.idx;this.TRACE_INIT(`${bs(u)}${h}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:r,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=kk(this.fullRuleNameToShort[r.name],256,u.idx);this.setLaFuncCache(d,f)})}),Te(i,u=>{this.computeLookaheadFunc(r,u.idx,768,"Repetition",u.maxLookahead,bs(u))}),Te(a,u=>{this.computeLookaheadFunc(r,u.idx,512,"Option",u.maxLookahead,bs(u))}),Te(s,u=>{this.computeLookaheadFunc(r,u.idx,1024,"RepetitionMandatory",u.maxLookahead,bs(u))}),Te(o,u=>{this.computeLookaheadFunc(r,u.idx,1536,"RepetitionMandatoryWithSeparator",u.maxLookahead,bs(u))}),Te(l,u=>{this.computeLookaheadFunc(r,u.idx,1280,"RepetitionWithSeparator",u.maxLookahead,bs(u))})})})}computeLookaheadFunc(e,r,n,i,a,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),l=kk(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return kk(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},IR=class extends qa{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},Ek=new IR});function OR(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function PR(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function Nae(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e)}function Iae(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r)}var Mae=F(()=>{});function BR(t,e){Object.defineProperty(t,GIe,{enumerable:!1,configurable:!0,writable:!1,value:e})}var GIe,Dae=F(()=>{GIe="name"});function UIe(t,e){let r=Rr(t),n=r.length;for(let i=0;i<n;i++){let a=r[i],s=t[a],o=s.length;for(let l=0;l<o;l++){let u=s[l];u.tokenTypeIdx===void 0&&this[u.name](u.children,e)}}}function Oae(t,e){let r=function(){};BR(r,t+"BaseSemantics");let n={visit:function(i,a){if(At(i)&&(i=i[0]),!ar(i))return this[i.name](i.children,a)},validateVisitor:function(){let i=VIe(this,e);if(!nr(i)){let a=Ke(i,s=>s.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n ${a.join(`\n\n`).replace(/\\n/g,`\n `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function Pae(t,e,r){let n=function(){};BR(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return Te(e,a=>{i[a]=UIe}),n.prototype=i,n.prototype.constructor=n,n}function VIe(t,e){return WIe(t,e)}function WIe(t,e){let r=Fr(e,i=>pi(t[i])===!1),n=Ke(r,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:FR.MISSING_METHOD,methodName:i}));return cc(n)}var FR,Bae=F(()=>{Pt();Dae();(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(FR||(FR={}))});var Lk,Fae=F(()=>{Mae();Pt();Bae();ws();Lk=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=_t(e,"nodeLocationTracking")?e.nodeLocationTracking:Xa.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=qn,this.cstFinallyStateUpdate=qn,this.cstPostTerminal=qn,this.cstPostNonTerminal=qn,this.cstPostRule=qn;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=PR,this.setNodeLocationFromNode=PR,this.cstPostRule=qn,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=qn,this.setNodeLocationFromNode=qn,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=OR,this.setNodeLocationFromNode=OR,this.cstPostRule=qn,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=qn,this.setNodeLocationFromNode=qn,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=qn,this.setNodeLocationFromNode=qn,this.cstPostRule=qn,this.setInitialNodeLocation=qn;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];Nae(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];Iae(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(ar(this.baseCstVisitorConstructor)){let e=Oae(this.className,Rr(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(ar(this.baseCstVisitorWithDefaultsConstructor)){let e=Pae(this.className,Rr(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}});var Rk,zae=F(()=>{ws();Rk=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser\'s constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):$g}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?$g:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}});var Nk,$ae=F(()=>{Pt();zg();ws();Mg();Oy();Ya();Nk=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=Gg){if(Bn(this.definedRulesNames,e)){let s={message:kl.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Ai.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i}OVERRIDE_RULE(e,r,n=Gg){let i=yae(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let a=this.defineRule(e,r,n);return this[e]=a,a}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,r),!0}catch(i){if(Hh(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return tk(hr(this.gastProductionsCache))}}});var Ik,Gae=F(()=>{Pt();Tk();zg();Bg();Iy();ws();RR();Vd();Gd();Ik=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ig,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},_t(r,"serializedGrammar"))throw Error(`The Parser\'s configuration can no longer contain a <serializedGrammar> property.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n For Further details.`);if(At(e)){if(nr(e))throw Error(`A Token Vocabulary cannot be empty.\n Note that the first argument for the parser constructor\n is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n For Further details.`)}if(At(e))this.tokensMap=zr(e,(a,s)=>(a[s.name]=s,a),{});else if(_t(e,"modes")&&wa(Br(hr(e.modes)),jie)){let a=Br(hr(e.modes)),s=og(a);this.tokensMap=zr(s,(o,l)=>(o[l.name]=l,o),{})}else if(hn(e))this.tokensMap=Xr(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=js;let n=_t(e,"modes")?Br(hr(e.modes)):hr(e),i=wa(n,a=>nr(a.categoryMatches));this.tokenMatcher=i?Ig:Nu,Iu(hr(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the \'performSelfAnalysis\' method has been called\'\nMake sure that all grammar rule definitions are done before \'performSelfAnalysis\' is called.`);let i=_t(n,"resyncEnabled")?n.resyncEnabled:Gg.resyncEnabled,a=_t(n,"recoveryValueFunc")?n.recoveryValueFunc:Gg.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let o;return this.outputCst===!0?o=function(...h){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,h);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,i,a)}finally{this.ruleFinallyStateUpdate()}}:o=function(...h){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,h)}catch(f){return this.invokeRuleCatch(f,i,a)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){let i=this.RULE_STACK.length===1,a=r&&!this.isBackTracking()&&this.recoveryEnabled;if(Hh(e)){let s=e;if(a){let o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return n(e);else{if(this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,s.partialCstResult=l}throw s}}else{if(i)return this.moveToTerminatedState(),n(e);throw s}}else throw e}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof e!="function"){a=e.DEF;let s=e.GATE;if(s!==void 0){let o=i;i=()=>s.call(this)&&o.call(this)}}else a=e;if(i.call(this)===!0)return a.call(this)}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let s=r.GATE;if(s!==void 0){let o=i;i=()=>s.call(this)&&o.call(this)}}else a=r;if(i.call(this)===!0){let s=this.doSingleRepetition(a);for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(e,zn.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,pk)}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let o=()=>this.tokenMatcher(this.LA(1),a);for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,i,Ny],o,1536,e,Ny)}else throw this.raiseEarlyExitException(e,zn.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let o=r.GATE;if(o!==void 0){let l=i;i=()=>o.call(this)&&l.call(this)}}else a=r;let s=!0;for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,dk,s)}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let o=()=>this.tokenMatcher(this.LA(1),a);for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,i,Ry],o,1280,e,Ry)}}repetitionSepSecondInternal(e,r,n,i,a){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,i,a],n,1536,e,a)}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),i=At(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(s!==void 0)return i[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new By(r,e))}}subruleInternal(e,r,n){let i;try{let a=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=e.apply(this,a),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i}catch(a){throw this.subruleInternalError(a,n,e.ruleName)}}subruleInternalError(e,r,n){throw Hh(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let i;try{let a=this.LA(1);this.tokenMatcher(a,e)===!0?(this.consumeToken(),i=a):this.consumeInternalError(e,a,n)}catch(a){i=this.consumeInternalRecovery(e,r,a)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i}consumeInternalError(e,r,n){let i,a=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Wd(i,r,a))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i)}catch(a){throw a.name===LR?n:a}}else throw n}saveRecogState(){let e=this.errors,r=Xr(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),js)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}});var Mk,Uae=F(()=>{zg();Pt();Bg();ws();Mk=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=_t(e,"errorMessageProvider")?e.errorMessageProvider:Xa.errorMessageProvider}SAVE_ERROR(e){if(Hh(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Xr(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Xr(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],o=Pg(e,a,r,this.maxLookahead)[0],l=[];for(let h=1;h<=this.maxLookahead;h++)l.push(this.LA(h));let u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new Fy(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],a=Og(e,i,this.maxLookahead),s=[];for(let u=1;u<=this.maxLookahead;u++)s.push(this.LA(u));let o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:s,previous:o,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Py(l,this.LA(1),o))}}});var Dk,Vae=F(()=>{Iy();Pt();Dk=class{initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(ar(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return mk([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let r=Wi(e.ruleStack),i=this.getGAstProductions()[r];return new fk(i,e).startWalking()}}});function $y(t,e,r,n=!1){Pk(r);let i=ia(this.recordingProdStack),a=pi(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),_t(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),Bk}function YIe(t,e){Pk(e);let r=ia(this.recordingProdStack),n=At(t)===!1,i=n===!1?t:t.DEF,a=new dn({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});_t(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);let s=Hv(i,o=>pi(o.GATE));return a.hasPredicates=s,r.definition.push(a),Te(i,o=>{let l=new wn({definition:[]});a.definition.push(l),_t(o,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:_t(o,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),o.ALT.call(this),this.recordingProdStack.pop()}),Bk}function qae(t){return t===0?"":`${t}`}function Pk(t){if(t<0||t>Hae){let e=new Error(`Invalid DSL Method idx value: <${t}>\n Idx value must be a none negative value smaller than ${Hae+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var Bk,Wae,Hae,Yae,Xae,qIe,Ok,jae=F(()=>{Pt();Ya();Ay();Gd();Vd();ws();Tk();Bk={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Bk);Wae=!0,Hae=Math.pow(2,8)-1,Yae=hk({name:"RECORDING_PHASE_TOKEN",pattern:Jn.NA});Iu([Yae]);Xae=Ud(Yae,`This IToken indicates the Parser is in Recording Phase\n See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Xae);qIe={name:`This CSTNode indicates the Parser is in Recording Phase\n See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Ok=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,e,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,e,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return $g}topLevelRuleRecord(e,r){try{let n=new Ha({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`\n This error was thrown during the "grammar recording phase" For more info see:\n https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return $y.call(this,Kr,e,r)}atLeastOneInternalRecord(e,r){$y.call(this,kn,r,e)}atLeastOneSepFirstInternalRecord(e,r){$y.call(this,Tn,r,e,Wae)}manyInternalRecord(e,r){$y.call(this,br,r,e)}manySepFirstInternalRecord(e,r){$y.call(this,fn,r,e,Wae)}orInternalRecord(e,r){return YIe.call(this,e,r)}subruleInternalRecord(e,r,n){if(Pk(r),!e||_t(e,"ruleName")===!1){let o=new Error(`<SUBRULE${qae(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let i=ia(this.recordingProdStack),a=e.ruleName,s=new jr({idx:r,nonTerminalName:a,label:n?.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?qIe:Bk}consumeInternalRecord(e,r,n){if(Pk(r),!mR(e)){let s=new Error(`<CONSUME${qae(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=ia(this.recordingProdStack),a=new dr({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(a),Xae}}});var Fk,Kae=F(()=>{Pt();Ag();ws();Fk=class{initPerformanceTracer(e){if(_t(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=Xa.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:i,value:a}=Ey(r),s=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${i}ms`),this.traceInitIndent--,a}else return r()}}});function Zae(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let a=Object.getOwnPropertyDescriptor(n,i);a&&(a.get||a.set)?Object.defineProperty(t.prototype,i,a):t.prototype[i]=r.prototype[i]})})}var Qae=F(()=>{});function zk(t=void 0){return function(){return t}}var $g,Xa,Gg,Ai,Gy,Uy,ws=F(()=>{Pt();Ag();_ie();Vd();Mg();Eae();RR();Rae();Fae();zae();$ae();Gae();Uae();Vae();jae();Kae();Qae();Oy();$g=Ud(js,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze($g);Xa=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Du,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Gg=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Ai||(Ai={}));Gy=class t{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{Sy(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),Te(this.definedRulesNames,i=>{let s=this[i].originalGrammarAction,o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,s)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=kae({rules:hr(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(nr(n)&&this.skipValidations===!1){let i=Tae({rules:hr(this.gastProductionsCache),tokenTypes:hr(this.tokensMap),errMsgProvider:kl,grammarName:r}),a=gae({lookaheadStrategy:this.lookaheadStrategy,rules:hr(this.gastProductionsCache),tokenTypes:hr(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,a)}}),nr(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=Aie(hr(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,a;(a=(i=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(i,{rules:hr(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(hr(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!nr(this.definitionErrors))throw e=Ke(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:\n ${e.join(`\n-------------------------------\n`)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),_t(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.\n Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n For further details.`);this.skipValidations=_t(r,"skipValidations")?r.skipValidations:Xa.skipValidations}};Gy.DEFER_DEFINITION_ERRORS_HANDLING=!1;Zae(Gy,[wk,Sk,Lk,Rk,Ik,Nk,Mk,Dk,Ok,Fk]);Uy=class extends Gy{constructor(e,r=Xa){let n=Xr(r);n.outputCst=!1,super(e,n)}}});var Jae=F(()=>{Ya()});var ese=F(()=>{});var tse=F(()=>{Jae();ese()});var rse=F(()=>{iR()});var Hd=F(()=>{iR();ws();Ay();Vd();Bg();NR();Mg();zg();yR();Ya();Ya();tse();rse()});function qd(t,e,r){return`${t.name}_${e}_${r}`}function sse(t){let e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};eMe(e,t);let r=t.length;for(let n=0;n<r;n++){let i=t[n],a=Yd(e,i,i);a!==void 0&&hMe(e,i,a)}return e}function eMe(t,e){let r=e.length;for(let n=0;n<r;n++){let i=e[n],a=Hi(t,i,void 0,{type:jIe}),s=Hi(t,i,void 0,{type:Wg});a.stop=s,t.ruleToStartState.set(i,a),t.ruleToStopState.set(i,s)}}function ose(t,e,r){return r instanceof dr?$R(t,e,r.terminalType,r):r instanceof jr?uMe(t,e,r):r instanceof dn?aMe(t,e,r):r instanceof Kr?sMe(t,e,r):r instanceof br?tMe(t,e,r):r instanceof fn?rMe(t,e,r):r instanceof kn?nMe(t,e,r):r instanceof Tn?iMe(t,e,r):Yd(t,e,r)}function tMe(t,e,r){let n=Hi(t,e,r,{type:ise});Yh(t,n);let i=Hg(t,e,n,r,Yd(t,e,r));return cse(t,e,r,i)}function rMe(t,e,r){let n=Hi(t,e,r,{type:ise});Yh(t,n);let i=Hg(t,e,n,r,Yd(t,e,r)),a=$R(t,e,r.separator,r);return cse(t,e,r,i,a)}function nMe(t,e,r){let n=Hi(t,e,r,{type:nse});Yh(t,n);let i=Hg(t,e,n,r,Yd(t,e,r));return lse(t,e,r,i)}function iMe(t,e,r){let n=Hi(t,e,r,{type:nse});Yh(t,n);let i=Hg(t,e,n,r,Yd(t,e,r)),a=$R(t,e,r.separator,r);return lse(t,e,r,i,a)}function aMe(t,e,r){let n=Hi(t,e,r,{type:qh});Yh(t,n);let i=Ke(r.definition,s=>ose(t,e,s));return Hg(t,e,n,r,...i)}function sMe(t,e,r){let n=Hi(t,e,r,{type:qh});Yh(t,n);let i=Hg(t,e,n,r,Yd(t,e,r));return oMe(t,e,r,i)}function Yd(t,e,r){let n=Fr(Ke(r.definition,i=>ose(t,e,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:cMe(t,n)}function lse(t,e,r,n,i){let a=n.left,s=n.right,o=Hi(t,e,r,{type:JIe});Yh(t,o);let l=Hi(t,e,r,{type:ase});return a.loopback=o,l.loopback=o,t.decisionMap[qd(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,mi(s,o),i===void 0?(mi(o,a),mi(o,l)):(mi(o,l),mi(o,i.left),mi(i.right,a)),{left:a,right:l}}function cse(t,e,r,n,i){let a=n.left,s=n.right,o=Hi(t,e,r,{type:QIe});Yh(t,o);let l=Hi(t,e,r,{type:ase}),u=Hi(t,e,r,{type:ZIe});return o.loopback=u,l.loopback=u,mi(o,a),mi(o,l),mi(s,u),i!==void 0?(mi(u,l),mi(u,i.left),mi(i.right,a)):mi(u,o),t.decisionMap[qd(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function oMe(t,e,r,n){let i=n.left,a=n.right;return mi(i,a),t.decisionMap[qd(e,"Option",r.idx)]=i,n}function Yh(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Hg(t,e,r,n,...i){let a=Hi(t,e,n,{type:KIe,start:r});r.end=a;for(let o of i)o!==void 0?(mi(r,o.left),mi(o.right,a)):mi(r,a);let s={left:r,right:a};return t.decisionMap[qd(e,lMe(n),n.idx)]=r,s}function lMe(t){if(t instanceof dn)return"Alternation";if(t instanceof Kr)return"Option";if(t instanceof br)return"Repetition";if(t instanceof fn)return"RepetitionWithSeparator";if(t instanceof kn)return"RepetitionMandatory";if(t instanceof Tn)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function cMe(t,e){let r=e.length;for(let a=0;a<r-1;a++){let s=e[a],o;s.left.transitions.length===1&&(o=s.left.transitions[0]);let l=o instanceof Vg,u=o,h=e[a+1].left;s.left.type===qh&&s.right.type===qh&&o!==void 0&&(l&&u.followState===s.right||o.target===s.right)?(l?u.followState=h:o.target=h,fMe(t,s.right)):mi(s.right,h)}let n=e[0],i=e[r-1];return{left:n.left,right:i.right}}function $R(t,e,r,n){let i=Hi(t,e,n,{type:qh}),a=Hi(t,e,n,{type:qh});return GR(i,new Ug(a,r)),{left:i,right:a}}function uMe(t,e,r){let n=r.referencedRule,i=t.ruleToStartState.get(n),a=Hi(t,e,r,{type:qh}),s=Hi(t,e,r,{type:qh}),o=new Vg(i,n,s);return GR(a,o),{left:a,right:s}}function hMe(t,e,r){let n=t.ruleToStartState.get(e);mi(n,r.left);let i=t.ruleToStopState.get(e);return mi(r.right,i),{left:n,right:i}}function mi(t,e){let r=new Wy(e);GR(t,r)}function Hi(t,e,r,n){let i=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},n);return t.states.push(i),i}function GR(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function fMe(t,e){t.states.splice(t.states.indexOf(e),1)}var qh,jIe,nse,ise,Wg,KIe,ZIe,QIe,JIe,ase,Vy,Ug,Wy,Vg,use=F(()=>{ig();g_();Hd();qh=1,jIe=2,nse=4,ise=5,Wg=7,KIe=8,ZIe=9,QIe=10,JIe=11,ase=12,Vy=class{constructor(e){this.target=e}isEpsilon(){return!1}},Ug=class extends Vy{constructor(e,r){super(e),this.tokenType=r}},Wy=class extends Vy{constructor(e){super(e)}isEpsilon(){return!0}},Vg=class extends Vy{constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}}});function UR(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}var Hy,qg,hse=F(()=>{ig();Hy={},qg=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let r=UR(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Ke(this.configs,e=>e.alt)}get key(){let e="";for(let r in this.map)e+=r+":";return e}}});function dMe(t,e){let r={};return n=>{let i=n.toString(),a=r[i];return a!==void 0||(a={atnStartState:t,decision:e,states:{}},r[i]=a),a}}function dse(t,e=!0){let r=new Set;for(let n of t){let i=new Set;for(let a of n){if(a===void 0){if(e)break;return!1}let s=[a.tokenTypeIdx].concat(a.categoryMatches);for(let o of s)if(r.has(o)){if(!i.has(o))return!1}else r.add(o),i.add(o)}}return!0}function pMe(t){let e=t.decisionStates.length,r=Array(e);for(let n=0;n<e;n++)r[n]=dMe(t.decisionStates[n],n);return r}function VR(t,e,r,n){let i=t[e](r),a=i.start;if(a===void 0){let o=SMe(i.atnStartState);a=mse(i,gse(o)),i.start=a}return gMe.apply(this,[i,a,r,n])}function gMe(t,e,r,n){let i=e,a=1,s=[],o=this.LA(a++);for(;;){let l=wMe(i,o);if(l===void 0&&(l=mMe.apply(this,[t,i,o,a,r,n])),l===Hy)return bMe(s,i,o);if(l.isAcceptState===!0)return l.prediction;i=l,s.push(o),o=this.LA(a++)}}function mMe(t,e,r,n,i,a){let s=kMe(e.configs,r,i);if(s.size===0)return pse(t,e,r,Hy),Hy;let o=gse(s),l=EMe(s,i);if(l!==void 0)o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l;else if(LMe(s)){let u=dl(s.alts);o.isAcceptState=!0,o.prediction=u,o.configs.uniqueAlt=u,vMe.apply(this,[t,n,s.alts,a])}return o=pse(t,e,r,o),o}function vMe(t,e,r,n){let i=[];for(let u=1;u<=e;u++)i.push(this.LA(u).tokenType);let a=t.atnStartState,s=a.rule,o=a.production,l=yMe({topLevelRule:s,ambiguityIndices:r,production:o,prefixPath:i});n(l)}function yMe(t){let e=Ke(t.prefixPath,i=>Mu(i)).join(", "),r=t.production.idx===0?"":t.production.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${xMe(t.production)}${r}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.`,n}function xMe(t){if(t instanceof jr)return"SUBRULE";if(t instanceof Kr)return"OPTION";if(t instanceof dn)return"OR";if(t instanceof kn)return"AT_LEAST_ONE";if(t instanceof Tn)return"AT_LEAST_ONE_SEP";if(t instanceof fn)return"MANY_SEP";if(t instanceof br)return"MANY";if(t instanceof dr)return"CONSUME";throw Error("non exhaustive match")}function bMe(t,e,r){let n=aa(e.configs.elements,a=>a.state.transitions),i=rte(n.filter(a=>a instanceof Ug).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:t}}function wMe(t,e){return t.edges[e.tokenTypeIdx]}function kMe(t,e,r){let n=new qg,i=[];for(let s of t.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===Wg){i.push(s);continue}let o=s.state.transitions.length;for(let l=0;l<o;l++){let u=s.state.transitions[l],h=TMe(u,e);h!==void 0&&n.add({state:h,alt:s.alt,stack:s.stack})}}let a;if(i.length===0&&n.size===1&&(a=n),a===void 0){a=new qg;for(let s of n.elements)Gk(s,a)}if(i.length>0&&!AMe(a))for(let s of i)a.add(s);return a}function TMe(t,e){if(t instanceof Ug&&Ly(e,t.tokenType))return t.target}function EMe(t,e){let r;for(let n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function gse(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function pse(t,e,r,n){return n=mse(t,n),e.edges[r.tokenTypeIdx]=n,n}function mse(t,e){if(e===Hy)return e;let r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}function SMe(t){let e=new qg,r=t.transitions.length;for(let n=0;n<r;n++){let a={state:t.transitions[n].target,alt:n,stack:[]};Gk(a,e)}return e}function Gk(t,e){let r=t.state;if(r.type===Wg){if(t.stack.length>0){let i=[...t.stack],s={state:i.pop(),alt:t.alt,stack:i};Gk(s,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);let n=r.transitions.length;for(let i=0;i<n;i++){let a=r.transitions[i],s=CMe(t,a);s!==void 0&&Gk(s,e)}}function CMe(t,e){if(e instanceof Wy)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof Vg){let r=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:r}}}function AMe(t){for(let e of t.elements)if(e.state.type===Wg)return!0;return!1}function _Me(t){for(let e of t.elements)if(e.state.type!==Wg)return!1;return!0}function LMe(t){if(_Me(t))return!0;let e=RMe(t.elements);return NMe(e)&&!IMe(e)}function RMe(t){let e=new Map;for(let r of t){let n=UR(r,!1),i=e.get(n);i===void 0&&(i={},e.set(n,i)),i[r.alt]=!0}return e}function NMe(t){for(let e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}function IMe(t){for(let e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var $k,fse,qy,vse=F(()=>{Hd();use();hse();T_();v_();nte();ig();f5();G5();q5();A_();$k=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="",r=this.predicates.length;for(let n=0;n<r;n++)e+=this.predicates[n]===!0?"1":"0";return e}},fse=new $k,qy=class extends Ou{constructor(e){var r;super(),this.logging=(r=e?.logging)!==null&&r!==void 0?r:n=>console.log(n)}initialize(e){this.atn=sse(e.rules),this.dfas=pMe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:r,rule:n,hasPredicates:i,dynamicTokensEnabled:a}=e,s=this.dfas,o=this.logging,l=qd(n,"Alternation",r),h=this.atn.decisionMap[l].decision,f=Ke(yk({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),d=>Ke(d,p=>p[0]));if(dse(f,!1)&&!a){let d=zr(f,(p,g,m)=>(Te(g,x=>{x&&(p[x.tokenTypeIdx]=m,Te(x.categoryMatches,y=>{p[y]=m}))}),p),{});return i?function(p){var g;let m=this.LA(1),x=d[m.tokenTypeIdx];if(p!==void 0&&x!==void 0){let y=(g=p[x])===null||g===void 0?void 0:g.GATE;if(y!==void 0&&y.call(this)===!1)return}return x}:function(){let p=this.LA(1);return d[p.tokenTypeIdx]}}else return i?function(d){let p=new $k,g=d===void 0?0:d.length;for(let x=0;x<g;x++){let y=d?.[x].GATE;p.set(x,y===void 0||y.call(this))}let m=VR.call(this,s,h,p,o);return typeof m=="number"?m:void 0}:function(){let d=VR.call(this,s,h,fse,o);return typeof d=="number"?d:void 0}}buildLookaheadForOptional(e){let{prodOccurrence:r,rule:n,prodType:i,dynamicTokensEnabled:a}=e,s=this.dfas,o=this.logging,l=qd(n,i,r),h=this.atn.decisionMap[l].decision,f=Ke(yk({maxLookahead:1,occurrence:r,prodType:i,rule:n}),d=>Ke(d,p=>p[0]));if(dse(f)&&f[0][0]&&!a){let d=f[0],p=Br(d);if(p.length===1&&nr(p[0].categoryMatches)){let m=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===m}}else{let g=zr(p,(m,x)=>(x!==void 0&&(m[x.tokenTypeIdx]=!0,Te(x.categoryMatches,y=>{m[y]=!0})),m),{});return function(){let m=this.LA(1);return g[m.tokenTypeIdx]===!0}}}return function(){let d=VR.call(this,s,h,fse,o);return typeof d=="object"?!1:d===0}}}});var yse=F(()=>{vse()});var xse,WR,bse,Uk,$r,wr,Vk,wse,HR,kse,Tse,Ese,Sse,qR,Cse,Ase,_se,Wk,Yg,Xg,YR,jg,Lse,XR,jR,KR,ZR,QR,Rse,Nse,JR,Ise,eN,Yy,Mse,Dse,Ose,Pse,Bse,Fse,zse,$se,Hk,Gse,Use,Vse,Wse,Hse,qse,Yse,Xse,jse,Kse,Zse,qk,Qse,Jse,eoe,toe,roe,noe,ioe,aoe,soe,ooe,loe,coe,uoe,tN,rN,hoe,foe,doe,poe,goe,moe,voe,yoe,xoe,nN,Oe,iN=F(()=>{"use strict";(function(t){function e(r){return typeof r=="string"}t.is=e})(xse||(xse={}));(function(t){function e(r){return typeof r=="string"}t.is=e})(WR||(WR={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(bse||(bse={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(Uk||(Uk={}));(function(t){function e(n,i){return n===Number.MAX_VALUE&&(n=Uk.MAX_VALUE),i===Number.MAX_VALUE&&(i=Uk.MAX_VALUE),{line:n,character:i}}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&Oe.uinteger(i.line)&&Oe.uinteger(i.character)}t.is=r})($r||($r={}));(function(t){function e(n,i,a,s){if(Oe.uinteger(n)&&Oe.uinteger(i)&&Oe.uinteger(a)&&Oe.uinteger(s))return{start:$r.create(n,i),end:$r.create(a,s)};if($r.is(n)&&$r.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${a}, ${s}]`)}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&$r.is(i.start)&&$r.is(i.end)}t.is=r})(wr||(wr={}));(function(t){function e(n,i){return{uri:n,range:i}}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&wr.is(i.range)&&(Oe.string(i.uri)||Oe.undefined(i.uri))}t.is=r})(Vk||(Vk={}));(function(t){function e(n,i,a,s){return{targetUri:n,targetRange:i,targetSelectionRange:a,originSelectionRange:s}}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&wr.is(i.targetRange)&&Oe.string(i.targetUri)&&wr.is(i.targetSelectionRange)&&(wr.is(i.originSelectionRange)||Oe.undefined(i.originSelectionRange))}t.is=r})(wse||(wse={}));(function(t){function e(n,i,a,s){return{red:n,green:i,blue:a,alpha:s}}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&Oe.numberRange(i.red,0,1)&&Oe.numberRange(i.green,0,1)&&Oe.numberRange(i.blue,0,1)&&Oe.numberRange(i.alpha,0,1)}t.is=r})(HR||(HR={}));(function(t){function e(n,i){return{range:n,color:i}}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&wr.is(i.range)&&HR.is(i.color)}t.is=r})(kse||(kse={}));(function(t){function e(n,i,a){return{label:n,textEdit:i,additionalTextEdits:a}}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&Oe.string(i.label)&&(Oe.undefined(i.textEdit)||Xg.is(i))&&(Oe.undefined(i.additionalTextEdits)||Oe.typedArray(i.additionalTextEdits,Xg.is))}t.is=r})(Tse||(Tse={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Ese||(Ese={}));(function(t){function e(n,i,a,s,o,l){let u={startLine:n,endLine:i};return Oe.defined(a)&&(u.startCharacter=a),Oe.defined(s)&&(u.endCharacter=s),Oe.defined(o)&&(u.kind=o),Oe.defined(l)&&(u.collapsedText=l),u}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&Oe.uinteger(i.startLine)&&Oe.uinteger(i.startLine)&&(Oe.undefined(i.startCharacter)||Oe.uinteger(i.startCharacter))&&(Oe.undefined(i.endCharacter)||Oe.uinteger(i.endCharacter))&&(Oe.undefined(i.kind)||Oe.string(i.kind))}t.is=r})(Sse||(Sse={}));(function(t){function e(n,i){return{location:n,message:i}}t.create=e;function r(n){let i=n;return Oe.defined(i)&&Vk.is(i.location)&&Oe.string(i.message)}t.is=r})(qR||(qR={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Cse||(Cse={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(Ase||(Ase={}));(function(t){function e(r){let n=r;return Oe.objectLiteral(n)&&Oe.string(n.href)}t.is=e})(_se||(_se={}));(function(t){function e(n,i,a,s,o,l){let u={range:n,message:i};return Oe.defined(a)&&(u.severity=a),Oe.defined(s)&&(u.code=s),Oe.defined(o)&&(u.source=o),Oe.defined(l)&&(u.relatedInformation=l),u}t.create=e;function r(n){var i;let a=n;return Oe.defined(a)&&wr.is(a.range)&&Oe.string(a.message)&&(Oe.number(a.severity)||Oe.undefined(a.severity))&&(Oe.integer(a.code)||Oe.string(a.code)||Oe.undefined(a.code))&&(Oe.undefined(a.codeDescription)||Oe.string((i=a.codeDescription)===null||i===void 0?void 0:i.href))&&(Oe.string(a.source)||Oe.undefined(a.source))&&(Oe.undefined(a.relatedInformation)||Oe.typedArray(a.relatedInformation,qR.is))}t.is=r})(Wk||(Wk={}));(function(t){function e(n,i,...a){let s={title:n,command:i};return Oe.defined(a)&&a.length>0&&(s.arguments=a),s}t.create=e;function r(n){let i=n;return Oe.defined(i)&&Oe.string(i.title)&&Oe.string(i.command)}t.is=r})(Yg||(Yg={}));(function(t){function e(a,s){return{range:a,newText:s}}t.replace=e;function r(a,s){return{range:{start:a,end:a},newText:s}}t.insert=r;function n(a){return{range:a,newText:""}}t.del=n;function i(a){let s=a;return Oe.objectLiteral(s)&&Oe.string(s.newText)&&wr.is(s.range)}t.is=i})(Xg||(Xg={}));(function(t){function e(n,i,a){let s={label:n};return i!==void 0&&(s.needsConfirmation=i),a!==void 0&&(s.description=a),s}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&Oe.string(i.label)&&(Oe.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(Oe.string(i.description)||i.description===void 0)}t.is=r})(YR||(YR={}));(function(t){function e(r){let n=r;return Oe.string(n)}t.is=e})(jg||(jg={}));(function(t){function e(a,s,o){return{range:a,newText:s,annotationId:o}}t.replace=e;function r(a,s,o){return{range:{start:a,end:a},newText:s,annotationId:o}}t.insert=r;function n(a,s){return{range:a,newText:"",annotationId:s}}t.del=n;function i(a){let s=a;return Xg.is(s)&&(YR.is(s.annotationId)||jg.is(s.annotationId))}t.is=i})(Lse||(Lse={}));(function(t){function e(n,i){return{textDocument:n,edits:i}}t.create=e;function r(n){let i=n;return Oe.defined(i)&&JR.is(i.textDocument)&&Array.isArray(i.edits)}t.is=r})(XR||(XR={}));(function(t){function e(n,i,a){let s={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s}t.create=e;function r(n){let i=n;return i&&i.kind==="create"&&Oe.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||Oe.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Oe.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||jg.is(i.annotationId))}t.is=r})(jR||(jR={}));(function(t){function e(n,i,a,s){let o={kind:"rename",oldUri:n,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}t.create=e;function r(n){let i=n;return i&&i.kind==="rename"&&Oe.string(i.oldUri)&&Oe.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||Oe.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Oe.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||jg.is(i.annotationId))}t.is=r})(KR||(KR={}));(function(t){function e(n,i,a){let s={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s}t.create=e;function r(n){let i=n;return i&&i.kind==="delete"&&Oe.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||Oe.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||Oe.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||jg.is(i.annotationId))}t.is=r})(ZR||(ZR={}));(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>Oe.string(i.kind)?jR.is(i)||KR.is(i)||ZR.is(i):XR.is(i)))}t.is=e})(QR||(QR={}));(function(t){function e(n){return{uri:n}}t.create=e;function r(n){let i=n;return Oe.defined(i)&&Oe.string(i.uri)}t.is=r})(Rse||(Rse={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return Oe.defined(i)&&Oe.string(i.uri)&&Oe.integer(i.version)}t.is=r})(Nse||(Nse={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return Oe.defined(i)&&Oe.string(i.uri)&&(i.version===null||Oe.integer(i.version))}t.is=r})(JR||(JR={}));(function(t){function e(n,i,a,s){return{uri:n,languageId:i,version:a,text:s}}t.create=e;function r(n){let i=n;return Oe.defined(i)&&Oe.string(i.uri)&&Oe.string(i.languageId)&&Oe.integer(i.version)&&Oe.string(i.text)}t.is=r})(Ise||(Ise={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}t.is=e})(eN||(eN={}));(function(t){function e(r){let n=r;return Oe.objectLiteral(r)&&eN.is(n.kind)&&Oe.string(n.value)}t.is=e})(Yy||(Yy={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Mse||(Mse={}));(function(t){t.PlainText=1,t.Snippet=2})(Dse||(Dse={}));(function(t){t.Deprecated=1})(Ose||(Ose={}));(function(t){function e(n,i,a){return{newText:n,insert:i,replace:a}}t.create=e;function r(n){let i=n;return i&&Oe.string(i.newText)&&wr.is(i.insert)&&wr.is(i.replace)}t.is=r})(Pse||(Pse={}));(function(t){t.asIs=1,t.adjustIndentation=2})(Bse||(Bse={}));(function(t){function e(r){let n=r;return n&&(Oe.string(n.detail)||n.detail===void 0)&&(Oe.string(n.description)||n.description===void 0)}t.is=e})(Fse||(Fse={}));(function(t){function e(r){return{label:r}}t.create=e})(zse||(zse={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}t.create=e})($se||($se={}));(function(t){function e(n){return n.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g,"\\\\$&")}t.fromPlainText=e;function r(n){let i=n;return Oe.string(i)||Oe.objectLiteral(i)&&Oe.string(i.language)&&Oe.string(i.value)}t.is=r})(Hk||(Hk={}));(function(t){function e(r){let n=r;return!!n&&Oe.objectLiteral(n)&&(Yy.is(n.contents)||Hk.is(n.contents)||Oe.typedArray(n.contents,Hk.is))&&(r.range===void 0||wr.is(r.range))}t.is=e})(Gse||(Gse={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}t.create=e})(Use||(Use={}));(function(t){function e(r,n,...i){let a={label:r};return Oe.defined(n)&&(a.documentation=n),Oe.defined(i)?a.parameters=i:a.parameters=[],a}t.create=e})(Vse||(Vse={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(Wse||(Wse={}));(function(t){function e(r,n){let i={range:r};return Oe.number(n)&&(i.kind=n),i}t.create=e})(Hse||(Hse={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(qse||(qse={}));(function(t){t.Deprecated=1})(Yse||(Yse={}));(function(t){function e(r,n,i,a,s){let o={name:r,kind:n,location:{uri:a,range:i}};return s&&(o.containerName=s),o}t.create=e})(Xse||(Xse={}));(function(t){function e(r,n,i,a){return a!==void 0?{name:r,kind:n,location:{uri:i,range:a}}:{name:r,kind:n,location:{uri:i}}}t.create=e})(jse||(jse={}));(function(t){function e(n,i,a,s,o,l){let u={name:n,detail:i,kind:a,range:s,selectionRange:o};return l!==void 0&&(u.children=l),u}t.create=e;function r(n){let i=n;return i&&Oe.string(i.name)&&Oe.number(i.kind)&&wr.is(i.range)&&wr.is(i.selectionRange)&&(i.detail===void 0||Oe.string(i.detail))&&(i.deprecated===void 0||Oe.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=r})(Kse||(Kse={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Zse||(Zse={}));(function(t){t.Invoked=1,t.Automatic=2})(qk||(qk={}));(function(t){function e(n,i,a){let s={diagnostics:n};return i!=null&&(s.only=i),a!=null&&(s.triggerKind=a),s}t.create=e;function r(n){let i=n;return Oe.defined(i)&&Oe.typedArray(i.diagnostics,Wk.is)&&(i.only===void 0||Oe.typedArray(i.only,Oe.string))&&(i.triggerKind===void 0||i.triggerKind===qk.Invoked||i.triggerKind===qk.Automatic)}t.is=r})(Qse||(Qse={}));(function(t){function e(n,i,a){let s={title:n},o=!0;return typeof i=="string"?(o=!1,s.kind=i):Yg.is(i)?s.command=i:s.edit=i,o&&a!==void 0&&(s.kind=a),s}t.create=e;function r(n){let i=n;return i&&Oe.string(i.title)&&(i.diagnostics===void 0||Oe.typedArray(i.diagnostics,Wk.is))&&(i.kind===void 0||Oe.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Yg.is(i.command))&&(i.isPreferred===void 0||Oe.boolean(i.isPreferred))&&(i.edit===void 0||QR.is(i.edit))}t.is=r})(Jse||(Jse={}));(function(t){function e(n,i){let a={range:n};return Oe.defined(i)&&(a.data=i),a}t.create=e;function r(n){let i=n;return Oe.defined(i)&&wr.is(i.range)&&(Oe.undefined(i.command)||Yg.is(i.command))}t.is=r})(eoe||(eoe={}));(function(t){function e(n,i){return{tabSize:n,insertSpaces:i}}t.create=e;function r(n){let i=n;return Oe.defined(i)&&Oe.uinteger(i.tabSize)&&Oe.boolean(i.insertSpaces)}t.is=r})(toe||(toe={}));(function(t){function e(n,i,a){return{range:n,target:i,data:a}}t.create=e;function r(n){let i=n;return Oe.defined(i)&&wr.is(i.range)&&(Oe.undefined(i.target)||Oe.string(i.target))}t.is=r})(roe||(roe={}));(function(t){function e(n,i){return{range:n,parent:i}}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&wr.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=r})(noe||(noe={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(ioe||(ioe={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(aoe||(aoe={}));(function(t){function e(r){let n=r;return Oe.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}t.is=e})(soe||(soe={}));(function(t){function e(n,i){return{range:n,text:i}}t.create=e;function r(n){let i=n;return i!=null&&wr.is(i.range)&&Oe.string(i.text)}t.is=r})(ooe||(ooe={}));(function(t){function e(n,i,a){return{range:n,variableName:i,caseSensitiveLookup:a}}t.create=e;function r(n){let i=n;return i!=null&&wr.is(i.range)&&Oe.boolean(i.caseSensitiveLookup)&&(Oe.string(i.variableName)||i.variableName===void 0)}t.is=r})(loe||(loe={}));(function(t){function e(n,i){return{range:n,expression:i}}t.create=e;function r(n){let i=n;return i!=null&&wr.is(i.range)&&(Oe.string(i.expression)||i.expression===void 0)}t.is=r})(coe||(coe={}));(function(t){function e(n,i){return{frameId:n,stoppedLocation:i}}t.create=e;function r(n){let i=n;return Oe.defined(i)&&wr.is(n.stoppedLocation)}t.is=r})(uoe||(uoe={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}t.is=e})(tN||(tN={}));(function(t){function e(n){return{value:n}}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&(i.tooltip===void 0||Oe.string(i.tooltip)||Yy.is(i.tooltip))&&(i.location===void 0||Vk.is(i.location))&&(i.command===void 0||Yg.is(i.command))}t.is=r})(rN||(rN={}));(function(t){function e(n,i,a){let s={position:n,label:i};return a!==void 0&&(s.kind=a),s}t.create=e;function r(n){let i=n;return Oe.objectLiteral(i)&&$r.is(i.position)&&(Oe.string(i.label)||Oe.typedArray(i.label,rN.is))&&(i.kind===void 0||tN.is(i.kind))&&i.textEdits===void 0||Oe.typedArray(i.textEdits,Xg.is)&&(i.tooltip===void 0||Oe.string(i.tooltip)||Yy.is(i.tooltip))&&(i.paddingLeft===void 0||Oe.boolean(i.paddingLeft))&&(i.paddingRight===void 0||Oe.boolean(i.paddingRight))}t.is=r})(hoe||(hoe={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e})(foe||(foe={}));(function(t){function e(r,n,i,a){return{insertText:r,filterText:n,range:i,command:a}}t.create=e})(doe||(doe={}));(function(t){function e(r){return{items:r}}t.create=e})(poe||(poe={}));(function(t){t.Invoked=0,t.Automatic=1})(goe||(goe={}));(function(t){function e(r,n){return{range:r,text:n}}t.create=e})(moe||(moe={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}t.create=e})(voe||(voe={}));(function(t){function e(r){let n=r;return Oe.objectLiteral(n)&&WR.is(n.uri)&&Oe.string(n.name)}t.is=e})(yoe||(yoe={}));(function(t){function e(a,s,o,l){return new nN(a,s,o,l)}t.create=e;function r(a){let s=a;return!!(Oe.defined(s)&&Oe.string(s.uri)&&(Oe.undefined(s.languageId)||Oe.string(s.languageId))&&Oe.uinteger(s.lineCount)&&Oe.func(s.getText)&&Oe.func(s.positionAt)&&Oe.func(s.offsetAt))}t.is=r;function n(a,s){let o=a.getText(),l=i(s,(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=o.length;for(let h=l.length-1;h>=0;h--){let f=l[h],d=a.offsetAt(f.range.start),p=a.offsetAt(f.range.end);if(p<=u)o=o.substring(0,d)+f.newText+o.substring(p,o.length);else throw new Error("Overlapping edit");u=d}return o}t.applyEdits=n;function i(a,s){if(a.length<=1)return a;let o=a.length/2|0,l=a.slice(0,o),u=a.slice(o);i(l,s),i(u,s);let h=0,f=0,d=0;for(;h<l.length&&f<u.length;)s(l[h],u[f])<=0?a[d++]=l[h++]:a[d++]=u[f++];for(;h<l.length;)a[d++]=l[h++];for(;f<u.length;)a[d++]=u[f++];return a}})(xoe||(xoe={}));nN=class{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,n=!0;for(let i=0;i<r.length;i++){n&&(e.push(i),n=!1);let a=r.charAt(i);n=a==="\\r"||a===`\n`,a==="\\r"&&i+1<r.length&&r.charAt(i+1)===`\n`&&i++}n&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return $r.create(0,e);for(;n<i;){let s=Math.floor((n+i)/2);r[s]>e?i=s:n=s+1}let a=n-1;return $r.create(a,e-r[a])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],i=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}};(function(t){let e=Object.prototype.toString;function r(p){return typeof p<"u"}t.defined=r;function n(p){return typeof p>"u"}t.undefined=n;function i(p){return p===!0||p===!1}t.boolean=i;function a(p){return e.call(p)==="[object String]"}t.string=a;function s(p){return e.call(p)==="[object Number]"}t.number=s;function o(p,g,m){return e.call(p)==="[object Number]"&&g<=p&&p<=m}t.numberRange=o;function l(p){return e.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}t.integer=l;function u(p){return e.call(p)==="[object Number]"&&0<=p&&p<=2147483647}t.uinteger=u;function h(p){return e.call(p)==="[object Function]"}t.func=h;function f(p){return p!==null&&typeof p=="object"}t.objectLiteral=f;function d(p,g){return Array.isArray(p)&&p.every(g)}t.typedArray=d})(Oe||(Oe={}))});var Xy,jy,Xd,jd,aN,Kg,Yk=F(()=>{iN();Mo();yl();Xy=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(e){return this.rootNode=new Kg(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let r=new jd;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){let n=new Xd(e.startOffset,e.image.length,xg(e),e.tokenType,!1);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let r=e.container;if(r){let n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}construct(e){let r=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=r;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}addHiddenTokens(e){for(let r of e){let n=new Xd(r.startOffset,r.image.length,xg(r),r.tokenType,!0);n.root=this.rootNode,this.addHiddenToken(this.rootNode,n)}}addHiddenToken(e,r){let{offset:n,end:i}=r;for(let a=0;a<e.content.length;a++){let s=e.content[a],{offset:o,end:l}=s;if(qs(s)&&n>o&&i<l){this.addHiddenToken(s,r);return}else if(i<=o){e.content.splice(a,0,r);return}}e.content.push(r)}},jy=class{get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var e,r;let n=typeof((e=this._astNode)===null||e===void 0?void 0:e.$type)=="string"?this._astNode:(r=this.container)===null||r===void 0?void 0:r.astNode;if(!n)throw new Error("This node has no associated AST element");return n}set astNode(e){this._astNode=e}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},Xd=class extends jy{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,r,n,i,a=!1){super(),this._hidden=a,this._offset=e,this._tokenType=i,this._length=r,this._range=n}},jd=class extends jy{constructor(){super(...arguments),this.content=new aN(this)}get children(){return this.content}get offset(){var e,r;return(r=(e=this.firstNonHiddenNode)===null||e===void 0?void 0:e.offset)!==null&&r!==void 0?r:0}get length(){return this.end-this.offset}get end(){var e,r;return(r=(e=this.lastNonHiddenNode)===null||e===void 0?void 0:e.end)!==null&&r!==void 0?r:0}get range(){let e=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(e&&r){if(this._rangeCache===void 0){let{range:n}=e,{range:i}=r;this._rangeCache={start:n.start,end:i.end.line<n.start.line?n.start:i.end}}return this._rangeCache}else return{start:$r.create(0,0),end:$r.create(0,0)}}get firstNonHiddenNode(){for(let e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){let r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},aN=class t extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(let r of e)r.container=this.parent}},Kg=class extends jd{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}});function sN(t){return t.$type===Xk}var Xk,boe,woe,Ky,Zy,jk,Zg,Qy,MMe,oN,Jy=F(()=>{Hd();yse();vc();wl();Wa();Yk();Xk=Symbol("Datatype");boe="\\u200B",woe=t=>t.endsWith(boe)?t:t+boe,Ky=class{constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;let r=this.lexer.definition;this.wrapper=new oN(r,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Zy=class extends Ky{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Xy,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,r){let n=e.fragment?void 0:ky(e)?Xk:Bd(e),i=this.wrapper.DEFINE_RULE(woe(e.name),this.startImplementation(n,r).bind(this));return e.entry&&(this.mainRule=i),i}parse(e){this.nodeBuilder.buildRootNode(e);let r=this.lexer.tokenize(e);this.wrapper.input=r.tokens;let n=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(r.hidden),this.unorderedGroups.clear(),{value:n,lexerErrors:r.errors,parserErrors:this.wrapper.errors}}startImplementation(e,r){return n=>{if(!this.isRecording()){let a={$type:e};this.stack.push(a),e===Xk&&(a.value="")}let i;try{i=r(n)}catch{i=void 0}return!this.isRecording()&&i===void 0&&(i=this.construct()),i}}consume(e,r,n){let i=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(i)){let a=this.nodeBuilder.buildLeafNode(i,n),{assignment:s,isCrossRef:o}=this.getAssignment(n),l=this.current;if(s){let u=Oo(n)?i.image:this.converter.convert(i.image,a);this.assign(s.operator,s.feature,u,a,o)}else if(sN(l)){let u=i.image;Oo(n)||(u=this.converter.convert(u,a).toString()),l.value+=u}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,i){let a;this.isRecording()||(a=this.nodeBuilder.buildCompositeNode(n));let s=this.wrapper.wrapSubrule(e,r,i);!this.isRecording()&&a&&a.length>0&&this.performSubruleAssignment(s,n,a)}performSubruleAssignment(e,r,n){let{assignment:i,isCrossRef:a}=this.getAssignment(r);if(i)this.assign(i.operator,i.feature,e,n,a);else if(!i){let s=this.current;if(sN(s))s.value+=e.toString();else if(typeof e=="object"&&e){let o=e.$type,l=this.assignWithoutOverride(e,s);o&&(l.$type=o);let u=l;this.stack.pop(),this.stack.push(u)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&r.feature&&r.operator){n=this.construct(!1);let a=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(a)}let i={$type:e};this.stack.pop(),this.stack.push(i),r.feature&&r.operator&&this.assign(r.operator,r.feature,n,n.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;let r=this.current;return Yw(r),this.nodeBuilder.construct(r),e&&this.stack.pop(),sN(r)?this.converter.convert(r.value,r.$cstNode):(OL(this.astReflection,r),r)}getAssignment(e){if(!this.assignmentMap.has(e)){let r=Id(e,xl);this.assignmentMap.set(e,{assignment:r,isCrossRef:r?Nd(r.terminal):!1})}return this.assignmentMap.get(e)}assign(e,r,n,i,a){let s=this.current,o;switch(a&&typeof n=="string"?o=this.linker.buildReference(s,r,i,n):o=n,e){case"=":{s[r]=o;break}case"?=":{s[r]=!0;break}case"+=":Array.isArray(s[r])||(s[r]=[]),s[r].push(o)}}assignWithoutOverride(e,r){for(let[n,i]of Object.entries(r)){let a=e[n];a===void 0?e[n]=i:Array.isArray(a)&&Array.isArray(i)&&(i.push(...a),e[n]=i)}return e}get definitionErrors(){return this.wrapper.definitionErrors}},jk=class{buildMismatchTokenMessage(e){return Du.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Du.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Du.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Du.buildEarlyExitMessage(e)}},Zg=class extends jk{buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword \'${e.name.substring(0,e.name.length-3)}\'`:`token of type \'${e.name}\'`} but found \\`${r.image}\\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \\`${e.image}\\`.`}},Qy=class extends Ky{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let r=this.lexer.tokenize(e);return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,r){let n=this.wrapper.DEFINE_RULE(woe(e.name),this.startImplementation(r).bind(this));return e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return r=>{let n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,i){this.before(n),this.wrapper.wrapSubrule(e,r,i),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},MMe={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Zg},oN=class extends Uy{constructor(e,r){let n=r&&"maxLookahead"in r;super(e,Object.assign(Object.assign(Object.assign({},MMe),{lookaheadStrategy:n?new Ou({maxLookahead:r.maxLookahead}):new qy}),r))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r){return this.RULE(e,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}}});function Zk(t,e,r){return DMe({parser:e,tokens:r,rules:new Map,ruleNames:new Map},t),e}function DMe(t,e){let r=by(e,!1),n=Yr(e.rules).filter(Ta).filter(i=>r.has(i));for(let i of n){let a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});a.rules.set(i.name,t.parser.rule(i,Kd(a,i.definition)))}}function Kd(t,e,r=!1){let n;if(Oo(e))n=GMe(t,e);else if(_u(e))n=OMe(t,e);else if(xl(e))n=Kd(t,e.terminal);else if(Nd(e))n=koe(t,e);else if(bl(e))n=PMe(t,e);else if(Ww(e))n=FMe(t,e);else if(qw(e))n=zMe(t,e);else if(Wh(e))n=$Me(t,e);else if(gL(e)){let i=t.consume++;n=()=>t.parser.consume(i,js,e)}else throw new Rd(e.$cstNode,`Unexpected element type: ${e.$type}`);return Toe(t,r?void 0:Kk(e),n,e.cardinality)}function OMe(t,e){let r=Bd(e);return()=>t.parser.action(r,e)}function PMe(t,e){let r=e.rule.ref;if(Ta(r)){let n=t.subrule++,i=e.arguments.length>0?BMe(r,e.arguments):()=>({});return a=>t.parser.subrule(n,Eoe(t,r),e,i(a))}else if(Do(r)){let n=t.consume++,i=lN(t,r.name);return()=>t.parser.consume(n,i,e)}else if(r)Vh(r);else throw new Rd(e.$cstNode,`Undefined rule type: ${e.$type}`)}function BMe(t,e){let r=e.map(n=>Pu(n.value));return n=>{let i={};for(let a=0;a<r.length;a++){let s=t.parameters[a],o=r[a];i[s.name]=o(n)}return i}}function Pu(t){if(V9(t)){let e=Pu(t.left),r=Pu(t.right);return n=>e(n)||r(n)}else if(G9(t)){let e=Pu(t.left),r=Pu(t.right);return n=>e(n)&&r(n)}else if(X9(t)){let e=Pu(t.value);return r=>!e(r)}else if(Q9(t)){let e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(z9(t)){let e=!!t.true;return()=>e}Vh(t)}function FMe(t,e){if(e.elements.length===1)return Kd(t,e.elements[0]);{let r=[];for(let i of e.elements){let a={ALT:Kd(t,i,!0)},s=Kk(i);s&&(a.GATE=Pu(s)),r.push(a)}let n=t.or++;return i=>t.parser.alternatives(n,r.map(a=>{let s={ALT:()=>a.ALT(i)},o=a.GATE;return o&&(s.GATE=()=>o(i)),s}))}}function zMe(t,e){if(e.elements.length===1)return Kd(t,e.elements[0]);let r=[];for(let o of e.elements){let l={ALT:Kd(t,o,!0)},u=Kk(o);u&&(l.GATE=Pu(u)),r.push(l)}let n=t.or++,i=(o,l)=>{let u=l.getRuleStack().join("-");return`uGroup_${o}_${u}`},a=o=>t.parser.alternatives(n,r.map((l,u)=>{let h={ALT:()=>!0},f=t.parser;h.ALT=()=>{if(l.ALT(o),!f.isRecording()){let p=i(n,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);let g=f.unorderedGroups.get(p);typeof g?.[u]>"u"&&(g[u]=!0)}};let d=l.GATE;return d?h.GATE=()=>d(o):h.GATE=()=>{let p=f.unorderedGroups.get(i(n,f));return!p?.[u]},h})),s=Toe(t,Kk(e),a,"*");return o=>{s(o),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(n,t.parser))}}function $Me(t,e){let r=e.elements.map(n=>Kd(t,n));return n=>r.forEach(i=>i(n))}function Kk(t){if(Wh(t))return t.guardCondition}function koe(t,e,r=e.terminal){if(r)if(bl(r)&&Ta(r.rule.ref)){let n=t.subrule++;return i=>t.parser.subrule(n,Eoe(t,r.rule.ref),e,i)}else if(bl(r)&&Do(r.rule.ref)){let n=t.consume++,i=lN(t,r.rule.ref.name);return()=>t.parser.consume(n,i,e)}else if(Oo(r)){let n=t.consume++,i=lN(t,r.value);return()=>t.parser.consume(n,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);let n=Jw(e.type.ref),i=n?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+Bd(e.type.ref));return koe(t,e,i)}}function GMe(t,e){let r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}function Toe(t,e,r,n){let i=e&&Pu(e);if(!n)if(i){let a=t.or++;return s=>t.parser.alternatives(a,[{ALT:()=>r(s),GATE:()=>i(s)},{ALT:zk(),GATE:()=>!i(s)}])}else return r;if(n==="*"){let a=t.many++;return s=>t.parser.many(a,{DEF:()=>r(s),GATE:i?()=>i(s):void 0})}else if(n==="+"){let a=t.many++;if(i){let s=t.or++;return o=>t.parser.alternatives(s,[{ALT:()=>t.parser.atLeastOne(a,{DEF:()=>r(o)}),GATE:()=>i(o)},{ALT:zk(),GATE:()=>!i(o)}])}else return s=>t.parser.atLeastOne(a,{DEF:()=>r(s)})}else if(n==="?"){let a=t.optional++;return s=>t.parser.optional(a,{DEF:()=>r(s),GATE:i?()=>i(s):void 0})}else Vh(n)}function Eoe(t,e){let r=UMe(t,e),n=t.rules.get(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function UMe(t,e){if(Ta(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,i=e.$type;for(;!Ta(n);)(Wh(n)||Ww(n)||qw(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,t.ruleNames.set(e,i),i}}function lN(t,e){let r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}var cN=F(()=>{Hd();vc();Bw();xs();wl()});function uN(t){let e=t.Grammar,r=t.parser.Lexer,n=new Qy(t);return Zk(e,n,r.definition),n.finalize(),n}var hN=F(()=>{Jy();cN()});function fN(t){let e=Soe(t);return e.finalize(),e}function Soe(t){let e=t.Grammar,r=t.parser.Lexer,n=new Zy(t);return Zk(e,n,r.definition)}var dN=F(()=>{Jy();cN()});var Zd,pN=F(()=>{Hd();vc();Wa();wl();Tg();xs();Zd=class{buildTokens(e,r){let n=Yr(by(e,!1)),i=this.buildTerminalTokens(n),a=this.buildKeywordTokens(n,i,r);return i.forEach(s=>{let o=s.PATTERN;typeof o=="object"&&o&&"test"in o&&Zw(o)?a.unshift(s):a.push(s)}),a}buildTerminalTokens(e){return e.filter(Do).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){let r=Eg(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,i={name:e.name,PATTERN:n,LINE_BREAKS:!0};return e.hidden&&(i.GROUP=Zw(r)?Jn.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")?!0:!!(e.source.includes("?<=")||e.source.includes("?<!"))}regexPatternFunction(e){let r=new RegExp(e,e.flags+"y");return(n,i)=>(r.lastIndex=i,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(Ta).flatMap(i=>yc(i).filter(Oo)).distinct(i=>i.value).toArray().sort((i,a)=>a.value.length-i.value.length).map(i=>this.buildKeywordToken(i,r,!!n?.caseInsensitive))}buildKeywordToken(e,r,n){return{name:e.value,PATTERN:this.buildKeywordPattern(e,n),LONGER_ALT:this.findLongerAlt(e,r)}}buildKeywordPattern(e,r){return r?new RegExp(UL(e.value)):e.value}findLongerAlt(e,r){return r.reduce((n,i)=>{let a=i?.PATTERN;return a?.source&&VL("^"+a.source+"$",e.value)&&n.push(i),n},[])}}});var Qd,wc,gN=F(()=>{vc();wl();Qd=class{convert(e,r){let n=r.grammarSource;if(Nd(n)&&(n=qL(n)),bl(n)){let i=n.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,r)}return e}runConverter(e,r,n){var i;switch(e.name.toUpperCase()){case"INT":return wc.convertInt(r);case"STRING":return wc.convertString(r);case"ID":return wc.convertID(r)}switch((i=eR(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return wc.convertNumber(r);case"boolean":return wc.convertBoolean(r);case"bigint":return wc.convertBigint(r);case"date":return wc.convertDate(r);default:return r}}};(function(t){function e(u){let h="";for(let f=1;f<u.length-1;f++){let d=u.charAt(f);if(d==="\\\\"){let p=u.charAt(++f);h+=r(p)}else h+=d}return h}t.convertString=e;function r(u){switch(u){case"b":return"\\b";case"f":return"\\f";case"n":return`\n`;case"r":return"\\r";case"t":return" ";case"v":return"\\v";case"0":return"\\0";default:return u}}function n(u){return u.charAt(0)==="^"?u.substring(1):u}t.convertID=n;function i(u){return parseInt(u)}t.convertInt=i;function a(u){return BigInt(u)}t.convertBigint=a;function s(u){return new Date(u)}t.convertDate=s;function o(u){return Number(u)}t.convertNumber=o;function l(u){return u.toLowerCase()==="true"}t.convertBoolean=l})(wc||(wc={}))});var xN=yi(yN=>{"use strict";Object.defineProperty(yN,"__esModule",{value:!0});var mN;function vN(){if(mN===void 0)throw new Error("No runtime abstraction layer installed");return mN}(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");mN=r}t.install=e})(vN||(vN={}));yN.default=vN});var _oe=yi(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.stringArray=Ea.array=Ea.func=Ea.error=Ea.number=Ea.string=Ea.boolean=void 0;function VMe(t){return t===!0||t===!1}Ea.boolean=VMe;function Coe(t){return typeof t=="string"||t instanceof String}Ea.string=Coe;function WMe(t){return typeof t=="number"||t instanceof Number}Ea.number=WMe;function HMe(t){return t instanceof Error}Ea.error=HMe;function qMe(t){return typeof t=="function"}Ea.func=qMe;function Aoe(t){return Array.isArray(t)}Ea.array=Aoe;function YMe(t){return Aoe(t)&&t.every(e=>Coe(e))}Ea.stringArray=YMe});var wN=yi(Qg=>{"use strict";Object.defineProperty(Qg,"__esModule",{value:!0});Qg.Emitter=Qg.Event=void 0;var XMe=xN(),Loe;(function(t){let e={dispose(){}};t.None=function(){return e}})(Loe||(Qg.Event=Loe={}));var bN=class{add(e,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,r)})}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,a=this._callbacks.length;i<a;i++)if(this._callbacks[i]===e)if(this._contexts[i]===r){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else n=!0;if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let r=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,s=n.length;a<s;a++)try{r.push(n[a].apply(i[a],e))}catch(o){(0,XMe.default)().console.error(o)}return r}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Qk=class t{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,r,n)=>{this._callbacks||(this._callbacks=new bN),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,r),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Qg.Emitter=Qk;Qk._noop=function(){}});var Roe=yi(Jg=>{"use strict";Object.defineProperty(Jg,"__esModule",{value:!0});Jg.CancellationTokenSource=Jg.CancellationToken=void 0;var jMe=xN(),KMe=_oe(),kN=wN(),Jk;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:kN.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:kN.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||KMe.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}t.is=e})(Jk||(Jg.CancellationToken=Jk={}));var ZMe=Object.freeze(function(t,e){let r=(0,jMe.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),eT=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?ZMe:(this._emitter||(this._emitter=new kN.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},TN=class{get token(){return this._token||(this._token=new eT),this._token}cancel(){this._token?this._token.cancel():this._token=Jk.Cancelled}dispose(){this._token?this._token instanceof eT&&this._token.dispose():this._token=Jk.None}};Jg.CancellationTokenSource=TN});var gr={};var Bo=F(()=>{pr(gr,ga(Roe(),1))});function SN(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}function Ioe(){return EN=Date.now(),new gr.CancellationTokenSource}function Moe(t){Noe=t}function Xh(t){return t===kc}async function _i(t){if(t===gr.CancellationToken.None)return;let e=Date.now();if(e-EN>=Noe&&(EN=e,await SN()),t.isCancellationRequested)throw kc}var EN,Noe,kc,ja,Fo=F(()=>{Bo();EN=0,Noe=10;kc=Symbol("OperationCancelled");ja=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}}});function CN(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);CN(n,e),CN(i,e);let a=0,s=0,o=0;for(;a<n.length&&s<i.length;)e(n[a],i[s])<=0?t[o++]=n[a++]:t[o++]=i[s++];for(;a<n.length;)t[o++]=n[a++];for(;s<i.length;)t[o++]=i[s++];return t}function Doe(t,e,r=0){let n=e?[r]:[];for(let i=0;i<t.length;i++){let a=t.charCodeAt(i);Ooe(a)&&(a===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}function Ooe(t){return t===13||t===10}function Poe(t){let e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function QMe(t){let e=Poe(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var tT,em,Boe=F(()=>{"use strict";tT=class t{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(let n of e)if(t.isIncremental(n)){let i=Poe(n.range),a=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,a)+n.text+this._content.substring(s,this._content.length);let o=Math.max(i.start.line,0),l=Math.max(i.end.line,0),u=this._lineOffsets,h=Doe(n.text,!1,a);if(l-o===h.length)for(let d=0,p=h.length;d<p;d++)u[d+o+1]=h[d];else h.length<1e4?u.splice(o+1,l-o,...h):this._lineOffsets=u=u.slice(0,o+1).concat(h,u.slice(l+1));let f=n.text.length-(s-a);if(f!==0)for(let d=o+1+h.length,p=u.length;d<p;d++)u[d]=u[d]+f}else if(t.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Doe(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return{line:0,character:e};for(;n<i;){let s=Math.floor((n+i)/2);r[s]>e?i=s:n=s+1}let a=n-1;return e=this.ensureBeforeEOL(e,r[a]),{line:a,character:e-r[a]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let i=e.line+1<r.length?r[e.line+1]:this._content.length,a=Math.min(n+e.character,i);return this.ensureBeforeEOL(a,n)}ensureBeforeEOL(e,r){for(;e>r&&Ooe(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(i,a,s,o){return new tT(i,a,s,o)}t.create=e;function r(i,a,s){if(i instanceof tT)return i.update(a,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=r;function n(i,a){let s=i.getText(),o=CN(a.map(QMe),(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=0,u=[];for(let h of o){let f=i.offsetAt(h.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&u.push(s.substring(l,f)),h.newText.length&&u.push(h.newText),l=i.offsetAt(h.range.end)}return u.push(s.substr(l)),u.join("")}t.applyEdits=n})(em||(em={}))});var Foe,ks,tm,AN=F(()=>{(()=>{"use strict";var t={470:i=>{function a(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function s(l,u){for(var h,f="",d=0,p=-1,g=0,m=0;m<=l.length;++m){if(m<l.length)h=l.charCodeAt(m);else{if(h===47)break;h=47}if(h===47){if(!(p===m-1||g===1))if(p!==m-1&&g===2){if(f.length<2||d!==2||f.charCodeAt(f.length-1)!==46||f.charCodeAt(f.length-2)!==46){if(f.length>2){var x=f.lastIndexOf("/");if(x!==f.length-1){x===-1?(f="",d=0):d=(f=f.slice(0,x)).length-1-f.lastIndexOf("/"),p=m,g=0;continue}}else if(f.length===2||f.length===1){f="",d=0,p=m,g=0;continue}}u&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+l.slice(p+1,m):f=l.slice(p+1,m),d=m-p-1;p=m,g=0}else h===46&&g!==-1?++g:g=-1}return f}var o={resolve:function(){for(var l,u="",h=!1,f=arguments.length-1;f>=-1&&!h;f--){var d;f>=0?d=arguments[f]:(l===void 0&&(l=process.cwd()),d=l),a(d),d.length!==0&&(u=d+"/"+u,h=d.charCodeAt(0)===47)}return u=s(u,!h),h?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(l){if(a(l),l.length===0)return".";var u=l.charCodeAt(0)===47,h=l.charCodeAt(l.length-1)===47;return(l=s(l,!u)).length!==0||u||(l="."),l.length>0&&h&&(l+="/"),u?"/"+l:l},isAbsolute:function(l){return a(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,u=0;u<arguments.length;++u){var h=arguments[u];a(h),h.length>0&&(l===void 0?l=h:l+="/"+h)}return l===void 0?".":o.normalize(l)},relative:function(l,u){if(a(l),a(u),l===u||(l=o.resolve(l))===(u=o.resolve(u)))return"";for(var h=1;h<l.length&&l.charCodeAt(h)===47;++h);for(var f=l.length,d=f-h,p=1;p<u.length&&u.charCodeAt(p)===47;++p);for(var g=u.length-p,m=d<g?d:g,x=-1,y=0;y<=m;++y){if(y===m){if(g>m){if(u.charCodeAt(p+y)===47)return u.slice(p+y+1);if(y===0)return u.slice(p+y)}else d>m&&(l.charCodeAt(h+y)===47?x=y:y===0&&(x=0));break}var b=l.charCodeAt(h+y);if(b!==u.charCodeAt(p+y))break;b===47&&(x=y)}var w="";for(y=h+x+1;y<=f;++y)y!==f&&l.charCodeAt(y)!==47||(w.length===0?w+="..":w+="/..");return w.length>0?w+u.slice(p+x):(p+=x,u.charCodeAt(p)===47&&++p,u.slice(p))},_makeLong:function(l){return l},dirname:function(l){if(a(l),l.length===0)return".";for(var u=l.charCodeAt(0),h=u===47,f=-1,d=!0,p=l.length-1;p>=1;--p)if((u=l.charCodeAt(p))===47){if(!d){f=p;break}}else d=!1;return f===-1?h?"/":".":h&&f===1?"//":l.slice(0,f)},basename:function(l,u){if(u!==void 0&&typeof u!="string")throw new TypeError(\'"ext" argument must be a string\');a(l);var h,f=0,d=-1,p=!0;if(u!==void 0&&u.length>0&&u.length<=l.length){if(u.length===l.length&&u===l)return"";var g=u.length-1,m=-1;for(h=l.length-1;h>=0;--h){var x=l.charCodeAt(h);if(x===47){if(!p){f=h+1;break}}else m===-1&&(p=!1,m=h+1),g>=0&&(x===u.charCodeAt(g)?--g==-1&&(d=h):(g=-1,d=m))}return f===d?d=m:d===-1&&(d=l.length),l.slice(f,d)}for(h=l.length-1;h>=0;--h)if(l.charCodeAt(h)===47){if(!p){f=h+1;break}}else d===-1&&(p=!1,d=h+1);return d===-1?"":l.slice(f,d)},extname:function(l){a(l);for(var u=-1,h=0,f=-1,d=!0,p=0,g=l.length-1;g>=0;--g){var m=l.charCodeAt(g);if(m!==47)f===-1&&(d=!1,f=g+1),m===46?u===-1?u=g:p!==1&&(p=1):u!==-1&&(p=-1);else if(!d){h=g+1;break}}return u===-1||f===-1||p===0||p===1&&u===f-1&&u===h+1?"":l.slice(u,f)},format:function(l){if(l===null||typeof l!="object")throw new TypeError(\'The "pathObject" argument must be of type Object. Received type \'+typeof l);return function(u,h){var f=h.dir||h.root,d=h.base||(h.name||"")+(h.ext||"");return f?f===h.root?f+d:f+"/"+d:d}(0,l)},parse:function(l){a(l);var u={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return u;var h,f=l.charCodeAt(0),d=f===47;d?(u.root="/",h=1):h=0;for(var p=-1,g=0,m=-1,x=!0,y=l.length-1,b=0;y>=h;--y)if((f=l.charCodeAt(y))!==47)m===-1&&(x=!1,m=y+1),f===46?p===-1?p=y:b!==1&&(b=1):p!==-1&&(b=-1);else if(!x){g=y+1;break}return p===-1||m===-1||b===0||b===1&&p===m-1&&p===g+1?m!==-1&&(u.base=u.name=g===0&&d?l.slice(1,m):l.slice(g,m)):(g===0&&d?(u.name=l.slice(1,p),u.base=l.slice(1,m)):(u.name=l.slice(g,p),u.base=l.slice(g,m)),u.ext=l.slice(p,m)),g>0?u.dir=l.slice(0,g-1):d&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function r(i){var a=e[i];if(a!==void 0)return a.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,r),s.exports}r.d=(i,a)=>{for(var s in a)r.o(a,s)&&!r.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:a[s]})},r.o=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),r.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var n={};(()=>{let i;r.r(n),r.d(n,{URI:()=>d,Utils:()=>M}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let a=/^\\w[\\w\\d+.-]*$/,s=/^\\//,o=/^\\/\\//;function l(R,T){if(!R.scheme&&T)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${R.authority}", path: "${R.path}", query: "${R.query}", fragment: "${R.fragment}"}`);if(R.scheme&&!a.test(R.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(R.path){if(R.authority){if(!s.test(R.path))throw new Error(\'[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character\')}else if(o.test(R.path))throw new Error(\'[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")\')}}let u="",h="/",f=/^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;class d{static isUri(T){return T instanceof d||!!T&&typeof T.authority=="string"&&typeof T.fragment=="string"&&typeof T.path=="string"&&typeof T.query=="string"&&typeof T.scheme=="string"&&typeof T.fsPath=="string"&&typeof T.with=="function"&&typeof T.toString=="function"}scheme;authority;path;query;fragment;constructor(T,I,A,D,N,O=!1){typeof T=="object"?(this.scheme=T.scheme||u,this.authority=T.authority||u,this.path=T.path||u,this.query=T.query||u,this.fragment=T.fragment||u):(this.scheme=function(B,P){return B||P?B:"file"}(T,O),this.authority=I||u,this.path=function(B,P){switch(B){case"https":case"http":case"file":P?P[0]!==h&&(P=h+P):P=h}return P}(this.scheme,A||u),this.query=D||u,this.fragment=N||u,l(this,O))}get fsPath(){return b(this,!1)}with(T){if(!T)return this;let{scheme:I,authority:A,path:D,query:N,fragment:O}=T;return I===void 0?I=this.scheme:I===null&&(I=u),A===void 0?A=this.authority:A===null&&(A=u),D===void 0?D=this.path:D===null&&(D=u),N===void 0?N=this.query:N===null&&(N=u),O===void 0?O=this.fragment:O===null&&(O=u),I===this.scheme&&A===this.authority&&D===this.path&&N===this.query&&O===this.fragment?this:new g(I,A,D,N,O)}static parse(T,I=!1){let A=f.exec(T);return A?new g(A[2]||u,E(A[4]||u),E(A[5]||u),E(A[7]||u),E(A[9]||u),I):new g(u,u,u,u,u)}static file(T){let I=u;if(i&&(T=T.replace(/\\\\/g,h)),T[0]===h&&T[1]===h){let A=T.indexOf(h,2);A===-1?(I=T.substring(2),T=h):(I=T.substring(2,A),T=T.substring(A)||h)}return new g("file",I,T,u,u)}static from(T){let I=new g(T.scheme,T.authority,T.path,T.query,T.fragment);return l(I,!0),I}toString(T=!1){return w(this,T)}toJSON(){return this}static revive(T){if(T){if(T instanceof d)return T;{let I=new g(T);return I._formatted=T.external,I._fsPath=T._sep===p?T.fsPath:null,I}}return T}}let p=i?1:void 0;class g extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(T=!1){return T?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){let T={$mid:1};return this._fsPath&&(T.fsPath=this._fsPath,T._sep=p),this._formatted&&(T.external=this._formatted),this.path&&(T.path=this.path),this.scheme&&(T.scheme=this.scheme),this.authority&&(T.authority=this.authority),this.query&&(T.query=this.query),this.fragment&&(T.fragment=this.fragment),T}}let m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function x(R,T,I){let A,D=-1;for(let N=0;N<R.length;N++){let O=R.charCodeAt(N);if(O>=97&&O<=122||O>=65&&O<=90||O>=48&&O<=57||O===45||O===46||O===95||O===126||T&&O===47||I&&O===91||I&&O===93||I&&O===58)D!==-1&&(A+=encodeURIComponent(R.substring(D,N)),D=-1),A!==void 0&&(A+=R.charAt(N));else{A===void 0&&(A=R.substr(0,N));let B=m[O];B!==void 0?(D!==-1&&(A+=encodeURIComponent(R.substring(D,N)),D=-1),A+=B):D===-1&&(D=N)}}return D!==-1&&(A+=encodeURIComponent(R.substring(D))),A!==void 0?A:R}function y(R){let T;for(let I=0;I<R.length;I++){let A=R.charCodeAt(I);A===35||A===63?(T===void 0&&(T=R.substr(0,I)),T+=m[A]):T!==void 0&&(T+=R[I])}return T!==void 0?T:R}function b(R,T){let I;return I=R.authority&&R.path.length>1&&R.scheme==="file"?`//${R.authority}${R.path}`:R.path.charCodeAt(0)===47&&(R.path.charCodeAt(1)>=65&&R.path.charCodeAt(1)<=90||R.path.charCodeAt(1)>=97&&R.path.charCodeAt(1)<=122)&&R.path.charCodeAt(2)===58?T?R.path.substr(1):R.path[1].toLowerCase()+R.path.substr(2):R.path,i&&(I=I.replace(/\\//g,"\\\\")),I}function w(R,T){let I=T?y:x,A="",{scheme:D,authority:N,path:O,query:B,fragment:P}=R;if(D&&(A+=D,A+=":"),(N||D==="file")&&(A+=h,A+=h),N){let $=N.indexOf("@");if($!==-1){let z=N.substr(0,$);N=N.substr($+1),$=z.lastIndexOf(":"),$===-1?A+=I(z,!1,!1):(A+=I(z.substr(0,$),!1,!1),A+=":",A+=I(z.substr($+1),!1,!0)),A+="@"}N=N.toLowerCase(),$=N.lastIndexOf(":"),$===-1?A+=I(N,!1,!0):(A+=I(N.substr(0,$),!1,!0),A+=N.substr($))}if(O){if(O.length>=3&&O.charCodeAt(0)===47&&O.charCodeAt(2)===58){let $=O.charCodeAt(1);$>=65&&$<=90&&(O=`/${String.fromCharCode($+32)}:${O.substr(3)}`)}else if(O.length>=2&&O.charCodeAt(1)===58){let $=O.charCodeAt(0);$>=65&&$<=90&&(O=`${String.fromCharCode($+32)}:${O.substr(2)}`)}A+=I(O,!0,!1)}return B&&(A+="?",A+=I(B,!1,!1)),P&&(A+="#",A+=T?P:x(P,!1,!1)),A}function _(R){try{return decodeURIComponent(R)}catch{return R.length>3?R.substr(0,3)+_(R.substr(3)):R}}let k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function E(R){return R.match(k)?R.replace(k,T=>_(T)):R}var L=r(470);let S=L.posix||L,C="/";var M;(function(R){R.joinPath=function(T,...I){return T.with({path:S.join(T.path,...I)})},R.resolvePath=function(T,...I){let A=T.path,D=!1;A[0]!==C&&(A=C+A,D=!0);let N=S.resolve(A,...I);return D&&N[0]===C&&!T.authority&&(N=N.substring(1)),T.with({path:N})},R.dirname=function(T){if(T.path.length===0||T.path===C)return T;let I=S.dirname(T.path);return I.length===1&&I.charCodeAt(0)===46&&(I=""),T.with({path:I})},R.basename=function(T){return S.basename(T.path)},R.extname=function(T){return S.extname(T.path)}})(M||(M={}))})(),Foe=n})();({URI:ks,Utils:tm}=Foe)});var Ka,Tc=F(()=>{AN();(function(t){t.basename=tm.basename,t.dirname=tm.dirname,t.extname=tm.extname,t.joinPath=tm.joinPath,t.resolvePath=tm.resolvePath;function e(n,i){return n?.toString()===i?.toString()}t.equals=e;function r(n,i){let a=typeof n=="string"?n:n.path,s=typeof i=="string"?i:i.path,o=a.split("/").filter(d=>d.length>0),l=s.split("/").filter(d=>d.length>0),u=0;for(;u<o.length&&o[u]===l[u];u++);let h="../".repeat(o.length-u),f=l.slice(u).join("/");return h+f}t.relative=r})(Ka||(Ka={}))});var pn,e2,t2,rm=F(()=>{Boe();rm();Bo();xs();Tc();(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(pn||(pn={}));e2=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=gr.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??ks.parse(e.uri),n?this.createAsync(r,e,n):this.create(r,e)}fromString(e,r,n){return n?this.createAsync(r,e,n):this.create(r,e)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r){if(typeof r=="string"){let n=this.parse(e,r);return this.createLangiumDocument(n,e,void 0,r)}else if("$model"in r){let n={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let n=this.parse(e,r.getText());return this.createLangiumDocument(n,e,r)}}async createAsync(e,r,n){if(typeof r=="string"){let i=await this.parseAsync(e,r,n);return this.createLangiumDocument(i,e,void 0,r)}else{let i=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(i,e,r)}}createLangiumDocument(e,r,n,i){let a;if(n)a={parseResult:e,uri:r,state:pn.Parsed,references:[],textDocument:n};else{let s=this.createTextDocumentGetter(r,i);a={parseResult:e,uri:r,state:pn.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=a,a}async update(e,r){var n,i;let a=(n=e.parseResult.value.$cstNode)===null||n===void 0?void 0:n.root.fullText,s=(i=this.textDocuments)===null||i===void 0?void 0:i.get(e.uri.toString()),o=s?s.getText():await this.fileSystemProvider.readFile(e.uri);if(s)Object.defineProperty(e,"textDocument",{value:s});else{let l=this.createTextDocumentGetter(e.uri,o);Object.defineProperty(e,"textDocument",{get:l})}return a!==o&&(e.parseResult=await this.parseAsync(e.uri,o,r),e.parseResult.value.$document=e),e.state=pn.Parsed,e}parse(e,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){let n=this.serviceRegistry,i;return()=>i??(i=em.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},t2=class{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return Yr(this.documentMap.values())}addDocument(e){let r=e.uri.toString();if(this.documentMap.has(r))throw new Error(`A document with the URI \'${r}\' is already present.`);this.documentMap.set(r,e)}getDocument(e){let r=e.toString();return this.documentMap.get(r)}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(i=>(this.addDocument(i),i));{let i=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=pn.Changed,n.precomputedScopes=void 0,n.references=[],n.diagnostics=void 0),n}deleteDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=pn.Changed,this.documentMap.delete(r)),n}}});var r2,_N=F(()=>{Bo();Mo();Wa();Fo();rm();r2=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,r=gr.CancellationToken.None){for(let n of Po(e.parseResult.value))await _i(r),wg(n).forEach(i=>this.doLink(i,e))}doLink(e,r){let n=e.reference;if(n._ref===void 0)try{let i=this.getCandidate(e);if(Ad(i))n._ref=i;else if(n._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)){let a=this.loadAstNode(i);n._ref=a??this.createLinkingError(e,i)}}catch(i){n._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to \'${n.$refText}\': ${i}`})}r.references.push(n)}unlink(e){for(let r of e.references)delete r._ref,delete r._nodeDescription;e.references=[]}getCandidate(e){let n=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return n??this.createLinkingError(e)}buildReference(e,r,n,i){let a=this,s={$refNode:n,$refText:i,get ref(){var o;if(Yn(this._ref))return this._ref;if(A9(this._nodeDescription)){let l=a.loadAstNode(this._nodeDescription);this._ref=l??a.createLinkingError({reference:s,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){let l=a.getLinkedNode({reference:s,container:e,property:r});if(l.error&&Ci(e).state<pn.ComputedScopes)return;this._ref=(o=l.node)!==null&&o!==void 0?o:l.error,this._nodeDescription=l.descr}return Yn(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Ad(this._ref)?this._ref:void 0}};return s}getLinkedNode(e){try{let r=this.getCandidate(e);if(Ad(r))return{error:r};let n=this.loadAstNode(r);return n?{node:n,descr:r}:{descr:r,error:this.createLinkingError(e,r)}}catch(r){return{error:Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to \'${e.reference.$refText}\': ${r}`})}}}loadAstNode(e){if(e.node)return e.node;let r=this.langiumDocuments().getDocument(e.documentUri);if(r)return this.astNodeLocator.getAstNode(r.parseResult.value,e.path)}createLinkingError(e,r){let n=Ci(e.container);n.state<pn.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`);let i=this.reflection.getReferenceType(e);return Object.assign(Object.assign({},e),{message:`Could not resolve reference to ${i} named \'${e.reference.$refText}\'.`,targetDescription:r})}}});function zoe(t){return typeof t.name=="string"}var n2,LN=F(()=>{wl();n2=class{getName(e){if(zoe(e))return e.name}getNameNode(e){return wy(e.$cstNode,"name")}}});var i2,RN=F(()=>{wl();Mo();Wa();yl();xs();Tc();i2=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){let r=QL(e),n=e.astNode;if(r&&n){let i=n[r.feature];if(oa(i))return i.ref;if(Array.isArray(i)){for(let a of i)if(oa(a)&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return a.ref}}if(n){let i=this.nameProvider.getNameNode(n);if(i&&(i===e||L9(e,i)))return n}}}findDeclarationNode(e){let r=this.findDeclaration(e);if(r?.$cstNode){let n=this.nameProvider.getNameNode(r);return n??r.$cstNode}}findReferences(e,r){let n=[];if(r.includeDeclaration){let a=this.getReferenceToSelf(e);a&&n.push(a)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(i=i.filter(a=>Ka.equals(a.sourceUri,r.documentUri))),n.push(...i),Yr(n)}getReferenceToSelf(e){let r=this.nameProvider.getNameNode(e);if(r){let n=Ci(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:i,targetUri:n.uri,targetPath:i,segment:Ld(r),local:!0}}}}});var Ec,Jd,nm=F(()=>{xs();Ec=class{constructor(e){if(this.map=new Map,e)for(let[r,n]of e)this.add(r,n)}get size(){return yg.sum(Yr(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let i=n.indexOf(r);if(i>=0)return n.length===1?this.map.delete(e):n.splice(i,1),!0}return!1}}get(e){var r;return(r=this.map.get(e))!==null&&r!==void 0?r:[]}has(e,r){if(r===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(i=>e(i,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Yr(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return Yr(this.map.keys())}values(){return Yr(this.map.values()).flat()}entriesGroupedByKey(){return Yr(this.map.entries())}},Jd=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}}});var a2,NN=F(()=>{Bo();Wa();nm();Fo();a2=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,r=gr.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,r)}async computeExportsForNode(e,r,n=gy,i=gr.CancellationToken.None){let a=[];this.exportNode(e,a,r);for(let s of n(e))await _i(i),this.exportNode(s,a,r);return a}exportNode(e,r,n){let i=this.nameProvider.getName(e);i&&r.push(this.descriptions.createDescription(e,i,n))}async computeLocalScopes(e,r=gr.CancellationToken.None){let n=e.parseResult.value,i=new Ec;for(let a of yc(n))await _i(r),this.processNode(a,e,i);return i}processNode(e,r,n){let i=e.$container;if(i){let a=this.nameProvider.getName(e);a&&n.add(i,this.descriptions.createDescription(e,a,r))}}}});var im,s2,JMe,IN=F(()=>{xs();im=class{constructor(e,r,n){var i;this.elements=e,this.outerScope=r,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===e.toLowerCase()):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}},s2=class{constructor(e,r,n){var i;this.elements=new Map,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1;for(let a of e){let s=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.set(s,a)}this.outerScope=r}getElement(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=Yr(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},JMe={getElement(){},getAllElements(){return cy}}});var am,o2,e0,rT,sm,nT=F(()=>{am=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},o2=class extends am{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){let n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},e0=class extends am{constructor(e){super(),this.cache=new Map,this.converter=e??(r=>r)}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();let i=this.cacheForContext(e);if(i.has(r))return i.get(r);if(n){let a=n();return i.set(r,a),a}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){let r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){let r=this.converter(e),n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},rT=class extends e0{constructor(e){super(r=>r.toString()),this.onDispose(e.workspace.DocumentBuilder.onUpdate((r,n)=>{let i=r.concat(n);for(let a of i)this.clear(a)}))}},sm=class extends o2{constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}});var l2,MN=F(()=>{IN();Wa();xs();nT();l2=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new sm(e.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=Ci(e.container).precomputedScopes;if(i){let s=e.container;do{let o=i.get(s);o.length>0&&r.push(Yr(o).filter(l=>this.reflection.isSubtype(l.type,n))),s=s.$container}while(s)}let a=this.getGlobalScope(n,e);for(let s=r.length-1;s>=0;s--)a=this.createScope(r[s],a);return a}createScope(e,r,n){return new im(Yr(e),r,n)}createScopeForNodes(e,r,n){let i=Yr(e).map(a=>{let s=this.nameProvider.getName(a);if(s)return this.descriptions.createDescription(a,s)}).nonNullable();return new im(i,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new s2(this.indexManager.allElements(e)))}}});function DN(t){return typeof t.$comment=="string"}function $oe(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}var c2,iT=F(()=>{AN();Mo();Wa();wl();c2=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r={}){let n=r?.replacer,i=(s,o)=>this.replacer(s,o,r),a=n?(s,o)=>n(s,o,i):i;try{return this.currentDocument=Ci(e),JSON.stringify(e,a,r?.space)}finally{this.currentDocument=void 0}}deserialize(e,r={}){let n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){var l,u,h,f;if(!this.ignoreProperties.has(e))if(oa(r)){let d=r.ref,p=n?r.$refText:void 0;if(d){let g=Ci(d),m="";this.currentDocument&&this.currentDocument!==g&&(o?m=o(g.uri,r):m=g.uri.toString());let x=this.astNodeLocator.getAstNodePath(d);return{$ref:`${m}#${x}`,$refText:p}}else return{$error:(u=(l=r.error)===null||l===void 0?void 0:l.message)!==null&&u!==void 0?u:"Could not resolve reference",$refText:p}}else if(Yn(r)){let d;if(a&&(d=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),(!e||r.$document)&&d?.$textRegion&&(d.$textRegion.documentURI=(h=this.currentDocument)===null||h===void 0?void 0:h.uri.toString())),i&&!e&&(d??(d=Object.assign({},r)),d.$sourceText=(f=r.$cstNode)===null||f===void 0?void 0:f.text),s){d??(d=Object.assign({},r));let p=this.commentProvider.getComment(r);p&&(d.$comment=p.replace(/\\r/g,""))}return d??r}else return r}addAstNodeRegionWithAssignmentsTo(e){let r=n=>({offset:n.offset,end:n.end,length:n.length,range:n.range});if(e.$cstNode){let n=e.$textRegion=r(e.$cstNode),i=n.assignments={};return Object.keys(e).filter(a=>!a.startsWith("$")).forEach(a=>{let s=XL(e.$cstNode,a).map(r);s.length!==0&&(i[a]=s)}),e}}linkNode(e,r,n,i,a,s){for(let[l,u]of Object.entries(e))if(Array.isArray(u))for(let h=0;h<u.length;h++){let f=u[h];$oe(f)?u[h]=this.reviveReference(e,l,r,f,n):Yn(f)&&this.linkNode(f,r,n,e,l,h)}else $oe(u)?e[l]=this.reviveReference(e,l,r,u,n):Yn(u)&&this.linkNode(u,r,n,e,l);let o=e;o.$container=i,o.$containerProperty=a,o.$containerIndex=s}reviveReference(e,r,n,i,a){let s=i.$refText,o=i.$error;if(i.$ref){let l=this.getRefNode(n,i.$ref,a.uriConverter);if(Yn(l))return s||(s=this.nameProvider.getName(l)),{$refText:s??"",ref:l};o=l}if(o){let l={$refText:s??""};return l.error={container:e,property:r,message:o,reference:l},l}else return}getRefNode(e,r,n){try{let i=r.indexOf("#");if(i===0){let l=this.astNodeLocator.getAstNode(e,r.substring(1));return l||"Could not resolve path: "+r}if(i<0){let l=n?n(r):ks.parse(r),u=this.langiumDocuments.getDocument(l);return u?u.parseResult.value:"Could not find document for URI: "+r}let a=n?n(r.substring(0,i)):ks.parse(r.substring(0,i)),s=this.langiumDocuments.getDocument(a);if(!s)return"Could not find document for URI: "+r;if(i===r.length-1)return s.parseResult.value;let o=this.astNodeLocator.getAstNode(s.parseResult.value,r.substring(i+1));return o||"Could not resolve URI: "+r}catch(i){return String(i)}}}});var u2,ON=F(()=>{Tc();u2=class{register(e){if(!this.singleton&&!this.map){this.singleton=e;return}if(!this.map&&(this.map={},this.singleton)){for(let r of this.singleton.LanguageMetaData.fileExtensions)this.map[r]=this.singleton;this.singleton=void 0}for(let r of e.LanguageMetaData.fileExtensions)this.map[r]!==void 0&&this.map[r]!==e&&console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to \'${e.LanguageMetaData.languageId}\'.`),this.map[r]=e}getServices(e){if(this.singleton!==void 0)return this.singleton;if(this.map===void 0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let r=Ka.extname(e),n=this.map[r];if(!n)throw new Error(`The service registry contains no services for the extension \'${r}\'.`);return n}get all(){return this.singleton!==void 0?[this.singleton]:this.map!==void 0?Object.values(this.map):[]}}});function aT(t){return{code:t}}var om,h2,f2=F(()=>{nm();Fo();xs();(function(t){t.all=["fast","slow","built-in"]})(om||(om={}));h2=class{constructor(e){this.entries=new Ec,this.reflection=e.shared.AstReflection}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The \'built-in\' category is reserved for lexer, parser, and linker errors.");for(let[i,a]of Object.entries(e)){let s=a;if(Array.isArray(s))for(let o of s){let l={check:this.wrapValidationException(o,r),category:n};this.addEntry(i,l)}else if(typeof s=="function"){let o={check:this.wrapValidationException(s,r),category:n};this.addEntry(i,o)}}}wrapValidationException(e,r){return async(n,i,a)=>{try{await e.call(r,n,i,a)}catch(s){if(Xh(s))throw s;console.error("An error occurred during validation:",s);let o=s instanceof Error?s.message:String(s);s instanceof Error&&s.stack&&console.error(s.stack),i("error","An error occurred during validation: "+o,{node:n})}}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=Yr(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(i=>r.includes(i.category))),n.map(i=>i.check)}}});function Goe(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=wy(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=KL(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function sT(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}var d2,Bu,PN=F(()=>{Bo();wl();Wa();yl();Fo();f2();d2=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,r={},n=gr.CancellationToken.None){let i=e.parseResult,a=[];if(await _i(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(i,a,r),r.stopAfterLexingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Bu.LexingError})||(this.processParsingErrors(i,a,r),r.stopAfterParsingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Bu.ParsingError}))||(this.processLinkingErrors(e,a,r),r.stopAfterLinkingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Bu.LinkingError}))))return a;try{a.push(...await this.validateAst(i.value,r,n))}catch(s){if(Xh(s))throw s;console.error("An error occurred during validation:",s)}return await _i(n),a}processLexingErrors(e,r,n){for(let i of e.lexerErrors){let a={severity:sT("error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:aT(Bu.LexingError),source:this.getSource()};r.push(a)}}processParsingErrors(e,r,n){for(let i of e.parserErrors){let a;if(isNaN(i.token.startOffset)){if("previousToken"in i){let s=i.previousToken;if(isNaN(s.startOffset)){let o={line:0,character:0};a={start:o,end:o}}else{let o={line:s.endLine-1,character:s.endColumn};a={start:o,end:o}}}}else a=xg(i.token);if(a){let s={severity:sT("error"),range:a,message:i.message,data:aT(Bu.ParsingError),source:this.getSource()};r.push(s)}}}processLinkingErrors(e,r,n){for(let i of e.references){let a=i.error;if(a){let s={node:a.container,property:a.property,index:a.index,data:{code:Bu.LinkingError,containerType:a.container.$type,property:a.property,refText:a.reference.$refText}};r.push(this.toDiagnostic("error",a.message,s))}}}async validateAst(e,r,n=gr.CancellationToken.None){let i=[],a=(s,o,l)=>{i.push(this.toDiagnostic(s,o,l))};return await Promise.all(Po(e).map(async s=>{await _i(n);let o=this.validationRegistry.getChecks(s.$type,r.categories);for(let l of o)await l(s,a,n)})),i}toDiagnostic(e,r,n){return{message:r,range:Goe(n),severity:sT(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};(function(t){t.LexingError="lexing-error",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Bu||(Bu={}))});var p2,g2,BN=F(()=>{Bo();Mo();Wa();yl();Fo();Tc();p2=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n=Ci(e)){r??(r=this.nameProvider.getName(e));let i=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${i} has no name.`);let a,s=()=>{var o;return a??(a=Ld((o=this.nameProvider.getNameNode(e))!==null&&o!==void 0?o:e.$cstNode))};return{node:e,name:r,get nameSegment(){return s()},selectionSegment:Ld(e.$cstNode),type:e.$type,documentUri:n.uri,path:i}}},g2=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=gr.CancellationToken.None){let n=[],i=e.parseResult.value;for(let a of Po(i))await _i(r),wg(a).filter(s=>!Ad(s)).forEach(s=>{let o=this.createDescription(s);o&&n.push(o)});return n}createDescription(e){let r=e.reference.$nodeDescription,n=e.reference.$refNode;if(!r||!n)return;let i=Ci(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:Ld(n),local:Ka.equals(r.documentUri,i)}}}});var m2,FN=F(()=>{m2=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing \'$containerProperty\' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((i,a)=>{if(!i||a.length===0)return i;let s=a.indexOf(this.indexSeparator);if(s>0){let o=a.substring(0,s),l=parseInt(a.substring(s+1)),u=i[o];return u?.[l]}return i[a]},e)}}});var v2,zN=F(()=>{Fo();v2=class{constructor(e){this._ready=new ja,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var r,n;this.workspaceConfig=(n=(r=e.capabilities.workspace)===null||r===void 0?void 0:r.configuration)!==null&&n!==void 0?n:!1}async initialized(e){if(this.workspaceConfig){if(e.register){let r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let r=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((i,a)=>{this.updateSectionConfiguration(i.section,n[a])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(r=>{this.updateSectionConfiguration(r,e.settings[r])})}updateSectionConfiguration(e,r){this.settings[e]=r}async getConfiguration(e,r){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]}toSectionName(e){return`${e}`}}});var t0,$N=F(()=>{(function(t){function e(r){return{dispose:async()=>await r()}}t.create=e})(t0||(t0={}))});var y2,GN=F(()=>{Bo();$N();nm();Fo();xs();f2();rm();y2=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Ec,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=pn.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=gr.CancellationToken.None){var i,a;for(let s of e){let o=s.uri.toString();if(s.state===pn.Validated){if(typeof r.validation=="boolean"&&r.validation)s.state=pn.IndexedReferences,s.diagnostics=void 0,this.buildState.delete(o);else if(typeof r.validation=="object"){let l=this.buildState.get(o),u=(i=l?.result)===null||i===void 0?void 0:i.validationChecks;if(u){let f=((a=r.validation.categories)!==null&&a!==void 0?a:om.all).filter(d=>!u.includes(d));f.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:f})},result:l.result}),s.state=pn.IndexedReferences)}}}else this.buildState.delete(o)}this.currentState=pn.Changed,await this.emitUpdate(e.map(s=>s.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=gr.CancellationToken.None){this.currentState=pn.Changed;for(let s of r)this.langiumDocuments.deleteDocument(s),this.buildState.delete(s.toString()),this.indexManager.remove(s);for(let s of e){if(!this.langiumDocuments.invalidateDocument(s)){let l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},s);l.state=pn.Changed,this.langiumDocuments.addDocument(l)}this.buildState.delete(s.toString())}let i=Yr(e).concat(r).map(s=>s.toString()).toSet();this.langiumDocuments.all.filter(s=>!i.has(s.uri.toString())&&this.shouldRelink(s,i)).forEach(s=>{this.serviceRegistry.getServices(s.uri).references.Linker.unlink(s),s.state=Math.min(s.state,pn.ComputedScopes),s.diagnostics=void 0}),await this.emitUpdate(e,r),await _i(n);let a=this.langiumDocuments.all.filter(s=>{var o;return s.state<pn.Linked||!(!((o=this.buildState.get(s.uri.toString()))===null||o===void 0)&&o.completed)}).toArray();await this.buildDocuments(a,this.updateBuildOptions,n)}async emitUpdate(e,r){await Promise.all(this.updateListeners.map(n=>n(e,r)))}shouldRelink(e,r){return e.references.some(n=>n.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),t0.create(()=>{let r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,pn.Parsed,n,a=>this.langiumDocumentFactory.update(a,n)),await this.runCancelable(e,pn.IndexedContent,n,a=>this.indexManager.updateContent(a,n)),await this.runCancelable(e,pn.ComputedScopes,n,async a=>{let s=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.precomputedScopes=await s.computeLocalScopes(a,n)}),await this.runCancelable(e,pn.Linked,n,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,n)),await this.runCancelable(e,pn.IndexedReferences,n,a=>this.indexManager.updateReferences(a,n));let i=e.filter(a=>this.shouldValidate(a));await this.runCancelable(i,pn.Validated,n,a=>this.validate(a,n));for(let a of e){let s=this.buildState.get(a.uri.toString());s&&(s.completed=!0)}}prepareBuild(e,r){for(let n of e){let i=n.uri.toString(),a=this.buildState.get(i);(!a||a.completed)&&this.buildState.set(i,{completed:!1,options:r,result:a?.result})}}async runCancelable(e,r,n,i){let a=e.filter(s=>s.state<r);for(let s of a)await _i(n),await i(s),s.state=r;await this.notifyBuildPhase(a,r,n),this.currentState=r}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),t0.create(()=>{this.buildPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let i;if(r&&"path"in r?i=r:n=r,n??(n=gr.CancellationToken.None),i){let a=this.langiumDocuments.getDocument(i);if(a&&a.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(kc):new Promise((a,s)=>{let o=this.onBuildPhase(e,()=>{if(o.dispose(),l.dispose(),i){let u=this.langiumDocuments.getDocument(i);a(u?.uri)}else a(void 0)}),l=n.onCancellationRequested(()=>{o.dispose(),l.dispose(),s(kc)})})}async notifyBuildPhase(e,r,n){if(e.length===0)return;let i=this.buildPhaseListeners.get(r);for(let a of i)await _i(n),await a(e,n)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,r){var n,i;let a=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,s=this.getBuildOptions(e).validation,o=typeof s=="object"?s:void 0,l=await a.validateDocument(e,o,r);e.diagnostics?e.diagnostics.push(...l):e.diagnostics=l;let u=this.buildState.get(e.uri.toString());if(u){(n=u.result)!==null&&n!==void 0||(u.result={});let h=(i=o?.categories)!==null&&i!==void 0?i:om.all;u.result.validationChecks?u.result.validationChecks.push(...h):u.result.validationChecks=[...h]}}getBuildOptions(e){var r,n;return(n=(r=this.buildState.get(e.uri.toString()))===null||r===void 0?void 0:r.options)!==null&&n!==void 0?n:{}}}});var x2,UN=F(()=>{Wa();nT();Bo();xs();Tc();x2=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new e0,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){let n=Ci(e).uri,i=[];return this.referenceIndex.forEach(a=>{a.forEach(s=>{Ka.equals(s.targetUri,n)&&s.targetPath===r&&i.push(s)})}),Yr(i)}allElements(e,r){let n=Yr(this.symbolIndex.keys());return r&&(n=n.filter(i=>!r||r.has(i))),n.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,r){var n;return r?this.symbolByTypeIndex.get(e,r,()=>{var a;return((a=this.symbolIndex.get(e))!==null&&a!==void 0?a:[]).filter(o=>this.astReflection.isSubtype(o.type,r))}):(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[]}remove(e){let r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r),this.referenceIndex.delete(r)}async updateContent(e,r=gr.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,r),a=e.uri.toString();this.symbolIndex.set(a,i),this.symbolByTypeIndex.clear(a)}async updateReferences(e,r=gr.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,r){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(i=>!i.local&&r.has(i.targetUri.toString())):!1}}});var b2,VN=F(()=>{Bo();Fo();Tc();b2=class{constructor(e){this.initialBuildOptions={},this._ready=new ja,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var r;this.folders=(r=e.workspaceFolders)!==null&&r!==void 0?r:void 0}initialized(e){return this.mutex.write(r=>{var n;return this.initializeWorkspace((n=this.folders)!==null&&n!==void 0?n:[],r)})}async initializeWorkspace(e,r=gr.CancellationToken.None){let n=await this.performStartup(e);await _i(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){let r=this.serviceRegistry.all.flatMap(a=>a.LanguageMetaData.fileExtensions),n=[],i=a=>{n.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)};return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(a=>[a,this.getRootFolder(a)]).map(async a=>this.traverseFolder(...a,r,i))),this._ready.resolve(),n}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return ks.parse(e.uri)}async traverseFolder(e,r,n,i){let a=await this.fileSystemProvider.readDirectory(r);await Promise.all(a.map(async s=>{if(this.includeEntry(e,s,n)){if(s.isDirectory)await this.traverseFolder(e,s.uri,n,i);else if(s.isFile){let o=await this.langiumDocuments.getOrCreateDocument(s.uri);i(o)}}}))}includeEntry(e,r,n){let i=Ka.basename(r.uri);if(i.startsWith("."))return!1;if(r.isDirectory)return i!=="node_modules"&&i!=="out";if(r.isFile){let a=Ka.extname(r.uri);return n.includes(a)}return!1}}});function Uoe(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function HN(t){return t&&"modes"in t&&"defaultMode"in t}function WN(t){return!Uoe(t)&&!HN(t)}var w2,qN=F(()=>{Hd();w2=class{constructor(e){let r=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let n=WN(r)?Object.values(r):r;this.chevrotainLexer=new Jn(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var r;let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:(r=n.groups.hidden)!==null&&r!==void 0?r:[]}}toTokenTypeDictionary(e){if(WN(e))return e;let r=HN(e)?Object.values(e.modes).flat():e,n={};return r.forEach(i=>n[i.name]=i),n}}});function jN(t,e,r){let n,i;typeof t=="string"?(i=e,n=r):(i=t.range.start,n=e),i||(i=$r.create(0,0));let a=Hoe(t),s=ZN(n),o=tDe({lines:a,position:i,options:s});return sDe({index:0,tokens:o,position:i})}function KN(t,e){let r=ZN(e),n=Hoe(t);if(n.length===0)return!1;let i=n[0],a=n[n.length-1],s=r.start,o=r.end;return!!s?.exec(i)&&!!o?.exec(a)}function Hoe(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split($L)}function tDe(t){var e,r,n;let i=[],a=t.position.line,s=t.position.character;for(let o=0;o<t.lines.length;o++){let l=o===0,u=o===t.lines.length-1,h=t.lines[o],f=0;if(l&&t.options.start){let p=(e=t.options.start)===null||e===void 0?void 0:e.exec(h);p&&(f=p.index+p[0].length)}else{let p=(r=t.options.line)===null||r===void 0?void 0:r.exec(h);p&&(f=p.index+p[0].length)}if(u){let p=(n=t.options.end)===null||n===void 0?void 0:n.exec(h);p&&(h=h.substring(0,p.index))}if(h=h.substring(0,aDe(h)),XN(h,f)>=h.length){if(i.length>0){let p=$r.create(a,s);i.push({type:"break",content:"",range:wr.create(p,p)})}}else{Voe.lastIndex=f;let p=Voe.exec(h);if(p){let g=p[0],m=p[1],x=$r.create(a,s+f),y=$r.create(a,s+f+g.length);i.push({type:"tag",content:m,range:wr.create(x,y)}),f+=g.length,f=XN(h,f)}if(f<h.length){let g=h.substring(f),m=Array.from(g.matchAll(eDe));i.push(...rDe(m,g,a,s+f))}}a++,s=0}return i.length>0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function rDe(t,e,r,n){let i=[];if(t.length===0){let a=$r.create(r,n),s=$r.create(r,n+e.length);i.push({type:"text",content:e,range:wr.create(a,s)})}else{let a=0;for(let o of t){let l=o.index,u=e.substring(a,l);u.length>0&&i.push({type:"text",content:e.substring(a,l),range:wr.create($r.create(r,a+n),$r.create(r,l+n))});let h=u.length+1,f=o[1];if(i.push({type:"inline-tag",content:f,range:wr.create($r.create(r,a+h+n),$r.create(r,a+h+f.length+n))}),h+=f.length,o.length===4){h+=o[2].length;let d=o[3];i.push({type:"text",content:d,range:wr.create($r.create(r,a+h+n),$r.create(r,a+h+d.length+n))})}else i.push({type:"text",content:"",range:wr.create($r.create(r,a+h+n),$r.create(r,a+h+n))});a=l+o[0].length}let s=e.substring(a);s.length>0&&i.push({type:"text",content:s,range:wr.create($r.create(r,a+n),$r.create(r,a+n+s.length))})}return i}function XN(t,e){let r=t.substring(e).match(nDe);return r?e+r.index:t.length}function aDe(t){let e=t.match(iDe);if(e&&typeof e.index=="number")return e.index}function sDe(t){var e,r,n,i;let a=$r.create(t.position.line,t.position.character);if(t.tokens.length===0)return new oT([],wr.create(a,a));let s=[];for(;t.index<t.tokens.length;){let u=oDe(t,s[s.length-1]);u&&s.push(u)}let o=(r=(e=s[0])===null||e===void 0?void 0:e.range.start)!==null&&r!==void 0?r:a,l=(i=(n=s[s.length-1])===null||n===void 0?void 0:n.range.end)!==null&&i!==void 0?i:a;return new oT(s,wr.create(o,l))}function oDe(t,e){let r=t.tokens[t.index];if(r.type==="tag")return Yoe(t,!1);if(r.type==="text"||r.type==="inline-tag")return qoe(t);lDe(r,e),t.index++}function lDe(t,e){if(e){let r=new lT("",t.range);"inlines"in e?e.inlines.push(r):e.content.inlines.push(r)}}function qoe(t){let e=t.tokens[t.index],r=e,n=e,i=[];for(;e&&e.type!=="break"&&e.type!=="tag";)i.push(cDe(t)),n=e,e=t.tokens[t.index];return new T2(i,wr.create(r.range.start,n.range.end))}function cDe(t){return t.tokens[t.index].type==="inline-tag"?Yoe(t,!0):Xoe(t)}function Yoe(t,e){let r=t.tokens[t.index++],n=r.content.substring(1),i=t.tokens[t.index];if(i?.type==="text")if(e){let a=Xoe(t);return new k2(n,new T2([a],a.range),e,wr.create(r.range.start,a.range.end))}else{let a=qoe(t);return new k2(n,a,e,wr.create(r.range.start,a.range.end))}else{let a=r.range;return new k2(n,new T2([],a),e,a)}}function Xoe(t){let e=t.tokens[t.index++];return new lT(e.content,e.range)}function ZN(t){if(!t)return ZN({start:"/**",end:"*/",line:"*"});let{start:e,end:r,line:n}=t;return{start:YN(e,!0),end:YN(r,!1),line:YN(n,!0)}}function YN(t,e){if(typeof t=="string"||typeof t=="object"){let r=typeof t=="string"?Pd(t):t.source;return e?new RegExp(`^\\\\s*${r}`):new RegExp(`\\\\s*${r}\\\\s*$`)}else return t}function uDe(t,e,r){var n,i;if(t==="linkplain"||t==="linkcode"||t==="link"){let a=e.indexOf(" "),s=e;if(a>0){let l=XN(e,a);s=e.substring(l),e=e.substring(0,a)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(s=`\\`${s}\\``),(i=(n=r.renderLink)===null||n===void 0?void 0:n.call(r,e,s))!==null&&i!==void 0?i:hDe(e,s)}}function hDe(t,e){try{return ks.parse(t,!0),`[${e}](${t})`}catch{return t}}function Woe(t){return t.endsWith(`\n`)?`\n`:`\n\n`}var Voe,eDe,nDe,iDe,oT,k2,T2,lT,QN=F(()=>{iN();Tg();Tc();Voe=/\\s*(@([\\p{L}][\\p{L}\\p{N}]*)?)/uy,eDe=/\\{(@[\\p{L}][\\p{L}\\p{N}]*)(\\s*)([^\\r\\n}]+)?\\}/gu;nDe=/\\S/,iDe=/\\s*$/;oT=class{constructor(e,r){this.elements=e,this.range=r}getTag(e){return this.getAllTags().find(r=>r.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let r of this.elements)if(e.length===0)e=r.toString();else{let n=r.toString();e+=Woe(e)+n}return e.trim()}toMarkdown(e){let r="";for(let n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{let i=n.toMarkdown(e);r+=Woe(r)+i}return r.trim()}},k2=class{constructor(e,r,n,i){this.name=e,this.content=r,this.inline=n,this.range=i}toString(){let e=`@${this.name}`,r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e}\n${r}`),this.inline?`{${e}}`:e}toMarkdown(e){var r,n;return(n=(r=e?.renderTag)===null||r===void 0?void 0:r.call(e,this))!==null&&n!==void 0?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){let r=this.content.toMarkdown(e);if(this.inline){let a=uDe(this.name,r,e??{});if(typeof a=="string")return a}let n="";e?.tag==="italic"||e?.tag===void 0?n="*":e?.tag==="bold"?n="**":e?.tag==="bold-italic"&&(n="***");let i=`${n}@${this.name}${n}`;return this.content.inlines.length===1?i=`${i} \\u2014 ${r}`:this.content.inlines.length>1&&(i=`${i}\n${r}`),this.inline?`{${i}}`:i}};T2=class{constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;r<this.inlines.length;r++){let n=this.inlines[r],i=this.inlines[r+1];e+=n.toString(),i&&i.range.start.line>n.range.start.line&&(e+=`\n`)}return e}toMarkdown(e){let r="";for(let n=0;n<this.inlines.length;n++){let i=this.inlines[n],a=this.inlines[n+1];r+=i.toMarkdown(e),a&&a.range.start.line>i.range.start.line&&(r+=`\n`)}return r}},lT=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}}});var E2,JN=F(()=>{Wa();QN();E2=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let r=this.commentProvider.getComment(e);if(r&&KN(r))return jN(r).toMarkdown({renderLink:(i,a)=>this.documentationLinkRenderer(e,i,a),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,r,n){var i;let a=(i=this.findNameInPrecomputedScopes(e,r))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,r);if(a&&a.nameSegment){let s=a.nameSegment.range.start.line+1,o=a.nameSegment.range.start.character+1,l=a.documentUri.with({fragment:`L${s},${o}`});return`[${n}](${l.toString()})`}else return}documentationTagRenderer(e,r){}findNameInPrecomputedScopes(e,r){let i=Ci(e).precomputedScopes;if(!i)return;let a=e;do{let o=i.get(a).find(l=>l.name===r);if(o)return o;a=a.$container}while(a)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(i=>i.name===r)}}});var S2,eI=F(()=>{iT();yl();S2=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return DN(e)?e.$comment:(r=N9(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||r===void 0?void 0:r.text}}});var ei={};var tI=F(()=>{pr(ei,ga(wN(),1))});var C2,rI,nI,iI=F(()=>{Fo();tI();C2=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}},rI=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){let r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}async parse(e,r){let n=await this.acquireParserWorker(r),i=new ja,a,s=r.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(o=>{let l=this.hydrator.hydrate(o);i.resolve(l)}).catch(o=>{i.reject(o)}).finally(()=>{s.dispose(),clearTimeout(a)}),i.promise}terminateWorker(e){e.terminate();let r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(e){this.initializeWorkers();for(let n of this.workerPool)if(n.ready)return n.lock(),n;let r=new ja;return e.onCancellationRequested(()=>{let n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(kc)}),this.queue.push(r),r.promise}},nI=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,i){this.onReadyEmitter=new ei.Emitter,this.deferred=new ja,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,r(a=>{let s=a;this.deferred.resolve(s),this.unlock()}),n(a=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(kc),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new ja,this.sendMessage(e),this.deferred.promise}}});var A2,aI=F(()=>{Bo();Fo();A2=class{constructor(){this.previousTokenSource=new gr.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let r=new gr.CancellationTokenSource;return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n){let i=new ja,a={action:r,deferred:i,cancellationToken:n??gr.CancellationToken.None};return e.push(a),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:i})=>{try{let a=await Promise.resolve().then(()=>r(i));n.resolve(a)}catch(a){Xh(a)?n.resolve(void 0):n.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}});var _2,sI=F(()=>{Yk();vc();Mo();Wa();nm();yl();_2=class{constructor(e){this.grammarElementIdMap=new Jd,this.tokenTypeIdMap=new Jd,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map(r=>Object.assign({},r)),parserErrors:e.parserErrors.map(r=>Object.assign({},r)),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){let r=new Map,n=new Map;for(let i of Po(e))r.set(i,{});if(e.$cstNode)for(let i of _d(e.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let s=[];n[i]=s;for(let o of a)Yn(o)?s.push(this.dehydrateAstNode(o,r)):oa(o)?s.push(this.dehydrateReference(o,r)):s.push(o)}else Yn(a)?n[i]=this.dehydrateAstNode(a,r):oa(a)?n[i]=this.dehydrateReference(a,r):a!==void 0&&(n[i]=a);return n}dehydrateReference(e,r){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){let n=r.cstNodes.get(e);return ly(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),qs(e)?n.content=e.content.map(i=>this.dehydrateCstNode(i,r)):Uh(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){let r=new Map,n=new Map;for(let a of Po(e))r.set(a,{});let i;if(e.$cstNode)for(let a of _d(e.$cstNode)){let s;"fullText"in a?(s=new Kg(a.fullText),i=s):"content"in a?s=new jd:"tokenType"in a&&(s=this.hydrateCstLeafNode(a)),s&&(n.set(a,s),s.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let s=[];n[i]=s;for(let o of a)Yn(o)?s.push(this.setParent(this.hydrateAstNode(o,r),n)):oa(o)?s.push(this.hydrateReference(o,n,i,r)):s.push(o)}else Yn(a)?n[i]=this.setParent(this.hydrateAstNode(a,r),n):oa(a)?n[i]=this.hydrateReference(a,n,i,r):a!==void 0&&(n[i]=a);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,i){return this.linker.buildReference(r,n,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){let i=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=r.astNodes.get(e.astNode),qs(i))for(let a of e.content){let s=this.hydrateCstNode(a,r,n++);i.content.push(s)}return i}hydrateCstLeafNode(e){let r=this.getTokenType(e.tokenType),n=e.offset,i=e.length,a=e.startLine,s=e.startColumn,o=e.endLine,l=e.endColumn,u=e.hidden;return new Xd(n,i,{start:{line:a,character:s},end:{line:o,character:l}},r,u)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap();let r=this.grammarElementIdMap.getKey(e);if(r)return r;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(let r of Po(this.grammar))fy(r)&&this.grammarElementIdMap.set(r,e++)}}});function Ks(t){return{documentation:{CommentProvider:e=>new S2(e),DocumentationProvider:e=>new E2(e)},parser:{AsyncParser:e=>new C2(e),GrammarConfig:e=>rR(e),LangiumParser:e=>fN(e),CompletionParser:e=>uN(e),ValueConverter:()=>new Qd,TokenBuilder:()=>new Zd,Lexer:e=>new w2(e),ParserErrorMessageProvider:()=>new Zg},workspace:{AstNodeLocator:()=>new m2,AstNodeDescriptionProvider:e=>new p2(e),ReferenceDescriptionProvider:e=>new g2(e)},references:{Linker:e=>new r2(e),NameProvider:()=>new n2,ScopeProvider:e=>new l2(e),ScopeComputation:e=>new a2(e),References:e=>new i2(e)},serializer:{Hydrator:e=>new _2(e),JsonSerializer:e=>new c2(e)},validation:{DocumentValidator:e=>new d2(e),ValidationRegistry:e=>new h2(e)},shared:()=>t.shared}}function Zs(t){return{ServiceRegistry:()=>new u2,workspace:{LangiumDocuments:e=>new t2(e),LangiumDocumentFactory:e=>new e2(e),DocumentBuilder:e=>new y2(e),IndexManager:e=>new x2(e),WorkspaceManager:e=>new b2(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new A2,ConfigurationProvider:e=>new v2(e)}}}var oI=F(()=>{nR();hN();dN();pN();gN();_N();LN();RN();NN();MN();iT();ON();PN();f2();BN();FN();zN();GN();rm();UN();VN();qN();JN();eI();Jy();iI();aI();sI()});function Li(t,e,r,n,i,a,s,o,l){let u=[t,e,r,n,i,a,s,o,l].reduce(cT,{});return Qoe(u)}function Zoe(t){if(t&&t[cI])for(let e of Object.values(t))Zoe(e);return t}function Qoe(t,e){let r=new Proxy({},{deleteProperty:()=>!1,get:(n,i)=>Koe(n,i,t,e||r),getOwnPropertyDescriptor:(n,i)=>(Koe(n,i,t,e||r),Object.getOwnPropertyDescriptor(n,i)),has:(n,i)=>i in t,ownKeys:()=>[...Reflect.ownKeys(t),cI]});return r[cI]=!0,r}function Koe(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===joe)throw new Error(\'Cycle detected. Please make "\'+String(e)+\'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies\');return t[e]}else if(e in r){let i=r[e];t[e]=joe;try{t[e]=typeof i=="function"?i(n):Qoe(i,n)}catch(a){throw t[e]=a instanceof Error?a:void 0,a}return t[e]}else return}function cT(t,e){if(e){for(let[r,n]of Object.entries(e))if(n!==void 0){let i=t[r];i!==null&&n!==null&&typeof i=="object"&&typeof n=="object"?t[r]=cT(i,n):t[r]=n}}return t}var lI,cI,joe,uI=F(()=>{(function(t){t.merge=(e,r)=>cT(cT({},e),r)})(lI||(lI={}));cI=Symbol("isProxy");joe=Symbol()});var Joe=F(()=>{});var ele=F(()=>{eI();JN();QN()});var tle=F(()=>{});var rle=F(()=>{nR();tle()});var nle=F(()=>{});var ile=F(()=>{iI();hN();Yk();dN();Jy();qN();nle();pN();gN()});var ale=F(()=>{_N();LN();RN();IN();NN();MN()});var sle=F(()=>{sI();iT()});var uT,Qs,hI=F(()=>{uT=class{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},Qs={fileSystemProvider:()=>new uT}});function pDe(){let t=Li(Zs(Qs),dDe),e=Li(Ks({shared:t}),fDe);return t.ServiceRegistry.register(e),e}function jh(t){var e;let r=pDe(),n=r.serializer.JsonSerializer.deserialize(t);return r.shared.workspace.LangiumDocumentFactory.fromModel(n,ks.parse(`memory://${(e=n.name)!==null&&e!==void 0?e:"grammar"}.langium`)),n}var fDe,dDe,ole=F(()=>{oI();uI();vc();hI();Tc();fDe={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},dDe={AstReflection:()=>new bg}});var Nr={};mr(Nr,{AstUtils:()=>Xw,BiMap:()=>Jd,Cancellation:()=>gr,ContextCache:()=>e0,CstUtils:()=>Pw,DONE_RESULT:()=>Va,Deferred:()=>ja,Disposable:()=>t0,DisposableCache:()=>am,DocumentCache:()=>rT,EMPTY_STREAM:()=>cy,ErrorWithLocation:()=>Rd,GrammarUtils:()=>ek,MultiMap:()=>Ec,OperationCancelled:()=>kc,Reduction:()=>yg,RegExpUtils:()=>Qw,SimpleCache:()=>o2,StreamImpl:()=>Ys,TreeStreamImpl:()=>mc,URI:()=>ks,UriUtils:()=>Ka,WorkspaceCache:()=>sm,assertUnreachable:()=>Vh,delayNextTick:()=>SN,interruptAndCheck:()=>_i,isOperationCancelled:()=>Xh,loadGrammarFromJson:()=>jh,setInterruptionPeriod:()=>Moe,startCancelableOperation:()=>Ioe,stream:()=>Yr});var lle=F(()=>{nT();tI();pr(Nr,ei);nm();$N();Bw();ole();Fo();xs();Tc();Wa();Bo();yl();wl();Tg()});var cle=F(()=>{PN();f2()});var ule=F(()=>{BN();FN();zN();GN();rm();hI();UN();aI();VN()});var la={};mr(la,{AbstractAstReflection:()=>Cd,AbstractCstNode:()=>jy,AbstractLangiumParser:()=>Ky,AbstractParserErrorMessageProvider:()=>jk,AbstractThreadedAsyncParser:()=>rI,AstUtils:()=>Xw,BiMap:()=>Jd,Cancellation:()=>gr,CompositeCstNodeImpl:()=>jd,ContextCache:()=>e0,CstNodeBuilder:()=>Xy,CstUtils:()=>Pw,DONE_RESULT:()=>Va,DatatypeSymbol:()=>Xk,DefaultAstNodeDescriptionProvider:()=>p2,DefaultAstNodeLocator:()=>m2,DefaultAsyncParser:()=>C2,DefaultCommentProvider:()=>S2,DefaultConfigurationProvider:()=>v2,DefaultDocumentBuilder:()=>y2,DefaultDocumentValidator:()=>d2,DefaultHydrator:()=>_2,DefaultIndexManager:()=>x2,DefaultJsonSerializer:()=>c2,DefaultLangiumDocumentFactory:()=>e2,DefaultLangiumDocuments:()=>t2,DefaultLexer:()=>w2,DefaultLinker:()=>r2,DefaultNameProvider:()=>n2,DefaultReferenceDescriptionProvider:()=>g2,DefaultReferences:()=>i2,DefaultScopeComputation:()=>a2,DefaultScopeProvider:()=>l2,DefaultServiceRegistry:()=>u2,DefaultTokenBuilder:()=>Zd,DefaultValueConverter:()=>Qd,DefaultWorkspaceLock:()=>A2,DefaultWorkspaceManager:()=>b2,Deferred:()=>ja,Disposable:()=>t0,DisposableCache:()=>am,DocumentCache:()=>rT,DocumentState:()=>pn,DocumentValidator:()=>Bu,EMPTY_SCOPE:()=>JMe,EMPTY_STREAM:()=>cy,EmptyFileSystem:()=>Qs,EmptyFileSystemProvider:()=>uT,ErrorWithLocation:()=>Rd,GrammarAST:()=>py,GrammarUtils:()=>ek,JSDocDocumentationProvider:()=>E2,LangiumCompletionParser:()=>Qy,LangiumParser:()=>Zy,LangiumParserErrorMessageProvider:()=>Zg,LeafCstNodeImpl:()=>Xd,MapScope:()=>s2,Module:()=>lI,MultiMap:()=>Ec,OperationCancelled:()=>kc,ParserWorker:()=>nI,Reduction:()=>yg,RegExpUtils:()=>Qw,RootCstNodeImpl:()=>Kg,SimpleCache:()=>o2,StreamImpl:()=>Ys,StreamScope:()=>im,TextDocument:()=>em,TreeStreamImpl:()=>mc,URI:()=>ks,UriUtils:()=>Ka,ValidationCategory:()=>om,ValidationRegistry:()=>h2,ValueConverter:()=>wc,WorkspaceCache:()=>sm,assertUnreachable:()=>Vh,createCompletionParser:()=>uN,createDefaultCoreModule:()=>Ks,createDefaultSharedCoreModule:()=>Zs,createGrammarConfig:()=>rR,createLangiumParser:()=>fN,delayNextTick:()=>SN,diagnosticData:()=>aT,eagerLoad:()=>Zoe,getDiagnosticRange:()=>Goe,inject:()=>Li,interruptAndCheck:()=>_i,isAstNode:()=>Yn,isAstNodeDescription:()=>A9,isAstNodeWithComment:()=>DN,isCompositeCstNode:()=>qs,isIMultiModeLexerDefinition:()=>HN,isJSDoc:()=>KN,isLeafCstNode:()=>Uh,isLinkingError:()=>Ad,isNamed:()=>zoe,isOperationCancelled:()=>Xh,isReference:()=>oa,isRootCstNode:()=>ly,isTokenTypeArray:()=>Uoe,isTokenTypeDictionary:()=>WN,loadGrammarFromJson:()=>jh,parseJSDoc:()=>jN,prepareLangiumParser:()=>Soe,setInterruptionPeriod:()=>Moe,startCancelableOperation:()=>Ioe,stream:()=>Yr,toDiagnosticSeverity:()=>sT});var Sc=F(()=>{oI();uI();ON();Joe();Mo();ele();rle();ile();ale();sle();lle();pr(la,Nr);cle();ule();vc()});function yle(t){return Tl.isInstance(t,vle)}function xle(t){return Tl.isInstance(t,fI)}function ble(t){return Tl.isInstance(t,dI)}function wle(t){return Tl.isInstance(t,yDe)}function kle(t){return Tl.isInstance(t,pI)}function Ele(t){return Tl.isInstance(t,Tle)}function Sle(t){return Tl.isInstance(t,gI)}function Ale(t){return Tl.isInstance(t,Cle)}function Lle(t){return Tl.isInstance(t,_le)}function Nle(t){return Tl.isInstance(t,Rle)}function Mle(t){return Tl.isInstance(t,Ile)}var gDe,Lt,mle,vle,fI,mDe,vDe,dI,yDe,pI,Tle,gI,Cle,_le,Rle,Ile,xDe,Dle,Tl,hle,bDe,fle,wDe,dle,kDe,ple,TDe,gle,EDe,SDe,CDe,ADe,_De,LDe,El,mI,vI,yI,xI,bI,RDe,NDe,IDe,MDe,lm,r0,zo,DDe,$o=F(()=>{Sc();Sc();Sc();Sc();gDe=Object.defineProperty,Lt=(t,e)=>gDe(t,"name",{value:e,configurable:!0}),mle="Statement",vle="Architecture";Lt(yle,"isArchitecture");fI="Branch";Lt(xle,"isBranch");mDe="Checkout",vDe="CherryPicking",dI="Commit";Lt(ble,"isCommit");yDe="Common";Lt(wle,"isCommon");pI="GitGraph";Lt(kle,"isGitGraph");Tle="Info";Lt(Ele,"isInfo");gI="Merge";Lt(Sle,"isMerge");Cle="Packet";Lt(Ale,"isPacket");_le="PacketBlock";Lt(Lle,"isPacketBlock");Rle="Pie";Lt(Nle,"isPie");Ile="PieSection";Lt(Mle,"isPieSection");xDe="Direction",Dle=class extends Cd{static{Lt(this,"MermaidAstReflection")}getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(t,e){switch(t){case fI:case mDe:case vDe:case dI:case gI:return this.isSubtype(mle,e);case xDe:return this.isSubtype(pI,e);default:return!1}}getReferenceType(t){let e=`${t.container.$type}:${t.property}`;switch(e){default:throw new Error(`${e} is not a valid reference id.`)}}getTypeMetaData(t){switch(t){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},Tl=new Dle,bDe=Lt(()=>hle??(hle=jh(\'{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\\\\\r?\\\\\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}\')),"InfoGrammar"),wDe=Lt(()=>fle??(fle=jh(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\\\"[^\\\\"]*\\\\"|\'[^\']*\'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\\\\\r?\\\\\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),kDe=Lt(()=>dle??(dle=jh(\'{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\\\"[^\\\\"]+\\\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\\\\\r?\\\\\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}\')),"PieGrammar"),TDe=Lt(()=>ple??(ple=jh(\'{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\\\\\(\\\\"[^\\\\"]+\\\\"\\\\\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\\\\\([\\\\\\\\w-:]+\\\\\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\\\\\[[\\\\\\\\w ]+\\\\\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\\\\\{group\\\\\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\\\\\r?\\\\\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}\')),"ArchitectureGrammar"),EDe=Lt(()=>gle??(gle=jh(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\\\\\r?\\\\\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\\\\\w([-\\\\\\\\./\\\\\\\\w]*[-\\\\\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\\\"[^\\\\"]*\\\\"|\'[^\']*\'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),SDe={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},CDe={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},ADe={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},_De={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},LDe={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},El={AstReflection:Lt(()=>new Dle,"AstReflection")},mI={Grammar:Lt(()=>bDe(),"Grammar"),LanguageMetaData:Lt(()=>SDe,"LanguageMetaData"),parser:{}},vI={Grammar:Lt(()=>wDe(),"Grammar"),LanguageMetaData:Lt(()=>CDe,"LanguageMetaData"),parser:{}},yI={Grammar:Lt(()=>kDe(),"Grammar"),LanguageMetaData:Lt(()=>ADe,"LanguageMetaData"),parser:{}},xI={Grammar:Lt(()=>TDe(),"Grammar"),LanguageMetaData:Lt(()=>_De,"LanguageMetaData"),parser:{}},bI={Grammar:Lt(()=>EDe(),"Grammar"),LanguageMetaData:Lt(()=>LDe,"LanguageMetaData"),parser:{}},RDe=/accDescr(?:[\\t ]*:([^\\n\\r]*)|\\s*{([^}]*)})/,NDe=/accTitle[\\t ]*:([^\\n\\r]*)/,IDe=/title([\\t ][^\\n\\r]*|)/,MDe={ACC_DESCR:RDe,ACC_TITLE:NDe,TITLE:IDe},lm=class extends Qd{static{Lt(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){let n=this.runCommonConverter(t,e,r);return n===void 0&&(n=this.runCustomConverter(t,e,r)),n===void 0?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){let n=MDe[t.name];if(n===void 0)return;let i=n.exec(e);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\\s*/gm,"").replace(/\\s+$/gm,"").replace(/[\\t ]{2,}/gm," ").replace(/[\\n\\r]{2,}/gm,`\n`)}}},r0=class extends lm{static{Lt(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},zo=class extends Zd{static{Lt(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){let n=super.buildKeywordTokens(t,e,r);return n.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\\\S))"))}),n}},DDe=class extends zo{static{Lt(this,"CommonTokenBuilder")}}});function fT(t=Qs){let e=Li(Zs(t),El),r=Li(Ks({shared:e}),bI,hT);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}var ODe,hT,wI=F(()=>{$o();Sc();ODe=class extends zo{static{Lt(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},hT={parser:{TokenBuilder:Lt(()=>new ODe,"TokenBuilder"),ValueConverter:Lt(()=>new r0,"ValueConverter")}};Lt(fT,"createGitGraphServices")});function pT(t=Qs){let e=Li(Zs(t),El),r=Li(Ks({shared:e}),mI,dT);return e.ServiceRegistry.register(r),{shared:e,Info:r}}var PDe,dT,kI=F(()=>{$o();Sc();PDe=class extends zo{static{Lt(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},dT={parser:{TokenBuilder:Lt(()=>new PDe,"TokenBuilder"),ValueConverter:Lt(()=>new r0,"ValueConverter")}};Lt(pT,"createInfoServices")});function mT(t=Qs){let e=Li(Zs(t),El),r=Li(Ks({shared:e}),vI,gT);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}var BDe,gT,TI=F(()=>{$o();Sc();BDe=class extends zo{static{Lt(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},gT={parser:{TokenBuilder:Lt(()=>new BDe,"TokenBuilder"),ValueConverter:Lt(()=>new r0,"ValueConverter")}};Lt(mT,"createPacketServices")});function yT(t=Qs){let e=Li(Zs(t),El),r=Li(Ks({shared:e}),yI,vT);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}var FDe,zDe,vT,EI=F(()=>{$o();Sc();FDe=class extends zo{static{Lt(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},zDe=class extends lm{static{Lt(this,"PieValueConverter")}runCustomConverter(t,e,r){if(t.name==="PIE_SECTION_LABEL")return e.replace(/"/g,"").trim()}},vT={parser:{TokenBuilder:Lt(()=>new FDe,"TokenBuilder"),ValueConverter:Lt(()=>new zDe,"ValueConverter")}};Lt(yT,"createPieServices")});function bT(t=Qs){let e=Li(Zs(t),El),r=Li(Ks({shared:e}),xI,xT);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}var $De,GDe,xT,SI=F(()=>{$o();Sc();$De=class extends zo{static{Lt(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},GDe=class extends lm{static{Lt(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){if(t.name==="ARCH_ICON")return e.replace(/[()]/g,"").trim();if(t.name==="ARCH_TEXT_ICON")return e.replace(/["()]/g,"");if(t.name==="ARCH_TITLE")return e.replace(/[[\\]]/g,"").trim()}},xT={parser:{TokenBuilder:Lt(()=>new $De,"TokenBuilder"),ValueConverter:Lt(()=>new GDe,"ValueConverter")}};Lt(bT,"createArchitectureServices")});var Ole={};mr(Ole,{InfoModule:()=>dT,createInfoServices:()=>pT});var Ple=F(()=>{kI();$o()});var Ble={};mr(Ble,{PacketModule:()=>gT,createPacketServices:()=>mT});var Fle=F(()=>{TI();$o()});var zle={};mr(zle,{PieModule:()=>vT,createPieServices:()=>yT});var $le=F(()=>{EI();$o()});var Gle={};mr(Gle,{ArchitectureModule:()=>xT,createArchitectureServices:()=>bT});var Ule=F(()=>{SI();$o()});var Vle={};mr(Vle,{GitGraphModule:()=>hT,createGitGraphServices:()=>fT});var Wle=F(()=>{wI();$o()});async function Sl(t,e){let r=UDe[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);n0[t]||await r();let i=n0[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new VDe(i);return i.value}var n0,UDe,VDe,cm=F(()=>{wI();kI();TI();EI();SI();$o();n0={},UDe={info:Lt(async()=>{let{createInfoServices:t}=await Promise.resolve().then(()=>(Ple(),Ole)),e=t().Info.parser.LangiumParser;n0.info=e},"info"),packet:Lt(async()=>{let{createPacketServices:t}=await Promise.resolve().then(()=>(Fle(),Ble)),e=t().Packet.parser.LangiumParser;n0.packet=e},"packet"),pie:Lt(async()=>{let{createPieServices:t}=await Promise.resolve().then(()=>($le(),zle)),e=t().Pie.parser.LangiumParser;n0.pie=e},"pie"),architecture:Lt(async()=>{let{createArchitectureServices:t}=await Promise.resolve().then(()=>(Ule(),Gle)),e=t().Architecture.parser.LangiumParser;n0.architecture=e},"architecture"),gitGraph:Lt(async()=>{let{createGitGraphServices:t}=await Promise.resolve().then(()=>(Wle(),Vle)),e=t().GitGraph.parser.LangiumParser;n0.gitGraph=e},"gitGraph")};Lt(Sl,"parse");VDe=class extends Error{constructor(t){let e=t.lexerErrors.map(n=>n.message).join(`\n`),r=t.parserErrors.map(n=>n.message).join(`\n`);super(`Parsing failed: ${e} ${r}`),this.result=t}static{Lt(this,"MermaidParseError")}}});var Qle={};mr(Qle,{diagram:()=>BOe});function TT(){return aA({length:7})}function qle(t,e){let r=Object.create(null);return t.reduce((n,i)=>{let a=e(i);return r[a]||(r[a]=!0,n.push(i)),n},[])}function CI(t,e,r){let n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}function AI(t){let e=t.reduce((i,a)=>i.seq>a.seq?i:a,t[0]),r="";t.forEach(function(i){i===e?r+=" *":r+=" |"});let n=[r,e.id,e.seq];for(let i in gt.records.branches)gt.records.branches.get(i)===e.id&&n.push(i);if(re.debug(n.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){let i=gt.records.commits.get(e.parents[0]);CI(t,e,i),e.parents[1]&&t.push(gt.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){let i=gt.records.commits.get(e.parents[0]);CI(t,e,i)}}t=qle(t,i=>i.id),AI(t)}var rn,WDe,a0,gt,HDe,qDe,YDe,XDe,jDe,KDe,ZDe,Yle,QDe,JDe,eOe,tOe,rOe,Xle,nOe,iOe,aOe,jle,sOe,oOe,lOe,cOe,uOe,hOe,fOe,dOe,pOe,Go,Zh,Qh,Cc,Fu,i0,Ts,Es,wT,L2,kT,Kh,kr,gOe,Kle,Zle,mOe,vOe,yOe,xOe,bOe,wOe,kOe,TOe,EOe,SOe,COe,AOe,Hle,_Oe,R2,LOe,ROe,NOe,IOe,MOe,DOe,OOe,POe,BOe,Jle=F(()=>{oy();Mw();xn();or();cm();lr();rn={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},WDe=sr.gitGraph,a0=v(()=>hs({...WDe,...Or().gitGraph}),"getConfig"),gt=new vg(()=>{let t=a0(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});v(TT,"getID");v(qle,"uniqBy");HDe=v(function(t){gt.records.direction=t},"setDirection"),qDe=v(function(t){re.debug("options str",t),t=t?.trim(),t=t||"{}";try{gt.records.options=JSON.parse(t)}catch(e){re.error("error while parsing gitGraph options",e.message)}},"setOptions"),YDe=v(function(){return gt.records.options},"getOptions"),XDe=v(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags;re.info("commit",e,r,n,i),re.debug("Entering commit:",e,r,n,i);let a=a0();r=je.sanitizeText(r,a),e=je.sanitizeText(e,a),i=i?.map(o=>je.sanitizeText(o,a));let s={id:r||gt.records.seq+"-"+TT(),message:e,seq:gt.records.seq++,type:n??rn.NORMAL,tags:i??[],parents:gt.records.head==null?[]:[gt.records.head.id],branch:gt.records.currBranch};gt.records.head=s,re.info("main branch",a.mainBranchName),gt.records.commits.set(s.id,s),gt.records.branches.set(gt.records.currBranch,s.id),re.debug("in pushCommit "+s.id)},"commit"),jDe=v(function(t){let e=t.name,r=t.order;if(e=je.sanitizeText(e,a0()),gt.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);gt.records.branches.set(e,gt.records.head!=null?gt.records.head.id:null),gt.records.branchConfig.set(e,{name:e,order:r}),Yle(e),re.debug("in createBranch")},"branch"),KDe=v(t=>{let e=t.branch,r=t.id,n=t.type,i=t.tags,a=a0();e=je.sanitizeText(e,a),r&&(r=je.sanitizeText(r,a));let s=gt.records.branches.get(gt.records.currBranch),o=gt.records.branches.get(e),l=s?gt.records.commits.get(s):void 0,u=o?gt.records.commits.get(o):void 0;if(l&&u&&l.branch===e)throw new Error(`Cannot merge branch \'${e}\' into itself.`);if(gt.records.currBranch===e){let d=new Error(\'Incorrect usage of "merge". Cannot merge a branch to itself\');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(l===void 0||!l){let d=new Error(`Incorrect usage of "merge". Current branch (${gt.records.currBranch})has no commits`);throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},d}if(!gt.records.branches.has(e)){let d=new Error(\'Incorrect usage of "merge". Branch to be merged (\'+e+") does not exist");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},d}if(u===void 0||!u){let d=new Error(\'Incorrect usage of "merge". Branch to be merged (\'+e+") has no commits");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[\'"commit"\']},d}if(l===u){let d=new Error(\'Incorrect usage of "merge". Both branches have same head\');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(r&>.records.commits.has(r)){let d=new Error(\'Incorrect usage of "merge". Commit with id:\'+r+" already exists, use different custom Id");throw d.hash={text:`merge ${e} ${r} ${n} ${i?.join(" ")}`,token:`merge ${e} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},d}let h=o||"",f={id:r||`${gt.records.seq}-${TT()}`,message:`merged branch ${e} into ${gt.records.currBranch}`,seq:gt.records.seq++,parents:gt.records.head==null?[]:[gt.records.head.id,h],branch:gt.records.currBranch,type:rn.MERGE,customType:n,customId:!!r,tags:i??[]};gt.records.head=f,gt.records.commits.set(f.id,f),gt.records.branches.set(gt.records.currBranch,f.id),re.debug(gt.records.branches),re.debug("in mergeBranch")},"merge"),ZDe=v(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent;re.debug("Entering cherryPick:",e,r,n);let a=a0();if(e=je.sanitizeText(e,a),r=je.sanitizeText(r,a),n=n?.map(l=>je.sanitizeText(l,a)),i=je.sanitizeText(i,a),!e||!gt.records.commits.has(e)){let l=new Error(\'Incorrect usage of "cherryPick". Source commit id should exist and provided\');throw l.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},l}let s=gt.records.commits.get(e);if(s===void 0||!s)throw new Error(\'Incorrect usage of "cherryPick". Source commit id should exist and provided\');if(i&&!(Array.isArray(s.parents)&&s.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===rn.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!gt.records.commits.has(r)){if(o===gt.records.currBranch){let f=new Error(\'Incorrect usage of "cherryPick". Source commit is already on current branch\');throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let l=gt.records.branches.get(gt.records.currBranch);if(l===void 0||!l){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${gt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let u=gt.records.commits.get(l);if(u===void 0||!u){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${gt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let h={id:gt.records.seq+"-"+TT(),message:`cherry-picked ${s?.message} into ${gt.records.currBranch}`,seq:gt.records.seq++,parents:gt.records.head==null?[]:[gt.records.head.id,s.id],branch:gt.records.currBranch,type:rn.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===rn.MERGE?`|parent:${i}`:""}`]};gt.records.head=h,gt.records.commits.set(h.id,h),gt.records.branches.set(gt.records.currBranch,h.id),re.debug(gt.records.branches),re.debug("in cherryPick")}},"cherryPick"),Yle=v(function(t){if(t=je.sanitizeText(t,a0()),gt.records.branches.has(t)){gt.records.currBranch=t;let e=gt.records.branches.get(gt.records.currBranch);e===void 0||!e?gt.records.head=null:gt.records.head=gt.records.commits.get(e)??null}else{let e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");v(CI,"upsert");v(AI,"prettyPrintCommitHistory");QDe=v(function(){re.debug(gt.records.commits);let t=Xle()[0];AI([t])},"prettyPrint"),JDe=v(function(){gt.reset(),xr()},"clear"),eOe=v(function(){return[...gt.records.branchConfig.values()].map((e,r)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${r}`)}).sort((e,r)=>(e.order??0)-(r.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),tOe=v(function(){return gt.records.branches},"getBranches"),rOe=v(function(){return gt.records.commits},"getCommits"),Xle=v(function(){let t=[...gt.records.commits.values()];return t.forEach(function(e){re.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},"getCommitsArray"),nOe=v(function(){return gt.records.currBranch},"getCurrentBranch"),iOe=v(function(){return gt.records.direction},"getDirection"),aOe=v(function(){return gt.records.head},"getHead"),jle={commitType:rn,getConfig:a0,setDirection:HDe,setOptions:qDe,getOptions:YDe,commit:XDe,branch:jDe,merge:KDe,cherryPick:ZDe,checkout:Yle,prettyPrint:QDe,clear:JDe,getBranchesAsObjArray:eOe,getBranches:tOe,getCommits:rOe,getCommitsArray:Xle,getCurrentBranch:nOe,getDirection:iOe,getHead:aOe,setAccTitle:Tr,getAccTitle:Ar,getAccDescription:Lr,setAccDescription:_r,setDiagramTitle:en,getDiagramTitle:Hr},sOe=v((t,e)=>{Cu(t,e),t.dir&&e.setDirection(t.dir);for(let r of t.statements)oOe(r,e)},"populate"),oOe=v((t,e)=>{let n={Commit:v(i=>e.commit(lOe(i)),"Commit"),Branch:v(i=>e.branch(cOe(i)),"Branch"),Merge:v(i=>e.merge(uOe(i)),"Merge"),Checkout:v(i=>e.checkout(hOe(i)),"Checkout"),CherryPicking:v(i=>e.cherryPick(fOe(i)),"CherryPicking")}[t.$type];n?n(t):re.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),lOe=v(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?rn[t.type]:rn.NORMAL,tags:t.tags??void 0}),"parseCommit"),cOe=v(t=>({name:t.name,order:t.order??0}),"parseBranch"),uOe=v(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?rn[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),hOe=v(t=>t.branch,"parseCheckout"),fOe=v(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),dOe={parse:v(async t=>{let e=await Sl("gitGraph",t);re.debug(e),sOe(e,jle)},"parse")},pOe=pe(),Go=pOe?.gitGraph,Zh=10,Qh=40,Cc=4,Fu=2,i0=8,Ts=new Map,Es=new Map,wT=30,L2=new Map,kT=[],Kh=0,kr="LR",gOe=v(()=>{Ts.clear(),Es.clear(),L2.clear(),Kh=0,kT=[],kr="LR"},"clear"),Kle=v(t=>{let e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\\\n|\\n|<br\\s*\\/?>/gi):t).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),e.appendChild(i)}),e},"drawText"),Zle=v(t=>{let e,r,n;return kr==="BT"?(r=v((i,a)=>i<=a,"comparisonFunc"),n=1/0):(r=v((i,a)=>i>=a,"comparisonFunc"),n=0),t.forEach(i=>{let a=kr==="TB"||kr=="BT"?Es.get(i)?.y:Es.get(i)?.x;a!==void 0&&r(a,n)&&(e=i,n=a)}),e},"findClosestParent"),mOe=v(t=>{let e="",r=1/0;return t.forEach(n=>{let i=Es.get(n).y;i<=r&&(e=n,r=i)}),e||void 0},"findClosestParentBT"),vOe=v((t,e,r)=>{let n=r,i=r,a=[];t.forEach(s=>{let o=e.get(s);if(!o)throw new Error(`Commit not found for key ${s}`);o.parents.length?(n=xOe(o),i=Math.max(n,i)):a.push(o),bOe(o,n)}),n=i,a.forEach(s=>{wOe(s,n,r)}),t.forEach(s=>{let o=e.get(s);if(o?.parents.length){let l=mOe(o.parents);n=Es.get(l).y-Qh,n<=i&&(i=n);let u=Ts.get(o.branch).pos,h=n-Zh;Es.set(o.id,{x:u,y:h})}})},"setParallelBTPos"),yOe=v(t=>{let e=Zle(t.parents.filter(n=>n!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);let r=Es.get(e)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),xOe=v(t=>yOe(t)+Qh,"calculateCommitPosition"),bOe=v((t,e)=>{let r=Ts.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);let n=r.pos,i=e+Zh;return Es.set(t.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),wOe=v((t,e,r)=>{let n=Ts.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);let i=e+r,a=n.pos;Es.set(t.id,{x:a,y:i})},"setRootPosition"),kOe=v((t,e,r,n,i,a)=>{if(a===rn.HIGHLIGHT)t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%i0} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%i0} ${n}-inner`);else if(a===rn.CHERRY_PICK)t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`);else{let s=t.append("circle");if(s.attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===rn.MERGE?9:10),s.attr("class",`commit ${e.id} commit${i%i0}`),a===rn.MERGE){let o=t.append("circle");o.attr("cx",r.x),o.attr("cy",r.y),o.attr("r",6),o.attr("class",`commit ${n} ${e.id} commit${i%i0}`)}a===rn.REVERSE&&t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},${r.y-5}`).attr("class",`commit ${n} ${e.id} commit${i%i0}`)}},"drawCommitBullet"),TOe=v((t,e,r,n)=>{if(e.type!==rn.CHERRY_PICK&&(e.customId&&e.type===rn.MERGE||e.type!==rn.MERGE)&&Go?.showCommitLabel){let i=t.append("g"),a=i.insert("rect").attr("class","commit-label-bkg"),s=i.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),o=s.node()?.getBBox();if(o&&(a.attr("x",r.posWithOffset-o.width/2-Fu).attr("y",r.y+13.5).attr("width",o.width+2*Fu).attr("height",o.height+2*Fu),kr==="TB"||kr==="BT"?(a.attr("x",r.x-(o.width+4*Cc+5)).attr("y",r.y-12),s.attr("x",r.x-(o.width+4*Cc)).attr("y",r.y+o.height-12)):s.attr("x",r.posWithOffset-o.width/2),Go.rotateCommitLabel))if(kr==="TB"||kr==="BT")s.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let l=-7.5-(o.width+10)/25*9.5,u=10+o.width/25*8.5;i.attr("transform","translate("+l+", "+u+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),EOe=v((t,e,r,n)=>{if(e.tags.length>0){let i=0,a=0,s=0,o=[];for(let l of e.tags.reverse()){let u=t.insert("polygon"),h=t.append("circle"),f=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(l),d=f.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),s=Math.max(s,d.height),f.attr("x",r.posWithOffset-d.width/2),o.push({tag:f,hole:h,rect:u,yOffset:i}),i+=20}for(let{tag:l,hole:u,rect:h,yOffset:f}of o){let d=s/2,p=r.y-19.2-f;if(h.attr("class","tag-label-bkg").attr("points",`\n ${n-a/2-Cc/2},${p+Fu} \n ${n-a/2-Cc/2},${p-Fu}\n ${r.posWithOffset-a/2-Cc},${p-d-Fu}\n ${r.posWithOffset+a/2+Cc},${p-d-Fu}\n ${r.posWithOffset+a/2+Cc},${p+d+Fu}\n ${r.posWithOffset-a/2-Cc},${p+d+Fu}`),u.attr("cy",p).attr("cx",n-a/2+Cc/2).attr("r",1.5).attr("class","tag-hole"),kr==="TB"||kr==="BT"){let g=n+f;h.attr("class","tag-label-bkg").attr("points",`\n ${r.x},${g+2}\n ${r.x},${g-2}\n ${r.x+Zh},${g-d-2}\n ${r.x+Zh+a+4},${g-d-2}\n ${r.x+Zh+a+4},${g+d+2}\n ${r.x+Zh},${g+d+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("cx",r.x+Cc/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),l.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),SOe=v(t=>{switch(t.customType??t.type){case rn.NORMAL:return"commit-normal";case rn.REVERSE:return"commit-reverse";case rn.HIGHLIGHT:return"commit-highlight";case rn.MERGE:return"commit-merge";case rn.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),COe=v((t,e,r,n)=>{let i={x:0,y:0};if(t.parents.length>0){let a=Zle(t.parents);if(a){let s=n.get(a)??i;return e==="TB"?s.y+Qh:e==="BT"?(n.get(t.id)??i).y-Qh:s.x+Qh}}else return e==="TB"?wT:e==="BT"?(n.get(t.id)??i).y-Qh:0;return 0},"calculatePosition"),AOe=v((t,e,r)=>{let n=kr==="BT"&&r?e:e+Zh,i=kr==="TB"||kr==="BT"?n:Ts.get(t.branch)?.pos,a=kr==="TB"||kr==="BT"?Ts.get(t.branch)?.pos:n;if(a===void 0||i===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:i,posWithOffset:n}},"getCommitPosition"),Hle=v((t,e,r)=>{if(!Go)throw new Error("GitGraph config not found");let n=t.append("g").attr("class","commit-bullets"),i=t.append("g").attr("class","commit-labels"),a=kr==="TB"||kr==="BT"?wT:0,s=[...e.keys()],o=Go?.parallelCommits??!1,l=v((h,f)=>{let d=e.get(h)?.seq,p=e.get(f)?.seq;return d!==void 0&&p!==void 0?d-p:0},"sortKeys"),u=s.sort(l);kr==="BT"&&(o&&vOe(u,e,a),u=u.reverse()),u.forEach(h=>{let f=e.get(h);if(!f)throw new Error(`Commit not found for key ${h}`);o&&(a=COe(f,kr,a,Es));let d=AOe(f,a,o);if(r){let p=SOe(f),g=f.customType??f.type,m=Ts.get(f.branch)?.index??0;kOe(n,f,d,p,m,g),TOe(i,f,d,a),EOe(i,f,d,a)}kr==="TB"||kr==="BT"?Es.set(f.id,{x:d.x,y:d.posWithOffset}):Es.set(f.id,{x:d.posWithOffset,y:d.y}),a=kr==="BT"&&o?a+Qh:a+Qh+Zh,a>Kh&&(Kh=a)})},"drawCommits"),_Oe=v((t,e,r,n,i)=>{let s=(kr==="TB"||kr==="BT"?r.x<n.x:r.y<n.y)?e.branch:t.branch,o=v(u=>u.branch===s,"isOnBranchToGetCurve"),l=v(u=>u.seq>t.seq&&u.seq<e.seq,"isBetweenCommits");return[...i.values()].some(u=>l(u)&&o(u))},"shouldRerouteArrow"),R2=v((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;if(r>5)return n;if(kT.every(s=>Math.abs(s-n)>=10))return kT.push(n),n;let a=Math.abs(t-e);return R2(t,e-a/5,r+1)},"findLane"),LOe=v((t,e,r,n)=>{let i=Es.get(e.id),a=Es.get(r.id);if(i===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);let s=_Oe(e,r,i,a,n),o="",l="",u=0,h=0,f=Ts.get(r.branch)?.index;r.type===rn.MERGE&&e.id!==r.parents[0]&&(f=Ts.get(e.branch)?.index);let d;if(s){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,h=10;let p=i.y<a.y?R2(i.y,a.y):R2(a.y,i.y),g=i.x<a.x?R2(i.x,a.x):R2(a.x,i.x);kr==="TB"?i.x<a.x?d=`M ${i.x} ${i.y} L ${g-u} ${i.y} ${l} ${g} ${i.y+h} L ${g} ${a.y-u} ${o} ${g+h} ${a.y} L ${a.x} ${a.y}`:(f=Ts.get(e.branch)?.index,d=`M ${i.x} ${i.y} L ${g+u} ${i.y} ${o} ${g} ${i.y+h} L ${g} ${a.y-u} ${l} ${g-h} ${a.y} L ${a.x} ${a.y}`):kr==="BT"?i.x<a.x?d=`M ${i.x} ${i.y} L ${g-u} ${i.y} ${o} ${g} ${i.y-h} L ${g} ${a.y+u} ${l} ${g+h} ${a.y} L ${a.x} ${a.y}`:(f=Ts.get(e.branch)?.index,d=`M ${i.x} ${i.y} L ${g+u} ${i.y} ${l} ${g} ${i.y-h} L ${g} ${a.y+u} ${o} ${g-h} ${a.y} L ${a.x} ${a.y}`):i.y<a.y?d=`M ${i.x} ${i.y} L ${i.x} ${p-u} ${o} ${i.x+h} ${p} L ${a.x-u} ${p} ${l} ${a.x} ${p+h} L ${a.x} ${a.y}`:(f=Ts.get(e.branch)?.index,d=`M ${i.x} ${i.y} L ${i.x} ${p+u} ${l} ${i.x+h} ${p} L ${a.x-u} ${p} ${o} ${a.x} ${p-h} L ${a.x} ${a.y}`)}else o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,kr==="TB"?(i.x<a.x&&(r.type===rn.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${o} ${i.x+h} ${a.y} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${l} ${a.x} ${i.y+h} L ${a.x} ${a.y}`),i.x>a.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,r.type===rn.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${l} ${i.x-h} ${a.y} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${a.x+u} ${i.y} ${o} ${a.x} ${i.y+h} L ${a.x} ${a.y}`),i.x===a.x&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):kr==="BT"?(i.x<a.x&&(r.type===rn.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${l} ${i.x+h} ${a.y} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`),i.x>a.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,r.type===rn.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${o} ${i.x-h} ${a.y} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`),i.x===a.x&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.y<a.y&&(r.type===rn.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${l} ${a.x} ${i.y+h} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${o} ${i.x+h} ${a.y} L ${a.x} ${a.y}`),i.y>a.y&&(r.type===rn.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${l} ${i.x+h} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+f%i0)},"drawArrow"),ROe=v((t,e)=>{let r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(n=>{let i=e.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(a=>{LOe(r,e.get(a),i,e)})})},"drawArrows"),NOe=v((t,e)=>{let r=t.append("g");e.forEach((n,i)=>{let a=i%i0,s=Ts.get(n.name)?.pos;if(s===void 0)throw new Error(`Position not found for branch ${n.name}`);let o=r.append("line");o.attr("x1",0),o.attr("y1",s),o.attr("x2",Kh),o.attr("y2",s),o.attr("class","branch branch"+a),kr==="TB"?(o.attr("y1",wT),o.attr("x1",s),o.attr("y2",Kh),o.attr("x2",s)):kr==="BT"&&(o.attr("y1",Kh),o.attr("x1",s),o.attr("y2",wT),o.attr("x2",s)),kT.push(s);let l=n.name,u=Kle(l),h=r.insert("rect"),d=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);d.node().appendChild(u);let p=u.getBBox();h.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-p.width-4-(Go?.rotateCommitLabel===!0?30:0)).attr("y",-p.height/2+8).attr("width",p.width+18).attr("height",p.height+4),d.attr("transform","translate("+(-p.width-14-(Go?.rotateCommitLabel===!0?30:0))+", "+(s-p.height/2-1)+")"),kr==="TB"?(h.attr("x",s-p.width/2-10).attr("y",0),d.attr("transform","translate("+(s-p.width/2-5)+", 0)")):kr==="BT"?(h.attr("x",s-p.width/2-10).attr("y",Kh),d.attr("transform","translate("+(s-p.width/2-5)+", "+Kh+")")):h.attr("transform","translate(-19, "+(s-p.height/2)+")")})},"drawBranches"),IOe=v(function(t,e,r,n,i){return Ts.set(t,{pos:e,index:r}),e+=50+(i?40:0)+(kr==="TB"||kr==="BT"?n.width/2:0),e},"setBranchPosition"),MOe=v(function(t,e,r,n){if(gOe(),re.debug("in gitgraph renderer",t+`\n`,"id:",e,r),!Go)throw new Error("GitGraph config not found");let i=Go.rotateCommitLabel??!1,a=n.db;L2=a.getCommits();let s=a.getBranchesAsObjArray();kr=a.getDirection();let o=Ge(`[id="${e}"]`),l=0;s.forEach((u,h)=>{let f=Kle(u.name),d=o.append("g"),p=d.insert("g").attr("class","branchLabel"),g=p.insert("g").attr("class","label branch-label");g.node()?.appendChild(f);let m=f.getBBox();l=IOe(u.name,l,h,m,i),g.remove(),p.remove(),d.remove()}),Hle(o,L2,!1),Go.showBranches&&NOe(o,s),ROe(o,L2),Hle(o,L2,!0),Wt.insertTitle(o,"gitTitleText",Go.titleTopMargin??0,a.getDiagramTitle()),US(void 0,o,Go.diagramPadding,Go.useMaxWidth)},"draw"),DOe={draw:MOe},OOe=v(t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: \'trebuchet ms\', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map(e=>`\n .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${e} { fill: ${t["git"+e]}; }\n .arrow${e} { stroke: ${t["git"+e]}; }\n `).join(`\n`)}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`,"getStyles"),POe=OOe,BOe={parser:dOe,db:jle,renderer:DOe,styles:POe}});var ece=yi((_I,LI)=>{(function(t,e){typeof _I=="object"&&typeof LI<"u"?LI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=e()})(_I,function(){"use strict";var t="day";return function(e,r,n){var i=function(o){return o.add(4-o.isoWeekday(),t)},a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(o){if(!this.$utils().u(o))return this.add(7*(o-this.isoWeek()),t);var l,u,h,f,d=i(this),p=(l=this.isoWeekYear(),u=this.$u,h=(u?n.utc:n)().year(l).startOf("year"),f=4-h.isoWeekday(),h.isoWeekday()>4&&(f+=7),h.add(f,t));return d.diff(p,"week")+1},a.isoWeekday=function(o){return this.$utils().u(o)?this.day()||7:this.day(this.day()%7?o:o-7)};var s=a.startOf;a.startOf=function(o,l){var u=this.$utils(),h=!!u.u(l)||l;return u.p(o)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(o,l)}}})});var tce=yi((RI,NI)=>{(function(t,e){typeof RI=="object"&&typeof NI<"u"?NI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(RI,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\\d/,n=/\\d\\d/,i=/\\d\\d?/,a=/\\d*[^-_:/,()\\s\\d]+/,s={},o=function(g){return(g=+g)+(g>68?1900:2e3)},l=function(g){return function(m){this[g]=+m}},u=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(m){if(!m||m==="Z")return 0;var x=m.match(/([+-]|\\d\\d)/g),y=60*x[1]+(+x[2]||0);return y===0?0:x[0]==="+"?-y:y}(g)}],h=function(g){var m=s[g];return m&&(m.indexOf?m:m.s.concat(m.f))},f=function(g,m){var x,y=s.meridiem;if(y){for(var b=1;b<=24;b+=1)if(g.indexOf(y(b,0,m))>-1){x=b>12;break}}else x=g===(m?"pm":"PM");return x},d={A:[a,function(g){this.afternoon=f(g,!1)}],a:[a,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[n,function(g){this.milliseconds=10*+g}],SSS:[/\\d{3}/,function(g){this.milliseconds=+g}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[n,l("day")],Do:[a,function(g){var m=s.ordinal,x=g.match(/\\d+/);if(this.day=x[0],m)for(var y=1;y<=31;y+=1)m(y).replace(/\\[|\\]/g,"")===g&&(this.day=y)}],w:[i,l("week")],ww:[n,l("week")],M:[i,l("month")],MM:[n,l("month")],MMM:[a,function(g){var m=h("months"),x=(h("monthsShort")||m.map(function(y){return y.slice(0,3)})).indexOf(g)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[a,function(g){var m=h("months").indexOf(g)+1;if(m<1)throw new Error;this.month=m%12||m}],Y:[/[+-]?\\d+/,l("year")],YY:[n,function(g){this.year=o(g)}],YYYY:[/\\d{4}/,l("year")],Z:u,ZZ:u};function p(g){var m,x;m=g,x=s&&s.formats;for(var y=(g=m.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,C,M){var R=M&&M.toUpperCase();return C||x[M]||t[M]||x[R].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,function(T,I,A){return I||A.slice(1)})})).match(e),b=y.length,w=0;w<b;w+=1){var _=y[w],k=d[_],E=k&&k[0],L=k&&k[1];y[w]=L?{regex:E,parser:L}:_.replace(/^\\[|\\]$/g,"")}return function(S){for(var C={},M=0,R=0;M<b;M+=1){var T=y[M];if(typeof T=="string")R+=T.length;else{var I=T.regex,A=T.parser,D=S.slice(R),N=I.exec(D)[0];A.call(C,N),S=S.replace(N,"")}}return function(O){var B=O.afternoon;if(B!==void 0){var P=O.hours;B?P<12&&(O.hours+=12):P===12&&(O.hours=0),delete O.afternoon}}(C),C}}return function(g,m,x){x.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(o=g.parseTwoDigitYear);var y=m.prototype,b=y.parse;y.parse=function(w){var _=w.date,k=w.utc,E=w.args;this.$u=k;var L=E[1];if(typeof L=="string"){var S=E[2]===!0,C=E[3]===!0,M=S||C,R=E[2];C&&(R=E[2]),s=this.$locale(),!S&&R&&(s=x.Ls[R]),this.$d=function(D,N,O,B){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1e3:1)*D);var P=p(N)(D),$=P.year,z=P.month,H=P.day,Z=P.hours,X=P.minutes,ie=P.seconds,K=P.milliseconds,ee=P.zone,J=P.week,W=new Date,Y=H||($||z?1:W.getDate()),Q=$||W.getFullYear(),se=0;$&&!z||(se=z>0?z-1:W.getMonth());var ue,ce=Z||0,te=X||0,Le=ie||0,oe=K||0;return ee?new Date(Date.UTC(Q,se,Y,ce,te,Le,oe+60*ee.offset*1e3)):O?new Date(Date.UTC(Q,se,Y,ce,te,Le,oe)):(ue=new Date(Q,se,Y,ce,te,Le,oe),J&&(ue=B(ue).week(J).toDate()),ue)}catch{return new Date("")}}(_,L,k,x),this.init(),R&&R!==!0&&(this.$L=this.locale(R).$L),M&&_!=this.format(L)&&(this.$d=new Date("")),s={}}else if(L instanceof Array)for(var T=L.length,I=1;I<=T;I+=1){E[1]=L[I-1];var A=x.apply(this,E);if(A.isValid()){this.$d=A.$d,this.$L=A.$L,this.init();break}I===T&&(this.$d=new Date(""))}else b.call(this,w)}}})});var rce=yi((II,MI)=>{(function(t,e){typeof II=="object"&&typeof MI<"u"?MI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e()})(II,function(){"use strict";return function(t,e){var r=e.prototype,n=r.format;r.format=function(i){var a=this,s=this.$locale();if(!this.isValid())return n.bind(this)(i);var o=this.$utils(),l=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\\[([^\\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(u){switch(u){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return s.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return s.ordinal(a.week(),"W");case"w":case"ww":return o.s(a.week(),u==="w"?1:2,"0");case"W":case"WW":return o.s(a.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return o.s(String(a.$H===0?24:a.$H),u==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return u}});return n.bind(this)(l)}}})});var yce={};mr(yce,{diagram:()=>APe});function YI(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let a="^\\\\s*"+i+"\\\\s*$",s=new RegExp(a);t[0].match(s)&&(e[i]=!0,t.shift(1),n=!0)})}var sce,Js,oce,lce,cce,CT,DI,FOe,nce,Ac,FI,zI,$I,N2,I2,GI,UI,AT,hm,VI,uce,WI,M2,HI,qI,_T,OI,zOe,$Oe,GOe,UOe,VOe,WOe,HOe,qOe,YOe,XOe,jOe,KOe,ZOe,QOe,JOe,ePe,tPe,rPe,nPe,iPe,aPe,sPe,oPe,hce,lPe,cPe,uPe,fce,hPe,PI,dce,pce,ET,um,fPe,dPe,BI,ST,Ri,gce,pPe,s0,gPe,ice,mPe,mce,vPe,vce,yPe,xPe,bPe,wPe,ace,kPe,zu,TPe,EPe,SPe,CPe,APe,xce=F(()=>{xn();or();sce=ga(Q0(),1),Js=ga(Ux(),1),oce=ga(ece(),1),lce=ga(tce(),1),cce=ga(rce(),1),CT=ga(Ux(),1);lr();DI=function(){var t=v(function(I,A,D,N){for(D=D||{},N=I.length;N--;D[I[N]]=A);return D},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],a=[1,29],s=[1,30],o=[1,31],l=[1,32],u=[1,33],h=[1,34],f=[1,9],d=[1,10],p=[1,11],g=[1,12],m=[1,13],x=[1,14],y=[1,15],b=[1,16],w=[1,19],_=[1,20],k=[1,21],E=[1,22],L=[1,23],S=[1,25],C=[1,35],M={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:v(function(A,D,N,O,B,P,$){var z=P.length-1;switch(B){case 1:return P[z-1];case 2:this.$=[];break;case 3:P[z-1].push(P[z]),this.$=P[z-1];break;case 4:case 5:this.$=P[z];break;case 6:case 7:this.$=[];break;case 8:O.setWeekday("monday");break;case 9:O.setWeekday("tuesday");break;case 10:O.setWeekday("wednesday");break;case 11:O.setWeekday("thursday");break;case 12:O.setWeekday("friday");break;case 13:O.setWeekday("saturday");break;case 14:O.setWeekday("sunday");break;case 15:O.setWeekend("friday");break;case 16:O.setWeekend("saturday");break;case 17:O.setDateFormat(P[z].substr(11)),this.$=P[z].substr(11);break;case 18:O.enableInclusiveEndDates(),this.$=P[z].substr(18);break;case 19:O.TopAxis(),this.$=P[z].substr(8);break;case 20:O.setAxisFormat(P[z].substr(11)),this.$=P[z].substr(11);break;case 21:O.setTickInterval(P[z].substr(13)),this.$=P[z].substr(13);break;case 22:O.setExcludes(P[z].substr(9)),this.$=P[z].substr(9);break;case 23:O.setIncludes(P[z].substr(9)),this.$=P[z].substr(9);break;case 24:O.setTodayMarker(P[z].substr(12)),this.$=P[z].substr(12);break;case 27:O.setDiagramTitle(P[z].substr(6)),this.$=P[z].substr(6);break;case 28:this.$=P[z].trim(),O.setAccTitle(this.$);break;case 29:case 30:this.$=P[z].trim(),O.setAccDescription(this.$);break;case 31:O.addSection(P[z].substr(8)),this.$=P[z].substr(8);break;case 33:O.addTask(P[z-1],P[z]),this.$="task";break;case 34:this.$=P[z-1],O.setClickEvent(P[z-1],P[z],null);break;case 35:this.$=P[z-2],O.setClickEvent(P[z-2],P[z-1],P[z]);break;case 36:this.$=P[z-2],O.setClickEvent(P[z-2],P[z-1],null),O.setLink(P[z-2],P[z]);break;case 37:this.$=P[z-3],O.setClickEvent(P[z-3],P[z-2],P[z-1]),O.setLink(P[z-3],P[z]);break;case 38:this.$=P[z-2],O.setClickEvent(P[z-2],P[z],null),O.setLink(P[z-2],P[z-1]);break;case 39:this.$=P[z-3],O.setClickEvent(P[z-3],P[z-1],P[z]),O.setLink(P[z-3],P[z-2]);break;case 40:this.$=P[z-1],O.setLink(P[z-1],P[z]);break;case 41:case 47:this.$=P[z-1]+" "+P[z];break;case 42:case 43:case 45:this.$=P[z-2]+" "+P[z-1]+" "+P[z];break;case 44:case 46:this.$=P[z-3]+" "+P[z-2]+" "+P[z-1]+" "+P[z];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:g,26:m,27:x,28:y,29:b,30:w,31:_,33:k,35:E,36:L,37:24,38:S,40:C},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:g,26:m,27:x,28:y,29:b,30:w,31:_,33:k,35:E,36:L,37:24,38:S,40:C},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:v(function(A,D){if(D.recoverable)this.trace(A);else{var N=new Error(A);throw N.hash=D,N}},"parseError"),parse:v(function(A){var D=this,N=[0],O=[],B=[null],P=[],$=this.table,z="",H=0,Z=0,X=0,ie=2,K=1,ee=P.slice.call(arguments,1),J=Object.create(this.lexer),W={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(W.yy[Y]=this.yy[Y]);J.setInput(A,W.yy),W.yy.lexer=J,W.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Q=J.yylloc;P.push(Q);var se=J.options&&J.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(q){N.length=N.length-2*q,B.length=B.length-q,P.length=P.length-q}v(ue,"popStack");function ce(){var q;return q=O.pop()||J.lex()||K,typeof q!="number"&&(q instanceof Array&&(O=q,q=O.pop()),q=D.symbols_[q]||q),q}v(ce,"lex");for(var te,Le,oe,be,Fe,Be,Ve={},We,qe,Re,Me;;){if(oe=N[N.length-1],this.defaultActions[oe]?be=this.defaultActions[oe]:((te===null||typeof te>"u")&&(te=ce()),be=$[oe]&&$[oe][te]),typeof be>"u"||!be.length||!be[0]){var ye="";Me=[];for(We in $[oe])this.terminals_[We]&&We>ie&&Me.push("\'"+this.terminals_[We]+"\'");J.showPosition?ye="Parse error on line "+(H+1)+`:\n`+J.showPosition()+`\nExpecting `+Me.join(", ")+", got \'"+(this.terminals_[te]||te)+"\'":ye="Parse error on line "+(H+1)+": Unexpected "+(te==K?"end of input":"\'"+(this.terminals_[te]||te)+"\'"),this.parseError(ye,{text:J.match,token:this.terminals_[te]||te,line:J.yylineno,loc:Q,expected:Me})}if(be[0]instanceof Array&&be.length>1)throw new Error("Parse Error: multiple actions possible at state: "+oe+", token: "+te);switch(be[0]){case 1:N.push(te),B.push(J.yytext),P.push(J.yylloc),N.push(be[1]),te=null,Le?(te=Le,Le=null):(Z=J.yyleng,z=J.yytext,H=J.yylineno,Q=J.yylloc,X>0&&X--);break;case 2:if(qe=this.productions_[be[1]][1],Ve.$=B[B.length-qe],Ve._$={first_line:P[P.length-(qe||1)].first_line,last_line:P[P.length-1].last_line,first_column:P[P.length-(qe||1)].first_column,last_column:P[P.length-1].last_column},se&&(Ve._$.range=[P[P.length-(qe||1)].range[0],P[P.length-1].range[1]]),Be=this.performAction.apply(Ve,[z,Z,H,W.yy,be[1],B,P].concat(ee)),typeof Be<"u")return Be;qe&&(N=N.slice(0,-1*qe*2),B=B.slice(0,-1*qe),P=P.slice(0,-1*qe)),N.push(this.productions_[be[1]][0]),B.push(Ve.$),P.push(Ve._$),Re=$[N[N.length-2]][N[N.length-1]],N.push(Re);break;case 3:return!0}}return!0},"parse")},R=function(){var I={EOF:1,parseError:v(function(D,N){if(this.yy.parser)this.yy.parser.parseError(D,N);else throw new Error(D)},"parseError"),setInput:v(function(A,D){return this.yy=D||this.yy||{},this._input=A,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var D=A.match(/(?:\\r\\n?|\\n).*/g);return D?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),A},"input"),unput:v(function(A){var D=A.length,N=A.split(/(?:\\r\\n?|\\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var O=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),N.length-1&&(this.yylineno-=N.length-1);var B=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:N?(N.length===O.length?this.yylloc.first_column:0)+O[O.length-N.length].length-N[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(A){this.unput(this.match.slice(A))},"less"),pastInput:v(function(){var A=this.matched.substr(0,this.matched.length-this.match.length);return(A.length>20?"...":"")+A.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var A=this.match;return A.length<20&&(A+=this._input.substr(0,20-A.length)),(A.substr(0,20)+(A.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var A=this.pastInput(),D=new Array(A.length+1).join("-");return A+this.upcomingInput()+`\n`+D+"^"},"showPosition"),test_match:v(function(A,D){var N,O,B;if(this.options.backtrack_lexer&&(B={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(B.yylloc.range=this.yylloc.range.slice(0))),O=A[0].match(/(?:\\r\\n?|\\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+A[0].length},this.yytext+=A[0],this.match+=A[0],this.matches=A,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(A[0].length),this.matched+=A[0],N=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var P in B)this[P]=B[P];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,D,N,O;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),P=0;P<B.length;P++)if(N=this._input.match(this.rules[B[P]]),N&&(!D||N[0].length>D[0].length)){if(D=N,O=P,this.options.backtrack_lexer){if(A=this.test_match(N,B[P]),A!==!1)return A;if(this._backtrack){D=!1;continue}else return!1}else if(!this.options.flex)break}return D?(A=this.test_match(D,B[O]),A!==!1?A:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var D=this.next();return D||this.lex()},"lex"),begin:v(function(D){this.conditionStack.push(D)},"begin"),popState:v(function(){var D=this.conditionStack.length-1;return D>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(D){return D=this.conditionStack.length-1-Math.abs(D||0),D>=0?this.conditionStack[D]:"INITIAL"},"topState"),pushState:v(function(D){this.begin(D)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(D,N,O,B){var P=B;switch(O){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\\{)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:%%(?!\\{)*[^\\n]*)/i,/^(?:[^\\}]%%*[^\\n]*)/i,/^(?:%%*[^\\n]*[\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:%[^\\n]*)/i,/^(?:href[\\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\\s]+)/i,/^(?:\\([\\s]*\\))/i,/^(?:\\()/i,/^(?:[^(]*)/i,/^(?:\\))/i,/^(?:[^)]*)/i,/^(?:click[\\s]+)/i,/^(?:[\\s\\n])/i,/^(?:[^\\s\\n]*)/i,/^(?:gantt\\b)/i,/^(?:dateFormat\\s[^#\\n;]+)/i,/^(?:inclusiveEndDates\\b)/i,/^(?:topAxis\\b)/i,/^(?:axisFormat\\s[^#\\n;]+)/i,/^(?:tickInterval\\s[^#\\n;]+)/i,/^(?:includes\\s[^#\\n;]+)/i,/^(?:excludes\\s[^#\\n;]+)/i,/^(?:todayMarker\\s[^\\n;]+)/i,/^(?:weekday\\s+monday\\b)/i,/^(?:weekday\\s+tuesday\\b)/i,/^(?:weekday\\s+wednesday\\b)/i,/^(?:weekday\\s+thursday\\b)/i,/^(?:weekday\\s+friday\\b)/i,/^(?:weekday\\s+saturday\\b)/i,/^(?:weekday\\s+sunday\\b)/i,/^(?:weekend\\s+friday\\b)/i,/^(?:weekend\\s+saturday\\b)/i,/^(?:\\d\\d\\d\\d-\\d\\d-\\d\\d\\b)/i,/^(?:title\\s[^\\n]+)/i,/^(?:accDescription\\s[^#\\n;]+)/i,/^(?:section\\s[^\\n]+)/i,/^(?:[^:\\n]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return I}();M.lexer=R;function T(){this.yy={}}return v(T,"Parser"),T.prototype=M,M.Parser=T,new T}();DI.parser=DI;FOe=DI;Js.default.extend(oce.default);Js.default.extend(lce.default);Js.default.extend(cce.default);nce={friday:5,saturday:6},Ac="",FI="",zI=void 0,$I="",N2=[],I2=[],GI=new Map,UI=[],AT=[],hm="",VI="",uce=["active","done","crit","milestone"],WI=[],M2=!1,HI=!1,qI="sunday",_T="saturday",OI=0,zOe=v(function(){UI=[],AT=[],hm="",WI=[],ET=0,BI=void 0,ST=void 0,Ri=[],Ac="",FI="",VI="",zI=void 0,$I="",N2=[],I2=[],M2=!1,HI=!1,OI=0,GI=new Map,xr(),qI="sunday",_T="saturday"},"clear"),$Oe=v(function(t){FI=t},"setAxisFormat"),GOe=v(function(){return FI},"getAxisFormat"),UOe=v(function(t){zI=t},"setTickInterval"),VOe=v(function(){return zI},"getTickInterval"),WOe=v(function(t){$I=t},"setTodayMarker"),HOe=v(function(){return $I},"getTodayMarker"),qOe=v(function(t){Ac=t},"setDateFormat"),YOe=v(function(){M2=!0},"enableInclusiveEndDates"),XOe=v(function(){return M2},"endDatesAreInclusive"),jOe=v(function(){HI=!0},"enableTopAxis"),KOe=v(function(){return HI},"topAxisEnabled"),ZOe=v(function(t){VI=t},"setDisplayMode"),QOe=v(function(){return VI},"getDisplayMode"),JOe=v(function(){return Ac},"getDateFormat"),ePe=v(function(t){N2=t.toLowerCase().split(/[\\s,]+/)},"setIncludes"),tPe=v(function(){return N2},"getIncludes"),rPe=v(function(t){I2=t.toLowerCase().split(/[\\s,]+/)},"setExcludes"),nPe=v(function(){return I2},"getExcludes"),iPe=v(function(){return GI},"getLinks"),aPe=v(function(t){hm=t,UI.push(t)},"addSection"),sPe=v(function(){return UI},"getSections"),oPe=v(function(){let t=ice(),e=10,r=0;for(;!t&&r<e;)t=ice(),r++;return AT=Ri,AT},"getTasks"),hce=v(function(t,e,r,n){return n.includes(t.format(e.trim()))?!1:r.includes("weekends")&&(t.isoWeekday()===nce[_T]||t.isoWeekday()===nce[_T]+1)||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(t.format(e.trim()))},"isInvalidDate"),lPe=v(function(t){qI=t},"setWeekday"),cPe=v(function(){return qI},"getWeekday"),uPe=v(function(t){_T=t},"setWeekend"),fce=v(function(t,e,r,n){if(!r.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=(0,Js.default)(t.startTime):i=(0,Js.default)(t.startTime,e,!0),i=i.add(1,"d");let a;t.endTime instanceof Date?a=(0,Js.default)(t.endTime):a=(0,Js.default)(t.endTime,e,!0);let[s,o]=hPe(i,a,e,r,n);t.endTime=s.toDate(),t.renderEndTime=o},"checkTaskDates"),hPe=v(function(t,e,r,n,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),a=hce(t,r,n,i),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),PI=v(function(t,e,r){r=r.trim();let i=/^after\\s+(?<ids>[\\d\\w- ]+)/.exec(r);if(i!==null){let s=null;for(let l of i.groups.ids.split(" ")){let u=s0(l);u!==void 0&&(!s||u.endTime>s.endTime)&&(s=u)}if(s)return s.endTime;let o=new Date;return o.setHours(0,0,0,0),o}let a=(0,Js.default)(r,e.trim(),!0);if(a.isValid())return a.toDate();{re.debug("Invalid date:"+r),re.debug("With date format:"+e.trim());let s=new Date(r);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+r);return s}},"getStartDate"),dce=v(function(t){let e=/^(\\d+(?:\\.\\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),pce=v(function(t,e,r,n=!1){r=r.trim();let a=/^until\\s+(?<ids>[\\d\\w- ]+)/.exec(r);if(a!==null){let h=null;for(let d of a.groups.ids.split(" ")){let p=s0(d);p!==void 0&&(!h||p.startTime<h.startTime)&&(h=p)}if(h)return h.startTime;let f=new Date;return f.setHours(0,0,0,0),f}let s=(0,Js.default)(r,e.trim(),!0);if(s.isValid())return n&&(s=s.add(1,"d")),s.toDate();let o=(0,Js.default)(t),[l,u]=dce(r);if(!Number.isNaN(l)){let h=o.add(l,u);h.isValid()&&(o=h)}return o.toDate()},"getEndDate"),ET=0,um=v(function(t){return t===void 0?(ET=ET+1,"task"+ET):t},"parseId"),fPe=v(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;let n=r.split(","),i={};YI(n,i,uce);for(let s=0;s<n.length;s++)n[s]=n[s].trim();let a="";switch(n.length){case 1:i.id=um(),i.startTime=t.endTime,a=n[0];break;case 2:i.id=um(),i.startTime=PI(void 0,Ac,n[0]),a=n[1];break;case 3:i.id=um(n[0]),i.startTime=PI(void 0,Ac,n[1]),a=n[2];break;default:}return a&&(i.endTime=pce(i.startTime,Ac,a,M2),i.manualEndTime=(0,Js.default)(a,"YYYY-MM-DD",!0).isValid(),fce(i,Ac,I2,N2)),i},"compileData"),dPe=v(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;let n=r.split(","),i={};YI(n,i,uce);for(let a=0;a<n.length;a++)n[a]=n[a].trim();switch(n.length){case 1:i.id=um(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:n[0]};break;case 2:i.id=um(),i.startTime={type:"getStartDate",startData:n[0]},i.endTime={data:n[1]};break;case 3:i.id=um(n[0]),i.startTime={type:"getStartDate",startData:n[1]},i.endTime={data:n[2]};break;default:}return i},"parseData"),Ri=[],gce={},pPe=v(function(t,e){let r={section:hm,type:hm,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},n=dPe(ST,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=ST,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.order=OI,OI++;let i=Ri.push(r);ST=r.id,gce[r.id]=i-1},"addTask"),s0=v(function(t){let e=gce[t];return Ri[e]},"findTaskById"),gPe=v(function(t,e){let r={section:hm,type:hm,description:t,task:t,classes:[]},n=fPe(BI,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,BI=r,AT.push(r)},"addTaskOrg"),ice=v(function(){let t=v(function(r){let n=Ri[r],i="";switch(Ri[r].raw.startTime.type){case"prevTaskEnd":{let a=s0(n.prevTaskId);n.startTime=a.endTime;break}case"getStartDate":i=PI(void 0,Ac,Ri[r].raw.startTime.startData),i&&(Ri[r].startTime=i);break}return Ri[r].startTime&&(Ri[r].endTime=pce(Ri[r].startTime,Ac,Ri[r].raw.endTime.data,M2),Ri[r].endTime&&(Ri[r].processed=!0,Ri[r].manualEndTime=(0,Js.default)(Ri[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),fce(Ri[r],Ac,I2,N2))),Ri[r].processed},"compileTask"),e=!0;for(let[r,n]of Ri.entries())t(r),e=e&&n.processed;return e},"compileTasks"),mPe=v(function(t,e){let r=e;pe().securityLevel!=="loose"&&(r=(0,sce.sanitizeUrl)(e)),t.split(",").forEach(function(n){s0(n)!==void 0&&(vce(n,()=>{window.open(r,"_self")}),GI.set(n,r))}),mce(t,"clickable")},"setLink"),mce=v(function(t,e){t.split(",").forEach(function(r){let n=s0(r);n!==void 0&&n.classes.push(e)})},"setClass"),vPe=v(function(t,e,r){if(pe().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a<n.length;a++){let s=n[a].trim();s.startsWith(\'"\')&&s.endsWith(\'"\')&&(s=s.substr(1,s.length-2)),n[a]=s}}n.length===0&&n.push(t),s0(t)!==void 0&&vce(t,()=>{Wt.runFunc(e,...n)})},"setClickFun"),vce=v(function(t,e){WI.push(function(){let r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){let r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},"pushFun"),yPe=v(function(t,e,r){t.split(",").forEach(function(n){vPe(n,e,r)}),mce(t,"clickable")},"setClickEvent"),xPe=v(function(t){WI.forEach(function(e){e(t)})},"bindFunctions"),bPe={getConfig:v(()=>pe().gantt,"getConfig"),clear:zOe,setDateFormat:qOe,getDateFormat:JOe,enableInclusiveEndDates:YOe,endDatesAreInclusive:XOe,enableTopAxis:jOe,topAxisEnabled:KOe,setAxisFormat:$Oe,getAxisFormat:GOe,setTickInterval:UOe,getTickInterval:VOe,setTodayMarker:WOe,getTodayMarker:HOe,setAccTitle:Tr,getAccTitle:Ar,setDiagramTitle:en,getDiagramTitle:Hr,setDisplayMode:ZOe,getDisplayMode:QOe,setAccDescription:_r,getAccDescription:Lr,addSection:aPe,getSections:sPe,getTasks:oPe,addTask:pPe,findTaskById:s0,addTaskOrg:gPe,setIncludes:ePe,getIncludes:tPe,setExcludes:rPe,getExcludes:nPe,setClickEvent:yPe,setLink:mPe,getLinks:iPe,bindFunctions:xPe,parseDuration:dce,isInvalidDate:hce,setWeekday:lPe,getWeekday:cPe,setWeekend:uPe};v(YI,"getTaskTags");wPe=v(function(){re.debug("Something is calling, setConf, remove the call")},"setConf"),ace={monday:hh,tuesday:V4,wednesday:W4,thursday:Zl,friday:H4,saturday:q4,sunday:sl},kPe=v((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),i=0;for(let a of n)for(let s=0;s<r.length;s++)if(a.startTime>=r[s]){r[s]=a.endTime,a.order=s+e,s>i&&(i=s);break}return i},"getMaxIntersections"),TPe=v(function(t,e,r,n){let i=pe().gantt,a=pe().securityLevel,s;a==="sandbox"&&(s=Ge("#i"+e));let o=a==="sandbox"?Ge(s.nodes()[0].contentDocument.body):Ge("body"),l=a==="sandbox"?s.nodes()[0].contentDocument:document,u=l.getElementById(e);zu=u.parentElement.offsetWidth,zu===void 0&&(zu=1200),i.useWidth!==void 0&&(zu=i.useWidth);let h=n.db.getTasks(),f=[];for(let S of h)f.push(S.type);f=L(f);let d={},p=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let S={};for(let M of h)S[M.section]===void 0?S[M.section]=[M]:S[M.section].push(M);let C=0;for(let M of Object.keys(S)){let R=kPe(S[M],C)+1;C+=R,p+=R*(i.barHeight+i.barGap),d[M]=R}}else{p+=h.length*(i.barHeight+i.barGap);for(let S of f)d[S]=h.filter(C=>C.type===S).length}u.setAttribute("viewBox","0 0 "+zu+" "+p);let g=o.select(`[id="${e}"]`),m=j4().domain([t4(h,function(S){return S.startTime}),e4(h,function(S){return S.endTime})]).rangeRound([0,zu-i.leftPadding-i.rightPadding]);function x(S,C){let M=S.startTime,R=C.startTime,T=0;return M>R?T=1:M<R&&(T=-1),T}v(x,"taskCompare"),h.sort(x),y(h,zu,p),Wr(g,p,zu,i.useMaxWidth),g.append("text").text(n.db.getDiagramTitle()).attr("x",zu/2).attr("y",i.titleTopMargin).attr("class","titleText");function y(S,C,M){let R=i.barHeight,T=R+i.barGap,I=i.topPadding,A=i.leftPadding,D=al().domain([0,f.length]).range(["#00B9FA","#F95002"]).interpolate(h7);w(T,I,A,C,M,S,n.db.getExcludes(),n.db.getIncludes()),_(A,I,C,M),b(S,T,I,A,R,D,C,M),k(T,I,A,R,D),E(A,I,C,M)}v(y,"makeGantt");function b(S,C,M,R,T,I,A){let N=[...new Set(S.map($=>$.order))].map($=>S.find(z=>z.order===$));g.append("g").selectAll("rect").data(N).enter().append("rect").attr("x",0).attr("y",function($,z){return z=$.order,z*C+M-2}).attr("width",function(){return A-i.rightPadding/2}).attr("height",C).attr("class",function($){for(let[z,H]of f.entries())if($.type===H)return"section section"+z%i.numberSectionStyles;return"section section0"});let O=g.append("g").selectAll("rect").data(S).enter(),B=n.db.getLinks();if(O.append("rect").attr("id",function($){return $.id}).attr("rx",3).attr("ry",3).attr("x",function($){return $.milestone?m($.startTime)+R+.5*(m($.endTime)-m($.startTime))-.5*T:m($.startTime)+R}).attr("y",function($,z){return z=$.order,z*C+M}).attr("width",function($){return $.milestone?T:m($.renderEndTime||$.endTime)-m($.startTime)}).attr("height",T).attr("transform-origin",function($,z){return z=$.order,(m($.startTime)+R+.5*(m($.endTime)-m($.startTime))).toString()+"px "+(z*C+M+.5*T).toString()+"px"}).attr("class",function($){let z="task",H="";$.classes.length>0&&(H=$.classes.join(" "));let Z=0;for(let[ie,K]of f.entries())$.type===K&&(Z=ie%i.numberSectionStyles);let X="";return $.active?$.crit?X+=" activeCrit":X=" active":$.done?$.crit?X=" doneCrit":X=" done":$.crit&&(X+=" crit"),X.length===0&&(X=" task"),$.milestone&&(X=" milestone "+X),X+=Z,X+=" "+H,z+X}),O.append("text").attr("id",function($){return $.id+"-text"}).text(function($){return $.task}).attr("font-size",i.fontSize).attr("x",function($){let z=m($.startTime),H=m($.renderEndTime||$.endTime);$.milestone&&(z+=.5*(m($.endTime)-m($.startTime))-.5*T),$.milestone&&(H=z+T);let Z=this.getBBox().width;return Z>H-z?H+Z+1.5*i.leftPadding>A?z+R-5:H+R+5:(H-z)/2+z+R}).attr("y",function($,z){return z=$.order,z*C+i.barHeight/2+(i.fontSize/2-2)+M}).attr("text-height",T).attr("class",function($){let z=m($.startTime),H=m($.endTime);$.milestone&&(H=z+T);let Z=this.getBBox().width,X="";$.classes.length>0&&(X=$.classes.join(" "));let ie=0;for(let[ee,J]of f.entries())$.type===J&&(ie=ee%i.numberSectionStyles);let K="";return $.active&&($.crit?K="activeCritText"+ie:K="activeText"+ie),$.done?$.crit?K=K+" doneCritText"+ie:K=K+" doneText"+ie:$.crit&&(K=K+" critText"+ie),$.milestone&&(K+=" milestoneText"),Z>H-z?H+Z+1.5*i.leftPadding>A?X+" taskTextOutsideLeft taskTextOutside"+ie+" "+K:X+" taskTextOutsideRight taskTextOutside"+ie+" "+K+" width-"+Z:X+" taskText taskText"+ie+" "+K+" width-"+Z}),pe().securityLevel==="sandbox"){let $;$=Ge("#i"+e);let z=$.nodes()[0].contentDocument;O.filter(function(H){return B.has(H.id)}).each(function(H){var Z=z.querySelector("#"+H.id),X=z.querySelector("#"+H.id+"-text");let ie=Z.parentNode;var K=z.createElement("a");K.setAttribute("xlink:href",B.get(H.id)),K.setAttribute("target","_top"),ie.appendChild(K),K.appendChild(Z),K.appendChild(X)})}}v(b,"drawRects");function w(S,C,M,R,T,I,A,D){if(A.length===0&&D.length===0)return;let N,O;for(let{startTime:Z,endTime:X}of I)(N===void 0||Z<N)&&(N=Z),(O===void 0||X>O)&&(O=X);if(!N||!O)return;if((0,CT.default)(O).diff((0,CT.default)(N),"year")>5){re.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let B=n.db.getDateFormat(),P=[],$=null,z=(0,CT.default)(N);for(;z.valueOf()<=O;)n.db.isInvalidDate(z,B,A,D)?$?$.end=z:$={start:z,end:z}:$&&(P.push($),$=null),z=z.add(1,"d");g.append("g").selectAll("rect").data(P).enter().append("rect").attr("id",function(Z){return"exclude-"+Z.start.format("YYYY-MM-DD")}).attr("x",function(Z){return m(Z.start)+M}).attr("y",i.gridLineStartPadding).attr("width",function(Z){let X=Z.end.add(1,"day");return m(X)-m(Z.start)}).attr("height",T-C-i.gridLineStartPadding).attr("transform-origin",function(Z,X){return(m(Z.start)+M+.5*(m(Z.end)-m(Z.start))).toString()+"px "+(X*S+.5*T).toString()+"px"}).attr("class","exclude-range")}v(w,"drawExcludeDays");function _(S,C,M,R){let T=RC(m).tickSize(-R+C+i.gridLineStartPadding).tickFormat(Jf(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d")),A=/^([1-9]\\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(A!==null){let D=A[1],N=A[2],O=n.db.getWeekday()||i.weekday;switch(N){case"millisecond":T.ticks(jl.every(D));break;case"second":T.ticks(Ps.every(D));break;case"minute":T.ticks(au.every(D));break;case"hour":T.ticks(su.every(D));break;case"day":T.ticks(po.every(D));break;case"week":T.ticks(ace[O].every(D));break;case"month":T.ticks(ou.every(D));break}}if(g.append("g").attr("class","grid").attr("transform","translate("+S+", "+(R-50)+")").call(T).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let D=LC(m).tickSize(-R+C+i.gridLineStartPadding).tickFormat(Jf(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(A!==null){let N=A[1],O=A[2],B=n.db.getWeekday()||i.weekday;switch(O){case"millisecond":D.ticks(jl.every(N));break;case"second":D.ticks(Ps.every(N));break;case"minute":D.ticks(au.every(N));break;case"hour":D.ticks(su.every(N));break;case"day":D.ticks(po.every(N));break;case"week":D.ticks(ace[B].every(N));break;case"month":D.ticks(ou.every(N));break}}g.append("g").attr("class","grid").attr("transform","translate("+S+", "+C+")").call(D).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}v(_,"makeGrid");function k(S,C){let M=0,R=Object.keys(d).map(T=>[T,d[T]]);g.append("g").selectAll("text").data(R).enter().append(function(T){let I=T[0].split(je.lineBreakRegex),A=-(I.length-1)/2,D=l.createElementNS("http://www.w3.org/2000/svg","text");D.setAttribute("dy",A+"em");for(let[N,O]of I.entries()){let B=l.createElementNS("http://www.w3.org/2000/svg","tspan");B.setAttribute("alignment-baseline","central"),B.setAttribute("x","10"),N>0&&B.setAttribute("dy","1em"),B.textContent=O,D.appendChild(B)}return D}).attr("x",10).attr("y",function(T,I){if(I>0)for(let A=0;A<I;A++)return M+=R[I-1][1],T[1]*S/2+M*S+C;else return T[1]*S/2+C}).attr("font-size",i.sectionFontSize).attr("class",function(T){for(let[I,A]of f.entries())if(T[0]===A)return"sectionTitle sectionTitle"+I%i.numberSectionStyles;return"sectionTitle"})}v(k,"vertLabels");function E(S,C,M,R){let T=n.db.getTodayMarker();if(T==="off")return;let I=g.append("g").attr("class","today"),A=new Date,D=I.append("line");D.attr("x1",m(A)+S).attr("x2",m(A)+S).attr("y1",i.titleTopMargin).attr("y2",R-i.titleTopMargin).attr("class","today"),T!==""&&D.attr("style",T.replace(/,/g,";"))}v(E,"drawToday");function L(S){let C={},M=[];for(let R=0,T=S.length;R<T;++R)Object.prototype.hasOwnProperty.call(C,S[R])||(C[S[R]]=!0,M.push(S[R]));return M}v(L,"checkUnique")},"draw"),EPe={setConf:wPe,draw:TPe},SPe=v(t=>`\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n`,"getStyles"),CPe=SPe,APe={parser:FOe,db:bPe,renderer:EPe,styles:CPe}});var bce={};mr(bce,{diagram:()=>DPe});var _Pe,LPe,RPe,NPe,IPe,MPe,DPe,wce=F(()=>{i9();ku();or();cm();_Pe={parse:v(async t=>{let e=await Sl("info",t);re.debug(e)},"parse")},LPe={version:Qv},RPe=v(()=>LPe.version,"getVersion"),NPe={getVersion:RPe},IPe=v((t,e,r)=>{re.debug(`rendering info diagram\n`+t);let n=ka(e);Wr(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),MPe={draw:IPe},DPe={parser:_Pe,db:NPe,renderer:MPe}});var Ece={};mr(Ece,{diagram:()=>jPe});var kce,XI,LT,jI,OPe,PPe,BPe,FPe,zPe,$Pe,GPe,Tce,UPe,VPe,WPe,HPe,qPe,YPe,XPe,jPe,Sce=F(()=>{oy();xn();ku();or();cm();lr();kce=sr.pie,XI={sections:new Map,showData:!1,config:kce},LT=XI.sections,jI=XI.showData,OPe=structuredClone(kce),PPe=v(()=>structuredClone(OPe),"getConfig"),BPe=v(()=>{LT=new Map,jI=XI.showData,xr()},"clear"),FPe=v(({label:t,value:e})=>{LT.has(t)||(LT.set(t,e),re.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),zPe=v(()=>LT,"getSections"),$Pe=v(t=>{jI=t},"setShowData"),GPe=v(()=>jI,"getShowData"),Tce={getConfig:PPe,clear:BPe,setDiagramTitle:en,getDiagramTitle:Hr,setAccTitle:Tr,getAccTitle:Ar,setAccDescription:_r,getAccDescription:Lr,addSection:FPe,getSections:zPe,setShowData:$Pe,getShowData:GPe},UPe=v((t,e)=>{Cu(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),VPe={parse:v(async t=>{let e=await Sl("pie",t);re.debug(e),UPe(e,Tce)},"parse")},WPe=v(t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`,"getStyles"),HPe=WPe,qPe=v(t=>{let e=[...t.entries()].map(n=>({label:n[0],value:n[1]})).sort((n,i)=>i.value-n.value);return l8().value(n=>n.value)(e)},"createPieArcs"),YPe=v((t,e,r,n)=>{re.debug(`rendering pie chart\n`+t);let i=n.db,a=pe(),s=hs(i.getConfig(),a.pie),o=40,l=18,u=4,h=450,f=h,d=ka(e),p=d.append("g");p.attr("transform","translate("+f/2+","+h/2+")");let{themeVariables:g}=a,[m]=To(g.pieOuterStrokeWidth);m??=2;let x=s.textPosition,y=Math.min(f,h)/2-o,b=Ql().innerRadius(0).outerRadius(y),w=Ql().innerRadius(y*x).outerRadius(y*x);p.append("circle").attr("cx",0).attr("cy",0).attr("r",y+m/2).attr("class","pieOuterCircle");let _=i.getSections(),k=qPe(_),E=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],L=nu(E);p.selectAll("mySlices").data(k).enter().append("path").attr("d",b).attr("fill",T=>L(T.data.label)).attr("class","pieCircle");let S=0;_.forEach(T=>{S+=T}),p.selectAll("mySlices").data(k).enter().append("text").text(T=>(T.data.value/S*100).toFixed(0)+"%").attr("transform",T=>"translate("+w.centroid(T)+")").style("text-anchor","middle").attr("class","slice"),p.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(h-50)/2).attr("class","pieTitleText");let C=p.selectAll(".legend").data(L.domain()).enter().append("g").attr("class","legend").attr("transform",(T,I)=>{let A=l+u,D=A*L.domain().length/2,N=12*l,O=I*A-D;return"translate("+N+","+O+")"});C.append("rect").attr("width",l).attr("height",l).style("fill",L).style("stroke",L),C.data(k).append("text").attr("x",l+u).attr("y",l-u).text(T=>{let{label:I,value:A}=T.data;return i.getShowData()?`${I} [${A}]`:I});let M=Math.max(...C.selectAll("text").nodes().map(T=>T?.getBoundingClientRect().width??0)),R=f+o+l+u+M;d.attr("viewBox",`0 0 ${R} ${h}`),Wr(d,h,R,s.useMaxWidth)},"draw"),XPe={draw:YPe},jPe={parser:VPe,db:Tce,renderer:XPe,styles:HPe}});var Gce={};mr(Gce,{diagram:()=>nBe});function ZI(t){return!/^#?([\\dA-Fa-f]{6}|[\\dA-Fa-f]{3})$/.test(t)}function Cce(t){return!/^\\d+$/.test(t)}function Ace(t){return!/^\\d+px$/.test(t)}function _c(t){return yr(t.trim(),QPe)}function _ce(t){ca.setData({quadrant1Text:_c(t.text)})}function Lce(t){ca.setData({quadrant2Text:_c(t.text)})}function Rce(t){ca.setData({quadrant3Text:_c(t.text)})}function Nce(t){ca.setData({quadrant4Text:_c(t.text)})}function Ice(t){ca.setData({xAxisLeftText:_c(t.text)})}function Mce(t){ca.setData({xAxisRightText:_c(t.text)})}function Dce(t){ca.setData({yAxisTopText:_c(t.text)})}function Oce(t){ca.setData({yAxisBottomText:_c(t.text)})}function NT(t){let e={};for(let r of t){let[n,i]=r.trim().split(/\\s*:\\s*/);if(n==="radius"){if(Cce(i))throw new RT(n,i,"number");e.radius=parseInt(i)}else if(n==="color"){if(ZI(i))throw new RT(n,i,"hex code");e.color=i}else if(n==="stroke-color"){if(ZI(i))throw new RT(n,i,"hex code");e.strokeColor=i}else if(n==="stroke-width"){if(Ace(i))throw new RT(n,i,"number of pixels (eg. 10px)");e.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return e}function Pce(t,e,r,n,i){let a=NT(i);ca.addPoints([{x:r,y:n,text:_c(t.text),className:e,...a}])}function Bce(t,e){ca.addClass(t,NT(e))}function Fce(t){ca.setConfig({chartWidth:t})}function zce(t){ca.setConfig({chartHeight:t})}function $ce(){let t=pe(),{themeVariables:e,quadrantChart:r}=t;return r&&ca.setConfig(r),ca.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),ca.setData({titleText:Hr()}),ca.build()}var KI,KPe,Za,ZPe,RT,QPe,ca,JPe,eBe,tBe,rBe,nBe,Uce=F(()=>{or();lr();lr();KI=function(){var t=v(function(ke,j,me,Se){for(me=me||{},Se=ke.length;Se--;me[ke[Se]]=j);return me},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[1,7],s=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],h=[1,37],f=[1,36],d=[1,38],p=[1,35],g=[1,43],m=[1,41],x=[1,14],y=[1,23],b=[1,18],w=[1,19],_=[1,20],k=[1,21],E=[1,22],L=[1,24],S=[1,25],C=[1,26],M=[1,27],R=[1,28],T=[1,29],I=[1,32],A=[1,33],D=[1,34],N=[1,39],O=[1,40],B=[1,42],P=[1,44],$=[1,62],z=[1,61],H=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Z=[1,65],X=[1,66],ie=[1,67],K=[1,68],ee=[1,69],J=[1,70],W=[1,71],Y=[1,72],Q=[1,73],se=[1,74],ue=[1,75],ce=[1,76],te=[4,5,6,7,8,9,10,11,12,13,14,15,18],Le=[1,90],oe=[1,91],be=[1,92],Fe=[1,99],Be=[1,93],Ve=[1,96],We=[1,94],qe=[1,95],Re=[1,97],Me=[1,98],ye=[1,102],q=[10,55,56,57],de=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ae={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:v(function(j,me,Se,Pe,Ie,ge,ze){var Ae=ge.length-1;switch(Ie){case 23:this.$=ge[Ae];break;case 24:this.$=ge[Ae-1]+""+ge[Ae];break;case 26:this.$=ge[Ae-1]+ge[Ae];break;case 27:this.$=[ge[Ae].trim()];break;case 28:ge[Ae-2].push(ge[Ae].trim()),this.$=ge[Ae-2];break;case 29:this.$=ge[Ae-4],Pe.addClass(ge[Ae-2],ge[Ae]);break;case 37:this.$=[];break;case 42:this.$=ge[Ae].trim(),Pe.setDiagramTitle(this.$);break;case 43:this.$=ge[Ae].trim(),Pe.setAccTitle(this.$);break;case 44:case 45:this.$=ge[Ae].trim(),Pe.setAccDescription(this.$);break;case 46:Pe.addSection(ge[Ae].substr(8)),this.$=ge[Ae].substr(8);break;case 47:Pe.addPoint(ge[Ae-3],"",ge[Ae-1],ge[Ae],[]);break;case 48:Pe.addPoint(ge[Ae-4],ge[Ae-3],ge[Ae-1],ge[Ae],[]);break;case 49:Pe.addPoint(ge[Ae-4],"",ge[Ae-2],ge[Ae-1],ge[Ae]);break;case 50:Pe.addPoint(ge[Ae-5],ge[Ae-4],ge[Ae-2],ge[Ae-1],ge[Ae]);break;case 51:Pe.setXAxisLeftText(ge[Ae-2]),Pe.setXAxisRightText(ge[Ae]);break;case 52:ge[Ae-1].text+=" \\u27F6 ",Pe.setXAxisLeftText(ge[Ae-1]);break;case 53:Pe.setXAxisLeftText(ge[Ae]);break;case 54:Pe.setYAxisBottomText(ge[Ae-2]),Pe.setYAxisTopText(ge[Ae]);break;case 55:ge[Ae-1].text+=" \\u27F6 ",Pe.setYAxisBottomText(ge[Ae-1]);break;case 56:Pe.setYAxisBottomText(ge[Ae]);break;case 57:Pe.setQuadrant1Text(ge[Ae]);break;case 58:Pe.setQuadrant2Text(ge[Ae]);break;case 59:Pe.setQuadrant3Text(ge[Ae]);break;case 60:Pe.setQuadrant4Text(ge[Ae]);break;case 64:this.$={text:ge[Ae],type:"text"};break;case 65:this.$={text:ge[Ae-1].text+""+ge[Ae],type:ge[Ae-1].type};break;case 66:this.$={text:ge[Ae],type:"text"};break;case 67:this.$={text:ge[Ae],type:"markdown"};break;case 68:this.$=ge[Ae];break;case 69:this.$=ge[Ae-1]+""+ge[Ae];break}},"anonymous"),table:[{18:e,26:1,27:2,28:r,55:n,56:i,57:a},{1:[3]},{18:e,26:8,27:2,28:r,55:n,56:i,57:a},{18:e,26:9,27:2,28:r,55:n,56:i,57:a},t(s,[2,33],{29:10}),t(o,[2,61]),t(o,[2,62]),t(o,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:h,5:f,10:d,12:p,13:g,14:m,18:x,25:y,35:b,37:w,39:_,41:k,42:E,48:L,50:S,51:C,52:M,53:R,54:T,60:I,61:A,63:D,64:N,65:O,66:B,67:P}),t(s,[2,34]),{27:45,55:n,56:i,57:a},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:h,5:f,10:d,12:p,13:g,14:m,18:x,25:y,35:b,37:w,39:_,41:k,42:E,48:L,50:S,51:C,52:M,53:R,54:T,60:I,61:A,63:D,64:N,65:O,66:B,67:P}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(l,[2,45]),t(l,[2,46]),{18:[1,50]},{4:h,5:f,10:d,12:p,13:g,14:m,43:51,58:31,60:I,61:A,63:D,64:N,65:O,66:B,67:P},{4:h,5:f,10:d,12:p,13:g,14:m,43:52,58:31,60:I,61:A,63:D,64:N,65:O,66:B,67:P},{4:h,5:f,10:d,12:p,13:g,14:m,43:53,58:31,60:I,61:A,63:D,64:N,65:O,66:B,67:P},{4:h,5:f,10:d,12:p,13:g,14:m,43:54,58:31,60:I,61:A,63:D,64:N,65:O,66:B,67:P},{4:h,5:f,10:d,12:p,13:g,14:m,43:55,58:31,60:I,61:A,63:D,64:N,65:O,66:B,67:P},{4:h,5:f,10:d,12:p,13:g,14:m,43:56,58:31,60:I,61:A,63:D,64:N,65:O,66:B,67:P},{4:h,5:f,8:$,10:d,12:p,13:g,14:m,18:z,44:[1,57],47:[1,58],58:60,59:59,63:D,64:N,65:O,66:B,67:P},t(H,[2,64]),t(H,[2,66]),t(H,[2,67]),t(H,[2,70]),t(H,[2,71]),t(H,[2,72]),t(H,[2,73]),t(H,[2,74]),t(H,[2,75]),t(H,[2,76]),t(H,[2,77]),t(H,[2,78]),t(H,[2,79]),t(H,[2,80]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:64,4:Z,5:X,6:ie,7:K,8:ee,9:J,10:W,11:Y,12:Q,13:se,14:ue,15:ce,21:63},t(l,[2,53],{59:59,58:60,4:h,5:f,8:$,10:d,12:p,13:g,14:m,18:z,49:[1,77],63:D,64:N,65:O,66:B,67:P}),t(l,[2,56],{59:59,58:60,4:h,5:f,8:$,10:d,12:p,13:g,14:m,18:z,49:[1,78],63:D,64:N,65:O,66:B,67:P}),t(l,[2,57],{59:59,58:60,4:h,5:f,8:$,10:d,12:p,13:g,14:m,18:z,63:D,64:N,65:O,66:B,67:P}),t(l,[2,58],{59:59,58:60,4:h,5:f,8:$,10:d,12:p,13:g,14:m,18:z,63:D,64:N,65:O,66:B,67:P}),t(l,[2,59],{59:59,58:60,4:h,5:f,8:$,10:d,12:p,13:g,14:m,18:z,63:D,64:N,65:O,66:B,67:P}),t(l,[2,60],{59:59,58:60,4:h,5:f,8:$,10:d,12:p,13:g,14:m,18:z,63:D,64:N,65:O,66:B,67:P}),{45:[1,79]},{44:[1,80]},t(H,[2,65]),t(H,[2,81]),t(H,[2,82]),t(H,[2,83]),{3:82,4:Z,5:X,6:ie,7:K,8:ee,9:J,10:W,11:Y,12:Q,13:se,14:ue,15:ce,18:[1,81]},t(te,[2,23]),t(te,[2,1]),t(te,[2,2]),t(te,[2,3]),t(te,[2,4]),t(te,[2,5]),t(te,[2,6]),t(te,[2,7]),t(te,[2,8]),t(te,[2,9]),t(te,[2,10]),t(te,[2,11]),t(te,[2,12]),t(l,[2,52],{58:31,43:83,4:h,5:f,10:d,12:p,13:g,14:m,60:I,61:A,63:D,64:N,65:O,66:B,67:P}),t(l,[2,55],{58:31,43:84,4:h,5:f,10:d,12:p,13:g,14:m,60:I,61:A,63:D,64:N,65:O,66:B,67:P}),{46:[1,85]},{45:[1,86]},{4:Le,5:oe,6:be,8:Fe,11:Be,13:Ve,16:89,17:We,18:qe,19:Re,20:Me,22:88,23:87},t(te,[2,24]),t(l,[2,51],{59:59,58:60,4:h,5:f,8:$,10:d,12:p,13:g,14:m,18:z,63:D,64:N,65:O,66:B,67:P}),t(l,[2,54],{59:59,58:60,4:h,5:f,8:$,10:d,12:p,13:g,14:m,18:z,63:D,64:N,65:O,66:B,67:P}),t(l,[2,47],{22:88,16:89,23:100,4:Le,5:oe,6:be,8:Fe,11:Be,13:Ve,17:We,18:qe,19:Re,20:Me}),{46:[1,101]},t(l,[2,29],{10:ye}),t(q,[2,27],{16:103,4:Le,5:oe,6:be,8:Fe,11:Be,13:Ve,17:We,18:qe,19:Re,20:Me}),t(de,[2,25]),t(de,[2,13]),t(de,[2,14]),t(de,[2,15]),t(de,[2,16]),t(de,[2,17]),t(de,[2,18]),t(de,[2,19]),t(de,[2,20]),t(de,[2,21]),t(de,[2,22]),t(l,[2,49],{10:ye}),t(l,[2,48],{22:88,16:89,23:104,4:Le,5:oe,6:be,8:Fe,11:Be,13:Ve,17:We,18:qe,19:Re,20:Me}),{4:Le,5:oe,6:be,8:Fe,11:Be,13:Ve,16:89,17:We,18:qe,19:Re,20:Me,22:105},t(de,[2,26]),t(l,[2,50],{10:ye}),t(q,[2,28],{16:103,4:Le,5:oe,6:be,8:Fe,11:Be,13:Ve,17:We,18:qe,19:Re,20:Me})],defaultActions:{8:[2,30],9:[2,31]},parseError:v(function(j,me){if(me.recoverable)this.trace(j);else{var Se=new Error(j);throw Se.hash=me,Se}},"parseError"),parse:v(function(j){var me=this,Se=[0],Pe=[],Ie=[null],ge=[],ze=this.table,Ae="",Ye=0,it=0,wt=0,ft=2,He=1,ut=ge.slice.call(arguments,1),$e=Object.create(this.lexer),Ze={yy:{}};for(var at in this.yy)Object.prototype.hasOwnProperty.call(this.yy,at)&&(Ze.yy[at]=this.yy[at]);$e.setInput(j,Ze.yy),Ze.yy.lexer=$e,Ze.yy.parser=this,typeof $e.yylloc>"u"&&($e.yylloc={});var mt=$e.yylloc;ge.push(mt);var Ut=$e.options&&$e.options.ranges;typeof Ze.yy.parseError=="function"?this.parseError=Ze.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(Ee){Se.length=Se.length-2*Ee,Ie.length=Ie.length-Ee,ge.length=ge.length-Ee}v(st,"popStack");function Qe(){var Ee;return Ee=Pe.pop()||$e.lex()||He,typeof Ee!="number"&&(Ee instanceof Array&&(Pe=Ee,Ee=Pe.pop()),Ee=me.symbols_[Ee]||Ee),Ee}v(Qe,"lex");for(var lt,kt,ht,Rt,An,Vt,Jr={},mn,Dr,jn,_n;;){if(ht=Se[Se.length-1],this.defaultActions[ht]?Rt=this.defaultActions[ht]:((lt===null||typeof lt>"u")&&(lt=Qe()),Rt=ze[ht]&&ze[ht][lt]),typeof Rt>"u"||!Rt.length||!Rt[0]){var vt="";_n=[];for(mn in ze[ht])this.terminals_[mn]&&mn>ft&&_n.push("\'"+this.terminals_[mn]+"\'");$e.showPosition?vt="Parse error on line "+(Ye+1)+`:\n`+$e.showPosition()+`\nExpecting `+_n.join(", ")+", got \'"+(this.terminals_[lt]||lt)+"\'":vt="Parse error on line "+(Ye+1)+": Unexpected "+(lt==He?"end of input":"\'"+(this.terminals_[lt]||lt)+"\'"),this.parseError(vt,{text:$e.match,token:this.terminals_[lt]||lt,line:$e.yylineno,loc:mt,expected:_n})}if(Rt[0]instanceof Array&&Rt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ht+", token: "+lt);switch(Rt[0]){case 1:Se.push(lt),Ie.push($e.yytext),ge.push($e.yylloc),Se.push(Rt[1]),lt=null,kt?(lt=kt,kt=null):(it=$e.yyleng,Ae=$e.yytext,Ye=$e.yylineno,mt=$e.yylloc,wt>0&&wt--);break;case 2:if(Dr=this.productions_[Rt[1]][1],Jr.$=Ie[Ie.length-Dr],Jr._$={first_line:ge[ge.length-(Dr||1)].first_line,last_line:ge[ge.length-1].last_line,first_column:ge[ge.length-(Dr||1)].first_column,last_column:ge[ge.length-1].last_column},Ut&&(Jr._$.range=[ge[ge.length-(Dr||1)].range[0],ge[ge.length-1].range[1]]),Vt=this.performAction.apply(Jr,[Ae,it,Ye,Ze.yy,Rt[1],Ie,ge].concat(ut)),typeof Vt<"u")return Vt;Dr&&(Se=Se.slice(0,-1*Dr*2),Ie=Ie.slice(0,-1*Dr),ge=ge.slice(0,-1*Dr)),Se.push(this.productions_[Rt[1]][0]),Ie.push(Jr.$),ge.push(Jr._$),jn=ze[Se[Se.length-2]][Se[Se.length-1]],Se.push(jn);break;case 3:return!0}}return!0},"parse")},he=function(){var ke={EOF:1,parseError:v(function(me,Se){if(this.yy.parser)this.yy.parser.parseError(me,Se);else throw new Error(me)},"parseError"),setInput:v(function(j,me){return this.yy=me||this.yy||{},this._input=j,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var j=this._input[0];this.yytext+=j,this.yyleng++,this.offset++,this.match+=j,this.matched+=j;var me=j.match(/(?:\\r\\n?|\\n).*/g);return me?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),j},"input"),unput:v(function(j){var me=j.length,Se=j.split(/(?:\\r\\n?|\\n)/g);this._input=j+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-me),this.offset-=me;var Pe=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Se.length-1&&(this.yylineno-=Se.length-1);var Ie=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Se?(Se.length===Pe.length?this.yylloc.first_column:0)+Pe[Pe.length-Se.length].length-Se[0].length:this.yylloc.first_column-me},this.options.ranges&&(this.yylloc.range=[Ie[0],Ie[0]+this.yyleng-me]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(j){this.unput(this.match.slice(j))},"less"),pastInput:v(function(){var j=this.matched.substr(0,this.matched.length-this.match.length);return(j.length>20?"...":"")+j.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var j=this.match;return j.length<20&&(j+=this._input.substr(0,20-j.length)),(j.substr(0,20)+(j.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var j=this.pastInput(),me=new Array(j.length+1).join("-");return j+this.upcomingInput()+`\n`+me+"^"},"showPosition"),test_match:v(function(j,me){var Se,Pe,Ie;if(this.options.backtrack_lexer&&(Ie={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ie.yylloc.range=this.yylloc.range.slice(0))),Pe=j[0].match(/(?:\\r\\n?|\\n).*/g),Pe&&(this.yylineno+=Pe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Pe?Pe[Pe.length-1].length-Pe[Pe.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+j[0].length},this.yytext+=j[0],this.match+=j[0],this.matches=j,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(j[0].length),this.matched+=j[0],Se=this.performAction.call(this,this.yy,this,me,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Se)return Se;if(this._backtrack){for(var ge in Ie)this[ge]=Ie[ge];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var j,me,Se,Pe;this._more||(this.yytext="",this.match="");for(var Ie=this._currentRules(),ge=0;ge<Ie.length;ge++)if(Se=this._input.match(this.rules[Ie[ge]]),Se&&(!me||Se[0].length>me[0].length)){if(me=Se,Pe=ge,this.options.backtrack_lexer){if(j=this.test_match(Se,Ie[ge]),j!==!1)return j;if(this._backtrack){me=!1;continue}else return!1}else if(!this.options.flex)break}return me?(j=this.test_match(me,Ie[Pe]),j!==!1?j:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var me=this.next();return me||this.lex()},"lex"),begin:v(function(me){this.conditionStack.push(me)},"begin"),popState:v(function(){var me=this.conditionStack.length-1;return me>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(me){return me=this.conditionStack.length-1-Math.abs(me||0),me>=0?this.conditionStack[me]:"INITIAL"},"topState"),pushState:v(function(me){this.begin(me)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(me,Se,Pe,Ie){var ge=Ie;switch(Pe){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n\\r]+)/i,/^(?:%%[^\\n]*)/i,/^(?:title\\b)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\\w+)/i,/^(?:\\s*:\\s*\\[\\s*)/i,/^(?:(1)|(0(.\\d+)?))/i,/^(?:\\s*\\] *)/i,/^(?:\\s*,\\s*)/i,/^(?:(1)|(0(.\\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\\*)/i,/^(?:#)/i,/^(?:[\\_])/i,/^(?:\\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\\s)/i,/^(?:;)/i,/^(?:[!"#$%&\'*+,-.`?\\\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return ke}();ae.lexer=he;function U(){this.yy={}}return v(U,"Parser"),U.prototype=ae,ae.Parser=U,new U}();KI.parser=KI;KPe=KI,Za=E1(),ZPe=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{v(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:sr.quadrantChart?.chartWidth||500,chartWidth:sr.quadrantChart?.chartHeight||500,titlePadding:sr.quadrantChart?.titlePadding||10,titleFontSize:sr.quadrantChart?.titleFontSize||20,quadrantPadding:sr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:sr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:sr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:sr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:sr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:sr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:sr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:sr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:sr.quadrantChart?.pointLabelFontSize||12,pointRadius:sr.quadrantChart?.pointRadius||5,xAxisPosition:sr.quadrantChart?.xAxisPosition||"top",yAxisPosition:sr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:sr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:sr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Za.quadrant1Fill,quadrant2Fill:Za.quadrant2Fill,quadrant3Fill:Za.quadrant3Fill,quadrant4Fill:Za.quadrant4Fill,quadrant1TextFill:Za.quadrant1TextFill,quadrant2TextFill:Za.quadrant2TextFill,quadrant3TextFill:Za.quadrant3TextFill,quadrant4TextFill:Za.quadrant4TextFill,quadrantPointFill:Za.quadrantPointFill,quadrantPointTextFill:Za.quadrantPointTextFill,quadrantXAxisTextFill:Za.quadrantXAxisTextFill,quadrantYAxisTextFill:Za.quadrantYAxisTextFill,quadrantTitleFill:Za.quadrantTitleFill,quadrantInternalBorderStrokeFill:Za.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Za.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,re.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){re.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){re.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,n){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:t==="top"&&e?i:0,bottom:t==="bottom"&&e?i:0},s=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,o={left:this.config.yAxisPosition==="left"&&r?s:0,right:this.config.yAxisPosition==="right"&&r?s:0},l=this.config.titleFontSize+this.config.titlePadding*2,u={top:n?l:0},h=this.config.quadrantPadding+o.left,f=this.config.quadrantPadding+a.top+u.top,d=this.config.chartWidth-this.config.quadrantPadding*2-o.left-o.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-u.top,g=d/2,m=p/2;return{xAxisSpace:a,yAxisSpace:o,titleSpace:u,quadrantSpace:{quadrantLeft:h,quadrantTop:f,quadrantWidth:d,quadrantHalfWidth:g,quadrantHeight:p,quadrantHalfHeight:m}}}getAxisLabels(t,e,r,n){let{quadrantSpace:i,titleSpace:a}=n,{quadrantHalfHeight:s,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:u,quadrantTop:h,quadrantWidth:f}=i,d=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(d?u/2:0),y:t==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+u+(d?u/2:0),y:t==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:h+o-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:h+s-(p?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){let{quadrantSpace:e}=t,{quadrantHalfHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a}=e,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a,width:i,height:r,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a,width:i,height:r,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant4Fill}];for(let o of s)o.text.x=o.x+o.width/2,this.data.points.length===0?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return s}getQuadrantPoints(t){let{quadrantSpace:e}=t,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:a}=e,s=al().domain([0,1]).range([n,a+n]),o=al().domain([0,1]).range([r+i,i]);return this.data.points.map(u=>{let h=this.classes.get(u.className);return h&&(u={...h,...u}),{x:s(u.x),y:o(u.y),fill:u.color??this.themeConfig.quadrantPointFill,radius:u.radius??this.config.pointRadius,text:{text:u.text,fill:this.themeConfig.quadrantPointTextFill,x:s(u.x),y:o(u.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:u.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:u.strokeWidth??"0px"}})}getBorders(t){let e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:r}=t,{quadrantHalfHeight:n,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:s,quadrantTop:o,quadrantWidth:l}=r;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o,x2:a+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:o+e,x2:a+l,y2:o+i-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:o+i,x2:a+l+e,y2:o+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:o+e,x2:a,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+s,y1:o+e,x2:a+s,y2:o+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+e,y1:o+n,x2:a+l-e,y2:o+n}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let t=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),e=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=this.data.points.length>0?"bottom":this.config.xAxisPosition,i=this.calculateSpace(n,t,e,r);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(n,t,e,i),borderLines:this.getBorders(i),title:this.getTitle(r)}}},RT=class extends Error{static{v(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid ${r}`),this.name="InvalidStyleError"}};v(ZI,"validateHexCode");v(Cce,"validateNumber");v(Ace,"validateSizeInPixels");QPe=pe();v(_c,"textSanitizer");ca=new ZPe;v(_ce,"setQuadrant1Text");v(Lce,"setQuadrant2Text");v(Rce,"setQuadrant3Text");v(Nce,"setQuadrant4Text");v(Ice,"setXAxisLeftText");v(Mce,"setXAxisRightText");v(Dce,"setYAxisTopText");v(Oce,"setYAxisBottomText");v(NT,"parseStyles");v(Pce,"addPoint");v(Bce,"addClass");v(Fce,"setWidth");v(zce,"setHeight");v($ce,"getQuadrantData");JPe=v(function(){ca.clear(),xr()},"clear"),eBe={setWidth:Fce,setHeight:zce,setQuadrant1Text:_ce,setQuadrant2Text:Lce,setQuadrant3Text:Rce,setQuadrant4Text:Nce,setXAxisLeftText:Ice,setXAxisRightText:Mce,setYAxisTopText:Dce,setYAxisBottomText:Oce,parseStyles:NT,addPoint:Pce,addClass:Bce,getQuadrantData:$ce,clear:JPe,setAccTitle:Tr,getAccTitle:Ar,setDiagramTitle:en,getDiagramTitle:Hr,getAccDescription:Lr,setAccDescription:_r},tBe=v((t,e,r,n)=>{function i(S){return S==="top"?"hanging":"middle"}v(i,"getDominantBaseLine");function a(S){return S==="left"?"start":"middle"}v(a,"getTextAnchor");function s(S){return`translate(${S.x}, ${S.y}) rotate(${S.rotation||0})`}v(s,"getTransformation");let o=pe();re.debug(`Rendering quadrant chart\n`+t);let l=o.securityLevel,u;l==="sandbox"&&(u=Ge("#i"+e));let f=(l==="sandbox"?Ge(u.nodes()[0].contentDocument.body):Ge("body")).select(`[id="${e}"]`),d=f.append("g").attr("class","main"),p=o.quadrantChart?.chartWidth??500,g=o.quadrantChart?.chartHeight??500;Wr(f,g,p,o.quadrantChart?.useMaxWidth??!0),f.attr("viewBox","0 0 "+p+" "+g),n.db.setHeight(g),n.db.setWidth(p);let m=n.db.getQuadrantData(),x=d.append("g").attr("class","quadrants"),y=d.append("g").attr("class","border"),b=d.append("g").attr("class","data-points"),w=d.append("g").attr("class","labels"),_=d.append("g").attr("class","title");m.title&&_.append("text").attr("x",0).attr("y",0).attr("fill",m.title.fill).attr("font-size",m.title.fontSize).attr("dominant-baseline",i(m.title.horizontalPos)).attr("text-anchor",a(m.title.verticalPos)).attr("transform",s(m.title)).text(m.title.text),m.borderLines&&y.selectAll("line").data(m.borderLines).enter().append("line").attr("x1",S=>S.x1).attr("y1",S=>S.y1).attr("x2",S=>S.x2).attr("y2",S=>S.y2).style("stroke",S=>S.strokeFill).style("stroke-width",S=>S.strokeWidth);let k=x.selectAll("g.quadrant").data(m.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",S=>S.x).attr("y",S=>S.y).attr("width",S=>S.width).attr("height",S=>S.height).attr("fill",S=>S.fill),k.append("text").attr("x",0).attr("y",0).attr("fill",S=>S.text.fill).attr("font-size",S=>S.text.fontSize).attr("dominant-baseline",S=>i(S.text.horizontalPos)).attr("text-anchor",S=>a(S.text.verticalPos)).attr("transform",S=>s(S.text)).text(S=>S.text.text),w.selectAll("g.label").data(m.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(S=>S.text).attr("fill",S=>S.fill).attr("font-size",S=>S.fontSize).attr("dominant-baseline",S=>i(S.horizontalPos)).attr("text-anchor",S=>a(S.verticalPos)).attr("transform",S=>s(S));let L=b.selectAll("g.data-point").data(m.points).enter().append("g").attr("class","data-point");L.append("circle").attr("cx",S=>S.x).attr("cy",S=>S.y).attr("r",S=>S.radius).attr("fill",S=>S.fill).attr("stroke",S=>S.strokeColor).attr("stroke-width",S=>S.strokeWidth),L.append("text").attr("x",0).attr("y",0).text(S=>S.text.text).attr("fill",S=>S.text.fill).attr("font-size",S=>S.text.fontSize).attr("dominant-baseline",S=>i(S.text.horizontalPos)).attr("text-anchor",S=>a(S.text.verticalPos)).attr("transform",S=>s(S.text))},"draw"),rBe={draw:tBe},nBe={parser:KPe,db:eBe,renderer:rBe,styles:v(()=>"","styles")}});var lue={};mr(lue,{diagram:()=>vBe});function JI(t){return t.type==="bar"}function rM(t){return t.type==="band"}function fm(t){return t.type==="linear"}function eM(t,e,r,n){let i=new Hce(n);return rM(t)?new aBe(e,r,t.categories,t.title,i):new sBe(e,r,[t.min,t.max],t.title,i)}function Yce(t,e,r,n){let i=new Hce(n);return new oBe(i,t,e,r)}function Xce(t,e,r){return new uBe(t,e,r)}function iM(){let t=E1(),e=Or();return hs(t.xyChart,e.themeVariables.xyChart)}function aM(){let t=Or();return hs(sr.xyChart,t.xyChart)}function sM(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function MT(t){let e=Or();return yr(t.trim(),e)}function Kce(t){jce=t}function Zce(t){t==="horizontal"?O2.chartOrientation="horizontal":O2.chartOrientation="vertical"}function Qce(t){nn.xAxis.title=MT(t.text)}function oM(t,e){nn.xAxis={type:"linear",title:nn.xAxis.title,min:t,max:e},IT=!0}function Jce(t){nn.xAxis={type:"band",title:nn.xAxis.title,categories:t.map(e=>MT(e.text))},IT=!0}function eue(t){nn.yAxis.title=MT(t.text)}function tue(t,e){nn.yAxis={type:"linear",title:nn.yAxis.title,min:t,max:e},nM=!0}function rue(t){let e=Math.min(...t),r=Math.max(...t),n=fm(nn.yAxis)?nn.yAxis.min:1/0,i=fm(nn.yAxis)?nn.yAxis.max:-1/0;nn.yAxis={type:"linear",title:nn.yAxis.title,min:Math.min(n,e),max:Math.max(i,r)}}function lM(t){let e=[];if(t.length===0)return e;if(!IT){let r=fm(nn.xAxis)?nn.xAxis.min:1/0,n=fm(nn.xAxis)?nn.xAxis.max:-1/0;oM(Math.min(r,1),Math.max(n,t.length))}if(nM||rue(t),rM(nn.xAxis)&&(e=nn.xAxis.categories.map((r,n)=>[r,t[n]])),fm(nn.xAxis)){let r=nn.xAxis.min,n=nn.xAxis.max,i=(n-r)/(t.length-1),a=[];for(let s=r;s<=n;s+=i)a.push(`${s}`);e=a.map((s,o)=>[s,t[o]])}return e}function cM(t){return tM[t===0?0:t%tM.length]}function nue(t,e){let r=lM(e);nn.plots.push({type:"line",strokeFill:cM(D2),strokeWidth:2,data:r}),D2++}function iue(t,e){let r=lM(e);nn.plots.push({type:"bar",fill:cM(D2),data:r}),D2++}function aue(){if(nn.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return nn.title=Hr(),fBe.build(O2,nn,P2,jce)}function sue(){return P2}function oue(){return O2}var QI,iBe,Hce,Vce,Wce,qce,aBe,sBe,oBe,lBe,cBe,uBe,hBe,fBe,D2,jce,O2,P2,nn,tM,IT,nM,dBe,pBe,gBe,mBe,vBe,cue=F(()=>{za();xn();ku();or();lr();lr();lr();QI=function(){var t=v(function(D,N,O,B){for(O=O||{},B=D.length;B--;O[D[B]]=N);return O},"o"),e=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],a=[1,6],s=[1,7],o=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],u=[1,26],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[1,32],m=[1,33],x=[1,34],y=[1,35],b=[1,36],w=[1,37],_=[1,43],k=[1,42],E=[1,47],L=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],M=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],R=[1,64],T={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:v(function(N,O,B,P,$,z,H){var Z=z.length-1;switch($){case 5:P.setOrientation(z[Z]);break;case 9:P.setDiagramTitle(z[Z].text.trim());break;case 12:P.setLineData({text:"",type:"text"},z[Z]);break;case 13:P.setLineData(z[Z-1],z[Z]);break;case 14:P.setBarData({text:"",type:"text"},z[Z]);break;case 15:P.setBarData(z[Z-1],z[Z]);break;case 16:this.$=z[Z].trim(),P.setAccTitle(this.$);break;case 17:case 18:this.$=z[Z].trim(),P.setAccDescription(this.$);break;case 19:this.$=z[Z-1];break;case 20:this.$=[Number(z[Z-2]),...z[Z]];break;case 21:this.$=[Number(z[Z])];break;case 22:P.setXAxisTitle(z[Z]);break;case 23:P.setXAxisTitle(z[Z-1]);break;case 24:P.setXAxisTitle({type:"text",text:""});break;case 25:P.setXAxisBand(z[Z]);break;case 26:P.setXAxisRangeData(Number(z[Z-2]),Number(z[Z]));break;case 27:this.$=z[Z-1];break;case 28:this.$=[z[Z-2],...z[Z]];break;case 29:this.$=[z[Z]];break;case 30:P.setYAxisTitle(z[Z]);break;case 31:P.setYAxisTitle(z[Z-1]);break;case 32:P.setYAxisTitle({type:"text",text:""});break;case 33:P.setYAxisRangeData(Number(z[Z-2]),Number(z[Z]));break;case 37:this.$={text:z[Z],type:"text"};break;case 38:this.$={text:z[Z],type:"text"};break;case 39:this.$={text:z[Z],type:"markdown"};break;case 40:this.$=z[Z];break;case 41:this.$=z[Z-1]+""+z[Z];break}},"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,34:i,35:a,36:s}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,34:i,35:a,36:s}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:i,35:a,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(o,[2,34]),t(o,[2,35]),t(o,[2,36]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,34:i,35:a,36:s}),{1:[2,3]},t(o,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:s}),{11:23,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:x,48:y,49:b,50:w},{11:39,13:38,24:_,27:k,29:40,30:41,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:x,48:y,49:b,50:w},{11:45,15:44,27:E,33:46,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:x,48:y,49:b,50:w},{11:49,17:48,24:L,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:x,48:y,49:b,50:w},{11:52,17:51,24:L,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:x,48:y,49:b,50:w},{20:[1,53]},{22:[1,54]},t(S,[2,18]),{1:[2,2]},t(S,[2,8]),t(S,[2,9]),t(C,[2,37],{40:55,41:h,42:f,43:d,44:p,45:g,46:m,47:x,48:y,49:b,50:w}),t(C,[2,38]),t(C,[2,39]),t(M,[2,40]),t(M,[2,42]),t(M,[2,43]),t(M,[2,44]),t(M,[2,45]),t(M,[2,46]),t(M,[2,47]),t(M,[2,48]),t(M,[2,49]),t(M,[2,50]),t(M,[2,51]),t(S,[2,10]),t(S,[2,22],{30:41,29:56,24:_,27:k}),t(S,[2,24]),t(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:x,48:y,49:b,50:w},t(S,[2,11]),t(S,[2,30],{33:60,27:E}),t(S,[2,32]),{31:[1,61]},t(S,[2,12]),{17:62,24:L},{25:63,27:R},t(S,[2,14]),{17:65,24:L},t(S,[2,16]),t(S,[2,17]),t(M,[2,41]),t(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(S,[2,31]),{27:[1,69]},t(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(S,[2,15]),t(S,[2,26]),t(S,[2,27]),{11:59,32:72,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:g,46:m,47:x,48:y,49:b,50:w},t(S,[2,33]),t(S,[2,19]),{25:73,27:R},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:v(function(N,O){if(O.recoverable)this.trace(N);else{var B=new Error(N);throw B.hash=O,B}},"parseError"),parse:v(function(N){var O=this,B=[0],P=[],$=[null],z=[],H=this.table,Z="",X=0,ie=0,K=0,ee=2,J=1,W=z.slice.call(arguments,1),Y=Object.create(this.lexer),Q={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(Q.yy[se]=this.yy[se]);Y.setInput(N,Q.yy),Q.yy.lexer=Y,Q.yy.parser=this,typeof Y.yylloc>"u"&&(Y.yylloc={});var ue=Y.yylloc;z.push(ue);var ce=Y.options&&Y.options.ranges;typeof Q.yy.parseError=="function"?this.parseError=Q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function te(ae){B.length=B.length-2*ae,$.length=$.length-ae,z.length=z.length-ae}v(te,"popStack");function Le(){var ae;return ae=P.pop()||Y.lex()||J,typeof ae!="number"&&(ae instanceof Array&&(P=ae,ae=P.pop()),ae=O.symbols_[ae]||ae),ae}v(Le,"lex");for(var oe,be,Fe,Be,Ve,We,qe={},Re,Me,ye,q;;){if(Fe=B[B.length-1],this.defaultActions[Fe]?Be=this.defaultActions[Fe]:((oe===null||typeof oe>"u")&&(oe=Le()),Be=H[Fe]&&H[Fe][oe]),typeof Be>"u"||!Be.length||!Be[0]){var de="";q=[];for(Re in H[Fe])this.terminals_[Re]&&Re>ee&&q.push("\'"+this.terminals_[Re]+"\'");Y.showPosition?de="Parse error on line "+(X+1)+`:\n`+Y.showPosition()+`\nExpecting `+q.join(", ")+", got \'"+(this.terminals_[oe]||oe)+"\'":de="Parse error on line "+(X+1)+": Unexpected "+(oe==J?"end of input":"\'"+(this.terminals_[oe]||oe)+"\'"),this.parseError(de,{text:Y.match,token:this.terminals_[oe]||oe,line:Y.yylineno,loc:ue,expected:q})}if(Be[0]instanceof Array&&Be.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Fe+", token: "+oe);switch(Be[0]){case 1:B.push(oe),$.push(Y.yytext),z.push(Y.yylloc),B.push(Be[1]),oe=null,be?(oe=be,be=null):(ie=Y.yyleng,Z=Y.yytext,X=Y.yylineno,ue=Y.yylloc,K>0&&K--);break;case 2:if(Me=this.productions_[Be[1]][1],qe.$=$[$.length-Me],qe._$={first_line:z[z.length-(Me||1)].first_line,last_line:z[z.length-1].last_line,first_column:z[z.length-(Me||1)].first_column,last_column:z[z.length-1].last_column},ce&&(qe._$.range=[z[z.length-(Me||1)].range[0],z[z.length-1].range[1]]),We=this.performAction.apply(qe,[Z,ie,X,Q.yy,Be[1],$,z].concat(W)),typeof We<"u")return We;Me&&(B=B.slice(0,-1*Me*2),$=$.slice(0,-1*Me),z=z.slice(0,-1*Me)),B.push(this.productions_[Be[1]][0]),$.push(qe.$),z.push(qe._$),ye=H[B[B.length-2]][B[B.length-1]],B.push(ye);break;case 3:return!0}}return!0},"parse")},I=function(){var D={EOF:1,parseError:v(function(O,B){if(this.yy.parser)this.yy.parser.parseError(O,B);else throw new Error(O)},"parseError"),setInput:v(function(N,O){return this.yy=O||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var O=N.match(/(?:\\r\\n?|\\n).*/g);return O?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:v(function(N){var O=N.length,B=N.split(/(?:\\r\\n?|\\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;var P=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),B.length-1&&(this.yylineno-=B.length-1);var $=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:B?(B.length===P.length?this.yylloc.first_column:0)+P[P.length-B.length].length-B[0].length:this.yylloc.first_column-O},this.options.ranges&&(this.yylloc.range=[$[0],$[0]+this.yyleng-O]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(N){this.unput(this.match.slice(N))},"less"),pastInput:v(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var N=this.pastInput(),O=new Array(N.length+1).join("-");return N+this.upcomingInput()+`\n`+O+"^"},"showPosition"),test_match:v(function(N,O){var B,P,$;if(this.options.backtrack_lexer&&($={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&($.yylloc.range=this.yylloc.range.slice(0))),P=N[0].match(/(?:\\r\\n?|\\n).*/g),P&&(this.yylineno+=P.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:P?P[P.length-1].length-P[P.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(N[0].length),this.matched+=N[0],B=this.performAction.call(this,this.yy,this,O,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),B)return B;if(this._backtrack){for(var z in $)this[z]=$[z];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,O,B,P;this._more||(this.yytext="",this.match="");for(var $=this._currentRules(),z=0;z<$.length;z++)if(B=this._input.match(this.rules[$[z]]),B&&(!O||B[0].length>O[0].length)){if(O=B,P=z,this.options.backtrack_lexer){if(N=this.test_match(B,$[z]),N!==!1)return N;if(this._backtrack){O=!1;continue}else return!1}else if(!this.options.flex)break}return O?(N=this.test_match(O,$[P]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var O=this.next();return O||this.lex()},"lex"),begin:v(function(O){this.conditionStack.push(O)},"begin"),popState:v(function(){var O=this.conditionStack.length-1;return O>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(O){return O=this.conditionStack.length-1-Math.abs(O||0),O>=0?this.conditionStack[O]:"INITIAL"},"topState"),pushState:v(function(O){this.begin(O)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(O,B,P,$){var z=$;switch(P){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";break;case 17:return this.pushState("axis_data"),"Y_AXIS";break;case 18:return this.pushState("axis_band_data"),24;break;case 19:return 31;case 20:return this.pushState("data"),16;break;case 21:return this.pushState("data"),18;break;case 22:return this.pushState("data_inner"),24;break;case 23:return 27;case 24:return this.popState(),26;break;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:(\\r?\\n))/i,/^(?:(\\r?\\n))/i,/^(?:[\\n\\r]+)/i,/^(?:%%[^\\n]*)/i,/^(?:title\\b)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:\\{)/i,/^(?:[^\\}]*)/i,/^(?:xychart-beta\\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\\b)/i,/^(?:y-axis\\b)/i,/^(?:\\[)/i,/^(?:-->)/i,/^(?:line\\b)/i,/^(?:bar\\b)/i,/^(?:\\[)/i,/^(?:[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+))/i,/^(?:\\])/i,/^(?:(?:`\\) \\{ this\\.pushState\\(md_string\\); \\}\\n<md_string>\\(\\?:\\(\\?!`"\\)\\.\\)\\+ \\{ return MD_STR; \\}\\n<md_string>\\(\\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\\[)/i,/^(?:\\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\\*)/i,/^(?:#)/i,/^(?:[\\_])/i,/^(?:\\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return D}();T.lexer=I;function A(){this.yy={}}return v(A,"Parser"),A.prototype=T,T.Parser=A,new A}();QI.parser=QI;iBe=QI;v(JI,"isBarPlot");v(rM,"isBandAxisData");v(fm,"isLinearAxisData");Hce=class{constructor(t){this.parentGroup=t}static{v(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((i,a)=>Math.max(a.length,i),0)*e,height:e};let r={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(let i of t){let a=xA(n,1,i),s=a?a.width:i.length*e,o=a?a.height:e;r.width=Math.max(r.width,s),r.height=Math.max(r.height,o)}return n.remove(),r}},Vce=.7,Wce=.2,qce=class{constructor(t,e,r,n){this.axisConfig=t,this.title=e,this.textDimensionCalculator=r,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{v(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Vce*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Vce*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),n=Wce*t.width;this.outerPadding=Math.min(r.width/2,n);let i=r.height+this.axisConfig.labelPadding*2;this.labelTextHeight=r.height,i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=r.height+this.axisConfig.titlePadding*2;this.titleTextHeight=r.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),n=Wce*t.height;this.outerPadding=Math.min(r.height/2,n);let i=r.width+this.axisConfig.labelPadding*2;i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=r.height+this.axisConfig.titlePadding*2;this.titleTextHeight=r.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${e},${this.getScaleValue(r)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(r)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${e} L ${this.getScaleValue(r)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(r)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},aBe=class extends qce{static{v(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=up().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=up().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),re.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},sBe=class extends qce{static{v(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=al().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=al().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};v(eM,"getAxis");oBe=class{constructor(t,e,r,n){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{v(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),r=Math.max(e.width,t.width),n=e.height+2*this.chartConfig.titlePadding;return e.width<=r&&e.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=r,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};v(Yce,"getChartTitleComponent");lBe=class{constructor(t,e,r,n,i){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{v(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map(r=>[this.xAxis.getScaleValue(r[0]),this.yAxis.getScaleValue(r[1])]),e;return this.orientation==="horizontal"?e=ss().y(r=>r[0]).x(r=>r[1])(t):e=ss().x(r=>r[0]).y(r=>r[1])(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},cBe=class{constructor(t,e,r,n,i,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{v(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),r=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=r/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(i=>({x:this.boundingRect.x,y:i[0]-n,height:r,width:i[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(i=>({x:i[0]-n,y:i[1],width:r,height:this.boundingRect.y+this.boundingRect.height-i[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},uBe=class{constructor(t,e,r){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{v(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[e,r]of this.chartData.plots.entries())switch(r.type){case"line":{let n=new lBe(r,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break;case"bar":{let n=new cBe(r,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break}return t}};v(Xce,"getPlotComponent");hBe=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:Yce(t,e,r,n),plot:Xce(t,e,r),xAxis:eM(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:eM(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{v(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r=0,n=0,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});t-=s.width,e-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),n=s.height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),s=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=s.height,this.componentStore.yAxis.setAxisPosition("left"),s=this.componentStore.yAxis.calculateSpace({width:t,height:e}),r=s.width,t-=s.width,t>0&&(i+=t,t=0),e>0&&(a+=e,e=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([r,r+i]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:n+a}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(o=>JI(o))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r=0,n=0,i=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,e-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),r=o.height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=o.width,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=o.height,i=r+o.height,t>0&&(a+=t,t=0),e>0&&(s+=e,e=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(l=>JI(l))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},fBe=class{static{v(this,"XYChartBuilder")}static build(t,e,r,n){return new hBe(t,e,r,n).getDrawableElement()}},D2=0,O2=aM(),P2=iM(),nn=sM(),tM=P2.plotColorPalette.split(",").map(t=>t.trim()),IT=!1,nM=!1;v(iM,"getChartDefaultThemeConfig");v(aM,"getChartDefaultConfig");v(sM,"getChartDefaultData");v(MT,"textSanitizer");v(Kce,"setTmpSVGG");v(Zce,"setOrientation");v(Qce,"setXAxisTitle");v(oM,"setXAxisRangeData");v(Jce,"setXAxisBand");v(eue,"setYAxisTitle");v(tue,"setYAxisRangeData");v(rue,"setYAxisRangeFromPlotData");v(lM,"transformDataWithoutCategory");v(cM,"getPlotColorFromPalette");v(nue,"setLineData");v(iue,"setBarData");v(aue,"getDrawableElem");v(sue,"getChartThemeConfig");v(oue,"getChartConfig");dBe=v(function(){xr(),D2=0,O2=aM(),nn=sM(),P2=iM(),tM=P2.plotColorPalette.split(",").map(t=>t.trim()),IT=!1,nM=!1},"clear"),pBe={getDrawableElem:aue,clear:dBe,setAccTitle:Tr,getAccTitle:Ar,setDiagramTitle:en,getDiagramTitle:Hr,getAccDescription:Lr,setAccDescription:_r,setOrientation:Zce,setXAxisTitle:Qce,setXAxisRangeData:oM,setXAxisBand:Jce,setYAxisTitle:eue,setYAxisRangeData:tue,setLineData:nue,setBarData:iue,setTmpSVGG:Kce,getChartThemeConfig:sue,getChartConfig:oue},gBe=v((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig();function o(x){return x==="top"?"text-before-edge":"middle"}v(o,"getDominantBaseLine");function l(x){return x==="left"?"start":x==="right"?"end":"middle"}v(l,"getTextAnchor");function u(x){return`translate(${x.x}, ${x.y}) rotate(${x.rotation||0})`}v(u,"getTextTransformation"),re.debug(`Rendering xychart chart\n`+t);let h=ka(e),f=h.append("g").attr("class","main"),d=f.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");Wr(h,s.height,s.width,!0),h.attr("viewBox",`0 0 ${s.width} ${s.height}`),d.attr("fill",a.backgroundColor),i.setTmpSVGG(h.append("g").attr("class","mermaid-tmp-group"));let p=i.getDrawableElem(),g={};function m(x){let y=f,b="";for(let[w]of x.entries()){let _=f;w>0&&g[b]&&(_=g[b]),b+=x[w],y=g[b],y||(y=g[b]=_.append("g").attr("class",x[w]))}return y}v(m,"getGroup");for(let x of p){if(x.data.length===0)continue;let y=m(x.groupTexts);switch(x.type){case"rect":y.selectAll("rect").data(x.data).enter().append("rect").attr("x",b=>b.x).attr("y",b=>b.y).attr("width",b=>b.width).attr("height",b=>b.height).attr("fill",b=>b.fill).attr("stroke",b=>b.strokeFill).attr("stroke-width",b=>b.strokeWidth);break;case"text":y.selectAll("text").data(x.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",b=>b.fill).attr("font-size",b=>b.fontSize).attr("dominant-baseline",b=>o(b.verticalPos)).attr("text-anchor",b=>l(b.horizontalPos)).attr("transform",b=>u(b)).text(b=>b.text);break;case"path":y.selectAll("path").data(x.data).enter().append("path").attr("d",b=>b.path).attr("fill",b=>b.fill?b.fill:"none").attr("stroke",b=>b.strokeFill).attr("stroke-width",b=>b.strokeWidth);break}}},"draw"),mBe={draw:gBe},vBe={parser:iBe,db:pBe,renderer:mBe}});var gue={};mr(gue,{diagram:()=>XBe});var uM,yBe,fM,Ss,B2,Jh,F2,xBe,bBe,wBe,kBe,TBe,EBe,SBe,CBe,ABe,_Be,LBe,RBe,NBe,IBe,MBe,DBe,OBe,PBe,BBe,FBe,hM,zBe,hue,ti,uue,fue,due,pue,$Be,GBe,UBe,VBe,WBe,HBe,dm,qBe,YBe,XBe,mue=F(()=>{or();lr();jv();vs();uM=function(){var t=v(function(ie,K,ee,J){for(ee=ee||{},J=ie.length;J--;ee[ie[J]]=K);return ee},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],s=[1,18],o=[2,7],l=[1,22],u=[1,23],h=[1,24],f=[1,25],d=[1,26],p=[1,27],g=[1,20],m=[1,28],x=[1,29],y=[62,63],b=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],w=[1,47],_=[1,48],k=[1,49],E=[1,50],L=[1,51],S=[1,52],C=[1,53],M=[53,54],R=[1,64],T=[1,60],I=[1,61],A=[1,62],D=[1,63],N=[1,65],O=[1,69],B=[1,70],P=[1,67],$=[1,68],z=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],H={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:v(function(K,ee,J,W,Y,Q,se){var ue=Q.length-1;switch(Y){case 4:this.$=Q[ue].trim(),W.setAccTitle(this.$);break;case 5:case 6:this.$=Q[ue].trim(),W.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:W.addRequirement(Q[ue-3],Q[ue-4]);break;case 14:W.setNewReqId(Q[ue-2]);break;case 15:W.setNewReqText(Q[ue-2]);break;case 16:W.setNewReqRisk(Q[ue-2]);break;case 17:W.setNewReqVerifyMethod(Q[ue-2]);break;case 20:this.$=W.RequirementType.REQUIREMENT;break;case 21:this.$=W.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=W.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=W.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=W.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=W.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=W.RiskLevel.LOW_RISK;break;case 27:this.$=W.RiskLevel.MED_RISK;break;case 28:this.$=W.RiskLevel.HIGH_RISK;break;case 29:this.$=W.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=W.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=W.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=W.VerifyType.VERIFY_TEST;break;case 33:W.addElement(Q[ue-3]);break;case 34:W.setNewElementType(Q[ue-2]);break;case 35:W.setNewElementDocRef(Q[ue-2]);break;case 38:W.addRelationship(Q[ue-2],Q[ue],Q[ue-4]);break;case 39:W.addRelationship(Q[ue-2],Q[ue-4],Q[ue]);break;case 40:this.$=W.Relationships.CONTAINS;break;case 41:this.$=W.Relationships.COPIES;break;case 42:this.$=W.Relationships.DERIVES;break;case 43:this.$=W.Relationships.SATISFIES;break;case 44:this.$=W.Relationships.VERIFIES;break;case 45:this.$=W.Relationships.REFINES;break;case 46:this.$=W.Relationships.TRACES;break}},"anonymous"),table:[{3:1,4:2,6:e,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:i},{1:[2,2]},{4:17,5:s,7:13,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:x},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:s,7:31,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:x},{4:17,5:s,7:32,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:x},{4:17,5:s,7:33,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:x},{4:17,5:s,7:34,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:x},{4:17,5:s,7:35,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:l,32:u,33:h,34:f,35:d,36:p,44:g,62:m,63:x},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},t(y,[2,20]),t(y,[2,21]),t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),t(b,[2,49]),t(b,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:w,56:_,57:k,58:E,59:L,60:S,61:C},{52:54,55:w,56:_,57:k,58:E,59:L,60:S,61:C},{5:[1,55]},{5:[1,56]},{53:[1,57]},t(M,[2,40]),t(M,[2,41]),t(M,[2,42]),t(M,[2,43]),t(M,[2,44]),t(M,[2,45]),t(M,[2,46]),{54:[1,58]},{5:R,20:59,21:T,24:I,26:A,28:D,30:N},{5:O,30:B,46:66,47:P,49:$},{23:71,62:m,63:x},{23:72,62:m,63:x},t(z,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:R,20:77,21:T,24:I,26:A,28:D,30:N},t(z,[2,19]),t(z,[2,33]),{22:[1,78]},{22:[1,79]},{5:O,30:B,46:80,47:P,49:$},t(z,[2,37]),t(z,[2,38]),t(z,[2,39]),{23:81,62:m,63:x},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},t(z,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},t(z,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:R,20:106,21:T,24:I,26:A,28:D,30:N},{5:R,20:107,21:T,24:I,26:A,28:D,30:N},{5:R,20:108,21:T,24:I,26:A,28:D,30:N},{5:R,20:109,21:T,24:I,26:A,28:D,30:N},{5:O,30:B,46:110,47:P,49:$},{5:O,30:B,46:111,47:P,49:$},t(z,[2,14]),t(z,[2,15]),t(z,[2,16]),t(z,[2,17]),t(z,[2,34]),t(z,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:v(function(K,ee){if(ee.recoverable)this.trace(K);else{var J=new Error(K);throw J.hash=ee,J}},"parseError"),parse:v(function(K){var ee=this,J=[0],W=[],Y=[null],Q=[],se=this.table,ue="",ce=0,te=0,Le=0,oe=2,be=1,Fe=Q.slice.call(arguments,1),Be=Object.create(this.lexer),Ve={yy:{}};for(var We in this.yy)Object.prototype.hasOwnProperty.call(this.yy,We)&&(Ve.yy[We]=this.yy[We]);Be.setInput(K,Ve.yy),Ve.yy.lexer=Be,Ve.yy.parser=this,typeof Be.yylloc>"u"&&(Be.yylloc={});var qe=Be.yylloc;Q.push(qe);var Re=Be.options&&Be.options.ranges;typeof Ve.yy.parseError=="function"?this.parseError=Ve.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Me(ze){J.length=J.length-2*ze,Y.length=Y.length-ze,Q.length=Q.length-ze}v(Me,"popStack");function ye(){var ze;return ze=W.pop()||Be.lex()||be,typeof ze!="number"&&(ze instanceof Array&&(W=ze,ze=W.pop()),ze=ee.symbols_[ze]||ze),ze}v(ye,"lex");for(var q,de,ae,he,U,ke,j={},me,Se,Pe,Ie;;){if(ae=J[J.length-1],this.defaultActions[ae]?he=this.defaultActions[ae]:((q===null||typeof q>"u")&&(q=ye()),he=se[ae]&&se[ae][q]),typeof he>"u"||!he.length||!he[0]){var ge="";Ie=[];for(me in se[ae])this.terminals_[me]&&me>oe&&Ie.push("\'"+this.terminals_[me]+"\'");Be.showPosition?ge="Parse error on line "+(ce+1)+`:\n`+Be.showPosition()+`\nExpecting `+Ie.join(", ")+", got \'"+(this.terminals_[q]||q)+"\'":ge="Parse error on line "+(ce+1)+": Unexpected "+(q==be?"end of input":"\'"+(this.terminals_[q]||q)+"\'"),this.parseError(ge,{text:Be.match,token:this.terminals_[q]||q,line:Be.yylineno,loc:qe,expected:Ie})}if(he[0]instanceof Array&&he.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ae+", token: "+q);switch(he[0]){case 1:J.push(q),Y.push(Be.yytext),Q.push(Be.yylloc),J.push(he[1]),q=null,de?(q=de,de=null):(te=Be.yyleng,ue=Be.yytext,ce=Be.yylineno,qe=Be.yylloc,Le>0&&Le--);break;case 2:if(Se=this.productions_[he[1]][1],j.$=Y[Y.length-Se],j._$={first_line:Q[Q.length-(Se||1)].first_line,last_line:Q[Q.length-1].last_line,first_column:Q[Q.length-(Se||1)].first_column,last_column:Q[Q.length-1].last_column},Re&&(j._$.range=[Q[Q.length-(Se||1)].range[0],Q[Q.length-1].range[1]]),ke=this.performAction.apply(j,[ue,te,ce,Ve.yy,he[1],Y,Q].concat(Fe)),typeof ke<"u")return ke;Se&&(J=J.slice(0,-1*Se*2),Y=Y.slice(0,-1*Se),Q=Q.slice(0,-1*Se)),J.push(this.productions_[he[1]][0]),Y.push(j.$),Q.push(j._$),Pe=se[J[J.length-2]][J[J.length-1]],J.push(Pe);break;case 3:return!0}}return!0},"parse")},Z=function(){var ie={EOF:1,parseError:v(function(ee,J){if(this.yy.parser)this.yy.parser.parseError(ee,J);else throw new Error(ee)},"parseError"),setInput:v(function(K,ee){return this.yy=ee||this.yy||{},this._input=K,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var K=this._input[0];this.yytext+=K,this.yyleng++,this.offset++,this.match+=K,this.matched+=K;var ee=K.match(/(?:\\r\\n?|\\n).*/g);return ee?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),K},"input"),unput:v(function(K){var ee=K.length,J=K.split(/(?:\\r\\n?|\\n)/g);this._input=K+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ee),this.offset-=ee;var W=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),J.length-1&&(this.yylineno-=J.length-1);var Y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:J?(J.length===W.length?this.yylloc.first_column:0)+W[W.length-J.length].length-J[0].length:this.yylloc.first_column-ee},this.options.ranges&&(this.yylloc.range=[Y[0],Y[0]+this.yyleng-ee]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(K){this.unput(this.match.slice(K))},"less"),pastInput:v(function(){var K=this.matched.substr(0,this.matched.length-this.match.length);return(K.length>20?"...":"")+K.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var K=this.match;return K.length<20&&(K+=this._input.substr(0,20-K.length)),(K.substr(0,20)+(K.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var K=this.pastInput(),ee=new Array(K.length+1).join("-");return K+this.upcomingInput()+`\n`+ee+"^"},"showPosition"),test_match:v(function(K,ee){var J,W,Y;if(this.options.backtrack_lexer&&(Y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Y.yylloc.range=this.yylloc.range.slice(0))),W=K[0].match(/(?:\\r\\n?|\\n).*/g),W&&(this.yylineno+=W.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:W?W[W.length-1].length-W[W.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+K[0].length},this.yytext+=K[0],this.match+=K[0],this.matches=K,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(K[0].length),this.matched+=K[0],J=this.performAction.call(this,this.yy,this,ee,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),J)return J;if(this._backtrack){for(var Q in Y)this[Q]=Y[Q];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var K,ee,J,W;this._more||(this.yytext="",this.match="");for(var Y=this._currentRules(),Q=0;Q<Y.length;Q++)if(J=this._input.match(this.rules[Y[Q]]),J&&(!ee||J[0].length>ee[0].length)){if(ee=J,W=Q,this.options.backtrack_lexer){if(K=this.test_match(J,Y[Q]),K!==!1)return K;if(this._backtrack){ee=!1;continue}else return!1}else if(!this.options.flex)break}return ee?(K=this.test_match(ee,Y[W]),K!==!1?K:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var ee=this.next();return ee||this.lex()},"lex"),begin:v(function(ee){this.conditionStack.push(ee)},"begin"),popState:v(function(){var ee=this.conditionStack.length-1;return ee>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(ee){return ee=this.conditionStack.length-1-Math.abs(ee||0),ee>=0?this.conditionStack[ee]:"INITIAL"},"topState"),pushState:v(function(ee){this.begin(ee)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(ee,J,W,Y){var Q=Y;switch(W){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return J.yytext=J.yytext.trim(),62;break}},"anonymous"),rules:[/^(?:title\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:(\\r?\\n)+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\\b)/i,/^(?:\\{)/i,/^(?:\\})/i,/^(?::)/i,/^(?:id\\b)/i,/^(?:text\\b)/i,/^(?:risk\\b)/i,/^(?:verifyMethod\\b)/i,/^(?:requirement\\b)/i,/^(?:functionalRequirement\\b)/i,/^(?:interfaceRequirement\\b)/i,/^(?:performanceRequirement\\b)/i,/^(?:physicalRequirement\\b)/i,/^(?:designConstraint\\b)/i,/^(?:low\\b)/i,/^(?:medium\\b)/i,/^(?:high\\b)/i,/^(?:analysis\\b)/i,/^(?:demonstration\\b)/i,/^(?:inspection\\b)/i,/^(?:test\\b)/i,/^(?:element\\b)/i,/^(?:contains\\b)/i,/^(?:copies\\b)/i,/^(?:derives\\b)/i,/^(?:satisfies\\b)/i,/^(?:verifies\\b)/i,/^(?:refines\\b)/i,/^(?:traces\\b)/i,/^(?:type\\b)/i,/^(?:docref\\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\\w][^\\r\\n\\{\\<\\>\\-\\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return ie}();H.lexer=Z;function X(){this.yy={}}return v(X,"Parser"),X.prototype=H,H.Parser=X,new X}();uM.parser=uM;yBe=uM,fM=[],Ss={},B2=new Map,Jh={},F2=new Map,xBe={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},bBe={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},wBe={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},kBe={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},TBe=v((t,e)=>(B2.has(t)||B2.set(t,{name:t,type:e,id:Ss.id,text:Ss.text,risk:Ss.risk,verifyMethod:Ss.verifyMethod}),Ss={},B2.get(t)),"addRequirement"),EBe=v(()=>B2,"getRequirements"),SBe=v(t=>{Ss!==void 0&&(Ss.id=t)},"setNewReqId"),CBe=v(t=>{Ss!==void 0&&(Ss.text=t)},"setNewReqText"),ABe=v(t=>{Ss!==void 0&&(Ss.risk=t)},"setNewReqRisk"),_Be=v(t=>{Ss!==void 0&&(Ss.verifyMethod=t)},"setNewReqVerifyMethod"),LBe=v(t=>(F2.has(t)||(F2.set(t,{name:t,type:Jh.type,docRef:Jh.docRef}),re.info("Added new requirement: ",t)),Jh={},F2.get(t)),"addElement"),RBe=v(()=>F2,"getElements"),NBe=v(t=>{Jh!==void 0&&(Jh.type=t)},"setNewElementType"),IBe=v(t=>{Jh!==void 0&&(Jh.docRef=t)},"setNewElementDocRef"),MBe=v((t,e,r)=>{fM.push({type:t,src:e,dst:r})},"addRelationship"),DBe=v(()=>fM,"getRelationships"),OBe=v(()=>{fM=[],Ss={},B2=new Map,Jh={},F2=new Map,xr()},"clear"),PBe={RequirementType:xBe,RiskLevel:bBe,VerifyType:wBe,Relationships:kBe,getConfig:v(()=>pe().req,"getConfig"),addRequirement:TBe,getRequirements:EBe,setNewReqId:SBe,setNewReqText:CBe,setNewReqRisk:ABe,setNewReqVerifyMethod:_Be,setAccTitle:Tr,getAccTitle:Ar,setAccDescription:_r,getAccDescription:Lr,addElement:LBe,getElements:RBe,setNewElementType:NBe,setNewElementDocRef:IBe,addRelationship:MBe,getRelationships:DBe,clear:OBe},BBe=v(t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n\n`,"getStyles"),FBe=BBe,hM={CONTAINS:"contains",ARROW:"arrow"},zBe=v((t,e)=>{let r=t.append("defs").append("marker").attr("id",hM.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",hM.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${e.line_height},${e.line_height/2}\n M${e.line_height},${e.line_height/2}\n L0,${e.line_height}`).attr("stroke-width",1)},"insertLineEndings"),hue={ReqMarkers:hM,insertLineEndings:zBe},ti={},uue=0,fue=v((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",ti.rect_min_width+"px").attr("height",ti.rect_min_height+"px"),"newRectNode"),due=v((t,e,r)=>{let n=ti.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",ti.rect_padding).attr("dominant-baseline","hanging"),a=0;r.forEach(u=>{a==0?i.append("tspan").attr("text-anchor","middle").attr("x",ti.rect_min_width/2).attr("dy",0).text(u):i.append("tspan").attr("text-anchor","middle").attr("x",ti.rect_min_width/2).attr("dy",ti.line_height*.75).text(u),a++});let s=1.5*ti.rect_padding,o=a*ti.line_height*.75,l=s+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",ti.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:i,y:l}},"newTitleNode"),pue=v((t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",ti.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0,s=30,o=[];return r.forEach(l=>{let u=l.length;for(;u>s&&a<3;){let h=l.substring(0,s);l=l.substring(s,l.length),u=l.length,o[o.length]=h,a++}if(a==3){let h=o[o.length-1];o[o.length-1]=h.substring(0,h.length-4)+"..."}else o[o.length]=l;a=0}),o.forEach(l=>{i.append("tspan").attr("x",ti.rect_padding).attr("dy",ti.line_height).text(l)}),i},"newBodyNode"),$Be=v((t,e,r,n)=>{let i=e.node().getTotalLength(),a=e.node().getPointAtLength(i*.5),s="rel"+uue;uue++;let l=t.append("text").attr("class","req relationshipLabel").attr("id",s).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+s).attr("class","req reqLabelBox").attr("x",a.x-l.width/2).attr("y",a.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),GBe=v(function(t,e,r,n,i){let a=r.edge(dm(e.src),dm(e.dst)),s=ss().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",s(a.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?o.attr("marker-start","url("+je.getUrl(ti.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+je.getUrl(ti.arrowMarkerAbsolute)+"#"+hue.ReqMarkers.ARROW+"_line_ending)")),$Be(t,o,ti,`<<${e.type}>>`)},"drawRelationshipFromLayout"),UBe=v((t,e,r)=>{t.forEach((n,i)=>{i=dm(i),re.info("Added new requirement: ",i);let a=r.append("g").attr("id",i),s="req-"+i,o=fue(a,s),l=[],u=due(a,i+"_title",[`<<${n.type}>>`,`${n.name}`]);l.push(u.titleNode);let h=pue(a,i+"_body",[`Id: ${n.id}`,`Text: ${n.text}`,`Risk: ${n.risk}`,`Verification: ${n.verifyMethod}`],u.y);l.push(h);let f=o.node().getBBox();e.setNode(i,{width:f.width,height:f.height,shape:"rect",id:i})})},"drawReqs"),VBe=v((t,e,r)=>{t.forEach((n,i)=>{let a=dm(i),s=r.append("g").attr("id",a),o="element-"+a,l=fue(s,o),u=[],h=due(s,o+"_title",["<<Element>>",`${i}`]);u.push(h.titleNode);let f=pue(s,o+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],h.y);u.push(f);let d=l.node().getBBox();e.setNode(a,{width:d.width,height:d.height,shape:"rect",id:a})})},"drawElements"),WBe=v((t,e)=>(t.forEach(function(r){let n=dm(r.src),i=dm(r.dst);e.setEdge(n,i,{relationship:r})}),t),"addRelationships"),HBe=v(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},"adjustEntities"),dm=v(t=>t.replace(/\\s/g,"").replace(/\\./g,"_"),"elementString"),qBe=v((t,e,r,n)=>{ti=pe().requirement;let i=ti.securityLevel,a;i==="sandbox"&&(a=Ge("#i"+e));let o=(i==="sandbox"?Ge(a.nodes()[0].contentDocument.body):Ge("body")).select(`[id=\'${e}\']`);hue.insertLineEndings(o,ti);let l=new Sr({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:ti.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}}),u=n.db.getRequirements(),h=n.db.getElements(),f=n.db.getRelationships();UBe(u,l,o),VBe(h,l,o),WBe(f,l),bu(l),HBe(o,l),f.forEach(function(x){GBe(o,x,l,e,n)});let d=ti.rect_padding,p=o.node().getBBox(),g=p.width+d*2,m=p.height+d*2;Wr(o,m,g,ti.useMaxWidth),o.attr("viewBox",`${p.x-d} ${p.y-d} ${g} ${m}`)},"draw"),YBe={draw:qBe},XBe={parser:yBe,db:PBe,renderer:YBe,styles:FBe}});var zue={};mr(zue,{diagram:()=>XFe});function OT(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}function vM(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}function Eue(){Ot.records.currentBox=void 0}async function Mue(t,e){Je.bumpVerticalPos(10);let{startx:r,stopx:n,message:i}=e,a=je.splitBreaks(i).length,s=ki(i),o=s?await G0(i,pe()):Wt.calculateTextDimensions(i,c0(_e));if(!s){let f=o.height/a;e.height+=f,Je.bumpVerticalPos(f)}let l,u=o.height-10,h=o.width;if(r===n){l=Je.getVerticalPos()+u,_e.rightAngles||(u+=_e.boxMargin,l=Je.getVerticalPos()+u),u+=30;let f=je.getMax(h/2,_e.width/2);Je.insert(r-f,Je.getVerticalPos()-10+u,n+f,Je.getVerticalPos()+30+u)}else u+=_e.boxMargin,l=Je.getVerticalPos()+u,Je.insert(r,l-10,n,l);return Je.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,Je.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}function Cl(t,e,r,n,i){Je.bumpVerticalPos(r);let a=n;if(e.id&&e.message&&t[e.id]){let s=t[e.id].width,o=c0(_e);e.message=Wt.wrapLabel(`[${e.message}]`,s-2*_e.wrapPadding,o),e.width=s,e.wrap=!0;let l=Wt.calculateTextDimensions(e.message,o),u=je.getMax(l.height,_e.labelBoxHeight);a=n+u,re.debug(`${u} - ${e.message}`)}i(e),Je.bumpVerticalPos(a)}function Pue(t,e,r,n,i,a,s){function o(u,h){u.x<i.get(t.from).x?(Je.insert(e.stopx-h,e.starty,e.startx,e.stopy+u.height/2+_e.noteMargin),e.stopx=e.stopx+h):(Je.insert(e.startx,e.starty,e.stopx+h,e.stopy+u.height/2+_e.noteMargin),e.stopx=e.stopx-h)}v(o,"receiverAdjustment");function l(u,h){u.x<i.get(t.to).x?(Je.insert(e.startx-h,e.starty,e.stopx,e.stopy+u.height/2+_e.noteMargin),e.startx=e.startx+h):(Je.insert(e.stopx,e.starty,e.startx+h,e.stopy+u.height/2+_e.noteMargin),e.startx=e.startx-h)}if(v(l,"senderAdjustment"),a.get(t.to)==n){let u=i.get(t.to),h=u.type=="actor"?o0/2+3:u.width/2+3;o(u,h),u.starty=r-u.height/2,Je.bumpVerticalPos(u.height/2)}else if(s.get(t.from)==n){let u=i.get(t.from);if(_e.mirrorActors){let h=u.type=="actor"?o0/2:u.width/2;l(u,h)}u.stopy=r-u.height/2,Je.bumpVerticalPos(u.height/2)}else if(s.get(t.to)==n){let u=i.get(t.to);if(_e.mirrorActors){let h=u.type=="actor"?o0/2+3:u.width/2+3;o(u,h)}u.stopy=r-u.height/2,Je.bumpVerticalPos(u.height/2)}}async function Bue(t,e,r){let n={};for(let i of e)if(t.get(i.to)&&t.get(i.from)){let a=t.get(i.to);if(i.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)continue;let s=i.placement!==void 0,o=!s,l=s?pm(_e):c0(_e),u=i.wrap?Wt.wrapLabel(i.message,_e.width-2*_e.wrapPadding,l):i.message,f=(ki(u)?await G0(i.message,pe()):Wt.calculateTextDimensions(u,l)).width+2*_e.wrapPadding;o&&i.from===a.nextActor?n[i.to]=je.getMax(n[i.to]||0,f):o&&i.from===a.prevActor?n[i.from]=je.getMax(n[i.from]||0,f):o&&i.from===i.to?(n[i.from]=je.getMax(n[i.from]||0,f/2),n[i.to]=je.getMax(n[i.to]||0,f/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=je.getMax(n[i.from]||0,f):i.placement===r.db.PLACEMENT.LEFTOF?n[a.prevActor]=je.getMax(n[a.prevActor]||0,f):i.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(n[a.prevActor]=je.getMax(n[a.prevActor]||0,f/2)),a.nextActor&&(n[i.from]=je.getMax(n[i.from]||0,f/2)))}return re.debug("maxMessageWidthPerActor:",n),n}async function Fue(t,e,r){let n=0;for(let a of t.keys()){let s=t.get(a);s.wrap&&(s.description=Wt.wrapLabel(s.description,_e.width-2*_e.wrapPadding,gM(_e)));let o=ki(s.description)?await G0(s.description,pe()):Wt.calculateTextDimensions(s.description,gM(_e));s.width=s.wrap?_e.width:je.getMax(_e.width,o.width+2*_e.wrapPadding),s.height=s.wrap?je.getMax(o.height,_e.height):_e.height,n=je.getMax(n,s.height)}for(let a in e){let s=t.get(a);if(!s)continue;let o=t.get(s.nextActor);if(!o){let f=e[a]+_e.actorMargin-s.width/2;s.margin=je.getMax(f,_e.actorMargin);continue}let u=e[a]+_e.actorMargin-s.width/2-o.width/2;s.margin=je.getMax(u,_e.actorMargin)}let i=0;return r.forEach(a=>{let s=c0(_e),o=a.actorKeys.reduce((h,f)=>h+=t.get(f).width+(t.get(f).margin||0),0);o-=2*_e.boxTextMargin,a.wrap&&(a.name=Wt.wrapLabel(a.name,o-2*_e.wrapPadding,s));let l=Wt.calculateTextDimensions(a.name,s);i=je.getMax(l.height,i);let u=je.getMax(o,l.width+2*_e.wrapPadding);if(a.margin=_e.boxTextMargin,o<u){let h=(u-o)/2;a.margin+=h}}),r.forEach(a=>a.textMaxHeight=i),je.getMax(n,_e.height)}var yM,dM,jBe,Ot,KBe,pM,ZBe,QBe,ci,JBe,eFe,tFe,rFe,nFe,iFe,aFe,$2,sFe,oFe,lFe,cFe,uFe,bue,l0,hFe,fFe,dFe,z2,pFe,gFe,wue,kue,mFe,Tue,Sue,vFe,Cue,vue,yFe,xFe,o0,Aue,_ue,bFe,yue,xM,wFe,kFe,DT,gm,Lue,Lc,Rue,TFe,EFe,SFe,CFe,AFe,_Fe,LFe,Nue,RFe,NFe,IFe,MFe,DFe,OFe,PFe,Iue,BFe,bM,FFe,ui,_e,Je,zFe,c0,pm,gM,$Fe,GFe,mM,Due,Oue,PT,xue,UFe,VFe,WFe,HFe,qFe,YFe,XFe,$ue=F(()=>{yw();Mw();xn();or();lr();yM=ga(Q0(),1),dM=function(){var t=v(function(W,Y,Q,se){for(Q=Q||{},se=W.length;se--;Q[W[se]]=Y);return Q},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,13],l=[1,14],u=[1,16],h=[1,17],f=[1,18],d=[1,24],p=[1,25],g=[1,26],m=[1,27],x=[1,28],y=[1,29],b=[1,30],w=[1,31],_=[1,32],k=[1,33],E=[1,34],L=[1,35],S=[1,36],C=[1,37],M=[1,38],R=[1,39],T=[1,41],I=[1,42],A=[1,43],D=[1,44],N=[1,45],O=[1,46],B=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],P=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],H=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],X=[68,69,70],ie=[1,122],K={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:v(function(Y,Q,se,ue,ce,te,Le){var oe=te.length-1;switch(ce){case 3:return ue.apply(te[oe]),te[oe];break;case 4:case 9:this.$=[];break;case 5:case 10:te[oe-1].push(te[oe]),this.$=te[oe-1];break;case 6:case 7:case 11:case 12:this.$=te[oe];break;case 8:case 13:this.$=[];break;case 15:te[oe].type="createParticipant",this.$=te[oe];break;case 16:te[oe-1].unshift({type:"boxStart",boxData:ue.parseBoxData(te[oe-2])}),te[oe-1].push({type:"boxEnd",boxText:te[oe-2]}),this.$=te[oe-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(te[oe-2]),sequenceIndexStep:Number(te[oe-1]),sequenceVisible:!0,signalType:ue.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(te[oe-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:ue.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:ue.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:ue.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:ue.LINETYPE.ACTIVE_START,actor:te[oe-1].actor};break;case 23:this.$={type:"activeEnd",signalType:ue.LINETYPE.ACTIVE_END,actor:te[oe-1].actor};break;case 29:ue.setDiagramTitle(te[oe].substring(6)),this.$=te[oe].substring(6);break;case 30:ue.setDiagramTitle(te[oe].substring(7)),this.$=te[oe].substring(7);break;case 31:this.$=te[oe].trim(),ue.setAccTitle(this.$);break;case 32:case 33:this.$=te[oe].trim(),ue.setAccDescription(this.$);break;case 34:te[oe-1].unshift({type:"loopStart",loopText:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.LOOP_START}),te[oe-1].push({type:"loopEnd",loopText:te[oe-2],signalType:ue.LINETYPE.LOOP_END}),this.$=te[oe-1];break;case 35:te[oe-1].unshift({type:"rectStart",color:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.RECT_START}),te[oe-1].push({type:"rectEnd",color:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.RECT_END}),this.$=te[oe-1];break;case 36:te[oe-1].unshift({type:"optStart",optText:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.OPT_START}),te[oe-1].push({type:"optEnd",optText:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.OPT_END}),this.$=te[oe-1];break;case 37:te[oe-1].unshift({type:"altStart",altText:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.ALT_START}),te[oe-1].push({type:"altEnd",signalType:ue.LINETYPE.ALT_END}),this.$=te[oe-1];break;case 38:te[oe-1].unshift({type:"parStart",parText:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.PAR_START}),te[oe-1].push({type:"parEnd",signalType:ue.LINETYPE.PAR_END}),this.$=te[oe-1];break;case 39:te[oe-1].unshift({type:"parStart",parText:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.PAR_OVER_START}),te[oe-1].push({type:"parEnd",signalType:ue.LINETYPE.PAR_END}),this.$=te[oe-1];break;case 40:te[oe-1].unshift({type:"criticalStart",criticalText:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.CRITICAL_START}),te[oe-1].push({type:"criticalEnd",signalType:ue.LINETYPE.CRITICAL_END}),this.$=te[oe-1];break;case 41:te[oe-1].unshift({type:"breakStart",breakText:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.BREAK_START}),te[oe-1].push({type:"breakEnd",optText:ue.parseMessage(te[oe-2]),signalType:ue.LINETYPE.BREAK_END}),this.$=te[oe-1];break;case 43:this.$=te[oe-3].concat([{type:"option",optionText:ue.parseMessage(te[oe-1]),signalType:ue.LINETYPE.CRITICAL_OPTION},te[oe]]);break;case 45:this.$=te[oe-3].concat([{type:"and",parText:ue.parseMessage(te[oe-1]),signalType:ue.LINETYPE.PAR_AND},te[oe]]);break;case 47:this.$=te[oe-3].concat([{type:"else",altText:ue.parseMessage(te[oe-1]),signalType:ue.LINETYPE.ALT_ELSE},te[oe]]);break;case 48:te[oe-3].draw="participant",te[oe-3].type="addParticipant",te[oe-3].description=ue.parseMessage(te[oe-1]),this.$=te[oe-3];break;case 49:te[oe-1].draw="participant",te[oe-1].type="addParticipant",this.$=te[oe-1];break;case 50:te[oe-3].draw="actor",te[oe-3].type="addParticipant",te[oe-3].description=ue.parseMessage(te[oe-1]),this.$=te[oe-3];break;case 51:te[oe-1].draw="actor",te[oe-1].type="addParticipant",this.$=te[oe-1];break;case 52:te[oe-1].type="destroyParticipant",this.$=te[oe-1];break;case 53:this.$=[te[oe-1],{type:"addNote",placement:te[oe-2],actor:te[oe-1].actor,text:te[oe]}];break;case 54:te[oe-2]=[].concat(te[oe-1],te[oe-1]).slice(0,2),te[oe-2][0]=te[oe-2][0].actor,te[oe-2][1]=te[oe-2][1].actor,this.$=[te[oe-1],{type:"addNote",placement:ue.PLACEMENT.OVER,actor:te[oe-2].slice(0,2),text:te[oe]}];break;case 55:this.$=[te[oe-1],{type:"addLinks",actor:te[oe-1].actor,text:te[oe]}];break;case 56:this.$=[te[oe-1],{type:"addALink",actor:te[oe-1].actor,text:te[oe]}];break;case 57:this.$=[te[oe-1],{type:"addProperties",actor:te[oe-1].actor,text:te[oe]}];break;case 58:this.$=[te[oe-1],{type:"addDetails",actor:te[oe-1].actor,text:te[oe]}];break;case 61:this.$=[te[oe-2],te[oe]];break;case 62:this.$=te[oe];break;case 63:this.$=ue.PLACEMENT.LEFTOF;break;case 64:this.$=ue.PLACEMENT.RIGHTOF;break;case 65:this.$=[te[oe-4],te[oe-1],{type:"addMessage",from:te[oe-4].actor,to:te[oe-1].actor,signalType:te[oe-3],msg:te[oe],activate:!0},{type:"activeStart",signalType:ue.LINETYPE.ACTIVE_START,actor:te[oe-1].actor}];break;case 66:this.$=[te[oe-4],te[oe-1],{type:"addMessage",from:te[oe-4].actor,to:te[oe-1].actor,signalType:te[oe-3],msg:te[oe]},{type:"activeEnd",signalType:ue.LINETYPE.ACTIVE_END,actor:te[oe-4].actor}];break;case 67:this.$=[te[oe-3],te[oe-1],{type:"addMessage",from:te[oe-3].actor,to:te[oe-1].actor,signalType:te[oe-2],msg:te[oe]}];break;case 68:this.$={type:"addParticipant",actor:te[oe]};break;case 69:this.$=ue.LINETYPE.SOLID_OPEN;break;case 70:this.$=ue.LINETYPE.DOTTED_OPEN;break;case 71:this.$=ue.LINETYPE.SOLID;break;case 72:this.$=ue.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=ue.LINETYPE.DOTTED;break;case 74:this.$=ue.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=ue.LINETYPE.SOLID_CROSS;break;case 76:this.$=ue.LINETYPE.DOTTED_CROSS;break;case 77:this.$=ue.LINETYPE.SOLID_POINT;break;case 78:this.$=ue.LINETYPE.DOTTED_POINT;break;case 79:this.$=ue.parseMessage(te[oe].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,12:12,13:o,14:l,17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:x,36:y,37:b,38:w,39:_,41:k,43:E,44:L,46:S,50:C,52:M,53:R,54:T,59:I,60:A,61:D,62:N,70:O},t(B,[2,5]),{9:47,12:12,13:o,14:l,17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:x,36:y,37:b,38:w,39:_,41:k,43:E,44:L,46:S,50:C,52:M,53:R,54:T,59:I,60:A,61:D,62:N,70:O},t(B,[2,7]),t(B,[2,8]),t(B,[2,14]),{12:48,50:C,52:M,53:R},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:O},{22:55,70:O},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(B,[2,29]),t(B,[2,30]),{32:[1,61]},{34:[1,62]},t(B,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:O},{22:72,70:O},{22:73,70:O},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:O},{22:90,70:O},{22:91,70:O},{22:92,70:O},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(B,[2,6]),t(B,[2,15]),t(P,[2,9],{10:93}),t(B,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(B,[2,21]),{5:[1,97]},{5:[1,98]},t(B,[2,24]),t(B,[2,25]),t(B,[2,26]),t(B,[2,27]),t(B,[2,28]),t(B,[2,31]),t(B,[2,32]),t($,i,{7:99}),t($,i,{7:100}),t($,i,{7:101}),t(z,i,{40:102,7:103}),t(H,i,{42:104,7:105}),t(H,i,{7:105,42:106}),t(Z,i,{45:107,7:108}),t($,i,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:O},t(X,[2,69]),t(X,[2,70]),t(X,[2,71]),t(X,[2,72]),t(X,[2,73]),t(X,[2,74]),t(X,[2,75]),t(X,[2,76]),t(X,[2,77]),t(X,[2,78]),{22:118,70:O},{22:120,58:119,70:O},{70:[2,63]},{70:[2,64]},{56:121,81:ie},{56:123,81:ie},{56:124,81:ie},{56:125,81:ie},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:C,52:M,53:R},{5:[1,131]},t(B,[2,19]),t(B,[2,20]),t(B,[2,22]),t(B,[2,23]),{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,132],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:x,36:y,37:b,38:w,39:_,41:k,43:E,44:L,46:S,50:C,52:M,53:R,54:T,59:I,60:A,61:D,62:N,70:O},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,133],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:x,36:y,37:b,38:w,39:_,41:k,43:E,44:L,46:S,50:C,52:M,53:R,54:T,59:I,60:A,61:D,62:N,70:O},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,134],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:x,36:y,37:b,38:w,39:_,41:k,43:E,44:L,46:S,50:C,52:M,53:R,54:T,59:I,60:A,61:D,62:N,70:O},{16:[1,135]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,46],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:x,36:y,37:b,38:w,39:_,41:k,43:E,44:L,46:S,49:[1,136],50:C,52:M,53:R,54:T,59:I,60:A,61:D,62:N,70:O},{16:[1,137]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,44],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:x,36:y,37:b,38:w,39:_,41:k,43:E,44:L,46:S,48:[1,138],50:C,52:M,53:R,54:T,59:I,60:A,61:D,62:N,70:O},{16:[1,139]},{16:[1,140]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,42],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:x,36:y,37:b,38:w,39:_,41:k,43:E,44:L,46:S,47:[1,141],50:C,52:M,53:R,54:T,59:I,60:A,61:D,62:N,70:O},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,142],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:g,33:m,35:x,36:y,37:b,38:w,39:_,41:k,43:E,44:L,46:S,50:C,52:M,53:R,54:T,59:I,60:A,61:D,62:N,70:O},{15:[1,143]},t(B,[2,49]),{15:[1,144]},t(B,[2,51]),t(B,[2,52]),{22:145,70:O},{22:146,70:O},{56:147,81:ie},{56:148,81:ie},{56:149,81:ie},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(B,[2,16]),t(P,[2,10]),{12:151,50:C,52:M,53:R},t(P,[2,12]),t(P,[2,13]),t(B,[2,18]),t(B,[2,34]),t(B,[2,35]),t(B,[2,36]),t(B,[2,37]),{15:[1,152]},t(B,[2,38]),{15:[1,153]},t(B,[2,39]),t(B,[2,40]),{15:[1,154]},t(B,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:ie},{56:158,81:ie},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:O},t(P,[2,11]),t(z,i,{7:103,40:160}),t(H,i,{7:105,42:161}),t(Z,i,{7:108,45:162}),t(B,[2,48]),t(B,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:v(function(Y,Q){if(Q.recoverable)this.trace(Y);else{var se=new Error(Y);throw se.hash=Q,se}},"parseError"),parse:v(function(Y){var Q=this,se=[0],ue=[],ce=[null],te=[],Le=this.table,oe="",be=0,Fe=0,Be=0,Ve=2,We=1,qe=te.slice.call(arguments,1),Re=Object.create(this.lexer),Me={yy:{}};for(var ye in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ye)&&(Me.yy[ye]=this.yy[ye]);Re.setInput(Y,Me.yy),Me.yy.lexer=Re,Me.yy.parser=this,typeof Re.yylloc>"u"&&(Re.yylloc={});var q=Re.yylloc;te.push(q);var de=Re.options&&Re.options.ranges;typeof Me.yy.parseError=="function"?this.parseError=Me.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(wt){se.length=se.length-2*wt,ce.length=ce.length-wt,te.length=te.length-wt}v(ae,"popStack");function he(){var wt;return wt=ue.pop()||Re.lex()||We,typeof wt!="number"&&(wt instanceof Array&&(ue=wt,wt=ue.pop()),wt=Q.symbols_[wt]||wt),wt}v(he,"lex");for(var U,ke,j,me,Se,Pe,Ie={},ge,ze,Ae,Ye;;){if(j=se[se.length-1],this.defaultActions[j]?me=this.defaultActions[j]:((U===null||typeof U>"u")&&(U=he()),me=Le[j]&&Le[j][U]),typeof me>"u"||!me.length||!me[0]){var it="";Ye=[];for(ge in Le[j])this.terminals_[ge]&&ge>Ve&&Ye.push("\'"+this.terminals_[ge]+"\'");Re.showPosition?it="Parse error on line "+(be+1)+`:\n`+Re.showPosition()+`\nExpecting `+Ye.join(", ")+", got \'"+(this.terminals_[U]||U)+"\'":it="Parse error on line "+(be+1)+": Unexpected "+(U==We?"end of input":"\'"+(this.terminals_[U]||U)+"\'"),this.parseError(it,{text:Re.match,token:this.terminals_[U]||U,line:Re.yylineno,loc:q,expected:Ye})}if(me[0]instanceof Array&&me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+U);switch(me[0]){case 1:se.push(U),ce.push(Re.yytext),te.push(Re.yylloc),se.push(me[1]),U=null,ke?(U=ke,ke=null):(Fe=Re.yyleng,oe=Re.yytext,be=Re.yylineno,q=Re.yylloc,Be>0&&Be--);break;case 2:if(ze=this.productions_[me[1]][1],Ie.$=ce[ce.length-ze],Ie._$={first_line:te[te.length-(ze||1)].first_line,last_line:te[te.length-1].last_line,first_column:te[te.length-(ze||1)].first_column,last_column:te[te.length-1].last_column},de&&(Ie._$.range=[te[te.length-(ze||1)].range[0],te[te.length-1].range[1]]),Pe=this.performAction.apply(Ie,[oe,Fe,be,Me.yy,me[1],ce,te].concat(qe)),typeof Pe<"u")return Pe;ze&&(se=se.slice(0,-1*ze*2),ce=ce.slice(0,-1*ze),te=te.slice(0,-1*ze)),se.push(this.productions_[me[1]][0]),ce.push(Ie.$),te.push(Ie._$),Ae=Le[se[se.length-2]][se[se.length-1]],se.push(Ae);break;case 3:return!0}}return!0},"parse")},ee=function(){var W={EOF:1,parseError:v(function(Q,se){if(this.yy.parser)this.yy.parser.parseError(Q,se);else throw new Error(Q)},"parseError"),setInput:v(function(Y,Q){return this.yy=Q||this.yy||{},this._input=Y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var Q=Y.match(/(?:\\r\\n?|\\n).*/g);return Q?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Y},"input"),unput:v(function(Y){var Q=Y.length,se=Y.split(/(?:\\r\\n?|\\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Q),this.offset-=Q;var ue=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),se.length-1&&(this.yylineno-=se.length-1);var ce=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:se?(se.length===ue.length?this.yylloc.first_column:0)+ue[ue.length-se.length].length-se[0].length:this.yylloc.first_column-Q},this.options.ranges&&(this.yylloc.range=[ce[0],ce[0]+this.yyleng-Q]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(Y){this.unput(this.match.slice(Y))},"less"),pastInput:v(function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var Y=this.pastInput(),Q=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+`\n`+Q+"^"},"showPosition"),test_match:v(function(Y,Q){var se,ue,ce;if(this.options.backtrack_lexer&&(ce={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ce.yylloc.range=this.yylloc.range.slice(0))),ue=Y[0].match(/(?:\\r\\n?|\\n).*/g),ue&&(this.yylineno+=ue.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ue?ue[ue.length-1].length-ue[ue.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Y[0].length),this.matched+=Y[0],se=this.performAction.call(this,this.yy,this,Q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),se)return se;if(this._backtrack){for(var te in ce)this[te]=ce[te];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Y,Q,se,ue;this._more||(this.yytext="",this.match="");for(var ce=this._currentRules(),te=0;te<ce.length;te++)if(se=this._input.match(this.rules[ce[te]]),se&&(!Q||se[0].length>Q[0].length)){if(Q=se,ue=te,this.options.backtrack_lexer){if(Y=this.test_match(se,ce[te]),Y!==!1)return Y;if(this._backtrack){Q=!1;continue}else return!1}else if(!this.options.flex)break}return Q?(Y=this.test_match(Q,ce[ue]),Y!==!1?Y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var Q=this.next();return Q||this.lex()},"lex"),begin:v(function(Q){this.conditionStack.push(Q)},"begin"),popState:v(function(){var Q=this.conditionStack.length-1;return Q>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(Q){return Q=this.conditionStack.length-1-Math.abs(Q||0),Q>=0?this.conditionStack[Q]:"INITIAL"},"topState"),pushState:v(function(Q){this.begin(Q)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(Q,se,ue,ce){var te=ce;switch(ue){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;break;case 8:return this.begin("ID"),50;break;case 9:return this.begin("ID"),52;break;case 10:return 13;case 11:return this.begin("ID"),53;break;case 12:return se.yytext=se.yytext.trim(),this.begin("ALIAS"),70;break;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 14:return this.popState(),this.popState(),5;break;case 15:return this.begin("LINE"),36;break;case 16:return this.begin("LINE"),37;break;case 17:return this.begin("LINE"),38;break;case 18:return this.begin("LINE"),39;break;case 19:return this.begin("LINE"),49;break;case 20:return this.begin("LINE"),41;break;case 21:return this.begin("LINE"),43;break;case 22:return this.begin("LINE"),48;break;case 23:return this.begin("LINE"),44;break;case 24:return this.begin("LINE"),47;break;case 25:return this.begin("LINE"),46;break;case 26:return this.popState(),15;break;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;break;case 37:return this.begin("ID"),23;break;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;break;case 41:return this.popState(),"acc_title_value";break;case 42:return this.begin("acc_descr"),33;break;case 43:return this.popState(),"acc_descr_value";break;case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return se.yytext=se.yytext.trim(),70;break;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[0-9]+(?=[ \\n]+))/i,/^(?:box\\b)/i,/^(?:participant\\b)/i,/^(?:actor\\b)/i,/^(?:create\\b)/i,/^(?:destroy\\b)/i,/^(?:[^\\<->\\->:\\n,;]+?([\\-]*[^\\<->\\->:\\n,;]+?)*?(?=((?!\\n)\\s)+as(?!\\n)\\s|[#\\n;]|$))/i,/^(?:as\\b)/i,/^(?:(?:))/i,/^(?:loop\\b)/i,/^(?:rect\\b)/i,/^(?:opt\\b)/i,/^(?:alt\\b)/i,/^(?:else\\b)/i,/^(?:par\\b)/i,/^(?:par_over\\b)/i,/^(?:and\\b)/i,/^(?:critical\\b)/i,/^(?:option\\b)/i,/^(?:break\\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\\n;]*)/i,/^(?:end\\b)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:links\\b)/i,/^(?:link\\b)/i,/^(?:properties\\b)/i,/^(?:details\\b)/i,/^(?:over\\b)/i,/^(?:note\\b)/i,/^(?:activate\\b)/i,/^(?:deactivate\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:title:\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:sequenceDiagram\\b)/i,/^(?:autonumber\\b)/i,/^(?:off\\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\\+\\<->\\->:\\n,;]+((?!(-x|--x|-\\)|--\\)))[\\-]*[^\\+\\<->\\->:\\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\\)])/i,/^(?:--[\\)])/i,/^(?::(?:(?:no)?wrap)?[^#\\n;]+)/i,/^(?:\\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return W}();K.lexer=ee;function J(){this.yy={}}return v(J,"Parser"),J.prototype=K,K.Parser=J,new J}();dM.parser=dM;jBe=dM,Ot=new vg(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),KBe=v(function(t){Ot.records.boxes.push({name:t.text,wrap:t.wrap??l0(),fill:t.color,actorKeys:[]}),Ot.records.currentBox=Ot.records.boxes.slice(-1)[0]},"addBox"),pM=v(function(t,e,r,n){let i=Ot.records.currentBox,a=Ot.records.actors.get(t);if(a){if(Ot.records.currentBox&&a.box&&Ot.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can\'t be in \'${a.box.name}\' and in \'${Ot.records.currentBox.name}\' at the same time.`);if(i=a.box?a.box:Ot.records.currentBox,a.box=i,a&&e===a.name&&r==null)return}if(r?.text==null&&(r={text:e,type:n}),(n==null||r.text==null)&&(r={text:e,type:n}),Ot.records.actors.set(t,{box:i,name:e,description:r.text,wrap:r.wrap??l0(),prevActor:Ot.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),Ot.records.prevActor){let s=Ot.records.actors.get(Ot.records.prevActor);s&&(s.nextActor=t)}Ot.records.currentBox&&Ot.records.currentBox.actorKeys.push(t),Ot.records.prevActor=t},"addActor"),ZBe=v(t=>{let e,r=0;if(!t)return 0;for(e=0;e<Ot.records.messages.length;e++)Ot.records.messages[e].type===z2.ACTIVE_START&&Ot.records.messages[e].from===t&&r++,Ot.records.messages[e].type===z2.ACTIVE_END&&Ot.records.messages[e].from===t&&r--;return r},"activationCount"),QBe=v(function(t,e,r,n){Ot.records.messages.push({from:t,to:e,message:r.text,wrap:r.wrap??l0(),answer:n})},"addMessage"),ci=v(function(t,e,r,n,i=!1){if(n===z2.ACTIVE_END&&ZBe(t??"")<1){let s=new Error("Trying to inactivate an inactive participant ("+t+")");throw s.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["\'ACTIVE_PARTICIPANT\'"]},s}return Ot.records.messages.push({from:t,to:e,message:r?.text??"",wrap:r?.wrap??l0(),type:n,activate:i}),!0},"addSignal"),JBe=v(function(){return Ot.records.boxes.length>0},"hasAtLeastOneBox"),eFe=v(function(){return Ot.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),tFe=v(function(){return Ot.records.messages},"getMessages"),rFe=v(function(){return Ot.records.boxes},"getBoxes"),nFe=v(function(){return Ot.records.actors},"getActors"),iFe=v(function(){return Ot.records.createdActors},"getCreatedActors"),aFe=v(function(){return Ot.records.destroyedActors},"getDestroyedActors"),$2=v(function(t){return Ot.records.actors.get(t)},"getActor"),sFe=v(function(){return[...Ot.records.actors.keys()]},"getActorKeys"),oFe=v(function(){Ot.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),lFe=v(function(){Ot.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),cFe=v(()=>Ot.records.sequenceNumbersEnabled,"showSequenceNumbers"),uFe=v(function(t){Ot.records.wrapEnabled=t},"setWrap"),bue=v(t=>{if(t===void 0)return{};t=t.trim();let e=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(e===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}},"extractWrap"),l0=v(()=>Ot.records.wrapEnabled!==void 0?Ot.records.wrapEnabled:pe().sequence?.wrap??!1,"autoWrap"),hFe=v(function(){Ot.reset(),xr()},"clear"),fFe=v(function(t){let e=t.trim(),{wrap:r,cleanedText:n}=bue(e),i={text:n,wrap:r};return re.debug(`parseMessage: ${JSON.stringify(i)}`),i},"parseMessage"),dFe=v(function(t){let e=/^((?:rgba?|hsla?)\\s*\\(.*\\)|\\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",n=t.trim());else{let s=new Option().style;s.color=r,s.color!==r&&(r="transparent",n=t.trim())}let{wrap:i,cleanedText:a}=bue(n);return{text:a?yr(a,pe()):void 0,color:r,wrap:i}},"parseBoxData"),z2={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},pFe={FILLED:0,OPEN:1},gFe={LEFTOF:0,RIGHTOF:1,OVER:2},wue=v(function(t,e,r){let n={actor:t,placement:e,message:r.text,wrap:r.wrap??l0()},i=[].concat(t,t);Ot.records.notes.push(n),Ot.records.messages.push({from:i[0],to:i[1],message:r.text,wrap:r.wrap??l0(),type:z2.NOTE,placement:e})},"addNote"),kue=v(function(t,e){let r=$2(t);try{let n=yr(e.text,pe());n=n.replace(/&/g,"&"),n=n.replace(/=/g,"=");let i=JSON.parse(n);OT(r,i)}catch(n){re.error("error while parsing actor link text",n)}},"addLinks"),mFe=v(function(t,e){let r=$2(t);try{let n={},i=yr(e.text,pe()),a=i.indexOf("@");i=i.replace(/&/g,"&"),i=i.replace(/=/g,"=");let s=i.slice(0,a-1).trim(),o=i.slice(a+1).trim();n[s]=o,OT(r,n)}catch(n){re.error("error while parsing actor link text",n)}},"addALink");v(OT,"insertLinks");Tue=v(function(t,e){let r=$2(t);try{let n=yr(e.text,pe()),i=JSON.parse(n);vM(r,i)}catch(n){re.error("error while parsing actor properties text",n)}},"addProperties");v(vM,"insertProperties");v(Eue,"boxEnd");Sue=v(function(t,e){let r=$2(t),n=document.getElementById(e.text);try{let i=n.innerHTML,a=JSON.parse(i);a.properties&&vM(r,a.properties),a.links&&OT(r,a.links)}catch(i){re.error("error while parsing actor details text",i)}},"addDetails"),vFe=v(function(t,e){if(t?.properties!==void 0)return t.properties[e]},"getActorProperty"),Cue=v(function(t){if(Array.isArray(t))t.forEach(function(e){Cue(e)});else switch(t.type){case"sequenceIndex":Ot.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":pM(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(Ot.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use \'AS\' aliases to simulate the behavior");Ot.records.lastCreated=t.actor,pM(t.actor,t.actor,t.description,t.draw),Ot.records.createdActors.set(t.actor,Ot.records.messages.length);break;case"destroyParticipant":Ot.records.lastDestroyed=t.actor,Ot.records.destroyedActors.set(t.actor,Ot.records.messages.length);break;case"activeStart":ci(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":ci(t.actor,void 0,void 0,t.signalType);break;case"addNote":wue(t.actor,t.placement,t.text);break;case"addLinks":kue(t.actor,t.text);break;case"addALink":mFe(t.actor,t.text);break;case"addProperties":Tue(t.actor,t.text);break;case"addDetails":Sue(t.actor,t.text);break;case"addMessage":if(Ot.records.lastCreated){if(t.to!==Ot.records.lastCreated)throw new Error("The created participant "+Ot.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");Ot.records.lastCreated=void 0}else if(Ot.records.lastDestroyed){if(t.to!==Ot.records.lastDestroyed&&t.from!==Ot.records.lastDestroyed)throw new Error("The destroyed participant "+Ot.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");Ot.records.lastDestroyed=void 0}ci(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":KBe(t.boxData);break;case"boxEnd":Eue();break;case"loopStart":ci(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":ci(void 0,void 0,void 0,t.signalType);break;case"rectStart":ci(void 0,void 0,t.color,t.signalType);break;case"rectEnd":ci(void 0,void 0,void 0,t.signalType);break;case"optStart":ci(void 0,void 0,t.optText,t.signalType);break;case"optEnd":ci(void 0,void 0,void 0,t.signalType);break;case"altStart":ci(void 0,void 0,t.altText,t.signalType);break;case"else":ci(void 0,void 0,t.altText,t.signalType);break;case"altEnd":ci(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":Tr(t.text);break;case"parStart":ci(void 0,void 0,t.parText,t.signalType);break;case"and":ci(void 0,void 0,t.parText,t.signalType);break;case"parEnd":ci(void 0,void 0,void 0,t.signalType);break;case"criticalStart":ci(void 0,void 0,t.criticalText,t.signalType);break;case"option":ci(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":ci(void 0,void 0,void 0,t.signalType);break;case"breakStart":ci(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":ci(void 0,void 0,void 0,t.signalType);break}},"apply"),vue={addActor:pM,addMessage:QBe,addSignal:ci,addLinks:kue,addDetails:Sue,addProperties:Tue,autoWrap:l0,setWrap:uFe,enableSequenceNumbers:oFe,disableSequenceNumbers:lFe,showSequenceNumbers:cFe,getMessages:tFe,getActors:nFe,getCreatedActors:iFe,getDestroyedActors:aFe,getActor:$2,getActorKeys:sFe,getActorProperty:vFe,getAccTitle:Ar,getBoxes:rFe,getDiagramTitle:Hr,setDiagramTitle:en,getConfig:v(()=>pe().sequence,"getConfig"),clear:hFe,parseMessage:fFe,parseBoxData:dFe,LINETYPE:z2,ARROWTYPE:pFe,PLACEMENT:gFe,addNote:wue,setAccTitle:Tr,apply:Cue,setAccDescription:_r,getAccDescription:Lr,hasAtLeastOneBox:JBe,hasAtLeastOneBoxWithTitle:eFe},yFe=v(t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`,"getStyles"),xFe=yFe,o0=18*2,Aue="actor-top",_ue="actor-bottom",bFe="actor-box",yue="actor-man",xM=v(function(t,e){return Ed(t,e)},"drawRect"),wFe=v(function(t,e,r,n,i){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let a=e.links,s=e.actorCnt,o=e.rectData;var l="none";i&&(l="block !important");let u=t.append("g");u.attr("id","actor"+s+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l);var h="";o.class!==void 0&&(h=" "+o.class);let f=o.width>r?o.width:r,d=u.append("rect");if(d.attr("class","actorPopupMenuPanel"+h),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",f),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),a!=null){var p=20;for(let x in a){var g=u.append("a"),m=(0,yM.sanitizeUrl)(a[x]);g.attr("xlink:href",m),g.attr("target","_blank"),FFe(n)(x,g,o.x+10,o.height+p,f,20,{class:"actor"},n),p+=30}}return d.attr("height",p),{height:o.height+p,width:f}},"drawPopup"),kFe=v(function(t){return"var pu = document.getElementById(\'"+t+"\'); if (pu != null) { pu.style.display = pu.style.display == \'block\' ? \'none\' : \'block\'; }"},"popupMenuToggle"),DT=v(async function(t,e,r=null){let n=t.append("foreignObject"),i=await rh(e.text,Or()),s=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),e.class==="noteText"){let o=t.node().firstChild;o.setAttribute("height",s.height+2*e.textMargin);let l=o.getBBox();n.attr("x",Math.round(l.x+l.width/2-s.width/2)).attr("y",Math.round(l.y+l.height/2-s.height/2))}else if(r){let{startx:o,stopx:l,starty:u}=r;if(o>l){let h=o;o=l,l=h}n.attr("x",Math.round(o+Math.abs(o-l)/2-s.width/2)),e.class==="loopText"?n.attr("y",Math.round(u)):n.attr("y",Math.round(u-s.height))}return[n]},"drawKatex"),gm=v(function(t,e){let r=0,n=0,i=e.text.split(je.lineBreakRegex),[a,s]=To(e.fontSize),o=[],l=0,u=v(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":u=v(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":u=v(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":u=v(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[h,f]of i.entries()){e.textMargin!==void 0&&e.textMargin===0&&a!==void 0&&(l=h*a);let d=t.append("text");d.attr("x",e.x),d.attr("y",u()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),s!==void 0&&d.style("font-size",s),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):l!==0&&d.attr("dy",l);let p=f||tA;if(e.tspan){let g=d.append("tspan");g.attr("x",e.x),e.fill!==void 0&&g.attr("fill",e.fill),g.text(p)}else d.text(p);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(d._groups||d)[0][0].getBBox().height,r=n),o.push(d)}return o},"drawText"),Lue=v(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}v(r,"genPoints");let n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,gm(t,e),n},"drawLabel"),Lc=-1,Rue=v((t,e,r,n)=>{t.select&&r.forEach(i=>{let a=e.get(i),s=t.select("#actor"+a.actorCnt);!n.mirrorActors&&a.stopy?s.attr("y2",a.stopy+a.height/2):n.mirrorActors&&s.attr("y2",a.stopy)})},"fixLifeLineHeights"),TFe=v(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t.append("g").lower();var l=o;n||(Lc++,Object.keys(e.links||{}).length&&!r.forceMenus&&l.attr("onclick",kFe(`actor${Lc}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+Lc).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),l=o.append("g"),e.actorCnt=Lc,e.links!=null&&l.attr("id","root-"+Lc));let u=dc();var h="actor";e.properties?.class?h=e.properties.class:u.fill="#eaeaea",n?h+=` ${_ue}`:h+=` ${Aue}`,u.x=e.x,u.y=i,u.width=e.width,u.height=e.height,u.class=h,u.rx=3,u.ry=3,u.name=e.name;let f=xM(l,u);if(e.rectData=u,e.properties?.icon){let p=e.properties.icon.trim();p.charAt(0)==="@"?one(l,u.x+u.width-20,u.y+10,p.substr(1)):sne(l,u.x+u.width-20,u.y+10,p)}bM(r,ki(e.description))(e.description,l,u.x,u.y,u.width,u.height,{class:`actor ${bFe}`},r);let d=e.height;if(f.node){let p=f.node().getBBox();e.height=p.height,d=p.height}return d},"drawActorTypeParticipant"),EFe=v(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower();n||(Lc++,o.append("line").attr("id","actor"+Lc).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=Lc);let l=t.append("g"),u=yue;n?u+=` ${_ue}`:u+=` ${Aue}`,l.attr("class",u),l.attr("name",e.name);let h=dc();h.x=e.x,h.y=i,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor",h.rx=3,h.ry=3,l.append("line").attr("id","actor-man-torso"+Lc).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+Lc).attr("x1",a-o0/2).attr("y1",i+33).attr("x2",a+o0/2).attr("y2",i+33),l.append("line").attr("x1",a-o0/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+o0/2-2).attr("y2",i+60);let f=l.append("circle");f.attr("cx",e.x+e.width/2),f.attr("cy",i+10),f.attr("r",15),f.attr("width",e.width),f.attr("height",e.height);let d=l.node().getBBox();return e.height=d.height,bM(r,ki(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:`actor ${yue}`},r),e.height},"drawActorTypeActor"),SFe=v(async function(t,e,r,n){switch(e.type){case"actor":return await EFe(t,e,r,n);case"participant":return await TFe(t,e,r,n)}},"drawActor"),CFe=v(function(t,e,r){let i=t.append("g");Nue(i,e),e.name&&bM(r)(e.name,i,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),i.lower()},"drawBox"),AFe=v(function(t){return t.append("g")},"anchorElement"),_Fe=v(function(t,e,r,n,i){let a=dc(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,xM(s,a)},"drawActivation"),LFe=v(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:u,messageFontWeight:h}=n,f=t.append("g"),d=v(function(m,x,y,b){return f.append("line").attr("x1",m).attr("y1",x).attr("x2",y).attr("y2",b).attr("class","loopLine")},"drawLoopLine");d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(m){d(e.startx,m.y,e.stopx,m.y).style("stroke-dasharray","3, 3")});let p=vw();p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",Lue(f,p),p=Iue(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+i+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=!0;let g=ki(p.text)?await DT(f,p,e):gm(f,p);if(e.sectionTitles!==void 0){for(let[m,x]of Object.entries(e.sectionTitles))if(x.message){p.text=x.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[m].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=e.wrap,ki(p.text)?(e.starty=e.sections[m].y,await DT(f,p,e)):gm(f,p);let y=Math.round(g.map(b=>(b._groups||b)[0][0].getBBox().height).reduce((b,w)=>b+w));e.sections[m].height+=y-(i+a)}}return e.height=Math.round(e.stopy-e.starty),f},"drawLoop"),Nue=v(function(t,e){mw(t,e)},"drawBackgroundRect"),RFe=v(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),NFe=v(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),IFe=v(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),MFe=v(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),DFe=v(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),OFe=v(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),PFe=v(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Iue=v(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),BFe=v(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),bM=function(){function t(a,s,o,l,u,h,f){let d=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(a);i(d,f)}v(t,"byText");function e(a,s,o,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:g,actorFontWeight:m}=d,[x,y]=To(p),b=a.split(je.lineBreakRegex);for(let w=0;w<b.length;w++){let _=w*x-x*(b.length-1)/2,k=s.append("text").attr("x",o+u/2).attr("y",l).style("text-anchor","middle").style("font-size",y).style("font-weight",m).style("font-family",g);k.append("tspan").attr("x",o+u/2).attr("dy",_).text(b[w]),k.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(k,f)}}v(e,"byTspan");function r(a,s,o,l,u,h,f,d){let p=s.append("switch"),m=p.append("foreignObject").attr("x",o).attr("y",l).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(a),e(a,p,o,l,u,h,f,d),i(m,f)}v(r,"byFo");async function n(a,s,o,l,u,h,f,d){let p=await G0(a,Or()),g=s.append("switch"),x=g.append("foreignObject").attr("x",o+u/2-p.width/2).attr("y",l+h/2-p.height/2).attr("width",p.width).attr("height",p.height).append("xhtml:div").style("height","100%").style("width","100%");x.append("div").style("text-align","center").style("vertical-align","middle").html(await rh(a,Or())),e(a,g,o,l,u,h,f,d),i(x,f)}v(n,"byKatex");function i(a,s){for(let o in s)s.hasOwnProperty(o)&&a.attr(o,s[o])}return v(i,"_setTextAttrs"),function(a,s=!1){return s?n:a.textPlacement==="fo"?r:a.textPlacement==="old"?t:e}}(),FFe=function(){function t(i,a,s,o,l,u,h){let f=a.append("text").attr("x",s).attr("y",o).style("text-anchor","start").text(i);n(f,h)}v(t,"byText");function e(i,a,s,o,l,u,h,f){let{actorFontSize:d,actorFontFamily:p,actorFontWeight:g}=f,m=i.split(je.lineBreakRegex);for(let x=0;x<m.length;x++){let y=x*d-d*(m.length-1)/2,b=a.append("text").attr("x",s).attr("y",o).style("text-anchor","start").style("font-size",d).style("font-weight",g).style("font-family",p);b.append("tspan").attr("x",s).attr("dy",y).text(m[x]),b.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,h)}}v(e,"byTspan");function r(i,a,s,o,l,u,h,f){let d=a.append("switch"),g=d.append("foreignObject").attr("x",s).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,d,s,o,l,u,h,f),n(g,h)}v(r,"byFo");function n(i,a){for(let s in a)a.hasOwnProperty(s)&&i.attr(s,a[s])}return v(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),ui={drawRect:xM,drawText:gm,drawLabel:Lue,drawActor:SFe,drawBox:CFe,drawPopup:wFe,anchorElement:AFe,drawActivation:_Fe,drawLoop:LFe,drawBackgroundRect:Nue,insertArrowHead:MFe,insertArrowFilledHead:DFe,insertSequenceNumber:OFe,insertArrowCrossHead:PFe,insertDatabaseIcon:RFe,insertComputerIcon:NFe,insertClockIcon:IFe,getTextObj:Iue,getNoteRect:BFe,fixLifeLineHeights:Rue,sanitizeUrl:yM.sanitizeUrl},_e={},Je={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:v(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:v(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:v(function(t){this.boxes.push(t)},"addBox"),addActor:v(function(t){this.actors.push(t)},"addActor"),addLoop:v(function(t){this.loops.push(t)},"addLoop"),addMessage:v(function(t){this.messages.push(t)},"addMessage"),addNote:v(function(t){this.notes.push(t)},"addNote"),lastActor:v(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:v(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:v(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:v(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:v(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Oue(pe())},"init"),updateVal:v(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:v(function(t,e,r,n){let i=this,a=0;function s(o){return v(function(u){a++;let h=i.sequenceItems.length-a+1;i.updateVal(u,"starty",e-h*_e.boxMargin,Math.min),i.updateVal(u,"stopy",n+h*_e.boxMargin,Math.max),i.updateVal(Je.data,"startx",t-h*_e.boxMargin,Math.min),i.updateVal(Je.data,"stopx",r+h*_e.boxMargin,Math.max),o!=="activation"&&(i.updateVal(u,"startx",t-h*_e.boxMargin,Math.min),i.updateVal(u,"stopx",r+h*_e.boxMargin,Math.max),i.updateVal(Je.data,"starty",e-h*_e.boxMargin,Math.min),i.updateVal(Je.data,"stopy",n+h*_e.boxMargin,Math.max))},"updateItemBounds")}v(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:v(function(t,e,r,n){let i=je.getMin(t,r),a=je.getMax(t,r),s=je.getMin(e,n),o=je.getMax(e,n);this.updateVal(Je.data,"startx",i,Math.min),this.updateVal(Je.data,"starty",s,Math.min),this.updateVal(Je.data,"stopx",a,Math.max),this.updateVal(Je.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),newActivation:v(function(t,e,r){let n=r.get(t.from),i=PT(t.from).length||0,a=n.x+n.width/2+(i-1)*_e.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+_e.activationWidth,stopy:void 0,actor:t.from,anchored:ui.anchorElement(e)})},"newActivation"),endActivation:v(function(t){let e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:v(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:v(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:v(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:v(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:v(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Je.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:v(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:v(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:v(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=je.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:v(function(){return this.verticalPos},"getVerticalPos"),getBounds:v(function(){return{bounds:this.data,models:this.models}},"getBounds")},zFe=v(async function(t,e){Je.bumpVerticalPos(_e.boxMargin),e.height=_e.boxMargin,e.starty=Je.getVerticalPos();let r=dc();r.x=e.startx,r.y=e.starty,r.width=e.width||_e.width,r.class="note";let n=t.append("g"),i=ui.drawRect(n,r),a=vw();a.x=e.startx,a.y=e.starty,a.width=r.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=_e.noteFontFamily,a.fontSize=_e.noteFontSize,a.fontWeight=_e.noteFontWeight,a.anchor=_e.noteAlign,a.textMargin=_e.noteMargin,a.valign="center";let s=ki(a.text)?await DT(n,a):gm(n,a),o=Math.round(s.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,u)=>l+u));i.attr("height",o+2*_e.noteMargin),e.height+=o+2*_e.noteMargin,Je.bumpVerticalPos(o+2*_e.noteMargin),e.stopy=e.starty+o+2*_e.noteMargin,e.stopx=e.startx+r.width,Je.insert(e.startx,e.starty,e.stopx,e.stopy),Je.models.addNote(e)},"drawNote"),c0=v(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),pm=v(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),gM=v(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");v(Mue,"boundMessage");$Fe=v(async function(t,e,r,n){let{startx:i,stopx:a,starty:s,message:o,type:l,sequenceIndex:u,sequenceVisible:h}=e,f=Wt.calculateTextDimensions(o,c0(_e)),d=vw();d.x=i,d.y=s+10,d.width=a-i,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=_e.messageFontFamily,d.fontSize=_e.messageFontSize,d.fontWeight=_e.messageFontWeight,d.anchor=_e.messageAlign,d.valign="center",d.textMargin=_e.wrapPadding,d.tspan=!1,ki(d.text)?await DT(t,d,{startx:i,stopx:a,starty:r}):gm(t,d);let p=f.width,g;i===a?_e.rightAngles?g=t.append("path").attr("d",`M ${i},${r} H ${i+je.getMax(_e.width/2,p/2)} V ${r+25} H ${i}`):g=t.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(g=t.append("line"),g.attr("x1",i),g.attr("y1",r),g.attr("x2",a),g.attr("y2",r)),l===n.db.LINETYPE.DOTTED||l===n.db.LINETYPE.DOTTED_CROSS||l===n.db.LINETYPE.DOTTED_POINT||l===n.db.LINETYPE.DOTTED_OPEN||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let m="";_e.arrowMarkerAbsolute&&(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,m=m.replace(/\\(/g,"\\\\("),m=m.replace(/\\)/g,"\\\\)")),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(l===n.db.LINETYPE.SOLID||l===n.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+m+"#arrowhead)"),(l===n.db.LINETYPE.BIDIRECTIONAL_SOLID||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+m+"#arrowhead)"),g.attr("marker-end","url("+m+"#arrowhead)")),(l===n.db.LINETYPE.SOLID_POINT||l===n.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+m+"#filled-head)"),(l===n.db.LINETYPE.SOLID_CROSS||l===n.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+m+"#crosshead)"),(h||_e.showSequenceNumbers)&&(g.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(u))},"drawMessage"),GFe=v(function(t,e,r,n,i,a,s){let o=0,l=0,u,h=0;for(let f of n){let d=e.get(f),p=d.box;u&&u!=p&&(s||Je.models.addBox(u),l+=_e.boxMargin+u.margin),p&&p!=u&&(s||(p.x=o+l,p.y=i),l+=p.margin),d.width=d.width||_e.width,d.height=je.getMax(d.height||_e.height,_e.height),d.margin=d.margin||_e.actorMargin,h=je.getMax(h,d.height),r.get(d.name)&&(l+=d.width/2),d.x=o+l,d.starty=Je.getVerticalPos(),Je.insert(d.x,i,d.x+d.width,d.height),o+=d.width+l,d.box&&(d.box.width=o+p.margin-d.box.x),l=d.margin,u=d.box,Je.models.addActor(d)}u&&!s&&Je.models.addBox(u),Je.bumpVerticalPos(h)},"addActorRenderingData"),mM=v(async function(t,e,r,n){if(n){let i=0;Je.bumpVerticalPos(_e.boxMargin*2);for(let a of r){let s=e.get(a);s.stopy||(s.stopy=Je.getVerticalPos());let o=await ui.drawActor(t,s,_e,!0);i=je.getMax(i,o)}Je.bumpVerticalPos(i+_e.boxMargin)}else for(let i of r){let a=e.get(i);await ui.drawActor(t,a,_e,!1)}},"drawActors"),Due=v(function(t,e,r,n){let i=0,a=0;for(let s of r){let o=e.get(s),l=VFe(o),u=ui.drawPopup(t,o,l,_e,_e.forceMenus,n);u.height>i&&(i=u.height),u.width+o.x>a&&(a=u.width+o.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),Oue=v(function(t){Wn(_e,t),t.fontFamily&&(_e.actorFontFamily=_e.noteFontFamily=_e.messageFontFamily=t.fontFamily),t.fontSize&&(_e.actorFontSize=_e.noteFontSize=_e.messageFontSize=t.fontSize),t.fontWeight&&(_e.actorFontWeight=_e.noteFontWeight=_e.messageFontWeight=t.fontWeight)},"setConf"),PT=v(function(t){return Je.activations.filter(function(e){return e.actor===t})},"actorActivations"),xue=v(function(t,e){let r=e.get(t),n=PT(t),i=n.reduce(function(s,o){return je.getMin(s,o.startx)},r.x+r.width/2-1),a=n.reduce(function(s,o){return je.getMax(s,o.stopx)},r.x+r.width/2+1);return[i,a]},"activationBounds");v(Cl,"adjustLoopHeightForWrap");v(Pue,"adjustCreatedDestroyedData");UFe=v(async function(t,e,r,n){let{securityLevel:i,sequence:a}=pe();_e=a;let s;i==="sandbox"&&(s=Ge("#i"+e));let o=i==="sandbox"?Ge(s.nodes()[0].contentDocument.body):Ge("body"),l=i==="sandbox"?s.nodes()[0].contentDocument:document;Je.init(),re.debug(n.db);let u=i==="sandbox"?o.select(`[id="${e}"]`):Ge(`[id="${e}"]`),h=n.db.getActors(),f=n.db.getCreatedActors(),d=n.db.getDestroyedActors(),p=n.db.getBoxes(),g=n.db.getActorKeys(),m=n.db.getMessages(),x=n.db.getDiagramTitle(),y=n.db.hasAtLeastOneBox(),b=n.db.hasAtLeastOneBoxWithTitle(),w=await Bue(h,m,n);if(_e.height=await Fue(h,w,p),ui.insertComputerIcon(u),ui.insertDatabaseIcon(u),ui.insertClockIcon(u),y&&(Je.bumpVerticalPos(_e.boxMargin),b&&Je.bumpVerticalPos(p[0].textMaxHeight)),_e.hideUnusedParticipants===!0){let B=new Set;m.forEach(P=>{B.add(P.from),B.add(P.to)}),g=g.filter(P=>B.has(P))}GFe(u,h,f,g,0,m,!1);let _=await qFe(m,h,w,n);ui.insertArrowHead(u),ui.insertArrowCrossHead(u),ui.insertArrowFilledHead(u),ui.insertSequenceNumber(u);function k(B,P){let $=Je.endActivation(B);$.starty+18>P&&($.starty=P-6,P+=12),ui.drawActivation(u,$,P,_e,PT(B.from).length),Je.insert($.startx,P-10,$.stopx,P)}v(k,"activeEnd");let E=1,L=1,S=[],C=[],M=0;for(let B of m){let P,$,z;switch(B.type){case n.db.LINETYPE.NOTE:Je.resetVerticalPos(),$=B.noteModel,await zFe(u,$);break;case n.db.LINETYPE.ACTIVE_START:Je.newActivation(B,u,h);break;case n.db.LINETYPE.ACTIVE_END:k(B,Je.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Cl(_,B,_e.boxMargin,_e.boxMargin+_e.boxTextMargin,H=>Je.newLoop(H));break;case n.db.LINETYPE.LOOP_END:P=Je.endLoop(),await ui.drawLoop(u,P,"loop",_e),Je.bumpVerticalPos(P.stopy-Je.getVerticalPos()),Je.models.addLoop(P);break;case n.db.LINETYPE.RECT_START:Cl(_,B,_e.boxMargin,_e.boxMargin,H=>Je.newLoop(void 0,H.message));break;case n.db.LINETYPE.RECT_END:P=Je.endLoop(),C.push(P),Je.models.addLoop(P),Je.bumpVerticalPos(P.stopy-Je.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Cl(_,B,_e.boxMargin,_e.boxMargin+_e.boxTextMargin,H=>Je.newLoop(H));break;case n.db.LINETYPE.OPT_END:P=Je.endLoop(),await ui.drawLoop(u,P,"opt",_e),Je.bumpVerticalPos(P.stopy-Je.getVerticalPos()),Je.models.addLoop(P);break;case n.db.LINETYPE.ALT_START:Cl(_,B,_e.boxMargin,_e.boxMargin+_e.boxTextMargin,H=>Je.newLoop(H));break;case n.db.LINETYPE.ALT_ELSE:Cl(_,B,_e.boxMargin+_e.boxTextMargin,_e.boxMargin,H=>Je.addSectionToLoop(H));break;case n.db.LINETYPE.ALT_END:P=Je.endLoop(),await ui.drawLoop(u,P,"alt",_e),Je.bumpVerticalPos(P.stopy-Je.getVerticalPos()),Je.models.addLoop(P);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Cl(_,B,_e.boxMargin,_e.boxMargin+_e.boxTextMargin,H=>Je.newLoop(H)),Je.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Cl(_,B,_e.boxMargin+_e.boxTextMargin,_e.boxMargin,H=>Je.addSectionToLoop(H));break;case n.db.LINETYPE.PAR_END:P=Je.endLoop(),await ui.drawLoop(u,P,"par",_e),Je.bumpVerticalPos(P.stopy-Je.getVerticalPos()),Je.models.addLoop(P);break;case n.db.LINETYPE.AUTONUMBER:E=B.message.start||E,L=B.message.step||L,B.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Cl(_,B,_e.boxMargin,_e.boxMargin+_e.boxTextMargin,H=>Je.newLoop(H));break;case n.db.LINETYPE.CRITICAL_OPTION:Cl(_,B,_e.boxMargin+_e.boxTextMargin,_e.boxMargin,H=>Je.addSectionToLoop(H));break;case n.db.LINETYPE.CRITICAL_END:P=Je.endLoop(),await ui.drawLoop(u,P,"critical",_e),Je.bumpVerticalPos(P.stopy-Je.getVerticalPos()),Je.models.addLoop(P);break;case n.db.LINETYPE.BREAK_START:Cl(_,B,_e.boxMargin,_e.boxMargin+_e.boxTextMargin,H=>Je.newLoop(H));break;case n.db.LINETYPE.BREAK_END:P=Je.endLoop(),await ui.drawLoop(u,P,"break",_e),Je.bumpVerticalPos(P.stopy-Je.getVerticalPos()),Je.models.addLoop(P);break;default:try{z=B.msgModel,z.starty=Je.getVerticalPos(),z.sequenceIndex=E,z.sequenceVisible=n.db.showSequenceNumbers();let H=await Mue(u,z);Pue(B,z,H,M,h,f,d),S.push({messageModel:z,lineStartY:H}),Je.models.addMessage(z)}catch(H){re.error("error while drawing message",H)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(B.type)&&(E=E+L),M++}re.debug("createdActors",f),re.debug("destroyedActors",d),await mM(u,h,g,!1);for(let B of S)await $Fe(u,B.messageModel,B.lineStartY,n);_e.mirrorActors&&await mM(u,h,g,!0),C.forEach(B=>ui.drawBackgroundRect(u,B)),Rue(u,h,g,_e);for(let B of Je.models.boxes)B.height=Je.getVerticalPos()-B.y,Je.insert(B.x,B.y,B.x+B.width,B.height),B.startx=B.x,B.starty=B.y,B.stopx=B.startx+B.width,B.stopy=B.starty+B.height,B.stroke="rgb(0,0,0, 0.5)",ui.drawBox(u,B,_e);y&&Je.bumpVerticalPos(_e.boxMargin);let R=Due(u,h,g,l),{bounds:T}=Je.getBounds();T.startx===void 0&&(T.startx=0),T.starty===void 0&&(T.starty=0),T.stopx===void 0&&(T.stopx=0),T.stopy===void 0&&(T.stopy=0);let I=T.stopy-T.starty;I<R.maxHeight&&(I=R.maxHeight);let A=I+2*_e.diagramMarginY;_e.mirrorActors&&(A=A-_e.boxMargin+_e.bottomMarginAdj);let D=T.stopx-T.startx;D<R.maxWidth&&(D=R.maxWidth);let N=D+2*_e.diagramMarginX;x&&u.append("text").text(x).attr("x",(T.stopx-T.startx)/2-2*_e.diagramMarginX).attr("y",-25),Wr(u,A,N,_e.useMaxWidth);let O=x?40:0;u.attr("viewBox",T.startx-_e.diagramMarginX+" -"+(_e.diagramMarginY+O)+" "+N+" "+(A+O)),re.debug("models:",Je.models)},"draw");v(Bue,"getMaxMessageWidthPerActor");VFe=v(function(t){let e=0,r=gM(_e);for(let n in t.links){let a=Wt.calculateTextDimensions(n,r).width+2*_e.wrapPadding+2*_e.boxMargin;e<a&&(e=a)}return e},"getRequiredPopupWidth");v(Fue,"calculateActorMargins");WFe=v(async function(t,e,r){let n=e.get(t.from),i=e.get(t.to),a=n.x,s=i.x,o=t.wrap&&t.message,l=ki(t.message)?await G0(t.message,pe()):Wt.calculateTextDimensions(o?Wt.wrapLabel(t.message,_e.width,pm(_e)):t.message,pm(_e)),u={width:o?_e.width:je.getMax(_e.width,l.width+2*_e.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(u.width=o?je.getMax(_e.width,l.width):je.getMax(n.width/2+i.width/2,l.width+2*_e.noteMargin),u.startx=a+(n.width+_e.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(u.width=o?je.getMax(_e.width,l.width+2*_e.noteMargin):je.getMax(n.width/2+i.width/2,l.width+2*_e.noteMargin),u.startx=a-u.width+(n.width-_e.actorMargin)/2):t.to===t.from?(l=Wt.calculateTextDimensions(o?Wt.wrapLabel(t.message,je.getMax(_e.width,n.width),pm(_e)):t.message,pm(_e)),u.width=o?je.getMax(_e.width,n.width):je.getMax(n.width,_e.width,l.width+2*_e.noteMargin),u.startx=a+(n.width-u.width)/2):(u.width=Math.abs(a+n.width/2-(s+i.width/2))+_e.actorMargin,u.startx=a<s?a+n.width/2-_e.actorMargin/2:s+i.width/2-_e.actorMargin/2),o&&(u.message=Wt.wrapLabel(t.message,u.width-2*_e.wrapPadding,pm(_e))),re.debug(`NM:[${u.startx},${u.stopx},${u.starty},${u.stopy}:${u.width},${u.height}=${t.message}]`),u},"buildNoteModel"),HFe=v(function(t,e,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};let[n,i]=xue(t.from,e),[a,s]=xue(t.to,e),o=n<=a,l=o?i:n,u=o?a:s,h=Math.abs(a-s)>2,f=v(m=>o?-m:m,"adjustValue");t.from===t.to?u=l:(t.activate&&!h&&(u+=f(_e.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(u+=f(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=f(3)));let d=[n,i,a,s],p=Math.abs(l-u);t.wrap&&t.message&&(t.message=Wt.wrapLabel(t.message,je.getMax(p+2*_e.wrapPadding,_e.width),c0(_e)));let g=Wt.calculateTextDimensions(t.message,c0(_e));return{width:je.getMax(t.wrap?0:g.width+2*_e.wrapPadding,p+2*_e.wrapPadding,_e.width),height:0,startx:l,stopx:u,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,d),toBounds:Math.max.apply(null,d)}},"buildMessageModel"),qFe=v(async function(t,e,r,n){let i={},a=[],s,o,l;for(let u of t){switch(u.id=Wt.random({length:10}),u.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:u.id,msg:u.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:u.message&&(s=a.pop(),i[s.id]=s,i[u.id]=s,a.push(s));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:s=a.pop(),i[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{let f=e.get(u.from?u.from:u.to.actor),d=PT(u.from?u.from:u.to.actor).length,p=f.x+f.width/2+(d-1)*_e.activationWidth/2,g={startx:p,stopx:p+_e.activationWidth,actor:u.from,enabled:!0};Je.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let f=Je.activations.map(d=>d.actor).lastIndexOf(u.from);Je.activations.splice(f,1).splice(0,1)}break}u.placement!==void 0?(o=await WFe(u,e,n),u.noteModel=o,a.forEach(f=>{s=f,s.from=je.getMin(s.from,o.startx),s.to=je.getMax(s.to,o.startx+o.width),s.width=je.getMax(s.width,Math.abs(s.from-s.to))-_e.labelBoxWidth})):(l=HFe(u,e,n),u.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach(f=>{if(s=f,l.startx===l.stopx){let d=e.get(u.from),p=e.get(u.to);s.from=je.getMin(d.x-l.width/2,d.x-d.width/2,s.from),s.to=je.getMax(p.x+l.width/2,p.x+d.width/2,s.to),s.width=je.getMax(s.width,Math.abs(s.to-s.from))-_e.labelBoxWidth}else s.from=je.getMin(l.startx,s.from),s.to=je.getMax(l.stopx,s.to),s.width=je.getMax(s.width,l.width)-_e.labelBoxWidth}))}return Je.activations=[],re.debug("Loop type widths:",i),i},"calculateLoopBounds"),YFe={bounds:Je,drawActors:mM,drawActorsPopup:Due,setConf:Oue,draw:UFe},XFe={parser:jBe,db:vue,renderer:YFe,styles:xFe,init:v(({wrap:t})=>{vue.setWrap(t)},"init")}});function TM(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}var wM,BT,Gue,Uue,FT,zT,En,Vue,G2,vm,Wue,Al,kM,U2,u0,h0,jFe,mm,Hue,que,KFe,ZFe,QFe,JFe,eze,tze,rze,Yue,nze,ize,aze,EM,sze,oze,lze,cze,uze,hze,fze,dze,ef,Xue,SM,jue,pze,gze,mze,vze,yze,xze,bze,ym,wze,$T,kze,Tze,Eze,GT,CM=F(()=>{$h();wu();xn();or();lr();wM=function(){var t=v(function(Me,ye,q,de){for(q=q||{},de=Me.length;de--;q[Me[de]]=ye);return q},"o"),e=[1,18],r=[1,19],n=[1,20],i=[1,41],a=[1,42],s=[1,26],o=[1,24],l=[1,25],u=[1,32],h=[1,33],f=[1,34],d=[1,45],p=[1,35],g=[1,36],m=[1,37],x=[1,38],y=[1,27],b=[1,28],w=[1,29],_=[1,30],k=[1,31],E=[1,44],L=[1,46],S=[1,43],C=[1,47],M=[1,9],R=[1,8,9],T=[1,58],I=[1,59],A=[1,60],D=[1,61],N=[1,62],O=[1,63],B=[1,64],P=[1,8,9,41],$=[1,76],z=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],H=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],Z=[13,58,84,99,101,102],X=[13,58,71,72,84,99,101,102],ie=[13,58,66,67,68,69,70,84,99,101,102],K=[1,98],ee=[1,115],J=[1,107],W=[1,113],Y=[1,108],Q=[1,109],se=[1,110],ue=[1,111],ce=[1,112],te=[1,114],Le=[22,58,59,80,84,85,86,87,88,89],oe=[1,8,9,39,41,44],be=[1,8,9,22],Fe=[1,143],Be=[1,8,9,59],Ve=[1,8,9,22,58,59,80,84,85,86,87,88,89],We={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:v(function(ye,q,de,ae,he,U,ke){var j=U.length-1;switch(he){case 8:this.$=U[j-1];break;case 9:case 12:case 14:this.$=U[j];break;case 10:case 13:this.$=U[j-2]+"."+U[j];break;case 11:case 15:this.$=U[j-1]+U[j];break;case 16:case 17:this.$=U[j-1]+"~"+U[j]+"~";break;case 18:ae.addRelation(U[j]);break;case 19:U[j-1].title=ae.cleanupLabel(U[j]),ae.addRelation(U[j-1]);break;case 30:this.$=U[j].trim(),ae.setAccTitle(this.$);break;case 31:case 32:this.$=U[j].trim(),ae.setAccDescription(this.$);break;case 33:ae.addClassesToNamespace(U[j-3],U[j-1]);break;case 34:ae.addClassesToNamespace(U[j-4],U[j-1]);break;case 35:this.$=U[j],ae.addNamespace(U[j]);break;case 36:this.$=[U[j]];break;case 37:this.$=[U[j-1]];break;case 38:U[j].unshift(U[j-2]),this.$=U[j];break;case 40:ae.setCssClass(U[j-2],U[j]);break;case 41:ae.addMembers(U[j-3],U[j-1]);break;case 42:ae.setCssClass(U[j-5],U[j-3]),ae.addMembers(U[j-5],U[j-1]);break;case 43:this.$=U[j],ae.addClass(U[j]);break;case 44:this.$=U[j-1],ae.addClass(U[j-1]),ae.setClassLabel(U[j-1],U[j]);break;case 45:ae.addAnnotation(U[j],U[j-2]);break;case 46:case 59:this.$=[U[j]];break;case 47:U[j].push(U[j-1]),this.$=U[j];break;case 48:break;case 49:ae.addMember(U[j-1],ae.cleanupLabel(U[j]));break;case 50:break;case 51:break;case 52:this.$={id1:U[j-2],id2:U[j],relation:U[j-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:U[j-3],id2:U[j],relation:U[j-1],relationTitle1:U[j-2],relationTitle2:"none"};break;case 54:this.$={id1:U[j-3],id2:U[j],relation:U[j-2],relationTitle1:"none",relationTitle2:U[j-1]};break;case 55:this.$={id1:U[j-4],id2:U[j],relation:U[j-2],relationTitle1:U[j-3],relationTitle2:U[j-1]};break;case 56:ae.addNote(U[j],U[j-1]);break;case 57:ae.addNote(U[j]);break;case 58:this.$=U[j-2],ae.defineClass(U[j-1],U[j]);break;case 60:this.$=U[j-2].concat([U[j]]);break;case 61:ae.setDirection("TB");break;case 62:ae.setDirection("BT");break;case 63:ae.setDirection("RL");break;case 64:ae.setDirection("LR");break;case 65:this.$={type1:U[j-2],type2:U[j],lineType:U[j-1]};break;case 66:this.$={type1:"none",type2:U[j],lineType:U[j-1]};break;case 67:this.$={type1:U[j-1],type2:"none",lineType:U[j]};break;case 68:this.$={type1:"none",type2:"none",lineType:U[j]};break;case 69:this.$=ae.relationType.AGGREGATION;break;case 70:this.$=ae.relationType.EXTENSION;break;case 71:this.$=ae.relationType.COMPOSITION;break;case 72:this.$=ae.relationType.DEPENDENCY;break;case 73:this.$=ae.relationType.LOLLIPOP;break;case 74:this.$=ae.lineType.LINE;break;case 75:this.$=ae.lineType.DOTTED_LINE;break;case 76:case 82:this.$=U[j-2],ae.setClickEvent(U[j-1],U[j]);break;case 77:case 83:this.$=U[j-3],ae.setClickEvent(U[j-2],U[j-1]),ae.setTooltip(U[j-2],U[j]);break;case 78:this.$=U[j-2],ae.setLink(U[j-1],U[j]);break;case 79:this.$=U[j-3],ae.setLink(U[j-2],U[j-1],U[j]);break;case 80:this.$=U[j-3],ae.setLink(U[j-2],U[j-1]),ae.setTooltip(U[j-2],U[j]);break;case 81:this.$=U[j-4],ae.setLink(U[j-3],U[j-2],U[j]),ae.setTooltip(U[j-3],U[j-1]);break;case 84:this.$=U[j-3],ae.setClickEvent(U[j-2],U[j-1],U[j]);break;case 85:this.$=U[j-4],ae.setClickEvent(U[j-3],U[j-2],U[j-1]),ae.setTooltip(U[j-3],U[j]);break;case 86:this.$=U[j-3],ae.setLink(U[j-2],U[j]);break;case 87:this.$=U[j-4],ae.setLink(U[j-3],U[j-1],U[j]);break;case 88:this.$=U[j-4],ae.setLink(U[j-3],U[j-1]),ae.setTooltip(U[j-3],U[j]);break;case 89:this.$=U[j-5],ae.setLink(U[j-4],U[j-2],U[j]),ae.setTooltip(U[j-4],U[j-1]);break;case 90:this.$=U[j-2],ae.setCssStyle(U[j-1],U[j]);break;case 91:ae.setCssClass(U[j-1],U[j]);break;case 92:this.$=[U[j]];break;case 93:U[j-2].push(U[j]),this.$=U[j-2];break;case 95:this.$=U[j-1]+U[j];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:g,62:m,63:x,73:y,74:b,76:w,80:_,81:k,84:E,99:L,101:S,102:C},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(M,[2,5],{8:[1,48]}),{8:[1,49]},t(R,[2,18],{22:[1,50]}),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(R,[2,23]),t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,29]),{34:[1,51]},{36:[1,52]},t(R,[2,32]),t(R,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:T,67:I,68:A,69:D,70:N,71:O,72:B}),{39:[1,65]},t(P,[2,39],{39:[1,67],44:[1,66]}),t(R,[2,50]),t(R,[2,51]),{16:68,58:d,84:E,99:L,101:S},{16:39,18:69,19:40,58:d,84:E,99:L,101:S,102:C},{16:39,18:70,19:40,58:d,84:E,99:L,101:S,102:C},{16:39,18:71,19:40,58:d,84:E,99:L,101:S,102:C},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:d,84:E,99:L,101:S,102:C},{13:$,53:75},{56:77,58:[1,78]},t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(z,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:d,84:E,99:L,101:S,102:C}),t(z,[2,14],{20:[1,82]}),{15:83,16:84,58:d,84:E,99:L,101:S},{16:39,18:85,19:40,58:d,84:E,99:L,101:S,102:C},t(H,[2,118]),t(H,[2,119]),t(H,[2,120]),t(H,[2,121]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),t(M,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:e,35:r,37:n,42:i,46:a,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:g,62:m,63:x,73:y,74:b,76:w,80:_,81:k,84:E,99:L,101:S,102:C}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:g,62:m,63:x,73:y,74:b,76:w,80:_,81:k,84:E,99:L,101:S,102:C},t(R,[2,19]),t(R,[2,30]),t(R,[2,31]),{13:[1,89],16:39,18:88,19:40,58:d,84:E,99:L,101:S,102:C},{51:90,64:56,65:57,66:T,67:I,68:A,69:D,70:N,71:O,72:B},t(R,[2,49]),{65:91,71:O,72:B},t(Z,[2,68],{64:92,66:T,67:I,68:A,69:D,70:N}),t(X,[2,69]),t(X,[2,70]),t(X,[2,71]),t(X,[2,72]),t(X,[2,73]),t(ie,[2,74]),t(ie,[2,75]),{8:[1,94],24:95,40:93,43:23,46:a},{16:96,58:d,84:E,99:L,101:S},{45:97,49:K},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:ee,57:104,58:J,80:W,82:105,83:106,84:Y,85:Q,86:se,87:ue,88:ce,89:te},{58:[1,116]},{13:$,53:117},t(R,[2,57]),t(R,[2,123]),{22:ee,57:118,58:J,59:[1,119],80:W,82:105,83:106,84:Y,85:Q,86:se,87:ue,88:ce,89:te},t(Le,[2,59]),{16:39,18:120,19:40,58:d,84:E,99:L,101:S,102:C},t(z,[2,15]),t(z,[2,16]),t(z,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:d,84:E,99:L,101:S},t(oe,[2,43],{11:123,12:[1,124]}),t(M,[2,7]),{9:[1,125]},t(be,[2,52]),{16:39,18:126,19:40,58:d,84:E,99:L,101:S,102:C},{13:[1,128],16:39,18:127,19:40,58:d,84:E,99:L,101:S,102:C},t(Z,[2,67],{64:129,66:T,67:I,68:A,69:D,70:N}),t(Z,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:a},{8:[1,132],41:[2,36]},t(P,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:K},{16:39,18:136,19:40,58:d,84:E,99:L,101:S,102:C},t(R,[2,76],{13:[1,137]}),t(R,[2,78],{13:[1,139],75:[1,138]}),t(R,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},t(R,[2,90],{59:Fe}),t(Be,[2,92],{83:144,22:ee,58:J,80:W,84:Y,85:Q,86:se,87:ue,88:ce,89:te}),t(Ve,[2,94]),t(Ve,[2,96]),t(Ve,[2,97]),t(Ve,[2,98]),t(Ve,[2,99]),t(Ve,[2,100]),t(Ve,[2,101]),t(Ve,[2,102]),t(Ve,[2,103]),t(Ve,[2,104]),t(R,[2,91]),t(R,[2,56]),t(R,[2,58],{59:Fe}),{58:[1,145]},t(z,[2,13]),{15:146,16:84,58:d,84:E,99:L,101:S},{39:[2,11]},t(oe,[2,44]),{13:[1,147]},{1:[2,4]},t(be,[2,54]),t(be,[2,53]),{16:39,18:148,19:40,58:d,84:E,99:L,101:S,102:C},t(Z,[2,65]),t(R,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:a},{45:151,49:K},t(P,[2,41]),{41:[2,47]},t(R,[2,45]),t(R,[2,77]),t(R,[2,79]),t(R,[2,80],{75:[1,152]}),t(R,[2,83]),t(R,[2,84],{13:[1,153]}),t(R,[2,86],{13:[1,155],75:[1,154]}),{22:ee,58:J,80:W,82:156,83:106,84:Y,85:Q,86:se,87:ue,88:ce,89:te},t(Ve,[2,95]),t(Le,[2,60]),{39:[2,10]},{14:[1,157]},t(be,[2,55]),t(R,[2,34]),{41:[2,38]},{41:[1,158]},t(R,[2,81]),t(R,[2,85]),t(R,[2,87]),t(R,[2,88],{75:[1,159]}),t(Be,[2,93],{83:144,22:ee,58:J,80:W,84:Y,85:Q,86:se,87:ue,88:ce,89:te}),t(oe,[2,8]),t(P,[2,42]),t(R,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:v(function(ye,q){if(q.recoverable)this.trace(ye);else{var de=new Error(ye);throw de.hash=q,de}},"parseError"),parse:v(function(ye){var q=this,de=[0],ae=[],he=[null],U=[],ke=this.table,j="",me=0,Se=0,Pe=0,Ie=2,ge=1,ze=U.slice.call(arguments,1),Ae=Object.create(this.lexer),Ye={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(Ye.yy[it]=this.yy[it]);Ae.setInput(ye,Ye.yy),Ye.yy.lexer=Ae,Ye.yy.parser=this,typeof Ae.yylloc>"u"&&(Ae.yylloc={});var wt=Ae.yylloc;U.push(wt);var ft=Ae.options&&Ae.options.ranges;typeof Ye.yy.parseError=="function"?this.parseError=Ye.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function He(Vt){de.length=de.length-2*Vt,he.length=he.length-Vt,U.length=U.length-Vt}v(He,"popStack");function ut(){var Vt;return Vt=ae.pop()||Ae.lex()||ge,typeof Vt!="number"&&(Vt instanceof Array&&(ae=Vt,Vt=ae.pop()),Vt=q.symbols_[Vt]||Vt),Vt}v(ut,"lex");for(var $e,Ze,at,mt,Ut,st,Qe={},lt,kt,ht,Rt;;){if(at=de[de.length-1],this.defaultActions[at]?mt=this.defaultActions[at]:(($e===null||typeof $e>"u")&&($e=ut()),mt=ke[at]&&ke[at][$e]),typeof mt>"u"||!mt.length||!mt[0]){var An="";Rt=[];for(lt in ke[at])this.terminals_[lt]&<>Ie&&Rt.push("\'"+this.terminals_[lt]+"\'");Ae.showPosition?An="Parse error on line "+(me+1)+`:\n`+Ae.showPosition()+`\nExpecting `+Rt.join(", ")+", got \'"+(this.terminals_[$e]||$e)+"\'":An="Parse error on line "+(me+1)+": Unexpected "+($e==ge?"end of input":"\'"+(this.terminals_[$e]||$e)+"\'"),this.parseError(An,{text:Ae.match,token:this.terminals_[$e]||$e,line:Ae.yylineno,loc:wt,expected:Rt})}if(mt[0]instanceof Array&&mt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+at+", token: "+$e);switch(mt[0]){case 1:de.push($e),he.push(Ae.yytext),U.push(Ae.yylloc),de.push(mt[1]),$e=null,Ze?($e=Ze,Ze=null):(Se=Ae.yyleng,j=Ae.yytext,me=Ae.yylineno,wt=Ae.yylloc,Pe>0&&Pe--);break;case 2:if(kt=this.productions_[mt[1]][1],Qe.$=he[he.length-kt],Qe._$={first_line:U[U.length-(kt||1)].first_line,last_line:U[U.length-1].last_line,first_column:U[U.length-(kt||1)].first_column,last_column:U[U.length-1].last_column},ft&&(Qe._$.range=[U[U.length-(kt||1)].range[0],U[U.length-1].range[1]]),st=this.performAction.apply(Qe,[j,Se,me,Ye.yy,mt[1],he,U].concat(ze)),typeof st<"u")return st;kt&&(de=de.slice(0,-1*kt*2),he=he.slice(0,-1*kt),U=U.slice(0,-1*kt)),de.push(this.productions_[mt[1]][0]),he.push(Qe.$),U.push(Qe._$),ht=ke[de[de.length-2]][de[de.length-1]],de.push(ht);break;case 3:return!0}}return!0},"parse")},qe=function(){var Me={EOF:1,parseError:v(function(q,de){if(this.yy.parser)this.yy.parser.parseError(q,de);else throw new Error(q)},"parseError"),setInput:v(function(ye,q){return this.yy=q||this.yy||{},this._input=ye,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var ye=this._input[0];this.yytext+=ye,this.yyleng++,this.offset++,this.match+=ye,this.matched+=ye;var q=ye.match(/(?:\\r\\n?|\\n).*/g);return q?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ye},"input"),unput:v(function(ye){var q=ye.length,de=ye.split(/(?:\\r\\n?|\\n)/g);this._input=ye+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-q),this.offset-=q;var ae=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),de.length-1&&(this.yylineno-=de.length-1);var he=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:de?(de.length===ae.length?this.yylloc.first_column:0)+ae[ae.length-de.length].length-de[0].length:this.yylloc.first_column-q},this.options.ranges&&(this.yylloc.range=[he[0],he[0]+this.yyleng-q]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(ye){this.unput(this.match.slice(ye))},"less"),pastInput:v(function(){var ye=this.matched.substr(0,this.matched.length-this.match.length);return(ye.length>20?"...":"")+ye.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var ye=this.match;return ye.length<20&&(ye+=this._input.substr(0,20-ye.length)),(ye.substr(0,20)+(ye.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var ye=this.pastInput(),q=new Array(ye.length+1).join("-");return ye+this.upcomingInput()+`\n`+q+"^"},"showPosition"),test_match:v(function(ye,q){var de,ae,he;if(this.options.backtrack_lexer&&(he={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(he.yylloc.range=this.yylloc.range.slice(0))),ae=ye[0].match(/(?:\\r\\n?|\\n).*/g),ae&&(this.yylineno+=ae.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ae?ae[ae.length-1].length-ae[ae.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+ye[0].length},this.yytext+=ye[0],this.match+=ye[0],this.matches=ye,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ye[0].length),this.matched+=ye[0],de=this.performAction.call(this,this.yy,this,q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),de)return de;if(this._backtrack){for(var U in he)this[U]=he[U];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ye,q,de,ae;this._more||(this.yytext="",this.match="");for(var he=this._currentRules(),U=0;U<he.length;U++)if(de=this._input.match(this.rules[he[U]]),de&&(!q||de[0].length>q[0].length)){if(q=de,ae=U,this.options.backtrack_lexer){if(ye=this.test_match(de,he[U]),ye!==!1)return ye;if(this._backtrack){q=!1;continue}else return!1}else if(!this.options.flex)break}return q?(ye=this.test_match(q,he[ae]),ye!==!1?ye:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var q=this.next();return q||this.lex()},"lex"),begin:v(function(q){this.conditionStack.push(q)},"begin"),popState:v(function(){var q=this.conditionStack.length-1;return q>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(q){return q=this.conditionStack.length-1-Math.abs(q||0),q>=0?this.conditionStack[q]:"INITIAL"},"topState"),pushState:v(function(q){this.begin(q)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:v(function(q,de,ae,he){var U=he;switch(ae){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:return this.popState(),41;break;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;break;case 39:return this.popState(),8;break;case 40:break;case 41:return this.popState(),this.popState(),41;break;case 42:return this.begin("class-body"),39;break;case 43:return this.popState(),41;break;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/,/^(?:%%[^\\n]*(\\r?\\n)*)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:classDiagram-v2\\b)/,/^(?:classDiagram\\b)/,/^(?:\\[\\*\\])/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\\b)/,/^(?:classDef\\b)/,/^(?:namespace\\b)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:\\[\\*\\])/,/^(?:class\\b)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\\[\\*\\])/,/^(?:[{])/,/^(?:[\\n])/,/^(?:[^{}\\n]*)/,/^(?:cssClass\\b)/,/^(?:callback\\b)/,/^(?:link\\b)/,/^(?:click\\b)/,/^(?:note for\\b)/,/^(?:note\\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:\\s*<\\|)/,/^(?:\\s*\\|>)/,/^(?:\\s*>)/,/^(?:\\s*<)/,/^(?:\\s*\\*)/,/^(?:\\s*o\\b)/,/^(?:\\s*\\(\\))/,/^(?:--)/,/^(?:\\.\\.)/,/^(?::{1}[^:\\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\\.)/,/^(?:\\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\\w+)/,/^(?:\\[)/,/^(?:\\])/,/^(?:[!"#$%&\'*+,-.`?\\\\/])/,/^(?:[0-9]+)/,/^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\s)/,/^(?:\\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return Me}();We.lexer=qe;function Re(){this.yy={}}return v(Re,"Parser"),Re.prototype=We,We.Parser=Re,new Re}();wM.parser=wM;BT=wM,Gue=["#","+","~","-",""],Uue=class{static{v(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";let r=yr(t,pe());this.parseMember(r)}getDisplayDetails(){let t=this.visibility+Xc(this.id);this.memberType==="method"&&(t+=`(${Xc(this.parameters.trim())})`,this.returnType&&(t+=" : "+Xc(this.returnType))),t=t.trim();let e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";if(this.memberType==="method"){let i=/([#+~-])?(.+)\\((.*)\\)([\\s$*])?(.*)([$*])?/.exec(t);if(i){let a=i[1]?i[1].trim():"";if(Gue.includes(a)&&(this.visibility=a),this.id=i[2],this.parameters=i[3]?i[3].trim():"",e=i[4]?i[4].trim():"",this.returnType=i[5]?i[5].trim():"",e===""){let s=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(s)&&(e=s,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=t.length,i=t.substring(0,1),a=t.substring(n-1);Gue.includes(i)&&(this.visibility=i),/[$*]/.exec(a)&&(e=a),this.id=t.substring(this.visibility===""?0:1,e===""?n:n-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let r=`${this.visibility?"\\\\"+this.visibility:""}${Xc(this.id)}${this.memberType==="method"?`(${Xc(this.parameters)})${this.returnType?" : "+Xc(this.returnType):""}`:""}`;this.text=r.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\\\<")&&(this.text=this.text.replace("\\\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},FT="classId-",zT=[],En=new Map,Vue=new Map,G2=[],vm=[],Wue=0,Al=new Map,kM=0,U2=[],u0=v(t=>je.sanitizeText(t,pe()),"sanitizeText"),h0=v(function(t){let e=je.sanitizeText(t,pe()),r="",n=e;if(e.indexOf("~")>0){let i=e.split("~");n=u0(i[0]),r=u0(i[1])}return{className:n,type:r}},"splitClassNameAndType"),jFe=v(function(t,e){let r=je.sanitizeText(t,pe());e&&(e=u0(e));let{className:n}=h0(r);En.get(n).label=e,En.get(n).text=`${e}${En.get(n).type?`<${En.get(n).type}>`:""}`},"setClassLabel"),mm=v(function(t){let e=je.sanitizeText(t,pe()),{className:r,type:n}=h0(e);if(En.has(r))return;let i=je.sanitizeText(r,pe());En.set(i,{id:i,type:n,label:i,text:`${i}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:FT+i+"-"+Wue}),Wue++},"addClass"),Hue=v(function(t,e){let r={id:`interface${vm.length}`,label:t,classId:e};vm.push(r)},"addInterface"),que=v(function(t){let e=je.sanitizeText(t,pe());if(En.has(e))return En.get(e).domId;throw new Error("Class not found: "+e)},"lookUpDomId"),KFe=v(function(){zT=[],En=new Map,G2=[],vm=[],U2=[],U2.push(Xue),Al=new Map,kM=0,SM="TB",xr()},"clear"),ZFe=v(function(t){return En.get(t)},"getClass"),QFe=v(function(){return En},"getClasses"),JFe=v(function(){return zT},"getRelations"),eze=v(function(){return G2},"getNotes"),tze=v(function(t){re.debug("Adding relation: "+JSON.stringify(t));let e=[ef.LOLLIPOP,ef.AGGREGATION,ef.COMPOSITION,ef.DEPENDENCY,ef.EXTENSION];t.relation.type1===ef.LOLLIPOP&&!e.includes(t.relation.type2)?(mm(t.id2),Hue(t.id1,t.id2),t.id1=`interface${vm.length-1}`):t.relation.type2===ef.LOLLIPOP&&!e.includes(t.relation.type1)?(mm(t.id1),Hue(t.id2,t.id1),t.id2=`interface${vm.length-1}`):(mm(t.id1),mm(t.id2)),t.id1=h0(t.id1).className,t.id2=h0(t.id2).className,t.relationTitle1=je.sanitizeText(t.relationTitle1.trim(),pe()),t.relationTitle2=je.sanitizeText(t.relationTitle2.trim(),pe()),zT.push(t)},"addRelation"),rze=v(function(t,e){let r=h0(t).className;En.get(r).annotations.push(e)},"addAnnotation"),Yue=v(function(t,e){mm(t);let r=h0(t).className,n=En.get(r);if(typeof e=="string"){let i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?n.annotations.push(u0(i.substring(2,i.length-2))):i.indexOf(")")>0?n.methods.push(new Uue(i,"method")):i&&n.members.push(new Uue(i,"attribute"))}},"addMember"),nze=v(function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>Yue(t,r)))},"addMembers"),ize=v(function(t,e){let r={id:`note${G2.length}`,class:e,text:t};G2.push(r)},"addNote"),aze=v(function(t){return t.startsWith(":")&&(t=t.substring(1)),u0(t.trim())},"cleanupLabel"),EM=v(function(t,e){t.split(",").forEach(function(r){let n=r;/\\d/.exec(r[0])&&(n=FT+n);let i=En.get(n);i&&(i.cssClasses+=" "+e)})},"setCssClass"),sze=v(function(t,e){for(let r of t){let n=Vue.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},Vue.set(r,n)),e&&e.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)}),En.forEach(i=>{i.cssClasses.includes(r)&&i.styles.push(...e.flatMap(a=>a.split(",")))})}},"defineClass"),oze=v(function(t,e){t.split(",").forEach(function(r){e!==void 0&&(En.get(r).tooltip=u0(e))})},"setTooltip"),lze=v(function(t,e){return e&&Al.has(e)?Al.get(e).classes.get(t).tooltip:En.get(t).tooltip},"getTooltip"),cze=v(function(t,e,r){let n=pe();t.split(",").forEach(function(i){let a=i;/\\d/.exec(i[0])&&(a=FT+a);let s=En.get(a);s&&(s.link=Wt.formatUrl(e,n),n.securityLevel==="sandbox"?s.linkTarget="_top":typeof r=="string"?s.linkTarget=u0(r):s.linkTarget="_blank")}),EM(t,"clickable")},"setLink"),uze=v(function(t,e,r){t.split(",").forEach(function(n){hze(n,e,r),En.get(n).haveCallback=!0}),EM(t,"clickable")},"setClickEvent"),hze=v(function(t,e,r){let n=je.sanitizeText(t,pe());if(pe().securityLevel!=="loose"||e===void 0)return;let a=n;if(En.has(a)){let s=que(a),o=[];if(typeof r=="string"){o=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l<o.length;l++){let u=o[l].trim();u.startsWith(\'"\')&&u.endsWith(\'"\')&&(u=u.substr(1,u.length-2)),o[l]=u}}o.length===0&&o.push(s),U2.push(function(){let l=document.querySelector(`[id="${s}"]`);l!==null&&l.addEventListener("click",function(){Wt.runFunc(e,...o)},!1)})}},"setClickFunc"),fze=v(function(t){U2.forEach(function(e){e(t)})},"bindFunctions"),dze={LINE:0,DOTTED_LINE:1},ef={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},Xue=v(function(t){let e=Ge(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=Ge("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Ge(t).select("svg").selectAll("g.node").on("mouseover",function(){let i=Ge(this);if(i.attr("title")===null)return;let s=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(i.attr("title")).style("left",window.scrollX+s.left+(s.right-s.left)/2+"px").style("top",window.scrollY+s.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\\/>/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),Ge(this).classed("hover",!1)})},"setupToolTips");U2.push(Xue);SM="TB",jue=v(()=>SM,"getDirection"),pze=v(t=>{SM=t},"setDirection"),gze=v(function(t){Al.has(t)||(Al.set(t,{id:t,classes:new Map,children:{},domId:FT+t+"-"+kM}),kM++)},"addNamespace"),mze=v(function(t){return Al.get(t)},"getNamespace"),vze=v(function(){return Al},"getNamespaces"),yze=v(function(t,e){if(Al.has(t))for(let r of e){let{className:n}=h0(r);En.get(n).parent=t,Al.get(t).classes.set(n,En.get(n))}},"addClassesToNamespace"),xze=v(function(t,e){let r=En.get(t);if(!(!e||!r))for(let n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)},"setCssStyle");v(TM,"getArrowMarker");bze=v(()=>{let t=[],e=[],r=pe();for(let i of Al.keys()){let a=Al.get(i);if(a){let s={id:a.id,label:a.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:r.look};t.push(s)}}for(let i of En.keys()){let a=En.get(i);if(a){let s=a;s.parentId=a.parent,s.look=r.look,t.push(s)}}let n=0;for(let i of G2){n++;let a={id:i.id,label:i.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look};t.push(a);let s=En.get(i.class)?.id??"";if(s){let o={id:`edgeNote${n}`,start:i.id,end:s,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};e.push(o)}}for(let i of vm){let a={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};t.push(a)}n=0;for(let i of zT){n++;let a={id:N3(i.id1,i.id2,{prefix:"id",counter:n}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:TM(i.relation.type1),arrowTypeEnd:TM(i.relation.type2),startLabelRight:i.relationTitle1==="none"?"":i.relationTitle1,endLabelLeft:i.relationTitle2==="none"?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:i.relation.lineType==1?"dashed":"solid",look:r.look};e.push(a)}return{nodes:t,edges:e,other:{},config:r,direction:jue()}},"getData"),ym={setAccTitle:Tr,getAccTitle:Ar,getAccDescription:Lr,setAccDescription:_r,getConfig:v(()=>pe().class,"getConfig"),addClass:mm,bindFunctions:fze,clear:KFe,getClass:ZFe,getClasses:QFe,getNotes:eze,addAnnotation:rze,addNote:ize,getRelations:JFe,addRelation:tze,getDirection:jue,setDirection:pze,addMember:Yue,addMembers:nze,cleanupLabel:aze,lineType:dze,relationType:ef,setClickEvent:uze,setCssClass:EM,defineClass:sze,setLink:cze,getTooltip:lze,setTooltip:oze,lookUpDomId:que,setDiagramTitle:en,getDiagramTitle:Hr,setClassLabel:jFe,addNamespace:gze,addClassesToNamespace:yze,getNamespace:mze,getNamespaces:vze,setCssStyle:xze,getData:bze},wze=v(t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`,"getStyles"),$T=wze,kze=v((t,e="TB")=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),Tze=v(function(t,e){return e.db.getClasses()},"getClasses"),Eze=v(async function(t,e,r,n){re.info("REF0:"),re.info("Drawing class diagram (v3)",e);let{securityLevel:i,state:a,layout:s}=pe(),o=n.db.getData(),l=pg(e,i);o.type=n.type,o.layoutAlgorithm=aw(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await cg(o,l);let u=8;Wt.insertTitle(l,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),gg(l,u,"classDiagram",a?.useMaxWidth??!0)},"draw"),GT={getClasses:Tze,draw:Eze,getDir:kze}});var Kue={};mr(Kue,{diagram:()=>Sze});var Sze,Zue=F(()=>{CM();$h();wu();yu();fl();el();ic();fo();za();xn();or();Sze={parser:BT,db:ym,renderer:GT,styles:$T,init:v(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ym.clear()},"init")}});var Que={};mr(Que,{diagram:()=>Cze});var Cze,Jue=F(()=>{CM();$h();wu();yu();fl();el();ic();fo();za();xn();or();Cze={parser:BT,db:ym,renderer:GT,styles:$T,init:v(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ym.clear()},"init")}});function WT(t="",e=0,r="",n=IM){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${Hze}-${t}${i}-${e}`}function V2(t,e,r){if(!e.id||e.id==="</join></fork>"||e.id==="</choice>")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(i=>{if(r.get(i)){let a=r.get(i);e.cssCompiledStyles=[...e.cssCompiledStyles,...a.styles]}}));let n=t.find(i=>i.id===e.id);n?Object.assign(n,e):t.push(e)}function xhe(t){return t?.classes?.join(" ")??""}function bhe(t){return t?.styles??[]}function DM(){return new Map}function KT(t=""){let e=t;return t===MM&&(H2++,e=`${whe}${H2}`),e}function ZT(t="",e=q2){return t===MM?whe:e}function _he(t=""){let e=t;return t===khe&&(H2++,e=`${The}${H2}`),e}function Lhe(t="",e=q2){return t===khe?The:e}function Rhe(t,e,r){let n=KT(t.id.trim()),i=ZT(t.id.trim(),t.type),a=KT(e.id.trim()),s=ZT(e.id.trim(),e.type);rf(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),rf(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),Cs.relations.push({id1:n,id2:a,relationTitle:je.sanitizeText(r,pe())})}var LM,QT,Aze,ohe,qT,NM,_ze,Lze,Rze,q2,lhe,che,uhe,hhe,fhe,dhe,AM,_M,Nze,Ize,ehe,the,Mze,Dze,Y2,Oze,Pze,phe,Bze,Fze,zze,$ze,Gze,Uze,Vze,Wze,ghe,mhe,Hze,IM,qze,rhe,vhe,Yze,Xze,yhe,VT,tf,jze,nhe,W2,Kze,MM,whe,khe,The,ihe,ahe,Zze,Qze,YT,OM,Ehe,XT,xm,She,jT,Cs,H2,she,Jze,e$e,UT,t$e,r$e,HT,PM,n$e,rf,Che,f0,Ahe,i$e,a$e,Nhe,RM,s$e,o$e,Ihe,l$e,BM,c$e,u$e,h$e,f$e,d$e,p$e,_l,g$e,JT,FM=F(()=>{$h();wu();xn();or();LM=function(){var t=v(function(B,P,$,z){for($=$||{},z=B.length;z--;$[B[z]]=P);return $},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,16],l=[1,17],u=[1,18],h=[1,19],f=[1,32],d=[1,20],p=[1,21],g=[1,22],m=[1,23],x=[1,24],y=[1,26],b=[1,27],w=[1,28],_=[1,29],k=[1,30],E=[1,31],L=[1,34],S=[1,35],C=[1,36],M=[1,37],R=[1,33],T=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],A=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],D={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:v(function(P,$,z,H,Z,X,ie){var K=X.length-1;switch(Z){case 3:return H.setRootDoc(X[K]),X[K];break;case 4:this.$=[];break;case 5:X[K]!="nl"&&(X[K-1].push(X[K]),this.$=X[K-1]);break;case 6:case 7:this.$=X[K];break;case 8:this.$="nl";break;case 12:this.$=X[K];break;case 13:let Y=X[K-1];Y.description=H.trimColon(X[K]),this.$=Y;break;case 14:this.$={stmt:"relation",state1:X[K-2],state2:X[K]};break;case 15:let Q=H.trimColon(X[K]);this.$={stmt:"relation",state1:X[K-3],state2:X[K-1],description:Q};break;case 19:this.$={stmt:"state",id:X[K-3],type:"default",description:"",doc:X[K-1]};break;case 20:var ee=X[K],J=X[K-2].trim();if(X[K].match(":")){var W=X[K].split(":");ee=W[0],J=[J,W[1]]}this.$={stmt:"state",id:ee,type:"default",description:J};break;case 21:this.$={stmt:"state",id:X[K-3],type:"default",description:X[K-5],doc:X[K-1]};break;case 22:this.$={stmt:"state",id:X[K],type:"fork"};break;case 23:this.$={stmt:"state",id:X[K],type:"join"};break;case 24:this.$={stmt:"state",id:X[K],type:"choice"};break;case 25:this.$={stmt:"state",id:H.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:X[K-1].trim(),note:{position:X[K-2].trim(),text:X[K].trim()}};break;case 29:this.$=X[K].trim(),H.setAccTitle(this.$);break;case 30:case 31:this.$=X[K].trim(),H.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:X[K-1].trim(),classes:X[K].trim()};break;case 34:this.$={stmt:"style",id:X[K-1].trim(),styleClass:X[K].trim()};break;case 35:this.$={stmt:"applyClass",id:X[K-1].trim(),styleClass:X[K].trim()};break;case 36:H.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:H.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:H.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:H.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:X[K].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:X[K-2].trim(),classes:[X[K].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:X[K-2].trim(),classes:[X[K].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:g,28:m,29:x,32:25,33:y,35:b,37:w,38:_,42:k,45:E,48:L,49:S,50:C,51:M,54:R},t(T,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:g,28:m,29:x,32:25,33:y,35:b,37:w,38:_,42:k,45:E,48:L,49:S,50:C,51:M,54:R},t(T,[2,7]),t(T,[2,8]),t(T,[2,9]),t(T,[2,10]),t(T,[2,11]),t(T,[2,12],{14:[1,39],15:[1,40]}),t(T,[2,16]),{18:[1,41]},t(T,[2,18],{20:[1,42]}),{23:[1,43]},t(T,[2,22]),t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(T,[2,28]),{34:[1,48]},{36:[1,49]},t(T,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(I,[2,42],{55:[1,54]}),t(I,[2,43],{55:[1,55]}),t(T,[2,36]),t(T,[2,37]),t(T,[2,38]),t(T,[2,39]),t(T,[2,6]),t(T,[2,13]),{13:56,24:f,54:R},t(T,[2,17]),t(A,i,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(T,[2,29]),t(T,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(T,[2,14],{14:[1,67]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,68],22:h,24:f,25:d,26:p,27:g,28:m,29:x,32:25,33:y,35:b,37:w,38:_,42:k,45:E,48:L,49:S,50:C,51:M,54:R},t(T,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(T,[2,32]),t(T,[2,33]),t(T,[2,34]),t(T,[2,35]),t(I,[2,44]),t(I,[2,45]),t(T,[2,15]),t(T,[2,19]),t(A,i,{7:72}),t(T,[2,26]),t(T,[2,27]),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,73],22:h,24:f,25:d,26:p,27:g,28:m,29:x,32:25,33:y,35:b,37:w,38:_,42:k,45:E,48:L,49:S,50:C,51:M,54:R},t(T,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:v(function(P,$){if($.recoverable)this.trace(P);else{var z=new Error(P);throw z.hash=$,z}},"parseError"),parse:v(function(P){var $=this,z=[0],H=[],Z=[null],X=[],ie=this.table,K="",ee=0,J=0,W=0,Y=2,Q=1,se=X.slice.call(arguments,1),ue=Object.create(this.lexer),ce={yy:{}};for(var te in this.yy)Object.prototype.hasOwnProperty.call(this.yy,te)&&(ce.yy[te]=this.yy[te]);ue.setInput(P,ce.yy),ce.yy.lexer=ue,ce.yy.parser=this,typeof ue.yylloc>"u"&&(ue.yylloc={});var Le=ue.yylloc;X.push(Le);var oe=ue.options&&ue.options.ranges;typeof ce.yy.parseError=="function"?this.parseError=ce.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(ke){z.length=z.length-2*ke,Z.length=Z.length-ke,X.length=X.length-ke}v(be,"popStack");function Fe(){var ke;return ke=H.pop()||ue.lex()||Q,typeof ke!="number"&&(ke instanceof Array&&(H=ke,ke=H.pop()),ke=$.symbols_[ke]||ke),ke}v(Fe,"lex");for(var Be,Ve,We,qe,Re,Me,ye={},q,de,ae,he;;){if(We=z[z.length-1],this.defaultActions[We]?qe=this.defaultActions[We]:((Be===null||typeof Be>"u")&&(Be=Fe()),qe=ie[We]&&ie[We][Be]),typeof qe>"u"||!qe.length||!qe[0]){var U="";he=[];for(q in ie[We])this.terminals_[q]&&q>Y&&he.push("\'"+this.terminals_[q]+"\'");ue.showPosition?U="Parse error on line "+(ee+1)+`:\n`+ue.showPosition()+`\nExpecting `+he.join(", ")+", got \'"+(this.terminals_[Be]||Be)+"\'":U="Parse error on line "+(ee+1)+": Unexpected "+(Be==Q?"end of input":"\'"+(this.terminals_[Be]||Be)+"\'"),this.parseError(U,{text:ue.match,token:this.terminals_[Be]||Be,line:ue.yylineno,loc:Le,expected:he})}if(qe[0]instanceof Array&&qe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+We+", token: "+Be);switch(qe[0]){case 1:z.push(Be),Z.push(ue.yytext),X.push(ue.yylloc),z.push(qe[1]),Be=null,Ve?(Be=Ve,Ve=null):(J=ue.yyleng,K=ue.yytext,ee=ue.yylineno,Le=ue.yylloc,W>0&&W--);break;case 2:if(de=this.productions_[qe[1]][1],ye.$=Z[Z.length-de],ye._$={first_line:X[X.length-(de||1)].first_line,last_line:X[X.length-1].last_line,first_column:X[X.length-(de||1)].first_column,last_column:X[X.length-1].last_column},oe&&(ye._$.range=[X[X.length-(de||1)].range[0],X[X.length-1].range[1]]),Me=this.performAction.apply(ye,[K,J,ee,ce.yy,qe[1],Z,X].concat(se)),typeof Me<"u")return Me;de&&(z=z.slice(0,-1*de*2),Z=Z.slice(0,-1*de),X=X.slice(0,-1*de)),z.push(this.productions_[qe[1]][0]),Z.push(ye.$),X.push(ye._$),ae=ie[z[z.length-2]][z[z.length-1]],z.push(ae);break;case 3:return!0}}return!0},"parse")},N=function(){var B={EOF:1,parseError:v(function($,z){if(this.yy.parser)this.yy.parser.parseError($,z);else throw new Error($)},"parseError"),setInput:v(function(P,$){return this.yy=$||this.yy||{},this._input=P,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var P=this._input[0];this.yytext+=P,this.yyleng++,this.offset++,this.match+=P,this.matched+=P;var $=P.match(/(?:\\r\\n?|\\n).*/g);return $?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),P},"input"),unput:v(function(P){var $=P.length,z=P.split(/(?:\\r\\n?|\\n)/g);this._input=P+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$),this.offset-=$;var H=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.length-1);var Z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:z?(z.length===H.length?this.yylloc.first_column:0)+H[H.length-z.length].length-z[0].length:this.yylloc.first_column-$},this.options.ranges&&(this.yylloc.range=[Z[0],Z[0]+this.yyleng-$]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(P){this.unput(this.match.slice(P))},"less"),pastInput:v(function(){var P=this.matched.substr(0,this.matched.length-this.match.length);return(P.length>20?"...":"")+P.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var P=this.match;return P.length<20&&(P+=this._input.substr(0,20-P.length)),(P.substr(0,20)+(P.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var P=this.pastInput(),$=new Array(P.length+1).join("-");return P+this.upcomingInput()+`\n`+$+"^"},"showPosition"),test_match:v(function(P,$){var z,H,Z;if(this.options.backtrack_lexer&&(Z={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Z.yylloc.range=this.yylloc.range.slice(0))),H=P[0].match(/(?:\\r\\n?|\\n).*/g),H&&(this.yylineno+=H.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:H?H[H.length-1].length-H[H.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+P[0].length},this.yytext+=P[0],this.match+=P[0],this.matches=P,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(P[0].length),this.matched+=P[0],z=this.performAction.call(this,this.yy,this,$,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var X in Z)this[X]=Z[X];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var P,$,z,H;this._more||(this.yytext="",this.match="");for(var Z=this._currentRules(),X=0;X<Z.length;X++)if(z=this._input.match(this.rules[Z[X]]),z&&(!$||z[0].length>$[0].length)){if($=z,H=X,this.options.backtrack_lexer){if(P=this.test_match(z,Z[X]),P!==!1)return P;if(this._backtrack){$=!1;continue}else return!1}else if(!this.options.flex)break}return $?(P=this.test_match($,Z[H]),P!==!1?P:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var $=this.next();return $||this.lex()},"lex"),begin:v(function($){this.conditionStack.push($)},"begin"),popState:v(function(){var $=this.conditionStack.length-1;return $>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function($){return $=this.conditionStack.length-1-Math.abs($||0),$>=0?this.conditionStack[$]:"INITIAL"},"topState"),pushState:v(function($){this.begin($)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function($,z,H,Z){var X=Z;switch(H){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;break;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;break;case 16:return this.popState(),"acc_title_value";break;case 17:return this.begin("acc_descr"),35;break;case 18:return this.popState(),"acc_descr_value";break;case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;break;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 24:return this.popState(),this.pushState("CLASSDEFID"),39;break;case 25:return this.popState(),40;break;case 26:return this.pushState("CLASS"),45;break;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;break;case 28:return this.popState(),47;break;case 29:return this.pushState("STYLE"),42;break;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;break;case 31:return this.popState(),44;break;case 32:return this.pushState("SCALE"),17;break;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 37:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 38:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 39:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";break;case 48:return this.popState(),"ID";break;case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;break;case 54:break;case 55:return this.popState(),21;break;case 56:break;case 57:return this.begin("NOTE"),29;break;case 58:return this.popState(),this.pushState("NOTE_ID"),56;break;case 59:return this.popState(),this.pushState("NOTE_ID"),57;break;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";break;case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 66:return this.popState(),z.yytext=z.yytext.substr(2).trim(),31;break;case 67:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),31;break;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return z.yytext=z.yytext.trim(),14;break;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\\b)/i,/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:[\\s]+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:classDef\\s+)/i,/^(?:DEFAULT\\s+)/i,/^(?:\\w+\\s+)/i,/^(?:[^\\n]*)/i,/^(?:class\\s+)/i,/^(?:(\\w+)+((,\\s*\\w+)*))/i,/^(?:[^\\n]*)/i,/^(?:style\\s+)/i,/^(?:[\\w,]+\\s+)/i,/^(?:[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:state\\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\\[\\[fork\\]\\])/i,/^(?:.*\\[\\[join\\]\\])/i,/^(?:.*\\[\\[choice\\]\\])/i,/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:["])/i,/^(?:\\s*as\\s+)/i,/^(?:[^\\n\\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\\n\\s\\{]+)/i,/^(?:\\n)/i,/^(?:\\{)/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:\\})/i,/^(?:[\\n])/i,/^(?:note\\s+)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:")/i,/^(?:\\s*as\\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\\n]*)/i,/^(?:\\s*[^:\\n\\s\\-]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:[\\s\\S]*?end note\\b)/i,/^(?:stateDiagram\\s+)/i,/^(?:stateDiagram-v2\\s+)/i,/^(?:hide empty description\\b)/i,/^(?:\\[\\*\\])/i,/^(?:[^:\\n\\s\\-\\{]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return B}();D.lexer=N;function O(){this.yy={}}return v(O,"Parser"),O.prototype=D,D.Parser=O,new O}();LM.parser=LM;QT=LM,Aze="LR",ohe="TB",qT="state",NM="relation",_ze="classDef",Lze="style",Rze="applyClass",q2="default",lhe="divider",che="fill:none",uhe="fill: #333",hhe="c",fhe="text",dhe="normal",AM="rect",_M="rectWithTitle",Nze="stateStart",Ize="stateEnd",ehe="divider",the="roundedWithTitle",Mze="note",Dze="noteGroup",Y2="statediagram",Oze="state",Pze=`${Y2}-${Oze}`,phe="transition",Bze="note",Fze="note-edge",zze=`${phe} ${Fze}`,$ze=`${Y2}-${Bze}`,Gze="cluster",Uze=`${Y2}-${Gze}`,Vze="cluster-alt",Wze=`${Y2}-${Vze}`,ghe="parent",mhe="note",Hze="state",IM="----",qze=`${IM}${mhe}`,rhe=`${IM}${ghe}`,vhe=v((t,e=ohe)=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),Yze=v(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),Xze=v(async function(t,e,r,n){re.info("REF0:"),re.info("Drawing state diagram (v2)",e);let{securityLevel:i,state:a,layout:s}=pe();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=pg(e,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await cg(o,l);let u=8;Wt.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),gg(l,u,Y2,a?.useMaxWidth??!0)},"draw"),yhe={getClasses:Yze,draw:Xze,getDir:vhe},VT=new Map,tf=0;v(WT,"stateDomId");jze=v((t,e,r,n,i,a,s,o)=>{re.trace("items",e),e.forEach(l=>{switch(l.stmt){case qT:W2(t,l,r,n,i,a,s,o);break;case q2:W2(t,l,r,n,i,a,s,o);break;case NM:{W2(t,l.state1,r,n,i,a,s,o),W2(t,l.state2,r,n,i,a,s,o);let u={id:"edge"+tf,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:che,labelStyle:"",label:je.sanitizeText(l.description,pe()),arrowheadStyle:uhe,labelpos:hhe,labelType:fhe,thickness:dhe,classes:phe,look:s};i.push(u),tf++}break}})},"setupDoc"),nhe=v((t,e=ohe)=>{let r=e;if(t.doc)for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");v(V2,"insertOrUpdateNode");v(xhe,"getClassesFromDbInfo");v(bhe,"getStylesFromDbInfo");W2=v((t,e,r,n,i,a,s,o)=>{let l=e.id,u=r.get(l),h=xhe(u),f=bhe(u);if(re.info("dataFetcher parsedItem",e,u,f),l!=="root"){let d=AM;e.start===!0?d=Nze:e.start===!1&&(d=Ize),e.type!==q2&&(d=e.type),VT.get(l)||VT.set(l,{id:l,shape:d,description:je.sanitizeText(l,pe()),cssClasses:`${h} ${Pze}`,cssStyles:f});let p=VT.get(l);e.description&&(Array.isArray(p.description)?(p.shape=_M,p.description.push(e.description)):p.description?.length>0?(p.shape=_M,p.description===l?p.description=[e.description]:p.description=[p.description,e.description]):(p.shape=AM,p.description=e.description),p.description=je.sanitizeTextOrArray(p.description,pe())),p.description?.length===1&&p.shape===_M&&(p.type==="group"?p.shape=the:p.shape=AM),!p.type&&e.doc&&(re.info("Setting cluster for XCX",l,nhe(e)),p.type="group",p.isGroup=!0,p.dir=nhe(e),p.shape=e.type===lhe?ehe:the,p.cssClasses=`${p.cssClasses} ${Uze} ${a?Wze:""}`);let g={labelStyle:"",shape:p.shape,label:p.description,cssClasses:p.cssClasses,cssCompiledStyles:[],cssStyles:p.cssStyles,id:l,dir:p.dir,domId:WT(l,tf),type:p.type,isGroup:p.type==="group",padding:8,rx:10,ry:10,look:s};if(g.shape===ehe&&(g.label=""),t&&t.id!=="root"&&(re.trace("Setting node ",l," to be child of its parent ",t.id),g.parentId=t.id),g.centerLabel=!0,e.note){let m={labelStyle:"",shape:Mze,label:e.note.text,cssClasses:$ze,cssStyles:[],cssCompilesStyles:[],id:l+qze+"-"+tf,domId:WT(l,tf,mhe),type:p.type,isGroup:p.type==="group",padding:pe().flowchart.padding,look:s,position:e.note.position},x=l+rhe,y={labelStyle:"",shape:Dze,label:e.note.text,cssClasses:p.cssClasses,cssStyles:[],id:l+rhe,domId:WT(l,tf,ghe),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};tf++,y.id=x,m.parentId=x,V2(n,y,o),V2(n,m,o),V2(n,g,o);let b=l,w=m.id;e.note.position==="left of"&&(b=m.id,w=l),i.push({id:b+"-"+w,start:b,end:w,arrowhead:"none",arrowTypeEnd:"",style:che,labelStyle:"",classes:zze,arrowheadStyle:uhe,labelpos:hhe,labelType:fhe,thickness:dhe,look:s})}else V2(n,g,o)}e.doc&&(re.trace("Adding nodes children "),jze(e,e.doc,r,n,i,!a,s,o))},"dataFetcher"),Kze=v(()=>{VT.clear(),tf=0},"reset"),MM="[*]",whe="start",khe=MM,The="end",ihe="color",ahe="fill",Zze="bgFill",Qze=",";v(DM,"newClassesList");YT=[],OM=[],Ehe=Aze,XT=[],xm=DM(),She=v(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),jT={root:She()},Cs=jT.root,H2=0,she=0,Jze={LINE:0,DOTTED_LINE:1},e$e={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},UT=v(t=>JSON.parse(JSON.stringify(t)),"clone"),t$e=v(t=>{re.info("Setting root doc",t),XT=t},"setRootDoc"),r$e=v(()=>XT,"getRootDoc"),HT=v((t,e,r)=>{if(e.stmt===NM)HT(t,e.state1,!0),HT(t,e.state2,!1);else if(e.stmt===qT&&(e.id==="[*]"?(e.id=r?t.id+"_start":t.id+"_end",e.start=r):e.id=e.id.trim()),e.doc){let n=[],i=[],a;for(a=0;a<e.doc.length;a++)if(e.doc[a].type===lhe){let s=UT(e.doc[a]);s.doc=UT(i),n.push(s),i=[]}else i.push(e.doc[a]);if(n.length>0&&i.length>0){let s={stmt:qT,id:iA(),type:"divider",doc:UT(i)};n.push(UT(s)),e.doc=n}e.doc.forEach(s=>HT(e,s,!0))}},"docTranslator"),PM=v(()=>(HT({id:"root"},{id:"root",doc:XT},!0),{id:"root",doc:XT}),"getRootDocV2"),n$e=v(t=>{let e;t.doc?e=t.doc:e=t,re.info(e),Che(!0),re.info("Extract initial document:",e),e.forEach(a=>{switch(re.warn("Statement",a.stmt),a.stmt){case qT:rf(a.id.trim(),a.type,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles);break;case NM:Nhe(a.state1,a.state2,a.description);break;case _ze:Ihe(a.id.trim(),a.classes);break;case Lze:{let s=a.id.trim().split(","),o=a.styleClass.split(",");s.forEach(l=>{let u=f0(l);if(u===void 0){let h=l.trim();rf(h),u=f0(h)}u.styles=o.map(h=>h.replace(/;/g,"")?.trim())})}break;case Rze:BM(a.id.trim(),a.styleClass);break}});let r=Ahe(),i=pe().look;Kze(),W2(void 0,PM(),r,YT,OM,!0,i,xm),YT.forEach(a=>{if(Array.isArray(a.label)){if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+a.id+"]");a.label=a.label[0]}})},"extract"),rf=v(function(t,e=q2,r=null,n=null,i=null,a=null,s=null,o=null){let l=t?.trim();if(Cs.states.has(l)?(Cs.states.get(l).doc||(Cs.states.get(l).doc=r),Cs.states.get(l).type||(Cs.states.get(l).type=e)):(re.info("Adding state ",l,n),Cs.states.set(l,{id:l,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]})),n&&(re.info("Setting state description",l,n),typeof n=="string"&&RM(l,n.trim()),typeof n=="object"&&n.forEach(u=>RM(l,u.trim()))),i){let u=Cs.states.get(l);u.note=i,u.note.text=je.sanitizeText(u.note.text,pe())}a&&(re.info("Setting state classes",l,a),(typeof a=="string"?[a]:a).forEach(h=>BM(l,h.trim()))),s&&(re.info("Setting state styles",l,s),(typeof s=="string"?[s]:s).forEach(h=>c$e(l,h.trim()))),o&&(re.info("Setting state styles",l,s),(typeof o=="string"?[o]:o).forEach(h=>u$e(l,h.trim())))},"addState"),Che=v(function(t){YT=[],OM=[],jT={root:She()},Cs=jT.root,H2=0,xm=DM(),t||xr()},"clear"),f0=v(function(t){return Cs.states.get(t)},"getState"),Ahe=v(function(){return Cs.states},"getStates"),i$e=v(function(){re.info("Documents = ",jT)},"logDocuments"),a$e=v(function(){return Cs.relations},"getRelations");v(KT,"startIdIfNeeded");v(ZT,"startTypeIfNeeded");v(_he,"endIdIfNeeded");v(Lhe,"endTypeIfNeeded");v(Rhe,"addRelationObjs");Nhe=v(function(t,e,r){if(typeof t=="object")Rhe(t,e,r);else{let n=KT(t.trim()),i=ZT(t),a=_he(e.trim()),s=Lhe(e);rf(n,i),rf(a,s),Cs.relations.push({id1:n,id2:a,title:je.sanitizeText(r,pe())})}},"addRelation"),RM=v(function(t,e){let r=Cs.states.get(t),n=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push(je.sanitizeText(n,pe()))},"addDescription"),s$e=v(function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},"cleanupLabel"),o$e=v(()=>(she++,"divider-id-"+she),"getDividerId"),Ihe=v(function(t,e=""){xm.has(t)||xm.set(t,{id:t,styles:[],textStyles:[]});let r=xm.get(t);e?.split(Qze).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(ihe).exec(n)){let s=i.replace(ahe,Zze).replace(ihe,ahe);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),l$e=v(function(){return xm},"getClasses"),BM=v(function(t,e){t.split(",").forEach(function(r){let n=f0(r);if(n===void 0){let i=r.trim();rf(i),n=f0(i)}n.classes.push(e)})},"setCssClass"),c$e=v(function(t,e){let r=f0(t);r!==void 0&&r.styles.push(e)},"setStyle"),u$e=v(function(t,e){let r=f0(t);r!==void 0&&r.textStyles.push(e)},"setTextStyle"),h$e=v(()=>Ehe,"getDirection"),f$e=v(t=>{Ehe=t},"setDirection"),d$e=v(t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),"trimColon"),p$e=v(()=>{let t=pe();return{nodes:YT,edges:OM,other:{},config:t,direction:vhe(PM())}},"getData"),_l={getConfig:v(()=>pe().state,"getConfig"),getData:p$e,addState:rf,clear:Che,getState:f0,getStates:Ahe,getRelations:a$e,getClasses:l$e,getDirection:h$e,addRelation:Nhe,getDividerId:o$e,setDirection:f$e,cleanupLabel:s$e,lineType:Jze,relationType:e$e,logDocuments:i$e,getRootDoc:r$e,setRootDoc:t$e,getRootDocV2:PM,extract:n$e,trimColon:d$e,getAccTitle:Ar,setAccTitle:Tr,getAccDescription:Lr,setAccDescription:_r,addStyleClass:Ihe,setCssClass:BM,addDescription:RM,setDiagramTitle:en,getDiagramTitle:Hr},g$e=v(t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`,"getStyles"),JT=g$e});var Bhe={};mr(Bhe,{diagram:()=>O$e});var $M,m$e,v$e,Ohe,y$e,x$e,b$e,w$e,k$e,T$e,E$e,S$e,C$e,A$e,_$e,Mhe,Dhe,L$e,eo,zM,R$e,N$e,I$e,M$e,Phe,D$e,O$e,Fhe=F(()=>{FM();$h();wu();yu();fl();el();ic();fo();za();xn();or();lr();jv();vs();lr();$M={},m$e=v((t,e)=>{$M[t]=e},"set"),v$e=v(t=>$M[t],"get"),Ohe=v(()=>Object.keys($M),"keys"),y$e=v(()=>Ohe().length,"size"),x$e={get:v$e,set:m$e,keys:Ohe,size:y$e},b$e=v(t=>t.append("circle").attr("class","start-state").attr("r",pe().state.sizeUnit).attr("cx",pe().state.padding+pe().state.sizeUnit).attr("cy",pe().state.padding+pe().state.sizeUnit),"drawStartState"),w$e=v(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",pe().state.textHeight).attr("class","divider").attr("x2",pe().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),k$e=v((t,e)=>{let r=t.append("text").attr("x",2*pe().state.padding).attr("y",pe().state.textHeight+2*pe().state.padding).attr("font-size",pe().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",pe().state.padding).attr("y",pe().state.padding).attr("width",n.width+2*pe().state.padding).attr("height",n.height+2*pe().state.padding).attr("rx",pe().state.radius),r},"drawSimpleState"),T$e=v((t,e)=>{let r=v(function(d,p,g){let m=d.append("tspan").attr("x",2*pe().state.padding).text(p);g||m.attr("dy",pe().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*pe().state.padding).attr("y",pe().state.textHeight+1.3*pe().state.padding).attr("font-size",pe().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),a=i.height,s=t.append("text").attr("x",pe().state.padding).attr("y",a+pe().state.padding*.4+pe().state.dividerMargin+pe().state.textHeight).attr("class","state-description"),o=!0,l=!0;e.descriptions.forEach(function(d){o||(r(s,d,l),l=!1),o=!1});let u=t.append("line").attr("x1",pe().state.padding).attr("y1",pe().state.padding+a+pe().state.dividerMargin/2).attr("y2",pe().state.padding+a+pe().state.dividerMargin/2).attr("class","descr-divider"),h=s.node().getBBox(),f=Math.max(h.width,i.width);return u.attr("x2",f+3*pe().state.padding),t.insert("rect",":first-child").attr("x",pe().state.padding).attr("y",pe().state.padding).attr("width",f+2*pe().state.padding).attr("height",h.height+a+2*pe().state.padding).attr("rx",pe().state.radius),t},"drawDescrState"),E$e=v((t,e,r)=>{let n=pe().state.padding,i=2*pe().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",pe().state.titleShift).attr("font-size",pe().state.fontSize).attr("class","state-title").text(e.id),h=l.node().getBBox().width+i,f=Math.max(h,s);f===s&&(f=f+i);let d,p=t.node().getBBox();e.doc,d=o-n,h>s&&(d=(s-f)/2+n),Math.abs(o-p.x)<n&&h>s&&(d=o-(h-s)/2);let g=1-pe().state.textHeight;return t.insert("rect",":first-child").attr("x",d).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",p.height+pe().state.textHeight+pe().state.titleShift+1).attr("rx","0"),l.attr("x",d+n),h<=s&&l.attr("x",o+(f-i)/2-h/2+n),t.insert("rect",":first-child").attr("x",d).attr("y",pe().state.titleShift-pe().state.textHeight-pe().state.padding).attr("width",f).attr("height",pe().state.textHeight*3).attr("rx",pe().state.radius),t.insert("rect",":first-child").attr("x",d).attr("y",pe().state.titleShift-pe().state.textHeight-pe().state.padding).attr("width",f).attr("height",p.height+3+2*pe().state.textHeight).attr("rx",pe().state.radius),t},"addTitleAndBox"),S$e=v(t=>(t.append("circle").attr("class","end-state-outer").attr("r",pe().state.sizeUnit+pe().state.miniPadding).attr("cx",pe().state.padding+pe().state.sizeUnit+pe().state.miniPadding).attr("cy",pe().state.padding+pe().state.sizeUnit+pe().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",pe().state.sizeUnit).attr("cx",pe().state.padding+pe().state.sizeUnit+2).attr("cy",pe().state.padding+pe().state.sizeUnit+2)),"drawEndState"),C$e=v((t,e)=>{let r=pe().state.forkWidth,n=pe().state.forkHeight;if(e.parentId){let i=r;r=n,n=i}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",pe().state.padding).attr("y",pe().state.padding)},"drawForkJoinState"),A$e=v((t,e,r,n)=>{let i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=t.replace(/\\r\\n/g,"<br/>");s=s.replace(/\\n/g,"<br/>");let o=s.split(je.lineBreakRegex),l=1.25*pe().state.noteMargin;for(let u of o){let h=u.trim();if(h.length>0){let f=a.append("tspan");if(f.text(h),l===0){let d=f.node().getBBox();l+=d.height}i+=l,f.attr("x",e+pe().state.noteMargin),f.attr("y",r+i+1.25*pe().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),_$e=v((t,e)=>{e.attr("class","state-note");let r=e.append("rect").attr("x",0).attr("y",pe().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=A$e(t,0,0,n);return r.attr("height",a+2*pe().state.noteMargin),r.attr("width",i+pe().state.noteMargin*2),r},"drawNote"),Mhe=v(function(t,e){let r=e.id,n={id:r,label:e.id,width:0,height:0},i=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&b$e(i),e.type==="end"&&S$e(i),(e.type==="fork"||e.type==="join")&&C$e(i,e),e.type==="note"&&_$e(e.note.text,i),e.type==="divider"&&w$e(i),e.type==="default"&&e.descriptions.length===0&&k$e(i,e),e.type==="default"&&e.descriptions.length>0&&T$e(i,e);let a=i.node().getBBox();return n.width=a.width+2*pe().state.padding,n.height=a.height+2*pe().state.padding,x$e.set(r,n),n},"drawState"),Dhe=0,L$e=v(function(t,e,r){let n=v(function(l){switch(l){case _l.relationType.AGGREGATION:return"aggregation";case _l.relationType.EXTENSION:return"extension";case _l.relationType.COMPOSITION:return"composition";case _l.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(l=>!Number.isNaN(l.y));let i=e.points,a=ss().x(function(l){return l.x}).y(function(l){return l.y}).curve(cl),s=t.append("path").attr("d",a(i)).attr("id","edge"+Dhe).attr("class","transition"),o="";if(pe().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\\(/g,"\\\\("),o=o.replace(/\\)/g,"\\\\)")),s.attr("marker-end","url("+o+"#"+n(_l.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let l=t.append("g").attr("class","stateLabel"),{x:u,y:h}=Wt.calcLabelPosition(e.points),f=je.getRows(r.title),d=0,p=[],g=0,m=0;for(let b=0;b<=f.length;b++){let w=l.append("text").attr("text-anchor","middle").text(f[b]).attr("x",u).attr("y",h+d),_=w.node().getBBox();g=Math.max(g,_.width),m=Math.min(m,_.x),re.info(_.x,u,h+d),d===0&&(d=w.node().getBBox().height,re.info("Title height",d,h)),p.push(w)}let x=d*f.length;if(f.length>1){let b=(f.length-1)*d*.5;p.forEach((w,_)=>w.attr("y",h+_*d-b)),x=d*f.length}let y=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-g/2-pe().state.padding/2).attr("y",h-x/2-pe().state.padding/2-3.5).attr("width",g+pe().state.padding).attr("height",x+pe().state.padding),re.info(y)}Dhe++},"drawEdge"),zM={},R$e=v(function(){},"setConf"),N$e=v(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),I$e=v(function(t,e,r,n){eo=pe().state;let i=pe().securityLevel,a;i==="sandbox"&&(a=Ge("#i"+e));let s=i==="sandbox"?Ge(a.nodes()[0].contentDocument.body):Ge("body"),o=i==="sandbox"?a.nodes()[0].contentDocument:document;re.debug("Rendering diagram "+t);let l=s.select(`[id=\'${e}\']`);N$e(l);let u=n.db.getRootDoc();Phe(u,l,void 0,!1,s,o,n);let h=eo.padding,f=l.node().getBBox(),d=f.width+h*2,p=f.height+h*2,g=d*1.75;Wr(l,p,g,eo.useMaxWidth),l.attr("viewBox",`${f.x-eo.padding} ${f.y-eo.padding} `+d+" "+p)},"draw"),M$e=v(t=>t?t.length*eo.fontSizeFactor:1,"getLabelWidth"),Phe=v((t,e,r,n,i,a,s)=>{let o=new Sr({compound:!0,multigraph:!0}),l,u=!0;for(l=0;l<t.length;l++)if(t[l].stmt==="relation"){u=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:u?1:eo.edgeLengthFactor,nodeSep:u?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:u?1:eo.edgeLengthFactor,nodeSep:u?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}}),s.db.extract(t);let h=s.db.getStates(),f=s.db.getRelations(),d=Object.keys(h),p=!0;for(let b of d){let w=h[b];r&&(w.parentId=r);let _;if(w.doc){let k=e.append("g").attr("id",w.id).attr("class","stateGroup");if(_=Phe(w.doc,k,w.id,!n,i,a,s),p){k=E$e(k,w,n);let E=k.node().getBBox();_.width=E.width,_.height=E.height+eo.padding/2,zM[w.id]={y:eo.compositTitleSize}}else{let E=k.node().getBBox();_.width=E.width,_.height=E.height}}else _=Mhe(e,w,o);if(w.note){let k={descriptions:[],id:w.id+"-note",note:w.note,type:"note"},E=Mhe(e,k,o);w.note.position==="left of"?(o.setNode(_.id+"-note",E),o.setNode(_.id,_)):(o.setNode(_.id,_),o.setNode(_.id+"-note",E)),o.setParent(_.id,_.id+"-group"),o.setParent(_.id+"-note",_.id+"-group")}else o.setNode(_.id,_)}re.debug("Count=",o.nodeCount(),o);let g=0;f.forEach(function(b){g++,re.debug("Setting edge",b),o.setEdge(b.id1,b.id2,{relation:b,width:M$e(b.title),height:eo.labelHeight*je.getRows(b.title).length,labelpos:"c"},"id"+g)}),bu(o),re.debug("Graph after layout",o.nodes());let m=e.node();o.nodes().forEach(function(b){b!==void 0&&o.node(b)!==void 0?(re.warn("Node "+b+": "+JSON.stringify(o.node(b))),i.select("#"+m.id+" #"+b).attr("transform","translate("+(o.node(b).x-o.node(b).width/2)+","+(o.node(b).y+(zM[b]?zM[b].y:0)-o.node(b).height/2)+" )"),i.select("#"+m.id+" #"+b).attr("data-x-shift",o.node(b).x-o.node(b).width/2),a.querySelectorAll("#"+m.id+" #"+b+" .divider").forEach(_=>{let k=_.parentElement,E=0,L=0;k&&(k.parentElement&&(E=k.parentElement.getBBox().width),L=parseInt(k.getAttribute("data-x-shift"),10),Number.isNaN(L)&&(L=0)),_.setAttribute("x1",0-L+8),_.setAttribute("x2",E-L-8)})):re.debug("No Node "+b+": "+JSON.stringify(o.node(b)))});let x=m.getBBox();o.edges().forEach(function(b){b!==void 0&&o.edge(b)!==void 0&&(re.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(o.edge(b))),L$e(e,o.edge(b),o.edge(b).relation))}),x=m.getBBox();let y={id:r||"root",label:r||"root",width:0,height:0};return y.width=x.width+2*eo.padding,y.height=x.height+2*eo.padding,re.debug("Doc rendered",y,o),y},"renderDoc"),D$e={setConf:R$e,draw:I$e},O$e={parser:QT,db:_l,renderer:D$e,styles:JT,init:v(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,_l.clear()},"init")}});var zhe={};mr(zhe,{diagram:()=>P$e});var P$e,$he=F(()=>{FM();$h();wu();yu();fl();el();ic();fo();za();xn();or();P$e={parser:QT,db:_l,renderer:yhe,styles:JT,init:v(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,_l.clear()},"init")}});var Khe={};mr(Khe,{diagram:()=>nGe});function jhe(t){let e=pe().journey,r=60;Object.keys($u).forEach(n=>{let i=$u[n].color,a={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:$u[n].position};K2.drawCircle(t,a);let s={x:40,y:r+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};K2.drawText(t,s),r+=20})}var UM,B$e,bm,VM,X2,j2,F$e,z$e,$$e,G$e,U$e,V$e,W$e,Ghe,H$e,Uhe,q$e,Y$e,WM,X$e,qhe,Yhe,j$e,K$e,Vhe,Z$e,Q$e,Xhe,J$e,K2,eGe,$u,e6,d0,tGe,Uo,GM,Whe,rGe,Hhe,nGe,Zhe=F(()=>{yw();or();lr();lr();UM=function(){var t=v(function(f,d,p,g){for(p=p||{},g=f.length;g--;p[f[g]]=d);return p},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,14],l={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:v(function(d,p,g,m,x,y,b){var w=y.length-1;switch(x){case 1:return y[w-1];case 2:this.$=[];break;case 3:y[w-1].push(y[w]),this.$=y[w-1];break;case 4:case 5:this.$=y[w];break;case 6:case 7:this.$=[];break;case 8:m.setDiagramTitle(y[w].substr(6)),this.$=y[w].substr(6);break;case 9:this.$=y[w].trim(),m.setAccTitle(this.$);break;case 10:case 11:this.$=y[w].trim(),m.setAccDescription(this.$);break;case 12:m.addSection(y[w].substr(8)),this.$=y[w].substr(8);break;case 13:m.addTask(y[w-1],y[w]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:s,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:v(function(d,p){if(p.recoverable)this.trace(d);else{var g=new Error(d);throw g.hash=p,g}},"parseError"),parse:v(function(d){var p=this,g=[0],m=[],x=[null],y=[],b=this.table,w="",_=0,k=0,E=0,L=2,S=1,C=y.slice.call(arguments,1),M=Object.create(this.lexer),R={yy:{}};for(var T in this.yy)Object.prototype.hasOwnProperty.call(this.yy,T)&&(R.yy[T]=this.yy[T]);M.setInput(d,R.yy),R.yy.lexer=M,R.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var I=M.yylloc;y.push(I);var A=M.options&&M.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function D(W){g.length=g.length-2*W,x.length=x.length-W,y.length=y.length-W}v(D,"popStack");function N(){var W;return W=m.pop()||M.lex()||S,typeof W!="number"&&(W instanceof Array&&(m=W,W=m.pop()),W=p.symbols_[W]||W),W}v(N,"lex");for(var O,B,P,$,z,H,Z={},X,ie,K,ee;;){if(P=g[g.length-1],this.defaultActions[P]?$=this.defaultActions[P]:((O===null||typeof O>"u")&&(O=N()),$=b[P]&&b[P][O]),typeof $>"u"||!$.length||!$[0]){var J="";ee=[];for(X in b[P])this.terminals_[X]&&X>L&&ee.push("\'"+this.terminals_[X]+"\'");M.showPosition?J="Parse error on line "+(_+1)+`:\n`+M.showPosition()+`\nExpecting `+ee.join(", ")+", got \'"+(this.terminals_[O]||O)+"\'":J="Parse error on line "+(_+1)+": Unexpected "+(O==S?"end of input":"\'"+(this.terminals_[O]||O)+"\'"),this.parseError(J,{text:M.match,token:this.terminals_[O]||O,line:M.yylineno,loc:I,expected:ee})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+O);switch($[0]){case 1:g.push(O),x.push(M.yytext),y.push(M.yylloc),g.push($[1]),O=null,B?(O=B,B=null):(k=M.yyleng,w=M.yytext,_=M.yylineno,I=M.yylloc,E>0&&E--);break;case 2:if(ie=this.productions_[$[1]][1],Z.$=x[x.length-ie],Z._$={first_line:y[y.length-(ie||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(ie||1)].first_column,last_column:y[y.length-1].last_column},A&&(Z._$.range=[y[y.length-(ie||1)].range[0],y[y.length-1].range[1]]),H=this.performAction.apply(Z,[w,k,_,R.yy,$[1],x,y].concat(C)),typeof H<"u")return H;ie&&(g=g.slice(0,-1*ie*2),x=x.slice(0,-1*ie),y=y.slice(0,-1*ie)),g.push(this.productions_[$[1]][0]),x.push(Z.$),y.push(Z._$),K=b[g[g.length-2]][g[g.length-1]],g.push(K);break;case 3:return!0}}return!0},"parse")},u=function(){var f={EOF:1,parseError:v(function(p,g){if(this.yy.parser)this.yy.parser.parseError(p,g);else throw new Error(p)},"parseError"),setInput:v(function(d,p){return this.yy=p||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var p=d.match(/(?:\\r\\n?|\\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:v(function(d){var p=d.length,g=d.split(/(?:\\r\\n?|\\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var m=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===m.length?this.yylloc.first_column:0)+m[m.length-g.length].length-g[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(d){this.unput(this.match.slice(d))},"less"),pastInput:v(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var d=this.pastInput(),p=new Array(d.length+1).join("-");return d+this.upcomingInput()+`\n`+p+"^"},"showPosition"),test_match:v(function(d,p){var g,m,x;if(this.options.backtrack_lexer&&(x={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(x.yylloc.range=this.yylloc.range.slice(0))),m=d[0].match(/(?:\\r\\n?|\\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],g=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var y in x)this[y]=x[y];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,p,g,m;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),y=0;y<x.length;y++)if(g=this._input.match(this.rules[x[y]]),g&&(!p||g[0].length>p[0].length)){if(p=g,m=y,this.options.backtrack_lexer){if(d=this.test_match(g,x[y]),d!==!1)return d;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(d=this.test_match(p,x[m]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var p=this.next();return p||this.lex()},"lex"),begin:v(function(p){this.conditionStack.push(p)},"begin"),popState:v(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:v(function(p){this.begin(p)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(p,g,m,x){var y=x;switch(m){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:journey\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:section\\s[^#:\\n;]+)/i,/^(?:[^#:\\n;]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return f}();l.lexer=u;function h(){this.yy={}}return v(h,"Parser"),h.prototype=l,l.Parser=h,new h}();UM.parser=UM;B$e=UM,bm="",VM=[],X2=[],j2=[],F$e=v(function(){VM.length=0,X2.length=0,bm="",j2.length=0,xr()},"clear"),z$e=v(function(t){bm=t,VM.push(t)},"addSection"),$$e=v(function(){return VM},"getSections"),G$e=v(function(){let t=Ghe(),e=100,r=0;for(;!t&&r<e;)t=Ghe(),r++;return X2.push(...j2),X2},"getTasks"),U$e=v(function(){let t=[];return X2.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},"updateActors"),V$e=v(function(t,e){let r=e.substr(1).split(":"),n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));let a=i.map(o=>o.trim()),s={section:bm,type:bm,people:a,task:t,score:n};j2.push(s)},"addTask"),W$e=v(function(t){let e={section:bm,type:bm,description:t,task:t,classes:[]};X2.push(e)},"addTaskOrg"),Ghe=v(function(){let t=v(function(r){return j2[r].processed},"compileTask"),e=!0;for(let[r,n]of j2.entries())t(r),e=e&&n.processed;return e},"compileTasks"),H$e=v(function(){return U$e()},"getActors"),Uhe={getConfig:v(()=>pe().journey,"getConfig"),clear:F$e,setDiagramTitle:en,getDiagramTitle:Hr,setAccTitle:Tr,getAccTitle:Ar,setAccDescription:_r,getAccDescription:Lr,addSection:z$e,getSections:$$e,getTasks:G$e,addTask:V$e,addTaskOrg:W$e,getActors:H$e},q$e=v(t=>`.label {\n font-family: \'trebuchet ms\', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: \'trebuchet ms\', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`,"getStyles"),Y$e=q$e,WM=v(function(t,e){return Ed(t,e)},"drawRect"),X$e=v(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=Ql().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}v(a,"smile");function s(l){let u=Ql().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}v(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return v(o,"ambivalent"),e.score>3?a(i):e.score<3?s(i):o(i),n},"drawFace"),qhe=v(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),Yhe=v(function(t,e){return ane(t,e)},"drawText"),j$e=v(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}v(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,Yhe(t,e)},"drawLabel"),K$e=v(function(t,e,r){let n=t.append("g"),i=dc();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,WM(n,i),Xhe(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),Vhe=-1,Z$e=v(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");Vhe++;let a=300+5*30;i.append("line").attr("id","task"+Vhe).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),X$e(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=dc();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,WM(i,s);let o=e.x+14;e.people.forEach(l=>{let u=e.actors[l].color,h={cx:o,cy:e.y,r:7,fill:u,stroke:"#000",title:l,pos:e.actors[l].position};qhe(i,h),o+=10}),Xhe(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),Q$e=v(function(t,e){mw(t,e)},"drawBackgroundRect"),Xhe=function(){function t(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}v(t,"byText");function e(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=i.split(/<br\\s*\\/?>/gi);for(let x=0;x<m.length;x++){let y=x*p-p*(m.length-1)/2,b=a.append("text").attr("x",s+l/2).attr("y",o).attr("fill",d).style("text-anchor","middle").style("font-size",p).style("font-family",g);b.append("tspan").attr("x",s+l/2).attr("dy",y).text(m[x]),b.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,h)}}v(e,"byTspan");function r(i,a,s,o,l,u,h,f){let d=a.append("switch"),g=d.append("foreignObject").attr("x",s).attr("y",o).attr("width",l).attr("height",u).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,d,s,o,l,u,h,f),n(g,h)}v(r,"byFo");function n(i,a){for(let s in a)s in a&&i.attr(s,a[s])}return v(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),J$e=v(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),K2={drawRect:WM,drawCircle:qhe,drawSection:K$e,drawText:Yhe,drawLabel:j$e,drawTask:Z$e,drawBackgroundRect:Q$e,initGraphics:J$e},eGe=v(function(t){Object.keys(t).forEach(function(r){e6[r]=t[r]})},"setConf"),$u={};v(jhe,"drawActorLegend");e6=pe().journey,d0=e6.leftMargin,tGe=v(function(t,e,r,n){let i=pe().journey,a=pe().securityLevel,s;a==="sandbox"&&(s=Ge("#i"+e));let o=a==="sandbox"?Ge(s.nodes()[0].contentDocument.body):Ge("body");Uo.init();let l=o.select("#"+e);K2.initGraphics(l);let u=n.db.getTasks(),h=n.db.getDiagramTitle(),f=n.db.getActors();for(let y in $u)delete $u[y];let d=0;f.forEach(y=>{$u[y]={color:i.actorColours[d%i.actorColours.length],position:d},d++}),jhe(l),Uo.insert(0,0,d0,Object.keys($u).length*50),rGe(l,u,0);let p=Uo.getBounds();h&&l.append("text").text(h).attr("x",d0).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);let g=p.stopy-p.starty+2*i.diagramMarginY,m=d0+p.stopx+2*i.diagramMarginX;Wr(l,g,m,i.useMaxWidth),l.append("line").attr("x1",d0).attr("y1",i.height*4).attr("x2",m-d0-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let x=h?70:0;l.attr("viewBox",`${p.startx} -25 ${m} ${g+x}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",g+x+25)},"draw"),Uo={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:v(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:v(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:v(function(t,e,r,n){let i=pe().journey,a=this,s=0;function o(l){return v(function(h){s++;let f=a.sequenceItems.length-s+1;a.updateVal(h,"starty",e-f*i.boxMargin,Math.min),a.updateVal(h,"stopy",n+f*i.boxMargin,Math.max),a.updateVal(Uo.data,"startx",t-f*i.boxMargin,Math.min),a.updateVal(Uo.data,"stopx",r+f*i.boxMargin,Math.max),l!=="activation"&&(a.updateVal(h,"startx",t-f*i.boxMargin,Math.min),a.updateVal(h,"stopx",r+f*i.boxMargin,Math.max),a.updateVal(Uo.data,"starty",e-f*i.boxMargin,Math.min),a.updateVal(Uo.data,"stopy",n+f*i.boxMargin,Math.max))},"updateItemBounds")}v(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:v(function(t,e,r,n){let i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(Uo.data,"startx",i,Math.min),this.updateVal(Uo.data,"starty",s,Math.min),this.updateVal(Uo.data,"stopx",a,Math.max),this.updateVal(Uo.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),bumpVerticalPos:v(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:v(function(){return this.verticalPos},"getVerticalPos"),getBounds:v(function(){return this.data},"getBounds")},GM=e6.sectionFills,Whe=e6.sectionColours,rGe=v(function(t,e,r){let n=pe().journey,i="",a=n.height*2+n.diagramMarginY,s=r+a,o=0,l="#CCC",u="black",h=0;for(let[f,d]of e.entries()){if(i!==d.section){l=GM[o%GM.length],h=o%GM.length,u=Whe[o%Whe.length];let g=0,m=d.section;for(let y=f;y<e.length&&e[y].section==m;y++)g=g+1;let x={x:f*n.taskMargin+f*n.width+d0,y:50,text:d.section,fill:l,num:h,colour:u,taskCount:g};K2.drawSection(t,x,n),i=d.section,o++}let p=d.people.reduce((g,m)=>($u[m]&&(g[m]=$u[m]),g),{});d.x=f*n.taskMargin+f*n.width+d0,d.y=s,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=u,d.fill=l,d.num=h,d.actors=p,K2.drawTask(t,d,n),Uo.insert(d.x,d.y,d.x+d.width+n.taskMargin,300+5*30)}},"drawTasks"),Hhe={setConf:eGe,draw:tGe},nGe={parser:B$e,db:Uhe,renderer:Hhe,styles:Y$e,init:v(t=>{Hhe.setConf(t.journey),Uhe.clear()},"init")}});var dfe={};mr(dfe,{diagram:()=>EGe});function XM(t,e){t.each(function(){var r=Ge(this),n=r.text().split(/(\\s+|<br>)/).reverse(),i,a=[],s=1.1,o=r.attr("y"),l=parseFloat(r.attr("dy")),u=r.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",l+"em");for(let h=0;h<n.length;h++)i=n[n.length-1-h],a.push(i),u.text(a.join(" ").trim()),(u.node().getComputedTextLength()>e||i==="<br>")&&(a.pop(),u.text(a.join(" ").trim()),i==="<br>"?a=[""]:a=[i],u=r.append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em").text(i))})}var HM,iGe,tfe,wm,rfe,qM,t6,km,nfe,ife,afe,sfe,ofe,lfe,cfe,ufe,Qhe,aGe,sGe,r6,oGe,lGe,hfe,cGe,uGe,Jhe,hGe,fGe,dGe,YM,ffe,pGe,gGe,mGe,vGe,p0,yGe,efe,xGe,bGe,wGe,kGe,TGe,EGe,pfe=F(()=>{or();lr();lr();so();HM=function(){var t=v(function(d,p,g,m){for(g=g||{},m=d.length;m--;g[d[m]]=p);return g},"o"),e=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,16],l=[1,17],u={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:v(function(p,g,m,x,y,b,w){var _=b.length-1;switch(y){case 1:return b[_-1];case 2:this.$=[];break;case 3:b[_-1].push(b[_]),this.$=b[_-1];break;case 4:case 5:this.$=b[_];break;case 6:case 7:this.$=[];break;case 8:x.getCommonDb().setDiagramTitle(b[_].substr(6)),this.$=b[_].substr(6);break;case 9:this.$=b[_].trim(),x.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=b[_].trim(),x.getCommonDb().setAccDescription(this.$);break;case 12:x.addSection(b[_].substr(8)),this.$=b[_].substr(8);break;case 15:x.addTask(b[_],0,""),this.$=b[_];break;case 16:x.addEvent(b[_].substr(2)),this.$=b[_];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:o,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:o,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:v(function(p,g){if(g.recoverable)this.trace(p);else{var m=new Error(p);throw m.hash=g,m}},"parseError"),parse:v(function(p){var g=this,m=[0],x=[],y=[null],b=[],w=this.table,_="",k=0,E=0,L=0,S=2,C=1,M=b.slice.call(arguments,1),R=Object.create(this.lexer),T={yy:{}};for(var I in this.yy)Object.prototype.hasOwnProperty.call(this.yy,I)&&(T.yy[I]=this.yy[I]);R.setInput(p,T.yy),T.yy.lexer=R,T.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var A=R.yylloc;b.push(A);var D=R.options&&R.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(Y){m.length=m.length-2*Y,y.length=y.length-Y,b.length=b.length-Y}v(N,"popStack");function O(){var Y;return Y=x.pop()||R.lex()||C,typeof Y!="number"&&(Y instanceof Array&&(x=Y,Y=x.pop()),Y=g.symbols_[Y]||Y),Y}v(O,"lex");for(var B,P,$,z,H,Z,X={},ie,K,ee,J;;){if($=m[m.length-1],this.defaultActions[$]?z=this.defaultActions[$]:((B===null||typeof B>"u")&&(B=O()),z=w[$]&&w[$][B]),typeof z>"u"||!z.length||!z[0]){var W="";J=[];for(ie in w[$])this.terminals_[ie]&&ie>S&&J.push("\'"+this.terminals_[ie]+"\'");R.showPosition?W="Parse error on line "+(k+1)+`:\n`+R.showPosition()+`\nExpecting `+J.join(", ")+", got \'"+(this.terminals_[B]||B)+"\'":W="Parse error on line "+(k+1)+": Unexpected "+(B==C?"end of input":"\'"+(this.terminals_[B]||B)+"\'"),this.parseError(W,{text:R.match,token:this.terminals_[B]||B,line:R.yylineno,loc:A,expected:J})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+B);switch(z[0]){case 1:m.push(B),y.push(R.yytext),b.push(R.yylloc),m.push(z[1]),B=null,P?(B=P,P=null):(E=R.yyleng,_=R.yytext,k=R.yylineno,A=R.yylloc,L>0&&L--);break;case 2:if(K=this.productions_[z[1]][1],X.$=y[y.length-K],X._$={first_line:b[b.length-(K||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(K||1)].first_column,last_column:b[b.length-1].last_column},D&&(X._$.range=[b[b.length-(K||1)].range[0],b[b.length-1].range[1]]),Z=this.performAction.apply(X,[_,E,k,T.yy,z[1],y,b].concat(M)),typeof Z<"u")return Z;K&&(m=m.slice(0,-1*K*2),y=y.slice(0,-1*K),b=b.slice(0,-1*K)),m.push(this.productions_[z[1]][0]),y.push(X.$),b.push(X._$),ee=w[m[m.length-2]][m[m.length-1]],m.push(ee);break;case 3:return!0}}return!0},"parse")},h=function(){var d={EOF:1,parseError:v(function(g,m){if(this.yy.parser)this.yy.parser.parseError(g,m);else throw new Error(g)},"parseError"),setInput:v(function(p,g){return this.yy=g||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var g=p.match(/(?:\\r\\n?|\\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:v(function(p){var g=p.length,m=p.split(/(?:\\r\\n?|\\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===x.length?this.yylloc.first_column:0)+x[x.length-m.length].length-m[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(p){this.unput(this.match.slice(p))},"less"),pastInput:v(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var p=this.pastInput(),g=new Array(p.length+1).join("-");return p+this.upcomingInput()+`\n`+g+"^"},"showPosition"),test_match:v(function(p,g){var m,x,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),x=p[0].match(/(?:\\r\\n?|\\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],m=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var b in y)this[b]=y[b];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,g,m,x;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),b=0;b<y.length;b++)if(m=this._input.match(this.rules[y[b]]),m&&(!g||m[0].length>g[0].length)){if(g=m,x=b,this.options.backtrack_lexer){if(p=this.test_match(m,y[b]),p!==!1)return p;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(p=this.test_match(g,y[x]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var g=this.next();return g||this.lex()},"lex"),begin:v(function(g){this.conditionStack.push(g)},"begin"),popState:v(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:v(function(g){this.begin(g)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(g,m,x,y){var b=y;switch(x){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:timeline\\b)/i,/^(?:title\\s[^\\n]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:section\\s[^:\\n]+)/i,/^(?::\\s[^:\\n]+)/i,/^(?:[^#:\\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return d}();u.lexer=h;function f(){this.yy={}}return v(f,"Parser"),f.prototype=u,u.Parser=f,new f}();HM.parser=HM;iGe=HM,tfe={};RS(tfe,{addEvent:()=>cfe,addSection:()=>afe,addTask:()=>lfe,addTaskOrg:()=>ufe,clear:()=>ife,default:()=>aGe,getCommonDb:()=>nfe,getSections:()=>sfe,getTasks:()=>ofe});wm="",rfe=0,qM=[],t6=[],km=[],nfe=v(()=>Rb,"getCommonDb"),ife=v(function(){qM.length=0,t6.length=0,wm="",km.length=0,xr()},"clear"),afe=v(function(t){wm=t,qM.push(t)},"addSection"),sfe=v(function(){return qM},"getSections"),ofe=v(function(){let t=Qhe(),e=100,r=0;for(;!t&&r<e;)t=Qhe(),r++;return t6.push(...km),t6},"getTasks"),lfe=v(function(t,e,r){let n={id:rfe++,section:wm,type:wm,task:t,score:e||0,events:r?[r]:[]};km.push(n)},"addTask"),cfe=v(function(t){km.find(r=>r.id===rfe-1).events.push(t)},"addEvent"),ufe=v(function(t){let e={section:wm,type:wm,description:t,task:t,classes:[]};t6.push(e)},"addTaskOrg"),Qhe=v(function(){let t=v(function(r){return km[r].processed},"compileTask"),e=!0;for(let[r,n]of km.entries())t(r),e=e&&n.processed;return e},"compileTasks"),aGe={clear:ife,getCommonDb:nfe,addSection:afe,getSections:sfe,getTasks:ofe,addTask:lfe,addTaskOrg:ufe,addEvent:cfe},sGe=12,r6=v(function(t,e){let r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},"drawRect"),oGe=v(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=Ql().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}v(a,"smile");function s(l){let u=Ql().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}v(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return v(o,"ambivalent"),e.score>3?a(i):e.score<3?s(i):o(i),n},"drawFace"),lGe=v(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),hfe=v(function(t,e){let r=e.text.replace(/<br\\s*\\/?>/gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),cGe=v(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}v(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,hfe(t,e)},"drawLabel"),uGe=v(function(t,e,r){let n=t.append("g"),i=YM();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,r6(n,i),ffe(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),Jhe=-1,hGe=v(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");Jhe++;let a=300+5*30;i.append("line").attr("id","task"+Jhe).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),oGe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=YM();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,r6(i,s),ffe(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),fGe=v(function(t,e){r6(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),dGe=v(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),YM=v(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),ffe=function(){function t(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}v(t,"byText");function e(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:g}=f,m=i.split(/<br\\s*\\/?>/gi);for(let x=0;x<m.length;x++){let y=x*p-p*(m.length-1)/2,b=a.append("text").attr("x",s+l/2).attr("y",o).attr("fill",d).style("text-anchor","middle").style("font-size",p).style("font-family",g);b.append("tspan").attr("x",s+l/2).attr("dy",y).text(m[x]),b.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,h)}}v(e,"byTspan");function r(i,a,s,o,l,u,h,f){let d=a.append("switch"),g=d.append("foreignObject").attr("x",s).attr("y",o).attr("width",l).attr("height",u).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,d,s,o,l,u,h,f),n(g,h)}v(r,"byFo");function n(i,a){for(let s in a)s in a&&i.attr(s,a[s])}return v(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),pGe=v(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");v(XM,"wrap");gGe=v(function(t,e,r,n){let i=r%sGe-1,a=t.append("g");e.section=i,a.attr("class",(e.class?e.class+" ":"")+"timeline-node "+("section-"+i));let s=a.append("g"),o=a.append("g"),u=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(XM,e.width).node().getBBox(),h=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=u.height+h*1.1*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),vGe(s,e,i,n),e},"drawNode"),mGe=v(function(t,e,r){let n=t.append("g"),a=n.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(XM,e.width).node().getBBox(),s=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return n.remove(),a.height+s*1.1*.5+e.padding},"getVirtualNodeHeight"),vGe=v(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${-e.height+2*5} q0,-5 5,-5 h${e.width-2*5} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),p0={drawRect:r6,drawCircle:lGe,drawSection:uGe,drawText:hfe,drawLabel:cGe,drawTask:hGe,drawBackgroundRect:fGe,getTextObj:dGe,getNoteRect:YM,initGraphics:pGe,drawNode:gGe,getVirtualNodeHeight:mGe},yGe=v(function(t,e,r,n){let i=pe(),a=i.leftMargin??50;re.debug("timeline",n.db);let s=i.securityLevel,o;s==="sandbox"&&(o=Ge("#i"+e));let u=(s==="sandbox"?Ge(o.nodes()[0].contentDocument.body):Ge("body")).select("#"+e);u.append("g");let h=n.db.getTasks(),f=n.db.getCommonDb().getDiagramTitle();re.debug("task",h),p0.initGraphics(u);let d=n.db.getSections();re.debug("sections",d);let p=0,g=0,m=0,x=0,y=50+a,b=50;x=50;let w=0,_=!0;d.forEach(function(C){let M={number:w,descr:C,section:w,width:150,padding:20,maxHeight:p},R=p0.getVirtualNodeHeight(u,M,i);re.debug("sectionHeight before draw",R),p=Math.max(p,R+20)});let k=0,E=0;re.debug("tasks.length",h.length);for(let[C,M]of h.entries()){let R={number:C,descr:M,section:M.section,width:150,padding:20,maxHeight:g},T=p0.getVirtualNodeHeight(u,R,i);re.debug("taskHeight before draw",T),g=Math.max(g,T+20),k=Math.max(k,M.events.length);let I=0;for(let A of M.events){let D={descr:A,section:M.section,number:M.section,width:150,padding:20,maxHeight:50};I+=p0.getVirtualNodeHeight(u,D,i)}E=Math.max(E,I)}re.debug("maxSectionHeight before draw",p),re.debug("maxTaskHeight before draw",g),d&&d.length>0?d.forEach(C=>{let M=h.filter(A=>A.section===C),R={number:w,descr:C,section:w,width:200*Math.max(M.length,1)-50,padding:20,maxHeight:p};re.debug("sectionNode",R);let T=u.append("g"),I=p0.drawNode(T,R,w,i);re.debug("sectionNode output",I),T.attr("transform",`translate(${y}, ${x})`),b+=p+50,M.length>0&&efe(u,M,w,y,b,g,i,k,E,p,!1),y+=200*Math.max(M.length,1),b=x,w++}):(_=!1,efe(u,h,w,y,b,g,i,k,E,p,!0));let L=u.node().getBBox();re.debug("bounds",L),f&&u.append("text").text(f).attr("x",L.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),m=_?p+g+150:g+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",m).attr("x2",L.width+3*a).attr("y2",m).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Qo(void 0,u,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),efe=v(function(t,e,r,n,i,a,s,o,l,u,h){for(let f of e){let d={descr:f.task,section:r,number:r,width:150,padding:20,maxHeight:a};re.debug("taskNode",d);let p=t.append("g").attr("class","taskWrapper"),m=p0.drawNode(p,d,r,s).height;if(re.debug("taskHeight after draw",m),p.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,m),f.events){let x=t.append("g").attr("class","lineWrapper"),y=a;i+=100,y=y+xGe(t,f.events,r,n,i,s),i-=100,x.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+(h?a:u)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n=n+200,h&&!s.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),xGe=v(function(t,e,r,n,i,a){let s=0,o=i;i=i+100;for(let l of e){let u={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50};re.debug("eventNode",u);let h=t.append("g").attr("class","eventWrapper"),d=p0.drawNode(h,u,r,a).height;s=s+d,h.attr("transform",`translate(${n}, ${i})`),i=i+10+d}return i=o,s},"drawEvents"),bGe={setConf:v(()=>{},"setConf"),draw:yGe},wGe=v(t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],Xi(t["lineColor"+r])?t["lineColor"+r]=Et(t["lineColor"+r],20):t["lineColor"+r]=It(t["lineColor"+r],20);for(let r=0;r<t.THEME_COLOR_LIMIT;r++){let n=""+(17-3*r);e+=`\n .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} path {\n fill: ${t["cScale"+r]};\n }\n .section-${r-1} text {\n fill: ${t["cScaleLabel"+r]};\n }\n .node-icon-${r-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+r]};\n }\n .section-edge-${r-1}{\n stroke: ${t["cScale"+r]};\n }\n .edge-depth-${r-1}{\n stroke-width: ${n};\n }\n .section-${r-1} line {\n stroke: ${t["cScaleInv"+r]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+r]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e},"genSections"),kGe=v(t=>`\n .edge {\n stroke-width: 3;\n }\n ${wGe(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`,"getStyles"),TGe=kGe,EGe={db:tfe,renderer:bGe,parser:iGe,styles:TGe}});function Mi(t){"@babel/helpers - typeof";return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mi(t)}function ED(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gfe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function SD(t,e,r){return e&&gfe(t.prototype,e),r&&gfe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Rde(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ll(t,e){return SGe(t)||CGe(t,e)||Nde(t,e)||AGe()}function SGe(t){if(Array.isArray(t))return t}function CGe(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(t);!(i=(s=r.next()).done)&&(n.push(s.value),!(e&&n.length===e));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function Nde(t,e){if(t){if(typeof t=="string")return mfe(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mfe(t,e)}}function mfe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function AGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ide(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Nde(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return a=l.done,l},e:function(l){s=!0,o=l},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(s)throw o}}}}function ZGe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function QGe(t,e){return e={exports:{}},t(e,e.exports),e.exports}function aUe(t){for(var e=t.length;e--&&iUe.test(t.charAt(e)););return e}function lUe(t){return t&&t.slice(0,sUe(t)+1).replace(oUe,"")}function dUe(t){var e=hUe.call(t,Z2),r=t[Z2];try{t[Z2]=void 0;var n=!0}catch{}var i=fUe.call(t);return n&&(e?t[Z2]=r:delete t[Z2]),i}function vUe(t){return mUe.call(t)}function wUe(t){return t==null?t===void 0?bUe:xUe:xfe&&xfe in Object(t)?pUe(t):yUe(t)}function kUe(t){return t!=null&&typeof t=="object"}function SUe(t){return typeof t=="symbol"||TUe(t)&&Gde(t)==EUe}function RUe(t){if(typeof t=="number")return t;if(kx(t))return bfe;if(k0(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=k0(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cUe(t);var r=AUe.test(t);return r||_Ue.test(t)?LUe(t.slice(2),r?2:8):CUe.test(t)?bfe:+t}function DUe(t,e,r){var n,i,a,s,o,l,u=0,h=!1,f=!1,d=!0;if(typeof t!="function")throw new TypeError(NUe);e=wfe(e)||0,k0(r)&&(h=!!r.leading,f="maxWait"in r,a=f?IUe(wfe(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d);function p(E){var L=n,S=i;return n=i=void 0,u=E,s=t.apply(S,L),s}function g(E){return u=E,o=setTimeout(y,e),h?p(E):s}function m(E){var L=E-l,S=E-u,C=e-L;return f?MUe(C,a-S):C}function x(E){var L=E-l,S=E-u;return l===void 0||L>=e||L<0||f&&S>=a}function y(){var E=jM();if(x(E))return b(E);o=setTimeout(y,m(E))}function b(E){return o=void 0,d&&n?p(E):(n=i=void 0,s)}function w(){o!==void 0&&clearTimeout(o),u=0,n=l=i=o=void 0}function _(){return o===void 0?s:b(jM())}function k(){var E=jM(),L=x(E);if(n=arguments,i=this,l=E,L){if(o===void 0)return g(l);if(f)return clearTimeout(o),o=setTimeout(y,e),p(l)}return o===void 0&&(o=setTimeout(y,e)),s}return k.cancel=w,k.flush=_,k}function $6(t,e,r,n,i,a){var s;return Xn(t)?s=t:s=Bm[t]||Bm.euclidean,e===0&&Xn(t)?s(i,a):s(e,r,n,i,a)}function CWe(t,e){if(G6(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||kx(t)?!0:SWe.test(t)||!EWe.test(t)||e!=null&&t in Object(e)}function IWe(t){if(!k0(t))return!1;var e=Gde(t);return e==LWe||e==RWe||e==_We||e==NWe}function OWe(t){return!!Gfe&&Gfe in t}function zWe(t){if(t!=null){try{return FWe.call(t)}catch{}try{return t+""}catch{}}return""}function XWe(t){if(!k0(t)||PWe(t))return!1;var e=MWe(t)?YWe:UWe;return e.test($We(t))}function KWe(t,e){return t?.[e]}function QWe(t,e){var r=ZWe(t,e);return jWe(r)?r:void 0}function eHe(){this.__data__=gx?gx(null):{},this.size=0}function rHe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function oHe(t){var e=this.__data__;if(gx){var r=e[t];return r===iHe?void 0:r}return sHe.call(e,t)?e[t]:void 0}function hHe(t){var e=this.__data__;return gx?e[t]!==void 0:uHe.call(e,t)}function pHe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=gx&&e===void 0?dHe:e,this}function Gm(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function mHe(){this.__data__=[],this.size=0}function yHe(t,e){return t===e||t!==t&&e!==e}function xHe(t,e){for(var r=t.length;r--;)if(f0e(t[r][0],e))return r;return-1}function kHe(t){var e=this.__data__,r=U6(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():wHe.call(e,r,1),--this.size,!0}function EHe(t){var e=this.__data__,r=U6(e,t);return r<0?void 0:e[r][1]}function CHe(t){return U6(this.__data__,t)>-1}function _He(t,e){var r=this.__data__,n=U6(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Um(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function MHe(){this.size=0,this.__data__={hash:new Ufe,map:new(IHe||RHe),string:new Ufe}}function OHe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function BHe(t,e){var r=t.__data__;return PHe(e)?r[typeof e=="string"?"string":"hash"]:r.map}function FHe(t){var e=V6(this,t).delete(t);return this.size-=e?1:0,e}function $He(t){return V6(this,t).get(t)}function UHe(t){return V6(this,t).has(t)}function WHe(t,e){var r=V6(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function Vm(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function PD(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(qHe);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(PD.Cache||d0e),r}function jHe(t){var e=YHe(t,function(n){return r.size===XHe&&r.clear(),n}),r=e.cache;return e}function eqe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function m0e(t){if(typeof t=="string")return t;if(G6(t))return g0e(t,m0e)+"";if(kx(t))return Wfe?Wfe.call(t):"";var e=t+"";return e=="0"&&1/t==-tqe?"-0":e}function nqe(t){return t==null?"":rqe(t)}function iqe(t,e){return G6(t)?t:AWe(t,e)?[t]:p0e(v0e(t))}function sqe(t){if(typeof t=="string"||kx(t))return t;var e=t+"";return e=="0"&&1/t==-aqe?"-0":e}function oqe(t,e){e=y0e(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[BD(e[r++])];return r&&r==n?t:void 0}function cqe(t,e,r){var n=t==null?void 0:lqe(t,e);return n===void 0?r:n}function fqe(t,e,r){e=="__proto__"&&Hfe?Hfe(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function mqe(t,e,r){var n=t[e];(!(gqe.call(t,e)&&f0e(n,r))||r===void 0&&!(e in t))&&dqe(t,e,r)}function bqe(t,e){var r=typeof t;return e=e??yqe,!!e&&(r=="number"||r!="symbol"&&xqe.test(t))&&t>-1&&t%1==0&&t<e}function kqe(t,e,r,n){if(!k0(t))return t;e=y0e(e,t);for(var i=-1,a=e.length,s=a-1,o=t;o!=null&&++i<a;){var l=BD(e[i]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=s){var h=o[l];u=n?n(h,l,o):void 0,u===void 0&&(u=k0(h)?h:wqe(e[i+1])?[]:{})}vqe(o,l,u),o=o[l]}return t}function Eqe(t,e,r){return t==null?t:Tqe(t,e,r)}function Cqe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function _qe(t){return G6(t)?g0e(t,BD):kx(t)?[t]:Aqe(p0e(v0e(t)))}function zD(t,e,r,n){for(var i=[],a=new zm,s=t.cy(),o=s.hasCompoundNodes(),l=0;l<t.length;l++){var u=t[l];r?i.push(u):o&&n(i,a,u)}for(;i.length>0;){var h=i.shift();e(h),a.add(h.id()),o&&n(i,a,h)}return t}function b0e(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i<n.length;i++){var a=n[i];e.has(a.id())||t.push(a)}}function w0e(t,e,r){if(r.isChild()){var n=r._private.parent;e.has(n.id())||t.push(n)}}function Yqe(t,e,r){w0e(t,e,r),b0e(t,e,r)}function tD(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var n=0,i=r[0],a=i._private.edges,s=0;s<a.length;s++){var o=a[s];!e&&o.isLoop()||(n+=t(i,o))}return n}else return}}function Em(t,e){return function(r){for(var n,i=this.nodes(),a=0;a<i.length;a++){var s=i[a],o=s[t](r);o!==void 0&&(n===void 0||e(o,n))&&(n=o)}return n}}function ex(){return!1}function u6(){return!0}function H6(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fYe,e=arguments.length>1?arguments[1]:void 0,r=0;r<Zfe.length;r++){var n=Zfe[r];this[n]=t[n]||R0e[n]}this.context=e||this.context,this.listeners=[],this.emitting=0}function O0e(t,e,r){var n=r._private,i=n.styleCache=n.styleCache||[],a;return(a=i[t])!=null||(a=i[t]=e(r)),a}function q6(t,e){return t=T0(t),function(n){return O0e(t,e,n)}}function Y6(t,e){t=T0(t);var r=function(i){return e.call(i)};return function(){var i=this[0];if(i)return O0e(t,r,i)}}function nD(t,e){var r=t._private,n=r.data.parent?t.parents():null;if(n)for(var i=0;i<n.length;i++){var a=n[i];if(!e(a))return!1}return!0}function $D(t){var e=t.ok,r=t.edgeOkViaNode||t.ok,n=t.parentOk||t.ok;return function(){var i=this.cy();if(!i.styleEnabled())return!0;var a=this[0],s=i.hasCompoundNodes();if(a){var o=a._private;if(!e(a))return!1;if(a.isNode())return!s||nD(a,n);var l=o.source,u=o.target;return r(l)&&(!s||nD(l,r))&&(l===u||r(u)&&(!s||nD(u,r)))}}}function Jfe(t){return function(){var e=arguments,r=[];if(e.length===2){var n=e[0],i=e[1];this.on(t.event,n,i)}else if(e.length===1&&Xn(e[0])){var a=e[0];this.on(t.event,a)}else if(e.length===0||e.length===1&&gn(e[0])){for(var s=e.length===1?e[0]:null,o=0;o<this.length;o++){var l=this[o],u=!t.ableField||l._private[t.ableField],h=l._private[t.field]!=t.value;if(t.overrideAble){var f=t.overrideAble(l);if(f!==void 0&&(u=f,!f))return this}u&&(l._private[t.field]=t.value,h&&r.push(l))}var d=this.spawn(r);d.updateStyle(),d.emit(t.event),s&&d.emit(s)}return this}}function Hm(t){cf[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var r=t.overrideField(e);if(r!==void 0)return r}return e._private[t.field]}},cf[t.on]=Jfe({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),cf[t.off]=Jfe({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}function nde(t){return function(r){for(var n=[],i=0;i<this.length;i++){var a=this[i],s=a._private[t.attr];s&&n.push(s)}return this.spawn(n,!0).filter(r)}}function ide(t){return function(r){var n=[],i=this._private.cy,a=t||{};qt(r)&&(r=i.$(r));for(var s=0;s<r.length;s++)for(var o=r[s]._private.edges,l=0;l<o.length;l++){var u=o[l],h=u._private.data,f=this.hasElementWithId(h.source)&&r.hasElementWithId(h.target),d=r.hasElementWithId(h.source)&&this.hasElementWithId(h.target),p=f||d;p&&((a.thisIsSrc||a.thisIsTgt)&&(a.thisIsSrc&&!f||a.thisIsTgt&&!d)||n.push(u))}return this.spawn(n,!0)}}function ade(t){var e={codirected:!1};return t=Zt({},e,t),function(n){for(var i=[],a=this.edges(),s=t,o=0;o<a.length;o++)for(var l=a[o],u=l._private,h=u.source,f=h._private.data.id,d=u.data.target,p=h._private.edges,g=0;g<p.length;g++){var m=p[g],x=m._private.data,y=x.target,b=x.source,w=y===d&&b===f,_=f===y&&d===b;(s.codirected&&w||!s.codirected&&(w||_))&&i.push(m)}return this.spawn(i,!0).filter(n)}}function TYe(t,e,r,n){var i=4,a=.001,s=1e-7,o=10,l=11,u=1/(l-1),h=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var f=0;f<4;++f)if(typeof arguments[f]!="number"||isNaN(arguments[f])||!isFinite(arguments[f]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var d=h?new Float32Array(l):new Array(l);function p(M,R){return 1-3*R+3*M}function g(M,R){return 3*R-6*M}function m(M){return 3*M}function x(M,R,T){return((p(R,T)*M+g(R,T))*M+m(R))*M}function y(M,R,T){return 3*p(R,T)*M*M+2*g(R,T)*M+m(R)}function b(M,R){for(var T=0;T<i;++T){var I=y(R,t,r);if(I===0)return R;var A=x(R,t,r)-M;R-=A/I}return R}function w(){for(var M=0;M<l;++M)d[M]=x(M*u,t,r)}function _(M,R,T){var I,A,D=0;do A=R+(T-R)/2,I=x(A,t,r)-M,I>0?T=A:R=A;while(Math.abs(I)>s&&++D<o);return A}function k(M){for(var R=0,T=1,I=l-1;T!==I&&d[T]<=M;++T)R+=u;--T;var A=(M-d[T])/(d[T+1]-d[T]),D=R+A*u,N=y(D,t,r);return N>=a?b(M,D):N===0?D:_(M,R,R+u)}var E=!1;function L(){E=!0,(t!==e||r!==n)&&w()}var S=function(R){return E||L(),t===e&&r===n?R:R===0?0:R===1?1:x(k(R),e,n)};S.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var C="generateBezier("+[t,e,r,n]+")";return S.toString=function(){return C},S}function sde(t,e,r,n,i){if(n===1||e===r)return r;var a=i(e,r,n);return t==null||((t.roundValue||t.color)&&(a=Math.round(a)),t.min!==void 0&&(a=Math.max(a,t.min)),t.max!==void 0&&(a=Math.min(a,t.max))),a}function ode(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function Sm(t,e,r,n,i){var a=i!=null?i.type:null;r<0?r=0:r>1&&(r=1);var s=ode(t,i),o=ode(e,i);if(pt(s)&&pt(o))return sde(a,s,o,r,n);if(gn(s)&&gn(o)){for(var l=[],u=0;u<o.length;u++){var h=s[u],f=o[u];if(h!=null&&f!=null){var d=sde(a,h,f,r,n);l.push(d)}else l.push(f)}return l}}function SYe(t,e,r,n){var i=!n,a=t._private,s=e._private,o=s.easing,l=s.startTime,u=n?t:t.cy(),h=u.style();if(!s.easingImpl)if(o==null)s.easingImpl=x6.linear;else{var f;if(qt(o)){var d=h.parse("transition-timing-function",o);f=d.value}else f=o;var p,g;qt(f)?(p=f,g=[]):(p=f[1],g=f.slice(2).map(function(P){return+P})),g.length>0?(p==="spring"&&g.push(s.duration),s.easingImpl=x6[p].apply(null,g)):s.easingImpl=x6[p]}var m=s.easingImpl,x;if(s.duration===0?x=1:x=(r-l)/s.duration,s.applying&&(x=s.progress),x<0?x=0:x>1&&(x=1),s.delay==null){var y=s.startPosition,b=s.position;if(b&&i&&!t.locked()){var w={};tx(y.x,b.x)&&(w.x=Sm(y.x,b.x,x,m)),tx(y.y,b.y)&&(w.y=Sm(y.y,b.y,x,m)),t.position(w)}var _=s.startPan,k=s.pan,E=a.pan,L=k!=null&&n;L&&(tx(_.x,k.x)&&(E.x=Sm(_.x,k.x,x,m)),tx(_.y,k.y)&&(E.y=Sm(_.y,k.y,x,m)),t.emit("pan"));var S=s.startZoom,C=s.zoom,M=C!=null&&n;M&&(tx(S,C)&&(a.zoom=dx(a.minZoom,Sm(S,C,x,m),a.maxZoom)),t.emit("zoom")),(L||M)&&t.emit("viewport");var R=s.style;if(R&&R.length>0&&i){for(var T=0;T<R.length;T++){var I=R[T],A=I.name,D=I,N=s.startStyle[A],O=h.properties[N.name],B=Sm(N,D,x,m,O);h.overrideBypass(t,A,B)}t.emit("style")}}return s.progress=x,x}function tx(t,e){return t==null||e==null?!1:pt(t)&&pt(e)?!0:!!(t&&e)}function CYe(t,e,r,n){var i=e._private;i.started=!0,i.startTime=r-i.progress*i.duration}function lde(t,e){var r=e._private.aniEles,n=[];function i(h,f){var d=h._private,p=d.animation.current,g=d.animation.queue,m=!1;if(p.length===0){var x=g.shift();x&&p.push(x)}for(var y=function(E){for(var L=E.length-1;L>=0;L--){var S=E[L];S()}E.splice(0,E.length)},b=p.length-1;b>=0;b--){var w=p[b],_=w._private;if(_.stopped){p.splice(b,1),_.hooked=!1,_.playing=!1,_.started=!1,y(_.frames);continue}!_.playing&&!_.applying||(_.playing&&_.applying&&(_.applying=!1),_.started||CYe(h,w,t),SYe(h,w,t,f),_.applying&&(_.applying=!1),y(_.frames),_.step!=null&&_.step(t),w.completed()&&(p.splice(b,1),_.hooked=!1,_.playing=!1,_.started=!1,y(_.completes)),m=!0)}return!f&&p.length===0&&g.length===0&&n.push(h),m}for(var a=!1,s=0;s<r.length;s++){var o=r[s],l=i(o);a=a||l}var u=i(e,!0);(a||u)&&(r.length>0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}function B0e(t){this.options=Zt({},DYe,OYe,t)}function F0e(t){this.options=Zt({},PYe,t)}function z0e(t){this.options=Zt({},BYe,t)}function K6(t){this.options=Zt({},FYe,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(i){var a=i.source().data("id"),s=i.target().data("id"),o=e.some(function(u){return u.data("id")===a}),l=e.some(function(u){return u.data("id")===s});return!o||!l});this.options.eles=this.options.eles.not(n)}function G0e(t){this.options=Zt({},tXe,t)}function VD(t){this.options=Zt({},rXe,t)}function U0e(t){this.options=Zt({},nXe,t)}function V0e(t){this.options=Zt({},iXe,t)}function W0e(t){this.options=t,this.notifications=0}function Y0e(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function HD(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(oXe(t,e,r,n,i),{cx:mD,cy:vD,radius:x0,startX:H0e,startY:q0e,stopX:yD,stopY:xD,startAngle:Nc.ang+Math.PI/2*b0,endAngle:Vo.ang-Math.PI/2*b0,counterClockwise:k6})}function X0e(t){var e=[];if(t!=null){for(var r=0;r<t.length;r+=2){var n=t[r],i=t[r+1];e.push({x:n,y:i})}return e}}function lXe(t,e,r){for(var n=function(u,h,f,d){return qi(u,h,f,d)},i=e._private,a=i.rstyle.bezierPts,s=0;s<t.bezierProjPcts.length;s++){var o=t.bezierProjPcts[s];a.push({x:n(r[0],r[2],r[4],o),y:n(r[1],r[3],r[5],o)})}}function zXe(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.lineTo(n.x,n.y)}}function $Xe(t,e,r){for(var n,i=0;i<e.length;i++){var a=e[i];i===0&&(n=a),t.lineTo(a.x,a.y)}t.quadraticCurveTo(r.x,r.y,n.x,n.y)}function Cde(t,e,r){t.beginPath&&t.beginPath();for(var n=e,i=0;i<n.length;i++){var a=n[i];t.lineTo(a.x,a.y)}var s=r,o=r[0];t.moveTo(o.x,o.y);for(var i=1;i<s.length;i++){var a=s[i];t.lineTo(a.x,a.y)}t.closePath&&t.closePath()}function GXe(t,e,r,n,i){t.beginPath&&t.beginPath(),t.arc(r,n,i,0,Math.PI*2,!1);var a=e,s=a[0];t.moveTo(s.x,s.y);for(var o=0;o<a.length;o++){var l=a[o];t.lineTo(l.x,l.y)}t.closePath&&t.closePath()}function UXe(t,e,r,n){t.arc(e,r,n,0,Math.PI*2,!1)}function oD(t,e,r,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+a,r),t.lineTo(e+n-a,r),t.quadraticCurveTo(e+n,r,e+n,r+a),t.lineTo(e+n,r+i-a),t.quadraticCurveTo(e+n,r+i,e+n-a,r+i),t.lineTo(e+a,r+i),t.quadraticCurveTo(e,r+i,e,r+i-a),t.lineTo(e,r+a),t.quadraticCurveTo(e,r,e+a,r),t.closePath(),s?t.stroke():t.fill()}function jXe(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),i=new Uint8Array(n),a=0;a<r.length;a++)i[a]=r.charCodeAt(a);return new Blob([n],{type:e})}function Lde(t){var e=t.indexOf(",");return t.substr(e+1)}function ope(t,e,r){var n=function(){return e.toDataURL(r,t.quality)};switch(t.output){case"blob-promise":return new $m(function(i,a){try{e.toBlob(function(s){s!=null?i(s):a(new Error("`canvas.toBlob()` sent a null value in its callback"))},r,t.quality)}catch(s){a(s)}});case"blob":return jXe(Lde(n()),r);case"base64":return Lde(n());case"base64uri":default:return n()}}function cpe(t){var e=this,r=e.cy.window(),n=r.document;e.data={canvases:new Array(Gr.CANVAS_LAYERS),contexts:new Array(Gr.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Gr.CANVAS_LAYERS),bufferCanvases:new Array(Gr.BUFFER_COUNT),bufferContexts:new Array(Gr.CANVAS_LAYERS)};var i="-webkit-tap-highlight-color",a="rgba(0,0,0,0)";e.data.canvasContainer=n.createElement("div");var s=e.data.canvasContainer.style;e.data.canvasContainer.style[i]=a,s.position="relative",s.zIndex="0",s.overflow="hidden";var o=t.cy.container();o.appendChild(e.data.canvasContainer),o.style[i]=a;var l={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};BGe()&&(l["-ms-touch-action"]="none",l["touch-action"]="none");for(var u=0;u<Gr.CANVAS_LAYERS;u++){var h=e.data.canvases[u]=n.createElement("canvas");e.data.contexts[u]=h.getContext("2d"),Object.keys(l).forEach(function(J){h.style[J]=l[J]}),h.style.position="absolute",h.setAttribute("data-id","layer"+u),h.style.zIndex=String(Gr.CANVAS_LAYERS-u),e.data.canvasContainer.appendChild(h),e.data.canvasNeedsRedraw[u]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[Gr.NODE].setAttribute("data-id","layer"+Gr.NODE+"-node"),e.data.canvases[Gr.SELECT_BOX].setAttribute("data-id","layer"+Gr.SELECT_BOX+"-selectbox"),e.data.canvases[Gr.DRAG].setAttribute("data-id","layer"+Gr.DRAG+"-drag");for(var u=0;u<Gr.BUFFER_COUNT;u++)e.data.bufferCanvases[u]=n.createElement("canvas"),e.data.bufferContexts[u]=e.data.bufferCanvases[u].getContext("2d"),e.data.bufferCanvases[u].style.position="absolute",e.data.bufferCanvases[u].setAttribute("data-id","buffer"+u),e.data.bufferCanvases[u].style.zIndex=String(-u-1),e.data.bufferCanvases[u].style.visibility="hidden";e.pathsEnabled=!0;var f=_s(),d=function(W){return{x:(W.x1+W.x2)/2,y:(W.y1+W.y2)/2}},p=function(W){return{x:-W.w/2,y:-W.h/2}},g=function(W){var Y=W[0]._private,Q=Y.oldBackgroundTimestamp===Y.backgroundTimestamp;return!Q},m=function(W){return W[0]._private.nodeKey},x=function(W){return W[0]._private.labelStyleKey},y=function(W){return W[0]._private.sourceLabelStyleKey},b=function(W){return W[0]._private.targetLabelStyleKey},w=function(W,Y,Q,se,ue){return e.drawElement(W,Y,Q,!1,!1,ue)},_=function(W,Y,Q,se,ue){return e.drawElementText(W,Y,Q,se,"main",ue)},k=function(W,Y,Q,se,ue){return e.drawElementText(W,Y,Q,se,"source",ue)},E=function(W,Y,Q,se,ue){return e.drawElementText(W,Y,Q,se,"target",ue)},L=function(W){return W.boundingBox(),W[0]._private.bodyBounds},S=function(W){return W.boundingBox(),W[0]._private.labelBounds.main||f},C=function(W){return W.boundingBox(),W[0]._private.labelBounds.source||f},M=function(W){return W.boundingBox(),W[0]._private.labelBounds.target||f},R=function(W,Y){return Y},T=function(W){return d(L(W))},I=function(W,Y,Q){var se=W?W+"-":"";return{x:Y.x+Q.pstyle(se+"text-margin-x").pfValue,y:Y.y+Q.pstyle(se+"text-margin-y").pfValue}},A=function(W,Y,Q){var se=W[0]._private.rscratch;return{x:se[Y],y:se[Q]}},D=function(W){return I("",A(W,"labelX","labelY"),W)},N=function(W){return I("source",A(W,"sourceLabelX","sourceLabelY"),W)},O=function(W){return I("target",A(W,"targetLabelX","targetLabelY"),W)},B=function(W){return p(L(W))},P=function(W){return p(C(W))},$=function(W){return p(M(W))},z=function(W){var Y=S(W),Q=p(S(W));if(W.isNode()){switch(W.pstyle("text-halign").value){case"left":Q.x=-Y.w-(Y.leftPad||0);break;case"right":Q.x=-(Y.rightPad||0);break}switch(W.pstyle("text-valign").value){case"top":Q.y=-Y.h-(Y.topPad||0);break;case"bottom":Q.y=-(Y.botPad||0);break}}return Q},H=e.data.eleTxrCache=new sx(e,{getKey:m,doesEleInvalidateKey:g,drawElement:w,getBoundingBox:L,getRotationPoint:T,getRotationOffset:B,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),Z=e.data.lblTxrCache=new sx(e,{getKey:x,drawElement:_,getBoundingBox:S,getRotationPoint:D,getRotationOffset:z,isVisible:R}),X=e.data.slbTxrCache=new sx(e,{getKey:y,drawElement:k,getBoundingBox:C,getRotationPoint:N,getRotationOffset:P,isVisible:R}),ie=e.data.tlbTxrCache=new sx(e,{getKey:b,drawElement:E,getBoundingBox:M,getRotationPoint:O,getRotationOffset:$,isVisible:R}),K=e.data.lyrTxrCache=new rpe(e);e.onUpdateEleCalcs(function(W,Y){H.invalidateElements(Y),Z.invalidateElements(Y),X.invalidateElements(Y),ie.invalidateElements(Y),K.invalidateElements(Y);for(var Q=0;Q<Y.length;Q++){var se=Y[Q]._private;se.oldBackgroundTimestamp=se.backgroundTimestamp}});var ee=function(W){for(var Y=0;Y<W.length;Y++)K.enqueueElementRefinement(W[Y].ele)};H.onDequeue(ee),Z.onDequeue(ee),X.onDequeue(ee),ie.onDequeue(ee)}function fpe(t,e,r){var n=r,i=function(S){Qr("Can not register `"+e+"` for `"+t+"` since `"+S+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(xx.prototype[e])return i(e);xx.prototype[e]=r}else if(t==="collection"){if(fa.prototype[e])return i(e);fa.prototype[e]=r}else if(t==="layout"){for(var a=function(S){this.options=S,r.call(this,S),Mr(this._private)||(this._private={}),this._private.cy=S.cy,this._private.listeners=[],this.createEmitter()},s=a.prototype=Object.create(r.prototype),o=[],l=0;l<o.length;l++){var u=o[l];s[u]=s[u]||function(){return this}}s.start&&!s.run?s.run=function(){return this.start(),this}:!s.start&&s.run&&(s.start=function(){return this.run(),this});var h=r.prototype.stop;s.stop=function(){var L=this.options;if(L&&L.animate){var S=this.animations;if(S)for(var C=0;C<S.length;C++)S[C].stop()}return h?h.call(this):this.emit("layoutstop"),this},s.destroy||(s.destroy=function(){return this}),s.cy=function(){return this._private.cy};var f=function(S){return S._private.cy},d={addEventFields:function(S,C){C.layout=S,C.cy=f(S),C.target=S},bubble:function(){return!0},parent:function(S){return f(S)}};Zt(s,{createEmitter:function(){return this._private.emitter=new H6(d,this),this},emitter:function(){return this._private.emitter},on:function(S,C){return this.emitter().on(S,C),this},one:function(S,C){return this.emitter().one(S,C),this},once:function(S,C){return this.emitter().one(S,C),this},removeListener:function(S,C){return this.emitter().removeListener(S,C),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(S,C){return this.emitter().emit(S,C),this}}),Zr.eventAliasesOn(s),n=a}else if(t==="renderer"&&e!=="null"&&e!=="base"){var p=dpe("renderer","base"),g=p.prototype,m=r,x=r.prototype,y=function(){p.apply(this,arguments),m.apply(this,arguments)},b=y.prototype;for(var w in g){var _=g[w],k=x[w]!=null;if(k)return i(w);b[w]=_}for(var E in x)b[E]=x[E];g.clientFunctions.forEach(function(L){b[L]=b[L]||function(){ri("Renderer does not implement `renderer."+L+"()` on its prototype")}}),n=y}else if(t==="__proto__"||t==="constructor"||t==="prototype")return ri(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return Fde({map:upe,keys:[t,e],value:n})}function dpe(t,e){return zde({map:upe,keys:[t,e]})}function eje(t,e,r,n,i){return Fde({map:hpe,keys:[t,e,r,n],value:i})}function tje(t,e,r,n){return zde({map:hpe,keys:[t,e,r,n]})}var Ni,vfe,_Ge,Mde,LGe,RGe,bx,qt,Xn,gn,Mr,NGe,pt,IGe,E6,to,wx,Dde,CD,Ode,MGe,uf,DGe,OGe,PGe,BGe,cx,AD,O6,Pde,yfe,Ii,FGe,zGe,$Ge,GGe,UGe,VGe,Bde,WGe,Zt,HGe,qGe,YGe,XGe,jGe,KGe,Fde,zde,k0,rx,JGe,eUe,tUe,rUe,P6,nUe,jM,iUe,sUe,oUe,cUe,uUe,Om,$de,hUe,fUe,Z2,pUe,gUe,mUe,yUe,xUe,bUe,xfe,Gde,TUe,EUe,kx,bfe,CUe,AUe,_Ue,LUe,wfe,NUe,IUe,MUe,B6,KM,Ude,OUe,S6,Uu,_m,Vde,nx,Wde,ux,hx,PUe,nf,n6,BUe,T0,Hde,FUe,kfe,zUe,$Ue,_D,qde,C6,Tfe,LD,ri,Yde,Qr,GUe,Ic,UUe,Xde,VUe,jde,da,hf,RD,WUe,Nl,sf,HUe,Mc,qUe,YUe,zm,F6,Efe,fx,XUe,Tx,jUe,KUe,ZUe,QUe,JUe,eVe,tVe,rVe,nVe,iVe,aVe,ZM,sVe,oVe,z6,Kde,Lm,lVe,cVe,uVe,hVe,fVe,i6,ND,Zde,E0,v0,dVe,qi,Nm,pVe,dx,_s,gVe,mVe,vVe,Qde,yVe,g6,m6,Sfe,ID,Pm,xVe,Jde,e0e,bVe,wVe,kVe,TVe,EVe,SVe,As,Vu,CVe,A6,_6,AVe,w0,ix,QM,of,px,_Ve,a6,Qa,t0e,lD,S0,r0e,MD,LVe,cD,RVe,NVe,Cfe,Im,Afe,Mm,IVe,uD,MVe,DVe,OVe,PVe,n0e,BVe,FVe,zVe,$Ve,GVe,UVe,VVe,_fe,WVe,HVe,i0e,Lfe,Rfe,qVe,YVe,Q2,Bm,XVe,DD,L6,JM,a0e,s0e,jVe,KVe,ZVe,Nfe,Ife,QVe,JVe,eWe,tWe,rWe,Mfe,nWe,iWe,aWe,sWe,Dfe,s6,oWe,lWe,Ofe,cWe,uWe,hWe,fWe,dWe,pWe,Pfe,gWe,Bfe,mWe,vWe,yWe,o6,xWe,l6,bWe,o0e,l0e,c0e,u0e,Wu,Ffe,h0e,zfe,$fe,wWe,$m,hD,C0,kWe,TWe,G6,EWe,SWe,AWe,_We,LWe,RWe,NWe,MWe,DWe,eD,Gfe,PWe,BWe,FWe,$We,GWe,UWe,VWe,WWe,HWe,qWe,YWe,jWe,ZWe,OD,JWe,gx,tHe,nHe,iHe,aHe,sHe,lHe,cHe,uHe,fHe,dHe,gHe,Ufe,vHe,f0e,U6,bHe,wHe,THe,SHe,AHe,LHe,RHe,NHe,IHe,DHe,PHe,V6,zHe,GHe,VHe,HHe,d0e,qHe,YHe,XHe,KHe,ZHe,QHe,JHe,p0e,g0e,tqe,Vfe,Wfe,rqe,v0e,y0e,aqe,BD,lqe,uqe,hqe,Hfe,dqe,pqe,gqe,vqe,yqe,xqe,wqe,Tqe,Sqe,Aqe,Lqe,Rqe,Nqe,Zr,Iqe,v6,Ir,on,Nt,fD,Mqe,Dqe,Oqe,Tm,af,dD,Pqe,Bqe,Fqe,zqe,$qe,x0e,Gqe,Uqe,FD,Vqe,ni,Nn,Wqe,Hqe,qqe,ff,df,lf,Ho,Fm,mx,k0e,Xqe,W6,Il,T0e,E0e,qfe,jqe,Dm,gf,Wo,Rl,y0,J2,c6,rD,Kqe,Zqe,S0e,C0e,Yfe,vx,Xfe,jfe,Qqe,ax,Ex,A0e,Jqe,eYe,tYe,rYe,nYe,iYe,aYe,sYe,oYe,Kfe,lYe,cYe,uYe,_0e,L0e,hYe,R0e,Zfe,fYe,pf,N0e,Qfe,dYe,pYe,h6,I0e,M0e,Ur,gYe,D0e,R6,mYe,vYe,y6,ha,Wm,yYe,xYe,bYe,wYe,cf,Ca,ede,tde,rde,fa,Cn,kYe,EYe,Sn,x6,AYe,_Ye,f6,P0e,pD,b6,LYe,RYe,gD,w6,_a,ox,NYe,Sx,GD,Dc,X6,UD,ua,j6,Sa,Aa,IYe,MYe,A0,yx,xx,N6,DYe,OYe,Cm,cde,PYe,BYe,iD,FYe,zYe,$Ye,GYe,UYe,VYe,$0e,WYe,HYe,qYe,ude,YYe,XYe,I6,jYe,KYe,ZYe,QYe,JYe,eXe,hde,tXe,rXe,nXe,iXe,aXe,fde,dde,WD,L0,M6,mD,vD,Nc,Vo,pde,gde,b0,k6,Gu,g0,x0,Rc,Am,d6,H0e,q0e,yD,xD,mde,vde,sXe,oXe,La,Cx,qD,Oc,j0e,K0e,cXe,Z0e,yde,xde,Z6,Q6,Q0e,J0e,qm,Hu,Ax,bde,uXe,epe,Ym,aD,tpe,hXe,wde,p6,T6,bD,fXe,dXe,pXe,gXe,mXe,vXe,yXe,xXe,bXe,wXe,kXe,TXe,EXe,SXe,Rm,CXe,sx,Di,AXe,lx,D6,_Xe,LXe,RXe,NXe,IXe,MXe,DXe,OXe,kde,PXe,Tde,BXe,rpe,pa,Ede,FXe,npe,Sde,Pc,VXe,WXe,HXe,qXe,YXe,sD,qu,ipe,YD,R0,Xm,ape,ro,XXe,mf,Ade,_de,wD,kD,spe,m0,_x,lpe,KXe,Gr,ZXe,QXe,JXe,upe,hpe,TD,ppe,_0,rje,qo,XD=F(()=>{Ni=typeof window>"u"?null:window,vfe=Ni?Ni.navigator:null;Ni&&Ni.document;_Ge=Mi(""),Mde=Mi({}),LGe=Mi(function(){}),RGe=typeof HTMLElement>"u"?"undefined":Mi(HTMLElement),bx=function(e){return e&&e.instanceString&&Xn(e.instanceString)?e.instanceString():null},qt=function(e){return e!=null&&Mi(e)==_Ge},Xn=function(e){return e!=null&&Mi(e)===LGe},gn=function(e){return!to(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Mr=function(e){return e!=null&&Mi(e)===Mde&&!gn(e)&&e.constructor===Object},NGe=function(e){return e!=null&&Mi(e)===Mde},pt=function(e){return e!=null&&Mi(e)===Mi(1)&&!isNaN(e)},IGe=function(e){return pt(e)&&Math.floor(e)===e},E6=function(e){if(RGe!=="undefined")return e!=null&&e instanceof HTMLElement},to=function(e){return wx(e)||Dde(e)},wx=function(e){return bx(e)==="collection"&&e._private.single},Dde=function(e){return bx(e)==="collection"&&!e._private.single},CD=function(e){return bx(e)==="core"},Ode=function(e){return bx(e)==="stylesheet"},MGe=function(e){return bx(e)==="event"},uf=function(e){return e==null?!0:!!(e===""||e.match(/^\\s+$/))},DGe=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},OGe=function(e){return Mr(e)&&pt(e.x1)&&pt(e.x2)&&pt(e.y1)&&pt(e.y2)},PGe=function(e){return NGe(e)&&Xn(e.then)},BGe=function(){return vfe&&vfe.userAgent.match(/msie|trident|edge/i)},cx=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],s=0;s<arguments.length;s++)a.push(arguments[s]);return a.join("$")});var n=function i(){var a=this,s=arguments,o,l=r.apply(a,s),u=i.cache;return(o=u[l])||(o=u[l]=e.apply(a,s)),o};return n.cache={},n},AD=cx(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),O6=cx(function(t){return t.replace(/(-\\w)/g,function(e){return e[1].toUpperCase()})}),Pde=cx(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),yfe=function(e){return uf(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},Ii="(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))",FGe="rgb[a]?\\\\(("+Ii+"[%]?)\\\\s*,\\\\s*("+Ii+"[%]?)\\\\s*,\\\\s*("+Ii+"[%]?)(?:\\\\s*,\\\\s*("+Ii+"))?\\\\)",zGe="rgb[a]?\\\\((?:"+Ii+"[%]?)\\\\s*,\\\\s*(?:"+Ii+"[%]?)\\\\s*,\\\\s*(?:"+Ii+"[%]?)(?:\\\\s*,\\\\s*(?:"+Ii+"))?\\\\)",$Ge="hsl[a]?\\\\(("+Ii+")\\\\s*,\\\\s*("+Ii+"[%])\\\\s*,\\\\s*("+Ii+"[%])(?:\\\\s*,\\\\s*("+Ii+"))?\\\\)",GGe="hsl[a]?\\\\((?:"+Ii+")\\\\s*,\\\\s*(?:"+Ii+"[%])\\\\s*,\\\\s*(?:"+Ii+"[%])(?:\\\\s*,\\\\s*(?:"+Ii+"))?\\\\)",UGe="\\\\#[0-9a-fA-F]{3}",VGe="\\\\#[0-9a-fA-F]{6}",Bde=function(e,r){return e<r?-1:e>r?1:0},WGe=function(e,r){return-1*Bde(e,r)},Zt=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var n=e[r];if(n!=null)for(var i=Object.keys(n),a=0;a<i.length;a++){var s=i[a];t[s]=n[s]}}return t},HGe=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,n,i,a,s=16;return r?(n=parseInt(e[1]+e[1],s),i=parseInt(e[2]+e[2],s),a=parseInt(e[3]+e[3],s)):(n=parseInt(e[1]+e[2],s),i=parseInt(e[3]+e[4],s),a=parseInt(e[5]+e[6],s)),[n,i,a]}},qGe=function(e){var r,n,i,a,s,o,l,u;function h(g,m,x){return x<0&&(x+=1),x>1&&(x-=1),x<1/6?g+(m-g)*6*x:x<1/2?m:x<2/3?g+(m-g)*(2/3-x)*6:g}var f=new RegExp("^"+$Ge+"$").exec(e);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(f[2]),i<0||i>100||(i=i/100,a=parseFloat(f[3]),a<0||a>100)||(a=a/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(i===0)o=l=u=Math.round(a*255);else{var d=a<.5?a*(1+i):a+i-a*i,p=2*a-d;o=Math.round(255*h(p,d,n+1/3)),l=Math.round(255*h(p,d,n)),u=Math.round(255*h(p,d,n-1/3))}r=[o,l,u,s]}return r},YGe=function(e){var r,n=new RegExp("^"+FGe+"$").exec(e);if(n){r=[];for(var i=[],a=1;a<=3;a++){var s=n[a];if(s[s.length-1]==="%"&&(i[a]=!0),s=parseFloat(s),i[a]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=i[1]||i[2]||i[3],l=i[1]&&i[2]&&i[3];if(o&&!l)return;var u=n[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},XGe=function(e){return KGe[e.toLowerCase()]},jGe=function(e){return(gn(e)?e:null)||XGe(e)||HGe(e)||YGe(e)||qGe(e)},KGe={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Fde=function(e){for(var r=e.map,n=e.keys,i=n.length,a=0;a<i;a++){var s=n[a];if(Mr(s))throw Error("Tried to set map with object key");a<n.length-1?(r[s]==null&&(r[s]={}),r=r[s]):r[s]=e.value}},zde=function(e){for(var r=e.map,n=e.keys,i=n.length,a=0;a<i;a++){var s=n[a];if(Mr(s))throw Error("Tried to get map with object key");if(r=r[s],r==null)return r}return r};k0=ZGe,rx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};JGe=typeof rx=="object"&&rx&&rx.Object===Object&&rx,eUe=JGe,tUe=typeof self=="object"&&self&&self.Object===Object&&self,rUe=eUe||tUe||Function("return this")(),P6=rUe,nUe=function(){return P6.Date.now()},jM=nUe,iUe=/\\s/;sUe=aUe,oUe=/^\\s+/;cUe=lUe,uUe=P6.Symbol,Om=uUe,$de=Object.prototype,hUe=$de.hasOwnProperty,fUe=$de.toString,Z2=Om?Om.toStringTag:void 0;pUe=dUe,gUe=Object.prototype,mUe=gUe.toString;yUe=vUe,xUe="[object Null]",bUe="[object Undefined]",xfe=Om?Om.toStringTag:void 0;Gde=wUe;TUe=kUe,EUe="[object Symbol]";kx=SUe,bfe=NaN,CUe=/^[-+]0x[0-9a-f]+$/i,AUe=/^0b[01]+$/i,_Ue=/^0o[0-7]+$/i,LUe=parseInt;wfe=RUe,NUe="Expected a function",IUe=Math.max,MUe=Math.min;B6=DUe,KM=Ni?Ni.performance:null,Ude=KM&&KM.now?function(){return KM.now()}:function(){return Date.now()},OUe=function(){if(Ni){if(Ni.requestAnimationFrame)return function(t){Ni.requestAnimationFrame(t)};if(Ni.mozRequestAnimationFrame)return function(t){Ni.mozRequestAnimationFrame(t)};if(Ni.webkitRequestAnimationFrame)return function(t){Ni.webkitRequestAnimationFrame(t)};if(Ni.msRequestAnimationFrame)return function(t){Ni.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(Ude())},1e3/60)}}(),S6=function(e){return OUe(e)},Uu=Ude,_m=9261,Vde=65599,nx=5381,Wde=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_m,n=r,i;i=e.next(),!i.done;)n=n*Vde+i.value|0;return n},ux=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_m;return r*Vde+e|0},hx=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nx;return(r<<5)+r+e|0},PUe=function(e,r){return e*2097152+r},nf=function(e){return e[0]*2097152+e[1]},n6=function(e,r){return[ux(e[0],r[0]),hx(e[1],r[1])]},BUe=function(e,r){var n={value:0,done:!1},i=0,a=e.length,s={next:function(){return i<a?n.value=e[i++]:n.done=!0,n}};return Wde(s,r)},T0=function(e,r){var n={value:0,done:!1},i=0,a=e.length,s={next:function(){return i<a?n.value=e.charCodeAt(i++):n.done=!0,n}};return Wde(s,r)},Hde=function(){return FUe(arguments)},FUe=function(e){for(var r,n=0;n<e.length;n++){var i=e[n];n===0?r=T0(i):r=T0(i,r)}return r},kfe=!0,zUe=console.warn!=null,$Ue=console.trace!=null,_D=Number.MAX_SAFE_INTEGER||9007199254740991,qde=function(){return!0},C6=function(){return!1},Tfe=function(){return 0},LD=function(){},ri=function(e){throw new Error(e)},Yde=function(e){if(e!==void 0)kfe=!!e;else return kfe},Qr=function(e){Yde()&&(zUe?console.warn(e):(console.log(e),$Ue&&console.trace()))},GUe=function(e){return Zt({},e)},Ic=function(e){return e==null?e:gn(e)?e.slice():Mr(e)?GUe(e):e},UUe=function(e){return e.slice()},Xde=function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},VUe={},jde=function(){return VUe},da=function(e){var r=Object.keys(e);return function(n){for(var i={},a=0;a<r.length;a++){var s=r[a],o=n?.[s];i[s]=o===void 0?e[s]:o}return i}},hf=function(e,r,n){for(var i=e.length-1;i>=0&&!(e[i]===r&&(e.splice(i,1),n));i--);},RD=function(e){e.splice(0,e.length)},WUe=function(e,r){for(var n=0;n<r.length;n++){var i=r[n];e.push(i)}},Nl=function(e,r,n){return n&&(r=Pde(n,r)),e[r]},sf=function(e,r,n,i){n&&(r=Pde(n,r)),e[r]=i},HUe=function(){function t(){ED(this,t),this._obj={}}return SD(t,[{key:"set",value:function(r,n){return this._obj[r]=n,this}},{key:"delete",value:function(r){return this._obj[r]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(r){return this._obj[r]!==void 0}},{key:"get",value:function(r){return this._obj[r]}}]),t}(),Mc=typeof Map<"u"?Map:HUe,qUe="undefined",YUe=function(){function t(e){if(ED(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var n=0;n<r.length;n++)this.add(r[n])}}return SD(t,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(r){var n=this._obj;n[r]!==1&&(n[r]=1,this.size++)}},{key:"delete",value:function(r){var n=this._obj;n[r]===1&&(n[r]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(r){return this._obj[r]===1}},{key:"toArray",value:function(){var r=this;return Object.keys(this._obj).filter(function(n){return r.has(n)})}},{key:"forEach",value:function(r,n){return this.toArray().forEach(r,n)}}]),t}(),zm=(typeof Set>"u"?"undefined":Mi(Set))!==qUe?Set:YUe,F6=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!CD(e)){ri("An element must have a core reference and parameters set");return}var i=r.group;if(i==null&&(r.data&&r.data.source!=null&&r.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){ri("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return}this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?i==="edges":!!r.pannable,active:!1,classes:new zm,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();a.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];gn(r.classes)?u=r.classes:qt(r.classes)&&(u=r.classes.split(/\\s+/));for(var h=0,f=u.length;h<f;h++){var d=u[h];!d||d===""||a.classes.add(d)}this.createEmitter();var p=r.style||r.css;p&&(Qr("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(p)),(n===void 0||n)&&this.restore()},Efe=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(n,i,a){var s;Mr(n)&&!to(n)&&(s=n,n=s.roots||s.root,i=s.visit,a=s.directed),a=arguments.length===2&&!Xn(i)?i:a,i=Xn(i)?i:function(){};for(var o=this._private.cy,l=n=qt(n)?this.filter(n):n,u=[],h=[],f={},d={},p={},g=0,m,x=this.byGroup(),y=x.nodes,b=x.edges,w=0;w<l.length;w++){var _=l[w],k=_.id();_.isNode()&&(u.unshift(_),e.bfs&&(p[k]=!0,h.push(_)),d[k]=0)}for(var E=function(){var I=e.bfs?u.shift():u.pop(),A=I.id();if(e.dfs){if(p[A])return"continue";p[A]=!0,h.push(I)}var D=d[A],N=f[A],O=N!=null?N.source():null,B=N!=null?N.target():null,P=N==null?void 0:I.same(O)?B[0]:O[0],$=void 0;if($=i(I,N,P,g++,D),$===!0)return m=I,"break";if($===!1)return"break";for(var z=I.connectedEdges().filter(function(K){return(!a||K.source().same(I))&&b.has(K)}),H=0;H<z.length;H++){var Z=z[H],X=Z.connectedNodes().filter(function(K){return!K.same(I)&&y.has(K)}),ie=X.id();X.length!==0&&!p[ie]&&(X=X[0],u.push(X),e.bfs&&(p[ie]=!0,h.push(X)),f[ie]=Z,d[ie]=d[A]+1)}};u.length!==0;){var L=E();if(L!=="continue"&&L==="break")break}for(var S=o.collection(),C=0;C<h.length;C++){var M=h[C],R=f[M.id()];R!=null&&S.push(R),S.push(M)}return{path:o.collection(S),found:o.collection(m)}}},fx={breadthFirstSearch:Efe({bfs:!0}),depthFirstSearch:Efe({dfs:!0})};fx.bfs=fx.breadthFirstSearch;fx.dfs=fx.depthFirstSearch;XUe=QGe(function(t,e){(function(){var r,n,i,a,s,o,l,u,h,f,d,p,g,m,x;i=Math.floor,f=Math.min,n=function(y,b){return y<b?-1:y>b?1:0},h=function(y,b,w,_,k){var E;if(w==null&&(w=0),k==null&&(k=n),w<0)throw new Error("lo must be non-negative");for(_==null&&(_=y.length);w<_;)E=i((w+_)/2),k(b,y[E])<0?_=E:w=E+1;return[].splice.apply(y,[w,w-w].concat(b)),b},o=function(y,b,w){return w==null&&(w=n),y.push(b),m(y,0,y.length-1,w)},s=function(y,b){var w,_;return b==null&&(b=n),w=y.pop(),y.length?(_=y[0],y[0]=w,x(y,0,b)):_=w,_},u=function(y,b,w){var _;return w==null&&(w=n),_=y[0],y[0]=b,x(y,0,w),_},l=function(y,b,w){var _;return w==null&&(w=n),y.length&&w(y[0],b)<0&&(_=[y[0],b],b=_[0],y[0]=_[1],x(y,0,w)),b},a=function(y,b){var w,_,k,E,L,S;for(b==null&&(b=n),E=function(){S=[];for(var C=0,M=i(y.length/2);0<=M?C<M:C>M;0<=M?C++:C--)S.push(C);return S}.apply(this).reverse(),L=[],_=0,k=E.length;_<k;_++)w=E[_],L.push(x(y,w,b));return L},g=function(y,b,w){var _;if(w==null&&(w=n),_=y.indexOf(b),_!==-1)return m(y,0,_,w),x(y,_,w)},d=function(y,b,w){var _,k,E,L,S;if(w==null&&(w=n),k=y.slice(0,b),!k.length)return k;for(a(k,w),S=y.slice(b),E=0,L=S.length;E<L;E++)_=S[E],l(k,_,w);return k.sort(w).reverse()},p=function(y,b,w){var _,k,E,L,S,C,M,R,T;if(w==null&&(w=n),b*10<=y.length){if(E=y.slice(0,b).sort(w),!E.length)return E;for(k=E[E.length-1],M=y.slice(b),L=0,C=M.length;L<C;L++)_=M[L],w(_,k)<0&&(h(E,_,0,null,w),E.pop(),k=E[E.length-1]);return E}for(a(y,w),T=[],S=0,R=f(b,y.length);0<=R?S<R:S>R;0<=R?++S:--S)T.push(s(y,w));return T},m=function(y,b,w,_){var k,E,L;for(_==null&&(_=n),k=y[w];w>b;){if(L=w-1>>1,E=y[L],_(k,E)<0){y[w]=E,w=L;continue}break}return y[w]=k},x=function(y,b,w){var _,k,E,L,S;for(w==null&&(w=n),k=y.length,S=b,E=y[b],_=2*b+1;_<k;)L=_+1,L<k&&!(w(y[_],y[L])<0)&&(_=L),y[b]=y[_],b=_,_=2*b+1;return y[b]=E,m(y,S,b,w)},r=function(){y.push=o,y.pop=s,y.replace=u,y.pushpop=l,y.heapify=a,y.updateItem=g,y.nlargest=d,y.nsmallest=p;function y(b){this.cmp=b??n,this.nodes=[]}return y.prototype.push=function(b){return o(this.nodes,b,this.cmp)},y.prototype.pop=function(){return s(this.nodes,this.cmp)},y.prototype.peek=function(){return this.nodes[0]},y.prototype.contains=function(b){return this.nodes.indexOf(b)!==-1},y.prototype.replace=function(b){return u(this.nodes,b,this.cmp)},y.prototype.pushpop=function(b){return l(this.nodes,b,this.cmp)},y.prototype.heapify=function(){return a(this.nodes,this.cmp)},y.prototype.updateItem=function(b){return g(this.nodes,b,this.cmp)},y.prototype.clear=function(){return this.nodes=[]},y.prototype.empty=function(){return this.nodes.length===0},y.prototype.size=function(){return this.nodes.length},y.prototype.clone=function(){var b;return b=new y,b.nodes=this.nodes.slice(0),b},y.prototype.toArray=function(){return this.nodes.slice(0)},y.prototype.insert=y.prototype.push,y.prototype.top=y.prototype.peek,y.prototype.front=y.prototype.peek,y.prototype.has=y.prototype.contains,y.prototype.copy=y.prototype.clone,y}(),function(y,b){return t.exports=b()}(this,function(){return r})}).call(rx)}),Tx=XUe,jUe=da({root:null,weight:function(e){return 1},directed:!1}),KUe={dijkstra:function(e){if(!Mr(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var n=jUe(e),i=n.root,a=n.weight,s=n.directed,o=this,l=a,u=qt(i)?this.filter(i)[0]:i[0],h={},f={},d={},p=this.byGroup(),g=p.nodes,m=p.edges;m.unmergeBy(function(D){return D.isLoop()});for(var x=function(N){return h[N.id()]},y=function(N,O){h[N.id()]=O,b.updateItem(N)},b=new Tx(function(D,N){return x(D)-x(N)}),w=0;w<g.length;w++){var _=g[w];h[_.id()]=_.same(u)?0:1/0,b.push(_)}for(var k=function(N,O){for(var B=(s?N.edgesTo(O):N.edgesWith(O)).intersect(m),P=1/0,$,z=0;z<B.length;z++){var H=B[z],Z=l(H);(Z<P||!$)&&(P=Z,$=H)}return{edge:$,dist:P}};b.size()>0;){var E=b.pop(),L=x(E),S=E.id();if(d[S]=L,L!==1/0)for(var C=E.neighborhood().intersect(g),M=0;M<C.length;M++){var R=C[M],T=R.id(),I=k(E,R),A=L+I.dist;A<x(R)&&(y(R,A),f[T]={node:E,edge:I.edge})}}return{distanceTo:function(N){var O=qt(N)?g.filter(N)[0]:N[0];return d[O.id()]},pathTo:function(N){var O=qt(N)?g.filter(N)[0]:N[0],B=[],P=O,$=P.id();if(O.length>0)for(B.unshift(O);f[$];){var z=f[$];B.unshift(z.edge),B.unshift(z.node),P=z.node,$=P.id()}return o.spawn(B)}}}},ZUe={kruskal:function(e){e=e||function(w){return 1};for(var r=this.byGroup(),n=r.nodes,i=r.edges,a=n.length,s=new Array(a),o=n,l=function(_){for(var k=0;k<s.length;k++){var E=s[k];if(E.has(_))return k}},u=0;u<a;u++)s[u]=this.spawn(n[u]);for(var h=i.sort(function(w,_){return e(w)-e(_)}),f=0;f<h.length;f++){var d=h[f],p=d.source()[0],g=d.target()[0],m=l(p),x=l(g),y=s[m],b=s[x];m!==x&&(o.merge(d),y.merge(b),s.splice(x,1))}return o}},QUe=da({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),JUe={aStar:function(e){var r=this.cy(),n=QUe(e),i=n.root,a=n.goal,s=n.heuristic,o=n.directed,l=n.weight;i=r.collection(i)[0],a=r.collection(a)[0];var u=i.id(),h=a.id(),f={},d={},p={},g=new Tx(function($,z){return d[$.id()]-d[z.id()]}),m=new zm,x={},y={},b=function(z,H){g.push(z),m.add(H)},w,_,k=function(){w=g.pop(),_=w.id(),m.delete(_)},E=function(z){return m.has(z)};b(i,u),f[u]=0,d[u]=s(i);for(var L=0;g.size()>0;){if(k(),L++,_===h){for(var S=[],C=a,M=h,R=y[M];S.unshift(C),R!=null&&S.unshift(R),C=x[M],C!=null;)M=C.id(),R=y[M];return{found:!0,distance:f[_],path:this.spawn(S),steps:L}}p[_]=!0;for(var T=w._private.edges,I=0;I<T.length;I++){var A=T[I];if(this.hasElementWithId(A.id())&&!(o&&A.data("source")!==_)){var D=A.source(),N=A.target(),O=D.id()!==_?D:N,B=O.id();if(this.hasElementWithId(B)&&!p[B]){var P=f[_]+l(A);if(!E(B)){f[B]=P,d[B]=P+s(O),b(O,B),x[B]=w,y[B]=A;continue}P<f[B]&&(f[B]=P,d[B]=P+s(O),x[B]=w,y[B]=A)}}}}return{found:!1,distance:void 0,path:void 0,steps:L}}},eVe=da({weight:function(e){return 1},directed:!1}),tVe={floydWarshall:function(e){for(var r=this.cy(),n=eVe(e),i=n.weight,a=n.directed,s=i,o=this.byGroup(),l=o.nodes,u=o.edges,h=l.length,f=h*h,d=function(Z){return l.indexOf(Z)},p=function(Z){return l[Z]},g=new Array(f),m=0;m<f;m++){var x=m%h,y=(m-x)/h;y===x?g[m]=0:g[m]=1/0}for(var b=new Array(f),w=new Array(f),_=0;_<u.length;_++){var k=u[_],E=k.source()[0],L=k.target()[0];if(E!==L){var S=d(E),C=d(L),M=S*h+C,R=s(k);if(g[M]>R&&(g[M]=R,b[M]=C,w[M]=k),!a){var T=C*h+S;!a&&g[T]>R&&(g[T]=R,b[T]=S,w[T]=k)}}}for(var I=0;I<h;I++)for(var A=0;A<h;A++)for(var D=A*h+I,N=0;N<h;N++){var O=A*h+N,B=I*h+N;g[D]+g[B]<g[O]&&(g[O]=g[D]+g[B],b[O]=b[D])}var P=function(Z){return(qt(Z)?r.filter(Z):Z)[0]},$=function(Z){return d(P(Z))},z={distance:function(Z,X){var ie=$(Z),K=$(X);return g[ie*h+K]},path:function(Z,X){var ie=$(Z),K=$(X),ee=p(ie);if(ie===K)return ee.collection();if(b[ie*h+K]==null)return r.collection();var J=r.collection(),W=ie,Y;for(J.merge(ee);ie!==K;)W=ie,ie=b[ie*h+K],Y=w[W*h+ie],J.merge(Y),J.merge(p(ie));return J}};return z}},rVe=da({weight:function(e){return 1},directed:!1,root:null}),nVe={bellmanFord:function(e){var r=this,n=rVe(e),i=n.weight,a=n.directed,s=n.root,o=i,l=this,u=this.cy(),h=this.byGroup(),f=h.edges,d=h.nodes,p=d.length,g=new Mc,m=!1,x=[];s=u.collection(s)[0],f.unmergeBy(function(oe){return oe.isLoop()});for(var y=f.length,b=function(be){var Fe=g.get(be.id());return Fe||(Fe={},g.set(be.id(),Fe)),Fe},w=function(be){return(qt(be)?u.$(be):be)[0]},_=function(be){return b(w(be)).dist},k=function(be){for(var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s,Be=w(be),Ve=[],We=Be;;){if(We==null)return r.spawn();var qe=b(We),Re=qe.edge,Me=qe.pred;if(Ve.unshift(We[0]),We.same(Fe)&&Ve.length>0)break;Re!=null&&Ve.unshift(Re),We=Me}return l.spawn(Ve)},E=0;E<p;E++){var L=d[E],S=b(L);L.same(s)?S.dist=0:S.dist=1/0,S.pred=null,S.edge=null}for(var C=!1,M=function(be,Fe,Be,Ve,We,qe){var Re=Ve.dist+qe;Re<We.dist&&!Be.same(Ve.edge)&&(We.dist=Re,We.pred=be,We.edge=Be,C=!0)},R=1;R<p;R++){C=!1;for(var T=0;T<y;T++){var I=f[T],A=I.source(),D=I.target(),N=o(I),O=b(A),B=b(D);M(A,D,I,O,B,N),a||M(D,A,I,B,O,N)}if(!C)break}if(C)for(var P=[],$=0;$<y;$++){var z=f[$],H=z.source(),Z=z.target(),X=o(z),ie=b(H).dist,K=b(Z).dist;if(ie+X<K||!a&&K+X<ie)if(m||(Qr("Graph contains a negative weight cycle for Bellman-Ford"),m=!0),e.findNegativeWeightCycles!==!1){var ee=[];ie+X<K&&ee.push(H),!a&&K+X<ie&&ee.push(Z);for(var J=ee.length,W=0;W<J;W++){var Y=ee[W],Q=[Y];Q.push(b(Y).edge);for(var se=b(Y).pred;Q.indexOf(se)===-1;)Q.push(se),Q.push(b(se).edge),se=b(se).pred;Q=Q.slice(Q.indexOf(se));for(var ue=Q[0].id(),ce=0,te=2;te<Q.length;te+=2)Q[te].id()<ue&&(ue=Q[te].id(),ce=te);Q=Q.slice(ce).concat(Q.slice(0,ce)),Q.push(Q[0]);var Le=Q.map(function(oe){return oe.id()}).join(",");P.indexOf(Le)===-1&&(x.push(l.spawn(Q)),P.push(Le))}}else break}return{distanceTo:_,pathTo:k,hasNegativeWeightCycle:m,negativeWeightCycles:x}}},iVe=Math.sqrt(2),aVe=function(e,r,n){n.length===0&&ri("Karger-Stein must be run on a connected (sub)graph");for(var i=n[e],a=i[1],s=i[2],o=r[a],l=r[s],u=n,h=u.length-1;h>=0;h--){var f=u[h],d=f[1],p=f[2];(r[d]===o&&r[p]===l||r[d]===l&&r[p]===o)&&u.splice(h,1)}for(var g=0;g<u.length;g++){var m=u[g];m[1]===l?(u[g]=m.slice(),u[g][1]=o):m[2]===l&&(u[g]=m.slice(),u[g][2]=o)}for(var x=0;x<r.length;x++)r[x]===l&&(r[x]=o);return u},ZM=function(e,r,n,i){for(;n>i;){var a=Math.floor(Math.random()*r.length);r=aVe(a,e,r),n--}return r},sVe={kargerStein:function(){var e=this,r=this.byGroup(),n=r.nodes,i=r.edges;i.unmergeBy(function(B){return B.isLoop()});var a=n.length,s=i.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),l=Math.floor(a/iVe);if(a<2){ri("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],h=0;h<s;h++){var f=i[h];u.push([h,n.indexOf(f.source()),n.indexOf(f.target())])}for(var d=1/0,p=[],g=new Array(a),m=new Array(a),x=new Array(a),y=function(P,$){for(var z=0;z<a;z++)$[z]=P[z]},b=0;b<=o;b++){for(var w=0;w<a;w++)m[w]=w;var _=ZM(m,u.slice(),a,l),k=_.slice();y(m,x);var E=ZM(m,_,l,2),L=ZM(x,k,l,2);E.length<=L.length&&E.length<d?(d=E.length,p=E,y(m,g)):L.length<=E.length&&L.length<d&&(d=L.length,p=L,y(x,g))}for(var S=this.spawn(p.map(function(B){return i[B[0]]})),C=this.spawn(),M=this.spawn(),R=g[0],T=0;T<g.length;T++){var I=g[T],A=n[T];I===R?C.merge(A):M.merge(A)}var D=function(P){var $=e.spawn();return P.forEach(function(z){$.merge(z),z.connectedEdges().forEach(function(H){e.contains(H)&&!S.contains(H)&&$.merge(H)})}),$},N=[D(C),D(M)],O={cut:S,components:N,partition1:C,partition2:M};return O}},oVe=function(e){return{x:e.x,y:e.y}},z6=function(e,r,n){return{x:e.x*r+n.x,y:e.y*r+n.y}},Kde=function(e,r,n){return{x:(e.x-n.x)/r,y:(e.y-n.y)/r}},Lm=function(e){return{x:e[0],y:e[1]}},lVe=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=1/0,a=r;a<n;a++){var s=e[a];isFinite(s)&&(i=Math.min(s,i))}return i},cVe=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=-1/0,a=r;a<n;a++){var s=e[a];isFinite(s)&&(i=Math.max(s,i))}return i},uVe=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=0,a=0,s=r;s<n;s++){var o=e[s];isFinite(o)&&(i+=o,a++)}return i/a},hVe=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?e=e.slice(r,n):(n<e.length&&e.splice(n,e.length-n),r>0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}a&&e.sort(function(d,p){return d-p});var h=e.length,f=Math.floor(h/2);return h%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},fVe=function(e){return Math.PI*e/180},i6=function(e,r){return Math.atan2(r,e)-Math.PI/2},ND=Math.log2||function(t){return Math.log(t)/Math.log(2)},Zde=function(e){return e>0?1:e<0?-1:0},E0=function(e,r){return Math.sqrt(v0(e,r))},v0=function(e,r){var n=r.x-e.x,i=r.y-e.y;return n*n+i*i},dVe=function(e){for(var r=e.length,n=0,i=0;i<r;i++)n+=e[i];for(var a=0;a<r;a++)e[a]=e[a]/n;return e},qi=function(e,r,n,i){return(1-i)*(1-i)*e+2*(1-i)*i*r+i*i*n},Nm=function(e,r,n,i){return{x:qi(e.x,r.x,n.x,i),y:qi(e.y,r.y,n.y,i)}},pVe=function(e,r,n,i){var a={x:r.x-e.x,y:r.y-e.y},s=E0(e,r),o={x:a.x/s,y:a.y/s};return n=n??0,i=i??n*s,{x:e.x+o.x*i,y:e.y+o.y*i}},dx=function(e,r,n){return Math.max(e,Math.min(n,r))},_s=function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},gVe=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},mVe=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},vVe=function(e,r,n){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+n,y2:e.y2+n,w:e.w,h:e.h}},Qde=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},yVe=function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},g6=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},m6=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,s;if(r.length===1)n=i=a=s=r[0];else if(r.length===2)n=a=r[0],s=i=r[1];else if(r.length===4){var o=Ll(r,4);n=o[0],i=o[1],a=o[2],s=o[3]}return e.x1-=s,e.x2+=i,e.y1-=n,e.y2+=a,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Sfe=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},ID=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},Pm=function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},xVe=function(e,r){return Pm(e,r.x,r.y)},Jde=function(e,r){return Pm(e,r.x1,r.y1)&&Pm(e,r.x2,r.y2)},e0e=function(e,r,n,i,a,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?S0(a,s):l,h=a/2,f=s/2;u=Math.min(u,h,f);var d=u!==h,p=u!==f,g;if(d){var m=n-h+u-o,x=i-f-o,y=n+h-u+o,b=x;if(g=of(e,r,n,i,m,x,y,b,!1),g.length>0)return g}if(p){var w=n+h+o,_=i-f+u-o,k=w,E=i+f-u+o;if(g=of(e,r,n,i,w,_,k,E,!1),g.length>0)return g}if(d){var L=n-h+u-o,S=i+f+o,C=n+h-u+o,M=S;if(g=of(e,r,n,i,L,S,C,M,!1),g.length>0)return g}if(p){var R=n-h-o,T=i-f+u-o,I=R,A=i+f-u+o;if(g=of(e,r,n,i,R,T,I,A,!1),g.length>0)return g}var D;{var N=n-h+u,O=i-f+u;if(D=ix(e,r,n,i,N,O,u+o),D.length>0&&D[0]<=N&&D[1]<=O)return[D[0],D[1]]}{var B=n+h-u,P=i-f+u;if(D=ix(e,r,n,i,B,P,u+o),D.length>0&&D[0]>=B&&D[1]<=P)return[D[0],D[1]]}{var $=n+h-u,z=i+f-u;if(D=ix(e,r,n,i,$,z,u+o),D.length>0&&D[0]>=$&&D[1]>=z)return[D[0],D[1]]}{var H=n-h+u,Z=i+f-u;if(D=ix(e,r,n,i,H,Z,u+o),D.length>0&&D[0]<=H&&D[1]>=Z)return[D[0],D[1]]}return[]},bVe=function(e,r,n,i,a,s,o){var l=o,u=Math.min(n,a),h=Math.max(n,a),f=Math.min(i,s),d=Math.max(i,s);return u-l<=e&&e<=h+l&&f-l<=r&&r<=d+l},wVe=function(e,r,n,i,a,s,o,l,u){var h={x1:Math.min(n,o,a)-u,x2:Math.max(n,o,a)+u,y1:Math.min(i,l,s)-u,y2:Math.max(i,l,s)+u};return!(e<h.x1||e>h.x2||r<h.y1||r>h.y2)},kVe=function(e,r,n,i){n-=i;var a=r*r-4*e*n;if(a<0)return[];var s=Math.sqrt(a),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},TVe=function(e,r,n,i,a){var s=1e-5;e===0&&(e=s),r/=e,n/=e,i/=e;var o,l,u,h,f,d,p,g;if(l=(3*n-r*r)/9,u=-(27*i)+r*(9*n-2*(r*r)),u/=54,o=l*l*l+u*u,a[1]=0,p=r/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),d=u-Math.sqrt(o),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),a[0]=-p+f+d,p+=(f+d)/2,a[4]=a[2]=-p,p=Math.sqrt(3)*(-d+f)/2,a[3]=p,a[5]=-p;return}if(a[5]=a[3]=0,o===0){g=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),a[0]=-p+2*g,a[4]=a[2]=-(g+p);return}l=-l,h=l*l*l,h=Math.acos(u/Math.sqrt(h)),g=2*Math.sqrt(l),a[0]=-p+g*Math.cos(h/3),a[2]=-p+g*Math.cos((h+2*Math.PI)/3),a[4]=-p+g*Math.cos((h+4*Math.PI)/3)},EVe=function(e,r,n,i,a,s,o,l){var u=1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+i*i-4*i*s+2*i*l+4*s*s-4*s*l+l*l,h=1*9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*i*s-3*i*i-3*i*l-6*s*s+3*s*l,f=1*3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*i*i-6*i*s+i*l-i*r+2*s*s+2*s*r-l*r,d=1*n*a-n*n+n*e-a*e+i*s-i*i+i*r-s*r,p=[];TVe(u,h,f,d,p);for(var g=1e-7,m=[],x=0;x<6;x+=2)Math.abs(p[x+1])<g&&p[x]>=0&&p[x]<=1&&m.push(p[x]);m.push(1),m.push(0);for(var y=-1,b,w,_,k=0;k<m.length;k++)b=Math.pow(1-m[k],2)*n+2*(1-m[k])*m[k]*a+m[k]*m[k]*o,w=Math.pow(1-m[k],2)*i+2*(1-m[k])*m[k]*s+m[k]*m[k]*l,_=Math.pow(b-e,2)+Math.pow(w-r,2),y>=0?_<y&&(y=_):y=_;return y},SVe=function(e,r,n,i,a,s){var o=[e-n,r-i],l=[a-n,s-i],u=l[0]*l[0]+l[1]*l[1],h=o[0]*o[0]+o[1]*o[1],f=o[0]*l[0]+o[1]*l[1],d=f*f/u;return f<0?h:d>u?(e-a)*(e-a)+(r-s)*(r-s):h-d},As=function(e,r,n){for(var i,a,s,o,l,u=0,h=0;h<n.length/2;h++)if(i=n[h*2],a=n[h*2+1],h+1<n.length/2?(s=n[(h+1)*2],o=n[(h+1)*2+1]):(s=n[(h+1-n.length/2)*2],o=n[(h+1-n.length/2)*2+1]),!(i==e&&s==e))if(i>=e&&e>=s||i<=e&&e<=s)l=(e-i)/(s-i)*(o-a)+a,l>r&&u++;else continue;return u%2!==0},Vu=function(e,r,n,i,a,s,o,l,u){var h=new Array(n.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var d=Math.cos(-f),p=Math.sin(-f),g=0;g<h.length/2;g++)h[g*2]=s/2*(n[g*2]*d-n[g*2+1]*p),h[g*2+1]=o/2*(n[g*2+1]*d+n[g*2]*p),h[g*2]+=i,h[g*2+1]+=a;var m;if(u>0){var x=_6(h,-u);m=A6(x)}else m=h;return As(e,r,m)},CVe=function(e,r,n,i,a,s,o,l){for(var u=new Array(n.length*2),h=0;h<l.length;h++){var f=l[h];u[h*4+0]=f.startX,u[h*4+1]=f.startY,u[h*4+2]=f.stopX,u[h*4+3]=f.stopY;var d=Math.pow(f.cx-e,2)+Math.pow(f.cy-r,2);if(d<=Math.pow(f.radius,2))return!0}return As(e,r,u)},A6=function(e){for(var r=new Array(e.length/2),n,i,a,s,o,l,u,h,f=0;f<e.length/4;f++){n=e[f*4],i=e[f*4+1],a=e[f*4+2],s=e[f*4+3],f<e.length/4-1?(o=e[(f+1)*4],l=e[(f+1)*4+1],u=e[(f+1)*4+2],h=e[(f+1)*4+3]):(o=e[0],l=e[1],u=e[2],h=e[3]);var d=of(n,i,a,s,o,l,u,h,!0);r[f*2]=d[0],r[f*2+1]=d[1]}return r},_6=function(e,r){for(var n=new Array(e.length*2),i,a,s,o,l=0;l<e.length/2;l++){i=e[l*2],a=e[l*2+1],l<e.length/2-1?(s=e[(l+1)*2],o=e[(l+1)*2+1]):(s=e[0],o=e[1]);var u=o-a,h=-(s-i),f=Math.sqrt(u*u+h*h),d=u/f,p=h/f;n[l*4]=i+d*r,n[l*4+1]=a+p*r,n[l*4+2]=s+d*r,n[l*4+3]=o+p*r}return n},AVe=function(e,r,n,i,a,s){var o=n-e,l=i-r;o/=a,l/=s;var u=Math.sqrt(o*o+l*l),h=u-1;if(h<0)return[];var f=h/u;return[(n-e)*f+e,(i-r)*f+r]},w0=function(e,r,n,i,a,s,o){return e-=a,r-=s,e/=n/2+o,r/=i/2+o,e*e+r*r<=1},ix=function(e,r,n,i,a,s,o){var l=[n-e,i-r],u=[e-a,r-s],h=l[0]*l[0]+l[1]*l[1],f=2*(u[0]*l[0]+u[1]*l[1]),d=u[0]*u[0]+u[1]*u[1]-o*o,p=f*f-4*h*d;if(p<0)return[];var g=(-f+Math.sqrt(p))/(2*h),m=(-f-Math.sqrt(p))/(2*h),x=Math.min(g,m),y=Math.max(g,m),b=[];if(x>=0&&x<=1&&b.push(x),y>=0&&y<=1&&b.push(y),b.length===0)return[];var w=b[0]*l[0]+e,_=b[0]*l[1]+r;if(b.length>1){if(b[0]==b[1])return[w,_];var k=b[1]*l[0]+e,E=b[1]*l[1]+r;return[w,_,k,E]}else return[w,_]},QM=function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},of=function(e,r,n,i,a,s,o,l,u){var h=e-a,f=n-e,d=o-a,p=r-s,g=i-r,m=l-s,x=d*p-m*h,y=f*p-g*h,b=m*f-d*g;if(b!==0){var w=x/b,_=y/b,k=.001,E=0-k,L=1+k;return E<=w&&w<=L&&E<=_&&_<=L?[e+w*f,r+w*g]:u?[e+w*f,r+w*g]:[]}else return x===0||y===0?QM(e,n,o)===o?[o,l]:QM(e,n,a)===a?[a,s]:QM(a,o,n)===n?[n,i]:[]:[]},px=function(e,r,n,i,a,s,o,l){var u=[],h,f=new Array(n.length),d=!0;s==null&&(d=!1);var p;if(d){for(var g=0;g<f.length/2;g++)f[g*2]=n[g*2]*s+i,f[g*2+1]=n[g*2+1]*o+a;if(l>0){var m=_6(f,-l);p=A6(m)}else p=f}else p=n;for(var x,y,b,w,_=0;_<p.length/2;_++)x=p[_*2],y=p[_*2+1],_<p.length/2-1?(b=p[(_+1)*2],w=p[(_+1)*2+1]):(b=p[0],w=p[1]),h=of(e,r,i,a,x,y,b,w),h.length!==0&&u.push(h[0],h[1]);return u},_Ve=function(e,r,n,i,a,s,o,l,u){var h=[],f,d=new Array(n.length*2);u.forEach(function(b,w){w===0?(d[d.length-2]=b.startX,d[d.length-1]=b.startY):(d[w*4-2]=b.startX,d[w*4-1]=b.startY),d[w*4]=b.stopX,d[w*4+1]=b.stopY,f=ix(e,r,i,a,b.cx,b.cy,b.radius),f.length!==0&&h.push(f[0],f[1])});for(var p=0;p<d.length/4;p++)f=of(e,r,i,a,d[p*4],d[p*4+1],d[p*4+2],d[p*4+3],!1),f.length!==0&&h.push(f[0],f[1]);if(h.length>2){for(var g=[h[0],h[1]],m=Math.pow(g[0]-e,2)+Math.pow(g[1]-r,2),x=1;x<h.length/2;x++){var y=Math.pow(h[x*2]-e,2)+Math.pow(h[x*2+1]-r,2);y<=m&&(g[0]=h[x*2],g[1]=h[x*2+1],m=y)}return g}return h},a6=function(e,r,n){var i=[e[0]-r[0],e[1]-r[1]],a=Math.sqrt(i[0]*i[0]+i[1]*i[1]),s=(a-n)/a;return s<0&&(s=1e-5),[r[0]+s*i[0],r[1]+s*i[1]]},Qa=function(e,r){var n=lD(e,r);return n=t0e(n),n},t0e=function(e){for(var r,n,i=e.length/2,a=1/0,s=1/0,o=-1/0,l=-1/0,u=0;u<i;u++)r=e[2*u],n=e[2*u+1],a=Math.min(a,r),o=Math.max(o,r),s=Math.min(s,n),l=Math.max(l,n);for(var h=2/(o-a),f=2/(l-s),d=0;d<i;d++)r=e[2*d]=e[2*d]*h,n=e[2*d+1]=e[2*d+1]*f,a=Math.min(a,r),o=Math.max(o,r),s=Math.min(s,n),l=Math.max(l,n);if(s<-1)for(var p=0;p<i;p++)n=e[2*p+1]=e[2*p+1]+(-1-s);return e},lD=function(e,r){var n=1/e*2*Math.PI,i=e%2===0?Math.PI/2+n/2:Math.PI/2;i+=r;for(var a=new Array(e*2),s,o=0;o<e;o++)s=o*n+i,a[2*o]=Math.cos(s),a[2*o+1]=Math.sin(-s);return a},S0=function(e,r){return Math.min(e/4,r/4,8)},r0e=function(e,r){return Math.min(e/10,r/10,8)},MD=function(){return 8},LVe=function(e,r,n){return[e-2*r+n,2*(r-e),e]},cD=function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},RVe=da({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),NVe={pageRank:function(e){for(var r=RVe(e),n=r.dampingFactor,i=r.precision,a=r.iterations,s=r.weight,o=this._private.cy,l=this.byGroup(),u=l.nodes,h=l.edges,f=u.length,d=f*f,p=h.length,g=new Array(d),m=new Array(f),x=(1-n)/f,y=0;y<f;y++){for(var b=0;b<f;b++){var w=y*f+b;g[w]=0}m[y]=0}for(var _=0;_<p;_++){var k=h[_],E=k.data("source"),L=k.data("target");if(E!==L){var S=u.indexOfId(E),C=u.indexOfId(L),M=s(k),R=C*f+S;g[R]+=M,m[S]+=M}}for(var T=1/f+x,I=0;I<f;I++)if(m[I]===0)for(var A=0;A<f;A++){var D=A*f+I;g[D]=T}else for(var N=0;N<f;N++){var O=N*f+I;g[O]=g[O]/m[I]+x}for(var B=new Array(f),P=new Array(f),$,z=0;z<f;z++)B[z]=1;for(var H=0;H<a;H++){for(var Z=0;Z<f;Z++)P[Z]=0;for(var X=0;X<f;X++)for(var ie=0;ie<f;ie++){var K=X*f+ie;P[X]+=g[K]*B[ie]}dVe(P),$=B,B=P,P=$;for(var ee=0,J=0;J<f;J++){var W=$[J]-B[J];ee+=W*W}if(ee<i)break}var Y={rank:function(se){return se=o.collection(se)[0],B[u.indexOf(se)]}};return Y}},Cfe=da({root:null,weight:function(e){return 1},directed:!1,alpha:0}),Im={degreeCentralityNormalized:function(e){e=Cfe(e);var r=this.cy(),n=this.nodes(),i=n.length;if(e.directed){for(var h={},f={},d=0,p=0,g=0;g<i;g++){var m=n[g],x=m.id();e.root=m;var y=this.degreeCentrality(e);d<y.indegree&&(d=y.indegree),p<y.outdegree&&(p=y.outdegree),h[x]=y.indegree,f[x]=y.outdegree}return{indegree:function(w){return d==0?0:(qt(w)&&(w=r.filter(w)),h[w.id()]/d)},outdegree:function(w){return p===0?0:(qt(w)&&(w=r.filter(w)),f[w.id()]/p)}}}else{for(var a={},s=0,o=0;o<i;o++){var l=n[o];e.root=l;var u=this.degreeCentrality(e);s<u.degree&&(s=u.degree),a[l.id()]=u.degree}return{degree:function(w){return s===0?0:(qt(w)&&(w=r.filter(w)),a[w.id()]/s)}}}},degreeCentrality:function(e){e=Cfe(e);var r=this.cy(),n=this,i=e,a=i.root,s=i.weight,o=i.directed,l=i.alpha;if(a=r.collection(a)[0],o){for(var p=a.connectedEdges(),g=p.filter(function(E){return E.target().same(a)&&n.has(E)}),m=p.filter(function(E){return E.source().same(a)&&n.has(E)}),x=g.length,y=m.length,b=0,w=0,_=0;_<g.length;_++)b+=s(g[_]);for(var k=0;k<m.length;k++)w+=s(m[k]);return{indegree:Math.pow(x,1-l)*Math.pow(b,l),outdegree:Math.pow(y,1-l)*Math.pow(w,l)}}else{for(var u=a.connectedEdges().intersection(n),h=u.length,f=0,d=0;d<u.length;d++)f+=s(u[d]);return{degree:Math.pow(h,1-l)*Math.pow(f,l)}}}};Im.dc=Im.degreeCentrality;Im.dcn=Im.degreeCentralityNormalised=Im.degreeCentralityNormalized;Afe=da({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Mm={closenessCentralityNormalized:function(e){for(var r=Afe(e),n=r.harmonic,i=r.weight,a=r.directed,s=this.cy(),o={},l=0,u=this.nodes(),h=this.floydWarshall({weight:i,directed:a}),f=0;f<u.length;f++){for(var d=0,p=u[f],g=0;g<u.length;g++)if(f!==g){var m=h.distance(p,u[g]);n?d+=1/m:d+=m}n||(d=1/d),l<d&&(l=d),o[p.id()]=d}return{closeness:function(y){return l==0?0:(qt(y)?y=s.filter(y)[0].id():y=y.id(),o[y]/l)}}},closenessCentrality:function(e){var r=Afe(e),n=r.root,i=r.weight,a=r.directed,s=r.harmonic;n=this.filter(n)[0];for(var o=this.dijkstra({root:n,weight:i,directed:a}),l=0,u=this.nodes(),h=0;h<u.length;h++){var f=u[h];if(!f.same(n)){var d=o.distanceTo(f);s?l+=1/d:l+=d}}return s?l:1/l}};Mm.cc=Mm.closenessCentrality;Mm.ccn=Mm.closenessCentralityNormalised=Mm.closenessCentralityNormalized;IVe=da({weight:null,directed:!1}),uD={betweennessCentrality:function(e){for(var r=IVe(e),n=r.directed,i=r.weight,a=i!=null,s=this.cy(),o=this.nodes(),l={},u={},h=0,f={set:function(w,_){u[w]=_,_>h&&(h=_)},get:function(w){return u[w]}},d=0;d<o.length;d++){var p=o[d],g=p.id();n?l[g]=p.outgoers().nodes():l[g]=p.openNeighborhood().nodes(),f.set(g,0)}for(var m=function(w){for(var _=o[w].id(),k=[],E={},L={},S={},C=new Tx(function(ie,K){return S[ie]-S[K]}),M=0;M<o.length;M++){var R=o[M].id();E[R]=[],L[R]=0,S[R]=1/0}for(L[_]=1,S[_]=0,C.push(_);!C.empty();){var T=C.pop();if(k.push(T),a)for(var I=0;I<l[T].length;I++){var A=l[T][I],D=s.getElementById(T),N=void 0;D.edgesTo(A).length>0?N=D.edgesTo(A)[0]:N=A.edgesTo(D)[0];var O=i(N);A=A.id(),S[A]>S[T]+O&&(S[A]=S[T]+O,C.nodes.indexOf(A)<0?C.push(A):C.updateItem(A),L[A]=0,E[A]=[]),S[A]==S[T]+O&&(L[A]=L[A]+L[T],E[A].push(T))}else for(var B=0;B<l[T].length;B++){var P=l[T][B].id();S[P]==1/0&&(C.push(P),S[P]=S[T]+1),S[P]==S[T]+1&&(L[P]=L[P]+L[T],E[P].push(T))}}for(var $={},z=0;z<o.length;z++)$[o[z].id()]=0;for(;k.length>0;){for(var H=k.pop(),Z=0;Z<E[H].length;Z++){var X=E[H][Z];$[X]=$[X]+L[X]/L[H]*(1+$[H])}H!=o[w].id()&&f.set(H,f.get(H)+$[H])}},x=0;x<o.length;x++)m(x);var y={betweenness:function(w){var _=s.collection(w).id();return f.get(_)},betweennessNormalized:function(w){if(h==0)return 0;var _=s.collection(w).id();return f.get(_)/h}};return y.betweennessNormalised=y.betweennessNormalized,y}};uD.bc=uD.betweennessCentrality;MVe=da({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),DVe=function(e){return MVe(e)},OVe=function(e,r){for(var n=0,i=0;i<r.length;i++)n+=r[i](e);return n},PVe=function(e,r,n){for(var i=0;i<r;i++)e[i*r+i]=n},n0e=function(e,r){for(var n,i=0;i<r;i++){n=0;for(var a=0;a<r;a++)n+=e[a*r+i];for(var s=0;s<r;s++)e[s*r+i]=e[s*r+i]/n}},BVe=function(e,r,n){for(var i=new Array(n*n),a=0;a<n;a++){for(var s=0;s<n;s++)i[a*n+s]=0;for(var o=0;o<n;o++)for(var l=0;l<n;l++)i[a*n+l]+=e[a*n+o]*r[o*n+l]}return i},FVe=function(e,r,n){for(var i=e.slice(0),a=1;a<n;a++)e=BVe(e,i,r);return e},zVe=function(e,r,n){for(var i=new Array(r*r),a=0;a<r*r;a++)i[a]=Math.pow(e[a],n);return n0e(i,r),i},$Ve=function(e,r,n,i){for(var a=0;a<n;a++){var s=Math.round(e[a]*Math.pow(10,i))/Math.pow(10,i),o=Math.round(r[a]*Math.pow(10,i))/Math.pow(10,i);if(s!==o)return!1}return!0},GVe=function(e,r,n,i){for(var a=[],s=0;s<r;s++){for(var o=[],l=0;l<r;l++)Math.round(e[s*r+l]*1e3)/1e3>0&&o.push(n[l]);o.length!==0&&a.push(i.collection(o))}return a},UVe=function(e,r){for(var n=0;n<e.length;n++)if(!r[n]||e[n].id()!==r[n].id())return!1;return!0},VVe=function(e){for(var r=0;r<e.length;r++)for(var n=0;n<e.length;n++)r!=n&&UVe(e[r],e[n])&&e.splice(n,1);return e},_fe=function(e){for(var r=this.nodes(),n=this.edges(),i=this.cy(),a=DVe(e),s={},o=0;o<r.length;o++)s[r[o].id()]=o;for(var l=r.length,u=l*l,h=new Array(u),f,d=0;d<u;d++)h[d]=0;for(var p=0;p<n.length;p++){var g=n[p],m=s[g.source().id()],x=s[g.target().id()],y=OVe(g,a.attributes);h[m*l+x]+=y,h[x*l+m]+=y}PVe(h,l,a.multFactor),n0e(h,l);for(var b=!0,w=0;b&&w<a.maxIterations;)b=!1,f=FVe(h,l,a.expandFactor),h=zVe(f,l,a.inflateFactor),$Ve(h,f,u,4)||(b=!0),w++;var _=GVe(h,l,r,i);return _=VVe(_),_},WVe={markovClustering:_fe,mcl:_fe},HVe=function(e){return e},i0e=function(e,r){return Math.abs(r-e)},Lfe=function(e,r,n){return e+i0e(r,n)},Rfe=function(e,r,n){return e+Math.pow(n-r,2)},qVe=function(e){return Math.sqrt(e)},YVe=function(e,r,n){return Math.max(e,i0e(r,n))},Q2=function(e,r,n,i,a){for(var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:HVe,o=i,l,u,h=0;h<e;h++)l=r(h),u=n(h),o=a(o,l,u);return s(o)},Bm={euclidean:function(e,r,n){return e>=2?Q2(e,r,n,0,Rfe,qVe):Q2(e,r,n,0,Lfe)},squaredEuclidean:function(e,r,n){return Q2(e,r,n,0,Rfe)},manhattan:function(e,r,n){return Q2(e,r,n,0,Lfe)},max:function(e,r,n){return Q2(e,r,n,-1/0,YVe)}};Bm["squared-euclidean"]=Bm.squaredEuclidean;Bm.squaredeuclidean=Bm.squaredEuclidean;XVe=da({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),DD=function(e){return XVe(e)},L6=function(e,r,n,i,a){var s=a!=="kMedoids",o=s?function(f){return n[f]}:function(f){return i[f](n)},l=function(d){return i[d](r)},u=n,h=r;return $6(e,i.length,o,l,u,h)},JM=function(e,r,n){for(var i=n.length,a=new Array(i),s=new Array(i),o=new Array(r),l=null,u=0;u<i;u++)a[u]=e.min(n[u]).value,s[u]=e.max(n[u]).value;for(var h=0;h<r;h++){l=[];for(var f=0;f<i;f++)l[f]=Math.random()*(s[f]-a[f])+a[f];o[h]=l}return o},a0e=function(e,r,n,i,a){for(var s=1/0,o=0,l=0;l<r.length;l++){var u=L6(n,e,r[l],i,a);u<s&&(s=u,o=l)}return o},s0e=function(e,r,n){for(var i=[],a=null,s=0;s<r.length;s++)a=r[s],n[a.id()]===e&&i.push(a);return i},jVe=function(e,r,n){return Math.abs(r-e)<=n},KVe=function(e,r,n){for(var i=0;i<e.length;i++)for(var a=0;a<e[i].length;a++){var s=Math.abs(e[i][a]-r[i][a]);if(s>n)return!1}return!0},ZVe=function(e,r,n){for(var i=0;i<n;i++)if(e===r[i])return!0;return!1},Nfe=function(e,r){var n=new Array(r);if(e.length<50)for(var i=0;i<r;i++){for(var a=e[Math.floor(Math.random()*e.length)];ZVe(a,n,i);)a=e[Math.floor(Math.random()*e.length)];n[i]=a}else for(var s=0;s<r;s++)n[s]=e[Math.floor(Math.random()*e.length)];return n},Ife=function(e,r,n){for(var i=0,a=0;a<r.length;a++)i+=L6("manhattan",r[a],e,n,"kMedoids");return i},QVe=function(e){var r=this.cy(),n=this.nodes(),i=null,a=DD(e),s=new Array(a.k),o={},l;a.testMode?typeof a.testCentroids=="number"?(a.testCentroids,l=JM(n,a.k,a.attributes)):Mi(a.testCentroids)==="object"?l=a.testCentroids:l=JM(n,a.k,a.attributes):l=JM(n,a.k,a.attributes);for(var u=!0,h=0;u&&h<a.maxIterations;){for(var f=0;f<n.length;f++)i=n[f],o[i.id()]=a0e(i,l,a.distance,a.attributes,"kMeans");u=!1;for(var d=0;d<a.k;d++){var p=s0e(d,n,o);if(p.length!==0){for(var g=a.attributes.length,m=l[d],x=new Array(g),y=new Array(g),b=0;b<g;b++){y[b]=0;for(var w=0;w<p.length;w++)i=p[w],y[b]+=a.attributes[b](i);x[b]=y[b]/p.length,jVe(x[b],m[b],a.sensitivityThreshold)||(u=!0)}l[d]=x,s[d]=r.collection(p)}}h++}return s},JVe=function(e){var r=this.cy(),n=this.nodes(),i=null,a=DD(e),s=new Array(a.k),o,l={},u,h=new Array(a.k);a.testMode?typeof a.testCentroids=="number"||(Mi(a.testCentroids)==="object"?o=a.testCentroids:o=Nfe(n,a.k)):o=Nfe(n,a.k);for(var f=!0,d=0;f&&d<a.maxIterations;){for(var p=0;p<n.length;p++)i=n[p],l[i.id()]=a0e(i,o,a.distance,a.attributes,"kMedoids");f=!1;for(var g=0;g<o.length;g++){var m=s0e(g,n,l);if(m.length!==0){h[g]=Ife(o[g],m,a.attributes);for(var x=0;x<m.length;x++)u=Ife(m[x],m,a.attributes),u<h[g]&&(h[g]=u,o[g]=m[x],f=!0);s[g]=r.collection(m)}}d++}return s},eWe=function(e,r,n,i,a){for(var s,o,l=0;l<r.length;l++)for(var u=0;u<e.length;u++)i[l][u]=Math.pow(n[l][u],a.m);for(var h=0;h<e.length;h++)for(var f=0;f<a.attributes.length;f++){s=0,o=0;for(var d=0;d<r.length;d++)s+=i[d][h]*a.attributes[f](r[d]),o+=i[d][h];e[h][f]=s/o}},tWe=function(e,r,n,i,a){for(var s=0;s<e.length;s++)r[s]=e[s].slice();for(var o,l,u,h=2/(a.m-1),f=0;f<n.length;f++)for(var d=0;d<i.length;d++){o=0;for(var p=0;p<n.length;p++)l=L6(a.distance,i[d],n[f],a.attributes,"cmeans"),u=L6(a.distance,i[d],n[p],a.attributes,"cmeans"),o+=Math.pow(l/u,h);e[d][f]=1/o}},rWe=function(e,r,n,i){for(var a=new Array(n.k),s=0;s<a.length;s++)a[s]=[];for(var o,l,u=0;u<r.length;u++){o=-1/0,l=-1;for(var h=0;h<r[0].length;h++)r[u][h]>o&&(o=r[u][h],l=h);a[l].push(e[u])}for(var f=0;f<a.length;f++)a[f]=i.collection(a[f]);return a},Mfe=function(e){var r=this.cy(),n=this.nodes(),i=DD(e),a,s,o,l,u;l=new Array(n.length);for(var h=0;h<n.length;h++)l[h]=new Array(i.k);o=new Array(n.length);for(var f=0;f<n.length;f++)o[f]=new Array(i.k);for(var d=0;d<n.length;d++){for(var p=0,g=0;g<i.k;g++)o[d][g]=Math.random(),p+=o[d][g];for(var m=0;m<i.k;m++)o[d][m]=o[d][m]/p}s=new Array(i.k);for(var x=0;x<i.k;x++)s[x]=new Array(i.attributes.length);u=new Array(n.length);for(var y=0;y<n.length;y++)u[y]=new Array(i.k);for(var b=!0,w=0;b&&w<i.maxIterations;)b=!1,eWe(s,n,o,u,i),tWe(o,l,s,n,i),KVe(o,l,i.sensitivityThreshold)||(b=!0),w++;return a=rWe(n,o,i,r),{clusters:a,degreeOfMembership:o}},nWe={kMeans:QVe,kMedoids:JVe,fuzzyCMeans:Mfe,fcm:Mfe},iWe=da({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),aWe={single:"min",complete:"max"},sWe=function(e){var r=iWe(e),n=aWe[r.linkage];return n!=null&&(r.linkage=n),r},Dfe=function(e,r,n,i,a){for(var s=0,o=1/0,l,u=a.attributes,h=function(C,M){return $6(a.distance,u.length,function(R){return u[R](C)},function(R){return u[R](M)},C,M)},f=0;f<e.length;f++){var d=e[f].key,p=n[d][i[d]];p<o&&(s=d,o=p)}if(a.mode==="threshold"&&o>=a.threshold||a.mode==="dendrogram"&&e.length===1)return!1;var g=r[s],m=r[i[s]],x;a.mode==="dendrogram"?x={left:g,right:m,key:g.key}:x={value:g.value.concat(m.value),key:g.key},e[g.index]=x,e.splice(m.index,1),r[g.key]=x;for(var y=0;y<e.length;y++){var b=e[y];g.key===b.key?l=1/0:a.linkage==="min"?(l=n[g.key][b.key],n[g.key][b.key]>n[m.key][b.key]&&(l=n[m.key][b.key])):a.linkage==="max"?(l=n[g.key][b.key],n[g.key][b.key]<n[m.key][b.key]&&(l=n[m.key][b.key])):a.linkage==="mean"?l=(n[g.key][b.key]*g.size+n[m.key][b.key]*m.size)/(g.size+m.size):a.mode==="dendrogram"?l=h(b.value,g.value):l=h(b.value[0],g.value[0]),n[g.key][b.key]=n[b.key][g.key]=l}for(var w=0;w<e.length;w++){var _=e[w].key;if(i[_]===g.key||i[_]===m.key){for(var k=_,E=0;E<e.length;E++){var L=e[E].key;n[_][L]<n[_][k]&&(k=L)}i[_]=k}e[w].index=w}return g.key=m.key=g.index=m.index=null,!0},s6=function t(e,r,n){e&&(e.value?r.push(e.value):(e.left&&t(e.left,r),e.right&&t(e.right,r)))},oWe=function t(e,r){if(!e)return"";if(e.left&&e.right){var n=t(e.left,r),i=t(e.right,r),a=r.add({group:"nodes",data:{id:n+","+i}});return r.add({group:"edges",data:{source:n,target:a.id()}}),r.add({group:"edges",data:{source:i,target:a.id()}}),a.id()}else if(e.value)return e.value.id()},lWe=function t(e,r,n){if(!e)return[];var i=[],a=[],s=[];return r===0?(e.left&&s6(e.left,i),e.right&&s6(e.right,a),s=i.concat(a),[n.collection(s)]):r===1?e.value?[n.collection(e.value)]:(e.left&&s6(e.left,i),e.right&&s6(e.right,a),[n.collection(i),n.collection(a)]):e.value?[n.collection(e.value)]:(e.left&&(i=t(e.left,r-1,n)),e.right&&(a=t(e.right,r-1,n)),i.concat(a))},Ofe=function(e){for(var r=this.cy(),n=this.nodes(),i=sWe(e),a=i.attributes,s=function(w,_){return $6(i.distance,a.length,function(k){return a[k](w)},function(k){return a[k](_)},w,_)},o=[],l=[],u=[],h=[],f=0;f<n.length;f++){var d={value:i.mode==="dendrogram"?n[f]:[n[f]],key:f,index:f};o[f]=d,h[f]=d,l[f]=[],u[f]=0}for(var p=0;p<o.length;p++)for(var g=0;g<=p;g++){var m=void 0;i.mode==="dendrogram"?m=p===g?1/0:s(o[p].value,o[g].value):m=p===g?1/0:s(o[p].value[0],o[g].value[0]),l[p][g]=m,l[g][p]=m,m<l[p][u[p]]&&(u[p]=g)}for(var x=Dfe(o,h,l,u,i);x;)x=Dfe(o,h,l,u,i);var y;return i.mode==="dendrogram"?(y=lWe(o[0],i.dendrogramDepth,r),i.addDendrogram&&oWe(o[0],r)):(y=new Array(o.length),o.forEach(function(b,w){b.key=b.index=null,y[w]=r.collection(b.value)})),y},cWe={hierarchicalClustering:Ofe,hca:Ofe},uWe=da({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),hWe=function(e){var r=e.damping,n=e.preference;.5<=r&&r<1||ri("Damping must range on [0.5, 1). Got: ".concat(r));var i=["median","mean","min","max"];return i.some(function(a){return a===n})||pt(n)||ri("Preference must be one of [".concat(i.map(function(a){return"\'".concat(a,"\'")}).join(", "),"] or a number. Got: ").concat(n)),uWe(e)},fWe=function(e,r,n,i){var a=function(o,l){return i[l](o)};return-$6(e,i.length,function(s){return a(r,s)},function(s){return a(n,s)},r,n)},dWe=function(e,r){var n=null;return r==="median"?n=hVe(e):r==="mean"?n=uVe(e):r==="min"?n=lVe(e):r==="max"?n=cVe(e):n=r,n},pWe=function(e,r,n){for(var i=[],a=0;a<e;a++)r[a*e+a]+n[a*e+a]>0&&i.push(a);return i},Pfe=function(e,r,n){for(var i=[],a=0;a<e;a++){for(var s=-1,o=-1/0,l=0;l<n.length;l++){var u=n[l];r[a*e+u]>o&&(s=u,o=r[a*e+u])}s>0&&i.push(s)}for(var h=0;h<n.length;h++)i[n[h]]=n[h];return i},gWe=function(e,r,n){for(var i=Pfe(e,r,n),a=0;a<n.length;a++){for(var s=[],o=0;o<i.length;o++)i[o]===n[a]&&s.push(o);for(var l=-1,u=-1/0,h=0;h<s.length;h++){for(var f=0,d=0;d<s.length;d++)f+=r[s[d]*e+s[h]];f>u&&(l=h,u=f)}n[a]=s[l]}return i=Pfe(e,r,n),i},Bfe=function(e){for(var r=this.cy(),n=this.nodes(),i=hWe(e),a={},s=0;s<n.length;s++)a[n[s].id()]=s;var o,l,u,h,f,d;o=n.length,l=o*o,u=new Array(l);for(var p=0;p<l;p++)u[p]=-1/0;for(var g=0;g<o;g++)for(var m=0;m<o;m++)g!==m&&(u[g*o+m]=fWe(i.distance,n[g],n[m],i.attributes));h=dWe(u,i.preference);for(var x=0;x<o;x++)u[x*o+x]=h;f=new Array(l);for(var y=0;y<l;y++)f[y]=0;d=new Array(l);for(var b=0;b<l;b++)d[b]=0;for(var w=new Array(o),_=new Array(o),k=new Array(o),E=0;E<o;E++)w[E]=0,_[E]=0,k[E]=0;for(var L=new Array(o*i.minIterations),S=0;S<L.length;S++)L[S]=0;var C;for(C=0;C<i.maxIterations;C++){for(var M=0;M<o;M++){for(var R=-1/0,T=-1/0,I=-1,A=0,D=0;D<o;D++)w[D]=f[M*o+D],A=d[M*o+D]+u[M*o+D],A>=R?(T=R,R=A,I=D):A>T&&(T=A);for(var N=0;N<o;N++)f[M*o+N]=(1-i.damping)*(u[M*o+N]-R)+i.damping*w[N];f[M*o+I]=(1-i.damping)*(u[M*o+I]-T)+i.damping*w[I]}for(var O=0;O<o;O++){for(var B=0,P=0;P<o;P++)w[P]=d[P*o+O],_[P]=Math.max(0,f[P*o+O]),B+=_[P];B-=_[O],_[O]=f[O*o+O],B+=_[O];for(var $=0;$<o;$++)d[$*o+O]=(1-i.damping)*Math.min(0,B-_[$])+i.damping*w[$];d[O*o+O]=(1-i.damping)*(B-_[O])+i.damping*w[O]}for(var z=0,H=0;H<o;H++){var Z=d[H*o+H]+f[H*o+H]>0?1:0;L[C%i.minIterations*o+H]=Z,z+=Z}if(z>0&&(C>=i.minIterations-1||C==i.maxIterations-1)){for(var X=0,ie=0;ie<o;ie++){k[ie]=0;for(var K=0;K<i.minIterations;K++)k[ie]+=L[K*o+ie];(k[ie]===0||k[ie]===i.minIterations)&&X++}if(X===o)break}}for(var ee=pWe(o,f,d),J=gWe(o,u,ee),W={},Y=0;Y<ee.length;Y++)W[ee[Y]]=[];for(var Q=0;Q<n.length;Q++){var se=a[n[Q].id()],ue=J[se];ue!=null&&W[ue].push(n[Q])}for(var ce=new Array(ee.length),te=0;te<ee.length;te++)ce[te]=r.collection(W[ee[te]]);return ce},mWe={affinityPropagation:Bfe,ap:Bfe},vWe=da({root:void 0,directed:!1}),yWe={hierholzer:function(e){if(!Mr(e)){var r=arguments;e={root:r[0],directed:r[1]}}var n=vWe(e),i=n.root,a=n.directed,s=this,o=!1,l,u,h;i&&(h=qt(i)?this.filter(i)[0].id():i[0].id());var f={},d={};a?s.forEach(function(b){var w=b.id();if(b.isNode()){var _=b.indegree(!0),k=b.outdegree(!0),E=_-k,L=k-_;E==1?l?o=!0:l=w:L==1?u?o=!0:u=w:(L>1||E>1)&&(o=!0),f[w]=[],b.outgoers().forEach(function(S){S.isEdge()&&f[w].push(S.id())})}else d[w]=[void 0,b.target().id()]}):s.forEach(function(b){var w=b.id();if(b.isNode()){var _=b.degree(!0);_%2&&(l?u?o=!0:u=w:l=w),f[w]=[],b.connectedEdges().forEach(function(k){return f[w].push(k.id())})}else d[w]=[b.source().id(),b.target().id()]});var p={found:!1,trail:void 0};if(o)return p;if(u&&l)if(a){if(h&&u!=h)return p;h=u}else{if(h&&u!=h&&l!=h)return p;h||(h=u)}else h||(h=s[0].id());var g=function(w){for(var _=w,k=[w],E,L,S;f[_].length;)E=f[_].shift(),L=d[E][0],S=d[E][1],_!=S?(f[S]=f[S].filter(function(C){return C!=E}),_=S):!a&&_!=L&&(f[L]=f[L].filter(function(C){return C!=E}),_=L),k.unshift(E),k.unshift(_);return k},m=[],x=[];for(x=g(h);x.length!=1;)f[x[0]].length==0?(m.unshift(s.getElementById(x.shift())),m.unshift(s.getElementById(x.shift()))):x=g(x.shift()).concat(x);m.unshift(s.getElementById(x.shift()));for(var y in f)if(f[y].length)return p;return p.found=!0,p.trail=this.spawn(m,!0),p}},o6=function(){var e=this,r={},n=0,i=0,a=[],s=[],o={},l=function(d,p){for(var g=s.length-1,m=[],x=e.spawn();s[g].x!=d||s[g].y!=p;)m.push(s.pop().edge),g--;m.push(s.pop().edge),m.forEach(function(y){var b=y.connectedNodes().intersection(e);x.merge(y),b.forEach(function(w){var _=w.id(),k=w.connectedEdges().intersection(e);x.merge(w),r[_].cutVertex?x.merge(k.filter(function(E){return E.isLoop()})):x.merge(k)})}),a.push(x)},u=function f(d,p,g){d===g&&(i+=1),r[p]={id:n,low:n++,cutVertex:!1};var m=e.getElementById(p).connectedEdges().intersection(e);if(m.size()===0)a.push(e.spawn(e.getElementById(p)));else{var x,y,b,w;m.forEach(function(_){x=_.source().id(),y=_.target().id(),b=x===p?y:x,b!==g&&(w=_.id(),o[w]||(o[w]=!0,s.push({x:p,y:b,edge:_})),b in r?r[p].low=Math.min(r[p].low,r[b].id):(f(d,b,p),r[p].low=Math.min(r[p].low,r[b].low),r[p].id<=r[b].low&&(r[p].cutVertex=!0,l(p,b))))})}};e.forEach(function(f){if(f.isNode()){var d=f.id();d in r||(i=0,u(d,d),r[d].cutVertex=i>1)}});var h=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(h),components:a}},xWe={hopcroftTarjanBiconnected:o6,htbc:o6,htb:o6,hopcroftTarjanBiconnectedComponents:o6},l6=function(){var e=this,r={},n=0,i=[],a=[],s=e.spawn(e),o=function l(u){a.push(u),r[u]={index:n,low:n++,explored:!1};var h=e.getElementById(u).connectedEdges().intersection(e);if(h.forEach(function(m){var x=m.target().id();x!==u&&(x in r||l(x),r[x].explored||(r[u].low=Math.min(r[u].low,r[x].low)))}),r[u].index===r[u].low){for(var f=e.spawn();;){var d=a.pop();if(f.merge(e.getElementById(d)),r[d].low=r[u].index,r[d].explored=!0,d===u)break}var p=f.edgesWith(f),g=f.merge(p);i.push(g),s=s.difference(g)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:i}},bWe={tarjanStronglyConnected:l6,tsc:l6,tscc:l6,tarjanStronglyConnectedComponents:l6},o0e={};[fx,KUe,ZUe,JUe,tVe,nVe,sVe,NVe,Im,Mm,uD,WVe,nWe,cWe,mWe,yWe,xWe,bWe].forEach(function(t){Zt(o0e,t)});l0e=0,c0e=1,u0e=2,Wu=function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=l0e,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Wu.prototype={fulfill:function(e){return Ffe(this,c0e,"fulfillValue",e)},reject:function(e){return Ffe(this,u0e,"rejectReason",e)},then:function(e,r){var n=this,i=new Wu;return n.onFulfilled.push($fe(e,i,"fulfill")),n.onRejected.push($fe(r,i,"reject")),h0e(n),i.proxy}};Ffe=function(e,r,n,i){return e.state===l0e&&(e.state=r,e[n]=i,h0e(e)),e},h0e=function(e){e.state===c0e?zfe(e,"onFulfilled",e.fulfillValue):e.state===u0e&&zfe(e,"onRejected",e.rejectReason)},zfe=function(e,r,n){if(e[r].length!==0){var i=e[r];e[r]=[];var a=function(){for(var o=0;o<i.length;o++)i[o](n)};typeof setImmediate=="function"?setImmediate(a):setTimeout(a,0)}},$fe=function(e,r,n){return function(i){if(typeof e!="function")r[n].call(r,i);else{var a;try{a=e(i)}catch(s){r.reject(s);return}wWe(r,a)}}},wWe=function t(e,r){if(e===r||e.proxy===r){e.reject(new TypeError("cannot resolve promise with itself"));return}var n;if(Mi(r)==="object"&&r!==null||typeof r=="function")try{n=r.then}catch(a){e.reject(a);return}if(typeof n=="function"){var i=!1;try{n.call(r,function(a){i||(i=!0,a===r?e.reject(new TypeError("circular thenable chain")):t(e,a))},function(a){i||(i=!0,e.reject(a))})}catch(a){i||e.reject(a)}return}e.fulfill(r)};Wu.all=function(t){return new Wu(function(e,r){for(var n=new Array(t.length),i=0,a=function(l,u){n[l]=u,i++,i===t.length&&e(n)},s=0;s<t.length;s++)(function(o){var l=t[o],u=l!=null&&l.then!=null;if(u)l.then(function(f){a(o,f)},function(f){r(f)});else{var h=l;a(o,h)}})(s)})};Wu.resolve=function(t){return new Wu(function(e,r){e(t)})};Wu.reject=function(t){return new Wu(function(e,r){r(t)})};$m=typeof Promise<"u"?Promise:Wu,hD=function(e,r,n){var i=CD(e),a=!i,s=this._private=Zt({duration:1e3},r,n);if(s.target=e,s.style=s.style||s.css,s.started=!1,s.playing=!1,s.hooked=!1,s.applying=!1,s.progress=0,s.completes=[],s.frames=[],s.complete&&Xn(s.complete)&&s.completes.push(s.complete),a){var o=e.position();s.startPosition=s.startPosition||{x:o.x,y:o.y},s.startStyle=s.startStyle||e.cy().style().getAnimationStartStyle(e,s.style)}if(i){var l=e.pan();s.startPan={x:l.x,y:l.y},s.startZoom=e.zoom()}this.length=1,this[0]=this},C0=hD.prototype;Zt(C0,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var r,n=e.target._private.animation;e.queue?r=n.queue:r=n.current,r.push(this),to(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var r=this._private;return e===void 0?r.progress*r.duration:this.progress(e/r.duration)},progress:function(e){var r=this._private,n=r.playing;return e===void 0?r.progress:(n&&this.pause(),r.progress=e,r.started=!1,n&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var e=this._private,r=e.playing;r&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(u,h){var f=e[u];f!=null&&(e[u]=e[h],e[h]=f)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var i=0;i<e.style.length;i++){var a=e.style[i],s=a.name,o=e.startStyle[s];e.startStyle[s]=a,e.style[i]=o}return r&&this.play(),this},promise:function(e){var r=this._private,n;switch(e){case"frame":n=r.frames;break;default:case"complete":case"completed":n=r.completes}return new $m(function(i,a){n.push(function(){i()})})}});C0.complete=C0.completed;C0.run=C0.play;C0.running=C0.playing;kWe={animated:function(){return function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return!1;var s=i[0];if(s)return s._private.animation.current.length>0}},clearQueue:function(){return function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var s=0;s<i.length;s++){var o=i[s];o._private.animation.queue=[]}return this}},delay:function(){return function(r,n){var i=this._private.cy||this;return i.styleEnabled()?this.animate({delay:r,duration:r,complete:n}):this}},delayAnimation:function(){return function(r,n){var i=this._private.cy||this;return i.styleEnabled()?this.animation({delay:r,duration:r,complete:n}):this}},animation:function(){return function(r,n){var i=this,a=i.length!==void 0,s=a?i:[i],o=this._private.cy||this,l=!a,u=!l;if(!o.styleEnabled())return this;var h=o.style();r=Zt({},r,n);var f=Object.keys(r).length===0;if(f)return new hD(s[0],r);switch(r.duration===void 0&&(r.duration=400),r.duration){case"slow":r.duration=600;break;case"fast":r.duration=200;break}if(u&&(r.style=h.getPropsList(r.style||r.css),r.css=void 0),u&&r.renderedPosition!=null){var d=r.renderedPosition,p=o.pan(),g=o.zoom();r.position=Kde(d,g,p)}if(l&&r.panBy!=null){var m=r.panBy,x=o.pan();r.pan={x:x.x+m.x,y:x.y+m.y}}var y=r.center||r.centre;if(l&&y!=null){var b=o.getCenterPan(y.eles,r.zoom);b!=null&&(r.pan=b)}if(l&&r.fit!=null){var w=r.fit,_=o.getFitViewport(w.eles||w.boundingBox,w.padding);_!=null&&(r.pan=_.pan,r.zoom=_.zoom)}if(l&&Mr(r.zoom)){var k=o.getZoomedViewport(r.zoom);k!=null?(k.zoomed&&(r.zoom=k.zoom),k.panned&&(r.pan=k.pan)):r.zoom=null}return new hD(s[0],r)}},animate:function(){return function(r,n){var i=this,a=i.length!==void 0,s=a?i:[i],o=this._private.cy||this;if(!o.styleEnabled())return this;n&&(r=Zt({},r,n));for(var l=0;l<s.length;l++){var u=s[l],h=u.animated()&&(r.queue===void 0||r.queue),f=u.animation(r,h?{queue:!0}:void 0);f.play()}return this}},stop:function(){return function(r,n){var i=this,a=i.length!==void 0,s=a?i:[i],o=this._private.cy||this;if(!o.styleEnabled())return this;for(var l=0;l<s.length;l++){for(var u=s[l],h=u._private,f=h.animation.current,d=0;d<f.length;d++){var p=f[d],g=p._private;n&&(g.duration=0)}r&&(h.animation.queue=[]),n||(h.animation.current=[])}return o.notify("draw"),this}}},TWe=Array.isArray,G6=TWe,EWe=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,SWe=/^\\w*$/;AWe=CWe,_We="[object AsyncFunction]",LWe="[object Function]",RWe="[object GeneratorFunction]",NWe="[object Proxy]";MWe=IWe,DWe=P6["__core-js_shared__"],eD=DWe,Gfe=function(){var t=/[^.]+$/.exec(eD&&eD.keys&&eD.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();PWe=OWe,BWe=Function.prototype,FWe=BWe.toString;$We=zWe,GWe=/[\\\\^$.*+?()[\\]{}|]/g,UWe=/^\\[object .+?Constructor\\]$/,VWe=Function.prototype,WWe=Object.prototype,HWe=VWe.toString,qWe=WWe.hasOwnProperty,YWe=RegExp("^"+HWe.call(qWe).replace(GWe,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");jWe=XWe;ZWe=KWe;OD=QWe,JWe=OD(Object,"create"),gx=JWe;tHe=eHe;nHe=rHe,iHe="__lodash_hash_undefined__",aHe=Object.prototype,sHe=aHe.hasOwnProperty;lHe=oHe,cHe=Object.prototype,uHe=cHe.hasOwnProperty;fHe=hHe,dHe="__lodash_hash_undefined__";gHe=pHe;Gm.prototype.clear=tHe;Gm.prototype.delete=nHe;Gm.prototype.get=lHe;Gm.prototype.has=fHe;Gm.prototype.set=gHe;Ufe=Gm;vHe=mHe;f0e=yHe;U6=xHe,bHe=Array.prototype,wHe=bHe.splice;THe=kHe;SHe=EHe;AHe=CHe;LHe=_He;Um.prototype.clear=vHe;Um.prototype.delete=THe;Um.prototype.get=SHe;Um.prototype.has=AHe;Um.prototype.set=LHe;RHe=Um,NHe=OD(P6,"Map"),IHe=NHe;DHe=MHe;PHe=OHe;V6=BHe;zHe=FHe;GHe=$He;VHe=UHe;HHe=WHe;Vm.prototype.clear=DHe;Vm.prototype.delete=zHe;Vm.prototype.get=GHe;Vm.prototype.has=VHe;Vm.prototype.set=HHe;d0e=Vm,qHe="Expected a function";PD.Cache=d0e;YHe=PD,XHe=500;KHe=jHe,ZHe=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,QHe=/\\\\(\\\\)?/g,JHe=KHe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ZHe,function(r,n,i,a){e.push(i?a.replace(QHe,"$1"):n||r)}),e}),p0e=JHe;g0e=eqe,tqe=1/0,Vfe=Om?Om.prototype:void 0,Wfe=Vfe?Vfe.toString:void 0;rqe=m0e;v0e=nqe;y0e=iqe,aqe=1/0;BD=sqe;lqe=oqe;uqe=cqe,hqe=function(){try{var t=OD(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Hfe=hqe;dqe=fqe,pqe=Object.prototype,gqe=pqe.hasOwnProperty;vqe=mqe,yqe=9007199254740991,xqe=/^(?:0|[1-9]\\d*)$/;wqe=bqe;Tqe=kqe;Sqe=Eqe;Aqe=Cqe;Lqe=_qe,Rqe={data:function(e){var r={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(i){},beforeSet:function(i,a){},onSet:function(i){},canSet:function(i){return!0}};return e=Zt({},r,e),function(i,a){var s=e,o=this,l=o.length!==void 0,u=l?o:[o],h=l?o[0]:o;if(qt(i)){var f=i.indexOf(".")!==-1,d=f&&Lqe(i);if(s.allowGetting&&a===void 0){var p;return h&&(s.beforeGet(h),d&&h._private[s.field][i]===void 0?p=uqe(h._private[s.field],d):p=h._private[s.field][i]),p}else if(s.allowSetting&&a!==void 0){var g=!s.immutableKeys[i];if(g){var m=Rde({},i,a);s.beforeSet(o,m);for(var x=0,y=u.length;x<y;x++){var b=u[x];s.canSet(b)&&(d&&h._private[s.field][i]===void 0?Sqe(b._private[s.field],d,a):b._private[s.field][i]=a)}s.updateStyle&&o.updateStyle(),s.onSet(o),s.settingTriggersEvent&&o[s.triggerFnName](s.settingEvent)}}}else if(s.allowSetting&&Mr(i)){var w=i,_,k,E=Object.keys(w);s.beforeSet(o,w);for(var L=0;L<E.length;L++){_=E[L],k=w[_];var S=!s.immutableKeys[_];if(S)for(var C=0;C<u.length;C++){var M=u[C];s.canSet(M)&&(M._private[s.field][_]=k)}}s.updateStyle&&o.updateStyle(),s.onSet(o),s.settingTriggersEvent&&o[s.triggerFnName](s.settingEvent)}else if(s.allowBinding&&Xn(i)){var R=i;o.on(s.bindingEvent,R)}else if(s.allowGetting&&i===void 0){var T;return h&&(s.beforeGet(h),T=h._private[s.field]),T}return o}},removeData:function(e){var r={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=Zt({},r,e),function(i){var a=e,s=this,o=s.length!==void 0,l=o?s:[s];if(qt(i)){for(var u=i.split(/\\s+/),h=u.length,f=0;f<h;f++){var d=u[f];if(!uf(d)){var p=!a.immutableKeys[d];if(p)for(var g=0,m=l.length;g<m;g++)l[g]._private[a.field][d]=void 0}}a.triggerEvent&&s[a.triggerFnName](a.event)}else if(i===void 0){for(var x=0,y=l.length;x<y;x++)for(var b=l[x]._private[a.field],w=Object.keys(b),_=0;_<w.length;_++){var k=w[_],E=!a.immutableKeys[k];E&&(b[k]=void 0)}a.triggerEvent&&s[a.triggerFnName](a.event)}return s}}},Nqe={eventAliasesOn:function(e){var r=e;r.addListener=r.listen=r.bind=r.on,r.unlisten=r.unbind=r.off=r.removeListener,r.trigger=r.emit,r.pon=r.promiseOn=function(n,i){var a=this,s=Array.prototype.slice.call(arguments,0);return new $m(function(o,l){var u=function(p){a.off.apply(a,f),o(p)},h=s.concat([u]),f=h.concat([]);a.on.apply(a,h)})}}},Zr={};[kWe,Rqe,Nqe].forEach(function(t){Zt(Zr,t)});Iqe={animate:Zr.animate(),animation:Zr.animation(),animated:Zr.animated(),clearQueue:Zr.clearQueue(),delay:Zr.delay(),delayAnimation:Zr.delayAnimation(),stop:Zr.stop()},v6={classes:function(e){var r=this;if(e===void 0){var n=[];return r[0]._private.classes.forEach(function(g){return n.push(g)}),n}else gn(e)||(e=(e||"").match(/\\S+/g)||[]);for(var i=[],a=new zm(e),s=0;s<r.length;s++){for(var o=r[s],l=o._private,u=l.classes,h=!1,f=0;f<e.length;f++){var d=e[f],p=u.has(d);if(!p){h=!0;break}}h||(h=u.size!==e.length),h&&(l.classes=a,i.push(o))}return i.length>0&&this.spawn(i).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){gn(e)||(e=e.match(/\\S+/g)||[]);for(var n=this,i=r===void 0,a=[],s=0,o=n.length;s<o;s++)for(var l=n[s],u=l._private.classes,h=!1,f=0;f<e.length;f++){var d=e[f],p=u.has(d),g=!1;r||i&&!p?(u.add(d),g=!0):(!r||i&&p)&&(u.delete(d),g=!0),!h&&g&&(a.push(l),h=!0)}return a.length>0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},r),n}};v6.className=v6.classNames=v6.classes;Ir={metaChar:"[\\\\!\\\\\\"\\\\#\\\\$\\\\%\\\\&\\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\.\\\\/\\\\:\\\\;\\\\<\\\\=\\\\>\\\\?\\\\@\\\\[\\\\]\\\\^\\\\`\\\\{\\\\|\\\\}\\\\~]",comparatorOp:"=|\\\\!=|>|>=|<|<=|\\\\$=|\\\\^=|\\\\*=",boolOp:"\\\\?|\\\\!|\\\\^",string:`"(?:\\\\\\\\"|[^"])*"|\'(?:\\\\\\\\\'|[^\'])*\'`,number:Ii,meta:"degree|indegree|outdegree",separator:"\\\\s*,\\\\s*",descendant:"\\\\s+",child:"\\\\s+>\\\\s+",subject:"\\\\$",group:"node|edge|\\\\*",directedEdge:"\\\\s+->\\\\s+",undirectedEdge:"\\\\s+<->\\\\s+"};Ir.variable="(?:[\\\\w-.]|(?:\\\\\\\\"+Ir.metaChar+"))+";Ir.className="(?:[\\\\w-]|(?:\\\\\\\\"+Ir.metaChar+"))+";Ir.value=Ir.string+"|"+Ir.number;Ir.id=Ir.variable;(function(){var t,e,r;for(t=Ir.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],Ir.comparatorOp+="|@"+e;for(t=Ir.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],!(e.indexOf("!")>=0)&&e!=="="&&(Ir.comparatorOp+="|\\\\!"+e)})();on=function(){return{checks:[]}},Nt={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},fD=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return WGe(t.selector,e.selector)}),Mqe=function(){for(var t={},e,r=0;r<fD.length;r++)e=fD[r],t[e.selector]=e.matches;return t}(),Dqe=function(e,r){return Mqe[e](r)},Oqe="("+fD.map(function(t){return t.selector}).join("|")+")",Tm=function(e){return e.replace(new RegExp("\\\\\\\\("+Ir.metaChar+")","g"),function(r,n){return n})},af=function(e,r,n){e[e.length-1]=n},dD=[{name:"group",query:!0,regex:"("+Ir.group+")",populate:function(e,r,n){var i=Ll(n,1),a=i[0];r.checks.push({type:Nt.GROUP,value:a==="*"?a:a+"s"})}},{name:"state",query:!0,regex:Oqe,populate:function(e,r,n){var i=Ll(n,1),a=i[0];r.checks.push({type:Nt.STATE,value:a})}},{name:"id",query:!0,regex:"\\\\#("+Ir.id+")",populate:function(e,r,n){var i=Ll(n,1),a=i[0];r.checks.push({type:Nt.ID,value:Tm(a)})}},{name:"className",query:!0,regex:"\\\\.("+Ir.className+")",populate:function(e,r,n){var i=Ll(n,1),a=i[0];r.checks.push({type:Nt.CLASS,value:Tm(a)})}},{name:"dataExists",query:!0,regex:"\\\\[\\\\s*("+Ir.variable+")\\\\s*\\\\]",populate:function(e,r,n){var i=Ll(n,1),a=i[0];r.checks.push({type:Nt.DATA_EXIST,field:Tm(a)})}},{name:"dataCompare",query:!0,regex:"\\\\[\\\\s*("+Ir.variable+")\\\\s*("+Ir.comparatorOp+")\\\\s*("+Ir.value+")\\\\s*\\\\]",populate:function(e,r,n){var i=Ll(n,3),a=i[0],s=i[1],o=i[2],l=new RegExp("^"+Ir.string+"$").exec(o)!=null;l?o=o.substring(1,o.length-1):o=parseFloat(o),r.checks.push({type:Nt.DATA_COMPARE,field:Tm(a),operator:s,value:o})}},{name:"dataBool",query:!0,regex:"\\\\[\\\\s*("+Ir.boolOp+")\\\\s*("+Ir.variable+")\\\\s*\\\\]",populate:function(e,r,n){var i=Ll(n,2),a=i[0],s=i[1];r.checks.push({type:Nt.DATA_BOOL,field:Tm(s),operator:a})}},{name:"metaCompare",query:!0,regex:"\\\\[\\\\[\\\\s*("+Ir.meta+")\\\\s*("+Ir.comparatorOp+")\\\\s*("+Ir.number+")\\\\s*\\\\]\\\\]",populate:function(e,r,n){var i=Ll(n,3),a=i[0],s=i[1],o=i[2];r.checks.push({type:Nt.META_COMPARE,field:Tm(a),operator:s,value:parseFloat(o)})}},{name:"nextQuery",separator:!0,regex:Ir.separator,populate:function(e,r){var n=e.currentSubject,i=e.edgeCount,a=e.compoundCount,s=e[e.length-1];n!=null&&(s.subject=n,e.currentSubject=null),s.edgeCount=i,s.compoundCount=a,e.edgeCount=0,e.compoundCount=0;var o=e[e.length++]=on();return o}},{name:"directedEdge",separator:!0,regex:Ir.directedEdge,populate:function(e,r){if(e.currentSubject==null){var n=on(),i=r,a=on();return n.checks.push({type:Nt.DIRECTED_EDGE,source:i,target:a}),af(e,r,n),e.edgeCount++,a}else{var s=on(),o=r,l=on();return s.checks.push({type:Nt.NODE_SOURCE,source:o,target:l}),af(e,r,s),e.edgeCount++,l}}},{name:"undirectedEdge",separator:!0,regex:Ir.undirectedEdge,populate:function(e,r){if(e.currentSubject==null){var n=on(),i=r,a=on();return n.checks.push({type:Nt.UNDIRECTED_EDGE,nodes:[i,a]}),af(e,r,n),e.edgeCount++,a}else{var s=on(),o=r,l=on();return s.checks.push({type:Nt.NODE_NEIGHBOR,node:o,neighbor:l}),af(e,r,s),l}}},{name:"child",separator:!0,regex:Ir.child,populate:function(e,r){if(e.currentSubject==null){var n=on(),i=on(),a=e[e.length-1];return n.checks.push({type:Nt.CHILD,parent:a,child:i}),af(e,r,n),e.compoundCount++,i}else if(e.currentSubject===r){var s=on(),o=e[e.length-1],l=on(),u=on(),h=on(),f=on();return s.checks.push({type:Nt.COMPOUND_SPLIT,left:o,right:l,subject:u}),u.checks=r.checks,r.checks=[{type:Nt.TRUE}],f.checks.push({type:Nt.TRUE}),l.checks.push({type:Nt.PARENT,parent:f,child:h}),af(e,o,s),e.currentSubject=u,e.compoundCount++,h}else{var d=on(),p=on(),g=[{type:Nt.PARENT,parent:d,child:p}];return d.checks=r.checks,r.checks=g,e.compoundCount++,p}}},{name:"descendant",separator:!0,regex:Ir.descendant,populate:function(e,r){if(e.currentSubject==null){var n=on(),i=on(),a=e[e.length-1];return n.checks.push({type:Nt.DESCENDANT,ancestor:a,descendant:i}),af(e,r,n),e.compoundCount++,i}else if(e.currentSubject===r){var s=on(),o=e[e.length-1],l=on(),u=on(),h=on(),f=on();return s.checks.push({type:Nt.COMPOUND_SPLIT,left:o,right:l,subject:u}),u.checks=r.checks,r.checks=[{type:Nt.TRUE}],f.checks.push({type:Nt.TRUE}),l.checks.push({type:Nt.ANCESTOR,ancestor:f,descendant:h}),af(e,o,s),e.currentSubject=u,e.compoundCount++,h}else{var d=on(),p=on(),g=[{type:Nt.ANCESTOR,ancestor:d,descendant:p}];return d.checks=r.checks,r.checks=g,e.compoundCount++,p}}},{name:"subject",modifier:!0,regex:Ir.subject,populate:function(e,r){if(e.currentSubject!=null&&e.currentSubject!==r)return Qr("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=r;var n=e[e.length-1],i=n.checks[0],a=i==null?null:i.type;a===Nt.DIRECTED_EDGE?i.type=Nt.NODE_TARGET:a===Nt.UNDIRECTED_EDGE&&(i.type=Nt.NODE_NEIGHBOR,i.node=i.nodes[1],i.neighbor=i.nodes[0],i.nodes=null)}}];dD.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});Pqe=function(e){for(var r,n,i,a=0;a<dD.length;a++){var s=dD[a],o=s.name,l=e.match(s.regexObj);if(l!=null){n=l,r=s,i=o;var u=l[0];e=e.substring(u.length);break}}return{expr:r,match:n,name:i,remaining:e}},Bqe=function(e){var r=e.match(/^\\s+/);if(r){var n=r[0];e=e.substring(n.length)}return e},Fqe=function(e){var r=this,n=r.inputText=e,i=r[0]=on();for(r.length=1,n=Bqe(n);;){var a=Pqe(n);if(a.expr==null)return Qr("The selector `"+e+"`is invalid"),!1;var s=a.match.slice(1),o=a.expr.populate(r,i,s);if(o===!1)return!1;if(o!=null&&(i=o),n=a.remaining,n.match(/^\\s*$/))break}var l=r[r.length-1];r.currentSubject!=null&&(l.subject=r.currentSubject),l.edgeCount=r.edgeCount,l.compoundCount=r.compoundCount;for(var u=0;u<r.length;u++){var h=r[u];if(h.compoundCount>0&&h.edgeCount>0)return Qr("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(h.edgeCount>1)return Qr("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;h.edgeCount===1&&Qr("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},zqe=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(h){return h??""},r=function(h){return qt(h)?\'"\'+h+\'"\':e(h)},n=function(h){return" "+h+" "},i=function(h,f){var d=h.type,p=h.value;switch(d){case Nt.GROUP:{var g=e(p);return g.substring(0,g.length-1)}case Nt.DATA_COMPARE:{var m=h.field,x=h.operator;return"["+m+n(e(x))+r(p)+"]"}case Nt.DATA_BOOL:{var y=h.operator,b=h.field;return"["+e(y)+b+"]"}case Nt.DATA_EXIST:{var w=h.field;return"["+w+"]"}case Nt.META_COMPARE:{var _=h.operator,k=h.field;return"[["+k+n(e(_))+r(p)+"]]"}case Nt.STATE:return p;case Nt.ID:return"#"+p;case Nt.CLASS:return"."+p;case Nt.PARENT:case Nt.CHILD:return a(h.parent,f)+n(">")+a(h.child,f);case Nt.ANCESTOR:case Nt.DESCENDANT:return a(h.ancestor,f)+" "+a(h.descendant,f);case Nt.COMPOUND_SPLIT:{var E=a(h.left,f),L=a(h.subject,f),S=a(h.right,f);return E+(E.length>0?" ":"")+L+S}case Nt.TRUE:return""}},a=function(h,f){return h.checks.reduce(function(d,p,g){return d+(f===h&&g===0?"$":"")+i(p,f)},"")},s="",o=0;o<this.length;o++){var l=this[o];s+=a(l,l.subject),this.length>1&&o<this.length-1&&(s+=", ")}return this.toStringCache=s,s},$qe={parse:Fqe,toString:zqe},x0e=function(e,r,n){var i,a=qt(e),s=pt(e),o=qt(n),l,u,h=!1,f=!1,d=!1;switch(r.indexOf("!")>=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),h=!0),(a||o||h)&&(l=!a&&!s?"":""+e,u=""+n),h&&(e=l=l.toLowerCase(),n=u=u.toLowerCase()),r){case"*=":i=l.indexOf(u)>=0;break;case"$=":i=l.indexOf(u,l.length-u.length)>=0;break;case"^=":i=l.indexOf(u)===0;break;case"=":i=e===n;break;case">":d=!0,i=e>n;break;case">=":d=!0,i=e>=n;break;case"<":d=!0,i=e<n;break;case"<=":d=!0,i=e<=n;break;default:i=!1;break}return f&&(e!=null||!d)&&(i=!i),i},Gqe=function(e,r){switch(r){case"?":return!!e;case"!":return!e;case"^":return e===void 0}},Uqe=function(e){return e!==void 0},FD=function(e,r){return e.data(r)},Vqe=function(e,r){return e[r]()},ni=[],Nn=function(e,r){return e.checks.every(function(n){return ni[n.type](n,r)})};ni[Nt.GROUP]=function(t,e){var r=t.value;return r==="*"||r===e.group()};ni[Nt.STATE]=function(t,e){var r=t.value;return Dqe(r,e)};ni[Nt.ID]=function(t,e){var r=t.value;return e.id()===r};ni[Nt.CLASS]=function(t,e){var r=t.value;return e.hasClass(r)};ni[Nt.META_COMPARE]=function(t,e){var r=t.field,n=t.operator,i=t.value;return x0e(Vqe(e,r),n,i)};ni[Nt.DATA_COMPARE]=function(t,e){var r=t.field,n=t.operator,i=t.value;return x0e(FD(e,r),n,i)};ni[Nt.DATA_BOOL]=function(t,e){var r=t.field,n=t.operator;return Gqe(FD(e,r),n)};ni[Nt.DATA_EXIST]=function(t,e){var r=t.field;return t.operator,Uqe(FD(e,r))};ni[Nt.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],n=t.nodes[1],i=e.source(),a=e.target();return Nn(r,i)&&Nn(n,a)||Nn(n,i)&&Nn(r,a)};ni[Nt.NODE_NEIGHBOR]=function(t,e){return Nn(t.node,e)&&e.neighborhood().some(function(r){return r.isNode()&&Nn(t.neighbor,r)})};ni[Nt.DIRECTED_EDGE]=function(t,e){return Nn(t.source,e.source())&&Nn(t.target,e.target())};ni[Nt.NODE_SOURCE]=function(t,e){return Nn(t.source,e)&&e.outgoers().some(function(r){return r.isNode()&&Nn(t.target,r)})};ni[Nt.NODE_TARGET]=function(t,e){return Nn(t.target,e)&&e.incomers().some(function(r){return r.isNode()&&Nn(t.source,r)})};ni[Nt.CHILD]=function(t,e){return Nn(t.child,e)&&Nn(t.parent,e.parent())};ni[Nt.PARENT]=function(t,e){return Nn(t.parent,e)&&e.children().some(function(r){return Nn(t.child,r)})};ni[Nt.DESCENDANT]=function(t,e){return Nn(t.descendant,e)&&e.ancestors().some(function(r){return Nn(t.ancestor,r)})};ni[Nt.ANCESTOR]=function(t,e){return Nn(t.ancestor,e)&&e.descendants().some(function(r){return Nn(t.descendant,r)})};ni[Nt.COMPOUND_SPLIT]=function(t,e){return Nn(t.subject,e)&&Nn(t.left,e)&&Nn(t.right,e)};ni[Nt.TRUE]=function(){return!0};ni[Nt.COLLECTION]=function(t,e){var r=t.value;return r.has(e)};ni[Nt.FILTER]=function(t,e){var r=t.value;return r(e)};Wqe=function(e){var r=this;if(r.length===1&&r[0].checks.length===1&&r[0].checks[0].type===Nt.ID)return e.getElementById(r[0].checks[0].value).collection();var n=function(a){for(var s=0;s<r.length;s++){var o=r[s];if(Nn(o,a))return!0}return!1};return r.text()==null&&(n=function(){return!0}),e.filter(n)},Hqe=function(e){for(var r=this,n=0;n<r.length;n++){var i=r[n];if(Nn(i,e))return!0}return!1},qqe={matches:Hqe,filter:Wqe},ff=function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,e==null||qt(e)&&e.match(/^\\s*$/)||(to(e)?this.addQuery({checks:[{type:Nt.COLLECTION,value:e.collection()}]}):Xn(e)?this.addQuery({checks:[{type:Nt.FILTER,value:e}]}):qt(e)?this.parse(e)||(this.invalid=!0):ri("A selector must be created from a string; found "))},df=ff.prototype;[$qe,qqe].forEach(function(t){return Zt(df,t)});df.text=function(){return this.inputText};df.size=function(){return this.length};df.eq=function(t){return this[t]};df.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()};df.addQuery=function(t){this[this.length++]=t};df.selector=df.toString;lf={allAre:function(e){var r=new ff(e);return this.every(function(n){return r.matches(n)})},is:function(e){var r=new ff(e);return this.some(function(n){return r.matches(n)})},some:function(e,r){for(var n=0;n<this.length;n++){var i=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(i)return!0}return!1},every:function(e,r){for(var n=0;n<this.length;n++){var i=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(!i)return!1}return!0},same:function(e){if(this===e)return!0;e=this.cy().collection(e);var r=this.length,n=e.length;return r!==n?!1:r===1?this[0]===e[0]:this.every(function(i){return e.hasElementWithId(i.id())})},anySame:function(e){return e=this.cy().collection(e),this.some(function(r){return e.hasElementWithId(r.id())})},allAreNeighbors:function(e){e=this.cy().collection(e);var r=this.neighborhood();return e.every(function(n){return r.hasElementWithId(n.id())})},contains:function(e){e=this.cy().collection(e);var r=this;return e.every(function(n){return r.hasElementWithId(n.id())})}};lf.allAreNeighbours=lf.allAreNeighbors;lf.has=lf.contains;lf.equal=lf.equals=lf.same;Ho=function(e,r){return function(i,a,s,o){var l=i,u=this,h;if(l==null?h="":to(l)&&l.length===1&&(h=l.id()),u.length===1&&h){var f=u[0]._private,d=f.traversalCache=f.traversalCache||{},p=d[r]=d[r]||[],g=T0(h),m=p[g];return m||(p[g]=e.call(u,i,a,s,o))}else return e.call(u,i,a,s,o)}},Fm={parent:function(e){var r=[];if(this.length===1){var n=this[0]._private.parent;if(n)return n}for(var i=0;i<this.length;i++){var a=this[i],s=a._private.parent;s&&r.push(s)}return this.spawn(r,!0).filter(e)},parents:function(e){for(var r=[],n=this.parent();n.nonempty();){for(var i=0;i<n.length;i++){var a=n[i];r.push(a)}n=n.parent()}return this.spawn(r,!0).filter(e)},commonAncestors:function(e){for(var r,n=0;n<this.length;n++){var i=this[n],a=i.parents();r=r||a,r=r.intersect(a)}return r.filter(e)},orphans:function(e){return this.stdFilter(function(r){return r.isOrphan()}).filter(e)},nonorphans:function(e){return this.stdFilter(function(r){return r.isChild()}).filter(e)},children:Ho(function(t){for(var e=[],r=0;r<this.length;r++)for(var n=this[r],i=n._private.children,a=0;a<i.length;a++)e.push(i[a]);return this.spawn(e,!0).filter(t)},"children"),siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length!==0},isChildless:function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length===0},isChild:function(){var e=this[0];if(e)return e.isNode()&&e._private.parent!=null},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&e._private.parent==null},descendants:function(e){var r=[];function n(i){for(var a=0;a<i.length;a++){var s=i[a];r.push(s),s.children().nonempty()&&n(s.children())}}return n(this.children()),this.spawn(r,!0).filter(e)}};Fm.forEachDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return zD(this,t,e,b0e)};Fm.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return zD(this,t,e,w0e)};Fm.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return zD(this,t,e,Yqe)};Fm.ancestors=Fm.parents;mx=k0e={data:Zr.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Zr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Zr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Zr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Zr.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Zr.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};mx.attr=mx.data;mx.removeAttr=mx.removeData;Xqe=k0e,W6={};Zt(W6,{degree:tD(function(t,e){return e.source().same(e.target())?2:1}),indegree:tD(function(t,e){return e.target().same(t)?1:0}),outdegree:tD(function(t,e){return e.source().same(t)?1:0})});Zt(W6,{minDegree:Em("degree",function(t,e){return t<e}),maxDegree:Em("degree",function(t,e){return t>e}),minIndegree:Em("indegree",function(t,e){return t<e}),maxIndegree:Em("indegree",function(t,e){return t>e}),minOutdegree:Em("outdegree",function(t,e){return t<e}),maxOutdegree:Em("outdegree",function(t,e){return t>e})});Zt(W6,{totalDegree:function(e){for(var r=0,n=this.nodes(),i=0;i<n.length;i++)r+=n[i].degree(e);return r}});E0e=function(e,r,n){for(var i=0;i<e.length;i++){var a=e[i];if(!a.locked()){var s=a._private.position,o={x:r.x!=null?r.x-s.x:0,y:r.y!=null?r.y-s.y:0};a.isParent()&&!(o.x===0&&o.y===0)&&a.children().shift(o,n),a.dirtyBoundingBoxCache()}}},qfe={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},beforeSet:function(e,r){E0e(e,r,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}};Il=T0e={position:Zr.data(qfe),silentPosition:Zr.data(Zt({},qfe,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,r){E0e(e,r,!0)},onSet:function(e){e.dirtyCompoundBoundsCache()}})),positions:function(e,r){if(Mr(e))r?this.silentPosition(e):this.position(e);else if(Xn(e)){var n=e,i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var s=this[a],o=void 0;(o=n(s,a))&&(r?s.silentPosition(o):s.position(o))}i.endBatch()}return this},silentPositions:function(e){return this.positions(e,!0)},shift:function(e,r,n){var i;if(Mr(e)?(i={x:pt(e.x)?e.x:0,y:pt(e.y)?e.y:0},n=r):qt(e)&&pt(r)&&(i={x:0,y:0},i[e]=r),i!=null){var a=this.cy();a.startBatch();for(var s=0;s<this.length;s++){var o=this[s];if(!(a.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this))){var l=o.position(),u={x:l.x+i.x,y:l.y+i.y};n?o.silentPosition(u):o.position(u)}}a.endBatch()}return this},silentShift:function(e,r){return Mr(e)?this.shift(e,!0):qt(e)&&pt(r)&&this.shift(e,r,!0),this},renderedPosition:function(e,r){var n=this[0],i=this.cy(),a=i.zoom(),s=i.pan(),o=Mr(e)?e:void 0,l=o!==void 0||r!==void 0&&qt(e);if(n&&n.isNode())if(l)for(var u=0;u<this.length;u++){var h=this[u];r!==void 0?h.position(e,(r-s[e])/a):o!==void 0&&h.position(Kde(o,a,s))}else{var f=n.position();return o=z6(f,a,s),e===void 0?o:o[e]}else if(!l)return;return this},relativePosition:function(e,r){var n=this[0],i=this.cy(),a=Mr(e)?e:void 0,s=a!==void 0||r!==void 0&&qt(e),o=i.hasCompoundNodes();if(n&&n.isNode())if(s)for(var l=0;l<this.length;l++){var u=this[l],h=o?u.parent():null,f=h&&h.length>0,d=f;f&&(h=h[0]);var p=d?h.position():{x:0,y:0};r!==void 0?u.position(e,r+p[e]):a!==void 0&&u.position({x:a.x+p.x,y:a.y+p.y})}else{var g=n.position(),m=o?n.parent():null,x=m&&m.length>0,y=x;x&&(m=m[0]);var b=y?m.position():{x:0,y:0};return a={x:g.x-b.x,y:g.y-b.y},e===void 0?a:a[e]}else if(!s)return;return this}};Il.modelPosition=Il.point=Il.position;Il.modelPositions=Il.points=Il.positions;Il.renderedPoint=Il.renderedPosition;Il.relativePoint=Il.relativePosition;jqe=T0e;Dm=gf={};gf.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),i=r.pan(),a=e.x1*n+i.x,s=e.x2*n+i.x,o=e.y1*n+i.y,l=e.y2*n+i.y;return{x1:a,x2:s,y1:o,y2:l,w:s-a,h:l-o}};gf.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};gf.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",h={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),d=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=d.x-f.w/2,f.x2=d.x+f.w/2,f.y1=d.y-f.h/2,f.y2=d.y+f.h/2);function p(C,M,R){var T=0,I=0,A=M+R;return C>0&&A>0&&(T=M/A*C,I=R/A*C),{biasDiff:T,biasComplementDiff:I}}function g(C,M,R,T){if(R.units==="%")switch(T){case"width":return C>0?R.pfValue*C:0;case"height":return M>0?R.pfValue*M:0;case"average":return C>0&&M>0?R.pfValue*(C+M)/2:0;case"min":return C>0&&M>0?C>M?R.pfValue*M:R.pfValue*C:0;case"max":return C>0&&M>0?C>M?R.pfValue*C:R.pfValue*M:0;default:return 0}else return R.units==="px"?R.pfValue:0}var m=h.width.left.value;h.width.left.units==="px"&&h.width.val>0&&(m=m*100/h.width.val);var x=h.width.right.value;h.width.right.units==="px"&&h.width.val>0&&(x=x*100/h.width.val);var y=h.height.top.value;h.height.top.units==="px"&&h.height.val>0&&(y=y*100/h.height.val);var b=h.height.bottom.value;h.height.bottom.units==="px"&&h.height.val>0&&(b=b*100/h.height.val);var w=p(h.width.val-f.w,m,x),_=w.biasDiff,k=w.biasComplementDiff,E=p(h.height.val-f.h,y,b),L=E.biasDiff,S=E.biasComplementDiff;o.autoPadding=g(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,h.width.val),d.x=(-_+f.x1+f.x2+k)/2,o.autoHeight=Math.max(f.h,h.height.val),d.y=(-L+f.y1+f.y2+S)/2}for(var n=0;n<this.length;n++){var i=this[n],a=i._private;(!a.compoundBoundsClean||t)&&(r(i),e.batching()||(a.compoundBoundsClean=!0))}return this};Wo=function(e){return e===1/0||e===-1/0?0:e},Rl=function(e,r,n,i,a){i-r===0||a-n===0||r==null||n==null||i==null||a==null||(e.x1=r<e.x1?r:e.x1,e.x2=i>e.x2?i:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=a>e.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},y0=function(e,r){return r==null?e:Rl(e,r.x1,r.y1,r.x2,r.y2)},J2=function(e,r,n){return Nl(e,r,n)},c6=function(e,r,n){if(!r.cy().headless()){var i=r._private,a=i.rstyle,s=a.arrowWidth/2,o=r.pstyle(n+"-arrow-shape").value,l,u;if(o!=="none"){n==="source"?(l=a.srcX,u=a.srcY):n==="target"?(l=a.tgtX,u=a.tgtY):(l=a.midX,u=a.midY);var h=i.arrowBounds=i.arrowBounds||{},f=h[n]=h[n]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,g6(f,1),Rl(e,f.x1,f.y1,f.x2,f.y2)}}},rD=function(e,r,n){if(!r.cy().headless()){var i;n?i=n+"-":i="";var a=r._private,s=a.rstyle,o=r.pstyle(i+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),h=J2(s,"labelWidth",n),f=J2(s,"labelHeight",n),d=J2(s,"labelX",n),p=J2(s,"labelY",n),g=r.pstyle(i+"text-margin-x").pfValue,m=r.pstyle(i+"text-margin-y").pfValue,x=r.isEdge(),y=r.pstyle(i+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,w=r.pstyle("text-border-width").pfValue,_=w/2,k=r.pstyle("text-background-padding").pfValue,E=2,L=f,S=h,C=S/2,M=L/2,R,T,I,A;if(x)R=d-C,T=d+C,I=p-M,A=p+M;else{switch(l.value){case"left":R=d-S,T=d;break;case"center":R=d-C,T=d+C;break;case"right":R=d,T=d+S;break}switch(u.value){case"top":I=p-L,A=p;break;case"center":I=p-M,A=p+M;break;case"bottom":I=p,A=p+L;break}}var D=g-Math.max(b,_)-k-E,N=g+Math.max(b,_)+k+E,O=m-Math.max(b,_)-k-E,B=m+Math.max(b,_)+k+E;R+=D,T+=N,I+=O,A+=B;var P=n||"main",$=a.labelBounds,z=$[P]=$[P]||{};z.x1=R,z.y1=I,z.x2=T,z.y2=A,z.w=T-R,z.h=A-I,z.leftPad=D,z.rightPad=N,z.topPad=O,z.botPad=B;var H=x&&y.strValue==="autorotate",Z=y.pfValue!=null&&y.pfValue!==0;if(H||Z){var X=H?J2(a.rstyle,"labelAngle",n):y.pfValue,ie=Math.cos(X),K=Math.sin(X),ee=(R+T)/2,J=(I+A)/2;if(!x){switch(l.value){case"left":ee=T;break;case"right":ee=R;break}switch(u.value){case"top":J=A;break;case"bottom":J=I;break}}var W=function(oe,be){return oe=oe-ee,be=be-J,{x:oe*ie-be*K+ee,y:oe*K+be*ie+J}},Y=W(R,I),Q=W(R,A),se=W(T,I),ue=W(T,A);R=Math.min(Y.x,Q.x,se.x,ue.x),T=Math.max(Y.x,Q.x,se.x,ue.x),I=Math.min(Y.y,Q.y,se.y,ue.y),A=Math.max(Y.y,Q.y,se.y,ue.y)}var ce=P+"Rot",te=$[ce]=$[ce]||{};te.x1=R,te.y1=I,te.x2=T,te.y2=A,te.w=T-R,te.h=A-I,Rl(e,R,I,T,A),Rl(a.labelBounds.all,R,I,T,A)}return e}},Kqe=function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,i=r.pstyle("outline-width").value;if(n>0&&i>0){var a=r.pstyle("outline-offset").value,s=r.pstyle("shape").value,o=i+a,l=(e.w+o*2)/e.w,u=(e.h+o*2)/e.h,h=0,f=0;["diamond","pentagon","round-triangle"].includes(s)?(l=(e.w+o*2.4)/e.w,f=-o/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?l=(e.w+o*2.4)/e.w:s==="star"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.6)/e.h,f=-o/3.8):s==="triangle"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.4)/e.h,f=-o/1.4):s==="vee"&&(l=(e.w+o*4.4)/e.w,u=(e.h+o*3.8)/e.h,f=-o*.5);var d=e.h*u-e.h,p=e.w*l-e.w;if(m6(e,[Math.ceil(d/2),Math.ceil(p/2)]),h!=0||f!==0){var g=vVe(e,h,f);Qde(e,g)}}}},Zqe=function(e,r){var n=e._private.cy,i=n.styleEnabled(),a=n.headless(),s=_s(),o=e._private,l=e.isNode(),u=e.isEdge(),h,f,d,p,g,m,x=o.rstyle,y=l&&i?e.pstyle("bounds-expansion").pfValue:[0],b=function(Le){return Le.pstyle("display").value!=="none"},w=!i||b(e)&&(!u||b(e.source())&&b(e.target()));if(w){var _=0,k=0;i&&r.includeOverlays&&(_=e.pstyle("overlay-opacity").value,_!==0&&(k=e.pstyle("overlay-padding").value));var E=0,L=0;i&&r.includeUnderlays&&(E=e.pstyle("underlay-opacity").value,E!==0&&(L=e.pstyle("underlay-padding").value));var S=Math.max(k,L),C=0,M=0;if(i&&(C=e.pstyle("width").pfValue,M=C/2),l&&r.includeNodes){var R=e.position();g=R.x,m=R.y;var T=e.outerWidth(),I=T/2,A=e.outerHeight(),D=A/2;h=g-I,f=g+I,d=m-D,p=m+D,Rl(s,h,d,f,p),i&&r.includeOutlines&&Kqe(s,e)}else if(u&&r.includeEdges)if(i&&!a){var N=e.pstyle("curve-style").strValue;if(h=Math.min(x.srcX,x.midX,x.tgtX),f=Math.max(x.srcX,x.midX,x.tgtX),d=Math.min(x.srcY,x.midY,x.tgtY),p=Math.max(x.srcY,x.midY,x.tgtY),h-=M,f+=M,d-=M,p+=M,Rl(s,h,d,f,p),N==="haystack"){var O=x.haystackPts;if(O&&O.length===2){if(h=O[0].x,d=O[0].y,f=O[1].x,p=O[1].y,h>f){var B=h;h=f,f=B}if(d>p){var P=d;d=p,p=P}Rl(s,h-M,d-M,f+M,p+M)}}else if(N==="bezier"||N==="unbundled-bezier"||N.endsWith("segments")||N.endsWith("taxi")){var $;switch(N){case"bezier":case"unbundled-bezier":$=x.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":$=x.linePts;break}if($!=null)for(var z=0;z<$.length;z++){var H=$[z];h=H.x-M,f=H.x+M,d=H.y-M,p=H.y+M,Rl(s,h,d,f,p)}}}else{var Z=e.source(),X=Z.position(),ie=e.target(),K=ie.position();if(h=X.x,f=K.x,d=X.y,p=K.y,h>f){var ee=h;h=f,f=ee}if(d>p){var J=d;d=p,p=J}h-=M,f+=M,d-=M,p+=M,Rl(s,h,d,f,p)}if(i&&r.includeEdges&&u&&(c6(s,e,"mid-source"),c6(s,e,"mid-target"),c6(s,e,"source"),c6(s,e,"target")),i){var W=e.pstyle("ghost").value==="yes";if(W){var Y=e.pstyle("ghost-offset-x").pfValue,Q=e.pstyle("ghost-offset-y").pfValue;Rl(s,s.x1+Y,s.y1+Q,s.x2+Y,s.y2+Q)}}var se=o.bodyBounds=o.bodyBounds||{};Sfe(se,s),m6(se,y),g6(se,1),i&&(h=s.x1,f=s.x2,d=s.y1,p=s.y2,Rl(s,h-S,d-S,f+S,p+S));var ue=o.overlayBounds=o.overlayBounds||{};Sfe(ue,s),m6(ue,y),g6(ue,1);var ce=o.labelBounds=o.labelBounds||{};ce.all!=null?mVe(ce.all):ce.all=_s(),i&&r.includeLabels&&(r.includeMainLabels&&rD(s,e,null),u&&(r.includeSourceLabels&&rD(s,e,"source"),r.includeTargetLabels&&rD(s,e,"target")))}return s.x1=Wo(s.x1),s.y1=Wo(s.y1),s.x2=Wo(s.x2),s.y2=Wo(s.y2),s.w=Wo(s.x2-s.x1),s.h=Wo(s.y2-s.y1),s.w>0&&s.h>0&&w&&(m6(s,y),g6(s,1)),s},S0e=function(e){var r=0,n=function(s){return(s?1:0)<<r++},i=0;return i+=n(e.incudeNodes),i+=n(e.includeEdges),i+=n(e.includeLabels),i+=n(e.includeMainLabels),i+=n(e.includeSourceLabels),i+=n(e.includeTargetLabels),i+=n(e.includeOverlays),i+=n(e.includeOutlines),i},C0e=function(e){if(e.isEdge()){var r=e.source().position(),n=e.target().position(),i=function(s){return Math.round(s)};return BUe([i(r.x),i(r.y),i(n.x),i(n.y)])}else return 0},Yfe=function(e,r){var n=e._private,i,a=e.isEdge(),s=r==null?Xfe:S0e(r),o=s===Xfe,l=C0e(e),u=n.bbCachePosKey===l,h=r.useCache&&u,f=function(m){return m._private.bbCache==null||m._private.styleDirty},d=!h||f(e)||a&&(f(e.source())||f(e.target()));if(d?(u||e.recalculateRenderedStyle(h),i=Zqe(e,vx),n.bbCache=i,n.bbCachePosKey=l):i=n.bbCache,!o){var p=e.isNode();i=_s(),(r.includeNodes&&p||r.includeEdges&&!p)&&(r.includeOverlays?y0(i,n.overlayBounds):y0(i,n.bodyBounds)),r.includeLabels&&(r.includeMainLabels&&(!a||r.includeSourceLabels&&r.includeTargetLabels)?y0(i,n.labelBounds.all):(r.includeMainLabels&&y0(i,n.labelBounds.mainRot),r.includeSourceLabels&&y0(i,n.labelBounds.sourceRot),r.includeTargetLabels&&y0(i,n.labelBounds.targetRot))),i.w=i.x2-i.x1,i.h=i.y2-i.y1}return i},vx={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},Xfe=S0e(vx),jfe=da(vx);gf.boundingBox=function(t){var e;if(this.length===1&&this[0]._private.bbCache!=null&&!this[0]._private.styleDirty&&(t===void 0||t.useCache===void 0||t.useCache===!0))t===void 0?t=vx:t=jfe(t),e=Yfe(this[0],t);else{e=_s(),t=t||vx;var r=jfe(t),n=this,i=n.cy(),a=i.styleEnabled();if(a)for(var s=0;s<n.length;s++){var o=n[s],l=o._private,u=C0e(o),h=l.bbCachePosKey===u,f=r.useCache&&h&&!l.styleDirty;o.recalculateRenderedStyle(f)}this.updateCompoundBounds(!t.useCache);for(var d=0;d<n.length;d++){var p=n[d];y0(e,Yfe(p,r))}}return e.x1=Wo(e.x1),e.y1=Wo(e.y1),e.x2=Wo(e.x2),e.y2=Wo(e.y2),e.w=Wo(e.x2-e.x1),e.h=Wo(e.y2-e.y1),e};gf.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this};gf.boundingBoxAt=function(t){var e=this.nodes(),r=this.cy(),n=r.hasCompoundNodes(),i=r.collection();if(n&&(i=e.filter(function(u){return u.isParent()}),e=e.not(i)),Mr(t)){var a=t;t=function(){return a}}var s=function(h,f){return h._private.bbAtOldPos=t(h,f)},o=function(h){return h._private.bbAtOldPos};r.startBatch(),e.forEach(s).silentPositions(t),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0));var l=gVe(this.boundingBox({useCache:!1}));return e.silentPositions(o),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0)),r.endBatch(),l};Dm.boundingbox=Dm.bb=Dm.boundingBox;Dm.renderedBoundingbox=Dm.renderedBoundingBox;Qqe=gf;ax=Ex={};A0e=function(e){e.uppercaseName=yfe(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=yfe(e.outerName),ax[e.name]=function(){var n=this[0],i=n._private,a=i.cy,s=a._private.styleEnabled;if(n)if(s){if(n.isParent())return n.updateCompoundBounds(),i[e.autoName]||0;var o=n.pstyle(e.name);switch(o.strValue){case"label":return n.recalculateRenderedStyle(),i.rstyle[e.labelName]||0;default:return o.pfValue}}else return 1},ax["outer"+e.uppercaseName]=function(){var n=this[0],i=n._private,a=i.cy,s=a._private.styleEnabled;if(n)if(s){var o=n[e.name](),l=n.pstyle("border-width").pfValue,u=2*n.padding();return o+l+u}else return 1},ax["rendered"+e.uppercaseName]=function(){var n=this[0];if(n){var i=n[e.name]();return i*this.cy().zoom()}},ax["rendered"+e.uppercaseOuterName]=function(){var n=this[0];if(n){var i=n[e.outerName]();return i*this.cy().zoom()}}};A0e({name:"width"});A0e({name:"height"});Ex.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),e.autoPadding!==void 0?e.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue};Ex.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()};Ex.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};Jqe=Ex,eYe=function(e,r){if(e.isEdge())return r(e)},tYe=function(e,r){if(e.isEdge()){var n=e.cy();return z6(r(e),n.zoom(),n.pan())}},rYe=function(e,r){if(e.isEdge()){var n=e.cy(),i=n.pan(),a=n.zoom();return r(e).map(function(s){return z6(s,a,i)})}},nYe=function(e){return e.renderer().getControlPoints(e)},iYe=function(e){return e.renderer().getSegmentPoints(e)},aYe=function(e){return e.renderer().getSourceEndpoint(e)},sYe=function(e){return e.renderer().getTargetEndpoint(e)},oYe=function(e){return e.renderer().getEdgeMidpoint(e)},Kfe={controlPoints:{get:nYe,mult:!0},segmentPoints:{get:iYe,mult:!0},sourceEndpoint:{get:aYe},targetEndpoint:{get:sYe},midpoint:{get:oYe}},lYe=function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},cYe=Object.keys(Kfe).reduce(function(t,e){var r=Kfe[e],n=lYe(e);return t[e]=function(){return eYe(this,r.get)},r.mult?t[n]=function(){return rYe(this,r.get)}:t[n]=function(){return tYe(this,r.get)},t},{}),uYe=Zt({},jqe,Qqe,Jqe,cYe);_0e=function(e,r){this.recycle(e,r)};_0e.prototype={instanceString:function(){return"event"},recycle:function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=ex,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?u6:ex):e!=null&&e.type?r=e:this.type=e,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var n=this.position,i=this.cy.zoom(),a=this.cy.pan();this.renderedPosition={x:n.x*i+a.x,y:n.y*i+a.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=u6;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=u6;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u6,this.stopPropagation()},isDefaultPrevented:ex,isPropagationStopped:ex,isImmediatePropagationStopped:ex};L0e=/^([^.]+)(\\.(?:[^.]+))?$/,hYe=".*",R0e={qualifierCompare:function(e,r){return e===r},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},Zfe=Object.keys(R0e),fYe={};pf=H6.prototype,N0e=function(e,r,n,i,a,s,o){Xn(i)&&(a=i,i=null),o&&(s==null?s=o:s=Zt({},s,o));for(var l=gn(n)?n:n.split(/\\s+/),u=0;u<l.length;u++){var h=l[u];if(!uf(h)){var f=h.match(L0e);if(f){var d=f[1],p=f[2]?f[2]:null,g=r(e,h,d,p,i,a,s);if(g===!1)break}}}},Qfe=function(e,r){return e.addEventFields(e.context,r),new _0e(r.type,r)},dYe=function(e,r,n){if(MGe(n)){r(e,n);return}else if(Mr(n)){r(e,Qfe(e,n));return}for(var i=gn(n)?n:n.split(/\\s+/),a=0;a<i.length;a++){var s=i[a];if(!uf(s)){var o=s.match(L0e);if(o){var l=o[1],u=o[2]?o[2]:null,h=Qfe(e,{type:l,namespace:u,target:e.context});r(e,h)}}}};pf.on=pf.addListener=function(t,e,r,n,i){return N0e(this,function(a,s,o,l,u,h,f){Xn(h)&&a.listeners.push({event:s,callback:h,type:o,namespace:l,qualifier:u,conf:f})},t,e,r,n,i),this};pf.one=function(t,e,r,n){return this.on(t,e,r,n,{one:!0})};pf.removeListener=pf.off=function(t,e,r,n){var i=this;this.emitting!==0&&(this.listeners=UUe(this.listeners));for(var a=this.listeners,s=function(u){var h=a[u];N0e(i,function(f,d,p,g,m,x){if((h.type===p||t==="*")&&(!g&&h.namespace!==".*"||h.namespace===g)&&(!m||f.qualifierCompare(h.qualifier,m))&&(!x||h.callback===x))return a.splice(u,1),!1},t,e,r,n)},o=a.length-1;o>=0;o--)s(o);return this};pf.removeAllListeners=function(){return this.removeListener("*")};pf.emit=pf.trigger=function(t,e,r){var n=this.listeners,i=n.length;return this.emitting++,gn(e)||(e=[e]),dYe(this,function(a,s){r!=null&&(n=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],i=n.length);for(var o=function(h){var f=n[h];if(f.type===s.type&&(!f.namespace||f.namespace===s.namespace||f.namespace===hYe)&&a.eventMatches(a.context,f,s)){var d=[s];e!=null&&WUe(d,e),a.beforeEmit(a.context,f,s),f.conf&&f.conf.one&&(a.listeners=a.listeners.filter(function(m){return m!==f}));var p=a.callbackContext(a.context,f,s),g=f.callback.apply(p,d);a.afterEmit(a.context,f,s),g===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l<i;l++)o(l);a.bubble(a.context)&&!s.isPropagationStopped()&&a.parent(a.context).emit(s,e)},t),this.emitting--,this};pYe={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var i=r.qualifier;return i!=null?e!==n.target&&wx(n.target)&&i.matches(n.target):!0},addEventFields:function(e,r){r.cy=e.cy(),r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e},beforeEmit:function(e,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},h6=function(e){return qt(e)?new ff(e):e},I0e={createEmitter:function(){for(var e=0;e<this.length;e++){var r=this[e],n=r._private;n.emitter||(n.emitter=new H6(pYe,r))}return this},emitter:function(){return this._private.emitter},on:function(e,r,n){for(var i=h6(r),a=0;a<this.length;a++){var s=this[a];s.emitter().on(e,i,n)}return this},removeListener:function(e,r,n){for(var i=h6(r),a=0;a<this.length;a++){var s=this[a];s.emitter().removeListener(e,i,n)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){var r=this[e];r.emitter().removeAllListeners()}return this},one:function(e,r,n){for(var i=h6(r),a=0;a<this.length;a++){var s=this[a];s.emitter().one(e,i,n)}return this},once:function(e,r,n){for(var i=h6(r),a=0;a<this.length;a++){var s=this[a];s.emitter().on(e,i,n,{once:!0,onceCollection:this})}},emit:function(e,r){for(var n=0;n<this.length;n++){var i=this[n];i.emitter().emit(e,r)}return this},emitAndNotify:function(e,r){if(this.length!==0)return this.cy().notify(e,this),this.emit(e,r),this}};Zr.eventAliasesOn(I0e);M0e={nodes:function(e){return this.filter(function(r){return r.isNode()}).filter(e)},edges:function(e){return this.filter(function(r){return r.isEdge()}).filter(e)},byGroup:function(){for(var e=this.spawn(),r=this.spawn(),n=0;n<this.length;n++){var i=this[n];i.isNode()?e.push(i):r.push(i)}return{nodes:e,edges:r}},filter:function(e,r){if(e===void 0)return this;if(qt(e)||to(e))return new ff(e).filter(this);if(Xn(e)){for(var n=this.spawn(),i=this,a=0;a<i.length;a++){var s=i[a],o=r?e.apply(r,[s,a,i]):e(s,a,i);o&&n.push(s)}return n}return this.spawn()},not:function(e){if(e){qt(e)&&(e=this.filter(e));for(var r=this.spawn(),n=0;n<this.length;n++){var i=this[n],a=e.has(i);a||r.push(i)}return r}else return this},absoluteComplement:function(){var e=this.cy();return e.mutableElements().not(this)},intersect:function(e){if(qt(e)){var r=e;return this.filter(r)}for(var n=this.spawn(),i=this,a=e,s=this.length<e.length,o=s?i:a,l=s?a:i,u=0;u<o.length;u++){var h=o[u];l.has(h)&&n.push(h)}return n},xor:function(e){var r=this._private.cy;qt(e)&&(e=r.$(e));var n=this.spawn(),i=this,a=e,s=function(l,u){for(var h=0;h<l.length;h++){var f=l[h],d=f._private.data.id,p=u.hasElementWithId(d);p||n.push(f)}};return s(i,a),s(a,i),n},diff:function(e){var r=this._private.cy;qt(e)&&(e=r.$(e));var n=this.spawn(),i=this.spawn(),a=this.spawn(),s=this,o=e,l=function(h,f,d){for(var p=0;p<h.length;p++){var g=h[p],m=g._private.data.id,x=f.hasElementWithId(m);x?a.merge(g):d.push(g)}};return l(s,o,n),l(o,s,i),{left:n,right:i,both:a}},add:function(e){var r=this._private.cy;if(!e)return this;if(qt(e)){var n=e;e=r.mutableElements().filter(n)}for(var i=this.spawnSelf(),a=0;a<e.length;a++){var s=e[a],o=!this.has(s);o&&i.push(s)}return i},merge:function(e){var r=this._private,n=r.cy;if(!e)return this;if(e&&qt(e)){var i=e;e=n.mutableElements().filter(i)}for(var a=r.map,s=0;s<e.length;s++){var o=e[s],l=o._private.data.id,u=!a.has(l);if(u){var h=this.length++;this[h]=o,a.set(l,{ele:o,index:h})}}return this},unmergeAt:function(e){var r=this[e],n=r.id(),i=this._private,a=i.map;this[e]=void 0,a.delete(n);var s=e===this.length-1;if(this.length>1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,a.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,n=e._private.data.id,i=r.map,a=i.get(n);if(!a)return this;var s=a.index;return this.unmergeAt(s),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&qt(e)){var n=e;e=r.mutableElements().filter(n)}for(var i=0;i<e.length;i++)this.unmergeOne(e[i]);return this},unmergeBy:function(e){for(var r=this.length-1;r>=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},map:function(e,r){for(var n=[],i=this,a=0;a<i.length;a++){var s=i[a],o=r?e.apply(r,[s,a,i]):e(s,a,i);n.push(o)}return n},reduce:function(e,r){for(var n=r,i=this,a=0;a<i.length;a++)n=e(n,i[a],a,i);return n},max:function(e,r){for(var n=-1/0,i,a=this,s=0;s<a.length;s++){var o=a[s],l=r?e.apply(r,[o,s,a]):e(o,s,a);l>n&&(n=l,i=o)}return{value:n,ele:i}},min:function(e,r){for(var n=1/0,i,a=this,s=0;s<a.length;s++){var o=a[s],l=r?e.apply(r,[o,s,a]):e(o,s,a);l<n&&(n=l,i=o)}return{value:n,ele:i}}},Ur=M0e;Ur.u=Ur["|"]=Ur["+"]=Ur.union=Ur.or=Ur.add;Ur["\\\\"]=Ur["!"]=Ur["-"]=Ur.difference=Ur.relativeComplement=Ur.subtract=Ur.not;Ur.n=Ur["&"]=Ur["."]=Ur.and=Ur.intersection=Ur.intersect;Ur["^"]=Ur["(+)"]=Ur["(-)"]=Ur.symmetricDifference=Ur.symdiff=Ur.xor;Ur.fnFilter=Ur.filterFn=Ur.stdFilter=Ur.filter;Ur.complement=Ur.abscomp=Ur.absoluteComplement;gYe={isNode:function(){return this.group()==="nodes"},isEdge:function(){return this.group()==="edges"},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var e=this[0];if(e)return e._private.group}},D0e=function(e,r){var n=e.cy(),i=n.hasCompoundNodes();function a(h){var f=h.pstyle("z-compound-depth");return f.value==="auto"?i?h.zDepth():0:f.value==="bottom"?-1:f.value==="top"?_D:0}var s=a(e)-a(r);if(s!==0)return s;function o(h){var f=h.pstyle("z-index-compare");return f.value==="auto"&&h.isNode()?1:0}var l=o(e)-o(r);if(l!==0)return l;var u=e.pstyle("z-index").value-r.pstyle("z-index").value;return u!==0?u:e.poolIndex()-r.poolIndex()},R6={forEach:function(e,r){if(Xn(e))for(var n=this.length,i=0;i<n;i++){var a=this[i],s=r?e.apply(r,[a,i,this]):e(a,i,this);if(s===!1)break}return this},toArray:function(){for(var e=[],r=0;r<this.length;r++)e.push(this[r]);return e},slice:function(e,r){var n=[],i=this.length;r==null&&(r=i),e==null&&(e=0),e<0&&(e=i+e),r<0&&(r=i+r);for(var a=e;a>=0&&a<r&&a<i;a++)n.push(this[a]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return this.length===0},nonempty:function(){return!this.empty()},sort:function(e){if(!Xn(e))return this;var r=this.toArray().sort(e);return this.spawn(r)},sortByZIndex:function(){return this.sort(D0e)},zDepth:function(){var e=this[0];if(e){var r=e._private,n=r.group;if(n==="nodes"){var i=r.data.parent?e.parents().size():0;return e.isParent()?i:_D-1}else{var a=r.source,s=r.target,o=a.zDepth(),l=s.zDepth();return Math.max(o,l,0)}}}};R6.each=R6.forEach;mYe=function(){var e="undefined",r=(typeof Symbol>"u"?"undefined":Mi(Symbol))!=e&&Mi(Symbol.iterator)!=e;r&&(R6[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,s=this.length;return Rde({next:function(){return a<s?i.value=n[a++]:(i.value=void 0,i.done=!0),i}},Symbol.iterator,function(){return this})})};mYe();vYe=da({nodeDimensionsIncludeLabels:!1}),y6={layoutDimensions:function(e){e=vYe(e);var r;if(!this.takesUpSpace())r={w:0,h:0};else if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();r={w:n.w,h:n.h}}else r={w:this.outerWidth(),h:this.outerHeight()};return(r.w===0||r.h===0)&&(r.w=r.h=1),r},layoutPositions:function(e,r,n){var i=this.nodes().filter(function(k){return!k.isParent()}),a=this.cy(),s=r.eles,o=function(E){return E.id()},l=cx(n,o);e.emit({type:"layoutstart",layout:e}),e.animations=[];var u=function(E,L,S){var C={x:L.x1+L.w/2,y:L.y1+L.h/2},M={x:(S.x-C.x)*E,y:(S.y-C.y)*E};return{x:C.x+M.x,y:C.y+M.y}},h=r.spacingFactor&&r.spacingFactor!==1,f=function(){if(!h)return null;for(var E=_s(),L=0;L<i.length;L++){var S=i[L],C=l(S,L);yVe(E,C.x,C.y)}return E},d=f(),p=cx(function(k,E){var L=l(k,E);if(h){var S=Math.abs(r.spacingFactor);L=u(S,d,L)}return r.transform!=null&&(L=r.transform(k,L)),L},o);if(r.animate){for(var g=0;g<i.length;g++){var m=i[g],x=p(m,g),y=r.animateFilter==null||r.animateFilter(m,g);if(y){var b=m.animation({position:x,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(b)}else m.position(x)}if(r.fit){var w=a.animation({fit:{boundingBox:s.boundingBoxAt(p),padding:r.padding},duration:r.animationDuration,easing:r.animationEasing});e.animations.push(w)}else if(r.zoom!==void 0&&r.pan!==void 0){var _=a.animation({zoom:r.zoom,pan:r.pan,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(_)}e.animations.forEach(function(k){return k.play()}),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),$m.all(e.animations.map(function(k){return k.promise()})).then(function(){e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e})})}else i.positions(p),r.fit&&a.fit(r.eles,r.padding),r.zoom!=null&&a.zoom(r.zoom),r.pan&&a.pan(r.pan),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e});return this},layout:function(e){var r=this.cy();return r.makeLayout(Zt({},e,{eles:this}))}};y6.createLayout=y6.makeLayout=y6.layout;ha={recalculateRenderedStyle:function(e){var r=this.cy(),n=r.renderer(),i=r.styleEnabled();return n&&i&&n.recalculateRenderedStyle(this,e),this},dirtyStyleCache:function(){var e=this.cy(),r=function(a){return a._private.styleCache=null};if(e.hasCompoundNodes()){var n;n=this.spawnSelf().merge(this.descendants()).merge(this.parents()),n.merge(n.connectedEdges()),n.forEach(r)}else this.forEach(function(i){r(i),i.connectedEdges().forEach(r)});return this},updateStyle:function(e){var r=this._private.cy;if(!r.styleEnabled())return this;if(r.batching()){var n=r._private.batchStyleEles;return n.merge(this),this}var i=r.hasCompoundNodes(),a=this;e=!!(e||e===void 0),i&&(a=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var s=a;return e?s.emitAndNotify("style"):s.emit("style"),a.forEach(function(o){return o._private.styleDirty=!0}),this},cleanStyle:function(){var e=this.cy();if(e.styleEnabled())for(var r=0;r<this.length;r++){var n=this[r];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n))}},parsedStyle:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){this.cleanStyle();var a=n._private.style[e];return a??(r?i.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},style:function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(Mr(e)){var s=e;a.applyBypass(this,s,i),this.emitAndNotify("style")}else if(qt(e))if(r===void 0){var o=this[0];return o?a.getStylePropertyValue(o,e):void 0}else a.applyBypass(this,e,r,i),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?a.getRawStyle(l):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,i=r.style(),a=this;if(e===void 0)for(var s=0;s<a.length;s++){var o=a[s];i.removeAllBypasses(o,n)}else{e=e.split(/\\s+/);for(var l=0;l<a.length;l++){var u=a[l];i.removeBypasses(u,e,n)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var r=e.hasCompoundNodes(),n=this[0];if(n){var i=n._private,a=n.pstyle("opacity").value;if(!r)return a;var s=i.data.parent?n.parents():null;if(s)for(var o=0;o<s.length;o++){var l=s[o],u=l.pstyle("opacity").value;a=u*a}return a}},transparent:function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0],n=r.cy().hasCompoundNodes();if(r)return n?r.effectiveOpacity()===0:r.pstyle("opacity").value===0},backgrounding:function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0];return!!r._private.backgrounding}};Wm=q6("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0)});ha.takesUpSpace=Y6("takesUpSpace",$D({ok:Wm}));yYe=q6("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&Wm(t)}),xYe=q6("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&Wm(t)});ha.interactive=Y6("interactive",$D({ok:yYe,parentOk:xYe,edgeOkViaNode:Wm}));ha.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};bYe=q6("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&Wm(t)}),wYe=Wm;ha.visible=Y6("visible",$D({ok:bYe,edgeOkViaNode:wYe}));ha.hidden=function(){var t=this[0];if(t)return!t.visible()};ha.isBundledBezier=Y6("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1});ha.bypass=ha.css=ha.style;ha.renderedCss=ha.renderedStyle;ha.removeBypass=ha.removeCss=ha.removeStyle;ha.pstyle=ha.parsedStyle;cf={};Hm({field:"locked",overrideField:function(e){return e.cy().autolock()?!0:void 0},on:"lock",off:"unlock"});Hm({field:"grabbable",overrideField:function(e){return e.cy().autoungrabify()||e.pannable()?!1:void 0},on:"grabify",off:"ungrabify"});Hm({field:"selected",ableField:"selectable",overrideAble:function(e){return e.cy().autounselectify()?!1:void 0},on:"select",off:"unselect"});Hm({field:"selectable",overrideField:function(e){return e.cy().autounselectify()?!1:void 0},on:"selectify",off:"unselectify"});cf.deselect=cf.unselect;cf.grabbed=function(){var t=this[0];if(t)return t._private.grabbed};Hm({field:"active",on:"activate",off:"unactivate"});Hm({field:"pannable",on:"panify",off:"unpanify"});cf.inactive=function(){var t=this[0];if(t)return!t._private.active};Ca={},ede=function(e){return function(n){for(var i=this,a=[],s=0;s<i.length;s++){var o=i[s];if(o.isNode()){for(var l=!1,u=o.connectedEdges(),h=0;h<u.length;h++){var f=u[h],d=f.source(),p=f.target();if(e.noIncomingEdges&&p===o&&d!==o||e.noOutgoingEdges&&d===o&&p!==o){l=!0;break}}l||a.push(o)}}return this.spawn(a,!0).filter(n)}},tde=function(e){return function(r){for(var n=this,i=[],a=0;a<n.length;a++){var s=n[a];if(s.isNode())for(var o=s.connectedEdges(),l=0;l<o.length;l++){var u=o[l],h=u.source(),f=u.target();e.outgoing&&h===s?(i.push(u),i.push(f)):e.incoming&&f===s&&(i.push(u),i.push(h))}}return this.spawn(i,!0).filter(r)}},rde=function(e){return function(r){for(var n=this,i=[],a={};;){var s=e.outgoing?n.outgoers():n.incomers();if(s.length===0)break;for(var o=!1,l=0;l<s.length;l++){var u=s[l],h=u.id();a[h]||(a[h]=!0,i.push(u),o=!0)}if(!o)break;n=s}return this.spawn(i,!0).filter(r)}};Ca.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null};Zt(Ca,{roots:ede({noIncomingEdges:!0}),leaves:ede({noOutgoingEdges:!0}),outgoers:Ho(tde({outgoing:!0}),"outgoers"),successors:rde({outgoing:!0}),incomers:Ho(tde({incoming:!0}),"incomers"),predecessors:rde({incoming:!0})});Zt(Ca,{neighborhood:Ho(function(t){for(var e=[],r=this.nodes(),n=0;n<r.length;n++)for(var i=r[n],a=i.connectedEdges(),s=0;s<a.length;s++){var o=a[s],l=o.source(),u=o.target(),h=i===l?u:l;h.length>0&&e.push(h[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});Ca.neighbourhood=Ca.neighborhood;Ca.closedNeighbourhood=Ca.closedNeighborhood;Ca.openNeighbourhood=Ca.openNeighborhood;Zt(Ca,{source:Ho(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"source"),target:Ho(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"target"),sources:nde({attr:"source"}),targets:nde({attr:"target"})});Zt(Ca,{edgesWith:Ho(ide(),"edgesWith"),edgesTo:Ho(ide({thisIsSrc:!0}),"edgesTo")});Zt(Ca,{connectedEdges:Ho(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var i=r[n];if(i.isNode())for(var a=i._private.edges,s=0;s<a.length;s++){var o=a[s];e.push(o)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:Ho(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var i=r[n];i.isEdge()&&(e.push(i.source()[0]),e.push(i.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:Ho(ade(),"parallelEdges"),codirectedEdges:Ho(ade({codirected:!0}),"codirectedEdges")});Zt(Ca,{components:function(e){var r=this,n=r.cy(),i=n.collection(),a=e==null?r.nodes():e.nodes(),s=[];e!=null&&a.empty()&&(a=e.sources());var o=function(h,f){i.merge(h),a.unmerge(h),f.merge(h)};if(a.empty())return r.spawn();var l=function(){var h=n.collection();s.push(h);var f=a[0];o(f,h),r.bfs({directed:!1,roots:f,visit:function(p){return o(p,h)}}),h.forEach(function(d){d.connectedEdges().forEach(function(p){r.has(p)&&h.has(p.source())&&h.has(p.target())&&h.merge(p)})})};do l();while(a.length>0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});Ca.componentsOf=Ca.components;fa=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){ri("A collection must have a reference to the core");return}var a=new Mc,s=!1;if(!r)r=[];else if(r.length>0&&Mr(r[0])&&!wx(r[0])){s=!0;for(var o=[],l=new zm,u=0,h=r.length;u<h;u++){var f=r[u];f.data==null&&(f.data={});var d=f.data;if(d.id==null)d.id=Xde();else if(e.hasElementWithId(d.id)||l.has(d.id))continue;var p=new F6(e,f,!1);o.push(p),l.add(d.id)}r=o}this.length=0;for(var g=0,m=r.length;g<m;g++){var x=r[g][0];if(x!=null){var y=x._private.data.id;(!n||!a.has(y))&&(n&&a.set(y,{index:this.length,ele:x}),this[this.length]=x,this.length++)}}this._private={eles:this,cy:e,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(b){this.lazyMap=b},rebuildMap:function(){for(var w=this.lazyMap=new Mc,_=this.eles,k=0;k<_.length;k++){var E=_[k];w.set(E.id(),{index:k,ele:E})}}},n&&(this._private.map=a),s&&!i&&this.restore()},Cn=F6.prototype=fa.prototype=Object.create(Array.prototype);Cn.instanceString=function(){return"collection"};Cn.spawn=function(t,e){return new fa(this.cy(),t,e)};Cn.spawnSelf=function(){return this.spawn(this)};Cn.cy=function(){return this._private.cy};Cn.renderer=function(){return this._private.cy.renderer()};Cn.element=function(){return this[0]};Cn.collection=function(){return Dde(this)?this:new fa(this._private.cy,[this])};Cn.unique=function(){return new fa(this._private.cy,this,!0)};Cn.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)};Cn.getElementById=function(t){t=""+t;var e=this._private.cy,r=this._private.map.get(t);return r?r.ele:new fa(e)};Cn.$id=Cn.getElementById;Cn.poolIndex=function(){var t=this._private.cy,e=t._private.elements,r=this[0]._private.data.id;return e._private.map.get(r).index};Cn.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index};Cn.indexOfId=function(t){return t=""+t,this._private.map.get(t).index};Cn.json=function(t){var e=this.element(),r=this.cy();if(e==null&&t)return this;if(e!=null){var n=e._private;if(Mr(t)){if(r.startBatch(),t.data){e.data(t.data);var i=n.data;if(e.isEdge()){var a=!1,s={},o=t.data.source,l=t.data.target;o!=null&&o!=i.source&&(s.source=""+o,a=!0),l!=null&&l!=i.target&&(s.target=""+l,a=!0),a&&(e=e.move(s))}else{var u="parent"in t.data,h=t.data.parent;u&&(h!=null||i.parent!=null)&&h!=i.parent&&(h===void 0&&(h=null),h!=null&&(h=""+h),e=e.move({parent:h}))}}t.position&&e.position(t.position);var f=function(m,x,y){var b=t[m];b!=null&&b!==n[m]&&(b?e[x]():e[y]())};return f("removed","remove","restore"),f("selected","select","unselect"),f("selectable","selectify","unselectify"),f("locked","lock","unlock"),f("grabbable","grabify","ungrabify"),f("pannable","panify","unpanify"),t.classes!=null&&e.classes(t.classes),r.endBatch(),this}else if(t===void 0){var d={data:Ic(n.data),position:Ic(n.position),group:n.group,removed:n.removed,selected:n.selected,selectable:n.selectable,locked:n.locked,grabbable:n.grabbable,pannable:n.pannable,classes:null};d.classes="";var p=0;return n.classes.forEach(function(g){return d.classes+=p++===0?g:" "+g}),d}}};Cn.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e],n=r.json();t.push(n)}return t};Cn.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var n=this[r],i=n.json(),a=new F6(t,i,!1);e.push(a)}return new fa(t,e)};Cn.copy=Cn.clone;Cn.restore=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),i=n._private,a=[],s=[],o,l=0,u=r.length;l<u;l++){var h=r[l];e&&!h.removed()||(h.isNode()?a.push(h):s.push(h))}o=a.concat(s);var f,d=function(){o.splice(f,1),f--};for(f=0;f<o.length;f++){var p=o[f],g=p._private,m=g.data;if(p.clearTraversalCache(),!(!e&&!g.removed)){if(m.id===void 0)m.id=Xde();else if(pt(m.id))m.id=""+m.id;else if(uf(m.id)||!qt(m.id)){ri("Can not create element with invalid string ID `"+m.id+"`"),d();continue}else if(n.hasElementWithId(m.id)){ri("Can not create second element with ID `"+m.id+"`"),d();continue}}var x=m.id;if(p.isNode()){var y=g.position;y.x==null&&(y.x=0),y.y==null&&(y.y=0)}if(p.isEdge()){for(var b=p,w=["source","target"],_=w.length,k=!1,E=0;E<_;E++){var L=w[E],S=m[L];pt(S)&&(S=m[L]=""+m[L]),S==null||S===""?(ri("Can not create edge `"+x+"` with unspecified "+L),k=!0):n.hasElementWithId(S)||(ri("Can not create edge `"+x+"` with nonexistant "+L+" `"+S+"`"),k=!0)}if(k){d();continue}var C=n.getElementById(m.source),M=n.getElementById(m.target);C.same(M)?C._private.edges.push(b):(C._private.edges.push(b),M._private.edges.push(b)),b._private.source=C,b._private.target=M}g.map=new Mc,g.map.set(x,{ele:p,index:0}),g.removed=!1,e&&n.addToPool(p)}for(var R=0;R<a.length;R++){var T=a[R],I=T._private.data;pt(I.parent)&&(I.parent=""+I.parent);var A=I.parent,D=A!=null;if(D||T._private.parent){var N=T._private.parent?n.collection().merge(T._private.parent):n.getElementById(A);if(N.empty())I.parent=void 0;else if(N[0].removed())Qr("Node added with missing parent, reference to parent removed"),I.parent=void 0,T._private.parent=null;else{for(var O=!1,B=N;!B.empty();){if(T.same(B)){O=!0,I.parent=void 0;break}B=B.parent()}O||(N[0]._private.children.push(T),T._private.parent=N[0],i.hasCompoundNodes=!0)}}}if(o.length>0){for(var P=o.length===r.length?r:new fa(n,o),$=0;$<P.length;$++){var z=P[$];z.isNode()||(z.parallelEdges().clearTraversalCache(),z.source().clearTraversalCache(),z.target().clearTraversalCache())}var H;i.hasCompoundNodes?H=n.collection().merge(P).merge(P.connectedNodes()).merge(P.parent()):H=P,H.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?P.emitAndNotify("add"):e&&P.emit("add")}return r};Cn.removed=function(){var t=this[0];return t&&t._private.removed};Cn.inside=function(){var t=this[0];return t&&!t._private.removed};Cn.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],i={},a=r._private.cy;function s(A){for(var D=A._private.edges,N=0;N<D.length;N++)l(D[N])}function o(A){for(var D=A._private.children,N=0;N<D.length;N++)l(D[N])}function l(A){var D=i[A.id()];e&&A.removed()||D||(i[A.id()]=!0,A.isNode()?(n.push(A),s(A),o(A)):n.unshift(A))}for(var u=0,h=r.length;u<h;u++){var f=r[u];l(f)}function d(A,D){var N=A._private.edges;hf(N,D),A.clearTraversalCache()}function p(A){A.clearTraversalCache()}var g=[];g.ids={};function m(A,D){D=D[0],A=A[0];var N=A._private.children,O=A.id();hf(N,D),D._private.parent=null,g.ids[O]||(g.ids[O]=!0,g.push(A))}r.dirtyCompoundBoundsCache(),e&&a.removeFromPool(n);for(var x=0;x<n.length;x++){var y=n[x];if(y.isEdge()){var b=y.source()[0],w=y.target()[0];d(b,y),d(w,y);for(var _=y.parallelEdges(),k=0;k<_.length;k++){var E=_[k];p(E),E.isBundledBezier()&&E.dirtyBoundingBoxCache()}}else{var L=y.parent();L.length!==0&&m(L,y)}e&&(y._private.removed=!0)}var S=a._private.elements;a._private.hasCompoundNodes=!1;for(var C=0;C<S.length;C++){var M=S[C];if(M.isParent()){a._private.hasCompoundNodes=!0;break}}var R=new fa(this.cy(),n);R.size()>0&&(t?R.emitAndNotify("remove"):e&&R.emit("remove"));for(var T=0;T<g.length;T++){var I=g[T];(!e||!I.removed())&&I.updateStyle()}return R};Cn.move=function(t){var e=this._private.cy,r=this,n=!1,i=!1,a=function(g){return g==null?g:""+g};if(t.source!==void 0||t.target!==void 0){var s=a(t.source),o=a(t.target),l=s!=null&&e.hasElementWithId(s),u=o!=null&&e.hasElementWithId(o);(l||u)&&(e.batch(function(){r.remove(n,i),r.emitAndNotify("moveout");for(var p=0;p<r.length;p++){var g=r[p],m=g._private.data;g.isEdge()&&(l&&(m.source=s),u&&(m.target=o))}r.restore(n,i)}),r.emitAndNotify("move"))}else if(t.parent!==void 0){var h=a(t.parent),f=h===null||e.hasElementWithId(h);if(f){var d=h===null?void 0:h;e.batch(function(){var p=r.remove(n,i);p.emitAndNotify("moveout");for(var g=0;g<r.length;g++){var m=r[g],x=m._private.data;m.isNode()&&(x.parent=d)}p.restore(n,i)}),r.emitAndNotify("move")}}return this};[o0e,Iqe,v6,lf,Fm,Xqe,W6,uYe,I0e,M0e,gYe,R6,y6,ha,cf,Ca].forEach(function(t){Zt(Cn,t)});kYe={add:function(e){var r,n=this;if(to(e)){var i=e;if(i._private.cy===n)r=i.restore();else{for(var a=[],s=0;s<i.length;s++){var o=i[s];a.push(o.json())}r=new fa(n,a)}}else if(gn(e)){var l=e;r=new fa(n,l)}else if(Mr(e)&&(gn(e.nodes)||gn(e.edges))){for(var u=e,h=[],f=["nodes","edges"],d=0,p=f.length;d<p;d++){var g=f[d],m=u[g];if(gn(m))for(var x=0,y=m.length;x<y;x++){var b=Zt({group:g},m[x]);h.push(b)}}r=new fa(n,h)}else{var w=e;r=new F6(n,w).collection()}return r},remove:function(e){if(!to(e)){if(qt(e)){var r=e;e=this.$(r)}}return e.remove()}};EYe=function(){function t(n){return-n.tension*n.x-n.friction*n.v}function e(n,i,a){var s={x:n.x+a.dx*i,v:n.v+a.dv*i,tension:n.tension,friction:n.friction};return{dx:s.v,dv:t(s)}}function r(n,i){var a={dx:n.v,dv:t(n)},s=e(n,i*.5,a),o=e(n,i*.5,s),l=e(n,i,o),u=1/6*(a.dx+2*(s.dx+o.dx)+l.dx),h=1/6*(a.dv+2*(s.dv+o.dv)+l.dv);return n.x=n.x+u*i,n.v=n.v+h*i,n}return function n(i,a,s){var o={x:-1,v:0,tension:null,friction:null},l=[0],u=0,h=1/1e4,f=16/1e3,d,p,g;for(i=parseFloat(i)||500,a=parseFloat(a)||20,s=s||null,o.tension=i,o.friction=a,d=s!==null,d?(u=n(i,a),p=u/s*f):p=f;g=r(g||o,p),l.push(1+g.x),u+=16,Math.abs(g.x)>h&&Math.abs(g.v)>h;);return d?function(m){return l[m*(l.length-1)|0]}:u}}(),Sn=function(e,r,n,i){var a=TYe(e,r,n,i);return function(s,o,l){return s+(o-s)*a(l)}},x6={linear:function(e,r,n){return e+(r-e)*n},ease:Sn(.25,.1,.25,1),"ease-in":Sn(.42,0,1,1),"ease-out":Sn(0,0,.58,1),"ease-in-out":Sn(.42,0,.58,1),"ease-in-sine":Sn(.47,0,.745,.715),"ease-out-sine":Sn(.39,.575,.565,1),"ease-in-out-sine":Sn(.445,.05,.55,.95),"ease-in-quad":Sn(.55,.085,.68,.53),"ease-out-quad":Sn(.25,.46,.45,.94),"ease-in-out-quad":Sn(.455,.03,.515,.955),"ease-in-cubic":Sn(.55,.055,.675,.19),"ease-out-cubic":Sn(.215,.61,.355,1),"ease-in-out-cubic":Sn(.645,.045,.355,1),"ease-in-quart":Sn(.895,.03,.685,.22),"ease-out-quart":Sn(.165,.84,.44,1),"ease-in-out-quart":Sn(.77,0,.175,1),"ease-in-quint":Sn(.755,.05,.855,.06),"ease-out-quint":Sn(.23,1,.32,1),"ease-in-out-quint":Sn(.86,0,.07,1),"ease-in-expo":Sn(.95,.05,.795,.035),"ease-out-expo":Sn(.19,1,.22,1),"ease-in-out-expo":Sn(1,0,0,1),"ease-in-circ":Sn(.6,.04,.98,.335),"ease-out-circ":Sn(.075,.82,.165,1),"ease-in-out-circ":Sn(.785,.135,.15,.86),spring:function(e,r,n){if(n===0)return x6.linear;var i=EYe(e,r,n);return function(a,s,o){return a+(s-a)*i(o)}},"cubic-bezier":Sn};AYe={animate:Zr.animate(),animation:Zr.animation(),animated:Zr.animated(),clearQueue:Zr.clearQueue(),delay:Zr.delay(),delayAnimation:Zr.delayAnimation(),stop:Zr.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&S6(function(a){lde(a,e),r()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(a,s){lde(s,e)},n.beforeRenderPriorities.animations):r()}},_Ye={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var i=r.qualifier;return i!=null?e!==n.target&&wx(n.target)&&i.matches(n.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e}},f6=function(e){return qt(e)?new ff(e):e},P0e={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new H6(_Ye,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,n){return this.emitter().on(e,f6(r),n),this},removeListener:function(e,r,n){return this.emitter().removeListener(e,f6(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,n){return this.emitter().one(e,f6(r),n),this},once:function(e,r,n){return this.emitter().one(e,f6(r),n),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};Zr.eventAliasesOn(P0e);pD={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};pD.jpeg=pD.jpg;b6={layout:function(e){var r=this;if(e==null){ri("Layout options must be specified to make a layout");return}if(e.name==null){ri("A `name` must be specified to make a layout");return}var n=e.name,i=r.extension("layout",n);if(i==null){ri("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;qt(e.eles)?a=r.$(e.eles):a=e.eles!=null?e.eles:r.$();var s=new i(Zt({},e,{cy:r,eles:a}));return s}};b6.createLayout=b6.makeLayout=b6.layout;LYe={notify:function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&i.merge(r);return}if(n.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var i=e.batchNotifications[n];i.empty()?r.notify(n):r.notify(n,i)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),i=0;i<n.length;i++){var a=n[i],s=e[a],o=r.getElementById(a);o.data(s)}})}},RYe=da({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),gD={renderTo:function(e,r,n,i){var a=this._private.renderer;return a.renderTo(e,r,n,i),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(e){var r=this,n=r.extension("renderer",e.name);if(n==null){ri("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}e.wheelSensitivity!==void 0&&Qr("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var i=RYe(e);i.cy=r,r._private.renderer=new n(i),this.notify("init")},destroyRenderer:function(){var e=this;e.notify("destroy");var r=e.container();if(r)for(r._cyreg=null;r.childNodes.length>0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};gD.invalidateDimensions=gD.resize;w6={collection:function(e,r){return qt(e)?this.$(e):to(e)?e.collection():gn(e)?(r||(r={}),new fa(this,e,r.unique,r.removed)):new fa(this)},nodes:function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};w6.elements=w6.filter=w6.$;_a={},ox="t",NYe="f";_a.apply=function(t){for(var e=this,r=e._private,n=r.cy,i=n.collection(),a=0;a<t.length;a++){var s=t[a],o=e.getContextMeta(s);if(!o.empty){var l=e.getContextStyle(o),u=e.applyContextStyle(o,l,s);s._private.appliedInitStyle?e.updateTransitions(s,u.diffProps):s._private.appliedInitStyle=!0;var h=e.updateStyleHints(s);h&&i.push(s)}}return i};_a.getPropertiesDiff=function(t,e){var r=this,n=r._private.propDiffs=r._private.propDiffs||{},i=t+"-"+e,a=n[i];if(a)return a;for(var s=[],o={},l=0;l<r.length;l++){var u=r[l],h=t[l]===ox,f=e[l]===ox,d=h!==f,p=u.mappedProperties.length>0;if(d||f&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var m=0;m<g.length;m++){for(var x=g[m],y=x.name,b=!1,w=l+1;w<r.length;w++){var _=r[w],k=e[w]===ox;if(k&&(b=_.properties[x.name]!=null,b))break}!o[y]&&!b&&(o[y]=!0,s.push(y))}}}return n[i]=s,s};_a.getContextMeta=function(t){for(var e=this,r="",n,i=t._private.styleCxtKey||"",a=0;a<e.length;a++){var s=e[a],o=s.selector&&s.selector.matches(t);o?r+=ox:r+=NYe}return n=e.getPropertiesDiff(i,r),t._private.styleCxtKey=r,{key:r,diffPropNames:n,empty:n.length===0}};_a.getContextStyle=function(t){var e=t.key,r=this,n=this._private.contextStyles=this._private.contextStyles||{};if(n[e])return n[e];for(var i={_private:{key:e}},a=0;a<r.length;a++){var s=r[a],o=e[a]===ox;if(o)for(var l=0;l<s.properties.length;l++){var u=s.properties[l];i[u.name]=u}}return n[e]=i,i};_a.applyContextStyle=function(t,e,r){for(var n=this,i=t.diffPropNames,a={},s=n.types,o=0;o<i.length;o++){var l=i[o],u=e[l],h=r.pstyle(l);if(!u)if(h)h.bypass?u={name:l,deleteBypassed:!0}:u={name:l,delete:!0};else continue;if(h!==u){if(u.mapped===s.fn&&h!=null&&h.mapping!=null&&h.mapping.value===u.value){var f=h.mapping,d=f.fnValue=u.value(r);if(d===f.prevFnValue)continue}var p=a[l]={prev:h};n.applyParsedProperty(r,u),p.next=r.pstyle(l),p.next&&p.next.bypass&&(p.next=p.next.bypassed)}}return{diffProps:a}};_a.updateStyleHints=function(t){var e=t._private,r=this,n=r.propertyGroupNames,i=r.propertyGroupKeys,a=function(Q,se,ue){return r.getPropertiesHash(Q,se,ue)},s=e.styleKey;if(t.removed())return!1;var o=e.group==="nodes",l=t._private.style;n=Object.keys(l);for(var u=0;u<i.length;u++){var h=i[u];e.styleKeys[h]=[_m,nx]}for(var f=function(Q,se){return e.styleKeys[se][0]=ux(Q,e.styleKeys[se][0])},d=function(Q,se){return e.styleKeys[se][1]=hx(Q,e.styleKeys[se][1])},p=function(Q,se){f(Q,se),d(Q,se)},g=function(Q,se){for(var ue=0;ue<Q.length;ue++){var ce=Q.charCodeAt(ue);f(ce,se),d(ce,se)}},m=2e9,x=function(Q){return-128<Q&&Q<128&&Math.floor(Q)!==Q?m-(Q*1024|0):Q},y=0;y<n.length;y++){var b=n[y],w=l[b];if(w!=null){var _=this.properties[b],k=_.type,E=_.groupKey,L=void 0;_.hashOverride!=null?L=_.hashOverride(t,w):w.pfValue!=null&&(L=w.pfValue);var S=_.enums==null?w.value:null,C=L!=null,M=S!=null,R=C||M,T=w.units;if(k.number&&R&&!k.multiple){var I=C?L:S;p(x(I),E),!C&&T!=null&&g(T,E)}else g(w.strValue,E)}}for(var A=[_m,nx],D=0;D<i.length;D++){var N=i[D],O=e.styleKeys[N];A[0]=ux(O[0],A[0]),A[1]=hx(O[1],A[1])}e.styleKey=PUe(A[0],A[1]);var B=e.styleKeys;e.labelDimsKey=nf(B.labelDimensions);var P=a(t,["label"],B.labelDimensions);if(e.labelKey=nf(P),e.labelStyleKey=nf(n6(B.commonLabel,P)),!o){var $=a(t,["source-label"],B.labelDimensions);e.sourceLabelKey=nf($),e.sourceLabelStyleKey=nf(n6(B.commonLabel,$));var z=a(t,["target-label"],B.labelDimensions);e.targetLabelKey=nf(z),e.targetLabelStyleKey=nf(n6(B.commonLabel,z))}if(o){var H=e.styleKeys,Z=H.nodeBody,X=H.nodeBorder,ie=H.nodeOutline,K=H.backgroundImage,ee=H.compound,J=H.pie,W=[Z,X,ie,K,ee,J].filter(function(Y){return Y!=null}).reduce(n6,[_m,nx]);e.nodeKey=nf(W),e.hasPie=J!=null&&J[0]!==_m&&J[1]!==nx}return s!==e.styleKey};_a.clearStyleHints=function(t){var e=t._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null};_a.applyParsedProperty=function(t,e){var r=this,n=e,i=t._private.style,a,s=r.types,o=r.properties[n.name].type,l=n.bypass,u=i[n.name],h=u&&u.bypass,f=t._private,d="mapping",p=function(Z){return Z==null?null:Z.pfValue!=null?Z.pfValue:Z.value},g=function(){var Z=p(u),X=p(n);r.checkTriggers(t,n.name,Z,X)};if(e.name==="curve-style"&&t.isEdge()&&(e.value!=="bezier"&&t.isLoop()||e.value==="haystack"&&(t.source().isParent()||t.target().isParent()))&&(n=e=this.parse(e.name,"bezier",l)),n.delete)return i[n.name]=void 0,g(),!0;if(n.deleteBypassed)return u?u.bypass?(u.bypassed=void 0,g(),!0):!1:(g(),!0);if(n.deleteBypass)return u?u.bypass?(i[n.name]=u.bypassed,g(),!0):!1:(g(),!0);var m=function(){Qr("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+n.name+"` with data field `"+n.field+"`); try a `["+n.field+"]` selector to limit scope to elements with `"+n.field+"` defined")};switch(n.mapped){case s.mapData:{for(var x=n.field.split("."),y=f.data,b=0;b<x.length&&y;b++){var w=x[b];y=y[w]}if(y==null)return m(),!1;var _;if(pt(y)){var k=n.fieldMax-n.fieldMin;k===0?_=0:_=(y-n.fieldMin)/k}else return Qr("Do not use continuous mappers without specifying numeric data (i.e. `"+n.field+": "+y+"` for `"+t.id()+"` is non-numeric)"),!1;if(_<0?_=0:_>1&&(_=1),o.color){var E=n.valueMin[0],L=n.valueMax[0],S=n.valueMin[1],C=n.valueMax[1],M=n.valueMin[2],R=n.valueMax[2],T=n.valueMin[3]==null?1:n.valueMin[3],I=n.valueMax[3]==null?1:n.valueMax[3],A=[Math.round(E+(L-E)*_),Math.round(S+(C-S)*_),Math.round(M+(R-M)*_),Math.round(T+(I-T)*_)];a={bypass:n.bypass,name:n.name,value:A,strValue:"rgb("+A[0]+", "+A[1]+", "+A[2]+")"}}else if(o.number){var D=n.valueMin+(n.valueMax-n.valueMin)*_;a=this.parse(n.name,D,n.bypass,d)}else return!1;if(!a)return m(),!1;a.mapping=n,n=a;break}case s.data:{for(var N=n.field.split("."),O=f.data,B=0;B<N.length&&O;B++){var P=N[B];O=O[P]}if(O!=null&&(a=this.parse(n.name,O,n.bypass,d)),!a)return m(),!1;a.mapping=n,n=a;break}case s.fn:{var $=n.value,z=n.fnValue!=null?n.fnValue:$(t);if(n.prevFnValue=z,z==null)return Qr("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+t.id()+"` is null)"),!1;if(a=this.parse(n.name,z,n.bypass,d),!a)return Qr("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+t.id()+"` is invalid)"),!1;a.mapping=Ic(n),n=a;break}case void 0:break;default:return!1}return l?(h?n.bypassed=u.bypassed:n.bypassed=u,i[n.name]=n):h?u.bypassed=n:i[n.name]=n,g(),!0};_a.cleanElements=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),!e)n._private.style={};else for(var i=n._private.style,a=Object.keys(i),s=0;s<a.length;s++){var o=a[s],l=i[o];l!=null&&(l.bypass?l.bypassed=null:i[o]=null)}}};_a.update=function(){var t=this._private.cy,e=t.mutableElements();e.updateStyle()};_a.updateTransitions=function(t,e){var r=this,n=t._private,i=t.pstyle("transition-property").value,a=t.pstyle("transition-duration").pfValue,s=t.pstyle("transition-delay").pfValue;if(i.length>0&&a>0){for(var o={},l=!1,u=0;u<i.length;u++){var h=i[u],f=t.pstyle(h),d=e[h];if(d){var p=d.prev,g=p,m=d.next!=null?d.next:f,x=!1,y=void 0,b=1e-6;g&&(pt(g.pfValue)&&pt(m.pfValue)?(x=m.pfValue-g.pfValue,y=g.pfValue+b*x):pt(g.value)&&pt(m.value)?(x=m.value-g.value,y=g.value+b*x):gn(g.value)&&gn(m.value)&&(x=g.value[0]!==m.value[0]||g.value[1]!==m.value[1]||g.value[2]!==m.value[2],y=g.strValue),x&&(o[h]=m.strValue,this.applyBypass(t,h,y),l=!0))}}if(!l)return;n.transitioning=!0,new $m(function(w){s>0?t.delayAnimation(s).play().promise().then(w):w()}).then(function(){return t.animation({style:o,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1)};_a.checkTrigger=function(t,e,r,n,i,a){var s=this.properties[e],o=i(s);o!=null&&o(r,n)&&a(s)};_a.checkZOrderTrigger=function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,function(a){return a.triggersZOrder},function(){i._private.cy.notify("zorder",t)})};_a.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBounds},function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),i.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(r==="bezier"||n==="bezier")&&t.parallelEdges().forEach(function(a){a.isBundledBezier()&&a.dirtyBoundingBoxCache()}),i.triggersBoundsOfConnectedEdges&&e==="display"&&(r==="none"||n==="none")&&t.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};_a.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n)};Sx={};Sx.applyBypass=function(t,e,r,n){var i=this,a=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var o=0;o<i.properties.length;o++){var l=i.properties[o],u=l.name,h=this.parse(u,r,!0);h&&a.push(h)}}else if(qt(e)){var f=this.parse(e,r,!0);f&&a.push(f)}else if(Mr(e)){var d=e;n=r;for(var p=Object.keys(d),g=0;g<p.length;g++){var m=p[g],x=d[m];if(x===void 0&&(x=d[O6(m)]),x!==void 0){var y=this.parse(m,x,!0);y&&a.push(y)}}}else return!1;if(a.length===0)return!1;for(var b=!1,w=0;w<t.length;w++){for(var _=t[w],k={},E=void 0,L=0;L<a.length;L++){var S=a[L];if(n){var C=_.pstyle(S.name);E=k[S.name]={prev:C}}b=this.applyParsedProperty(_,Ic(S))||b,n&&(E.next=_.pstyle(S.name))}b&&this.updateStyleHints(_),n&&this.updateTransitions(_,k,s)}return b};Sx.overrideBypass=function(t,e,r){e=AD(e);for(var n=0;n<t.length;n++){var i=t[n],a=i._private.style[e],s=this.properties[e].type,o=s.color,l=s.mutiple,u=a?a.pfValue!=null?a.pfValue:a.value:null;!a||!a.bypass?this.applyBypass(i,e,r):(a.value=r,a.pfValue!=null&&(a.pfValue=r),o?a.strValue="rgb("+r.join(",")+")":l?a.strValue=r.join(" "):a.strValue=""+r,this.updateStyleHints(i)),this.checkTriggers(i,e,u,r)}};Sx.removeAllBypasses=function(t,e){return this.removeBypasses(t,this.propertyNames,e)};Sx.removeBypasses=function(t,e,r){for(var n=!0,i=0;i<t.length;i++){for(var a=t[i],s={},o=0;o<e.length;o++){var l=e[o],u=this.properties[l],h=a.pstyle(u.name);if(!(!h||!h.bypass)){var f="",d=this.parse(l,f,!0),p=s[u.name]={prev:h};this.applyParsedProperty(a,d),p.next=a.pstyle(u.name)}}this.updateStyleHints(a),r&&this.updateTransitions(a,s,n)}};GD={};GD.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1};GD.containerCss=function(t){var e=this._private.cy,r=e.container(),n=e.window();if(n&&r&&n.getComputedStyle)return n.getComputedStyle(r).getPropertyValue(t)};Dc={};Dc.getRenderedStyle=function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)};Dc.getRawStyle=function(t,e){var r=this;if(t=t[0],t){for(var n={},i=0;i<r.properties.length;i++){var a=r.properties[i],s=r.getStylePropertyValue(t,a.name,e);s!=null&&(n[a.name]=s,n[O6(a.name)]=s)}return n}};Dc.getIndexedStyle=function(t,e,r,n){var i=t.pstyle(e)[r][n];return i??t.cy().style().getDefaultProperty(e)[r][0]};Dc.getStylePropertyValue=function(t,e,r){var n=this;if(t=t[0],t){var i=n.properties[e];i.alias&&(i=i.pointsTo);var a=i.type,s=t.pstyle(i.name);if(s){var o=s.value,l=s.units,u=s.strValue;if(r&&a.number&&o!=null&&pt(o)){var h=t.cy().zoom(),f=function(x){return x*h},d=function(x,y){return f(x)+y},p=gn(o),g=p?l.every(function(m){return m!=null}):l!=null;return g?p?o.map(function(m,x){return d(m,l[x])}).join(" "):d(o,l):p?o.map(function(m){return qt(m)?m:""+f(m)}).join(" "):""+f(o)}else if(u!=null)return u}return null}};Dc.getAnimationStartStyle=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n],a=i.name,s=t.pstyle(a);s!==void 0&&(Mr(s)?s=this.parse(a,s.strValue):s=this.parse(a,s)),s&&(r[a]=s)}return r};Dc.getPropsList=function(t){var e=this,r=[],n=t,i=e.properties;if(n)for(var a=Object.keys(n),s=0;s<a.length;s++){var o=a[s],l=n[o],u=i[o]||i[AD(o)],h=this.parse(u.name,l);h&&r.push(h)}return r};Dc.getNonDefaultPropertiesHash=function(t,e,r){var n=r.slice(),i,a,s,o,l,u;for(l=0;l<e.length;l++)if(i=e[l],a=t.pstyle(i,!1),a!=null)if(a.pfValue!=null)n[0]=ux(o,n[0]),n[1]=hx(o,n[1]);else for(s=a.strValue,u=0;u<s.length;u++)o=s.charCodeAt(u),n[0]=ux(o,n[0]),n[1]=hx(o,n[1]);return n};Dc.getPropertiesHash=Dc.getNonDefaultPropertiesHash;X6={};X6.appendFromJson=function(t){for(var e=this,r=0;r<t.length;r++){var n=t[r],i=n.selector,a=n.style||n.css,s=Object.keys(a);e.selector(i);for(var o=0;o<s.length;o++){var l=s[o],u=a[l];e.css(l,u)}}return e};X6.fromJson=function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e};X6.json=function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],n=r.selector,i=r.properties,a={},s=0;s<i.length;s++){var o=i[s];a[o.name]=o.strValue}t.push({selector:n?n.toString():"core",style:a})}return t};UD={};UD.appendFromString=function(t){var e=this,r=this,n=""+t,i,a,s;n=n.replace(/[/][*](\\s|.)+?[*][/]/g,"");function o(){n.length>i.length?n=n.substr(i.length):n=""}function l(){a.length>s.length?a=a.substr(s.length):a=""}for(;;){var u=n.match(/^\\s*$/);if(u)break;var h=n.match(/^\\s*((?:.|\\s)+?)\\s*\\{((?:.|\\s)+?)\\}/);if(!h){Qr("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=h[0];var f=h[1];if(f!=="core"){var d=new ff(f);if(d.invalid){Qr("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var p=h[2],g=!1;a=p;for(var m=[];;){var x=a.match(/^\\s*$/);if(x)break;var y=a.match(/^\\s*(.+?)\\s*:\\s*(.+?)(?:\\s*;|\\s*$)/);if(!y){Qr("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+p),g=!0;break}s=y[0];var b=y[1],w=y[2],_=e.properties[b];if(!_){Qr("Skipping property: Invalid property name in: "+s),l();continue}var k=r.parse(b,w);if(!k){Qr("Skipping property: Invalid property definition in: "+s),l();continue}m.push({name:b,val:w}),l()}if(g){o();break}r.selector(f);for(var E=0;E<m.length;E++){var L=m[E];r.css(L.name,L.val)}o()}return r};UD.fromString=function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e};ua={};(function(){var t=Ii,e=zGe,r=GGe,n=UGe,i=VGe,a=function(W){return"^"+W+"\\\\s*\\\\(\\\\s*([\\\\w\\\\.]+)\\\\s*\\\\)$"},s=function(W){var Y=t+"|\\\\w+|"+e+"|"+r+"|"+n+"|"+i;return"^"+W+"\\\\s*\\\\(([\\\\w\\\\.]+)\\\\s*\\\\,\\\\s*("+t+")\\\\s*\\\\,\\\\s*("+t+")\\\\s*,\\\\s*("+Y+")\\\\s*\\\\,\\\\s*("+Y+")\\\\)$"},o=[`^url\\\\s*\\\\(\\\\s*[\'"]?(.+?)[\'"]?\\\\s*\\\\)$`,"^(none)$","^(.+)$"];ua.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:\'^([\\\\w- \\\\"]+(?:\\\\s*,\\\\s*[\\\\w- \\\\"]+)*)$\'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:a("data")},layoutData:{mapping:!0,regex:a("layoutData")},scratch:{mapping:!0,regex:a("scratch")},mapData:{mapping:!0,regex:s("mapData")},mapLayoutData:{mapping:!0,regex:s("mapLayoutData")},mapScratch:{mapping:!0,regex:s("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:o,singleRegexMatchValue:!0},urls:{regexes:o,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(W,Y){switch(W.length){case 2:return Y[0]!=="deg"&&Y[0]!=="rad"&&Y[1]!=="deg"&&Y[1]!=="rad";case 1:return qt(W[0])||Y[0]==="deg"||Y[0]==="rad";default:return!1}}},easing:{regexes:["^(spring)\\\\s*\\\\(\\\\s*("+t+")\\\\s*,\\\\s*("+t+")\\\\s*\\\\)$","^(cubic-bezier)\\\\s*\\\\(\\\\s*("+t+")\\\\s*,\\\\s*("+t+")\\\\s*,\\\\s*("+t+")\\\\s*,\\\\s*("+t+")\\\\s*\\\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(W){var Y=W.length;return Y===1||Y===2||Y===4}}};var l={zeroNonZero:function(W,Y){return(W==null||Y==null)&&W!==Y||W==0&&Y!=0?!0:W!=0&&Y==0},any:function(W,Y){return W!=Y},emptyNonEmpty:function(W,Y){var Q=uf(W),se=uf(Y);return Q&&!se||!Q&&se}},u=ua.types,h=[{name:"label",type:u.text,triggersBounds:l.any,triggersZOrder:l.emptyNonEmpty},{name:"text-rotation",type:u.textRotation,triggersBounds:l.any},{name:"text-margin-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"text-margin-y",type:u.bidirectionalSize,triggersBounds:l.any}],f=[{name:"source-label",type:u.text,triggersBounds:l.any},{name:"source-text-rotation",type:u.textRotation,triggersBounds:l.any},{name:"source-text-margin-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"source-text-margin-y",type:u.bidirectionalSize,triggersBounds:l.any},{name:"source-text-offset",type:u.size,triggersBounds:l.any}],d=[{name:"target-label",type:u.text,triggersBounds:l.any},{name:"target-text-rotation",type:u.textRotation,triggersBounds:l.any},{name:"target-text-margin-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"target-text-margin-y",type:u.bidirectionalSize,triggersBounds:l.any},{name:"target-text-offset",type:u.size,triggersBounds:l.any}],p=[{name:"font-family",type:u.fontFamily,triggersBounds:l.any},{name:"font-style",type:u.fontStyle,triggersBounds:l.any},{name:"font-weight",type:u.fontWeight,triggersBounds:l.any},{name:"font-size",type:u.size,triggersBounds:l.any},{name:"text-transform",type:u.textTransform,triggersBounds:l.any},{name:"text-wrap",type:u.textWrap,triggersBounds:l.any},{name:"text-overflow-wrap",type:u.textOverflowWrap,triggersBounds:l.any},{name:"text-max-width",type:u.size,triggersBounds:l.any},{name:"text-outline-width",type:u.size,triggersBounds:l.any},{name:"line-height",type:u.positiveNumber,triggersBounds:l.any}],g=[{name:"text-valign",type:u.valign,triggersBounds:l.any},{name:"text-halign",type:u.halign,triggersBounds:l.any},{name:"color",type:u.color},{name:"text-outline-color",type:u.color},{name:"text-outline-opacity",type:u.zeroOneNumber},{name:"text-background-color",type:u.color},{name:"text-background-opacity",type:u.zeroOneNumber},{name:"text-background-padding",type:u.size,triggersBounds:l.any},{name:"text-border-opacity",type:u.zeroOneNumber},{name:"text-border-color",type:u.color},{name:"text-border-width",type:u.size,triggersBounds:l.any},{name:"text-border-style",type:u.borderStyle,triggersBounds:l.any},{name:"text-background-shape",type:u.textBackgroundShape,triggersBounds:l.any},{name:"text-justification",type:u.justification}],m=[{name:"events",type:u.bool,triggersZOrder:l.any},{name:"text-events",type:u.bool,triggersZOrder:l.any}],x=[{name:"display",type:u.display,triggersZOrder:l.any,triggersBounds:l.any,triggersBoundsOfConnectedEdges:!0},{name:"visibility",type:u.visibility,triggersZOrder:l.any},{name:"opacity",type:u.zeroOneNumber,triggersZOrder:l.zeroNonZero},{name:"text-opacity",type:u.zeroOneNumber},{name:"min-zoomed-font-size",type:u.size},{name:"z-compound-depth",type:u.zCompoundDepth,triggersZOrder:l.any},{name:"z-index-compare",type:u.zIndexCompare,triggersZOrder:l.any},{name:"z-index",type:u.number,triggersZOrder:l.any}],y=[{name:"overlay-padding",type:u.size,triggersBounds:l.any},{name:"overlay-color",type:u.color},{name:"overlay-opacity",type:u.zeroOneNumber,triggersBounds:l.zeroNonZero},{name:"overlay-shape",type:u.overlayShape,triggersBounds:l.any},{name:"overlay-corner-radius",type:u.cornerRadius}],b=[{name:"underlay-padding",type:u.size,triggersBounds:l.any},{name:"underlay-color",type:u.color},{name:"underlay-opacity",type:u.zeroOneNumber,triggersBounds:l.zeroNonZero},{name:"underlay-shape",type:u.overlayShape,triggersBounds:l.any},{name:"underlay-corner-radius",type:u.cornerRadius}],w=[{name:"transition-property",type:u.propList},{name:"transition-duration",type:u.time},{name:"transition-delay",type:u.time},{name:"transition-timing-function",type:u.easing}],_=function(W,Y){return Y.value==="label"?-W.poolIndex():Y.pfValue},k=[{name:"height",type:u.nodeSize,triggersBounds:l.any,hashOverride:_},{name:"width",type:u.nodeSize,triggersBounds:l.any,hashOverride:_},{name:"shape",type:u.nodeShape,triggersBounds:l.any},{name:"shape-polygon-points",type:u.polygonPointList,triggersBounds:l.any},{name:"corner-radius",type:u.cornerRadius},{name:"background-color",type:u.color},{name:"background-fill",type:u.fill},{name:"background-opacity",type:u.zeroOneNumber},{name:"background-blacken",type:u.nOneOneNumber},{name:"background-gradient-stop-colors",type:u.colors},{name:"background-gradient-stop-positions",type:u.percentages},{name:"background-gradient-direction",type:u.gradientDirection},{name:"padding",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"padding-relative-to",type:u.paddingRelativeTo,triggersBounds:l.any},{name:"bounds-expansion",type:u.boundsExpansion,triggersBounds:l.any}],E=[{name:"border-color",type:u.color},{name:"border-opacity",type:u.zeroOneNumber},{name:"border-width",type:u.size,triggersBounds:l.any},{name:"border-style",type:u.borderStyle},{name:"border-cap",type:u.lineCap},{name:"border-join",type:u.lineJoin},{name:"border-dash-pattern",type:u.numbers},{name:"border-dash-offset",type:u.number},{name:"border-position",type:u.linePosition}],L=[{name:"outline-color",type:u.color},{name:"outline-opacity",type:u.zeroOneNumber},{name:"outline-width",type:u.size,triggersBounds:l.any},{name:"outline-style",type:u.borderStyle},{name:"outline-offset",type:u.size,triggersBounds:l.any}],S=[{name:"background-image",type:u.urls},{name:"background-image-crossorigin",type:u.bgCrossOrigin},{name:"background-image-opacity",type:u.zeroOneNumbers},{name:"background-image-containment",type:u.bgContainment},{name:"background-image-smoothing",type:u.bools},{name:"background-position-x",type:u.bgPos},{name:"background-position-y",type:u.bgPos},{name:"background-width-relative-to",type:u.bgRelativeTo},{name:"background-height-relative-to",type:u.bgRelativeTo},{name:"background-repeat",type:u.bgRepeat},{name:"background-fit",type:u.bgFit},{name:"background-clip",type:u.bgClip},{name:"background-width",type:u.bgWH},{name:"background-height",type:u.bgWH},{name:"background-offset-x",type:u.bgPos},{name:"background-offset-y",type:u.bgPos}],C=[{name:"position",type:u.position,triggersBounds:l.any},{name:"compound-sizing-wrt-labels",type:u.compoundIncludeLabels,triggersBounds:l.any},{name:"min-width",type:u.size,triggersBounds:l.any},{name:"min-width-bias-left",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"min-width-bias-right",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"min-height",type:u.size,triggersBounds:l.any},{name:"min-height-bias-top",type:u.sizeMaybePercent,triggersBounds:l.any},{name:"min-height-bias-bottom",type:u.sizeMaybePercent,triggersBounds:l.any}],M=[{name:"line-style",type:u.lineStyle},{name:"line-color",type:u.color},{name:"line-fill",type:u.fill},{name:"line-cap",type:u.lineCap},{name:"line-opacity",type:u.zeroOneNumber},{name:"line-dash-pattern",type:u.numbers},{name:"line-dash-offset",type:u.number},{name:"line-outline-width",type:u.size},{name:"line-outline-color",type:u.color},{name:"line-gradient-stop-colors",type:u.colors},{name:"line-gradient-stop-positions",type:u.percentages},{name:"curve-style",type:u.curveStyle,triggersBounds:l.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:u.zeroOneNumber,triggersBounds:l.any},{name:"source-endpoint",type:u.edgeEndpoint,triggersBounds:l.any},{name:"target-endpoint",type:u.edgeEndpoint,triggersBounds:l.any},{name:"control-point-step-size",type:u.size,triggersBounds:l.any},{name:"control-point-distances",type:u.bidirectionalSizes,triggersBounds:l.any},{name:"control-point-weights",type:u.numbers,triggersBounds:l.any},{name:"segment-distances",type:u.bidirectionalSizes,triggersBounds:l.any},{name:"segment-weights",type:u.numbers,triggersBounds:l.any},{name:"segment-radii",type:u.numbers,triggersBounds:l.any},{name:"radius-type",type:u.radiusType,triggersBounds:l.any},{name:"taxi-turn",type:u.bidirectionalSizeMaybePercent,triggersBounds:l.any},{name:"taxi-turn-min-distance",type:u.size,triggersBounds:l.any},{name:"taxi-direction",type:u.axisDirection,triggersBounds:l.any},{name:"taxi-radius",type:u.number,triggersBounds:l.any},{name:"edge-distances",type:u.edgeDistances,triggersBounds:l.any},{name:"arrow-scale",type:u.positiveNumber,triggersBounds:l.any},{name:"loop-direction",type:u.angle,triggersBounds:l.any},{name:"loop-sweep",type:u.angle,triggersBounds:l.any},{name:"source-distance-from-node",type:u.size,triggersBounds:l.any},{name:"target-distance-from-node",type:u.size,triggersBounds:l.any}],R=[{name:"ghost",type:u.bool,triggersBounds:l.any},{name:"ghost-offset-x",type:u.bidirectionalSize,triggersBounds:l.any},{name:"ghost-offset-y",type:u.bidirectionalSize,triggersBounds:l.any},{name:"ghost-opacity",type:u.zeroOneNumber}],T=[{name:"selection-box-color",type:u.color},{name:"selection-box-opacity",type:u.zeroOneNumber},{name:"selection-box-border-color",type:u.color},{name:"selection-box-border-width",type:u.size},{name:"active-bg-color",type:u.color},{name:"active-bg-opacity",type:u.zeroOneNumber},{name:"active-bg-size",type:u.size},{name:"outside-texture-bg-color",type:u.color},{name:"outside-texture-bg-opacity",type:u.zeroOneNumber}],I=[];ua.pieBackgroundN=16,I.push({name:"pie-size",type:u.sizeMaybePercent});for(var A=1;A<=ua.pieBackgroundN;A++)I.push({name:"pie-"+A+"-background-color",type:u.color}),I.push({name:"pie-"+A+"-background-size",type:u.percent}),I.push({name:"pie-"+A+"-background-opacity",type:u.zeroOneNumber});var D=[],N=ua.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:u.arrowShape,triggersBounds:l.any},{name:"arrow-color",type:u.color},{name:"arrow-fill",type:u.arrowFill},{name:"arrow-width",type:u.arrowWidth}].forEach(function(J){N.forEach(function(W){var Y=W+"-"+J.name,Q=J.type,se=J.triggersBounds;D.push({name:Y,type:Q,triggersBounds:se})})},{});var O=ua.properties=[].concat(m,w,x,y,b,R,g,p,h,f,d,k,E,L,S,I,C,M,D,T),B=ua.propertyGroups={behavior:m,transition:w,visibility:x,overlay:y,underlay:b,ghost:R,commonLabel:g,labelDimensions:p,mainLabel:h,sourceLabel:f,targetLabel:d,nodeBody:k,nodeBorder:E,nodeOutline:L,backgroundImage:S,pie:I,compound:C,edgeLine:M,edgeArrow:D,core:T},P=ua.propertyGroupNames={},$=ua.propertyGroupKeys=Object.keys(B);$.forEach(function(J){P[J]=B[J].map(function(W){return W.name}),B[J].forEach(function(W){return W.groupKey=J})});var z=ua.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];ua.propertyNames=O.map(function(J){return J.name});for(var H=0;H<O.length;H++){var Z=O[H];O[Z.name]=Z}for(var X=0;X<z.length;X++){var ie=z[X],K=O[ie.pointsTo],ee={name:ie.name,alias:!0,pointsTo:K};O.push(ee),O[ie.name]=ee}})();ua.getDefaultProperty=function(t){return this.getDefaultProperties()[t]};ua.getDefaultProperties=function(){var t=this._private;if(t.defaultProperties!=null)return t.defaultProperties;for(var e=Zt({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(l,u){for(var h=1;h<=ua.pieBackgroundN;h++){var f=u.name.replace("{{i}}",h),d=u.value;l[f]=d}return l},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(l,u){return ua.arrowPrefixes.forEach(function(h){var f=h+"-"+u.name,d=u.value;l[f]=d}),l},{})),r={},n=0;n<this.properties.length;n++){var i=this.properties[n];if(!i.pointsTo){var a=i.name,s=e[a],o=this.parse(a,s);r[a]=o}}return t.defaultProperties=r,t.defaultProperties};ua.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};j6={};j6.parse=function(t,e,r,n){var i=this;if(Xn(e))return i.parseImplWarn(t,e,r,n);var a=n==="mapping"||n===!0||n===!1||n==null?"dontcare":n,s=r?"t":"f",o=""+e,l=Hde(t,o,s,a),u=i.propCache=i.propCache||[],h;return(h=u[l])||(h=u[l]=i.parseImplWarn(t,e,r,n)),(r||n==="mapping")&&(h=Ic(h),h&&(h.value=Ic(h.value))),h};j6.parseImplWarn=function(t,e,r,n){var i=this.parseImpl(t,e,r,n);return!i&&e!=null&&Qr("The style property `".concat(t,": ").concat(e,"` is invalid")),i&&(i.name==="width"||i.name==="height")&&e==="label"&&Qr("The style value of `label` is deprecated for `"+i.name+"`"),i};j6.parseImpl=function(t,e,r,n){var i=this;t=AD(t);var a=i.properties[t],s=e,o=i.types;if(!a||e===void 0)return null;a.alias&&(a=a.pointsTo,t=a.name);var l=qt(e);l&&(e=e.trim());var u=a.type;if(!u)return null;if(r&&(e===""||e===null))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(Xn(e))return{name:t,value:e,strValue:"fn",mapped:o.fn,bypass:r};var h,f;if(!(!l||n||e.length<7||e[1]!=="a")){if(e.length>=7&&e[0]==="d"&&(h=new RegExp(o.data.regex).exec(e))){if(r)return!1;var d=o.data;return{name:t,value:h,strValue:""+e,mapped:d,field:h[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(r||u.multiple)return!1;var p=o.mapData;if(!(u.color||u.number))return!1;var g=this.parse(t,f[4]);if(!g||g.mapped)return!1;var m=this.parse(t,f[5]);if(!m||m.mapped)return!1;if(g.pfValue===m.pfValue||g.strValue===m.strValue)return Qr("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+g.strValue+"`"),this.parse(t,g.strValue);if(u.color){var x=g.value,y=m.value,b=x[0]===y[0]&&x[1]===y[1]&&x[2]===y[2]&&(x[3]===y[3]||(x[3]==null||x[3]===1)&&(y[3]==null||y[3]===1));if(b)return!1}return{name:t,value:f,strValue:""+e,mapped:p,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:g.value,valueMax:m.value,bypass:r}}}if(u.multiple&&n!=="multiple"){var w;if(l?w=e.split(/\\s+/):gn(e)?w=e:w=[e],u.evenMultiple&&w.length%2!==0)return null;for(var _=[],k=[],E=[],L="",S=!1,C=0;C<w.length;C++){var M=i.parse(t,w[C],r,"multiple");S=S||qt(M.value),_.push(M.value),E.push(M.pfValue!=null?M.pfValue:M.value),k.push(M.units),L+=(C>0?" ":"")+M.strValue}return u.validate&&!u.validate(_,k)?null:u.singleEnum&&S?_.length===1&&qt(_[0])?{name:t,value:_[0],strValue:_[0],bypass:r}:null:{name:t,value:_,pfValue:E,strValue:L,bypass:r,units:k}}var R=function(){for(var W=0;W<u.enums.length;W++){var Y=u.enums[W];if(Y===e)return{name:t,value:e,strValue:""+e,bypass:r}}return null};if(u.number){var T,I="px";if(u.units&&(T=u.units),u.implicitUnits&&(I=u.implicitUnits),!u.unitless)if(l){var A="px|em"+(u.allowPercent?"|\\\\%":"");T&&(A=T);var D=e.match("^("+Ii+")("+A+")?$");D&&(e=D[1],T=D[2]||I)}else(!T||u.implicitUnits)&&(T=I);if(e=parseFloat(e),isNaN(e)&&u.enums===void 0)return null;if(isNaN(e)&&u.enums!==void 0)return e=s,R();if(u.integer&&!IGe(e)||u.min!==void 0&&(e<u.min||u.strictMin&&e===u.min)||u.max!==void 0&&(e>u.max||u.strictMax&&e===u.max))return null;var N={name:t,value:e,strValue:""+e+(T||""),units:T,bypass:r};return u.unitless||T!=="px"&&T!=="em"?N.pfValue=e:N.pfValue=T==="px"||!T?e:this.getEmSizeInPixels()*e,(T==="ms"||T==="s")&&(N.pfValue=T==="ms"?e:1e3*e),(T==="deg"||T==="rad")&&(N.pfValue=T==="rad"?e:fVe(e)),T==="%"&&(N.pfValue=e/100),N}else if(u.propList){var O=[],B=""+e;if(B!=="none"){for(var P=B.split(/\\s*,\\s*|\\s+/),$=0;$<P.length;$++){var z=P[$].trim();i.properties[z]?O.push(z):Qr("`"+z+"` is not a valid property name")}if(O.length===0)return null}return{name:t,value:O,strValue:O.length===0?"none":O.join(" "),bypass:r}}else if(u.color){var H=jGe(e);return H?{name:t,value:H,pfValue:H,strValue:"rgb("+H[0]+","+H[1]+","+H[2]+")",bypass:r}:null}else if(u.regex||u.regexes){if(u.enums){var Z=R();if(Z)return Z}for(var X=u.regexes?u.regexes:[u.regex],ie=0;ie<X.length;ie++){var K=new RegExp(X[ie]),ee=K.exec(e);if(ee)return{name:t,value:u.singleRegexMatchValue?ee[1]:ee,strValue:""+e,bypass:r}}return null}else return u.string?{name:t,value:""+e,strValue:""+e,bypass:r}:u.enums?R():null};Sa=function t(e){if(!(this instanceof t))return new t(e);if(!CD(e)){ri("A style must have a core reference");return}this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()},Aa=Sa.prototype;Aa.instanceString=function(){return"style"};Aa.clear=function(){for(var t=this._private,e=t.cy,r=e.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(r,!0),r.forEach(function(i){var a=i[0]._private;a.styleDirty=!0,a.appliedInitStyle=!1}),this};Aa.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this};Aa.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)};Aa.selector=function(t){var e=t==="core"?null:new ff(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this};Aa.css=function(){var t=this,e=arguments;if(e.length===1)for(var r=e[0],n=0;n<t.properties.length;n++){var i=t.properties[n],a=r[i.name];a===void 0&&(a=r[O6(i.name)]),a!==void 0&&this.cssRule(i.name,a)}else e.length===2&&this.cssRule(e[0],e[1]);return this};Aa.style=Aa.css;Aa.cssRule=function(t,e){var r=this.parse(t,e);if(r){var n=this.length-1;this[n].properties.push(r),this[n].properties[r.name]=r,r.name.match(/pie-(\\d+)-background-size/)&&r.value&&(this._private.hasPie=!0),r.mapped&&this[n].mappedProperties.push(r);var i=!this[n].selector;i&&(this._private.coreStyle[r.name]=r)}return this};Aa.append=function(t){return Ode(t)?t.appendToStyle(this):gn(t)?this.appendFromJson(t):qt(t)&&this.appendFromString(t),this};Sa.fromJson=function(t,e){var r=new Sa(t);return r.fromJson(e),r};Sa.fromString=function(t,e){return new Sa(t).fromString(e)};[_a,Sx,GD,Dc,X6,UD,ua,j6].forEach(function(t){Zt(Aa,t)});Sa.types=Aa.types;Sa.properties=Aa.properties;Sa.propertyGroups=Aa.propertyGroups;Sa.propertyGroupNames=Aa.propertyGroupNames;Sa.propertyGroupKeys=Aa.propertyGroupKeys;IYe={style:function(e){if(e){var r=this.setStyle(e);r.update()}return this._private.style},setStyle:function(e){var r=this._private;return Ode(e)?r.style=e.generateStyle(this):gn(e)?r.style=Sa.fromJson(this,e):qt(e)?r.style=Sa.fromString(this,e):r.style=Sa(this),r.style},updateStyle:function(){this.mutableElements().updateStyle()}},MYe="single",A0={autolock:function(e){if(e!==void 0)this._private.autolock=!!e;else return this._private.autolock;return this},autoungrabify:function(e){if(e!==void 0)this._private.autoungrabify=!!e;else return this._private.autoungrabify;return this},autounselectify:function(e){if(e!==void 0)this._private.autounselectify=!!e;else return this._private.autounselectify;return this},selectionType:function(e){var r=this._private;if(r.selectionType==null&&(r.selectionType=MYe),e!==void 0)(e==="additive"||e==="single")&&(r.selectionType=e);else return r.selectionType;return this},panningEnabled:function(e){if(e!==void 0)this._private.panningEnabled=!!e;else return this._private.panningEnabled;return this},userPanningEnabled:function(e){if(e!==void 0)this._private.userPanningEnabled=!!e;else return this._private.userPanningEnabled;return this},zoomingEnabled:function(e){if(e!==void 0)this._private.zoomingEnabled=!!e;else return this._private.zoomingEnabled;return this},userZoomingEnabled:function(e){if(e!==void 0)this._private.userZoomingEnabled=!!e;else return this._private.userZoomingEnabled;return this},boxSelectionEnabled:function(e){if(e!==void 0)this._private.boxSelectionEnabled=!!e;else return this._private.boxSelectionEnabled;return this},pan:function(){var e=arguments,r=this._private.pan,n,i,a,s,o;switch(e.length){case 0:return r;case 1:if(qt(e[0]))return n=e[0],r[n];if(Mr(e[0])){if(!this._private.panningEnabled)return this;a=e[0],s=a.x,o=a.y,pt(s)&&(r.x=s),pt(o)&&(r.y=o),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;n=e[0],i=e[1],(n==="x"||n==="y")&&pt(i)&&(r[n]=i),this.emit("pan viewport");break}return this.notify("viewport"),this},panBy:function(e,r){var n=arguments,i=this._private.pan,a,s,o,l,u;if(!this._private.panningEnabled)return this;switch(n.length){case 1:Mr(e)&&(o=n[0],l=o.x,u=o.y,pt(l)&&(i.x+=l),pt(u)&&(i.y+=u),this.emit("pan viewport"));break;case 2:a=e,s=r,(a==="x"||a==="y")&&pt(s)&&(i[a]+=s),this.emit("pan viewport");break}return this.notify("viewport"),this},fit:function(e,r){var n=this.getFitViewport(e,r);if(n){var i=this._private;i.zoom=n.zoom,i.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(e,r){if(pt(e)&&r===void 0&&(r=e,e=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var n;if(qt(e)){var i=e;e=this.$(i)}else if(OGe(e)){var a=e;n={x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},n.w=n.x2-n.x1,n.h=n.y2-n.y1}else to(e)||(e=this.mutableElements());if(!(to(e)&&e.empty())){n=n||e.boundingBox();var s=this.width(),o=this.height(),l;if(r=pt(r)?r:0,!isNaN(s)&&!isNaN(o)&&s>0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){l=Math.min((s-2*r)/n.w,(o-2*r)/n.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l<this._private.minZoom?this._private.minZoom:l;var u={x:(s-l*(n.x1+n.x2))/2,y:(o-l*(n.y1+n.y2))/2};return{zoom:l,pan:u}}}}},zoomRange:function(e,r){var n=this._private;if(r==null){var i=e;e=i.min,r=i.max}return pt(e)&&pt(r)&&e<=r?(n.minZoom=e,n.maxZoom=r):pt(e)&&r===void 0&&e<=n.maxZoom?n.minZoom=e:pt(r)&&e===void 0&&r>=n.minZoom&&(n.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,n=r.pan,i=r.zoom,a,s,o=!1;if(r.zoomingEnabled||(o=!0),pt(e)?s=e:Mr(e)&&(s=e.level,e.position!=null?a=z6(e.position,i,n):e.renderedPosition!=null&&(a=e.renderedPosition),a!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=s<r.minZoom?r.minZoom:s,o||!pt(s)||s===i||a!=null&&(!pt(a.x)||!pt(a.y)))return null;if(a!=null){var l=n,u=i,h=s,f={x:-h/u*(a.x-l.x)+a.x,y:-h/u*(a.y-l.y)+a.y};return{zoomed:!0,panned:!0,zoom:h,pan:f}}else return{zoomed:!0,panned:!1,zoom:s,pan:n}},zoom:function(e){if(e===void 0)return this._private.zoom;var r=this.getZoomedViewport(e),n=this._private;return r==null||!r.zoomed?this:(n.zoom=r.zoom,r.panned&&(n.pan.x=r.pan.x,n.pan.y=r.pan.y),this.emit("zoom"+(r.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},viewport:function(e){var r=this._private,n=!0,i=!0,a=[],s=!1,o=!1;if(!e)return this;if(pt(e.zoom)||(n=!1),Mr(e.pan)||(i=!1),!n&&!i)return this;if(n){var l=e.zoom;l<r.minZoom||l>r.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,a.push("zoom"))}if(i&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var u=e.pan;pt(u.x)&&(r.pan.x=u.x,o=!1),pt(u.y)&&(r.pan.y=u.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(qt(e)){var n=e;e=this.mutableElements().filter(n)}else to(e)||(e=this.mutableElements());if(e.length!==0){var i=e.boundingBox(),a=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(a-r*(i.x1+i.x2))/2,y:(s-r*(i.y1+i.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?function(){var i=n.window().getComputedStyle(r),a=function(o){return parseFloat(i.getPropertyValue(o))};return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),i={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};A0.centre=A0.center;A0.autolockNodes=A0.autolock;A0.autoungrabifyNodes=A0.autoungrabify;yx={data:Zr.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Zr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Zr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Zr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};yx.attr=yx.data;yx.removeAttr=yx.removeData;xx=function(e){var r=this;e=Zt({},e);var n=e.container;n&&!E6(n)&&E6(n[0])&&(n=n[0]);var i=n?n._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=r;var s=Ni!==void 0&&n!==void 0&&!e.headless,o=e;o.layout=Zt({name:s?"grid":"null"},o.layout),o.renderer=Zt({name:s?"canvas":"null"},o.renderer);var l=function(g,m,x){return m!==void 0?m:x!==void 0?x:g},u=this._private={container:n,ready:!1,options:o,elements:new fa(this),listeners:[],aniEles:new fa(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:pt(o.zoom)?o.zoom:1,pan:{x:Mr(o.pan)&&pt(o.pan.x)?o.pan.x:0,y:Mr(o.pan)&&pt(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var h=function(g,m){var x=g.some(PGe);if(x)return $m.all(g).then(m);m(g)};u.styleEnabled&&r.setStyle([]);var f=Zt({},o,o.renderer);r.initRenderer(f);var d=function(g,m,x){r.notifications(!1);var y=r.mutableElements();y.length>0&&y.remove(),g!=null&&(Mr(g)||gn(g))&&r.add(g),r.one("layoutready",function(w){r.notifications(!0),r.emit(w),r.one("load",m),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",x),r.emit("done")});var b=Zt({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run()};h([o.style,o.elements],function(p){var g=p[0],m=p[1];u.styleEnabled&&r.style().append(g),d(m,function(){r.startAnimationLoop(),u.ready=!0,Xn(o.ready)&&r.on("ready",o.ready);for(var x=0;x<a.length;x++){var y=a[x];r.on("ready",y)}i&&(i.readies=[]),r.emit("ready")},o.done)})},N6=xx.prototype;Zt(N6,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container||null},window:function(){var e=this._private.container;if(e==null)return Ni;var r=this._private.container.ownerDocument;return r===void 0||r==null?Ni:r.defaultView||Ni},mount:function(e){if(e!=null){var r=this,n=r._private,i=n.options;return!E6(e)&&E6(e[0])&&(e=e[0]),r.stopAnimationLoop(),r.destroyRenderer(),n.container=e,n.styleEnabled=!0,r.invalidateSize(),r.initRenderer(Zt({},i,i.renderer,{name:i.renderer.name==="null"?"canvas":i.renderer.name})),r.startAnimationLoop(),r.style(i.style),r.emit("mount"),r}},unmount:function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},options:function(){return Ic(this._private.options)},json:function(e){var r=this,n=r._private,i=r.mutableElements(),a=function(_){return r.getElementById(_.id())};if(Mr(e)){if(r.startBatch(),e.elements){var s={},o=function(_,k){for(var E=[],L=[],S=0;S<_.length;S++){var C=_[S];if(!C.data.id){Qr("cy.json() cannot handle elements without an ID attribute");continue}var M=""+C.data.id,R=r.getElementById(M);s[M]=!0,R.length!==0?L.push({ele:R,json:C}):(k&&(C.group=k),E.push(C))}r.add(E);for(var T=0;T<L.length;T++){var I=L[T],A=I.ele,D=I.json;A.json(D)}};if(gn(e.elements))o(e.elements);else for(var l=["nodes","edges"],u=0;u<l.length;u++){var h=l[u],f=e.elements[h];gn(f)&&o(f,h)}var d=r.collection();i.filter(function(w){return!s[w.id()]}).forEach(function(w){w.isParent()?d.merge(w):w.remove()}),d.forEach(function(w){return w.children().move({parent:null})}),d.forEach(function(w){return a(w).remove()})}e.style&&r.style(e.style),e.zoom!=null&&e.zoom!==n.zoom&&r.zoom(e.zoom),e.pan&&(e.pan.x!==n.pan.x||e.pan.y!==n.pan.y)&&r.pan(e.pan),e.data&&r.data(e.data);for(var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],g=0;g<p.length;g++){var m=p[g];e[m]!=null&&r[m](e[m])}return r.endBatch(),this}else{var x=!!e,y={};x?y.elements=this.elements().map(function(w){return w.json()}):(y.elements={},i.forEach(function(w){var _=w.group();y.elements[_]||(y.elements[_]=[]),y.elements[_].push(w.json())})),this._private.styleEnabled&&(y.style=r.style().json()),y.data=Ic(r.data());var b=n.options;return y.zoomingEnabled=n.zoomingEnabled,y.userZoomingEnabled=n.userZoomingEnabled,y.zoom=n.zoom,y.minZoom=n.minZoom,y.maxZoom=n.maxZoom,y.panningEnabled=n.panningEnabled,y.userPanningEnabled=n.userPanningEnabled,y.pan=Ic(n.pan),y.boxSelectionEnabled=n.boxSelectionEnabled,y.renderer=Ic(b.renderer),y.hideEdgesOnViewport=b.hideEdgesOnViewport,y.textureOnViewport=b.textureOnViewport,y.wheelSensitivity=b.wheelSensitivity,y.motionBlur=b.motionBlur,y.multiClickDebounceTime=b.multiClickDebounceTime,y}}});N6.$id=N6.getElementById;[kYe,AYe,P0e,pD,b6,LYe,gD,w6,IYe,A0,yx].forEach(function(t){Zt(N6,t)});DYe={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}},OYe={maximal:!1,acyclic:!1},Cm=function(e){return e.scratch("breadthfirst")},cde=function(e,r){return e.scratch("breadthfirst",r)};B0e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().filter(function(ce){return!ce.isParent()}),a=n,s=e.directed,o=e.acyclic||e.maximal||e.maximalAdjustments>0,l=_s(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),u;if(to(e.roots))u=e.roots;else if(gn(e.roots)){for(var h=[],f=0;f<e.roots.length;f++){var d=e.roots[f],p=r.getElementById(d);h.push(p)}u=r.collection(h)}else if(qt(e.roots))u=r.$(e.roots);else if(s)u=i.roots();else{var g=n.components();u=r.collection();for(var m=function(te){var Le=g[te],oe=Le.maxDegree(!1),be=Le.filter(function(Fe){return Fe.degree(!1)===oe});u=u.add(be)},x=0;x<g.length;x++)m(x)}var y=[],b={},w=function(te,Le){y[Le]==null&&(y[Le]=[]);var oe=y[Le].length;y[Le].push(te),cde(te,{index:oe,depth:Le})},_=function(te,Le){var oe=Cm(te),be=oe.depth,Fe=oe.index;y[be][Fe]=null,w(te,Le)};a.bfs({roots:u,directed:e.directed,visit:function(te,Le,oe,be,Fe){var Be=te[0],Ve=Be.id();w(Be,Fe),b[Ve]=!0}});for(var k=[],E=0;E<i.length;E++){var L=i[E];b[L.id()]||k.push(L)}var S=function(te){for(var Le=y[te],oe=0;oe<Le.length;oe++){var be=Le[oe];if(be==null){Le.splice(oe,1),oe--;continue}cde(be,{depth:te,index:oe})}},C=function(){for(var te=0;te<y.length;te++)S(te)},M=function(te,Le){for(var oe=Cm(te),be=te.incomers().filter(function(Me){return Me.isNode()&&n.has(Me)}),Fe=-1,Be=te.id(),Ve=0;Ve<be.length;Ve++){var We=be[Ve],qe=Cm(We);Fe=Math.max(Fe,qe.depth)}if(oe.depth<=Fe){if(!e.acyclic&&Le[Be])return null;var Re=Fe+1;return _(te,Re),Le[Be]=Re,!0}return!1};if(s&&o){var R=[],T={},I=function(te){return R.push(te)},A=function(){return R.shift()};for(i.forEach(function(ce){return R.push(ce)});R.length>0;){var D=A(),N=M(D,T);if(N)D.outgoers().filter(function(ce){return ce.isNode()&&n.has(ce)}).forEach(I);else if(N===null){Qr("Detected double maximal shift for node `"+D.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}C();var O=0;if(e.avoidOverlap)for(var B=0;B<i.length;B++){var P=i[B],$=P.layoutDimensions(e),z=$.w,H=$.h;O=Math.max(O,z,H)}var Z={},X=function(te){if(Z[te.id()])return Z[te.id()];for(var Le=Cm(te).depth,oe=te.neighborhood(),be=0,Fe=0,Be=0;Be<oe.length;Be++){var Ve=oe[Be];if(!(Ve.isEdge()||Ve.isParent()||!i.has(Ve))){var We=Cm(Ve);if(We!=null){var qe=We.index,Re=We.depth;if(!(qe==null||Re==null)){var Me=y[Re].length;Re<Le&&(be+=qe/Me,Fe++)}}}}return Fe=Math.max(1,Fe),be=be/Fe,Fe===0&&(be=0),Z[te.id()]=be,be},ie=function(te,Le){var oe=X(te),be=X(Le),Fe=oe-be;return Fe===0?Bde(te.id(),Le.id()):Fe};e.depthSort!==void 0&&(ie=e.depthSort);for(var K=0;K<y.length;K++)y[K].sort(ie),S(K);for(var ee=[],J=0;J<k.length;J++)ee.push(k[J]);y.unshift(ee),C();for(var W=0,Y=0;Y<y.length;Y++)W=Math.max(y[Y].length,W);var Q={x:l.x1+l.w/2,y:l.x1+l.h/2},se=y.reduce(function(ce,te){return Math.max(ce,te.length)},0),ue=function(te){var Le=Cm(te),oe=Le.depth,be=Le.index,Fe=y[oe].length,Be=Math.max(l.w/((e.grid?se:Fe)+1),O),Ve=Math.max(l.h/(y.length+1),O),We=Math.min(l.w/2/y.length,l.h/2/y.length);if(We=Math.max(We,O),e.circle){var Re=We*oe+We-(y.length>0&&y[0].length<=3?We/2:0),Me=2*Math.PI/y[oe].length*be;return oe===0&&y[0].length===1&&(Re=1),{x:Q.x+Re*Math.cos(Me),y:Q.y+Re*Math.sin(Me)}}else{var qe={x:Q.x+(be+1-(Fe+1)/2)*Be,y:(oe+1)*Ve};return qe}};return n.nodes().layoutPositions(this,e,ue),this};PYe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};F0e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var s=_s(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/a.length:e.sweep,u=l/Math.max(1,a.length-1),h,f=0,d=0;d<a.length;d++){var p=a[d],g=p.layoutDimensions(e),m=g.w,x=g.h;f=Math.max(f,m,x)}if(pt(e.radius)?h=e.radius:a.length<=1?h=0:h=Math.min(s.h,s.w)/2-f,a.length>1&&e.avoidOverlap){f*=1.75;var y=Math.cos(u)-Math.cos(0),b=Math.sin(u)-Math.sin(0),w=Math.sqrt(f*f/(y*y+b*b));h=Math.max(w,h)}var _=function(E,L){var S=e.startAngle+L*u*(i?1:-1),C=h*Math.cos(S),M=h*Math.sin(S),R={x:o.x+C,y:o.y+M};return R};return n.nodes().layoutPositions(this,e,_),this};BYe={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};z0e.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,i=e.eles,a=i.nodes().not(":parent"),s=_s(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,h=0;h<a.length;h++){var f=a[h],d=void 0;d=e.concentric(f),l.push({value:d,node:f}),f._private.scratch.concentric=d}a.updateStyle();for(var p=0;p<a.length;p++){var g=a[p],m=g.layoutDimensions(e);u=Math.max(u,m.w,m.h)}l.sort(function(ce,te){return te.value-ce.value});for(var x=e.levelWidth(a),y=[[]],b=y[0],w=0;w<l.length;w++){var _=l[w];if(b.length>0){var k=Math.abs(b[0].value-_.value);k>=x&&(b=[],y.push(b))}b.push(_)}var E=u+e.minNodeSpacing;if(!e.avoidOverlap){var L=y.length>0&&y[0].length>1,S=Math.min(s.w,s.h)/2-E,C=S/(y.length+L?1:0);E=Math.min(E,C)}for(var M=0,R=0;R<y.length;R++){var T=y[R],I=e.sweep===void 0?2*Math.PI-2*Math.PI/T.length:e.sweep,A=T.dTheta=I/Math.max(1,T.length-1);if(T.length>1&&e.avoidOverlap){var D=Math.cos(A)-Math.cos(0),N=Math.sin(A)-Math.sin(0),O=Math.sqrt(E*E/(D*D+N*N));M=Math.max(O,M)}T.r=M,M+=E}if(e.equidistant){for(var B=0,P=0,$=0;$<y.length;$++){var z=y[$],H=z.r-P;B=Math.max(B,H)}P=0;for(var Z=0;Z<y.length;Z++){var X=y[Z];Z===0&&(P=X.r),X.r=P,P+=B}}for(var ie={},K=0;K<y.length;K++)for(var ee=y[K],J=ee.dTheta,W=ee.r,Y=0;Y<ee.length;Y++){var Q=ee[Y],se=e.startAngle+(r?1:-1)*J*Y,ue={x:o.x+W*Math.cos(se),y:o.y+W*Math.sin(se)};ie[Q.node.id()]=ue}return i.nodes().layoutPositions(this,e,function(ce){var te=ce.id();return ie[te]}),this};FYe={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(e,r){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(e){return 2048},nodeOverlap:4,idealEdgeLength:function(e){return 32},edgeElasticity:function(e){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};K6.prototype.run=function(){var t=this.options,e=t.cy,r=this;r.stopped=!1,(t.animate===!0||t.animate===!1)&&r.emit({type:"layoutstart",layout:r}),t.debug===!0?iD=!0:iD=!1;var n=zYe(e,r,t);iD&&UYe(n),t.randomize&&VYe(n);var i=Uu(),a=function(){WYe(n,e,t),t.fit===!0&&e.fit(t.padding)},s=function(d){return!(r.stopped||d>=t.numIter||(HYe(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature<t.minTemp))},o=function(){if(t.animate===!0||t.animate===!1)a(),r.one("layoutstop",t.stop),r.emit({type:"layoutstop",layout:r});else{var d=t.eles.nodes(),p=$0e(n,t,d);d.layoutPositions(r,t,p)}},l=0,u=!0;if(t.animate===!0){var h=function f(){for(var d=0;u&&d<t.refresh;)u=s(l),l++,d++;if(!u)hde(n,t),o();else{var p=Uu();p-i>=t.animationThreshold&&a(),S6(f)}};h()}else{for(;u;)u=s(l),l++;hde(n,t),o()}return this};K6.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};K6.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};zYe=function(e,r,n){for(var i=n.eles.edges(),a=n.eles.nodes(),s=_s(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=n.eles.components(),u={},h=0;h<l.length;h++)for(var f=l[h],d=0;d<f.length;d++){var p=f[d];u[p.id()]=h}for(var h=0;h<o.nodeSize;h++){var g=a[h],m=g.layoutDimensions(n),x={};x.isLocked=g.locked(),x.id=g.data("id"),x.parentId=g.data("parent"),x.cmptId=u[g.id()],x.children=[],x.positionX=g.position("x"),x.positionY=g.position("y"),x.offsetX=0,x.offsetY=0,x.height=m.w,x.width=m.h,x.maxX=x.positionX+x.width/2,x.minX=x.positionX-x.width/2,x.maxY=x.positionY+x.height/2,x.minY=x.positionY-x.height/2,x.padLeft=parseFloat(g.style("padding")),x.padRight=parseFloat(g.style("padding")),x.padTop=parseFloat(g.style("padding")),x.padBottom=parseFloat(g.style("padding")),x.nodeRepulsion=Xn(n.nodeRepulsion)?n.nodeRepulsion(g):n.nodeRepulsion,o.layoutNodes.push(x),o.idToIndex[x.id]=h}for(var y=[],b=0,w=-1,_=[],h=0;h<o.nodeSize;h++){var g=o.layoutNodes[h],k=g.parentId;k!=null?o.layoutNodes[o.idToIndex[k]].children.push(g.id):(y[++w]=g.id,_.push(g.id))}for(o.graphSet.push(_);b<=w;){var E=y[b++],L=o.idToIndex[E],p=o.layoutNodes[L],S=p.children;if(S.length>0){o.graphSet.push(S);for(var h=0;h<S.length;h++)y[++w]=S[h]}}for(var h=0;h<o.graphSet.length;h++)for(var C=o.graphSet[h],d=0;d<C.length;d++){var M=o.idToIndex[C[d]];o.indexToGraph[M]=h}for(var h=0;h<o.edgeSize;h++){var R=i[h],T={};T.id=R.data("id"),T.sourceId=R.data("source"),T.targetId=R.data("target");var I=Xn(n.idealEdgeLength)?n.idealEdgeLength(R):n.idealEdgeLength,A=Xn(n.edgeElasticity)?n.edgeElasticity(R):n.edgeElasticity,D=o.idToIndex[T.sourceId],N=o.idToIndex[T.targetId],O=o.indexToGraph[D],B=o.indexToGraph[N];if(O!=B){for(var P=$Ye(T.sourceId,T.targetId,o),$=o.graphSet[P],z=0,x=o.layoutNodes[D];$.indexOf(x.id)===-1;)x=o.layoutNodes[o.idToIndex[x.parentId]],z++;for(x=o.layoutNodes[N];$.indexOf(x.id)===-1;)x=o.layoutNodes[o.idToIndex[x.parentId]],z++;I*=z*n.nestingFactor}T.idealLength=I,T.elasticity=A,o.layoutEdges.push(T)}return o},$Ye=function(e,r,n){var i=GYe(e,r,0,n);return 2>i.count?0:i.graph},GYe=function t(e,r,n,i){var a=i.graphSet[n];if(-1<a.indexOf(e)&&-1<a.indexOf(r))return{count:2,graph:n};for(var s=0,o=0;o<a.length;o++){var l=a[o],u=i.idToIndex[l],h=i.layoutNodes[u].children;if(h.length!==0){var f=i.indexToGraph[i.idToIndex[h[0]]],d=t(e,r,f,i);if(d.count!==0)if(d.count===1){if(s++,s===2)break}else return d}}return{count:s,graph:n}},VYe=function(e,r){for(var n=e.clientWidth,i=e.clientHeight,a=0;a<e.nodeSize;a++){var s=e.layoutNodes[a];s.children.length===0&&!s.isLocked&&(s.positionX=Math.random()*n,s.positionY=Math.random()*i)}},$0e=function(e,r,n){var i=e.boundingBox,a={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return r.boundingBox&&(n.forEach(function(s){var o=e.layoutNodes[e.idToIndex[s.data("id")]];a.x1=Math.min(a.x1,o.positionX),a.x2=Math.max(a.x2,o.positionX),a.y1=Math.min(a.y1,o.positionY),a.y2=Math.max(a.y2,o.positionY)}),a.w=a.x2-a.x1,a.h=a.y2-a.y1),function(s,o){var l=e.layoutNodes[e.idToIndex[s.data("id")]];if(r.boundingBox){var u=(l.positionX-a.x1)/a.w,h=(l.positionY-a.y1)/a.h;return{x:i.x1+u*i.w,y:i.y1+h*i.h}}else return{x:l.positionX,y:l.positionY}}},WYe=function(e,r,n){var i=n.layout,a=n.eles.nodes(),s=$0e(e,n,a);a.positions(s),e.ready!==!0&&(e.ready=!0,i.one("layoutready",n.ready),i.emit({type:"layoutready",layout:this}))},HYe=function(e,r,n){qYe(e,r),jYe(e),KYe(e,r),ZYe(e),QYe(e)},qYe=function(e,r){for(var n=0;n<e.graphSet.length;n++)for(var i=e.graphSet[n],a=i.length,s=0;s<a;s++)for(var o=e.layoutNodes[e.idToIndex[i[s]]],l=s+1;l<a;l++){var u=e.layoutNodes[e.idToIndex[i[l]]];YYe(o,u,e,r)}},ude=function(e){return-e+2*e*Math.random()},YYe=function(e,r,n,i){var a=e.cmptId,s=r.cmptId;if(!(a!==s&&!n.isCompound)){var o=r.positionX-e.positionX,l=r.positionY-e.positionY,u=1;o===0&&l===0&&(o=ude(u),l=ude(u));var h=XYe(e,r,o,l);if(h>0)var f=i.nodeOverlap*h,d=Math.sqrt(o*o+l*l),p=f*o/d,g=f*l/d;else var m=I6(e,o,l),x=I6(r,-1*o,-1*l),y=x.x-m.x,b=x.y-m.y,w=y*y+b*b,d=Math.sqrt(w),f=(e.nodeRepulsion+r.nodeRepulsion)/w,p=f*y/d,g=f*b/d;e.isLocked||(e.offsetX-=p,e.offsetY-=g),r.isLocked||(r.offsetX+=p,r.offsetY+=g)}},XYe=function(e,r,n,i){if(n>0)var a=e.maxX-r.minX;else var a=r.maxX-e.minX;if(i>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return a>=0&&s>=0?Math.sqrt(a*a+s*s):0},I6=function(e,r,n){var i=e.positionX,a=e.positionY,s=e.height||1,o=e.width||1,l=n/r,u=s/o,h={};return r===0&&0<n||r===0&&0>n?(h.x=i,h.y=a+s/2,h):0<r&&-1*u<=l&&l<=u?(h.x=i+o/2,h.y=a+o*n/2/r,h):0>r&&-1*u<=l&&l<=u?(h.x=i-o/2,h.y=a-o*n/2/r,h):0<n&&(l<=-1*u||l>=u)?(h.x=i+s*r/2/n,h.y=a+s/2,h):(0>n&&(l<=-1*u||l>=u)&&(h.x=i-s*r/2/n,h.y=a-s/2),h)},jYe=function(e,r){for(var n=0;n<e.edgeSize;n++){var i=e.layoutEdges[n],a=e.idToIndex[i.sourceId],s=e.layoutNodes[a],o=e.idToIndex[i.targetId],l=e.layoutNodes[o],u=l.positionX-s.positionX,h=l.positionY-s.positionY;if(!(u===0&&h===0)){var f=I6(s,u,h),d=I6(l,-1*u,-1*h),p=d.x-f.x,g=d.y-f.y,m=Math.sqrt(p*p+g*g),x=Math.pow(i.idealLength-m,2)/i.elasticity;if(m!==0)var y=x*p/m,b=x*g/m;else var y=0,b=0;s.isLocked||(s.offsetX+=y,s.offsetY+=b),l.isLocked||(l.offsetX-=y,l.offsetY-=b)}}},KYe=function(e,r){if(r.gravity!==0)for(var n=1,i=0;i<e.graphSet.length;i++){var a=e.graphSet[i],s=a.length;if(i===0)var o=e.clientHeight/2,l=e.clientWidth/2;else var u=e.layoutNodes[e.idToIndex[a[0]]],h=e.layoutNodes[e.idToIndex[u.parentId]],o=h.positionX,l=h.positionY;for(var f=0;f<s;f++){var d=e.layoutNodes[e.idToIndex[a[f]]];if(!d.isLocked){var p=o-d.positionX,g=l-d.positionY,m=Math.sqrt(p*p+g*g);if(m>n){var x=r.gravity*p/m,y=r.gravity*g/m;d.offsetX+=x,d.offsetY+=y}}}}},ZYe=function(e,r){var n=[],i=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;i<=a;){var s=n[i++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0<u.length&&!l.isLocked){for(var h=l.offsetX,f=l.offsetY,d=0;d<u.length;d++){var p=e.layoutNodes[e.idToIndex[u[d]]];p.offsetX+=h,p.offsetY+=f,n[++a]=u[d]}l.offsetX=0,l.offsetY=0}}},QYe=function(e,r){for(var n=0;n<e.nodeSize;n++){var i=e.layoutNodes[n];0<i.children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0)}for(var n=0;n<e.nodeSize;n++){var i=e.layoutNodes[n];if(!(0<i.children.length||i.isLocked)){var a=JYe(i.offsetX,i.offsetY,e.temperature);i.positionX+=a.x,i.positionY+=a.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,eXe(i,e)}}for(var n=0;n<e.nodeSize;n++){var i=e.layoutNodes[n];0<i.children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)}},JYe=function(e,r,n){var i=Math.sqrt(e*e+r*r);if(i>n)var a={x:n*e/i,y:n*r/i};else var a={x:e,y:r};return a},eXe=function t(e,r){var n=e.parentId;if(n!=null){var i=r.layoutNodes[r.idToIndex[n]],a=!1;if((i.maxX==null||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,a=!0),(i.minX==null||e.minX-i.padLeft<i.minX)&&(i.minX=e.minX-i.padLeft,a=!0),(i.maxY==null||e.maxY+i.padBottom>i.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(i.minY==null||e.minY-i.padTop<i.minY)&&(i.minY=e.minY-i.padTop,a=!0),a)return t(i,r)}},hde=function(e,r){for(var n=e.layoutNodes,i=[],a=0;a<n.length;a++){var s=n[a],o=s.cmptId,l=i[o]=i[o]||[];l.push(s)}for(var u=0,a=0;a<i.length;a++){var h=i[a];if(h){h.x1=1/0,h.x2=-1/0,h.y1=1/0,h.y2=-1/0;for(var f=0;f<h.length;f++){var d=h[f];h.x1=Math.min(h.x1,d.positionX-d.width/2),h.x2=Math.max(h.x2,d.positionX+d.width/2),h.y1=Math.min(h.y1,d.positionY-d.height/2),h.y2=Math.max(h.y2,d.positionY+d.height/2)}h.w=h.x2-h.x1,h.h=h.y2-h.y1,u+=h.w*h.h}}i.sort(function(b,w){return w.w*w.h-b.w*b.h});for(var p=0,g=0,m=0,x=0,y=Math.sqrt(u)*e.clientWidth/e.clientHeight,a=0;a<i.length;a++){var h=i[a];if(h){for(var f=0;f<h.length;f++){var d=h[f];d.isLocked||(d.positionX+=p-h.x1,d.positionY+=g-h.y1)}p+=h.w+r.componentSpacing,m+=h.w+r.componentSpacing,x=Math.max(x,h.h),m>y&&(g+=x+r.componentSpacing,p=0,m=0,x=0)}}},tXe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};G0e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=_s(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)n.nodes().layoutPositions(this,e,function(Z){return{x:a.x1,y:a.y1}});else{var s=i.size(),o=Math.sqrt(s*a.h/a.w),l=Math.round(o),u=Math.round(a.w/a.h*o),h=function(X){if(X==null)return Math.min(l,u);var ie=Math.min(l,u);ie==l?l=X:u=X},f=function(X){if(X==null)return Math.max(l,u);var ie=Math.max(l,u);ie==l?l=X:u=X},d=e.rows,p=e.cols!=null?e.cols:e.columns;if(d!=null&&p!=null)l=d,u=p;else if(d!=null&&p==null)l=d,u=Math.ceil(s/l);else if(d==null&&p!=null)u=p,l=Math.ceil(s/u);else if(u*l>s){var g=h(),m=f();(g-1)*m>=s?h(g-1):(m-1)*g>=s&&f(m-1)}else for(;u*l<s;){var x=h(),y=f();(y+1)*x>=s?f(y+1):h(x+1)}var b=a.w/u,w=a.h/l;if(e.condense&&(b=0,w=0),e.avoidOverlap)for(var _=0;_<i.length;_++){var k=i[_],E=k._private.position;(E.x==null||E.y==null)&&(E.x=0,E.y=0);var L=k.layoutDimensions(e),S=e.avoidOverlapPadding,C=L.w+S,M=L.h+S;b=Math.max(b,C),w=Math.max(w,M)}for(var R={},T=function(X,ie){return!!R["c-"+X+"-"+ie]},I=function(X,ie){R["c-"+X+"-"+ie]=!0},A=0,D=0,N=function(){D++,D>=u&&(D=0,A++)},O={},B=0;B<i.length;B++){var P=i[B],$=e.position(P);if($&&($.row!==void 0||$.col!==void 0)){var z={row:$.row,col:$.col};if(z.col===void 0)for(z.col=0;T(z.row,z.col);)z.col++;else if(z.row===void 0)for(z.row=0;T(z.row,z.col);)z.row++;O[P.id()]=z,I(z.row,z.col)}}var H=function(X,ie){var K,ee;if(X.locked()||X.isParent())return!1;var J=O[X.id()];if(J)K=J.col*b+b/2+a.x1,ee=J.row*w+w/2+a.y1;else{for(;T(A,D);)N();K=D*b+b/2+a.x1,ee=A*w+w/2+a.y1,I(A,D),N()}return{x:K,y:ee}};i.layoutPositions(this,e,H)}return this};rXe={ready:function(){},stop:function(){}};VD.prototype.run=function(){var t=this.options,e=t.eles,r=this;return t.cy,r.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),r.one("layoutready",t.ready),r.emit("layoutready"),r.one("layoutstop",t.stop),r.emit("layoutstop"),this};VD.prototype.stop=function(){return this};nXe={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};U0e.prototype.run=function(){var t=this.options,e=t.eles,r=e.nodes(),n=Xn(t.positions);function i(a){if(t.positions==null)return oVe(a.position());if(n)return t.positions(a);var s=t.positions[a._private.data.id];return s??null}return r.layoutPositions(this,t,function(a,s){var o=i(a);return a.locked()||o==null?!1:o}),this};iXe={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};V0e.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=_s(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),i=function(s,o){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}};return r.nodes().layoutPositions(this,t,i),this};aXe=[{name:"breadthfirst",impl:B0e},{name:"circle",impl:F0e},{name:"concentric",impl:z0e},{name:"cose",impl:K6},{name:"grid",impl:G0e},{name:"null",impl:VD},{name:"preset",impl:U0e},{name:"random",impl:V0e}];fde=function(){},dde=function(){throw new Error("A headless instance can not render images")};W0e.prototype={recalculateRenderedStyle:fde,notify:function(){this.notifications++},init:fde,isHeadless:function(){return!0},png:dde,jpg:dde};WD={};WD.arrowShapeWidth=.3;WD.registerArrowShapes=function(){var t=this.arrowShapes={},e=this,r=function(u,h,f,d,p,g,m){var x=p.x-f/2-m,y=p.x+f/2+m,b=p.y-f/2-m,w=p.y+f/2+m,_=x<=u&&u<=y&&b<=h&&h<=w;return _},n=function(u,h,f,d,p){var g=u*Math.cos(d)-h*Math.sin(d),m=u*Math.sin(d)+h*Math.cos(d),x=g*f,y=m*f,b=x+p.x,w=y+p.y;return{x:b,y:w}},i=function(u,h,f,d){for(var p=[],g=0;g<u.length;g+=2){var m=u[g],x=u[g+1];p.push(n(m,x,h,f,d))}return p},a=function(u){for(var h=[],f=0;f<u.length;f++){var d=u[f];h.push(d.x,d.y)}return h},s=function(u){return u.pstyle("width").pfValue*u.pstyle("arrow-scale").pfValue*2},o=function(u,h){qt(h)&&(h=t[h]),t[u]=Zt({name:u,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(d,p,g,m,x,y){var b=a(i(this.points,g+2*y,m,x)),w=As(d,p,b);return w},roughCollide:r,draw:function(d,p,g,m){var x=i(this.points,p,g,m);e.arrowShapeImpl("polygon")(d,x)},spacing:function(d){return 0},gap:s},h)};o("none",{collide:C6,roughCollide:C6,draw:LD,spacing:Tfe,gap:Tfe}),o("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),o("arrow","triangle"),o("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:r,draw:function(u,h,f,d,p){var g=i(this.points,h,f,d),m=this.controlPoint,x=n(m[0],m[1],h,f,d);e.arrowShapeImpl(this.name)(u,g,x)},gap:function(u){return s(u)*.8}}),o("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(u,h,f,d,p,g,m){var x=a(i(this.points,f+2*m,d,p)),y=a(i(this.pointsTee,f+2*m,d,p)),b=As(u,h,x)||As(u,h,y);return b},draw:function(u,h,f,d,p){var g=i(this.points,h,f,d),m=i(this.pointsTee,h,f,d);e.arrowShapeImpl(this.name)(u,g,m)}}),o("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(u,h,f,d,p,g,m){var x=p,y=Math.pow(x.x-u,2)+Math.pow(x.y-h,2)<=Math.pow((f+2*m)*this.radius,2),b=a(i(this.points,f+2*m,d,p));return As(u,h,b)||y},draw:function(u,h,f,d,p){var g=i(this.pointsTr,h,f,d);e.arrowShapeImpl(this.name)(u,g,d.x,d.y,this.radius*h)},spacing:function(u){return e.getArrowWidth(u.pstyle("width").pfValue,u.pstyle("arrow-scale").value)*this.radius}}),o("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(u,h){var f=this.baseCrossLinePts.slice(),d=h/u,p=3,g=5;return f[p]=f[p]-d,f[g]=f[g]-d,f},collide:function(u,h,f,d,p,g,m){var x=a(i(this.points,f+2*m,d,p)),y=a(i(this.crossLinePts(f,g),f+2*m,d,p)),b=As(u,h,x)||As(u,h,y);return b},draw:function(u,h,f,d,p){var g=i(this.points,h,f,d),m=i(this.crossLinePts(h,p),h,f,d);e.arrowShapeImpl(this.name)(u,g,m)}}),o("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(u){return s(u)*.525}}),o("circle",{radius:.15,collide:function(u,h,f,d,p,g,m){var x=p,y=Math.pow(x.x-u,2)+Math.pow(x.y-h,2)<=Math.pow((f+2*m)*this.radius,2);return y},draw:function(u,h,f,d,p){e.arrowShapeImpl(this.name)(u,d.x,d.y,this.radius*h)},spacing:function(u){return e.getArrowWidth(u.pstyle("width").pfValue,u.pstyle("arrow-scale").value)*this.radius}}),o("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(u){return 1},gap:function(u){return 1}}),o("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),o("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(u){return u.pstyle("width").pfValue*u.pstyle("arrow-scale").value}}),o("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(u){return .95*u.pstyle("width").pfValue*u.pstyle("arrow-scale").value}})};L0={};L0.projectIntoViewport=function(t,e){var r=this.cy,n=this.findContainerClientCoords(),i=n[0],a=n[1],s=n[4],o=r.pan(),l=r.zoom(),u=((t-i)/s-o.x)/l,h=((e-a)/s-o.y)/l;return[u,h]};L0.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),r=this.cy.window().getComputedStyle(t),n=function(y){return parseFloat(r.getPropertyValue(y))},i={left:n("padding-left"),right:n("padding-right"),top:n("padding-top"),bottom:n("padding-bottom")},a={left:n("border-left-width"),right:n("border-right-width"),top:n("border-top-width"),bottom:n("border-bottom-width")},s=t.clientWidth,o=t.clientHeight,l=i.left+i.right,u=i.top+i.bottom,h=a.left+a.right,f=e.width/(s+h),d=s-l,p=o-u,g=e.left+i.left+a.left,m=e.top+i.top+a.top;return this.containerBB=[g,m,d,p,f]};L0.invalidateContainerClientCoordsCache=function(){this.containerBB=null};L0.findNearestElement=function(t,e,r,n){return this.findNearestElements(t,e,r,n)[0]};L0.findNearestElements=function(t,e,r,n){var i=this,a=this,s=a.getCachedZSortedEles(),o=[],l=a.cy.zoom(),u=a.cy.hasCompoundNodes(),h=(n?24:8)/l,f=(n?8:2)/l,d=(n?8:2)/l,p=1/0,g,m;r&&(s=s.interactive);function x(L,S){if(L.isNode()){if(m)return;m=L,o.push(L)}if(L.isEdge()&&(S==null||S<p))if(g){if(g.pstyle("z-compound-depth").value===L.pstyle("z-compound-depth").value&&g.pstyle("z-compound-depth").value===L.pstyle("z-compound-depth").value){for(var C=0;C<o.length;C++)if(o[C].isEdge()){o[C]=L,g=L,p=S??p;break}}}else o.push(L),g=L,p=S??p}function y(L){var S=L.outerWidth()+2*f,C=L.outerHeight()+2*f,M=S/2,R=C/2,T=L.position(),I=L.pstyle("corner-radius").value==="auto"?"auto":L.pstyle("corner-radius").pfValue,A=L._private.rscratch;if(T.x-M<=t&&t<=T.x+M&&T.y-R<=e&&e<=T.y+R){var D=a.nodeShapes[i.getNodeShape(L)];if(D.checkPoint(t,e,0,S,C,T.x,T.y,I,A))return x(L,0),!0}}function b(L){var S=L._private,C=S.rscratch,M=L.pstyle("width").pfValue,R=L.pstyle("arrow-scale").value,T=M/2+h,I=T*T,A=T*2,B=S.source,P=S.target,D;if(C.edgeType==="segments"||C.edgeType==="straight"||C.edgeType==="haystack"){for(var N=C.allpts,O=0;O+3<N.length;O+=2)if(bVe(t,e,N[O],N[O+1],N[O+2],N[O+3],A)&&I>(D=SVe(t,e,N[O],N[O+1],N[O+2],N[O+3])))return x(L,D),!0}else if(C.edgeType==="bezier"||C.edgeType==="multibezier"||C.edgeType==="self"||C.edgeType==="compound"){for(var N=C.allpts,O=0;O+5<C.allpts.length;O+=4)if(wVe(t,e,N[O],N[O+1],N[O+2],N[O+3],N[O+4],N[O+5],A)&&I>(D=EVe(t,e,N[O],N[O+1],N[O+2],N[O+3],N[O+4],N[O+5])))return x(L,D),!0}for(var B=B||S.source,P=P||S.target,$=i.getArrowWidth(M,R),z=[{name:"source",x:C.arrowStartX,y:C.arrowStartY,angle:C.srcArrowAngle},{name:"target",x:C.arrowEndX,y:C.arrowEndY,angle:C.tgtArrowAngle},{name:"mid-source",x:C.midX,y:C.midY,angle:C.midsrcArrowAngle},{name:"mid-target",x:C.midX,y:C.midY,angle:C.midtgtArrowAngle}],O=0;O<z.length;O++){var H=z[O],Z=a.arrowShapes[L.pstyle(H.name+"-arrow-shape").value],X=L.pstyle("width").pfValue;if(Z.roughCollide(t,e,$,H.angle,{x:H.x,y:H.y},X,h)&&Z.collide(t,e,$,H.angle,{x:H.x,y:H.y},X,h))return x(L),!0}u&&o.length>0&&(y(B),y(P))}function w(L,S,C){return Nl(L,S,C)}function _(L,S){var C=L._private,M=d,R;S?R=S+"-":R="",L.boundingBox();var T=C.labelBounds[S||"main"],I=L.pstyle(R+"label").value,A=L.pstyle("text-events").strValue==="yes";if(!(!A||!I)){var D=w(C.rscratch,"labelX",S),N=w(C.rscratch,"labelY",S),O=w(C.rscratch,"labelAngle",S),B=L.pstyle(R+"text-margin-x").pfValue,P=L.pstyle(R+"text-margin-y").pfValue,$=T.x1-M-B,z=T.x2+M-B,H=T.y1-M-P,Z=T.y2+M-P;if(O){var X=Math.cos(O),ie=Math.sin(O),K=function(ue,ce){return ue=ue-D,ce=ce-N,{x:ue*X-ce*ie+D,y:ue*ie+ce*X+N}},ee=K($,H),J=K($,Z),W=K(z,H),Y=K(z,Z),Q=[ee.x+B,ee.y+P,W.x+B,W.y+P,Y.x+B,Y.y+P,J.x+B,J.y+P];if(As(t,e,Q))return x(L),!0}else if(Pm(T,t,e))return x(L),!0}}for(var k=s.length-1;k>=0;k--){var E=s[k];E.isNode()?y(E)||_(E):b(E)||_(E)||_(E,"source")||_(E,"target")}return o};L0.getAllInBox=function(t,e,r,n){var i=this.getCachedZSortedEles().interactive,a=[],s=Math.min(t,r),o=Math.max(t,r),l=Math.min(e,n),u=Math.max(e,n);t=s,r=o,e=l,n=u;for(var h=_s({x1:t,y1:e,x2:r,y2:n}),f=0;f<i.length;f++){var d=i[f];if(d.isNode()){var p=d,g=p.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});ID(h,g)&&!Jde(g,h)&&a.push(p)}else{var m=d,x=m._private,y=x.rscratch;if(y.startX!=null&&y.startY!=null&&!Pm(h,y.startX,y.startY)||y.endX!=null&&y.endY!=null&&!Pm(h,y.endX,y.endY))continue;if(y.edgeType==="bezier"||y.edgeType==="multibezier"||y.edgeType==="self"||y.edgeType==="compound"||y.edgeType==="segments"||y.edgeType==="haystack"){for(var b=x.rstyle.bezierPts||x.rstyle.linePts||x.rstyle.haystackPts,w=!0,_=0;_<b.length;_++)if(!xVe(h,b[_])){w=!1;break}w&&a.push(m)}else(y.edgeType==="haystack"||y.edgeType==="straight")&&a.push(m)}}return a};M6={};M6.calculateArrowAngles=function(t){var e=t._private.rscratch,r=e.edgeType==="haystack",n=e.edgeType==="bezier",i=e.edgeType==="multibezier",a=e.edgeType==="segments",s=e.edgeType==="compound",o=e.edgeType==="self",l,u,h,f,d,p,y,b;if(r?(h=e.haystackPts[0],f=e.haystackPts[1],d=e.haystackPts[2],p=e.haystackPts[3]):(h=e.arrowStartX,f=e.arrowStartY,d=e.arrowEndX,p=e.arrowEndY),y=e.midX,b=e.midY,a)l=h-e.segpts[0],u=f-e.segpts[1];else if(i||s||o||n){var g=e.allpts,m=qi(g[0],g[2],g[4],.1),x=qi(g[1],g[3],g[5],.1);l=h-m,u=f-x}else l=h-y,u=f-b;e.srcArrowAngle=i6(l,u);var y=e.midX,b=e.midY;if(r&&(y=(h+d)/2,b=(f+p)/2),l=d-h,u=p-f,a){var g=e.allpts;if(g.length/2%2===0){var w=g.length/2,_=w-2;l=g[w]-g[_],u=g[w+1]-g[_+1]}else if(e.isRound)l=e.midVector[1],u=-e.midVector[0];else{var w=g.length/2-1,_=w-2;l=g[w]-g[_],u=g[w+1]-g[_+1]}}else if(i||s||o){var g=e.allpts,k=e.ctrlpts,E,L,S,C;if(k.length/2%2===0){var M=g.length/2-1,R=M+2,T=R+2;E=qi(g[M],g[R],g[T],0),L=qi(g[M+1],g[R+1],g[T+1],0),S=qi(g[M],g[R],g[T],1e-4),C=qi(g[M+1],g[R+1],g[T+1],1e-4)}else{var R=g.length/2-1,M=R-2,T=R+2;E=qi(g[M],g[R],g[T],.4999),L=qi(g[M+1],g[R+1],g[T+1],.4999),S=qi(g[M],g[R],g[T],.5),C=qi(g[M+1],g[R+1],g[T+1],.5)}l=S-E,u=C-L}if(e.midtgtArrowAngle=i6(l,u),e.midDispX=l,e.midDispY=u,l*=-1,u*=-1,a){var g=e.allpts;if(g.length/2%2!==0){if(!e.isRound){var w=g.length/2-1,I=w+2;l=-(g[I]-g[w]),u=-(g[I+1]-g[w+1])}}}if(e.midsrcArrowAngle=i6(l,u),a)l=d-e.segpts[e.segpts.length-2],u=p-e.segpts[e.segpts.length-1];else if(i||s||o||n){var g=e.allpts,A=g.length,m=qi(g[A-6],g[A-4],g[A-2],.9),x=qi(g[A-5],g[A-3],g[A-1],.9);l=d-m,u=p-x}else l=d-y,u=p-b;e.tgtArrowAngle=i6(l,u)};M6.getArrowWidth=M6.getArrowHeight=function(t,e){var r=this.arrowWidthCache=this.arrowWidthCache||{},n=r[t+", "+e];return n||(n=Math.max(Math.pow(t*13.37,.9),29)*e,r[t+", "+e]=n,n)};Nc={},Vo={},vde=function(e,r,n){n.x=r.x-e.x,n.y=r.y-e.y,n.len=Math.sqrt(n.x*n.x+n.y*n.y),n.nx=n.x/n.len,n.ny=n.y/n.len,n.ang=Math.atan2(n.ny,n.nx)},sXe=function(e,r){r.x=e.x*-1,r.y=e.y*-1,r.nx=e.nx*-1,r.ny=e.ny*-1,r.ang=e.ang>0?-(Math.PI-e.ang):Math.PI+e.ang},oXe=function(e,r,n,i,a){if(e!==mde?vde(r,e,Nc):sXe(Vo,Nc),vde(r,n,Vo),pde=Nc.nx*Vo.ny-Nc.ny*Vo.nx,gde=Nc.nx*Vo.nx-Nc.ny*-Vo.ny,Gu=Math.asin(Math.max(-1,Math.min(1,pde))),Math.abs(Gu)<1e-6){mD=r.x,vD=r.y,x0=Am=0;return}b0=1,k6=!1,gde<0?Gu<0?Gu=Math.PI+Gu:(Gu=Math.PI-Gu,b0=-1,k6=!0):Gu>0&&(b0=-1,k6=!0),r.radius!==void 0?Am=r.radius:Am=i,g0=Gu/2,d6=Math.min(Nc.len/2,Vo.len/2),a?(Rc=Math.abs(Math.cos(g0)*Am/Math.sin(g0)),Rc>d6?(Rc=d6,x0=Math.abs(Rc*Math.sin(g0)/Math.cos(g0))):x0=Am):(Rc=Math.min(d6,Am),x0=Math.abs(Rc*Math.sin(g0)/Math.cos(g0))),yD=r.x+Vo.nx*Rc,xD=r.y+Vo.ny*Rc,mD=yD-Vo.ny*x0*b0,vD=xD+Vo.nx*x0*b0,H0e=r.x+Nc.nx*Rc,q0e=r.y+Nc.ny*Rc,mde=r};La={};La.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,i=e.vectorNormInverse,a,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(k,E,L,S){var C=S-E,M=L-k,R=Math.sqrt(M*M+C*C);return{x:-C/R,y:M/R}},h=t.pstyle("edge-distances").value;switch(h){case"node-position":a=r;break;case"intersection":a=n;break;case"endpoints":{if(l){var f=this.manualEndptToPx(t.source()[0],s),d=Ll(f,2),p=d[0],g=d[1],m=this.manualEndptToPx(t.target()[0],o),x=Ll(m,2),y=x[0],b=x[1],w={x1:p,y1:g,x2:y,y2:b};i=u(p,g,y,b),a=w}else Qr("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=n;break}}return{midptPts:a,vectorNormInverse:i}};La.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r._private,i=n.rscratch;if(!i.haystack){var a=Math.random()*2*Math.PI;i.source={x:Math.cos(a),y:Math.sin(a)},a=Math.random()*2*Math.PI,i.target={x:Math.cos(a),y:Math.sin(a)}}var s=n.source,o=n.target,l=s.position(),u=o.position(),h=s.width(),f=o.width(),d=s.height(),p=o.height(),g=r.pstyle("haystack-radius").value,m=g/2;i.haystackPts=i.allpts=[i.source.x*h*m+l.x,i.source.y*d*m+l.y,i.target.x*f*m+u.x,i.target.y*p*m+u.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType="haystack",i.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}};La.findSegmentsPoints=function(t,e){var r=t._private.rscratch,n=t.pstyle("segment-weights"),i=t.pstyle("segment-distances"),a=t.pstyle("segment-radii"),s=t.pstyle("radius-type"),o=Math.min(n.pfValue.length,i.pfValue.length),l=a.pfValue[a.pfValue.length-1],u=s.pfValue[s.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var h=0;h<o;h++){var f=n.pfValue[h],d=i.pfValue[h],p=1-f,g=f,m=this.findMidptPtsEtc(t,e),x=m.midptPts,y=m.vectorNormInverse,b={x:x.x1*p+x.x2*g,y:x.y1*p+x.y2*g};r.segpts.push(b.x+y.x*d,b.y+y.y*d),r.radii.push(a.pfValue[h]!==void 0?a.pfValue[h]:l),r.isArcRadius.push((s.pfValue[h]!==void 0?s.pfValue[h]:u)==="arc-radius")}};La.findLoopPoints=function(t,e,r,n){var i=t._private.rscratch,a=e.dirCounts,s=e.srcPos,o=t.pstyle("control-point-distances"),l=o?o.pfValue[0]:void 0,u=t.pstyle("loop-direction").pfValue,h=t.pstyle("loop-sweep").pfValue,f=t.pstyle("control-point-step-size").pfValue;i.edgeType="self";var d=r,p=f;n&&(d=0,p=l);var g=u-Math.PI/2,m=g-h/2,x=g+h/2,y=u+"_"+h;d=a[y]===void 0?a[y]=0:++a[y],i.ctrlpts=[s.x+Math.cos(m)*1.4*p*(d/3+1),s.y+Math.sin(m)*1.4*p*(d/3+1),s.x+Math.cos(x)*1.4*p*(d/3+1),s.y+Math.sin(x)*1.4*p*(d/3+1)]};La.findCompoundLoopPoints=function(t,e,r,n){var i=t._private.rscratch;i.edgeType="compound";var a=e.srcPos,s=e.tgtPos,o=e.srcW,l=e.srcH,u=e.tgtW,h=e.tgtH,f=t.pstyle("control-point-step-size").pfValue,d=t.pstyle("control-point-distances"),p=d?d.pfValue[0]:void 0,g=r,m=f;n&&(g=0,m=p);var x=50,y={x:a.x-o/2,y:a.y-l/2},b={x:s.x-u/2,y:s.y-h/2},w={x:Math.min(y.x,b.x),y:Math.min(y.y,b.y)},_=.5,k=Math.max(_,Math.log(o*.01)),E=Math.max(_,Math.log(u*.01));i.ctrlpts=[w.x,w.y-(1+Math.pow(x,1.12)/100)*m*(g/3+1)*k,w.x-(1+Math.pow(x,1.12)/100)*m*(g/3+1)*E,w.y]};La.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"};La.findBezierPoints=function(t,e,r,n,i){var a=t._private.rscratch,s=t.pstyle("control-point-step-size").pfValue,o=t.pstyle("control-point-distances"),l=t.pstyle("control-point-weights"),u=o&&l?Math.min(o.value.length,l.value.length):1,h=o?o.pfValue[0]:void 0,f=l.value[0],d=n;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<u;p++){var g=(.5-e.eles.length/2+r)*s*(i?-1:1),m=void 0,x=Zde(g);d&&(h=o?o.pfValue[p]:s,f=l.value[p]),n?m=h:m=h!==void 0?x*h:void 0;var y=m!==void 0?m:g,b=1-f,w=f,_=this.findMidptPtsEtc(t,e),k=_.midptPts,E=_.vectorNormInverse,L={x:k.x1*b+k.x2*w,y:k.y1*b+k.y2*w};a.ctrlpts.push(L.x+E.x*y,L.y+E.y*y)}};La.findTaxiPoints=function(t,e){var r=t._private.rscratch;r.edgeType="segments";var n="vertical",i="horizontal",a="leftward",s="rightward",o="downward",l="upward",u="auto",h=e.posPts,f=e.srcW,d=e.srcH,p=e.tgtW,g=e.tgtH,m=t.pstyle("edge-distances").value,x=m!=="node-position",y=t.pstyle("taxi-direction").value,b=y,w=t.pstyle("taxi-turn"),_=w.units==="%",k=w.pfValue,E=k<0,L=t.pstyle("taxi-turn-min-distance").pfValue,S=x?(f+p)/2:0,C=x?(d+g)/2:0,M=h.x2-h.x1,R=h.y2-h.y1,T=function(j,me){return j>0?Math.max(j-me,0):Math.min(j+me,0)},I=T(M,S),A=T(R,C),D=!1;b===u?y=Math.abs(I)>Math.abs(A)?i:n:b===l||b===o?(y=n,D=!0):(b===a||b===s)&&(y=i,D=!0);var N=y===n,O=N?A:I,B=N?R:M,P=Zde(B),$=!1;!(D&&(_||E))&&(b===o&&B<0||b===l&&B>0||b===a&&B>0||b===s&&B<0)&&(P*=-1,O=P*Math.abs(O),$=!0);var z;if(_){var H=k<0?1+k:k;z=H*O}else{var Z=k<0?O:0;z=Z+k*P}var X=function(j){return Math.abs(j)<L||Math.abs(j)>=Math.abs(O)},ie=X(z),K=X(Math.abs(O)-Math.abs(z)),ee=ie||K;if(ee&&!$)if(N){var J=Math.abs(B)<=d/2,W=Math.abs(M)<=p/2;if(J){var Y=(h.x1+h.x2)/2,Q=h.y1,se=h.y2;r.segpts=[Y,Q,Y,se]}else if(W){var ue=(h.y1+h.y2)/2,ce=h.x1,te=h.x2;r.segpts=[ce,ue,te,ue]}else r.segpts=[h.x1,h.y2]}else{var Le=Math.abs(B)<=f/2,oe=Math.abs(R)<=g/2;if(Le){var be=(h.y1+h.y2)/2,Fe=h.x1,Be=h.x2;r.segpts=[Fe,be,Be,be]}else if(oe){var Ve=(h.x1+h.x2)/2,We=h.y1,qe=h.y2;r.segpts=[Ve,We,Ve,qe]}else r.segpts=[h.x2,h.y1]}else if(N){var Re=h.y1+z+(x?d/2*P:0),Me=h.x1,ye=h.x2;r.segpts=[Me,Re,ye,Re]}else{var q=h.x1+z+(x?f/2*P:0),de=h.y1,ae=h.y2;r.segpts=[q,de,q,ae]}if(r.isRound){var he=t.pstyle("taxi-radius").value,U=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(he),r.isArcRadius=new Array(r.segpts.length/2).fill(U)}};La.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,i=e.tgtPos,a=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,h=e.tgtShape,f=e.srcCornerRadius,d=e.tgtCornerRadius,p=e.srcRs,g=e.tgtRs,m=!pt(r.startX)||!pt(r.startY),x=!pt(r.arrowStartX)||!pt(r.arrowStartY),y=!pt(r.endX)||!pt(r.endY),b=!pt(r.arrowEndX)||!pt(r.arrowEndY),w=3,_=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,k=w*_,E=E0({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),L=E<k,S=E0({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.endX,y:r.endY}),C=S<k,M=!1;if(m||x||L){M=!0;var R={x:r.ctrlpts[0]-n.x,y:r.ctrlpts[1]-n.y},T=Math.sqrt(R.x*R.x+R.y*R.y),I={x:R.x/T,y:R.y/T},A=Math.max(a,s),D={x:r.ctrlpts[0]+I.x*2*A,y:r.ctrlpts[1]+I.y*2*A},N=u.intersectLine(n.x,n.y,a,s,D.x,D.y,0,f,p);L?(r.ctrlpts[0]=r.ctrlpts[0]+I.x*(k-E),r.ctrlpts[1]=r.ctrlpts[1]+I.y*(k-E)):(r.ctrlpts[0]=N[0]+I.x*k,r.ctrlpts[1]=N[1]+I.y*k)}if(y||b||C){M=!0;var O={x:r.ctrlpts[0]-i.x,y:r.ctrlpts[1]-i.y},B=Math.sqrt(O.x*O.x+O.y*O.y),P={x:O.x/B,y:O.y/B},$=Math.max(a,s),z={x:r.ctrlpts[0]+P.x*2*$,y:r.ctrlpts[1]+P.y*2*$},H=h.intersectLine(i.x,i.y,o,l,z.x,z.y,0,d,g);C?(r.ctrlpts[0]=r.ctrlpts[0]+P.x*(k-S),r.ctrlpts[1]=r.ctrlpts[1]+P.y*(k-S)):(r.ctrlpts[0]=H[0]+P.x*k,r.ctrlpts[1]=H[1]+P.y*k)}M&&this.findEndpoints(t)}};La.storeAllpts=function(t){var e=t._private.rscratch;if(e.edgeType==="multibezier"||e.edgeType==="bezier"||e.edgeType==="self"||e.edgeType==="compound"){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var r=0;r+1<e.ctrlpts.length;r+=2)e.allpts.push(e.ctrlpts[r],e.ctrlpts[r+1]),r+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[r]+e.ctrlpts[r+2])/2,(e.ctrlpts[r+1]+e.ctrlpts[r+3])/2);e.allpts.push(e.endX,e.endY);var n,i;e.ctrlpts.length/2%2===0?(n=e.allpts.length/2-1,e.midX=e.allpts[n],e.midY=e.allpts[n+1]):(n=e.allpts.length/2-3,i=.5,e.midX=qi(e.allpts[n],e.allpts[n+2],e.allpts[n+4],i),e.midY=qi(e.allpts[n+1],e.allpts[n+3],e.allpts[n+5],i))}else if(e.edgeType==="straight")e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if(e.edgeType==="segments"){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var a=2;a+3<e.allpts.length;a+=2){var s=e.radii[a/2-1],o=e.isArcRadius[a/2-1];e.roundCorners.push(HD({x:e.allpts[a-2],y:e.allpts[a-1]},{x:e.allpts[a],y:e.allpts[a+1],radius:s},{x:e.allpts[a+2],y:e.allpts[a+3]},s,o))}}if(e.segpts.length%4===0){var l=e.segpts.length/2,u=l-2;e.midX=(e.segpts[u]+e.segpts[l])/2,e.midY=(e.segpts[u+1]+e.segpts[l+1])/2}else{var h=e.segpts.length/2-1;if(!e.isRound)e.midX=e.segpts[h],e.midY=e.segpts[h+1];else{var f={x:e.segpts[h],y:e.segpts[h+1]},d=e.roundCorners[h/2],p=[f.x-d.cx,f.y-d.cy],g=d.radius/Math.sqrt(Math.pow(p[0],2)+Math.pow(p[1],2));p=p.map(function(m){return m*g}),e.midX=d.cx+p[0],e.midY=d.cy+p[1],e.midVector=p}}}};La.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||pt(e.startX)&&pt(e.startY)&&pt(e.endX)&&pt(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,Qr("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))};La.findEdgeControlPoints=function(t){var e=this;if(!(!t||t.length===0)){for(var r=this,n=r.cy,i=n.hasCompoundNodes(),a={map:new Mc,get:function(L){var S=this.map.get(L[0]);return S!=null?S.get(L[1]):null},set:function(L,S){var C=this.map.get(L[0]);C==null&&(C=new Mc,this.map.set(L[0],C)),C.set(L[1],S)}},s=[],o=[],l=0;l<t.length;l++){var u=t[l],h=u._private,f=u.pstyle("curve-style").value;if(!(u.removed()||!u.takesUpSpace())){if(f==="haystack"){o.push(u);continue}var d=f==="unbundled-bezier"||f.endsWith("segments")||f==="straight"||f==="straight-triangle"||f.endsWith("taxi"),p=f==="unbundled-bezier"||f==="bezier",g=h.source,m=h.target,x=g.poolIndex(),y=m.poolIndex(),b=[x,y].sort(),w=a.get(b);w==null&&(w={eles:[]},a.set(b,w),s.push(b)),w.eles.push(u),d&&(w.hasUnbundled=!0),p&&(w.hasBezier=!0)}}for(var _=function(L){var S=s[L],C=a.get(S),M=void 0;if(!C.hasUnbundled){var R=C.eles[0].parallelEdges().filter(function(q){return q.isBundledBezier()});RD(C.eles),R.forEach(function(q){return C.eles.push(q)}),C.eles.sort(function(q,de){return q.poolIndex()-de.poolIndex()})}var T=C.eles[0],I=T.source(),A=T.target();if(I.poolIndex()>A.poolIndex()){var D=I;I=A,A=D}var N=C.srcPos=I.position(),O=C.tgtPos=A.position(),B=C.srcW=I.outerWidth(),P=C.srcH=I.outerHeight(),$=C.tgtW=A.outerWidth(),z=C.tgtH=A.outerHeight(),H=C.srcShape=r.nodeShapes[e.getNodeShape(I)],Z=C.tgtShape=r.nodeShapes[e.getNodeShape(A)],X=C.srcCornerRadius=I.pstyle("corner-radius").value==="auto"?"auto":I.pstyle("corner-radius").pfValue,ie=C.tgtCornerRadius=A.pstyle("corner-radius").value==="auto"?"auto":A.pstyle("corner-radius").pfValue,K=C.tgtRs=A._private.rscratch,ee=C.srcRs=I._private.rscratch;C.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var J=0;J<C.eles.length;J++){var W=C.eles[J],Y=W[0]._private.rscratch,Q=W.pstyle("curve-style").value,se=Q==="unbundled-bezier"||Q.endsWith("segments")||Q.endsWith("taxi"),ue=!I.same(W.source());if(!C.calculatedIntersection&&I!==A&&(C.hasBezier||C.hasUnbundled)){C.calculatedIntersection=!0;var ce=H.intersectLine(N.x,N.y,B,P,O.x,O.y,0,X,ee),te=C.srcIntn=ce,Le=Z.intersectLine(O.x,O.y,$,z,N.x,N.y,0,ie,K),oe=C.tgtIntn=Le,be=C.intersectionPts={x1:ce[0],x2:Le[0],y1:ce[1],y2:Le[1]},Fe=C.posPts={x1:N.x,x2:O.x,y1:N.y,y2:O.y},Be=Le[1]-ce[1],Ve=Le[0]-ce[0],We=Math.sqrt(Ve*Ve+Be*Be),qe=C.vector={x:Ve,y:Be},Re=C.vectorNorm={x:qe.x/We,y:qe.y/We},Me={x:-Re.y,y:Re.x};C.nodesOverlap=!pt(We)||Z.checkPoint(ce[0],ce[1],0,$,z,O.x,O.y,ie,K)||H.checkPoint(Le[0],Le[1],0,B,P,N.x,N.y,X,ee),C.vectorNormInverse=Me,M={nodesOverlap:C.nodesOverlap,dirCounts:C.dirCounts,calculatedIntersection:!0,hasBezier:C.hasBezier,hasUnbundled:C.hasUnbundled,eles:C.eles,srcPos:O,srcRs:K,tgtPos:N,tgtRs:ee,srcW:$,srcH:z,tgtW:B,tgtH:P,srcIntn:oe,tgtIntn:te,srcShape:Z,tgtShape:H,posPts:{x1:Fe.x2,y1:Fe.y2,x2:Fe.x1,y2:Fe.y1},intersectionPts:{x1:be.x2,y1:be.y2,x2:be.x1,y2:be.y1},vector:{x:-qe.x,y:-qe.y},vectorNorm:{x:-Re.x,y:-Re.y},vectorNormInverse:{x:-Me.x,y:-Me.y}}}var ye=ue?M:C;Y.nodesOverlap=ye.nodesOverlap,Y.srcIntn=ye.srcIntn,Y.tgtIntn=ye.tgtIntn,Y.isRound=Q.startsWith("round"),i&&(I.isParent()||I.isChild()||A.isParent()||A.isChild())&&(I.parents().anySame(A)||A.parents().anySame(I)||I.same(A)&&I.isParent())?e.findCompoundLoopPoints(W,ye,J,se):I===A?e.findLoopPoints(W,ye,J,se):Q.endsWith("segments")?e.findSegmentsPoints(W,ye):Q.endsWith("taxi")?e.findTaxiPoints(W,ye):Q==="straight"||!se&&C.eles.length%2===1&&J===Math.floor(C.eles.length/2)?e.findStraightEdgePoints(W):e.findBezierPoints(W,ye,J,se,ue),e.findEndpoints(W),e.tryToCorrectInvalidPoints(W,ye),e.checkForInvalidEdgeWarning(W),e.storeAllpts(W),e.storeEdgeProjections(W),e.calculateArrowAngles(W),e.recalculateEdgeLabelProjections(W),e.calculateLabelAngles(W)}},k=0;k<s.length;k++)_(k);this.findHaystackPoints(o)}};La.getSegmentPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var r=e.edgeType;if(r==="segments")return X0e(e.segpts)};La.getControlPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var r=e.edgeType;if(r==="bezier"||r==="multibezier"||r==="self"||r==="compound")return X0e(e.ctrlpts)};La.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};Cx={};Cx.manualEndptToPx=function(t,e){var r=this,n=t.position(),i=t.outerWidth(),a=t.outerHeight(),s=t._private.rscratch;if(e.value.length===2){var o=[e.pfValue[0],e.pfValue[1]];return e.units[0]==="%"&&(o[0]=o[0]*i),e.units[1]==="%"&&(o[1]=o[1]*a),o[0]+=n.x,o[1]+=n.y,o}else{var l=e.pfValue[0];l=-Math.PI/2+l;var u=2*Math.max(i,a),h=[n.x+Math.cos(l)*u,n.y+Math.sin(l)*u];return r.nodeShapes[this.getNodeShape(t)].intersectLine(n.x,n.y,i,a,h[0],h[1],0,t.pstyle("corner-radius").value==="auto"?"auto":t.pstyle("corner-radius").pfValue,s)}};Cx.findEndpoints=function(t){var e=this,r,n=t.source()[0],i=t.target()[0],a=n.position(),s=i.position(),o=t.pstyle("target-arrow-shape").value,l=t.pstyle("source-arrow-shape").value,u=t.pstyle("target-distance-from-node").pfValue,h=t.pstyle("source-distance-from-node").pfValue,f=n._private.rscratch,d=i._private.rscratch,p=t.pstyle("curve-style").value,g=t._private.rscratch,m=g.edgeType,x=p==="taxi",y=m==="self"||m==="compound",b=m==="bezier"||m==="multibezier"||y,w=m!=="bezier",_=m==="straight"||m==="segments",k=m==="segments",E=b||w||_,L=y||x,S=t.pstyle("source-endpoint"),C=L?"outside-to-node":S.value,M=n.pstyle("corner-radius").value==="auto"?"auto":n.pstyle("corner-radius").pfValue,R=t.pstyle("target-endpoint"),T=L?"outside-to-node":R.value,I=i.pstyle("corner-radius").value==="auto"?"auto":i.pstyle("corner-radius").pfValue;g.srcManEndpt=S,g.tgtManEndpt=R;var A,D,N,O;if(b){var B=[g.ctrlpts[0],g.ctrlpts[1]],P=w?[g.ctrlpts[g.ctrlpts.length-2],g.ctrlpts[g.ctrlpts.length-1]]:B;A=P,D=B}else if(_){var $=k?g.segpts.slice(0,2):[s.x,s.y],z=k?g.segpts.slice(g.segpts.length-2):[a.x,a.y];A=z,D=$}if(T==="inside-to-node")r=[s.x,s.y];else if(R.units)r=this.manualEndptToPx(i,R);else if(T==="outside-to-line")r=g.tgtIntn;else if(T==="outside-to-node"||T==="outside-to-node-or-label"?N=A:(T==="outside-to-line"||T==="outside-to-line-or-label")&&(N=[a.x,a.y]),r=e.nodeShapes[this.getNodeShape(i)].intersectLine(s.x,s.y,i.outerWidth(),i.outerHeight(),N[0],N[1],0,I,d),T==="outside-to-node-or-label"||T==="outside-to-line-or-label"){var H=i._private.rscratch,Z=H.labelWidth,X=H.labelHeight,ie=H.labelX,K=H.labelY,ee=Z/2,J=X/2,W=i.pstyle("text-valign").value;W==="top"?K-=J:W==="bottom"&&(K+=J);var Y=i.pstyle("text-halign").value;Y==="left"?ie-=ee:Y==="right"&&(ie+=ee);var Q=px(N[0],N[1],[ie-ee,K-J,ie+ee,K-J,ie+ee,K+J,ie-ee,K+J],s.x,s.y);if(Q.length>0){var se=a,ue=v0(se,Lm(r)),ce=v0(se,Lm(Q)),te=ue;if(ce<ue&&(r=Q,te=ce),Q.length>2){var Le=v0(se,{x:Q[2],y:Q[3]});Le<te&&(r=[Q[2],Q[3]])}}}var oe=a6(r,A,e.arrowShapes[o].spacing(t)+u),be=a6(r,A,e.arrowShapes[o].gap(t)+u);if(g.endX=be[0],g.endY=be[1],g.arrowEndX=oe[0],g.arrowEndY=oe[1],C==="inside-to-node")r=[a.x,a.y];else if(S.units)r=this.manualEndptToPx(n,S);else if(C==="outside-to-line")r=g.srcIntn;else if(C==="outside-to-node"||C==="outside-to-node-or-label"?O=D:(C==="outside-to-line"||C==="outside-to-line-or-label")&&(O=[s.x,s.y]),r=e.nodeShapes[this.getNodeShape(n)].intersectLine(a.x,a.y,n.outerWidth(),n.outerHeight(),O[0],O[1],0,M,f),C==="outside-to-node-or-label"||C==="outside-to-line-or-label"){var Fe=n._private.rscratch,Be=Fe.labelWidth,Ve=Fe.labelHeight,We=Fe.labelX,qe=Fe.labelY,Re=Be/2,Me=Ve/2,ye=n.pstyle("text-valign").value;ye==="top"?qe-=Me:ye==="bottom"&&(qe+=Me);var q=n.pstyle("text-halign").value;q==="left"?We-=Re:q==="right"&&(We+=Re);var de=px(O[0],O[1],[We-Re,qe-Me,We+Re,qe-Me,We+Re,qe+Me,We-Re,qe+Me],a.x,a.y);if(de.length>0){var ae=s,he=v0(ae,Lm(r)),U=v0(ae,Lm(de)),ke=he;if(U<he&&(r=[de[0],de[1]],ke=U),de.length>2){var j=v0(ae,{x:de[2],y:de[3]});j<ke&&(r=[de[2],de[3]])}}}var me=a6(r,D,e.arrowShapes[l].spacing(t)+h),Se=a6(r,D,e.arrowShapes[l].gap(t)+h);g.startX=Se[0],g.startY=Se[1],g.arrowStartX=me[0],g.arrowStartY=me[1],E&&(!pt(g.startX)||!pt(g.startY)||!pt(g.endX)||!pt(g.endY)?g.badLine=!0:g.badLine=!1)};Cx.getSourceEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[0],y:e.haystackPts[1]};default:return{x:e.arrowStartX,y:e.arrowStartY}}};Cx.getTargetEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[2],y:e.haystackPts[3]};default:return{x:e.arrowEndX,y:e.arrowEndY}}};qD={};qD.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,n=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,n==="multibezier"||n==="bezier"||n==="self"||n==="compound"){e.rstyle.bezierPts=[];for(var i=0;i+5<r.allpts.length;i+=4)lXe(this,t,r.allpts.slice(i,i+6))}else if(n==="segments")for(var a=e.rstyle.linePts=[],i=0;i+1<r.allpts.length;i+=2)a.push({x:r.allpts[i],y:r.allpts[i+1]});else if(n==="haystack"){var s=r.haystackPts;e.rstyle.haystackPts=[{x:s[0],y:s[1]},{x:s[2],y:s[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth};qD.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};Oc={};Oc.recalculateNodeLabelProjection=function(t){var e=t.pstyle("label").strValue;if(!uf(e)){var r,n,i=t._private,a=t.width(),s=t.height(),o=t.padding(),l=t.position(),u=t.pstyle("text-halign").strValue,h=t.pstyle("text-valign").strValue,f=i.rscratch,d=i.rstyle;switch(u){case"left":r=l.x-a/2-o;break;case"right":r=l.x+a/2+o;break;default:r=l.x}switch(h){case"top":n=l.y-s/2-o;break;case"bottom":n=l.y+s/2+o;break;default:n=l.y}f.labelX=r,f.labelY=n,d.labelX=r,d.labelY=n,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}};j0e=function(e,r){var n=Math.atan(r/e);return e===0&&n<0&&(n=n*-1),n},K0e=function(e,r){var n=r.x-e.x,i=r.y-e.y;return j0e(n,i)},cXe=function(e,r,n,i){var a=dx(0,i-.001,1),s=dx(0,i+.001,1),o=Nm(e,r,n,a),l=Nm(e,r,n,s);return K0e(o,l)};Oc.recalculateEdgeLabelProjections=function(t){var e,r=t._private,n=r.rscratch,i=this,a={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(a.mid||a.source||a.target){e={x:n.midX,y:n.midY};var s=function(f,d,p){sf(r.rscratch,f,d,p),sf(r.rstyle,f,d,p)};s("labelX",null,e.x),s("labelY",null,e.y);var o=j0e(n.midDispX,n.midDispY);s("labelAutoAngle",null,o);var l=function h(){if(h.cache)return h.cache;for(var f=[],d=0;d+5<n.allpts.length;d+=4){var p={x:n.allpts[d],y:n.allpts[d+1]},g={x:n.allpts[d+2],y:n.allpts[d+3]},m={x:n.allpts[d+4],y:n.allpts[d+5]};f.push({p0:p,p1:g,p2:m,startDist:0,length:0,segments:[]})}var x=r.rstyle.bezierPts,y=i.bezierProjPcts.length;function b(L,S,C,M,R){var T=E0(S,C),I=L.segments[L.segments.length-1],A={p0:S,p1:C,t0:M,t1:R,startDist:I?I.startDist+I.length:0,length:T};L.segments.push(A),L.length+=T}for(var w=0;w<f.length;w++){var _=f[w],k=f[w-1];k&&(_.startDist=k.startDist+k.length),b(_,_.p0,x[w*y],0,i.bezierProjPcts[0]);for(var E=0;E<y-1;E++)b(_,x[w*y+E],x[w*y+E+1],i.bezierProjPcts[E],i.bezierProjPcts[E+1]);b(_,x[w*y+y-1],_.p2,i.bezierProjPcts[y-1],1)}return h.cache=f},u=function(f){var d,p=f==="source";if(a[f]){var g=t.pstyle(f+"-text-offset").pfValue;switch(n.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var m=l(),x,y=0,b=0,w=0;w<m.length;w++){for(var _=m[p?w:m.length-1-w],k=0;k<_.segments.length;k++){var E=_.segments[p?k:_.segments.length-1-k],L=w===m.length-1&&k===_.segments.length-1;if(y=b,b+=E.length,b>=g||L){x={cp:_,segment:E};break}}if(x)break}var S=x.cp,C=x.segment,M=(g-y)/C.length,R=C.t1-C.t0,T=p?C.t0+R*M:C.t1-R*M;T=dx(0,T,1),e=Nm(S.p0,S.p1,S.p2,T),d=cXe(S.p0,S.p1,S.p2,T);break}case"straight":case"segments":case"haystack":{for(var I=0,A,D,N,O,B=n.allpts.length,P=0;P+3<B&&(p?(N={x:n.allpts[P],y:n.allpts[P+1]},O={x:n.allpts[P+2],y:n.allpts[P+3]}):(N={x:n.allpts[B-2-P],y:n.allpts[B-1-P]},O={x:n.allpts[B-4-P],y:n.allpts[B-3-P]}),A=E0(N,O),D=I,I+=A,!(I>=g));P+=2);var $=g-D,z=$/A;z=dx(0,z,1),e=pVe(N,O,z),d=K0e(N,O);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,d)}};u("source"),u("target"),this.applyLabelDimensions(t)}};Oc.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};Oc.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),i=this.calculateLabelDimensions(t,n),a=t.pstyle("line-height").pfValue,s=t.pstyle("text-wrap").strValue,o=Nl(r.rscratch,"labelWrapCachedLines",e)||[],l=s!=="wrap"?1:Math.max(o.length,1),u=i.height/l,h=u*a,f=i.width,d=i.height+(l-1)*(a-1)*u;sf(r.rstyle,"labelWidth",e,f),sf(r.rscratch,"labelWidth",e,f),sf(r.rstyle,"labelHeight",e,d),sf(r.rscratch,"labelHeight",e,d),sf(r.rscratch,"labelLineHeight",e,h)};Oc.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",i=t.pstyle(n+"label").strValue,a=t.pstyle("text-transform").value,s=function(Z,X){return X?(sf(r.rscratch,Z,e,X),X):Nl(r.rscratch,Z,e)};if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var o=t.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="\\u200B",h=i.split(`\n`),f=t.pstyle("text-max-width").pfValue,d=t.pstyle("text-overflow-wrap").value,p=d==="anywhere",g=[],m=/[\\s\\u200b]+|$/g,x=0;x<h.length;x++){var y=h[x],b=this.calculateLabelDimensions(t,y),w=b.width;if(p){var _=y.split("").join(u);y=_}if(w>f){var k=y.matchAll(m),E="",L=0,S=Ide(k),C;try{for(S.s();!(C=S.n()).done;){var M=C.value,R=M[0],T=y.substring(L,M.index);L=M.index+R.length;var I=E.length===0?T:E+T+R,A=this.calculateLabelDimensions(t,I),D=A.width;D<=f?E+=T+R:(E&&g.push(E),E=T+R)}}catch(H){S.e(H)}finally{S.f()}E.match(/^[\\s\\u200b]+$/)||g.push(E)}else g.push(y)}s("labelWrapCachedLines",g),i=s("labelWrapCachedText",g.join(`\n`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var N=t.pstyle("text-max-width").pfValue,O="",B="\\u2026",P=!1;if(this.calculateLabelDimensions(t,i).width<N)return i;for(var $=0;$<i.length;$++){var z=this.calculateLabelDimensions(t,O+i[$]+B).width;if(z>N)break;O+=i[$],$===i.length-1&&(P=!0)}return P||(O+=B),O}return i};Oc.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Oc.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),i=n.document,a=T0(e,t._private.labelDimsKey),s=r.labelDimCache||(r.labelDimCache=[]),o=s[a];if(o!=null)return o;var l=0,u=t.pstyle("font-style").strValue,h=t.pstyle("font-size").pfValue,f=t.pstyle("font-family").strValue,d=t.pstyle("font-weight").strValue,p=this.labelCalcCanvas,g=this.labelCalcCanvasContext;if(!p){p=this.labelCalcCanvas=i.createElement("canvas"),g=this.labelCalcCanvasContext=p.getContext("2d");var m=p.style;m.position="absolute",m.left="-9999px",m.top="-9999px",m.zIndex="-1",m.visibility="hidden",m.pointerEvents="none"}g.font="".concat(u," ").concat(d," ").concat(h,"px ").concat(f);for(var x=0,y=0,b=e.split(`\n`),w=0;w<b.length;w++){var _=b[w],k=g.measureText(_),E=Math.ceil(k.width),L=h;x=Math.max(E,x),y+=L}return x+=l,y+=l,s[a]={width:x,height:y}};Oc.calculateLabelAngle=function(t,e){var r=t._private,n=r.rscratch,i=t.isEdge(),a=e?e+"-":"",s=t.pstyle(a+"text-rotation"),o=s.strValue;return o==="none"?0:i&&o==="autorotate"?n.labelAutoAngle:o==="autorotate"?0:s.pfValue};Oc.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),n=t._private,i=n.rscratch;i.labelAngle=e.calculateLabelAngle(t),r&&(i.sourceLabelAngle=e.calculateLabelAngle(t,"source"),i.targetLabelAngle=e.calculateLabelAngle(t,"target"))};Z0e={},yde=28,xde=!1;Z0e.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<yde||t.height()<yde))return xde||(Qr("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),xde=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var n=t.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(n).name}return r};Z6={};Z6.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,n=function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l<s.length;l++){var u=s[l],h=u._private,f=h.rstyle;f.clean=!1,f.cleanConnected=!1}};r.binder(t).on("bounds.* dirty.*",function(s){var o=s.target;n(o)}).on("style.* background.*",function(s){var o=s.target;n(o,!1)});var i=function(s){if(s){var o=r.onUpdateEleCalcsFns;e.cleanStyle();for(var l=0;l<e.length;l++){var u=e[l],h=u._private.rstyle;u.isNode()&&!h.cleanConnected&&(n(u.connectedEdges()),h.cleanConnected=!0)}if(o)for(var f=0;f<o.length;f++){var d=o[f];d(s,e)}r.recalculateRenderedStyle(e),e=t.collection()}};r.flushRenderedStyleQueue=function(){i(!0)},r.beforeRender(i,r.beforeRenderPriorities.eleCalcs)};Z6.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)};Z6.recalculateRenderedStyle=function(t,e){var r=function(_){return _._private.rstyle.cleanConnected},n=[],i=[];if(!this.destroyed){e===void 0&&(e=!0);for(var a=0;a<t.length;a++){var s=t[a],o=s._private,l=o.rstyle;s.isEdge()&&(!r(s.source())||!r(s.target()))&&(l.clean=!1),!(e&&l.clean||s.removed())&&s.pstyle("display").value!=="none"&&(o.group==="nodes"?i.push(s):n.push(s),l.clean=!0)}for(var u=0;u<i.length;u++){var h=i[u],f=h._private,d=f.rstyle,p=h.position();this.recalculateNodeLabelProjection(h),d.nodeX=p.x,d.nodeY=p.y,d.nodeW=h.pstyle("width").pfValue,d.nodeH=h.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var g=0;g<n.length;g++){var m=n[g],x=m._private,y=x.rstyle,b=x.rscratch;y.srcX=b.arrowStartX,y.srcY=b.arrowStartY,y.tgtX=b.arrowEndX,y.tgtY=b.arrowEndY,y.midX=b.midX,y.midY=b.midY,y.labelAngle=b.labelAngle,y.sourceLabelAngle=b.sourceLabelAngle,y.targetLabelAngle=b.targetLabelAngle}}};Q6={};Q6.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=t[r],i=n._private.rscratch;n.grabbed()&&!n.isParent()?e.push(n):i.inDragLayer?t.drag.push(n):t.nondrag.push(n)}for(var r=0;r<e.length;r++){var n=e[r];t.drag.push(n)}}};Q6.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};Q6.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(D0e),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};Q0e={};[L0,M6,La,Cx,qD,Oc,Z0e,Z6,Q6].forEach(function(t){Zt(Q0e,t)});J0e={};J0e.getCachedImage=function(t,e,r){var n=this,i=n.imageCache=n.imageCache||{},a=i[t];if(a)return a.image.complete||a.image.addEventListener("load",r),a.image;a=i[t]=i[t]||{};var s=a.image=new Image;s.addEventListener("load",r),s.addEventListener("error",function(){s.error=!0});var o="data:",l=t.substring(0,o.length).toLowerCase()===o;return l||(e=e==="null"?null:e,s.crossOrigin=e),s.src=t,s};qm={};qm.registerBinding=function(t,e,r,n){var i=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var a=[],s=0;s<t.length;s++){var o=t[s];if(o!==void 0){var l=this.binder(o);a.push(l.on.apply(l,i))}}return a}var l=this.binder(t);return l.on.apply(l,i)};qm.binder=function(t){var e=this,r=e.cy.window(),n=t===r||t===r.document||t===r.document.body||DGe(t);if(e.supportsPassiveEvents==null){var i=!1;try{var a=Object.defineProperty({},"passive",{get:function(){return i=!0,!0}});r.addEventListener("test",null,a)}catch{}e.supportsPassiveEvents=i}var s=function(l,u,h){var f=Array.prototype.slice.call(arguments);return n&&e.supportsPassiveEvents&&(f[2]={capture:h??!1,passive:!1,once:!1}),e.bindings.push({target:t,args:f}),(t.addEventListener||t.on).apply(t,f),this};return{on:s,addEventListener:s,addListener:s,bind:s}};qm.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()};qm.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()};qm.load=function(){var t=this,e=t.cy.window(),r=function(q){return q.selected()},n=function(q){var de=q.getRootNode();if(de&&de.nodeType===11&&de.host!==void 0)return de},i=function(q,de,ae,he){q==null&&(q=t.cy);for(var U=0;U<de.length;U++){var ke=de[U];q.emit({originalEvent:ae,type:ke,position:he})}},a=function(q){return q.shiftKey||q.metaKey||q.ctrlKey},s=function(q,de){var ae=!0;if(t.cy.hasCompoundNodes()&&q&&q.pannable())for(var he=0;de&&he<de.length;he++){var q=de[he];if(q.isNode()&&q.isParent()&&!q.pannable()){ae=!1;break}}else ae=!0;return ae},o=function(q){q[0]._private.grabbed=!0},l=function(q){q[0]._private.grabbed=!1},u=function(q){q[0]._private.rscratch.inDragLayer=!0},h=function(q){q[0]._private.rscratch.inDragLayer=!1},f=function(q){q[0]._private.rscratch.isGrabTarget=!0},d=function(q){q[0]._private.rscratch.isGrabTarget=!1},p=function(q,de){var ae=de.addToList,he=ae.has(q);!he&&q.grabbable()&&!q.locked()&&(ae.merge(q),o(q))},g=function(q,de){if(q.cy().hasCompoundNodes()&&!(de.inDragLayer==null&&de.addToList==null)){var ae=q.descendants();de.inDragLayer&&(ae.forEach(u),ae.connectedEdges().forEach(u)),de.addToList&&p(ae,de)}},m=function(q,de){de=de||{};var ae=q.cy().hasCompoundNodes();de.inDragLayer&&(q.forEach(u),q.neighborhood().stdFilter(function(he){return!ae||he.isEdge()}).forEach(u)),de.addToList&&q.forEach(function(he){p(he,de)}),g(q,de),b(q,{inDragLayer:de.inDragLayer}),t.updateCachedGrabbedEles()},x=m,y=function(q){q&&(t.getCachedZSortedEles().forEach(function(de){l(de),h(de),d(de)}),t.updateCachedGrabbedEles())},b=function(q,de){if(!(de.inDragLayer==null&&de.addToList==null)&&q.cy().hasCompoundNodes()){var ae=q.ancestors().orphans();if(!ae.same(q)){var he=ae.descendants().spawnSelf().merge(ae).unmerge(q).unmerge(q.descendants()),U=he.connectedEdges();de.inDragLayer&&(U.forEach(u),he.forEach(u)),de.addToList&&he.forEach(function(ke){p(ke,de)})}}},w=function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},_=typeof MutationObserver<"u",k=typeof ResizeObserver<"u";_?(t.removeObserver=new MutationObserver(function(ye){for(var q=0;q<ye.length;q++){var de=ye[q],ae=de.removedNodes;if(ae)for(var he=0;he<ae.length;he++){var U=ae[he];if(U===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(ye){t.destroy()});var E=B6(function(){t.cy.resize()},100);_&&(t.styleObserver=new MutationObserver(E),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(e,"resize",E),k&&(t.resizeObserver=new ResizeObserver(E),t.resizeObserver.observe(t.container));var L=function(q,de){for(;q!=null;)de(q),q=q.parentNode},S=function(){t.invalidateContainerClientCoordsCache()};L(t.container,function(ye){t.registerBinding(ye,"transitionend",S),t.registerBinding(ye,"animationend",S),t.registerBinding(ye,"scroll",S)}),t.registerBinding(t.container,"contextmenu",function(ye){ye.preventDefault()});var C=function(){return t.selection[4]!==0},M=function(q){for(var de=t.findContainerClientCoords(),ae=de[0],he=de[1],U=de[2],ke=de[3],j=q.touches?q.touches:[q],me=!1,Se=0;Se<j.length;Se++){var Pe=j[Se];if(ae<=Pe.clientX&&Pe.clientX<=ae+U&&he<=Pe.clientY&&Pe.clientY<=he+ke){me=!0;break}}if(!me)return!1;for(var Ie=t.container,ge=q.target,ze=ge.parentNode,Ae=!1;ze;){if(ze===Ie){Ae=!0;break}ze=ze.parentNode}return!!Ae};t.registerBinding(t.container,"mousedown",function(q){if(M(q)&&!(t.hoverData.which===1&&q.which!==1)){q.preventDefault(),w(),t.hoverData.capture=!0,t.hoverData.which=q.which;var de=t.cy,ae=[q.clientX,q.clientY],he=t.projectIntoViewport(ae[0],ae[1]),U=t.selection,ke=t.findNearestElements(he[0],he[1],!0,!1),j=ke[0],me=t.dragData.possibleDragElements;t.hoverData.mdownPos=he,t.hoverData.mdownGPos=ae;var Se=function(){t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var Ye=t.hoverData.down;Ye?Ye.emit({originalEvent:q,type:"taphold",position:{x:he[0],y:he[1]}}):de.emit({originalEvent:q,type:"taphold",position:{x:he[0],y:he[1]}})}},t.tapholdDuration)};if(q.which==3){t.hoverData.cxtStarted=!0;var Pe={originalEvent:q,type:"cxttapstart",position:{x:he[0],y:he[1]}};j?(j.activate(),j.emit(Pe),t.hoverData.down=j):de.emit(Pe),t.hoverData.downTime=new Date().getTime(),t.hoverData.cxtDragged=!1}else if(q.which==1){j&&j.activate();{if(j!=null&&t.nodeIsGrabbable(j)){var Ie=function(Ye){return{originalEvent:q,type:Ye,position:{x:he[0],y:he[1]}}},ge=function(Ye){Ye.emit(Ie("grab"))};if(f(j),!j.selected())me=t.dragData.possibleDragElements=de.collection(),x(j,{addToList:me}),j.emit(Ie("grabon")).emit(Ie("grab"));else{me=t.dragData.possibleDragElements=de.collection();var ze=de.$(function(Ae){return Ae.isNode()&&Ae.selected()&&t.nodeIsGrabbable(Ae)});m(ze,{addToList:me}),j.emit(Ie("grabon")),ze.forEach(ge)}t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=j,t.hoverData.downs=ke,t.hoverData.downTime=new Date().getTime()}i(j,["mousedown","tapstart","vmousedown"],q,{x:he[0],y:he[1]}),j==null?(U[4]=1,t.data.bgActivePosistion={x:he[0],y:he[1]},t.redrawHint("select",!0),t.redraw()):j.pannable()&&(U[4]=1),Se()}U[0]=U[2]=he[0],U[1]=U[3]=he[1]}},!1);var R=n(t.container);t.registerBinding([e,R],"mousemove",function(q){var de=t.hoverData.capture;if(!(!de&&!M(q))){var ae=!1,he=t.cy,U=he.zoom(),ke=[q.clientX,q.clientY],j=t.projectIntoViewport(ke[0],ke[1]),me=t.hoverData.mdownPos,Se=t.hoverData.mdownGPos,Pe=t.selection,Ie=null;!t.hoverData.draggingEles&&!t.hoverData.dragging&&!t.hoverData.selecting&&(Ie=t.findNearestElement(j[0],j[1],!0,!1));var ge=t.hoverData.last,ze=t.hoverData.down,Ae=[j[0]-Pe[2],j[1]-Pe[3]],Ye=t.dragData.possibleDragElements,it;if(Se){var wt=ke[0]-Se[0],ft=wt*wt,He=ke[1]-Se[1],ut=He*He,$e=ft+ut;t.hoverData.isOverThresholdDrag=it=$e>=t.desktopTapThreshold2}var Ze=a(q);it&&(t.hoverData.tapholdCancelled=!0);var at=function(){var Vt=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Vt.length===0?(Vt.push(Ae[0]),Vt.push(Ae[1])):(Vt[0]+=Ae[0],Vt[1]+=Ae[1])};ae=!0,i(Ie,["mousemove","vmousemove","tapdrag"],q,{x:j[0],y:j[1]});var mt=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||he.emit({originalEvent:q,type:"boxstart",position:{x:j[0],y:j[1]}}),Pe[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(it){var Ut={originalEvent:q,type:"cxtdrag",position:{x:j[0],y:j[1]}};ze?ze.emit(Ut):he.emit(Ut),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||Ie!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:q,type:"cxtdragout",position:{x:j[0],y:j[1]}}),t.hoverData.cxtOver=Ie,Ie&&Ie.emit({originalEvent:q,type:"cxtdragover",position:{x:j[0],y:j[1]}}))}}else if(t.hoverData.dragging){if(ae=!0,he.panningEnabled()&&he.userPanningEnabled()){var st;if(t.hoverData.justStartedPan){var Qe=t.hoverData.mdownPos;st={x:(j[0]-Qe[0])*U,y:(j[1]-Qe[1])*U},t.hoverData.justStartedPan=!1}else st={x:Ae[0]*U,y:Ae[1]*U};he.panBy(st),he.emit("dragpan"),t.hoverData.dragged=!0}j=t.projectIntoViewport(q.clientX,q.clientY)}else if(Pe[4]==1&&(ze==null||ze.pannable())){if(it){if(!t.hoverData.dragging&&he.boxSelectionEnabled()&&(Ze||!he.panningEnabled()||!he.userPanningEnabled()))mt();else if(!t.hoverData.selecting&&he.panningEnabled()&&he.userPanningEnabled()){var lt=s(ze,t.hoverData.downs);lt&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Pe[4]=0,t.data.bgActivePosistion=Lm(me),t.redrawHint("select",!0),t.redraw())}ze&&ze.pannable()&&ze.active()&&ze.unactivate()}}else{if(ze&&ze.pannable()&&ze.active()&&ze.unactivate(),(!ze||!ze.grabbed())&&Ie!=ge&&(ge&&i(ge,["mouseout","tapdragout"],q,{x:j[0],y:j[1]}),Ie&&i(Ie,["mouseover","tapdragover"],q,{x:j[0],y:j[1]}),t.hoverData.last=Ie),ze)if(it){if(he.boxSelectionEnabled()&&Ze)ze&&ze.grabbed()&&(y(Ye),ze.emit("freeon"),Ye.emit("free"),t.dragData.didDrag&&(ze.emit("dragfreeon"),Ye.emit("dragfree"))),mt();else if(ze&&ze.grabbed()&&t.nodeIsDraggable(ze)){var kt=!t.dragData.didDrag;kt&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||m(Ye,{inDragLayer:!0});var ht={x:0,y:0};if(pt(Ae[0])&&pt(Ae[1])&&(ht.x+=Ae[0],ht.y+=Ae[1],kt)){var Rt=t.hoverData.dragDelta;Rt&&pt(Rt[0])&&pt(Rt[1])&&(ht.x+=Rt[0],ht.y+=Rt[1])}t.hoverData.draggingEles=!0,Ye.silentShift(ht).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else at();ae=!0}if(Pe[2]=j[0],Pe[3]=j[1],ae)return q.stopPropagation&&q.stopPropagation(),q.preventDefault&&q.preventDefault(),!1}},!1);var T,I,A;t.registerBinding(e,"mouseup",function(q){if(!(t.hoverData.which===1&&q.which!==1&&t.hoverData.capture)){var de=t.hoverData.capture;if(de){t.hoverData.capture=!1;var ae=t.cy,he=t.projectIntoViewport(q.clientX,q.clientY),U=t.selection,ke=t.findNearestElement(he[0],he[1],!0,!1),j=t.dragData.possibleDragElements,me=t.hoverData.down,Se=a(q);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,me&&me.unactivate(),t.hoverData.which===3){var Pe={originalEvent:q,type:"cxttapend",position:{x:he[0],y:he[1]}};if(me?me.emit(Pe):ae.emit(Pe),!t.hoverData.cxtDragged){var Ie={originalEvent:q,type:"cxttap",position:{x:he[0],y:he[1]}};me?me.emit(Ie):ae.emit(Ie)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(i(ke,["mouseup","tapend","vmouseup"],q,{x:he[0],y:he[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(i(me,["click","tap","vclick"],q,{x:he[0],y:he[1]}),I=!1,q.timeStamp-A<=ae.multiClickDebounceTime()?(T&&clearTimeout(T),I=!0,A=null,i(me,["dblclick","dbltap","vdblclick"],q,{x:he[0],y:he[1]})):(T=setTimeout(function(){I||i(me,["oneclick","onetap","voneclick"],q,{x:he[0],y:he[1]})},ae.multiClickDebounceTime()),A=q.timeStamp)),me==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!a(q)&&(ae.$(r).unselect(["tapunselect"]),j.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=j=ae.collection()),ke==me&&!t.dragData.didDrag&&!t.hoverData.selecting&&ke!=null&&ke._private.selectable&&(t.hoverData.dragging||(ae.selectionType()==="additive"||Se?ke.selected()?ke.unselect(["tapunselect"]):ke.select(["tapselect"]):Se||(ae.$(r).unmerge(ke).unselect(["tapunselect"]),ke.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var ge=ae.collection(t.getAllInBox(U[0],U[1],U[2],U[3]));t.redrawHint("select",!0),ge.length>0&&t.redrawHint("eles",!0),ae.emit({type:"boxend",originalEvent:q,position:{x:he[0],y:he[1]}});var ze=function(it){return it.selectable()&&!it.selected()};ae.selectionType()==="additive"||Se||ae.$(r).unmerge(ge).unselect(),ge.emit("box").stdFilter(ze).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!U[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var Ae=me&&me.grabbed();y(j),Ae&&(me.emit("freeon"),j.emit("free"),t.dragData.didDrag&&(me.emit("dragfreeon"),j.emit("dragfree")))}}U[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var D=function(q){if(!t.scrollingPage){var de=t.cy,ae=de.zoom(),he=de.pan(),U=t.projectIntoViewport(q.clientX,q.clientY),ke=[U[0]*ae+he.x,U[1]*ae+he.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||C()){q.preventDefault();return}if(de.panningEnabled()&&de.userPanningEnabled()&&de.zoomingEnabled()&&de.userZoomingEnabled()){q.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var j;q.deltaY!=null?j=q.deltaY/-250:q.wheelDeltaY!=null?j=q.wheelDeltaY/1e3:j=q.wheelDelta/1e3,j=j*t.wheelSensitivity;var me=q.deltaMode===1;me&&(j*=33);var Se=de.zoom()*Math.pow(10,j);q.type==="gesturechange"&&(Se=t.gestureStartZoom*q.scale),de.zoom({level:Se,renderedPosition:{x:ke[0],y:ke[1]}}),de.emit(q.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};t.registerBinding(t.container,"wheel",D,!0),t.registerBinding(e,"scroll",function(q){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(q){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||q.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(ye){t.hasTouchStarted||D(ye)},!0),t.registerBinding(t.container,"mouseout",function(q){var de=t.projectIntoViewport(q.clientX,q.clientY);t.cy.emit({originalEvent:q,type:"mouseout",position:{x:de[0],y:de[1]}})},!1),t.registerBinding(t.container,"mouseover",function(q){var de=t.projectIntoViewport(q.clientX,q.clientY);t.cy.emit({originalEvent:q,type:"mouseover",position:{x:de[0],y:de[1]}})},!1);var N,O,B,P,$,z,H,Z,X,ie,K,ee,J,W=function(q,de,ae,he){return Math.sqrt((ae-q)*(ae-q)+(he-de)*(he-de))},Y=function(q,de,ae,he){return(ae-q)*(ae-q)+(he-de)*(he-de)},Q;t.registerBinding(t.container,"touchstart",Q=function(q){if(t.hasTouchStarted=!0,!!M(q)){w(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var de=t.cy,ae=t.touchData.now,he=t.touchData.earlier;if(q.touches[0]){var U=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);ae[0]=U[0],ae[1]=U[1]}if(q.touches[1]){var U=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);ae[2]=U[0],ae[3]=U[1]}if(q.touches[2]){var U=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);ae[4]=U[0],ae[5]=U[1]}if(q.touches[1]){t.touchData.singleTouchMoved=!0,y(t.dragData.touchDragEles);var ke=t.findContainerClientCoords();X=ke[0],ie=ke[1],K=ke[2],ee=ke[3],N=q.touches[0].clientX-X,O=q.touches[0].clientY-ie,B=q.touches[1].clientX-X,P=q.touches[1].clientY-ie,J=0<=N&&N<=K&&0<=B&&B<=K&&0<=O&&O<=ee&&0<=P&&P<=ee;var j=de.pan(),me=de.zoom();$=W(N,O,B,P),z=Y(N,O,B,P),H=[(N+B)/2,(O+P)/2],Z=[(H[0]-j.x)/me,(H[1]-j.y)/me];var Se=200,Pe=Se*Se;if(z<Pe&&!q.touches[2]){var Ie=t.findNearestElement(ae[0],ae[1],!0,!0),ge=t.findNearestElement(ae[2],ae[3],!0,!0);Ie&&Ie.isNode()?(Ie.activate().emit({originalEvent:q,type:"cxttapstart",position:{x:ae[0],y:ae[1]}}),t.touchData.start=Ie):ge&&ge.isNode()?(ge.activate().emit({originalEvent:q,type:"cxttapstart",position:{x:ae[0],y:ae[1]}}),t.touchData.start=ge):de.emit({originalEvent:q,type:"cxttapstart",position:{x:ae[0],y:ae[1]}}),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return}}if(q.touches[2])de.boxSelectionEnabled()&&q.preventDefault();else if(!q.touches[1]){if(q.touches[0]){var ze=t.findNearestElements(ae[0],ae[1],!0,!0),Ae=ze[0];if(Ae!=null&&(Ae.activate(),t.touchData.start=Ae,t.touchData.starts=ze,t.nodeIsGrabbable(Ae))){var Ye=t.dragData.touchDragEles=de.collection(),it=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),Ae.selected()?(it=de.$(function($e){return $e.selected()&&t.nodeIsGrabbable($e)}),m(it,{addToList:Ye})):x(Ae,{addToList:Ye}),f(Ae);var wt=function(Ze){return{originalEvent:q,type:Ze,position:{x:ae[0],y:ae[1]}}};Ae.emit(wt("grabon")),it?it.forEach(function($e){$e.emit(wt("grab"))}):Ae.emit(wt("grab"))}i(Ae,["touchstart","tapstart","vmousedown"],q,{x:ae[0],y:ae[1]}),Ae==null&&(t.data.bgActivePosistion={x:U[0],y:U[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&i(t.touchData.start,["taphold"],q,{x:ae[0],y:ae[1]})},t.tapholdDuration)}}if(q.touches.length>=1){for(var ft=t.touchData.startPosition=[null,null,null,null,null,null],He=0;He<ae.length;He++)ft[He]=he[He]=ae[He];var ut=q.touches[0];t.touchData.startGPosition=[ut.clientX,ut.clientY]}}},!1);var se;t.registerBinding(e,"touchmove",se=function(q){var de=t.touchData.capture;if(!(!de&&!M(q))){var ae=t.selection,he=t.cy,U=t.touchData.now,ke=t.touchData.earlier,j=he.zoom();if(q.touches[0]){var me=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);U[0]=me[0],U[1]=me[1]}if(q.touches[1]){var me=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);U[2]=me[0],U[3]=me[1]}if(q.touches[2]){var me=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);U[4]=me[0],U[5]=me[1]}var Se=t.touchData.startGPosition,Pe;if(de&&q.touches[0]&&Se){for(var Ie=[],ge=0;ge<U.length;ge++)Ie[ge]=U[ge]-ke[ge];var ze=q.touches[0].clientX-Se[0],Ae=ze*ze,Ye=q.touches[0].clientY-Se[1],it=Ye*Ye,wt=Ae+it;Pe=wt>=t.touchTapThreshold2}if(de&&t.touchData.cxt){q.preventDefault();var ft=q.touches[0].clientX-X,He=q.touches[0].clientY-ie,ut=q.touches[1].clientX-X,$e=q.touches[1].clientY-ie,Ze=Y(ft,He,ut,$e),at=Ze/z,mt=150,Ut=mt*mt,st=1.5,Qe=st*st;if(at>=Qe||Ze>=Ut){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var lt={originalEvent:q,type:"cxttapend",position:{x:U[0],y:U[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(lt),t.touchData.start=null):he.emit(lt)}}if(de&&t.touchData.cxt){var lt={originalEvent:q,type:"cxtdrag",position:{x:U[0],y:U[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(lt):he.emit(lt),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var kt=t.findNearestElement(U[0],U[1],!0,!0);(!t.touchData.cxtOver||kt!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:q,type:"cxtdragout",position:{x:U[0],y:U[1]}}),t.touchData.cxtOver=kt,kt&&kt.emit({originalEvent:q,type:"cxtdragover",position:{x:U[0],y:U[1]}}))}else if(de&&q.touches[2]&&he.boxSelectionEnabled())q.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||he.emit({originalEvent:q,type:"boxstart",position:{x:U[0],y:U[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,ae[4]=1,!ae||ae.length===0||ae[0]===void 0?(ae[0]=(U[0]+U[2]+U[4])/3,ae[1]=(U[1]+U[3]+U[5])/3,ae[2]=(U[0]+U[2]+U[4])/3+1,ae[3]=(U[1]+U[3]+U[5])/3+1):(ae[2]=(U[0]+U[2]+U[4])/3,ae[3]=(U[1]+U[3]+U[5])/3),t.redrawHint("select",!0),t.redraw();else if(de&&q.touches[1]&&!t.touchData.didSelect&&he.zoomingEnabled()&&he.panningEnabled()&&he.userZoomingEnabled()&&he.userPanningEnabled()){q.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var ht=t.dragData.touchDragEles;if(ht){t.redrawHint("drag",!0);for(var Rt=0;Rt<ht.length;Rt++){var An=ht[Rt]._private;An.grabbed=!1,An.rscratch.inDragLayer=!1}}var Vt=t.touchData.start,ft=q.touches[0].clientX-X,He=q.touches[0].clientY-ie,ut=q.touches[1].clientX-X,$e=q.touches[1].clientY-ie,Jr=W(ft,He,ut,$e),mn=Jr/$;if(J){var Dr=ft-N,jn=He-O,_n=ut-B,vt=$e-P,Ee=(Dr+_n)/2,tt=(jn+vt)/2,bt=he.zoom(),ir=bt*mn,ln=he.pan(),vn=Z[0]*bt+ln.x,Ln=Z[1]*bt+ln.y,In={x:-ir/bt*(vn-ln.x-Ee)+vn,y:-ir/bt*(Ln-ln.y-tt)+Ln};if(Vt&&Vt.active()){var ht=t.dragData.touchDragEles;y(ht),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Vt.unactivate().emit("freeon"),ht.emit("free"),t.dragData.didDrag&&(Vt.emit("dragfreeon"),ht.emit("dragfree"))}he.viewport({zoom:ir,pan:In,cancelOnFailedZoom:!0}),he.emit("pinchzoom"),$=Jr,N=ft,O=He,B=ut,P=$e,t.pinching=!0}if(q.touches[0]){var me=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);U[0]=me[0],U[1]=me[1]}if(q.touches[1]){var me=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);U[2]=me[0],U[3]=me[1]}if(q.touches[2]){var me=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);U[4]=me[0],U[5]=me[1]}}else if(q.touches[0]&&!t.touchData.didSelect){var dt=t.touchData.start,yt=t.touchData.last,kt;if(!t.hoverData.draggingEles&&!t.swipePanning&&(kt=t.findNearestElement(U[0],U[1],!0,!0)),de&&dt!=null&&q.preventDefault(),de&&dt!=null&&t.nodeIsDraggable(dt))if(Pe){var ht=t.dragData.touchDragEles,Tt=!t.dragData.didDrag;Tt&&m(ht,{inDragLayer:!0}),t.dragData.didDrag=!0;var Ue={x:0,y:0};if(pt(Ie[0])&&pt(Ie[1])&&(Ue.x+=Ie[0],Ue.y+=Ie[1],Tt)){t.redrawHint("eles",!0);var Ct=t.touchData.dragDelta;Ct&&pt(Ct[0])&&pt(Ct[1])&&(Ue.x+=Ct[0],Ue.y+=Ct[1])}t.hoverData.draggingEles=!0,ht.silentShift(Ue).emit("position drag"),t.redrawHint("drag",!0),t.touchData.startPosition[0]==ke[0]&&t.touchData.startPosition[1]==ke[1]&&t.redrawHint("eles",!0),t.redraw()}else{var Ct=t.touchData.dragDelta=t.touchData.dragDelta||[];Ct.length===0?(Ct.push(Ie[0]),Ct.push(Ie[1])):(Ct[0]+=Ie[0],Ct[1]+=Ie[1])}if(i(dt||kt,["touchmove","tapdrag","vmousemove"],q,{x:U[0],y:U[1]}),(!dt||!dt.grabbed())&&kt!=yt&&(yt&&yt.emit({originalEvent:q,type:"tapdragout",position:{x:U[0],y:U[1]}}),kt&&kt.emit({originalEvent:q,type:"tapdragover",position:{x:U[0],y:U[1]}})),t.touchData.last=kt,de)for(var Rt=0;Rt<U.length;Rt++)U[Rt]&&t.touchData.startPosition[Rt]&&Pe&&(t.touchData.singleTouchMoved=!0);if(de&&(dt==null||dt.pannable())&&he.panningEnabled()&&he.userPanningEnabled()){var fe=s(dt,t.touchData.starts);fe&&(q.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=Lm(t.touchData.startPosition)),t.swipePanning?(he.panBy({x:Ie[0]*j,y:Ie[1]*j}),he.emit("dragpan")):Pe&&(t.swipePanning=!0,he.panBy({x:ze*j,y:Ye*j}),he.emit("dragpan"),dt&&(dt.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));var me=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);U[0]=me[0],U[1]=me[1]}}for(var ge=0;ge<U.length;ge++)ke[ge]=U[ge];de&&q.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var ue;t.registerBinding(e,"touchcancel",ue=function(q){var de=t.touchData.start;t.touchData.capture=!1,de&&de.unactivate()});var ce,te,Le,oe;if(t.registerBinding(e,"touchend",ce=function(q){var de=t.touchData.start,ae=t.touchData.capture;if(ae)q.touches.length===0&&(t.touchData.capture=!1),q.preventDefault();else return;var he=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var U=t.cy,ke=U.zoom(),j=t.touchData.now,me=t.touchData.earlier;if(q.touches[0]){var Se=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);j[0]=Se[0],j[1]=Se[1]}if(q.touches[1]){var Se=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);j[2]=Se[0],j[3]=Se[1]}if(q.touches[2]){var Se=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);j[4]=Se[0],j[5]=Se[1]}de&&de.unactivate();var Pe;if(t.touchData.cxt){if(Pe={originalEvent:q,type:"cxttapend",position:{x:j[0],y:j[1]}},de?de.emit(Pe):U.emit(Pe),!t.touchData.cxtDragged){var Ie={originalEvent:q,type:"cxttap",position:{x:j[0],y:j[1]}};de?de.emit(Ie):U.emit(Ie)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!q.touches[2]&&U.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var ge=U.collection(t.getAllInBox(he[0],he[1],he[2],he[3]));he[0]=void 0,he[1]=void 0,he[2]=void 0,he[3]=void 0,he[4]=0,t.redrawHint("select",!0),U.emit({type:"boxend",originalEvent:q,position:{x:j[0],y:j[1]}});var ze=function(Ut){return Ut.selectable()&&!Ut.selected()};ge.emit("box").stdFilter(ze).select().emit("boxselect"),ge.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(de?.unactivate(),q.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!q.touches[1]){if(!q.touches[0]){if(!q.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Ae=t.dragData.touchDragEles;if(de!=null){var Ye=de._private.grabbed;y(Ae),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Ye&&(de.emit("freeon"),Ae.emit("free"),t.dragData.didDrag&&(de.emit("dragfreeon"),Ae.emit("dragfree"))),i(de,["touchend","tapend","vmouseup","tapdragout"],q,{x:j[0],y:j[1]}),de.unactivate(),t.touchData.start=null}else{var it=t.findNearestElement(j[0],j[1],!0,!0);i(it,["touchend","tapend","vmouseup","tapdragout"],q,{x:j[0],y:j[1]})}var wt=t.touchData.startPosition[0]-j[0],ft=wt*wt,He=t.touchData.startPosition[1]-j[1],ut=He*He,$e=ft+ut,Ze=$e*ke*ke;t.touchData.singleTouchMoved||(de||U.$(":selected").unselect(["tapunselect"]),i(de,["tap","vclick"],q,{x:j[0],y:j[1]}),te=!1,q.timeStamp-oe<=U.multiClickDebounceTime()?(Le&&clearTimeout(Le),te=!0,oe=null,i(de,["dbltap","vdblclick"],q,{x:j[0],y:j[1]})):(Le=setTimeout(function(){te||i(de,["onetap","voneclick"],q,{x:j[0],y:j[1]})},U.multiClickDebounceTime()),oe=q.timeStamp)),de!=null&&!t.dragData.didDrag&&de._private.selectable&&Ze<t.touchTapThreshold2&&!t.pinching&&(U.selectionType()==="single"?(U.$(r).unmerge(de).unselect(["tapunselect"]),de.select(["tapselect"])):de.selected()?de.unselect(["tapunselect"]):de.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}}}for(var at=0;at<j.length;at++)me[at]=j[at];t.dragData.didDrag=!1,q.touches.length===0&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),q.touches.length<2&&(q.touches.length===1&&(t.touchData.startGPosition=[q.touches[0].clientX,q.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())},!1),typeof TouchEvent>"u"){var be=[],Fe=function(q){return{clientX:q.clientX,clientY:q.clientY,force:1,identifier:q.pointerId,pageX:q.pageX,pageY:q.pageY,radiusX:q.width/2,radiusY:q.height/2,screenX:q.screenX,screenY:q.screenY,target:q.target}},Be=function(q){return{event:q,touch:Fe(q)}},Ve=function(q){be.push(Be(q))},We=function(q){for(var de=0;de<be.length;de++){var ae=be[de];if(ae.event.pointerId===q.pointerId){be.splice(de,1);return}}},qe=function(q){var de=be.filter(function(ae){return ae.event.pointerId===q.pointerId})[0];de.event=q,de.touch=Fe(q)},Re=function(q){q.touches=be.map(function(de){return de.touch})},Me=function(q){return q.pointerType==="mouse"||q.pointerType===4};t.registerBinding(t.container,"pointerdown",function(ye){Me(ye)||(ye.preventDefault(),Ve(ye),Re(ye),Q(ye))}),t.registerBinding(t.container,"pointerup",function(ye){Me(ye)||(We(ye),Re(ye),ce(ye))}),t.registerBinding(t.container,"pointercancel",function(ye){Me(ye)||(We(ye),Re(ye),ue(ye))}),t.registerBinding(t.container,"pointermove",function(ye){Me(ye)||(ye.preventDefault(),qe(ye),Re(ye),se(ye))})}};Hu={};Hu.generatePolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:function(n,i,a,s,o,l){this.renderer.nodeShapeImpl("polygon",n,i,a,s,o,this.points)},intersectLine:function(n,i,a,s,o,l,u,h){return px(o,l,this.points,n,i,a/2,s/2,u)},checkPoint:function(n,i,a,s,o,l,u,h){return Vu(n,i,this.points,l,u,s,o,[0,-1],a)}}};Hu.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,r,n,i,a,s){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a)},intersectLine:function(e,r,n,i,a,s,o,l){return AVe(a,s,e,r,n/2+o,i/2+o)},checkPoint:function(e,r,n,i,a,s,o,l){return w0(e,r,i,a,s,o,n)}}};Hu.generateRoundPolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,getOrCreateCorners:function(n,i,a,s,o,l,u){if(l[u]!==void 0&&l[u+"-cx"]===n&&l[u+"-cy"]===i)return l[u];l[u]=new Array(e.length/2),l[u+"-cx"]=n,l[u+"-cy"]=i;var h=a/2,f=s/2;o=o==="auto"?r0e(a,s):o;for(var d=new Array(e.length/2),p=0;p<e.length/2;p++)d[p]={x:n+h*e[p*2],y:i+f*e[p*2+1]};var g,m,x,y,b=d.length;for(m=d[b-1],g=0;g<b;g++)x=d[g%b],y=d[(g+1)%b],l[u][g]=HD(m,x,y,o),m=x,x=y;return l[u]},draw:function(n,i,a,s,o,l,u){this.renderer.nodeShapeImpl("round-polygon",n,i,a,s,o,this.points,this.getOrCreateCorners(i,a,s,o,l,u,"drawCorners"))},intersectLine:function(n,i,a,s,o,l,u,h,f){return _Ve(o,l,this.points,n,i,a,s,u,this.getOrCreateCorners(n,i,a,s,h,f,"corners"))},checkPoint:function(n,i,a,s,o,l,u,h,f){return CVe(n,i,this.points,l,u,s,o,this.getOrCreateCorners(l,u,s,o,h,f,"corners"))}}};Hu.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Qa(4,0),draw:function(e,r,n,i,a,s){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a,this.points,s)},intersectLine:function(e,r,n,i,a,s,o,l){return e0e(a,s,e,r,n,i,o,l)},checkPoint:function(e,r,n,i,a,s,o,l){var u=i/2,h=a/2;l=l==="auto"?S0(i,a):l,l=Math.min(u,h,l);var f=l*2;return!!(Vu(e,r,this.points,s,o,i,a-f,[0,-1],n)||Vu(e,r,this.points,s,o,i-f,a,[0,-1],n)||w0(e,r,f,f,s-u+l,o-h+l,n)||w0(e,r,f,f,s+u-l,o-h+l,n)||w0(e,r,f,f,s+u-l,o+h-l,n)||w0(e,r,f,f,s-u+l,o+h-l,n))}}};Hu.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:MD(),points:Qa(4,0),draw:function(e,r,n,i,a,s){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a,null,s)},generateCutTrianglePts:function(e,r,n,i,a){var s=a==="auto"?this.cornerLength:a,o=r/2,l=e/2,u=n-l,h=n+l,f=i-o,d=i+o;return{topLeft:[u,f+s,u+s,f,u+s,f+s],topRight:[h-s,f,h,f+s,h-s,f+s],bottomRight:[h,d-s,h-s,d,h-s,d-s],bottomLeft:[u+s,d,u,d-s,u+s,d-s]}},intersectLine:function(e,r,n,i,a,s,o,l){var u=this.generateCutTrianglePts(n+2*o,i+2*o,e,r,l),h=[].concat.apply([],[u.topLeft.splice(0,4),u.topRight.splice(0,4),u.bottomRight.splice(0,4),u.bottomLeft.splice(0,4)]);return px(a,s,h,e,r)},checkPoint:function(e,r,n,i,a,s,o,l){var u=l==="auto"?this.cornerLength:l;if(Vu(e,r,this.points,s,o,i,a-2*u,[0,-1],n)||Vu(e,r,this.points,s,o,i-2*u,a,[0,-1],n))return!0;var h=this.generateCutTrianglePts(i,a,s,o);return As(e,r,h.topLeft)||As(e,r,h.topRight)||As(e,r,h.bottomRight)||As(e,r,h.bottomLeft)}}};Hu.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Qa(4,0),draw:function(e,r,n,i,a,s){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a)},intersectLine:function(e,r,n,i,a,s,o,l){var u=.15,h=.5,f=.85,d=this.generateBarrelBezierPts(n+2*o,i+2*o,e,r),p=function(x){var y=Nm({x:x[0],y:x[1]},{x:x[2],y:x[3]},{x:x[4],y:x[5]},u),b=Nm({x:x[0],y:x[1]},{x:x[2],y:x[3]},{x:x[4],y:x[5]},h),w=Nm({x:x[0],y:x[1]},{x:x[2],y:x[3]},{x:x[4],y:x[5]},f);return[x[0],x[1],y.x,y.y,b.x,b.y,w.x,w.y,x[4],x[5]]},g=[].concat(p(d.topLeft),p(d.topRight),p(d.bottomRight),p(d.bottomLeft));return px(a,s,g,e,r)},generateBarrelBezierPts:function(e,r,n,i){var a=r/2,s=e/2,o=n-s,l=n+s,u=i-a,h=i+a,f=cD(e,r),d=f.heightOffset,p=f.widthOffset,g=f.ctrlPtOffsetPct*e,m={topLeft:[o,u+d,o+g,u,o+p,u],topRight:[l-p,u,l-g,u,l,u+d],bottomRight:[l,h-d,l-g,h,l-p,h],bottomLeft:[o+p,h,o+g,h,o,h-d]};return m.topLeft.isTop=!0,m.topRight.isTop=!0,m.bottomLeft.isBottom=!0,m.bottomRight.isBottom=!0,m},checkPoint:function(e,r,n,i,a,s,o,l){var u=cD(i,a),h=u.heightOffset,f=u.widthOffset;if(Vu(e,r,this.points,s,o,i,a-2*h,[0,-1],n)||Vu(e,r,this.points,s,o,i-2*f,a,[0,-1],n))return!0;for(var d=this.generateBarrelBezierPts(i,a,s,o),p=function(S,C,M){var R=M[4],T=M[2],I=M[0],A=M[5],D=M[1],N=Math.min(R,I),O=Math.max(R,I),B=Math.min(A,D),P=Math.max(A,D);if(N<=S&&S<=O&&B<=C&&C<=P){var $=LVe(R,T,I),z=kVe($[0],$[1],$[2],S),H=z.filter(function(Z){return 0<=Z&&Z<=1});if(H.length>0)return H[0]}return null},g=Object.keys(d),m=0;m<g.length;m++){var x=g[m],y=d[x],b=p(e,r,y);if(b!=null){var w=y[5],_=y[3],k=y[1],E=qi(w,_,k,b);if(y.isTop&&E<=r||y.isBottom&&r<=E)return!0}}return!1}}};Hu.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Qa(4,0),draw:function(e,r,n,i,a,s){this.renderer.nodeShapeImpl(this.name,e,r,n,i,a,this.points,s)},intersectLine:function(e,r,n,i,a,s,o,l){var u=e-(n/2+o),h=r-(i/2+o),f=h,d=e+(n/2+o),p=of(a,s,e,r,u,h,d,f,!1);return p.length>0?p:e0e(a,s,e,r,n,i,o,l)},checkPoint:function(e,r,n,i,a,s,o,l){l=l==="auto"?S0(i,a):l;var u=2*l;if(Vu(e,r,this.points,s,o,i,a-u,[0,-1],n)||Vu(e,r,this.points,s,o,i-u,a,[0,-1],n))return!0;var h=i/2+2*n,f=a/2+2*n,d=[s-h,o-f,s-h,o,s+h,o,s+h,o-f];return!!(As(e,r,d)||w0(e,r,u,u,s+i/2-l,o+a/2-l,n)||w0(e,r,u,u,s-i/2+l,o+a/2-l,n))}}};Hu.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Qa(3,0)),this.generateRoundPolygon("round-triangle",Qa(3,0)),this.generatePolygon("rectangle",Qa(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",Qa(5,0)),this.generateRoundPolygon("round-pentagon",Qa(5,0)),this.generatePolygon("hexagon",Qa(6,0)),this.generateRoundPolygon("round-hexagon",Qa(6,0)),this.generatePolygon("heptagon",Qa(7,0)),this.generateRoundPolygon("round-heptagon",Qa(7,0)),this.generatePolygon("octagon",Qa(8,0)),this.generateRoundPolygon("round-octagon",Qa(8,0));var n=new Array(20);{var i=lD(5,0),a=lD(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o<a.length/2;o++)a[o*2]*=s,a[o*2+1]*=s;for(var o=0;o<20/4;o++)n[o*4]=i[o*2],n[o*4+1]=i[o*2+1],n[o*4+2]=a[o*2],n[o*4+3]=a[o*2+1]}n=t0e(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);{var l=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",l),this.generateRoundPolygon("round-tag",l)}t.makePolygon=function(u){var h=u.join("$"),f="polygon-"+h,d;return(d=this[f])?d:e.generatePolygon(f,u)}};Ax={};Ax.timeToRender=function(){return this.redrawTotalTime/this.redrawCount};Ax.redraw=function(t){t=t||jde();var e=this;e.averageRedrawTime===void 0&&(e.averageRedrawTime=0),e.lastRedrawTime===void 0&&(e.lastRedrawTime=0),e.lastDrawTime===void 0&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t};Ax.beforeRender=function(t,e){if(!this.destroyed){e==null&&ri("Priority is not optional for beforeRender");var r=this.beforeRenderCallbacks;r.push({fn:t,priority:e}),r.sort(function(n,i){return i.priority-n.priority})}};bde=function(e,r,n){for(var i=e.beforeRenderCallbacks,a=0;a<i.length;a++)i[a].fn(r,n)};Ax.startRenderLoop=function(){var t=this,e=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var r=function n(i){if(!t.destroyed){if(!e.batching())if(t.requestedFrame&&!t.skipFrame){bde(t,!0,i);var a=Uu();t.render(t.renderOptions);var s=t.lastDrawTime=Uu();t.averageRedrawTime===void 0&&(t.averageRedrawTime=s-a),t.redrawCount===void 0&&(t.redrawCount=0),t.redrawCount++,t.redrawTotalTime===void 0&&(t.redrawTotalTime=0);var o=s-a;t.redrawTotalTime+=o,t.lastRedrawTime=o,t.averageRedrawTime=t.averageRedrawTime/2+o/2,t.requestedFrame=!1}else bde(t,!1,i);t.skipFrame=!1,S6(n)}};S6(r)}};uXe=function(e){this.init(e)},epe=uXe,Ym=epe.prototype;Ym.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"];Ym.init=function(t){var e=this;e.options=t,e.cy=t.cy;var r=e.container=t.cy.container(),n=e.cy.window();if(n){var i=n.document,a=i.head,s="__________cytoscape_stylesheet",o="__________cytoscape_container",l=i.getElementById(s)!=null;if(r.className.indexOf(o)<0&&(r.className=(r.className||"")+" "+o),!l){var u=i.createElement("style");u.id=s,u.textContent="."+o+" { position: relative; }",a.insertBefore(u,a.children[0])}var h=n.getComputedStyle(r),f=h.getPropertyValue("position");f==="static"&&Qr("A Cytoscape container has style position:static and so can not use UI extensions properly")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=pt(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()};Ym.notify=function(t,e){var r=this,n=r.cy;if(!this.destroyed){if(t==="init"){r.load();return}if(t==="destroy"){r.destroy();return}(t==="add"||t==="remove"||t==="move"&&n.hasCompoundNodes()||t==="load"||t==="zorder"||t==="mount")&&r.invalidateCachedZSortedEles(),t==="viewport"&&r.redrawHint("select",!0),(t==="load"||t==="resize"||t==="mount")&&(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}};Ym.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],n=r,i=n.target;(i.off||i.removeEventListener).apply(i,n.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch{}};Ym.isHeadless=function(){return!1};[WD,Q0e,J0e,qm,Hu,Ax].forEach(function(t){Zt(Ym,t)});aD=1e3/60,tpe={setupDequeueing:function(e){return function(){var n=this,i=this.renderer;if(!n.dequeueingSetup){n.dequeueingSetup=!0;var a=B6(function(){i.redrawHint("eles",!0),i.redrawHint("drag",!0),i.redraw()},e.deqRedrawThreshold),s=function(u,h){var f=Uu(),d=i.averageRedrawTime,p=i.lastRedrawTime,g=[],m=i.cy.extent(),x=i.getPixelRatio();for(u||i.flushRenderedStyleQueue();;){var y=Uu(),b=y-f,w=y-h;if(p<aD){var _=aD-(u?d:0);if(w>=e.deqFastCost*_)break}else if(u){if(b>=e.deqCost*p||b>=e.deqAvgCost*d)break}else if(w>=e.deqNoDrawCost*aD)break;var k=e.deq(n,x,m);if(k.length>0)for(var E=0;E<k.length;E++)g.push(k[E]);else break}g.length>0&&(e.onDeqd(n,g),!u&&e.shouldRedraw(n,g,x,m)&&a())},o=e.priority||LD;i.beforeRender(s,o(n))}}}},hXe=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C6;ED(this,t),this.idsByKey=new Mc,this.keyForId=new Mc,this.cachesByLvl=new Mc,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return SD(t,[{key:"getIdsFor",value:function(r){r==null&&ri("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(r);return i||(i=new zm,n.set(r,i)),i}},{key:"addIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).add(n)}},{key:"deleteIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).delete(n)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);this.deleteIdForKey(i,n),this.addIdForKey(a,n),this.keyForId.set(n,a)}},{key:"deleteKeyMappingFor",value:function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);return i!==a}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var n=this.cachesByLvl,i=this.lvls,a=n.get(r);return a||(a=new Mc,n.set(r,a),i.push(r)),a}},{key:"getCache",value:function(r,n){return this.getCachesAt(n).get(r)}},{key:"get",value:function(r,n){var i=this.getKey(r),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(r),a}},{key:"getForCachedKey",value:function(r,n){var i=this.keyForId.get(r.id()),a=this.getCache(i,n);return a}},{key:"hasCache",value:function(r,n){return this.getCachesAt(n).has(r)}},{key:"has",value:function(r,n){var i=this.getKey(r);return this.hasCache(i,n)}},{key:"setCache",value:function(r,n,i){i.key=r,this.getCachesAt(n).set(r,i)}},{key:"set",value:function(r,n,i){var a=this.getKey(r);this.setCache(a,n,i),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,n){this.getCachesAt(n).delete(r)}},{key:"delete",value:function(r,n){var i=this.getKey(r);this.deleteCache(i,n)}},{key:"invalidateKey",value:function(r){var n=this;this.lvls.forEach(function(i){return n.deleteCache(r,i)})}},{key:"invalidate",value:function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(r);var a=this.doesEleInvalidateKey(r);return a&&this.invalidateKey(i),a||this.getNumberOfIdsForKey(i)===0}}]),t}(),wde=25,p6=50,T6=-4,bD=3,fXe=7.99,dXe=8,pXe=1024,gXe=1024,mXe=1024,vXe=.2,yXe=.8,xXe=10,bXe=.15,wXe=.1,kXe=.9,TXe=.9,EXe=100,SXe=1,Rm={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},CXe=da({getKey:null,doesEleInvalidateKey:C6,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:qde,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),sx=function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var i=CXe(r);Zt(n,i),n.lookup=new hXe(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},Di=sx.prototype;Di.reasons=Rm;Di.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};Di.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n};Di.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new Tx(function(r,n){return n.reqs-r.reqs});return e};Di.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};Di.getElement=function(t,e,r,n,i){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(ND(o*r))),n<T6)n=T6;else if(o>=fXe||n>bD)return null;var u=Math.pow(2,n),h=e.h*u,f=e.w*u,d=s.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,d))return null;var p=l.get(t,n);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;var g;if(h<=wde?g=wde:h<=p6?g=p6:g=Math.ceil(h/p6)*p6,h>mXe||f>gXe)return null;var m=a.getTextureQueue(g),x=m[m.length-2],y=function(){return a.recycleTexture(g,f)||a.addTexture(g,f)};x||(x=m[m.length-1]),x||(x=y()),x.width-x.usedWidth<f&&(x=y());for(var b=function(N){return N&&N.scaledLabelShown===d},w=i&&i===Rm.dequeue,_=i&&i===Rm.highQuality,k=i&&i===Rm.downscale,E,L=n+1;L<=bD;L++){var S=l.get(t,L);if(S){E=S;break}}var C=E&&E.level===n+1?E:null,M=function(){x.context.drawImage(C.texture.canvas,C.x,0,C.width,C.height,x.usedWidth,0,f,h)};if(x.context.setTransform(1,0,0,1,0,0),x.context.clearRect(x.usedWidth,0,f,g),b(C))M();else if(b(E))if(_){for(var R=E.level;R>n;R--)C=a.getElement(t,e,r,R,Rm.downscale);M()}else return a.queueElement(t,E.level-1),E;else{var T;if(!w&&!_&&!k)for(var I=n-1;I>=T6;I--){var A=l.get(t,I);if(A){T=A;break}}if(b(T))return a.queueElement(t,n),T;x.context.translate(x.usedWidth,0),x.context.scale(u,u),this.drawElement(x.context,t,e,d,!1),x.context.scale(1/u,1/u),x.context.translate(-x.usedWidth,0)}return p={x:x.usedWidth,texture:x,level:n,scale:u,width:f,height:h,scaledLabelShown:d},x.usedWidth+=Math.ceil(f+dXe),x.eleCaches.push(p),l.set(t,n,p),a.checkTextureFullness(x),p};Di.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])};Di.invalidateElement=function(t){var e=this,r=e.lookup,n=[],i=r.isInvalid(t);if(i){for(var a=T6;a<=bD;a++){var s=r.getForCachedKey(t,a);s&&n.push(s)}var o=r.invalidate(t);if(o)for(var l=0;l<n.length;l++){var u=n[l],h=u.texture;h.invalidatedWidth+=u.width,u.invalidated=!0,e.checkTextureUtility(h)}e.removeFromQueue(t)}};Di.checkTextureUtility=function(t){t.invalidatedWidth>=vXe*t.width&&this.retireTexture(t)};Di.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>yXe&&t.fullnessChecks>=xXe?hf(r,t):t.fullnessChecks++};Di.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),i=this.lookup;hf(n,t),t.retired=!0;for(var a=t.eleCaches,s=0;s<a.length;s++){var o=a[s];i.deleteCache(o.key,o.level)}RD(a);var l=e.getRetiredTextureQueue(r);l.push(t)};Di.addTexture=function(t,e){var r=this,n=r.getTextureQueue(t),i={};return n.push(i),i.eleCaches=[],i.height=t,i.width=Math.max(pXe,e),i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,i.canvas=r.renderer.makeOffscreenCanvas(i.width,i.height),i.context=i.canvas.getContext("2d"),i};Di.recycleTexture=function(t,e){for(var r=this,n=r.getTextureQueue(t),i=r.getRetiredTextureQueue(t),a=0;a<i.length;a++){var s=i[a];if(s.width>=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,RD(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),hf(i,s),n.push(s),s}};Di.queueElement=function(t,e){var r=this,n=r.getElementQueue(),i=r.getElementKeyToQueue(),a=this.getKey(t),s=i[a];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,n.updateItem(s);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:a};n.push(o),i[a]=o}};Di.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,s=0;s<SXe&&r.size()>0;s++){var o=r.pop(),l=o.key,u=o.eles[0],h=a.hasCache(u,o.level);if(n[l]=null,h)continue;i.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,t,o.level,Rm.dequeue)}return i};Di.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=this.getKey(t),a=n[i];a!=null&&(a.eles.length===1?(a.reqs=_D,r.updateItem(a),r.pop(),n[i]=null):a.eles.unmerge(t))};Di.onDequeue=function(t){this.onDequeues.push(t)};Di.offDequeue=function(t){hf(this.onDequeues,t)};Di.setupDequeueing=tpe.setupDequeueing({deqRedrawThreshold:EXe,deqCost:bXe,deqAvgCost:wXe,deqNoDrawCost:kXe,deqFastCost:TXe,deq:function(e,r,n){return e.dequeue(r,n)},onDeqd:function(e,r){for(var n=0;n<e.onDequeues.length;n++){var i=e.onDequeues[n];i(r)}},shouldRedraw:function(e,r,n,i){for(var a=0;a<r.length;a++)for(var s=r[a].eles,o=0;o<s.length;o++){var l=s[o].boundingBox();if(ID(l,i))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}});AXe=1,lx=-4,D6=2,_Xe=3.99,LXe=50,RXe=50,NXe=.15,IXe=.1,MXe=.9,DXe=.9,OXe=1,kde=250,PXe=4e3*4e3,Tde=32767,BXe=!0,rpe=function(e){var r=this,n=r.renderer=e,i=n.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=Uu()-2*kde,r.skipping=!1,r.eleTxrDeqs=i.collection(),r.scheduleElementRefinement=B6(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},RXe),n.beforeRender(function(s,o){o-r.lastInvalidationTime<=kde?r.skipping=!0:r.skipping=!1},n.beforeRenderPriorities.lyrTxrSkip);var a=function(o,l){return l.reqs-o.reqs};r.layersQueue=new Tx(a),r.setupDequeueing()},pa=rpe.prototype,Ede=0,FXe=Math.pow(2,53)-1;pa.makeLayer=function(t,e){var r=Math.pow(2,e),n=Math.ceil(t.w*r),i=Math.ceil(t.h*r),a=this.renderer.makeOffscreenCanvas(n,i),s={id:Ede=++Ede%FXe,bb:t,level:e,width:n,height:i,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0},o=s.context,l=-s.bb.x1,u=-s.bb.y1;return o.scale(r,r),o.translate(l,u),s};pa.getLayers=function(t,e,r){var n=this,i=n.renderer,a=i.cy,s=a.zoom(),o=n.firstGet;if(n.firstGet=!1,r==null){if(r=Math.ceil(ND(s*e)),r<lx)r=lx;else if(s>=_Xe||r>D6)return null}n.validateLayersElesOrdering(r,t);var l=n.layersByLevel,u=Math.pow(2,r),h=l[r]=l[r]||[],f,d=n.levelIsComplete(r,t),p,g=function(){var M=function(D){if(n.validateLayersElesOrdering(D,t),n.levelIsComplete(D,t))return p=l[D],!0},R=function(D){if(!p)for(var N=r+D;lx<=N&&N<=D6&&!M(N);N+=D);};R(1),R(-1);for(var T=h.length-1;T>=0;T--){var I=h[T];I.invalid&&hf(h,I)}};if(!d)g();else return h;var m=function(){if(!f){f=_s();for(var M=0;M<t.length;M++)Qde(f,t[M].boundingBox())}return f},x=function(M){M=M||{};var R=M.after;m();var T=Math.ceil(f.w*u),I=Math.ceil(f.h*u);if(T>Tde||I>Tde)return null;var A=T*I;if(A>PXe)return null;var D=n.makeLayer(f,r);if(R!=null){var N=h.indexOf(R)+1;h.splice(N,0,D)}else(M.insert===void 0||M.insert)&&h.unshift(D);return D};if(n.skipping&&!o)return null;for(var y=null,b=t.length/AXe,w=!o,_=0;_<t.length;_++){var k=t[_],E=k._private.rscratch,L=E.imgLayerCaches=E.imgLayerCaches||{},S=L[r];if(S){y=S;continue}if((!y||y.eles.length>=b||!Jde(y.bb,k.boundingBox()))&&(y=x({insert:!0,after:y}),!y))return null;p||w?n.queueLayer(y,k):n.drawEleInLayer(y,k,r,e),y.eles.push(k),L[r]=y}return p||(w?null:h)};pa.getEleLevelForLayerLevel=function(t,e){return t};pa.drawEleInLayer=function(t,e,r,n){var i=this,a=this.renderer,s=t.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(r=i.getEleLevelForLayerLevel(r,n),a.setImgSmoothing(s,!1),a.drawCachedElement(s,e,null,null,r,BXe),a.setImgSmoothing(s,!0))};pa.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var i=0,a=0;a<n.length;a++){var s=n[a];if(s.reqs>0||s.invalid)return!1;i+=s.eles.length}return i===e.length};pa.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=-1,s=0;s<e.length;s++)if(i.eles[0]===e[s]){a=s;break}if(a<0){this.invalidateLayer(i);continue}for(var o=a,s=0;s<i.eles.length;s++)if(i.eles[s]!==e[o+s]){this.invalidateLayer(i);break}}};pa.updateElementsInLayers=function(t,e){for(var r=this,n=wx(t[0]),i=0;i<t.length;i++)for(var a=n?null:t[i],s=n?t[i]:t[i].ele,o=s._private.rscratch,l=o.imgLayerCaches=o.imgLayerCaches||{},u=lx;u<=D6;u++){var h=l[u];h&&(a&&r.getEleLevelForLayerLevel(h.level)!==a.level||e(h,s,a))}};pa.haveLayers=function(){for(var t=this,e=!1,r=lx;r<=D6;r++){var n=t.layersByLevel[r];if(n&&n.length>0){e=!0;break}}return e};pa.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=Uu(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(n,i,a){e.invalidateLayer(n)}))};pa.invalidateLayer=function(t){if(this.lastInvalidationTime=Uu(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];hf(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i<r.length;i++){var a=r[i]._private.rscratch.imgLayerCaches;a&&(a[e]=null)}}};pa.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,function(n,i,a){var s=n.replacement;if(s||(s=n.replacement=e.makeLayer(n.bb,n.level),s.replaces=n,s.eles=n.eles),!s.reqs)for(var o=0;o<s.eles.length;o++)e.queueLayer(s,s.eles[o])})};pa.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()};pa.queueLayer=function(t,e){var r=this,n=r.layersQueue,i=t.elesQueue,a=i.hasId=i.hasId||{};if(!t.replacement){if(e){if(a[e.id()])return;i.push(e),a[e.id()]=!0}t.reqs?(t.reqs++,n.updateItem(t)):(t.reqs=1,n.push(t))}};pa.dequeue=function(t){for(var e=this,r=e.layersQueue,n=[],i=0;i<OXe&&r.size()!==0;){var a=r.peek();if(a.replacement){r.pop();continue}if(a.replaces&&a!==a.replaces.replacement){r.pop();continue}if(a.invalid){r.pop();continue}var s=a.elesQueue.shift();s&&(e.drawEleInLayer(a,s,a.level,t),i++),n.length===0&&n.push(!0),a.elesQueue.length===0&&(r.pop(),a.reqs=0,a.replaces&&e.applyLayerReplacement(a),e.requestRedraw())}return n};pa.applyLayerReplacement=function(t){var e=this,r=e.layersByLevel[t.level],n=t.replaces,i=r.indexOf(n);if(!(i<0||n.invalid)){r[i]=t;for(var a=0;a<t.eles.length;a++){var s=t.eles[a]._private,o=s.imgLayerCaches=s.imgLayerCaches||{};o&&(o[t.level]=t)}e.requestRedraw()}};pa.requestRedraw=B6(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100);pa.setupDequeueing=tpe.setupDequeueing({deqRedrawThreshold:LXe,deqCost:NXe,deqAvgCost:IXe,deqNoDrawCost:MXe,deqFastCost:DXe,deq:function(e,r){return e.dequeue(r)},onDeqd:LD,shouldRedraw:qde,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}});npe={};npe.arrowShapeImpl=function(t){return(Sde||(Sde={polygon:zXe,"triangle-backcurve":$Xe,"triangle-tee":Cde,"circle-triangle":GXe,"triangle-cross":Cde,circle:UXe}))[t]};Pc={};Pc.drawElement=function(t,e,r,n,i,a){var s=this;e.isNode()?s.drawNode(t,e,r,n,i,a):s.drawEdge(t,e,r,n,i,a)};Pc.drawElementOverlay=function(t,e){var r=this;e.isNode()?r.drawNodeOverlay(t,e):r.drawEdgeOverlay(t,e)};Pc.drawElementUnderlay=function(t,e){var r=this;e.isNode()?r.drawNodeUnderlay(t,e):r.drawEdgeUnderlay(t,e)};Pc.drawCachedElementPortion=function(t,e,r,n,i,a,s,o){var l=this,u=r.getBoundingBox(e);if(!(u.w===0||u.h===0)){var h=r.getElement(e,u,n,i,a);if(h!=null){var f=o(l,e);if(f===0)return;var d=s(l,e),p=u.x1,g=u.y1,m=u.w,x=u.h,y,b,w,_,k;if(d!==0){var E=r.getRotationPoint(e);w=E.x,_=E.y,t.translate(w,_),t.rotate(d),k=l.getImgSmoothing(t),k||l.setImgSmoothing(t,!0);var L=r.getRotationOffset(e);y=L.x,b=L.y}else y=p,b=g;var S;f!==1&&(S=t.globalAlpha,t.globalAlpha=S*f),t.drawImage(h.texture.canvas,h.x,0,h.width,h.height,y,b,m,x),f!==1&&(t.globalAlpha=S),d!==0&&(t.rotate(-d),t.translate(-w,-_),k||l.setImgSmoothing(t,!1))}else r.drawElement(t,e)}};VXe=function(){return 0},WXe=function(e,r){return e.getTextAngle(r,null)},HXe=function(e,r){return e.getTextAngle(r,"source")},qXe=function(e,r){return e.getTextAngle(r,"target")},YXe=function(e,r){return r.effectiveOpacity()},sD=function(e,r){return r.pstyle("text-opacity").pfValue*r.effectiveOpacity()};Pc.drawCachedElement=function(t,e,r,n,i,a){var s=this,o=s.data,l=o.eleTxrCache,u=o.lblTxrCache,h=o.slbTxrCache,f=o.tlbTxrCache,d=e.boundingBox(),p=a===!0?l.reasons.highQuality:null;if(!(d.w===0||d.h===0||!e.visible())&&(!n||ID(d,n))){var g=e.isEdge(),m=e.element()._private.rscratch.badLine;s.drawElementUnderlay(t,e),s.drawCachedElementPortion(t,e,l,r,i,p,VXe,YXe),(!g||!m)&&s.drawCachedElementPortion(t,e,u,r,i,p,WXe,sD),g&&!m&&(s.drawCachedElementPortion(t,e,h,r,i,p,HXe,sD),s.drawCachedElementPortion(t,e,f,r,i,p,qXe,sD)),s.drawElementOverlay(t,e)}};Pc.drawElements=function(t,e){for(var r=this,n=0;n<e.length;n++){var i=e[n];r.drawElement(t,i)}};Pc.drawCachedElements=function(t,e,r,n){for(var i=this,a=0;a<e.length;a++){var s=e[a];i.drawCachedElement(t,s,r,n)}};Pc.drawCachedNodes=function(t,e,r,n){for(var i=this,a=0;a<e.length;a++){var s=e[a];s.isNode()&&i.drawCachedElement(t,s,r,n)}};Pc.drawLayeredElements=function(t,e,r,n){var i=this,a=i.data.lyrTxrCache.getLayers(e,r);if(a)for(var s=0;s<a.length;s++){var o=a[s],l=o.bb;l.w===0||l.h===0||t.drawImage(o.canvas,l.x1,l.y1,l.w,l.h)}else i.drawCachedElements(t,e,r,n)};qu={};qu.drawEdge=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(a&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=a?e.pstyle("opacity").value:1,h=a?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,g=e.pstyle("line-cap").value,m=e.pstyle("line-outline-width").value,x=e.pstyle("line-outline-color").value,y=u*h,b=u*h,w=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;f==="straight-triangle"?(s.eleStrokeStyle(t,e,D),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=p,t.lineCap=g,s.eleStrokeStyle(t,e,D),s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},_=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;if(t.lineWidth=p+m,t.lineCap=g,m>0)s.colorStrokeStyle(t,x[0],x[1],x[2],D);else{t.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},k=function(){i&&s.drawEdgeOverlay(t,e)},E=function(){i&&s.drawEdgeUnderlay(t,e)},L=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;s.drawArrowheads(t,e,D)},S=function(){s.drawElementText(t,e,null,n)};t.lineJoin="round";var C=e.pstyle("ghost").value==="yes";if(C){var M=e.pstyle("ghost-offset-x").pfValue,R=e.pstyle("ghost-offset-y").pfValue,T=e.pstyle("ghost-opacity").value,I=y*T;t.translate(M,R),w(I),L(I),t.translate(-M,-R)}else _();E(),w(),L(),k(),S(),r&&t.translate(l.x1,l.y1)}};ipe=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var i=n.pstyle("".concat(e,"-opacity")).value;if(i!==0){var a=this,s=a.usePaths(),o=n._private.rscratch,l=n.pstyle("".concat(e,"-padding")).pfValue,u=2*l,h=n.pstyle("".concat(e,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,h[0],h[1],h[2],i),a.drawEdgePath(n,r,o.allpts,"solid")}}}};qu.drawEdgeOverlay=ipe("overlay");qu.drawEdgeUnderlay=ipe("underlay");qu.drawEdgePath=function(t,e,r,n){var i=t._private.rscratch,a=e,s,o=!1,l=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,h=t.pstyle("line-dash-offset").pfValue;if(l){var f=r.join("$"),d=i.pathCacheKey&&i.pathCacheKey===f;d?(s=e=i.pathCache,o=!0):(s=e=new Path2D,i.pathCacheKey=f,i.pathCache=s)}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=h;break;case"solid":a.setLineDash([]);break}if(!o&&!i.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+3<r.length;p+=4)e.quadraticCurveTo(r[p],r[p+1],r[p+2],r[p+3]);break;case"straight":case"haystack":for(var g=2;g+1<r.length;g+=2)e.lineTo(r[g],r[g+1]);break;case"segments":if(i.isRound){var m=Ide(i.roundCorners),x;try{for(m.s();!(x=m.n()).done;){var y=x.value;Y0e(e,y)}}catch(w){m.e(w)}finally{m.f()}e.lineTo(r[r.length-2],r[r.length-1])}else for(var b=2;b+1<r.length;b+=2)e.lineTo(r[b],r[b+1]);break}e=a,l?e.stroke(s):e.stroke(),e.setLineDash&&e.setLineDash([])};qu.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var n=t.pstyle("width").pfValue,i=0;i+1<r.length;i+=2){var a=[r[i+2]-r[i],r[i+3]-r[i+1]],s=Math.sqrt(a[0]*a[0]+a[1]*a[1]),o=[a[1]/s,-a[0]/s],l=[o[0]*n/2,o[1]*n/2];e.beginPath(),e.moveTo(r[i]-l[0],r[i+1]-l[1]),e.lineTo(r[i]+l[0],r[i+1]+l[1]),e.lineTo(r[i+2],r[i+3]),e.closePath(),e.fill()}};qu.drawArrowheads=function(t,e,r){var n=e._private.rscratch,i=n.edgeType==="haystack";i||this.drawArrowhead(t,e,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),i||this.drawArrowhead(t,e,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)};qu.drawArrowhead=function(t,e,r,n,i,a,s){if(!(isNaN(n)||n==null||isNaN(i)||i==null||isNaN(a)||a==null)){var o=this,l=e.pstyle(r+"-arrow-shape").value;if(l!=="none"){var u=e.pstyle(r+"-arrow-fill").value==="hollow"?"both":"filled",h=e.pstyle(r+"-arrow-fill").value,f=e.pstyle("width").pfValue,d=e.pstyle(r+"-arrow-width"),p=d.value==="match-line"?f:d.pfValue;d.units==="%"&&(p*=f);var g=e.pstyle("opacity").value;s===void 0&&(s=g);var m=t.globalCompositeOperation;(s!==1||h==="hollow")&&(t.globalCompositeOperation="destination-out",o.colorFillStyle(t,255,255,255,1),o.colorStrokeStyle(t,255,255,255,1),o.drawArrowShape(e,t,u,f,l,p,n,i,a),t.globalCompositeOperation=m);var x=e.pstyle(r+"-arrow-color").value;o.colorFillStyle(t,x[0],x[1],x[2],s),o.colorStrokeStyle(t,x[0],x[1],x[2],s),o.drawArrowShape(e,t,h,f,l,p,n,i,a)}}};qu.drawArrowShape=function(t,e,r,n,i,a,s,o,l){var u=this,h=this.usePaths()&&i!=="triangle-cross",f=!1,d,p=e,g={x:s,y:o},m=t.pstyle("arrow-scale").value,x=this.getArrowWidth(n,m),y=u.arrowShapes[i];if(h){var b=u.arrowPathCache=u.arrowPathCache||[],w=T0(i),_=b[w];_!=null?(d=e=_,f=!0):(d=e=new Path2D,b[w]=d)}f||(e.beginPath&&e.beginPath(),h?y.draw(e,1,0,{x:0,y:0},1):y.draw(e,x,l,g,n),e.closePath&&e.closePath()),e=p,h&&(e.translate(s,o),e.rotate(l),e.scale(x,x)),(r==="filled"||r==="both")&&(h?e.fill(d):e.fill()),(r==="hollow"||r==="both")&&(e.lineWidth=a/(h?x:1),e.lineJoin="miter",h?e.stroke(d):e.stroke()),h&&(e.scale(1/x,1/x),e.rotate(-l),e.translate(-s,-o))};YD={};YD.safeDrawImage=function(t,e,r,n,i,a,s,o,l,u){if(!(i<=0||a<=0||l<=0||u<=0))try{t.drawImage(e,r,n,i,a,s,o,l,u)}catch(h){Qr(h)}};YD.drawInscribedImage=function(t,e,r,n,i){var a=this,s=r.position(),o=s.x,l=s.y,u=r.cy().style(),h=u.getIndexedStyle.bind(u),f=h(r,"background-fit","value",n),d=h(r,"background-repeat","value",n),p=r.width(),g=r.height(),m=r.padding()*2,x=p+(h(r,"background-width-relative-to","value",n)==="inner"?0:m),y=g+(h(r,"background-height-relative-to","value",n)==="inner"?0:m),b=r._private.rscratch,w=h(r,"background-clip","value",n),_=w==="node",k=h(r,"background-image-opacity","value",n)*i,E=h(r,"background-image-smoothing","value",n),L=r.pstyle("corner-radius").value;L!=="auto"&&(L=r.pstyle("corner-radius").pfValue);var S=e.width||e.cachedW,C=e.height||e.cachedH;(S==null||C==null)&&(document.body.appendChild(e),S=e.cachedW=e.width||e.offsetWidth,C=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var M=S,R=C;if(h(r,"background-width","value",n)!=="auto"&&(h(r,"background-width","units",n)==="%"?M=h(r,"background-width","pfValue",n)*x:M=h(r,"background-width","pfValue",n)),h(r,"background-height","value",n)!=="auto"&&(h(r,"background-height","units",n)==="%"?R=h(r,"background-height","pfValue",n)*y:R=h(r,"background-height","pfValue",n)),!(M===0||R===0)){if(f==="contain"){var T=Math.min(x/M,y/R);M*=T,R*=T}else if(f==="cover"){var T=Math.max(x/M,y/R);M*=T,R*=T}var I=o-x/2,A=h(r,"background-position-x","units",n),D=h(r,"background-position-x","pfValue",n);A==="%"?I+=(x-M)*D:I+=D;var N=h(r,"background-offset-x","units",n),O=h(r,"background-offset-x","pfValue",n);N==="%"?I+=(x-M)*O:I+=O;var B=l-y/2,P=h(r,"background-position-y","units",n),$=h(r,"background-position-y","pfValue",n);P==="%"?B+=(y-R)*$:B+=$;var z=h(r,"background-offset-y","units",n),H=h(r,"background-offset-y","pfValue",n);z==="%"?B+=(y-R)*H:B+=H,b.pathCache&&(I-=o,B-=l,o=0,l=0);var Z=t.globalAlpha;t.globalAlpha=k;var X=a.getImgSmoothing(t),ie=!1;if(E==="no"&&X?(a.setImgSmoothing(t,!1),ie=!0):E==="yes"&&!X&&(a.setImgSmoothing(t,!0),ie=!0),d==="no-repeat")_&&(t.save(),b.pathCache?t.clip(b.pathCache):(a.nodeShapes[a.getNodeShape(r)].draw(t,o,l,x,y,L,b),t.clip())),a.safeDrawImage(t,e,0,0,S,C,I,B,M,R),_&&t.restore();else{var K=t.createPattern(e,d);t.fillStyle=K,a.nodeShapes[a.getNodeShape(r)].draw(t,o,l,x,y,L,b),t.translate(I,B),t.fill(),t.translate(-I,-B)}t.globalAlpha=Z,ie&&a.setImgSmoothing(t,X)}};R0={};R0.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),n=this.getPixelRatio(),i=Math.ceil(ND(r*n));e=Math.pow(2,i)}var a=t.pstyle("font-size").pfValue*e,s=t.pstyle("min-zoomed-font-size").pfValue;return!(a<s)};R0.drawElementText=function(t,e,r,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(n==null){if(a&&!s.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,h=e.pstyle("label"),f=e.pstyle("source-label"),d=e.pstyle("target-label");if(u||(!h||!h.value)&&(!f||!f.value)&&(!d||!d.value))return;t.textAlign="center",t.textBaseline="bottom"}var p=!r,g;r&&(g=r,t.translate(-g.x1,-g.y1)),i==null?(s.drawText(t,e,null,p,a),e.isEdge()&&(s.drawText(t,e,"source",p,a),s.drawText(t,e,"target",p,a))):s.drawText(t,e,i,p,a),r&&t.translate(g.x1,g.y1)};R0.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if(e=this.fontCaches[r],e.context===t)return e;return e={context:t},this.fontCaches.push(e),e};R0.setupTextStyle=function(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,h=e.pstyle("text-outline-color").value;t.font=n+" "+s+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],o),this.colorStrokeStyle(t,h[0],h[1],h[2],l)};R0.getTextAngle=function(t,e){var r,n=t._private,i=n.rscratch,a=e?e+"-":"",s=t.pstyle(a+"text-rotation"),o=Nl(i,"labelAngle",e);return s.strValue==="autorotate"?r=t.isEdge()?o:0:s.strValue==="none"?r=0:r=s.pfValue,r};R0.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=e._private,s=a.rscratch,o=i?e.effectiveOpacity():1;if(!(i&&(o===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=Nl(s,"labelX",r),u=Nl(s,"labelY",r),h,f,d=this.getLabelText(e,r);if(d!=null&&d!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(t,e,i);var p=r?r+"-":"",g=Nl(s,"labelWidth",r),m=Nl(s,"labelHeight",r),x=e.pstyle(p+"text-margin-x").pfValue,y=e.pstyle(p+"text-margin-y").pfValue,b=e.isEdge(),w=e.pstyle("text-halign").value,_=e.pstyle("text-valign").value;b&&(w="center",_="center"),l+=x,u+=y;var k;switch(n?k=this.getTextAngle(e,r):k=0,k!==0&&(h=l,f=u,t.translate(h,f),t.rotate(k),l=0,u=0),_){case"top":break;case"center":u+=m/2;break;case"bottom":u+=m;break}var E=e.pstyle("text-background-opacity").value,L=e.pstyle("text-border-opacity").value,S=e.pstyle("text-border-width").pfValue,C=e.pstyle("text-background-padding").pfValue,M=e.pstyle("text-background-shape").strValue,R=M.indexOf("round")===0,T=2;if(E>0||S>0&&L>0){var I=l-C;switch(w){case"left":I-=g;break;case"center":I-=g/2;break}var A=u-m-C,D=g+2*C,N=m+2*C;if(E>0){var O=t.fillStyle,B=e.pstyle("text-background-color").value;t.fillStyle="rgba("+B[0]+","+B[1]+","+B[2]+","+E*o+")",R?oD(t,I,A,D,N,T):t.fillRect(I,A,D,N),t.fillStyle=O}if(S>0&&L>0){var P=t.strokeStyle,$=t.lineWidth,z=e.pstyle("text-border-color").value,H=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+z[0]+","+z[1]+","+z[2]+","+L*o+")",t.lineWidth=S,t.setLineDash)switch(H){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=S/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(R?oD(t,I,A,D,N,T,"stroke"):t.strokeRect(I,A,D,N),H==="double"){var Z=S/2;R?oD(t,I+Z,A+Z,D-Z*2,N-Z*2,T,"stroke"):t.strokeRect(I+Z,A+Z,D-Z*2,N-Z*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=$,t.strokeStyle=P}}var X=2*e.pstyle("text-outline-width").pfValue;if(X>0&&(t.lineWidth=X),e.pstyle("text-wrap").value==="wrap"){var ie=Nl(s,"labelWrapCachedLines",r),K=Nl(s,"labelLineHeight",r),ee=g/2,J=this.getLabelJustification(e);switch(J==="auto"||(w==="left"?J==="left"?l+=-g:J==="center"&&(l+=-ee):w==="center"?J==="left"?l+=-ee:J==="right"&&(l+=ee):w==="right"&&(J==="center"?l+=ee:J==="right"&&(l+=g))),_){case"top":u-=(ie.length-1)*K;break;case"center":case"bottom":u-=(ie.length-1)*K;break}for(var W=0;W<ie.length;W++)X>0&&t.strokeText(ie[W],l,u),t.fillText(ie[W],l,u),u+=K}else X>0&&t.strokeText(d,l,u),t.fillText(d,l,u);k!==0&&(t.rotate(-k),t.translate(-h,-f))}}};Xm={};Xm.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,h=u.rscratch,f=e.position();if(!(!pt(f.x)||!pt(f.y))&&!(a&&!e.visible())){var d=a?e.effectiveOpacity():1,p=s.usePaths(),g,m=!1,x=e.padding();o=e.width()+2*x,l=e.height()+2*x;var y;r&&(y=r,t.translate(-y.x1,-y.y1));for(var b=e.pstyle("background-image"),w=b.value,_=new Array(w.length),k=new Array(w.length),E=0,L=0;L<w.length;L++){var S=w[L],C=_[L]=S!=null&&S!=="none";if(C){var M=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",L);E++,k[L]=s.getCachedImage(S,M,function(){u.backgroundTimestamp=Date.now(),e.emitAndNotify("background")})}}var R=e.pstyle("background-blacken").value,T=e.pstyle("border-width").pfValue,I=e.pstyle("background-opacity").value*d,A=e.pstyle("border-color").value,D=e.pstyle("border-style").value,N=e.pstyle("border-join").value,O=e.pstyle("border-cap").value,B=e.pstyle("border-position").value,P=e.pstyle("border-dash-pattern").pfValue,$=e.pstyle("border-dash-offset").pfValue,z=e.pstyle("border-opacity").value*d,H=e.pstyle("outline-width").pfValue,Z=e.pstyle("outline-color").value,X=e.pstyle("outline-style").value,ie=e.pstyle("outline-opacity").value*d,K=e.pstyle("outline-offset").value,ee=e.pstyle("corner-radius").value;ee!=="auto"&&(ee=e.pstyle("corner-radius").pfValue);var J=function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:I;s.eleFillStyle(t,e,he)},W=function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z;s.colorStrokeStyle(t,A[0],A[1],A[2],he)},Y=function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ie;s.colorStrokeStyle(t,Z[0],Z[1],Z[2],he)},Q=function(he,U,ke,j){var me=s.nodePathCache=s.nodePathCache||[],Se=Hde(ke==="polygon"?ke+","+j.join(","):ke,""+U,""+he,""+ee),Pe=me[Se],Ie,ge=!1;return Pe!=null?(Ie=Pe,ge=!0,h.pathCache=Ie):(Ie=new Path2D,me[Se]=h.pathCache=Ie),{path:Ie,cacheHit:ge}},se=e.pstyle("shape").strValue,ue=e.pstyle("shape-polygon-points").pfValue;if(p){t.translate(f.x,f.y);var ce=Q(o,l,se,ue);g=ce.path,m=ce.cacheHit}var te=function(){if(!m){var he=f;p&&(he={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(g||t,he.x,he.y,o,l,ee,h)}p?t.fill(g):t.fill()},Le=function(){for(var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ke=u.backgrounding,j=0,me=0;me<k.length;me++){var Se=e.cy().style().getIndexedStyle(e,"background-image-containment","value",me);if(U&&Se==="over"||!U&&Se==="inside"){j++;continue}_[me]&&k[me].complete&&!k[me].error&&(j++,s.drawInscribedImage(t,k[me],e,me,he))}u.backgrounding=j!==E,ke!==u.backgrounding&&e.updateStyle(!1)},oe=function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasPie(e)&&(s.drawPie(t,e,U),he&&(p||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,ee,h)))},be=function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,U=(R>0?R:-R)*he,ke=R>0?0:255;R!==0&&(s.colorFillStyle(t,ke,ke,ke,U),p?t.fill(g):t.fill())},Fe=function(){if(T>0){if(t.lineWidth=T,t.lineCap=O,t.lineJoin=N,t.setLineDash)switch(D){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(P),t.lineDashOffset=$;break;case"solid":case"double":t.setLineDash([]);break}if(B!=="center"){if(t.save(),t.lineWidth*=2,B==="inside")p?t.clip(g):t.clip();else{var he=new Path2D;he.rect(-o/2-T,-l/2-T,o+2*T,l+2*T),he.addPath(g),t.clip(he,"evenodd")}p?t.stroke(g):t.stroke(),t.restore()}else p?t.stroke(g):t.stroke();if(D==="double"){t.lineWidth=T/3;var U=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(g):t.stroke(),t.globalCompositeOperation=U}t.setLineDash&&t.setLineDash([])}},Be=function(){if(H>0){if(t.lineWidth=H,t.lineCap="butt",t.setLineDash)switch(X){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var he=f;p&&(he={x:0,y:0});var U=s.getNodeShape(e),ke=T;B==="inside"&&(ke=0),B==="outside"&&(ke*=2);var j=(o+ke+(H+K))/o,me=(l+ke+(H+K))/l,Se=o*j,Pe=l*me,Ie=s.nodeShapes[U].points,ge;if(p){var ze=Q(Se,Pe,U,Ie);ge=ze.path}if(U==="ellipse")s.drawEllipsePath(ge||t,he.x,he.y,Se,Pe);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(U)){var Ae=0,Ye=0,it=0;U==="round-diamond"?Ae=(ke+K+H)*1.4:U==="round-heptagon"?(Ae=(ke+K+H)*1.075,it=-(ke/2+K+H)/35):U==="round-hexagon"?Ae=(ke+K+H)*1.12:U==="round-pentagon"?(Ae=(ke+K+H)*1.13,it=-(ke/2+K+H)/15):U==="round-tag"?(Ae=(ke+K+H)*1.12,Ye=(ke/2+H+K)*.07):U==="round-triangle"&&(Ae=(ke+K+H)*(Math.PI/2),it=-(ke+K/2+H)/Math.PI),Ae!==0&&(j=(o+Ae)/o,Se=o*j,["round-hexagon","round-tag"].includes(U)||(me=(l+Ae)/l,Pe=l*me)),ee=ee==="auto"?r0e(Se,Pe):ee;for(var wt=Se/2,ft=Pe/2,He=ee+(ke+H+K)/2,ut=new Array(Ie.length/2),$e=new Array(Ie.length/2),Ze=0;Ze<Ie.length/2;Ze++)ut[Ze]={x:he.x+Ye+wt*Ie[Ze*2],y:he.y+it+ft*Ie[Ze*2+1]};var at,mt,Ut,st,Qe=ut.length;for(mt=ut[Qe-1],at=0;at<Qe;at++)Ut=ut[at%Qe],st=ut[(at+1)%Qe],$e[at]=HD(mt,Ut,st,He),mt=Ut,Ut=st;s.drawRoundPolygonPath(ge||t,he.x+Ye,he.y+it,o*j,l*me,Ie,$e)}else if(["roundrectangle","round-rectangle"].includes(U))ee=ee==="auto"?S0(Se,Pe):ee,s.drawRoundRectanglePath(ge||t,he.x,he.y,Se,Pe,ee+(ke+H+K)/2);else if(["cutrectangle","cut-rectangle"].includes(U))ee=ee==="auto"?MD():ee,s.drawCutRectanglePath(ge||t,he.x,he.y,Se,Pe,null,ee+(ke+H+K)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(U))ee=ee==="auto"?S0(Se,Pe):ee,s.drawBottomRoundRectanglePath(ge||t,he.x,he.y,Se,Pe,ee+(ke+H+K)/2);else if(U==="barrel")s.drawBarrelPath(ge||t,he.x,he.y,Se,Pe);else if(U.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(U)){var lt=(ke+H+K)/o;Ie=A6(_6(Ie,lt)),s.drawPolygonPath(ge||t,he.x,he.y,o,l,Ie)}else{var kt=(ke+H+K)/o;Ie=A6(_6(Ie,-kt)),s.drawPolygonPath(ge||t,he.x,he.y,o,l,Ie)}if(p?t.stroke(ge):t.stroke(),X==="double"){t.lineWidth=ke/3;var ht=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(ge):t.stroke(),t.globalCompositeOperation=ht}t.setLineDash&&t.setLineDash([])}},Ve=function(){i&&s.drawNodeOverlay(t,e,f,o,l)},We=function(){i&&s.drawNodeUnderlay(t,e,f,o,l)},qe=function(){s.drawElementText(t,e,null,n)},Re=e.pstyle("ghost").value==="yes";if(Re){var Me=e.pstyle("ghost-offset-x").pfValue,ye=e.pstyle("ghost-offset-y").pfValue,q=e.pstyle("ghost-opacity").value,de=q*d;t.translate(Me,ye),Y(),Be(),J(q*I),te(),Le(de,!0),W(q*z),Fe(),oe(R!==0||T!==0),Le(de,!1),be(de),t.translate(-Me,-ye)}p&&t.translate(-f.x,-f.y),We(),p&&t.translate(f.x,f.y),Y(),Be(),J(),te(),Le(d,!0),W(),Fe(),oe(R!==0||T!==0),Le(d,!1),be(),p&&t.translate(-f.x,-f.y),qe(),Ve(),r&&t.translate(y.x1,y.y1)}};ape=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n,i,a,s){var o=this;if(n.visible()){var l=n.pstyle("".concat(e,"-padding")).pfValue,u=n.pstyle("".concat(e,"-opacity")).value,h=n.pstyle("".concat(e,"-color")).value,f=n.pstyle("".concat(e,"-shape")).value,d=n.pstyle("".concat(e,"-corner-radius")).value;if(u>0){if(i=i||n.position(),a==null||s==null){var p=n.padding();a=n.width()+2*p,s=n.height()+2*p}o.colorFillStyle(r,h[0],h[1],h[2],u),o.nodeShapes[f].draw(r,i.x,i.y,a+l*2,s+l*2,d),r.fill()}}}};Xm.drawNodeOverlay=ape("overlay");Xm.drawNodeUnderlay=ape("underlay");Xm.hasPie=function(t){return t=t[0],t._private.hasPie};Xm.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),s=n.x,o=n.y,l=e.width(),u=e.height(),h=Math.min(l,u)/2,f=0,d=this.usePaths();d&&(s=0,o=0),a.units==="%"?h=h*a.pfValue:a.pfValue!==void 0&&(h=a.pfValue/2);for(var p=1;p<=i.pieBackgroundN;p++){var g=e.pstyle("pie-"+p+"-background-size").value,m=e.pstyle("pie-"+p+"-background-color").value,x=e.pstyle("pie-"+p+"-background-opacity").value*r,y=g/100;y+f>1&&(y=1-f);var b=1.5*Math.PI+2*Math.PI*f,w=2*Math.PI*y,_=b+w;g===0||f>=1||f+y>1||(t.beginPath(),t.moveTo(s,o),t.arc(s,o,h,b,_),t.closePath(),this.colorFillStyle(t,m[0],m[1],m[2],x),t.fill(),f+=y)}};ro={},XXe=100;ro.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};ro.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,i=0;i<e.length;i++)if(n=e[i],n.context===t){r=!1;break}return r&&(n={context:t},e.push(n)),n};ro.createGradientStyleFor=function(t,e,r,n,i){var a,s=this.usePaths(),o=r.pstyle(e+"-gradient-stop-colors").value,l=r.pstyle(e+"-gradient-stop-positions").pfValue;if(n==="radial-gradient")if(r.isEdge()){var u=r.sourceEndpoint(),h=r.targetEndpoint(),f=r.midpoint(),d=E0(u,f),p=E0(h,f);a=t.createRadialGradient(f.x,f.y,0,f.x,f.y,Math.max(d,p))}else{var g=s?{x:0,y:0}:r.position(),m=r.paddedWidth(),x=r.paddedHeight();a=t.createRadialGradient(g.x,g.y,0,g.x,g.y,Math.max(m,x))}else if(r.isEdge()){var y=r.sourceEndpoint(),b=r.targetEndpoint();a=t.createLinearGradient(y.x,y.y,b.x,b.y)}else{var w=s?{x:0,y:0}:r.position(),_=r.paddedWidth(),k=r.paddedHeight(),E=_/2,L=k/2,S=r.pstyle("background-gradient-direction").value;switch(S){case"to-bottom":a=t.createLinearGradient(w.x,w.y-L,w.x,w.y+L);break;case"to-top":a=t.createLinearGradient(w.x,w.y+L,w.x,w.y-L);break;case"to-left":a=t.createLinearGradient(w.x+E,w.y,w.x-E,w.y);break;case"to-right":a=t.createLinearGradient(w.x-E,w.y,w.x+E,w.y);break;case"to-bottom-right":case"to-right-bottom":a=t.createLinearGradient(w.x-E,w.y-L,w.x+E,w.y+L);break;case"to-top-right":case"to-right-top":a=t.createLinearGradient(w.x-E,w.y+L,w.x+E,w.y-L);break;case"to-bottom-left":case"to-left-bottom":a=t.createLinearGradient(w.x+E,w.y-L,w.x-E,w.y+L);break;case"to-top-left":case"to-left-top":a=t.createLinearGradient(w.x+E,w.y+L,w.x-E,w.y-L);break}}if(!a)return null;for(var C=l.length===o.length,M=o.length,R=0;R<M;R++)a.addColorStop(C?l[R]:R/(M-1),"rgba("+o[R][0]+","+o[R][1]+","+o[R][2]+","+i+")");return a};ro.gradientFillStyle=function(t,e,r,n){var i=this.createGradientStyleFor(t,"background",e,r,n);if(!i)return null;t.fillStyle=i};ro.colorFillStyle=function(t,e,r,n,i){t.fillStyle="rgba("+e+","+r+","+n+","+i+")"};ro.eleFillStyle=function(t,e,r){var n=e.pstyle("background-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientFillStyle(t,e,n,r);else{var i=e.pstyle("background-color").value;this.colorFillStyle(t,i[0],i[1],i[2],r)}};ro.gradientStrokeStyle=function(t,e,r,n){var i=this.createGradientStyleFor(t,"line",e,r,n);if(!i)return null;t.strokeStyle=i};ro.colorStrokeStyle=function(t,e,r,n,i){t.strokeStyle="rgba("+e+","+r+","+n+","+i+")"};ro.eleStrokeStyle=function(t,e,r){var n=e.pstyle("line-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientStrokeStyle(t,e,n,r);else{var i=e.pstyle("line-color").value;this.colorStrokeStyle(t,i[0],i[1],i[2],r)}};ro.matchCanvasSize=function(t){var e=this,r=e.data,n=e.findContainerClientCoords(),i=n[2],a=n[3],s=e.getPixelRatio(),o=e.motionBlurPxRatio;(t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]||t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG])&&(s=o);var l=i*s,u=a*s,h;if(!(l===e.canvasWidth&&u===e.canvasHeight)){e.fontCaches=null;var f=r.canvasContainer;f.style.width=i+"px",f.style.height=a+"px";for(var d=0;d<e.CANVAS_LAYERS;d++)h=r.canvases[d],h.width=l,h.height=u,h.style.width=i+"px",h.style.height=a+"px";for(var d=0;d<e.BUFFER_COUNT;d++)h=r.bufferCanvases[d],h.width=l,h.height=u,h.style.width=i+"px",h.style.height=a+"px";e.textureMult=1,s<=1&&(h=r.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,h.width=l*e.textureMult,h.height=u*e.textureMult),e.canvasWidth=l,e.canvasHeight=u}};ro.renderTo=function(t,e,r,n){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})};ro.render=function(t){t=t||jde();var e=t.forcedContext,r=t.drawAllLayers,n=t.drawOnlyNodeLayer,i=t.forcedZoom,a=t.forcedPan,s=this,o=t.forcedPxRatio===void 0?this.getPixelRatio():t.forcedPxRatio,l=s.cy,u=s.data,h=u.canvasNeedsRedraw,f=s.textureOnViewport&&!e&&(s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming),d=t.motionBlur!==void 0?t.motionBlur:s.motionBlur,p=s.motionBlurPxRatio,g=l.hasCompoundNodes(),m=s.hoverData.draggingEles,x=!!(s.hoverData.selecting||s.touchData.selecting);d=d&&!e&&s.motionBlurEnabled&&!x;var y=d;e||(s.prevPxRatio!==o&&(s.invalidateContainerClientCoordsCache(),s.matchCanvasSize(s.container),s.redrawHint("eles",!0),s.redrawHint("drag",!0)),s.prevPxRatio=o),!e&&s.motionBlurTimeout&&clearTimeout(s.motionBlurTimeout),d&&(s.mbFrames==null&&(s.mbFrames=0),s.mbFrames++,s.mbFrames<3&&(y=!1),s.mbFrames>s.minMbLowQualFrames&&(s.motionBlurPxRatio=s.mbPxRBlurry)),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!f&&(h[s.NODE]=!0,h[s.SELECT_BOX]=!0);var b=l.style(),w=l.zoom(),_=i!==void 0?i:w,k=l.pan(),E={x:k.x,y:k.y},L={zoom:w,pan:{x:k.x,y:k.y}},S=s.prevViewport,C=S===void 0||L.zoom!==S.zoom||L.pan.x!==S.pan.x||L.pan.y!==S.pan.y;!C&&!(m&&!g)&&(s.motionBlurPxRatio=1),a&&(E=a),_*=o,E.x*=o,E.y*=o;var M=s.getCachedZSortedEles();function R(ce,te,Le,oe,be){var Fe=ce.globalCompositeOperation;ce.globalCompositeOperation="destination-out",s.colorFillStyle(ce,255,255,255,s.motionBlurTransparency),ce.fillRect(te,Le,oe,be),ce.globalCompositeOperation=Fe}function T(ce,te){var Le,oe,be,Fe;!s.clearingMotionBlur&&(ce===u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]||ce===u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG])?(Le={x:k.x*p,y:k.y*p},oe=w*p,be=s.canvasWidth*p,Fe=s.canvasHeight*p):(Le=E,oe=_,be=s.canvasWidth,Fe=s.canvasHeight),ce.setTransform(1,0,0,1,0,0),te==="motionBlur"?R(ce,0,0,be,Fe):!e&&(te===void 0||te)&&ce.clearRect(0,0,be,Fe),r||(ce.translate(Le.x,Le.y),ce.scale(oe,oe)),a&&ce.translate(a.x,a.y),i&&ce.scale(i,i)}if(f||(s.textureDrawLastFrame=!1),f){if(s.textureDrawLastFrame=!0,!s.textureCache){s.textureCache={},s.textureCache.bb=l.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER];var I=s.data.bufferContexts[s.TEXTURE_BUFFER];I.setTransform(1,0,0,1,0,0),I.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:I,drawOnlyNodeLayer:!0,forcedPxRatio:o*s.textureMult});var L=s.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:s.canvasWidth,height:s.canvasHeight};L.mpan={x:(0-L.pan.x)/L.zoom,y:(0-L.pan.y)/L.zoom}}h[s.DRAG]=!1,h[s.NODE]=!1;var A=u.contexts[s.NODE],D=s.textureCache.texture,L=s.textureCache.viewport;A.setTransform(1,0,0,1,0,0),d?R(A,0,0,L.width,L.height):A.clearRect(0,0,L.width,L.height);var N=b.core("outside-texture-bg-color").value,O=b.core("outside-texture-bg-opacity").value;s.colorFillStyle(A,N[0],N[1],N[2],O),A.fillRect(0,0,L.width,L.height);var w=l.zoom();T(A,!1),A.clearRect(L.mpan.x,L.mpan.y,L.width/L.zoom/o,L.height/L.zoom/o),A.drawImage(D,L.mpan.x,L.mpan.y,L.width/L.zoom/o,L.height/L.zoom/o)}else s.textureOnViewport&&!e&&(s.textureCache=null);var B=l.extent(),P=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),$=s.hideEdgesOnViewport&&P,z=[];if(z[s.NODE]=!h[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,z[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),z[s.DRAG]=!h[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,z[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),h[s.NODE]||r||n||z[s.NODE]){var H=d&&!z[s.NODE]&&p!==1,A=e||(H?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),Z=d&&!H?"motionBlur":void 0;T(A,Z),$?s.drawCachedNodes(A,M.nondrag,o,B):s.drawLayeredElements(A,M.nondrag,o,B),s.debug&&s.drawDebugPoints(A,M.nondrag),!r&&!d&&(h[s.NODE]=!1)}if(!n&&(h[s.DRAG]||r||z[s.DRAG])){var H=d&&!z[s.DRAG]&&p!==1,A=e||(H?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]);T(A,d&&!H?"motionBlur":void 0),$?s.drawCachedNodes(A,M.drag,o,B):s.drawCachedElements(A,M.drag,o,B),s.debug&&s.drawDebugPoints(A,M.drag),!r&&!d&&(h[s.DRAG]=!1)}if(s.showFps||!n&&h[s.SELECT_BOX]&&!r){var A=e||u.contexts[s.SELECT_BOX];if(T(A),s.selection[4]==1&&(s.hoverData.selecting||s.touchData.selecting)){var w=s.cy.zoom(),X=b.core("selection-box-border-width").value/w;A.lineWidth=X,A.fillStyle="rgba("+b.core("selection-box-color").value[0]+","+b.core("selection-box-color").value[1]+","+b.core("selection-box-color").value[2]+","+b.core("selection-box-opacity").value+")",A.fillRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]),X>0&&(A.strokeStyle="rgba("+b.core("selection-box-border-color").value[0]+","+b.core("selection-box-border-color").value[1]+","+b.core("selection-box-border-color").value[2]+","+b.core("selection-box-opacity").value+")",A.strokeRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]))}if(u.bgActivePosistion&&!s.hoverData.selecting){var w=s.cy.zoom(),ie=u.bgActivePosistion;A.fillStyle="rgba("+b.core("active-bg-color").value[0]+","+b.core("active-bg-color").value[1]+","+b.core("active-bg-color").value[2]+","+b.core("active-bg-opacity").value+")",A.beginPath(),A.arc(ie.x,ie.y,b.core("active-bg-size").pfValue/w,0,2*Math.PI),A.fill()}var K=s.lastRedrawTime;if(s.showFps&&K){K=Math.round(K);var ee=Math.round(1e3/K);A.setTransform(1,0,0,1,0,0),A.fillStyle="rgba(255, 0, 0, 0.75)",A.strokeStyle="rgba(255, 0, 0, 0.75)",A.lineWidth=1,A.fillText("1 frame = "+K+" ms = "+ee+" fps",0,20);var J=60;A.strokeRect(0,30,250,20),A.fillRect(0,30,250*Math.min(ee/J,1),20)}r||(h[s.SELECT_BOX]=!1)}if(d&&p!==1){var W=u.contexts[s.NODE],Y=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],Q=u.contexts[s.DRAG],se=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],ue=function(te,Le,oe){te.setTransform(1,0,0,1,0,0),oe||!y?te.clearRect(0,0,s.canvasWidth,s.canvasHeight):R(te,0,0,s.canvasWidth,s.canvasHeight);var be=p;te.drawImage(Le,0,0,s.canvasWidth*be,s.canvasHeight*be,0,0,s.canvasWidth,s.canvasHeight)};(h[s.NODE]||z[s.NODE])&&(ue(W,Y,z[s.NODE]),h[s.NODE]=!1),(h[s.DRAG]||z[s.DRAG])&&(ue(Q,se,z[s.DRAG]),h[s.DRAG]=!1)}s.prevViewport=L,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),d&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!f,s.mbFrames=0,h[s.NODE]=!0,h[s.DRAG]=!0,s.redraw()},XXe)),e||l.emit("render")};mf={};mf.drawPolygonPath=function(t,e,r,n,i,a){var s=n/2,o=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*a[0],r+o*a[1]);for(var l=1;l<a.length/2;l++)t.lineTo(e+s*a[l*2],r+o*a[l*2+1]);t.closePath()};mf.drawRoundPolygonPath=function(t,e,r,n,i,a,s){s.forEach(function(o){return Y0e(t,o)}),t.closePath()};mf.drawRoundRectanglePath=function(t,e,r,n,i,a){var s=n/2,o=i/2,l=a==="auto"?S0(n,i):Math.min(a,o,s);t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.arcTo(e+s,r-o,e+s,r,l),t.arcTo(e+s,r+o,e,r+o,l),t.arcTo(e-s,r+o,e-s,r,l),t.arcTo(e-s,r-o,e,r-o,l),t.lineTo(e,r-o),t.closePath()};mf.drawBottomRoundRectanglePath=function(t,e,r,n,i,a){var s=n/2,o=i/2,l=a==="auto"?S0(n,i):a;t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.lineTo(e+s,r-o),t.lineTo(e+s,r),t.arcTo(e+s,r+o,e,r+o,l),t.arcTo(e-s,r+o,e-s,r,l),t.lineTo(e-s,r-o),t.lineTo(e,r-o),t.closePath()};mf.drawCutRectanglePath=function(t,e,r,n,i,a,s){var o=n/2,l=i/2,u=s==="auto"?MD():s;t.beginPath&&t.beginPath(),t.moveTo(e-o+u,r-l),t.lineTo(e+o-u,r-l),t.lineTo(e+o,r-l+u),t.lineTo(e+o,r+l-u),t.lineTo(e+o-u,r+l),t.lineTo(e-o+u,r+l),t.lineTo(e-o,r+l-u),t.lineTo(e-o,r-l+u),t.closePath()};mf.drawBarrelPath=function(t,e,r,n,i){var a=n/2,s=i/2,o=e-a,l=e+a,u=r-s,h=r+s,f=cD(n,i),d=f.widthOffset,p=f.heightOffset,g=f.ctrlPtOffsetPct*d;t.beginPath&&t.beginPath(),t.moveTo(o,u+p),t.lineTo(o,h-p),t.quadraticCurveTo(o+g,h,o+d,h),t.lineTo(l-d,h),t.quadraticCurveTo(l-g,h,l,h-p),t.lineTo(l,u+p),t.quadraticCurveTo(l-g,u,l-d,u),t.lineTo(o+d,u),t.quadraticCurveTo(o+g,u,o,u+p),t.closePath()};Ade=Math.sin(0),_de=Math.cos(0),wD={},kD={},spe=Math.PI/40;for(m0=0*Math.PI;m0<2*Math.PI;m0+=spe)wD[m0]=Math.sin(m0),kD[m0]=Math.cos(m0);mf.drawEllipsePath=function(t,e,r,n,i){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,n/2,i/2,0,0,2*Math.PI);else for(var a,s,o=n/2,l=i/2,u=0*Math.PI;u<2*Math.PI;u+=spe)a=e-o*wD[u]*Ade+o*kD[u]*_de,s=r+l*kD[u]*Ade+l*wD[u]*_de,u===0?t.moveTo(a,s):t.lineTo(a,s);t.closePath()};_x={};_x.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]};_x.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements(),n=r.boundingBox(),i=this.findContainerClientCoords(),a=t.full?Math.ceil(n.w):i[2],s=t.full?Math.ceil(n.h):i[3],o=pt(t.maxWidth)||pt(t.maxHeight),l=this.getPixelRatio(),u=1;if(t.scale!==void 0)a*=t.scale,s*=t.scale,u=t.scale;else if(o){var h=1/0,f=1/0;pt(t.maxWidth)&&(h=u*t.maxWidth/a),pt(t.maxHeight)&&(f=u*t.maxHeight/s),u=Math.min(h,f),a*=u,s*=u}o||(a*=l,s*=l,u*=l);var d=document.createElement("canvas");d.width=a,d.height=s,d.style.width=a+"px",d.style.height=s+"px";var p=d.getContext("2d");if(a>0&&s>0){p.clearRect(0,0,a,s),p.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(t.full)p.translate(-n.x1*u,-n.y1*u),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(n.x1*u,n.y1*u);else{var m=e.pan(),x={x:m.x*u,y:m.y*u};u*=e.zoom(),p.translate(x.x,x.y),p.scale(u,u),this.drawElements(p,g),p.scale(1/u,1/u),p.translate(-x.x,-x.y)}t.bg&&(p.globalCompositeOperation="destination-over",p.fillStyle=t.bg,p.rect(0,0,a,s),p.fill())}return d};_x.png=function(t){return ope(t,this.bufferCanvasImage(t),"image/png")};_x.jpg=function(t){return ope(t,this.bufferCanvasImage(t),"image/jpeg")};lpe={};lpe.nodeShapeImpl=function(t,e,r,n,i,a,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,o);case"barrel":return this.drawBarrelPath(e,r,n,i,a)}};KXe=cpe,Gr=cpe.prototype;Gr.CANVAS_LAYERS=3;Gr.SELECT_BOX=0;Gr.DRAG=1;Gr.NODE=2;Gr.BUFFER_COUNT=3;Gr.TEXTURE_BUFFER=0;Gr.MOTIONBLUR_BUFFER_NODE=1;Gr.MOTIONBLUR_BUFFER_DRAG=2;Gr.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Gr.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Gr.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Gr.SELECT_BOX]=e;break}};ZXe=typeof Path2D<"u";Gr.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};Gr.usePaths=function(){return ZXe&&this.pathsEnabled};Gr.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};Gr.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};Gr.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":Mi(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),i=n.document;r=i.createElement("canvas"),r.width=t,r.height=e}return r};[npe,Pc,qu,YD,R0,Xm,ro,mf,_x,lpe].forEach(function(t){Zt(Gr,t)});QXe=[{name:"null",impl:W0e},{name:"base",impl:epe},{name:"canvas",impl:KXe}],JXe=[{type:"layout",extensions:aXe},{type:"renderer",extensions:QXe}],upe={},hpe={};TD=function(){if(arguments.length===2)return dpe.apply(null,arguments);if(arguments.length===3)return fpe.apply(null,arguments);if(arguments.length===4)return tje.apply(null,arguments);if(arguments.length===5)return eje.apply(null,arguments);ri("Invalid extension access syntax")};xx.prototype.extension=TD;JXe.forEach(function(t){t.extensions.forEach(function(e){fpe(t.type,e.name,e.impl)})});ppe=function t(){if(!(this instanceof t))return new t;this.length=0},_0=ppe.prototype;_0.instanceString=function(){return"stylesheet"};_0.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};_0.css=function(t,e){var r=this.length-1;if(qt(t))this[r].properties.push({name:t,value:e});else if(Mr(t))for(var n=t,i=Object.keys(n),a=0;a<i.length;a++){var s=i[a],o=n[s];if(o!=null){var l=Sa.properties[s]||Sa.properties[O6(s)];if(l!=null){var u=l.name,h=o;this[r].properties.push({name:u,value:h})}}}return this};_0.style=_0.css;_0.generateStyle=function(t){var e=new Sa(t);return this.appendToStyle(e)};_0.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],n=r.selector,i=r.properties;t.selector(n);for(var a=0;a<i.length;a++){var s=i[a];t.css(s.name,s.value)}}return t};rje="3.30.3",qo=function(e){if(e===void 0&&(e={}),Mr(e))return new xx(e);if(qt(e))return TD.apply(TD,arguments)};qo.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(qo),t.apply(null,e),this};qo.warnings=function(t){return Yde(t)};qo.version=rje;qo.stylesheet=qo.Stylesheet=ppe});var KD=yi((Lx,jD)=>{(function(e,r){typeof Lx=="object"&&typeof jD=="object"?jD.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Lx=="object"?Lx.layoutBase=r():e.layoutBase=r()})(Lx,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=26)}([function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";function n(i){this.vGraphObject=i}t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(4);function u(f,d,p,g){p==null&&g==null&&(g=d),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;m<g.length;m++)d=g[m],p=d.withChildren(),p.forEach(function(x){f.add(x)});return f},u.prototype.getNoOfChildren=function(){var f=0,d;if(this.child==null)f=1;else for(var p=this.child.getNodes(),g=0;g<p.length;g++)d=p[g],f+=d.getNoOfChildren();return f==0&&(f=1),f},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},u.prototype.scatter=function(){var f,d,p=-s.INITIAL_WORLD_BOUNDARY,g=s.INITIAL_WORLD_BOUNDARY;f=s.WORLD_CENTER_X+o.nextDouble()*(g-p)+p;var m=-s.INITIAL_WORLD_BOUNDARY,x=s.INITIAL_WORLD_BOUNDARY;d=s.WORLD_CENTER_Y+o.nextDouble()*(x-m)+m,this.rect.x=f,this.rect.y=d},u.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var f=this.getChild();if(f.updateBounds(!0),this.rect.x=f.getLeft(),this.rect.y=f.getTop(),this.setWidth(f.getRight()-f.getLeft()),this.setHeight(f.getBottom()-f.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var d=f.getRight()-f.getLeft(),p=f.getBottom()-f.getTop();this.labelWidth>d&&(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)),this.labelHeight>p&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-p)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-p),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u},function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(6),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,x){n.call(this,x),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,x){if(m==null&&x==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var b=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(x)>-1))throw"Source or target not in graph!";if(!(m.owner==x.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=x.owner?null:(b.source=m,b.target=x,b.isInterGraph=!1,this.getEdges().push(b),m.edges.push(b),x!=m&&x.edges.push(b),b)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var x=m.edges.slice(),y,b=x.length,w=0;w<b;w++)y=x[w],y.isInterGraph?this.graphManager.remove(y):y.source.owner.remove(y);var _=this.nodes.indexOf(m);if(_==-1)throw"Node not in owner node list!";this.nodes.splice(_,1)}else if(g instanceof l){var y=g;if(y==null)throw"Edge is null!";if(!(y.source!=null&&y.target!=null))throw"Source and/or target is null!";if(!(y.source.owner!=null&&y.target.owner!=null&&y.source.owner==this&&y.target.owner==this))throw"Source and/or target owner is invalid!";var k=y.source.edges.indexOf(y),E=y.target.edges.indexOf(y);if(!(k>-1&&E>-1))throw"Source and/or target doesn\'t know this edge!";y.source.edges.splice(k,1),y.target!=y.source&&y.target.edges.splice(E,1);var _=y.source.owner.getEdges().indexOf(y);if(_==-1)throw"Not in owner\'s edge list!";y.source.owner.getEdges().splice(_,1)}},d.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,m=i.MAX_VALUE,x,y,b,w=this.getNodes(),_=w.length,k=0;k<_;k++){var E=w[k];x=E.getTop(),y=E.getLeft(),g>x&&(g=x),m>y&&(m=y)}return g==i.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?b=w[0].getParent().paddingLeft:b=this.margin,this.left=m-b,this.top=g-b,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=i.MAX_VALUE,x=-i.MAX_VALUE,y=i.MAX_VALUE,b=-i.MAX_VALUE,w,_,k,E,L,S=this.nodes,C=S.length,M=0;M<C;M++){var R=S[M];g&&R.child!=null&&R.updateBounds(),w=R.getLeft(),_=R.getRight(),k=R.getTop(),E=R.getBottom(),m>w&&(m=w),x<_&&(x=_),y>k&&(y=k),b<E&&(b=E)}var T=new u(m,y,x-m,b-y);m==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),S[0].getParent().paddingLeft!=null?L=S[0].getParent().paddingLeft:L=this.margin,this.left=T.x-L,this.right=T.x+T.width+L,this.top=T.y-L,this.bottom=T.y+T.height+L},d.calculateBounds=function(g){for(var m=i.MAX_VALUE,x=-i.MAX_VALUE,y=i.MAX_VALUE,b=-i.MAX_VALUE,w,_,k,E,L=g.length,S=0;S<L;S++){var C=g[S];w=C.getLeft(),_=C.getRight(),k=C.getTop(),E=C.getBottom(),m>w&&(m=w),x<_&&(x=_),y>k&&(y=k),b<E&&(b=E)}var M=new u(m,y,x-m,b-y);return M},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var g=0,m=this.nodes,x=m.length,y=0;y<x;y++){var b=m[y];g+=b.calcEstimatedSize()}return g==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=g/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var g=this;if(this.nodes.length==0){this.isConnected=!0;return}var m=new f,x=new Set,y=this.nodes[0],b,w,_=y.withChildren();for(_.forEach(function(M){m.push(M),x.add(M)});m.length!==0;){y=m.shift(),b=y.getEdges();for(var k=b.length,E=0;E<k;E++){var L=b[E];if(w=L.getOtherEndInGraph(y,this),w!=null&&!x.has(w)){var S=w.withChildren();S.forEach(function(M){m.push(M),x.add(M)})}}}if(this.isConnected=!1,x.size>=this.nodes.length){var C=0;x.forEach(function(M){M.owner==g&&C++}),C==this.nodes.length&&(this.isConnected=!0)}},t.exports=d},function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(5),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f<h;f++)u=l[f],o.remove(u);var d=[];d=d.concat(o.getNodes());var p;h=d.length;for(var f=0;f<h;f++)p=d[f],o.remove(p);o==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(o);this.graphs.splice(g,1),o.parent=null}else if(s instanceof i){if(u=s,u==null)throw"Edge is null!";if(!u.isInterGraph)throw"Not an inter-graph edge!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.edges.indexOf(u)!=-1&&u.target.edges.indexOf(u)!=-1))throw"Source and/or target doesn\'t know this edge!";var g=u.source.edges.indexOf(u);if(u.source.edges.splice(g,1),g=u.target.edges.indexOf(u),u.target.edges.splice(g,1),!(u.source.owner!=null&&u.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(u.source.owner.getGraphManager().edges.indexOf(u)==-1)throw"Not in owner graph manager\'s edge list!";var g=u.source.owner.getGraphManager().edges.indexOf(u);u.source.owner.getGraphManager().edges.splice(g,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var s=[],o=this.getGraphs(),l=o.length,u=0;u<l;u++)s=s.concat(o[u].getNodes());this.allNodes=s}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){for(var s=[],o=this.getGraphs(),l=o.length,u=0;u<o.length;u++)s=s.concat(o[u].getEdges());s=s.concat(this.edges),this.allEdges=s}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(s){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=s},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(s){if(s.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=s,s.parent==null&&(s.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(s,o){if(!(s!=null&&o!=null))throw"assert failed";if(s==o)return!0;var l=s.getOwner(),u;do{if(u=l.getParent(),u==null)break;if(u==o)return!0;if(l=u.getOwner(),l==null)break}while(!0);l=o.getOwner();do{if(u=l.getParent(),u==null)break;if(u==s)return!0;if(l=u.getOwner(),l==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var s,o,l,u,h,f=this.getAllEdges(),d=f.length,p=0;p<d;p++){if(s=f[p],o=s.source,l=s.target,s.lca=null,s.sourceInLca=o,s.targetInLca=l,o==l){s.lca=o.getOwner();continue}for(u=o.getOwner();s.lca==null;){for(s.targetInLca=l,h=l.getOwner();s.lca==null;){if(h==u){s.lca=h;break}if(h==this.rootGraph)break;if(s.lca!=null)throw"assert failed";s.targetInLca=h.getParent(),h=s.targetInLca.getOwner()}if(u==this.rootGraph)break;s.lca==null&&(s.sourceInLca=u.getParent(),u=s.sourceInLca.getOwner())}if(s.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(s,o){if(s==o)return s.getOwner();var l=s.getOwner();do{if(l==null)break;var u=o.getOwner();do{if(u==null)break;if(u==l)return u;u=u.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},a.prototype.calcInclusionTreeDepths=function(s,o){s==null&&o==null&&(s=this.rootGraph,o=1);for(var l,u=s.getNodes(),h=u.length,f=0;f<h;f++)l=u[f],l.inclusionTreeDepth=o,l.child!=null&&this.calcInclusionTreeDepths(l.child,o+1)},a.prototype.includesInvalidEdge=function(){for(var s,o=this.edges.length,l=0;l<o;l++)if(s=this.edges[l],this.isOneAncestorOfOther(s.source,s.target))return!0;return!1},t.exports=a},function(t,e,r){"use strict";var n=r(0);function i(){}for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,r){"use strict";var n=r(12);function i(){}i.calcSeparationAmount=function(a,s,o,l){if(!a.intersects(s))throw"assert failed";var u=new Array(2);this.decideDirectionsForOverlappingNodes(a,s,u),o[0]=Math.min(a.getRight(),s.getRight())-Math.max(a.x,s.x),o[1]=Math.min(a.getBottom(),s.getBottom())-Math.max(a.y,s.y),a.getX()<=s.getX()&&a.getRight()>=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]<d?d=o[0]:f=o[1],o[0]=-1*u[0]*(d/2+l),o[1]=-1*u[1]*(f/2+l)},i.decideDirectionsForOverlappingNodes=function(a,s,o){a.getCenterX()<s.getCenterX()?o[0]=-1:o[0]=1,a.getCenterY()<s.getCenterY()?o[1]=-1:o[1]=1},i.getIntersection2=function(a,s,o){var l=a.getCenterX(),u=a.getCenterY(),h=s.getCenterX(),f=s.getCenterY();if(a.intersects(s))return o[0]=l,o[1]=u,o[2]=h,o[3]=f,!0;var d=a.getX(),p=a.getY(),g=a.getRight(),m=a.getX(),x=a.getBottom(),y=a.getRight(),b=a.getWidthHalf(),w=a.getHeightHalf(),_=s.getX(),k=s.getY(),E=s.getRight(),L=s.getX(),S=s.getBottom(),C=s.getRight(),M=s.getWidthHalf(),R=s.getHeightHalf(),T=!1,I=!1;if(l===h){if(u>f)return o[0]=l,o[1]=p,o[2]=h,o[3]=S,!1;if(u<f)return o[0]=l,o[1]=x,o[2]=h,o[3]=k,!1}else if(u===f){if(l>h)return o[0]=d,o[1]=u,o[2]=E,o[3]=f,!1;if(l<h)return o[0]=g,o[1]=u,o[2]=_,o[3]=f,!1}else{var A=a.height/a.width,D=s.height/s.width,N=(f-u)/(h-l),O=void 0,B=void 0,P=void 0,$=void 0,z=void 0,H=void 0;if(-A===N?l>h?(o[0]=m,o[1]=x,T=!0):(o[0]=g,o[1]=p,T=!0):A===N&&(l>h?(o[0]=d,o[1]=p,T=!0):(o[0]=y,o[1]=x,T=!0)),-D===N?h>l?(o[2]=L,o[3]=S,I=!0):(o[2]=E,o[3]=k,I=!0):D===N&&(h>l?(o[2]=_,o[3]=k,I=!0):(o[2]=C,o[3]=S,I=!0)),T&&I)return!1;if(l>h?u>f?(O=this.getCardinalDirection(A,N,4),B=this.getCardinalDirection(D,N,2)):(O=this.getCardinalDirection(-A,N,3),B=this.getCardinalDirection(-D,N,1)):u>f?(O=this.getCardinalDirection(-A,N,1),B=this.getCardinalDirection(-D,N,3)):(O=this.getCardinalDirection(A,N,2),B=this.getCardinalDirection(D,N,4)),!T)switch(O){case 1:$=p,P=l+-w/N,o[0]=P,o[1]=$;break;case 2:P=y,$=u+b*N,o[0]=P,o[1]=$;break;case 3:$=x,P=l+w/N,o[0]=P,o[1]=$;break;case 4:P=m,$=u+-b*N,o[0]=P,o[1]=$;break}if(!I)switch(B){case 1:H=k,z=h+-R/N,o[2]=z,o[3]=H;break;case 2:z=C,H=f+M*N,o[2]=z,o[3]=H;break;case 3:H=S,z=h+R/N,o[2]=z,o[3]=H;break;case 4:z=L,H=f+-M*N,o[2]=z,o[3]=H;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,x=l.y,y=void 0,b=void 0,w=void 0,_=void 0,k=void 0,E=void 0,L=void 0,S=void 0,C=void 0;return w=d-h,k=u-f,L=f*h-u*d,_=x-g,E=p-m,S=m*g-p*x,C=w*E-_*k,C===0?null:(y=(k*S-E*L)/C,b=(_*L-w*S)/C,new n(y,b))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o<a?u+=Math.PI:l<s&&(u+=this.TWO_PI)):l<s?u=this.ONE_AND_HALF_PI:u=this.HALF_PI,u},i.doIntersect=function(a,s,o,l){var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,x=l.y,y=(f-u)*(x-g)-(m-p)*(d-h);if(y===0)return!1;var b=((x-g)*(m-u)+(p-m)*(x-h))/y,w=((h-d)*(m-u)+(f-u)*(x-h))/y;return 0<b&&b<1&&0<w&&w<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,r){"use strict";function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n},function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function u(h,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,p.key,p)}}return function(h,f,d){return f&&u(h.prototype,f),d&&u(h,d),h}}();function i(u,h){if(!(u instanceof h))throw new TypeError("Cannot call a class as a function")}var a=function(h){return{value:h,next:null,prev:null}},s=function(h,f,d,p){return h!==null?h.next=f:p.head=f,d!==null?d.prev=f:p.tail=f,f.prev=h,f.next=d,p.length++,f},o=function(h,f){var d=h.prev,p=h.next;return d!==null?d.next=p:f.head=p,p!==null?p.prev=d:f.tail=d,h.prev=h.next=null,f.length--,h},l=function(){function u(h){var f=this;i(this,u),this.length=0,this.head=null,this.tail=null,h?.forEach(function(d){return f.push(d)})}return n(u,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(f,d){return s(d.prev,a(f),d,this)}},{key:"insertAfter",value:function(f,d){return s(d,a(f),d.next,this)}},{key:"insertNodeBefore",value:function(f,d){return s(d.prev,f,d,this)}},{key:"insertNodeAfter",value:function(f,d){return s(d,f,d.next,this)}},{key:"push",value:function(f){return s(this.tail,a(f),null,this)}},{key:"unshift",value:function(f){return s(null,a(f),this.head,this)}},{key:"remove",value:function(f){return o(f,this)}},{key:"pop",value:function(){return o(this.tail,this).value}},{key:"popNode",value:function(){return o(this.tail,this)}},{key:"shift",value:function(){return o(this.head,this).value}},{key:"shiftNode",value:function(){return o(this.head,this)}},{key:"get_object_at",value:function(f){if(f<=this.length()){for(var d=1,p=this.head;d<f;)p=p.next,d++;return p.value}}},{key:"set_object_at",value:function(f,d){if(f<=this.length()){for(var p=1,g=this.head;p<f;)g=g.next,p++;g.value=d}}}]),u}();t.exports=l},function(t,e,r){"use strict";function n(i,a,s){this.x=null,this.y=null,i==null&&a==null&&s==null?(this.x=0,this.y=0):typeof i=="number"&&typeof a=="number"&&s==null?(this.x=i,this.y=a):i.constructor.name=="Point"&&a==null&&s==null&&(s=i,this.x=s.x,this.y=s.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(i,a,s){i.constructor.name=="Point"&&a==null&&s==null?(s=i,this.setLocation(s.x,s.y)):typeof i=="number"&&typeof a=="number"&&s==null&&(parseInt(i)==i&&parseInt(a)==a?this.move(i,a):(this.x=Math.floor(i+.5),this.y=Math.floor(a+.5)))},n.prototype.move=function(i,a){this.x=i,this.y=a},n.prototype.translate=function(i,a){this.x+=i,this.y+=a},n.prototype.equals=function(i){if(i.constructor.name=="Point"){var a=i;return this.x==a.x&&this.y==a.y}return this==i},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,r){"use strict";function n(i,a,s,o){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&a!=null&&s!=null&&o!=null&&(this.x=i,this.y=a,this.width=s,this.height=o)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(i){this.x=i},n.prototype.getY=function(){return this.y},n.prototype.setY=function(i){this.y=i},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,r){"use strict";var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function i(){}i.lastID=0,i.createID=function(a){return i.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=i.getString(),i.lastID++),a.uniqueID)},i.getString=function(a){return a==null&&(a=i.lastID),"Object#"+a},i.isPrimitive=function(a){var s=typeof a>"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},t.exports=i},function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g<p.length;g++)m[g]=p[g];return m}else return Array.from(p)}var i=r(0),a=r(6),s=r(3),o=r(1),l=r(5),u=r(4),h=r(17),f=r(27);function d(p){f.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,p!=null&&(this.isRemoteUse=p)}d.RANDOM_SEED=1,d.prototype=Object.create(f.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var p=new a(this);return this.graphManager=p,p},d.prototype.newGraph=function(p){return new l(null,this.graphManager,p)},d.prototype.newNode=function(p){return new s(this.graphManager,p)},d.prototype.newEdge=function(p){return new o(null,null,p)},d.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var p;return this.checkLayoutSuccess()?p=!1:p=this.layout(),i.ANIMATE==="during"?!1:(p&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,p)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var p,g=this.graphManager.getAllEdges(),m=0;m<g.length;m++)p=g[m];for(var x,y=this.graphManager.getRoot().getNodes(),m=0;m<y.length;m++)x=y[m];this.update(this.graphManager.getRoot())}},d.prototype.update=function(p){if(p==null)this.update2();else if(p instanceof s){var g=p;if(g.getChild()!=null)for(var m=g.getChild().getNodes(),x=0;x<m.length;x++)update(m[x]);if(g.vGraphObject!=null){var y=g.vGraphObject;y.update(g)}}else if(p instanceof o){var b=p;if(b.vGraphObject!=null){var w=b.vGraphObject;w.update(b)}}else if(p instanceof l){var _=p;if(_.vGraphObject!=null){var k=_.vGraphObject;k.update(_)}}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(p){if(p==null)this.transform(new u(0,0));else{var g=new h,m=this.graphManager.getRoot().updateLeftTop();if(m!=null){g.setWorldOrgX(p.x),g.setWorldOrgY(p.y),g.setDeviceOrgX(m.x),g.setDeviceOrgY(m.y);for(var x=this.getAllNodes(),y,b=0;b<x.length;b++)y=x[b],y.transform(g)}}},d.prototype.positionNodesRandomly=function(p){if(p==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,m,x=p.getNodes(),y=0;y<x.length;y++)g=x[y],m=g.getChild(),m==null||m.getNodes().length==0?g.scatter():(this.positionNodesRandomly(m),g.updateBounds())},d.prototype.getFlatForest=function(){for(var p=[],g=!0,m=this.graphManager.getRoot().getNodes(),x=!0,y=0;y<m.length;y++)m[y].getChild()!=null&&(x=!1);if(!x)return p;var b=new Set,w=[],_=new Map,k=[];for(k=k.concat(m);k.length>0&&g;){for(w.push(k[0]);w.length>0&&g;){var E=w[0];w.splice(0,1),b.add(E);for(var L=E.getEdges(),y=0;y<L.length;y++){var S=L[y].getOtherEnd(E);if(_.get(E)!=S)if(!b.has(S))w.push(S),_.set(S,E);else{g=!1;break}}}if(!g)p=[];else{var C=[].concat(n(b));p.push(C);for(var y=0;y<C.length;y++){var M=C[y],R=k.indexOf(M);R>-1&&k.splice(R,1)}b=new Set,_=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,x=this.graphManager.calcLowestCommonAncestor(p.source,p.target),y=0;y<p.bendpoints.length;y++){var b=this.newNode(null);b.setRect(new Point(0,0),new Dimension(1,1)),x.add(b);var w=this.newEdge(null);this.graphManager.add(w,m,b),g.add(b),m=b}var w=this.newEdge(null);return this.graphManager.add(w,m,p.target),this.edgeToDummyNodes.set(p,g),p.isInterGraph()?this.graphManager.remove(p):x.remove(p),g},d.prototype.createBendpointsFromDummyNodes=function(){var p=[];p=p.concat(this.graphManager.getAllEdges()),p=[].concat(n(this.edgeToDummyNodes.keys())).concat(p);for(var g=0;g<p.length;g++){var m=p[g];if(m.bendpoints.length>0){for(var x=this.edgeToDummyNodes.get(m),y=0;y<x.length;y++){var b=x[y],w=new u(b.getCenterX(),b.getCenterY()),_=m.bendpoints.get(y);_.x=w.x,_.y=w.y,b.getOwner().remove(b)}this.graphManager.add(m,m.source,m.target)}}},d.transform=function(p,g,m,x){if(m!=null&&x!=null){var y=g;if(p<=50){var b=g/m;y-=(g-b)/50*(50-p)}else{var w=g*x;y+=(w-g)/50*(p-50)}return y}else{var _,k;return p<=50?(_=9*g/500,k=g/10):(_=9*g/50,k=-8*g),_*p+k}},d.findCenterOfTree=function(p){var g=[];g=g.concat(p);var m=[],x=new Map,y=!1,b=null;(g.length==1||g.length==2)&&(y=!0,b=g[0]);for(var w=0;w<g.length;w++){var _=g[w],k=_.getNeighborsList().size;x.set(_,_.getNeighborsList().size),k==1&&m.push(_)}var E=[];for(E=E.concat(m);!y;){var L=[];L=L.concat(E),E=[];for(var w=0;w<g.length;w++){var _=g[w],S=g.indexOf(_);S>=0&&g.splice(S,1);var C=_.getNeighborsList();C.forEach(function(T){if(m.indexOf(T)<0){var I=x.get(T),A=I-1;A==1&&E.push(T),x.set(T,A)}})}m=m.concat(E),(g.length==1||g.length==2)&&(y=!0,b=g[0])}return b},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d},function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(4);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},t.exports=i},function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);d<f.length;d++)p[d]=f[d];return p}else return Array.from(f)}var i=r(15),a=r(7),s=r(0),o=r(8),l=r(9);function u(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}u.prototype=Object.create(i.prototype);for(var h in i)u[h]=i[h];u.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var f,d,p,g,m,x,y=this.getGraphManager().getAllEdges(),b=0;b<y.length;b++)f=y[b],f.idealLength=this.idealEdgeLength,f.isInterGraph&&(p=f.getSource(),g=f.getTarget(),m=f.getSourceInLca().getEstimatedSize(),x=f.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(f.idealLength+=m+x-2*s.SIMPLE_NODE_SIZE),d=f.getLca().getInclusionTreeDepth(),f.idealLength+=a.DEFAULT_EDGE_LENGTH*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(p.getInclusionTreeDepth()+g.getInclusionTreeDepth()-2*d))},u.prototype.initSpringEmbedder=function(){var f=this.getAllNodes().length;this.incremental?(f>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p<f.length;p++)d=f[p],this.calcSpringForce(d,d.idealLength)},u.prototype.calcRepulsionForces=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,x,y=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,p=0;p<y.length;p++)m=y[p],this.calculateRepulsionForceOfANode(m,b,f,d),b.add(m);else for(p=0;p<y.length;p++)for(m=y[p],g=p+1;g<y.length;g++)x=y[g],m.getOwner()==x.getOwner()&&this.calcRepulsionForce(m,x)},u.prototype.calcGravitationalForces=function(){for(var f,d=this.getAllNodesToApplyGravitation(),p=0;p<d.length;p++)f=d[p],this.calcGravitationalForce(f)},u.prototype.moveNodes=function(){for(var f=this.getAllNodes(),d,p=0;p<f.length;p++)d=f[p],d.move()},u.prototype.calcSpringForce=function(f,d){var p=f.getSource(),g=f.getTarget(),m,x,y,b;if(this.uniformLeafNodeSizes&&p.getChild()==null&&g.getChild()==null)f.updateLengthSimple();else if(f.updateLength(),f.isOverlapingSourceAndTarget)return;m=f.getLength(),m!=0&&(x=this.springConstant*(m-d),y=x*(f.lengthX/m),b=x*(f.lengthY/m),p.springForceX+=y,p.springForceY+=b,g.springForceX-=y,g.springForceY-=b)},u.prototype.calcRepulsionForce=function(f,d){var p=f.getRect(),g=d.getRect(),m=new Array(2),x=new Array(4),y,b,w,_,k,E,L;if(p.intersects(g)){o.calcSeparationAmount(p,g,m,a.DEFAULT_EDGE_LENGTH/2),E=2*m[0],L=2*m[1];var S=f.noOfChildren*d.noOfChildren/(f.noOfChildren+d.noOfChildren);f.repulsionForceX-=S*E,f.repulsionForceY-=S*L,d.repulsionForceX+=S*E,d.repulsionForceY+=S*L}else this.uniformLeafNodeSizes&&f.getChild()==null&&d.getChild()==null?(y=g.getCenterX()-p.getCenterX(),b=g.getCenterY()-p.getCenterY()):(o.getIntersection(p,g,x),y=x[2]-x[0],b=x[3]-x[1]),Math.abs(y)<a.MIN_REPULSION_DIST&&(y=l.sign(y)*a.MIN_REPULSION_DIST),Math.abs(b)<a.MIN_REPULSION_DIST&&(b=l.sign(b)*a.MIN_REPULSION_DIST),w=y*y+b*b,_=Math.sqrt(w),k=this.repulsionConstant*f.noOfChildren*d.noOfChildren/w,E=k*y/_,L=k*b/_,f.repulsionForceX-=E,f.repulsionForceY-=L,d.repulsionForceX+=E,d.repulsionForceY+=L},u.prototype.calcGravitationalForce=function(f){var d,p,g,m,x,y,b,w;d=f.getOwner(),p=(d.getRight()+d.getLeft())/2,g=(d.getTop()+d.getBottom())/2,m=f.getCenterX()-p,x=f.getCenterY()-g,y=Math.abs(m)+f.getWidth()/2,b=Math.abs(x)+f.getHeight()/2,f.getOwner()==this.graphManager.getRoot()?(w=d.getEstimatedSize()*this.gravityRangeFactor,(y>w||b>w)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*x)):(w=d.getEstimatedSize()*this.compoundGravityRangeFactor,(y>w||b>w)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*x*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,f||d},u.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},u.prototype.calcNoOfChildrenForAllNodes=function(){for(var f,d=this.graphManager.getAllNodes(),p=0;p<d.length;p++)f=d[p],f.noOfChildren=f.getNoOfChildren()},u.prototype.calcGrid=function(f){var d=0,p=0;d=parseInt(Math.ceil((f.getRight()-f.getLeft())/this.repulsionRange)),p=parseInt(Math.ceil((f.getBottom()-f.getTop())/this.repulsionRange));for(var g=new Array(d),m=0;m<d;m++)g[m]=new Array(p);for(var m=0;m<d;m++)for(var x=0;x<p;x++)g[m][x]=new Array;return g},u.prototype.addNodeToGrid=function(f,d,p){var g=0,m=0,x=0,y=0;g=parseInt(Math.floor((f.getRect().x-d)/this.repulsionRange)),m=parseInt(Math.floor((f.getRect().width+f.getRect().x-d)/this.repulsionRange)),x=parseInt(Math.floor((f.getRect().y-p)/this.repulsionRange)),y=parseInt(Math.floor((f.getRect().height+f.getRect().y-p)/this.repulsionRange));for(var b=g;b<=m;b++)for(var w=x;w<=y;w++)this.grid[b][w].push(f),f.setGridCoordinates(g,m,x,y)},u.prototype.updateGrid=function(){var f,d,p=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),f=0;f<p.length;f++)d=p[f],this.addNodeToGrid(d,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},u.prototype.calculateRepulsionForceOfANode=function(f,d,p,g){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&p||g){var m=new Set;f.surrounding=new Array;for(var x,y=this.grid,b=f.startX-1;b<f.finishX+2;b++)for(var w=f.startY-1;w<f.finishY+2;w++)if(!(b<0||w<0||b>=y.length||w>=y[0].length)){for(var _=0;_<y[b][w].length;_++)if(x=y[b][w][_],!(f.getOwner()!=x.getOwner()||f==x)&&!d.has(x)&&!m.has(x)){var k=Math.abs(f.getCenterX()-x.getCenterX())-(f.getWidth()/2+x.getWidth()/2),E=Math.abs(f.getCenterY()-x.getCenterY())-(f.getHeight()/2+x.getHeight()/2);k<=this.repulsionRange&&E<=this.repulsionRange&&m.add(x)}}f.surrounding=[].concat(n(m))}for(b=0;b<f.surrounding.length;b++)this.calcRepulsionForce(f,f.surrounding[b])},u.prototype.calcRepulsionRange=function(){return 0},t.exports=u},function(t,e,r){"use strict";var n=r(1),i=r(7);function a(o,l,u){n.call(this,o,l,u),this.idealLength=i.DEFAULT_EDGE_LENGTH}a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];t.exports=a},function(t,e,r){"use strict";var n=r(3);function i(s,o,l,u){n.call(this,s,o,l,u),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}i.prototype=Object.create(n.prototype);for(var a in n)i[a]=n[a];i.prototype.setGridCoordinates=function(s,o,l,u){this.startX=s,this.finishX=o,this.startY=l,this.finishY=u},t.exports=i},function(t,e,r){"use strict";function n(i,a){this.width=0,this.height=0,i!==null&&a!==null&&(this.height=a,this.width=i)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},t.exports=n},function(t,e,r){"use strict";var n=r(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(a,s){var o=n.createID(a);this.contains(o)||(this.map[o]=s,this.keys.push(a))},i.prototype.contains=function(a){var s=n.createID(a);return this.map[a]!=null},i.prototype.get=function(a){var s=n.createID(a);return this.map[s]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,r){"use strict";var n=r(14);function i(){this.set={}}i.prototype.add=function(a){var s=n.createID(a);this.contains(s)||(this.set[s]=a)},i.prototype.remove=function(a){delete this.set[n.createID(a)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(a){return this.set[n.createID(a)]==a},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(a){for(var s=Object.keys(this.set),o=s.length,l=0;l<o;l++)a.push(this.set[s[l]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(a){for(var s=a.length,o=0;o<s;o++){var l=a[o];this.add(l)}},t.exports=i},function(t,e,r){"use strict";var n=function(){function o(l,u){for(var h=0;h<u.length;h++){var f=u[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f)}}return function(l,u,h){return u&&o(l.prototype,u),h&&o(l,h),l}}();function i(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")}var a=r(11),s=function(){function o(l,u){i(this,o),(u!==null||u!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var h=void 0;l instanceof a?h=l.size():h=l.length,this._quicksort(l,0,h-1)}return n(o,[{key:"_quicksort",value:function(u,h,f){if(h<f){var d=this._partition(u,h,f);this._quicksort(u,h,d),this._quicksort(u,d+1,f)}}},{key:"_partition",value:function(u,h,f){for(var d=this._get(u,h),p=h,g=f;;){for(;this.compareFunction(d,this._get(u,g));)g--;for(;this.compareFunction(this._get(u,p),d);)p++;if(p<g)this._swap(u,p,g),p++,g--;else return g}}},{key:"_get",value:function(u,h){return u instanceof a?u.get_object_at(h):u[h]}},{key:"_set",value:function(u,h,f){u instanceof a?u.set_object_at(h,f):u[h]=f}},{key:"_swap",value:function(u,h,f){var d=this._get(u,h);this._set(u,h,this._get(u,f)),this._set(u,f,d)}},{key:"_defaultCompareFunction",value:function(u,h){return h>u}}]),o}();t.exports=s},function(t,e,r){"use strict";var n=function(){function s(o,l){for(var u=0;u<l.length;u++){var h=l[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}return function(o,l,u){return l&&s(o.prototype,l),u&&s(o,u),o}}();function i(s,o){if(!(s instanceof o))throw new TypeError("Cannot call a class as a function")}var a=function(){function s(o,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d<this.iMax;d++){this.grid[d]=new Array(this.jMax);for(var p=0;p<this.jMax;p++)this.grid[d][p]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var m=0;m<this.jMax;m++)this.tracebackGrid[g][m]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(s,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var l=1;l<this.jMax;l++)this.grid[0][l]=this.grid[0][l-1]+this.gap_penalty,this.tracebackGrid[0][l]=[!1,!1,!0];for(var u=1;u<this.iMax;u++)this.grid[u][0]=this.grid[u-1][0]+this.gap_penalty,this.tracebackGrid[u][0]=[!1,!0,!1];for(var h=1;h<this.iMax;h++)for(var f=1;f<this.jMax;f++){var d=void 0;this.sequence1[h-1]===this.sequence2[f-1]?d=this.grid[h-1][f-1]+this.match_score:d=this.grid[h-1][f-1]+this.mismatch_penalty;var p=this.grid[h-1][f]+this.gap_penalty,g=this.grid[h][f-1]+this.gap_penalty,m=[d,p,g],x=this.arrayAllMaxIndexes(m);this.grid[h][f]=m[x[0]],this.tracebackGrid[h][f]=[x.includes(0),x.includes(1),x.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var l=[];for(l.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});l[0];){var u=l[0],h=this.tracebackGrid[u.pos[0]][u.pos[1]];h[0]&&l.push({pos:[u.pos[0]-1,u.pos[1]-1],seq1:this.sequence1[u.pos[0]-1]+u.seq1,seq2:this.sequence2[u.pos[1]-1]+u.seq2}),h[1]&&l.push({pos:[u.pos[0]-1,u.pos[1]],seq1:this.sequence1[u.pos[0]-1]+u.seq1,seq2:"-"+u.seq2}),h[2]&&l.push({pos:[u.pos[0],u.pos[1]-1],seq1:"-"+u.seq1,seq2:this.sequence2[u.pos[1]-1]+u.seq2}),u.pos[0]===0&&u.pos[1]===0&&this.alignments.push({sequence1:u.seq1,sequence2:u.seq2}),l.shift()}return this.alignments}},{key:"getAllIndexes",value:function(l,u){for(var h=[],f=-1;(f=l.indexOf(u,f+1))!==-1;)h.push(f);return h}},{key:"arrayAllMaxIndexes",value:function(l){return this.getAllIndexes(l,Math.max.apply(null,l))}}]),s}();t.exports=a},function(t,e,r){"use strict";var n=function(){};n.FDLayout=r(18),n.FDLayoutConstants=r(7),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(4),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(24),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(5),n.LEdge=r(1),n.LGraphManager=r(6),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(25),t.exports=n},function(t,e,r){"use strict";function n(){this.listeners=[]}var i=n.prototype;i.addListener=function(a,s){this.listeners.push({event:a,callback:s})},i.removeListener=function(a,s){for(var o=this.listeners.length;o>=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o<this.listeners.length;o++){var l=this.listeners[o];a===l.event&&l.callback(s)}},t.exports=n}])})});var QD=yi((Rx,ZD)=>{(function(e,r){typeof Rx=="object"&&typeof ZD=="object"?ZD.exports=r(KD()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof Rx=="object"?Rx.coseBase=r(KD()):e.coseBase=r(e.layoutBase)})(Rx,function(t){return function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=7)}([function(e,r){e.exports=t},function(e,r,n){"use strict";var i=n(0).FDLayoutConstants;function a(){}for(var s in i)a[s]=i[s];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a},function(e,r,n){"use strict";var i=n(0).FDLayoutEdge;function a(o,l,u){i.call(this,o,l,u)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a},function(e,r,n){"use strict";var i=n(0).LGraph;function a(o,l,u){i.call(this,o,l,u)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a},function(e,r,n){"use strict";var i=n(0).LGraphManager;function a(o){i.call(this,o)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a},function(e,r,n){"use strict";var i=n(0).FDLayoutNode,a=n(0).IMath;function s(l,u,h,f){i.call(this,l,u,h,f)}s.prototype=Object.create(i.prototype);for(var o in i)s[o]=i[o];s.prototype.move=function(){var l=this.graphManager.getLayout();this.displacementX=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementX=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementY=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),l.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(l,u){for(var h=this.getChild().getNodes(),f,d=0;d<h.length;d++)f=h[d],f.getChild()==null?(f.moveBy(l,u),f.displacementX+=l,f.displacementY+=u):f.propogateDisplacementToChildren(l,u)},s.prototype.setPred1=function(l){this.pred1=l},s.prototype.getPred1=function(){return pred1},s.prototype.getPred2=function(){return pred2},s.prototype.setNext=function(l){this.next=l},s.prototype.getNext=function(){return next},s.prototype.setProcessed=function(l){this.processed=l},s.prototype.isProcessed=function(){return processed},e.exports=s},function(e,r,n){"use strict";var i=n(0).FDLayout,a=n(4),s=n(3),o=n(5),l=n(2),u=n(1),h=n(0).FDLayoutConstants,f=n(0).LayoutConstants,d=n(0).Point,p=n(0).PointD,g=n(0).Layout,m=n(0).Integer,x=n(0).IGeometry,y=n(0).LGraph,b=n(0).Transform;function w(){i.call(this),this.toBeTiled={}}w.prototype=Object.create(i.prototype);for(var _ in i)w[_]=i[_];w.prototype.newGraphManager=function(){var k=new a(this);return this.graphManager=k,k},w.prototype.newGraph=function(k){return new s(null,this.graphManager,k)},w.prototype.newNode=function(k){return new o(this.graphManager,k)},w.prototype.newEdge=function(k){return new l(null,null,k)},w.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.isSubLayout||(u.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=u.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=u.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=h.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=h.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=h.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},w.prototype.layout=function(){var k=f.DEFAULT_CREATE_BENDS_AS_NEEDED;return k&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},w.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(u.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),L=this.nodesWithGravity.filter(function(M){return E.has(M)});this.graphManager.setAllNodesToApplyGravitation(L)}}else{var k=this.getFlatForest();if(k.length>0)this.positionNodesRadially(k);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),L=this.nodesWithGravity.filter(function(S){return E.has(S)});this.graphManager.setAllNodesToApplyGravitation(L),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},w.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var k=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(C){return k.has(C)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var L=!this.isTreeGrowing&&!this.isGrowthFinished,S=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(L,S),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},w.prototype.getPositionsData=function(){for(var k=this.graphManager.getAllNodes(),E={},L=0;L<k.length;L++){var S=k[L].rect,C=k[L].id;E[C]={id:C,x:S.getCenterX(),y:S.getCenterY(),w:S.width,h:S.height}}return E},w.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var k=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!k;)k=this.tick();this.graphManager.updateBounds()}},w.prototype.calculateNodesToApplyGravitationTo=function(){var k=[],E,L=this.graphManager.getGraphs(),S=L.length,C;for(C=0;C<S;C++)E=L[C],E.updateConnected(),E.isConnected||(k=k.concat(E.getNodes()));return k},w.prototype.createBendpoints=function(){var k=[];k=k.concat(this.graphManager.getAllEdges());var E=new Set,L;for(L=0;L<k.length;L++){var S=k[L];if(!E.has(S)){var C=S.getSource(),M=S.getTarget();if(C==M)S.getBendpoints().push(new p),S.getBendpoints().push(new p),this.createDummyNodesForBendpoints(S),E.add(S);else{var R=[];if(R=R.concat(C.getEdgeListToNode(M)),R=R.concat(M.getEdgeListToNode(C)),!E.has(R[0])){if(R.length>1){var T;for(T=0;T<R.length;T++){var I=R[T];I.getBendpoints().push(new p),this.createDummyNodesForBendpoints(I)}}R.forEach(function(A){E.add(A)})}}}if(E.size==k.length)break}},w.prototype.positionNodesRadially=function(k){for(var E=new d(0,0),L=Math.ceil(Math.sqrt(k.length)),S=0,C=0,M=0,R=new p(0,0),T=0;T<k.length;T++){T%L==0&&(M=0,C=S,T!=0&&(C+=u.DEFAULT_COMPONENT_SEPERATION),S=0);var I=k[T],A=g.findCenterOfTree(I);E.x=M,E.y=C,R=w.radialLayout(I,A,E),R.y>S&&(S=Math.floor(R.y)),M=Math.floor(R.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(f.WORLD_CENTER_X-R.x/2,f.WORLD_CENTER_Y-R.y/2))},w.radialLayout=function(k,E,L){var S=Math.max(this.maxDiagonalInTree(k),u.DEFAULT_RADIAL_SEPARATION);w.branchRadialLayout(E,null,0,359,0,S);var C=y.calculateBounds(k),M=new b;M.setDeviceOrgX(C.getMinX()),M.setDeviceOrgY(C.getMinY()),M.setWorldOrgX(L.x),M.setWorldOrgY(L.y);for(var R=0;R<k.length;R++){var T=k[R];T.transform(M)}var I=new p(C.getMaxX(),C.getMaxY());return M.inverseTransformPoint(I)},w.branchRadialLayout=function(k,E,L,S,C,M){var R=(S-L+1)/2;R<0&&(R+=180);var T=(R+L)%360,I=T*x.TWO_PI/360,A=Math.cos(I),D=C*Math.cos(I),N=C*Math.sin(I);k.setCenter(D,N);var O=[];O=O.concat(k.getEdges());var B=O.length;E!=null&&B--;for(var P=0,$=O.length,z,H=k.getEdgesBetween(E);H.length>1;){var Z=H[0];H.splice(0,1);var X=O.indexOf(Z);X>=0&&O.splice(X,1),$--,B--}E!=null?z=(O.indexOf(H[0])+1)%$:z=0;for(var ie=Math.abs(S-L)/B,K=z;P!=B;K=++K%$){var ee=O[K].getOtherEnd(k);if(ee!=E){var J=(L+P*ie)%360,W=(J+ie)%360;w.branchRadialLayout(ee,k,J,W,C+M,M),P++}}},w.maxDiagonalInTree=function(k){for(var E=m.MIN_VALUE,L=0;L<k.length;L++){var S=k[L],C=S.getDiagonal();C>E&&(E=C)}return E},w.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},w.prototype.groupZeroDegreeMembers=function(){var k=this,E={};this.memberGroups={},this.idToDummyNode={};for(var L=[],S=this.graphManager.getAllNodes(),C=0;C<S.length;C++){var M=S[C],R=M.getParent();this.getNodeDegreeWithChildren(M)===0&&(R.id==null||!this.getToBeTiled(R))&&L.push(M)}for(var C=0;C<L.length;C++){var M=L[C],T=M.getParent().id;typeof E[T]>"u"&&(E[T]=[]),E[T]=E[T].concat(M)}Object.keys(E).forEach(function(I){if(E[I].length>1){var A="DummyCompound_"+I;k.memberGroups[A]=E[I];var D=E[I][0].getParent(),N=new o(k.graphManager);N.id=A,N.paddingLeft=D.paddingLeft||0,N.paddingRight=D.paddingRight||0,N.paddingBottom=D.paddingBottom||0,N.paddingTop=D.paddingTop||0,k.idToDummyNode[A]=N;var O=k.getGraphManager().add(k.newGraph(),N),B=D.getChild();B.add(N);for(var P=0;P<E[I].length;P++){var $=E[I][P];B.remove($),O.add($)}}})},w.prototype.clearCompounds=function(){var k={},E={};this.performDFSOnCompounds();for(var L=0;L<this.compoundOrder.length;L++)E[this.compoundOrder[L].id]=this.compoundOrder[L],k[this.compoundOrder[L].id]=[].concat(this.compoundOrder[L].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[L].getChild()),this.compoundOrder[L].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(k,E)},w.prototype.clearZeroDegreeMembers=function(){var k=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(L){var S=k.idToDummyNode[L];E[L]=k.tileNodes(k.memberGroups[L],S.paddingLeft+S.paddingRight),S.rect.width=E[L].width,S.rect.height=E[L].height})},w.prototype.repopulateCompounds=function(){for(var k=this.compoundOrder.length-1;k>=0;k--){var E=this.compoundOrder[k],L=E.id,S=E.paddingLeft,C=E.paddingTop;this.adjustLocations(this.tiledMemberPack[L],E.rect.x,E.rect.y,S,C)}},w.prototype.repopulateZeroDegreeMembers=function(){var k=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(L){var S=k.idToDummyNode[L],C=S.paddingLeft,M=S.paddingTop;k.adjustLocations(E[L],S.rect.x,S.rect.y,C,M)})},w.prototype.getToBeTiled=function(k){var E=k.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var L=k.getChild();if(L==null)return this.toBeTiled[E]=!1,!1;for(var S=L.getNodes(),C=0;C<S.length;C++){var M=S[C];if(this.getNodeDegree(M)>0)return this.toBeTiled[E]=!1,!1;if(M.getChild()==null){this.toBeTiled[M.id]=!1;continue}if(!this.getToBeTiled(M))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},w.prototype.getNodeDegree=function(k){for(var E=k.id,L=k.getEdges(),S=0,C=0;C<L.length;C++){var M=L[C];M.getSource().id!==M.getTarget().id&&(S=S+1)}return S},w.prototype.getNodeDegreeWithChildren=function(k){var E=this.getNodeDegree(k);if(k.getChild()==null)return E;for(var L=k.getChild().getNodes(),S=0;S<L.length;S++){var C=L[S];E+=this.getNodeDegreeWithChildren(C)}return E},w.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},w.prototype.fillCompexOrderByDFS=function(k){for(var E=0;E<k.length;E++){var L=k[E];L.getChild()!=null&&this.fillCompexOrderByDFS(L.getChild().getNodes()),this.getToBeTiled(L)&&this.compoundOrder.push(L)}},w.prototype.adjustLocations=function(k,E,L,S,C){E+=S,L+=C;for(var M=E,R=0;R<k.rows.length;R++){var T=k.rows[R];E=M;for(var I=0,A=0;A<T.length;A++){var D=T[A];D.rect.x=E,D.rect.y=L,E+=D.rect.width+k.horizontalPadding,D.rect.height>I&&(I=D.rect.height)}L+=I+k.verticalPadding}},w.prototype.tileCompoundMembers=function(k,E){var L=this;this.tiledMemberPack=[],Object.keys(k).forEach(function(S){var C=E[S];L.tiledMemberPack[S]=L.tileNodes(k[S],C.paddingLeft+C.paddingRight),C.rect.width=L.tiledMemberPack[S].width,C.rect.height=L.tiledMemberPack[S].height})},w.prototype.tileNodes=function(k,E){var L=u.TILING_PADDING_VERTICAL,S=u.TILING_PADDING_HORIZONTAL,C={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:L,horizontalPadding:S};k.sort(function(T,I){return T.rect.width*T.rect.height>I.rect.width*I.rect.height?-1:T.rect.width*T.rect.height<I.rect.width*I.rect.height?1:0});for(var M=0;M<k.length;M++){var R=k[M];C.rows.length==0?this.insertNodeToRow(C,R,0,E):this.canAddHorizontal(C,R.rect.width,R.rect.height)?this.insertNodeToRow(C,R,this.getShortestRowIndex(C),E):this.insertNodeToRow(C,R,C.rows.length,E),this.shiftToLastRow(C)}return C},w.prototype.insertNodeToRow=function(k,E,L,S){var C=S;if(L==k.rows.length){var M=[];k.rows.push(M),k.rowWidth.push(C),k.rowHeight.push(0)}var R=k.rowWidth[L]+E.rect.width;k.rows[L].length>0&&(R+=k.horizontalPadding),k.rowWidth[L]=R,k.width<R&&(k.width=R);var T=E.rect.height;L>0&&(T+=k.verticalPadding);var I=0;T>k.rowHeight[L]&&(I=k.rowHeight[L],k.rowHeight[L]=T,I=k.rowHeight[L]-I),k.height+=I,k.rows[L].push(E)},w.prototype.getShortestRowIndex=function(k){for(var E=-1,L=Number.MAX_VALUE,S=0;S<k.rows.length;S++)k.rowWidth[S]<L&&(E=S,L=k.rowWidth[S]);return E},w.prototype.getLongestRowIndex=function(k){for(var E=-1,L=Number.MIN_VALUE,S=0;S<k.rows.length;S++)k.rowWidth[S]>L&&(E=S,L=k.rowWidth[S]);return E},w.prototype.canAddHorizontal=function(k,E,L){var S=this.getShortestRowIndex(k);if(S<0)return!0;var C=k.rowWidth[S];if(C+k.horizontalPadding+E<=k.width)return!0;var M=0;k.rowHeight[S]<L&&S>0&&(M=L+k.verticalPadding-k.rowHeight[S]);var R;k.width-C>=E+k.horizontalPadding?R=(k.height+M)/(C+E+k.horizontalPadding):R=(k.height+M)/k.width,M=L+k.verticalPadding;var T;return k.width<E?T=(k.height+M)/E:T=(k.height+M)/k.width,T<1&&(T=1/T),R<1&&(R=1/R),R<T},w.prototype.shiftToLastRow=function(k){var E=this.getLongestRowIndex(k),L=k.rowWidth.length-1,S=k.rows[E],C=S[S.length-1],M=C.width+k.horizontalPadding;if(k.width-k.rowWidth[L]>M&&E!=L){S.splice(-1,1),k.rows[L].push(C),k.rowWidth[E]=k.rowWidth[E]-M,k.rowWidth[L]=k.rowWidth[L]+M,k.width=k.rowWidth[instance.getLongestRowIndex(k)];for(var R=Number.MIN_VALUE,T=0;T<S.length;T++)S[T].height>R&&(R=S[T].height);E>0&&(R+=k.verticalPadding);var I=k.rowHeight[E]+k.rowHeight[L];k.rowHeight[E]=R,k.rowHeight[L]<C.height+k.verticalPadding&&(k.rowHeight[L]=C.height+k.verticalPadding);var A=k.rowHeight[E]+k.rowHeight[L];k.height+=A-I,this.shiftToLastRow(k)}},w.prototype.tilingPreLayout=function(){u.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},w.prototype.tilingPostLayout=function(){u.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},w.prototype.reduceTrees=function(){for(var k=[],E=!0,L;E;){var S=this.graphManager.getAllNodes(),C=[];E=!1;for(var M=0;M<S.length;M++)L=S[M],L.getEdges().length==1&&!L.getEdges()[0].isInterGraph&&L.getChild()==null&&(C.push([L,L.getEdges()[0],L.getOwner()]),E=!0);if(E==!0){for(var R=[],T=0;T<C.length;T++)C[T][0].getEdges().length==1&&(R.push(C[T]),C[T][0].getOwner().remove(C[T][0]));k.push(R),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=k},w.prototype.growTree=function(k){for(var E=k.length,L=k[E-1],S,C=0;C<L.length;C++)S=L[C],this.findPlaceforPrunedNode(S),S[2].add(S[0]),S[2].add(S[1],S[1].source,S[1].target);k.splice(k.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},w.prototype.findPlaceforPrunedNode=function(k){var E,L,S=k[0];S==k[1].source?L=k[1].target:L=k[1].source;var C=L.startX,M=L.finishX,R=L.startY,T=L.finishY,I=0,A=0,D=0,N=0,O=[I,D,A,N];if(R>0)for(var B=C;B<=M;B++)O[0]+=this.grid[B][R-1].length+this.grid[B][R].length-1;if(M<this.grid.length-1)for(var B=R;B<=T;B++)O[1]+=this.grid[M+1][B].length+this.grid[M][B].length-1;if(T<this.grid[0].length-1)for(var B=C;B<=M;B++)O[2]+=this.grid[B][T+1].length+this.grid[B][T].length-1;if(C>0)for(var B=R;B<=T;B++)O[3]+=this.grid[C-1][B].length+this.grid[C][B].length-1;for(var P=m.MAX_VALUE,$,z,H=0;H<O.length;H++)O[H]<P?(P=O[H],$=1,z=H):O[H]==P&&$++;if($==3&&P==0)O[0]==0&&O[1]==0&&O[2]==0?E=1:O[0]==0&&O[1]==0&&O[3]==0?E=0:O[0]==0&&O[2]==0&&O[3]==0?E=3:O[1]==0&&O[2]==0&&O[3]==0&&(E=2);else if($==2&&P==0){var Z=Math.floor(Math.random()*2);O[0]==0&&O[1]==0?Z==0?E=0:E=1:O[0]==0&&O[2]==0?Z==0?E=0:E=2:O[0]==0&&O[3]==0?Z==0?E=0:E=3:O[1]==0&&O[2]==0?Z==0?E=1:E=2:O[1]==0&&O[3]==0?Z==0?E=1:E=3:Z==0?E=2:E=3}else if($==4&&P==0){var Z=Math.floor(Math.random()*4);E=Z}else E=z;E==0?S.setCenter(L.getCenterX(),L.getCenterY()-L.getHeight()/2-h.DEFAULT_EDGE_LENGTH-S.getHeight()/2):E==1?S.setCenter(L.getCenterX()+L.getWidth()/2+h.DEFAULT_EDGE_LENGTH+S.getWidth()/2,L.getCenterY()):E==2?S.setCenter(L.getCenterX(),L.getCenterY()+L.getHeight()/2+h.DEFAULT_EDGE_LENGTH+S.getHeight()/2):S.setCenter(L.getCenterX()-L.getWidth()/2-h.DEFAULT_EDGE_LENGTH-S.getWidth()/2,L.getCenterY())},e.exports=w},function(e,r,n){"use strict";var i={};i.layoutBase=n(0),i.CoSEConstants=n(1),i.CoSEEdge=n(2),i.CoSEGraph=n(3),i.CoSEGraphManager=n(4),i.CoSELayout=n(6),i.CoSENode=n(5),e.exports=i}])})});var gpe=yi((Nx,JD)=>{(function(e,r){typeof Nx=="object"&&typeof JD=="object"?JD.exports=r(QD()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof Nx=="object"?Nx.cytoscapeCoseBilkent=r(QD()):e.cytoscapeCoseBilkent=r(e.coseBase)})(Nx,function(t){return function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=1)}([function(e,r){e.exports=t},function(e,r,n){"use strict";var i=n(0).layoutBase.LayoutConstants,a=n(0).layoutBase.FDLayoutConstants,s=n(0).CoSEConstants,o=n(0).CoSELayout,l=n(0).CoSENode,u=n(0).layoutBase.PointD,h=n(0).layoutBase.DimensionD,f={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(x,y){var b={};for(var w in x)b[w]=x[w];for(var w in y)b[w]=y[w];return b}function p(x){this.options=d(f,x),g(this.options)}var g=function(y){y.nodeRepulsion!=null&&(s.DEFAULT_REPULSION_STRENGTH=a.DEFAULT_REPULSION_STRENGTH=y.nodeRepulsion),y.idealEdgeLength!=null&&(s.DEFAULT_EDGE_LENGTH=a.DEFAULT_EDGE_LENGTH=y.idealEdgeLength),y.edgeElasticity!=null&&(s.DEFAULT_SPRING_STRENGTH=a.DEFAULT_SPRING_STRENGTH=y.edgeElasticity),y.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=y.nestingFactor),y.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=a.DEFAULT_GRAVITY_STRENGTH=y.gravity),y.numIter!=null&&(s.MAX_ITERATIONS=a.MAX_ITERATIONS=y.numIter),y.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=a.DEFAULT_GRAVITY_RANGE_FACTOR=y.gravityRange),y.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=y.gravityCompound),y.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=y.gravityRangeCompound),y.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.DEFAULT_COOLING_FACTOR_INCREMENTAL=y.initialEnergyOnIncremental),y.quality=="draft"?i.QUALITY=0:y.quality=="proof"?i.QUALITY=2:i.QUALITY=1,s.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=y.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!y.randomize,s.ANIMATE=a.ANIMATE=i.ANIMATE=y.animate,s.TILE=y.tile,s.TILING_PADDING_VERTICAL=typeof y.tilingPaddingVertical=="function"?y.tilingPaddingVertical.call():y.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof y.tilingPaddingHorizontal=="function"?y.tilingPaddingHorizontal.call():y.tilingPaddingHorizontal};p.prototype.run=function(){var x,y,b=this.options,w=this.idToLNode={},_=this.layout=new o,k=this;k.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var E=_.newGraphManager();this.gm=E;var L=this.options.eles.nodes(),S=this.options.eles.edges();this.root=E.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(L),_);for(var C=0;C<S.length;C++){var M=S[C],R=this.idToLNode[M.data("source")],T=this.idToLNode[M.data("target")];if(R!==T&&R.getEdgesBetween(T).length==0){var I=E.add(_.newEdge(),R,T);I.id=M.id()}}var A=function(O,B){typeof O=="number"&&(O=B);var P=O.data("id"),$=k.idToLNode[P];return{x:$.getRect().getCenterX(),y:$.getRect().getCenterY()}},D=function N(){for(var O=function(){b.fit&&b.cy.fit(b.eles,b.padding),x||(x=!0,k.cy.one("layoutready",b.ready),k.cy.trigger({type:"layoutready",layout:k}))},B=k.options.refresh,P,$=0;$<B&&!P;$++)P=k.stopped||k.layout.tick();if(P){_.checkLayoutSuccess()&&!_.isSubLayout&&_.doPostLayout(),_.tilingPostLayout&&_.tilingPostLayout(),_.isLayoutFinished=!0,k.options.eles.nodes().positions(A),O(),k.cy.one("layoutstop",k.options.stop),k.cy.trigger({type:"layoutstop",layout:k}),y&&cancelAnimationFrame(y),x=!1;return}var z=k.layout.getPositionsData();b.eles.nodes().positions(function(H,Z){if(typeof H=="number"&&(H=Z),!H.isParent()){for(var X=H.id(),ie=z[X],K=H;ie==null&&(ie=z[K.data("parent")]||z["DummyCompound_"+K.data("parent")],z[X]=ie,K=K.parent()[0],K!=null););return ie!=null?{x:ie.x,y:ie.y}:{x:H.position("x"),y:H.position("y")}}}),O(),y=requestAnimationFrame(N)};return _.addListener("layoutstarted",function(){k.options.animate==="during"&&(y=requestAnimationFrame(D))}),_.runLayout(),this.options.animate!=="during"&&(k.options.eles.nodes().not(":parent").layoutPositions(k,k.options,A),x=!1),this},p.prototype.getTopMostNodes=function(x){for(var y={},b=0;b<x.length;b++)y[x[b].id()]=!0;var w=x.filter(function(_,k){typeof _=="number"&&(_=k);for(var E=_.parent()[0];E!=null;){if(y[E.id()])return!1;E=E.parent()[0]}return!0});return w},p.prototype.processChildrenList=function(x,y,b){for(var w=y.length,_=0;_<w;_++){var k=y[_],E=k.children(),L,S=k.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(k.outerWidth()!=null&&k.outerHeight()!=null?L=x.add(new l(b.graphManager,new u(k.position("x")-S.w/2,k.position("y")-S.h/2),new h(parseFloat(S.w),parseFloat(S.h)))):L=x.add(new l(this.graphManager)),L.id=k.data("id"),L.paddingLeft=parseInt(k.css("padding")),L.paddingTop=parseInt(k.css("padding")),L.paddingRight=parseInt(k.css("padding")),L.paddingBottom=parseInt(k.css("padding")),this.options.nodeDimensionsIncludeLabels&&k.isParent()){var C=k.boundingBox({includeLabels:!0,includeNodes:!1}).w,M=k.boundingBox({includeLabels:!0,includeNodes:!1}).h,R=k.css("text-halign");L.labelWidth=C,L.labelHeight=M,L.labelPos=R}if(this.idToLNode[k.data("id")]=L,isNaN(L.rect.x)&&(L.rect.x=0),isNaN(L.rect.y)&&(L.rect.y=0),E!=null&&E.length>0){var T;T=b.getGraphManager().add(b.newGraph(),L),this.processChildrenList(T,E,b)}}},p.prototype.stop=function(){return this.stopped=!0,this};var m=function(y){y("layout","cose-bilkent",p)};typeof cytoscape<"u"&&m(cytoscape),e.exports=m}])})});var kpe={};mr(kpe,{diagram:()=>Nje});function ype(t,e,r,n,i){return t.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("transform","translate("+(i.width-e)/2+", "+r+")")}async function rO(t,e,r,n,i){await Eje(t,e,r,n,i),r.children&&await Promise.all(r.children.map((a,s)=>rO(t,e,a,n<0?s:n,i)))}function xpe(t,e){e.edges().map((r,n)=>{let i=r.data();if(r[0]._private.bodyBounds){let a=r[0]._private.rscratch;re.trace("Edge: ",n,i),t.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}})}function nO(t,e,r,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(i=>{nO(i,e,r,n+1),e.add({group:"edges",data:{id:`${t.id}_${i.id}`,source:t.id,target:i.id,depth:n,section:i.section}})})}function bpe(t,e){return new Promise(r=>{let n=Ge("body").append("div").attr("id","cy").attr("style","display:none"),i=qo({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),nO(t,i,e,0),i.nodes().forEach(function(a){a.layoutDimensions=()=>{let s=a.data();return{w:s.width,h:s.height}}}),i.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),i.ready(a=>{re.info("Ready",a),r(i)})})}function wpe(t,e){e.nodes().map((r,n)=>{let i=r.data();i.x=r.position().x,i.y=r.position().y,Sje(t,i);let a=t.getElementById(i.nodeId);re.info("Id:",n,"Position: (",r.position().x,", ",r.position().y,")",i),a.attr("transform",`translate(${r.position().x-i.width/2}, ${r.position().y-i.height/2})`),a.attr("attr",`apa-${n})`)})}var vpe,eO,nje,Ml,mpe,tO,ije,aje,sje,oje,Oi,lje,cje,uje,hje,fje,dje,pje,gje,mje,vje,yje,xje,bje,wje,kje,Tje,Eje,Sje,Cje,Aje,_je,Lje,Rje,Nje,Tpe=F(()=>{za();xn();ku();or();XD();vpe=ga(gpe(),1);lr();so();eO=function(){var t=v(function(_,k,E,L){for(E=E||{},L=_.length;L--;E[_[L]]=k);return E},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],g=[1,33],m=[1,34],x=[1,6,7,11,13,15,16,19,22],y={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:v(function(k,E,L,S,C,M,R){var T=M.length-1;switch(C){case 6:case 7:return S;case 8:S.getLogger().trace("Stop NL ");break;case 9:S.getLogger().trace("Stop EOF ");break;case 11:S.getLogger().trace("Stop NL2 ");break;case 12:S.getLogger().trace("Stop EOF2 ");break;case 15:S.getLogger().info("Node: ",M[T].id),S.addNode(M[T-1].length,M[T].id,M[T].descr,M[T].type);break;case 16:S.getLogger().trace("Icon: ",M[T]),S.decorateNode({icon:M[T]});break;case 17:case 21:S.decorateNode({class:M[T]});break;case 18:S.getLogger().trace("SPACELIST");break;case 19:S.getLogger().trace("Node: ",M[T].id),S.addNode(0,M[T].id,M[T].descr,M[T].type);break;case 20:S.decorateNode({icon:M[T]});break;case 25:S.getLogger().trace("node found ..",M[T-2]),this.$={id:M[T-1],descr:M[T-1],type:S.getType(M[T-2],M[T])};break;case 26:this.$={id:M[T],descr:M[T],type:S.nodeType.DEFAULT};break;case 27:S.getLogger().trace("node found ..",M[T-3]),this.$={id:M[T-3],descr:M[T-1],type:S.getType(M[T-2],M[T])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:u,7:h,10:23,11:f},t(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:o}),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,23]),t(d,[2,24]),t(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:h,10:32,11:f},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},t(p,[2,14],{7:g,11:m}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(d,[2,15]),t(d,[2,16]),t(d,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:g,11:m}),t(x,[2,11]),t(x,[2,12]),{21:[1,37]},t(d,[2,25]),t(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:v(function(k,E){if(E.recoverable)this.trace(k);else{var L=new Error(k);throw L.hash=E,L}},"parseError"),parse:v(function(k){var E=this,L=[0],S=[],C=[null],M=[],R=this.table,T="",I=0,A=0,D=0,N=2,O=1,B=M.slice.call(arguments,1),P=Object.create(this.lexer),$={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&($.yy[z]=this.yy[z]);P.setInput(k,$.yy),$.yy.lexer=P,$.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var H=P.yylloc;M.push(H);var Z=P.options&&P.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(be){L.length=L.length-2*be,C.length=C.length-be,M.length=M.length-be}v(X,"popStack");function ie(){var be;return be=S.pop()||P.lex()||O,typeof be!="number"&&(be instanceof Array&&(S=be,be=S.pop()),be=E.symbols_[be]||be),be}v(ie,"lex");for(var K,ee,J,W,Y,Q,se={},ue,ce,te,Le;;){if(J=L[L.length-1],this.defaultActions[J]?W=this.defaultActions[J]:((K===null||typeof K>"u")&&(K=ie()),W=R[J]&&R[J][K]),typeof W>"u"||!W.length||!W[0]){var oe="";Le=[];for(ue in R[J])this.terminals_[ue]&&ue>N&&Le.push("\'"+this.terminals_[ue]+"\'");P.showPosition?oe="Parse error on line "+(I+1)+`:\n`+P.showPosition()+`\nExpecting `+Le.join(", ")+", got \'"+(this.terminals_[K]||K)+"\'":oe="Parse error on line "+(I+1)+": Unexpected "+(K==O?"end of input":"\'"+(this.terminals_[K]||K)+"\'"),this.parseError(oe,{text:P.match,token:this.terminals_[K]||K,line:P.yylineno,loc:H,expected:Le})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(W[0]){case 1:L.push(K),C.push(P.yytext),M.push(P.yylloc),L.push(W[1]),K=null,ee?(K=ee,ee=null):(A=P.yyleng,T=P.yytext,I=P.yylineno,H=P.yylloc,D>0&&D--);break;case 2:if(ce=this.productions_[W[1]][1],se.$=C[C.length-ce],se._$={first_line:M[M.length-(ce||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(ce||1)].first_column,last_column:M[M.length-1].last_column},Z&&(se._$.range=[M[M.length-(ce||1)].range[0],M[M.length-1].range[1]]),Q=this.performAction.apply(se,[T,A,I,$.yy,W[1],C,M].concat(B)),typeof Q<"u")return Q;ce&&(L=L.slice(0,-1*ce*2),C=C.slice(0,-1*ce),M=M.slice(0,-1*ce)),L.push(this.productions_[W[1]][0]),C.push(se.$),M.push(se._$),te=R[L[L.length-2]][L[L.length-1]],L.push(te);break;case 3:return!0}}return!0},"parse")},b=function(){var _={EOF:1,parseError:v(function(E,L){if(this.yy.parser)this.yy.parser.parseError(E,L);else throw new Error(E)},"parseError"),setInput:v(function(k,E){return this.yy=E||this.yy||{},this._input=k,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var k=this._input[0];this.yytext+=k,this.yyleng++,this.offset++,this.match+=k,this.matched+=k;var E=k.match(/(?:\\r\\n?|\\n).*/g);return E?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),k},"input"),unput:v(function(k){var E=k.length,L=k.split(/(?:\\r\\n?|\\n)/g);this._input=k+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-E),this.offset-=E;var S=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),L.length-1&&(this.yylineno-=L.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:L?(L.length===S.length?this.yylloc.first_column:0)+S[S.length-L.length].length-L[0].length:this.yylloc.first_column-E},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-E]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(k){this.unput(this.match.slice(k))},"less"),pastInput:v(function(){var k=this.matched.substr(0,this.matched.length-this.match.length);return(k.length>20?"...":"")+k.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var k=this.match;return k.length<20&&(k+=this._input.substr(0,20-k.length)),(k.substr(0,20)+(k.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var k=this.pastInput(),E=new Array(k.length+1).join("-");return k+this.upcomingInput()+`\n`+E+"^"},"showPosition"),test_match:v(function(k,E){var L,S,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),S=k[0].match(/(?:\\r\\n?|\\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+k[0].length},this.yytext+=k[0],this.match+=k[0],this.matches=k,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(k[0].length),this.matched+=k[0],L=this.performAction.call(this,this.yy,this,E,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),L)return L;if(this._backtrack){for(var M in C)this[M]=C[M];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var k,E,L,S;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),M=0;M<C.length;M++)if(L=this._input.match(this.rules[C[M]]),L&&(!E||L[0].length>E[0].length)){if(E=L,S=M,this.options.backtrack_lexer){if(k=this.test_match(L,C[M]),k!==!1)return k;if(this._backtrack){E=!1;continue}else return!1}else if(!this.options.flex)break}return E?(k=this.test_match(E,C[S]),k!==!1?k:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var E=this.next();return E||this.lex()},"lex"),begin:v(function(E){this.conditionStack.push(E)},"begin"),popState:v(function(){var E=this.conditionStack.length-1;return E>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(E){return E=this.conditionStack.length-1-Math.abs(E||0),E>=0?this.conditionStack[E]:"INITIAL"},"topState"),pushState:v(function(E){this.begin(E)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(E,L,S,C){var M=C;switch(S){case 0:return E.getLogger().trace("Found comment",L.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:E.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return E.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:E.getLogger().trace("end icon"),this.popState();break;case 10:return E.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return E.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return E.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return E.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:E.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return E.getLogger().trace("description:",L.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),E.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),E.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),E.getLogger().trace("node end ...",L.yytext),"NODE_DEND";break;case 30:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),E.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),E.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return E.getLogger().trace("Long description:",L.yytext),20;break;case 36:return E.getLogger().trace("Long description:",L.yytext),20;break}},"anonymous"),rules:[/^(?:\\s*%%.*)/i,/^(?:mindmap\\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\\n)/i,/^(?:::icon\\()/i,/^(?:[\\s]+[\\n])/i,/^(?:[\\n]+)/i,/^(?:[^\\)]+)/i,/^(?:\\))/i,/^(?:-\\))/i,/^(?:\\(-)/i,/^(?:\\)\\))/i,/^(?:\\))/i,/^(?:\\(\\()/i,/^(?:\\{\\{)/i,/^(?:\\()/i,/^(?:\\[)/i,/^(?:[\\s]+)/i,/^(?:[^\\(\\[\\n\\)\\{\\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\\)]\\))/i,/^(?:[\\)])/i,/^(?:[\\]])/i,/^(?:\\}\\})/i,/^(?:\\(-)/i,/^(?:-\\))/i,/^(?:\\(\\()/i,/^(?:\\()/i,/^(?:[^\\)\\]\\(\\}]+)/i,/^(?:.+(?!\\(\\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return _}();y.lexer=b;function w(){this.yy={}}return v(w,"Parser"),w.prototype=y,y.Parser=w,new w}();eO.parser=eO;nje=eO,Ml=[],mpe=0,tO={},ije=v(()=>{Ml=[],mpe=0,tO={}},"clear"),aje=v(function(t){for(let e=Ml.length-1;e>=0;e--)if(Ml[e].level<t)return Ml[e];return null},"getParent"),sje=v(()=>Ml.length>0?Ml[0]:null,"getMindmap"),oje=v((t,e,r,n)=>{re.info("addNode",t,e,r,n);let i=pe(),a=i.mindmap?.padding??sr.mindmap.padding;switch(n){case Oi.ROUNDED_RECT:case Oi.RECT:case Oi.HEXAGON:a*=2}let s={id:mpe++,nodeId:yr(e,i),level:t,descr:yr(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??sr.mindmap.maxNodeWidth,padding:a},o=aje(t);if(o)o.children.push(s),Ml.push(s);else if(Ml.length===0)Ml.push(s);else throw new Error(\'There can be only one root. No parent could be found for ("\'+s.descr+\'")\')},"addNode"),Oi={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},lje=v((t,e)=>{switch(re.debug("In get type",t,e),t){case"[":return Oi.RECT;case"(":return e===")"?Oi.ROUNDED_RECT:Oi.CLOUD;case"((":return Oi.CIRCLE;case")":return Oi.CLOUD;case"))":return Oi.BANG;case"{{":return Oi.HEXAGON;default:return Oi.DEFAULT}},"getType"),cje=v((t,e)=>{tO[t]=e},"setElementForId"),uje=v(t=>{if(!t)return;let e=pe(),r=Ml[Ml.length-1];t.icon&&(r.icon=yr(t.icon,e)),t.class&&(r.class=yr(t.class,e))},"decorateNode"),hje=v(t=>{switch(t){case Oi.DEFAULT:return"no-border";case Oi.RECT:return"rect";case Oi.ROUNDED_RECT:return"rounded-rect";case Oi.CIRCLE:return"circle";case Oi.CLOUD:return"cloud";case Oi.BANG:return"bang";case Oi.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),fje=v(()=>re,"getLogger"),dje=v(t=>tO[t],"getElementById"),pje={clear:ije,addNode:oje,getMindmap:sje,nodeType:Oi,getType:lje,setElementForId:cje,decorateNode:uje,type2Str:hje,getLogger:fje,getElementById:dje},gje=pje,mje=12,vje=v(function(t,e,r,n){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${-r.height+2*5} q0,-5 5,-5 h${r.width-2*5} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),yje=v(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),xje=v(function(t,e,r){let n=r.width,i=r.height,a=.15*n,s=.25*n,o=.35*n,l=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${n*.25},${-1*n*.1}\n a${o},${o} 1 0,1 ${n*.4},${-1*n*.1}\n a${s},${s} 1 0,1 ${n*.35},${1*n*.2}\n\n a${a},${a} 1 0,1 ${n*.15},${1*i*.35}\n a${l},${l} 1 0,1 ${-1*n*.15},${1*i*.65}\n\n a${s},${a} 1 0,1 ${-1*n*.25},${n*.15}\n a${o},${o} 1 0,1 ${-1*n*.5},0\n a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15}\n\n a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35}\n a${l},${l} 1 0,1 ${n*.1},${-1*i*.65}\n\n H0 V0 Z`)},"cloudBkg"),bje=v(function(t,e,r){let n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${n*.25},${-1*i*.1}\n a${a},${a} 1 0,0 ${n*.25},0\n a${a},${a} 1 0,0 ${n*.25},0\n a${a},${a} 1 0,0 ${n*.25},${1*i*.1}\n\n a${a},${a} 1 0,0 ${n*.15},${1*i*.33}\n a${a*.8},${a*.8} 1 0,0 0,${1*i*.34}\n a${a},${a} 1 0,0 ${-1*n*.15},${1*i*.33}\n\n a${a},${a} 1 0,0 ${-1*n*.25},${i*.15}\n a${a},${a} 1 0,0 ${-1*n*.25},0\n a${a},${a} 1 0,0 ${-1*n*.25},0\n a${a},${a} 1 0,0 ${-1*n*.25},${-1*i*.15}\n\n a${a},${a} 1 0,0 ${-1*n*.1},${-1*i*.33}\n a${a*.8},${a*.8} 1 0,0 0,${-1*i*.34}\n a${a},${a} 1 0,0 ${n*.1},${-1*i*.33}\n\n H0 V0 Z`)},"bangBkg"),wje=v(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg");v(ype,"insertPolygonShape");kje=v(function(t,e,r){let n=r.height,a=n/4,s=r.width-r.padding+2*a,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-n/2},{x:s-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}];ype(e,s,n,o,r)},"hexagonBkg"),Tje=v(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),Eje=v(async function(t,e,r,n,i){let a=i.htmlLabels,s=n%(mje-1),o=e.append("g");r.section=s;let l="section-"+s;s<0&&(l+=" section-root"),o.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+l);let u=o.append("g"),h=o.append("g"),f=r.descr.replace(/(<br\\/*>)/g,`\n`);await ea(h,f,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let d=h.node().getBBox(),[p]=To(i.fontSize);if(r.height=d.height+p*1.1*.5+r.padding,r.width=d.width+2*r.padding,r.icon)if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,o.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),h.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let g=r.height;r.height=Math.max(g,60);let m=Math.abs(r.height-g);o.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+m/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),h.attr("transform","translate("+(25+r.width/2)+", "+(m/2+r.padding/2)+")")}else if(a){let g=(r.width-d.width)/2,m=(r.height-d.height)/2;h.attr("transform","translate("+g+", "+m+")")}else{let g=r.width/2,m=r.padding/2;h.attr("transform","translate("+g+", "+m+")")}switch(r.type){case t.nodeType.DEFAULT:vje(t,u,r,s);break;case t.nodeType.ROUNDED_RECT:Tje(t,u,r,s);break;case t.nodeType.RECT:yje(t,u,r,s);break;case t.nodeType.CIRCLE:u.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),wje(t,u,r,s);break;case t.nodeType.CLOUD:xje(t,u,r,s);break;case t.nodeType.BANG:bje(t,u,r,s);break;case t.nodeType.HEXAGON:kje(t,u,r,s);break}return t.setElementForId(r.id,o),r.height},"drawNode"),Sje=v(function(t,e){let r=t.getElementById(e.id),n=e.x||0,i=e.y||0;r.attr("transform","translate("+n+","+i+")")},"positionNode");qo.use(vpe.default);v(rO,"drawNodes");v(xpe,"drawEdges");v(nO,"addNodes");v(bpe,"layoutMindmap");v(wpe,"positionNodes");Cje=v(async(t,e,r,n)=>{re.debug(`Rendering mindmap diagram\n`+t);let i=n.db,a=i.getMindmap();if(!a)return;let s=pe();s.htmlLabels=!1;let o=ka(e),l=o.append("g");l.attr("class","mindmap-edges");let u=o.append("g");u.attr("class","mindmap-nodes"),await rO(i,u,a,-1,s);let h=await bpe(a,s);xpe(l,h),wpe(i,h),Qo(void 0,o,s.mindmap?.padding??sr.mindmap.padding,s.mindmap?.useMaxWidth??sr.mindmap.useMaxWidth)},"draw"),Aje={draw:Cje},_je=v(t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],Xi(t["lineColor"+r])?t["lineColor"+r]=Et(t["lineColor"+r],20):t["lineColor"+r]=It(t["lineColor"+r],20);for(let r=0;r<t.THEME_COLOR_LIMIT;r++){let n=""+(17-3*r);e+=`\n .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {\n fill: ${t["cScale"+r]};\n }\n .section-${r-1} text {\n fill: ${t["cScaleLabel"+r]};\n }\n .node-icon-${r-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+r]};\n }\n .section-edge-${r-1}{\n stroke: ${t["cScale"+r]};\n }\n .edge-depth-${r-1}{\n stroke-width: ${n};\n }\n .section-${r-1} line {\n stroke: ${t["cScaleInv"+r]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e},"genSections"),Lje=v(t=>`\n .edge {\n stroke-width: 3;\n }\n ${_je(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`,"getStyles"),Rje=Lje,Nje={db:gje,renderer:Aje,parser:nje,styles:Rje}});var Spe={};mr(Spe,{diagram:()=>Kje});var iO,Ije,Yo,sO,aO,oO,Mje,Dje,Epe,Oje,Pje,Pi,Bje,Fje,zje,$je,Gje,Uje,Vje,Wje,Hje,qje,Yje,Xje,jje,Kje,Cpe=F(()=>{Wb();fl();el();fo();za();xn();ku();or();so();iO=function(){var t=v(function(L,S,C,M){for(C=C||{},M=L.length;M--;C[L[M]]=S);return C},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,31],g=[6,7,11,24],m=[1,6,13,16,17,20,23],x=[1,35],y=[1,36],b=[1,6,7,11,13,16,17,20,23],w=[1,38],_={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:v(function(S,C,M,R,T,I,A){var D=I.length-1;switch(T){case 6:case 7:return R;case 8:R.getLogger().trace("Stop NL ");break;case 9:R.getLogger().trace("Stop EOF ");break;case 11:R.getLogger().trace("Stop NL2 ");break;case 12:R.getLogger().trace("Stop EOF2 ");break;case 15:R.getLogger().info("Node: ",I[D-1].id),R.addNode(I[D-2].length,I[D-1].id,I[D-1].descr,I[D-1].type,I[D]);break;case 16:R.getLogger().info("Node: ",I[D].id),R.addNode(I[D-1].length,I[D].id,I[D].descr,I[D].type);break;case 17:R.getLogger().trace("Icon: ",I[D]),R.decorateNode({icon:I[D]});break;case 18:case 23:R.decorateNode({class:I[D]});break;case 19:R.getLogger().trace("SPACELIST");break;case 20:R.getLogger().trace("Node: ",I[D-1].id),R.addNode(0,I[D-1].id,I[D-1].descr,I[D-1].type,I[D]);break;case 21:R.getLogger().trace("Node: ",I[D].id),R.addNode(0,I[D].id,I[D].descr,I[D].type);break;case 22:R.decorateNode({icon:I[D]});break;case 27:R.getLogger().trace("node found ..",I[D-2]),this.$={id:I[D-1],descr:I[D-1],type:R.getType(I[D-2],I[D])};break;case 28:this.$={id:I[D],descr:I[D],type:0};break;case 29:R.getLogger().trace("node found ..",I[D-3]),this.$={id:I[D-3],descr:I[D-1],type:R.getType(I[D-2],I[D])};break;case 30:this.$=I[D-1]+I[D];break;case 31:this.$=I[D];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:r,9:22,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:u,7:h,10:23,11:f},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(g,[2,25]),t(g,[2,26]),t(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:h,10:34,11:f},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(m,[2,14],{7:x,11:y}),t(b,[2,8]),t(b,[2,9]),t(b,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:w}),t(g,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:x,11:y}),t(b,[2,11]),t(b,[2,12]),t(d,[2,15],{24:w}),t(g,[2,30]),{22:[1,41]},t(g,[2,27]),t(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:v(function(S,C){if(C.recoverable)this.trace(S);else{var M=new Error(S);throw M.hash=C,M}},"parseError"),parse:v(function(S){var C=this,M=[0],R=[],T=[null],I=[],A=this.table,D="",N=0,O=0,B=0,P=2,$=1,z=I.slice.call(arguments,1),H=Object.create(this.lexer),Z={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(Z.yy[X]=this.yy[X]);H.setInput(S,Z.yy),Z.yy.lexer=H,Z.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var ie=H.yylloc;I.push(ie);var K=H.options&&H.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ee(Ve){M.length=M.length-2*Ve,T.length=T.length-Ve,I.length=I.length-Ve}v(ee,"popStack");function J(){var Ve;return Ve=R.pop()||H.lex()||$,typeof Ve!="number"&&(Ve instanceof Array&&(R=Ve,Ve=R.pop()),Ve=C.symbols_[Ve]||Ve),Ve}v(J,"lex");for(var W,Y,Q,se,ue,ce,te={},Le,oe,be,Fe;;){if(Q=M[M.length-1],this.defaultActions[Q]?se=this.defaultActions[Q]:((W===null||typeof W>"u")&&(W=J()),se=A[Q]&&A[Q][W]),typeof se>"u"||!se.length||!se[0]){var Be="";Fe=[];for(Le in A[Q])this.terminals_[Le]&&Le>P&&Fe.push("\'"+this.terminals_[Le]+"\'");H.showPosition?Be="Parse error on line "+(N+1)+`:\n`+H.showPosition()+`\nExpecting `+Fe.join(", ")+", got \'"+(this.terminals_[W]||W)+"\'":Be="Parse error on line "+(N+1)+": Unexpected "+(W==$?"end of input":"\'"+(this.terminals_[W]||W)+"\'"),this.parseError(Be,{text:H.match,token:this.terminals_[W]||W,line:H.yylineno,loc:ie,expected:Fe})}if(se[0]instanceof Array&&se.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+W);switch(se[0]){case 1:M.push(W),T.push(H.yytext),I.push(H.yylloc),M.push(se[1]),W=null,Y?(W=Y,Y=null):(O=H.yyleng,D=H.yytext,N=H.yylineno,ie=H.yylloc,B>0&&B--);break;case 2:if(oe=this.productions_[se[1]][1],te.$=T[T.length-oe],te._$={first_line:I[I.length-(oe||1)].first_line,last_line:I[I.length-1].last_line,first_column:I[I.length-(oe||1)].first_column,last_column:I[I.length-1].last_column},K&&(te._$.range=[I[I.length-(oe||1)].range[0],I[I.length-1].range[1]]),ce=this.performAction.apply(te,[D,O,N,Z.yy,se[1],T,I].concat(z)),typeof ce<"u")return ce;oe&&(M=M.slice(0,-1*oe*2),T=T.slice(0,-1*oe),I=I.slice(0,-1*oe)),M.push(this.productions_[se[1]][0]),T.push(te.$),I.push(te._$),be=A[M[M.length-2]][M[M.length-1]],M.push(be);break;case 3:return!0}}return!0},"parse")},k=function(){var L={EOF:1,parseError:v(function(C,M){if(this.yy.parser)this.yy.parser.parseError(C,M);else throw new Error(C)},"parseError"),setInput:v(function(S,C){return this.yy=C||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var C=S.match(/(?:\\r\\n?|\\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},"input"),unput:v(function(S){var C=S.length,M=S.split(/(?:\\r\\n?|\\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var R=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),M.length-1&&(this.yylineno-=M.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:M?(M.length===R.length?this.yylloc.first_column:0)+R[R.length-M.length].length-M[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(S){this.unput(this.match.slice(S))},"less"),pastInput:v(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var S=this.pastInput(),C=new Array(S.length+1).join("-");return S+this.upcomingInput()+`\n`+C+"^"},"showPosition"),test_match:v(function(S,C){var M,R,T;if(this.options.backtrack_lexer&&(T={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(T.yylloc.range=this.yylloc.range.slice(0))),R=S[0].match(/(?:\\r\\n?|\\n).*/g),R&&(this.yylineno+=R.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:R?R[R.length-1].length-R[R.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],M=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var I in T)this[I]=T[I];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,C,M,R;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),I=0;I<T.length;I++)if(M=this._input.match(this.rules[T[I]]),M&&(!C||M[0].length>C[0].length)){if(C=M,R=I,this.options.backtrack_lexer){if(S=this.test_match(M,T[I]),S!==!1)return S;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(S=this.test_match(C,T[R]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var C=this.next();return C||this.lex()},"lex"),begin:v(function(C){this.conditionStack.push(C)},"begin"),popState:v(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:v(function(C){this.begin(C)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(C,M,R,T){var I=T;switch(R){case 0:return this.pushState("shapeData"),M.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let A=/\\n\\s*/g;return M.yytext=M.yytext.replace(A,"<br/>"),24;break;case 4:return 24;case 5:this.popState();break;case 6:return C.getLogger().trace("Found comment",M.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:C.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return C.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:C.getLogger().trace("end icon"),this.popState();break;case 16:return C.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return C.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return C.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return C.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:C.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return C.getLogger().trace("description:",M.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),C.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),C.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),C.getLogger().trace("node end ...",M.yytext),"NODE_DEND";break;case 36:return this.popState(),C.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),C.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),C.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),C.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),C.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return C.getLogger().trace("Long description:",M.yytext),21;break;case 42:return C.getLogger().trace("Long description:",M.yytext),21;break}},"anonymous"),rules:[/^(?:@\\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\\})/i,/^(?:\\s*%%.*)/i,/^(?:kanban\\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\\n)/i,/^(?:::icon\\()/i,/^(?:[\\s]+[\\n])/i,/^(?:[\\n]+)/i,/^(?:[^\\)]+)/i,/^(?:\\))/i,/^(?:-\\))/i,/^(?:\\(-)/i,/^(?:\\)\\))/i,/^(?:\\))/i,/^(?:\\(\\()/i,/^(?:\\{\\{)/i,/^(?:\\()/i,/^(?:\\[)/i,/^(?:[\\s]+)/i,/^(?:[^\\(\\[\\n\\)\\{\\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\\)]\\))/i,/^(?:[\\)])/i,/^(?:[\\]])/i,/^(?:\\}\\})/i,/^(?:\\(-)/i,/^(?:-\\))/i,/^(?:\\(\\()/i,/^(?:\\()/i,/^(?:[^\\)\\]\\(\\}]+)/i,/^(?:.+(?!\\(\\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return L}();_.lexer=k;function E(){this.yy={}}return v(E,"Parser"),E.prototype=_,_.Parser=E,new E}();iO.parser=iO;Ije=iO,Yo=[],sO=[],aO=0,oO={},Mje=v(()=>{Yo=[],sO=[],aO=0,oO={}},"clear"),Dje=v(t=>{if(Yo.length===0)return null;let e=Yo[0].level,r=null;for(let n=Yo.length-1;n>=0;n--)if(Yo[n].level===e&&!r&&(r=Yo[n]),Yo[n].level<e)throw new Error(\'Items without section detected, found section ("\'+Yo[n].label+\'")\');return t===r?.level?null:r},"getSection"),Epe=v(function(){return sO},"getSections"),Oje=v(function(){let t=[],e=[],r=Epe(),n=pe();for(let i of r){let a={id:i.id,label:yr(i.label??"",n),isGroup:!0,ticket:i.ticket,shape:"kanbanSection",level:i.level,look:n.look};e.push(a);let s=Yo.filter(o=>o.parentId===i.id);for(let o of s){let l={id:o.id,parentId:i.id,label:yr(o.label??"",n),isGroup:!1,ticket:o?.ticket,priority:o?.priority,assigned:o?.assigned,icon:o?.icon,shape:"kanbanItem",level:o.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(l)}}return{nodes:e,edges:t,other:{},config:pe()}},"getData"),Pje=v((t,e,r,n,i)=>{let a=pe(),s=a.mindmap?.padding??sr.mindmap.padding;switch(n){case Pi.ROUNDED_RECT:case Pi.RECT:case Pi.HEXAGON:s*=2}let o={id:yr(e,a)||"kbn"+aO++,level:t,label:yr(r,a),width:a.mindmap?.maxNodeWidth??sr.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(i!==void 0){let u;i.includes(`\n`)?u=i+`\n`:u=`{\n`+i+`\n}`;let h=Y0(u,{schema:q0});if(h.shape&&(h.shape!==h.shape.toLowerCase()||h.shape.includes("_")))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);h?.shape&&h.shape==="kanbanItem"&&(o.shape=h?.shape),h?.label&&(o.label=h?.label),h?.icon&&(o.icon=h?.icon.toString()),h?.assigned&&(o.assigned=h?.assigned.toString()),h?.ticket&&(o.ticket=h?.ticket.toString()),h?.priority&&(o.priority=h?.priority)}let l=Dje(t);l?o.parentId=l.id||"kbn"+aO++:sO.push(o),Yo.push(o)},"addNode"),Pi={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Bje=v((t,e)=>{switch(re.debug("In get type",t,e),t){case"[":return Pi.RECT;case"(":return e===")"?Pi.ROUNDED_RECT:Pi.CLOUD;case"((":return Pi.CIRCLE;case")":return Pi.CLOUD;case"))":return Pi.BANG;case"{{":return Pi.HEXAGON;default:return Pi.DEFAULT}},"getType"),Fje=v((t,e)=>{oO[t]=e},"setElementForId"),zje=v(t=>{if(!t)return;let e=pe(),r=Yo[Yo.length-1];t.icon&&(r.icon=yr(t.icon,e)),t.class&&(r.cssClasses=yr(t.class,e))},"decorateNode"),$je=v(t=>{switch(t){case Pi.DEFAULT:return"no-border";case Pi.RECT:return"rect";case Pi.ROUNDED_RECT:return"rounded-rect";case Pi.CIRCLE:return"circle";case Pi.CLOUD:return"cloud";case Pi.BANG:return"bang";case Pi.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Gje=v(()=>re,"getLogger"),Uje=v(t=>oO[t],"getElementById"),Vje={clear:Mje,addNode:Pje,getSections:Epe,getData:Oje,nodeType:Pi,getType:Bje,setElementForId:Fje,decorateNode:zje,type2Str:$je,getLogger:Gje,getElementById:Uje},Wje=Vje,Hje=v(async(t,e,r,n)=>{re.debug(`Rendering kanban diagram\n`+t);let a=n.db.getData(),s=pe();s.htmlLabels=!1;let o=ka(e),l=o.append("g");l.attr("class","sections");let u=o.append("g");u.attr("class","items");let h=a.nodes.filter(x=>x.isGroup),f=0,d=10,p=[],g=25;for(let x of h){let y=s?.kanban?.sectionWidth||200;f=f+1,x.x=y*f+(f-1)*d/2,x.width=y,x.y=0,x.height=y*3,x.rx=5,x.ry=5,x.cssClasses=x.cssClasses+" section-"+f;let b=await Up(l,x);g=Math.max(g,b?.labelBBox?.height),p.push(b)}let m=0;for(let x of h){let y=p[m];m=m+1;let b=s?.kanban?.sectionWidth||200,w=-b*3/2+g,_=w,k=a.nodes.filter(S=>S.parentId===x.id);for(let S of k){if(S.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");S.x=x.x,S.width=b-1.5*d;let M=(await hd(u,S,{config:s})).node().getBBox();S.y=_+M.height/2,await Fv(S),_=S.y+M.height/2+d/2}let E=y.cluster.select("rect"),L=Math.max(_-w+3*d,50)+(g-25);E.attr("height",L)}Qo(void 0,o,s.mindmap?.padding??sr.kanban.padding,s.mindmap?.useMaxWidth??sr.kanban.useMaxWidth)},"draw"),qje={draw:Hje},Yje=v(t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],Xi(t["lineColor"+n])?t["lineColor"+n]=Et(t["lineColor"+n],20):t["lineColor"+n]=It(t["lineColor"+n],20);let r=v((n,i)=>t.darkMode?It(n,i):Et(n,i),"adjuster");for(let n=0;n<t.THEME_COLOR_LIMIT;n++){let i=""+(17-3*n);e+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {\n fill: ${r(t["cScale"+n],10)};\n stroke: ${r(t["cScale"+n],10)};\n\n }\n .section-${n-1} text {\n fill: ${t["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${t["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${i};\n }\n .section-${n-1} line {\n stroke: ${t["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.background};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${t.background};\n stroke: ${t.nodeBorder};\n text-decoration: underline;\n }\n `}return e},"genSections"),Xje=v(t=>`\n .edge {\n stroke-width: 3;\n }\n ${Yje(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`,"getStyles"),jje=Xje,Kje={db:Wje,renderer:qje,parser:Ije,styles:jje}});function Ix(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}var Ape=F(()=>{});function jm(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var _pe=F(()=>{});function Km(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i)}return r}var Lpe=F(()=>{});var lO=F(()=>{Ape();_pe();Lpe()});function Zje(t){return t.target.depth}function cO(t){return t.depth}function uO(t,e){return e-1-t.height}function Mx(t,e){return t.sourceLinks.length?t.depth:e-1}function hO(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?jm(t.sourceLinks,Zje)-1:0}var fO=F(()=>{lO()});function Zm(t){return function(){return t}}var Rpe=F(()=>{});function Npe(t,e){return J6(t.source,e.source)||t.index-e.index}function Ipe(t,e){return J6(t.target,e.target)||t.index-e.index}function J6(t,e){return t.y0-e.y0}function dO(t){return t.value}function Qje(t){return t.index}function Jje(t){return t.nodes}function eKe(t){return t.links}function Mpe(t,e){let r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function Dpe({nodes:t}){for(let e of t){let r=e.y0,n=r;for(let i of e.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of e.targetLinks)i.y1=n+i.width/2,n+=i.width}}function eE(){let t=0,e=0,r=1,n=1,i=24,a=8,s,o=Qje,l=Mx,u,h,f=Jje,d=eKe,p=6;function g(){let D={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return m(D),x(D),y(D),b(D),k(D),Dpe(D),D}g.update=function(D){return Dpe(D),D},g.nodeId=function(D){return arguments.length?(o=typeof D=="function"?D:Zm(D),g):o},g.nodeAlign=function(D){return arguments.length?(l=typeof D=="function"?D:Zm(D),g):l},g.nodeSort=function(D){return arguments.length?(u=D,g):u},g.nodeWidth=function(D){return arguments.length?(i=+D,g):i},g.nodePadding=function(D){return arguments.length?(a=s=+D,g):a},g.nodes=function(D){return arguments.length?(f=typeof D=="function"?D:Zm(D),g):f},g.links=function(D){return arguments.length?(d=typeof D=="function"?D:Zm(D),g):d},g.linkSort=function(D){return arguments.length?(h=D,g):h},g.size=function(D){return arguments.length?(t=e=0,r=+D[0],n=+D[1],g):[r-t,n-e]},g.extent=function(D){return arguments.length?(t=+D[0][0],r=+D[1][0],e=+D[0][1],n=+D[1][1],g):[[t,e],[r,n]]},g.iterations=function(D){return arguments.length?(p=+D,g):p};function m({nodes:D,links:N}){for(let[B,P]of D.entries())P.index=B,P.sourceLinks=[],P.targetLinks=[];let O=new Map(D.map((B,P)=>[o(B,P,D),B]));for(let[B,P]of N.entries()){P.index=B;let{source:$,target:z}=P;typeof $!="object"&&($=P.source=Mpe(O,$)),typeof z!="object"&&(z=P.target=Mpe(O,z)),$.sourceLinks.push(P),z.targetLinks.push(P)}if(h!=null)for(let{sourceLinks:B,targetLinks:P}of D)B.sort(h),P.sort(h)}function x({nodes:D}){for(let N of D)N.value=N.fixedValue===void 0?Math.max(Km(N.sourceLinks,dO),Km(N.targetLinks,dO)):N.fixedValue}function y({nodes:D}){let N=D.length,O=new Set(D),B=new Set,P=0;for(;O.size;){for(let $ of O){$.depth=P;for(let{target:z}of $.sourceLinks)B.add(z)}if(++P>N)throw new Error("circular link");O=B,B=new Set}}function b({nodes:D}){let N=D.length,O=new Set(D),B=new Set,P=0;for(;O.size;){for(let $ of O){$.height=P;for(let{source:z}of $.targetLinks)B.add(z)}if(++P>N)throw new Error("circular link");O=B,B=new Set}}function w({nodes:D}){let N=Ix(D,P=>P.depth)+1,O=(r-t-i)/(N-1),B=new Array(N);for(let P of D){let $=Math.max(0,Math.min(N-1,Math.floor(l.call(null,P,N))));P.layer=$,P.x0=t+$*O,P.x1=P.x0+i,B[$]?B[$].push(P):B[$]=[P]}if(u)for(let P of B)P.sort(u);return B}function _(D){let N=jm(D,O=>(n-e-(O.length-1)*s)/Km(O,dO));for(let O of D){let B=e;for(let P of O){P.y0=B,P.y1=B+P.value*N,B=P.y1+s;for(let $ of P.sourceLinks)$.width=$.value*N}B=(n-B+s)/(O.length+1);for(let P=0;P<O.length;++P){let $=O[P];$.y0+=B*(P+1),$.y1+=B*(P+1)}T(O)}}function k(D){let N=w(D);s=Math.min(a,(n-e)/(Ix(N,O=>O.length)-1)),_(N);for(let O=0;O<p;++O){let B=Math.pow(.99,O),P=Math.max(1-B,(O+1)/p);L(N,B,P),E(N,B,P)}}function E(D,N,O){for(let B=1,P=D.length;B<P;++B){let $=D[B];for(let z of $){let H=0,Z=0;for(let{source:ie,value:K}of z.targetLinks){let ee=K*(z.layer-ie.layer);H+=I(ie,z)*ee,Z+=ee}if(!(Z>0))continue;let X=(H/Z-z.y0)*N;z.y0+=X,z.y1+=X,R(z)}u===void 0&&$.sort(J6),S($,O)}}function L(D,N,O){for(let B=D.length,P=B-2;P>=0;--P){let $=D[P];for(let z of $){let H=0,Z=0;for(let{target:ie,value:K}of z.sourceLinks){let ee=K*(ie.layer-z.layer);H+=A(z,ie)*ee,Z+=ee}if(!(Z>0))continue;let X=(H/Z-z.y0)*N;z.y0+=X,z.y1+=X,R(z)}u===void 0&&$.sort(J6),S($,O)}}function S(D,N){let O=D.length>>1,B=D[O];M(D,B.y0-s,O-1,N),C(D,B.y1+s,O+1,N),M(D,n,D.length-1,N),C(D,e,0,N)}function C(D,N,O,B){for(;O<D.length;++O){let P=D[O],$=(N-P.y0)*B;$>1e-6&&(P.y0+=$,P.y1+=$),N=P.y1+s}}function M(D,N,O,B){for(;O>=0;--O){let P=D[O],$=(P.y1-N)*B;$>1e-6&&(P.y0-=$,P.y1-=$),N=P.y0-s}}function R({sourceLinks:D,targetLinks:N}){if(h===void 0){for(let{source:{sourceLinks:O}}of N)O.sort(Ipe);for(let{target:{targetLinks:O}}of D)O.sort(Npe)}}function T(D){if(h===void 0)for(let{sourceLinks:N,targetLinks:O}of D)N.sort(Ipe),O.sort(Npe)}function I(D,N){let O=D.y0-(D.sourceLinks.length-1)*s/2;for(let{target:B,width:P}of D.sourceLinks){if(B===N)break;O+=P+s}for(let{source:B,width:P}of N.targetLinks){if(B===D)break;O-=P}return O}function A(D,N){let O=N.y0-(N.targetLinks.length-1)*s/2;for(let{source:B,width:P}of N.targetLinks){if(B===D)break;O+=P+s}for(let{target:B,width:P}of D.sourceLinks){if(B===N)break;O-=P}return O}return g}var Ope=F(()=>{lO();fO();Rpe()});function mO(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ppe(){return new mO}var pO,gO,N0,tKe,vO,Bpe=F(()=>{pO=Math.PI,gO=2*pO,N0=1e-6,tKe=gO-N0;mO.prototype=Ppe.prototype={constructor:mO,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,s=this._y1,o=r-t,l=n-e,u=a-t,h=s-e,f=u*u+h*h;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>N0)if(!(Math.abs(h*o-l*u)>N0)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var d=r-a,p=n-s,g=o*o+l*l,m=d*d+p*p,x=Math.sqrt(g),y=Math.sqrt(f),b=i*Math.tan((pO-Math.acos((g+f-m)/(2*x*y)))/2),w=b/y,_=b/x;Math.abs(w-1)>N0&&(this._+="L"+(t+w*u)+","+(e+w*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>u*p)+","+(this._x1=t+_*o)+","+(this._y1=e+_*l)}},arc:function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var s=r*Math.cos(n),o=r*Math.sin(n),l=t+s,u=e+o,h=1^a,f=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>N0||Math.abs(this._y1-u)>N0)&&(this._+="L"+l+","+u),r&&(f<0&&(f=f%gO+gO),f>tKe?this._+="A"+r+","+r+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):f>N0&&(this._+="A"+r+","+r+",0,"+ +(f>=pO)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};vO=Ppe});var Fpe=F(()=>{Bpe()});function yO(t){return function(){return t}}var zpe=F(()=>{});function $pe(t){return t[0]}function Gpe(t){return t[1]}var Upe=F(()=>{});var Vpe,Wpe=F(()=>{Vpe=Array.prototype.slice});function rKe(t){return t.source}function nKe(t){return t.target}function iKe(t){var e=rKe,r=nKe,n=$pe,i=Gpe,a=null;function s(){var o,l=Vpe.call(arguments),u=e.apply(this,l),h=r.apply(this,l);if(a||(a=o=vO()),t(a,+n.apply(this,(l[0]=u,l)),+i.apply(this,l),+n.apply(this,(l[0]=h,l)),+i.apply(this,l)),o)return a=null,o+""||null}return s.source=function(o){return arguments.length?(e=o,s):e},s.target=function(o){return arguments.length?(r=o,s):r},s.x=function(o){return arguments.length?(n=typeof o=="function"?o:yO(+o),s):n},s.y=function(o){return arguments.length?(i=typeof o=="function"?o:yO(+o),s):i},s.context=function(o){return arguments.length?(a=o??null,s):a},s}function aKe(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function xO(){return iKe(aKe)}var Hpe=F(()=>{Fpe();Wpe();zpe();Upe()});var qpe=F(()=>{Hpe()});function sKe(t){return[t.source.x1,t.y0]}function oKe(t){return[t.target.x0,t.y1]}function bO(){return xO().source(sKe).target(oKe)}var Ype=F(()=>{qpe()});var Xpe=F(()=>{Ope();fO();Ype()});var Kpe={};mr(Kpe,{diagram:()=>kKe});var wO,tE,nE,iE,rE,lKe,cKe,uKe,hKe,fKe,dKe,pKe,gKe,mKe,jpe,vKe,yKe,xKe,bKe,wKe,kKe,Zpe=F(()=>{or();lr();Xpe();wO=function(){var t=v(function(o,l,u,h){for(u=u||{},h=o.length;h--;u[o[h]]=l);return u},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],i={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:v(function(l,u,h,f,d,p,g){var m=p.length-1;switch(d){case 7:let x=f.findOrCreateNode(p[m-4].trim().replaceAll(\'""\',\'"\')),y=f.findOrCreateNode(p[m-2].trim().replaceAll(\'""\',\'"\')),b=parseFloat(p[m].trim());f.addLink(x,y,b);break;case 8:case 9:case 11:this.$=p[m];break;case 10:this.$=p[m-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:v(function(l,u){if(u.recoverable)this.trace(l);else{var h=new Error(l);throw h.hash=u,h}},"parseError"),parse:v(function(l){var u=this,h=[0],f=[],d=[null],p=[],g=this.table,m="",x=0,y=0,b=0,w=2,_=1,k=p.slice.call(arguments,1),E=Object.create(this.lexer),L={yy:{}};for(var S in this.yy)Object.prototype.hasOwnProperty.call(this.yy,S)&&(L.yy[S]=this.yy[S]);E.setInput(l,L.yy),L.yy.lexer=E,L.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var C=E.yylloc;p.push(C);var M=E.options&&E.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(ie){h.length=h.length-2*ie,d.length=d.length-ie,p.length=p.length-ie}v(R,"popStack");function T(){var ie;return ie=f.pop()||E.lex()||_,typeof ie!="number"&&(ie instanceof Array&&(f=ie,ie=f.pop()),ie=u.symbols_[ie]||ie),ie}v(T,"lex");for(var I,A,D,N,O,B,P={},$,z,H,Z;;){if(D=h[h.length-1],this.defaultActions[D]?N=this.defaultActions[D]:((I===null||typeof I>"u")&&(I=T()),N=g[D]&&g[D][I]),typeof N>"u"||!N.length||!N[0]){var X="";Z=[];for($ in g[D])this.terminals_[$]&&$>w&&Z.push("\'"+this.terminals_[$]+"\'");E.showPosition?X="Parse error on line "+(x+1)+`:\n`+E.showPosition()+`\nExpecting `+Z.join(", ")+", got \'"+(this.terminals_[I]||I)+"\'":X="Parse error on line "+(x+1)+": Unexpected "+(I==_?"end of input":"\'"+(this.terminals_[I]||I)+"\'"),this.parseError(X,{text:E.match,token:this.terminals_[I]||I,line:E.yylineno,loc:C,expected:Z})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+I);switch(N[0]){case 1:h.push(I),d.push(E.yytext),p.push(E.yylloc),h.push(N[1]),I=null,A?(I=A,A=null):(y=E.yyleng,m=E.yytext,x=E.yylineno,C=E.yylloc,b>0&&b--);break;case 2:if(z=this.productions_[N[1]][1],P.$=d[d.length-z],P._$={first_line:p[p.length-(z||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(z||1)].first_column,last_column:p[p.length-1].last_column},M&&(P._$.range=[p[p.length-(z||1)].range[0],p[p.length-1].range[1]]),B=this.performAction.apply(P,[m,y,x,L.yy,N[1],d,p].concat(k)),typeof B<"u")return B;z&&(h=h.slice(0,-1*z*2),d=d.slice(0,-1*z),p=p.slice(0,-1*z)),h.push(this.productions_[N[1]][0]),d.push(P.$),p.push(P._$),H=g[h[h.length-2]][h[h.length-1]],h.push(H);break;case 3:return!0}}return!0},"parse")},a=function(){var o={EOF:1,parseError:v(function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw new Error(u)},"parseError"),setInput:v(function(l,u){return this.yy=u||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\\r\\n?|\\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:v(function(l){var u=l.length,h=l.split(/(?:\\r\\n?|\\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var f=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===f.length?this.yylloc.first_column:0)+f[f.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(l){this.unput(this.match.slice(l))},"less"),pastInput:v(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+`\n`+u+"^"},"showPosition"),test_match:v(function(l,u){var h,f,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),f=l[0].match(/(?:\\r\\n?|\\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var p in d)this[p]=d[p];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,h,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),p=0;p<d.length;p++)if(h=this._input.match(this.rules[d[p]]),h&&(!u||h[0].length>u[0].length)){if(u=h,f=p,this.options.backtrack_lexer){if(l=this.test_match(h,d[p]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,d[f]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var u=this.next();return u||this.lex()},"lex"),begin:v(function(u){this.conditionStack.push(u)},"begin"),popState:v(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:v(function(u){this.begin(u)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:v(function(u,h,f,d){var p=d;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;break;case 5:return 20;case 6:return this.popState("escaped_text"),18;break;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\\b)/i,/^(?:$)/i,/^(?:((\\u000D\\u000A)|(\\u000A)))/i,/^(?:(\\u002C))/i,/^(?:(\\u0022))/i,/^(?:([\\u0020-\\u0021\\u0023-\\u002B\\u002D-\\u007E])*)/i,/^(?:(\\u0022)(?!(\\u0022)))/i,/^(?:(([\\u0020-\\u0021\\u0023-\\u002B\\u002D-\\u007E])|(\\u002C)|(\\u000D)|(\\u000A)|(\\u0022)(\\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return o}();i.lexer=a;function s(){this.yy={}}return v(s,"Parser"),s.prototype=i,i.Parser=s,new s}();wO.parser=wO;tE=wO,nE=[],iE=[],rE=new Map,lKe=v(()=>{nE=[],iE=[],rE=new Map,xr()},"clear"),cKe=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{v(this,"SankeyLink")}},uKe=v((t,e,r)=>{nE.push(new cKe(t,e,r))},"addLink"),hKe=class{constructor(t){this.ID=t}static{v(this,"SankeyNode")}},fKe=v(t=>{t=je.sanitizeText(t,pe());let e=rE.get(t);return e===void 0&&(e=new hKe(t),rE.set(t,e),iE.push(e)),e},"findOrCreateNode"),dKe=v(()=>iE,"getNodes"),pKe=v(()=>nE,"getLinks"),gKe=v(()=>({nodes:iE.map(t=>({id:t.ID})),links:nE.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),mKe={nodesMap:rE,getConfig:v(()=>pe().sankey,"getConfig"),getNodes:dKe,getLinks:pKe,getGraph:gKe,addLink:uKe,findOrCreateNode:fKe,getAccTitle:Ar,setAccTitle:Tr,getAccDescription:Lr,setAccDescription:_r,getDiagramTitle:Hr,setDiagramTitle:en,clear:lKe},jpe=class kO{static{v(this,"Uid")}static{this.count=0}static next(e){return new kO(e+ ++kO.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},vKe={left:cO,right:uO,center:hO,justify:Mx},yKe=v(function(t,e,r,n){let{securityLevel:i,sankey:a}=pe(),s=Nb.sankey,o;i==="sandbox"&&(o=Ge("#i"+e));let l=i==="sandbox"?Ge(o.nodes()[0].contentDocument.body):Ge("body"),u=i==="sandbox"?l.select(`[id="${e}"]`):Ge(`[id="${e}"]`),h=a?.width??s.width,f=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,m=a?.suffix??s.suffix,x=a?.showValues??s.showValues,y=n.db.getGraph(),b=vKe[p];eE().nodeId(M=>M.id).nodeWidth(10).nodePadding(10+(x?15:0)).nodeAlign(b).extent([[0,0],[h,f]])(y);let k=nu(r8);u.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",M=>(M.uid=jpe.next("node-")).id).attr("transform",function(M){return"translate("+M.x0+","+M.y0+")"}).attr("x",M=>M.x0).attr("y",M=>M.y0).append("rect").attr("height",M=>M.y1-M.y0).attr("width",M=>M.x1-M.x0).attr("fill",M=>k(M.id));let E=v(({id:M,value:R})=>x?`${M}\n${g}${Math.round(R*100)/100}${m}`:M,"getText");u.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",M=>M.x0<h/2?M.x1+6:M.x0-6).attr("y",M=>(M.y1+M.y0)/2).attr("dy",`${x?"0":"0.35"}em`).attr("text-anchor",M=>M.x0<h/2?"start":"end").text(E);let L=u.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(y.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),S=a?.linkColor??"gradient";if(S==="gradient"){let M=L.append("linearGradient").attr("id",R=>(R.uid=jpe.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",R=>R.source.x1).attr("x2",R=>R.target.x0);M.append("stop").attr("offset","0%").attr("stop-color",R=>k(R.source.id)),M.append("stop").attr("offset","100%").attr("stop-color",R=>k(R.target.id))}let C;switch(S){case"gradient":C=v(M=>M.uid,"coloring");break;case"source":C=v(M=>k(M.source.id),"coloring");break;case"target":C=v(M=>k(M.target.id),"coloring");break;default:C=S}L.append("path").attr("d",bO()).attr("stroke",C).attr("stroke-width",M=>Math.max(1,M.width)),Qo(void 0,u,0,d)},"draw"),xKe={draw:yKe},bKe=v(t=>t.replaceAll(/^[^\\S\\n\\r]+|[^\\S\\n\\r]+$/g,"").replaceAll(/([\\n\\r])+/g,`\n`).trim(),"prepareTextForParsing"),wKe=tE.parse.bind(tE);tE.parse=t=>wKe(bKe(t));kKe={parser:tE,db:mKe,renderer:xKe}});var Jpe={};mr(Jpe,{diagram:()=>BKe});var Qpe,TO,TKe,EKe,SKe,CKe,AKe,Qm,_Ke,LKe,RKe,NKe,IKe,MKe,DKe,OKe,PKe,BKe,ege=F(()=>{oy();xn();ku();or();cm();Qpe={packet:[]},TO=structuredClone(Qpe),TKe=sr.packet,EKe=v(()=>{let t=hs({...TKe,...Or().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),SKe=v(()=>TO.packet,"getPacket"),CKe=v(t=>{t.length>0&&TO.packet.push(t)},"pushWord"),AKe=v(()=>{xr(),TO=structuredClone(Qpe)},"clear"),Qm={pushWord:CKe,getPacket:SKe,getConfig:EKe,clear:AKe,setAccTitle:Tr,getAccTitle:Ar,setDiagramTitle:en,getDiagramTitle:Hr,getAccDescription:Lr,setAccDescription:_r},_Ke=1e4,LKe=v(t=>{Cu(t,Qm);let e=-1,r=[],n=1,{bitsPerRow:i}=Qm.getConfig();for(let{start:a,end:s,label:o}of t.blocks){if(s&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a!==e+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${e+1}.`);for(e=s??a,re.debug(`Packet block ${a} - ${e} with label ${o}`);r.length<=i+1&&Qm.getPacket().length<_Ke;){let[l,u]=RKe({start:a,end:s,label:o},n,i);if(r.push(l),l.end+1===n*i&&(Qm.pushWord(r),r=[],n++),!u)break;({start:a,end:s,label:o}=u)}}Qm.pushWord(r)},"populate"),RKe=v((t,e,r)=>{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),NKe={parse:v(async t=>{let e=await Sl("packet",t);re.debug(e),LKe(e)},"parse")},IKe=v((t,e,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:s,paddingY:o,bitWidth:l,bitsPerRow:u}=a,h=i.getPacket(),f=i.getDiagramTitle(),d=s+o,p=d*(h.length+1)-(f?0:s),g=l*u+2,m=ka(e);m.attr("viewbox",`0 0 ${g} ${p}`),Wr(m,p,g,a.useMaxWidth);for(let[x,y]of h.entries())MKe(m,y,x,a);m.append("text").text(f).attr("x",g/2).attr("y",p-d/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),MKe=v((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{let u=t.append("g"),h=r*(n+a)+a;for(let f of e){let d=f.start%o*s+1,p=(f.end-f.start+1)*s-i;if(u.append("rect").attr("x",d).attr("y",h).attr("width",p).attr("height",n).attr("class","packetBlock"),u.append("text").attr("x",d+p/2).attr("y",h+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!l)continue;let g=f.end===f.start,m=h-2;u.append("text").attr("x",d+(g?p/2:0)).attr("y",m).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(f.start),g||u.append("text").attr("x",d+p).attr("y",m).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),DKe={draw:IKe},OKe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},PKe=v(({packet:t}={})=>{let e=hs(OKe,t);return`\n .packetByte {\n font-size: ${e.byteFontSize};\n }\n .packetByte.start {\n fill: ${e.startByteColor};\n }\n .packetByte.end {\n fill: ${e.endByteColor};\n }\n .packetLabel {\n fill: ${e.labelColor};\n font-size: ${e.labelFontSize};\n }\n .packetTitle {\n fill: ${e.titleColor};\n font-size: ${e.titleFontSize};\n }\n .packetBlock {\n stroke: ${e.blockStrokeColor};\n stroke-width: ${e.blockStrokeWidth};\n fill: ${e.blockFillColor};\n }\n `},"styles"),BKe={parser:NKe,db:Qm,renderer:DKe,styles:PKe}});var Rge={};mr(Rge,{diagram:()=>lQe});function fge(t){switch(re.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return re.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\\\\\]":return"lean_left";case"[/\\\\]":return"trapezoid";case"[\\\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function dge(t){switch(re.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}function pge(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}function gge(t,e){if(t===0||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(t===1)return{px:0,py:e};let r=e%t,n=Math.floor(e/t);return{px:r,py:n}}function lE(t,e,r=0,n=0){re.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"sieblingWidth",r),t?.size?.width||(t.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(let p of t.children)lE(p,e);let s=yZe(t);i=s.width,a=s.height,re.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(let p of t.children)p.size&&(re.debug(`abc95 Setting size of children of ${t.id} id=${p.id} ${i} ${a} ${JSON.stringify(p.size)}`),p.size.width=i*(p.widthInColumns??1)+hi*((p.widthInColumns??1)-1),p.size.height=a,p.size.x=0,p.size.y=0,re.debug(`abc95 updating size of ${t.id} children child:${p.id} maxWidth:${i} maxHeight:${a}`));for(let p of t.children)lE(p,e,i,a);let o=t.columns??-1,l=0;for(let p of t.children)l+=p.widthInColumns??1;let u=t.children.length;o>0&&o<l&&(u=o);let h=Math.ceil(l/u),f=u*(i+hi)+hi,d=h*(a+hi)+hi;if(f<r){re.debug(`Detected to small siebling: abc95 ${t.id} sieblingWidth ${r} sieblingHeight ${n} width ${f}`),f=r,d=n;let p=(r-u*hi-hi)/u,g=(n-h*hi-hi)/h;re.debug("Size indata abc88",t.id,"childWidth",p,"maxWidth",i),re.debug("Size indata abc88",t.id,"childHeight",g,"maxHeight",a),re.debug("Size indata abc88 xSize",u,"padding",hi);for(let m of t.children)m.size&&(m.size.width=p,m.size.height=g,m.size.x=0,m.size.y=0)}if(re.debug(`abc95 (finale calc) ${t.id} xSize ${u} ySize ${h} columns ${o}${t.children.length} width=${Math.max(f,t.size?.width||0)}`),f<(t?.size?.width||0)){f=t?.size?.width||0;let p=o>0?Math.min(t.children.length,o):t.children.length;if(p>0){let g=(f-p*hi-hi)/p;re.debug("abc95 (growing to fit) width",t.id,f,t.size?.width,g);for(let m of t.children)m.size&&(m.size.width=g)}}t.size={width:f,height:d,x:0,y:0}}re.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function NO(t,e){re.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(re.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){let n=t?.children[0]?.size?.width??0,i=t.children.length*n+(t.children.length-1)*hi;re.debug("widthOfChildren 88",i,"posX");let a=0;re.debug("abc91 block?.size?.x",t.id,t?.size?.x);let s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-hi,o=0;for(let l of t.children){let u=t;if(!l.size)continue;let{width:h,height:f}=l.size,{px:d,py:p}=gge(r,a);if(p!=o&&(o=p,s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-hi,re.debug("New row in layout for block",t.id," and child ",l.id,o)),re.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${a} (px, py) ${d},${p} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${h}${hi}`),u.size){let g=h/2;l.size.x=s+hi+g,re.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${s} new startingPosX${l.size.x} ${g} padding=${hi} width=${h} halfWidth=${g} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${h*(l?.widthInColumns??1)/2}`),s=l.size.x+g,l.size.y=u.size.y-u.size.height/2+p*(f+hi)+f/2+hi,re.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${s}${hi}${g}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${h*(l?.widthInColumns??1)/2}`)}l.children&&NO(l,e),a+=l?.widthInColumns??1,re.debug("abc88 columnsPos",l,a)}}re.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function IO(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:a,y:s,width:o,height:l}=t.size;a-o/2<e&&(e=a-o/2),s-l/2<r&&(r=s-l/2),a+o/2>n&&(n=a+o/2),s+l/2>i&&(i=s+l/2)}if(t.children)for(let a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=IO(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function mge(t){let e=t.getBlock("root");if(!e)return;lE(e,t,0,0),NO(e,t),re.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:n,maxX:i,maxY:a}=IO(e),s=a-n,o=i-r;return{x:r,y:n,width:o,height:s}}function CO(t,e){e&&t.attr("style",e)}function vge(t){let e=Ge(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),CO(a,t.labelStyle),a.attr("class",i),CO(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}function Dx(t,e){pe().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function yge(t,e){return t.intersect(e)}function xge(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x<i&&(u=-u);var h=Math.abs(e*r*o/l);return n.y<a&&(h=-h),{x:i+u,y:a+h}}function wge(t,e,r){return bge(t,e,e,r)}function kge(t,e,r,n){var i,a,s,o,l,u,h,f,d,p,g,m,x,y,b;if(i=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,d=i*r.x+s*r.y+l,p=i*n.x+s*n.y+l,!(d!==0&&p!==0&&_O(d,p))&&(a=n.y-r.y,o=r.x-n.x,u=n.x*r.y-r.x*n.y,h=a*t.x+o*t.y+u,f=a*e.x+o*e.y+u,!(h!==0&&f!==0&&_O(h,f))&&(g=i*o-a*s,g!==0)))return m=Math.abs(g/2),x=s*u-o*l,y=x<0?(x-m)/g:(x+m)/g,x=a*l-i*u,b=x<0?(x-m)/g:(x+m)/g,{x:y,y:b}}function _O(t,e){return t*e>0}function Tge(t,e,r){var n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(g){s=Math.min(s,g.x),o=Math.min(o,g.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=n-t.width/2-s,u=i-t.height/2-o,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=NZe(t,r,{x:l+f.x,y:u+f.y},{x:l+d.x,y:u+d.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(g,m){var x=g.x-r.x,y=g.y-r.y,b=Math.sqrt(x*x+y*y),w=m.x-r.x,_=m.y-r.y,k=Math.sqrt(w*w+_*_);return b<k?-1:b===k?0:1}),a[0]):t}function Ol(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}function cE(t,e,r,n){let i=[],a=v(o=>{i.push(o,0)},"addBorder"),s=v(o=>{i.push(0,o)},"skipBorder");e.includes("t")?(re.debug("add top border"),a(r)):s(r),e.includes("r")?(re.debug("add right border"),a(n)):s(n),e.includes("b")?(re.debug("add bottom border"),a(r)):s(r),e.includes("l")?(re.debug("add left border"),a(n)):s(n),t.attr("stroke-dasharray",i.join(" "))}function MO(t,e,r=!1){let n=t,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",o;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}let l=L3(n?.styles??[]),u=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:a,ry:a,class:i,style:l.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:o??Or()?.block?.padding??0}}async function Sge(t,e,r){let n=MO(e,r,!1);if(n.type==="group")return;let i=Or(),a=await Ege(t,n,{config:i}),s=a.node().getBBox(),o=r.getBlock(n.id);o.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(o),a.remove()}async function Cge(t,e,r){let n=MO(e,r,!0);if(r.getBlock(n.id).type!=="space"){let a=Or();await Ege(t,n,{config:a}),e.intersect=n?.intersect,iQe(n)}}async function uE(t,e,r,n){for(let i of e)await n(t,i,r),i.children&&await uE(t,i.children,r,n)}async function Age(t,e,r){await uE(t,e,r,Sge)}async function _ge(t,e,r){await uE(t,e,r,Cge)}async function Lge(t,e,r,n,i){let a=new Sr({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of e)if(s.start&&s.end){let o=n.getBlock(s.start),l=n.getBlock(s.end);if(o?.size&&l?.size){let u=o.size,h=l.size,f=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}];CZe(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await kZe(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),TZe({...s,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var EO,FKe,Dl,LO,SO,tge,rge,zKe,uge,$Ke,oE,GKe,UKe,VKe,WKe,hge,RO,Ox,HKe,nge,qKe,YKe,XKe,jKe,KKe,ZKe,QKe,JKe,eZe,tZe,rZe,nZe,aE,iZe,aZe,sZe,oZe,lZe,cZe,uZe,hZe,fZe,dZe,pZe,gZe,mZe,vZe,hi,yZe,xZe,Xo,bZe,wZe,ige,AO,Ra,kZe,TZe,EZe,SZe,age,CZe,AZe,_Ze,LZe,bge,RZe,NZe,IZe,MZe,DZe,$n,Yi,ii,OZe,PZe,sge,no,oge,BZe,FZe,zZe,$Ze,GZe,UZe,VZe,WZe,HZe,qZe,YZe,XZe,jZe,KZe,ZZe,QZe,JZe,eQe,tQe,lge,rQe,nQe,cge,sE,Ege,iQe,aQe,sQe,oQe,lQe,Nge=F(()=>{ic();fo();za();xn();or();r_();so();lr();vs();lr();lr();lr();lr();EO=function(){var t=v(function(w,_,k,E){for(k=k||{},E=w.length;E--;k[w[E]]=_);return k},"o"),e=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],s=[1,16],o=[1,17],l=[1,18],u=[8,30],h=[8,21,28,29,30,31,32,40,44,47],f=[1,23],d=[1,24],p=[8,15,16,21,28,29,30,31,32,40,44,47],g=[8,15,16,21,27,28,29,30,31,32,40,44,47],m=[1,49],x={trace:v(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:v(function(_,k,E,L,S,C,M){var R=C.length-1;switch(S){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",C[R-1]),L.setHierarchy(C[R-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",C[R]),typeof C[R].length=="number"?this.$=C[R]:this.$=[C[R]];break;case 13:L.getLogger().debug("Rule: statement #2: ",C[R-1]),this.$=[C[R-1]].concat(C[R]);break;case 14:L.getLogger().debug("Rule: link: ",C[R],_),this.$={edgeTypeStr:C[R],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",C[R-3],C[R-1],C[R]),this.$={edgeTypeStr:C[R],label:C[R-1]};break;case 18:let T=parseInt(C[R]),I=L.generateId();this.$={id:I,type:"space",label:"",width:T,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",C[R-2],C[R-1],C[R]," typestr: ",C[R-1].edgeTypeStr);let A=L.edgeStrToEdgeData(C[R-1].edgeTypeStr);this.$=[{id:C[R-2].id,label:C[R-2].label,type:C[R-2].type,directions:C[R-2].directions},{id:C[R-2].id+"-"+C[R].id,start:C[R-2].id,end:C[R].id,label:C[R-1].label,type:"edge",directions:C[R].directions,arrowTypeEnd:A,arrowTypeStart:"arrow_open"},{id:C[R].id,label:C[R].label,type:L.typeStr2Type(C[R].typeStr),directions:C[R].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",C[R-1],C[R]),this.$={id:C[R-1].id,label:C[R-1].label,type:L.typeStr2Type(C[R-1].typeStr),directions:C[R-1].directions,widthInColumns:parseInt(C[R],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",C[R]),this.$={id:C[R].id,label:C[R].label,type:L.typeStr2Type(C[R].typeStr),directions:C[R].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",C[R]),this.$={type:"column-setting",columns:C[R]==="auto"?-1:parseInt(C[R])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",C[R-2],C[R-1]);let D=L.generateId();this.$={...C[R-2],type:"composite",children:C[R-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",C[R-2],C[R-1],C[R]);let N=L.generateId();this.$={id:N,type:"composite",label:"",children:C[R-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",C[R]),this.$={id:C[R]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",C[R-1],C[R]),this.$={id:C[R-1],label:C[R].label,typeStr:C[R].typeStr,directions:C[R].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",C[R]),this.$=[C[R]];break;case 32:L.getLogger().debug("Rule: dirList: ",C[R-1],C[R]),this.$=[C[R-1]].concat(C[R]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",C[R-2],C[R-1],C[R]),this.$={typeStr:C[R-2]+C[R],label:C[R-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",C[R-3],C[R-2]," #3:",C[R-1],C[R]),this.$={typeStr:C[R-3]+C[R],label:C[R-2],directions:C[R-1]};break;case 35:case 36:this.$={type:"classDef",id:C[R-1].trim(),css:C[R].trim()};break;case 37:this.$={type:"applyClass",id:C[R-1].trim(),styleClass:C[R].trim()};break;case 38:this.$={type:"applyStyles",id:C[R-1].trim(),stylesStr:C[R].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:o,47:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:e,28:r,29:n,31:i,32:a,40:s,44:o,47:l}),t(h,[2,16],{14:22,15:f,16:d}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(p,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:o,47:l},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(g,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},t(p,[2,24]),{11:37,13:4,14:22,15:f,16:d,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:o,47:l},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(p,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{37:[1,47]},{34:48,35:m},{15:[1,50]},t(h,[2,27]),t(g,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},t(g,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:v(function(_,k){if(k.recoverable)this.trace(_);else{var E=new Error(_);throw E.hash=k,E}},"parseError"),parse:v(function(_){var k=this,E=[0],L=[],S=[null],C=[],M=this.table,R="",T=0,I=0,A=0,D=2,N=1,O=C.slice.call(arguments,1),B=Object.create(this.lexer),P={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(P.yy[$]=this.yy[$]);B.setInput(_,P.yy),P.yy.lexer=B,P.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var z=B.yylloc;C.push(z);var H=B.options&&B.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(oe){E.length=E.length-2*oe,S.length=S.length-oe,C.length=C.length-oe}v(Z,"popStack");function X(){var oe;return oe=L.pop()||B.lex()||N,typeof oe!="number"&&(oe instanceof Array&&(L=oe,oe=L.pop()),oe=k.symbols_[oe]||oe),oe}v(X,"lex");for(var ie,K,ee,J,W,Y,Q={},se,ue,ce,te;;){if(ee=E[E.length-1],this.defaultActions[ee]?J=this.defaultActions[ee]:((ie===null||typeof ie>"u")&&(ie=X()),J=M[ee]&&M[ee][ie]),typeof J>"u"||!J.length||!J[0]){var Le="";te=[];for(se in M[ee])this.terminals_[se]&&se>D&&te.push("\'"+this.terminals_[se]+"\'");B.showPosition?Le="Parse error on line "+(T+1)+`:\n`+B.showPosition()+`\nExpecting `+te.join(", ")+", got \'"+(this.terminals_[ie]||ie)+"\'":Le="Parse error on line "+(T+1)+": Unexpected "+(ie==N?"end of input":"\'"+(this.terminals_[ie]||ie)+"\'"),this.parseError(Le,{text:B.match,token:this.terminals_[ie]||ie,line:B.yylineno,loc:z,expected:te})}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ee+", token: "+ie);switch(J[0]){case 1:E.push(ie),S.push(B.yytext),C.push(B.yylloc),E.push(J[1]),ie=null,K?(ie=K,K=null):(I=B.yyleng,R=B.yytext,T=B.yylineno,z=B.yylloc,A>0&&A--);break;case 2:if(ue=this.productions_[J[1]][1],Q.$=S[S.length-ue],Q._$={first_line:C[C.length-(ue||1)].first_line,last_line:C[C.length-1].last_line,first_column:C[C.length-(ue||1)].first_column,last_column:C[C.length-1].last_column},H&&(Q._$.range=[C[C.length-(ue||1)].range[0],C[C.length-1].range[1]]),Y=this.performAction.apply(Q,[R,I,T,P.yy,J[1],S,C].concat(O)),typeof Y<"u")return Y;ue&&(E=E.slice(0,-1*ue*2),S=S.slice(0,-1*ue),C=C.slice(0,-1*ue)),E.push(this.productions_[J[1]][0]),S.push(Q.$),C.push(Q._$),ce=M[E[E.length-2]][E[E.length-1]],E.push(ce);break;case 3:return!0}}return!0},"parse")},y=function(){var w={EOF:1,parseError:v(function(k,E){if(this.yy.parser)this.yy.parser.parseError(k,E);else throw new Error(k)},"parseError"),setInput:v(function(_,k){return this.yy=k||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:v(function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var k=_.match(/(?:\\r\\n?|\\n).*/g);return k?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},"input"),unput:v(function(_){var k=_.length,E=_.split(/(?:\\r\\n?|\\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var L=this.match.split(/(?:\\r\\n?|\\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===L.length?this.yylloc.first_column:0)+L[L.length-E.length].length-E[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},"unput"),more:v(function(){return this._more=!0,this},"more"),reject:v(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:v(function(_){this.unput(this.match.slice(_))},"less"),pastInput:v(function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\\n/g,"")},"pastInput"),upcomingInput:v(function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\\n/g,"")},"upcomingInput"),showPosition:v(function(){var _=this.pastInput(),k=new Array(_.length+1).join("-");return _+this.upcomingInput()+`\n`+k+"^"},"showPosition"),test_match:v(function(_,k){var E,L,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),L=_[0].match(/(?:\\r\\n?|\\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\\r?\\n?/)[0].length:this.yylloc.last_column+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_[0].length),this.matched+=_[0],E=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var C in S)this[C]=S[C];return!1}return!1},"test_match"),next:v(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,k,E,L;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),C=0;C<S.length;C++)if(E=this._input.match(this.rules[S[C]]),E&&(!k||E[0].length>k[0].length)){if(k=E,L=C,this.options.backtrack_lexer){if(_=this.test_match(E,S[C]),_!==!1)return _;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(_=this.test_match(k,S[L]),_!==!1?_:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.\n`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:v(function(){var k=this.next();return k||this.lex()},"lex"),begin:v(function(k){this.conditionStack.push(k)},"begin"),popState:v(function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:v(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:v(function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},"topState"),pushState:v(function(k){this.begin(k)},"pushState"),stateStackSize:v(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:v(function(k,E,L,S){var C=S;switch(L){case 0:return 10;case 1:return k.getLogger().debug("Found space-block"),31;break;case 2:return k.getLogger().debug("Found nl-block"),31;break;case 3:return k.getLogger().debug("Found space-block"),29;break;case 4:k.getLogger().debug(".",E.yytext);break;case 5:k.getLogger().debug("_",E.yytext);break;case 6:return 5;case 7:return E.yytext=-1,28;break;case 8:return E.yytext=E.yytext.replace(/columns\\s+/,""),k.getLogger().debug("COLUMNS (LEX)",E.yytext),28;break;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:k.getLogger().debug("LEX: POPPING STR:",E.yytext),this.popState();break;case 14:return k.getLogger().debug("LEX: STR end:",E.yytext),"STR";break;case 15:return E.yytext=E.yytext.replace(/space\\:/,""),k.getLogger().debug("SPACE NUM (LEX)",E.yytext),21;break;case 16:return E.yytext="1",k.getLogger().debug("COLUMNS (LEX)",E.yytext),21;break;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;break;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 22:return this.popState(),this.pushState("CLASSDEFID"),41;break;case 23:return this.popState(),42;break;case 24:return this.pushState("CLASS"),44;break;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;break;case 26:return this.popState(),46;break;case 27:return this.pushState("STYLE_STMNT"),47;break;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;break;case 29:return this.popState(),49;break;case 30:return this.pushState("acc_title"),"acc_title";break;case 31:return this.popState(),"acc_title_value";break;case 32:return this.pushState("acc_descr"),"acc_descr";break;case 33:return this.popState(),"acc_descr_value";break;case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";break;case 40:return this.popState(),k.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 41:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";break;case 43:return this.popState(),k.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 44:return this.popState(),k.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 45:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";break;case 46:return this.popState(),k.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 47:return this.popState(),k.getLogger().debug("Lex: ("),"NODE_DEND";break;case 48:return this.popState(),k.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 49:return this.popState(),k.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),k.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 51:return this.popState(),k.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 52:return this.popState(),k.getLogger().debug("Lex: )"),"NODE_DEND";break;case 53:return this.popState(),k.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 54:return this.popState(),k.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 55:return k.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;break;case 56:return k.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;break;case 57:return k.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;break;case 58:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 59:return k.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;break;case 60:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 61:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 62:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 63:return k.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;break;case 64:return k.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;break;case 65:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 66:return this.pushState("NODE"),36;break;case 67:return this.pushState("NODE"),36;break;case 68:return this.pushState("NODE"),36;break;case 69:return this.pushState("NODE"),36;break;case 70:return this.pushState("NODE"),36;break;case 71:return this.pushState("NODE"),36;break;case 72:return this.pushState("NODE"),36;break;case 73:return k.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;break;case 74:return this.pushState("BLOCK_ARROW"),k.getLogger().debug("LEX ARR START"),38;break;case 75:return k.getLogger().debug("Lex: NODE_ID",E.yytext),32;break;case 76:return k.getLogger().debug("Lex: EOF",E.yytext),8;break;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:k.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:k.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return k.getLogger().debug("LEX: NODE_DESCR:",E.yytext),"NODE_DESCR";break;case 84:k.getLogger().debug("LEX POPPING"),this.popState();break;case 85:k.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return E.yytext=E.yytext.replace(/^,\\s*/,""),k.getLogger().debug("Lex (right): dir:",E.yytext),"DIR";break;case 87:return E.yytext=E.yytext.replace(/^,\\s*/,""),k.getLogger().debug("Lex (left):",E.yytext),"DIR";break;case 88:return E.yytext=E.yytext.replace(/^,\\s*/,""),k.getLogger().debug("Lex (x):",E.yytext),"DIR";break;case 89:return E.yytext=E.yytext.replace(/^,\\s*/,""),k.getLogger().debug("Lex (y):",E.yytext),"DIR";break;case 90:return E.yytext=E.yytext.replace(/^,\\s*/,""),k.getLogger().debug("Lex (up):",E.yytext),"DIR";break;case 91:return E.yytext=E.yytext.replace(/^,\\s*/,""),k.getLogger().debug("Lex (down):",E.yytext),"DIR";break;case 92:return E.yytext="]>",k.getLogger().debug("Lex (ARROW_DIR end):",E.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 93:return k.getLogger().debug("Lex: LINK","#"+E.yytext+"#"),15;break;case 94:return k.getLogger().debug("Lex: LINK",E.yytext),15;break;case 95:return k.getLogger().debug("Lex: LINK",E.yytext),15;break;case 96:return k.getLogger().debug("Lex: LINK",E.yytext),15;break;case 97:return k.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 98:return k.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 99:return k.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 100:this.pushState("md_string");break;case 101:return k.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 102:return this.popState(),k.getLogger().debug("Lex: LINK","#"+E.yytext+"#"),15;break;case 103:return this.popState(),k.getLogger().debug("Lex: LINK",E.yytext),15;break;case 104:return this.popState(),k.getLogger().debug("Lex: LINK",E.yytext),15;break;case 105:return k.getLogger().debug("Lex: COLON",E.yytext),E.yytext=E.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\\b)/,/^(?:block\\s+)/,/^(?:block\\n+)/,/^(?:block:)/,/^(?:[\\s]+)/,/^(?:[\\n]+)/,/^(?:((\\u000D\\u000A)|(\\u000A)))/,/^(?:columns\\s+auto\\b)/,/^(?:columns\\s+[\\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\\d+)/,/^(?:space\\b)/,/^(?:default\\b)/,/^(?:linkStyle\\b)/,/^(?:interpolate\\b)/,/^(?:classDef\\s+)/,/^(?:DEFAULT\\s+)/,/^(?:\\w+\\s+)/,/^(?:[^\\n]*)/,/^(?:class\\s+)/,/^(?:(\\w+)+((,\\s*\\w+)*))/,/^(?:[^\\n]*)/,/^(?:style\\s+)/,/^(?:(\\w+)+((,\\s*\\w+)*))/,/^(?:[^\\n]*)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:end\\b\\s*)/,/^(?:\\(\\(\\()/,/^(?:\\)\\)\\))/,/^(?:[\\)]\\))/,/^(?:\\}\\})/,/^(?:\\})/,/^(?:\\(-)/,/^(?:-\\))/,/^(?:\\(\\()/,/^(?:\\]\\])/,/^(?:\\()/,/^(?:\\]\\))/,/^(?:\\\\\\])/,/^(?:\\/\\])/,/^(?:\\)\\])/,/^(?:[\\)])/,/^(?:\\]>)/,/^(?:[\\]])/,/^(?:-\\))/,/^(?:\\(-)/,/^(?:\\)\\))/,/^(?:\\))/,/^(?:\\(\\(\\()/,/^(?:\\(\\()/,/^(?:\\{\\{)/,/^(?:\\{)/,/^(?:>)/,/^(?:\\(\\[)/,/^(?:\\()/,/^(?:\\[\\[)/,/^(?:\\[\\|)/,/^(?:\\[\\()/,/^(?:\\)\\)\\))/,/^(?:\\[\\\\)/,/^(?:\\[\\/)/,/^(?:\\[\\\\)/,/^(?:\\[)/,/^(?:<\\[)/,/^(?:[^\\(\\[\\n\\-\\)\\{\\}\\s\\<\\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\\]>\\s*\\()/,/^(?:,?\\s*right\\s*)/,/^(?:,?\\s*left\\s*)/,/^(?:,?\\s*x\\s*)/,/^(?:,?\\s*y\\s*)/,/^(?:,?\\s*up\\s*)/,/^(?:,?\\s*down\\s*)/,/^(?:\\)\\s*)/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?:\\s*~~[\\~]+\\s*)/,/^(?:\\s*[xo<]?--\\s*)/,/^(?:\\s*[xo<]?==\\s*)/,/^(?:\\s*[xo<]?-\\.\\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?::\\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return w}();x.lexer=y;function b(){this.yy={}}return v(b,"Parser"),b.prototype=x,x.Parser=b,new b}();EO.parser=EO;FKe=EO,Dl=new Map,LO=[],SO=new Map,tge="color",rge="fill",zKe="bgFill",uge=",",$Ke=pe(),oE=new Map,GKe=v(t=>je.sanitizeText(t,$Ke),"sanitizeText"),UKe=v(function(t,e=""){let r=oE.get(t);r||(r={id:t,styles:[],textStyles:[]},oE.set(t,r)),e?.split(uge).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(tge).exec(n)){let s=i.replace(rge,zKe).replace(tge,rge);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),VKe=v(function(t,e=""){let r=Dl.get(t);e!=null&&(r.styles=e.split(uge))},"addStyle2Node"),WKe=v(function(t,e){t.split(",").forEach(function(r){let n=Dl.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Dl.set(i,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),hge=v((t,e)=>{let r=t.flat(),n=[];for(let i of r){if(i.label&&(i.label=GKe(i.label)),i.type==="classDef"){UKe(i.id,i.css);continue}if(i.type==="applyClass"){WKe(i.id,i?.styleClass??"");continue}if(i.type==="applyStyles"){i?.stylesStr&&VKe(i.id,i?.stylesStr);continue}if(i.type==="column-setting")e.columns=i.columns??-1;else if(i.type==="edge"){let a=(SO.get(i.id)??0)+1;SO.set(i.id,a),i.id=a+"-"+i.id,LO.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);let a=Dl.get(i.id);if(a===void 0?Dl.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&hge(i.children,i),i.type==="space"){let s=i.width??1;for(let o=0;o<s;o++){let l=Xr(i);l.id=l.id+"-"+o,Dl.set(l.id,l),n.push(l)}}else a===void 0&&n.push(i)}}e.children=n},"populateBlockDatabase"),RO=[],Ox={id:"root",type:"composite",children:[],columns:-1},HKe=v(()=>{re.debug("Clear called"),xr(),Ox={id:"root",type:"composite",children:[],columns:-1},Dl=new Map([["root",Ox]]),RO=[],oE=new Map,LO=[],SO=new Map},"clear");v(fge,"typeStr2Type");v(dge,"edgeTypeStr2Type");v(pge,"edgeStrToEdgeData");nge=0,qKe=v(()=>(nge++,"id-"+Math.random().toString(36).substr(2,12)+"-"+nge),"generateId"),YKe=v(t=>{Ox.children=t,hge(t,Ox),RO=Ox.children},"setHierarchy"),XKe=v(t=>{let e=Dl.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),jKe=v(()=>[...Dl.values()],"getBlocksFlat"),KKe=v(()=>RO||[],"getBlocks"),ZKe=v(()=>LO,"getEdges"),QKe=v(t=>Dl.get(t),"getBlock"),JKe=v(t=>{Dl.set(t.id,t)},"setBlock"),eZe=v(()=>console,"getLogger"),tZe=v(function(){return oE},"getClasses"),rZe={getConfig:v(()=>Or().block,"getConfig"),typeStr2Type:fge,edgeTypeStr2Type:dge,edgeStrToEdgeData:pge,getLogger:eZe,getBlocksFlat:jKe,getBlocks:KKe,getEdges:ZKe,setHierarchy:YKe,getBlock:QKe,setBlock:JKe,getColumns:XKe,getClasses:tZe,clear:HKe,generateId:qKe},nZe=rZe,aE=v((t,e)=>{let r=a1,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return Ns(n,i,a,e)},"fade"),iZe=v(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${aE(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${aE(t.mainBkg,.5)};\n fill: ${aE(t.clusterBkg,.5)};\n stroke: ${aE(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`,"getStyles"),aZe=iZe,sZe=v((t,e,r,n)=>{e.forEach(i=>{mZe[i](t,r,n)})},"insertMarkers"),oZe=v((t,e,r)=>{re.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),lZe=v((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),cZe=v((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),uZe=v((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),hZe=v((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),fZe=v((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),dZe=v((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),pZe=v((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),gZe=v((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),mZe={extension:oZe,composition:lZe,aggregation:cZe,dependency:uZe,lollipop:hZe,point:fZe,circle:dZe,cross:pZe,barb:gZe},vZe=sZe,hi=pe()?.block?.padding??8;v(gge,"calculateBlockPosition");yZe=v(t=>{let e=0,r=0;for(let n of t.children){let{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};re.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),n.type!=="space"&&(i>e&&(e=i/(t.widthInColumns??1)),a>r&&(r=a))}return{width:e,height:r}},"getMaxChildSize");v(lE,"setBlockSizes");v(NO,"layoutBlocks");v(IO,"findBounds");v(mge,"layout");v(CO,"applyStyle");v(vge,"addHtmlLabel");xZe=v((t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),Vr(pe().flowchart.htmlLabels)){i=i.replace(/\\\\n|\\n/g,"<br />"),re.debug("vertexText"+i);let a={isNode:n,label:z3($s(i)),labelStyle:e.replace("fill:","color:")};return vge(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\\\n|\\n|<br\\s*\\/?>/gi):Array.isArray(i)?s=i:s=[];for(let o of s){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Xo=xZe,bZe=v((t,e,r,n,i)=>{e.arrowTypeStart&&ige(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&ige(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),wZe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ige=v((t,e,r,n,i,a)=>{let s=wZe[r];if(!s){re.warn(`Unknown arrow type: ${r}`);return}let o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${o})`)},"addEdgeMarker"),AO={},Ra={},kZe=v((t,e)=>{let r=pe(),n=Vr(r.flowchart.htmlLabels),i=e.labelType==="markdown"?ea(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):Xo(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();if(n){let u=i.children[0],h=Ge(i);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),AO[e.id]=a,e.width=o.width,e.height=o.height;let l;if(e.startLabelLeft){let u=Xo(e.startLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Ra[e.id]||(Ra[e.id]={}),Ra[e.id].startLeft=h,Dx(l,e.startLabelLeft)}if(e.startLabelRight){let u=Xo(e.startLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Ra[e.id]||(Ra[e.id]={}),Ra[e.id].startRight=h,Dx(l,e.startLabelRight)}if(e.endLabelLeft){let u=Xo(e.endLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),Ra[e.id]||(Ra[e.id]={}),Ra[e.id].endLeft=h,Dx(l,e.endLabelLeft)}if(e.endLabelRight){let u=Xo(e.endLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),Ra[e.id]||(Ra[e.id]={}),Ra[e.id].endRight=h,Dx(l,e.endLabelRight)}return i},"insertEdgeLabel");v(Dx,"setTerminalWidth");TZe=v((t,e)=>{re.debug("Moving label abc88 ",t.id,t.label,AO[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=pe(),{subGraphTitleTotalMargin:i}=Zc(n);if(t.label){let a=AO[t.id],s=t.x,o=t.y;if(r){let l=Wt.calcLabelPosition(r);re.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){let a=Ra[t.id].startLeft,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let a=Ra[t.id].startRight,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let a=Ra[t.id].endLeft,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let a=Ra[t.id].endRight,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),EZe=v((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),SZe=v((t,e,r)=>{re.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,o=r.x<e.x?s-a:s+a,l=t.height/2,u=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(n-e.x)*l){let f=r.y<e.y?e.y-l-i:i-l-e.y;o=h*f/u;let d={x:r.x<e.x?r.x+o:r.x-h+o,y:r.y<e.y?r.y+u-f:r.y-u+f};return o===0&&(d.x=e.x,d.y=e.y),h===0&&(d.x=e.x),u===0&&(d.y=e.y),re.debug(`abc89 topp/bott calc, Q ${u}, q ${f}, R ${h}, r ${o}`,d),d}else{r.x<e.x?o=e.x-s-n:o=n-s-e.x;let f=u*o/h,d=r.x<e.x?r.x+h-o:r.x-h+o,p=r.y<e.y?r.y+f:r.y-f;return re.debug(`sides calc abc89, Q ${u}, q ${f}, R ${h}, r ${o}`,{_x:d,_y:p}),o===0&&(d=e.x,p=e.y),h===0&&(d=e.x),u===0&&(p=e.y),{x:d,y:p}}},"intersection"),age=v((t,e)=>{re.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(!EZe(e,a)&&!i){let s=SZe(e,n,a),o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),CZe=v(function(t,e,r,n,i,a,s){let o=r.points;re.debug("abc88 InsertEdge: edge=",r,"e=",e);let l=!1,u=a.node(e.v);var h=a.node(e.w);h?.intersect&&u?.intersect&&(o=o.slice(1,r.points.length-1),o.unshift(u.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(re.debug("to cluster abc88",n[r.toCluster]),o=age(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(re.debug("from cluster abc88",n[r.fromCluster]),o=age(o.reverse(),n[r.fromCluster].node).reverse(),l=!0);let f=o.filter(_=>!Number.isNaN(_.y)),d=cl;r.curve&&(i==="graph"||i==="flowchart")&&(d=r.curve);let{x:p,y:g}=Z3(r),m=ss().x(p).y(g).curve(d),x;switch(r.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-thick";break;default:x=""}switch(r.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break}let y=t.append("path").attr("d",m(f)).attr("id",r.id).attr("class"," "+x+(r.classes?" "+r.classes:"")).attr("style",r.style),b="";(pe().flowchart.arrowMarkerAbsolute||pe().state.arrowMarkerAbsolute)&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\\(/g,"\\\\("),b=b.replace(/\\)/g,"\\\\)")),bZe(y,r,b,s,i);let w={};return l&&(w.updatedPath=o),w.originalPath=r.points,w},"insertEdge"),AZe=v(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r);break}return e},"expandAndDeduplicateDirections"),_Ze=v((t,e,r)=>{let n=AZe(t),i=2,a=e.height+2*r.padding,s=a/i,o=e.width+2*s+r.padding,l=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:o/2,y:2*l},{x:o-s,y:0},{x:o,y:0},{x:o,y:-a/3},{x:o+2*l,y:-a/2},{x:o,y:-2*a/3},{x:o,y:-a},{x:o-s,y:-a},{x:o/2,y:-a-2*l},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*l,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:o-s,y:-a},{x:o,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:o,y:-s},{x:o,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:o,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:o,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-a+l},{x:0,y:-a+l},{x:o/2,y:-a},{x:o,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l},{x:o,y:-l}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:o,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:o,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:o,y:0},{x:0,y:-s},{x:o,y:-a}]:n.has("left")&&n.has("down")?[{x:o,y:0},{x:0,y:0},{x:o,y:-a}]:n.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a+l}]:n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-l},{x:s,y:-a+l},{x:0,y:-a+l},{x:o/2,y:-a},{x:o,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l}]:n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l},{x:o,y:-l}]:[{x:0,y:0}]},"getArrowPoints");v(yge,"intersectNode");LZe=yge;v(xge,"intersectEllipse");bge=xge;v(wge,"intersectCircle");RZe=wge;v(kge,"intersectLine");v(_O,"sameSign");NZe=kge,IZe=Tge;v(Tge,"intersectPolygon");MZe=v((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),DZe=MZe,$n={node:LZe,circle:RZe,ellipse:bge,polygon:IZe,rect:DZe},Yi=v(async(t,e,r,n)=>{let i=pe(),a,s=e.useHtmlLabels||Vr(i.flowchart.htmlLabels);r?a=r:a="node default";let o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),u;e.labelText===void 0?u="":u=typeof e.labelText=="string"?e.labelText:e.labelText[0];let h=l.node(),f;e.labelType==="markdown"?f=ea(l,yr($s(u),i),{useHtmlLabels:s,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):f=h.appendChild(Xo(yr($s(u),i),e.labelStyle,!1,n));let d=f.getBBox(),p=e.padding/2;if(Vr(i.flowchart.htmlLabels)){let g=f.children[0],m=Ge(f),x=g.getElementsByTagName("img");if(x){let y=u.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...x].map(b=>new Promise(w=>{function _(){if(b.style.display="flex",b.style.flexDirection="column",y){let k=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,L=parseInt(k,10)*5+"px";b.style.minWidth=L,b.style.maxWidth=L}else b.style.width="100%";w(b)}v(_,"setupImage"),setTimeout(()=>{b.complete&&_()}),b.addEventListener("error",_),b.addEventListener("load",_)})))}d=g.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),ii=v((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");v(Ol,"insertPolygonShape");OZe=v(async(t,e)=>{e.useHtmlLabels||pe().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:n,bbox:i,halfPadding:a}=await Yi(t,e,"node "+e.classes,!0);re.info("Classes = ",e.classes);let s=n.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),ii(e,s),e.intersect=function(o){return $n.rect(e,o)},n},"note"),PZe=OZe,sge=v(t=>t?" "+t:"","formatClass"),no=v((t,e)=>`${e||"node default"}${sge(t.classes)} ${sge(t.class)}`,"getClassesFromNode"),oge=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];re.info("Question main (Circle)");let l=Ol(r,s,s,o);return l.attr("style",e.style),ii(e,l),e.intersect=function(u){return re.warn("Intersect called"),$n.polygon(e,o,u)},r},"question"),BZe=v((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(s){return $n.circle(e,14,s)},r},"choice"),FZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e,void 0),!0),i=4,a=n.height+e.padding,s=a/i,o=n.width+2*s+e.padding,l=[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],u=Ol(r,o,a,l);return u.attr("style",e.style),ii(e,u),e.intersect=function(h){return $n.polygon(e,l,h)},r},"hexagon"),zZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,void 0,!0),i=2,a=n.height+2*e.padding,s=a/i,o=n.width+2*s+e.padding,l=_Ze(e.directions,n,e),u=Ol(r,o,a,l);return u.attr("style",e.style),ii(e,u),e.intersect=function(h){return $n.polygon(e,l,h)},r},"block_arrow"),$Ze=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return Ol(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(l){return $n.polygon(e,s,l)},r},"rect_left_inv_arrow"),GZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=Ol(r,i,a,s);return o.attr("style",e.style),ii(e,o),e.intersect=function(l){return $n.polygon(e,s,l)},r},"lean_right"),UZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=Ol(r,i,a,s);return o.attr("style",e.style),ii(e,o),e.intersect=function(l){return $n.polygon(e,s,l)},r},"lean_left"),VZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=Ol(r,i,a,s);return o.attr("style",e.style),ii(e,o),e.intersect=function(l){return $n.polygon(e,s,l)},r},"trapezoid"),WZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=Ol(r,i,a,s);return o.attr("style",e.style),ii(e,o),e.intersect=function(l){return $n.polygon(e,s,l)},r},"inv_trapezoid"),HZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=Ol(r,i,a,s);return o.attr("style",e.style),ii(e,o),e.intersect=function(l){return $n.polygon(e,s,l)},r},"rect_right_inv_arrow"),qZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e,void 0),!0),i=n.width+e.padding,a=i/2,s=a/(2.5+i/50),o=n.height+s+e.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,u=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return ii(e,u),e.intersect=function(h){let f=$n.rect(e,h),d=f.x-e.x;if(a!=0&&(Math.abs(d)<e.width/2||Math.abs(d)==e.width/2&&Math.abs(f.y-e.y)>e.height/2-s)){let p=s*s*(1-d*d/(a*a));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-e.y>0&&(p=-p),f.y+=p}return f},r},"cylinder"),YZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Yi(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,u=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(cE(a,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{re.warn(`Unknown node property ${f}`)})}return ii(e,a),e.intersect=function(h){return $n.rect(e,h)},r},"rect"),XZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Yi(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,u=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(cE(a,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{re.warn(`Unknown node property ${f}`)})}return ii(e,a),e.intersect=function(h){return $n.rect(e,h)},r},"composite"),jZe=v(async(t,e)=>{let{shapeSvg:r}=await Yi(t,e,"label",!0);re.trace("Classes = ",e.class);let n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),e.props){let s=new Set(Object.keys(e.props));e.props.borders&&(cE(n,e.props.borders,i,a),s.delete("borders")),s.forEach(o=>{re.warn(`Unknown node property ${o}`)})}return ii(e,n),e.intersect=function(s){return $n.rect(e,s)},r},"labelRect");v(cE,"applyNodePropertyBorders");KZe=v((t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";let n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l="";typeof o=="object"?l=o[0]:l=o,re.info("Label text abc79",l,o,typeof o=="object");let u=s.node().appendChild(Xo(l,e.labelStyle,!0,!0)),h={width:0,height:0};if(Vr(pe().flowchart.htmlLabels)){let m=u.children[0],x=Ge(u);h=m.getBoundingClientRect(),x.attr("width",h.width),x.attr("height",h.height)}re.info("Text 2",o);let f=o.slice(1,o.length),d=u.getBBox(),p=s.node().appendChild(Xo(f.join?f.join("<br/>"):f,e.labelStyle,!0,!0));if(Vr(pe().flowchart.htmlLabels)){let m=p.children[0],x=Ge(p);h=m.getBoundingClientRect(),x.attr("width",h.width),x.attr("height",h.height)}let g=e.padding/2;return Ge(p).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+g+5)+")"),Ge(u).attr("transform","translate( "+(h.width<d.width?0:-(d.width-h.width)/2)+", 0)"),h=s.node().getBBox(),s.attr("transform","translate("+-h.width/2+", "+(-h.height/2-g+3)+")"),i.attr("class","outer title-state").attr("x",-h.width/2-g).attr("y",-h.height/2-g).attr("width",h.width+e.padding).attr("height",h.height+e.padding),a.attr("class","divider").attr("x1",-h.width/2-g).attr("x2",h.width/2+g).attr("y1",-h.height/2-g+d.height+g).attr("y2",-h.height/2-g+d.height+g),ii(e,i),e.intersect=function(m){return $n.rect(e,m)},n},"rectWithTitle"),ZZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return ii(e,s),e.intersect=function(o){return $n.rect(e,o)},r},"stadium"),QZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Yi(t,e,no(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),re.info("Circle main"),ii(e,a),e.intersect=function(s){return re.info("Circle intersect",e,n.width/2+i,s),$n.circle(e,n.width/2+i,s)},r},"circle"),JZe=v(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Yi(t,e,no(e,void 0),!0),a=5,s=r.insert("g",":first-child"),o=s.insert("circle"),l=s.insert("circle");return s.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+a).attr("width",n.width+e.padding+a*2).attr("height",n.height+e.padding+a*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),re.info("DoubleCircle main"),ii(e,o),e.intersect=function(u){return re.info("DoubleCircle intersect",e,n.width/2+i+a,u),$n.circle(e,n.width/2+i+a,u)},r},"doublecircle"),eQe=v(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Yi(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=Ol(r,i,a,s);return o.attr("style",e.style),ii(e,o),e.intersect=function(l){return $n.polygon(e,s,l)},r},"subroutine"),tQe=v((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),ii(e,n),e.intersect=function(i){return $n.circle(e,7,i)},r},"start"),lge=v((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;r==="LR"&&(i=10,a=70);let s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return ii(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return $n.rect(e,o)},n},"forkJoin"),rQe=v((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),ii(e,i),e.intersect=function(a){return $n.circle(e,7,a)},r},"end"),nQe=v((t,e)=>{let r=e.padding/2,n=4,i=8,a;e.classes?a="node "+e.classes:a="node default";let s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),o=s.insert("rect",":first-child"),l=s.insert("line"),u=s.insert("line"),h=0,f=n,d=s.insert("g").attr("class","label"),p=0,g=e.classData.annotations?.[0],m=e.classData.annotations[0]?"\\xAB"+e.classData.annotations[0]+"\\xBB":"",x=d.node().appendChild(Xo(m,e.labelStyle,!0,!0)),y=x.getBBox();if(Vr(pe().flowchart.htmlLabels)){let S=x.children[0],C=Ge(x);y=S.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height)}e.classData.annotations[0]&&(f+=y.height+n,h+=y.width);let b=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(pe().flowchart.htmlLabels?b+="<"+e.classData.type+">":b+="<"+e.classData.type+">");let w=d.node().appendChild(Xo(b,e.labelStyle,!0,!0));Ge(w).attr("class","classTitle");let _=w.getBBox();if(Vr(pe().flowchart.htmlLabels)){let S=w.children[0],C=Ge(w);_=S.getBoundingClientRect(),C.attr("width",_.width),C.attr("height",_.height)}f+=_.height+n,_.width>h&&(h=_.width);let k=[];e.classData.members.forEach(S=>{let C=S.getDisplayDetails(),M=C.displayText;pe().flowchart.htmlLabels&&(M=M.replace(/</g,"<").replace(/>/g,">"));let R=d.node().appendChild(Xo(M,C.cssStyle?C.cssStyle:e.labelStyle,!0,!0)),T=R.getBBox();if(Vr(pe().flowchart.htmlLabels)){let I=R.children[0],A=Ge(R);T=I.getBoundingClientRect(),A.attr("width",T.width),A.attr("height",T.height)}T.width>h&&(h=T.width),f+=T.height+n,k.push(R)}),f+=i;let E=[];if(e.classData.methods.forEach(S=>{let C=S.getDisplayDetails(),M=C.displayText;pe().flowchart.htmlLabels&&(M=M.replace(/</g,"<").replace(/>/g,">"));let R=d.node().appendChild(Xo(M,C.cssStyle?C.cssStyle:e.labelStyle,!0,!0)),T=R.getBBox();if(Vr(pe().flowchart.htmlLabels)){let I=R.children[0],A=Ge(R);T=I.getBoundingClientRect(),A.attr("width",T.width),A.attr("height",T.height)}T.width>h&&(h=T.width),f+=T.height+n,E.push(R)}),f+=i,g){let S=(h-y.width)/2;Ge(x).attr("transform","translate( "+(-1*h/2+S)+", "+-1*f/2+")"),p=y.height+n}let L=(h-_.width)/2;return Ge(w).attr("transform","translate( "+(-1*h/2+L)+", "+(-1*f/2+p)+")"),p+=_.height+n,l.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+i+p).attr("y2",-f/2-r+i+p),p+=i,k.forEach(S=>{Ge(S).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+i/2)+")");let C=S?.getBBox();p+=(C?.height??0)+n}),p+=i,u.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+i+p).attr("y2",-f/2-r+i+p),p+=i,E.forEach(S=>{Ge(S).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");let C=S?.getBBox();p+=(C?.height??0)+n}),o.attr("style",e.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(f/2)-r).attr("width",h+e.padding).attr("height",f+e.padding),ii(e,o),e.intersect=function(S){return $n.rect(e,S)},s},"class_box"),cge={rhombus:oge,composite:XZe,question:oge,rect:YZe,labelRect:jZe,rectWithTitle:KZe,choice:BZe,circle:QZe,doublecircle:JZe,stadium:ZZe,hexagon:FZe,block_arrow:zZe,rect_left_inv_arrow:$Ze,lean_right:GZe,lean_left:UZe,trapezoid:VZe,inv_trapezoid:WZe,rect_right_inv_arrow:HZe,cylinder:qZe,start:tQe,end:rQe,note:PZe,subroutine:eQe,fork:lge,join:lge,class_box:nQe},sE={},Ege=v(async(t,e,r)=>{let n,i;if(e.link){let a;pe().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await cge[e.shape](n,e,r)}else i=await cge[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),sE[e.id]=n,e.haveCallback&&sE[e.id].attr("class",sE[e.id].attr("class")+" clickable"),n},"insertNode"),iQe=v(t=>{let e=sE[t.id];re.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode");v(MO,"getNodeFromBlock");v(Sge,"calculateBlockSize");v(Cge,"insertBlockPositioned");v(uE,"performOperations");v(Age,"calculateBlockSizes");v(_ge,"insertBlocks");v(Lge,"insertEdges");aQe=v(function(t,e){return e.db.getClasses()},"getClasses"),sQe=v(async function(t,e,r,n){let{securityLevel:i,block:a}=Or(),s=n.db,o;i==="sandbox"&&(o=Ge("#i"+e));let l=i==="sandbox"?Ge(o.nodes()[0].contentDocument.body):Ge("body"),u=i==="sandbox"?l.select(`[id="${e}"]`):Ge(`[id="${e}"]`);vZe(u,["point","circle","cross"],n.type,e);let f=s.getBlocks(),d=s.getBlocksFlat(),p=s.getEdges(),g=u.insert("g").attr("class","block");await Age(g,f,s);let m=mge(s);if(await _ge(g,f,s),await Lge(g,p,d,s,e),m){let x=m,y=Math.max(1,Math.round(.125*(x.width/x.height))),b=x.height+y+10,w=x.width+10,{useMaxWidth:_}=a;Wr(u,b,w,!!_),re.debug("Here Bounds",m,x),u.attr("viewBox",`${x.x-5} ${x.y-5} ${x.width+10} ${x.height+10}`)}},"draw"),oQe={draw:sQe,getClasses:aQe},lQe={parser:FKe,db:nZe,renderer:oQe,styles:aZe}});var OO=yi((Px,DO)=>{(function(e,r){typeof Px=="object"&&typeof DO=="object"?DO.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Px=="object"?Px.layoutBase=r():e.layoutBase=r()})(Px,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=28)}([function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";function n(i){this.vGraphObject=i}t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(5);function u(f,d,p,g){p==null&&g==null&&(g=d),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(m.target==f){if(m.source!=g)throw"Incorrect edge source!";d.push(m)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==f||m.source==f)&&d.push(m)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;m<g.length;m++)d=g[m],p=d.withChildren(),p.forEach(function(x){f.add(x)});return f},u.prototype.getNoOfChildren=function(){var f=0,d;if(this.child==null)f=1;else for(var p=this.child.getNodes(),g=0;g<p.length;g++)d=p[g],f+=d.getNoOfChildren();return f==0&&(f=1),f},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},u.prototype.scatter=function(){var f,d,p=-s.INITIAL_WORLD_BOUNDARY,g=s.INITIAL_WORLD_BOUNDARY;f=s.WORLD_CENTER_X+o.nextDouble()*(g-p)+p;var m=-s.INITIAL_WORLD_BOUNDARY,x=s.INITIAL_WORLD_BOUNDARY;d=s.WORLD_CENTER_Y+o.nextDouble()*(x-m)+m,this.rect.x=f,this.rect.y=d},u.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var f=this.getChild();if(f.updateBounds(!0),this.rect.x=f.getLeft(),this.rect.y=f.getTop(),this.setWidth(f.getRight()-f.getLeft()),this.setHeight(f.getBottom()-f.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var d=f.getRight()-f.getLeft(),p=f.getBottom()-f.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(d+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>d?(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(d+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(p+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>p?(this.rect.y-=(this.labelHeight-p)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(p+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var g=new l(d,p),m=f.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u},function(t,e,r){"use strict";var n=r(0);function i(){}for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(7),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(g,m,x){n.call(this,x),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(g,m,x){if(m==null&&x==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var b=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(x)>-1))throw"Source or target not in graph!";if(!(m.owner==x.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=x.owner?null:(b.source=m,b.target=x,b.isInterGraph=!1,this.getEdges().push(b),m.edges.push(b),x!=m&&x.edges.push(b),b)}},d.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var x=m.edges.slice(),y,b=x.length,w=0;w<b;w++)y=x[w],y.isInterGraph?this.graphManager.remove(y):y.source.owner.remove(y);var _=this.nodes.indexOf(m);if(_==-1)throw"Node not in owner node list!";this.nodes.splice(_,1)}else if(g instanceof l){var y=g;if(y==null)throw"Edge is null!";if(!(y.source!=null&&y.target!=null))throw"Source and/or target is null!";if(!(y.source.owner!=null&&y.target.owner!=null&&y.source.owner==this&&y.target.owner==this))throw"Source and/or target owner is invalid!";var k=y.source.edges.indexOf(y),E=y.target.edges.indexOf(y);if(!(k>-1&&E>-1))throw"Source and/or target doesn\'t know this edge!";y.source.edges.splice(k,1),y.target!=y.source&&y.target.edges.splice(E,1);var _=y.source.owner.getEdges().indexOf(y);if(_==-1)throw"Not in owner\'s edge list!";y.source.owner.getEdges().splice(_,1)}},d.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,m=i.MAX_VALUE,x,y,b,w=this.getNodes(),_=w.length,k=0;k<_;k++){var E=w[k];x=E.getTop(),y=E.getLeft(),g>x&&(g=x),m>y&&(m=y)}return g==i.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?b=w[0].getParent().paddingLeft:b=this.margin,this.left=m-b,this.top=g-b,new h(this.left,this.top))},d.prototype.updateBounds=function(g){for(var m=i.MAX_VALUE,x=-i.MAX_VALUE,y=i.MAX_VALUE,b=-i.MAX_VALUE,w,_,k,E,L,S=this.nodes,C=S.length,M=0;M<C;M++){var R=S[M];g&&R.child!=null&&R.updateBounds(),w=R.getLeft(),_=R.getRight(),k=R.getTop(),E=R.getBottom(),m>w&&(m=w),x<_&&(x=_),y>k&&(y=k),b<E&&(b=E)}var T=new u(m,y,x-m,b-y);m==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),S[0].getParent().paddingLeft!=null?L=S[0].getParent().paddingLeft:L=this.margin,this.left=T.x-L,this.right=T.x+T.width+L,this.top=T.y-L,this.bottom=T.y+T.height+L},d.calculateBounds=function(g){for(var m=i.MAX_VALUE,x=-i.MAX_VALUE,y=i.MAX_VALUE,b=-i.MAX_VALUE,w,_,k,E,L=g.length,S=0;S<L;S++){var C=g[S];w=C.getLeft(),_=C.getRight(),k=C.getTop(),E=C.getBottom(),m>w&&(m=w),x<_&&(x=_),y>k&&(y=k),b<E&&(b=E)}var M=new u(m,y,x-m,b-y);return M},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var g=0,m=this.nodes,x=m.length,y=0;y<x;y++){var b=m[y];g+=b.calcEstimatedSize()}return g==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=g/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var g=this;if(this.nodes.length==0){this.isConnected=!0;return}var m=new f,x=new Set,y=this.nodes[0],b,w,_=y.withChildren();for(_.forEach(function(M){m.push(M),x.add(M)});m.length!==0;){y=m.shift(),b=y.getEdges();for(var k=b.length,E=0;E<k;E++){var L=b[E];if(w=L.getOtherEndInGraph(y,this),w!=null&&!x.has(w)){var S=w.withChildren();S.forEach(function(M){m.push(M),x.add(M)})}}}if(this.isConnected=!1,x.size>=this.nodes.length){var C=0;x.forEach(function(M){M.owner==g&&C++}),C==this.nodes.length&&(this.isConnected=!0)}},t.exports=d},function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(6),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f<h;f++)u=l[f],o.remove(u);var d=[];d=d.concat(o.getNodes());var p;h=d.length;for(var f=0;f<h;f++)p=d[f],o.remove(p);o==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(o);this.graphs.splice(g,1),o.parent=null}else if(s instanceof i){if(u=s,u==null)throw"Edge is null!";if(!u.isInterGraph)throw"Not an inter-graph edge!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.edges.indexOf(u)!=-1&&u.target.edges.indexOf(u)!=-1))throw"Source and/or target doesn\'t know this edge!";var g=u.source.edges.indexOf(u);if(u.source.edges.splice(g,1),g=u.target.edges.indexOf(u),u.target.edges.splice(g,1),!(u.source.owner!=null&&u.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(u.source.owner.getGraphManager().edges.indexOf(u)==-1)throw"Not in owner graph manager\'s edge list!";var g=u.source.owner.getGraphManager().edges.indexOf(u);u.source.owner.getGraphManager().edges.splice(g,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var s=[],o=this.getGraphs(),l=o.length,u=0;u<l;u++)s=s.concat(o[u].getNodes());this.allNodes=s}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){for(var s=[],o=this.getGraphs(),l=o.length,u=0;u<o.length;u++)s=s.concat(o[u].getEdges());s=s.concat(this.edges),this.allEdges=s}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(s){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=s},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(s){if(s.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=s,s.parent==null&&(s.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(s,o){if(!(s!=null&&o!=null))throw"assert failed";if(s==o)return!0;var l=s.getOwner(),u;do{if(u=l.getParent(),u==null)break;if(u==o)return!0;if(l=u.getOwner(),l==null)break}while(!0);l=o.getOwner();do{if(u=l.getParent(),u==null)break;if(u==s)return!0;if(l=u.getOwner(),l==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var s,o,l,u,h,f=this.getAllEdges(),d=f.length,p=0;p<d;p++){if(s=f[p],o=s.source,l=s.target,s.lca=null,s.sourceInLca=o,s.targetInLca=l,o==l){s.lca=o.getOwner();continue}for(u=o.getOwner();s.lca==null;){for(s.targetInLca=l,h=l.getOwner();s.lca==null;){if(h==u){s.lca=h;break}if(h==this.rootGraph)break;if(s.lca!=null)throw"assert failed";s.targetInLca=h.getParent(),h=s.targetInLca.getOwner()}if(u==this.rootGraph)break;s.lca==null&&(s.sourceInLca=u.getParent(),u=s.sourceInLca.getOwner())}if(s.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(s,o){if(s==o)return s.getOwner();var l=s.getOwner();do{if(l==null)break;var u=o.getOwner();do{if(u==null)break;if(u==l)return u;u=u.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},a.prototype.calcInclusionTreeDepths=function(s,o){s==null&&o==null&&(s=this.rootGraph,o=1);for(var l,u=s.getNodes(),h=u.length,f=0;f<h;f++)l=u[f],l.inclusionTreeDepth=o,l.child!=null&&this.calcInclusionTreeDepths(l.child,o+1)},a.prototype.includesInvalidEdge=function(){for(var s,o=[],l=this.edges.length,u=0;u<l;u++)s=this.edges[u],this.isOneAncestorOfOther(s.source,s.target)&&o.push(s);for(var u=0;u<o.length;u++)this.remove(o[u]);return!1},t.exports=a},function(t,e,r){"use strict";var n=r(12);function i(){}i.calcSeparationAmount=function(a,s,o,l){if(!a.intersects(s))throw"assert failed";var u=new Array(2);this.decideDirectionsForOverlappingNodes(a,s,u),o[0]=Math.min(a.getRight(),s.getRight())-Math.max(a.x,s.x),o[1]=Math.min(a.getBottom(),s.getBottom())-Math.max(a.y,s.y),a.getX()<=s.getX()&&a.getRight()>=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]<d?d=o[0]:f=o[1],o[0]=-1*u[0]*(d/2+l),o[1]=-1*u[1]*(f/2+l)},i.decideDirectionsForOverlappingNodes=function(a,s,o){a.getCenterX()<s.getCenterX()?o[0]=-1:o[0]=1,a.getCenterY()<s.getCenterY()?o[1]=-1:o[1]=1},i.getIntersection2=function(a,s,o){var l=a.getCenterX(),u=a.getCenterY(),h=s.getCenterX(),f=s.getCenterY();if(a.intersects(s))return o[0]=l,o[1]=u,o[2]=h,o[3]=f,!0;var d=a.getX(),p=a.getY(),g=a.getRight(),m=a.getX(),x=a.getBottom(),y=a.getRight(),b=a.getWidthHalf(),w=a.getHeightHalf(),_=s.getX(),k=s.getY(),E=s.getRight(),L=s.getX(),S=s.getBottom(),C=s.getRight(),M=s.getWidthHalf(),R=s.getHeightHalf(),T=!1,I=!1;if(l===h){if(u>f)return o[0]=l,o[1]=p,o[2]=h,o[3]=S,!1;if(u<f)return o[0]=l,o[1]=x,o[2]=h,o[3]=k,!1}else if(u===f){if(l>h)return o[0]=d,o[1]=u,o[2]=E,o[3]=f,!1;if(l<h)return o[0]=g,o[1]=u,o[2]=_,o[3]=f,!1}else{var A=a.height/a.width,D=s.height/s.width,N=(f-u)/(h-l),O=void 0,B=void 0,P=void 0,$=void 0,z=void 0,H=void 0;if(-A===N?l>h?(o[0]=m,o[1]=x,T=!0):(o[0]=g,o[1]=p,T=!0):A===N&&(l>h?(o[0]=d,o[1]=p,T=!0):(o[0]=y,o[1]=x,T=!0)),-D===N?h>l?(o[2]=L,o[3]=S,I=!0):(o[2]=E,o[3]=k,I=!0):D===N&&(h>l?(o[2]=_,o[3]=k,I=!0):(o[2]=C,o[3]=S,I=!0)),T&&I)return!1;if(l>h?u>f?(O=this.getCardinalDirection(A,N,4),B=this.getCardinalDirection(D,N,2)):(O=this.getCardinalDirection(-A,N,3),B=this.getCardinalDirection(-D,N,1)):u>f?(O=this.getCardinalDirection(-A,N,1),B=this.getCardinalDirection(-D,N,3)):(O=this.getCardinalDirection(A,N,2),B=this.getCardinalDirection(D,N,4)),!T)switch(O){case 1:$=p,P=l+-w/N,o[0]=P,o[1]=$;break;case 2:P=y,$=u+b*N,o[0]=P,o[1]=$;break;case 3:$=x,P=l+w/N,o[0]=P,o[1]=$;break;case 4:P=m,$=u+-b*N,o[0]=P,o[1]=$;break}if(!I)switch(B){case 1:H=k,z=h+-R/N,o[2]=z,o[3]=H;break;case 2:z=C,H=f+M*N,o[2]=z,o[3]=H;break;case 3:H=S,z=h+R/N,o[2]=z,o[3]=H;break;case 4:z=L,H=f+-M*N,o[2]=z,o[3]=H;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,x=l.y,y=void 0,b=void 0,w=void 0,_=void 0,k=void 0,E=void 0,L=void 0,S=void 0,C=void 0;return w=d-h,k=u-f,L=f*h-u*d,_=x-g,E=p-m,S=m*g-p*x,C=w*E-_*k,C===0?null:(y=(k*S-E*L)/C,b=(_*L-w*S)/C,new n(y,b))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o<a?u+=Math.PI:l<s&&(u+=this.TWO_PI)):l<s?u=this.ONE_AND_HALF_PI:u=this.HALF_PI,u},i.doIntersect=function(a,s,o,l){var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,g=o.y,m=l.x,x=l.y,y=(f-u)*(x-g)-(m-p)*(d-h);if(y===0)return!1;var b=((x-g)*(m-u)+(p-m)*(x-h))/y,w=((h-d)*(m-u)+(f-u)*(x-h))/y;return 0<b&&b<1&&0<w&&w<1},i.findCircleLineIntersections=function(a,s,o,l,u,h,f){var d=(o-a)*(o-a)+(l-s)*(l-s),p=2*((a-u)*(o-a)+(s-h)*(l-s)),g=(a-u)*(a-u)+(s-h)*(s-h)-f*f,m=p*p-4*d*g;if(m>=0){var x=(-p+Math.sqrt(p*p-4*d*g))/(2*d),y=(-p-Math.sqrt(p*p-4*d*g))/(2*d),b=null;return x>=0&&x<=1?[x]:y>=0&&y<=1?[y]:b}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,r){"use strict";function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n},function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function u(h,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,p.key,p)}}return function(h,f,d){return f&&u(h.prototype,f),d&&u(h,d),h}}();function i(u,h){if(!(u instanceof h))throw new TypeError("Cannot call a class as a function")}var a=function(h){return{value:h,next:null,prev:null}},s=function(h,f,d,p){return h!==null?h.next=f:p.head=f,d!==null?d.prev=f:p.tail=f,f.prev=h,f.next=d,p.length++,f},o=function(h,f){var d=h.prev,p=h.next;return d!==null?d.next=p:f.head=p,p!==null?p.prev=d:f.tail=d,h.prev=h.next=null,f.length--,h},l=function(){function u(h){var f=this;i(this,u),this.length=0,this.head=null,this.tail=null,h?.forEach(function(d){return f.push(d)})}return n(u,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(f,d){return s(d.prev,a(f),d,this)}},{key:"insertAfter",value:function(f,d){return s(d,a(f),d.next,this)}},{key:"insertNodeBefore",value:function(f,d){return s(d.prev,f,d,this)}},{key:"insertNodeAfter",value:function(f,d){return s(d,f,d.next,this)}},{key:"push",value:function(f){return s(this.tail,a(f),null,this)}},{key:"unshift",value:function(f){return s(null,a(f),this.head,this)}},{key:"remove",value:function(f){return o(f,this)}},{key:"pop",value:function(){return o(this.tail,this).value}},{key:"popNode",value:function(){return o(this.tail,this)}},{key:"shift",value:function(){return o(this.head,this).value}},{key:"shiftNode",value:function(){return o(this.head,this)}},{key:"get_object_at",value:function(f){if(f<=this.length()){for(var d=1,p=this.head;d<f;)p=p.next,d++;return p.value}}},{key:"set_object_at",value:function(f,d){if(f<=this.length()){for(var p=1,g=this.head;p<f;)g=g.next,p++;g.value=d}}}]),u}();t.exports=l},function(t,e,r){"use strict";function n(i,a,s){this.x=null,this.y=null,i==null&&a==null&&s==null?(this.x=0,this.y=0):typeof i=="number"&&typeof a=="number"&&s==null?(this.x=i,this.y=a):i.constructor.name=="Point"&&a==null&&s==null&&(s=i,this.x=s.x,this.y=s.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(i,a,s){i.constructor.name=="Point"&&a==null&&s==null?(s=i,this.setLocation(s.x,s.y)):typeof i=="number"&&typeof a=="number"&&s==null&&(parseInt(i)==i&&parseInt(a)==a?this.move(i,a):(this.x=Math.floor(i+.5),this.y=Math.floor(a+.5)))},n.prototype.move=function(i,a){this.x=i,this.y=a},n.prototype.translate=function(i,a){this.x+=i,this.y+=a},n.prototype.equals=function(i){if(i.constructor.name=="Point"){var a=i;return this.x==a.x&&this.y==a.y}return this==i},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,r){"use strict";function n(i,a,s,o){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&a!=null&&s!=null&&o!=null&&(this.x=i,this.y=a,this.width=s,this.height=o)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(i){this.x=i},n.prototype.getY=function(){return this.y},n.prototype.setY=function(i){this.y=i},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,r){"use strict";var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function i(){}i.lastID=0,i.createID=function(a){return i.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=i.getString(),i.lastID++),a.uniqueID)},i.getString=function(a){return a==null&&(a=i.lastID),"Object#"+a},i.isPrimitive=function(a){var s=typeof a>"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},t.exports=i},function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var g=0,m=Array(p.length);g<p.length;g++)m[g]=p[g];return m}else return Array.from(p)}var i=r(0),a=r(7),s=r(3),o=r(1),l=r(6),u=r(5),h=r(17),f=r(29);function d(p){f.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,p!=null&&(this.isRemoteUse=p)}d.RANDOM_SEED=1,d.prototype=Object.create(f.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var p=new a(this);return this.graphManager=p,p},d.prototype.newGraph=function(p){return new l(null,this.graphManager,p)},d.prototype.newNode=function(p){return new s(this.graphManager,p)},d.prototype.newEdge=function(p){return new o(null,null,p)},d.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var p;return this.checkLayoutSuccess()?p=!1:p=this.layout(),i.ANIMATE==="during"?!1:(p&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,p)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var p,g=this.graphManager.getAllEdges(),m=0;m<g.length;m++)p=g[m];for(var x,y=this.graphManager.getRoot().getNodes(),m=0;m<y.length;m++)x=y[m];this.update(this.graphManager.getRoot())}},d.prototype.update=function(p){if(p==null)this.update2();else if(p instanceof s){var g=p;if(g.getChild()!=null)for(var m=g.getChild().getNodes(),x=0;x<m.length;x++)update(m[x]);if(g.vGraphObject!=null){var y=g.vGraphObject;y.update(g)}}else if(p instanceof o){var b=p;if(b.vGraphObject!=null){var w=b.vGraphObject;w.update(b)}}else if(p instanceof l){var _=p;if(_.vGraphObject!=null){var k=_.vGraphObject;k.update(_)}}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(p){if(p==null)this.transform(new u(0,0));else{var g=new h,m=this.graphManager.getRoot().updateLeftTop();if(m!=null){g.setWorldOrgX(p.x),g.setWorldOrgY(p.y),g.setDeviceOrgX(m.x),g.setDeviceOrgY(m.y);for(var x=this.getAllNodes(),y,b=0;b<x.length;b++)y=x[b],y.transform(g)}}},d.prototype.positionNodesRandomly=function(p){if(p==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,m,x=p.getNodes(),y=0;y<x.length;y++)g=x[y],m=g.getChild(),m==null||m.getNodes().length==0?g.scatter():(this.positionNodesRandomly(m),g.updateBounds())},d.prototype.getFlatForest=function(){for(var p=[],g=!0,m=this.graphManager.getRoot().getNodes(),x=!0,y=0;y<m.length;y++)m[y].getChild()!=null&&(x=!1);if(!x)return p;var b=new Set,w=[],_=new Map,k=[];for(k=k.concat(m);k.length>0&&g;){for(w.push(k[0]);w.length>0&&g;){var E=w[0];w.splice(0,1),b.add(E);for(var L=E.getEdges(),y=0;y<L.length;y++){var S=L[y].getOtherEnd(E);if(_.get(E)!=S)if(!b.has(S))w.push(S),_.set(S,E);else{g=!1;break}}}if(!g)p=[];else{var C=[].concat(n(b));p.push(C);for(var y=0;y<C.length;y++){var M=C[y],R=k.indexOf(M);R>-1&&k.splice(R,1)}b=new Set,_=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var g=[],m=p.source,x=this.graphManager.calcLowestCommonAncestor(p.source,p.target),y=0;y<p.bendpoints.length;y++){var b=this.newNode(null);b.setRect(new Point(0,0),new Dimension(1,1)),x.add(b);var w=this.newEdge(null);this.graphManager.add(w,m,b),g.add(b),m=b}var w=this.newEdge(null);return this.graphManager.add(w,m,p.target),this.edgeToDummyNodes.set(p,g),p.isInterGraph()?this.graphManager.remove(p):x.remove(p),g},d.prototype.createBendpointsFromDummyNodes=function(){var p=[];p=p.concat(this.graphManager.getAllEdges()),p=[].concat(n(this.edgeToDummyNodes.keys())).concat(p);for(var g=0;g<p.length;g++){var m=p[g];if(m.bendpoints.length>0){for(var x=this.edgeToDummyNodes.get(m),y=0;y<x.length;y++){var b=x[y],w=new u(b.getCenterX(),b.getCenterY()),_=m.bendpoints.get(y);_.x=w.x,_.y=w.y,b.getOwner().remove(b)}this.graphManager.add(m,m.source,m.target)}}},d.transform=function(p,g,m,x){if(m!=null&&x!=null){var y=g;if(p<=50){var b=g/m;y-=(g-b)/50*(50-p)}else{var w=g*x;y+=(w-g)/50*(p-50)}return y}else{var _,k;return p<=50?(_=9*g/500,k=g/10):(_=9*g/50,k=-8*g),_*p+k}},d.findCenterOfTree=function(p){var g=[];g=g.concat(p);var m=[],x=new Map,y=!1,b=null;(g.length==1||g.length==2)&&(y=!0,b=g[0]);for(var w=0;w<g.length;w++){var _=g[w],k=_.getNeighborsList().size;x.set(_,_.getNeighborsList().size),k==1&&m.push(_)}var E=[];for(E=E.concat(m);!y;){var L=[];L=L.concat(E),E=[];for(var w=0;w<g.length;w++){var _=g[w],S=g.indexOf(_);S>=0&&g.splice(S,1);var C=_.getNeighborsList();C.forEach(function(T){if(m.indexOf(T)<0){var I=x.get(T),A=I-1;A==1&&E.push(T),x.set(T,A)}})}m=m.concat(E),(g.length==1||g.length==2)&&(y=!0,b=g[0])}return b},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d},function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(5);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},t.exports=i},function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);d<f.length;d++)p[d]=f[d];return p}else return Array.from(f)}var i=r(15),a=r(4),s=r(0),o=r(8),l=r(9);function u(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}u.prototype=Object.create(i.prototype);for(var h in i)u[h]=i[h];u.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var f,d,p,g,m,x,y,b=this.getGraphManager().getAllEdges(),w=0;w<b.length;w++)f=b[w],d=f.idealLength,f.isInterGraph&&(g=f.getSource(),m=f.getTarget(),x=f.getSourceInLca().getEstimatedSize(),y=f.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(f.idealLength+=x+y-2*s.SIMPLE_NODE_SIZE),p=f.getLca().getInclusionTreeDepth(),f.idealLength+=d*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+m.getInclusionTreeDepth()-2*p))},u.prototype.initSpringEmbedder=function(){var f=this.getAllNodes().length;this.incremental?(f>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p<f.length;p++)d=f[p],this.calcSpringForce(d,d.idealLength)},u.prototype.calcRepulsionForces=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,g,m,x,y=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,p=0;p<y.length;p++)m=y[p],this.calculateRepulsionForceOfANode(m,b,f,d),b.add(m);else for(p=0;p<y.length;p++)for(m=y[p],g=p+1;g<y.length;g++)x=y[g],m.getOwner()==x.getOwner()&&this.calcRepulsionForce(m,x)},u.prototype.calcGravitationalForces=function(){for(var f,d=this.getAllNodesToApplyGravitation(),p=0;p<d.length;p++)f=d[p],this.calcGravitationalForce(f)},u.prototype.moveNodes=function(){for(var f=this.getAllNodes(),d,p=0;p<f.length;p++)d=f[p],d.move()},u.prototype.calcSpringForce=function(f,d){var p=f.getSource(),g=f.getTarget(),m,x,y,b;if(this.uniformLeafNodeSizes&&p.getChild()==null&&g.getChild()==null)f.updateLengthSimple();else if(f.updateLength(),f.isOverlapingSourceAndTarget)return;m=f.getLength(),m!=0&&(x=f.edgeElasticity*(m-d),y=x*(f.lengthX/m),b=x*(f.lengthY/m),p.springForceX+=y,p.springForceY+=b,g.springForceX-=y,g.springForceY-=b)},u.prototype.calcRepulsionForce=function(f,d){var p=f.getRect(),g=d.getRect(),m=new Array(2),x=new Array(4),y,b,w,_,k,E,L;if(p.intersects(g)){o.calcSeparationAmount(p,g,m,a.DEFAULT_EDGE_LENGTH/2),E=2*m[0],L=2*m[1];var S=f.noOfChildren*d.noOfChildren/(f.noOfChildren+d.noOfChildren);f.repulsionForceX-=S*E,f.repulsionForceY-=S*L,d.repulsionForceX+=S*E,d.repulsionForceY+=S*L}else this.uniformLeafNodeSizes&&f.getChild()==null&&d.getChild()==null?(y=g.getCenterX()-p.getCenterX(),b=g.getCenterY()-p.getCenterY()):(o.getIntersection(p,g,x),y=x[2]-x[0],b=x[3]-x[1]),Math.abs(y)<a.MIN_REPULSION_DIST&&(y=l.sign(y)*a.MIN_REPULSION_DIST),Math.abs(b)<a.MIN_REPULSION_DIST&&(b=l.sign(b)*a.MIN_REPULSION_DIST),w=y*y+b*b,_=Math.sqrt(w),k=(f.nodeRepulsion/2+d.nodeRepulsion/2)*f.noOfChildren*d.noOfChildren/w,E=k*y/_,L=k*b/_,f.repulsionForceX-=E,f.repulsionForceY-=L,d.repulsionForceX+=E,d.repulsionForceY+=L},u.prototype.calcGravitationalForce=function(f){var d,p,g,m,x,y,b,w;d=f.getOwner(),p=(d.getRight()+d.getLeft())/2,g=(d.getTop()+d.getBottom())/2,m=f.getCenterX()-p,x=f.getCenterY()-g,y=Math.abs(m)+f.getWidth()/2,b=Math.abs(x)+f.getHeight()/2,f.getOwner()==this.graphManager.getRoot()?(w=d.getEstimatedSize()*this.gravityRangeFactor,(y>w||b>w)&&(f.gravitationForceX=-this.gravityConstant*m,f.gravitationForceY=-this.gravityConstant*x)):(w=d.getEstimatedSize()*this.compoundGravityRangeFactor,(y>w||b>w)&&(f.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*x*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,f||d},u.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},u.prototype.calcNoOfChildrenForAllNodes=function(){for(var f,d=this.graphManager.getAllNodes(),p=0;p<d.length;p++)f=d[p],f.noOfChildren=f.getNoOfChildren()},u.prototype.calcGrid=function(f){var d=0,p=0;d=parseInt(Math.ceil((f.getRight()-f.getLeft())/this.repulsionRange)),p=parseInt(Math.ceil((f.getBottom()-f.getTop())/this.repulsionRange));for(var g=new Array(d),m=0;m<d;m++)g[m]=new Array(p);for(var m=0;m<d;m++)for(var x=0;x<p;x++)g[m][x]=new Array;return g},u.prototype.addNodeToGrid=function(f,d,p){var g=0,m=0,x=0,y=0;g=parseInt(Math.floor((f.getRect().x-d)/this.repulsionRange)),m=parseInt(Math.floor((f.getRect().width+f.getRect().x-d)/this.repulsionRange)),x=parseInt(Math.floor((f.getRect().y-p)/this.repulsionRange)),y=parseInt(Math.floor((f.getRect().height+f.getRect().y-p)/this.repulsionRange));for(var b=g;b<=m;b++)for(var w=x;w<=y;w++)this.grid[b][w].push(f),f.setGridCoordinates(g,m,x,y)},u.prototype.updateGrid=function(){var f,d,p=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),f=0;f<p.length;f++)d=p[f],this.addNodeToGrid(d,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},u.prototype.calculateRepulsionForceOfANode=function(f,d,p,g){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&p||g){var m=new Set;f.surrounding=new Array;for(var x,y=this.grid,b=f.startX-1;b<f.finishX+2;b++)for(var w=f.startY-1;w<f.finishY+2;w++)if(!(b<0||w<0||b>=y.length||w>=y[0].length)){for(var _=0;_<y[b][w].length;_++)if(x=y[b][w][_],!(f.getOwner()!=x.getOwner()||f==x)&&!d.has(x)&&!m.has(x)){var k=Math.abs(f.getCenterX()-x.getCenterX())-(f.getWidth()/2+x.getWidth()/2),E=Math.abs(f.getCenterY()-x.getCenterY())-(f.getHeight()/2+x.getHeight()/2);k<=this.repulsionRange&&E<=this.repulsionRange&&m.add(x)}}f.surrounding=[].concat(n(m))}for(b=0;b<f.surrounding.length;b++)this.calcRepulsionForce(f,f.surrounding[b])},u.prototype.calcRepulsionRange=function(){return 0},t.exports=u},function(t,e,r){"use strict";var n=r(1),i=r(4);function a(o,l,u){n.call(this,o,l,u),this.idealLength=i.DEFAULT_EDGE_LENGTH,this.edgeElasticity=i.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];t.exports=a},function(t,e,r){"use strict";var n=r(3),i=r(4);function a(o,l,u,h){n.call(this,o,l,u,h),this.nodeRepulsion=i.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];a.prototype.setGridCoordinates=function(o,l,u,h){this.startX=o,this.finishX=l,this.startY=u,this.finishY=h},t.exports=a},function(t,e,r){"use strict";function n(i,a){this.width=0,this.height=0,i!==null&&a!==null&&(this.height=a,this.width=i)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},t.exports=n},function(t,e,r){"use strict";var n=r(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(a,s){var o=n.createID(a);this.contains(o)||(this.map[o]=s,this.keys.push(a))},i.prototype.contains=function(a){var s=n.createID(a);return this.map[a]!=null},i.prototype.get=function(a){var s=n.createID(a);return this.map[s]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,r){"use strict";var n=r(14);function i(){this.set={}}i.prototype.add=function(a){var s=n.createID(a);this.contains(s)||(this.set[s]=a)},i.prototype.remove=function(a){delete this.set[n.createID(a)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(a){return this.set[n.createID(a)]==a},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(a){for(var s=Object.keys(this.set),o=s.length,l=0;l<o;l++)a.push(this.set[s[l]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(a){for(var s=a.length,o=0;o<s;o++){var l=a[o];this.add(l)}},t.exports=i},function(t,e,r){"use strict";function n(){}n.multMat=function(i,a){for(var s=[],o=0;o<i.length;o++){s[o]=[];for(var l=0;l<a[0].length;l++){s[o][l]=0;for(var u=0;u<i[0].length;u++)s[o][l]+=i[o][u]*a[u][l]}}return s},n.transpose=function(i){for(var a=[],s=0;s<i[0].length;s++){a[s]=[];for(var o=0;o<i.length;o++)a[s][o]=i[o][s]}return a},n.multCons=function(i,a){for(var s=[],o=0;o<i.length;o++)s[o]=i[o]*a;return s},n.minusOp=function(i,a){for(var s=[],o=0;o<i.length;o++)s[o]=i[o]-a[o];return s},n.dotProduct=function(i,a){for(var s=0,o=0;o<i.length;o++)s+=i[o]*a[o];return s},n.mag=function(i){return Math.sqrt(this.dotProduct(i,i))},n.normalize=function(i){for(var a=[],s=this.mag(i),o=0;o<i.length;o++)a[o]=i[o]/s;return a},n.multGamma=function(i){for(var a=[],s=0,o=0;o<i.length;o++)s+=i[o];s*=-1/i.length;for(var l=0;l<i.length;l++)a[l]=s+i[l];return a},n.multL=function(i,a,s){for(var o=[],l=[],u=[],h=0;h<a[0].length;h++){for(var f=0,d=0;d<a.length;d++)f+=-.5*a[d][h]*i[d];l[h]=f}for(var p=0;p<s.length;p++){for(var g=0,m=0;m<s.length;m++)g+=s[p][m]*l[m];u[p]=g}for(var x=0;x<a.length;x++){for(var y=0,b=0;b<a[0].length;b++)y+=a[x][b]*u[b];o[x]=y}return o},t.exports=n},function(t,e,r){"use strict";var n=function(){function o(l,u){for(var h=0;h<u.length;h++){var f=u[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f)}}return function(l,u,h){return u&&o(l.prototype,u),h&&o(l,h),l}}();function i(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")}var a=r(11),s=function(){function o(l,u){i(this,o),(u!==null||u!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var h=void 0;l instanceof a?h=l.size():h=l.length,this._quicksort(l,0,h-1)}return n(o,[{key:"_quicksort",value:function(u,h,f){if(h<f){var d=this._partition(u,h,f);this._quicksort(u,h,d),this._quicksort(u,d+1,f)}}},{key:"_partition",value:function(u,h,f){for(var d=this._get(u,h),p=h,g=f;;){for(;this.compareFunction(d,this._get(u,g));)g--;for(;this.compareFunction(this._get(u,p),d);)p++;if(p<g)this._swap(u,p,g),p++,g--;else return g}}},{key:"_get",value:function(u,h){return u instanceof a?u.get_object_at(h):u[h]}},{key:"_set",value:function(u,h,f){u instanceof a?u.set_object_at(h,f):u[h]=f}},{key:"_swap",value:function(u,h,f){var d=this._get(u,h);this._set(u,h,this._get(u,f)),this._set(u,f,d)}},{key:"_defaultCompareFunction",value:function(u,h){return h>u}}]),o}();t.exports=s},function(t,e,r){"use strict";function n(){}n.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=function(st){for(var Qe=[];st-- >0;)Qe.push(0);return Qe}(Math.min(this.m+1,this.n)),this.U=function(st){var Qe=function lt(kt){if(kt.length==0)return 0;for(var ht=[],Rt=0;Rt<kt[0];Rt++)ht.push(lt(kt.slice(1)));return ht};return Qe(st)}([this.m,a]),this.V=function(st){var Qe=function lt(kt){if(kt.length==0)return 0;for(var ht=[],Rt=0;Rt<kt[0];Rt++)ht.push(lt(kt.slice(1)));return ht};return Qe(st)}([this.n,this.n]);for(var s=function(st){for(var Qe=[];st-- >0;)Qe.push(0);return Qe}(this.n),o=function(st){for(var Qe=[];st-- >0;)Qe.push(0);return Qe}(this.m),l=!0,u=!0,h=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),d=0;d<Math.max(h,f);d++){if(d<h){this.s[d]=0;for(var p=d;p<this.m;p++)this.s[d]=n.hypot(this.s[d],i[p][d]);if(this.s[d]!==0){i[d][d]<0&&(this.s[d]=-this.s[d]);for(var g=d;g<this.m;g++)i[g][d]/=this.s[d];i[d][d]+=1}this.s[d]=-this.s[d]}for(var m=d+1;m<this.n;m++){if(function(st,Qe){return st&&Qe}(d<h,this.s[d]!==0)){for(var x=0,y=d;y<this.m;y++)x+=i[y][d]*i[y][m];x=-x/i[d][d];for(var b=d;b<this.m;b++)i[b][m]+=x*i[b][d]}s[m]=i[d][m]}if(function(st,Qe){return st&&Qe}(l,d<h))for(var w=d;w<this.m;w++)this.U[w][d]=i[w][d];if(d<f){s[d]=0;for(var _=d+1;_<this.n;_++)s[d]=n.hypot(s[d],s[_]);if(s[d]!==0){s[d+1]<0&&(s[d]=-s[d]);for(var k=d+1;k<this.n;k++)s[k]/=s[d];s[d+1]+=1}if(s[d]=-s[d],function(st,Qe){return st&&Qe}(d+1<this.m,s[d]!==0)){for(var E=d+1;E<this.m;E++)o[E]=0;for(var L=d+1;L<this.n;L++)for(var S=d+1;S<this.m;S++)o[S]+=s[L]*i[S][L];for(var C=d+1;C<this.n;C++)for(var M=-s[C]/s[d+1],R=d+1;R<this.m;R++)i[R][C]+=M*o[R]}if(u)for(var T=d+1;T<this.n;T++)this.V[T][d]=s[T]}}var I=Math.min(this.n,this.m+1);if(h<this.n&&(this.s[h]=i[h][h]),this.m<I&&(this.s[I-1]=0),f+1<I&&(s[f]=i[f][I-1]),s[I-1]=0,l){for(var A=h;A<a;A++){for(var D=0;D<this.m;D++)this.U[D][A]=0;this.U[A][A]=1}for(var N=h-1;N>=0;N--)if(this.s[N]!==0){for(var O=N+1;O<a;O++){for(var B=0,P=N;P<this.m;P++)B+=this.U[P][N]*this.U[P][O];B=-B/this.U[N][N];for(var $=N;$<this.m;$++)this.U[$][O]+=B*this.U[$][N]}for(var z=N;z<this.m;z++)this.U[z][N]=-this.U[z][N];this.U[N][N]=1+this.U[N][N];for(var H=0;H<N-1;H++)this.U[H][N]=0}else{for(var Z=0;Z<this.m;Z++)this.U[Z][N]=0;this.U[N][N]=1}}if(u)for(var X=this.n-1;X>=0;X--){if(function(st,Qe){return st&&Qe}(X<f,s[X]!==0))for(var ie=X+1;ie<a;ie++){for(var K=0,ee=X+1;ee<this.n;ee++)K+=this.V[ee][X]*this.V[ee][ie];K=-K/this.V[X+1][X];for(var J=X+1;J<this.n;J++)this.V[J][ie]+=K*this.V[J][X]}for(var W=0;W<this.n;W++)this.V[W][X]=0;this.V[X][X]=1}for(var Y=I-1,Q=0,se=Math.pow(2,-52),ue=Math.pow(2,-966);I>0;){var ce=void 0,te=void 0;for(ce=I-2;ce>=-1&&ce!==-1;ce--)if(Math.abs(s[ce])<=ue+se*(Math.abs(this.s[ce])+Math.abs(this.s[ce+1]))){s[ce]=0;break}if(ce===I-2)te=4;else{var Le=void 0;for(Le=I-1;Le>=ce&&Le!==ce;Le--){var oe=(Le!==I?Math.abs(s[Le]):0)+(Le!==ce+1?Math.abs(s[Le-1]):0);if(Math.abs(this.s[Le])<=ue+se*oe){this.s[Le]=0;break}}Le===ce?te=3:Le===I-1?te=1:(te=2,ce=Le)}switch(ce++,te){case 1:{var be=s[I-2];s[I-2]=0;for(var Fe=I-2;Fe>=ce;Fe--){var Be=n.hypot(this.s[Fe],be),Ve=this.s[Fe]/Be,We=be/Be;if(this.s[Fe]=Be,Fe!==ce&&(be=-We*s[Fe-1],s[Fe-1]=Ve*s[Fe-1]),u)for(var qe=0;qe<this.n;qe++)Be=Ve*this.V[qe][Fe]+We*this.V[qe][I-1],this.V[qe][I-1]=-We*this.V[qe][Fe]+Ve*this.V[qe][I-1],this.V[qe][Fe]=Be}}break;case 2:{var Re=s[ce-1];s[ce-1]=0;for(var Me=ce;Me<I;Me++){var ye=n.hypot(this.s[Me],Re),q=this.s[Me]/ye,de=Re/ye;if(this.s[Me]=ye,Re=-de*s[Me],s[Me]=q*s[Me],l)for(var ae=0;ae<this.m;ae++)ye=q*this.U[ae][Me]+de*this.U[ae][ce-1],this.U[ae][ce-1]=-de*this.U[ae][Me]+q*this.U[ae][ce-1],this.U[ae][Me]=ye}}break;case 3:{var he=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[I-1]),Math.abs(this.s[I-2])),Math.abs(s[I-2])),Math.abs(this.s[ce])),Math.abs(s[ce])),U=this.s[I-1]/he,ke=this.s[I-2]/he,j=s[I-2]/he,me=this.s[ce]/he,Se=s[ce]/he,Pe=((ke+U)*(ke-U)+j*j)/2,Ie=U*j*(U*j),ge=0;(function(st,Qe){return st||Qe})(Pe!==0,Ie!==0)&&(ge=Math.sqrt(Pe*Pe+Ie),Pe<0&&(ge=-ge),ge=Ie/(Pe+ge));for(var ze=(me+U)*(me-U)+ge,Ae=me*Se,Ye=ce;Ye<I-1;Ye++){var it=n.hypot(ze,Ae),wt=ze/it,ft=Ae/it;if(Ye!==ce&&(s[Ye-1]=it),ze=wt*this.s[Ye]+ft*s[Ye],s[Ye]=wt*s[Ye]-ft*this.s[Ye],Ae=ft*this.s[Ye+1],this.s[Ye+1]=wt*this.s[Ye+1],u)for(var He=0;He<this.n;He++)it=wt*this.V[He][Ye]+ft*this.V[He][Ye+1],this.V[He][Ye+1]=-ft*this.V[He][Ye]+wt*this.V[He][Ye+1],this.V[He][Ye]=it;if(it=n.hypot(ze,Ae),wt=ze/it,ft=Ae/it,this.s[Ye]=it,ze=wt*s[Ye]+ft*this.s[Ye+1],this.s[Ye+1]=-ft*s[Ye]+wt*this.s[Ye+1],Ae=ft*s[Ye+1],s[Ye+1]=wt*s[Ye+1],l&&Ye<this.m-1)for(var ut=0;ut<this.m;ut++)it=wt*this.U[ut][Ye]+ft*this.U[ut][Ye+1],this.U[ut][Ye+1]=-ft*this.U[ut][Ye]+wt*this.U[ut][Ye+1],this.U[ut][Ye]=it}s[I-2]=ze,Q=Q+1}break;case 4:{if(this.s[ce]<=0&&(this.s[ce]=this.s[ce]<0?-this.s[ce]:0,u))for(var $e=0;$e<=Y;$e++)this.V[$e][ce]=-this.V[$e][ce];for(;ce<Y&&!(this.s[ce]>=this.s[ce+1]);){var Ze=this.s[ce];if(this.s[ce]=this.s[ce+1],this.s[ce+1]=Ze,u&&ce<this.n-1)for(var at=0;at<this.n;at++)Ze=this.V[at][ce+1],this.V[at][ce+1]=this.V[at][ce],this.V[at][ce]=Ze;if(l&&ce<this.m-1)for(var mt=0;mt<this.m;mt++)Ze=this.U[mt][ce+1],this.U[mt][ce+1]=this.U[mt][ce],this.U[mt][ce]=Ze;ce++}Q=0,I--}break}}var Ut={U:this.U,V:this.V,S:this.s};return Ut},n.hypot=function(i,a){var s=void 0;return Math.abs(i)>Math.abs(a)?(s=a/i,s=Math.abs(i)*Math.sqrt(1+s*s)):a!=0?(s=i/a,s=Math.abs(a)*Math.sqrt(1+s*s)):s=0,s},t.exports=n},function(t,e,r){"use strict";var n=function(){function s(o,l){for(var u=0;u<l.length;u++){var h=l[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}return function(o,l,u){return l&&s(o.prototype,l),u&&s(o,u),o}}();function i(s,o){if(!(s instanceof o))throw new TypeError("Cannot call a class as a function")}var a=function(){function s(o,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d<this.iMax;d++){this.grid[d]=new Array(this.jMax);for(var p=0;p<this.jMax;p++)this.grid[d][p]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var m=0;m<this.jMax;m++)this.tracebackGrid[g][m]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(s,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var l=1;l<this.jMax;l++)this.grid[0][l]=this.grid[0][l-1]+this.gap_penalty,this.tracebackGrid[0][l]=[!1,!1,!0];for(var u=1;u<this.iMax;u++)this.grid[u][0]=this.grid[u-1][0]+this.gap_penalty,this.tracebackGrid[u][0]=[!1,!0,!1];for(var h=1;h<this.iMax;h++)for(var f=1;f<this.jMax;f++){var d=void 0;this.sequence1[h-1]===this.sequence2[f-1]?d=this.grid[h-1][f-1]+this.match_score:d=this.grid[h-1][f-1]+this.mismatch_penalty;var p=this.grid[h-1][f]+this.gap_penalty,g=this.grid[h][f-1]+this.gap_penalty,m=[d,p,g],x=this.arrayAllMaxIndexes(m);this.grid[h][f]=m[x[0]],this.tracebackGrid[h][f]=[x.includes(0),x.includes(1),x.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var l=[];for(l.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});l[0];){var u=l[0],h=this.tracebackGrid[u.pos[0]][u.pos[1]];h[0]&&l.push({pos:[u.pos[0]-1,u.pos[1]-1],seq1:this.sequence1[u.pos[0]-1]+u.seq1,seq2:this.sequence2[u.pos[1]-1]+u.seq2}),h[1]&&l.push({pos:[u.pos[0]-1,u.pos[1]],seq1:this.sequence1[u.pos[0]-1]+u.seq1,seq2:"-"+u.seq2}),h[2]&&l.push({pos:[u.pos[0],u.pos[1]-1],seq1:"-"+u.seq1,seq2:this.sequence2[u.pos[1]-1]+u.seq2}),u.pos[0]===0&&u.pos[1]===0&&this.alignments.push({sequence1:u.seq1,sequence2:u.seq2}),l.shift()}return this.alignments}},{key:"getAllIndexes",value:function(l,u){for(var h=[],f=-1;(f=l.indexOf(u,f+1))!==-1;)h.push(f);return h}},{key:"arrayAllMaxIndexes",value:function(l){return this.getAllIndexes(l,Math.max.apply(null,l))}}]),s}();t.exports=a},function(t,e,r){"use strict";var n=function(){};n.FDLayout=r(18),n.FDLayoutConstants=r(4),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(5),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(25),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(6),n.LEdge=r(1),n.LGraphManager=r(7),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(27),n.Matrix=r(24),n.SVD=r(26),t.exports=n},function(t,e,r){"use strict";function n(){this.listeners=[]}var i=n.prototype;i.addListener=function(a,s){this.listeners.push({event:a,callback:s})},i.removeListener=function(a,s){for(var o=this.listeners.length;o>=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o<this.listeners.length;o++){var l=this.listeners[o];a===l.event&&l.callback(s)}},t.exports=n}])})});var BO=yi((Bx,PO)=>{(function(e,r){typeof Bx=="object"&&typeof PO=="object"?PO.exports=r(OO()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof Bx=="object"?Bx.coseBase=r(OO()):e.coseBase=r(e.layoutBase)})(Bx,function(t){return(()=>{"use strict";var e={45:(a,s,o)=>{var l={};l.layoutBase=o(551),l.CoSEConstants=o(806),l.CoSEEdge=o(767),l.CoSEGraph=o(880),l.CoSEGraphManager=o(578),l.CoSELayout=o(765),l.CoSENode=o(991),l.ConstraintHandler=o(902),a.exports=l},806:(a,s,o)=>{var l=o(551).FDLayoutConstants;function u(){}for(var h in l)u[h]=l[h];u.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,u.DEFAULT_COMPONENT_SEPERATION=60,u.TILE=!0,u.TILING_PADDING_VERTICAL=10,u.TILING_PADDING_HORIZONTAL=10,u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0,u.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,u.TREE_REDUCTION_ON_INCREMENTAL=!0,u.PURE_INCREMENTAL=u.DEFAULT_INCREMENTAL,a.exports=u},767:(a,s,o)=>{var l=o(551).FDLayoutEdge;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u},880:(a,s,o)=>{var l=o(551).LGraph;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u},578:(a,s,o)=>{var l=o(551).LGraphManager;function u(f){l.call(this,f)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u},765:(a,s,o)=>{var l=o(551).FDLayout,u=o(578),h=o(880),f=o(991),d=o(767),p=o(806),g=o(902),m=o(551).FDLayoutConstants,x=o(551).LayoutConstants,y=o(551).Point,b=o(551).PointD,w=o(551).DimensionD,_=o(551).Layout,k=o(551).Integer,E=o(551).IGeometry,L=o(551).LGraph,S=o(551).Transform,C=o(551).LinkedList;function M(){l.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(l.prototype);for(var R in l)M[R]=l[R];M.prototype.newGraphManager=function(){var T=new u(this);return this.graphManager=T,T},M.prototype.newGraph=function(T){return new h(null,this.graphManager,T)},M.prototype.newNode=function(T){return new f(this.graphManager,T)},M.prototype.newEdge=function(T){return new d(null,null,T)},M.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.isSubLayout||(p.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var T=x.DEFAULT_CREATE_BENDS_AS_NEEDED;return T&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(p.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var I=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(O){return I.has(O)});this.graphManager.setAllNodesToApplyGravitation(A)}}else{var T=this.getFlatForest();if(T.length>0)this.positionNodesRadially(T);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var I=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(D){return I.has(D)});this.graphManager.setAllNodesToApplyGravitation(A),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),p.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%m.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var T=new Set(this.getAllNodes()),I=this.nodesWithGravity.filter(function(N){return T.has(N)});this.graphManager.setAllNodesToApplyGravitation(I),this.graphManager.updateBounds(),this.updateGrid(),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),p.PURE_INCREMENTAL?this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=m.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var A=!this.isTreeGrowing&&!this.isGrowthFinished,D=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(A,D),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var T=this.graphManager.getAllNodes(),I={},A=0;A<T.length;A++){var D=T[A].rect,N=T[A].id;I[N]={id:N,x:D.getCenterX(),y:D.getCenterY(),w:D.width,h:D.height}}return I},M.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var T=!1;if(m.ANIMATE==="during")this.emit("layoutstarted");else{for(;!T;)T=this.tick();this.graphManager.updateBounds()}},M.prototype.moveNodes=function(){for(var T=this.getAllNodes(),I,A=0;A<T.length;A++)I=T[A],I.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var A=0;A<T.length;A++)I=T[A],I.move()},M.prototype.initConstraintVariables=function(){var T=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var I=this.graphManager.getAllNodes(),A=0;A<I.length;A++){var D=I[A];this.idToNodeMap.set(D.id,D)}var N=function ee(J){for(var W=J.getChild().getNodes(),Y,Q=0,se=0;se<W.length;se++)Y=W[se],Y.getChild()==null?T.fixedNodeSet.has(Y.id)&&(Q+=100):Q+=ee(Y);return Q};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(W){T.fixedNodeSet.add(W.nodeId)});for(var I=this.graphManager.getAllNodes(),D,A=0;A<I.length;A++)if(D=I[A],D.getChild()!=null){var O=N(D);O>0&&(D.fixedNodeWeight=O)}}if(this.constraints.relativePlacementConstraint){var B=new Map,P=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(ee){T.fixedNodesOnHorizontal.add(ee),T.fixedNodesOnVertical.add(ee)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var $=this.constraints.alignmentConstraint.vertical,A=0;A<$.length;A++)this.dummyToNodeForVerticalAlignment.set("dummy"+A,[]),$[A].forEach(function(J){B.set(J,"dummy"+A),T.dummyToNodeForVerticalAlignment.get("dummy"+A).push(J),T.fixedNodeSet.has(J)&&T.fixedNodesOnHorizontal.add("dummy"+A)});if(this.constraints.alignmentConstraint.horizontal)for(var z=this.constraints.alignmentConstraint.horizontal,A=0;A<z.length;A++)this.dummyToNodeForHorizontalAlignment.set("dummy"+A,[]),z[A].forEach(function(J){P.set(J,"dummy"+A),T.dummyToNodeForHorizontalAlignment.get("dummy"+A).push(J),T.fixedNodeSet.has(J)&&T.fixedNodesOnVertical.add("dummy"+A)})}if(p.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(ee){var J,W,Y;for(Y=ee.length-1;Y>=2*ee.length/3;Y--)J=Math.floor(Math.random()*(Y+1)),W=ee[Y],ee[Y]=ee[J],ee[J]=W;return ee},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(ee){if(ee.left){var J=B.has(ee.left)?B.get(ee.left):ee.left,W=B.has(ee.right)?B.get(ee.right):ee.right;T.nodesInRelativeHorizontal.includes(J)||(T.nodesInRelativeHorizontal.push(J),T.nodeToRelativeConstraintMapHorizontal.set(J,[]),T.dummyToNodeForVerticalAlignment.has(J)?T.nodeToTempPositionMapHorizontal.set(J,T.idToNodeMap.get(T.dummyToNodeForVerticalAlignment.get(J)[0]).getCenterX()):T.nodeToTempPositionMapHorizontal.set(J,T.idToNodeMap.get(J).getCenterX())),T.nodesInRelativeHorizontal.includes(W)||(T.nodesInRelativeHorizontal.push(W),T.nodeToRelativeConstraintMapHorizontal.set(W,[]),T.dummyToNodeForVerticalAlignment.has(W)?T.nodeToTempPositionMapHorizontal.set(W,T.idToNodeMap.get(T.dummyToNodeForVerticalAlignment.get(W)[0]).getCenterX()):T.nodeToTempPositionMapHorizontal.set(W,T.idToNodeMap.get(W).getCenterX())),T.nodeToRelativeConstraintMapHorizontal.get(J).push({right:W,gap:ee.gap}),T.nodeToRelativeConstraintMapHorizontal.get(W).push({left:J,gap:ee.gap})}else{var Y=P.has(ee.top)?P.get(ee.top):ee.top,Q=P.has(ee.bottom)?P.get(ee.bottom):ee.bottom;T.nodesInRelativeVertical.includes(Y)||(T.nodesInRelativeVertical.push(Y),T.nodeToRelativeConstraintMapVertical.set(Y,[]),T.dummyToNodeForHorizontalAlignment.has(Y)?T.nodeToTempPositionMapVertical.set(Y,T.idToNodeMap.get(T.dummyToNodeForHorizontalAlignment.get(Y)[0]).getCenterY()):T.nodeToTempPositionMapVertical.set(Y,T.idToNodeMap.get(Y).getCenterY())),T.nodesInRelativeVertical.includes(Q)||(T.nodesInRelativeVertical.push(Q),T.nodeToRelativeConstraintMapVertical.set(Q,[]),T.dummyToNodeForHorizontalAlignment.has(Q)?T.nodeToTempPositionMapVertical.set(Q,T.idToNodeMap.get(T.dummyToNodeForHorizontalAlignment.get(Q)[0]).getCenterY()):T.nodeToTempPositionMapVertical.set(Q,T.idToNodeMap.get(Q).getCenterY())),T.nodeToRelativeConstraintMapVertical.get(Y).push({bottom:Q,gap:ee.gap}),T.nodeToRelativeConstraintMapVertical.get(Q).push({top:Y,gap:ee.gap})}});else{var H=new Map,Z=new Map;this.constraints.relativePlacementConstraint.forEach(function(ee){if(ee.left){var J=B.has(ee.left)?B.get(ee.left):ee.left,W=B.has(ee.right)?B.get(ee.right):ee.right;H.has(J)?H.get(J).push(W):H.set(J,[W]),H.has(W)?H.get(W).push(J):H.set(W,[J])}else{var Y=P.has(ee.top)?P.get(ee.top):ee.top,Q=P.has(ee.bottom)?P.get(ee.bottom):ee.bottom;Z.has(Y)?Z.get(Y).push(Q):Z.set(Y,[Q]),Z.has(Q)?Z.get(Q).push(Y):Z.set(Q,[Y])}});var X=function(J,W){var Y=[],Q=[],se=new C,ue=new Set,ce=0;return J.forEach(function(te,Le){if(!ue.has(Le)){Y[ce]=[],Q[ce]=!1;var oe=Le;for(se.push(oe),ue.add(oe),Y[ce].push(oe);se.length!=0;){oe=se.shift(),W.has(oe)&&(Q[ce]=!0);var be=J.get(oe);be.forEach(function(Fe){ue.has(Fe)||(se.push(Fe),ue.add(Fe),Y[ce].push(Fe))})}ce++}}),{components:Y,isFixed:Q}},ie=X(H,T.fixedNodesOnHorizontal);this.componentsOnHorizontal=ie.components,this.fixedComponentsOnHorizontal=ie.isFixed;var K=X(Z,T.fixedNodesOnVertical);this.componentsOnVertical=K.components,this.fixedComponentsOnVertical=K.isFixed}}},M.prototype.updateDisplacements=function(){var T=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(K){var ee=T.idToNodeMap.get(K.nodeId);ee.displacementX=0,ee.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var I=this.constraints.alignmentConstraint.vertical,A=0;A<I.length;A++){for(var D=0,N=0;N<I[A].length;N++){if(this.fixedNodeSet.has(I[A][N])){D=0;break}D+=this.idToNodeMap.get(I[A][N]).displacementX}for(var O=D/I[A].length,N=0;N<I[A].length;N++)this.idToNodeMap.get(I[A][N]).displacementX=O}if(this.constraints.alignmentConstraint.horizontal)for(var B=this.constraints.alignmentConstraint.horizontal,A=0;A<B.length;A++){for(var P=0,N=0;N<B[A].length;N++){if(this.fixedNodeSet.has(B[A][N])){P=0;break}P+=this.idToNodeMap.get(B[A][N]).displacementY}for(var $=P/B[A].length,N=0;N<B[A].length;N++)this.idToNodeMap.get(B[A][N]).displacementY=$}}if(this.constraints.relativePlacementConstraint)if(p.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(K){if(!T.fixedNodesOnHorizontal.has(K)){var ee=0;T.dummyToNodeForVerticalAlignment.has(K)?ee=T.idToNodeMap.get(T.dummyToNodeForVerticalAlignment.get(K)[0]).displacementX:ee=T.idToNodeMap.get(K).displacementX,T.nodeToRelativeConstraintMapHorizontal.get(K).forEach(function(J){if(J.right){var W=T.nodeToTempPositionMapHorizontal.get(J.right)-T.nodeToTempPositionMapHorizontal.get(K)-ee;W<J.gap&&(ee-=J.gap-W)}else{var W=T.nodeToTempPositionMapHorizontal.get(K)-T.nodeToTempPositionMapHorizontal.get(J.left)+ee;W<J.gap&&(ee+=J.gap-W)}}),T.nodeToTempPositionMapHorizontal.set(K,T.nodeToTempPositionMapHorizontal.get(K)+ee),T.dummyToNodeForVerticalAlignment.has(K)?T.dummyToNodeForVerticalAlignment.get(K).forEach(function(J){T.idToNodeMap.get(J).displacementX=ee}):T.idToNodeMap.get(K).displacementX=ee}}),this.nodesInRelativeVertical.forEach(function(K){if(!T.fixedNodesOnHorizontal.has(K)){var ee=0;T.dummyToNodeForHorizontalAlignment.has(K)?ee=T.idToNodeMap.get(T.dummyToNodeForHorizontalAlignment.get(K)[0]).displacementY:ee=T.idToNodeMap.get(K).displacementY,T.nodeToRelativeConstraintMapVertical.get(K).forEach(function(J){if(J.bottom){var W=T.nodeToTempPositionMapVertical.get(J.bottom)-T.nodeToTempPositionMapVertical.get(K)-ee;W<J.gap&&(ee-=J.gap-W)}else{var W=T.nodeToTempPositionMapVertical.get(K)-T.nodeToTempPositionMapVertical.get(J.top)+ee;W<J.gap&&(ee+=J.gap-W)}}),T.nodeToTempPositionMapVertical.set(K,T.nodeToTempPositionMapVertical.get(K)+ee),T.dummyToNodeForHorizontalAlignment.has(K)?T.dummyToNodeForHorizontalAlignment.get(K).forEach(function(J){T.idToNodeMap.get(J).displacementY=ee}):T.idToNodeMap.get(K).displacementY=ee}});else{for(var A=0;A<this.componentsOnHorizontal.length;A++){var z=this.componentsOnHorizontal[A];if(this.fixedComponentsOnHorizontal[A])for(var N=0;N<z.length;N++)this.dummyToNodeForVerticalAlignment.has(z[N])?this.dummyToNodeForVerticalAlignment.get(z[N]).forEach(function(J){T.idToNodeMap.get(J).displacementX=0}):this.idToNodeMap.get(z[N]).displacementX=0;else{for(var H=0,Z=0,N=0;N<z.length;N++)if(this.dummyToNodeForVerticalAlignment.has(z[N])){var X=this.dummyToNodeForVerticalAlignment.get(z[N]);H+=X.length*this.idToNodeMap.get(X[0]).displacementX,Z+=X.length}else H+=this.idToNodeMap.get(z[N]).displacementX,Z++;for(var ie=H/Z,N=0;N<z.length;N++)this.dummyToNodeForVerticalAlignment.has(z[N])?this.dummyToNodeForVerticalAlignment.get(z[N]).forEach(function(J){T.idToNodeMap.get(J).displacementX=ie}):this.idToNodeMap.get(z[N]).displacementX=ie}}for(var A=0;A<this.componentsOnVertical.length;A++){var z=this.componentsOnVertical[A];if(this.fixedComponentsOnVertical[A])for(var N=0;N<z.length;N++)this.dummyToNodeForHorizontalAlignment.has(z[N])?this.dummyToNodeForHorizontalAlignment.get(z[N]).forEach(function(W){T.idToNodeMap.get(W).displacementY=0}):this.idToNodeMap.get(z[N]).displacementY=0;else{for(var H=0,Z=0,N=0;N<z.length;N++)if(this.dummyToNodeForHorizontalAlignment.has(z[N])){var X=this.dummyToNodeForHorizontalAlignment.get(z[N]);H+=X.length*this.idToNodeMap.get(X[0]).displacementY,Z+=X.length}else H+=this.idToNodeMap.get(z[N]).displacementY,Z++;for(var ie=H/Z,N=0;N<z.length;N++)this.dummyToNodeForHorizontalAlignment.has(z[N])?this.dummyToNodeForHorizontalAlignment.get(z[N]).forEach(function(se){T.idToNodeMap.get(se).displacementY=ie}):this.idToNodeMap.get(z[N]).displacementY=ie}}}},M.prototype.calculateNodesToApplyGravitationTo=function(){var T=[],I,A=this.graphManager.getGraphs(),D=A.length,N;for(N=0;N<D;N++)I=A[N],I.updateConnected(),I.isConnected||(T=T.concat(I.getNodes()));return T},M.prototype.createBendpoints=function(){var T=[];T=T.concat(this.graphManager.getAllEdges());var I=new Set,A;for(A=0;A<T.length;A++){var D=T[A];if(!I.has(D)){var N=D.getSource(),O=D.getTarget();if(N==O)D.getBendpoints().push(new b),D.getBendpoints().push(new b),this.createDummyNodesForBendpoints(D),I.add(D);else{var B=[];if(B=B.concat(N.getEdgeListToNode(O)),B=B.concat(O.getEdgeListToNode(N)),!I.has(B[0])){if(B.length>1){var P;for(P=0;P<B.length;P++){var $=B[P];$.getBendpoints().push(new b),this.createDummyNodesForBendpoints($)}}B.forEach(function(z){I.add(z)})}}}if(I.size==T.length)break}},M.prototype.positionNodesRadially=function(T){for(var I=new y(0,0),A=Math.ceil(Math.sqrt(T.length)),D=0,N=0,O=0,B=new b(0,0),P=0;P<T.length;P++){P%A==0&&(O=0,N=D,P!=0&&(N+=p.DEFAULT_COMPONENT_SEPERATION),D=0);var $=T[P],z=_.findCenterOfTree($);I.x=O,I.y=N,B=M.radialLayout($,z,I),B.y>D&&(D=Math.floor(B.y)),O=Math.floor(B.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new b(x.WORLD_CENTER_X-B.x/2,x.WORLD_CENTER_Y-B.y/2))},M.radialLayout=function(T,I,A){var D=Math.max(this.maxDiagonalInTree(T),p.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(I,null,0,359,0,D);var N=L.calculateBounds(T),O=new S;O.setDeviceOrgX(N.getMinX()),O.setDeviceOrgY(N.getMinY()),O.setWorldOrgX(A.x),O.setWorldOrgY(A.y);for(var B=0;B<T.length;B++){var P=T[B];P.transform(O)}var $=new b(N.getMaxX(),N.getMaxY());return O.inverseTransformPoint($)},M.branchRadialLayout=function(T,I,A,D,N,O){var B=(D-A+1)/2;B<0&&(B+=180);var P=(B+A)%360,$=P*E.TWO_PI/360,z=Math.cos($),H=N*Math.cos($),Z=N*Math.sin($);T.setCenter(H,Z);var X=[];X=X.concat(T.getEdges());var ie=X.length;I!=null&&ie--;for(var K=0,ee=X.length,J,W=T.getEdgesBetween(I);W.length>1;){var Y=W[0];W.splice(0,1);var Q=X.indexOf(Y);Q>=0&&X.splice(Q,1),ee--,ie--}I!=null?J=(X.indexOf(W[0])+1)%ee:J=0;for(var se=Math.abs(D-A)/ie,ue=J;K!=ie;ue=++ue%ee){var ce=X[ue].getOtherEnd(T);if(ce!=I){var te=(A+K*se)%360,Le=(te+se)%360;M.branchRadialLayout(ce,T,te,Le,N+O,O),K++}}},M.maxDiagonalInTree=function(T){for(var I=k.MIN_VALUE,A=0;A<T.length;A++){var D=T[A],N=D.getDiagonal();N>I&&(I=N)}return I},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var T=this,I={};this.memberGroups={},this.idToDummyNode={};for(var A=[],D=this.graphManager.getAllNodes(),N=0;N<D.length;N++){var O=D[N],B=O.getParent();this.getNodeDegreeWithChildren(O)===0&&(B.id==null||!this.getToBeTiled(B))&&A.push(O)}for(var N=0;N<A.length;N++){var O=A[N],P=O.getParent().id;typeof I[P]>"u"&&(I[P]=[]),I[P]=I[P].concat(O)}Object.keys(I).forEach(function($){if(I[$].length>1){var z="DummyCompound_"+$;T.memberGroups[z]=I[$];var H=I[$][0].getParent(),Z=new f(T.graphManager);Z.id=z,Z.paddingLeft=H.paddingLeft||0,Z.paddingRight=H.paddingRight||0,Z.paddingBottom=H.paddingBottom||0,Z.paddingTop=H.paddingTop||0,T.idToDummyNode[z]=Z;var X=T.getGraphManager().add(T.newGraph(),Z),ie=H.getChild();ie.add(Z);for(var K=0;K<I[$].length;K++){var ee=I[$][K];ie.remove(ee),X.add(ee)}}})},M.prototype.clearCompounds=function(){var T={},I={};this.performDFSOnCompounds();for(var A=0;A<this.compoundOrder.length;A++)I[this.compoundOrder[A].id]=this.compoundOrder[A],T[this.compoundOrder[A].id]=[].concat(this.compoundOrder[A].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[A].getChild()),this.compoundOrder[A].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(T,I)},M.prototype.clearZeroDegreeMembers=function(){var T=this,I=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(A){var D=T.idToDummyNode[A];if(I[A]=T.tileNodes(T.memberGroups[A],D.paddingLeft+D.paddingRight),D.rect.width=I[A].width,D.rect.height=I[A].height,D.setCenter(I[A].centerX,I[A].centerY),D.labelMarginLeft=0,D.labelMarginTop=0,p.NODE_DIMENSIONS_INCLUDE_LABELS){var N=D.rect.width,O=D.rect.height;D.labelWidth&&(D.labelPosHorizontal=="left"?(D.rect.x-=D.labelWidth,D.setWidth(N+D.labelWidth),D.labelMarginLeft=D.labelWidth):D.labelPosHorizontal=="center"&&D.labelWidth>N?(D.rect.x-=(D.labelWidth-N)/2,D.setWidth(D.labelWidth),D.labelMarginLeft=(D.labelWidth-N)/2):D.labelPosHorizontal=="right"&&D.setWidth(N+D.labelWidth)),D.labelHeight&&(D.labelPosVertical=="top"?(D.rect.y-=D.labelHeight,D.setHeight(O+D.labelHeight),D.labelMarginTop=D.labelHeight):D.labelPosVertical=="center"&&D.labelHeight>O?(D.rect.y-=(D.labelHeight-O)/2,D.setHeight(D.labelHeight),D.labelMarginTop=(D.labelHeight-O)/2):D.labelPosVertical=="bottom"&&D.setHeight(O+D.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var T=this.compoundOrder.length-1;T>=0;T--){var I=this.compoundOrder[T],A=I.id,D=I.paddingLeft,N=I.paddingTop,O=I.labelMarginLeft,B=I.labelMarginTop;this.adjustLocations(this.tiledMemberPack[A],I.rect.x,I.rect.y,D,N,O,B)}},M.prototype.repopulateZeroDegreeMembers=function(){var T=this,I=this.tiledZeroDegreePack;Object.keys(I).forEach(function(A){var D=T.idToDummyNode[A],N=D.paddingLeft,O=D.paddingTop,B=D.labelMarginLeft,P=D.labelMarginTop;T.adjustLocations(I[A],D.rect.x,D.rect.y,N,O,B,P)})},M.prototype.getToBeTiled=function(T){var I=T.id;if(this.toBeTiled[I]!=null)return this.toBeTiled[I];var A=T.getChild();if(A==null)return this.toBeTiled[I]=!1,!1;for(var D=A.getNodes(),N=0;N<D.length;N++){var O=D[N];if(this.getNodeDegree(O)>0)return this.toBeTiled[I]=!1,!1;if(O.getChild()==null){this.toBeTiled[O.id]=!1;continue}if(!this.getToBeTiled(O))return this.toBeTiled[I]=!1,!1}return this.toBeTiled[I]=!0,!0},M.prototype.getNodeDegree=function(T){for(var I=T.id,A=T.getEdges(),D=0,N=0;N<A.length;N++){var O=A[N];O.getSource().id!==O.getTarget().id&&(D=D+1)}return D},M.prototype.getNodeDegreeWithChildren=function(T){var I=this.getNodeDegree(T);if(T.getChild()==null)return I;for(var A=T.getChild().getNodes(),D=0;D<A.length;D++){var N=A[D];I+=this.getNodeDegreeWithChildren(N)}return I},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(T){for(var I=0;I<T.length;I++){var A=T[I];A.getChild()!=null&&this.fillCompexOrderByDFS(A.getChild().getNodes()),this.getToBeTiled(A)&&this.compoundOrder.push(A)}},M.prototype.adjustLocations=function(T,I,A,D,N,O,B){I+=D+O,A+=N+B;for(var P=I,$=0;$<T.rows.length;$++){var z=T.rows[$];I=P;for(var H=0,Z=0;Z<z.length;Z++){var X=z[Z];X.rect.x=I,X.rect.y=A,I+=X.rect.width+T.horizontalPadding,X.rect.height>H&&(H=X.rect.height)}A+=H+T.verticalPadding}},M.prototype.tileCompoundMembers=function(T,I){var A=this;this.tiledMemberPack=[],Object.keys(T).forEach(function(D){var N=I[D];if(A.tiledMemberPack[D]=A.tileNodes(T[D],N.paddingLeft+N.paddingRight),N.rect.width=A.tiledMemberPack[D].width,N.rect.height=A.tiledMemberPack[D].height,N.setCenter(A.tiledMemberPack[D].centerX,A.tiledMemberPack[D].centerY),N.labelMarginLeft=0,N.labelMarginTop=0,p.NODE_DIMENSIONS_INCLUDE_LABELS){var O=N.rect.width,B=N.rect.height;N.labelWidth&&(N.labelPosHorizontal=="left"?(N.rect.x-=N.labelWidth,N.setWidth(O+N.labelWidth),N.labelMarginLeft=N.labelWidth):N.labelPosHorizontal=="center"&&N.labelWidth>O?(N.rect.x-=(N.labelWidth-O)/2,N.setWidth(N.labelWidth),N.labelMarginLeft=(N.labelWidth-O)/2):N.labelPosHorizontal=="right"&&N.setWidth(O+N.labelWidth)),N.labelHeight&&(N.labelPosVertical=="top"?(N.rect.y-=N.labelHeight,N.setHeight(B+N.labelHeight),N.labelMarginTop=N.labelHeight):N.labelPosVertical=="center"&&N.labelHeight>B?(N.rect.y-=(N.labelHeight-B)/2,N.setHeight(N.labelHeight),N.labelMarginTop=(N.labelHeight-B)/2):N.labelPosVertical=="bottom"&&N.setHeight(B+N.labelHeight))}})},M.prototype.tileNodes=function(T,I){var A=this.tileNodesByFavoringDim(T,I,!0),D=this.tileNodesByFavoringDim(T,I,!1),N=this.getOrgRatio(A),O=this.getOrgRatio(D),B;return O<N?B=D:B=A,B},M.prototype.getOrgRatio=function(T){var I=T.width,A=T.height,D=I/A;return D<1&&(D=1/D),D},M.prototype.calcIdealRowWidth=function(T,I){var A=p.TILING_PADDING_VERTICAL,D=p.TILING_PADDING_HORIZONTAL,N=T.length,O=0,B=0,P=0;T.forEach(function(K){O+=K.getWidth(),B+=K.getHeight(),K.getWidth()>P&&(P=K.getWidth())});var $=O/N,z=B/N,H=Math.pow(A-D,2)+4*($+D)*(z+A)*N,Z=(D-A+Math.sqrt(H))/(2*($+D)),X;I?(X=Math.ceil(Z),X==Z&&X++):X=Math.floor(Z);var ie=X*($+D)-D;return P>ie&&(ie=P),ie+=D*2,ie},M.prototype.tileNodesByFavoringDim=function(T,I,A){var D=p.TILING_PADDING_VERTICAL,N=p.TILING_PADDING_HORIZONTAL,O=p.TILING_COMPARE_BY,B={rows:[],rowWidth:[],rowHeight:[],width:0,height:I,verticalPadding:D,horizontalPadding:N,centerX:0,centerY:0};O&&(B.idealRowWidth=this.calcIdealRowWidth(T,A));var P=function(ee){return ee.rect.width*ee.rect.height},$=function(ee,J){return P(J)-P(ee)};T.sort(function(K,ee){var J=$;return B.idealRowWidth?(J=O,J(K.id,ee.id)):J(K,ee)});for(var z=0,H=0,Z=0;Z<T.length;Z++){var X=T[Z];z+=X.getCenterX(),H+=X.getCenterY()}B.centerX=z/T.length,B.centerY=H/T.length;for(var Z=0;Z<T.length;Z++){var X=T[Z];if(B.rows.length==0)this.insertNodeToRow(B,X,0,I);else if(this.canAddHorizontal(B,X.rect.width,X.rect.height)){var ie=B.rows.length-1;B.idealRowWidth||(ie=this.getShortestRowIndex(B)),this.insertNodeToRow(B,X,ie,I)}else this.insertNodeToRow(B,X,B.rows.length,I);this.shiftToLastRow(B)}return B},M.prototype.insertNodeToRow=function(T,I,A,D){var N=D;if(A==T.rows.length){var O=[];T.rows.push(O),T.rowWidth.push(N),T.rowHeight.push(0)}var B=T.rowWidth[A]+I.rect.width;T.rows[A].length>0&&(B+=T.horizontalPadding),T.rowWidth[A]=B,T.width<B&&(T.width=B);var P=I.rect.height;A>0&&(P+=T.verticalPadding);var $=0;P>T.rowHeight[A]&&($=T.rowHeight[A],T.rowHeight[A]=P,$=T.rowHeight[A]-$),T.height+=$,T.rows[A].push(I)},M.prototype.getShortestRowIndex=function(T){for(var I=-1,A=Number.MAX_VALUE,D=0;D<T.rows.length;D++)T.rowWidth[D]<A&&(I=D,A=T.rowWidth[D]);return I},M.prototype.getLongestRowIndex=function(T){for(var I=-1,A=Number.MIN_VALUE,D=0;D<T.rows.length;D++)T.rowWidth[D]>A&&(I=D,A=T.rowWidth[D]);return I},M.prototype.canAddHorizontal=function(T,I,A){if(T.idealRowWidth){var D=T.rows.length-1,N=T.rowWidth[D];return N+I+T.horizontalPadding<=T.idealRowWidth}var O=this.getShortestRowIndex(T);if(O<0)return!0;var B=T.rowWidth[O];if(B+T.horizontalPadding+I<=T.width)return!0;var P=0;T.rowHeight[O]<A&&O>0&&(P=A+T.verticalPadding-T.rowHeight[O]);var $;T.width-B>=I+T.horizontalPadding?$=(T.height+P)/(B+I+T.horizontalPadding):$=(T.height+P)/T.width,P=A+T.verticalPadding;var z;return T.width<I?z=(T.height+P)/I:z=(T.height+P)/T.width,z<1&&(z=1/z),$<1&&($=1/$),$<z},M.prototype.shiftToLastRow=function(T){var I=this.getLongestRowIndex(T),A=T.rowWidth.length-1,D=T.rows[I],N=D[D.length-1],O=N.width+T.horizontalPadding;if(T.width-T.rowWidth[A]>O&&I!=A){D.splice(-1,1),T.rows[A].push(N),T.rowWidth[I]=T.rowWidth[I]-O,T.rowWidth[A]=T.rowWidth[A]+O,T.width=T.rowWidth[instance.getLongestRowIndex(T)];for(var B=Number.MIN_VALUE,P=0;P<D.length;P++)D[P].height>B&&(B=D[P].height);I>0&&(B+=T.verticalPadding);var $=T.rowHeight[I]+T.rowHeight[A];T.rowHeight[I]=B,T.rowHeight[A]<N.height+T.verticalPadding&&(T.rowHeight[A]=N.height+T.verticalPadding);var z=T.rowHeight[I]+T.rowHeight[A];T.height+=z-$,this.shiftToLastRow(T)}},M.prototype.tilingPreLayout=function(){p.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){p.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var T=[],I=!0,A;I;){var D=this.graphManager.getAllNodes(),N=[];I=!1;for(var O=0;O<D.length;O++)if(A=D[O],A.getEdges().length==1&&!A.getEdges()[0].isInterGraph&&A.getChild()==null){if(p.PURE_INCREMENTAL){var B=A.getEdges()[0].getOtherEnd(A),P=new w(A.getCenterX()-B.getCenterX(),A.getCenterY()-B.getCenterY());N.push([A,A.getEdges()[0],A.getOwner(),P])}else N.push([A,A.getEdges()[0],A.getOwner()]);I=!0}if(I==!0){for(var $=[],z=0;z<N.length;z++)N[z][0].getEdges().length==1&&($.push(N[z]),N[z][0].getOwner().remove(N[z][0]));T.push($),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=T},M.prototype.growTree=function(T){for(var I=T.length,A=T[I-1],D,N=0;N<A.length;N++)D=A[N],this.findPlaceforPrunedNode(D),D[2].add(D[0]),D[2].add(D[1],D[1].source,D[1].target);T.splice(T.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},M.prototype.findPlaceforPrunedNode=function(T){var I,A,D=T[0];if(D==T[1].source?A=T[1].target:A=T[1].source,p.PURE_INCREMENTAL)D.setCenter(A.getCenterX()+T[3].getWidth(),A.getCenterY()+T[3].getHeight());else{var N=A.startX,O=A.finishX,B=A.startY,P=A.finishY,$=0,z=0,H=0,Z=0,X=[$,H,z,Z];if(B>0)for(var ie=N;ie<=O;ie++)X[0]+=this.grid[ie][B-1].length+this.grid[ie][B].length-1;if(O<this.grid.length-1)for(var ie=B;ie<=P;ie++)X[1]+=this.grid[O+1][ie].length+this.grid[O][ie].length-1;if(P<this.grid[0].length-1)for(var ie=N;ie<=O;ie++)X[2]+=this.grid[ie][P+1].length+this.grid[ie][P].length-1;if(N>0)for(var ie=B;ie<=P;ie++)X[3]+=this.grid[N-1][ie].length+this.grid[N][ie].length-1;for(var K=k.MAX_VALUE,ee,J,W=0;W<X.length;W++)X[W]<K?(K=X[W],ee=1,J=W):X[W]==K&&ee++;if(ee==3&&K==0)X[0]==0&&X[1]==0&&X[2]==0?I=1:X[0]==0&&X[1]==0&&X[3]==0?I=0:X[0]==0&&X[2]==0&&X[3]==0?I=3:X[1]==0&&X[2]==0&&X[3]==0&&(I=2);else if(ee==2&&K==0){var Y=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?Y==0?I=0:I=1:X[0]==0&&X[2]==0?Y==0?I=0:I=2:X[0]==0&&X[3]==0?Y==0?I=0:I=3:X[1]==0&&X[2]==0?Y==0?I=1:I=2:X[1]==0&&X[3]==0?Y==0?I=1:I=3:Y==0?I=2:I=3}else if(ee==4&&K==0){var Y=Math.floor(Math.random()*4);I=Y}else I=J;I==0?D.setCenter(A.getCenterX(),A.getCenterY()-A.getHeight()/2-m.DEFAULT_EDGE_LENGTH-D.getHeight()/2):I==1?D.setCenter(A.getCenterX()+A.getWidth()/2+m.DEFAULT_EDGE_LENGTH+D.getWidth()/2,A.getCenterY()):I==2?D.setCenter(A.getCenterX(),A.getCenterY()+A.getHeight()/2+m.DEFAULT_EDGE_LENGTH+D.getHeight()/2):D.setCenter(A.getCenterX()-A.getWidth()/2-m.DEFAULT_EDGE_LENGTH-D.getWidth()/2,A.getCenterY())}},a.exports=M},991:(a,s,o)=>{var l=o(551).FDLayoutNode,u=o(551).IMath;function h(d,p,g,m){l.call(this,d,p,g,m)}h.prototype=Object.create(l.prototype);for(var f in l)h[f]=l[f];h.prototype.calculateDisplacement=function(){var d=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},h.prototype.propogateDisplacementToChildren=function(d,p){for(var g=this.getChild().getNodes(),m,x=0;x<g.length;x++)m=g[x],m.getChild()==null?(m.displacementX+=d,m.displacementY+=p):m.propogateDisplacementToChildren(d,p)},h.prototype.move=function(){var d=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),d.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},h.prototype.setPred1=function(d){this.pred1=d},h.prototype.getPred1=function(){return pred1},h.prototype.getPred2=function(){return pred2},h.prototype.setNext=function(d){this.next=d},h.prototype.getNext=function(){return next},h.prototype.setProcessed=function(d){this.processed=d},h.prototype.isProcessed=function(){return processed},a.exports=h},902:(a,s,o)=>{function l(g){if(Array.isArray(g)){for(var m=0,x=Array(g.length);m<g.length;m++)x[m]=g[m];return x}else return Array.from(g)}var u=o(806),h=o(551).LinkedList,f=o(551).Matrix,d=o(551).SVD;function p(){}p.handleConstraints=function(g){var m={};m.fixedNodeConstraint=g.constraints.fixedNodeConstraint,m.alignmentConstraint=g.constraints.alignmentConstraint,m.relativePlacementConstraint=g.constraints.relativePlacementConstraint;for(var x=new Map,y=new Map,b=[],w=[],_=g.getAllNodes(),k=0,E=0;E<_.length;E++){var L=_[E];L.getChild()==null&&(y.set(L.id,k++),b.push(L.getCenterX()),w.push(L.getCenterY()),x.set(L.id,L))}m.relativePlacementConstraint&&m.relativePlacementConstraint.forEach(function(he){!he.gap&&he.gap!=0&&(he.left?he.gap=u.DEFAULT_EDGE_LENGTH+x.get(he.left).getWidth()/2+x.get(he.right).getWidth()/2:he.gap=u.DEFAULT_EDGE_LENGTH+x.get(he.top).getHeight()/2+x.get(he.bottom).getHeight()/2)});var S=function(U,ke){return{x:U.x-ke.x,y:U.y-ke.y}},C=function(U){var ke=0,j=0;return U.forEach(function(me){ke+=b[y.get(me)],j+=w[y.get(me)]}),{x:ke/U.size,y:j/U.size}},M=function(U,ke,j,me,Se){function Pe(ft,He){var ut=new Set(ft),$e=!0,Ze=!1,at=void 0;try{for(var mt=He[Symbol.iterator](),Ut;!($e=(Ut=mt.next()).done);$e=!0){var st=Ut.value;ut.add(st)}}catch(Qe){Ze=!0,at=Qe}finally{try{!$e&&mt.return&&mt.return()}finally{if(Ze)throw at}}return ut}var Ie=new Map;U.forEach(function(ft,He){Ie.set(He,0)}),U.forEach(function(ft,He){ft.forEach(function(ut){Ie.set(ut.id,Ie.get(ut.id)+1)})});var ge=new Map,ze=new Map,Ae=new h;Ie.forEach(function(ft,He){ft==0?(Ae.push(He),j||(ke=="horizontal"?ge.set(He,y.has(He)?b[y.get(He)]:me.get(He)):ge.set(He,y.has(He)?w[y.get(He)]:me.get(He)))):ge.set(He,Number.NEGATIVE_INFINITY),j&&ze.set(He,new Set([He]))}),j&&Se.forEach(function(ft){var He=[];if(ft.forEach(function(Ze){j.has(Ze)&&He.push(Ze)}),He.length>0){var ut=0;He.forEach(function(Ze){ke=="horizontal"?(ge.set(Ze,y.has(Ze)?b[y.get(Ze)]:me.get(Ze)),ut+=ge.get(Ze)):(ge.set(Ze,y.has(Ze)?w[y.get(Ze)]:me.get(Ze)),ut+=ge.get(Ze))}),ut=ut/He.length,ft.forEach(function(Ze){j.has(Ze)||ge.set(Ze,ut)})}else{var $e=0;ft.forEach(function(Ze){ke=="horizontal"?$e+=y.has(Ze)?b[y.get(Ze)]:me.get(Ze):$e+=y.has(Ze)?w[y.get(Ze)]:me.get(Ze)}),$e=$e/ft.length,ft.forEach(function(Ze){ge.set(Ze,$e)})}});for(var Ye=function(){var He=Ae.shift(),ut=U.get(He);ut.forEach(function($e){if(ge.get($e.id)<ge.get(He)+$e.gap)if(j&&j.has($e.id)){var Ze=void 0;if(ke=="horizontal"?Ze=y.has($e.id)?b[y.get($e.id)]:me.get($e.id):Ze=y.has($e.id)?w[y.get($e.id)]:me.get($e.id),ge.set($e.id,Ze),Ze<ge.get(He)+$e.gap){var at=ge.get(He)+$e.gap-Ze;ze.get(He).forEach(function(mt){ge.set(mt,ge.get(mt)-at)})}}else ge.set($e.id,ge.get(He)+$e.gap);Ie.set($e.id,Ie.get($e.id)-1),Ie.get($e.id)==0&&Ae.push($e.id),j&&ze.set($e.id,Pe(ze.get(He),ze.get($e.id)))})};Ae.length!=0;)Ye();if(j){var it=new Set;U.forEach(function(ft,He){ft.length==0&&it.add(He)});var wt=[];ze.forEach(function(ft,He){if(it.has(He)){var ut=!1,$e=!0,Ze=!1,at=void 0;try{for(var mt=ft[Symbol.iterator](),Ut;!($e=(Ut=mt.next()).done);$e=!0){var st=Ut.value;j.has(st)&&(ut=!0)}}catch(kt){Ze=!0,at=kt}finally{try{!$e&&mt.return&&mt.return()}finally{if(Ze)throw at}}if(!ut){var Qe=!1,lt=void 0;wt.forEach(function(kt,ht){kt.has([].concat(l(ft))[0])&&(Qe=!0,lt=ht)}),Qe?ft.forEach(function(kt){wt[lt].add(kt)}):wt.push(new Set(ft))}}}),wt.forEach(function(ft,He){var ut=Number.POSITIVE_INFINITY,$e=Number.POSITIVE_INFINITY,Ze=Number.NEGATIVE_INFINITY,at=Number.NEGATIVE_INFINITY,mt=!0,Ut=!1,st=void 0;try{for(var Qe=ft[Symbol.iterator](),lt;!(mt=(lt=Qe.next()).done);mt=!0){var kt=lt.value,ht=void 0;ke=="horizontal"?ht=y.has(kt)?b[y.get(kt)]:me.get(kt):ht=y.has(kt)?w[y.get(kt)]:me.get(kt);var Rt=ge.get(kt);ht<ut&&(ut=ht),ht>Ze&&(Ze=ht),Rt<$e&&($e=Rt),Rt>at&&(at=Rt)}}catch(vt){Ut=!0,st=vt}finally{try{!mt&&Qe.return&&Qe.return()}finally{if(Ut)throw st}}var An=(ut+Ze)/2-($e+at)/2,Vt=!0,Jr=!1,mn=void 0;try{for(var Dr=ft[Symbol.iterator](),jn;!(Vt=(jn=Dr.next()).done);Vt=!0){var _n=jn.value;ge.set(_n,ge.get(_n)+An)}}catch(vt){Jr=!0,mn=vt}finally{try{!Vt&&Dr.return&&Dr.return()}finally{if(Jr)throw mn}}})}return ge},R=function(U){var ke=0,j=0,me=0,Se=0;if(U.forEach(function(ze){ze.left?b[y.get(ze.left)]-b[y.get(ze.right)]>=0?ke++:j++:w[y.get(ze.top)]-w[y.get(ze.bottom)]>=0?me++:Se++}),ke>j&&me>Se)for(var Pe=0;Pe<y.size;Pe++)b[Pe]=-1*b[Pe],w[Pe]=-1*w[Pe];else if(ke>j)for(var Ie=0;Ie<y.size;Ie++)b[Ie]=-1*b[Ie];else if(me>Se)for(var ge=0;ge<y.size;ge++)w[ge]=-1*w[ge]},T=function(U){var ke=[],j=new h,me=new Set,Se=0;return U.forEach(function(Pe,Ie){if(!me.has(Ie)){ke[Se]=[];var ge=Ie;for(j.push(ge),me.add(ge),ke[Se].push(ge);j.length!=0;){ge=j.shift();var ze=U.get(ge);ze.forEach(function(Ae){me.has(Ae.id)||(j.push(Ae.id),me.add(Ae.id),ke[Se].push(Ae.id))})}Se++}}),ke},I=function(U){var ke=new Map;return U.forEach(function(j,me){ke.set(me,[])}),U.forEach(function(j,me){j.forEach(function(Se){ke.get(me).push(Se),ke.get(Se.id).push({id:me,gap:Se.gap,direction:Se.direction})})}),ke},A=function(U){var ke=new Map;return U.forEach(function(j,me){ke.set(me,[])}),U.forEach(function(j,me){j.forEach(function(Se){ke.get(Se.id).push({id:me,gap:Se.gap,direction:Se.direction})})}),ke},D=[],N=[],O=!1,B=!1,P=new Set,$=new Map,z=new Map,H=[];if(m.fixedNodeConstraint&&m.fixedNodeConstraint.forEach(function(he){P.add(he.nodeId)}),m.relativePlacementConstraint&&(m.relativePlacementConstraint.forEach(function(he){he.left?($.has(he.left)?$.get(he.left).push({id:he.right,gap:he.gap,direction:"horizontal"}):$.set(he.left,[{id:he.right,gap:he.gap,direction:"horizontal"}]),$.has(he.right)||$.set(he.right,[])):($.has(he.top)?$.get(he.top).push({id:he.bottom,gap:he.gap,direction:"vertical"}):$.set(he.top,[{id:he.bottom,gap:he.gap,direction:"vertical"}]),$.has(he.bottom)||$.set(he.bottom,[]))}),z=I($),H=T(z)),u.TRANSFORM_ON_CONSTRAINT_HANDLING){if(m.fixedNodeConstraint&&m.fixedNodeConstraint.length>1)m.fixedNodeConstraint.forEach(function(he,U){D[U]=[he.position.x,he.position.y],N[U]=[b[y.get(he.nodeId)],w[y.get(he.nodeId)]]}),O=!0;else if(m.alignmentConstraint)(function(){var he=0;if(m.alignmentConstraint.vertical){for(var U=m.alignmentConstraint.vertical,ke=function(ge){var ze=new Set;U[ge].forEach(function(it){ze.add(it)});var Ae=new Set([].concat(l(ze)).filter(function(it){return P.has(it)})),Ye=void 0;Ae.size>0?Ye=b[y.get(Ae.values().next().value)]:Ye=C(ze).x,U[ge].forEach(function(it){D[he]=[Ye,w[y.get(it)]],N[he]=[b[y.get(it)],w[y.get(it)]],he++})},j=0;j<U.length;j++)ke(j);O=!0}if(m.alignmentConstraint.horizontal){for(var me=m.alignmentConstraint.horizontal,Se=function(ge){var ze=new Set;me[ge].forEach(function(it){ze.add(it)});var Ae=new Set([].concat(l(ze)).filter(function(it){return P.has(it)})),Ye=void 0;Ae.size>0?Ye=b[y.get(Ae.values().next().value)]:Ye=C(ze).y,me[ge].forEach(function(it){D[he]=[b[y.get(it)],Ye],N[he]=[b[y.get(it)],w[y.get(it)]],he++})},Pe=0;Pe<me.length;Pe++)Se(Pe);O=!0}m.relativePlacementConstraint&&(B=!0)})();else if(m.relativePlacementConstraint){for(var Z=0,X=0,ie=0;ie<H.length;ie++)H[ie].length>Z&&(Z=H[ie].length,X=ie);if(Z<z.size/2)R(m.relativePlacementConstraint),O=!1,B=!1;else{var K=new Map,ee=new Map,J=[];H[X].forEach(function(he){$.get(he).forEach(function(U){U.direction=="horizontal"?(K.has(he)?K.get(he).push(U):K.set(he,[U]),K.has(U.id)||K.set(U.id,[]),J.push({left:he,right:U.id})):(ee.has(he)?ee.get(he).push(U):ee.set(he,[U]),ee.has(U.id)||ee.set(U.id,[]),J.push({top:he,bottom:U.id}))})}),R(J),B=!1;var W=M(K,"horizontal"),Y=M(ee,"vertical");H[X].forEach(function(he,U){N[U]=[b[y.get(he)],w[y.get(he)]],D[U]=[],W.has(he)?D[U][0]=W.get(he):D[U][0]=b[y.get(he)],Y.has(he)?D[U][1]=Y.get(he):D[U][1]=w[y.get(he)]}),O=!0}}if(O){for(var Q=void 0,se=f.transpose(D),ue=f.transpose(N),ce=0;ce<se.length;ce++)se[ce]=f.multGamma(se[ce]),ue[ce]=f.multGamma(ue[ce]);var te=f.multMat(se,f.transpose(ue)),Le=d.svd(te);Q=f.multMat(Le.V,f.transpose(Le.U));for(var oe=0;oe<y.size;oe++){var be=[b[oe],w[oe]],Fe=[Q[0][0],Q[1][0]],Be=[Q[0][1],Q[1][1]];b[oe]=f.dotProduct(be,Fe),w[oe]=f.dotProduct(be,Be)}B&&R(m.relativePlacementConstraint)}}if(u.ENFORCE_CONSTRAINTS){if(m.fixedNodeConstraint&&m.fixedNodeConstraint.length>0){var Ve={x:0,y:0};m.fixedNodeConstraint.forEach(function(he,U){var ke={x:b[y.get(he.nodeId)],y:w[y.get(he.nodeId)]},j=he.position,me=S(j,ke);Ve.x+=me.x,Ve.y+=me.y}),Ve.x/=m.fixedNodeConstraint.length,Ve.y/=m.fixedNodeConstraint.length,b.forEach(function(he,U){b[U]+=Ve.x}),w.forEach(function(he,U){w[U]+=Ve.y}),m.fixedNodeConstraint.forEach(function(he){b[y.get(he.nodeId)]=he.position.x,w[y.get(he.nodeId)]=he.position.y})}if(m.alignmentConstraint){if(m.alignmentConstraint.vertical)for(var We=m.alignmentConstraint.vertical,qe=function(U){var ke=new Set;We[U].forEach(function(Se){ke.add(Se)});var j=new Set([].concat(l(ke)).filter(function(Se){return P.has(Se)})),me=void 0;j.size>0?me=b[y.get(j.values().next().value)]:me=C(ke).x,ke.forEach(function(Se){P.has(Se)||(b[y.get(Se)]=me)})},Re=0;Re<We.length;Re++)qe(Re);if(m.alignmentConstraint.horizontal)for(var Me=m.alignmentConstraint.horizontal,ye=function(U){var ke=new Set;Me[U].forEach(function(Se){ke.add(Se)});var j=new Set([].concat(l(ke)).filter(function(Se){return P.has(Se)})),me=void 0;j.size>0?me=w[y.get(j.values().next().value)]:me=C(ke).y,ke.forEach(function(Se){P.has(Se)||(w[y.get(Se)]=me)})},q=0;q<Me.length;q++)ye(q)}m.relativePlacementConstraint&&function(){var he=new Map,U=new Map,ke=new Map,j=new Map,me=new Map,Se=new Map,Pe=new Set,Ie=new Set;if(P.forEach(function(Tt){Pe.add(Tt),Ie.add(Tt)}),m.alignmentConstraint){if(m.alignmentConstraint.vertical)for(var ge=m.alignmentConstraint.vertical,ze=function(Ue){ke.set("dummy"+Ue,[]),ge[Ue].forEach(function(Ct){he.set(Ct,"dummy"+Ue),ke.get("dummy"+Ue).push(Ct),P.has(Ct)&&Pe.add("dummy"+Ue)}),me.set("dummy"+Ue,b[y.get(ge[Ue][0])])},Ae=0;Ae<ge.length;Ae++)ze(Ae);if(m.alignmentConstraint.horizontal)for(var Ye=m.alignmentConstraint.horizontal,it=function(Ue){j.set("dummy"+Ue,[]),Ye[Ue].forEach(function(Ct){U.set(Ct,"dummy"+Ue),j.get("dummy"+Ue).push(Ct),P.has(Ct)&&Ie.add("dummy"+Ue)}),Se.set("dummy"+Ue,w[y.get(Ye[Ue][0])])},wt=0;wt<Ye.length;wt++)it(wt)}var ft=new Map,He=new Map,ut=function(Ue){$.get(Ue).forEach(function(Ct){var fe=void 0,fi=void 0;Ct.direction=="horizontal"?(fe=he.get(Ue)?he.get(Ue):Ue,he.get(Ct.id)?fi={id:he.get(Ct.id),gap:Ct.gap,direction:Ct.direction}:fi=Ct,ft.has(fe)?ft.get(fe).push(fi):ft.set(fe,[fi]),ft.has(fi.id)||ft.set(fi.id,[])):(fe=U.get(Ue)?U.get(Ue):Ue,U.get(Ct.id)?fi={id:U.get(Ct.id),gap:Ct.gap,direction:Ct.direction}:fi=Ct,He.has(fe)?He.get(fe).push(fi):He.set(fe,[fi]),He.has(fi.id)||He.set(fi.id,[]))})},$e=!0,Ze=!1,at=void 0;try{for(var mt=$.keys()[Symbol.iterator](),Ut;!($e=(Ut=mt.next()).done);$e=!0){var st=Ut.value;ut(st)}}catch(Tt){Ze=!0,at=Tt}finally{try{!$e&&mt.return&&mt.return()}finally{if(Ze)throw at}}var Qe=I(ft),lt=I(He),kt=T(Qe),ht=T(lt),Rt=A(ft),An=A(He),Vt=[],Jr=[];kt.forEach(function(Tt,Ue){Vt[Ue]=[],Tt.forEach(function(Ct){Rt.get(Ct).length==0&&Vt[Ue].push(Ct)})}),ht.forEach(function(Tt,Ue){Jr[Ue]=[],Tt.forEach(function(Ct){An.get(Ct).length==0&&Jr[Ue].push(Ct)})});var mn=M(ft,"horizontal",Pe,me,Vt),Dr=M(He,"vertical",Ie,Se,Jr),jn=function(Ue){ke.get(Ue)?ke.get(Ue).forEach(function(Ct){b[y.get(Ct)]=mn.get(Ue)}):b[y.get(Ue)]=mn.get(Ue)},_n=!0,vt=!1,Ee=void 0;try{for(var tt=mn.keys()[Symbol.iterator](),bt;!(_n=(bt=tt.next()).done);_n=!0){var ir=bt.value;jn(ir)}}catch(Tt){vt=!0,Ee=Tt}finally{try{!_n&&tt.return&&tt.return()}finally{if(vt)throw Ee}}var ln=function(Ue){j.get(Ue)?j.get(Ue).forEach(function(Ct){w[y.get(Ct)]=Dr.get(Ue)}):w[y.get(Ue)]=Dr.get(Ue)},vn=!0,Ln=!1,In=void 0;try{for(var dt=Dr.keys()[Symbol.iterator](),yt;!(vn=(yt=dt.next()).done);vn=!0){var ir=yt.value;ln(ir)}}catch(Tt){Ln=!0,In=Tt}finally{try{!vn&&dt.return&&dt.return()}finally{if(Ln)throw In}}}()}for(var de=0;de<_.length;de++){var ae=_[de];ae.getChild()==null&&ae.setCenter(b[y.get(ae.id)],w[y.get(ae.id)])}},a.exports=p},551:a=>{a.exports=t}},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var i=n(45);return i})()})});var Ige=yi((Fx,FO)=>{(function(e,r){typeof Fx=="object"&&typeof FO=="object"?FO.exports=r(BO()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof Fx=="object"?Fx.cytoscapeFcose=r(BO()):e.cytoscapeFcose=r(e.coseBase)})(Fx,function(t){return(()=>{"use strict";var e={658:a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(s){for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u<o;u++)l[u-1]=arguments[u];return l.forEach(function(h){Object.keys(h).forEach(function(f){return s[f]=h[f]})}),s}},548:(a,s,o)=>{var l=function(){function f(d,p){var g=[],m=!0,x=!1,y=void 0;try{for(var b=d[Symbol.iterator](),w;!(m=(w=b.next()).done)&&(g.push(w.value),!(p&&g.length===p));m=!0);}catch(_){x=!0,y=_}finally{try{!m&&b.return&&b.return()}finally{if(x)throw y}}return g}return function(d,p){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return f(d,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=o(140).layoutBase.LinkedList,h={};h.getTopMostNodes=function(f){for(var d={},p=0;p<f.length;p++)d[f[p].id()]=!0;var g=f.filter(function(m,x){typeof m=="number"&&(m=x);for(var y=m.parent()[0];y!=null;){if(d[y.id()])return!1;y=y.parent()[0]}return!0});return g},h.connectComponents=function(f,d,p,g){var m=new u,x=new Set,y=[],b=void 0,w=void 0,_=void 0,k=!1,E=1,L=[],S=[],C=function(){var R=f.collection();S.push(R);var T=p[0],I=f.collection();I.merge(T).merge(T.descendants().intersection(d)),y.push(T),I.forEach(function(N){m.push(N),x.add(N),R.merge(N)});for(var A=function(){T=m.shift();var O=f.collection();T.neighborhood().nodes().forEach(function(z){d.intersection(T.edgesWith(z)).length>0&&O.merge(z)});for(var B=0;B<O.length;B++){var P=O[B];if(b=p.intersection(P.union(P.ancestors())),b!=null&&!x.has(b[0])){var $=b.union(b.descendants());$.forEach(function(z){m.push(z),x.add(z),R.merge(z),p.has(z)&&y.push(z)})}}};m.length!=0;)A();if(R.forEach(function(N){d.intersection(N.connectedEdges()).forEach(function(O){R.has(O.source())&&R.has(O.target())&&R.merge(O)})}),y.length==p.length&&(k=!0),!k||k&&E>1){w=y[0],_=w.connectedEdges().length,y.forEach(function(N){N.connectedEdges().length<_&&(_=N.connectedEdges().length,w=N)}),L.push(w.id());var D=f.collection();D.merge(y[0]),y.forEach(function(N){D.merge(N)}),y=[],p=p.difference(D),E++}};do C();while(!k);return g&&L.length>0&&g.set("dummy"+(g.size+1),L),S},h.relocateComponent=function(f,d,p){if(!p.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,x=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(p.quality=="draft"){var b=!0,w=!1,_=void 0;try{for(var k=d.nodeIndexes[Symbol.iterator](),E;!(b=(E=k.next()).done);b=!0){var L=E.value,S=l(L,2),C=S[0],M=S[1],R=p.cy.getElementById(C);if(R){var T=R.boundingBox(),I=d.xCoords[M]-T.w/2,A=d.xCoords[M]+T.w/2,D=d.yCoords[M]-T.h/2,N=d.yCoords[M]+T.h/2;I<g&&(g=I),A>m&&(m=A),D<x&&(x=D),N>y&&(y=N)}}}catch(z){w=!0,_=z}finally{try{!b&&k.return&&k.return()}finally{if(w)throw _}}var O=f.x-(m+g)/2,B=f.y-(y+x)/2;d.xCoords=d.xCoords.map(function(z){return z+O}),d.yCoords=d.yCoords.map(function(z){return z+B})}else{Object.keys(d).forEach(function(z){var H=d[z],Z=H.getRect().x,X=H.getRect().x+H.getRect().width,ie=H.getRect().y,K=H.getRect().y+H.getRect().height;Z<g&&(g=Z),X>m&&(m=X),ie<x&&(x=ie),K>y&&(y=K)});var P=f.x-(m+g)/2,$=f.y-(y+x)/2;Object.keys(d).forEach(function(z){var H=d[z];H.setCenter(H.getCenterX()+P,H.getCenterY()+$)})}}},h.calcBoundingBox=function(f,d,p,g){for(var m=Number.MAX_SAFE_INTEGER,x=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,w=void 0,_=void 0,k=void 0,E=void 0,L=f.descendants().not(":parent"),S=L.length,C=0;C<S;C++){var M=L[C];w=d[g.get(M.id())]-M.width()/2,_=d[g.get(M.id())]+M.width()/2,k=p[g.get(M.id())]-M.height()/2,E=p[g.get(M.id())]+M.height()/2,m>w&&(m=w),x<_&&(x=_),y>k&&(y=k),b<E&&(b=E)}var R={};return R.topLeftX=m,R.topLeftY=y,R.width=x-m,R.height=b-y,R},h.calcParentsWithoutChildren=function(f,d){var p=f.collection();return d.nodes(":parent").forEach(function(g){var m=!1;g.children().forEach(function(x){x.css("display")!="none"&&(m=!0)}),m||p.merge(g)}),p},a.exports=h},816:(a,s,o)=>{var l=o(548),u=o(140).CoSELayout,h=o(140).CoSENode,f=o(140).layoutBase.PointD,d=o(140).layoutBase.DimensionD,p=o(140).layoutBase.LayoutConstants,g=o(140).layoutBase.FDLayoutConstants,m=o(140).CoSEConstants,x=function(b,w){var _=b.cy,k=b.eles,E=k.nodes(),L=k.edges(),S=void 0,C=void 0,M=void 0,R={};b.randomize&&(S=w.nodeIndexes,C=w.xCoords,M=w.yCoords);var T=function(z){return typeof z=="function"},I=function(z,H){return T(z)?z(H):z},A=l.calcParentsWithoutChildren(_,k),D=function $(z,H,Z,X){for(var ie=H.length,K=0;K<ie;K++){var ee=H[K],J=null;ee.intersection(A).length==0&&(J=ee.children());var W=void 0,Y=ee.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(ee.outerWidth()!=null&&ee.outerHeight()!=null)if(X.randomize)if(!ee.isParent())W=z.add(new h(Z.graphManager,new f(C[S.get(ee.id())]-Y.w/2,M[S.get(ee.id())]-Y.h/2),new d(parseFloat(Y.w),parseFloat(Y.h))));else{var Q=l.calcBoundingBox(ee,C,M,S);ee.intersection(A).length==0?W=z.add(new h(Z.graphManager,new f(Q.topLeftX,Q.topLeftY),new d(Q.width,Q.height))):W=z.add(new h(Z.graphManager,new f(Q.topLeftX,Q.topLeftY),new d(parseFloat(Y.w),parseFloat(Y.h))))}else W=z.add(new h(Z.graphManager,new f(ee.position("x")-Y.w/2,ee.position("y")-Y.h/2),new d(parseFloat(Y.w),parseFloat(Y.h))));else W=z.add(new h(this.graphManager));if(W.id=ee.data("id"),W.nodeRepulsion=I(X.nodeRepulsion,ee),W.paddingLeft=parseInt(ee.css("padding")),W.paddingTop=parseInt(ee.css("padding")),W.paddingRight=parseInt(ee.css("padding")),W.paddingBottom=parseInt(ee.css("padding")),X.nodeDimensionsIncludeLabels&&(W.labelWidth=ee.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,W.labelHeight=ee.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,W.labelPosVertical=ee.css("text-valign"),W.labelPosHorizontal=ee.css("text-halign")),R[ee.data("id")]=W,isNaN(W.rect.x)&&(W.rect.x=0),isNaN(W.rect.y)&&(W.rect.y=0),J!=null&&J.length>0){var se=void 0;se=Z.getGraphManager().add(Z.newGraph(),W),$(se,J,Z,X)}}},N=function(z,H,Z){for(var X=0,ie=0,K=0;K<Z.length;K++){var ee=Z[K],J=R[ee.data("source")],W=R[ee.data("target")];if(J&&W&&J!==W&&J.getEdgesBetween(W).length==0){var Y=H.add(z.newEdge(),J,W);Y.id=ee.id(),Y.idealLength=I(b.idealEdgeLength,ee),Y.edgeElasticity=I(b.edgeElasticity,ee),X+=Y.idealLength,ie++}}b.idealEdgeLength!=null&&(ie>0?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=X/ie:T(b.idealEdgeLength)?m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:m.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=b.idealEdgeLength,m.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,m.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},O=function(z,H){H.fixedNodeConstraint&&(z.constraints.fixedNodeConstraint=H.fixedNodeConstraint),H.alignmentConstraint&&(z.constraints.alignmentConstraint=H.alignmentConstraint),H.relativePlacementConstraint&&(z.constraints.relativePlacementConstraint=H.relativePlacementConstraint)};b.nestingFactor!=null&&(m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=b.nestingFactor),b.gravity!=null&&(m.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=b.gravity),b.numIter!=null&&(m.MAX_ITERATIONS=g.MAX_ITERATIONS=b.numIter),b.gravityRange!=null&&(m.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=b.gravityRange),b.gravityCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=b.gravityCompound),b.gravityRangeCompound!=null&&(m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=b.gravityRangeCompound),b.initialEnergyOnIncremental!=null&&(m.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=b.initialEnergyOnIncremental),b.tilingCompareBy!=null&&(m.TILING_COMPARE_BY=b.tilingCompareBy),b.quality=="proof"?p.QUALITY=2:p.QUALITY=0,m.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=p.NODE_DIMENSIONS_INCLUDE_LABELS=b.nodeDimensionsIncludeLabels,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!b.randomize,m.ANIMATE=g.ANIMATE=p.ANIMATE=b.animate,m.TILE=b.tile,m.TILING_PADDING_VERTICAL=typeof b.tilingPaddingVertical=="function"?b.tilingPaddingVertical.call():b.tilingPaddingVertical,m.TILING_PADDING_HORIZONTAL=typeof b.tilingPaddingHorizontal=="function"?b.tilingPaddingHorizontal.call():b.tilingPaddingHorizontal,m.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!0,m.PURE_INCREMENTAL=!b.randomize,p.DEFAULT_UNIFORM_LEAF_NODE_SIZES=b.uniformNodeDimensions,b.step=="transformed"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!1),b.step=="enforced"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!1),b.step=="cose"&&(m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!1,m.APPLY_LAYOUT=!0),b.step=="all"&&(b.randomize?m.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:m.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,m.ENFORCE_CONSTRAINTS=!0,m.APPLY_LAYOUT=!0),b.fixedNodeConstraint||b.alignmentConstraint||b.relativePlacementConstraint?m.TREE_REDUCTION_ON_INCREMENTAL=!1:m.TREE_REDUCTION_ON_INCREMENTAL=!0;var B=new u,P=B.newGraphManager();return D(P.addRoot(),l.getTopMostNodes(E),B,b),N(B,P,L),O(B,b),B.runLayout(),R};a.exports={coseLayout:x}},212:(a,s,o)=>{var l=function(){function b(w,_){for(var k=0;k<_.length;k++){var E=_[k];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,_,k){return _&&b(w.prototype,_),k&&b(w,k),w}}();function u(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}var h=o(658),f=o(548),d=o(657),p=d.spectralLayout,g=o(816),m=g.coseLayout,x=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(w){return 4500},idealEdgeLength:function(w){return 50},edgeElasticity:function(w){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),y=function(){function b(w){u(this,b),this.options=h({},x,w)}return l(b,[{key:"run",value:function(){var _=this,k=this.options,E=k.cy,L=k.eles,S=[],C=void 0,M=void 0,R=[],T=void 0,I=[];k.fixedNodeConstraint&&(!Array.isArray(k.fixedNodeConstraint)||k.fixedNodeConstraint.length==0)&&(k.fixedNodeConstraint=void 0),k.alignmentConstraint&&(k.alignmentConstraint.vertical&&(!Array.isArray(k.alignmentConstraint.vertical)||k.alignmentConstraint.vertical.length==0)&&(k.alignmentConstraint.vertical=void 0),k.alignmentConstraint.horizontal&&(!Array.isArray(k.alignmentConstraint.horizontal)||k.alignmentConstraint.horizontal.length==0)&&(k.alignmentConstraint.horizontal=void 0)),k.relativePlacementConstraint&&(!Array.isArray(k.relativePlacementConstraint)||k.relativePlacementConstraint.length==0)&&(k.relativePlacementConstraint=void 0);var A=k.fixedNodeConstraint||k.alignmentConstraint||k.relativePlacementConstraint;A&&(k.tile=!1,k.packComponents=!1);var D=void 0,N=!1;if(E.layoutUtilities&&k.packComponents&&(D=E.layoutUtilities("get"),D||(D=E.layoutUtilities()),N=!0),L.nodes().length>0)if(N){var P=f.getTopMostNodes(k.eles.nodes());if(T=f.connectComponents(E,k.eles,P),T.forEach(function(oe){var be=oe.boundingBox();I.push({x:be.x1+be.w/2,y:be.y1+be.h/2})}),k.randomize&&T.forEach(function(oe){k.eles=oe,S.push(p(k))}),k.quality=="default"||k.quality=="proof"){var $=E.collection();if(k.tile){var z=new Map,H=[],Z=[],X=0,ie={nodeIndexes:z,xCoords:H,yCoords:Z},K=[];if(T.forEach(function(oe,be){oe.edges().length==0&&(oe.nodes().forEach(function(Fe,Be){$.merge(oe.nodes()[Be]),Fe.isParent()||(ie.nodeIndexes.set(oe.nodes()[Be].id(),X++),ie.xCoords.push(oe.nodes()[0].position().x),ie.yCoords.push(oe.nodes()[0].position().y))}),K.push(be))}),$.length>1){var ee=$.boundingBox();I.push({x:ee.x1+ee.w/2,y:ee.y1+ee.h/2}),T.push($),S.push(ie);for(var J=K.length-1;J>=0;J--)T.splice(K[J],1),S.splice(K[J],1),I.splice(K[J],1)}}T.forEach(function(oe,be){k.eles=oe,R.push(m(k,S[be])),f.relocateComponent(I[be],R[be],k)})}else T.forEach(function(oe,be){f.relocateComponent(I[be],S[be],k)});var W=new Set;if(T.length>1){var Y=[],Q=L.filter(function(oe){return oe.css("display")=="none"});T.forEach(function(oe,be){var Fe=void 0;if(k.quality=="draft"&&(Fe=S[be].nodeIndexes),oe.nodes().not(Q).length>0){var Be={};Be.edges=[],Be.nodes=[];var Ve=void 0;oe.nodes().not(Q).forEach(function(We){if(k.quality=="draft")if(!We.isParent())Ve=Fe.get(We.id()),Be.nodes.push({x:S[be].xCoords[Ve]-We.boundingbox().w/2,y:S[be].yCoords[Ve]-We.boundingbox().h/2,width:We.boundingbox().w,height:We.boundingbox().h});else{var qe=f.calcBoundingBox(We,S[be].xCoords,S[be].yCoords,Fe);Be.nodes.push({x:qe.topLeftX,y:qe.topLeftY,width:qe.width,height:qe.height})}else R[be][We.id()]&&Be.nodes.push({x:R[be][We.id()].getLeft(),y:R[be][We.id()].getTop(),width:R[be][We.id()].getWidth(),height:R[be][We.id()].getHeight()})}),oe.edges().forEach(function(We){var qe=We.source(),Re=We.target();if(qe.css("display")!="none"&&Re.css("display")!="none")if(k.quality=="draft"){var Me=Fe.get(qe.id()),ye=Fe.get(Re.id()),q=[],de=[];if(qe.isParent()){var ae=f.calcBoundingBox(qe,S[be].xCoords,S[be].yCoords,Fe);q.push(ae.topLeftX+ae.width/2),q.push(ae.topLeftY+ae.height/2)}else q.push(S[be].xCoords[Me]),q.push(S[be].yCoords[Me]);if(Re.isParent()){var he=f.calcBoundingBox(Re,S[be].xCoords,S[be].yCoords,Fe);de.push(he.topLeftX+he.width/2),de.push(he.topLeftY+he.height/2)}else de.push(S[be].xCoords[ye]),de.push(S[be].yCoords[ye]);Be.edges.push({startX:q[0],startY:q[1],endX:de[0],endY:de[1]})}else R[be][qe.id()]&&R[be][Re.id()]&&Be.edges.push({startX:R[be][qe.id()].getCenterX(),startY:R[be][qe.id()].getCenterY(),endX:R[be][Re.id()].getCenterX(),endY:R[be][Re.id()].getCenterY()})}),Be.nodes.length>0&&(Y.push(Be),W.add(be))}});var se=D.packComponents(Y,k.randomize).shifts;if(k.quality=="draft")S.forEach(function(oe,be){var Fe=oe.xCoords.map(function(Ve){return Ve+se[be].dx}),Be=oe.yCoords.map(function(Ve){return Ve+se[be].dy});oe.xCoords=Fe,oe.yCoords=Be});else{var ue=0;W.forEach(function(oe){Object.keys(R[oe]).forEach(function(be){var Fe=R[oe][be];Fe.setCenter(Fe.getCenterX()+se[ue].dx,Fe.getCenterY()+se[ue].dy)}),ue++})}}}else{var O=k.eles.boundingBox();if(I.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),k.randomize){var B=p(k);S.push(B)}k.quality=="default"||k.quality=="proof"?(R.push(m(k,S[0])),f.relocateComponent(I[0],R[0],k)):f.relocateComponent(I[0],S[0],k)}var ce=function(be,Fe){if(k.quality=="default"||k.quality=="proof"){typeof be=="number"&&(be=Fe);var Be=void 0,Ve=void 0,We=be.data("id");return R.forEach(function(Re){We in Re&&(Be={x:Re[We].getRect().getCenterX(),y:Re[We].getRect().getCenterY()},Ve=Re[We])}),k.nodeDimensionsIncludeLabels&&(Ve.labelWidth&&(Ve.labelPosHorizontal=="left"?Be.x+=Ve.labelWidth/2:Ve.labelPosHorizontal=="right"&&(Be.x-=Ve.labelWidth/2)),Ve.labelHeight&&(Ve.labelPosVertical=="top"?Be.y+=Ve.labelHeight/2:Ve.labelPosVertical=="bottom"&&(Be.y-=Ve.labelHeight/2))),Be==null&&(Be={x:be.position("x"),y:be.position("y")}),{x:Be.x,y:Be.y}}else{var qe=void 0;return S.forEach(function(Re){var Me=Re.nodeIndexes.get(be.id());Me!=null&&(qe={x:Re.xCoords[Me],y:Re.yCoords[Me]})}),qe==null&&(qe={x:be.position("x"),y:be.position("y")}),{x:qe.x,y:qe.y}}};if(k.quality=="default"||k.quality=="proof"||k.randomize){var te=f.calcParentsWithoutChildren(E,L),Le=L.filter(function(oe){return oe.css("display")=="none"});k.eles=L.not(Le),L.nodes().not(":parent").not(Le).layoutPositions(_,k,ce),te.length>0&&te.forEach(function(oe){oe.position(ce(oe))})}else console.log("If randomize option is set to false, then quality option must be \'default\' or \'proof\'.")}}]),b}();a.exports=y},657:(a,s,o)=>{var l=o(548),u=o(140).layoutBase.Matrix,h=o(140).layoutBase.SVD,f=function(p){var g=p.cy,m=p.eles,x=m.nodes(),y=m.nodes(":parent"),b=new Map,w=new Map,_=new Map,k=[],E=[],L=[],S=[],C=[],M=[],R=[],T=[],I=void 0,A=void 0,D=1e8,N=1e-9,O=p.piTol,B=p.samplingType,P=p.nodeSeparation,$=void 0,z=function(){for(var ke=0,j=0,me=!1;j<$;){ke=Math.floor(Math.random()*A),me=!1;for(var Se=0;Se<j;Se++)if(S[Se]==ke){me=!0;break}if(!me)S[j]=ke,j++;else continue}},H=function(ke,j,me){for(var Se=[],Pe=0,Ie=0,ge=0,ze=void 0,Ae=[],Ye=0,it=1,wt=0;wt<A;wt++)Ae[wt]=D;for(Se[Ie]=ke,Ae[ke]=0;Ie>=Pe;){ge=Se[Pe++];for(var ft=k[ge],He=0;He<ft.length;He++)ze=w.get(ft[He]),Ae[ze]==D&&(Ae[ze]=Ae[ge]+1,Se[++Ie]=ze);M[ge][j]=Ae[ge]*P}if(me){for(var ut=0;ut<A;ut++)M[ut][j]<C[ut]&&(C[ut]=M[ut][j]);for(var $e=0;$e<A;$e++)C[$e]>Ye&&(Ye=C[$e],it=$e)}return it},Z=function(ke){var j=void 0;if(ke){j=Math.floor(Math.random()*A),I=j;for(var Se=0;Se<A;Se++)C[Se]=D;for(var Pe=0;Pe<$;Pe++)S[Pe]=j,j=H(j,Pe,ke)}else{z();for(var me=0;me<$;me++)H(S[me],me,ke,!1)}for(var Ie=0;Ie<A;Ie++)for(var ge=0;ge<$;ge++)M[Ie][ge]*=M[Ie][ge];for(var ze=0;ze<$;ze++)R[ze]=[];for(var Ae=0;Ae<$;Ae++)for(var Ye=0;Ye<$;Ye++)R[Ae][Ye]=M[S[Ye]][Ae]},X=function(){for(var ke=h.svd(R),j=ke.S,me=ke.U,Se=ke.V,Pe=j[0]*j[0]*j[0],Ie=[],ge=0;ge<$;ge++){Ie[ge]=[];for(var ze=0;ze<$;ze++)Ie[ge][ze]=0,ge==ze&&(Ie[ge][ze]=j[ge]/(j[ge]*j[ge]+Pe/(j[ge]*j[ge])))}T=u.multMat(u.multMat(Se,Ie),u.transpose(me))},ie=function(){for(var ke=void 0,j=void 0,me=[],Se=[],Pe=[],Ie=[],ge=0;ge<A;ge++)me[ge]=Math.random(),Se[ge]=Math.random();me=u.normalize(me),Se=u.normalize(Se);for(var ze=0,Ae=N,Ye=N,it=void 0;;){ze++;for(var wt=0;wt<A;wt++)Pe[wt]=me[wt];if(me=u.multGamma(u.multL(u.multGamma(Pe),M,T)),ke=u.dotProduct(Pe,me),me=u.normalize(me),Ae=u.dotProduct(Pe,me),it=Math.abs(Ae/Ye),it<=1+O&&it>=1)break;Ye=Ae}for(var ft=0;ft<A;ft++)Pe[ft]=me[ft];for(ze=0,Ye=N;;){ze++;for(var He=0;He<A;He++)Ie[He]=Se[He];if(Ie=u.minusOp(Ie,u.multCons(Pe,u.dotProduct(Pe,Ie))),Se=u.multGamma(u.multL(u.multGamma(Ie),M,T)),j=u.dotProduct(Ie,Se),Se=u.normalize(Se),Ae=u.dotProduct(Ie,Se),it=Math.abs(Ae/Ye),it<=1+O&&it>=1)break;Ye=Ae}for(var ut=0;ut<A;ut++)Ie[ut]=Se[ut];E=u.multCons(Pe,Math.sqrt(Math.abs(ke))),L=u.multCons(Ie,Math.sqrt(Math.abs(j)))};l.connectComponents(g,m,l.getTopMostNodes(x),b),y.forEach(function(U){l.connectComponents(g,m,l.getTopMostNodes(U.descendants().intersection(m)),b)});for(var K=0,ee=0;ee<x.length;ee++)x[ee].isParent()||w.set(x[ee].id(),K++);var J=!0,W=!1,Y=void 0;try{for(var Q=b.keys()[Symbol.iterator](),se;!(J=(se=Q.next()).done);J=!0){var ue=se.value;w.set(ue,K++)}}catch(U){W=!0,Y=U}finally{try{!J&&Q.return&&Q.return()}finally{if(W)throw Y}}for(var ce=0;ce<w.size;ce++)k[ce]=[];y.forEach(function(U){for(var ke=U.children().intersection(m);ke.nodes(":childless").length==0;)ke=ke.nodes()[0].children().intersection(m);var j=0,me=ke.nodes(":childless")[0].connectedEdges().length;ke.nodes(":childless").forEach(function(Se,Pe){Se.connectedEdges().length<me&&(me=Se.connectedEdges().length,j=Pe)}),_.set(U.id(),ke.nodes(":childless")[j].id())}),x.forEach(function(U){var ke=void 0;U.isParent()?ke=w.get(_.get(U.id())):ke=w.get(U.id()),U.neighborhood().nodes().forEach(function(j){m.intersection(U.edgesWith(j)).length>0&&(j.isParent()?k[ke].push(_.get(j.id())):k[ke].push(j.id()))})});var te=function(ke){var j=w.get(ke),me=void 0;b.get(ke).forEach(function(Se){g.getElementById(Se).isParent()?me=_.get(Se):me=Se,k[j].push(me),k[w.get(me)].push(ke)})},Le=!0,oe=!1,be=void 0;try{for(var Fe=b.keys()[Symbol.iterator](),Be;!(Le=(Be=Fe.next()).done);Le=!0){var Ve=Be.value;te(Ve)}}catch(U){oe=!0,be=U}finally{try{!Le&&Fe.return&&Fe.return()}finally{if(oe)throw be}}A=w.size;var We=void 0;if(A>2){$=A<p.sampleSize?A:p.sampleSize;for(var qe=0;qe<A;qe++)M[qe]=[];for(var Re=0;Re<$;Re++)T[Re]=[];return p.quality=="draft"||p.step=="all"?(Z(B),X(),ie(),We={nodeIndexes:w,xCoords:E,yCoords:L}):(w.forEach(function(U,ke){E.push(g.getElementById(ke).position("x")),L.push(g.getElementById(ke).position("y"))}),We={nodeIndexes:w,xCoords:E,yCoords:L}),We}else{var Me=w.keys(),ye=g.getElementById(Me.next().value),q=ye.position(),de=ye.outerWidth();if(E.push(q.x),L.push(q.y),A==2){var ae=g.getElementById(Me.next().value),he=ae.outerWidth();E.push(q.x+de/2+he/2+p.idealEdgeLength),L.push(q.y)}return We={nodeIndexes:w,xCoords:E,yCoords:L},We}};a.exports={spectralLayout:f}},579:(a,s,o)=>{var l=o(212),u=function(f){f&&f("layout","fcose",l)};typeof cytoscape<"u"&&u(cytoscape),a.exports=u},140:a=>{a.exports=t}},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var i=n(579);return i})()})});var Xge={};mr(Xge,{diagram:()=>$Qe});function Bi(t){let e=pe().architecture;return e?.[t]?e[t]:Fge[t]}function $ge(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"service",id:r.id,icon:r.icon,label:r.title,parent:r.in,width:Bi("iconSize"),height:Bi("iconSize")},classes:"node-service"})})}function Gge(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"junction",id:r.id,parent:r.in,width:Bi("iconSize"),height:Bi("iconSize")},classes:"node-junction"})})}function Uge(t,e){e.nodes().map(r=>{let n=e1(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}function Vge(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}function Wge(t,e){t.forEach(r=>{let{lhsId:n,rhsId:i,lhsInto:a,lhsGroup:s,rhsInto:o,lhsDir:l,rhsDir:u,rhsGroup:h,title:f}=r,d=Pge(r.lhsDir,r.rhsDir)?"segments":"straight",p={id:`${n}-${i}`,label:f,source:n,sourceDir:l,sourceArrow:a,sourceGroup:s,sourceEndpoint:l==="L"?"0 50%":l==="R"?"100% 50%":l==="T"?"50% 0":"50% 100%",target:i,targetDir:u,targetArrow:o,targetGroup:h,targetEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%"};e.add({group:"edges",data:p,classes:d})})}function Hge(t){let e=t.map(i=>{let a={},s={};return Object.entries(i).forEach(([o,[l,u]])=>{a[u]||(a[u]=[]),s[l]||(s[l]=[]),a[u].push(o),s[l].push(o)}),{horiz:Object.values(a).filter(o=>o.length>1),vert:Object.values(s).filter(o=>o.length>1)}}),[r,n]=e.reduce(([i,a],{horiz:s,vert:o})=>[[...i,...s],[...a,...o]],[[],[]]);return{horizontal:r,vertical:n}}function qge(t){let e=[],r=v(i=>`${i[0]},${i[1]}`,"posToStr"),n=v(i=>i.split(",").map(a=>parseInt(a)),"strToPos");return t.forEach(i=>{let a=Object.fromEntries(Object.entries(i).map(([u,h])=>[r(h),u])),s=[r([0,0])],o={},l={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){let u=s.shift();if(u){o[u]=1;let h=a[u];if(h){let f=n(u);Object.entries(l).forEach(([d,p])=>{let g=r([f[0]+p[0],f[1]+p[1]]),m=a[g];m&&!o[g]&&(s.push(g),e.push({[Mge[d]]:m,[Mge[cQe(d)]]:h,gap:1.5*Bi("iconSize")}))})}}}}),e}function Yge(t,e,r,n,{spatialMaps:i}){return new Promise(a=>{let s=Ge("body").append("div").attr("id","cy").attr("style","display:none"),o=qo({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Bi("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Bi("padding")}px`}}]});s.remove(),Vge(r,o),$ge(t,o),Gge(e,o),Wge(n,o);let l=Hge(i),u=qge(i),h=o.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(f){let[d,p]=f.connectedNodes(),{parent:g}=e1(d),{parent:m}=e1(p);return g===m?1.5*Bi("iconSize"):.5*Bi("iconSize")},edgeElasticity(f){let[d,p]=f.connectedNodes(),{parent:g}=e1(d),{parent:m}=e1(p);return g===m?.45:.001},alignmentConstraint:l,relativePlacementConstraint:u});h.one("layoutstop",()=>{function f(d,p,g,m){let x,y,{x:b,y:w}=d,{x:_,y:k}=p;y=(m-w+(b-g)*(w-k)/(b-_))/Math.sqrt(1+Math.pow((w-k)/(b-_),2)),x=Math.sqrt(Math.pow(m-w,2)+Math.pow(g-b,2)-Math.pow(y,2));let E=Math.sqrt(Math.pow(_-b,2)+Math.pow(k-w,2));x=x/E;let L=(_-b)*(m-w)-(k-w)*(g-b);switch(!0){case L>=0:L=1;break;case L<0:L=-1;break}let S=(_-b)*(g-b)+(k-w)*(m-w);switch(!0){case S>=0:S=1;break;case S<0:S=-1;break}return y=Math.abs(y)*L,x=x*S,{distances:y,weights:x}}v(f,"getSegmentWeights"),o.startBatch();for(let d of Object.values(o.edges()))if(d.data?.()){let{x:p,y:g}=d.source().position(),{x:m,y:x}=d.target().position();if(p!==m&&g!==x){let y=d.sourceEndpoint(),b=d.targetEndpoint(),{sourceDir:w}=Bge(d),[_,k]=vf(w)?[y.x,b.y]:[b.x,y.y],{weights:E,distances:L}=f(y,b,_,k);d.style("segment-distances",L),d.style("segment-weights",E)}}o.endBatch(),h.run()}),h.run(),o.ready(f=>{re.info("Ready",f),a(o)})})}var zge,Mge,Dge,hE,cQe,Oge,Ls,vf,Pge,uQe,hQe,zO,fQe,dQe,pQe,gQe,Bge,e1,Fge,cr,mQe,vQe,yQe,xQe,bQe,wQe,kQe,TQe,EQe,SQe,CQe,AQe,_Qe,LQe,fE,RQe,NQe,IQe,MQe,Jm,zx,DQe,OQe,PQe,BQe,FQe,zQe,$Qe,jge=F(()=>{el();za();oy();Mw();xn();ku();or();cm();XD();zge=ga(Ige(),1);lr();Mge={L:"left",R:"right",T:"top",B:"bottom"},Dge={L:v(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:v(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:v(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:v(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},hE={L:v((t,e)=>t-e+2,"L"),R:v((t,e)=>t-2,"R"),T:v((t,e)=>t-e+2,"T"),B:v((t,e)=>t-2,"B")},cQe=v(function(t){return Ls(t)?t==="L"?"R":"L":t==="T"?"B":"T"},"getOppositeArchitectureDirection"),Oge=v(function(t){let e=t;return e==="L"||e==="R"||e==="T"||e==="B"},"isArchitectureDirection"),Ls=v(function(t){let e=t;return e==="L"||e==="R"},"isArchitectureDirectionX"),vf=v(function(t){let e=t;return e==="T"||e==="B"},"isArchitectureDirectionY"),Pge=v(function(t,e){let r=Ls(t)&&vf(e),n=vf(t)&&Ls(e);return r||n},"isArchitectureDirectionXY"),uQe=v(function(t){let e=t[0],r=t[1],n=Ls(e)&&vf(r),i=vf(e)&&Ls(r);return n||i},"isArchitecturePairXY"),hQe=v(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),zO=v(function(t,e){let r=`${t}${e}`;return hQe(r)?r:void 0},"getArchitectureDirectionPair"),fQe=v(function([t,e],r){let n=r[0],i=r[1];return Ls(n)?vf(i)?[t+(n==="L"?-1:1),e+(i==="T"?1:-1)]:[t+(n==="L"?-1:1),e]:Ls(i)?[t+(i==="L"?1:-1),e+(n==="T"?1:-1)]:[t,e+(n==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),dQe=v(function(t){return t==="LT"||t==="TL"?[1,1]:t==="BL"||t==="LB"?[1,-1]:t==="BR"||t==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),pQe=v(function(t){return t.type==="service"},"isArchitectureService"),gQe=v(function(t){return t.type==="junction"},"isArchitectureJunction"),Bge=v(t=>t.data(),"edgeData"),e1=v(t=>t.data(),"nodeData"),Fge=sr.architecture,cr=new vg(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Fge,dataStructures:void 0,elements:{}})),mQe=v(()=>{cr.reset(),xr()},"clear"),vQe=v(function({id:t,icon:e,in:r,title:n,iconText:i}){if(cr.records.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${cr.records.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(cr.records.registeredIds[r]===void 0)throw new Error(`The service [${t}]\'s parent does not exist. Please make sure the parent is created before this service`);if(cr.records.registeredIds[r]==="node")throw new Error(`The service [${t}]\'s parent is not a group`)}cr.records.registeredIds[t]="node",cr.records.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}},"addService"),yQe=v(()=>Object.values(cr.records.nodes).filter(pQe),"getServices"),xQe=v(function({id:t,in:e}){cr.records.registeredIds[t]="node",cr.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),bQe=v(()=>Object.values(cr.records.nodes).filter(gQe),"getJunctions"),wQe=v(()=>Object.values(cr.records.nodes),"getNodes"),kQe=v(t=>cr.records.nodes[t],"getNode"),TQe=v(function({id:t,icon:e,in:r,title:n}){if(cr.records.registeredIds[t]!==void 0)throw new Error(`The group id [${t}] is already in use by another ${cr.records.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(cr.records.registeredIds[r]===void 0)throw new Error(`The group [${t}]\'s parent does not exist. Please make sure the parent is created before this group`);if(cr.records.registeredIds[r]==="node")throw new Error(`The group [${t}]\'s parent is not a group`)}cr.records.registeredIds[t]="group",cr.records.groups[t]={id:t,icon:e,title:n,in:r}},"addGroup"),EQe=v(()=>Object.values(cr.records.groups),"getGroups"),SQe=v(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!Oge(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${r}`);if(!Oge(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${n}`);if(cr.records.nodes[t]===void 0&&cr.records.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(cr.records.nodes[e]===void 0&&cr.records.groups[t]===void 0)throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);let u=cr.records.nodes[t].in,h=cr.records.nodes[e].in;if(s&&u&&h&&u==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&u&&h&&u==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:o,title:l};cr.records.edges.push(f),cr.records.nodes[t]&&cr.records.nodes[e]&&(cr.records.nodes[t].edges.push(cr.records.edges[cr.records.edges.length-1]),cr.records.nodes[e].edges.push(cr.records.edges[cr.records.edges.length-1]))},"addEdge"),CQe=v(()=>cr.records.edges,"getEdges"),AQe=v(()=>{if(cr.records.dataStructures===void 0){let t=Object.entries(cr.records.nodes).reduce((s,[o,l])=>(s[o]=l.edges.reduce((u,h)=>{if(h.lhsId===o){let f=zO(h.lhsDir,h.rhsDir);f&&(u[f]=h.rhsId)}else{let f=zO(h.rhsDir,h.lhsDir);f&&(u[f]=h.lhsId)}return u},{}),s),{}),e=Object.keys(t)[0],r={[e]:1},n=Object.keys(t).reduce((s,o)=>o===e?s:{...s,[o]:1},{}),i=v(s=>{let o={[s]:[0,0]},l=[s];for(;l.length>0;){let u=l.shift();if(u){r[u]=1,delete n[u];let h=t[u],[f,d]=o[u];Object.entries(h).forEach(([p,g])=>{r[g]||(o[g]=fQe([f,d],p),l.push(g))})}}return o},"BFS"),a=[i(e)];for(;Object.keys(n).length>0;)a.push(i(Object.keys(n)[0]));cr.records.dataStructures={adjList:t,spatialMaps:a}}return cr.records.dataStructures},"getDataStructures"),_Qe=v((t,e)=>{cr.records.elements[t]=e},"setElementForId"),LQe=v(t=>cr.records.elements[t],"getElementById"),fE={clear:mQe,setDiagramTitle:en,getDiagramTitle:Hr,setAccTitle:Tr,getAccTitle:Ar,setAccDescription:_r,getAccDescription:Lr,addService:vQe,getServices:yQe,addJunction:xQe,getJunctions:bQe,getNodes:wQe,getNode:kQe,addGroup:TQe,getGroups:EQe,addEdge:SQe,getEdges:CQe,setElementForId:_Qe,getElementById:LQe,getDataStructures:AQe};v(Bi,"getConfigField");RQe=v((t,e)=>{Cu(t,e),t.groups.map(e.addGroup),t.services.map(r=>e.addService({...r,type:"service"})),t.junctions.map(r=>e.addJunction({...r,type:"junction"})),t.edges.map(e.addEdge)},"populateDb"),NQe={parse:v(async t=>{let e=await Sl("architecture",t);re.debug(e),RQe(e,fE)},"parse")},IQe=v(t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles"),MQe=IQe,Jm=v(t=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),zx={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Jm(\'<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>\')},server:{body:Jm(\'<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>\')},disk:{body:Jm(\'<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>\')},internet:{body:Jm(\'<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>\')},cloud:{body:Jm(\'<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>\')},unknown:wC,blank:{body:Jm("")}}},DQe=v(async function(t,e){let r=Bi("padding"),n=Bi("iconSize"),i=n/2,a=n/6,s=a/2;await Promise.all(e.edges().map(async o=>{let{source:l,sourceDir:u,sourceArrow:h,sourceGroup:f,target:d,targetDir:p,targetArrow:g,targetGroup:m,label:x}=Bge(o),{x:y,y:b}=o[0].sourceEndpoint(),{x:w,y:_}=o[0].midpoint(),{x:k,y:E}=o[0].targetEndpoint(),L=r+4;if(f&&(Ls(u)?y+=u==="L"?-L:L:b+=u==="T"?-L:L+18),m&&(Ls(p)?k+=p==="L"?-L:L:E+=p==="T"?-L:L+18),!f&&fE.getNode(l)?.type==="junction"&&(Ls(u)?y+=u==="L"?i:-i:b+=u==="T"?i:-i),!m&&fE.getNode(d)?.type==="junction"&&(Ls(p)?k+=p==="L"?i:-i:E+=p==="T"?i:-i),o[0]._private.rscratch){let S=t.insert("g");if(S.insert("path").attr("d",`M ${y},${b} L ${w},${_} L${k},${E} `).attr("class","edge"),h){let C=Ls(u)?hE[u](y,a):y-s,M=vf(u)?hE[u](b,a):b-s;S.insert("polygon").attr("points",Dge[u](a)).attr("transform",`translate(${C},${M})`).attr("class","arrow")}if(g){let C=Ls(p)?hE[p](k,a):k-s,M=vf(p)?hE[p](E,a):E-s;S.insert("polygon").attr("points",Dge[p](a)).attr("transform",`translate(${C},${M})`).attr("class","arrow")}if(x){let C=Pge(u,p)?"XY":Ls(u)?"X":"Y",M=0;C==="X"?M=Math.abs(y-k):C==="Y"?M=Math.abs(b-E)/1.5:M=Math.abs(y-k)/2;let R=S.append("g");if(await ea(R,x,{useHtmlLabels:!1,width:M,classes:"architecture-service-label"},pe()),R.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),C==="X")R.attr("transform","translate("+w+", "+_+")");else if(C==="Y")R.attr("transform","translate("+w+", "+_+") rotate(-90)");else if(C==="XY"){let T=zO(u,p);if(T&&uQe(T)){let I=R.node().getBoundingClientRect(),[A,D]=dQe(T);R.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*A*D*45})`);let N=R.node().getBoundingClientRect();R.attr("transform",`\n translate(${w}, ${_-I.height/2})\n translate(${A*N.width/2}, ${D*N.height/2})\n rotate(${-1*A*D*45}, 0, ${I.height/2})\n `)}}}}}))},"drawEdges"),OQe=v(async function(t,e){let n=Bi("padding")*.75,i=Bi("fontSize"),s=Bi("iconSize")/2;await Promise.all(e.nodes().map(async o=>{let l=e1(o);if(l.type==="group"){let{h:u,w:h,x1:f,y1:d}=o.boundingBox();t.append("rect").attr("x",f+s).attr("y",d+s).attr("width",h).attr("height",u).attr("class","node-bkg");let p=t.append("g"),g=f,m=d;if(l.icon){let x=p.append("g");x.html(`<g>${await Kc(l.icon,{height:n,width:n,fallbackPrefix:zx.prefix})}</g>`),x.attr("transform","translate("+(g+s+1)+", "+(m+s+1)+")"),g+=n,m+=i/2-1-2}if(l.label){let x=p.append("g");await ea(x,l.label,{useHtmlLabels:!1,width:h,classes:"architecture-service-label"},pe()),x.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),x.attr("transform","translate("+(g+s+4)+", "+(m+s+2)+")")}}}))},"drawGroups"),PQe=v(async function(t,e,r){for(let n of r){let i=e.append("g"),a=Bi("iconSize");if(n.title){let u=i.append("g");await ea(u,n.title,{useHtmlLabels:!1,width:a*1.5,classes:"architecture-service-label"},pe()),u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),u.attr("transform","translate("+a/2+", "+a+")")}let s=i.append("g");if(n.icon)s.html(`<g>${await Kc(n.icon,{height:a,width:a,fallbackPrefix:zx.prefix})}</g>`);else if(n.iconText){s.html(`<g>${await Kc("blank",{height:a,width:a,fallbackPrefix:zx.prefix})}</g>`);let f=s.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(n.iconText),d=parseInt(window.getComputedStyle(f.node(),null).getPropertyValue("font-size").replace(/\\D/g,""))??16;f.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/d)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`);i.attr("class","architecture-service");let{width:o,height:l}=i._groups[0][0].getBBox();n.width=o,n.height=l,t.setElementForId(n.id,i)}return 0},"drawServices"),BQe=v(function(t,e,r){r.forEach(n=>{let i=e.append("g"),a=Bi("iconSize");i.append("g").append("rect").attr("id","node-"+n.id).attr("fill-opacity","0").attr("width",a).attr("height",a),i.attr("class","architecture-junction");let{width:o,height:l}=i._groups[0][0].getBBox();i.width=o,i.height=l,t.setElementForId(n.id,i)})},"drawJunctions");Kb([{name:zx.prefix,icons:zx}]);qo.use(zge.default);v($ge,"addServices");v(Gge,"addJunctions");v(Uge,"positionNodes");v(Vge,"addGroups");v(Wge,"addEdges");v(Hge,"getAlignments");v(qge,"getRelativeConstraints");v(Yge,"layoutArchitecture");FQe=v(async(t,e,r,n)=>{let i=n.db,a=i.getServices(),s=i.getJunctions(),o=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),h=ka(e),f=h.append("g");f.attr("class","architecture-edges");let d=h.append("g");d.attr("class","architecture-services");let p=h.append("g");p.attr("class","architecture-groups"),await PQe(i,d,a),BQe(i,d,s);let g=await Yge(a,s,o,l,u);await DQe(f,g),await OQe(p,g),Uge(i,g),Qo(void 0,h,Bi("padding"),Bi("useMaxWidth"))},"draw"),zQe={draw:FQe},$Qe={parser:NQe,db:fE,renderer:zQe,styles:MQe}});function QO(t){for(;t.firstChild;)t.removeChild(t.firstChild)}Wb();wu();yu();fl();el();ic();fo();za();xn();i9();ku();or();mA();lr();var sw="comm",ow="rule",lw="decl";var Gre="@import";var Ure="@keyframes";var Vre="@layer";var a9=Math.abs,Jv=String.fromCharCode;function cw(t){return t.trim()}function ey(t,e,r){return t.replace(e,r)}function Wre(t,e,r){return t.indexOf(e,r)}function Td(t,e){return t.charCodeAt(e)|0}function Bh(t,e,r){return t.slice(e,r)}function Hs(t){return t.length}function Hre(t){return t.length}function ug(t,e){return e.push(t),t}var uw=1,hg=1,qre=0,_o=0,gi=0,dg="";function hw(t,e,r,n,i,a,s,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:uw,column:hg,length:s,return:"",siblings:o}}function Yre(){return gi}function Xre(){return gi=_o>0?Td(dg,--_o):0,hg--,gi===10&&(hg=1,uw--),gi}function Lo(){return gi=_o<qre?Td(dg,_o++):0,hg++,gi===10&&(hg=1,uw++),gi}function Tu(){return Td(dg,_o)}function ty(){return _o}function fw(t,e){return Bh(dg,t,e)}function fg(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function jre(t){return uw=hg=1,qre=Hs(dg=t),_o=0,[]}function Kre(t){return dg="",t}function dw(t){return cw(fw(_o-1,s9(t===91?t+2:t===40?t+1:t)))}function Zre(t){for(;(gi=Tu())&&gi<33;)Lo();return fg(t)>2||fg(gi)>3?"":" "}function Qre(t,e){for(;--e&&Lo()&&!(gi<48||gi>102||gi>57&&gi<65||gi>70&&gi<97););return fw(t,ty()+(e<6&&Tu()==32&&Lo()==32))}function s9(t){for(;Lo();)switch(gi){case t:return _o;case 34:case 39:t!==34&&t!==39&&s9(gi);break;case 40:t===41&&s9(t);break;case 92:Lo();break}return _o}function Jre(t,e){for(;Lo()&&t+gi!==57;)if(t+gi===84&&Tu()===47)break;return"/*"+fw(e,_o-1)+"*"+Jv(t===47?t:Lo())}function ene(t){for(;!fg(Tu());)Lo();return fw(t,_o)}function nne(t){return Kre(pw("",null,null,null,[""],t=jre(t),0,[0],t))}function pw(t,e,r,n,i,a,s,o,l){for(var u=0,h=0,f=s,d=0,p=0,g=0,m=1,x=1,y=1,b=0,w="",_=i,k=a,E=n,L=w;x;)switch(g=b,b=Lo()){case 40:if(g!=108&&Td(L,f-1)==58){Wre(L+=ey(dw(b),"&","&\\f"),"&\\f",a9(u?o[u-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:L+=dw(b);break;case 9:case 10:case 13:case 32:L+=Zre(g);break;case 92:L+=Qre(ty()-1,7);continue;case 47:switch(Tu()){case 42:case 47:ug(J9e(Jre(Lo(),ty()),e,r,l),l),(fg(g||1)==5||fg(Tu()||1)==5)&&Hs(L)&&Bh(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*m:o[u++]=Hs(L)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:x=0;case 59+h:y==-1&&(L=ey(L,/\\f/g,"")),p>0&&(Hs(L)-f||m===0&&g===47)&&ug(p>32?rne(L+";",n,r,f-1,l):rne(ey(L," ","")+";",n,r,f-2,l),l);break;case 59:L+=";";default:if(ug(E=tne(L,e,r,u,h,i,o,w,_=[],k=[],f,a),a),b===123)if(h===0)pw(L,e,E,E,_,a,f,o,k);else switch(d===99&&Td(L,3)===110?100:d){case 100:case 108:case 109:case 115:pw(t,E,E,n&&ug(tne(t,E,E,0,0,i,o,w,i,_=[],f,k),k),i,k,f,o,n?_:k);break;default:pw(L,E,E,E,[""],k,0,o,k)}}u=h=p=0,m=y=1,w=L="",f=s;break;case 58:f=1+Hs(L),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&Xre()==125)continue}switch(L+=Jv(b),b*m){case 38:y=h>0?1:(L+="\\f",-1);break;case 44:o[u++]=(Hs(L)-1)*y,y=1;break;case 64:Tu()===45&&(L+=dw(Lo())),d=Tu(),h=f=Hs(w=L+=ene(ty())),b++;break;case 45:g===45&&Hs(L)==2&&(m=0)}}return a}function tne(t,e,r,n,i,a,s,o,l,u,h,f){for(var d=i-1,p=i===0?a:[""],g=Hre(p),m=0,x=0,y=0;m<n;++m)for(var b=0,w=Bh(t,d+1,d=a9(x=s[m])),_=t;b<g;++b)(_=cw(x>0?p[b]+" "+w:ey(w,/&\\f/g,p[b])))&&(l[y++]=_);return hw(t,e,r,i===0?ow:o,l,u,h,f)}function J9e(t,e,r,n){return hw(t,e,r,sw,Jv(Yre()),Bh(t,2,-2),0,n)}function rne(t,e,r,n,i){return hw(t,e,r,lw,Bh(t,0,n),Bh(t,n+1,-1),n,i)}function gw(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function ine(t,e,r,n){switch(t.type){case Vre:if(t.children.length)break;case Gre:case lw:return t.return=t.return||t.value;case sw:return"";case Ure:return t.return=t.value+"{"+gw(t.children,n)+"}";case ow:if(!Hs(t.value=t.props.join(",")))return""}return Hs(r=gw(t.children,n))?t.return=t.value+"{"+r+"}":""}FE();q5();var eme="c4",GQe=v(t=>/^\\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),UQe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(bne(),xne));return{id:eme,diagram:t}},"loader"),VQe={id:eme,detector:GQe,loader:UQe},WQe=VQe,tme="flowchart",HQe=v((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\\s*graph/.test(t),"detector"),qQe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Iw(),Nw));return{id:tme,diagram:t}},"loader"),YQe={id:tme,detector:HQe,loader:qQe},XQe=YQe,rme="flowchart-v2",jQe=v((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\\s*flowchart/.test(t)),"detector"),KQe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Iw(),Nw));return{id:rme,diagram:t}},"loader"),ZQe={id:rme,detector:jQe,loader:KQe},QQe=ZQe,nme="er",JQe=v(t=>/^\\s*erDiagram/.test(t),"detector"),eJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Kne(),jne));return{id:nme,diagram:t}},"loader"),tJe={id:nme,detector:JQe,loader:eJe},rJe=tJe,ime="gitGraph",nJe=v(t=>/^\\s*gitGraph/.test(t),"detector"),iJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Jle(),Qle));return{id:ime,diagram:t}},"loader"),aJe={id:ime,detector:nJe,loader:iJe},sJe=aJe,ame="gantt",oJe=v(t=>/^\\s*gantt/.test(t),"detector"),lJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(xce(),yce));return{id:ame,diagram:t}},"loader"),cJe={id:ame,detector:oJe,loader:lJe},uJe=cJe,sme="info",hJe=v(t=>/^\\s*info/.test(t),"detector"),fJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(wce(),bce));return{id:sme,diagram:t}},"loader"),dJe={id:sme,detector:hJe,loader:fJe},ome="pie",pJe=v(t=>/^\\s*pie/.test(t),"detector"),gJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Sce(),Ece));return{id:ome,diagram:t}},"loader"),mJe={id:ome,detector:pJe,loader:gJe},lme="quadrantChart",vJe=v(t=>/^\\s*quadrantChart/.test(t),"detector"),yJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Uce(),Gce));return{id:lme,diagram:t}},"loader"),xJe={id:lme,detector:vJe,loader:yJe},bJe=xJe,cme="xychart",wJe=v(t=>/^\\s*xychart-beta/.test(t),"detector"),kJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(cue(),lue));return{id:cme,diagram:t}},"loader"),TJe={id:cme,detector:wJe,loader:kJe},EJe=TJe,ume="requirement",SJe=v(t=>/^\\s*requirement(Diagram)?/.test(t),"detector"),CJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(mue(),gue));return{id:ume,diagram:t}},"loader"),AJe={id:ume,detector:SJe,loader:CJe},_Je=AJe,hme="sequence",LJe=v(t=>/^\\s*sequenceDiagram/.test(t),"detector"),RJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>($ue(),zue));return{id:hme,diagram:t}},"loader"),NJe={id:hme,detector:LJe,loader:RJe},IJe=NJe,fme="class",MJe=v((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\\s*classDiagram/.test(t),"detector"),DJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Zue(),Kue));return{id:fme,diagram:t}},"loader"),OJe={id:fme,detector:MJe,loader:DJe},PJe=OJe,dme="classDiagram",BJe=v((t,e)=>/^\\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\\s*classDiagram-v2/.test(t),"detector"),FJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Jue(),Que));return{id:dme,diagram:t}},"loader"),zJe={id:dme,detector:BJe,loader:FJe},$Je=zJe,pme="state",GJe=v((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\\s*stateDiagram/.test(t),"detector"),UJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Fhe(),Bhe));return{id:pme,diagram:t}},"loader"),VJe={id:pme,detector:GJe,loader:UJe},WJe=VJe,gme="stateDiagram",HJe=v((t,e)=>!!(/^\\s*stateDiagram-v2/.test(t)||/^\\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),qJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>($he(),zhe));return{id:gme,diagram:t}},"loader"),YJe={id:gme,detector:HJe,loader:qJe},XJe=YJe,mme="journey",jJe=v(t=>/^\\s*journey/.test(t),"detector"),KJe=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Zhe(),Khe));return{id:mme,diagram:t}},"loader"),ZJe={id:mme,detector:jJe,loader:KJe},QJe=ZJe,JJe=v((t,e,r)=>{re.debug(`rendering svg for syntax error\n`);let n=ka(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),Wr(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),vme={draw:JJe},eet=vme,tet={db:{},renderer:vme,parser:{parse:v(()=>{},"parse")}},ret=tet,yme="flowchart-elk",net=v((t,e={})=>/^\\s*flowchart-elk/.test(t)||/^\\s*flowchart|graph/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),iet=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Iw(),Nw));return{id:yme,diagram:t}},"loader"),aet={id:yme,detector:net,loader:iet},set=aet,xme="timeline",oet=v(t=>/^\\s*timeline/.test(t),"detector"),cet=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(pfe(),dfe));return{id:xme,diagram:t}},"loader"),uet={id:xme,detector:oet,loader:cet},het=uet,bme="mindmap",fet=v(t=>/^\\s*mindmap/.test(t),"detector"),det=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Tpe(),kpe));return{id:bme,diagram:t}},"loader"),pet={id:bme,detector:fet,loader:det},get=pet,wme="kanban",met=v(t=>/^\\s*kanban/.test(t),"detector"),vet=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Cpe(),Spe));return{id:wme,diagram:t}},"loader"),yet={id:wme,detector:met,loader:vet},xet=yet,kme="sankey",bet=v(t=>/^\\s*sankey-beta/.test(t),"detector"),wet=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Zpe(),Kpe));return{id:kme,diagram:t}},"loader"),ket={id:kme,detector:bet,loader:wet},Tet=ket,Tme="packet",Eet=v(t=>/^\\s*packet-beta/.test(t),"detector"),Cet=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ege(),Jpe));return{id:Tme,diagram:t}},"loader"),Aet={id:Tme,detector:Eet,loader:Cet},Eme="block",_et=v(t=>/^\\s*block-beta/.test(t),"detector"),Let=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Nge(),Rge));return{id:Eme,diagram:t}},"loader"),Ret={id:Eme,detector:_et,loader:Let},Net=Ret,Sme="architecture",Iet=v(t=>/^\\s*architecture/.test(t),"detector"),Met=v(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(jge(),Xge));return{id:Sme,diagram:t}},"loader"),Det={id:Sme,detector:Iet,loader:Met},Oet=Det,Kge=!1,pE=v(()=>{Kge||(Kge=!0,C1("error",ret,t=>t.toLowerCase().trim()==="error"),C1("---",{db:{clear:v(()=>{},"clear")},styles:{},renderer:{draw:v(()=>{},"draw")},parser:{parse:v(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you\'ve correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:v(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),MS(WQe,xet,$Je,PJe,rJe,uJe,dJe,mJe,_Je,IJe,set,QQe,XQe,get,het,sJe,XJe,WJe,QJe,bJe,Tet,Aet,EJe,Net,Oet))},"addDiagrams"),Pet=v(async()=>{re.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(Af).map(async([r,{detector:n,loader:i}])=>{if(i)try{Ib(r)}catch{try{let{diagram:a,id:s}=await i();C1(s,a,n)}catch(a){throw re.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Af[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){re.error(`Failed to load ${e.length} external diagrams`);for(let r of e)re.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),Bet="graphics-document document";function Cme(t,e){t.attr("role",Bet),e!==""&&t.attr("aria-roledescription",e)}v(Cme,"setA11yDiagramInfo");function Ame(t,e,r,n){if(t.insert!==void 0){if(r){let i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){let i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}v(Ame,"addSVGa11yTitleDescription");var GO=class _me{constructor(e,r,n,i,a){this.type=e,this.text=r,this.db=n,this.parser=i,this.renderer=a}static{v(this,"Diagram")}static async fromText(e,r={}){let n=Or(),i=T1(e,n);e=ej(e)+`\n`;try{Ib(i)}catch{let u=TF(i);if(!u)throw new IS(`Diagram ${i} not found.`);let{id:h,diagram:f}=await u();C1(h,f)}let{db:a,parser:s,renderer:o,init:l}=Ib(i);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new _me(i,e,a,s,o)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},Zge=[],Fet=v(()=>{Zge.forEach(t=>{t()}),Zge=[]},"attachFunctions"),zet=v(t=>t.replace(/^\\s*%%(?!{)[^\\n]+\\n?/gm,"").trimStart(),"cleanupComments");function Lme(t){let e=t.match(NS);if(!e)return{text:t,metadata:{}};let r=Y0(e[1],{schema:q0})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}v(Lme,"extractFrontMatter");var $et=v(t=>t.replace(/\\r\\n?/g,`\n`).replace(/<(\\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"=\'$1\'")+">"),"cleanupText"),Get=v(t=>{let{text:e,metadata:r}=Lme(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}},"processFrontmatter"),Uet=v(t=>{let e=Wt.detectInit(t)??{},r=Wt.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:XX(t),directive:e}},"processDirectives");function VO(t){let e=$et(t),r=Get(e),n=Uet(r.text),i=hs(r.config,n.directive);return t=zet(n.text),{code:t,title:r.title,config:i}}v(VO,"preprocessDiagram");function Rme(t){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}v(Rme,"toBase64");var Vet=5e4,Wet="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Het="sandbox",qet="loose",Yet="http://www.w3.org/2000/svg",Xet="http://www.w3.org/1999/xlink",jet="http://www.w3.org/1999/xhtml",Ket="100%",Zet="100%",Qet="border:0;margin:0;",Jet="margin:0",ett="allow-top-navigation-by-user-activation allow-popups",ttt=\'The "iframe" tag is not supported by your browser.\',rtt=["foreignobject"],ntt=["dominant-baseline"];function WO(t){let e=VO(t);return S1(),NF(e.config??{}),e}v(WO,"processAndSetConfigs");async function Nme(t,e){pE();try{let{code:r,config:n}=WO(t);return{diagramType:(await Mme(r)).type,config:n}}catch(r){if(e?.suppressErrors)return!1;throw r}}v(Nme,"parse");var Qge=v((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),itt=v((t,e=new Map)=>{let r="";if(t.themeCSS!==void 0&&(r+=`\n${t.themeCSS}`),t.fontFamily!==void 0&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let s=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(o=>{nr(o.styles)||s.forEach(l=>{r+=Qge(o.id,l,o.styles)}),nr(o.textStyles)||(r+=Qge(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),att=v((t,e,r,n)=>{let i=itt(t,r),a=PF(e,i,t.themeVariables);return gw(nne(`${n}{${a}}`),ine)},"createUserStyles"),stt=v((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\\([\\d+./:=?A-Za-z-]*?#/g,\'marker-end="url(#\')),n=$s(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),ott=v((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":Zet,n=Rme(`<body style="${Jet}">${t}</body>`);return`<iframe style="width:${Ket};height:${r};${Qet}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${ett}">\n ${ttt}\n</iframe>`},"putIntoIFrame"),Jge=v((t,e,r,n,i)=>{let a=t.append("div");a.attr("id",r),n&&a.attr("style",n);let s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Yet);return i&&s.attr("xmlns:xlink",i),s.append("g"),t},"appendDivSvgG");function UO(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}v(UO,"sandboxedIframe");var ltt=v((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),ctt=v(async function(t,e,r){pE();let n=WO(e);e=n.code;let i=Or();re.debug(i),e.length>(i?.maxTextSize??Vet)&&(e=Wet);let a="#"+t,s="i"+t,o="#"+s,l="d"+t,u="#"+l,h=v(()=>{let I=Ge(d?o:u).node();I&&"remove"in I&&I.remove()},"removeTempElements"),f=Ge("body"),d=i.securityLevel===Het,p=i.securityLevel===qet,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){let T=UO(Ge(r),s);f=Ge(T.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=Ge(r);Jge(f,t,l,`font-family: ${g}`,Xet)}else{if(ltt(document,t,l,s),d){let T=UO(Ge("body"),s);f=Ge(T.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=Ge("body");Jge(f,t,l)}let m,x;try{m=await GO.fromText(e,{title:n.title})}catch(T){if(i.suppressErrorRendering)throw h(),T;m=await GO.fromText("error"),x=T}let y=f.select(u).node(),b=m.type,w=y.firstChild,_=w.firstChild,k=m.renderer.getClasses?.(e,m),E=att(i,b,k,a),L=document.createElement("style");L.innerHTML=E,w.insertBefore(L,_);try{await m.renderer.draw(e,t,Qv,m)}catch(T){throw i.suppressErrorRendering?h():eet.draw(e,t,Qv),T}let S=f.select(`${u} svg`),C=m.db.getAccTitle?.(),M=m.db.getAccDescription?.();Dme(b,S,C,M),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",jet);let R=f.select(u).node().innerHTML;if(re.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),R=stt(R,d,Vr(i.arrowMarkerAbsolute)),d){let T=f.select(u+" svg").node();R=ott(R,T)}else p||(R=ju.sanitize(R,{ADD_TAGS:rtt,ADD_ATTR:ntt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Fet(),x)throw x;return h(),{diagramType:b,svg:R,bindFunctions:m.db.bindFunctions}},"render");function Ime(t={}){let e=Wn({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),_F(e),e?.theme&&e.theme in Wl?e.themeVariables=Wl[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Wl.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?AF(e):DS();Cb(r.logLevel),pE()}v(Ime,"initialize");var Mme=v((t,e={})=>{let{code:r}=VO(t);return GO.fromText(r,e)},"getDiagramFromText");function Dme(t,e,r,n){Cme(e,t),Ame(e,r,n,e.attr("id"))}v(Dme,"addA11yInfo");var I0=Object.freeze({render:ctt,parse:Nme,getDiagramFromText:Mme,initialize:Ime,getConfig:Or,setConfig:OS,getSiteConfig:DS,updateSiteConfig:LF,reset:v(()=>{S1()},"reset"),globalReset:v(()=>{S1(_f)},"globalReset"),defaultConfig:_f});Cb(Or().logLevel);S1(Or());var utt=v((t,e,r)=>{re.warn(t),R3(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Ome=v(async function(t={querySelector:".mermaid"}){try{await htt(t)}catch(e){if(R3(e)&&re.error(e.str),Yu.parseError&&Yu.parseError(e),!t.suppressErrors)throw re.error("Use the suppressErrors option to suppress these errors"),e}},"run"),htt=v(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let n=I0.getConfig();re.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");re.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(re.debug("Start On Load: "+n?.startOnLoad),I0.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new Wt.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s,o=[];for(let l of Array.from(i)){if(re.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let u=`mermaid-${a.next()}`;s=l.innerHTML,s=O3(Wt.entityDecode(s)).trim().replace(/<br\\s*\\/?>/gi,"<br/>");let h=Wt.detectInit(s);h&&re.debug("Detected early reinit: ",h);try{let{svg:f,bindFunctions:d}=await zme(u,s,l);l.innerHTML=f,t&&await t(u),d&&d(l)}catch(f){utt(f,o,Yu.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Pme=v(function(t){I0.initialize(t)},"initialize"),ftt=v(async function(t,e,r){re.warn("mermaid.init is deprecated. Please use run instead."),t&&Pme(t);let n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await Ome(n)},"init"),dtt=v(async(t,{lazyLoad:e=!0}={})=>{pE(),MS(...t),e===!1&&await Pet()},"registerExternalDiagrams"),Bme=v(function(){if(Yu.startOnLoad){let{startOnLoad:t}=I0.getConfig();t&&Yu.run().catch(e=>re.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Bme,!1);var ptt=v(function(t){Yu.parseError=t},"setParseErrorHandler"),dE=[],$O=!1,Fme=v(async()=>{if(!$O){for($O=!0;dE.length>0;){let t=dE.shift();if(t)try{await t()}catch(e){re.error("Error executing queue",e)}}$O=!1}},"executeQueue"),gtt=v(async(t,e)=>new Promise((r,n)=>{let i=v(()=>new Promise((a,s)=>{I0.parse(t,e).then(o=>{a(o),r(o)},o=>{re.error("Error parsing",o),Yu.parseError?.(o),s(o),n(o)})}),"performCall");dE.push(i),Fme().catch(n)}),"parse"),zme=v((t,e,r)=>new Promise((n,i)=>{let a=v(()=>new Promise((s,o)=>{I0.render(t,e,r).then(l=>{s(l),n(l)},l=>{re.error("Error parsing",l),Yu.parseError?.(l),o(l),i(l)})}),"performCall");dE.push(a),Fme().catch(i)}),"render"),Yu={startOnLoad:!0,mermaidAPI:I0,parse:gtt,render:zme,init:ftt,run:Ome,registerExternalDiagrams:dtt,registerLayoutLoaders:n9,initialize:Pme,parseError:void 0,contentLoaded:Bme,setParseErrorHandler:ptt,detectType:T1,registerIconPacks:Kb},HO=Yu;var qO=class{constructor(e,r){this.container=e;this.content=r;this.setupEventListeners(),this.setupNavigationControls()}isDragging=!1;startPan={x:0,y:0};currentPan={x:0,y:0};scale=1;MIN_SCALE=.5;MAX_SCALE=3;ZOOM_SENSITIVITY=.001;setupEventListeners(){this.container.addEventListener("mousedown",this.onMouseDown.bind(this)),document.addEventListener("mousemove",this.onMouseMove.bind(this)),document.addEventListener("mouseup",this.onMouseUp.bind(this)),this.container.addEventListener("wheel",this.onWheel.bind(this),{passive:!1}),window.addEventListener("resize",this.resetTransform.bind(this))}setupNavigationControls(){let e=document.createElement("div");e.className="mermaid-controls";let r=this.createButton("+",()=>this.zoom(.1)),n=this.createButton("-",()=>this.zoom(-.1)),i=this.createButton("Reset",()=>this.resetTransform());e.appendChild(n),e.appendChild(i),e.appendChild(r),this.container.appendChild(e)}createButton(e,r){let n=document.createElement("button");return n.textContent=e,n.className="mermaid-control-button",n.addEventListener("click",r),window.addCleanup(()=>n.removeEventListener("click",r)),n}onMouseDown(e){e.button===0&&(this.isDragging=!0,this.startPan={x:e.clientX-this.currentPan.x,y:e.clientY-this.currentPan.y},this.container.style.cursor="grabbing")}onMouseMove(e){this.isDragging&&(e.preventDefault(),this.currentPan={x:e.clientX-this.startPan.x,y:e.clientY-this.startPan.y},this.updateTransform())}onMouseUp(){this.isDragging=!1,this.container.style.cursor="grab"}onWheel(e){e.preventDefault();let r=-e.deltaY*this.ZOOM_SENSITIVITY,n=Math.min(Math.max(this.scale+r,this.MIN_SCALE),this.MAX_SCALE),i=this.content.getBoundingClientRect(),a=e.clientX-i.left,s=e.clientY-i.top,o=n-this.scale;this.currentPan.x-=a*o,this.currentPan.y-=s*o,this.scale=n,this.updateTransform()}zoom(e){let r=Math.min(Math.max(this.scale+e,this.MIN_SCALE),this.MAX_SCALE),n=this.content.getBoundingClientRect(),i=n.width/2,a=n.height/2,s=r-this.scale;this.currentPan.x-=i*s,this.currentPan.y-=a*s,this.scale=r,this.updateTransform()}updateTransform(){this.content.style.transform=`translate(${this.currentPan.x}px, ${this.currentPan.y}px) scale(${this.scale})`}resetTransform(){this.scale=1,this.currentPan={x:0,y:0},this.updateTransform()}},mtt=["--secondary","--tertiary","--gray","--light","--lightgray","--highlight","--dark","--darkgray","--codeFont"];document.addEventListener("nav",async()=>{let e=document.querySelector(".center").querySelectorAll("code.mermaid");if(e.length===0)return;let r=mtt.reduce((i,a)=>(i[a]=getComputedStyle(document.documentElement).getPropertyValue(a),i),{}),n=document.documentElement.getAttribute("saved-theme")==="dark";HO.initialize({startOnLoad:!1,securityLevel:"loose",theme:n?"dark":"base",themeVariables:{fontFamily:r["--codeFont"],primaryColor:r["--light"],primaryTextColor:r["--darkgray"],primaryBorderColor:r["--tertiary"],lineColor:r["--darkgray"],secondaryColor:r["--secondary"],tertiaryColor:r["--tertiary"],clusterBkg:r["--light"],edgeLabelBackground:r["--highlight"]}}),await HO.run({nodes:e});for(let i=0;i<e.length;i++){let p=function(){let y=f.querySelector("#mermaid-space"),b=f.querySelector(".mermaid-content");if(!b)return;QO(b);let w=a.querySelector("svg").cloneNode(!0);b.appendChild(w),f.classList.add("active"),y.style.cursor="grab",d=new qO(y,b)},g=function(){f.classList.remove("active"),d=null},m=function(y){y.key==="Escape"&&g()},a=e[i],s=a.parentElement,o=s.querySelector(".clipboard-button"),l=s.querySelector(".expand-button"),u=window.getComputedStyle(o),h=o.offsetWidth+parseFloat(u.marginLeft||"0")+parseFloat(u.marginRight||"0");l.style.right=`calc(${h}px + 0.3rem)`,s.prepend(l);let f=s.querySelector("#mermaid-container");if(!f)return;let d=null,x=f.querySelector(".close-button");x.addEventListener("click",g),l.addEventListener("click",p),document.addEventListener("keydown",m),window.addCleanup(()=>{x.removeEventListener("click",g),l.removeEventListener("click",p),document.removeEventListener("keydown",m)})}});\n/*! Bundled license information:\n\ndompurify/dist/purify.es.mjs:\n (*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE *)\n\nmermaid/dist/chunks/mermaid.core/chunk-S3SWNSAA.mjs:\n (*! Bundled license information:\n \n js-yaml/dist/js-yaml.mjs:\n (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)\n *)\n\nlodash-es/lodash.js:\n (**\n * @license\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports="es" -o ./`\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n *)\n\ncytoscape/dist/cytoscape.esm.mjs:\n (*!\n Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable\n Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)\n Licensed under The MIT License (http://opensource.org/licenses/MIT)\n *)\n (*!\n Event object based on jQuery events, MIT license\n \n https://jquery.org/license/\n https://tldrlegal.com/license/mit-license\n https://github.com/jquery/jquery/blob/master/src/event.js\n *)\n (*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License *)\n (*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License *)\n\nmermaid/dist/mermaid.core.mjs:\n (*! Check if previously processed *)\n (*!\n * Wait for document loaded before starting the execution\n *)\n*/\n';var mermaid_inline_default2=`.expand-button {
|
||
position: absolute;
|
||
display: flex;
|
||
float: right;
|
||
padding: 0.4rem;
|
||
margin: 0.3rem;
|
||
right: 0;
|
||
color: var(--gray);
|
||
border-color: var(--dark);
|
||
background-color: var(--light);
|
||
border: 1px solid;
|
||
border-radius: 5px;
|
||
opacity: 0;
|
||
transition: 0.2s;
|
||
}
|
||
.expand-button > svg {
|
||
fill: var(--light);
|
||
filter: contrast(0.3);
|
||
}
|
||
.expand-button:hover {
|
||
cursor: pointer;
|
||
border-color: var(--secondary);
|
||
}
|
||
.expand-button:focus {
|
||
outline: 0;
|
||
}
|
||
|
||
pre:hover > .expand-button {
|
||
opacity: 1;
|
||
transition: 0.2s;
|
||
}
|
||
|
||
#mermaid-container {
|
||
position: fixed;
|
||
contain: layout;
|
||
z-index: 999;
|
||
left: 0;
|
||
top: 0;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
overflow: hidden;
|
||
display: none;
|
||
backdrop-filter: blur(4px);
|
||
background: rgba(0, 0, 0, 0.5);
|
||
}
|
||
#mermaid-container.active {
|
||
display: inline-block;
|
||
}
|
||
#mermaid-container > #mermaid-space {
|
||
display: grid;
|
||
width: 90%;
|
||
height: 90vh;
|
||
margin: 5vh auto;
|
||
background: var(--light);
|
||
box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);
|
||
overflow: hidden;
|
||
position: relative;
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-header {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
padding: 1rem;
|
||
border-bottom: 1px solid var(--lightgray);
|
||
background: var(--light);
|
||
z-index: 2;
|
||
max-height: fit-content;
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-header > .close-button {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 32px;
|
||
height: 32px;
|
||
padding: 0;
|
||
background: transparent;
|
||
border: none;
|
||
border-radius: 4px;
|
||
color: var(--darkgray);
|
||
cursor: pointer;
|
||
transition: all 0.2s ease;
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-header > .close-button:hover {
|
||
background: var(--lightgray);
|
||
color: var(--dark);
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-content {
|
||
padding: 2rem;
|
||
position: relative;
|
||
transform-origin: 0 0;
|
||
transition: transform 0.1s ease;
|
||
overflow: visible;
|
||
min-height: 200px;
|
||
min-width: 200px;
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-content pre {
|
||
margin: 0;
|
||
border: none;
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-content svg {
|
||
max-width: none;
|
||
height: auto;
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-controls {
|
||
position: absolute;
|
||
bottom: 20px;
|
||
right: 20px;
|
||
display: flex;
|
||
gap: 8px;
|
||
padding: 8px;
|
||
background: var(--light);
|
||
border: 1px solid var(--lightgray);
|
||
border-radius: 6px;
|
||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||
z-index: 2;
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-controls .mermaid-control-button {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 32px;
|
||
height: 32px;
|
||
padding: 0;
|
||
border: 1px solid var(--lightgray);
|
||
background: var(--light);
|
||
color: var(--dark);
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
font-size: 16px;
|
||
font-family: var(--bodyFont);
|
||
transition: all 0.2s ease;
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-controls .mermaid-control-button:hover {
|
||
background: var(--lightgray);
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-controls .mermaid-control-button:active {
|
||
transform: translateY(1px);
|
||
}
|
||
#mermaid-container > #mermaid-space > .mermaid-controls .mermaid-control-button:nth-child(2) {
|
||
width: auto;
|
||
padding: 0 12px;
|
||
font-size: 14px;
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsibWVybWFpZC5pbmxpbmUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0E7O0FBR0Y7RUFDRTs7O0FBS0Y7RUFDRTtFQUNBOzs7QUFJSjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDRTs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQSxZQUNFO0VBRUY7RUFDQTs7QUFFQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7RUFDQTs7QUFLTjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0E7O0FBSUo7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFOztBQUdGO0VBQ0U7O0FBSUY7RUFDRTtFQUNBO0VBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyIuZXhwYW5kLWJ1dHRvbiB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxvYXQ6IHJpZ2h0O1xuICBwYWRkaW5nOiAwLjRyZW07XG4gIG1hcmdpbjogMC4zcmVtO1xuICByaWdodDogMDsgLy8gTk9URTogcmlnaHQgd2lsbCBiZSBzZXQgaW4gbWVybWFpZC5pbmxpbmUudHNcbiAgY29sb3I6IHZhcigtLWdyYXkpO1xuICBib3JkZXItY29sb3I6IHZhcigtLWRhcmspO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1saWdodCk7XG4gIGJvcmRlcjogMXB4IHNvbGlkO1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG4gIG9wYWNpdHk6IDA7XG4gIHRyYW5zaXRpb246IDAuMnM7XG5cbiAgJiA+IHN2ZyB7XG4gICAgZmlsbDogdmFyKC0tbGlnaHQpO1xuICAgIGZpbHRlcjogY29udHJhc3QoMC4zKTtcbiAgfVxuXG4gICY6aG92ZXIge1xuICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICBib3JkZXItY29sb3I6IHZhcigtLXNlY29uZGFyeSk7XG4gIH1cblxuICAmOmZvY3VzIHtcbiAgICBvdXRsaW5lOiAwO1xuICB9XG59XG5cbnByZSB7XG4gICY6aG92ZXIgPiAuZXhwYW5kLWJ1dHRvbiB7XG4gICAgb3BhY2l0eTogMTtcbiAgICB0cmFuc2l0aW9uOiAwLjJzO1xuICB9XG59XG5cbiNtZXJtYWlkLWNvbnRhaW5lciB7XG4gIHBvc2l0aW9uOiBmaXhlZDtcbiAgY29udGFpbjogbGF5b3V0O1xuICB6LWluZGV4OiA5OTk7XG4gIGxlZnQ6IDA7XG4gIHRvcDogMDtcbiAgd2lkdGg6IDEwMHZ3O1xuICBoZWlnaHQ6IDEwMHZoO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBkaXNwbGF5OiBub25lO1xuICBiYWNrZHJvcC1maWx0ZXI6IGJsdXIoNHB4KTtcbiAgYmFja2dyb3VuZDogcmdiYSgwLCAwLCAwLCAwLjUpO1xuXG4gICYuYWN0aXZlIHtcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gIH1cblxuICAmID4gI21lcm1haWQtc3BhY2Uge1xuICAgIGRpc3BsYXk6IGdyaWQ7XG4gICAgd2lkdGg6IDkwJTtcbiAgICBoZWlnaHQ6IDkwdmg7XG4gICAgbWFyZ2luOiA1dmggYXV0bztcbiAgICBiYWNrZ3JvdW5kOiB2YXIoLS1saWdodCk7XG4gICAgYm94LXNoYWRvdzpcbiAgICAgIDAgMTRweCA1MHB4IHJnYmEoMjcsIDMzLCA0OCwgMC4xMiksXG4gICAgICAwIDEwcHggMzBweCByZ2JhKDI3LCAzMywgNDgsIDAuMTYpO1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgcG9zaXRpb246IHJlbGF0aXZlO1xuXG4gICAgJiA+IC5tZXJtYWlkLWhlYWRlciB7XG4gICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAganVzdGlmeS1jb250ZW50OiBmbGV4LWVuZDtcbiAgICAgIHBhZGRpbmc6IDFyZW07XG4gICAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbGlnaHRncmF5KTtcbiAgICAgIGJhY2tncm91bmQ6IHZhcigtLWxpZ2h0KTtcbiAgICAgIHotaW5kZXg6IDI7XG4gICAgICBtYXgtaGVpZ2h0OiBmaXQtY29udGVudDtcblxuICAgICAgJiA+IC5jbG9zZS1idXR0b24ge1xuICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICAgICAgd2lkdGg6IDMycHg7XG4gICAgICAgIGhlaWdodDogMzJweDtcbiAgICAgICAgcGFkZGluZzogMDtcbiAgICAgICAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG4gICAgICAgIGJvcmRlcjogbm9uZTtcbiAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4O1xuICAgICAgICBjb2xvcjogdmFyKC0tZGFya2dyYXkpO1xuICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICAgIHRyYW5zaXRpb246IGFsbCAwLjJzIGVhc2U7XG5cbiAgICAgICAgJjpob3ZlciB7XG4gICAgICAgICAgYmFja2dyb3VuZDogdmFyKC0tbGlnaHRncmF5KTtcbiAgICAgICAgICBjb2xvcjogdmFyKC0tZGFyayk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICAmID4gLm1lcm1haWQtY29udGVudCB7XG4gICAgICBwYWRkaW5nOiAycmVtO1xuICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgICAgdHJhbnNmb3JtLW9yaWdpbjogMCAwO1xuICAgICAgdHJhbnNpdGlvbjogdHJhbnNmb3JtIDAuMXMgZWFzZTtcbiAgICAgIG92ZXJmbG93OiB2aXNpYmxlO1xuICAgICAgbWluLWhlaWdodDogMjAwcHg7XG4gICAgICBtaW4td2lkdGg6IDIwMHB4O1xuXG4gICAgICBwcmUge1xuICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgIGJvcmRlcjogbm9uZTtcbiAgICAgIH1cblxuICAgICAgc3ZnIHtcbiAgICAgICAgbWF4LXdpZHRoOiBub25lO1xuICAgICAgICBoZWlnaHQ6IGF1dG87XG4gICAgICB9XG4gICAgfVxuXG4gICAgJiA+IC5tZXJtYWlkLWNvbnRyb2xzIHtcbiAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICAgIGJvdHRvbTogMjBweDtcbiAgICAgIHJpZ2h0OiAyMHB4O1xuICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgIGdhcDogOHB4O1xuICAgICAgcGFkZGluZzogOHB4O1xuICAgICAgYmFja2dyb3VuZDogdmFyKC0tbGlnaHQpO1xuICAgICAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tbGlnaHRncmF5KTtcbiAgICAgIGJvcmRlci1yYWRpdXM6IDZweDtcbiAgICAgIGJveC1zaGFkb3c6IDAgMnB4IDRweCByZ2JhKDAsIDAsIDAsIDAuMSk7XG4gICAgICB6LWluZGV4OiAyO1xuXG4gICAgICAubWVybWFpZC1jb250cm9sLWJ1dHRvbiB7XG4gICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gICAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICAgICAgICB3aWR0aDogMzJweDtcbiAgICAgICAgaGVpZ2h0OiAzMnB4O1xuICAgICAgICBwYWRkaW5nOiAwO1xuICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1saWdodGdyYXkpO1xuICAgICAgICBiYWNrZ3JvdW5kOiB2YXIoLS1saWdodCk7XG4gICAgICAgIGNvbG9yOiB2YXIoLS1kYXJrKTtcbiAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4O1xuICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICAgIGZvbnQtc2l6ZTogMTZweDtcbiAgICAgICAgZm9udC1mYW1pbHk6IHZhcigtLWJvZHlGb250KTtcbiAgICAgICAgdHJhbnNpdGlvbjogYWxsIDAuMnMgZWFzZTtcblxuICAgICAgICAmOmhvdmVyIHtcbiAgICAgICAgICBiYWNrZ3JvdW5kOiB2YXIoLS1saWdodGdyYXkpO1xuICAgICAgICB9XG5cbiAgICAgICAgJjphY3RpdmUge1xuICAgICAgICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgxcHgpO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gU3R5bGUgdGhlIHJlc2V0IGJ1dHRvbiBkaWZmZXJlbnRseVxuICAgICAgICAmOm50aC1jaGlsZCgyKSB7XG4gICAgICAgICAgd2lkdGg6IGF1dG87XG4gICAgICAgICAgcGFkZGluZzogMCAxMnB4O1xuICAgICAgICAgIGZvbnQtc2l6ZTogMTRweDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxufVxuIl19 */`;import{toHast}from"mdast-util-to-hast";import{toHtml}from"hast-util-to-html";function capitalize(s){return s.substring(0,1).toUpperCase()+s.substring(1)}__name(capitalize,"capitalize");function classNames(displayClass,...classes){return displayClass&&classes.push(displayClass),classes.join(" ")}__name(classNames,"classNames");var defaultOptions6={comments:!0,highlight:!0,wikilinks:!0,callouts:!0,mermaid:!0,parseTags:!0,parseArrows:!0,parseBlockReferences:!0,enableInHtmlEmbed:!1,enableYouTubeEmbed:!0,enableVideoEmbed:!0,enableCheckbox:!1},calloutMapping={note:"note",abstract:"abstract",summary:"abstract",tldr:"abstract",info:"info",todo:"todo",tip:"tip",hint:"tip",important:"tip",success:"success",check:"success",done:"success",question:"question",help:"question",faq:"question",warning:"warning",attention:"warning",caution:"warning",failure:"failure",missing:"failure",fail:"failure",danger:"danger",error:"danger",bug:"bug",example:"example",quote:"quote",cite:"quote"},arrowMapping={"->":"→","-->":"⇒","=>":"⇒","==>":"⇒","<-":"←","<--":"⇐","<=":"⇐","<==":"⇐"};function canonicalizeCallout(calloutName){let normalizedCallout=calloutName.toLowerCase();return calloutMapping[normalizedCallout]??calloutName}__name(canonicalizeCallout,"canonicalizeCallout");var externalLinkRegex=/^https?:\/\//i,arrowRegex=new RegExp(/(-{1,2}>|={1,2}>|<-{1,2}|<={1,2})/g),wikilinkRegex=new RegExp(/!?\[\[([^\[\]\|\#\\]+)?(#+[^\[\]\|\#\\]+)?(\\?\|[^\[\]\#]+)?\]\]/g),tableRegex=new RegExp(/^\|([^\n])+\|\n(\|)( ?:?-{3,}:? ?\|)+\n(\|([^\n])+\|\n?)+/gm),tableWikilinkRegex=new RegExp(/(!?\[\[[^\]]*?\]\]|\[\^[^\]]*?\])/g),highlightRegex=new RegExp(/==([^=]+)==/g),commentRegex=new RegExp(/%%[\s\S]*?%%/g),calloutRegex=new RegExp(/^\[\!([\w-]+)\|?(.+?)?\]([+-]?)/),calloutLineRegex=new RegExp(/^> *\[\!\w+\|?.*?\][+-]?.*$/gm),tagRegex=new RegExp(/(?:^| )#((?:[-_\p{L}\p{Emoji}\p{M}\d])+(?:\/[-_\p{L}\p{Emoji}\p{M}\d]+)*)/gu),blockReferenceRegex=new RegExp(/\^([-_A-Za-z0-9]+)$/g),ytLinkRegex=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,ytPlaylistLinkRegex=/[?&]list=([^#?&]*)/,videoExtensionRegex=new RegExp(/\.(mp4|webm|ogg|avi|mov|flv|wmv|mkv|mpg|mpeg|3gp|m4v)$/),wikilinkImageEmbedRegex=new RegExp(/^(?<alt>(?!^\d*x?\d*$).*?)?(\|?\s*?(?<width>\d+)(x(?<height>\d+))?)?$/),ObsidianFlavoredMarkdown=__name(userOpts=>{let opts={...defaultOptions6,...userOpts},mdastToHtml=__name(ast=>{let hast=toHast(ast,{allowDangerousHtml:!0});return toHtml(hast,{allowDangerousHtml:!0})},"mdastToHtml");return{name:"ObsidianFlavoredMarkdown",textTransform(_ctx,src){return opts.comments&&(src instanceof Buffer&&(src=src.toString()),src=src.replace(commentRegex,"")),opts.callouts&&(src instanceof Buffer&&(src=src.toString()),src=src.replace(calloutLineRegex,value=>value+`
|
||
> `)),opts.wikilinks&&(src instanceof Buffer&&(src=src.toString()),src=src.replace(tableRegex,value=>value.replace(tableWikilinkRegex,(_value,raw)=>{let escaped=raw??"";return escaped=escaped.replace("#","\\#"),escaped=escaped.replace(/((^|[^\\])(\\\\)*)\|/g,"$1\\|"),escaped})),src=src.replace(wikilinkRegex,(value,...capture)=>{let[rawFp,rawHeader,rawAlias]=capture,[fp,anchor]=splitAnchor(`${rawFp??""}${rawHeader??""}`),blockRef=rawHeader?.match(/^#?\^/)?"^":"",displayAnchor=anchor?`#${blockRef}${anchor.trim().replace(/^#+/,"")}`:"",displayAlias=rawAlias??rawHeader?.replace("#","|")??"",embedDisplay=value.startsWith("!")?"!":"";return rawFp?.match(externalLinkRegex)?`${embedDisplay}[${displayAlias.replace(/^\|/,"")}](${rawFp})`:`${embedDisplay}[[${fp}${displayAnchor}${displayAlias}]]`})),src},markdownPlugins(_ctx){let plugins=[];return plugins.push(()=>(tree,file)=>{let replacements=[],base=pathToRoot(file.data.slug);opts.wikilinks&&replacements.push([wikilinkRegex,(value,...capture)=>{let[rawFp,rawHeader,rawAlias]=capture,fp=rawFp?.trim()??"",anchor=rawHeader?.trim()??"",alias=rawAlias?.slice(1).trim();if(value.startsWith("!")){let ext=path4.extname(fp).toLowerCase(),url2=slugifyFilePath(fp);if([".png",".jpg",".jpeg",".gif",".bmp",".svg",".webp"].includes(ext)){let match=wikilinkImageEmbedRegex.exec(alias??""),alt=match?.groups?.alt??"",width=match?.groups?.width??"auto",height=match?.groups?.height??"auto";return{type:"image",url:url2,data:{hProperties:{width,height,alt}}}}else{if([".mp4",".webm",".ogv",".mov",".mkv"].includes(ext))return{type:"html",value:`<video src="${url2}" controls></video>`};if([".mp3",".webm",".wav",".m4a",".ogg",".3gp",".flac"].includes(ext))return{type:"html",value:`<audio src="${url2}" controls></audio>`};if([".pdf"].includes(ext))return{type:"html",value:`<iframe src="${url2}" class="pdf"></iframe>`};{let block=anchor;return{type:"html",data:{hProperties:{transclude:!0}},value:`<blockquote class="transclude" data-url="${url2}" data-block="${block}" data-embed-alias="${alias}"><a href="${url2+anchor}" class="transclude-inner">Transclude of ${url2}${block}</a></blockquote>`}}}}return{type:"link",url:fp+anchor,children:[{type:"text",value:alias??fp}]}}]),opts.highlight&&replacements.push([highlightRegex,(_value,...capture)=>{let[inner]=capture;return{type:"html",value:`<span class="text-highlight">${inner}</span>`}}]),opts.parseArrows&&replacements.push([arrowRegex,(value,..._capture)=>{let maybeArrow=arrowMapping[value];return maybeArrow===void 0?SKIP:{type:"html",value:`<span>${maybeArrow}</span>`}}]),opts.parseTags&&replacements.push([tagRegex,(_value,tag)=>{if(/^[\/\d]+$/.test(tag))return!1;if(tag=slugTag(tag),file.data.frontmatter){let noteTags=file.data.frontmatter.tags??[];file.data.frontmatter.tags=[...new Set([...noteTags,tag])]}return{type:"link",url:base+`/tags/${tag}`,data:{hProperties:{className:["tag-link"]}},children:[{type:"text",value:tag}]}}]),opts.enableInHtmlEmbed&&visit3(tree,"html",node=>{for(let[regex,replace]of replacements)typeof replace=="string"?node.value=node.value.replace(regex,replace):node.value=node.value.replace(regex,(substring,...args)=>{let replaceValue=replace(substring,...args);return typeof replaceValue=="string"?replaceValue:Array.isArray(replaceValue)?replaceValue.map(mdastToHtml).join(""):typeof replaceValue=="object"&&replaceValue!==null?mdastToHtml(replaceValue):substring})}),mdastFindReplace(tree,replacements)}),opts.enableVideoEmbed&&plugins.push(()=>(tree,_file)=>{visit3(tree,"image",(node,index,parent)=>{if(parent&&index!=null&&videoExtensionRegex.test(node.url)){let newNode={type:"html",value:`<video controls src="${node.url}"></video>`};return parent.children.splice(index,1,newNode),SKIP}})}),opts.callouts&&plugins.push(()=>(tree,_file)=>{visit3(tree,"blockquote",node=>{if(node.children.length===0)return;let[firstChild,...calloutContent]=node.children;if(firstChild.type!=="paragraph"||firstChild.children[0]?.type!=="text")return;let text=firstChild.children[0].value,restOfTitle=firstChild.children.slice(1),[firstLine,...remainingLines]=text.split(`
|
||
`),remainingText=remainingLines.join(`
|
||
`),match=firstLine.match(calloutRegex);if(match&&match.input){let[calloutDirective,typeString,calloutMetaData,collapseChar]=match,calloutType=canonicalizeCallout(typeString.toLowerCase()),collapse=collapseChar==="+"||collapseChar==="-",defaultState=collapseChar==="-"?"collapsed":"expanded",titleContent=match.input.slice(calloutDirective.length).trim(),titleNode={type:"paragraph",children:[{type:"text",value:titleContent===""&&restOfTitle.length===0?capitalize(typeString).replace(/-/g," "):titleContent+" "},...restOfTitle]},blockquoteContent=[{type:"html",value:`<div
|
||
class="callout-title"
|
||
>
|
||
<div class="callout-icon"></div>
|
||
<div class="callout-title-inner">${mdastToHtml(titleNode)}</div>
|
||
${collapse?'<div class="fold-callout-icon"></div>':""}
|
||
</div>`}];remainingText.length>0&&blockquoteContent.push({type:"paragraph",children:[{type:"text",value:remainingText}]}),node.children.splice(0,1,...blockquoteContent);let classNames2=["callout",calloutType];if(collapse&&classNames2.push("is-collapsible"),defaultState==="collapsed"&&classNames2.push("is-collapsed"),node.data={hProperties:{...node.data?.hProperties??{},className:classNames2.join(" "),"data-callout":calloutType,"data-callout-fold":collapse,"data-callout-metadata":calloutMetaData}},calloutContent.length>0){let contentData={data:{hProperties:{className:"callout-content"},hName:"div"},type:"blockquote",children:[...calloutContent]};node.children=[node.children[0],contentData]}}})}),opts.mermaid&&plugins.push(()=>(tree,_file)=>{visit3(tree,"code",node=>{node.lang==="mermaid"&&(node.data={hProperties:{className:["mermaid"],"data-clipboard":JSON.stringify(node.value)}})})}),plugins},htmlPlugins(){let plugins=[rehypeRaw];return opts.parseBlockReferences&&plugins.push(()=>{let inlineTagTypes=new Set(["p","li"]),blockTagTypes=new Set(["blockquote"]);return(tree,file)=>{file.data.blocks={},visit3(tree,"element",(node,index,parent)=>{if(blockTagTypes.has(node.tagName)){let nextChild=parent?.children.at(index+2);if(nextChild&&nextChild.tagName==="p"){let text=nextChild.children.at(0);if(text&&text.value&&text.type==="text"){let matches=text.value.match(blockReferenceRegex);if(matches&&matches.length>=1){parent.children.splice(index+2,1);let block=matches[0].slice(1);Object.keys(file.data.blocks).includes(block)||(node.properties={...node.properties,id:block},file.data.blocks[block]=node)}}}}else if(inlineTagTypes.has(node.tagName)){let last=node.children.at(-1);if(last&&last.value&&typeof last.value=="string"){let matches=last.value.match(blockReferenceRegex);if(matches&&matches.length>=1){last.value=last.value.slice(0,-matches[0].length);let block=matches[0].slice(1);if(last.value===""){let idx=(index??1)-1;for(;idx>=0;){let element=parent?.children.at(idx);if(!element)break;if(element.type!=="element")idx-=1;else{Object.keys(file.data.blocks).includes(block)||(element.properties={...element.properties,id:block},file.data.blocks[block]=element);return}}}else Object.keys(file.data.blocks).includes(block)||(node.properties={...node.properties,id:block},file.data.blocks[block]=node)}}}}),file.data.htmlAst=tree}}),opts.enableYouTubeEmbed&&plugins.push(()=>tree=>{visit3(tree,"element",node=>{if(node.tagName==="img"&&typeof node.properties.src=="string"){let match=node.properties.src.match(ytLinkRegex),videoId=match&&match[2].length==11?match[2]:null,playlistId=node.properties.src.match(ytPlaylistLinkRegex)?.[1];videoId?(node.tagName="iframe",node.properties={class:"external-embed youtube",allow:"fullscreen",frameborder:0,width:"600px",src:playlistId?`https://www.youtube.com/embed/${videoId}?list=${playlistId}`:`https://www.youtube.com/embed/${videoId}`}):playlistId&&(node.tagName="iframe",node.properties={class:"external-embed youtube",allow:"fullscreen",frameborder:0,width:"600px",src:`https://www.youtube.com/embed/videoseries?list=${playlistId}`})}})}),opts.enableCheckbox&&plugins.push(()=>(tree,_file)=>{visit3(tree,"element",node=>{if(node.tagName==="input"&&node.properties.type==="checkbox"){let isChecked=node.properties?.checked??!1;node.properties={type:"checkbox",disabled:!1,checked:isChecked,class:"checkbox-toggle"}}})}),opts.mermaid&&plugins.push(()=>(tree,_file)=>{visit3(tree,"element",(node,_idx,parent)=>{node.tagName==="code"&&(node.properties?.className??[])?.includes("mermaid")&&(parent.children=[{type:"element",tagName:"button",properties:{className:["expand-button"],"aria-label":"Expand mermaid diagram","aria-hidden":"true","data-view-component":!0},children:[{type:"element",tagName:"svg",properties:{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor"},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M3.72 3.72a.75.75 0 011.06 1.06L2.56 7h10.88l-2.22-2.22a.75.75 0 011.06-1.06l3.5 3.5a.75.75 0 010 1.06l-3.5 3.5a.75.75 0 11-1.06-1.06l2.22-2.22H2.56l2.22 2.22a.75.75 0 11-1.06 1.06l-3.5-3.5a.75.75 0 010-1.06l3.5-3.5z"},children:[]}]}]},node,{type:"element",tagName:"div",properties:{id:"mermaid-container"},children:[{type:"element",tagName:"div",properties:{id:"mermaid-space"},children:[{type:"element",tagName:"div",properties:{className:["mermaid-header"]},children:[{type:"element",tagName:"button",properties:{className:["close-button"],"aria-label":"close button"},children:[{type:"element",tagName:"svg",properties:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},children:[{type:"element",tagName:"line",properties:{x1:18,y1:6,x2:6,y2:18},children:[]},{type:"element",tagName:"line",properties:{x1:6,y1:6,x2:18,y2:18},children:[]}]}]}]},{type:"element",tagName:"div",properties:{className:["mermaid-content"]},children:[]}]}]}])})}),plugins},externalResources(){let js=[],css=[];return opts.enableCheckbox&&js.push({script:checkbox_inline_default,loadTime:"afterDOMReady",contentType:"inline"}),opts.callouts&&js.push({script:callout_inline_default,loadTime:"afterDOMReady",contentType:"inline"}),opts.mermaid&&(js.push({script:mermaid_inline_default,loadTime:"afterDOMReady",moduleType:"module",contentType:"inline"}),css.push({content:mermaid_inline_default2,inline:!0})),{js,css}}}},"ObsidianFlavoredMarkdown");var relrefRegex=new RegExp(/\[([^\]]+)\]\(\{\{< relref "([^"]+)" >\}\}\)/,"g"),predefinedHeadingIdRegex=new RegExp(/(.*) {#(?:.*)}/,"g"),hugoShortcodeRegex=new RegExp(/{{(.*)}}/,"g"),figureTagRegex=new RegExp(/< ?figure src="(.*)" ?>/,"g"),inlineLatexRegex=new RegExp(/\\\\\((.+?)\\\\\)/,"g"),blockLatexRegex=new RegExp(/(?:\\begin{equation}|\\\\\(|\\\\\[)([\s\S]*?)(?:\\\\\]|\\\\\)|\\end{equation})/,"g"),quartzLatexRegex=new RegExp(/\$\$[\s\S]*?\$\$|\$.*?\$/,"g");import rehypePrettyCode from"rehype-pretty-code";var defaultOptions7={theme:{light:"github-light",dark:"github-dark"},keepBackground:!1},SyntaxHighlighting=__name(userOpts=>{let opts={...defaultOptions7,...userOpts};return{name:"SyntaxHighlighting",htmlPlugins(){return[[rehypePrettyCode,opts]]}}},"SyntaxHighlighting");import{visit as visit4}from"unist-util-visit";import{toString as toString2}from"mdast-util-to-string";import Slugger from"github-slugger";var defaultOptions8={maxDepth:3,minEntries:1,showByDefault:!0,collapseByDefault:!1},slugAnchor2=new Slugger,TableOfContents=__name(userOpts=>{let opts={...defaultOptions8,...userOpts};return{name:"TableOfContents",markdownPlugins(){return[()=>async(tree,file)=>{if(file.data.frontmatter?.enableToc??opts.showByDefault){slugAnchor2.reset();let toc=[],highestDepth=opts.maxDepth;visit4(tree,"heading",node=>{if(node.depth<=opts.maxDepth){let text=toString2(node);highestDepth=Math.min(highestDepth,node.depth),toc.push({depth:node.depth,text,slug:slugAnchor2.slug(text)})}}),toc.length>0&&toc.length>opts.minEntries&&(file.data.toc=toc.map(entry=>({...entry,depth:entry.depth-highestDepth})),file.data.collapseToc=opts.collapseByDefault)}}]}}},"TableOfContents");import remarkBreaks from"remark-breaks";import{visit as visit5}from"unist-util-visit";import{findAndReplace as mdastFindReplace2}from"mdast-util-find-and-replace";var orRegex=new RegExp(/{{or:(.*?)}}/,"g"),TODORegex=new RegExp(/{{.*?\bTODO\b.*?}}/,"g"),DONERegex=new RegExp(/{{.*?\bDONE\b.*?}}/,"g"),videoRegex=new RegExp(/{{.*?\[\[video\]\].*?\:(.*?)}}/,"g"),youtubeRegex=new RegExp(/{{.*?\[\[video\]\].*?(https?:\/\/(?:www\.)?youtu(?:be\.com\/watch\?v=|\.be\/)([\w\-\_]*)(&(amp;)?[\w\?=]*)?)}}/,"g"),audioRegex=new RegExp(/{{.*?\[\[audio\]\].*?\:(.*?)}}/,"g"),pdfRegex=new RegExp(/{{.*?\[\[pdf\]\].*?\:(.*?)}}/,"g"),blockquoteRegex=new RegExp(/(\[\[>\]\])\s*(.*)/,"g"),roamHighlightRegex=new RegExp(/\^\^(.+)\^\^/,"g"),roamItalicRegex=new RegExp(/__(.+)__/,"g"),tableRegex2=new RegExp(/- {{.*?\btable\b.*?}}/,"g"),attributeRegex=new RegExp(/\b\w+(?:\s+\w+)*::/,"g");var RemoveDrafts=__name(()=>({name:"RemoveDrafts",shouldPublish(_ctx,[_tree,vfile]){return!(vfile.data?.frontmatter?.draft===!0||vfile.data?.frontmatter?.draft==="true")}}),"RemoveDrafts");import path7 from"path";import{visit as visit7}from"unist-util-visit";import{jsx}from"preact/jsx-runtime";var Header=__name(({children})=>children.length>0?jsx("header",{children}):null,"Header");Header.css=`
|
||
header {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
margin: 2rem 0;
|
||
gap: 1.5rem;
|
||
}
|
||
|
||
header h1 {
|
||
margin: 0;
|
||
flex: auto;
|
||
}
|
||
`;var Header_default=__name(()=>Header,"default");var clipboard_inline_default=`var r='<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg>',l='<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" fill="rgb(63, 185, 80)" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>';document.addEventListener("nav",()=>{let a=document.getElementsByTagName("pre");for(let t=0;t<a.length;t++){let n=a[t].getElementsByTagName("code")[0];if(n){let o=function(){navigator.clipboard.writeText(i).then(()=>{e.blur(),e.innerHTML=l,setTimeout(()=>{e.innerHTML=r,e.style.borderColor=""},2e3)},d=>console.error(d))};var c=o;let i=(n.dataset.clipboard?JSON.parse(n.dataset.clipboard):n.innerText).replace(/\\n\\n/g,\`
|
||
\`),e=document.createElement("button");e.className="clipboard-button",e.type="button",e.innerHTML=r,e.ariaLabel="Copy source",e.addEventListener("click",o),window.addCleanup(()=>e.removeEventListener("click",o)),a[t].prepend(e)}}});
|
||
`;var clipboard_default=`.clipboard-button {
|
||
position: absolute;
|
||
display: flex;
|
||
float: right;
|
||
right: 0;
|
||
padding: 0.4rem;
|
||
margin: 0.3rem;
|
||
color: var(--gray);
|
||
border-color: var(--dark);
|
||
background-color: var(--light);
|
||
border: 1px solid;
|
||
border-radius: 5px;
|
||
opacity: 0;
|
||
transition: 0.2s;
|
||
}
|
||
.clipboard-button > svg {
|
||
fill: var(--light);
|
||
filter: contrast(0.3);
|
||
}
|
||
.clipboard-button:hover {
|
||
cursor: pointer;
|
||
border-color: var(--secondary);
|
||
}
|
||
.clipboard-button:focus {
|
||
outline: 0;
|
||
}
|
||
|
||
pre:hover > .clipboard-button {
|
||
opacity: 1;
|
||
transition: 0.2s;
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiY2xpcGJvYXJkLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFO0VBQ0E7O0FBR0Y7RUFDRTtFQUNBOztBQUdGO0VBQ0U7OztBQUtGO0VBQ0U7RUFDQSIsInNvdXJjZXNDb250ZW50IjpbIi5jbGlwYm9hcmQtYnV0dG9uIHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbG9hdDogcmlnaHQ7XG4gIHJpZ2h0OiAwO1xuICBwYWRkaW5nOiAwLjRyZW07XG4gIG1hcmdpbjogMC4zcmVtO1xuICBjb2xvcjogdmFyKC0tZ3JheSk7XG4gIGJvcmRlci1jb2xvcjogdmFyKC0tZGFyayk7XG4gIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxpZ2h0KTtcbiAgYm9yZGVyOiAxcHggc29saWQ7XG4gIGJvcmRlci1yYWRpdXM6IDVweDtcbiAgb3BhY2l0eTogMDtcbiAgdHJhbnNpdGlvbjogMC4ycztcblxuICAmID4gc3ZnIHtcbiAgICBmaWxsOiB2YXIoLS1saWdodCk7XG4gICAgZmlsdGVyOiBjb250cmFzdCgwLjMpO1xuICB9XG5cbiAgJjpob3ZlciB7XG4gICAgY3Vyc29yOiBwb2ludGVyO1xuICAgIGJvcmRlci1jb2xvcjogdmFyKC0tc2Vjb25kYXJ5KTtcbiAgfVxuXG4gICY6Zm9jdXMge1xuICAgIG91dGxpbmU6IDA7XG4gIH1cbn1cblxucHJlIHtcbiAgJjpob3ZlciA+IC5jbGlwYm9hcmQtYnV0dG9uIHtcbiAgICBvcGFjaXR5OiAxO1xuICAgIHRyYW5zaXRpb246IDAuMnM7XG4gIH1cbn1cbiJdfQ== */`;import{jsx as jsx2}from"preact/jsx-runtime";var Body=__name(({children})=>jsx2("div",{id:"quartz-body",children}),"Body");Body.afterDOMLoaded=clipboard_inline_default;Body.css=clipboard_default;var Body_default=__name(()=>Body,"default");import{render}from"preact-render-to-string";import{randomUUID}from"crypto";import{jsx as jsx3}from"preact/jsx-runtime";function JSResourceToScriptElement(resource,preserve){let scriptType=resource.moduleType??"application/javascript",spaPreserve=preserve??resource.spaPreserve;if(resource.contentType==="external")return jsx3("script",{src:resource.src,type:scriptType,"spa-preserve":spaPreserve},resource.src);{let content=resource.script;return jsx3("script",{type:scriptType,"spa-preserve":spaPreserve,dangerouslySetInnerHTML:{__html:content}},randomUUID())}}__name(JSResourceToScriptElement,"JSResourceToScriptElement");function CSSResourceToStyleElement(resource,preserve){let spaPreserve=preserve??resource.spaPreserve;return resource.inline??!1?jsx3("style",{children:resource.content}):jsx3("link",{href:resource.content,rel:"stylesheet",type:"text/css","spa-preserve":spaPreserve},resource.content)}__name(CSSResourceToStyleElement,"CSSResourceToStyleElement");import{visit as visit6}from"unist-util-visit";import{jsx as jsx4,jsxs}from"preact/jsx-runtime";var headerRegex=new RegExp(/h[1-6]/);function pageResources(baseDir,staticResources){let contentIndexScript=`const fetchData = fetch("${joinSegments(baseDir,"static/contentIndex.json")}").then(data => data.json())`;return{css:[{content:joinSegments(baseDir,"index.css")},...staticResources.css],js:[{src:joinSegments(baseDir,"prescript.js"),loadTime:"beforeDOMReady",contentType:"external"},{loadTime:"beforeDOMReady",contentType:"inline",spaPreserve:!0,script:contentIndexScript},...staticResources.js,{src:joinSegments(baseDir,"postscript.js"),loadTime:"afterDOMReady",moduleType:"module",contentType:"external"}]}}__name(pageResources,"pageResources");function renderPage(cfg,slug,componentData,components,pageResources2){let root=clone(componentData.tree);visit6(root,"element",(node,_index,_parent)=>{if(node.tagName==="blockquote"&&(node.properties?.className??[]).includes("transclude")){let inner=node.children[0],transcludeTarget=inner.properties["data-slug"],page=componentData.allFiles.find(f=>f.slug===transcludeTarget);if(!page)return;let blockRef=node.properties.dataBlock;if(blockRef?.startsWith("#^")){blockRef=blockRef.slice(2);let blockNode=page.blocks?.[blockRef];blockNode&&(blockNode.tagName==="li"&&(blockNode={type:"element",tagName:"ul",properties:{},children:[blockNode]}),node.children=[normalizeHastElement(blockNode,slug,transcludeTarget),{type:"element",tagName:"a",properties:{href:inner.properties?.href,class:["internal","transclude-src"]},children:[{type:"text",value:i18n(cfg.locale).components.transcludes.linkToOriginal}]}])}else if(blockRef?.startsWith("#")&&page.htmlAst){blockRef=blockRef.slice(1);let startIdx,startDepth,endIdx;for(let[i,el]of page.htmlAst.children.entries()){if(!(el.type==="element"&&el.tagName.match(headerRegex)))continue;let depth=Number(el.tagName.substring(1));if(startIdx===void 0||startDepth===void 0)el.properties?.id===blockRef&&(startIdx=i,startDepth=depth);else if(depth<=startDepth){endIdx=i;break}}if(startIdx===void 0)return;node.children=[...page.htmlAst.children.slice(startIdx,endIdx).map(child=>normalizeHastElement(child,slug,transcludeTarget)),{type:"element",tagName:"a",properties:{href:inner.properties?.href,class:["internal","transclude-src"]},children:[{type:"text",value:i18n(cfg.locale).components.transcludes.linkToOriginal}]}]}else page.htmlAst&&(node.children=[{type:"element",tagName:"h1",properties:{},children:[{type:"text",value:page.frontmatter?.title??i18n(cfg.locale).components.transcludes.transcludeOf({targetSlug:page.slug})}]},...page.htmlAst.children.map(child=>normalizeHastElement(child,slug,transcludeTarget)),{type:"element",tagName:"a",properties:{href:inner.properties?.href,class:["internal","transclude-src"]},children:[{type:"text",value:i18n(cfg.locale).components.transcludes.linkToOriginal}]}])}}),componentData.tree=root;let{head:Head,header,beforeBody,pageBody:Content2,afterBody,left,right,footer:Footer}=components,Header2=Header_default(),Body2=Body_default(),LeftComponent=jsx4("div",{class:"left sidebar",children:left.map(BodyComponent=>jsx4(BodyComponent,{...componentData}))}),RightComponent=jsx4("div",{class:"right sidebar",children:right.map(BodyComponent=>jsx4(BodyComponent,{...componentData}))}),lang=componentData.fileData.frontmatter?.lang??cfg.locale?.split("-")[0]??"en",doc=jsxs("html",{lang,children:[jsx4(Head,{...componentData}),jsx4("body",{"data-slug":slug,children:jsx4("div",{id:"quartz-root",class:"page",children:jsxs(Body2,{...componentData,children:[LeftComponent,jsxs("div",{class:"center",children:[jsxs("div",{class:"page-header",children:[jsx4(Header2,{...componentData,children:header.map(HeaderComponent=>jsx4(HeaderComponent,{...componentData}))}),jsx4("div",{class:"popover-hint",children:beforeBody.map(BodyComponent=>jsx4(BodyComponent,{...componentData}))})]}),jsx4(Content2,{...componentData}),jsx4("hr",{}),jsx4("div",{class:"page-footer",children:afterBody.map(BodyComponent=>jsx4(BodyComponent,{...componentData}))})]}),RightComponent,jsx4(Footer,{...componentData})]})})}),pageResources2.js.filter(resource=>resource.loadTime==="afterDOMReady").map(res=>JSResourceToScriptElement(res))]});return`<!DOCTYPE html>
|
||
`+render(doc)}__name(renderPage,"renderPage");import{toJsxRuntime}from"hast-util-to-jsx-runtime";import{Fragment,jsx as jsx5,jsxs as jsxs2}from"preact/jsx-runtime";import{jsx as jsx6}from"preact/jsx-runtime";var customComponents={table:__name(props=>jsx6("div",{class:"table-container",children:jsx6("table",{...props})}),"table")};function htmlToJsx(fp,tree){try{return toJsxRuntime(tree,{Fragment,jsx:jsx5,jsxs:jsxs2,elementAttributeNameCase:"html",components:customComponents})}catch(e){trace(`Failed to parse Markdown in \`${fp}\` into JSX`,e)}}__name(htmlToJsx,"htmlToJsx");import{jsx as jsx7}from"preact/jsx-runtime";var Content=__name(({fileData,tree})=>{let content=htmlToJsx(fileData.filePath,tree),classString=["popover-hint",...fileData.frontmatter?.cssclasses??[]].join(" ");return jsx7("article",{class:classString,children:content})},"Content"),Content_default=__name(()=>Content,"default");var listPage_default=`/**
|
||
* Layout breakpoints
|
||
* $mobile: screen width below this value will use mobile styles
|
||
* $desktop: screen width above this value will use desktop styles
|
||
* Screen width between $mobile and $desktop width will use the tablet layout.
|
||
* assuming mobile < desktop
|
||
*/
|
||
ul.section-ul {
|
||
list-style: none;
|
||
margin-top: 2em;
|
||
padding-left: 0;
|
||
}
|
||
|
||
li.section-li {
|
||
margin-bottom: 1em;
|
||
}
|
||
li.section-li > .section {
|
||
display: grid;
|
||
grid-template-columns: fit-content(8em) 3fr 1fr;
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
li.section-li > .section > .tags {
|
||
display: none;
|
||
}
|
||
}
|
||
li.section-li > .section > .desc > h3 > a {
|
||
background-color: transparent;
|
||
}
|
||
li.section-li > .section .meta {
|
||
margin: 0 1em 0 0;
|
||
opacity: 0.6;
|
||
}
|
||
|
||
.popover .section {
|
||
grid-template-columns: fit-content(8em) 1fr !important;
|
||
}
|
||
.popover .section > .tags {
|
||
display: none;
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiLi4vLi4vc3R5bGVzL3ZhcmlhYmxlcy5zY3NzIiwibGlzdFBhZ2Uuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQ0VBO0VBQ0U7RUFDQTtFQUNBOzs7QUFHRjtFQUNFOztBQUVBO0VBQ0U7RUFDQTs7QUFFQTtFQUNFO0lBQ0U7OztBQUlKO0VBQ0U7O0FBR0Y7RUFDRTtFQUNBOzs7QUFNTjtFQUNFOztBQUVBO0VBQ0UiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIExheW91dCBicmVha3BvaW50c1xuICogJG1vYmlsZTogc2NyZWVuIHdpZHRoIGJlbG93IHRoaXMgdmFsdWUgd2lsbCB1c2UgbW9iaWxlIHN0eWxlc1xuICogJGRlc2t0b3A6IHNjcmVlbiB3aWR0aCBhYm92ZSB0aGlzIHZhbHVlIHdpbGwgdXNlIGRlc2t0b3Agc3R5bGVzXG4gKiBTY3JlZW4gd2lkdGggYmV0d2VlbiAkbW9iaWxlIGFuZCAkZGVza3RvcCB3aWR0aCB3aWxsIHVzZSB0aGUgdGFibGV0IGxheW91dC5cbiAqIGFzc3VtaW5nIG1vYmlsZSA8IGRlc2t0b3BcbiAqL1xuJGJyZWFrcG9pbnRzOiAoXG4gIG1vYmlsZTogODAwcHgsXG4gIGRlc2t0b3A6IDEyMDBweCxcbik7XG5cbiRtb2JpbGU6IFwiKG1heC13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgbW9iaWxlKX0pXCI7XG4kdGFibGV0OiBcIihtaW4td2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIG1vYmlsZSl9KSBhbmQgKG1heC13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9KVwiO1xuJGRlc2t0b3A6IFwiKG1pbi13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9KVwiO1xuXG4kcGFnZVdpZHRoOiAje21hcC1nZXQoJGJyZWFrcG9pbnRzLCBtb2JpbGUpfTtcbiRzaWRlUGFuZWxXaWR0aDogMzIwcHg7IC8vMzgwcHg7XG4kdG9wU3BhY2luZzogNnJlbTtcbiRib2xkV2VpZ2h0OiA3MDA7XG4kc2VtaUJvbGRXZWlnaHQ6IDYwMDtcbiRub3JtYWxXZWlnaHQ6IDQwMDtcblxuJG1vYmlsZUdyaWQ6IChcbiAgdGVtcGxhdGVSb3dzOiBcImF1dG8gYXV0byBhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiYXV0b1wiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdFwiXFxcbiAgICAgIFwiZ3JpZC1oZWFkZXJcIlxcXG4gICAgICBcImdyaWQtY2VudGVyXCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtZm9vdGVyXCInLFxuKTtcbiR0YWJsZXRHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0byBhdXRvXCIsXG4gIHRlbXBsYXRlQ29sdW1uczogXCIjeyRzaWRlUGFuZWxXaWR0aH0gYXV0b1wiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWhlYWRlclwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1jZW50ZXJcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1mb290ZXJcIicsXG4pO1xuJGRlc2t0b3BHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiI3skc2lkZVBhbmVsV2lkdGh9IGF1dG8gI3skc2lkZVBhbmVsV2lkdGh9XCIsXG4gIHJvd0dhcDogXCI1cHhcIixcbiAgY29sdW1uR2FwOiBcIjVweFwiLFxuICB0ZW1wbGF0ZUFyZWFzOlxuICAgICdcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtaGVhZGVyIGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1jZW50ZXIgZ3JpZC1zaWRlYmFyLXJpZ2h0XCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWZvb3RlciBncmlkLXNpZGViYXItcmlnaHRcIicsXG4pO1xuIiwiQHVzZSBcIi4uLy4uL3N0eWxlcy92YXJpYWJsZXMuc2Nzc1wiIGFzICo7XG5cbnVsLnNlY3Rpb24tdWwge1xuICBsaXN0LXN0eWxlOiBub25lO1xuICBtYXJnaW4tdG9wOiAyZW07XG4gIHBhZGRpbmctbGVmdDogMDtcbn1cblxubGkuc2VjdGlvbi1saSB7XG4gIG1hcmdpbi1ib3R0b206IDFlbTtcblxuICAmID4gLnNlY3Rpb24ge1xuICAgIGRpc3BsYXk6IGdyaWQ7XG4gICAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBmaXQtY29udGVudCg4ZW0pIDNmciAxZnI7XG5cbiAgICBAbWVkaWEgYWxsIGFuZCAoJG1vYmlsZSkge1xuICAgICAgJiA+IC50YWdzIHtcbiAgICAgICAgZGlzcGxheTogbm9uZTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAmID4gLmRlc2MgPiBoMyA+IGEge1xuICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG4gICAgfVxuXG4gICAgJiAubWV0YSB7XG4gICAgICBtYXJnaW46IDAgMWVtIDAgMDtcbiAgICAgIG9wYWNpdHk6IDAuNjtcbiAgICB9XG4gIH1cbn1cblxuLy8gbW9kaWZpY2F0aW9ucyBpbiBwb3BvdmVyIGNvbnRleHRcbi5wb3BvdmVyIC5zZWN0aW9uIHtcbiAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiBmaXQtY29udGVudCg4ZW0pIDFmciAhaW1wb3J0YW50O1xuXG4gICYgPiAudGFncyB7XG4gICAgZGlzcGxheTogbm9uZTtcbiAgfVxufVxuIl19 */`;import{jsx as jsx8}from"preact/jsx-runtime";function getDate(cfg,data){if(!cfg.defaultDateType)throw new Error("Field 'defaultDateType' was not set in the configuration object of quartz.config.ts. See https://quartz.jzhao.xyz/configuration#general-configuration for more details.");return data.dates?.[cfg.defaultDateType]}__name(getDate,"getDate");function formatDate(d,locale="en-US"){return d.toLocaleDateString(locale,{year:"numeric",month:"short",day:"2-digit"})}__name(formatDate,"formatDate");function Date2({date,locale}){return jsx8("time",{datetime:date.toISOString(),children:formatDate(date,locale)})}__name(Date2,"Date");import{jsx as jsx9,jsxs as jsxs3}from"preact/jsx-runtime";function byDateAndAlphabetical(cfg){return(f1,f2)=>{if(f1.dates&&f2.dates)return getDate(cfg,f2).getTime()-getDate(cfg,f1).getTime();if(f1.dates&&!f2.dates)return-1;if(!f1.dates&&f2.dates)return 1;let f1Title=f1.frontmatter?.title.toLowerCase()??"",f2Title=f2.frontmatter?.title.toLowerCase()??"";return f1Title.localeCompare(f2Title)}}__name(byDateAndAlphabetical,"byDateAndAlphabetical");var PageList=__name(({cfg,fileData,allFiles,limit,sort})=>{let sorter=sort??byDateAndAlphabetical(cfg),list=allFiles.sort(sorter);return limit&&(list=list.slice(0,limit)),jsx9("ul",{class:"section-ul",children:list.map(page=>{let title=page.frontmatter?.title,tags=page.frontmatter?.tags??[];return jsx9("li",{class:"section-li",children:jsxs3("div",{class:"section",children:[jsx9("p",{class:"meta",children:page.dates&&jsx9(Date2,{date:getDate(cfg,page),locale:cfg.locale})}),jsx9("div",{class:"desc",children:jsx9("h3",{children:jsx9("a",{href:resolveRelative(fileData.slug,page.slug),class:"internal",children:title})})}),jsx9("ul",{class:"tags",children:tags.map(tag=>jsx9("li",{children:jsx9("a",{class:"internal tag-link",href:resolveRelative(fileData.slug,`tags/${tag}`),children:tag})}))})]})})})})},"PageList");PageList.css=`
|
||
.section h3 {
|
||
margin: 0;
|
||
}
|
||
|
||
.section > .tags {
|
||
margin: 0;
|
||
}
|
||
`;import{Fragment as Fragment2,jsx as jsx10,jsxs as jsxs4}from"preact/jsx-runtime";var defaultOptions9={numPages:10},TagContent_default=__name(opts=>{let options2={...defaultOptions9,...opts},TagContent=__name(props=>{let{tree,fileData,allFiles,cfg}=props,slug=fileData.slug;if(!(slug?.startsWith("tags/")||slug==="tags"))throw new Error(`Component "TagContent" tried to render a non-tag page: ${slug}`);let tag=simplifySlug(slug.slice(5)),allPagesWithTag=__name(tag2=>allFiles.filter(file=>(file.frontmatter?.tags??[]).flatMap(getAllSegmentPrefixes).includes(tag2)),"allPagesWithTag"),content=tree.children.length===0?fileData.description:htmlToJsx(fileData.filePath,tree),classes=(fileData.frontmatter?.cssclasses??[]).join(" ");if(tag==="/"){let tags=[...new Set(allFiles.flatMap(data=>data.frontmatter?.tags??[]).flatMap(getAllSegmentPrefixes))].sort((a,b)=>a.localeCompare(b)),tagItemMap=new Map;for(let tag2 of tags)tagItemMap.set(tag2,allPagesWithTag(tag2));return jsxs4("div",{class:"popover-hint",children:[jsx10("article",{class:classes,children:jsx10("p",{children:content})}),jsx10("p",{children:i18n(cfg.locale).pages.tagContent.totalTags({count:tags.length})}),jsx10("div",{children:tags.map(tag2=>{let pages=tagItemMap.get(tag2),listProps={...props,allFiles:pages},contentPage=allFiles.filter(file=>file.slug===`tags/${tag2}`).at(0),root=contentPage?.htmlAst,content2=!root||root?.children.length===0?contentPage?.description:htmlToJsx(contentPage.filePath,root);return jsxs4("div",{children:[jsx10("h2",{children:jsx10("a",{class:"internal tag-link",href:`../tags/${tag2}`,children:tag2})}),content2&&jsx10("p",{children:content2}),jsxs4("div",{class:"page-listing",children:[jsxs4("p",{children:[i18n(cfg.locale).pages.tagContent.itemsUnderTag({count:pages.length}),pages.length>options2.numPages&&jsxs4(Fragment2,{children:[" ",jsx10("span",{children:i18n(cfg.locale).pages.tagContent.showingFirst({count:options2.numPages})})]})]}),jsx10(PageList,{limit:options2.numPages,...listProps,sort:opts?.sort})]})]})})})]})}else{let pages=allPagesWithTag(tag),listProps={...props,allFiles:pages};return jsxs4("div",{class:classes,children:[jsx10("article",{class:"popover-hint",children:content}),jsxs4("div",{class:"page-listing",children:[jsx10("p",{children:i18n(cfg.locale).pages.tagContent.itemsUnderTag({count:pages.length})}),jsx10("div",{children:jsx10(PageList,{...listProps})})]})]})}},"TagContent");return TagContent.css=listPage_default+PageList.css,TagContent},"default");import path5 from"path";import{jsx as jsx11,jsxs as jsxs5}from"preact/jsx-runtime";var defaultOptions10={showFolderCount:!0,showSubfolders:!0},FolderContent_default=__name(opts=>{let options2={...defaultOptions10,...opts},FolderContent=__name(props=>{let{tree,fileData,allFiles,cfg}=props,folderSlug=stripSlashes(simplifySlug(fileData.slug)),folderParts=folderSlug.split(path5.posix.sep),allPagesInFolder=[],allPagesInSubfolders=new Map;allFiles.forEach(file=>{let fileSlug=stripSlashes(simplifySlug(file.slug)),prefixed=fileSlug.startsWith(folderSlug)&&fileSlug!==folderSlug,fileParts=fileSlug.split(path5.posix.sep),isDirectChild=fileParts.length===folderParts.length+1;if(prefixed){if(isDirectChild)allPagesInFolder.push(file);else if(options2.showSubfolders){let subfolderSlug=joinSegments(...fileParts.slice(0,folderParts.length+1)),pagesInFolder=allPagesInSubfolders.get(subfolderSlug)||[];allPagesInSubfolders.set(subfolderSlug,[...pagesInFolder,file])}}}),allPagesInSubfolders.forEach((files,subfolderSlug)=>{if(!allPagesInFolder.some(file=>subfolderSlug===stripSlashes(simplifySlug(file.slug)))){let subfolderDates=files.sort(byDateAndAlphabetical(cfg))[0].dates,subfolderTitle=subfolderSlug.split(path5.posix.sep).at(-1);allPagesInFolder.push({slug:subfolderSlug,dates:subfolderDates,frontmatter:{title:subfolderTitle,tags:["folder"]}})}});let classes=(fileData.frontmatter?.cssclasses??[]).join(" "),listProps={...props,sort:options2.sort,allFiles:allPagesInFolder},content=tree.children.length===0?fileData.description:htmlToJsx(fileData.filePath,tree);return jsxs5("div",{class:"popover-hint",children:[jsx11("article",{class:classes,children:content}),jsxs5("div",{class:"page-listing",children:[options2.showFolderCount&&jsx11("p",{children:i18n(cfg.locale).pages.folderContent.itemsUnderFolder({count:allPagesInFolder.length})}),jsx11("div",{children:jsx11(PageList,{...listProps})})]})]})},"FolderContent");return FolderContent.css=listPage_default+PageList.css,FolderContent},"default");import{jsx as jsx12,jsxs as jsxs6}from"preact/jsx-runtime";var NotFound=__name(({cfg})=>{let baseDir=new URL(`https://${cfg.baseUrl??"example.com"}`).pathname;return jsxs6("article",{class:"popover-hint",children:[jsx12("h1",{children:"404"}),jsx12("p",{children:i18n(cfg.locale).pages.error.notFound}),jsx12("a",{href:baseDir,children:i18n(cfg.locale).pages.error.home})]})},"NotFound"),__default=__name(()=>NotFound,"default");import{jsx as jsx13}from"preact/jsx-runtime";var ArticleTitle=__name(({fileData,displayClass})=>{let title=fileData.frontmatter?.title;return title?jsx13("h1",{class:classNames(displayClass,"article-title"),children:title}):null},"ArticleTitle");ArticleTitle.css=`
|
||
.article-title {
|
||
margin: 2rem 0 0 0;
|
||
}
|
||
`;var ArticleTitle_default=__name(()=>ArticleTitle,"default");var darkmode_inline_default=`var d=window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark",s=localStorage.getItem("theme")??d;document.documentElement.setAttribute("saved-theme",s);var a=t=>{let n=new CustomEvent("themechange",{detail:{theme:t}});document.dispatchEvent(n)};document.addEventListener("nav",()=>{let t=o=>{let e=document.documentElement.getAttribute("saved-theme")==="dark"?"light":"dark";document.documentElement.setAttribute("saved-theme",e),localStorage.setItem("theme",e),a(e)},n=o=>{let e=o.matches?"dark":"light";document.documentElement.setAttribute("saved-theme",e),localStorage.setItem("theme",e),a(e)},m=document.querySelector("#darkmode");m&&(m.addEventListener("click",t),window.addCleanup(()=>m.removeEventListener("click",t)));let c=window.matchMedia("(prefers-color-scheme: dark)");c.addEventListener("change",n),window.addCleanup(()=>c.removeEventListener("change",n))});
|
||
`;var darkmode_default=`.darkmode {
|
||
cursor: pointer;
|
||
padding: 0;
|
||
position: relative;
|
||
background: none;
|
||
border: none;
|
||
width: 20px;
|
||
height: 20px;
|
||
margin: 0 10px;
|
||
text-align: inherit;
|
||
}
|
||
.darkmode svg {
|
||
position: absolute;
|
||
width: 20px;
|
||
height: 20px;
|
||
top: calc(50% - 10px);
|
||
fill: var(--darkgray);
|
||
transition: opacity 0.1s ease;
|
||
}
|
||
|
||
:root[saved-theme=dark] {
|
||
color-scheme: dark;
|
||
}
|
||
|
||
:root[saved-theme=light] {
|
||
color-scheme: light;
|
||
}
|
||
|
||
:root[saved-theme=dark] .darkmode > #dayIcon {
|
||
display: none;
|
||
}
|
||
:root[saved-theme=dark] .darkmode > #nightIcon {
|
||
display: inline;
|
||
}
|
||
|
||
:root .darkmode > #dayIcon {
|
||
display: inline;
|
||
}
|
||
:root .darkmode > #nightIcon {
|
||
display: none;
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiZGFya21vZGUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7O0FBSUo7RUFDRTs7O0FBR0Y7RUFDRTs7O0FBSUE7RUFDRTs7QUFFRjtFQUNFOzs7QUFLRjtFQUNFOztBQUVGO0VBQ0UiLCJzb3VyY2VzQ29udGVudCI6WyIuZGFya21vZGUge1xuICBjdXJzb3I6IHBvaW50ZXI7XG4gIHBhZGRpbmc6IDA7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgYmFja2dyb3VuZDogbm9uZTtcbiAgYm9yZGVyOiBub25lO1xuICB3aWR0aDogMjBweDtcbiAgaGVpZ2h0OiAyMHB4O1xuICBtYXJnaW46IDAgMTBweDtcbiAgdGV4dC1hbGlnbjogaW5oZXJpdDtcblxuICAmIHN2ZyB7XG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHdpZHRoOiAyMHB4O1xuICAgIGhlaWdodDogMjBweDtcbiAgICB0b3A6IGNhbGMoNTAlIC0gMTBweCk7XG4gICAgZmlsbDogdmFyKC0tZGFya2dyYXkpO1xuICAgIHRyYW5zaXRpb246IG9wYWNpdHkgMC4xcyBlYXNlO1xuICB9XG59XG5cbjpyb290W3NhdmVkLXRoZW1lPVwiZGFya1wiXSB7XG4gIGNvbG9yLXNjaGVtZTogZGFyaztcbn1cblxuOnJvb3Rbc2F2ZWQtdGhlbWU9XCJsaWdodFwiXSB7XG4gIGNvbG9yLXNjaGVtZTogbGlnaHQ7XG59XG5cbjpyb290W3NhdmVkLXRoZW1lPVwiZGFya1wiXSAuZGFya21vZGUge1xuICAmID4gI2RheUljb24ge1xuICAgIGRpc3BsYXk6IG5vbmU7XG4gIH1cbiAgJiA+ICNuaWdodEljb24ge1xuICAgIGRpc3BsYXk6IGlubGluZTtcbiAgfVxufVxuXG46cm9vdCAuZGFya21vZGUge1xuICAmID4gI2RheUljb24ge1xuICAgIGRpc3BsYXk6IGlubGluZTtcbiAgfVxuICAmID4gI25pZ2h0SWNvbiB7XG4gICAgZGlzcGxheTogbm9uZTtcbiAgfVxufVxuIl19 */`;import{jsx as jsx14,jsxs as jsxs7}from"preact/jsx-runtime";var Darkmode=__name(({displayClass,cfg})=>jsxs7("button",{class:classNames(displayClass,"darkmode"),id:"darkmode",children:[jsxs7("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",id:"dayIcon",x:"0px",y:"0px",viewBox:"0 0 35 35",style:"enable-background:new 0 0 35 35",xmlSpace:"preserve","aria-label":i18n(cfg.locale).components.themeToggle.darkMode,children:[jsx14("title",{children:i18n(cfg.locale).components.themeToggle.darkMode}),jsx14("path",{d:"M6,17.5C6,16.672,5.328,16,4.5,16h-3C0.672,16,0,16.672,0,17.5 S0.672,19,1.5,19h3C5.328,19,6,18.328,6,17.5z M7.5,26c-0.414,0-0.789,0.168-1.061,0.439l-2,2C4.168,28.711,4,29.086,4,29.5 C4,30.328,4.671,31,5.5,31c0.414,0,0.789-0.168,1.06-0.44l2-2C8.832,28.289,9,27.914,9,27.5C9,26.672,8.329,26,7.5,26z M17.5,6 C18.329,6,19,5.328,19,4.5v-3C19,0.672,18.329,0,17.5,0S16,0.672,16,1.5v3C16,5.328,16.671,6,17.5,6z M27.5,9 c0.414,0,0.789-0.168,1.06-0.439l2-2C30.832,6.289,31,5.914,31,5.5C31,4.672,30.329,4,29.5,4c-0.414,0-0.789,0.168-1.061,0.44 l-2,2C26.168,6.711,26,7.086,26,7.5C26,8.328,26.671,9,27.5,9z M6.439,8.561C6.711,8.832,7.086,9,7.5,9C8.328,9,9,8.328,9,7.5 c0-0.414-0.168-0.789-0.439-1.061l-2-2C6.289,4.168,5.914,4,5.5,4C4.672,4,4,4.672,4,5.5c0,0.414,0.168,0.789,0.439,1.06 L6.439,8.561z M33.5,16h-3c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5h3c0.828,0,1.5-0.672,1.5-1.5S34.328,16,33.5,16z M28.561,26.439C28.289,26.168,27.914,26,27.5,26c-0.828,0-1.5,0.672-1.5,1.5c0,0.414,0.168,0.789,0.439,1.06l2,2 C28.711,30.832,29.086,31,29.5,31c0.828,0,1.5-0.672,1.5-1.5c0-0.414-0.168-0.789-0.439-1.061L28.561,26.439z M17.5,29 c-0.829,0-1.5,0.672-1.5,1.5v3c0,0.828,0.671,1.5,1.5,1.5s1.5-0.672,1.5-1.5v-3C19,29.672,18.329,29,17.5,29z M17.5,7 C11.71,7,7,11.71,7,17.5S11.71,28,17.5,28S28,23.29,28,17.5S23.29,7,17.5,7z M17.5,25c-4.136,0-7.5-3.364-7.5-7.5 c0-4.136,3.364-7.5,7.5-7.5c4.136,0,7.5,3.364,7.5,7.5C25,21.636,21.636,25,17.5,25z"})]}),jsxs7("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",id:"nightIcon",x:"0px",y:"0px",viewBox:"0 0 100 100",style:"enable-background:new 0 0 100 100",xmlSpace:"preserve","aria-label":i18n(cfg.locale).components.themeToggle.lightMode,children:[jsx14("title",{children:i18n(cfg.locale).components.themeToggle.lightMode}),jsx14("path",{d:"M96.76,66.458c-0.853-0.852-2.15-1.064-3.23-0.534c-6.063,2.991-12.858,4.571-19.655,4.571 C62.022,70.495,50.88,65.88,42.5,57.5C29.043,44.043,25.658,23.536,34.076,6.47c0.532-1.08,0.318-2.379-0.534-3.23 c-0.851-0.852-2.15-1.064-3.23-0.534c-4.918,2.427-9.375,5.619-13.246,9.491c-9.447,9.447-14.65,22.008-14.65,35.369 c0,13.36,5.203,25.921,14.65,35.368s22.008,14.65,35.368,14.65c13.361,0,25.921-5.203,35.369-14.65 c3.872-3.871,7.064-8.328,9.491-13.246C97.826,68.608,97.611,67.309,96.76,66.458z"})]})]}),"Darkmode");Darkmode.beforeDOMLoaded=darkmode_inline_default;Darkmode.css=darkmode_default;var Darkmode_default=__name(()=>Darkmode,"default");var DEFAULT_SANS_SERIF='-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif',DEFAULT_MONO="ui-monospace, SFMono-Regular, SF Mono, Menlo, monospace";function googleFontHref(theme){let{code,header,body}=theme.typography;return`https://fonts.googleapis.com/css2?family=${code}&family=${header}:wght@400;700&family=${body}:ital,wght@0,400;0,600;1,400;1,600&display=swap`}__name(googleFontHref,"googleFontHref");function joinStyles(theme,...stylesheet){return`
|
||
${stylesheet.join(`
|
||
|
||
`)}
|
||
|
||
:root {
|
||
--light: ${theme.colors.lightMode.light};
|
||
--lightgray: ${theme.colors.lightMode.lightgray};
|
||
--gray: ${theme.colors.lightMode.gray};
|
||
--darkgray: ${theme.colors.lightMode.darkgray};
|
||
--dark: ${theme.colors.lightMode.dark};
|
||
--secondary: ${theme.colors.lightMode.secondary};
|
||
--tertiary: ${theme.colors.lightMode.tertiary};
|
||
--highlight: ${theme.colors.lightMode.highlight};
|
||
--textHighlight: ${theme.colors.lightMode.textHighlight};
|
||
|
||
--headerFont: "${theme.typography.header}", ${DEFAULT_SANS_SERIF};
|
||
--bodyFont: "${theme.typography.body}", ${DEFAULT_SANS_SERIF};
|
||
--codeFont: "${theme.typography.code}", ${DEFAULT_MONO};
|
||
}
|
||
|
||
:root[saved-theme="dark"] {
|
||
--light: ${theme.colors.darkMode.light};
|
||
--lightgray: ${theme.colors.darkMode.lightgray};
|
||
--gray: ${theme.colors.darkMode.gray};
|
||
--darkgray: ${theme.colors.darkMode.darkgray};
|
||
--dark: ${theme.colors.darkMode.dark};
|
||
--secondary: ${theme.colors.darkMode.secondary};
|
||
--tertiary: ${theme.colors.darkMode.tertiary};
|
||
--highlight: ${theme.colors.darkMode.highlight};
|
||
--textHighlight: ${theme.colors.darkMode.textHighlight};
|
||
}
|
||
`}__name(joinStyles,"joinStyles");import satori from"satori";import fs2 from"fs";import sharp from"sharp";import{jsx as jsx15,jsxs as jsxs8}from"preact/jsx-runtime";async function getSatoriFont(headerFontName,bodyFontName){let headerFont=await fetchTtf(headerFontName,700),bodyFont=await fetchTtf(bodyFontName,400);return[{name:headerFontName,data:headerFont,weight:700,style:"normal"},{name:bodyFontName,data:bodyFont,weight:400,style:"normal"}]}__name(getSatoriFont,"getSatoriFont");async function fetchTtf(fontName,weight){try{let css=await(await fetch(`https://fonts.googleapis.com/css?family=${fontName}:${weight}`)).text(),match=/url\((https:\/\/fonts.gstatic.com\/s\/.*?.ttf)\)/g.exec(css);if(!match)throw new Error("Could not fetch font");return await(await fetch(match[1])).arrayBuffer()}catch(error){throw new Error(`Error fetching font: ${error}`)}}__name(fetchTtf,"fetchTtf");var defaultImage=__name((cfg,{colorScheme},title,description,fonts,_fileData)=>{let useSmallerFont=title.length>22,iconPath=`https://${cfg.baseUrl}/static/icon.png`;return jsxs8("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",backgroundColor:cfg.theme.colors[colorScheme].light,gap:"2rem",paddingTop:"1.5rem",paddingBottom:"1.5rem",paddingLeft:"5rem",paddingRight:"5rem"},children:[jsxs8("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%",flexDirection:"row",gap:"2.5rem"},children:[jsx15("img",{src:iconPath,width:135,height:135}),jsx15("p",{style:{color:cfg.theme.colors[colorScheme].dark,fontSize:useSmallerFont?70:82,fontFamily:fonts[0].name},children:title})]}),jsx15("p",{style:{color:cfg.theme.colors[colorScheme].dark,fontSize:44,lineClamp:3,fontFamily:fonts[1].name},children:description})]})},"defaultImage");import{Fragment as Fragment3,jsx as jsx16,jsxs as jsxs9}from"preact/jsx-runtime";async function generateSocialImage({cfg,description,fileName,fontsPromise,title,fileData},userOpts,imageDir){let fonts=await fontsPromise,{width,height}=userOpts,imageComponent=userOpts.imageStructure(cfg,userOpts,title,description,fonts,fileData),svg=await satori(imageComponent,{width,height,fonts}),compressed=await sharp(Buffer.from(svg)).webp({quality:40}).toBuffer(),filePath=joinSegments(imageDir,`${fileName}.${extension}`);fs2.writeFileSync(filePath,compressed)}__name(generateSocialImage,"generateSocialImage");var extension="webp",defaultOptions11={colorScheme:"lightMode",width:1200,height:630,imageStructure:defaultImage,excludeRoot:!1},Head_default=__name(()=>{let fontsPromise,fullOptions;return __name(({cfg,fileData,externalResources,ctx})=>{fullOptions||(typeof cfg.generateSocialImages!="boolean"?fullOptions={...defaultOptions11,...cfg.generateSocialImages}:fullOptions=defaultOptions11),!fontsPromise&&cfg.generateSocialImages&&(fontsPromise=getSatoriFont(cfg.theme.typography.header,cfg.theme.typography.body));let fileName=fileData.filePath?.replaceAll("/","-"),fdDescription=fileData.description?.trim()??i18n(cfg.locale).propertyDefaults.description,titleSuffix=cfg.pageTitleSuffix??"",title=(fileData.frontmatter?.title??i18n(cfg.locale).propertyDefaults.title)+titleSuffix,description="";fdDescription&&(description=unescapeHTML(fdDescription)),fileData.frontmatter?.socialDescription?description=fileData.frontmatter?.socialDescription:fileData.frontmatter?.description&&(description=fileData.frontmatter?.description);let fileDir=joinSegments(ctx.argv.output,"static","social-images");cfg.generateSocialImages&&(fs2.existsSync(fileDir)||fs2.mkdirSync(fileDir,{recursive:!0}),fileName&&generateSocialImage({title,description,fileName,fileDir,fileExt:extension,fontsPromise,cfg,fileData},fullOptions,fileDir));let{css,js}=externalResources,url=new URL(`https://${cfg.baseUrl??"example.com"}`),path13=url.pathname,baseDir=fileData.slug==="404"?path13:pathToRoot(fileData.slug),iconPath=joinSegments(baseDir,"static/icon.png"),ogImageDefaultPath=`https://${cfg.baseUrl}/static/og-image.png`,ogImageGeneratedPath=`https://${cfg.baseUrl}/${fileDir.replace(`${ctx.argv.output}/`,"")}/${fileName}.${extension}`,ogImagePath=fileName===void 0||!cfg.generateSocialImages?ogImageDefaultPath:ogImageGeneratedPath,frontmatterImgUrl=fileData.frontmatter?.socialImage;fileData.slug==="index"&&(ogImagePath=ogImageDefaultPath),frontmatterImgUrl&&(ogImagePath=`https://${cfg.baseUrl}/static/${frontmatterImgUrl}`);let socialUrl=fileData.slug==="404"?url.toString():joinSegments(url.toString(),fileData.slug);return jsxs9("head",{children:[jsx16("title",{children:title}),jsx16("meta",{charSet:"utf-8"}),cfg.theme.cdnCaching&&cfg.theme.fontOrigin==="googleFonts"&&jsxs9(Fragment3,{children:[jsx16("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),jsx16("link",{rel:"preconnect",href:"https://fonts.gstatic.com"}),jsx16("link",{rel:"stylesheet",href:googleFontHref(cfg.theme)})]}),jsx16("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),jsx16("meta",{name:"og:site_name",content:cfg.pageTitle}),jsx16("meta",{property:"og:title",content:title}),jsx16("meta",{property:"og:type",content:"website"}),jsx16("meta",{name:"twitter:card",content:"summary_large_image"}),jsx16("meta",{name:"twitter:title",content:title}),jsx16("meta",{name:"twitter:description",content:description}),jsx16("meta",{property:"og:description",content:description}),jsx16("meta",{property:"og:image:type",content:`image/${extension}`}),jsx16("meta",{property:"og:image:alt",content:description}),!frontmatterImgUrl&&jsxs9(Fragment3,{children:[jsx16("meta",{property:"og:image:width",content:fullOptions.width.toString()}),jsx16("meta",{property:"og:image:height",content:fullOptions.height.toString()})]}),jsx16("meta",{property:"og:image:url",content:ogImagePath}),cfg.baseUrl&&jsxs9(Fragment3,{children:[jsx16("meta",{name:"twitter:image",content:ogImagePath}),jsx16("meta",{property:"og:image",content:ogImagePath}),jsx16("meta",{property:"twitter:domain",content:cfg.baseUrl}),jsx16("meta",{property:"og:url",content:socialUrl}),jsx16("meta",{property:"twitter:url",content:socialUrl})]}),jsx16("link",{rel:"icon",href:iconPath}),jsx16("meta",{name:"description",content:description}),jsx16("meta",{name:"generator",content:"Quartz"}),css.map(resource=>CSSResourceToStyleElement(resource,!0)),js.filter(resource=>resource.loadTime==="beforeDOMReady").map(res=>JSResourceToScriptElement(res,!0))]})},"Head")},"default");import{jsx as jsx17}from"preact/jsx-runtime";var PageTitle=__name(({fileData,cfg,displayClass})=>{let title=cfg?.pageTitle??i18n(cfg.locale).propertyDefaults.title,baseDir=pathToRoot(fileData.slug);return jsx17("h2",{class:classNames(displayClass,"page-title"),children:jsx17("a",{href:baseDir,children:title})})},"PageTitle");PageTitle.css=`
|
||
.page-title {
|
||
font-size: 1.75rem;
|
||
margin: 0;
|
||
}
|
||
`;var PageTitle_default=__name(()=>PageTitle,"default");import readingTime from"reading-time";var contentMeta_default=`.content-meta {
|
||
margin-top: 0;
|
||
color: var(--gray);
|
||
}
|
||
.content-meta[show-comma=true] > *:not(:last-child) {
|
||
margin-right: 8px;
|
||
}
|
||
.content-meta[show-comma=true] > *:not(:last-child)::after {
|
||
content: ",";
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiY29udGVudE1ldGEuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0VBQ0E7O0FBR0U7RUFDRTs7QUFFQTtFQUNFIiwic291cmNlc0NvbnRlbnQiOlsiLmNvbnRlbnQtbWV0YSB7XG4gIG1hcmdpbi10b3A6IDA7XG4gIGNvbG9yOiB2YXIoLS1ncmF5KTtcblxuICAmW3Nob3ctY29tbWE9XCJ0cnVlXCJdIHtcbiAgICA+ICo6bm90KDpsYXN0LWNoaWxkKSB7XG4gICAgICBtYXJnaW4tcmlnaHQ6IDhweDtcblxuICAgICAgJjo6YWZ0ZXIge1xuICAgICAgICBjb250ZW50OiBcIixcIjtcbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbiJdfQ== */`;import{jsx as jsx18}from"preact/jsx-runtime";var defaultOptions12={showReadingTime:!0,showComma:!0},ContentMeta_default=__name(opts=>{let options2={...defaultOptions12,...opts};function ContentMetadata({cfg,fileData,displayClass}){let text=fileData.text;if(text){let segments=[];if(fileData.dates&&segments.push(jsx18(Date2,{date:getDate(cfg,fileData),locale:cfg.locale})),options2.showReadingTime){let{minutes,words:_words}=readingTime(text),displayedTime=i18n(cfg.locale).components.contentMeta.readingTime({minutes:Math.ceil(minutes)});segments.push(jsx18("span",{children:displayedTime}))}return jsx18("p",{"show-comma":options2.showComma,class:classNames(displayClass,"content-meta"),children:segments})}else return null}return __name(ContentMetadata,"ContentMetadata"),ContentMetadata.css=contentMeta_default,ContentMetadata},"default");import{jsx as jsx19}from"preact/jsx-runtime";function Spacer({displayClass}){return jsx19("div",{class:classNames(displayClass,"spacer")})}__name(Spacer,"Spacer");var Spacer_default=__name(()=>Spacer,"default");var legacyToc_default=`details#toc summary {
|
||
cursor: pointer;
|
||
}
|
||
details#toc summary::marker {
|
||
color: var(--dark);
|
||
}
|
||
details#toc summary > * {
|
||
padding-left: 0.25rem;
|
||
display: inline-block;
|
||
margin: 0;
|
||
}
|
||
details#toc ul {
|
||
list-style: none;
|
||
margin: 0.5rem 1.25rem;
|
||
padding: 0;
|
||
}
|
||
details#toc .depth-1 {
|
||
padding-left: calc(1rem * 1);
|
||
}
|
||
details#toc .depth-2 {
|
||
padding-left: calc(1rem * 2);
|
||
}
|
||
details#toc .depth-3 {
|
||
padding-left: calc(1rem * 3);
|
||
}
|
||
details#toc .depth-4 {
|
||
padding-left: calc(1rem * 4);
|
||
}
|
||
details#toc .depth-5 {
|
||
padding-left: calc(1rem * 5);
|
||
}
|
||
details#toc .depth-6 {
|
||
padding-left: calc(1rem * 6);
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsibGVnYWN5VG9jLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0U7RUFDRTs7QUFFQTtFQUNFOztBQUdGO0VBQ0U7RUFDQTtFQUNBOztBQUlKO0VBQ0U7RUFDQTtFQUNBOztBQUlBO0VBQ0U7O0FBREY7RUFDRTs7QUFERjtFQUNFOztBQURGO0VBQ0U7O0FBREY7RUFDRTs7QUFERjtFQUNFIiwic291cmNlc0NvbnRlbnQiOlsiZGV0YWlscyN0b2Mge1xuICAmIHN1bW1hcnkge1xuICAgIGN1cnNvcjogcG9pbnRlcjtcblxuICAgICY6Om1hcmtlciB7XG4gICAgICBjb2xvcjogdmFyKC0tZGFyayk7XG4gICAgfVxuXG4gICAgJiA+ICoge1xuICAgICAgcGFkZGluZy1sZWZ0OiAwLjI1cmVtO1xuICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgICAgbWFyZ2luOiAwO1xuICAgIH1cbiAgfVxuXG4gICYgdWwge1xuICAgIGxpc3Qtc3R5bGU6IG5vbmU7XG4gICAgbWFyZ2luOiAwLjVyZW0gMS4yNXJlbTtcbiAgICBwYWRkaW5nOiAwO1xuICB9XG5cbiAgQGZvciAkaSBmcm9tIDEgdGhyb3VnaCA2IHtcbiAgICAmIC5kZXB0aC0jeyRpfSB7XG4gICAgICBwYWRkaW5nLWxlZnQ6IGNhbGMoMXJlbSAqICN7JGl9KTtcbiAgICB9XG4gIH1cbn1cbiJdfQ== */`;var toc_default=`/**
|
||
* Layout breakpoints
|
||
* $mobile: screen width below this value will use mobile styles
|
||
* $desktop: screen width above this value will use desktop styles
|
||
* Screen width between $mobile and $desktop width will use the tablet layout.
|
||
* assuming mobile < desktop
|
||
*/
|
||
.toc {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.toc.desktop-only {
|
||
max-height: 40%;
|
||
}
|
||
|
||
@media all and not ((max-width: 800px)) {
|
||
.toc {
|
||
display: flex;
|
||
}
|
||
}
|
||
button#toc {
|
||
background-color: transparent;
|
||
border: none;
|
||
text-align: left;
|
||
cursor: pointer;
|
||
padding: 0;
|
||
color: var(--dark);
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
button#toc h3 {
|
||
font-size: 1rem;
|
||
display: inline-block;
|
||
margin: 0;
|
||
}
|
||
button#toc .fold {
|
||
margin-left: 0.5rem;
|
||
transition: transform 0.3s ease;
|
||
opacity: 0.8;
|
||
}
|
||
button#toc.collapsed .fold {
|
||
transform: rotateZ(-90deg);
|
||
}
|
||
|
||
#toc-content {
|
||
list-style: none;
|
||
overflow: hidden;
|
||
overflow-y: auto;
|
||
max-height: 100%;
|
||
transition: max-height 0.35s ease, visibility 0s linear 0s;
|
||
position: relative;
|
||
visibility: visible;
|
||
}
|
||
#toc-content.collapsed {
|
||
max-height: 0;
|
||
transition: max-height 0.35s ease, visibility 0s linear 0.35s;
|
||
visibility: hidden;
|
||
}
|
||
#toc-content.collapsed > .overflow::after {
|
||
opacity: 0;
|
||
}
|
||
#toc-content ul {
|
||
list-style: none;
|
||
margin: 0.5rem 0;
|
||
padding: 0;
|
||
}
|
||
#toc-content ul > li > a {
|
||
color: var(--dark);
|
||
opacity: 0.35;
|
||
transition: 0.5s ease opacity, 0.3s ease color;
|
||
}
|
||
#toc-content ul > li > a.in-view {
|
||
opacity: 0.75;
|
||
}
|
||
#toc-content > ul.overflow {
|
||
max-height: none;
|
||
width: 100%;
|
||
}
|
||
#toc-content .depth-0 {
|
||
padding-left: calc(1rem * 0);
|
||
}
|
||
#toc-content .depth-1 {
|
||
padding-left: calc(1rem * 1);
|
||
}
|
||
#toc-content .depth-2 {
|
||
padding-left: calc(1rem * 2);
|
||
}
|
||
#toc-content .depth-3 {
|
||
padding-left: calc(1rem * 3);
|
||
}
|
||
#toc-content .depth-4 {
|
||
padding-left: calc(1rem * 4);
|
||
}
|
||
#toc-content .depth-5 {
|
||
padding-left: calc(1rem * 5);
|
||
}
|
||
#toc-content .depth-6 {
|
||
padding-left: calc(1rem * 6);
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiLi4vLi4vc3R5bGVzL3ZhcmlhYmxlcy5zY3NzIiwidG9jLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUNFQTtFQUNFO0VBQ0E7O0FBRUE7RUFDRTs7O0FBSUo7RUFDRTtJQUNFOzs7QUFJSjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDRTtFQUNBO0VBQ0E7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7O0FBR0Y7RUFDRTs7O0FBSUo7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBLFlBQ0U7RUFFRjtFQUNBOztBQUVBO0VBQ0U7RUFDQSxZQUNFO0VBRUY7O0FBR0Y7RUFDRTs7QUFHRjtFQUNFO0VBQ0E7RUFDQTs7QUFDQTtFQUNFO0VBQ0E7RUFDQSxZQUNFOztBQUVGO0VBQ0U7O0FBSU47RUFDRTtFQUNBOztBQUlBO0VBQ0U7O0FBREY7RUFDRTs7QUFERjtFQUNFOztBQURGO0VBQ0U7O0FBREY7RUFDRTs7QUFERjtFQUNFOztBQURGO0VBQ0UiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIExheW91dCBicmVha3BvaW50c1xuICogJG1vYmlsZTogc2NyZWVuIHdpZHRoIGJlbG93IHRoaXMgdmFsdWUgd2lsbCB1c2UgbW9iaWxlIHN0eWxlc1xuICogJGRlc2t0b3A6IHNjcmVlbiB3aWR0aCBhYm92ZSB0aGlzIHZhbHVlIHdpbGwgdXNlIGRlc2t0b3Agc3R5bGVzXG4gKiBTY3JlZW4gd2lkdGggYmV0d2VlbiAkbW9iaWxlIGFuZCAkZGVza3RvcCB3aWR0aCB3aWxsIHVzZSB0aGUgdGFibGV0IGxheW91dC5cbiAqIGFzc3VtaW5nIG1vYmlsZSA8IGRlc2t0b3BcbiAqL1xuJGJyZWFrcG9pbnRzOiAoXG4gIG1vYmlsZTogODAwcHgsXG4gIGRlc2t0b3A6IDEyMDBweCxcbik7XG5cbiRtb2JpbGU6IFwiKG1heC13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgbW9iaWxlKX0pXCI7XG4kdGFibGV0OiBcIihtaW4td2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIG1vYmlsZSl9KSBhbmQgKG1heC13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9KVwiO1xuJGRlc2t0b3A6IFwiKG1pbi13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9KVwiO1xuXG4kcGFnZVdpZHRoOiAje21hcC1nZXQoJGJyZWFrcG9pbnRzLCBtb2JpbGUpfTtcbiRzaWRlUGFuZWxXaWR0aDogMzIwcHg7IC8vMzgwcHg7XG4kdG9wU3BhY2luZzogNnJlbTtcbiRib2xkV2VpZ2h0OiA3MDA7XG4kc2VtaUJvbGRXZWlnaHQ6IDYwMDtcbiRub3JtYWxXZWlnaHQ6IDQwMDtcblxuJG1vYmlsZUdyaWQ6IChcbiAgdGVtcGxhdGVSb3dzOiBcImF1dG8gYXV0byBhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiYXV0b1wiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdFwiXFxcbiAgICAgIFwiZ3JpZC1oZWFkZXJcIlxcXG4gICAgICBcImdyaWQtY2VudGVyXCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtZm9vdGVyXCInLFxuKTtcbiR0YWJsZXRHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0byBhdXRvXCIsXG4gIHRlbXBsYXRlQ29sdW1uczogXCIjeyRzaWRlUGFuZWxXaWR0aH0gYXV0b1wiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWhlYWRlclwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1jZW50ZXJcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1mb290ZXJcIicsXG4pO1xuJGRlc2t0b3BHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiI3skc2lkZVBhbmVsV2lkdGh9IGF1dG8gI3skc2lkZVBhbmVsV2lkdGh9XCIsXG4gIHJvd0dhcDogXCI1cHhcIixcbiAgY29sdW1uR2FwOiBcIjVweFwiLFxuICB0ZW1wbGF0ZUFyZWFzOlxuICAgICdcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtaGVhZGVyIGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1jZW50ZXIgZ3JpZC1zaWRlYmFyLXJpZ2h0XCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWZvb3RlciBncmlkLXNpZGViYXItcmlnaHRcIicsXG4pO1xuIiwiQHVzZSBcIi4uLy4uL3N0eWxlcy92YXJpYWJsZXMuc2Nzc1wiIGFzICo7XG5cbi50b2Mge1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXG4gICYuZGVza3RvcC1vbmx5IHtcbiAgICBtYXgtaGVpZ2h0OiA0MCU7XG4gIH1cbn1cblxuQG1lZGlhIGFsbCBhbmQgbm90ICgkbW9iaWxlKSB7XG4gIC50b2Mge1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gIH1cbn1cblxuYnV0dG9uI3RvYyB7XG4gIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuICBib3JkZXI6IG5vbmU7XG4gIHRleHQtYWxpZ246IGxlZnQ7XG4gIGN1cnNvcjogcG9pbnRlcjtcbiAgcGFkZGluZzogMDtcbiAgY29sb3I6IHZhcigtLWRhcmspO1xuICBkaXNwbGF5OiBmbGV4O1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuXG4gICYgaDMge1xuICAgIGZvbnQtc2l6ZTogMXJlbTtcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gICAgbWFyZ2luOiAwO1xuICB9XG5cbiAgJiAuZm9sZCB7XG4gICAgbWFyZ2luLWxlZnQ6IDAuNXJlbTtcbiAgICB0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gMC4zcyBlYXNlO1xuICAgIG9wYWNpdHk6IDAuODtcbiAgfVxuXG4gICYuY29sbGFwc2VkIC5mb2xkIHtcbiAgICB0cmFuc2Zvcm06IHJvdGF0ZVooLTkwZGVnKTtcbiAgfVxufVxuXG4jdG9jLWNvbnRlbnQge1xuICBsaXN0LXN0eWxlOiBub25lO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBvdmVyZmxvdy15OiBhdXRvO1xuICBtYXgtaGVpZ2h0OiAxMDAlO1xuICB0cmFuc2l0aW9uOlxuICAgIG1heC1oZWlnaHQgMC4zNXMgZWFzZSxcbiAgICB2aXNpYmlsaXR5IDBzIGxpbmVhciAwcztcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICB2aXNpYmlsaXR5OiB2aXNpYmxlO1xuXG4gICYuY29sbGFwc2VkIHtcbiAgICBtYXgtaGVpZ2h0OiAwO1xuICAgIHRyYW5zaXRpb246XG4gICAgICBtYXgtaGVpZ2h0IDAuMzVzIGVhc2UsXG4gICAgICB2aXNpYmlsaXR5IDBzIGxpbmVhciAwLjM1cztcbiAgICB2aXNpYmlsaXR5OiBoaWRkZW47XG4gIH1cblxuICAmLmNvbGxhcHNlZCA+IC5vdmVyZmxvdzo6YWZ0ZXIge1xuICAgIG9wYWNpdHk6IDA7XG4gIH1cblxuICAmIHVsIHtcbiAgICBsaXN0LXN0eWxlOiBub25lO1xuICAgIG1hcmdpbjogMC41cmVtIDA7XG4gICAgcGFkZGluZzogMDtcbiAgICAmID4gbGkgPiBhIHtcbiAgICAgIGNvbG9yOiB2YXIoLS1kYXJrKTtcbiAgICAgIG9wYWNpdHk6IDAuMzU7XG4gICAgICB0cmFuc2l0aW9uOlxuICAgICAgICAwLjVzIGVhc2Ugb3BhY2l0eSxcbiAgICAgICAgMC4zcyBlYXNlIGNvbG9yO1xuICAgICAgJi5pbi12aWV3IHtcbiAgICAgICAgb3BhY2l0eTogMC43NTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbiAgPiB1bC5vdmVyZmxvdyB7XG4gICAgbWF4LWhlaWdodDogbm9uZTtcbiAgICB3aWR0aDogMTAwJTtcbiAgfVxuXG4gIEBmb3IgJGkgZnJvbSAwIHRocm91Z2ggNiB7XG4gICAgJiAuZGVwdGgtI3skaX0ge1xuICAgICAgcGFkZGluZy1sZWZ0OiBjYWxjKDFyZW0gKiAjeyRpfSk7XG4gICAgfVxuICB9XG59XG4iXX0= */`;var toc_inline_default='var o=new IntersectionObserver(e=>{for(let t of e){let s=t.target.id,n=document.querySelector(`a[data-for="${s}"]`),i=t.rootBounds?.height;i&&n&&(t.boundingClientRect.y<i?n.classList.add("in-view"):n.classList.remove("in-view"))}});function c(){this.classList.toggle("collapsed"),this.setAttribute("aria-expanded",this.getAttribute("aria-expanded")==="true"?"false":"true");let e=this.nextElementSibling;e&&e.classList.toggle("collapsed")}function d(){let e=document.getElementById("toc");if(e){let t=e.classList.contains("collapsed");if(!e.nextElementSibling)return;e.addEventListener("click",c),window.addCleanup(()=>e.removeEventListener("click",c))}}window.addEventListener("resize",d);document.addEventListener("nav",()=>{d(),o.disconnect(),document.querySelectorAll("h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]").forEach(t=>o.observe(t))});\n';import{jsx as jsx20,jsxs as jsxs10}from"preact/jsx-runtime";var defaultOptions13={layout:"modern"},TableOfContents2=__name(({fileData,displayClass,cfg})=>fileData.toc?jsxs10("div",{class:classNames(displayClass,"toc"),children:[jsxs10("button",{type:"button",id:"toc",class:fileData.collapseToc?"collapsed":"","aria-controls":"toc-content","aria-expanded":!fileData.collapseToc,children:[jsx20("h3",{children:i18n(cfg.locale).components.tableOfContents.title}),jsx20("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"fold",children:jsx20("polyline",{points:"6 9 12 15 18 9"})})]}),jsx20("div",{id:"toc-content",class:fileData.collapseToc?"collapsed":"",children:jsx20("ul",{class:"overflow",children:fileData.toc.map(tocEntry=>jsx20("li",{class:`depth-${tocEntry.depth}`,children:jsx20("a",{href:`#${tocEntry.slug}`,"data-for":tocEntry.slug,children:tocEntry.text})},tocEntry.slug))})})]}):null,"TableOfContents");TableOfContents2.css=toc_default;TableOfContents2.afterDOMLoaded=toc_inline_default;var LegacyTableOfContents=__name(({fileData,cfg})=>fileData.toc?jsxs10("details",{id:"toc",open:!fileData.collapseToc,children:[jsx20("summary",{children:jsx20("h3",{children:i18n(cfg.locale).components.tableOfContents.title})}),jsx20("ul",{children:fileData.toc.map(tocEntry=>jsx20("li",{class:`depth-${tocEntry.depth}`,children:jsx20("a",{href:`#${tocEntry.slug}`,"data-for":tocEntry.slug,children:tocEntry.text})},tocEntry.slug))})]}):null,"LegacyTableOfContents");LegacyTableOfContents.css=legacyToc_default;var TableOfContents_default=__name(opts=>(opts?.layout??defaultOptions13.layout)==="modern"?TableOfContents2:LegacyTableOfContents,"default");var explorer_default=`/**
|
||
* Layout breakpoints
|
||
* $mobile: screen width below this value will use mobile styles
|
||
* $desktop: screen width above this value will use desktop styles
|
||
* Screen width between $mobile and $desktop width will use the tablet layout.
|
||
* assuming mobile < desktop
|
||
*/
|
||
.explorer {
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow-y: hidden;
|
||
/*&:after {
|
||
pointer-events: none;
|
||
content: "";
|
||
width: 100%;
|
||
height: 50px;
|
||
position: absolute;
|
||
left: 0;
|
||
bottom: 0;
|
||
opacity: 1;
|
||
transition: opacity 0.3s ease;
|
||
background: linear-gradient(transparent 0px, var(--light));
|
||
}*/
|
||
}
|
||
@media all and not ((max-width: 800px)) {
|
||
.explorer.desktop-only {
|
||
display: flex;
|
||
}
|
||
}
|
||
|
||
button#explorer {
|
||
background-color: transparent;
|
||
border: none;
|
||
text-align: left;
|
||
cursor: pointer;
|
||
padding: 0;
|
||
color: var(--dark);
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
button#explorer h2 {
|
||
font-size: 1rem;
|
||
display: inline-block;
|
||
margin: 0;
|
||
}
|
||
button#explorer .fold {
|
||
margin-left: 0.5rem;
|
||
transition: transform 0.3s ease;
|
||
opacity: 0.8;
|
||
}
|
||
button#explorer.collapsed .fold {
|
||
transform: rotateZ(-90deg);
|
||
}
|
||
|
||
.folder-outer {
|
||
display: grid;
|
||
grid-template-rows: 0fr;
|
||
transition: grid-template-rows 0.3s ease-in-out;
|
||
}
|
||
|
||
.folder-outer.open {
|
||
grid-template-rows: 1fr;
|
||
}
|
||
|
||
.folder-outer > ul {
|
||
overflow: hidden;
|
||
}
|
||
|
||
#explorer-content {
|
||
list-style: none;
|
||
overflow: hidden;
|
||
overflow-y: auto;
|
||
max-height: 100%;
|
||
transition: max-height 0.35s ease, visibility 0s linear 0s;
|
||
margin-top: 0.5rem;
|
||
visibility: visible;
|
||
}
|
||
#explorer-content.collapsed {
|
||
max-height: 0;
|
||
transition: max-height 0.35s ease, visibility 0s linear 0.35s;
|
||
visibility: hidden;
|
||
}
|
||
#explorer-content ul {
|
||
list-style: none;
|
||
margin: 0.08rem 0;
|
||
padding: 0;
|
||
transition: max-height 0.35s ease, transform 0.35s ease, opacity 0.2s ease;
|
||
}
|
||
#explorer-content ul li > a {
|
||
color: var(--dark);
|
||
opacity: 0.75;
|
||
pointer-events: all;
|
||
}
|
||
#explorer-content > #explorer-ul {
|
||
max-height: none;
|
||
}
|
||
|
||
svg {
|
||
pointer-events: all;
|
||
}
|
||
svg > polyline {
|
||
pointer-events: none;
|
||
}
|
||
|
||
.folder-container {
|
||
flex-direction: row;
|
||
display: flex;
|
||
align-items: center;
|
||
user-select: none;
|
||
}
|
||
.folder-container div > a {
|
||
color: var(--secondary);
|
||
font-family: var(--headerFont);
|
||
font-size: 0.95rem;
|
||
font-weight: 600;
|
||
line-height: 1.5rem;
|
||
display: inline-block;
|
||
}
|
||
.folder-container div > a:hover {
|
||
color: var(--tertiary);
|
||
}
|
||
.folder-container div > button {
|
||
color: var(--dark);
|
||
background-color: transparent;
|
||
border: none;
|
||
text-align: left;
|
||
cursor: pointer;
|
||
padding-left: 0;
|
||
padding-right: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
font-family: var(--headerFont);
|
||
}
|
||
.folder-container div > button span {
|
||
font-size: 0.95rem;
|
||
display: inline-block;
|
||
color: var(--secondary);
|
||
font-weight: 600;
|
||
margin: 0;
|
||
line-height: 1.5rem;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.folder-icon {
|
||
margin-right: 5px;
|
||
color: var(--secondary);
|
||
cursor: pointer;
|
||
transition: transform 0.3s ease;
|
||
backface-visibility: visible;
|
||
}
|
||
|
||
li:has(> .folder-outer:not(.open)) > .folder-container > svg {
|
||
transform: rotate(-90deg);
|
||
}
|
||
|
||
.folder-icon:hover {
|
||
color: var(--tertiary);
|
||
}
|
||
|
||
.no-background::after {
|
||
background: none !important;
|
||
}
|
||
|
||
#explorer-end {
|
||
height: 4px;
|
||
margin: 0;
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiLi4vLi4vc3R5bGVzL3ZhcmlhYmxlcy5zY3NzIiwiZXhwbG9yZXIuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQ0VBO0VBQ0U7RUFDQTtFQUNBO0FBTUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUpFO0VBREY7SUFFSTs7OztBQWlCTjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDRTtFQUNBO0VBQ0E7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7O0FBR0Y7RUFDRTs7O0FBSUo7RUFDRTtFQUNBO0VBQ0E7OztBQUdGO0VBQ0U7OztBQUdGO0VBQ0U7OztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQSxZQUNFO0VBRUY7RUFDQTs7QUFFQTtFQUNFO0VBQ0EsWUFDRTtFQUVGOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0EsWUFDRTs7QUFHRjtFQUNFO0VBQ0E7RUFDQTs7QUFHSjtFQUNFOzs7QUFJSjtFQUNFOztBQUVBO0VBQ0U7OztBQUlKO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDRTtFQUNBO0VBQ0E7RUFDQSxhRHRHYTtFQ3VHYjtFQUNBOztBQUdGO0VBQ0U7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFO0VBQ0E7RUFDQTtFQUNBLGFEL0hXO0VDZ0lYO0VBQ0E7RUFDQTs7O0FBS047RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBOzs7QUFHRjtFQUNFOzs7QUFHRjtFQUNFOzs7QUFHRjtFQUNFOzs7QUFHRjtFQUVFO0VBRUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIExheW91dCBicmVha3BvaW50c1xuICogJG1vYmlsZTogc2NyZWVuIHdpZHRoIGJlbG93IHRoaXMgdmFsdWUgd2lsbCB1c2UgbW9iaWxlIHN0eWxlc1xuICogJGRlc2t0b3A6IHNjcmVlbiB3aWR0aCBhYm92ZSB0aGlzIHZhbHVlIHdpbGwgdXNlIGRlc2t0b3Agc3R5bGVzXG4gKiBTY3JlZW4gd2lkdGggYmV0d2VlbiAkbW9iaWxlIGFuZCAkZGVza3RvcCB3aWR0aCB3aWxsIHVzZSB0aGUgdGFibGV0IGxheW91dC5cbiAqIGFzc3VtaW5nIG1vYmlsZSA8IGRlc2t0b3BcbiAqL1xuJGJyZWFrcG9pbnRzOiAoXG4gIG1vYmlsZTogODAwcHgsXG4gIGRlc2t0b3A6IDEyMDBweCxcbik7XG5cbiRtb2JpbGU6IFwiKG1heC13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgbW9iaWxlKX0pXCI7XG4kdGFibGV0OiBcIihtaW4td2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIG1vYmlsZSl9KSBhbmQgKG1heC13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9KVwiO1xuJGRlc2t0b3A6IFwiKG1pbi13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9KVwiO1xuXG4kcGFnZVdpZHRoOiAje21hcC1nZXQoJGJyZWFrcG9pbnRzLCBtb2JpbGUpfTtcbiRzaWRlUGFuZWxXaWR0aDogMzIwcHg7IC8vMzgwcHg7XG4kdG9wU3BhY2luZzogNnJlbTtcbiRib2xkV2VpZ2h0OiA3MDA7XG4kc2VtaUJvbGRXZWlnaHQ6IDYwMDtcbiRub3JtYWxXZWlnaHQ6IDQwMDtcblxuJG1vYmlsZUdyaWQ6IChcbiAgdGVtcGxhdGVSb3dzOiBcImF1dG8gYXV0byBhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiYXV0b1wiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdFwiXFxcbiAgICAgIFwiZ3JpZC1oZWFkZXJcIlxcXG4gICAgICBcImdyaWQtY2VudGVyXCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtZm9vdGVyXCInLFxuKTtcbiR0YWJsZXRHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0byBhdXRvXCIsXG4gIHRlbXBsYXRlQ29sdW1uczogXCIjeyRzaWRlUGFuZWxXaWR0aH0gYXV0b1wiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWhlYWRlclwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1jZW50ZXJcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1mb290ZXJcIicsXG4pO1xuJGRlc2t0b3BHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiI3skc2lkZVBhbmVsV2lkdGh9IGF1dG8gI3skc2lkZVBhbmVsV2lkdGh9XCIsXG4gIHJvd0dhcDogXCI1cHhcIixcbiAgY29sdW1uR2FwOiBcIjVweFwiLFxuICB0ZW1wbGF0ZUFyZWFzOlxuICAgICdcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtaGVhZGVyIGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1jZW50ZXIgZ3JpZC1zaWRlYmFyLXJpZ2h0XCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWZvb3RlciBncmlkLXNpZGViYXItcmlnaHRcIicsXG4pO1xuIiwiQHVzZSBcIi4uLy4uL3N0eWxlcy92YXJpYWJsZXMuc2Nzc1wiIGFzICo7XG5cbi5leHBsb3JlciB7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gIG92ZXJmbG93LXk6IGhpZGRlbjtcbiAgJi5kZXNrdG9wLW9ubHkge1xuICAgIEBtZWRpYSBhbGwgYW5kIG5vdCAoJG1vYmlsZSkge1xuICAgICAgZGlzcGxheTogZmxleDtcbiAgICB9XG4gIH1cbiAgLyomOmFmdGVyIHtcbiAgICBwb2ludGVyLWV2ZW50czogbm9uZTtcbiAgICBjb250ZW50OiBcIlwiO1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIGhlaWdodDogNTBweDtcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgbGVmdDogMDtcbiAgICBib3R0b206IDA7XG4gICAgb3BhY2l0eTogMTtcbiAgICB0cmFuc2l0aW9uOiBvcGFjaXR5IDAuM3MgZWFzZTtcbiAgICBiYWNrZ3JvdW5kOiBsaW5lYXItZ3JhZGllbnQodHJhbnNwYXJlbnQgMHB4LCB2YXIoLS1saWdodCkpO1xuICB9Ki9cbn1cblxuYnV0dG9uI2V4cGxvcmVyIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG4gIGJvcmRlcjogbm9uZTtcbiAgdGV4dC1hbGlnbjogbGVmdDtcbiAgY3Vyc29yOiBwb2ludGVyO1xuICBwYWRkaW5nOiAwO1xuICBjb2xvcjogdmFyKC0tZGFyayk7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cbiAgJiBoMiB7XG4gICAgZm9udC1zaXplOiAxcmVtO1xuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICBtYXJnaW46IDA7XG4gIH1cblxuICAmIC5mb2xkIHtcbiAgICBtYXJnaW4tbGVmdDogMC41cmVtO1xuICAgIHRyYW5zaXRpb246IHRyYW5zZm9ybSAwLjNzIGVhc2U7XG4gICAgb3BhY2l0eTogMC44O1xuICB9XG5cbiAgJi5jb2xsYXBzZWQgLmZvbGQge1xuICAgIHRyYW5zZm9ybTogcm90YXRlWigtOTBkZWcpO1xuICB9XG59XG5cbi5mb2xkZXItb3V0ZXIge1xuICBkaXNwbGF5OiBncmlkO1xuICBncmlkLXRlbXBsYXRlLXJvd3M6IDBmcjtcbiAgdHJhbnNpdGlvbjogZ3JpZC10ZW1wbGF0ZS1yb3dzIDAuM3MgZWFzZS1pbi1vdXQ7XG59XG5cbi5mb2xkZXItb3V0ZXIub3BlbiB7XG4gIGdyaWQtdGVtcGxhdGUtcm93czogMWZyO1xufVxuXG4uZm9sZGVyLW91dGVyID4gdWwge1xuICBvdmVyZmxvdzogaGlkZGVuO1xufVxuXG4jZXhwbG9yZXItY29udGVudCB7XG4gIGxpc3Qtc3R5bGU6IG5vbmU7XG4gIG92ZXJmbG93OiBoaWRkZW47XG4gIG92ZXJmbG93LXk6IGF1dG87XG4gIG1heC1oZWlnaHQ6IDEwMCU7XG4gIHRyYW5zaXRpb246XG4gICAgbWF4LWhlaWdodCAwLjM1cyBlYXNlLFxuICAgIHZpc2liaWxpdHkgMHMgbGluZWFyIDBzO1xuICBtYXJnaW4tdG9wOiAwLjVyZW07XG4gIHZpc2liaWxpdHk6IHZpc2libGU7XG5cbiAgJi5jb2xsYXBzZWQge1xuICAgIG1heC1oZWlnaHQ6IDA7XG4gICAgdHJhbnNpdGlvbjpcbiAgICAgIG1heC1oZWlnaHQgMC4zNXMgZWFzZSxcbiAgICAgIHZpc2liaWxpdHkgMHMgbGluZWFyIDAuMzVzO1xuICAgIHZpc2liaWxpdHk6IGhpZGRlbjtcbiAgfVxuXG4gICYgdWwge1xuICAgIGxpc3Qtc3R5bGU6IG5vbmU7XG4gICAgbWFyZ2luOiAwLjA4cmVtIDA7XG4gICAgcGFkZGluZzogMDtcbiAgICB0cmFuc2l0aW9uOlxuICAgICAgbWF4LWhlaWdodCAwLjM1cyBlYXNlLFxuICAgICAgdHJhbnNmb3JtIDAuMzVzIGVhc2UsXG4gICAgICBvcGFjaXR5IDAuMnMgZWFzZTtcbiAgICAmIGxpID4gYSB7XG4gICAgICBjb2xvcjogdmFyKC0tZGFyayk7XG4gICAgICBvcGFjaXR5OiAwLjc1O1xuICAgICAgcG9pbnRlci1ldmVudHM6IGFsbDtcbiAgICB9XG4gIH1cbiAgPiAjZXhwbG9yZXItdWwge1xuICAgIG1heC1oZWlnaHQ6IG5vbmU7XG4gIH1cbn1cblxuc3ZnIHtcbiAgcG9pbnRlci1ldmVudHM6IGFsbDtcblxuICAmID4gcG9seWxpbmUge1xuICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICB9XG59XG5cbi5mb2xkZXItY29udGFpbmVyIHtcbiAgZmxleC1kaXJlY3Rpb246IHJvdztcbiAgZGlzcGxheTogZmxleDtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgdXNlci1zZWxlY3Q6IG5vbmU7XG5cbiAgJiBkaXYgPiBhIHtcbiAgICBjb2xvcjogdmFyKC0tc2Vjb25kYXJ5KTtcbiAgICBmb250LWZhbWlseTogdmFyKC0taGVhZGVyRm9udCk7XG4gICAgZm9udC1zaXplOiAwLjk1cmVtO1xuICAgIGZvbnQtd2VpZ2h0OiAkc2VtaUJvbGRXZWlnaHQ7XG4gICAgbGluZS1oZWlnaHQ6IDEuNXJlbTtcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gIH1cblxuICAmIGRpdiA+IGE6aG92ZXIge1xuICAgIGNvbG9yOiB2YXIoLS10ZXJ0aWFyeSk7XG4gIH1cblxuICAmIGRpdiA+IGJ1dHRvbiB7XG4gICAgY29sb3I6IHZhcigtLWRhcmspO1xuICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuICAgIGJvcmRlcjogbm9uZTtcbiAgICB0ZXh0LWFsaWduOiBsZWZ0O1xuICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICBwYWRkaW5nLWxlZnQ6IDA7XG4gICAgcGFkZGluZy1yaWdodDogMDtcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gICAgZm9udC1mYW1pbHk6IHZhcigtLWhlYWRlckZvbnQpO1xuXG4gICAgJiBzcGFuIHtcbiAgICAgIGZvbnQtc2l6ZTogMC45NXJlbTtcbiAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICAgIGNvbG9yOiB2YXIoLS1zZWNvbmRhcnkpO1xuICAgICAgZm9udC13ZWlnaHQ6ICRzZW1pQm9sZFdlaWdodDtcbiAgICAgIG1hcmdpbjogMDtcbiAgICAgIGxpbmUtaGVpZ2h0OiAxLjVyZW07XG4gICAgICBwb2ludGVyLWV2ZW50czogbm9uZTtcbiAgICB9XG4gIH1cbn1cblxuLmZvbGRlci1pY29uIHtcbiAgbWFyZ2luLXJpZ2h0OiA1cHg7XG4gIGNvbG9yOiB2YXIoLS1zZWNvbmRhcnkpO1xuICBjdXJzb3I6IHBvaW50ZXI7XG4gIHRyYW5zaXRpb246IHRyYW5zZm9ybSAwLjNzIGVhc2U7XG4gIGJhY2tmYWNlLXZpc2liaWxpdHk6IHZpc2libGU7XG59XG5cbmxpOmhhcyg+IC5mb2xkZXItb3V0ZXI6bm90KC5vcGVuKSkgPiAuZm9sZGVyLWNvbnRhaW5lciA+IHN2ZyB7XG4gIHRyYW5zZm9ybTogcm90YXRlKC05MGRlZyk7XG59XG5cbi5mb2xkZXItaWNvbjpob3ZlciB7XG4gIGNvbG9yOiB2YXIoLS10ZXJ0aWFyeSk7XG59XG5cbi5uby1iYWNrZ3JvdW5kOjphZnRlciB7XG4gIGJhY2tncm91bmQ6IG5vbmUgIWltcG9ydGFudDtcbn1cblxuI2V4cGxvcmVyLWVuZCB7XG4gIC8vIG5lZWRzIGhlaWdodCBzbyBJbnRlcnNlY3Rpb25PYnNlcnZlciBnZXRzIHRyaWdnZXJlZFxuICBoZWlnaHQ6IDRweDtcbiAgLy8gcmVtb3ZlIGRlZmF1bHQgbWFyZ2luIGZyb20gbGlcbiAgbWFyZ2luOiAwO1xufVxuIl19 */`;var explorer_inline_default='var s,p=new IntersectionObserver(e=>{let t=document.getElementById("explorer-ul");if(t)for(let o of e)o.isIntersecting?t.classList.add("no-background"):t.classList.remove("no-background")});function m(){this.classList.toggle("collapsed"),this.setAttribute("aria-expanded",this.getAttribute("aria-expanded")==="true"?"false":"true");let e=this.nextElementSibling;e&&e.classList.toggle("collapsed")}function i(e){e.stopPropagation();let t=e.target;if(!t)return;let o=t.nodeName==="svg",l=o?t.parentElement?.nextSibling:t.parentElement?.parentElement?.nextElementSibling,a=o?t.nextElementSibling:t.parentElement;if(!(l&&a))return;l.classList.toggle("open");let d=l.classList.contains("open");f(l,!d);let n=a.dataset.folderpath;u(s,n);let r=JSON.stringify(s);localStorage.setItem("fileTree",r)}function g(){let e=document.getElementById("explorer");if(!e)return;if(e.dataset.behavior==="collapse")for(let n of document.getElementsByClassName("folder-button"))n.addEventListener("click",i),window.addCleanup(()=>n.removeEventListener("click",i));e.addEventListener("click",m),window.addCleanup(()=>e.removeEventListener("click",m));for(let n of document.getElementsByClassName("folder-icon"))n.addEventListener("click",i),window.addCleanup(()=>n.removeEventListener("click",i));let t=localStorage.getItem("fileTree"),o=e?.dataset.savestate==="true",l=t&&o?JSON.parse(t):[],a=new Map(l.map(n=>[n.path,n.collapsed])),d=e.dataset.tree?JSON.parse(e.dataset.tree):[];s=[];for(let{path:n,collapsed:r}of d)s.push({path:n,collapsed:a.get(n)??r});s.map(n=>{let c=document.querySelector(`[data-folderpath=\'${n.path}\']`)?.parentElement?.nextElementSibling;c&&f(c,n.collapsed)})}window.addEventListener("resize",g);document.addEventListener("nav",()=>{g(),p.disconnect();let e=document.getElementById("explorer-end");e&&p.observe(e)});function f(e,t){return t?e.classList.remove("open"):e.classList.add("open")}function u(e,t){let o=e.find(l=>l.path===t);o&&(o.collapsed=!o.collapsed)}\n';import{Fragment as Fragment4,jsx as jsx21,jsxs as jsxs11}from"preact/jsx-runtime";function getPathSegment(fp,idx){if(fp)return fp.split("/").at(idx)}__name(getPathSegment,"getPathSegment");var FileNode=class _FileNode{static{__name(this,"FileNode")}children;name;displayName;file;depth;constructor(slugSegment,displayName,file,depth){this.children=[],this.name=slugSegment,this.displayName=displayName??file?.frontmatter?.title??slugSegment,this.file=file?clone(file):null,this.depth=depth??0}insert(fileData){if(fileData.path.length===0)return;let nextSegment=fileData.path[0];if(fileData.path.length===1){if(nextSegment===""){let title=fileData.file.frontmatter?.title;title&&title!=="index"&&(this.displayName=title)}else this.children.push(new _FileNode(nextSegment,void 0,fileData.file,this.depth+1));return}fileData.path=fileData.path.splice(1);let child=this.children.find(c=>c.name===nextSegment);if(child){child.insert(fileData);return}let newChild=new _FileNode(nextSegment,getPathSegment(fileData.file.relativePath,this.depth),void 0,this.depth+1);newChild.insert(fileData),this.children.push(newChild)}add(file){this.insert({file,path:simplifySlug(file.slug).split("/")})}filter(filterFn){this.children=this.children.filter(filterFn),this.children.forEach(child=>child.filter(filterFn))}map(mapFn){mapFn(this),this.children.forEach(child=>child.map(mapFn))}getFolderPaths(collapsed){let folderPaths=[],traverse=__name((node,currentPath)=>{if(!node.file){let folderPath=joinSegments(currentPath,node.name);folderPath!==""&&folderPaths.push({path:folderPath,collapsed}),node.children.forEach(child=>traverse(child,folderPath))}},"traverse");return traverse(this,""),folderPaths}sort(sortFn){this.children=this.children.sort(sortFn),this.children.forEach(e=>e.sort(sortFn))}};function ExplorerNode({node,opts,fullPath,fileData}){let folderBehavior=opts.folderClickBehavior,isDefaultOpen=opts.folderDefaultState==="open",folderPath=node.name!==""?joinSegments(fullPath??"",node.name):"",href=resolveRelative(fileData.slug,folderPath)+"/";return jsx21(Fragment4,{children:node.file?jsx21("li",{children:jsx21("a",{href:resolveRelative(fileData.slug,node.file.slug),"data-for":node.file.slug,children:node.displayName})},node.file.slug):jsxs11("li",{children:[node.name!==""&&jsxs11("div",{class:"folder-container",children:[jsx21("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"5 8 14 8",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"folder-icon",children:jsx21("polyline",{points:"6 9 12 15 18 9"})}),jsx21("div",{"data-folderpath":folderPath,children:folderBehavior==="link"?jsx21("a",{href,"data-for":node.name,class:"folder-title",children:node.displayName}):jsx21("button",{class:"folder-button",children:jsx21("span",{class:"folder-title",children:node.displayName})})},node.name)]}),jsx21("div",{class:`folder-outer ${node.depth===0||isDefaultOpen?"open":""}`,children:jsx21("ul",{style:{paddingLeft:node.name!==""?"1.4rem":"0"},class:"content","data-folderul":folderPath,children:node.children.map((childNode,i)=>jsx21(ExplorerNode,{node:childNode,opts,fullPath:folderPath,fileData},i))})})]})})}__name(ExplorerNode,"ExplorerNode");import{jsx as jsx22,jsxs as jsxs12}from"preact/jsx-runtime";var defaultOptions14={folderClickBehavior:"collapse",folderDefaultState:"collapsed",useSavedState:!0,mapFn:__name(node=>node,"mapFn"),sortFn:__name((a,b)=>!a.file&&!b.file||a.file&&b.file?a.displayName.localeCompare(b.displayName,void 0,{numeric:!0,sensitivity:"base"}):a.file&&!b.file?1:-1,"sortFn"),filterFn:__name(node=>node.name!=="tags","filterFn"),order:["filter","map","sort"]},Explorer_default=__name(userOpts=>{let opts={...defaultOptions14,...userOpts},fileTree,jsonTree,lastBuildId="";function constructFileTree(allFiles){if(fileTree=new FileNode(""),allFiles.forEach(file=>fileTree.add(file)),opts.order)for(let i=0;i<opts.order.length;i++){let functionName=opts.order[i];functionName==="map"?fileTree.map(opts.mapFn):functionName==="sort"?fileTree.sort(opts.sortFn):functionName==="filter"&&fileTree.filter(opts.filterFn)}let folders=fileTree.getFolderPaths(opts.folderDefaultState==="collapsed");jsonTree=JSON.stringify(folders)}__name(constructFileTree,"constructFileTree");let Explorer=__name(({ctx,cfg,allFiles,displayClass,fileData})=>(ctx.buildId!==lastBuildId&&(lastBuildId=ctx.buildId,constructFileTree(allFiles)),jsxs12("div",{class:classNames(displayClass,"explorer"),children:[jsxs12("button",{type:"button",id:"explorer","data-behavior":opts.folderClickBehavior,"data-collapsed":opts.folderDefaultState,"data-savestate":opts.useSavedState,"data-tree":jsonTree,"aria-controls":"explorer-content","aria-expanded":opts.folderDefaultState==="open",children:[jsx22("h2",{children:opts.title??i18n(cfg.locale).components.explorer.title}),jsx22("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"5 8 14 8",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"fold",children:jsx22("polyline",{points:"6 9 12 15 18 9"})})]}),jsx22("div",{id:"explorer-content",children:jsxs12("ul",{class:"overflow",id:"explorer-ul",children:[jsx22(ExplorerNode,{node:fileTree,opts,fileData}),jsx22("li",{id:"explorer-end"})]})})]})),"Explorer");return Explorer.css=explorer_default,Explorer.afterDOMLoaded=explorer_inline_default,Explorer},"default");import{jsx as jsx23}from"preact/jsx-runtime";var TagList=__name(({fileData,displayClass})=>{let tags=fileData.frontmatter?.tags,baseDir=pathToRoot(fileData.slug);return tags&&tags.length>0?jsx23("ul",{class:classNames(displayClass,"tags"),children:tags.map(tag=>{let linkDest=baseDir+`/tags/${slugTag(tag)}`;return jsx23("li",{children:jsx23("a",{href:linkDest,class:"internal tag-link",children:tag})})})}):null},"TagList");TagList.css=`
|
||
.tags {
|
||
list-style: none;
|
||
display: flex;
|
||
padding-left: 0;
|
||
gap: 0.4rem;
|
||
margin: 1rem 0;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.section-li > .section > .tags {
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.tags > li {
|
||
display: inline-block;
|
||
white-space: nowrap;
|
||
margin: 0;
|
||
overflow-wrap: normal;
|
||
}
|
||
|
||
a.internal.tag-link {
|
||
border-radius: 8px;
|
||
background-color: var(--highlight);
|
||
padding: 0.2rem 0.4rem;
|
||
margin: 0 0.1rem;
|
||
}
|
||
`;var TagList_default=__name(()=>TagList,"default");var graph_inline_default='var M1=Object.create;var Ju=Object.defineProperty;var F1=Object.getOwnPropertyDescriptor;var R1=Object.getOwnPropertyNames;var k1=Object.getPrototypeOf,G1=Object.prototype.hasOwnProperty;var p=(r,t)=>()=>(r&&(t=r(r=0)),t);var Ao=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),sd=(r,t)=>{for(var e in t)Ju(r,e,{get:t[e],enumerable:!0})},I1=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of R1(t))!G1.call(r,s)&&s!==e&&Ju(r,s,{get:()=>t[s],enumerable:!(i=F1(t,s))||i.enumerable});return r};var ds=(r,t,e)=>(e=r!=null?M1(k1(r)):{},I1(t||!r||!r.__esModule?Ju(e,"default",{value:r,enumerable:!0}):e,r));var b,Al,ea,H,D=p(()=>{"use strict";b=(r=>(r.Application="application",r.WebGLPipes="webgl-pipes",r.WebGLPipesAdaptor="webgl-pipes-adaptor",r.WebGLSystem="webgl-system",r.WebGPUPipes="webgpu-pipes",r.WebGPUPipesAdaptor="webgpu-pipes-adaptor",r.WebGPUSystem="webgpu-system",r.CanvasSystem="canvas-system",r.CanvasPipesAdaptor="canvas-pipes-adaptor",r.CanvasPipes="canvas-pipes",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r.MaskEffect="mask-effect",r.BlendMode="blend-mode",r.TextureSource="texture-source",r.Environment="environment",r.ShapeBuilder="shape-builder",r.Batcher="batcher",r))(b||{}),Al=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r}}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},ea=(r,t)=>Al(r).priority??t,H={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Al).forEach(t=>{t.type.forEach(e=>this._removeHandlers[e]?.(t))}),this},add(...r){return r.map(Al).forEach(t=>{t.type.forEach(e=>{let i=this._addHandlers,s=this._queue;i[e]?i[e]?.(t):(s[e]=s[e]||[],s[e]?.push(t))})}),this},handle(r,t,e){let i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=t,s[r]=e;let n=this._queue;return n[r]&&(n[r]?.forEach(o=>t(o)),delete n[r]),this},handleByMap(r,t){return this.handle(r,e=>{e.name&&(t[e.name]=e.ref)},e=>{e.name&&delete t[e.name]})},handleByNamedList(r,t,e=-1){return this.handle(r,i=>{t.findIndex(n=>n.name===i.name)>=0||(t.push({name:i.name,value:i.ref}),t.sort((n,o)=>ea(o.value,e)-ea(n.value,e)))},i=>{let s=t.findIndex(n=>n.name===i.name);s!==-1&&t.splice(s,1)})},handleByList(r,t,e=-1){return this.handle(r,i=>{t.includes(i.ref)||(t.push(i.ref),t.sort((s,n)=>ea(n,e)-ea(s,e)))},i=>{let s=t.indexOf(i.ref);s!==-1&&t.splice(s,1)})}}});var xm=Ao((vG,Dl)=>{"use strict";var sC=Object.prototype.hasOwnProperty,Zt="~";function Rs(){}Object.create&&(Rs.prototype=Object.create(null),new Rs().__proto__||(Zt=!1));function nC(r,t,e){this.fn=r,this.context=t,this.once=e||!1}function gm(r,t,e,i,s){if(typeof e!="function")throw new TypeError("The listener must be a function");var n=new nC(e,i||r,s),o=Zt?Zt+t:t;return r._events[o]?r._events[o].fn?r._events[o]=[r._events[o],n]:r._events[o].push(n):(r._events[o]=n,r._eventsCount++),r}function ra(r,t){--r._eventsCount===0?r._events=new Rs:delete r._events[t]}function Vt(){this._events=new Rs,this._eventsCount=0}Vt.prototype.eventNames=function(){var t=[],e,i;if(this._eventsCount===0)return t;for(i in e=this._events)sC.call(e,i)&&t.push(Zt?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};Vt.prototype.listeners=function(t){var e=Zt?Zt+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,n=i.length,o=new Array(n);s<n;s++)o[s]=i[s].fn;return o};Vt.prototype.listenerCount=function(t){var e=Zt?Zt+t:t,i=this._events[e];return i?i.fn?1:i.length:0};Vt.prototype.emit=function(t,e,i,s,n,o){var a=Zt?Zt+t:t;if(!this._events[a])return!1;var u=this._events[a],l=arguments.length,c,h;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),l){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,i),!0;case 4:return u.fn.call(u.context,e,i,s),!0;case 5:return u.fn.call(u.context,e,i,s,n),!0;case 6:return u.fn.call(u.context,e,i,s,n,o),!0}for(h=1,c=new Array(l-1);h<l;h++)c[h-1]=arguments[h];u.fn.apply(u.context,c)}else{var d=u.length,f;for(h=0;h<d;h++)switch(u[h].once&&this.removeListener(t,u[h].fn,void 0,!0),l){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,e);break;case 3:u[h].fn.call(u[h].context,e,i);break;case 4:u[h].fn.call(u[h].context,e,i,s);break;default:if(!c)for(f=1,c=new Array(l-1);f<l;f++)c[f-1]=arguments[f];u[h].fn.apply(u[h].context,c)}}return!0};Vt.prototype.on=function(t,e,i){return gm(this,t,e,i,!1)};Vt.prototype.once=function(t,e,i){return gm(this,t,e,i,!0)};Vt.prototype.removeListener=function(t,e,i,s){var n=Zt?Zt+t:t;if(!this._events[n])return this;if(!e)return ra(this,n),this;var o=this._events[n];if(o.fn)o.fn===e&&(!s||o.once)&&(!i||o.context===i)&&ra(this,n);else{for(var a=0,u=[],l=o.length;a<l;a++)(o[a].fn!==e||s&&!o[a].once||i&&o[a].context!==i)&&u.push(o[a]);u.length?this._events[n]=u.length===1?u[0]:u:ra(this,n)}return this};Vt.prototype.removeAllListeners=function(t){var e;return t?(e=Zt?Zt+t:t,this._events[e]&&ra(this,e)):(this._events=new Rs,this._eventsCount=0),this};Vt.prototype.off=Vt.prototype.removeListener;Vt.prototype.addListener=Vt.prototype.on;Vt.prefixed=Zt;Vt.EventEmitter=Vt;typeof Dl<"u"&&(Dl.exports=Vt)});var _m,ht,Xt=p(()=>{_m=ds(xm(),1),ht=_m.default});var oC,er,Gt,ge,Cm,ym,Pl,aC,ia,Am,Dm,bm,vm,Tm,ks,uC,lC,cC,hC,Fl,Sm,fC,Bl,Ml,wm,Rl,Ae,Em,Pm,Bm=p(()=>{oC={grad:.9,turn:360,rad:360/(2*Math.PI)},er=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},Gt=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*r)/e+0},ge=function(r,t,e){return t===void 0&&(t=0),e===void 0&&(e=1),r>e?e:r>t?r:t},Cm=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},ym=function(r){return{r:ge(r.r,0,255),g:ge(r.g,0,255),b:ge(r.b,0,255),a:ge(r.a)}},Pl=function(r){return{r:Gt(r.r),g:Gt(r.g),b:Gt(r.b),a:Gt(r.a,3)}},aC=/^#([0-9a-f]{3,8})$/i,ia=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},Am=function(r){var t=r.r,e=r.g,i=r.b,s=r.a,n=Math.max(t,e,i),o=n-Math.min(t,e,i),a=o?n===t?(e-i)/o:n===e?2+(i-t)/o:4+(t-e)/o:0;return{h:60*(a<0?a+6:a),s:n?o/n*100:0,v:n/255*100,a:s}},Dm=function(r){var t=r.h,e=r.s,i=r.v,s=r.a;t=t/360*6,e/=100,i/=100;var n=Math.floor(t),o=i*(1-e),a=i*(1-(t-n)*e),u=i*(1-(1-t+n)*e),l=n%6;return{r:255*[i,a,o,o,u,i][l],g:255*[u,i,i,a,o,o][l],b:255*[o,o,u,i,i,a][l],a:s}},bm=function(r){return{h:Cm(r.h),s:ge(r.s,0,100),l:ge(r.l,0,100),a:ge(r.a)}},vm=function(r){return{h:Gt(r.h),s:Gt(r.s),l:Gt(r.l),a:Gt(r.a,3)}},Tm=function(r){return Dm((e=(t=r).s,{h:t.h,s:(e*=((i=t.l)<50?i:100-i)/100)>0?2*e/(i+e)*100:0,v:i+e,a:t.a}));var t,e,i},ks=function(r){return{h:(t=Am(r)).h,s:(s=(200-(e=t.s))*(i=t.v)/100)>0&&s<200?e*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,e,i,s},uC=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,lC=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s+([+-]?\\d*\\.?\\d+)%\\s+([+-]?\\d*\\.?\\d+)%\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,cC=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,hC=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,Fl={string:[[function(r){var t=aC.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?Gt(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?Gt(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=cC.exec(r)||hC.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:ym({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(r){var t=uC.exec(r)||lC.exec(r);if(!t)return null;var e,i,s=bm({h:(e=t[1],i=t[2],i===void 0&&(i="deg"),Number(e)*(oC[i]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Tm(s)},"hsl"]],object:[[function(r){var t=r.r,e=r.g,i=r.b,s=r.a,n=s===void 0?1:s;return er(t)&&er(e)&&er(i)?ym({r:Number(t),g:Number(e),b:Number(i),a:Number(n)}):null},"rgb"],[function(r){var t=r.h,e=r.s,i=r.l,s=r.a,n=s===void 0?1:s;if(!er(t)||!er(e)||!er(i))return null;var o=bm({h:Number(t),s:Number(e),l:Number(i),a:Number(n)});return Tm(o)},"hsl"],[function(r){var t=r.h,e=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!er(t)||!er(e)||!er(i))return null;var o=function(a){return{h:Cm(a.h),s:ge(a.s,0,100),v:ge(a.v,0,100),a:ge(a.a)}}({h:Number(t),s:Number(e),v:Number(i),a:Number(n)});return Dm(o)},"hsv"]]},Sm=function(r,t){for(var e=0;e<t.length;e++){var i=t[e][0](r);if(i)return[i,t[e][1]]}return[null,void 0]},fC=function(r){return typeof r=="string"?Sm(r.trim(),Fl.string):typeof r=="object"&&r!==null?Sm(r,Fl.object):[null,void 0]},Bl=function(r,t){var e=ks(r);return{h:e.h,s:ge(e.s+100*t,0,100),l:e.l,a:e.a}},Ml=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},wm=function(r,t){var e=ks(r);return{h:e.h,s:e.s,l:ge(e.l+100*t,0,100),a:e.a}},Rl=function(){function r(t){this.parsed=fC(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return this.parsed!==null},r.prototype.brightness=function(){return Gt(Ml(this.rgba),2)},r.prototype.isDark=function(){return Ml(this.rgba)<.5},r.prototype.isLight=function(){return Ml(this.rgba)>=.5},r.prototype.toHex=function(){return t=Pl(this.rgba),e=t.r,i=t.g,s=t.b,o=(n=t.a)<1?ia(Gt(255*n)):"","#"+ia(e)+ia(i)+ia(s)+o;var t,e,i,s,n,o},r.prototype.toRgb=function(){return Pl(this.rgba)},r.prototype.toRgbString=function(){return t=Pl(this.rgba),e=t.r,i=t.g,s=t.b,(n=t.a)<1?"rgba("+e+", "+i+", "+s+", "+n+")":"rgb("+e+", "+i+", "+s+")";var t,e,i,s,n},r.prototype.toHsl=function(){return vm(ks(this.rgba))},r.prototype.toHslString=function(){return t=vm(ks(this.rgba)),e=t.h,i=t.s,s=t.l,(n=t.a)<1?"hsla("+e+", "+i+"%, "+s+"%, "+n+")":"hsl("+e+", "+i+"%, "+s+"%)";var t,e,i,s,n},r.prototype.toHsv=function(){return t=Am(this.rgba),{h:Gt(t.h),s:Gt(t.s),v:Gt(t.v),a:Gt(t.a,3)};var t},r.prototype.invert=function(){return Ae({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},r.prototype.saturate=function(t){return t===void 0&&(t=.1),Ae(Bl(this.rgba,t))},r.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ae(Bl(this.rgba,-t))},r.prototype.grayscale=function(){return Ae(Bl(this.rgba,-1))},r.prototype.lighten=function(t){return t===void 0&&(t=.1),Ae(wm(this.rgba,t))},r.prototype.darken=function(t){return t===void 0&&(t=.1),Ae(wm(this.rgba,-t))},r.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},r.prototype.alpha=function(t){return typeof t=="number"?Ae({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):Gt(this.rgba.a,3);var e},r.prototype.hue=function(t){var e=ks(this.rgba);return typeof t=="number"?Ae({h:t,s:e.s,l:e.l,a:e.a}):Gt(e.h)},r.prototype.isEqual=function(t){return this.toHex()===Ae(t).toHex()},r}(),Ae=function(r){return r instanceof Rl?r:new Rl(r)},Em=[],Pm=function(r){r.forEach(function(t){Em.indexOf(t)<0&&(t(Rl,Fl),Em.push(t))})}});function Mm(r,t){var e={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var s in e)i[e[s]]=s;var n={};r.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,u,l=i[this.toHex()];if(l)return l;if(o?.closest){var c=this.toRgb(),h=1/0,d="black";if(!n.length)for(var f in e)n[f]=new r(e[f]).toRgb();for(var m in e){var g=(a=c,u=n[m],Math.pow(a.r-u.r,2)+Math.pow(a.g-u.g,2)+Math.pow(a.b-u.b,2));g<h&&(h=g,d=m)}return d}},t.string.push([function(o){var a=o.toLowerCase(),u=a==="transparent"?"#0000":e[a];return u?new r(u).toRgb():null},"name"])}var Fm=p(()=>{});var _i,Z,$t=p(()=>{Bm();Fm();Pm([Mm]);_i=class Gs{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(t){if(t instanceof Gs)this._value=this._cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,t))&&(this._value=this._cloneSource(t),this._normalize(this._value))}}get value(){return this._value}_cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}_isSourceEqual(t,e){let i=typeof t;if(i!==typeof e)return!1;if(i==="number"||i==="string"||t instanceof Number)return t===e;if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length!==e.length?!1:t.every((n,o)=>n===e[o]);if(t!==null&&e!==null){let n=Object.keys(t),o=Object.keys(e);return n.length!==o.length?!1:n.every(a=>t[a]===e[a])}return t===e}toRgba(){let[t,e,i,s]=this._components;return{r:t,g:e,b:i,a:s}}toRgb(){let[t,e,i]=this._components;return{r:t,g:e,b:i}}toRgbaString(){let[t,e,i]=this.toUint8RgbArray();return`rgba(${t},${e},${i},${this.alpha})`}toUint8RgbArray(t){let[e,i,s]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(e*255),t[1]=Math.round(i*255),t[2]=Math.round(s*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);let[e,i,s,n]=this._components;return t[0]=e,t[1]=i,t[2]=s,t[3]=n,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);let[e,i,s]=this._components;return t[0]=e,t[1]=i,t[2]=s,t}toNumber(){return this._int}toBgrNumber(){let[t,e,i]=this.toUint8RgbArray();return(i<<16)+(e<<8)+t}toLittleEndianNumber(){let t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){let[e,i,s,n]=Gs._temp.setValue(t)._components;return this._components[0]*=e,this._components[1]*=i,this._components[2]*=s,this._components[3]*=n,this._refreshInt(),this._value=null,this}premultiply(t,e=!0){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,e=!0){if(t===1)return(255<<24)+this._int;if(t===0)return e?0:this._int;let i=this._int>>16&255,s=this._int>>8&255,n=this._int&255;return e&&(i=i*t+.5|0,s=s*t+.5|0,n=n*t+.5|0),(t*255<<24)+(i<<16)+(s<<8)+n}toHex(){let t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){let e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(t){return this._components[3]=this._clamp(t),this}_normalize(t){let e,i,s,n;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){let o=t;e=(o>>16&255)/255,i=(o>>8&255)/255,s=(o&255)/255,n=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[e,i,s,n=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[e,i,s,n=255]=t,e/=255,i/=255,s/=255,n/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){let a=Gs.HEX_PATTERN.exec(t);a&&(t=`#${a[2]}`)}let o=Ae(t);o.isValid()&&({r:e,g:i,b:s,a:n}=o.rgba,e/=255,i/=255,s/=255)}if(e!==void 0)this._components[0]=e,this._components[1]=i,this._components[2]=s,this._components[3]=n,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);let[t,e,i]=this._components;this._int=(t*255<<16)+(e*255<<8)+(i*255|0)}_clamp(t,e=0,i=1){return typeof t=="number"?Math.min(Math.max(t,e),i):(t.forEach((s,n)=>{t[n]=Math.min(Math.max(s,e),i)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof Gs||Array.isArray(t)||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t.r!==void 0&&t.g!==void 0&&t.b!==void 0||t.r!==void 0&&t.g!==void 0&&t.b!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0&&t.a!==void 0}};_i.shared=new _i;_i._temp=new _i;_i.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;Z=_i});var Rm,km=p(()=>{"use strict";Rm={cullArea:null,cullable:!1,cullableChildren:!0}});var Gm,Im,Um,kl=p(()=>{"use strict";Gm=Math.PI*2,Im=180/Math.PI,Um=Math.PI/180});var et,Gl,xe=p(()=>{"use strict";et=class r{constructor(t=0,e=0){this.x=0,this.y=0,this.x=t,this.y=e}clone(){return new r(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,e=t){return this.x=t,this.y=e,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return Gl.x=0,Gl.y=0,Gl}},Gl=new et});var G,dC,pC,ot=p(()=>{kl();xe();G=class r{constructor(t=1,e=0,i=0,s=1,n=0,o=0){this.array=null,this.a=t,this.b=e,this.c=i,this.d=s,this.tx=n,this.ty=o}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,e,i,s,n,o){return this.a=t,this.b=e,this.c=i,this.d=s,this.tx=n,this.ty=o,this}toArray(t,e){this.array||(this.array=new Float32Array(9));let i=e||this.array;return t?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(t,e){e=e||new et;let i=t.x,s=t.y;return e.x=this.a*i+this.c*s+this.tx,e.y=this.b*i+this.d*s+this.ty,e}applyInverse(t,e){e=e||new et;let i=this.a,s=this.b,n=this.c,o=this.d,a=this.tx,u=this.ty,l=1/(i*o+n*-s),c=t.x,h=t.y;return e.x=o*l*c+-n*l*h+(u*n-a*o)*l,e.y=i*l*h+-s*l*c+(-u*i+a*s)*l,e}translate(t,e){return this.tx+=t,this.ty+=e,this}scale(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this}rotate(t){let e=Math.cos(t),i=Math.sin(t),s=this.a,n=this.c,o=this.tx;return this.a=s*e-this.b*i,this.b=s*i+this.b*e,this.c=n*e-this.d*i,this.d=n*i+this.d*e,this.tx=o*e-this.ty*i,this.ty=o*i+this.ty*e,this}append(t){let e=this.a,i=this.b,s=this.c,n=this.d;return this.a=t.a*e+t.b*s,this.b=t.a*i+t.b*n,this.c=t.c*e+t.d*s,this.d=t.c*i+t.d*n,this.tx=t.tx*e+t.ty*s+this.tx,this.ty=t.tx*i+t.ty*n+this.ty,this}appendFrom(t,e){let i=t.a,s=t.b,n=t.c,o=t.d,a=t.tx,u=t.ty,l=e.a,c=e.b,h=e.c,d=e.d;return this.a=i*l+s*h,this.b=i*c+s*d,this.c=n*l+o*h,this.d=n*c+o*d,this.tx=a*l+u*h+e.tx,this.ty=a*c+u*d+e.ty,this}setTransform(t,e,i,s,n,o,a,u,l){return this.a=Math.cos(a+l)*n,this.b=Math.sin(a+l)*n,this.c=-Math.sin(a-u)*o,this.d=Math.cos(a-u)*o,this.tx=t-(i*this.a+s*this.c),this.ty=e-(i*this.b+s*this.d),this}prepend(t){let e=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){let i=this.a,s=this.c;this.a=i*t.a+this.b*t.c,this.b=i*t.b+this.b*t.d,this.c=s*t.a+this.d*t.c,this.d=s*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this}decompose(t){let e=this.a,i=this.b,s=this.c,n=this.d,o=t.pivot,a=-Math.atan2(-s,n),u=Math.atan2(i,e),l=Math.abs(a+u);return l<1e-5||Math.abs(Gm-l)<1e-5?(t.rotation=u,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=u),t.scale.x=Math.sqrt(e*e+i*i),t.scale.y=Math.sqrt(s*s+n*n),t.position.x=this.tx+(o.x*e+o.y*s),t.position.y=this.ty+(o.x*i+o.y*n),t}invert(){let t=this.a,e=this.b,i=this.c,s=this.d,n=this.tx,o=t*s-e*i;return this.a=s/o,this.b=-e/o,this.c=-i/o,this.d=t/o,this.tx=(i*this.ty-s*n)/o,this.ty=-(t*this.ty-e*n)/o,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){let t=new r;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return pC.identity()}static get shared(){return dC.identity()}},dC=new G,pC=new G});var zt,sa=p(()=>{"use strict";zt=class r{constructor(t,e,i){this._x=e||0,this._y=i||0,this._observer=t}clone(t){return new r(t??this._observer,this._x,this._y)}set(t=0,e=t){return(this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this._observer._onUpdate(this)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=0 y=0 scope=${this._observer}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this))}}});function rt(r="default"){return Il[r]===void 0&&(Il[r]=-1),++Il[r]}var Il,jt=p(()=>{"use strict";Il={default:-1}});function X(r,t,e=3){if(Om[t])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}\nDeprecated since v${r}`):(i=i.split(`\n`).splice(e).join(`\n`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t}\nDeprecated since v${r}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t}\nDeprecated since v${r}`),console.warn(i))),Om[t]=!0}var Om,Y,Lm,vt=p(()=>{"use strict";Om={},Y="8.0.0",Lm="8.3.4"});var Wr,Ul=p(()=>{"use strict";Wr=class{constructor(t,e){this._pool=[],this._count=0,this._index=0,this._classType=t,e&&this.prepopulate(e)}prepopulate(t){for(let e=0;e<t;e++)this._pool[this._index++]=new this._classType;this._count+=t}get(t){let e;return this._index>0?e=this._pool[--this._index]:e=new this._classType,e.init?.(t),e}return(t){t.reset?.(),this._pool[this._index++]=t}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){this._pool.length=0,this._index=0}}});var Ol,K,Qt=p(()=>{Ul();Ol=class{constructor(){this._poolsByClass=new Map}prepopulate(t,e){this.getPool(t).prepopulate(e)}get(t,e){return this.getPool(t).get(e)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new Wr(t)),this._poolsByClass.get(t)}stats(){let t={};return this._poolsByClass.forEach(e=>{let i=t[e._classType.name]?e._classType.name+e._classType.ID:e._classType.name;t[i]={free:e.totalFree,used:e.totalUsed,size:e.totalSize}}),t}},K=new Ol});var Nm,Hm=p(()=>{vt();Nm={get isCachedAsTexture(){return!!this.renderGroup?.isCachedAsTexture},cacheAsTexture(r){typeof r=="boolean"&&r===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(r===!0?{}:r))},updateCacheTexture(){this.renderGroup?.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(r){X("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(r)}}});function na(r,t,e){let i=r.length,s;if(t>=i||e===0)return;e=t+e>i?i-t:e;let n=i-e;for(s=t;s<n;++s)r[s]=r[s+e];r.length=n}var Ll=p(()=>{"use strict"});var zm,Wm=p(()=>{Ll();vt();zm={allowChildren:!0,removeChildren(r=0,t){let e=t??this.children.length,i=e-r,s=[];if(i>0&&i<=e){for(let o=e-1;o>=r;o--){let a=this.children[o];a&&(s.push(a),a.parent=null)}na(this.children,r,e);let n=this.renderGroup||this.parentRenderGroup;n&&n.removeChildren(s);for(let o=0;o<s.length;++o)this.emit("childRemoved",s[o],this,o),s[o].emit("removed",this);return s}else if(i===0&&this.children.length===0)return s;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(r){let t=this.getChildAt(r);return this.removeChild(t)},getChildAt(r){if(r<0||r>=this.children.length)throw new Error(`getChildAt: Index (${r}) does not exist.`);return this.children[r]},setChildIndex(r,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(r),this.addChildAt(r,t)},getChildIndex(r){let t=this.children.indexOf(r);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(r,t){this.allowChildren||X(Y,"addChildAt: Only Containers will be allowed to add children in v8.0.0");let{children:e}=this;if(t<0||t>e.length)throw new Error(`${r}addChildAt: The index ${t} supplied is out of bounds ${e.length}`);if(r.parent){let s=r.parent.children.indexOf(r);if(r.parent===this&&s===t)return r;s!==-1&&r.parent.children.splice(s,1)}t===e.length?e.push(r):e.splice(t,0,r),r.parent=this,r.didChange=!0,r._updateFlags=15;let i=this.renderGroup||this.parentRenderGroup;return i&&i.addChild(r),this.sortableChildren&&(this.sortDirty=!0),this.emit("childAdded",r,this,t),r.emit("added",this),r},swapChildren(r,t){if(r===t)return;let e=this.getChildIndex(r),i=this.getChildIndex(t);this.children[e]=t,this.children[i]=r;let s=this.renderGroup||this.parentRenderGroup;s&&(s.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){this.parent?.removeChild(this)},reparentChild(...r){return r.length===1?this.reparentChildAt(r[0],this.children.length):(r.forEach(t=>this.reparentChildAt(t,this.children.length)),r[0])},reparentChildAt(r,t){if(r.parent===this)return this.setChildIndex(r,t),r;let e=r.worldTransform.clone();r.removeFromParent(),this.addChildAt(r,t);let i=this.worldTransform.clone();return i.invert(),e.prepend(i),r.setFromMatrix(e),r}}});var rr,oa=p(()=>{"use strict";rr=class{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null}}});var Nl,aa,Vm=p(()=>{D();Qt();Nl=class{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t})}))}add(t){this._tests.push(t)}getMaskEffect(t){this._initialized||this.init();for(let e=0;e<this._tests.length;e++){let i=this._tests[e];if(i.test(t))return K.get(i.maskClass,t)}return t}returnMaskEffect(t){K.return(t)}},aa=new Nl;H.handleByList(b.MaskEffect,aa._effectClasses)});var Xm,$m=p(()=>{oa();Vm();Xm={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){let r=this.renderGroup||this.parentRenderGroup;r&&(r.structureDidChange=!0)},addEffect(r){this.effects.indexOf(r)===-1&&(this.effects.push(r),this.effects.sort((e,i)=>e.priority-i.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(r){let t=this.effects.indexOf(r);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(r){let t=this._maskEffect;t?.mask!==r&&(t&&(this.removeEffect(t),aa.returnMaskEffect(t),this._maskEffect=null),r!=null&&(this._maskEffect=aa.getMaskEffect(r),this.addEffect(this._maskEffect)))},setMask(r){this._maskOptions={...this._maskOptions,...r},r.mask&&(this.mask=r.mask),this._markStructureAsChanged()},get mask(){return this._maskEffect?.mask},set filters(r){!Array.isArray(r)&&r&&(r=[r]);let t=this._filterEffect||(this._filterEffect=new rr);r=r;let e=r?.length>0,i=t.filters?.length>0,s=e!==i;r=Array.isArray(r)?r.slice(0):r,t.filters=Object.freeze(r),s&&(e?this.addEffect(t):(this.removeEffect(t),t.filters=r??null))},get filters(){return this._filterEffect?.filters},set filterArea(r){this._filterEffect||(this._filterEffect=new rr),this._filterEffect.filterArea=r},get filterArea(){return this._filterEffect?.filterArea}}});var jm,Ym=p(()=>{vt();jm={label:null,get name(){return X(Y,"Container.name property has been removed, use Container.label instead"),this.label},set name(r){X(Y,"Container.name property has been removed, use Container.label instead"),this.label=r},getChildByName(r,t=!1){return this.getChildByLabel(r,t)},getChildByLabel(r,t=!1){let e=this.children;for(let i=0;i<e.length;i++){let s=e[i];if(s.label===r||r instanceof RegExp&&r.test(s.label))return s}if(t)for(let i=0;i<e.length;i++){let n=e[i].getChildByLabel(r,!0);if(n)return n}return null},getChildrenByLabel(r,t=!1,e=[]){let i=this.children;for(let s=0;s<i.length;s++){let n=i[s];(n.label===r||r instanceof RegExp&&r.test(n.label))&&e.push(n)}if(t)for(let s=0;s<i.length;s++)i[s].getChildrenByLabel(r,!0,e);return e}}});var ua,tt,Yt=p(()=>{xe();ua=[new et,new et,new et,new et],tt=class r{constructor(t=0,e=0,i=0,s=0){this.type="rectangle",this.x=Number(t),this.y=Number(e),this.width=Number(i),this.height=Number(s)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new r(0,0,0,0)}clone(){return new r(this.x,this.y,this.width,this.height)}copyFromBounds(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,e){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height}strokeContains(t,e,i,s=.5){let{width:n,height:o}=this;if(n<=0||o<=0)return!1;let a=this.x,u=this.y,l=i*(1-s),c=i-l,h=a-l,d=a+n+l,f=u-l,m=u+o+l,g=a+c,x=a+n-c,_=u+c,v=u+o-c;return t>=h&&t<=d&&e>=f&&e<=m&&!(t>g&&t<x&&e>_&&e<v)}intersects(t,e){if(!e){let P=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=P)return!1;let M=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>M}let i=this.left,s=this.right,n=this.top,o=this.bottom;if(s<=i||o<=n)return!1;let a=ua[0].set(t.left,t.top),u=ua[1].set(t.left,t.bottom),l=ua[2].set(t.right,t.top),c=ua[3].set(t.right,t.bottom);if(l.x<=a.x||u.y<=a.y)return!1;let h=Math.sign(e.a*e.d-e.b*e.c);if(h===0||(e.apply(a,a),e.apply(u,u),e.apply(l,l),e.apply(c,c),Math.max(a.x,u.x,l.x,c.x)<=i||Math.min(a.x,u.x,l.x,c.x)>=s||Math.max(a.y,u.y,l.y,c.y)<=n||Math.min(a.y,u.y,l.y,c.y)>=o))return!1;let d=h*(u.y-a.y),f=h*(a.x-u.x),m=d*i+f*n,g=d*s+f*n,x=d*i+f*o,_=d*s+f*o;if(Math.max(m,g,x,_)<=d*a.x+f*a.y||Math.min(m,g,x,_)>=d*c.x+f*c.y)return!1;let v=h*(a.y-l.y),T=h*(l.x-a.x),y=v*i+T*n,C=v*s+T*n,S=v*i+T*o,E=v*s+T*o;return!(Math.max(y,C,S,E)<=v*a.x+T*a.y||Math.min(y,C,S,E)>=v*c.x+T*c.y)}pad(t=0,e=t){return this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2,this}fit(t){let e=Math.max(this.x,t.x),i=Math.min(this.x+this.width,t.x+t.width),s=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(i-e,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(t=1,e=.001){let i=Math.ceil((this.x+this.width-e)*t)/t,s=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=i-this.x,this.height=s-this.y,this}enlarge(t){let e=Math.min(this.x,t.x),i=Math.max(this.x+this.width,t.x+t.width),s=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=i-e,this.y=s,this.height=n-s,this}getBounds(t){return t||(t=new r),t.copyFrom(this),t}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}});var Km,ft,ce=p(()=>{ot();Yt();Km=new G,ft=class r{constructor(t=1/0,e=1/0,i=-1/0,s=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=Km,this.minX=t,this.minY=e,this.maxX=i,this.maxY=s}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new tt);let t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=Km,this}set(t,e,i,s){this.minX=t,this.minY=e,this.maxX=i,this.maxY=s}addFrame(t,e,i,s,n){n||(n=this.matrix);let o=n.a,a=n.b,u=n.c,l=n.d,c=n.tx,h=n.ty,d=this.minX,f=this.minY,m=this.maxX,g=this.maxY,x=o*t+u*e+c,_=a*t+l*e+h;x<d&&(d=x),_<f&&(f=_),x>m&&(m=x),_>g&&(g=_),x=o*i+u*e+c,_=a*i+l*e+h,x<d&&(d=x),_<f&&(f=_),x>m&&(m=x),_>g&&(g=_),x=o*t+u*s+c,_=a*t+l*s+h,x<d&&(d=x),_<f&&(f=_),x>m&&(m=x),_>g&&(g=_),x=o*i+u*s+c,_=a*i+l*s+h,x<d&&(d=x),_<f&&(f=_),x>m&&(m=x),_>g&&(g=_),this.minX=d,this.minY=f,this.maxX=m,this.maxY=g}addRect(t,e){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,e)}addBounds(t,e){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,e)}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY}applyMatrix(t){let e=this.minX,i=this.minY,s=this.maxX,n=this.maxY,{a:o,b:a,c:u,d:l,tx:c,ty:h}=t,d=o*e+u*i+c,f=a*e+l*i+h;this.minX=d,this.minY=f,this.maxX=d,this.maxY=f,d=o*s+u*i+c,f=a*s+l*i+h,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY,d=o*e+u*n+c,f=a*e+l*n+h,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY,d=o*s+u*n+c,f=a*s+l*n+h,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY}fit(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,e,i,s){return this.minX<t&&(this.minX=t),this.maxX>e&&(this.maxX=e),this.minY<i&&(this.minY=i),this.maxY>s&&(this.maxY=s),this}pad(t,e=t){return this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new r(this.minX,this.minY,this.maxX,this.maxY)}scale(t,e=t){return this.minX*=t,this.minY*=e,this.maxX*=t,this.maxY*=e,this}get x(){return this.minX}set x(t){let e=this.maxX-this.minX;this.minX=t,this.maxX=t+e}get y(){return this.minY}set y(t){let e=this.maxY-this.minY;this.minY=t,this.maxY=t+e}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(t,e,i,s){let n=this.minX,o=this.minY,a=this.maxX,u=this.maxY;s||(s=this.matrix);let l=s.a,c=s.b,h=s.c,d=s.d,f=s.tx,m=s.ty;for(let g=e;g<i;g+=2){let x=t[g],_=t[g+1],v=l*x+h*_+f,T=c*x+d*_+m;n=v<n?v:n,o=T<o?T:o,a=v>a?v:a,u=T>u?T:u}this.minX=n,this.minY=o,this.maxX=a,this.maxY=u}containsPoint(t,e){return this.minX<=t&&this.minY<=e&&this.maxX>=t&&this.maxY>=e}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}}});var Dt,he,Vr=p(()=>{ot();Ul();ce();Dt=new Wr(G),he=new Wr(ft)});function yi(r,t,e){e.clear();let i,s;return r.parent?t?i=r.parent.worldTransform:(s=Dt.get().identity(),i=la(r,s)):i=G.IDENTITY,qm(r,e,i,t),s&&Dt.return(s),e.isValid||e.set(0,0,0,0),e}function qm(r,t,e,i){if(!r.visible||!r.measurable)return;let s;i?s=r.worldTransform:(r.updateLocalTransform(),s=Dt.get(),s.appendFrom(r.localTransform,e));let n=t,o=!!r.effects.length;if(o&&(t=he.get().clear()),r.boundsArea)t.addRect(r.boundsArea,s);else{r.bounds&&(t.matrix=s,t.addBounds(r.bounds));for(let a=0;a<r.children.length;a++)qm(r.children[a],t,s,i)}if(o){for(let a=0;a<r.effects.length;a++)r.effects[a].addBounds?.(t);n.addBounds(t,G.IDENTITY),he.return(t)}i||Dt.return(s)}function la(r,t){let e=r.parent;return e&&(la(e,t),e.updateLocalTransform(),t.append(e.localTransform)),t}var Is=p(()=>{ot();Vr()});function ca(r,t){if(r===16777215||!t)return t;if(t===16777215||!r)return r;let e=r>>16&255,i=r>>8&255,s=r&255,n=t>>16&255,o=t>>8&255,a=t&255,u=e*n/255|0,l=i*o/255|0,c=s*a/255|0;return(u<<16)+(l<<8)+c}var Hl=p(()=>{"use strict"});function bi(r,t){return r===Zm?t:t===Zm?r:ca(r,t)}var Zm,zl=p(()=>{Hl();Zm=16777215});function Us(r){return((r&255)<<16)+(r&65280)+(r>>16&255)}var Qm,Jm=p(()=>{Is();Vr();zl();Qm={getGlobalAlpha(r){if(r)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,e=this.parent;for(;e;)t*=e.alpha,e=e.parent;return t},getGlobalTransform(r,t){if(t)return r.copyFrom(this.worldTransform);this.updateLocalTransform();let e=la(this,Dt.get().identity());return r.appendFrom(this.localTransform,e),Dt.return(e),r},getGlobalTint(r){if(r)return this.renderGroup?Us(this.renderGroup.worldColor):this.parentRenderGroup?Us(bi(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,e=this.parent;for(;e;)t=bi(t,e.localColor),e=e.parent;return Us(t)}}});function z(...r){Wl!==tg&&(Wl++,Wl===tg?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...r))}var Wl,tg,gt=p(()=>{"use strict";Wl=0,tg=500});function vi(r,t,e){return t.clear(),e||(e=G.IDENTITY),eg(r,t,e,r,!0),t.isValid||t.set(0,0,0,0),t}function eg(r,t,e,i,s){let n;if(s)n=Dt.get(),n=e.copyTo(n);else{if(!r.visible||!r.measurable)return;r.updateLocalTransform();let u=r.localTransform;n=Dt.get(),n.appendFrom(u,e)}let o=t,a=!!r.effects.length;if(a&&(t=he.get().clear()),r.boundsArea)t.addRect(r.boundsArea,n);else{r.renderPipeId&&(t.matrix=n,t.addBounds(r.bounds));let u=r.children;for(let l=0;l<u.length;l++)eg(u[l],t,n,i,!1)}if(a){for(let u=0;u<r.effects.length;u++)r.effects[u].addLocalBounds?.(t,i);o.addBounds(t,G.IDENTITY),he.return(t)}Dt.return(n)}var ha=p(()=>{ot();Vr()});function Vl(r,t){let e=r.children;for(let i=0;i<e.length;i++){let s=e[i],n=s.uid,o=(s._didViewChangeTick&65535)<<16|s._didContainerChangeTick&65535,a=t.index;(t.data[a]!==n||t.data[a+1]!==o)&&(t.data[t.index]=n,t.data[t.index+1]=o,t.didChange=!0),t.index=a+2,s.children.length&&Vl(s,t)}return t.didChange}var rg=p(()=>{"use strict"});var mC,ig,sg=p(()=>{ot();ce();Is();ha();rg();mC=new G,ig={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(r,t){let e=Math.sign(this.scale.x)||1;t!==0?this.scale.x=r/t*e:this.scale.x=e},_setHeight(r,t){let e=Math.sign(this.scale.y)||1;t!==0?this.scale.y=r/t*e:this.scale.y=e},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new ft});let r=this._localBoundsCacheData;return r.index=1,r.didChange=!1,r.data[0]!==this._didViewChangeTick&&(r.didChange=!0,r.data[0]=this._didViewChangeTick),Vl(this,r),r.didChange&&vi(this,r.localBounds,mC),r.localBounds},getBounds(r,t){return yi(this,r,t||new ft)}}});var ng,og=p(()=>{"use strict";ng={_onRender:null,set onRender(r){let t=this.renderGroup||this.parentRenderGroup;if(!r){this._onRender&&t?.removeOnRender(this),this._onRender=null;return}this._onRender||t?.addOnRender(this),this._onRender=r},get onRender(){return this._onRender}}});function gC(r,t){return r._zIndex-t._zIndex}var ag,ug=p(()=>{"use strict";ag={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(r){this._zIndex!==r&&(this._zIndex=r,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(gC))}}});var lg,cg=p(()=>{xe();Vr();lg={getGlobalPosition(r=new et,t=!1){return this.parent?this.parent.toGlobal(this._position,r,t):(r.x=this._position.x,r.y=this._position.y),r},toGlobal(r,t,e=!1){let i=this.getGlobalTransform(Dt.get(),e);return t=i.apply(r,t),Dt.return(i),t},toLocal(r,t,e,i){t&&(r=t.toGlobal(r,e,i));let s=this.getGlobalTransform(Dt.get(),i);return e=s.applyInverse(r,e),Dt.return(s),e}}});var Ti,Xl=p(()=>{jt();Ti=class{constructor(){this.uid=rt("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}add(t){this.instructions[this.instructionSize++]=t}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}});function ir(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function $l(r){return!(r&r-1)&&!!r}var Os=p(()=>{"use strict"});function hg(r){let t={};for(let e in r)r[e]!==void 0&&(t[e]=r[e]);return t}var fg=p(()=>{"use strict"});function xC(r){let t=dg[r];return t===void 0&&(dg[r]=rt("resource")),t}var dg,pg,fa,jl=p(()=>{Xt();jt();vt();dg=Object.create(null);pg=class mg extends ht{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...mg.defaultOptions,...t},this.addressMode=t.addressMode,this.addressModeU=t.addressModeU??this.addressModeU,this.addressModeV=t.addressModeV??this.addressModeV,this.addressModeW=t.addressModeW??this.addressModeW,this.scaleMode=t.scaleMode,this.magFilter=t.magFilter??this.magFilter,this.minFilter=t.minFilter??this.minFilter,this.mipmapFilter=t.mipmapFilter??this.mipmapFilter,this.lodMinClamp=t.lodMinClamp,this.lodMaxClamp=t.lodMaxClamp,this.compare=t.compare,this.maxAnisotropy=t.maxAnisotropy??1}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t}get addressMode(){return this.addressModeU}set wrapMode(t){X(Y,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this.emit("change",this),this._sharedResourceId=null}_generateResourceId(){let t=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=xC(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};pg.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};fa=pg});var gg,ut,ne=p(()=>{Xt();Os();fg();jt();jl();gg=class xg extends ht{constructor(t={}){super(),this.options=t,this.uid=rt("textureSource"),this._resourceType="textureSource",this._resourceId=rt("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,t={...xg.defaultOptions,...t},this.label=t.label??"",this.resource=t.resource,this.autoGarbageCollect=t.autoGarbageCollect,this._resolution=t.resolution,t.width?this.pixelWidth=t.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,t.height?this.pixelHeight=t.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=t.format,this.dimension=t.dimensions,this.mipLevelCount=t.mipLevelCount,this.autoGenerateMipmaps=t.autoGenerateMipmaps,this.sampleCount=t.sampleCount,this.antialias=t.antialias,this.alphaMode=t.alphaMode,this.style=new fa(hg(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){this.style!==t&&(this._style?.off("change",this._onStyleChange,this),this._style=t,this._style?.on("change",this._onStyleChange,this),this._onStyleChange())}get addressMode(){return this._style.addressMode}set addressMode(t){this._style.addressMode=t}get repeatMode(){return this._style.addressMode}set repeatMode(t){this._style.addressMode=t}get magFilter(){return this._style.magFilter}set magFilter(t){this._style.magFilter=t}get minFilter(){return this._style.minFilter}set minFilter(t){this._style.minFilter=t}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(t){this._style.mipmapFilter=t}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(t){this._style.lodMinClamp=t}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(t){this._style.lodMaxClamp=t}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){let t=this._resolution;if(this.resize(this.resourceWidth/t,this.resourceHeight/t))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){this._resourceId=rt("resource"),this.emit("change",this),this.emit("unload",this)}get resourceWidth(){let{resource:t}=this;return t.naturalWidth||t.videoWidth||t.displayWidth||t.width}get resourceHeight(){let{resource:t}=this;return t.naturalHeight||t.videoHeight||t.displayHeight||t.height}get resolution(){return this._resolution}set resolution(t){this._resolution!==t&&(this._resolution=t,this.width=this.pixelWidth/t,this.height=this.pixelHeight/t)}resize(t,e,i){i||(i=this._resolution),t||(t=this.width),e||(e=this.height);let s=Math.round(t*i),n=Math.round(e*i);return this.width=s/i,this.height=n/i,this._resolution=i,this.pixelWidth===s&&this.pixelHeight===n?!1:(this._refreshPOT(),this.pixelWidth=s,this.pixelHeight=n,this.emit("resize",this),this._resourceId=rt("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(t){this._style.wrapMode=t}get wrapMode(){return this._style.wrapMode}set scaleMode(t){this._style.scaleMode=t}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=$l(this.pixelWidth)&&$l(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};gg.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};ut=gg});function _C(){for(let r=0;r<16;r++){let t=[];Yl.push(t);for(let e=0;e<16;e++){let i=da(Xr[r]*Xr[e]+jr[r]*$r[e]),s=da($r[r]*Xr[e]+Yr[r]*$r[e]),n=da(Xr[r]*jr[e]+jr[r]*Yr[e]),o=da($r[r]*jr[e]+Yr[r]*Yr[e]);for(let a=0;a<16;a++)if(Xr[a]===i&&$r[a]===s&&jr[a]===n&&Yr[a]===o){t.push(a);break}}}for(let r=0;r<16;r++){let t=new G;t.set(Xr[r],$r[r],jr[r],Yr[r],0,0),_g.push(t)}}var Xr,$r,jr,Yr,Yl,_g,da,mt,yg=p(()=>{ot();Xr=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],$r=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],jr=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Yr=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Yl=[],_g=[],da=Math.sign;_C();mt={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:r=>Xr[r],uY:r=>$r[r],vX:r=>jr[r],vY:r=>Yr[r],inv:r=>r&8?r&15:-r&7,add:(r,t)=>Yl[r][t],sub:(r,t)=>Yl[r][mt.inv(t)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,t)=>Math.abs(r)*2<=Math.abs(t)?t>=0?mt.S:mt.N:Math.abs(t)*2<=Math.abs(r)?r>0?mt.E:mt.W:t>0?r>0?mt.SE:mt.SW:r>0?mt.NE:mt.NW,matrixAppendRotationInv:(r,t,e=0,i=0)=>{let s=_g[mt.inv(t)];s.tx=e,s.ty=i,r.append(s)}}});var Kl,bg=p(()=>{"use strict";Kl=()=>{}});var Kr,ql=p(()=>{D();ne();Kr=class extends ut{constructor(t){let e=t.resource||new Float32Array(t.width*t.height*4),i=t.format;i||(e instanceof Float32Array?i="rgba32float":e instanceof Int32Array||e instanceof Uint32Array?i="rgba32uint":e instanceof Int16Array||e instanceof Uint16Array?i="rgba16uint":(e instanceof Int8Array,i="bgra8unorm")),super({...t,resource:e,format:i}),this.uploadMethodId="buffer"}static test(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}};Kr.extension=b.TextureSource});var vg,Si,Zl=p(()=>{ot();vg=new G,Si=class{constructor(t,e){this.mapCoord=new G,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof e>"u"?this.clampMargin=t.width<10?0:.5:this.clampMargin=e,this.isSimple=!1,this.texture=t}get texture(){return this._texture}set texture(t){this.texture!==t&&(this._texture?.removeListener("update",this.update,this),this._texture=t,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(t,e){e===void 0&&(e=t);let i=this.mapCoord;for(let s=0;s<t.length;s+=2){let n=t[s],o=t[s+1];e[s]=n*i.a+o*i.c+i.tx,e[s+1]=n*i.b+o*i.d+i.ty}return e}update(){let t=this._texture;this._updateID++;let e=t.uvs;this.mapCoord.set(e.x1-e.x0,e.y1-e.y0,e.x3-e.x0,e.y3-e.y0,e.x0,e.y0);let i=t.orig,s=t.trim;s&&(vg.set(i.width/s.width,0,0,i.height/s.height,-s.x/s.width,-s.y/s.height),this.mapCoord.append(vg));let n=t.source,o=this.uClampFrame,a=this.clampMargin/n._resolution,u=this.clampOffset/n._resolution;return o[0]=(t.frame.x+a+u)/n.width,o[1]=(t.frame.y+a+u)/n.height,o[2]=(t.frame.x+t.frame.width-a+u)/n.width,o[3]=(t.frame.y+t.frame.height-a+u)/n.height,this.uClampOffset[0]=this.clampOffset/n.pixelWidth,this.uClampOffset[1]=this.clampOffset/n.pixelHeight,this.isSimple=t.frame.width===n.width&&t.frame.height===n.height&&t.rotate===0,!0}}});var I,dt=p(()=>{Xt();yg();Yt();jt();vt();bg();ql();ne();Zl();I=class extends ht{constructor({source:t,label:e,frame:i,orig:s,trim:n,defaultAnchor:o,defaultBorders:a,rotate:u,dynamic:l}={}){if(super(),this.uid=rt("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new tt,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=e,this.source=t?.source??new ut,this.noFrame=!i,i)this.frame.copyFrom(i);else{let{width:c,height:h}=this._source;this.frame.width=c,this.frame.height=h}this.orig=s||this.frame,this.trim=n,this.rotate=u??0,this.defaultAnchor=o,this.defaultBorders=a,this.destroyed=!1,this.dynamic=l||!1,this.updateUvs()}set source(t){this._source&&this._source.off("resize",this.update,this),this._source=t,t.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new Si(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){let{uvs:t,frame:e}=this,{width:i,height:s}=this._source,n=e.x/i,o=e.y/s,a=e.width/i,u=e.height/s,l=this.rotate;if(l){let c=a/2,h=u/2,d=n+c,f=o+h;l=mt.add(l,mt.NW),t.x0=d+c*mt.uX(l),t.y0=f+h*mt.uY(l),l=mt.add(l,2),t.x1=d+c*mt.uX(l),t.y1=f+h*mt.uY(l),l=mt.add(l,2),t.x2=d+c*mt.uX(l),t.y2=f+h*mt.uY(l),l=mt.add(l,2),t.x3=d+c*mt.uX(l),t.y3=f+h*mt.uY(l)}else t.x0=n,t.y0=o,t.x1=n+a,t.y1=o,t.x2=n+a,t.y2=o+u,t.x3=n,t.y3=o+u}destroy(t=!1){this._source&&t&&(this._source.destroy(),this._source=null),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return X(Y,"Texture.baseTexture is now Texture.source"),this._source}};I.EMPTY=new I({label:"EMPTY",source:new ut({label:"EMPTY"})});I.EMPTY.destroy=Kl;I.WHITE=new I({source:new Kr({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});I.WHITE.destroy=Kl});var yC,Ql,xt,yr=p(()=>{Os();ne();dt();yC=0,Ql=class{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1}createTexture(t,e,i){let s=new ut({...this.textureOptions,width:t,height:e,resolution:1,antialias:i,autoGarbageCollect:!0});return new I({source:s,label:`texturePool_${yC++}`})}getOptimalTexture(t,e,i=1,s){let n=Math.ceil(t*i-1e-6),o=Math.ceil(e*i-1e-6);n=ir(n),o=ir(o);let a=(n<<17)+(o<<1)+(s?1:0);this._texturePool[a]||(this._texturePool[a]=[]);let u=this._texturePool[a].pop();return u||(u=this.createTexture(n,o,s)),u.source._resolution=i,u.source.width=n/i,u.source.height=o/i,u.source.pixelWidth=n,u.source.pixelHeight=o,u.frame.x=0,u.frame.y=0,u.frame.width=t,u.frame.height=e,u.updateUvs(),this._poolKeyHash[u.uid]=a,u}getSameSizeTexture(t,e=!1){let i=t.source;return this.getOptimalTexture(t.width,t.height,i._resolution,e)}returnTexture(t){let e=this._poolKeyHash[t.uid];this._texturePool[e].push(t)}clear(t){if(t=t!==!1,t)for(let e in this._texturePool){let i=this._texturePool[e];if(i)for(let s=0;s<i.length;s++)i[s].destroy(!0)}this._texturePool={}}},xt=new Ql});var pa,Tg=p(()=>{ot();Xl();yr();pa=class{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new G,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new Ti,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(t){this.root=t,t._onRender&&this.addOnRender(t),t.didChange=!0;let e=t.children;for(let i=0;i<e.length;i++){let s=e[i];s._updateFlags=15,this.addChild(s)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(xt.returnTexture(this.texture),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0}reset(){this.renderGroupChildren.length=0;for(let t in this.childrenToUpdate){let e=this.childrenToUpdate[t];e.list.fill(null),e.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(t){t.renderGroupParent&&t.renderGroupParent._removeRenderGroupChild(t),t.renderGroupParent=this,this.renderGroupChildren.push(t)}_removeRenderGroupChild(t){let e=this.renderGroupChildren.indexOf(t);e>-1&&this.renderGroupChildren.splice(e,1),t.renderGroupParent=null}addChild(t){if(this.structureDidChange=!0,t.parentRenderGroup=this,t.updateTick=-1,t.parent===this.root?t.relativeRenderGroupDepth=1:t.relativeRenderGroupDepth=t.parent.relativeRenderGroupDepth+1,t.didChange=!0,this.onChildUpdate(t),t.renderGroup){this.addRenderGroupChild(t.renderGroup);return}t._onRender&&this.addOnRender(t);let e=t.children;for(let i=0;i<e.length;i++)this.addChild(e[i])}removeChild(t){if(this.structureDidChange=!0,t._onRender&&(t.renderGroup||this.removeOnRender(t)),t.parentRenderGroup=null,t.renderGroup){this._removeRenderGroupChild(t.renderGroup);return}let e=t.children;for(let i=0;i<e.length;i++)this.removeChild(e[i])}removeChildren(t){for(let e=0;e<t.length;e++)this.removeChild(t[e])}onChildUpdate(t){let e=this.childrenToUpdate[t.relativeRenderGroupDepth];e||(e=this.childrenToUpdate[t.relativeRenderGroupDepth]={index:0,list:[]}),e.list[e.index++]=t}updateRenderable(t){t.globalDisplayStatus<7||(this.instructionSet.renderPipes[t.renderPipeId].updateRenderable(t),t.didViewUpdate=!1)}onChildViewUpdate(t){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=t}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(t){this._onRenderContainers.push(t)}removeOnRender(t){this._onRenderContainers.splice(this._onRenderContainers.indexOf(t),1)}runOnRender(){for(let t=0;t<this._onRenderContainers.length;t++)this._onRenderContainers[t]._onRender()}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(t=[]){let e=this.root.children;for(let i=0;i<e.length;i++)this._getChildren(e[i],t);return t}_getChildren(t,e=[]){if(e.push(t),t.renderGroup)return e;let i=t.children;for(let s=0;s<i.length;s++)this._getChildren(i[s],e);return e}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return this._matrixDirty&1?(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new G),this._inverseWorldTransform.copyFrom(this.worldTransform).invert()):this._inverseWorldTransform}get textureOffsetInverseTransform(){return this._matrixDirty&2?(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new G),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y)):this._textureOffsetInverseTransform}get inverseParentTextureTransform(){if(!(this._matrixDirty&4))return this._inverseParentTextureTransform;this._matrixDirty&=-5;let t=this._parentCacheAsTextureRenderGroup;return t?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new G),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(t.inverseWorldTransform).translate(-t._textureBounds.x,-t._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}});function Sg(r,t,e={}){for(let i in t)!e[i]&&t[i]!==void 0&&(r[i]=t[i])}var wg=p(()=>{"use strict"});var Jl,tc,ec,wi,Ls,qr,it,De=p(()=>{Xt();$t();km();ot();kl();sa();jt();vt();Qt();Hm();Wm();$m();Ym();Jm();sg();og();ug();cg();Tg();wg();Jl=new zt(null),tc=new zt(null),ec=new zt(null,1,1),wi=1,Ls=2,qr=4,it=class r extends ht{constructor(t={}){super(),this.uid=rt("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.updateTick=-1,this.localTransform=new G,this.relativeGroupTransform=new G,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new zt(this,0,0),this._scale=ec,this._pivot=tc,this._skew=Jl,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],Sg(this,t,{children:!0,parent:!0,effects:!0}),t.children?.forEach(e=>this.addChild(e)),t.parent?.addChild(this)}static mixin(t){Object.defineProperties(r.prototype,Object.getOwnPropertyDescriptors(t))}set _didChangeId(t){this._didViewChangeTick=t>>12&4095,this._didContainerChangeTick=t&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...t){if(this.allowChildren||X(Y,"addChild: Only Containers will be allowed to add children in v8.0.0"),t.length>1){for(let s=0;s<t.length;s++)this.addChild(t[s]);return t[0]}let e=t[0],i=this.renderGroup||this.parentRenderGroup;return e.parent===this?(this.children.splice(this.children.indexOf(e),1),this.children.push(e),i&&(i.structureDidChange=!0),e):(e.parent&&e.parent.removeChild(e),this.children.push(e),this.sortableChildren&&(this.sortDirty=!0),e.parent=this,e.didChange=!0,e._updateFlags=15,i&&i.addChild(e),this.emit("childAdded",e,this,this.children.length-1),e.emit("added",this),this._didViewChangeTick++,e._zIndex!==0&&e.depthOfChildModified(),e)}removeChild(...t){if(t.length>1){for(let s=0;s<t.length;s++)this.removeChild(t[s]);return t[0]}let e=t[0],i=this.children.indexOf(e);return i>-1&&(this._didViewChangeTick++,this.children.splice(i,1),this.renderGroup?this.renderGroup.removeChild(e):this.parentRenderGroup&&this.parentRenderGroup.removeChild(e),e.parent=null,this.emit("childRemoved",e,this,i),e.emit("removed",this)),e}_onUpdate(t){t&&t===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(t){!!this.renderGroup!==t&&(t?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;let t=this.parentRenderGroup;t?.removeChild(this),this.renderGroup=K.get(pa,this),this.groupTransform=G.IDENTITY,t?.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;let t=this.parentRenderGroup;t?.removeChild(this),K.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,t?.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new G),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(t){this._position.x=t}get y(){return this._position.y}set y(t){this._position.y=t}get position(){return this._position}set position(t){this._position.copyFrom(t)}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this._onUpdate(this._skew))}get angle(){return this.rotation*Im}set angle(t){this.rotation=t*Um}get pivot(){return this._pivot===tc&&(this._pivot=new zt(this,0,0)),this._pivot}set pivot(t){this._pivot===tc&&(this._pivot=new zt(this,0,0)),typeof t=="number"?this._pivot.set(t):this._pivot.copyFrom(t)}get skew(){return this._skew===Jl&&(this._skew=new zt(this,0,0)),this._skew}set skew(t){this._skew===Jl&&(this._skew=new zt(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===ec&&(this._scale=new zt(this,1,1)),this._scale}set scale(t){this._scale===ec&&(this._scale=new zt(this,0,0)),typeof t=="number"?this._scale.set(t):this._scale.copyFrom(t)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(t){let e=this.getLocalBounds().width;this._setWidth(t,e)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(t){let e=this.getLocalBounds().height;this._setHeight(t,e)}getSize(t){t||(t={});let e=this.getLocalBounds();return t.width=Math.abs(this.scale.x*e.width),t.height=Math.abs(this.scale.y*e.height),t}setSize(t,e){let i=this.getLocalBounds();typeof t=="object"?(e=t.height??t.width,t=t.width):e??(e=t),t!==void 0&&this._setWidth(t,i.width),e!==void 0&&this._setHeight(e,i.height)}_updateSkew(){let t=this._rotation,e=this._skew;this._cx=Math.cos(t+e._y),this._sx=Math.sin(t+e._y),this._cy=-Math.sin(t-e._x),this._sy=Math.cos(t-e._x)}updateTransform(t){return this.position.set(typeof t.x=="number"?t.x:this.position.x,typeof t.y=="number"?t.y:this.position.y),this.scale.set(typeof t.scaleX=="number"?t.scaleX||1:this.scale.x,typeof t.scaleY=="number"?t.scaleY||1:this.scale.y),this.rotation=typeof t.rotation=="number"?t.rotation:this.rotation,this.skew.set(typeof t.skewX=="number"?t.skewX:this.skew.x,typeof t.skewY=="number"?t.skewY:this.skew.y),this.pivot.set(typeof t.pivotX=="number"?t.pivotX:this.pivot.x,typeof t.pivotY=="number"?t.pivotY:this.pivot.y),this}setFromMatrix(t){t.decompose(this)}updateLocalTransform(){let t=this._didContainerChangeTick;if(this._didLocalTransformChangeId===t)return;this._didLocalTransformChangeId=t;let e=this.localTransform,i=this._scale,s=this._pivot,n=this._position,o=i._x,a=i._y,u=s._x,l=s._y;e.a=this._cx*o,e.b=this._sx*o,e.c=this._cy*a,e.d=this._sy*a,e.tx=n._x-(u*e.a+l*e.c),e.ty=n._y-(u*e.b+l*e.d)}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=wi,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){let i=Z.shared.setValue(t??16777215).toBgrNumber();i!==this.localColor&&(this.localColor=i,this._updateFlags|=wi,this._onUpdate())}get tint(){return Us(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Ls,this.localBlendMode=t,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(t){let e=t?2:0;(this.localDisplayStatus&2)!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=qr,this.localDisplayStatus^=2,this._onUpdate())}get culled(){return!(this.localDisplayStatus&4)}set culled(t){let e=t?0:4;(this.localDisplayStatus&4)!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=qr,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(t){let e=t?1:0;(this.localDisplayStatus&1)!==e&&(this._updateFlags|=qr,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(t=!1){if(this.destroyed)return;this.destroyed=!0;let e;if(this.children.length&&(e=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof t=="boolean"?t:t?.children)&&e)for(let s=0;s<e.length;++s)e[s].destroy(t);this.renderGroup?.destroy(),this.renderGroup=null}};it.mixin(zm);it.mixin(lg);it.mixin(ng);it.mixin(ig);it.mixin(Xm);it.mixin(jm);it.mixin(ag);it.mixin(Rm);it.mixin(Nm);it.mixin(Qm)});var br,ma=p(()=>{xe();br=class r{constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=r.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new et,this.page=new et,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(t,e,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(t,e,i,s,n){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}});function bC(r){return function(t){return t.test(r)}}function Ns(r){var t={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?t.userAgent=r:r&&r.userAgent&&(t={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var e=t.userAgent,i=e.split("[FBAN");typeof i[1]<"u"&&(e=i[0]),i=e.split("Twitter"),typeof i[1]<"u"&&(e=i[0]);var s=bC(e),n={apple:{phone:s(rc)&&!s(sr),ipod:s(Eg),tablet:!s(rc)&&(s(Cg)||Gg(t))&&!s(sr),universal:s(Ag),device:(s(rc)||s(Eg)||s(Cg)||s(Ag)||Gg(t))&&!s(sr)},amazon:{phone:s(Ei),tablet:!s(Ei)&&s(ga),device:s(Ei)||s(ga)},android:{phone:!s(sr)&&s(Ei)||!s(sr)&&s(ic),tablet:!s(sr)&&!s(Ei)&&!s(ic)&&(s(ga)||s(Dg)),device:!s(sr)&&(s(Ei)||s(ga)||s(ic)||s(Dg))||s(/\\bokhttp\\b/i)},windows:{phone:s(sr),tablet:s(Pg),device:s(sr)||s(Pg)},other:{blackberry:s(Bg),blackberry10:s(Mg),opera:s(Fg),firefox:s(kg),chrome:s(Rg),device:s(Bg)||s(Mg)||s(Fg)||s(kg)||s(Rg)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}var rc,Eg,Cg,Ag,ic,Dg,Ei,ga,sr,Pg,Bg,Mg,Fg,Rg,kg,Gg,sc=p(()=>{rc=/iPhone/i,Eg=/iPod/i,Cg=/iPad/i,Ag=/\\biOS-universal(?:.+)Mac\\b/i,ic=/\\bAndroid(?:.+)Mobile\\b/i,Dg=/Android/i,Ei=/(?:SD4930UR|\\bSilk(?:.+)Mobile\\b)/i,ga=/Silk/i,sr=/Windows Phone/i,Pg=/\\bWindows(?:.+)ARM\\b/i,Bg=/BlackBerry/i,Mg=/BB10/i,Fg=/Opera Mini/i,Rg=/\\b(CriOS|Chrome)(?:.+)Mobile/i,kg=/Mobile(?:.+)Firefox\\b/i,Gg=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"}});var Ig=p(()=>{sc();sc()});var vC,Ug,Og=p(()=>{Ig();vC=Ns.default??Ns,Ug=vC(globalThis.navigator)});var TC,xa,SC,wC,Lg,Ng,EC,CC,AC,Hs,Hg=p(()=>{ma();D();Og();Ll();TC=9,xa=100,SC=0,wC=0,Lg=2,Ng=1,EC=-1e3,CC=-1e3,AC=2,Hs=class{constructor(t,e=Ug){this._mobileInfo=e,this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this._pool=[],this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._hookDiv=null,(e.tablet||e.phone)&&this._createTouchHook();let i=document.createElement("div");i.style.width=`${xa}px`,i.style.height=`${xa}px`,i.style.position="absolute",i.style.top=`${SC}px`,i.style.left=`${wC}px`,i.style.zIndex=Lg.toString(),this._div=i,this._renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}_createTouchHook(){let t=document.createElement("button");t.style.width=`${Ng}px`,t.style.height=`${Ng}px`,t.style.position="absolute",t.style.top=`${EC}px`,t.style.left=`${CC}px`,t.style.zIndex=AC.toString(),t.style.backgroundColor="#FF0000",t.title="select to enable accessibility for this content",t.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(t),this._hookDiv=t}_destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}_activate(){this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.add(this),this._renderer.view.canvas.parentNode?.appendChild(this._div))}_deactivate(){!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.remove(this),this._div.parentNode?.removeChild(this._div))}_updateAccessibleObjects(t){if(!t.visible||!t.accessibleChildren)return;t.accessible&&t.isInteractive()&&(t._accessibleActive||this._addChild(t),t._renderId=this._renderId);let e=t.children;if(e)for(let i=0;i<e.length;i++)this._updateAccessibleObjects(e[i])}init(t){this.debug=t?.debug??this.debug,this._renderer.runners.postrender.remove(this)}postrender(){let t=performance.now();if(this._mobileInfo.android.device&&t<this._androidUpdateCount||(this._androidUpdateCount=t+this._androidUpdateFrequency,!this._renderer.renderingToScreen||!this._renderer.view.canvas))return;this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered);let{x:e,y:i,width:s,height:n}=this._renderer.view.canvas.getBoundingClientRect(),{width:o,height:a,resolution:u}=this._renderer,l=s/o*u,c=n/a*u,h=this._div;h.style.left=`${e}px`,h.style.top=`${i}px`,h.style.width=`${o}px`,h.style.height=`${a}px`;for(let d=0;d<this._children.length;d++){let f=this._children[d];if(f._renderId!==this._renderId)f._accessibleActive=!1,na(this._children,d,1),this._div.removeChild(f._accessibleDiv),this._pool.push(f._accessibleDiv),f._accessibleDiv=null,d--;else{h=f._accessibleDiv;let m=f.hitArea,g=f.worldTransform;f.hitArea?(h.style.left=`${(g.tx+m.x*g.a)*l}px`,h.style.top=`${(g.ty+m.y*g.d)*c}px`,h.style.width=`${m.width*g.a*l}px`,h.style.height=`${m.height*g.d*c}px`):(m=f.getBounds().rectangle,this._capHitArea(m),h.style.left=`${m.x*l}px`,h.style.top=`${m.y*c}px`,h.style.width=`${m.width*l}px`,h.style.height=`${m.height*c}px`,h.title!==f.accessibleTitle&&f.accessibleTitle!==null&&(h.title=f.accessibleTitle||""),h.getAttribute("aria-label")!==f.accessibleHint&&f.accessibleHint!==null&&h.setAttribute("aria-label",f.accessibleHint||"")),(f.accessibleTitle!==h.title||f.tabIndex!==h.tabIndex)&&(h.title=f.accessibleTitle||"",h.tabIndex=f.tabIndex,this.debug&&this._updateDebugHTML(h))}}this._renderId++}_updateDebugHTML(t){t.innerHTML=`type: ${t.type}</br> title : ${t.title}</br> tabIndex: ${t.tabIndex}`}_capHitArea(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);let{width:e,height:i}=this._renderer;t.x+t.width>e&&(t.width=e-t.x),t.y+t.height>i&&(t.height=i-t.y)}_addChild(t){let e=this._pool.pop();e||(e=document.createElement("button"),e.style.width=`${xa}px`,e.style.height=`${xa}px`,e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=Lg.toString(),e.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&t.accessibleTitle!==null?e.title=t.accessibleTitle:(!t.accessibleHint||t.accessibleHint===null)&&(e.title=`container ${t.tabIndex}`),t.accessibleHint&&t.accessibleHint!==null&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this._updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.container=t,this._children.push(t),this._div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex}_dispatchEvent(t,e){let{container:i}=t.target,s=this._renderer.events.rootBoundary,n=Object.assign(new br(s),{target:i});s.rootTarget=this._renderer.lastObjectRendered,e.forEach(o=>s.dispatchEvent(n,o))}_onClick(t){this._dispatchEvent(t,["click","pointertap","tap"])}_onFocus(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive"),this._dispatchEvent(t,["mouseover"])}_onFocusOut(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite"),this._dispatchEvent(t,["mouseout"])}_onKeyDown(t){t.keyCode===TC&&this._activate()}_onMouseMove(t){t.movementX===0&&t.movementY===0||this._deactivate()}destroy(){this._destroyTouchHook(),this._div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this._pool=null,this._children=null,this._renderer=null}};Hs.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"accessibility"}});var zg,Wg=p(()=>{"use strict";zg={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,_renderId:-1}});var Vg=p(()=>{D();De();Hg();Wg();H.add(Hs);it.mixin(zg)});var zs,Xg=p(()=>{D();zs=class{static init(t){Object.defineProperty(this,"resizeTo",{set(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let e,i;if(this._resizeTo===globalThis.window)e=globalThis.innerWidth,i=globalThis.innerHeight;else{let{clientWidth:s,clientHeight:n}=this._resizeTo;e=s,i=n}this.renderer.resize(e,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}};zs.extension=b.Application});var vr,_a=p(()=>{"use strict";vr=(r=>(r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY",r))(vr||{})});var Ci,$g=p(()=>{"use strict";Ci=class{constructor(t,e=null,i=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=e,this.priority=i,this._once=s}match(t,e=null){return this._fn===t&&this._context===e}emit(t){this._fn&&(this._context?this._fn.call(this._context,t):this._fn(t));let e=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),e}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);let e=this.next;return this.next=t?null:e,this.previous=null,e}}});var jg,oe,Ws=p(()=>{_a();$g();jg=class fe{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Ci(null,null,1/0),this.deltaMS=1/fe.targetFPMS,this.elapsedMS=1/fe.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,e,i=vr.NORMAL){return this._addListener(new Ci(t,e,i))}addOnce(t,e,i=vr.NORMAL){return this._addListener(new Ci(t,e,i,!0))}_addListener(t){let e=this._head.next,i=this._head;if(!e)t.connect(i);else{for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}return this._startIfPossible(),this}remove(t,e){let i=this._head.next;for(;i;)i.match(t,e)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,e=this._head;for(;e=e.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let e;if(t>this.lastTime){if(e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){let n=t-this._lastFrame|0;if(n<this._minElapsedMS)return;this._lastFrame=t-n%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*fe.targetFPMS;let i=this._head,s=i.next;for(;s;)s=s.emit(this);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){let e=Math.min(this.maxFPS,t),i=Math.min(Math.max(0,e)/1e3,fe.targetFPMS);this._maxElapsedMS=1/i}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){if(t===0)this._minElapsedMS=0;else{let e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}}static get shared(){if(!fe._shared){let t=fe._shared=new fe;t.autoStart=!0,t._protected=!0}return fe._shared}static get system(){if(!fe._system){let t=fe._system=new fe;t.autoStart=!0,t._protected=!0}return fe._system}};jg.targetFPMS=.06;oe=jg});var Vs,Yg=p(()=>{D();_a();Ws();Vs=class{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,vr.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?oe.shared:new oe,t.autoStart&&this.start()}static destroy(){if(this._ticker){let t=this._ticker;this.ticker=null,t.destroy()}}};Vs.extension=b.Application});var nc=p(()=>{D();Xg();Yg();H.add(zs);H.add(Vs)});var oc,Ue,ac=p(()=>{_a();Ws();oc=class{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(t){this.removeTickerListener(),this.events=t,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(t){this._pauseUpdate=t}addTickerListener(){this._tickerAdded||!this.domElement||(oe.system.add(this._tickerUpdate,this,vr.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&(oe.system.remove(this._tickerUpdate,this),this._tickerAdded=!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}let t=this.events._rootPointerEvent;this.events.supportsTouchEvents&&t.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:t.clientX,clientY:t.clientY,pointerType:t.pointerType,pointerId:t.pointerId}))}_tickerUpdate(t){this._deltaTime+=t.deltaTime,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this._update())}},Ue=new oc});var nr,ya=p(()=>{xe();ma();nr=class extends br{constructor(){super(...arguments),this.client=new et,this.movement=new et,this.offset=new et,this.global=new et,this.screen=new et}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(t,e,i){return t.worldTransform.applyInverse(i||this.global,e)}getModifierState(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}initMouseEvent(t,e,i,s,n,o,a,u,l,c,h,d,f,m,g){throw new Error("Method not implemented.")}}});var Jt,uc=p(()=>{ya();Jt=class extends nr{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}});var Oe,lc=p(()=>{ya();Oe=class extends nr{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}};Oe.DOM_DELTA_PIXEL=0;Oe.DOM_DELTA_LINE=1;Oe.DOM_DELTA_PAGE=2});var DC,PC,Xs,ba,Kg=p(()=>{Xt();xe();gt();ac();ya();uc();lc();DC=2048,PC=new et,Xs=new et,ba=class{constructor(t){this.dispatch=new ht,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=t,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort((i,s)=>i.priority-s.priority)}dispatchEvent(t,e){t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e),this.dispatch.emit(e||t.type,t)}mapEvent(t){if(!this.rootTarget)return;let e=this.mappingTable[t.type];if(e)for(let i=0,s=e.length;i<s;i++)e[i].fn(t);else z(`[EventBoundary]: Event mapping not defined for ${t.type}`)}hitTest(t,e){Ue.pauseUpdate=!0;let s=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",n=this[s](this.rootTarget,this.rootTarget.eventMode,PC.set(t,e),this.hitTestFn,this.hitPruneFn);return n&&n[0]}propagate(t,e){if(!t.target)return;let i=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(let s=0,n=i.length-1;s<n;s++)if(t.currentTarget=i[s],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!(t.propagationStopped||t.propagationImmediatelyStopped)){t.eventPhase=t.BUBBLING_PHASE;for(let s=i.length-2;s>=0;s--)if(t.currentTarget=i[s],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}all(t,e,i=this._allInteractiveElements){if(i.length===0)return;t.eventPhase=t.BUBBLING_PHASE;let s=Array.isArray(e)?e:[e];for(let n=i.length-1;n>=0;n--)s.forEach(o=>{t.currentTarget=i[n],this.notifyTarget(t,o)})}propagationPath(t){let e=[t];for(let i=0;i<DC&&t!==this.rootTarget&&t.parent;i++){if(!t.parent)throw new Error("Cannot find propagation path to disconnected target");e.push(t.parent),t=t.parent}return e.reverse(),e}hitTestMoveRecursive(t,e,i,s,n,o=!1){let a=!1;if(this._interactivePrune(t))return null;if((t.eventMode==="dynamic"||e==="dynamic")&&(Ue.pauseUpdate=!1),t.interactiveChildren&&t.children){let c=t.children;for(let h=c.length-1;h>=0;h--){let d=c[h],f=this.hitTestMoveRecursive(d,this._isInteractive(e)?e:d.eventMode,i,s,n,o||n(t,i));if(f){if(f.length>0&&!f[f.length-1].parent)continue;let m=t.isInteractive();(f.length>0||m)&&(m&&this._allInteractiveElements.push(t),f.push(t)),this._hitElements.length===0&&(this._hitElements=f),a=!0}}}let u=this._isInteractive(e),l=t.isInteractive();return l&&l&&this._allInteractiveElements.push(t),o||this._hitElements.length>0?null:a?this._hitElements:u&&!n(t,i)&&s(t,i)?l?[t]:[]:null}hitTestRecursive(t,e,i,s,n){if(this._interactivePrune(t)||n(t,i))return null;if((t.eventMode==="dynamic"||e==="dynamic")&&(Ue.pauseUpdate=!1),t.interactiveChildren&&t.children){let u=t.children,l=i;for(let c=u.length-1;c>=0;c--){let h=u[c],d=this.hitTestRecursive(h,this._isInteractive(e)?e:h.eventMode,l,s,n);if(d){if(d.length>0&&!d[d.length-1].parent)continue;let f=t.isInteractive();return(d.length>0||f)&&d.push(t),d}}}let o=this._isInteractive(e),a=t.isInteractive();return o&&s(t,i)?a?[t]:[]:null}_isInteractive(t){return t==="static"||t==="dynamic"}_interactivePrune(t){return!t||!t.visible||!t.renderable||!t.measurable||t.eventMode==="none"||t.eventMode==="passive"&&!t.interactiveChildren}hitPruneFn(t,e){if(t.hitArea&&(t.worldTransform.applyInverse(e,Xs),!t.hitArea.contains(Xs.x,Xs.y)))return!0;if(t.effects&&t.effects.length)for(let i=0;i<t.effects.length;i++){let s=t.effects[i];if(s.containsPoint&&!s.containsPoint(e,this.hitTestFn))return!0}return!1}hitTestFn(t,e){return t.hitArea?!0:t?.containsPoint?(t.worldTransform.applyInverse(e,Xs),t.containsPoint(Xs)):!1}notifyTarget(t,e){if(!t.currentTarget.isInteractive())return;e??(e=t.type);let i=`on${e}`;t.currentTarget[i]?.(t);let s=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?`${e}capture`:e;this._notifyListeners(t,s),t.eventPhase===t.AT_TARGET&&this._notifyListeners(t,e)}mapPointerDown(t){if(!(t instanceof Jt)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}let e=this.createPointerEvent(t);if(this.dispatchEvent(e,"pointerdown"),e.pointerType==="touch")this.dispatchEvent(e,"touchstart");else if(e.pointerType==="mouse"||e.pointerType==="pen"){let s=e.button===2;this.dispatchEvent(e,s?"rightdown":"mousedown")}let i=this.trackingData(t.pointerId);i.pressTargetsByButton[t.button]=e.composedPath(),this.freeEvent(e)}mapPointerMove(t){if(!(t instanceof Jt)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;let e=this.createPointerEvent(t);this._isPointerMoveEvent=!1;let i=e.pointerType==="mouse"||e.pointerType==="pen",s=this.trackingData(t.pointerId),n=this.findMountedTarget(s.overTargets);if(s.overTargets?.length>0&&n!==e.target){let u=t.type==="mousemove"?"mouseout":"pointerout",l=this.createPointerEvent(t,u,n);if(this.dispatchEvent(l,"pointerout"),i&&this.dispatchEvent(l,"mouseout"),!e.composedPath().includes(n)){let c=this.createPointerEvent(t,"pointerleave",n);for(c.eventPhase=c.AT_TARGET;c.target&&!e.composedPath().includes(c.target);)c.currentTarget=c.target,this.notifyTarget(c),i&&this.notifyTarget(c,"mouseleave"),c.target=c.target.parent;this.freeEvent(c)}this.freeEvent(l)}if(n!==e.target){let u=t.type==="mousemove"?"mouseover":"pointerover",l=this.clonePointerEvent(e,u);this.dispatchEvent(l,"pointerover"),i&&this.dispatchEvent(l,"mouseover");let c=n?.parent;for(;c&&c!==this.rootTarget.parent&&c!==e.target;)c=c.parent;if(!c||c===this.rootTarget.parent){let d=this.clonePointerEvent(e,"pointerenter");for(d.eventPhase=d.AT_TARGET;d.target&&d.target!==n&&d.target!==this.rootTarget.parent;)d.currentTarget=d.target,this.notifyTarget(d),i&&this.notifyTarget(d,"mouseenter"),d.target=d.target.parent;this.freeEvent(d)}this.freeEvent(l)}let o=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?o.push("pointermove"):this.dispatchEvent(e,"pointermove"),a&&o.push("globalpointermove"),e.pointerType==="touch"&&(this.moveOnAll?o.splice(1,0,"touchmove"):this.dispatchEvent(e,"touchmove"),a&&o.push("globaltouchmove")),i&&(this.moveOnAll?o.splice(1,0,"mousemove"):this.dispatchEvent(e,"mousemove"),a&&o.push("globalmousemove"),this.cursor=e.target?.cursor),o.length>0&&this.all(e,o),this._allInteractiveElements.length=0,this._hitElements.length=0,s.overTargets=e.composedPath(),this.freeEvent(e)}mapPointerOver(t){if(!(t instanceof Jt)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}let e=this.trackingData(t.pointerId),i=this.createPointerEvent(t),s=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),s&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);let n=this.clonePointerEvent(i,"pointerenter");for(n.eventPhase=n.AT_TARGET;n.target&&n.target!==this.rootTarget.parent;)n.currentTarget=n.target,this.notifyTarget(n),s&&this.notifyTarget(n,"mouseenter"),n.target=n.target.parent;e.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(n)}mapPointerOut(t){if(!(t instanceof Jt)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}let e=this.trackingData(t.pointerId);if(e.overTargets){let i=t.pointerType==="mouse"||t.pointerType==="pen",s=this.findMountedTarget(e.overTargets),n=this.createPointerEvent(t,"pointerout",s);this.dispatchEvent(n),i&&this.dispatchEvent(n,"mouseout");let o=this.createPointerEvent(t,"pointerleave",s);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),i&&this.notifyTarget(o,"mouseleave"),o.target=o.target.parent;e.overTargets=null,this.freeEvent(n),this.freeEvent(o)}this.cursor=null}mapPointerUp(t){if(!(t instanceof Jt)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}let e=performance.now(),i=this.createPointerEvent(t);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){let a=i.button===2;this.dispatchEvent(i,a?"rightup":"mouseup")}let s=this.trackingData(t.pointerId),n=this.findMountedTarget(s.pressTargetsByButton[t.button]),o=n;if(n&&!i.composedPath().includes(n)){let a=n;for(;a&&!i.composedPath().includes(a);){if(i.currentTarget=a,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){let u=i.button===2;this.notifyTarget(i,u?"rightupoutside":"mouseupoutside")}a=a.parent}delete s.pressTargetsByButton[t.button],o=a}if(o){let a=this.clonePointerEvent(i,"click");a.target=o,a.path=null,s.clicksByButton[t.button]||(s.clicksByButton[t.button]={clickCount:0,target:a.target,timeStamp:e});let u=s.clicksByButton[t.button];if(u.target===a.target&&e-u.timeStamp<200?++u.clickCount:u.clickCount=1,u.target=a.target,u.timeStamp=e,a.detail=u.clickCount,a.pointerType==="mouse"){let l=a.button===2;this.dispatchEvent(a,l?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(i)}mapPointerUpOutside(t){if(!(t instanceof Jt)){z("EventBoundary cannot map a non-pointer event as a pointer event");return}let e=this.trackingData(t.pointerId),i=this.findMountedTarget(e.pressTargetsByButton[t.button]),s=this.createPointerEvent(t);if(i){let n=i;for(;n;)s.currentTarget=n,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"?this.notifyTarget(s,"touchendoutside"):(s.pointerType==="mouse"||s.pointerType==="pen")&&this.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),n=n.parent;delete e.pressTargetsByButton[t.button]}this.freeEvent(s)}mapWheel(t){if(!(t instanceof Oe)){z("EventBoundary cannot map a non-wheel event as a wheel event");return}let e=this.createWheelEvent(t);this.dispatchEvent(e),this.freeEvent(e)}findMountedTarget(t){if(!t)return null;let e=t[0];for(let i=1;i<t.length&&t[i].parent===e;i++)e=t[i];return e}createPointerEvent(t,e,i){let s=this.allocateEvent(Jt);return this.copyPointerData(t,s),this.copyMouseData(t,s),this.copyData(t,s),s.nativeEvent=t.nativeEvent,s.originalEvent=t,s.target=i??this.hitTest(s.global.x,s.global.y)??this._hitElements[0],typeof e=="string"&&(s.type=e),s}createWheelEvent(t){let e=this.allocateEvent(Oe);return this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t,e.target=this.hitTest(e.global.x,e.global.y),e}clonePointerEvent(t,e){let i=this.allocateEvent(Jt);return i.nativeEvent=t.nativeEvent,i.originalEvent=t.originalEvent,this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.target=t.target,i.path=t.composedPath().slice(),i.type=e??i.type,i}copyWheelData(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ}copyPointerData(t,e){t instanceof Jt&&e instanceof Jt&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)}copyMouseData(t,e){t instanceof nr&&e instanceof nr&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.copyFrom(t.client),e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.copyFrom(t.movement),e.screen.copyFrom(t.screen),e.shiftKey=t.shiftKey,e.global.copyFrom(t.global))}copyData(t,e){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.which=t.which,e.layer.copyFrom(t.layer),e.page.copyFrom(t.page)}trackingData(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]}allocateEvent(t){this.eventPool.has(t)||this.eventPool.set(t,[]);let e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.defaultPrevented=!1,e.path=null,e.target=null,e}freeEvent(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");let e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)}_notifyListeners(t,e){let i=t.currentTarget._events[e];if(i)if("fn"in i)i.once&&t.currentTarget.removeListener(e,i.fn,void 0,!0),i.fn.call(i.context,t);else for(let s=0,n=i.length;s<n&&!t.propagationImmediatelyStopped;s++)i[s].once&&t.currentTarget.removeListener(e,i[s].fn,void 0,!0),i[s].fn.call(i[s].context,t)}}});var BC,MC,hc,va,fc=p(()=>{D();Kg();ac();uc();lc();BC=1,MC={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},hc=class cc{constructor(t){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=t,this.rootBoundary=new ba(null),Ue.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new Jt(null),this._rootWheelEvent=new Oe(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...cc.defaultEventFeatures},{set:(e,i,s)=>(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=s),e[i]=s,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(t){let{canvas:e,resolution:i}=this.renderer;this.setTargetElement(e),this.resolution=i,cc._defaultEventMode=t.eventMode??"passive",Object.assign(this.features,t.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(t){this.resolution=t}destroy(){this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(t){t||(t="default");let e=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(e=!1),this._currentCursor===t)return;this._currentCursor=t;let i=this.cursorStyles[t];if(i)switch(typeof i){case"string":e&&(this.domElement.style.cursor=i);break;case"function":i(t);break;case"object":e&&Object.assign(this.domElement.style,i);break}else e&&typeof t=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,t)&&(this.domElement.style.cursor=t)}get pointer(){return this._rootPointerEvent}_onPointerDown(t){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let e=this._normalizeToPointerData(t);this.autoPreventDefault&&e[0].isNormalized&&(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(let i=0,s=e.length;i<s;i++){let n=e[i],o=this._bootstrapEvent(this._rootPointerEvent,n);this.rootBoundary.mapEvent(o)}this.setCursor(this.rootBoundary.cursor)}_onPointerMove(t){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,Ue.pointerMoved();let e=this._normalizeToPointerData(t);for(let i=0,s=e.length;i<s;i++){let n=this._bootstrapEvent(this._rootPointerEvent,e[i]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}_onPointerUp(t){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let e=t.target;t.composedPath&&t.composedPath().length>0&&(e=t.composedPath()[0]);let i=e!==this.domElement?"outside":"",s=this._normalizeToPointerData(t);for(let n=0,o=s.length;n<o;n++){let a=this._bootstrapEvent(this._rootPointerEvent,s[n]);a.type+=i,this.rootBoundary.mapEvent(a)}this.setCursor(this.rootBoundary.cursor)}_onPointerOverOut(t){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let e=this._normalizeToPointerData(t);for(let i=0,s=e.length;i<s;i++){let n=this._bootstrapEvent(this._rootPointerEvent,e[i]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}onWheel(t){if(!this.features.wheel)return;let e=this.normalizeWheelEvent(t);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(e)}setTargetElement(t){this._removeEvents(),this.domElement=t,Ue.domElement=t,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;Ue.addTickerListener();let t=this.domElement.style;t&&(globalThis.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this._onPointerMove,!0),this.domElement.addEventListener("pointerdown",this._onPointerDown,!0),this.domElement.addEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this._onPointerOverOut,!0),globalThis.addEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this._onPointerMove,!0),this.domElement.addEventListener("mousedown",this._onPointerDown,!0),this.domElement.addEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this._onPointerOverOut,!0),globalThis.addEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this._onPointerDown,!0),this.domElement.addEventListener("touchend",this._onPointerUp,!0),this.domElement.addEventListener("touchmove",this._onPointerMove,!0))),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this._eventsAdded=!0}_removeEvents(){if(!this._eventsAdded||!this.domElement)return;Ue.removeTickerListener();let t=this.domElement.style;t&&(globalThis.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction="")),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this._onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this._onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this._onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this._onPointerMove,!0),this.domElement.removeEventListener("mousedown",this._onPointerDown,!0),this.domElement.removeEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this._onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this._onPointerDown,!0),this.domElement.removeEventListener("touchend",this._onPointerUp,!0),this.domElement.removeEventListener("touchmove",this._onPointerMove,!0))),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this._eventsAdded=!1}mapPositionToPoint(t,e,i){let s=this.domElement.isConnected?this.domElement.getBoundingClientRect():{x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0},n=1/this.resolution;t.x=(e-s.left)*(this.domElement.width/s.width)*n,t.y=(i-s.top)*(this.domElement.height/s.height)*n}_normalizeToPointerData(t){let e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(let i=0,s=t.changedTouches.length;i<s;i++){let n=t.changedTouches[i];typeof n.button>"u"&&(n.button=0),typeof n.buttons>"u"&&(n.buttons=1),typeof n.isPrimary>"u"&&(n.isPrimary=t.touches.length===1&&t.type==="touchstart"),typeof n.width>"u"&&(n.width=n.radiusX||1),typeof n.height>"u"&&(n.height=n.radiusY||1),typeof n.tiltX>"u"&&(n.tiltX=0),typeof n.tiltY>"u"&&(n.tiltY=0),typeof n.pointerType>"u"&&(n.pointerType="touch"),typeof n.pointerId>"u"&&(n.pointerId=n.identifier||0),typeof n.pressure>"u"&&(n.pressure=n.force||.5),typeof n.twist>"u"&&(n.twist=0),typeof n.tangentialPressure>"u"&&(n.tangentialPressure=0),typeof n.layerX>"u"&&(n.layerX=n.offsetX=n.clientX),typeof n.layerY>"u"&&(n.layerY=n.offsetY=n.clientY),n.isNormalized=!0,n.type=t.type,e.push(n)}else if(!globalThis.MouseEvent||t instanceof MouseEvent&&(!this.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))){let i=t;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=BC),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,e.push(i)}else e.push(t);return e}normalizeWheelEvent(t){let e=this._rootWheelEvent;return this._transferMouseData(e,t),e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,e.deltaMode=t.deltaMode,this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.nativeEvent=t,e.type=t.type,e}_bootstrapEvent(t,e){return t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this._transferMouseData(t,e),this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.isTrusted=e.isTrusted,t.type==="pointerleave"&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=MC[t.type]||t.type),t}_transferMouseData(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.relatedTarget=null,t.shiftKey=e.shiftKey}};hc.extension={name:"events",type:[b.WebGLSystem,b.CanvasSystem,b.WebGPUSystem],priority:-1};hc.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};va=hc});var qg,Zg=p(()=>{fc();ma();qg={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,get interactive(){return this.eventMode==="dynamic"||this.eventMode==="static"},set interactive(r){this.eventMode=r?"static":"passive"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??va.defaultEventMode},set eventMode(r){this._internalEventMode=r},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(r,t,e){let i=typeof e=="boolean"&&e||typeof e=="object"&&e.capture,s=typeof e=="object"?e.signal:void 0,n=typeof e=="object"?e.once===!0:!1,o=typeof t=="function"?void 0:t;r=i?`${r}capture`:r;let a=typeof t=="function"?t:t.handleEvent,u=this;s&&s.addEventListener("abort",()=>{u.off(r,a,o)}),n?u.once(r,a,o):u.on(r,a,o)},removeEventListener(r,t,e){let i=typeof e=="boolean"&&e||typeof e=="object"&&e.capture,s=typeof t=="function"?void 0:t;r=i?`${r}capture`:r,t=typeof t=="function"?t:t.handleEvent,this.off(r,t,s)},dispatchEvent(r){if(!(r instanceof br))throw new Error("Container cannot propagate events outside of the Federated Events API");return r.defaultPrevented=!1,r.path=null,r.target=this,r.manager.dispatchEvent(r),!r.defaultPrevented}}});var Qg=p(()=>{D();De();fc();Zg();H.add(va);it.mixin(qg)});var dc,Jg=p(()=>{"use strict";dc=(r=>(r[r.Low=0]="Low",r[r.Normal=1]="Normal",r[r.High=2]="High",r))(dc||{})});var tx,ex=p(()=>{"use strict";tx={createCanvas:(r,t)=>{let e=document.createElement("canvas");return e.width=r,e.height=t,e},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(r,t)=>fetch(r,t),parseXML:r=>new DOMParser().parseFromString(r,"text/xml")}});var rx,Q,Pt=p(()=>{ex();rx=tx,Q={get(){return rx},set(r){rx=r}}});function Pe(r){if(typeof r!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(r)}`)}function $s(r){return r.split("?")[0].split("#")[0]}function FC(r){return r.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function RC(r,t,e){return r.replace(new RegExp(FC(t),"g"),e)}function kC(r,t){let e="",i=0,s=-1,n=0,o=-1;for(let a=0;a<=r.length;++a){if(a<r.length)o=r.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(s===a-1||n===1))if(s!==a-1&&n===2){if(e.length<2||i!==2||e.charCodeAt(e.length-1)!==46||e.charCodeAt(e.length-2)!==46){if(e.length>2){let u=e.lastIndexOf("/");if(u!==e.length-1){u===-1?(e="",i=0):(e=e.slice(0,u),i=e.length-1-e.lastIndexOf("/")),s=a,n=0;continue}}else if(e.length===2||e.length===1){e="",i=0,s=a,n=0;continue}}t&&(e.length>0?e+="/..":e="..",i=2)}else e.length>0?e+=`/${r.slice(s+1,a)}`:e=r.slice(s+1,a),i=a-s-1;s=a,n=0}else o===46&&n!==-1?++n:n=-1}return e}var Zr,pc=p(()=>{Pt();Zr={toPosix(r){return RC(r,"\\\\","/")},isUrl(r){return/^https?:/.test(this.toPosix(r))},isDataUrl(r){return/^data:([a-z]+\\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&\',()*+;=\\-._~:@\\/?%\\s<>]*?)$/i.test(r)},isBlobUrl(r){return r.startsWith("blob:")},hasProtocol(r){return/^[^/:]+:/.test(this.toPosix(r))},getProtocol(r){Pe(r),r=this.toPosix(r);let t=/^file:\\/\\/\\//.exec(r);if(t)return t[0];let e=/^[^/:]+:\\/{0,2}/.exec(r);return e?e[0]:""},toAbsolute(r,t,e){if(Pe(r),this.isDataUrl(r)||this.isBlobUrl(r))return r;let i=$s(this.toPosix(t??Q.get().getBaseUrl())),s=$s(this.toPosix(e??this.rootname(i)));return r=this.toPosix(r),r.startsWith("/")?Zr.join(s,r.slice(1)):this.isAbsolute(r)?r:this.join(i,r)},normalize(r){if(Pe(r),r.length===0)return".";if(this.isDataUrl(r)||this.isBlobUrl(r))return r;r=this.toPosix(r);let t="",e=r.startsWith("/");this.hasProtocol(r)&&(t=this.rootname(r),r=r.slice(t.length));let i=r.endsWith("/");return r=kC(r,!1),r.length>0&&i&&(r+="/"),e?`/${r}`:t+r},isAbsolute(r){return Pe(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join(...r){if(r.length===0)return".";let t;for(let e=0;e<r.length;++e){let i=r[e];if(Pe(i),i.length>0)if(t===void 0)t=i;else{let s=r[e-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?t+=`/../${i}`:t+=`/${i}`}}return t===void 0?".":this.normalize(t)},dirname(r){if(Pe(r),r.length===0)return".";r=this.toPosix(r);let t=r.charCodeAt(0),e=t===47,i=-1,s=!0,n=this.getProtocol(r),o=r;r=r.slice(n.length);for(let a=r.length-1;a>=1;--a)if(t=r.charCodeAt(a),t===47){if(!s){i=a;break}}else s=!1;return i===-1?e?"/":this.isUrl(o)?n+r:n:e&&i===1?"//":n+r.slice(0,i)},rootname(r){Pe(r),r=this.toPosix(r);let t="";if(r.startsWith("/")?t="/":t=this.getProtocol(r),this.isUrl(r)){let e=r.indexOf("/",t.length);e!==-1?t=r.slice(0,e):t=r,t.endsWith("/")||(t+="/")}return t},basename(r,t){Pe(r),t&&Pe(t),r=$s(this.toPosix(r));let e=0,i=-1,s=!0,n;if(t!==void 0&&t.length>0&&t.length<=r.length){if(t.length===r.length&&t===r)return"";let o=t.length-1,a=-1;for(n=r.length-1;n>=0;--n){let u=r.charCodeAt(n);if(u===47){if(!s){e=n+1;break}}else a===-1&&(s=!1,a=n+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(i=n):(o=-1,i=a))}return e===i?i=a:i===-1&&(i=r.length),r.slice(e,i)}for(n=r.length-1;n>=0;--n)if(r.charCodeAt(n)===47){if(!s){e=n+1;break}}else i===-1&&(s=!1,i=n+1);return i===-1?"":r.slice(e,i)},extname(r){Pe(r),r=$s(this.toPosix(r));let t=-1,e=0,i=-1,s=!0,n=0;for(let o=r.length-1;o>=0;--o){let a=r.charCodeAt(o);if(a===47){if(!s){e=o+1;break}continue}i===-1&&(s=!1,i=o+1),a===46?t===-1?t=o:n!==1&&(n=1):t!==-1&&(n=-1)}return t===-1||i===-1||n===0||n===1&&t===i-1&&t===e+1?"":r.slice(t,i)},parse(r){Pe(r);let t={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return t;r=$s(this.toPosix(r));let e=r.charCodeAt(0),i=this.isAbsolute(r),s,n="";t.root=this.rootname(r),i||this.hasProtocol(r)?s=1:s=0;let o=-1,a=0,u=-1,l=!0,c=r.length-1,h=0;for(;c>=s;--c){if(e=r.charCodeAt(c),e===47){if(!l){a=c+1;break}continue}u===-1&&(l=!1,u=c+1),e===46?o===-1?o=c:h!==1&&(h=1):o!==-1&&(h=-1)}return o===-1||u===-1||h===0||h===1&&o===u-1&&o===a+1?u!==-1&&(a===0&&i?t.base=t.name=r.slice(1,u):t.base=t.name=r.slice(a,u)):(a===0&&i?(t.name=r.slice(1,o),t.base=r.slice(1,u)):(t.name=r.slice(a,o),t.base=r.slice(a,u)),t.ext=r.slice(o,u)),t.dir=this.dirname(r),n&&(t.dir=n+t.dir),t},sep:"/",delimiter:":",joinExtensions:[".html"]}});var Tr,mc=p(()=>{"use strict";Tr=(r,t,e=!1)=>(Array.isArray(r)||(r=[r]),t?r.map(i=>typeof i=="string"||e?t(i):i):r)});function ix(r,t,e,i,s){let n=t[e];for(let o=0;o<n.length;o++){let a=n[o];e<t.length-1?ix(r.replace(i[e],a),t,e+1,i,s):s.push(r.replace(i[e],a))}}function sx(r){let t=/\\{(.*?)\\}/g,e=r.match(t),i=[];if(e){let s=[];e.forEach(n=>{let o=n.substring(1,n.length-1).split(",");s.push(o)}),ix(r,s,0,e,i)}else i.push(r);return i}var nx=p(()=>{"use strict"});var gc,ox=p(()=>{"use strict";gc=r=>!Array.isArray(r)});function GC(r){return r.split(".").pop().split("?").shift().split("#").shift()}var js,ax=p(()=>{gt();pc();mc();nx();ox();js=class{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,e)=>`${t}${this._bundleIdConnector}${e}`,extractAssetIdFromBundle:(t,e)=>e.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(e=>{this._preferredOrder.push(e),e.priority||(e.priority=Object.keys(e.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{let e=t;this._defaultSearchParams=Object.keys(e).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(e[i])}`).join("&")}}getAlias(t){let{alias:e,src:i}=t;return Tr(e||i,n=>typeof n=="string"?n:Array.isArray(n)?n.map(o=>o?.src??o):n?.src?n.src:n,!0)}addManifest(t){this._manifest&&z("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(e=>{this.addBundle(e.name,e.assets)})}addBundle(t,e){let i=[],s=e;Array.isArray(e)||(s=Object.entries(e).map(([n,o])=>typeof o=="string"||Array.isArray(o)?{alias:n,src:o}:{alias:n,...o})),s.forEach(n=>{let o=n.src,a=n.alias,u;if(typeof a=="string"){let l=this._createBundleAssetId(t,a);i.push(l),u=[a,l]}else{let l=a.map(c=>this._createBundleAssetId(t,c));i.push(...l),u=[...a,...l]}this.add({...n,alias:u,src:o})}),this._bundles[t]=i}add(t){let e=[];Array.isArray(t)?e.push(...t):e.push(t);let i;i=n=>{this.hasKey(n)&&z(`[Resolver] already has key: ${n} overwriting`)},Tr(e).forEach(n=>{let{src:o}=n,{data:a,format:u,loadParser:l}=n,c=Tr(o).map(f=>typeof f=="string"?sx(f):Array.isArray(f)?f:[f]),h=this.getAlias(n);Array.isArray(h)?h.forEach(i):i(h);let d=[];c.forEach(f=>{f.forEach(m=>{let g={};if(typeof m!="object"){g.src=m;for(let x=0;x<this._parsers.length;x++){let _=this._parsers[x];if(_.test(m)){g=_.parse(m);break}}}else a=m.data??a,u=m.format??u,l=m.loadParser??l,g={...g,...m};if(!h)throw new Error(`[Resolver] alias is undefined for this asset: ${g.src}`);g=this._buildResolvedAsset(g,{aliases:h,data:a,format:u,loadParser:l}),d.push(g)})}),h.forEach(f=>{this._assetMap[f]=d})})}resolveBundle(t){let e=gc(t);t=Tr(t);let i={};return t.forEach(s=>{let n=this._bundles[s];if(n){let o=this.resolve(n),a={};for(let u in o){let l=o[u];a[this._extractAssetIdFromBundle(s,u)]=l}i[s]=a}}),e?i[t[0]]:i}resolveUrl(t){let e=this.resolve(t);if(typeof t!="string"){let i={};for(let s in e)i[s]=e[s].src;return i}return e.src}resolve(t){let e=gc(t);t=Tr(t);let i={};return t.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let n=this._assetMap[s],o=this._getPreferredOrder(n);o?.priority.forEach(a=>{o.params[a].forEach(u=>{let l=n.filter(c=>c[a]?c[a]===u:!1);l.length&&(n=l)})}),this._resolverHash[s]=n[0]}else this._resolverHash[s]=this._buildResolvedAsset({alias:[s],src:s},{});i[s]=this._resolverHash[s]}),e?i[t[0]]:i}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let e=0;e<t.length;e++){let i=t[0],s=this._preferredOrder.find(n=>n.params.format.includes(i.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;let e=/\\?/.test(t)?"&":"?";return`${t}${e}${this._defaultSearchParams}`}_buildResolvedAsset(t,e){let{aliases:i,data:s,loadParser:n,format:o}=e;return(this._basePath||this._rootPath)&&(t.src=Zr.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=i??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...s||{},...t.data},t.loadParser=n??t.loadParser,t.format=o??t.format??GC(t.src),t}};js.RETINA_PREFIX=/@([0-9\\.]+)x/});var xc,ux=p(()=>{"use strict";xc=(r,t)=>{let e=t.split("?")[1];return e&&(r+=`?${e}`),r}});var lx,_c,cx=p(()=>{Yt();dt();lx=class Ys{constructor(t,e){this.linkedSheets=[],this._texture=t instanceof I?t:null,this.textureSource=t.source,this.textures={},this.animations={},this.data=e;let i=parseFloat(e.meta.scale);i?(this.resolution=i,t.source.resolution=this.resolution):this.resolution=t.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=Ys.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(t){let e=t,i=Ys.BATCH_SIZE;for(;e-t<i&&e<this._frameKeys.length;){let s=this._frameKeys[e],n=this._frames[s],o=n.frame;if(o){let a=null,u=null,l=n.trimmed!==!1&&n.sourceSize?n.sourceSize:n.frame,c=new tt(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);n.rotated?a=new tt(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):a=new tt(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),n.trimmed!==!1&&n.spriteSourceSize&&(u=new tt(Math.floor(n.spriteSourceSize.x)/this.resolution,Math.floor(n.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[s]=new I({source:this.textureSource,frame:a,orig:c,trim:u,rotate:n.rotated?2:0,defaultAnchor:n.anchor,defaultBorders:n.borders,label:s.toString()})}e++}}_processAnimations(){let t=this.data.animations||{};for(let e in t){this.animations[e]=[];for(let i=0;i<t[e].length;i++){let s=t[e][i];this.animations[e].push(this.textures[s])}}}_parseComplete(){let t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Ys.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Ys.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){for(let e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&(this._texture?.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};lx.BATCH_SIZE=1e3;_c=lx});function hx(r,t,e){let i={};if(r.forEach(s=>{i[s]=t}),Object.keys(t.textures).forEach(s=>{i[s]=t.textures[s]}),!e){let s=Zr.dirname(r[0]);t.linkedSheets.forEach((n,o)=>{let a=hx([`${s}/${t.data.meta.related_multi_packs[o]}`],n,!0);Object.assign(i,a)})}return i}var IC,fx,dx=p(()=>{Jg();ax();ux();D();dt();pc();cx();IC=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];fx={extension:b.Asset,cache:{test:r=>r instanceof _c,getCacheableAssets:(r,t)=>hx(r,t,!1)},resolver:{extension:{type:b.ResolveParser,name:"resolveSpritesheet"},test:r=>{let e=r.split("?")[0].split("."),i=e.pop(),s=e.pop();return i==="json"&&IC.includes(s)},parse:r=>{let t=r.split(".");return{resolution:parseFloat(js.RETINA_PREFIX.exec(r)?.[1]??"1"),format:t[t.length-2],src:r}}},loader:{name:"spritesheetLoader",extension:{type:b.LoadParser,priority:dc.Normal,name:"spritesheetLoader"},async testParse(r,t){return Zr.extname(t.src).toLowerCase()===".json"&&!!r.frames},async parse(r,t,e){let{texture:i,imageFilename:s}=t?.data??{},n=Zr.dirname(t.src);n&&n.lastIndexOf("/")!==n.length-1&&(n+="/");let o;if(i instanceof I)o=i;else{let l=xc(n+(s??r.meta.image),t.src);o=(await e.load([l]))[l]}let a=new _c(o.source,r);await a.parse();let u=r?.meta?.related_multi_packs;if(Array.isArray(u)){let l=[];for(let h of u){if(typeof h!="string")continue;let d=n+h;t.data?.ignoreMultiPack||(d=xc(d,t.src),l.push(e.load({src:d,data:{ignoreMultiPack:!0}})))}let c=await Promise.all(l);a.linkedSheets=c,c.forEach(h=>{h.linkedSheets=[a].concat(a.linkedSheets.filter(d=>d!==h))})}return a},async unload(r,t,e){await e.unload(r.textureSource._sourceOrigin),r.destroy(!1)}}}});var Ta=p(()=>{D();dx();H.add(fx)});function Qr(r,t,e,i){let{width:s,height:n}=e.orig,o=e.trim;if(o){let a=o.width,u=o.height;r.minX=o.x-t._x*s-i,r.maxX=r.minX+a,r.minY=o.y-t._y*n-i,r.maxY=r.minY+u}else r.minX=-t._x*s-i,r.maxX=r.minX+s,r.minY=-t._y*n-i,r.maxY=r.minY+n}var Sa=p(()=>{"use strict"});var Sr,wa=p(()=>{ce();De();Sr=class extends it{constructor(){super(...arguments),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._bounds=new ft(0,1,0,0),this._boundsDirty=!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}containsPoint(t){let e=this.bounds,{x:i,y:s}=t;return i>=e.minX&&i<=e.maxX&&s>=e.minY&&s<=e.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;let t=this.renderGroup||this.parentRenderGroup;t&&t.onChildViewUpdate(this)}destroy(t){super.destroy(t),this._bounds=null}}});var Jr,yc=p(()=>{sa();dt();Sa();vt();wa();Jr=class r extends Sr{constructor(t=I.EMPTY){t instanceof I&&(t={texture:t});let{texture:e=I.EMPTY,anchor:i,roundPixels:s,width:n,height:o,...a}=t;super({label:"Sprite",...a}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new zt({_onUpdate:()=>{this.onViewUpdate()}}),i?this.anchor=i:e.defaultAnchor&&(this.anchor=e.defaultAnchor),this.texture=e,this.allowChildren=!1,this.roundPixels=s??!1,n!==void 0&&(this.width=n),o!==void 0&&(this.height=o)}static from(t,e=!1){return t instanceof I?new r(t):new r(I.from(t,e))}set texture(t){t||(t=I.EMPTY);let e=this._texture;e!==t&&(e&&e.dynamic&&e.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return Qr(this._visualBounds,this._anchor,this._texture,0),this._visualBounds}get sourceBounds(){return X("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){let t=this._anchor,e=this._texture,i=this._bounds,{width:s,height:n}=e.orig;i.minX=-t._x*s,i.maxX=i.minX+s,i.minY=-t._y*n,i.maxY=i.minY+n}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t?.texture){let i=typeof t=="boolean"?t:t?.textureSource;this._texture.destroy(i)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(t){this._setWidth(t,this._texture.orig.width),this._width=t}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(t){this._setHeight(t,this._texture.orig.height),this._height=t}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this._texture.orig.width,t.height=Math.abs(this.scale.y)*this._texture.orig.height,t}setSize(t,e){typeof t=="object"?(e=t.height??t.width,t=t.width):e??(e=t),t!==void 0&&this._setWidth(t,this._texture.orig.width),e!==void 0&&this._setHeight(e,this._texture.orig.height)}}});function Ea(r,t,e){let i=UC;r.measurable=!0,yi(r,e,i),t.addBoundsMask(i),r.measurable=!1}var UC,bc=p(()=>{ce();Is();UC=new ft});function Ca(r,t,e){let i=he.get();r.measurable=!0;let s=Dt.get().identity(),n=px(r,e,s);vi(r,i,n),r.measurable=!1,t.addBoundsMask(i),Dt.return(s),he.return(i)}function px(r,t,e){return r?(r!==t&&(px(r.parent,t,e),r.updateLocalTransform(),e.append(r.localTransform)),e):(z("Mask bounds, renderable is not inside the root container"),e)}var vc=p(()=>{ha();Vr();gt()});var Ks,mx=p(()=>{D();yc();bc();vc();Ks=class{constructor(t){this.priority=0,this.inverse=!1,this.pipe="alphaMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t,this.renderMaskToTexture=!(t instanceof Jr),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask.measurable=!0,this.mask=null}addBounds(t,e){this.inverse||Ea(this.mask,t,e)}addLocalBounds(t,e){Ca(this.mask,t,e)}containsPoint(t,e){let i=this.mask;return e(i,t)}destroy(){this.reset()}static test(t){return t instanceof Jr}};Ks.extension=b.MaskEffect});var qs,gx=p(()=>{D();qs=class{constructor(t){this.priority=0,this.pipe="colorMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t}destroy(){}static test(t){return typeof t=="number"}};qs.extension=b.MaskEffect});var Zs,xx=p(()=>{D();De();bc();vc();Zs=class{constructor(t){this.priority=0,this.pipe="stencilMask",t?.mask&&this.init(t.mask)}init(t){this.mask=t,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null}addBounds(t,e){Ea(this.mask,t,e)}addLocalBounds(t,e){Ca(this.mask,t,e)}containsPoint(t,e){let i=this.mask;return e(i,t)}destroy(){this.reset()}static test(t){return t instanceof it}};Zs.extension=b.MaskEffect});var te,Ai=p(()=>{Pt();D();ne();te=class extends ut{constructor(t){t.resource||(t.resource=Q.get().createCanvas()),t.width||(t.width=t.resource.width,t.autoDensity||(t.width/=t.resolution)),t.height||(t.height=t.resource.height,t.autoDensity||(t.height/=t.resolution)),super(t),this.uploadMethodId="image",this.autoDensity=t.autoDensity,this.resizeCanvas(),this.transparent=!!t.transparent}resizeCanvas(){this.autoDensity&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(t=this.width,e=this.height,i=this._resolution){let s=super.resize(t,e,i);return s&&this.resizeCanvas(),s}static test(t){return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&t instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}};te.extension=b.TextureSource});var or,Aa=p(()=>{Pt();D();gt();ne();or=class extends ut{constructor(t){if(t.resource&&globalThis.HTMLImageElement&&t.resource instanceof HTMLImageElement){let e=Q.get().createCanvas(t.resource.width,t.resource.height);e.getContext("2d").drawImage(t.resource,0,0,t.resource.width,t.resource.height),t.resource=e,z("ImageSource: Image element passed, converting to canvas. Use CanvasSource instead.")}super(t),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(t){return globalThis.HTMLImageElement&&t instanceof HTMLImageElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||globalThis.VideoFrame&&t instanceof VideoFrame}};or.extension=b.TextureSource});async function _x(){return Tc??(Tc=(async()=>{let t=document.createElement("canvas").getContext("webgl");if(!t)return"premultiply-alpha-on-upload";let e=await new Promise(o=>{let a=document.createElement("video");a.onloadeddata=()=>o(a),a.onerror=()=>o(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",a.load()});if(!e)return"premultiply-alpha-on-upload";let i=t.createTexture();t.bindTexture(t.TEXTURE_2D,i);let s=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,s),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e);let n=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,n),t.deleteFramebuffer(s),t.deleteTexture(i),t.getExtension("WEBGL_lose_context")?.loseContext(),n[0]<=n[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),Tc}var Tc,yx=p(()=>{"use strict"});var Da,vx,Tx=p(()=>{D();Ws();yx();ne();Da=class bx extends ut{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...bx.defaultOptions,...t},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=t.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){let t=oe.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;let t=this.resource,e=this.options;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(e.preload||t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlayThrough),t.addEventListener("error",this._onError,!0)),this.alphaMode=await _x(),this._load=new Promise((i,s)=>{this.isValid?i(this):(this._resolve=i,this._reject=s,e.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${e.preloadTimeoutMs}ms`))})),t.load())}),this._load}_onError(t){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=null,this._resolve=null)}_isSourcePlaying(){let t=this.resource;return!t.paused&&!t.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){let t=this.resource;this.isValid&&(this.isReady=!0,this.resize(t.videoWidth,t.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();let t=this.resource;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlayThrough),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(oe.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(oe.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(oe.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};Da.extension=b.TextureSource;Da.defaultOptions={...ut.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};Da.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};vx=Da});var Sc,Bt,Qs=p(()=>{gt();mc();Sc=class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){let e=this._cache.get(t);return e||z(`[Assets] Asset id ${t} was not found in the Cache`),e}set(t,e){let i=Tr(t),s;for(let u=0;u<this.parsers.length;u++){let l=this.parsers[u];if(l.test(e)){s=l.getCacheableAssets(i,e);break}}let n=new Map(Object.entries(s||{}));s||i.forEach(u=>{n.set(u,e)});let o=[...n.keys()],a={cacheKeys:o,keys:i};i.forEach(u=>{this._cacheMap.set(u,a)}),o.forEach(u=>{let l=s?s[u]:e;this._cache.has(u)&&this._cache.get(u)!==l&&z("[Cache] already has key:",u),this._cache.set(u,n.get(u))})}remove(t){if(!this._cacheMap.has(t)){z(`[Assets] Asset id ${t} was not found in the Cache`);return}let e=this._cacheMap.get(t);e.cacheKeys.forEach(s=>{this._cache.delete(s)}),e.keys.forEach(s=>{this._cacheMap.delete(s)})}get parsers(){return this._parsers}},Bt=new Sc});function Sx(r={}){let t=r&&r.resource,e=t?r.resource:r,i=t?r:{resource:r};for(let s=0;s<wc.length;s++){let n=wc[s];if(n.test(e))return new n(i)}throw new Error(`Could not find a source type for resource: ${i.resource}`)}function wx(r={},t=!1){let e=r&&r.resource,i=e?r.resource:r,s=e?r:{resource:r};if(!t&&Bt.has(i))return Bt.get(i);let n=new I({source:Sx(s)});return n.on("destroy",()=>{Bt.has(i)&&Bt.remove(i)}),t||Bt.set(i,n),n}function Ex(r,t=!1){return typeof r=="string"?Bt.get(r):r instanceof ut?new I({source:r}):wx(r,t)}var wc,Ec=p(()=>{Qs();D();ne();dt();wc=[];H.handleByList(b.TextureSource,wc);I.from=Ex;ut.from=Sx});var Pa=p(()=>{D();mx();gx();xx();ql();Ai();Aa();Tx();Ec();H.add(Ks,qs,Zs,vx,or,te,Kr)});var It,wr=p(()=>{"use strict";It=class{constructor(t){this.resources=Object.create(null),this._dirty=!0;let e=0;for(let i in t){let s=t[i];this.setResource(s,e++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;let t=[],e=0;for(let i in this.resources)t[e++]=this.resources[i]._resourceId;this._key=t.join("|")}setResource(t,e){let i=this.resources[e];t!==i&&(i&&t.off?.("change",this.onResourceChange,this),t.on?.("change",this.onResourceChange,this),this.resources[e]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t){let e=this.resources;for(let i in e)e[i]._touched=t}destroy(){let t=this.resources;for(let e in t)t[e].off?.("change",this.onResourceChange,this);this.resources=null}onResourceChange(t){if(this._dirty=!0,t.destroyed){let e=this.resources;for(let i in e)e[i]===t&&(e[i]=null)}else this._updateKey()}}});function Ma(){return(!Ba||Ba?.isContextLost())&&(Ba=Q.get().createCanvas().getContext("webgl",{})),Ba}var Ba,Cc=p(()=>{Pt()});function LC(r){let t="";for(let e=0;e<r;++e)e>0&&(t+=`\nelse `),e<r-1&&(t+=`if(test == ${e}.0){}`);return t}function Cx(r,t){if(r===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");let e=t.createShader(t.FRAGMENT_SHADER);try{for(;;){let i=OC.replace(/%forloop%/gi,LC(r));if(t.shaderSource(e,i),t.compileShader(e),!t.getShaderParameter(e,t.COMPILE_STATUS))r=r/2|0;else break}}finally{t.deleteShader(e)}return r}var OC,Ax=p(()=>{"use strict";OC=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`\n`)});function _e(){if(Di)return Di;let r=Ma();return Di=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),Di=Cx(Di,r),r.getExtension("WEBGL_lose_context")?.loseContext(),Di}var Di,ti=p(()=>{Cc();Ax();Di=null});function Pi(r,t){let e=2166136261;for(let i=0;i<t;i++)e^=r[i].uid,e=Math.imul(e,16777619),e>>>=0;return Dx[e]||NC(r,t,e)}function NC(r,t,e){let i={},s=0;Ac||(Ac=_e());for(let o=0;o<Ac;o++){let a=o<t?r[o]:I.EMPTY.source;i[s++]=a.source,i[s++]=a.style}let n=new It(i);return Dx[e]=n,n}var Dx,Ac,Fa=p(()=>{wr();dt();ti();Dx={};Ac=0});var Le,Dc=p(()=>{"use strict";Le=class{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this.uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn\'t a valid view type`)}}}});function Js(r,t){let e=r.byteLength/8|0,i=new Float64Array(r,0,e);new Float64Array(t,0,e).set(i);let n=r.byteLength-e*8;if(n>0){let o=new Uint8Array(r,e*8,n);new Uint8Array(t,e*8,n).set(o)}}var Pc=p(()=>{"use strict"});var Px,pt,ei=p(()=>{"use strict";Px={normal:"normal-npm",add:"add-npm",screen:"screen-npm"},pt=(r=>(r[r.DISABLED=0]="DISABLED",r[r.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",r[r.MASK_ACTIVE=2]="MASK_ACTIVE",r[r.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",r[r.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",r[r.NONE=5]="NONE",r))(pt||{})});function ar(r,t){return t.alphaMode==="no-premultiply-alpha"&&Px[r]||r}var tn=p(()=>{ei()});var Ra,Bx=p(()=>{"use strict";Ra=class{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let t=0;t<this.count;t++){let e=this.textures[t];this.textures[t]=null,this.ids[e.uid]=null}this.count=0}}});function Mx(){return Mc>0?Rx[--Mc]:new Bc}function Fx(r){Rx[Mc++]=r}var Bc,Rx,Mc,en,kx,Gx,Ix=p(()=>{jt();Dc();Pc();tn();ti();Bx();Bc=class{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new Ra,this.blendMode="normal",this.topology="triangle-strip",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null}},Rx=[],Mc=0;en=0,kx=class ka{constructor(t={}){this.uid=rt("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],ka.defaultOptions.maxTextures=ka.defaultOptions.maxTextures??_e(),t={...ka.defaultOptions,...t};let{maxTextures:e,attributesInitialSize:i,indicesInitialSize:s}=t;this.attributeBuffer=new Le(i*4),this.indexBuffer=new Uint16Array(s),this.maxTextures=e}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let t=0;t<this.batchIndex;t++)Fx(this.batches[t]);this.batchIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(t){this._elements[this.elementSize++]=t,t._indexStart=this.indexSize,t._attributeStart=this.attributeSize,t._batcher=this,this.indexSize+=t.indexSize,this.attributeSize+=t.attributeSize*this.vertexSize}checkAndUpdateTexture(t,e){let i=t._batch.textures.ids[e._source.uid];return!i&&i!==0?!1:(t._textureId=i,t.texture=e,!0)}updateElement(t){this.dirty=!0;let e=this.attributeBuffer;t.packAsQuad?this.packQuadAttributes(t,e.float32View,e.uint32View,t._attributeStart,t._textureId):this.packAttributes(t,e.float32View,e.uint32View,t._attributeStart,t._textureId)}break(t){let e=this._elements;if(!e[this.elementStart])return;let i=Mx(),s=i.textures;s.clear();let n=e[this.elementStart],o=ar(n.blendMode,n.texture._source),a=n.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);let u=this.attributeBuffer.float32View,l=this.attributeBuffer.uint32View,c=this.indexBuffer,h=this._batchIndexSize,d=this._batchIndexStart,f="startBatch",m=this.maxTextures;for(let g=this.elementStart;g<this.elementSize;++g){let x=e[g];e[g]=null;let v=x.texture._source,T=ar(x.blendMode,v),y=o!==T||a!==x.topology;if(v._batchTick===en&&!y){x._textureId=v._textureBindLocation,h+=x.indexSize,x.packAsQuad?(this.packQuadAttributes(x,u,l,x._attributeStart,x._textureId),this.packQuadIndex(c,x._indexStart,x._attributeStart/this.vertexSize)):(this.packAttributes(x,u,l,x._attributeStart,x._textureId),this.packIndex(x,c,x._indexStart,x._attributeStart/this.vertexSize)),x._batch=i;continue}v._batchTick=en,(s.count>=m||y)&&(this._finishBatch(i,d,h-d,s,o,a,t,f),f="renderBatch",d=h,o=T,a=x.topology,i=Mx(),s=i.textures,s.clear(),++en),x._textureId=v._textureBindLocation=s.count,s.ids[v.uid]=s.count,s.textures[s.count++]=v,x._batch=i,h+=x.indexSize,x.packAsQuad?(this.packQuadAttributes(x,u,l,x._attributeStart,x._textureId),this.packQuadIndex(c,x._indexStart,x._attributeStart/this.vertexSize)):(this.packAttributes(x,u,l,x._attributeStart,x._textureId),this.packIndex(x,c,x._indexStart,x._attributeStart/this.vertexSize))}s.count>0&&(this._finishBatch(i,d,h-d,s,o,a,t,f),d=h,++en),this.elementStart=this.elementSize,this._batchIndexStart=d,this._batchIndexSize=h}_finishBatch(t,e,i,s,n,o,a,u){t.gpuBindGroup=null,t.bindGroup=null,t.action=u,t.batcher=this,t.textures=s,t.blendMode=n,t.topology=o,t.start=e,t.size=i,++en,this.batches[this.batchIndex++]=t,a.add(t)}finish(t){this.break(t)}ensureAttributeBuffer(t){t*4<=this.attributeBuffer.size||this._resizeAttributeBuffer(t*4)}ensureIndexBuffer(t){t<=this.indexBuffer.length||this._resizeIndexBuffer(t)}_resizeAttributeBuffer(t){let e=Math.max(t,this.attributeBuffer.size*2),i=new Le(e);Js(this.attributeBuffer.rawBinaryData,i.rawBinaryData),this.attributeBuffer=i}_resizeIndexBuffer(t){let e=this.indexBuffer,i=Math.max(t,e.length*1.5);i+=i%2;let s=i>65535?new Uint32Array(i):new Uint16Array(i);if(s.BYTES_PER_ELEMENT!==e.BYTES_PER_ELEMENT)for(let n=0;n<e.length;n++)s[n]=e[n];else Js(e.buffer,s.buffer);this.indexBuffer=s}packQuadIndex(t,e,i){t[e]=i+0,t[e+1]=i+1,t[e+2]=i+2,t[e+3]=i+0,t[e+4]=i+2,t[e+5]=i+3}packIndex(t,e,i,s){let n=t.indices,o=t.indexSize,a=t.indexOffset,u=t.attributeOffset;for(let l=0;l<o;l++)e[i++]=s+n[l+a]-u}destroy(){for(let t=0;t<this.batches.length;t++)Fx(this.batches[t]);this.batches=null;for(let t=0;t<this._elements.length;t++)this._elements[t]._batch=null;this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}};kx.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};Gx=kx});var J,ur=p(()=>{"use strict";J=(r=>(r[r.MAP_READ=1]="MAP_READ",r[r.MAP_WRITE=2]="MAP_WRITE",r[r.COPY_SRC=4]="COPY_SRC",r[r.COPY_DST=8]="COPY_DST",r[r.INDEX=16]="INDEX",r[r.VERTEX=32]="VERTEX",r[r.UNIFORM=64]="UNIFORM",r[r.STORAGE=128]="STORAGE",r[r.INDIRECT=256]="INDIRECT",r[r.QUERY_RESOLVE=512]="QUERY_RESOLVE",r[r.STATIC=1024]="STATIC",r))(J||{})});var Tt,Er=p(()=>{Xt();jt();ur();Tt=class extends ht{constructor(t){let{data:e,size:i}=t,{usage:s,label:n,shrinkToFit:o}=t;super(),this.uid=rt("buffer"),this._resourceType="buffer",this._resourceId=rt("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,e instanceof Array&&(e=new Float32Array(e)),this._data=e,i??(i=e?.byteLength);let a=!!e;this.descriptor={size:i,usage:s,mappedAtCreation:a,label:n},this.shrinkToFit=o??!0}get data(){return this._data}set data(t){this.setDataWithSize(t,t.length,!0)}get dataInt32(){return this._dataInt32||(this._dataInt32=new Int32Array(this.data.buffer)),this._dataInt32}get static(){return!!(this.descriptor.usage&J.STATIC)}set static(t){t?this.descriptor.usage|=J.STATIC:this.descriptor.usage&=~J.STATIC}setDataWithSize(t,e,i){if(this._updateID++,this._updateSize=e*t.BYTES_PER_ELEMENT,this._data===t){i&&this.emit("update",this);return}let s=this._data;if(this._data=t,this._dataInt32=null,!s||s.length!==t.length){!this.shrinkToFit&&s&&t.byteLength<s.byteLength?i&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=rt("resource"),this.emit("change",this));return}i&&this.emit("update",this)}update(t){this._updateSize=t??this._updateSize,this._updateID++,this.emit("update",this)}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this._data=null,this.descriptor=null,this.removeAllListeners()}}});function Fc(r,t){if(!(r instanceof Tt)){let e=t?J.INDEX:J.VERTEX;r instanceof Array&&(t?(r=new Uint32Array(r),e=J.INDEX|J.COPY_DST):(r=new Float32Array(r),e=J.VERTEX|J.COPY_DST)),r=new Tt({data:r,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:e})}return r}var Ux=p(()=>{Er();ur()});function Ox(r,t,e){let i=r.getAttribute(t);if(!i)return e.minX=0,e.minY=0,e.maxX=0,e.maxY=0,e;let s=i.buffer.data,n=1/0,o=1/0,a=-1/0,u=-1/0,l=s.BYTES_PER_ELEMENT,c=(i.offset||0)/l,h=(i.stride||2*4)/l;for(let d=c;d<s.length;d+=h){let f=s[d],m=s[d+1];f>a&&(a=f),m>u&&(u=m),f<n&&(n=f),m<o&&(o=m)}return e.minX=n,e.minY=o,e.maxX=a,e.maxY=u,e}var Lx=p(()=>{"use strict"});function HC(r){return(r instanceof Tt||Array.isArray(r)||r.BYTES_PER_ELEMENT)&&(r={buffer:r}),r.buffer=Fc(r.buffer,!1),r}var ye,Bi=p(()=>{Xt();ce();jt();Er();Ux();Lx();ye=class extends ht{constructor(t={}){super(),this.uid=rt("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new ft,this._boundsDirty=!0;let{attributes:e,indexBuffer:i,topology:s}=t;if(this.buffers=[],this.attributes={},e)for(let n in e)this.addAttribute(n,e[n]);this.instanceCount=t.instanceCount??1,i&&this.addIndex(i),this.topology=s||"triangle-list"}onBufferUpdate(){this._boundsDirty=!0,this.emit("update",this)}getAttribute(t){return this.attributes[t]}getIndex(){return this.indexBuffer}getBuffer(t){return this.getAttribute(t).buffer}getSize(){for(let t in this.attributes){let e=this.attributes[t];return e.buffer.data.length/(e.stride/4||e.size)}return 0}addAttribute(t,e){let i=HC(e);this.buffers.indexOf(i.buffer)===-1&&(this.buffers.push(i.buffer),i.buffer.on("update",this.onBufferUpdate,this),i.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=i}addIndex(t){this.indexBuffer=Fc(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,Ox(this,"aPosition",this._bounds)):this._bounds}destroy(t=!1){this.emit("destroy",this),this.removeAllListeners(),t&&this.buffers.forEach(e=>e.destroy()),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}});var zC,WC,Ga,Nx=p(()=>{Er();ur();Bi();zC=new Float32Array(1),WC=new Uint32Array(1),Ga=class extends ye{constructor(){let e=new Tt({data:zC,label:"attribute-batch-buffer",usage:J.VERTEX|J.COPY_DST,shrinkToFit:!1}),i=new Tt({data:WC,label:"index-batch-buffer",usage:J.INDEX|J.COPY_DST,shrinkToFit:!1}),s=6*4;super({attributes:{aPosition:{buffer:e,format:"float32x2",stride:s,offset:0},aUV:{buffer:e,format:"float32x2",stride:s,offset:2*4},aColor:{buffer:e,format:"unorm8x4",stride:s,offset:4*4},aTextureIdAndRound:{buffer:e,format:"uint16x2",stride:s,offset:5*4}},indexBuffer:i})}}});function lr(r,t){let e=Hx[r];return e===void 0&&(Rc[t]===void 0&&(Rc[t]=1),Hx[r]=e=Rc[t]++),e}var Rc,Hx,rn=p(()=>{"use strict";Rc=Object.create(null),Hx=Object.create(null)});function zx(){if(!Ia){Ia="mediump";let r=Ma();r&&r.getShaderPrecisionFormat&&(Ia=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision?"highp":"mediump")}return Ia}var Ia,Wx=p(()=>{Cc()});function Vx(r,t,e){return t?r:e?(r=r.replace("out vec4 finalColor;",""),`\n \n #ifdef GL_ES // This checks if it is WebGL1\n #define in varying\n #define finalColor gl_FragColor\n #define texture texture2D\n #endif\n ${r}\n `):`\n \n #ifdef GL_ES // This checks if it is WebGL1\n #define in attribute\n #define out varying\n #endif\n ${r}\n `}var Xx=p(()=>{"use strict"});function $x(r,t,e){let i=e?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(r.substring(0,9)!=="precision"){let s=e?t.requestedFragmentPrecision:t.requestedVertexPrecision;return s==="highp"&&i!=="highp"&&(s="mediump"),`precision ${s} float;\n${r}`}else if(i!=="highp"&&r.substring(0,15)==="precision highp")return r.replace("precision highp","precision mediump");return r}var jx=p(()=>{"use strict"});function Yx(r,t){return t?`#version 300 es\n${r}`:r}var Kx=p(()=>{"use strict"});function qx(r,{name:t="pixi-program"},e=!0){t=t.replace(/\\s+/g,"-"),t+=e?"-fragment":"-vertex";let i=e?VC:XC;return i[t]?(i[t]++,t+=`-${i[t]}`):i[t]=1,r.indexOf("#define SHADER_NAME")!==-1?r:`${`#define SHADER_NAME ${t}`}\n${r}`}var VC,XC,Zx=p(()=>{"use strict";VC={},XC={}});function Qx(r,t){return t?r.replace("#version 300 es",""):r}var Jx=p(()=>{"use strict"});var kc,Gc,t_,be,ri=p(()=>{rn();Wx();Xx();jx();Kx();Zx();Jx();kc={stripVersion:Qx,ensurePrecision:$x,addProgramDefines:Vx,setProgramName:qx,insertVersion:Yx},Gc=Object.create(null),t_=class Ic{constructor(t){t={...Ic.defaultOptions,...t};let e=t.fragment.indexOf("#version 300 es")!==-1,i={stripVersion:e,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:zx()},setProgramName:{name:t.name},addProgramDefines:e,insertVersion:e},s=t.fragment,n=t.vertex;Object.keys(kc).forEach(o=>{let a=i[o];s=kc[o](s,a,!0),n=kc[o](n,a,!1)}),this.fragment=s,this.vertex=n,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=lr(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null}static from(t){let e=`${t.vertex}:${t.fragment}`;return Gc[e]||(Gc[e]=new Ic(t)),Gc[e]}};t_.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};be=t_});function ae(r){return e_[r]??e_.float32}var e_,ii=p(()=>{"use strict";e_={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}}});function r_({source:r,entryPoint:t}){let e={},i=r.indexOf(`fn ${t}`);if(i!==-1){let s=r.indexOf("->",i);if(s!==-1){let n=r.substring(i,s),o=/@location\\((\\d+)\\)\\s+([a-zA-Z0-9_]+)\\s*:\\s*([a-zA-Z0-9_<>]+)(?:,|\\s|$)/g,a;for(;(a=o.exec(n))!==null;){let u=$C[a[3]]??"float32";e[a[2]]={location:parseInt(a[1],10),format:u,stride:ae(u).stride,offset:0,instance:!1,start:0}}}}return e}var $C,i_=p(()=>{ii();$C={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"}});function Ua(r){let t=/(^|[^/])@(group|binding)\\(\\d+\\)[^;]+;/g,e=/@group\\((\\d+)\\)/,i=/@binding\\((\\d+)\\)/,s=/var(<[^>]+>)? (\\w+)/,n=/:\\s*(\\w+)/,o=/struct\\s+(\\w+)\\s*{([^}]+)}/g,a=/(\\w+)\\s*:\\s*([\\w\\<\\>]+)/g,u=/struct\\s+(\\w+)/,l=r.match(t)?.map(h=>({group:parseInt(h.match(e)[1],10),binding:parseInt(h.match(i)[1],10),name:h.match(s)[2],isUniform:h.match(s)[1]==="<uniform>",type:h.match(n)[1]}));if(!l)return{groups:[],structs:[]};let c=r.match(o)?.map(h=>{let d=h.match(u)[1],f=h.match(a).reduce((m,g)=>{let[x,_]=g.split(":");return m[x.trim()]=_.trim(),m},{});return f?{name:d,members:f}:null}).filter(({name:h})=>l.some(d=>d.type===h))??[];return{groups:l,structs:c}}var s_=p(()=>{"use strict"});var Mi,n_=p(()=>{"use strict";Mi=(r=>(r[r.VERTEX=1]="VERTEX",r[r.FRAGMENT=2]="FRAGMENT",r[r.COMPUTE=4]="COMPUTE",r))(Mi||{})});function o_({groups:r}){let t=[];for(let e=0;e<r.length;e++){let i=r[e];t[i.group]||(t[i.group]=[]),i.isUniform?t[i.group].push({binding:i.binding,visibility:Mi.VERTEX|Mi.FRAGMENT,buffer:{type:"uniform"}}):i.type==="sampler"?t[i.group].push({binding:i.binding,visibility:Mi.FRAGMENT,sampler:{type:"filtering"}}):i.type==="texture_2d"&&t[i.group].push({binding:i.binding,visibility:Mi.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}})}return t}var a_=p(()=>{n_()});function u_({groups:r}){let t=[];for(let e=0;e<r.length;e++){let i=r[e];t[i.group]||(t[i.group]={}),t[i.group][i.name]=i.binding}return t}var l_=p(()=>{"use strict"});function c_(r,t){let e=new Set,i=new Set,s=[...r.structs,...t.structs].filter(o=>e.has(o.name)?!1:(e.add(o.name),!0)),n=[...r.groups,...t.groups].filter(o=>{let a=`${o.name}-${o.binding}`;return i.has(a)?!1:(i.add(a),!0)});return{structs:s,groups:n}}var h_=p(()=>{"use strict"});var Uc,ve,Fi=p(()=>{rn();i_();s_();a_();l_();h_();Uc=Object.create(null),ve=class r{constructor(t){this._layoutKey=0,this._attributeLocationsKey=0;let{fragment:e,vertex:i,layout:s,gpuLayout:n,name:o}=t;if(this.name=o,this.fragment=e,this.vertex=i,e.source===i.source){let a=Ua(e.source);this.structsAndGroups=a}else{let a=Ua(i.source),u=Ua(e.source);this.structsAndGroups=c_(a,u)}this.layout=s??u_(this.structsAndGroups),this.gpuLayout=n??o_(this.structsAndGroups),this.autoAssignGlobalUniforms=this.layout[0]?.globalUniforms!==void 0,this.autoAssignLocalUniforms=this.layout[1]?.localUniforms!==void 0,this._generateProgramKey()}_generateProgramKey(){let{vertex:t,fragment:e}=this,i=t.source+e.source+t.entryPoint+e.entryPoint;this._layoutKey=lr(i,"program")}get attributeData(){return this._attributeData??(this._attributeData=r_(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null}static from(t){let e=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return Uc[e]||(Uc[e]=new r(t)),Uc[e]}}});function Oc(r,t,e){if(r)for(let i in r){let s=i.toLocaleLowerCase(),n=t[s];if(n){let o=r[i];i==="header"&&(o=o.replace(/@in\\s+[^;]+;\\s*/g,"").replace(/@out\\s+[^;]+;\\s*/g,"")),e&&n.push(`//----${e}----//`),n.push(o)}else z(`${i} placement hook does not exist in shader`)}}var f_=p(()=>{gt()});function Lc(r){let t={};return(r.match(jC)?.map(i=>i.replace(/[{()}]/g,""))??[]).forEach(i=>{t[i]=[]}),t}var jC,d_=p(()=>{"use strict";jC=/\\{\\{(.*?)\\}\\}/g});function p_(r,t){let e,i=/@in\\s+([^;]+);/g;for(;(e=i.exec(r))!==null;)t.push(e[1])}function Nc(r,t,e=!1){let i=[];p_(t,i),r.forEach(a=>{a.header&&p_(a.header,i)});let s=i;e&&s.sort();let n=s.map((a,u)=>` @location(${u}) ${a},`).join(`\n`),o=t.replace(/@in\\s+[^;]+;\\s*/g,"");return o=o.replace("{{in}}",`\n${n}\n`),o}var m_=p(()=>{"use strict"});function g_(r,t){let e,i=/@out\\s+([^;]+);/g;for(;(e=i.exec(r))!==null;)t.push(e[1])}function YC(r){let e=/\\b(\\w+)\\s*:/g.exec(r);return e?e[1]:""}function KC(r){let t=/@.*?\\s+/g;return r.replace(t,"")}function x_(r,t){let e=[];g_(t,e),r.forEach(u=>{u.header&&g_(u.header,e)});let i=0,s=e.sort().map(u=>u.indexOf("builtin")>-1?u:`@location(${i++}) ${u}`).join(`,\n`),n=e.sort().map(u=>` var ${KC(u)};`).join(`\n`),o=`return VSOutput(\n ${e.sort().map(u=>` ${YC(u)}`).join(`,\n`)});`,a=t.replace(/@out\\s+[^;]+;\\s*/g,"");return a=a.replace("{{struct}}",`\n${s}\n`),a=a.replace("{{start}}",`\n${n}\n`),a=a.replace("{{return}}",`\n${o}\n`),a}var __=p(()=>{"use strict"});function Hc(r,t){let e=r;for(let i in t){let s=t[i];s.join(`\n`).length?e=e.replace(`{{${i}}}`,`//-----${i} START-----//\n${s.join(`\n`)}\n//----${i} FINISH----//`):e=e.replace(`{{${i}}}`,"")}return e}var y_=p(()=>{"use strict"});function b_({template:r,bits:t}){let e=T_(r,t);if(Cr[e])return Cr[e];let{vertex:i,fragment:s}=ZC(r,t);return Cr[e]=S_(i,s,t),Cr[e]}function v_({template:r,bits:t}){let e=T_(r,t);return Cr[e]||(Cr[e]=S_(r.vertex,r.fragment,t)),Cr[e]}function ZC(r,t){let e=t.map(o=>o.vertex).filter(o=>!!o),i=t.map(o=>o.fragment).filter(o=>!!o),s=Nc(e,r.vertex,!0);s=x_(e,s);let n=Nc(i,r.fragment,!0);return{vertex:s,fragment:n}}function T_(r,t){return t.map(e=>(zc.has(e)||zc.set(e,qC++),zc.get(e))).sort((e,i)=>e-i).join("-")+r.vertex+r.fragment}function S_(r,t,e){let i=Lc(r),s=Lc(t);return e.forEach(n=>{Oc(n.vertex,i,n.name),Oc(n.fragment,s,n.name)}),{vertex:Hc(r,i),fragment:Hc(t,s)}}var Cr,zc,qC,w_=p(()=>{f_();d_();m_();__();y_();Cr=Object.create(null),zc=new Map,qC=0});var E_,C_,A_,D_,P_=p(()=>{"use strict";E_=`\n @in aPosition: vec2<f32>;\n @in aUV: vec2<f32>;\n\n @out @builtin(position) vPosition: vec4<f32>;\n @out vUV : vec2<f32>;\n @out vColor : vec4<f32>;\n\n {{header}}\n\n struct VSOutput {\n {{struct}}\n };\n\n @vertex\n fn main( {{in}} ) -> VSOutput {\n\n var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;\n var modelMatrix = mat3x3<f32>(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n var position = aPosition;\n var uv = aUV;\n\n {{start}}\n \n vColor = vec4<f32>(1., 1., 1., 1.);\n\n {{main}}\n\n vUV = uv;\n\n var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;\n\n vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);\n \n vColor *= globalUniforms.uWorldColorAlpha;\n\n {{end}}\n\n {{return}}\n };\n`,C_=`\n @in vUV : vec2<f32>;\n @in vColor : vec4<f32>;\n \n {{header}}\n\n @fragment\n fn main(\n {{in}}\n ) -> @location(0) vec4<f32> {\n \n {{start}}\n\n var outColor:vec4<f32>;\n \n {{main}}\n \n var finalColor:vec4<f32> = outColor * vColor;\n\n {{end}}\n\n return finalColor;\n };\n`,A_=`\n in vec2 aPosition;\n in vec2 aUV;\n\n out vec4 vColor;\n out vec2 vUV;\n\n {{header}}\n\n void main(void){\n\n mat3 worldTransformMatrix = uWorldTransformMatrix;\n mat3 modelMatrix = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n vec2 position = aPosition;\n vec2 uv = aUV;\n \n {{start}}\n \n vColor = vec4(1.);\n \n {{main}}\n \n vUV = uv;\n \n mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;\n\n gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n\n vColor *= uWorldColorAlpha;\n\n {{end}}\n }\n`,D_=`\n \n in vec4 vColor;\n in vec2 vUV;\n\n out vec4 finalColor;\n\n {{header}}\n\n void main(void) {\n \n {{start}}\n\n vec4 outColor;\n \n {{main}}\n \n finalColor = outColor * vColor;\n \n {{end}}\n }\n`});var B_,M_,F_=p(()=>{"use strict";B_={name:"global-uniforms-bit",vertex:{header:`\n struct GlobalUniforms {\n uProjectionMatrix:mat3x3<f32>,\n uWorldTransformMatrix:mat3x3<f32>,\n uWorldColorAlpha: vec4<f32>,\n uResolution: vec2<f32>,\n }\n\n @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;\n `}},M_={name:"global-uniforms-bit",vertex:{header:`\n uniform mat3 uProjectionMatrix;\n uniform mat3 uWorldTransformMatrix;\n uniform vec4 uWorldColorAlpha;\n uniform vec2 uResolution;\n `}}});function Ne({bits:r,name:t}){let e=b_({template:{fragment:C_,vertex:E_},bits:[B_,...r]});return ve.from({name:t,vertex:{source:e.vertex,entryPoint:"main"},fragment:{source:e.fragment,entryPoint:"main"}})}function He({bits:r,name:t}){return new be({name:t,...v_({template:{vertex:A_,fragment:D_},bits:[M_,...r]})})}var Ar=p(()=>{ri();Fi();w_();P_();F_()});var Ri,ki,sn=p(()=>{"use strict";Ri={name:"color-bit",vertex:{header:`\n @in aColor: vec4<f32>;\n `,main:`\n vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);\n `}},ki={name:"color-bit",vertex:{header:`\n in vec4 aColor;\n `,main:`\n vColor *= vec4(aColor.rgb * aColor.a, aColor.a);\n `}}});function QC(r){let t=[];if(r===1)t.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),t.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let e=0;for(let i=0;i<r;i++)t.push(`@group(1) @binding(${e++}) var textureSource${i+1}: texture_2d<f32>;`),t.push(`@group(1) @binding(${e++}) var textureSampler${i+1}: sampler;`)}return t.join(`\n`)}function JC(r){let t=[];if(r===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let e=0;e<r;e++)e===r-1?t.push(" default:{"):t.push(` case ${e}:{`),t.push(` outColor = textureSampleGrad(textureSource${e+1}, textureSampler${e+1}, vUV, uvDx, uvDy);`),t.push(" break;}");t.push("}")}return t.join(`\n`)}function Gi(r){return Wc[r]||(Wc[r]={name:"texture-batch-bit",vertex:{header:`\n @in aTextureIdAndRound: vec2<u32>;\n @out @interpolate(flat) vTextureId : u32;\n `,main:`\n vTextureId = aTextureIdAndRound.y;\n `,end:`\n if(aTextureIdAndRound.x == 1)\n {\n vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);\n }\n `},fragment:{header:`\n @in @interpolate(flat) vTextureId: u32;\n\n ${QC(r)}\n `,main:`\n var uvDx = dpdx(vUV);\n var uvDy = dpdy(vUV);\n\n ${JC(r)}\n `}}),Wc[r]}function tA(r){let t=[];for(let e=0;e<r;e++)e>0&&t.push("else"),e<r-1&&t.push(`if(vTextureId < ${e}.5)`),t.push("{"),t.push(` outColor = texture(uTextures[${e}], vUV);`),t.push("}");return t.join(`\n`)}function Ii(r){return Vc[r]||(Vc[r]={name:"texture-batch-bit",vertex:{header:`\n in vec2 aTextureIdAndRound;\n out float vTextureId;\n\n `,main:`\n vTextureId = aTextureIdAndRound.y;\n `,end:`\n if(aTextureIdAndRound.x == 1.)\n {\n gl_Position.xy = roundPixels(gl_Position.xy, uResolution);\n }\n `},fragment:{header:`\n in float vTextureId;\n\n uniform sampler2D uTextures[${r}];\n\n `,main:`\n\n ${tA(r)}\n `}}),Vc[r]}var Wc,Vc,nn=p(()=>{"use strict";Wc={};Vc={}});var ze,We,Dr=p(()=>{"use strict";ze={name:"round-pixels-bit",vertex:{header:`\n fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32> \n {\n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n }\n `}},We={name:"round-pixels-bit",vertex:{header:` \n vec2 roundPixels(vec2 position, vec2 targetSize)\n { \n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n }\n `}}});var Xc,R_,k_=p(()=>{"use strict";Xc=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],R_=Xc.reduce((r,t)=>(r[t]=!0,r),{})});function G_(r,t){switch(r){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*t);case"vec3<f32>":return new Float32Array(3*t);case"vec4<f32>":return new Float32Array(4*t);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var I_=p(()=>{"use strict"});var U_,ct,ee=p(()=>{jt();rn();k_();I_();U_=class O_{constructor(t,e){this._touched=0,this.uid=rt("uniform"),this._resourceType="uniformGroup",this._resourceId=rt("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,e={...O_.defaultOptions,...e},this.uniformStructures=t;let i={};for(let s in t){let n=t[s];if(n.name=s,n.size=n.size??1,!R_[n.type])throw new Error(`Uniform type ${n.type} is not supported. Supported uniform types are: ${Xc.join(", ")}`);n.value??(n.value=G_(n.type,n.size)),i[s]=n.value}this.uniforms=i,this._dirtyId=1,this.ubo=e.ubo,this.isStatic=e.isStatic,this._signature=lr(Object.keys(i).map(s=>`${s}-${t[s].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};U_.defaultOptions={ubo:!1,isStatic:!1};ct=U_});function Ui(r){let t=L_[r];if(t)return t;let e=new Int32Array(r);for(let i=0;i<r;i++)e[i]=i;return t=L_[r]=new ct({uTextures:{value:e,type:"i32",size:r}},{isStatic:!0}),t}var L_,Oa=p(()=>{ee();L_={}});var Mt,Ve=p(()=>{"use strict";Mt=(r=>(r[r.WEBGL=1]="WEBGL",r[r.WEBGPU=2]="WEBGPU",r[r.BOTH=3]="BOTH",r))(Mt||{})});var St,Be=p(()=>{Xt();ri();wr();Fi();Ve();ee();St=class r extends ht{constructor(t){super(),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[];let{gpuProgram:e,glProgram:i,groups:s,resources:n,compatibleRenderers:o,groupMap:a}=t;this.gpuProgram=e,this.glProgram=i,o===void 0&&(o=0,e&&(o|=Mt.WEBGPU),i&&(o|=Mt.WEBGL)),this.compatibleRenderers=o;let u={};if(!n&&!s&&(n={}),n&&s)throw new Error("[Shader] Cannot have both resources and groups");if(!e&&s&&!a)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!e&&s&&a)for(let l in a)for(let c in a[l]){let h=a[l][c];u[h]={group:l,binding:c,name:h}}else if(e&&s&&!a){let l=e.structsAndGroups.groups;a={},l.forEach(c=>{a[c.group]=a[c.group]||{},a[c.group][c.binding]=c.name,u[c.name]=c})}else if(n){s={},a={},e&&e.structsAndGroups.groups.forEach(h=>{a[h.group]=a[h.group]||{},a[h.group][h.binding]=h.name,u[h.name]=h});let l=0;for(let c in n)u[c]||(s[99]||(s[99]=new It,this._ownedBindGroups.push(s[99])),u[c]={group:99,binding:l,name:c},a[99]=a[99]||{},a[99][l]=c,l++);for(let c in n){let h=c,d=n[c];!d.source&&!d._resourceType&&(d=new ct(d));let f=u[h];f&&(s[f.group]||(s[f.group]=new It,this._ownedBindGroups.push(s[f.group])),s[f.group].setResource(d,f.binding))}}this.groups=s,this._uniformBindMap=a,this.resources=this._buildResourceAccessor(s,u)}addResource(t,e,i){var s,n;(s=this._uniformBindMap)[e]||(s[e]={}),(n=this._uniformBindMap[e])[i]||(n[i]=t),this.groups[e]||(this.groups[e]=new It,this._ownedBindGroups.push(this.groups[e]))}_buildResourceAccessor(t,e){let i={};for(let s in e){let n=e[s];Object.defineProperty(i,n.name,{get(){return t[n.group].getResource(n.binding)},set(o){t[n.group].setResource(o,n.binding)}})}return i}destroy(t=!1){this.emit("destroy",this),t&&(this.gpuProgram?.destroy(),this.glProgram?.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(e=>{e.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null}static from(t){let{gpu:e,gl:i,...s}=t,n,o;return e&&(n=ve.from(e)),i&&(o=be.from(i)),new r({gpuProgram:n,glProgram:o,...s})}}});var La,N_=p(()=>{Ar();sn();nn();Dr();Oa();Be();La=class extends St{constructor(t){let e=He({name:"batch",bits:[ki,Ii(t),We]}),i=Ne({name:"batch",bits:[Ri,Gi(t),ze]});super({glProgram:e,gpuProgram:i,resources:{batchSamplers:Ui(t)}})}}});var H_,z_,on,$c=p(()=>{D();Ix();Nx();N_();H_=null,z_=class W_ extends Gx{constructor(){super(...arguments),this.geometry=new Ga,this.shader=H_||(H_=new La(this.maxTextures)),this.name=W_.extension.name,this.vertexSize=6}packAttributes(t,e,i,s,n){let o=n<<16|t.roundPixels&65535,a=t.transform,u=a.a,l=a.b,c=a.c,h=a.d,d=a.tx,f=a.ty,{positions:m,uvs:g}=t,x=t.color,_=t.attributeOffset,v=_+t.attributeSize;for(let T=_;T<v;T++){let y=T*2,C=m[y],S=m[y+1];e[s++]=u*C+c*S+d,e[s++]=h*S+l*C+f,e[s++]=g[y],e[s++]=g[y+1],i[s++]=x,i[s++]=o}}packQuadAttributes(t,e,i,s,n){let o=t.texture,a=t.transform,u=a.a,l=a.b,c=a.c,h=a.d,d=a.tx,f=a.ty,m=t.bounds,g=m.maxX,x=m.minX,_=m.maxY,v=m.minY,T=o.uvs,y=t.color,C=n<<16|t.roundPixels&65535;e[s+0]=u*x+c*v+d,e[s+1]=h*v+l*x+f,e[s+2]=T.x0,e[s+3]=T.y0,i[s+4]=y,i[s+5]=C,e[s+6]=u*g+c*v+d,e[s+7]=h*v+l*g+f,e[s+8]=T.x1,e[s+9]=T.y1,i[s+10]=y,i[s+11]=C,e[s+12]=u*g+c*_+d,e[s+13]=h*_+l*g+f,e[s+14]=T.x2,e[s+15]=T.y2,i[s+16]=y,i[s+17]=C,e[s+18]=u*x+c*_+d,e[s+19]=h*_+l*x+f,e[s+20]=T.x3,e[s+21]=T.y3,i[s+22]=y,i[s+23]=C}};z_.extension={type:[b.Batcher],name:"default"};on=z_});function V_(r,t,e,i,s,n,o,a=null){let u=0;e*=t,s*=n;let l=a.a,c=a.b,h=a.c,d=a.d,f=a.tx,m=a.ty;for(;u<o;){let g=r[e],x=r[e+1];i[s]=l*g+h*x+f,i[s+1]=c*g+d*x+m,s+=n,e+=t,u++}}function X_(r,t,e,i){let s=0;for(t*=e;s<i;)r[t]=0,r[t+1]=0,t+=e,s++}var $_=p(()=>{"use strict"});function jc(r,t,e,i,s){let n=t.a,o=t.b,a=t.c,u=t.d,l=t.tx,c=t.ty;e||(e=0),i||(i=2),s||(s=r.length/i-e);let h=e*i;for(let d=0;d<s;d++){let f=r[h],m=r[h+1];r[h]=n*f+a*m+l,r[h+1]=o*f+u*m+c,h+=i}}var j_=p(()=>{"use strict"});var eA,si,Yc=p(()=>{ot();Hl();eA=new G,si=class{constructor(){this.packAsQuad=!1,this.batcherName="default",this.topology="triangle-list",this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.applyTransform?this.renderable.groupBlendMode:"normal"}get color(){let t=this.baseColor,e=t>>16|t&65280|(t&255)<<16,i=this.renderable;return i?ca(e,i.groupColor)+(this.alpha*i.groupAlpha*255<<24):e+(this.alpha*255<<24)}get transform(){return this.renderable?.groupTransform||eA}copyTo(t){t.indexOffset=this.indexOffset,t.indexSize=this.indexSize,t.attributeOffset=this.attributeOffset,t.attributeSize=this.attributeSize,t.baseColor=this.baseColor,t.alpha=this.alpha,t.texture=this.texture,t.geometryData=this.geometryData,t.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology="triangle-list"}}});var Oi,Y_,K_,q_=p(()=>{D();Oi={extension:{type:b.ShapeBuilder,name:"circle"},build(r,t){let e,i,s,n,o,a;if(r.type==="circle"){let y=r;e=y.x,i=y.y,o=a=y.radius,s=n=0}else if(r.type==="ellipse"){let y=r;e=y.x,i=y.y,o=y.halfWidth,a=y.halfHeight,s=n=0}else{let y=r,C=y.width/2,S=y.height/2;e=y.x+C,i=y.y+S,o=a=Math.max(0,Math.min(y.radius,Math.min(C,S))),s=C-o,n=S-a}if(!(o>=0&&a>=0&&s>=0&&n>=0))return t;let u=Math.ceil(2.3*Math.sqrt(o+a)),l=u*8+(s?4:0)+(n?4:0);if(l===0)return t;if(u===0)return t[0]=t[6]=e+s,t[1]=t[3]=i+n,t[2]=t[4]=e-s,t[5]=t[7]=i-n,t;let c=0,h=u*4+(s?2:0)+2,d=h,f=l,m=s+o,g=n,x=e+m,_=e-m,v=i+g;if(t[c++]=x,t[c++]=v,t[--h]=v,t[--h]=_,n){let y=i-g;t[d++]=_,t[d++]=y,t[--f]=y,t[--f]=x}for(let y=1;y<u;y++){let C=Math.PI/2*(y/u),S=s+Math.cos(C)*o,E=n+Math.sin(C)*a,P=e+S,U=e-S,M=i+E,k=i-E;t[c++]=P,t[c++]=M,t[--h]=M,t[--h]=U,t[d++]=U,t[d++]=k,t[--f]=k,t[--f]=P}m=s,g=n+a,x=e+m,_=e-m,v=i+g;let T=i-g;return t[c++]=x,t[c++]=v,t[--f]=T,t[--f]=x,s&&(t[c++]=_,t[c++]=v,t[--f]=T,t[--f]=_),t},triangulate(r,t,e,i,s,n){if(r.length===0)return;let o=0,a=0;for(let c=0;c<r.length;c+=2)o+=r[c],a+=r[c+1];o/=r.length/2,a/=r.length/2;let u=i;t[u*e]=o,t[u*e+1]=a;let l=u++;for(let c=0;c<r.length;c+=2)t[u*e]=r[c],t[u*e+1]=r[c+1],c>0&&(s[n++]=u,s[n++]=l,s[n++]=u-1),u++;s[n++]=l+1,s[n++]=l,s[n++]=u-1}},Y_={...Oi,extension:{...Oi.extension,name:"ellipse"}},K_={...Oi,extension:{...Oi.extension,name:"roundedRectangle"}}});function Z_(r){let t=r.length;if(t<6)return 1;let e=0;for(let i=0,s=r[t-2],n=r[t-1];i<t;i+=2){let o=r[i],a=r[i+1];e+=(o-s)*(a+n),s=o,n=a}return e<0?-1:1}var Q_=p(()=>{"use strict"});function J_(r,t,e,i,s,n,o,a){let u=r-e*s,l=t-i*s,c=r+e*n,h=t+i*n,d,f;o?(d=i,f=-e):(d=-i,f=e);let m=u+d,g=l+f,x=c+d,_=h+f;return a.push(m,g),a.push(x,_),2}function ni(r,t,e,i,s,n,o,a){let u=e-r,l=i-t,c=Math.atan2(u,l),h=Math.atan2(s-r,n-t);a&&c<h?c+=Math.PI*2:!a&&c>h&&(h+=Math.PI*2);let d=c,f=h-c,m=Math.abs(f),g=Math.sqrt(u*u+l*l),x=(15*m*Math.sqrt(g)/Math.PI>>0)+1,_=f/x;if(d+=_,a){o.push(r,t),o.push(e,i);for(let v=1,T=d;v<x;v++,T+=_)o.push(r,t),o.push(r+Math.sin(T)*g,t+Math.cos(T)*g);o.push(r,t),o.push(s,n)}else{o.push(e,i),o.push(r,t);for(let v=1,T=d;v<x;v++,T+=_)o.push(r+Math.sin(T)*g,t+Math.cos(T)*g),o.push(r,t);o.push(s,n),o.push(r,t)}return x*2}function ty(r,t,e,i,s,n){let o=1e-4;if(r.length===0)return;let a=t,u=a.alignment;if(t.alignment!==.5){let O=Z_(r);e&&(O*=-1),u=(u-.5)*O+.5}let l=new et(r[0],r[1]),c=new et(r[r.length-2],r[r.length-1]),h=i,d=Math.abs(l.x-c.x)<o&&Math.abs(l.y-c.y)<o;if(h){r=r.slice(),d&&(r.pop(),r.pop(),c.set(r[r.length-2],r[r.length-1]));let O=(l.x+c.x)*.5,V=(c.y+l.y)*.5;r.unshift(O,V),r.push(O,V)}let f=s,m=r.length/2,g=r.length,x=f.length/2,_=a.width/2,v=_*_,T=a.miterLimit*a.miterLimit,y=r[0],C=r[1],S=r[2],E=r[3],P=0,U=0,M=-(C-E),k=y-S,N=0,q=0,w=Math.sqrt(M*M+k*k);M/=w,k/=w,M*=_,k*=_;let L=u,A=(1-L)*2,B=L*2;h||(a.cap==="round"?g+=ni(y-M*(A-B)*.5,C-k*(A-B)*.5,y-M*A,C-k*A,y+M*B,C+k*B,f,!0)+2:a.cap==="square"&&(g+=J_(y,C,M,k,A,B,!0,f))),f.push(y-M*A,C-k*A),f.push(y+M*B,C+k*B);for(let O=1;O<m-1;++O){y=r[(O-1)*2],C=r[(O-1)*2+1],S=r[O*2],E=r[O*2+1],P=r[(O+1)*2],U=r[(O+1)*2+1],M=-(C-E),k=y-S,w=Math.sqrt(M*M+k*k),M/=w,k/=w,M*=_,k*=_,N=-(E-U),q=S-P,w=Math.sqrt(N*N+q*q),N/=w,q/=w,N*=_,q*=_;let V=S-y,st=C-E,lt=S-P,wt=U-E,yt=V*lt+st*wt,Rt=st*lt-wt*V,Lt=Rt<0;if(Math.abs(Rt)<.001*Math.abs(yt)){f.push(S-M*A,E-k*A),f.push(S+M*B,E+k*B),yt>=0&&(a.join==="round"?g+=ni(S,E,S-M*A,E-k*A,S-N*A,E-q*A,f,!1)+4:g+=2,f.push(S-N*B,E-q*B),f.push(S+N*A,E+q*A));continue}let Nt=(-M+y)*(-k+E)-(-M+S)*(-k+C),At=(-N+P)*(-q+E)-(-N+S)*(-q+U),ie=(V*At-lt*Nt)/Rt,dr=(wt*Nt-st*At)/Rt,hi=(ie-S)*(ie-S)+(dr-E)*(dr-E),Re=S+(ie-S)*A,Se=E+(dr-E)*A,ke=S-(ie-S)*B,qe=E-(dr-E)*B,F=Math.min(V*V+st*st,lt*lt+wt*wt),R=Lt?A:B,j=F+R*R*v;hi<=j?a.join==="bevel"||hi/v>T?(Lt?(f.push(Re,Se),f.push(S+M*B,E+k*B),f.push(Re,Se),f.push(S+N*B,E+q*B)):(f.push(S-M*A,E-k*A),f.push(ke,qe),f.push(S-N*A,E-q*A),f.push(ke,qe)),g+=2):a.join==="round"?Lt?(f.push(Re,Se),f.push(S+M*B,E+k*B),g+=ni(S,E,S+M*B,E+k*B,S+N*B,E+q*B,f,!0)+4,f.push(Re,Se),f.push(S+N*B,E+q*B)):(f.push(S-M*A,E-k*A),f.push(ke,qe),g+=ni(S,E,S-M*A,E-k*A,S-N*A,E-q*A,f,!1)+4,f.push(S-N*A,E-q*A),f.push(ke,qe)):(f.push(Re,Se),f.push(ke,qe)):(f.push(S-M*A,E-k*A),f.push(S+M*B,E+k*B),a.join==="round"?Lt?g+=ni(S,E,S+M*B,E+k*B,S+N*B,E+q*B,f,!0)+2:g+=ni(S,E,S-M*A,E-k*A,S-N*A,E-q*A,f,!1)+2:a.join==="miter"&&hi/v<=T&&(Lt?(f.push(ke,qe),f.push(ke,qe)):(f.push(Re,Se),f.push(Re,Se)),g+=2),f.push(S-N*A,E-q*A),f.push(S+N*B,E+q*B),g+=2)}y=r[(m-2)*2],C=r[(m-2)*2+1],S=r[(m-1)*2],E=r[(m-1)*2+1],M=-(C-E),k=y-S,w=Math.sqrt(M*M+k*k),M/=w,k/=w,M*=_,k*=_,f.push(S-M*A,E-k*A),f.push(S+M*B,E+k*B),h||(a.cap==="round"?g+=ni(S-M*(A-B)*.5,E-k*(A-B)*.5,S-M*A,E-k*A,S+M*B,E+k*B,f,!1)+2:a.cap==="square"&&(g+=J_(S,E,M,k,A,B,!1,f)));let $=1e-4*1e-4;for(let O=x;O<g+x-2;++O)y=f[O*2],C=f[O*2+1],S=f[(O+1)*2],E=f[(O+1)*2+1],P=f[(O+2)*2],U=f[(O+2)*2+1],!(Math.abs(y*(E-U)+S*(U-C)+P*(C-E))<$)&&n.push(O,O+1,O+2)}var ey=p(()=>{xe();Q_()});function ry(r,t,e,i){let s=1e-4;if(r.length===0)return;let n=r[0],o=r[1],a=r[r.length-2],u=r[r.length-1],l=t||Math.abs(n-a)<s&&Math.abs(o-u)<s,c=e,h=r.length/2,d=c.length/2;for(let f=0;f<h;f++)c.push(r[f*2]),c.push(r[f*2+1]);for(let f=0;f<h-1;f++)i.push(d+f,d+f+1);l&&i.push(d+h-1,d)}var iy=p(()=>{});var Jc=Ao((d5,Qc)=>{"use strict";Qc.exports=za;Qc.exports.default=za;function za(r,t,e){e=e||2;var i=t&&t.length,s=i?t[0]*e:r.length,n=ny(r,0,s,e,!0),o=[];if(!n||n.next===n.prev)return o;var a,u,l,c,h,d,f;if(i&&(n=uA(r,t,n,e)),r.length>80*e){a=l=r[0],u=c=r[1];for(var m=e;m<s;m+=e)h=r[m],d=r[m+1],h<a&&(a=h),d<u&&(u=d),h>l&&(l=h),d>c&&(c=d);f=Math.max(l-a,c-u),f=f!==0?32767/f:0}return an(n,o,e,a,u,f,0),o}function ny(r,t,e,i,s){var n,o;if(s===Zc(r,t,e,i)>0)for(n=t;n<e;n+=i)o=sy(n,r[n],r[n+1],o);else for(n=e-i;n>=t;n-=i)o=sy(n,r[n],r[n+1],o);return o&&Wa(o,o.next)&&(ln(o),o=o.next),o}function oi(r,t){if(!r)return r;t||(t=r);var e=r,i;do if(i=!1,!e.steiner&&(Wa(e,e.next)||_t(e.prev,e,e.next)===0)){if(ln(e),e=t=e.prev,e===e.next)break;i=!0}else e=e.next;while(i||e!==t);return t}function an(r,t,e,i,s,n,o){if(r){!o&&n&&dA(r,i,s,n);for(var a=r,u,l;r.prev!==r.next;){if(u=r.prev,l=r.next,n?nA(r,i,s,n):sA(r)){t.push(u.i/e|0),t.push(r.i/e|0),t.push(l.i/e|0),ln(r),r=l.next,a=l.next;continue}if(r=l,r===a){o?o===1?(r=oA(oi(r),t,e),an(r,t,e,i,s,n,2)):o===2&&aA(r,t,e,i,s,n):an(oi(r),t,e,i,s,n,1);break}}}}function sA(r){var t=r.prev,e=r,i=r.next;if(_t(t,e,i)>=0)return!1;for(var s=t.x,n=e.x,o=i.x,a=t.y,u=e.y,l=i.y,c=s<n?s<o?s:o:n<o?n:o,h=a<u?a<l?a:l:u<l?u:l,d=s>n?s>o?s:o:n>o?n:o,f=a>u?a>l?a:l:u>l?u:l,m=i.next;m!==t;){if(m.x>=c&&m.x<=d&&m.y>=h&&m.y<=f&&Li(s,a,n,u,o,l,m.x,m.y)&&_t(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function nA(r,t,e,i){var s=r.prev,n=r,o=r.next;if(_t(s,n,o)>=0)return!1;for(var a=s.x,u=n.x,l=o.x,c=s.y,h=n.y,d=o.y,f=a<u?a<l?a:l:u<l?u:l,m=c<h?c<d?c:d:h<d?h:d,g=a>u?a>l?a:l:u>l?u:l,x=c>h?c>d?c:d:h>d?h:d,_=Kc(f,m,t,e,i),v=Kc(g,x,t,e,i),T=r.prevZ,y=r.nextZ;T&&T.z>=_&&y&&y.z<=v;){if(T.x>=f&&T.x<=g&&T.y>=m&&T.y<=x&&T!==s&&T!==o&&Li(a,c,u,h,l,d,T.x,T.y)&&_t(T.prev,T,T.next)>=0||(T=T.prevZ,y.x>=f&&y.x<=g&&y.y>=m&&y.y<=x&&y!==s&&y!==o&&Li(a,c,u,h,l,d,y.x,y.y)&&_t(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;T&&T.z>=_;){if(T.x>=f&&T.x<=g&&T.y>=m&&T.y<=x&&T!==s&&T!==o&&Li(a,c,u,h,l,d,T.x,T.y)&&_t(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;y&&y.z<=v;){if(y.x>=f&&y.x<=g&&y.y>=m&&y.y<=x&&y!==s&&y!==o&&Li(a,c,u,h,l,d,y.x,y.y)&&_t(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function oA(r,t,e){var i=r;do{var s=i.prev,n=i.next.next;!Wa(s,n)&&oy(s,i,i.next,n)&&un(s,n)&&un(n,s)&&(t.push(s.i/e|0),t.push(i.i/e|0),t.push(n.i/e|0),ln(i),ln(i.next),i=r=n),i=i.next}while(i!==r);return oi(i)}function aA(r,t,e,i,s,n){var o=r;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&gA(o,a)){var u=ay(o,a);o=oi(o,o.next),u=oi(u,u.next),an(o,t,e,i,s,n,0),an(u,t,e,i,s,n,0);return}a=a.next}o=o.next}while(o!==r)}function uA(r,t,e,i){var s=[],n,o,a,u,l;for(n=0,o=t.length;n<o;n++)a=t[n]*i,u=n<o-1?t[n+1]*i:r.length,l=ny(r,a,u,i,!1),l===l.next&&(l.steiner=!0),s.push(mA(l));for(s.sort(lA),n=0;n<s.length;n++)e=cA(s[n],e);return e}function lA(r,t){return r.x-t.x}function cA(r,t){var e=hA(r,t);if(!e)return t;var i=ay(e,r);return oi(i,i.next),oi(e,e.next)}function hA(r,t){var e=t,i=r.x,s=r.y,n=-1/0,o;do{if(s<=e.y&&s>=e.next.y&&e.next.y!==e.y){var a=e.x+(s-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(a<=i&&a>n&&(n=a,o=e.x<e.next.x?e:e.next,a===i))return o}e=e.next}while(e!==t);if(!o)return null;var u=o,l=o.x,c=o.y,h=1/0,d;e=o;do i>=e.x&&e.x>=l&&i!==e.x&&Li(s<c?i:n,s,l,c,s<c?n:i,s,e.x,e.y)&&(d=Math.abs(s-e.y)/(i-e.x),un(e,r)&&(d<h||d===h&&(e.x>o.x||e.x===o.x&&fA(o,e)))&&(o=e,h=d)),e=e.next;while(e!==u);return o}function fA(r,t){return _t(r.prev,r,t.prev)<0&&_t(t.next,r,r.next)<0}function dA(r,t,e,i){var s=r;do s.z===0&&(s.z=Kc(s.x,s.y,t,e,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==r);s.prevZ.nextZ=null,s.prevZ=null,pA(s)}function pA(r){var t,e,i,s,n,o,a,u,l=1;do{for(e=r,r=null,n=null,o=0;e;){for(o++,i=e,a=0,t=0;t<l&&(a++,i=i.nextZ,!!i);t++);for(u=l;a>0||u>0&&i;)a!==0&&(u===0||!i||e.z<=i.z)?(s=e,e=e.nextZ,a--):(s=i,i=i.nextZ,u--),n?n.nextZ=s:r=s,s.prevZ=n,n=s;e=i}n.nextZ=null,l*=2}while(o>1);return r}function Kc(r,t,e,i,s){return r=(r-e)*s|0,t=(t-i)*s|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,r|t<<1}function mA(r){var t=r,e=r;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==r);return e}function Li(r,t,e,i,s,n,o,a){return(s-o)*(t-a)>=(r-o)*(n-a)&&(r-o)*(i-a)>=(e-o)*(t-a)&&(e-o)*(n-a)>=(s-o)*(i-a)}function gA(r,t){return r.next.i!==t.i&&r.prev.i!==t.i&&!xA(r,t)&&(un(r,t)&&un(t,r)&&_A(r,t)&&(_t(r.prev,r,t.prev)||_t(r,t.prev,t))||Wa(r,t)&&_t(r.prev,r,r.next)>0&&_t(t.prev,t,t.next)>0)}function _t(r,t,e){return(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y)}function Wa(r,t){return r.x===t.x&&r.y===t.y}function oy(r,t,e,i){var s=Ha(_t(r,t,e)),n=Ha(_t(r,t,i)),o=Ha(_t(e,i,r)),a=Ha(_t(e,i,t));return!!(s!==n&&o!==a||s===0&&Na(r,e,t)||n===0&&Na(r,i,t)||o===0&&Na(e,r,i)||a===0&&Na(e,t,i))}function Na(r,t,e){return t.x<=Math.max(r.x,e.x)&&t.x>=Math.min(r.x,e.x)&&t.y<=Math.max(r.y,e.y)&&t.y>=Math.min(r.y,e.y)}function Ha(r){return r>0?1:r<0?-1:0}function xA(r,t){var e=r;do{if(e.i!==r.i&&e.next.i!==r.i&&e.i!==t.i&&e.next.i!==t.i&&oy(e,e.next,r,t))return!0;e=e.next}while(e!==r);return!1}function un(r,t){return _t(r.prev,r,r.next)<0?_t(r,t,r.next)>=0&&_t(r,r.prev,t)>=0:_t(r,t,r.prev)<0||_t(r,r.next,t)<0}function _A(r,t){var e=r,i=!1,s=(r.x+t.x)/2,n=(r.y+t.y)/2;do e.y>n!=e.next.y>n&&e.next.y!==e.y&&s<(e.next.x-e.x)*(n-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next;while(e!==r);return i}function ay(r,t){var e=new qc(r.i,r.x,r.y),i=new qc(t.i,t.x,t.y),s=r.next,n=t.prev;return r.next=t,t.prev=r,e.next=s,s.prev=e,i.next=e,e.prev=i,n.next=i,i.prev=n,i}function sy(r,t,e,i){var s=new qc(r,t,e);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function ln(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function qc(r,t,e){this.i=r,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}za.deviation=function(r,t,e,i){var s=t&&t.length,n=s?t[0]*e:r.length,o=Math.abs(Zc(r,0,n,e));if(s)for(var a=0,u=t.length;a<u;a++){var l=t[a]*e,c=a<u-1?t[a+1]*e:r.length;o-=Math.abs(Zc(r,l,c,e))}var h=0;for(a=0;a<i.length;a+=3){var d=i[a]*e,f=i[a+1]*e,m=i[a+2]*e;h+=Math.abs((r[d]-r[m])*(r[f+1]-r[d+1])-(r[d]-r[f])*(r[m+1]-r[d+1]))}return o===0&&h===0?0:Math.abs((h-o)/o)};function Zc(r,t,e,i){for(var s=0,n=t,o=e-i;n<e;n+=i)s+=(r[o]-r[n])*(r[n+1]+r[o+1]),o=n;return s}za.flatten=function(r){for(var t=r[0][0].length,e={vertices:[],holes:[],dimensions:t},i=0,s=0;s<r.length;s++){for(var n=0;n<r[s].length;n++)for(var o=0;o<t;o++)e.vertices.push(r[s][n][o]);s>0&&(i+=r[s-1].length,e.holes.push(i))}return e}});function Va(r,t,e,i,s,n,o){let a=(0,uy.default)(r,t,2);if(!a)return;for(let l=0;l<a.length;l+=3)n[o++]=a[l]+s,n[o++]=a[l+1]+s,n[o++]=a[l+2]+s;let u=s*i;for(let l=0;l<r.length;l+=2)e[u]=r[l],e[u+1]=r[l+1],u+=i}var uy,th=p(()=>{uy=ds(Jc(),1)});var yA,ly,cy=p(()=>{D();th();yA=[],ly={extension:{type:b.ShapeBuilder,name:"polygon"},build(r,t){for(let e=0;e<r.points.length;e++)t[e]=r.points[e];return t},triangulate(r,t,e,i,s,n){Va(r,yA,t,e,i,s,n)}}});var hy,fy=p(()=>{D();hy={extension:{type:b.ShapeBuilder,name:"rectangle"},build(r,t){let e=r,i=e.x,s=e.y,n=e.width,o=e.height;return n>=0&&o>=0&&(t[0]=i,t[1]=s,t[2]=i+n,t[3]=s,t[4]=i+n,t[5]=s+o,t[6]=i,t[7]=s+o),t},triangulate(r,t,e,i,s,n){let o=0;i*=e,t[i+o]=r[0],t[i+o+1]=r[1],o+=e,t[i+o]=r[2],t[i+o+1]=r[3],o+=e,t[i+o]=r[6],t[i+o+1]=r[7],o+=e,t[i+o]=r[4],t[i+o+1]=r[5],o+=e;let a=i/e;s[n++]=a,s[n++]=a+1,s[n++]=a+2,s[n++]=a+1,s[n++]=a+3,s[n++]=a+2}}});var dy,py=p(()=>{D();dy={extension:{type:b.ShapeBuilder,name:"triangle"},build(r,t){return t[0]=r.x,t[1]=r.y,t[2]=r.x2,t[3]=r.y2,t[4]=r.x3,t[5]=r.y3,t},triangulate(r,t,e,i,s,n){let o=0;i*=e,t[i+o]=r[0],t[i+o+1]=r[1],o+=e,t[i+o]=r[2],t[i+o+1]=r[3],o+=e,t[i+o]=r[4],t[i+o+1]=r[5];let a=i/e;s[n++]=a,s[n++]=a+1,s[n++]=a+2}}});function gy(r,t){let{geometryData:e,batches:i}=t;i.length=0,e.indices.length=0,e.vertices.length=0,e.uvs.length=0;for(let s=0;s<r.instructions.length;s++){let n=r.instructions[s];if(n.action==="texture")vA(n.data,i,e);else if(n.action==="fill"||n.action==="stroke"){let o=n.action==="stroke",a=n.data.path.shapePath,u=n.data.style,l=n.data.hole;o&&l&&my(l.shapePath,u,null,!0,i,e),my(a,u,l,o,i,e)}}}function vA(r,t,e){let{vertices:i,uvs:s,indices:n}=e,o=n.length,a=i.length/2,u=[],l=Xa.rectangle,c=bA,h=r.image;c.x=r.dx,c.y=r.dy,c.width=r.dw,c.height=r.dh;let d=r.transform;l.build(c,u),d&&jc(u,d),l.triangulate(u,i,2,a,n,o);let f=h.uvs;s.push(f.x0,f.y0,f.x1,f.y1,f.x3,f.y3,f.x2,f.y2);let m=K.get(si);m.indexOffset=o,m.indexSize=n.length-o,m.attributeOffset=a,m.attributeSize=i.length/2-a,m.baseColor=r.style,m.alpha=r.alpha,m.texture=h,m.geometryData=e,t.push(m)}function my(r,t,e,i,s,n){let{vertices:o,uvs:a,indices:u}=n,l=r.shapePrimitives.length-1;r.shapePrimitives.forEach(({shape:c,transform:h},d)=>{let f=u.length,m=o.length/2,g=[],x=Xa[c.type],_="triangle-list";if(x.build(c,g),h&&jc(g,h),i){let C=c.closePath??!0,S=t;S.pixelLine?(ry(g,C,o,u),_="line-list"):ty(g,S,!1,C,o,u)}else if(e&&l===d){l!==0&&console.warn("[Pixi Graphics] only the last shape have be cut out");let C=[],S=g.slice();TA(e.shapePath).forEach(P=>{C.push(S.length/2),S.push(...P)}),Va(S,C,o,2,m,u,f)}else x.triangulate(g,o,2,m,u,f);let v=a.length/2,T=t.texture;if(T!==I.WHITE){let C=t.matrix;C&&(h&&C.append(h.clone().invert()),V_(o,2,m,a,v,2,o.length/2-m,C))}else X_(a,v,2,o.length/2-m);let y=K.get(si);y.indexOffset=f,y.indexSize=u.length-f,y.attributeOffset=m,y.attributeSize=o.length/2-m,y.baseColor=t.color,y.alpha=t.alpha,y.texture=T,y.geometryData=n,y.topology=_,s.push(y)})}function TA(r){if(!r)return[];let t=r.shapePrimitives,e=[];for(let i=0;i<t.length;i++){let s=t[i].shape,n=[];Xa[s.type].build(s,n),e.push(n)}return e}var Xa,bA,xy=p(()=>{D();Yt();$_();j_();dt();Qt();Yc();q_();ey();iy();cy();fy();py();th();Xa={};H.handleByMap(b.ShapeBuilder,Xa);H.add(hy,ly,dy,Oi,Y_,K_);bA=new tt});var eh,rh,sh,Ni,$a=p(()=>{D();Fa();$c();Xl();vt();Qt();xy();eh=class{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}},rh=class{constructor(){this.batcher=new on,this.instructions=new Ti}init(){this.instructions.reset()}get geometry(){return X(Lm,"GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),this.batcher.geometry}},sh=class ih{constructor(t){this._gpuContextHash={},this._graphicsDataContextHash=Object.create(null),t.renderableGC.addManagedHash(this,"_gpuContextHash"),t.renderableGC.addManagedHash(this,"_graphicsDataContextHash")}init(t){ih.defaultOptions.bezierSmoothness=t?.bezierSmoothness??ih.defaultOptions.bezierSmoothness}getContextRenderData(t){return this._graphicsDataContextHash[t.uid]||this._initContextRenderData(t)}updateGpuContext(t){let e=this._gpuContextHash[t.uid]||this._initContext(t);if(t.dirty){e?this._cleanGraphicsContextData(t):e=this._initContext(t),gy(t,e);let i=t.batchMode;t.customShader||i==="no-batch"?e.isBatchable=!1:i==="auto"&&(e.isBatchable=e.geometryData.vertices.length<400),t.dirty=!1}return e}getGpuContext(t){return this._gpuContextHash[t.uid]||this._initContext(t)}_initContextRenderData(t){let e=K.get(rh),{batches:i,geometryData:s}=this._gpuContextHash[t.uid],n=s.vertices.length,o=s.indices.length;for(let c=0;c<i.length;c++)i[c].applyTransform=!1;let a=e.batcher;a.ensureAttributeBuffer(n),a.ensureIndexBuffer(o),a.begin();for(let c=0;c<i.length;c++){let h=i[c];a.add(h)}a.finish(e.instructions);let u=a.geometry;u.indexBuffer.setDataWithSize(a.indexBuffer,a.indexSize,!0),u.buffers[0].setDataWithSize(a.attributeBuffer.float32View,a.attributeSize,!0);let l=a.batches;for(let c=0;c<l.length;c++){let h=l[c];h.bindGroup=Pi(h.textures.textures,h.textures.count)}return this._graphicsDataContextHash[t.uid]=e,e}_initContext(t){let e=new eh;return e.context=t,this._gpuContextHash[t.uid]=e,t.on("destroy",this.onGraphicsContextDestroy,this),this._gpuContextHash[t.uid]}onGraphicsContextDestroy(t){this._cleanGraphicsContextData(t),t.off("destroy",this.onGraphicsContextDestroy,this),this._gpuContextHash[t.uid]=null}_cleanGraphicsContextData(t){let e=this._gpuContextHash[t.uid];e.isBatchable||this._graphicsDataContextHash[t.uid]&&(K.return(this.getContextRenderData(t)),this._graphicsDataContextHash[t.uid]=null),e.batches&&e.batches.forEach(i=>{K.return(i)})}destroy(){for(let t in this._gpuContextHash)this._gpuContextHash[t]&&this.onGraphicsContextDestroy(this._gpuContextHash[t].context)}};sh.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"graphicsContext"};sh.defaultOptions={bezierSmoothness:.5};Ni=sh});var SA,nh,oh,ah,uh,lh,ch,hh,Ct,Me=p(()=>{"use strict";SA={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},nh=0,oh=1,ah=2,uh=3,lh=4,ch=5,hh=class _y{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<nh)}set blend(t){!!(this.data&1<<nh)!==t&&(this.data^=1<<nh)}get offsets(){return!!(this.data&1<<oh)}set offsets(t){!!(this.data&1<<oh)!==t&&(this.data^=1<<oh)}set cullMode(t){if(t==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=t==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<ah)}set culling(t){!!(this.data&1<<ah)!==t&&(this.data^=1<<ah)}get depthTest(){return!!(this.data&1<<uh)}set depthTest(t){!!(this.data&1<<uh)!==t&&(this.data^=1<<uh)}get depthMask(){return!!(this.data&1<<ch)}set depthMask(t){!!(this.data&1<<ch)!==t&&(this.data^=1<<ch)}get clockwiseFrontFace(){return!!(this.data&1<<lh)}set clockwiseFrontFace(t){!!(this.data&1<<lh)!==t&&(this.data^=1<<lh)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=SA[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){let t=new _y;return t.depthTest=!1,t.blend=!0,t}};hh.default2d=hh.for2d();Ct=hh});function Xe(r,t,e){let i=(r>>24&255)/255;t[e++]=(r&255)/255*i,t[e++]=(r>>8&255)/255*i,t[e++]=(r>>16&255)/255*i,t[e++]=i}var Hi=p(()=>{"use strict"});var cn,yy=p(()=>{D();Me();Qt();Hi();Yc();cn=class{constructor(t,e){this.state=Ct.for2d(),this._graphicsBatchesHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.renderer=t,this._adaptor=e,this._adaptor.init(),this.renderer.renderableGC.addManagedHash(this,"_graphicsBatchesHash")}validateRenderable(t){let e=t.context,i=!!this._graphicsBatchesHash[t.uid],s=this.renderer.graphicsContext.updateGpuContext(e);return!!(s.isBatchable||i!==s.isBatchable)}addRenderable(t,e){let i=this.renderer.graphicsContext.updateGpuContext(t.context);t.didViewUpdate&&this._rebuild(t),i.isBatchable?this._addToBatcher(t,e):(this.renderer.renderPipes.batch.break(e),e.add(t))}updateRenderable(t){let e=this._graphicsBatchesHash[t.uid];if(e)for(let i=0;i<e.length;i++){let s=e[i];s._batcher.updateElement(s)}}destroyRenderable(t){this._graphicsBatchesHash[t.uid]&&this._removeBatchForRenderable(t.uid),t.off("destroyed",this._destroyRenderableBound)}execute(t){if(!t.isRenderable)return;let e=this.renderer,i=t.context;if(!e.graphicsContext.getGpuContext(i).batches.length)return;let n=i.customShader||this._adaptor.shader;this.state.blendMode=t.groupBlendMode;let o=n.resources.localUniforms.uniforms;o.uTransformMatrix=t.groupTransform,o.uRound=e._roundPixels|t._roundPixels,Xe(t.groupColorAlpha,o.uColor,0),this._adaptor.execute(this,t)}_rebuild(t){let e=!!this._graphicsBatchesHash[t.uid],i=this.renderer.graphicsContext.updateGpuContext(t.context);e&&this._removeBatchForRenderable(t.uid),i.isBatchable&&this._initBatchesForRenderable(t),t.batched=i.isBatchable}_addToBatcher(t,e){let i=this.renderer.renderPipes.batch,s=this._getBatchesForRenderable(t);for(let n=0;n<s.length;n++){let o=s[n];i.addToBatch(o,e)}}_getBatchesForRenderable(t){return this._graphicsBatchesHash[t.uid]||this._initBatchesForRenderable(t)}_initBatchesForRenderable(t){let e=t.context,i=this.renderer.graphicsContext.getGpuContext(e),s=this.renderer._roundPixels|t._roundPixels,n=i.batches.map(o=>{let a=K.get(si);return o.copyTo(a),a.renderable=t,a.roundPixels=s,a});return this._graphicsBatchesHash[t.uid]===void 0&&t.on("destroyed",this._destroyRenderableBound),this._graphicsBatchesHash[t.uid]=n,n}_removeBatchForRenderable(t){this._graphicsBatchesHash[t].forEach(e=>{K.return(e)}),this._graphicsBatchesHash[t]=null}destroy(){this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null;for(let t in this._graphicsBatchesHash)this._removeBatchForRenderable(t);this._graphicsBatchesHash=null}};cn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"graphics"}});var fh=p(()=>{D();$a();yy();H.add(cn);H.add(Ni)});var Pr,ja=p(()=>{"use strict";Pr=class{constructor(){this.batcherName="default",this.packAsQuad=!1,this.indexOffset=0,this.attributeOffset=0,this.roundPixels=0,this._batcher=null,this._batch=null,this._uvUpdateId=-1,this._textureMatrixUpdateId=-1}get blendMode(){return this.renderable.groupBlendMode}get topology(){return this._topology||this.geometry.topology}set topology(t){this._topology=t}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.geometry=null,this._uvUpdateId=-1,this._textureMatrixUpdateId=-1}get uvs(){let e=this.geometry.getBuffer("aUV"),i=e.data,s=i,n=this.texture.textureMatrix;return n.isSimple||(s=this._transformedUvs,(this._textureMatrixUpdateId!==n._updateID||this._uvUpdateId!==e._updateID)&&((!s||s.length<i.length)&&(s=this._transformedUvs=new Float32Array(i.length)),this._textureMatrixUpdateId=n._updateID,this._uvUpdateId=e._updateID,n.multiplyUvs(i,s))),s}get positions(){return this.geometry.positions}get indices(){return this.geometry.indices}get color(){return this.renderable.groupColorAlpha}get groupTransform(){return this.renderable.groupTransform}get attributeSize(){return this.geometry.positions.length/2}get indexSize(){return this.geometry.indices.length}}});var hn,by=p(()=>{D();ot();wr();ee();tn();Qt();Hi();ja();hn=class{constructor(t,e){this.localUniforms=new ct({uTransformMatrix:{value:new G,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),this.localUniformsBindGroup=new It({0:this.localUniforms}),this._meshDataHash=Object.create(null),this._gpuBatchableMeshHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.renderer=t,this._adaptor=e,this._adaptor.init(),t.renderableGC.addManagedHash(this,"_gpuBatchableMeshHash"),t.renderableGC.addManagedHash(this,"_meshDataHash")}validateRenderable(t){let e=this._getMeshData(t),i=e.batched,s=t.batched;if(e.batched=s,i!==s)return!0;if(s){let n=t._geometry;if(n.indices.length!==e.indexSize||n.positions.length!==e.vertexSize)return e.indexSize=n.indices.length,e.vertexSize=n.positions.length,!0;let o=this._getBatchableMesh(t);return!o._batcher.checkAndUpdateTexture(o,t.texture)}return!1}addRenderable(t,e){let i=this.renderer.renderPipes.batch,{batched:s}=this._getMeshData(t);if(s){let n=this._getBatchableMesh(t);n.texture=t._texture,n.geometry=t._geometry,i.addToBatch(n,e)}else i.break(e),e.add(t)}updateRenderable(t){if(t.batched){let e=this._gpuBatchableMeshHash[t.uid];e.texture=t._texture,e.geometry=t._geometry,e._batcher.updateElement(e)}}destroyRenderable(t){this._meshDataHash[t.uid]=null;let e=this._gpuBatchableMeshHash[t.uid];e&&(K.return(e),this._gpuBatchableMeshHash[t.uid]=null),t.off("destroyed",this._destroyRenderableBound)}execute(t){if(!t.isRenderable)return;t.state.blendMode=ar(t.groupBlendMode,t.texture._source);let e=this.localUniforms;e.uniforms.uTransformMatrix=t.groupTransform,e.uniforms.uRound=this.renderer._roundPixels|t._roundPixels,e.update(),Xe(t.groupColorAlpha,e.uniforms.uColor,0),this._adaptor.execute(this,t)}_getMeshData(t){return this._meshDataHash[t.uid]||this._initMeshData(t)}_initMeshData(t){return this._meshDataHash[t.uid]={batched:t.batched,indexSize:t._geometry.indices?.length,vertexSize:t._geometry.positions?.length},t.on("destroyed",this._destroyRenderableBound),this._meshDataHash[t.uid]}_getBatchableMesh(t){return this._gpuBatchableMeshHash[t.uid]||this._initBatchableMesh(t)}_initBatchableMesh(t){let e=K.get(Pr);return e.renderable=t,e.texture=t._texture,e.transform=t.groupTransform,e.roundPixels=this.renderer._roundPixels|t._roundPixels,this._gpuBatchableMeshHash[t.uid]=e,e}destroy(){for(let t in this._gpuBatchableMeshHash)this._gpuBatchableMeshHash[t]&&K.return(this._gpuBatchableMeshHash[t]);this._gpuBatchableMeshHash=null,this._meshDataHash=null,this.localUniforms=null,this.localUniformsBindGroup=null,this._adaptor.destroy(),this._adaptor=null,this.renderer=null}};hn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"mesh"}});var dh=p(()=>{D();by();H.add(hn)});var Ya,vy=p(()=>{"use strict";Ya=class{execute(t,e){let i=t.state,s=t.renderer,n=e.shader||t.defaultShader;n.resources.uTexture=e.texture._source,n.resources.uniforms=t.localUniforms;let o=s.gl,a=t.getBuffers(e);s.shader.bind(n),s.state.set(i),s.geometry.bind(a.geometry,n.glProgram);let l=a.geometry.indexBuffer.data.BYTES_PER_ELEMENT===2?o.UNSIGNED_SHORT:o.UNSIGNED_INT;o.drawElements(o.TRIANGLES,e.particleChildren.length*6,l,0)}}});function ph(r,t=null){let e=r*6;if(e>65535?t||(t=new Uint32Array(e)):t||(t=new Uint16Array(e)),t.length!==e)throw new Error(`Out buffer length is incorrect, got ${t.length} and expected ${e}`);for(let i=0,s=0;i<e;i+=6,s+=4)t[i+0]=s+0,t[i+1]=s+1,t[i+2]=s+2,t[i+3]=s+0,t[i+4]=s+2,t[i+5]=s+3;return t}var Ty=p(()=>{"use strict"});function wy(r){return{dynamicUpdate:Sy(r,!0),staticUpdate:Sy(r,!1)}}function Sy(r,t){let e=[];e.push(`\n \n var index = 0;\n\n for (let i = 0; i < ps.length; ++i)\n {\n const p = ps[i];\n\n `);let i=0;for(let n in r){let o=r[n];if(t!==o.dynamic)continue;e.push(`offset = index + ${i}`),e.push(o.code);let a=ae(o.format);i+=a.stride/4}e.push(`\n index += stride * 4;\n }\n `),e.unshift(`\n var stride = ${i};\n `);let s=e.join(`\n`);return new Function("ps","f32v","u32v",s)}var Ey=p(()=>{ii()});function wA(r){let t=[];for(let e in r){let i=r[e];t.push(e,i.code,i.dynamic?"d":"s")}return t.join("_")}var Ka,Cy=p(()=>{Er();ur();Bi();ii();Dc();Ty();Ey();Ka=class{constructor(t){this._size=0,this._generateParticleUpdateCache={};let e=this._size=t.size??1e3,i=t.properties,s=0,n=0;for(let c in i){let h=i[c],d=ae(h.format);h.dynamic?n+=d.stride:s+=d.stride}this._dynamicStride=n/4,this._staticStride=s/4,this.staticAttributeBuffer=new Le(e*4*s),this.dynamicAttributeBuffer=new Le(e*4*n),this.indexBuffer=ph(e);let o=new ye,a=0,u=0;this._staticBuffer=new Tt({data:new Float32Array(1),label:"static-particle-buffer",shrinkToFit:!1,usage:J.VERTEX|J.COPY_DST}),this._dynamicBuffer=new Tt({data:new Float32Array(1),label:"dynamic-particle-buffer",shrinkToFit:!1,usage:J.VERTEX|J.COPY_DST});for(let c in i){let h=i[c],d=ae(h.format);h.dynamic?(o.addAttribute(h.attributeName,{buffer:this._dynamicBuffer,stride:this._dynamicStride*4,offset:a*4,format:h.format}),a+=d.size):(o.addAttribute(h.attributeName,{buffer:this._staticBuffer,stride:this._staticStride*4,offset:u*4,format:h.format}),u+=d.size)}o.addIndex(this.indexBuffer);let l=this.getParticleUpdate(i);this._dynamicUpload=l.dynamicUpdate,this._staticUpload=l.staticUpdate,this.geometry=o}getParticleUpdate(t){let e=wA(t);return this._generateParticleUpdateCache[e]?this._generateParticleUpdateCache[e]:(this._generateParticleUpdateCache[e]=this.generateParticleUpdate(t),this._generateParticleUpdateCache[e])}generateParticleUpdate(t){return wy(t)}update(t,e){t.length>this._size&&(e=!0,this._size=Math.max(t.length,this._size*1.5|0),this.staticAttributeBuffer=new Le(this._size*this._staticStride*4*4),this.dynamicAttributeBuffer=new Le(this._size*this._dynamicStride*4*4),this.indexBuffer=ph(this._size),this.geometry.indexBuffer.setDataWithSize(this.indexBuffer,this.indexBuffer.byteLength,!0));let i=this.dynamicAttributeBuffer;if(this._dynamicUpload(t,i.float32View,i.uint32View),this._dynamicBuffer.setDataWithSize(this.dynamicAttributeBuffer.float32View,t.length*this._dynamicStride*4,!0),e){let s=this.staticAttributeBuffer;this._staticUpload(t,s.float32View,s.uint32View),this._staticBuffer.setDataWithSize(s.float32View,t.length*this._staticStride*4,!0)}}destroy(){this._staticBuffer.destroy(),this._dynamicBuffer.destroy(),this.geometry.destroy()}}});var Ay,Dy=p(()=>{Ay=`varying vec2 vUV;\nvarying vec4 vColor;\n\nuniform sampler2D uTexture;\n\nvoid main(void){\n vec4 color = texture2D(uTexture, vUV) * vColor;\n gl_FragColor = color;\n}`});var Py,By=p(()=>{Py=`attribute vec2 aVertex;\nattribute vec2 aUV;\nattribute vec4 aColor;\n\nattribute vec2 aPosition;\nattribute float aRotation;\n\nuniform mat3 uTranslationMatrix;\nuniform float uRound;\nuniform vec2 uResolution;\nuniform vec4 uColor;\n\nvarying vec2 vUV;\nvarying vec4 vColor;\n\nvec2 roundPixels(vec2 position, vec2 targetSize)\n{ \n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n}\n\nvoid main(void){\n float cosRotation = cos(aRotation);\n float sinRotation = sin(aRotation);\n float x = aVertex.x * cosRotation - aVertex.y * sinRotation;\n float y = aVertex.x * sinRotation + aVertex.y * cosRotation;\n\n vec2 v = vec2(x, y);\n v = v + aPosition;\n\n gl_Position = vec4((uTranslationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n if(uRound == 1.0)\n {\n gl_Position.xy = roundPixels(gl_Position.xy, uResolution);\n }\n\n vUV = aUV;\n vColor = vec4(aColor.rgb * aColor.a, aColor.a) * uColor;\n}\n`});var mh,My=p(()=>{mh=`\nstruct ParticleUniforms {\n uProjectionMatrix:mat3x3<f32>,\n uColor:vec4<f32>,\n uResolution:vec2<f32>,\n uRoundPixels:f32,\n};\n\n@group(0) @binding(0) var<uniform> uniforms: ParticleUniforms;\n\n@group(1) @binding(0) var uTexture: texture_2d<f32>;\n@group(1) @binding(1) var uSampler : sampler;\n\nstruct VSOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>,\n @location(1) color : vec4<f32>,\n };\n@vertex\nfn mainVertex(\n @location(0) aVertex: vec2<f32>,\n @location(1) aPosition: vec2<f32>,\n @location(2) aUV: vec2<f32>,\n @location(3) aColor: vec4<f32>,\n @location(4) aRotation: f32,\n) -> VSOutput {\n \n let v = vec2(\n aVertex.x * cos(aRotation) - aVertex.y * sin(aRotation),\n aVertex.x * sin(aRotation) + aVertex.y * cos(aRotation)\n ) + aPosition;\n\n let position = vec4((uniforms.uProjectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n let vColor = vec4(aColor.rgb * aColor.a, aColor.a) * uniforms.uColor;\n\n return VSOutput(\n position,\n aUV,\n vColor,\n );\n}\n\n@fragment\nfn mainFragment(\n @location(0) uv: vec2<f32>,\n @location(1) color: vec4<f32>,\n @builtin(position) position: vec4<f32>,\n) -> @location(0) vec4<f32> {\n\n var sample = textureSample(uTexture, uSampler, uv) * color;\n \n return sample;\n}`});var qa,Fy=p(()=>{$t();ot();ri();Fi();Be();dt();jl();Dy();By();My();qa=class extends St{constructor(){let t=be.from({vertex:Py,fragment:Ay}),e=ve.from({fragment:{source:mh,entryPoint:"mainFragment"},vertex:{source:mh,entryPoint:"mainVertex"}});super({glProgram:t,gpuProgram:e,resources:{uTexture:I.WHITE.source,uSampler:new fa({}),uniforms:{uTranslationMatrix:{value:new G,type:"mat3x3<f32>"},uColor:{value:new Z(16777215),type:"vec4<f32>"},uRound:{value:1,type:"f32"},uResolution:{value:[0,0],type:"vec2<f32>"}}}})}}});var zi,gh=p(()=>{ot();ee();tn();Me();Hi();Cy();Fy();zi=class{constructor(t,e){this.state=Ct.for2d(),this._gpuBufferHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.localUniforms=new ct({uTranslationMatrix:{value:new G,type:"mat3x3<f32>"},uColor:{value:new Float32Array(4),type:"vec4<f32>"},uRound:{value:1,type:"f32"},uResolution:{value:[0,0],type:"vec2<f32>"}}),this.renderer=t,this.adaptor=e,this.defaultShader=new qa,this.state=Ct.for2d()}validateRenderable(t){return!1}addRenderable(t,e){this.renderer.renderPipes.batch.break(e),e.add(t)}getBuffers(t){return this._gpuBufferHash[t.uid]||this._initBuffer(t)}_initBuffer(t){return this._gpuBufferHash[t.uid]=new Ka({size:t.particleChildren.length,properties:t._properties}),t.on("destroyed",this._destroyRenderableBound),this._gpuBufferHash[t.uid]}updateRenderable(t){}destroyRenderable(t){this._gpuBufferHash[t.uid].destroy(),this._gpuBufferHash[t.uid]=null,t.off("destroyed",this._destroyRenderableBound)}execute(t){let e=t.particleChildren;if(e.length===0)return;let i=this.renderer,s=this.getBuffers(t);t.texture||(t.texture=e[0].texture);let n=this.state;s.update(e,t._childrenDirty),t._childrenDirty=!1,n.blendMode=ar(t.blendMode,t.texture._source);let o=this.localUniforms.uniforms,a=o.uTranslationMatrix;t.worldTransform.copyTo(a),a.prepend(i.globalUniforms.globalUniformData.projectionMatrix),o.uResolution=i.globalUniforms.globalUniformData.resolution,o.uRound=i._roundPixels|t._roundPixels,Xe(t.groupColorAlpha,o.uColor,0),this.adaptor.execute(this,t)}destroy(){this.defaultShader&&(this.defaultShader.destroy(),this.defaultShader=null)}}});var fn,Ry=p(()=>{D();vy();gh();fn=class extends zi{constructor(t){super(t,new Ya)}};fn.extension={type:[b.WebGLPipes],name:"particle"}});var Za,ky=p(()=>{"use strict";Za=class{execute(t,e){let i=t.renderer,s=e.shader||t.defaultShader;s.groups[0]=i.renderPipes.uniformBatch.getUniformBindGroup(t.localUniforms,!0),s.groups[1]=i.texture.getTextureBindGroup(e.texture);let n=t.state,o=t.getBuffers(e);i.encoder.draw({geometry:o.geometry,shader:e.shader||t.defaultShader,state:n,size:e.particleChildren.length*6})}}});var dn,Gy=p(()=>{D();ky();gh();dn=class extends zi{constructor(t){super(t,new Za)}};dn.extension={type:[b.WebGPUPipes],name:"particle"}});var xh=p(()=>{D();Ry();Gy();H.add(fn);H.add(dn)});var $e,pn=p(()=>{"use strict";$e=class{constructor(){this.batcherName="default",this.topology="triangle-list",this.attributeSize=4,this.indexSize=6,this.packAsQuad=!0,this.roundPixels=0,this._attributeStart=0,this._batcher=null,this._batch=null}get blendMode(){return this.renderable.groupBlendMode}get color(){return this.renderable.groupColorAlpha}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.bounds=null}}});var mn,Iy=p(()=>{D();Sa();Qt();pn();mn=class{constructor(t){this._gpuText=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.runners.resolutionChange.add(this),this._renderer.renderableGC.addManagedHash(this,"_gpuText")}resolutionChange(){for(let t in this._gpuText){let e=this._gpuText[t];if(!e)continue;let i=e.batchableSprite.renderable;i._autoResolution&&(i._resolution=this._renderer.resolution,i.onViewUpdate())}}validateRenderable(t){let e=this._getGpuText(t),i=t._getKey();return e.currentKey!==i}addRenderable(t,e){let s=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),this._renderer.renderPipes.batch.addToBatch(s,e)}updateRenderable(t){let i=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),i._batcher.updateElement(i)}destroyRenderable(t){t.off("destroyed",this._destroyRenderableBound),this._destroyRenderableById(t.uid)}_destroyRenderableById(t){let e=this._gpuText[t];this._renderer.canvasText.decreaseReferenceCount(e.currentKey),K.return(e.batchableSprite),this._gpuText[t]=null}_updateText(t){let e=t._getKey(),i=this._getGpuText(t),s=i.batchableSprite;i.currentKey!==e&&this._updateGpuText(t),t._didTextUpdate=!1;let n=t._style.padding;Qr(s.bounds,t._anchor,s.texture,n)}_updateGpuText(t){let e=this._getGpuText(t),i=e.batchableSprite;e.texture&&this._renderer.canvasText.decreaseReferenceCount(e.currentKey),e.texture=i.texture=this._renderer.canvasText.getManagedTexture(t),e.currentKey=t._getKey(),i.texture=e.texture}_getGpuText(t){return this._gpuText[t.uid]||this.initGpuText(t)}initGpuText(t){let e={texture:null,currentKey:"--",batchableSprite:K.get($e)};return e.batchableSprite.renderable=t,e.batchableSprite.transform=t.groupTransform,e.batchableSprite.bounds={minX:0,maxX:1,minY:0,maxY:0},e.batchableSprite.roundPixels=this._renderer._roundPixels|t._roundPixels,this._gpuText[t.uid]=e,t._resolution=t._autoResolution?this._renderer.resolution:t.resolution,this._updateText(t),t.on("destroyed",this._destroyRenderableBound),e}destroy(){for(let t in this._gpuText)this._destroyRenderableById(t);this._gpuText=null,this._renderer=null}};mn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"text"}});var _h,ue,Wi=p(()=>{Pt();Os();_h=class{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,e){let i=Q.get().createCanvas();i.width=t,i.height=e;let s=i.getContext("2d");return{canvas:i,context:s}}getOptimalCanvasAndContext(t,e,i=1){t=Math.ceil(t*i-1e-6),e=Math.ceil(e*i-1e-6),t=ir(t),e=ir(e);let s=(t<<17)+(e<<1);this._canvasPool[s]||(this._canvasPool[s]=[]);let n=this._canvasPool[s].pop();return n||(n=this._createCanvasAndContext(t,e)),n}returnCanvasAndContext(t){let e=t.canvas,{width:i,height:s}=e,n=(i<<17)+(s<<1);t.context.clearRect(0,0,i,s),this._canvasPool[n].push(t)}clear(){this._canvasPool={}}},ue=new _h});function Uy(r,t,e){for(let i=0,s=4*e*t;i<t;++i,s+=4)if(r[s+3]!==0)return!1;return!0}function Oy(r,t,e,i,s){let n=4*t;for(let o=i,a=i*n+4*e;o<=s;++o,a+=n)if(r[a+3]!==0)return!1;return!0}function Ly(r,t=1){let{width:e,height:i}=r,s=r.getContext("2d",{willReadFrequently:!0});if(s===null)throw new TypeError("Failed to get canvas 2D context");let o=s.getImageData(0,0,e,i).data,a=0,u=0,l=e-1,c=i-1;for(;u<i&&Uy(o,e,u);)++u;if(u===i)return tt.EMPTY;for(;Uy(o,e,c);)--c;for(;Oy(o,e,a,u,c);)++a;for(;Oy(o,e,l,u,c);)--l;return++l,++c,new tt(a/t,u/t,(l-a)/t,(c-u)/t)}var Ny=p(()=>{Yt()});var Hy,Br,Qa=p(()=>{$t();Pt();ot();Aa();dt();jt();Hy=class yh{constructor(t,e,i,s){this.uid=rt("fillGradient"),this.type="linear",this.gradientStops=[],this._styleKey=null,this.x0=t,this.y0=e,this.x1=i,this.y1=s}addColorStop(t,e){return this.gradientStops.push({offset:t,color:Z.shared.setValue(e).toHexa()}),this._styleKey=null,this}buildLinearGradient(){if(this.texture)return;let t=yh.defaultTextureSize,{gradientStops:e}=this,i=Q.get().createCanvas();i.width=t,i.height=t;let s=i.getContext("2d"),n=s.createLinearGradient(0,0,yh.defaultTextureSize,1);for(let g=0;g<e.length;g++){let x=e[g];n.addColorStop(x.offset,x.color)}s.fillStyle=n,s.fillRect(0,0,t,t),this.texture=new I({source:new or({resource:i,addressModeU:"clamp-to-edge",addressModeV:"repeat"})});let{x0:o,y0:a,x1:u,y1:l}=this,c=new G,h=u-o,d=l-a,f=Math.sqrt(h*h+d*d),m=Math.atan2(d,h);c.translate(-o,-a),c.scale(1/t,1/t),c.rotate(-m),c.scale(256/f,1),this.transform=c,this._styleKey=null}get styleKey(){if(this._styleKey)return this._styleKey;let t=this.gradientStops.map(s=>`${s.offset}-${s.color}`).join("-"),e=this.texture.uid,i=this.transform.toArray().join("-");return`fill-gradient-${this.uid}-${t}-${e}-${i}-${this.x0}-${this.y0}-${this.x1}-${this.y1}`}};Hy.defaultTextureSize=256;Br=Hy});var zy,cr,Ja=p(()=>{ot();jt();zy={repeat:{addressModeU:"repeat",addressModeV:"repeat"},"repeat-x":{addressModeU:"repeat",addressModeV:"clamp-to-edge"},"repeat-y":{addressModeU:"clamp-to-edge",addressModeV:"repeat"},"no-repeat":{addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}},cr=class{constructor(t,e){this.uid=rt("fillPattern"),this.transform=new G,this._styleKey=null,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),e&&(t.source.style.addressModeU=zy[e].addressModeU,t.source.style.addressModeV=zy[e].addressModeV)}setTransform(t){let e=this.texture;this.transform.copyFrom(t),this.transform.invert(),this.transform.scale(1/e.frame.width,1/e.frame.height),this._styleKey=null}get styleKey(){return this._styleKey?this._styleKey:(this._styleKey=`fill-pattern-${this.uid}-${this.texture.uid}-${this.transform.toArray().join("-")}`,this._styleKey)}}});var Vy=Ao((A8,Wy)=>{Wy.exports=CA;var bh={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},EA=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function CA(r){var t=[];return r.replace(EA,function(e,i,s){var n=i.toLowerCase();for(s=DA(s),n=="m"&&s.length>2&&(t.push([i].concat(s.splice(0,2))),n="l",i=i=="m"?"l":"L");;){if(s.length==bh[n])return s.unshift(i),t.push(s);if(s.length<bh[n])throw new Error("malformed path data");t.push([i].concat(s.splice(0,bh[n])))}}),t}var AA=/-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/ig;function DA(r){var t=r.match(AA);return t?t.map(Number):[]}});function $y(r,t){let e=(0,Xy.default)(r),i=[],s=null,n=0,o=0;for(let a=0;a<e.length;a++){let u=e[a],l=u[0],c=u;switch(l){case"M":n=c[1],o=c[2],t.moveTo(n,o);break;case"m":n+=c[1],o+=c[2],t.moveTo(n,o);break;case"H":n=c[1],t.lineTo(n,o);break;case"h":n+=c[1],t.lineTo(n,o);break;case"V":o=c[1],t.lineTo(n,o);break;case"v":o+=c[1],t.lineTo(n,o);break;case"L":n=c[1],o=c[2],t.lineTo(n,o);break;case"l":n+=c[1],o+=c[2],t.lineTo(n,o);break;case"C":n=c[5],o=c[6],t.bezierCurveTo(c[1],c[2],c[3],c[4],n,o);break;case"c":t.bezierCurveTo(n+c[1],o+c[2],n+c[3],o+c[4],n+c[5],o+c[6]),n+=c[5],o+=c[6];break;case"S":n=c[3],o=c[4],t.bezierCurveToShort(c[1],c[2],n,o);break;case"s":t.bezierCurveToShort(n+c[1],o+c[2],n+c[3],o+c[4]),n+=c[3],o+=c[4];break;case"Q":n=c[3],o=c[4],t.quadraticCurveTo(c[1],c[2],n,o);break;case"q":t.quadraticCurveTo(n+c[1],o+c[2],n+c[3],o+c[4]),n+=c[3],o+=c[4];break;case"T":n=c[1],o=c[2],t.quadraticCurveToShort(n,o);break;case"t":n+=c[1],o+=c[2],t.quadraticCurveToShort(n,o);break;case"A":n=c[6],o=c[7],t.arcToSvg(c[1],c[2],c[3],c[4],c[5],n,o);break;case"a":n+=c[6],o+=c[7],t.arcToSvg(c[1],c[2],c[3],c[4],c[5],n,o);break;case"Z":case"z":t.closePath(),i.length>0&&(s=i.pop(),s?(n=s.startX,o=s.startY):(n=0,o=0)),s=null;break;default:z(`Unknown SVG path command: ${l}`)}l!=="Z"&&l!=="z"&&s===null&&(s={startX:n,startY:o},i.push(s))}return t}var Xy,jy=p(()=>{Xy=ds(Vy(),1);gt()});var ai,vh=p(()=>{Yt();ai=class r{constructor(t=0,e=0,i=0){this.type="circle",this.x=t,this.y=e,this.radius=i}clone(){return new r(this.x,this.y,this.radius)}contains(t,e){if(this.radius<=0)return!1;let i=this.radius*this.radius,s=this.x-t,n=this.y-e;return s*=s,n*=n,s+n<=i}strokeContains(t,e,i,s=.5){if(this.radius===0)return!1;let n=this.x-t,o=this.y-e,a=this.radius,u=(1-s)*i,l=Math.sqrt(n*n+o*o);return l<=a+u&&l>a-(i-u)}getBounds(t){return t||(t=new tt),t.x=this.x-this.radius,t.y=this.y-this.radius,t.width=this.radius*2,t.height=this.radius*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.radius=t.radius,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}});var tu,Yy=p(()=>{Yt();tu=class r{constructor(t=0,e=0,i=0,s=0){this.type="ellipse",this.x=t,this.y=e,this.halfWidth=i,this.halfHeight=s}clone(){return new r(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,e){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let i=(t-this.x)/this.halfWidth,s=(e-this.y)/this.halfHeight;return i*=i,s*=s,i+s<=1}strokeContains(t,e,i,s=.5){let{halfWidth:n,halfHeight:o}=this;if(n<=0||o<=0)return!1;let a=i*(1-s),u=i-a,l=n-u,c=o-u,h=n+a,d=o+a,f=t-this.x,m=e-this.y,g=f*f/(l*l)+m*m/(c*c),x=f*f/(h*h)+m*m/(d*d);return g>1&&x<=1}getBounds(t){return t||(t=new tt),t.x=this.x-this.halfWidth,t.y=this.y-this.halfHeight,t.width=this.halfWidth*2,t.height=this.halfHeight*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.halfWidth=t.halfWidth,this.halfHeight=t.halfHeight,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}}});function Ky(r,t,e,i,s,n){let o=r-e,a=t-i,u=s-e,l=n-i,c=o*u+a*l,h=u*u+l*l,d=-1;h!==0&&(d=c/h);let f,m;d<0?(f=e,m=i):d>1?(f=s,m=n):(f=e+d*u,m=i+d*l);let g=r-f,x=t-m;return g*g+x*x}var qy=p(()=>{"use strict"});var Vi,Zy=p(()=>{qy();Yt();Vi=class r{constructor(...t){this.type="polygon";let e=Array.isArray(t[0])?t[0]:t;if(typeof e[0]!="number"){let i=[];for(let s=0,n=e.length;s<n;s++)i.push(e[s].x,e[s].y);e=i}this.points=e,this.closePath=!0}clone(){let t=this.points.slice(),e=new r(t);return e.closePath=this.closePath,e}contains(t,e){let i=!1,s=this.points.length/2;for(let n=0,o=s-1;n<s;o=n++){let a=this.points[n*2],u=this.points[n*2+1],l=this.points[o*2],c=this.points[o*2+1];u>e!=c>e&&t<(l-a)*((e-u)/(c-u))+a&&(i=!i)}return i}strokeContains(t,e,i,s=.5){let n=i*i,o=n*(1-s),a=n-o,{points:u}=this,l=u.length-(this.closePath?0:2);for(let c=0;c<l;c+=2){let h=u[c],d=u[c+1],f=u[(c+2)%u.length],m=u[(c+3)%u.length],g=Ky(t,e,h,d,f,m),x=Math.sign((f-h)*(e-d)-(m-d)*(t-h));if(g<=(x<0?a:o))return!0}return!1}getBounds(t){t||(t=new tt);let e=this.points,i=1/0,s=-1/0,n=1/0,o=-1/0;for(let a=0,u=e.length;a<u;a+=2){let l=e[a],c=e[a+1];i=l<i?l:i,s=l>s?l:s,n=c<n?c:n,o=c>o?c:o}return t.x=i,t.width=s-i,t.y=n,t.height=o-n,t}copyFrom(t){return this.points=t.points.slice(),this.closePath=t.closePath,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((t,e)=>`${t}, ${e}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return this.points[this.points.length-2]}get y(){return this.points[this.points.length-1]}}});var eu,ru,Qy=p(()=>{Yt();eu=(r,t,e,i,s,n,o)=>{let a=r-e,u=t-i,l=Math.sqrt(a*a+u*u);return l>=s-n&&l<=s+o},ru=class r{constructor(t=0,e=0,i=0,s=0,n=20){this.type="roundedRectangle",this.x=t,this.y=e,this.width=i,this.height=s,this.radius=n}getBounds(t){return t||(t=new tt),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new r(this.x,this.y,this.width,this.height,this.radius)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){let i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(e>=this.y+i&&e<=this.y+this.height-i||t>=this.x+i&&t<=this.x+this.width-i)return!0;let s=t-(this.x+i),n=e-(this.y+i),o=i*i;if(s*s+n*n<=o||(s=t-(this.x+this.width-i),s*s+n*n<=o)||(n=e-(this.y+this.height-i),s*s+n*n<=o)||(s=t-(this.x+i),s*s+n*n<=o))return!0}return!1}strokeContains(t,e,i,s=.5){let{x:n,y:o,width:a,height:u,radius:l}=this,c=i*(1-s),h=i-c,d=n+l,f=o+l,m=a-l*2,g=u-l*2,x=n+a,_=o+u;return(t>=n-c&&t<=n+h||t>=x-h&&t<=x+c)&&e>=f&&e<=f+g||(e>=o-c&&e<=o+h||e>=_-h&&e<=_+c)&&t>=d&&t<=d+m?!0:t<d&&e<f&&eu(t,e,d,f,l,h,c)||t>x-l&&e<f&&eu(t,e,x-l,f,l,h,c)||t>x-l&&e>_-l&&eu(t,e,x-l,_-l,l,h,c)||t<d&&e>_-l&&eu(t,e,d,_-l,l,h,c)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}});function su(r,t,e,i,s,n,o,a,u,l){let h=Math.min(.99,Math.max(0,l??Ni.defaultOptions.bezierSmoothness)),d=(BA-h)/1;return d*=d,MA(t,e,i,s,n,o,a,u,r,d),r}function MA(r,t,e,i,s,n,o,a,u,l){Sh(r,t,e,i,s,n,o,a,u,l,0),u.push(o,a)}function Sh(r,t,e,i,s,n,o,a,u,l,c){if(c>PA)return;let h=Math.PI,d=(r+e)/2,f=(t+i)/2,m=(e+s)/2,g=(i+n)/2,x=(s+o)/2,_=(n+a)/2,v=(d+m)/2,T=(f+g)/2,y=(m+x)/2,C=(g+_)/2,S=(v+y)/2,E=(T+C)/2;if(c>0){let P=o-r,U=a-t,M=Math.abs((e-o)*U-(i-a)*P),k=Math.abs((s-o)*U-(n-a)*P),N,q;if(M>iu&&k>iu){if((M+k)*(M+k)<=l*(P*P+U*U)){if(Xi<Th){u.push(S,E);return}let w=Math.atan2(n-i,s-e);if(N=Math.abs(w-Math.atan2(i-t,e-r)),q=Math.abs(Math.atan2(a-n,o-s)-w),N>=h&&(N=2*h-N),q>=h&&(q=2*h-q),N+q<Xi){u.push(S,E);return}if(ui!==0){if(N>ui){u.push(e,i);return}if(q>ui){u.push(s,n);return}}}}else if(M>iu){if(M*M<=l*(P*P+U*U)){if(Xi<Th){u.push(S,E);return}if(N=Math.abs(Math.atan2(n-i,s-e)-Math.atan2(i-t,e-r)),N>=h&&(N=2*h-N),N<Xi){u.push(e,i),u.push(s,n);return}if(ui!==0&&N>ui){u.push(e,i);return}}}else if(k>iu){if(k*k<=l*(P*P+U*U)){if(Xi<Th){u.push(S,E);return}if(N=Math.abs(Math.atan2(a-n,o-s)-Math.atan2(n-i,s-e)),N>=h&&(N=2*h-N),N<Xi){u.push(e,i),u.push(s,n);return}if(ui!==0&&N>ui){u.push(s,n);return}}}else if(P=S-(r+o)/2,U=E-(t+a)/2,P*P+U*U<=l){u.push(S,E);return}}Sh(r,t,d,f,v,T,S,E,u,l,c+1),Sh(S,E,y,C,x,_,o,a,u,l,c+1)}var PA,iu,BA,Th,Xi,ui,wh=p(()=>{$a();PA=8,iu=11920929e-14,BA=1,Th=.01,Xi=0,ui=0});function t0(r,t,e,i,s,n,o,a){let l=Math.min(.99,Math.max(0,a??Ni.defaultOptions.bezierSmoothness)),c=(kA-l)/1;return c*=c,IA(t,e,i,s,n,o,r,c),r}function IA(r,t,e,i,s,n,o,a){Eh(o,r,t,e,i,s,n,a,0),o.push(s,n)}function Eh(r,t,e,i,s,n,o,a,u){if(u>FA)return;let l=Math.PI,c=(t+i)/2,h=(e+s)/2,d=(i+n)/2,f=(s+o)/2,m=(c+d)/2,g=(h+f)/2,x=n-t,_=o-e,v=Math.abs((i-n)*_-(s-o)*x);if(v>RA){if(v*v<=a*(x*x+_*_)){if(Jy<GA){r.push(m,g);return}let T=Math.abs(Math.atan2(o-s,n-i)-Math.atan2(s-e,i-t));if(T>=l&&(T=2*l-T),T<Jy){r.push(m,g);return}}}else if(x=m-(t+n)/2,_=g-(e+o)/2,x*x+_*_<=a){r.push(m,g);return}Eh(r,t,e,c,h,m,g,a,u+1),Eh(r,m,g,d,f,n,o,a,u+1)}var FA,RA,kA,GA,Jy,e0=p(()=>{$a();FA=8,RA=11920929e-14,kA=1,GA=.01,Jy=0});function nu(r,t,e,i,s,n,o,a){let u=Math.abs(s-n);(!o&&s>n||o&&n>s)&&(u=2*Math.PI-u),a||(a=Math.max(6,Math.floor(6*Math.pow(i,1/3)*(u/Math.PI)))),a=Math.max(a,3);let l=u/a,c=s;l*=o?-1:1;for(let h=0;h<a+1;h++){let d=Math.cos(c),f=Math.sin(c),m=t+d*i,g=e+f*i;r.push(m,g),c+=l}}var Ch=p(()=>{"use strict"});function r0(r,t,e,i,s,n){let o=r[r.length-2],u=r[r.length-1]-e,l=o-t,c=s-e,h=i-t,d=Math.abs(u*h-l*c);if(d<1e-8||n===0){(r[r.length-2]!==t||r[r.length-1]!==e)&&r.push(t,e);return}let f=u*u+l*l,m=c*c+h*h,g=u*c+l*h,x=n*Math.sqrt(f)/d,_=n*Math.sqrt(m)/d,v=x*g/f,T=_*g/m,y=x*h+_*l,C=x*c+_*u,S=l*(_+v),E=u*(_+v),P=h*(x+T),U=c*(x+T),M=Math.atan2(E-C,S-y),k=Math.atan2(U-C,P-y);nu(r,y+t,C+e,n,M,k,l*c>h*u)}var i0=p(()=>{Ch()});function UA(r,t){let e=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),i=t===1.5707963267948966?.551915024494:e,s=Math.cos(r),n=Math.sin(r),o=Math.cos(r+t),a=Math.sin(r+t);return[{x:s-n*i,y:n+s*i},{x:o+a*i,y:a-o*i},{x:o,y:a}]}function n0(r,t,e,i,s,n,o,a=0,u=0,l=0){if(n===0||o===0)return;let c=Math.sin(a*gn/360),h=Math.cos(a*gn/360),d=h*(t-i)/2+c*(e-s)/2,f=-c*(t-i)/2+h*(e-s)/2;if(d===0&&f===0)return;n=Math.abs(n),o=Math.abs(o);let m=Math.pow(d,2)/Math.pow(n,2)+Math.pow(f,2)/Math.pow(o,2);m>1&&(n*=Math.sqrt(m),o*=Math.sqrt(m)),OA(t,e,i,s,n,o,u,l,c,h,d,f,Ah);let{ang1:g,ang2:x}=Ah,{centerX:_,centerY:v}=Ah,T=Math.abs(x)/(gn/4);Math.abs(1-T)<1e-7&&(T=1);let y=Math.max(Math.ceil(T),1);x/=y;let C=r[r.length-2],S=r[r.length-1],E={x:0,y:0};for(let P=0;P<y;P++){let U=UA(g,x),{x:M,y:k}=Dh(U[0],n,o,h,c,_,v,E),{x:N,y:q}=Dh(U[1],n,o,h,c,_,v,E),{x:w,y:L}=Dh(U[2],n,o,h,c,_,v,E);su(r,C,S,M,k,N,q,w,L),C=w,S=L,g+=x}}var gn,Ah,Dh,s0,OA,o0=p(()=>{wh();gn=Math.PI*2,Ah={centerX:0,centerY:0,ang1:0,ang2:0},Dh=({x:r,y:t},e,i,s,n,o,a,u)=>{r*=e,t*=i;let l=s*r-n*t,c=n*r+s*t;return u.x=l+o,u.y=c+a,u};s0=(r,t,e,i)=>{let s=r*i-t*e<0?-1:1,n=r*e+t*i;return n>1&&(n=1),n<-1&&(n=-1),s*Math.acos(n)},OA=(r,t,e,i,s,n,o,a,u,l,c,h,d)=>{let f=Math.pow(s,2),m=Math.pow(n,2),g=Math.pow(c,2),x=Math.pow(h,2),_=f*m-f*x-m*g;_<0&&(_=0),_/=f*x+m*g,_=Math.sqrt(_)*(o===a?-1:1);let v=_*s/n*h,T=_*-n/s*c,y=l*v-u*T+(r+e)/2,C=u*v+l*T+(t+i)/2,S=(c-v)/s,E=(h-T)/n,P=(-c-v)/s,U=(-h-T)/n,M=s0(1,0,S,E),k=s0(S,E,P,U);a===0&&k>0&&(k-=gn),a===1&&k<0&&(k+=gn),d.centerX=y,d.centerY=C,d.ang1=M,d.ang2=k}});function a0(r,t,e){let i=(o,a)=>{let u=a.x-o.x,l=a.y-o.y,c=Math.sqrt(u*u+l*l),h=u/c,d=l/c;return{len:c,nx:h,ny:d}},s=(o,a)=>{o===0?r.moveTo(a.x,a.y):r.lineTo(a.x,a.y)},n=t[t.length-1];for(let o=0;o<t.length;o++){let a=t[o%t.length],u=a.radius??e;if(u<=0){s(o,a),n=a;continue}let l=t[(o+1)%t.length],c=i(a,n),h=i(a,l);if(c.len<1e-4||h.len<1e-4){s(o,a),n=a;continue}let d=Math.asin(c.nx*h.ny-c.ny*h.nx),f=1,m=!1;c.nx*h.nx-c.ny*-h.ny<0?d<0?d=Math.PI+d:(d=Math.PI-d,f=-1,m=!0):d>0&&(f=-1,m=!0);let g=d/2,x,_=Math.abs(Math.cos(g)*u/Math.sin(g));_>Math.min(c.len/2,h.len/2)?(_=Math.min(c.len/2,h.len/2),x=Math.abs(_*Math.sin(g)/Math.cos(g))):x=u;let v=a.x+h.nx*_+-h.ny*x*f,T=a.y+h.ny*_+h.nx*x*f,y=Math.atan2(c.ny,c.nx)+Math.PI/2*f,C=Math.atan2(h.ny,h.nx)-Math.PI/2*f;o===0&&r.moveTo(v+Math.cos(y)*x,T+Math.sin(y)*x),r.arc(v,T,x,y,C,m),n=a}}function u0(r,t,e,i){let s=(a,u)=>Math.sqrt((a.x-u.x)**2+(a.y-u.y)**2),n=(a,u,l)=>({x:a.x+(u.x-a.x)*l,y:a.y+(u.y-a.y)*l}),o=t.length;for(let a=0;a<o;a++){let u=t[(a+1)%o],l=u.radius??e;if(l<=0){a===0?r.moveTo(u.x,u.y):r.lineTo(u.x,u.y);continue}let c=t[a],h=t[(a+2)%o],d=s(c,u),f;if(d<1e-4)f=u;else{let x=Math.min(d/2,l);f=n(u,c,x/d)}let m=s(h,u),g;if(m<1e-4)g=u;else{let x=Math.min(m/2,l);g=n(u,h,x/m)}a===0?r.moveTo(f.x,f.y):r.lineTo(f.x,f.y),r.quadraticCurveTo(u.x,u.y,g.x,g.y,i)}}var l0=p(()=>{"use strict"});var LA,ou,c0=p(()=>{vh();Yy();Zy();Yt();Qy();ce();wh();e0();Ch();i0();o0();l0();LA=new tt,ou=class{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new ft,this._graphicsPath2D=t}moveTo(t,e){return this.startPoly(t,e),this}lineTo(t,e){this._ensurePoly();let i=this._currentPoly.points,s=i[i.length-2],n=i[i.length-1];return(s!==t||n!==e)&&i.push(t,e),this}arc(t,e,i,s,n,o){this._ensurePoly(!1);let a=this._currentPoly.points;return nu(a,t,e,i,s,n,o),this}arcTo(t,e,i,s,n){this._ensurePoly();let o=this._currentPoly.points;return r0(o,t,e,i,s,n),this}arcToSvg(t,e,i,s,n,o,a){let u=this._currentPoly.points;return n0(u,this._currentPoly.lastX,this._currentPoly.lastY,o,a,t,e,i,s,n),this}bezierCurveTo(t,e,i,s,n,o,a){this._ensurePoly();let u=this._currentPoly;return su(this._currentPoly.points,u.lastX,u.lastY,t,e,i,s,n,o,a),this}quadraticCurveTo(t,e,i,s,n){this._ensurePoly();let o=this._currentPoly;return t0(this._currentPoly.points,o.lastX,o.lastY,t,e,i,s,n),this}closePath(){return this.endPoly(!0),this}addPath(t,e){this.endPoly(),e&&!e.isIdentity()&&(t=t.clone(!0),t.transform(e));for(let i=0;i<t.instructions.length;i++){let s=t.instructions[i];this[s.action](...s.data)}return this}finish(t=!1){this.endPoly(t)}rect(t,e,i,s,n){return this.drawShape(new tt(t,e,i,s),n),this}circle(t,e,i,s){return this.drawShape(new ai(t,e,i),s),this}poly(t,e,i){let s=new Vi(t);return s.closePath=e,this.drawShape(s,i),this}regularPoly(t,e,i,s,n=0,o){s=Math.max(s|0,3);let a=-1*Math.PI/2+n,u=Math.PI*2/s,l=[];for(let c=0;c<s;c++){let h=a-c*u;l.push(t+i*Math.cos(h),e+i*Math.sin(h))}return this.poly(l,!0,o),this}roundPoly(t,e,i,s,n,o=0,a){if(s=Math.max(s|0,3),n<=0)return this.regularPoly(t,e,i,s,o);let u=i*Math.sin(Math.PI/s)-.001;n=Math.min(n,u);let l=-1*Math.PI/2+o,c=Math.PI*2/s,h=(s-2)*Math.PI/s/2;for(let d=0;d<s;d++){let f=d*c+l,m=t+i*Math.cos(f),g=e+i*Math.sin(f),x=f+Math.PI+h,_=f-Math.PI-h,v=m+n*Math.cos(x),T=g+n*Math.sin(x),y=m+n*Math.cos(_),C=g+n*Math.sin(_);d===0?this.moveTo(v,T):this.lineTo(v,T),this.quadraticCurveTo(m,g,y,C,a)}return this.closePath()}roundShape(t,e,i=!1,s){return t.length<3?this:(i?u0(this,t,e,s):a0(this,t,e),this.closePath())}filletRect(t,e,i,s,n){if(n===0)return this.rect(t,e,i,s);let o=Math.min(i,s)/2,a=Math.min(o,Math.max(-o,n)),u=t+i,l=e+s,c=a<0?-a:0,h=Math.abs(a);return this.moveTo(t,e+h).arcTo(t+c,e+c,t+h,e,h).lineTo(u-h,e).arcTo(u-c,e+c,u,e+h,h).lineTo(u,l-h).arcTo(u-c,l-c,t+i-h,l,h).lineTo(t+h,l).arcTo(t+c,l-c,t,l-h,h).closePath()}chamferRect(t,e,i,s,n,o){if(n<=0)return this.rect(t,e,i,s);let a=Math.min(n,Math.min(i,s)/2),u=t+i,l=e+s,c=[t+a,e,u-a,e,u,e+a,u,l-a,u-a,l,t+a,l,t,l-a,t,e+a];for(let h=c.length-1;h>=2;h-=2)c[h]===c[h-2]&&c[h-1]===c[h-3]&&c.splice(h-1,2);return this.poly(c,!0,o)}ellipse(t,e,i,s,n){return this.drawShape(new tu(t,e,i,s),n),this}roundRect(t,e,i,s,n,o){return this.drawShape(new ru(t,e,i,s,n),o),this}drawShape(t,e){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:e}),this}startPoly(t,e){let i=this._currentPoly;return i&&this.endPoly(),i=new Vi,i.points.push(t,e),this._currentPoly=i,this}endPoly(t=!1){let e=this._currentPoly;return e&&e.points.length>2&&(e.closePath=t,this.shapePrimitives.push({shape:e})),this._currentPoly=null,this}_ensurePoly(t=!0){if(!this._currentPoly&&(this._currentPoly=new Vi,t)){let e=this.shapePrimitives[this.shapePrimitives.length-1];if(e){let i=e.shape.x,s=e.shape.y;if(e.transform&&!e.transform.isIdentity()){let n=e.transform,o=i;i=n.a*i+n.c*s+n.tx,s=n.b*o+n.d*s+n.ty}this._currentPoly.points.push(i,s)}else this._currentPoly.points.push(0,0)}}buildPath(){let t=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let e=0;e<t.instructions.length;e++){let i=t.instructions[e];this[i.action](...i.data)}this.finish()}get bounds(){let t=this._bounds;t.clear();let e=this.shapePrimitives;for(let i=0;i<e.length;i++){let s=e[i],n=s.shape.getBounds(LA);s.transform?t.addRect(n,s.transform):t.addRect(n)}return t}}});function xn(r,t){return r?r.prepend(t):t.clone()}var Mr,Ph=p(()=>{xe();jt();gt();jy();c0();Mr=class r{constructor(t){this.instructions=[],this.uid=rt("graphicsPath"),this._dirty=!0,typeof t=="string"?$y(t,this):this.instructions=t?.slice()??[]}get shapePath(){return this._shapePath||(this._shapePath=new ou(this)),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(t,e){return t=t.clone(),this.instructions.push({action:"addPath",data:[t,e]}),this._dirty=!0,this}arc(...t){return this.instructions.push({action:"arc",data:t}),this._dirty=!0,this}arcTo(...t){return this.instructions.push({action:"arcTo",data:t}),this._dirty=!0,this}arcToSvg(...t){return this.instructions.push({action:"arcToSvg",data:t}),this._dirty=!0,this}bezierCurveTo(...t){return this.instructions.push({action:"bezierCurveTo",data:t}),this._dirty=!0,this}bezierCurveToShort(t,e,i,s,n){let o=this.instructions[this.instructions.length-1],a=this.getLastPoint(et.shared),u=0,l=0;if(!o||o.action!=="bezierCurveTo")u=a.x,l=a.y;else{u=o.data[2],l=o.data[3];let c=a.x,h=a.y;u=c+(c-u),l=h+(h-l)}return this.instructions.push({action:"bezierCurveTo",data:[u,l,t,e,i,s,n]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:"closePath",data:[]}),this._dirty=!0,this}ellipse(...t){return this.instructions.push({action:"ellipse",data:t}),this._dirty=!0,this}lineTo(...t){return this.instructions.push({action:"lineTo",data:t}),this._dirty=!0,this}moveTo(...t){return this.instructions.push({action:"moveTo",data:t}),this}quadraticCurveTo(...t){return this.instructions.push({action:"quadraticCurveTo",data:t}),this._dirty=!0,this}quadraticCurveToShort(t,e,i){let s=this.instructions[this.instructions.length-1],n=this.getLastPoint(et.shared),o=0,a=0;if(!s||s.action!=="quadraticCurveTo")o=n.x,a=n.y;else{o=s.data[0],a=s.data[1];let u=n.x,l=n.y;o=u+(u-o),a=l+(l-a)}return this.instructions.push({action:"quadraticCurveTo",data:[o,a,t,e,i]}),this._dirty=!0,this}rect(t,e,i,s,n){return this.instructions.push({action:"rect",data:[t,e,i,s,n]}),this._dirty=!0,this}circle(t,e,i,s){return this.instructions.push({action:"circle",data:[t,e,i,s]}),this._dirty=!0,this}roundRect(...t){return this.instructions.push({action:"roundRect",data:t}),this._dirty=!0,this}poly(...t){return this.instructions.push({action:"poly",data:t}),this._dirty=!0,this}regularPoly(...t){return this.instructions.push({action:"regularPoly",data:t}),this._dirty=!0,this}roundPoly(...t){return this.instructions.push({action:"roundPoly",data:t}),this._dirty=!0,this}roundShape(...t){return this.instructions.push({action:"roundShape",data:t}),this._dirty=!0,this}filletRect(...t){return this.instructions.push({action:"filletRect",data:t}),this._dirty=!0,this}chamferRect(...t){return this.instructions.push({action:"chamferRect",data:t}),this._dirty=!0,this}star(t,e,i,s,n,o,a){n||(n=s/2);let u=-1*Math.PI/2+o,l=i*2,c=Math.PI*2/l,h=[];for(let d=0;d<l;d++){let f=d%2?n:s,m=d*c+u;h.push(t+f*Math.cos(m),e+f*Math.sin(m))}return this.poly(h,!0,a),this}clone(t=!1){let e=new r;if(!t)e.instructions=this.instructions.slice();else for(let i=0;i<this.instructions.length;i++){let s=this.instructions[i];e.instructions.push({action:s.action,data:s.data.slice()})}return e}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(t){if(t.isIdentity())return this;let e=t.a,i=t.b,s=t.c,n=t.d,o=t.tx,a=t.ty,u=0,l=0,c=0,h=0,d=0,f=0,m=0,g=0;for(let x=0;x<this.instructions.length;x++){let _=this.instructions[x],v=_.data;switch(_.action){case"moveTo":case"lineTo":u=v[0],l=v[1],v[0]=e*u+s*l+o,v[1]=i*u+n*l+a;break;case"bezierCurveTo":c=v[0],h=v[1],d=v[2],f=v[3],u=v[4],l=v[5],v[0]=e*c+s*h+o,v[1]=i*c+n*h+a,v[2]=e*d+s*f+o,v[3]=i*d+n*f+a,v[4]=e*u+s*l+o,v[5]=i*u+n*l+a;break;case"quadraticCurveTo":c=v[0],h=v[1],u=v[2],l=v[3],v[0]=e*c+s*h+o,v[1]=i*c+n*h+a,v[2]=e*u+s*l+o,v[3]=i*u+n*l+a;break;case"arcToSvg":u=v[5],l=v[6],m=v[0],g=v[1],v[0]=e*m+s*g,v[1]=i*m+n*g,v[5]=e*u+s*l+o,v[6]=i*u+n*l+a;break;case"circle":v[4]=xn(v[3],t);break;case"rect":v[4]=xn(v[4],t);break;case"ellipse":v[8]=xn(v[8],t);break;case"roundRect":v[5]=xn(v[5],t);break;case"addPath":v[0].transform(t);break;case"poly":v[2]=xn(v[2],t);break;default:z("unknown transform action",_.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let e=this.instructions.length-1,i=this.instructions[e];if(!i)return t.x=0,t.y=0,t;for(;i.action==="closePath";){if(e--,e<0)return t.x=0,t.y=0,t;i=this.instructions[e]}switch(i.action){case"moveTo":case"lineTo":t.x=i.data[0],t.y=i.data[1];break;case"quadraticCurveTo":t.x=i.data[2],t.y=i.data[3];break;case"bezierCurveTo":t.x=i.data[4],t.y=i.data[5];break;case"arc":case"arcToSvg":t.x=i.data[5],t.y=i.data[6];break;case"addPath":i.data[0].getLastPoint(t);break}return t}}});function h0(r,t){if(typeof r=="string"){let i=document.createElement("div");i.innerHTML=r.trim(),r=i.querySelector("svg")}let e={context:t,path:new Mr};return f0(r,e,null,null),t}function f0(r,t,e,i){let s=r.children,{fillStyle:n,strokeStyle:o}=NA(r);n&&e?e={...e,...n}:n&&(e=n),o&&i?i={...i,...o}:o&&(i=o),t.context.fillStyle=e,t.context.strokeStyle=i;let a,u,l,c,h,d,f,m,g,x,_,v,T,y,C,S,E;switch(r.nodeName.toLowerCase()){case"path":y=r.getAttribute("d"),C=new Mr(y),t.context.path(C),e&&t.context.fill(),i&&t.context.stroke();break;case"circle":f=Ut(r,"cx",0),m=Ut(r,"cy",0),g=Ut(r,"r",0),t.context.ellipse(f,m,g,g),e&&t.context.fill(),i&&t.context.stroke();break;case"rect":a=Ut(r,"x",0),u=Ut(r,"y",0),S=Ut(r,"width",0),E=Ut(r,"height",0),x=Ut(r,"rx",0),_=Ut(r,"ry",0),x||_?t.context.roundRect(a,u,S,E,x||_):t.context.rect(a,u,S,E),e&&t.context.fill(),i&&t.context.stroke();break;case"ellipse":f=Ut(r,"cx",0),m=Ut(r,"cy",0),x=Ut(r,"rx",0),_=Ut(r,"ry",0),t.context.beginPath(),t.context.ellipse(f,m,x,_),e&&t.context.fill(),i&&t.context.stroke();break;case"line":l=Ut(r,"x1",0),c=Ut(r,"y1",0),h=Ut(r,"x2",0),d=Ut(r,"y2",0),t.context.beginPath(),t.context.moveTo(l,c),t.context.lineTo(h,d),i&&t.context.stroke();break;case"polygon":T=r.getAttribute("points"),v=T.match(/\\d+/g).map(P=>parseInt(P,10)),t.context.poly(v,!0),e&&t.context.fill(),i&&t.context.stroke();break;case"polyline":T=r.getAttribute("points"),v=T.match(/\\d+/g).map(P=>parseInt(P,10)),t.context.poly(v,!1),i&&t.context.stroke();break;case"g":case"svg":break;default:{console.info(`[SVG parser] <${r.nodeName}> elements unsupported`);break}}for(let P=0;P<s.length;P++)f0(s[P],t,e,i)}function Ut(r,t,e){let i=r.getAttribute(t);return i?Number(i):e}function NA(r){let t=r.getAttribute("style"),e={},i={},s=!1,n=!1;if(t){let o=t.split(";");for(let a=0;a<o.length;a++){let u=o[a],[l,c]=u.split(":");switch(l){case"stroke":c!=="none"&&(e.color=Z.shared.setValue(c).toNumber(),n=!0);break;case"stroke-width":e.width=Number(c);break;case"fill":c!=="none"&&(s=!0,i.color=Z.shared.setValue(c).toNumber());break;case"fill-opacity":i.alpha=Number(c);break;case"stroke-opacity":e.alpha=Number(c);break;case"opacity":i.alpha=Number(c),e.alpha=Number(c);break}}}else{let o=r.getAttribute("stroke");o&&o!=="none"&&(n=!0,e.color=Z.shared.setValue(o).toNumber(),e.width=Ut(r,"stroke-width",1));let a=r.getAttribute("fill");a&&a!=="none"&&(s=!0,i.color=Z.shared.setValue(a).toNumber())}return{strokeStyle:n?e:null,fillStyle:s?i:null}}var d0=p(()=>{$t();Ph()});function HA(r){return Z.isColorLike(r)}function p0(r){return r instanceof cr}function m0(r){return r instanceof Br}function zA(r,t,e){let i=Z.shared.setValue(t??0);return r.color=i.toNumber(),r.alpha=i.alpha===1?e.alpha:i.alpha,r.texture=I.WHITE,{...e,...r}}function g0(r,t,e){return r.fill=t,r.color=16777215,r.texture=t.texture,r.matrix=t.transform,{...e,...r}}function x0(r,t,e){return t.buildLinearGradient(),r.fill=t,r.color=16777215,r.texture=t.texture,r.matrix=t.transform,{...e,...r}}function WA(r,t){let e={...t,...r};if(e.texture){if(e.texture!==I.WHITE){let n=e.matrix?.clone().invert()||new G;n.translate(e.texture.frame.x,e.texture.frame.y),n.scale(1/e.texture.source.width,1/e.texture.source.height),e.matrix=n}let s=e.texture.source.style;s.addressMode==="clamp-to-edge"&&(s.addressMode="repeat",s.update())}let i=Z.shared.setValue(e.color);return e.alpha*=i.alpha,e.color=i.toNumber(),e.matrix=e.matrix?e.matrix.clone():null,e}function hr(r,t){if(r==null)return null;let e={},i=r;return HA(r)?zA(e,r,t):p0(r)?g0(e,r,t):m0(r)?x0(e,r,t):i.fill&&p0(i.fill)?g0(i,i.fill,t):i.fill&&m0(i.fill)?x0(i,i.fill,t):WA(i,t)}function $i(r,t){let{width:e,alignment:i,miterLimit:s,cap:n,join:o,pixelLine:a,...u}=t,l=hr(r,u);return l?{width:e,alignment:i,miterLimit:s,cap:n,join:o,pixelLine:a,...l}:null}var Bh=p(()=>{$t();ot();dt();Qa();Ja()});var VA,_0,Mh,de,Fh=p(()=>{Xt();$t();ot();xe();dt();jt();vt();ce();Ph();d0();Bh();VA=new et,_0=new G,Mh=class je extends ht{constructor(){super(...arguments),this.uid=rt("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this._activePath=new Mr,this._transform=new G,this._fillStyle={...je.defaultFillStyle},this._strokeStyle={...je.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new ft,this._boundsDirty=!0}clone(){let t=new je;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle={...this._fillStyle},t._strokeStyle={...this._strokeStyle},t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=hr(t,je.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=$i(t,je.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=hr(t,je.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=hr(t,je.defaultStrokeStyle),this}texture(t,e,i,s,n,o){return this.instructions.push({action:"texture",data:{image:t,dx:i||0,dy:s||0,dw:n||t.frame.width,dh:o||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:e?Z.shared.setValue(e).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new Mr,this}fill(t,e){let i,s=this.instructions[this.instructions.length-1];return this._tick===0&&s&&s.action==="stroke"?i=s.data.path:i=this._activePath.clone(),i?(t!=null&&(e!==void 0&&typeof t=="number"&&(X(Y,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),t={color:t,alpha:e}),this._fillStyle=hr(t,je.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:i}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){let{x:t,y:e}=this._activePath.getLastPoint(et.shared);this._activePath.clear(),this._activePath.moveTo(t,e)}stroke(t){let e,i=this.instructions[this.instructions.length-1];return this._tick===0&&i&&i.action==="fill"?e=i.data.path:e=this._activePath.clone(),e?(t!=null&&(this._strokeStyle=$i(t,je.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:e}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let t=0;t<2;t++){let e=this.instructions[this.instructions.length-1-t],i=this._activePath.clone();if(e&&(e.action==="stroke"||e.action==="fill"))if(e.data.hole)e.data.hole.addPath(i);else{e.data.hole=i;break}}return this._initNextPathLocation(),this}arc(t,e,i,s,n,o){this._tick++;let a=this._transform;return this._activePath.arc(a.a*t+a.c*e+a.tx,a.b*t+a.d*e+a.ty,i,s,n,o),this}arcTo(t,e,i,s,n){this._tick++;let o=this._transform;return this._activePath.arcTo(o.a*t+o.c*e+o.tx,o.b*t+o.d*e+o.ty,o.a*i+o.c*s+o.tx,o.b*i+o.d*s+o.ty,n),this}arcToSvg(t,e,i,s,n,o,a){this._tick++;let u=this._transform;return this._activePath.arcToSvg(t,e,i,s,n,u.a*o+u.c*a+u.tx,u.b*o+u.d*a+u.ty),this}bezierCurveTo(t,e,i,s,n,o,a){this._tick++;let u=this._transform;return this._activePath.bezierCurveTo(u.a*t+u.c*e+u.tx,u.b*t+u.d*e+u.ty,u.a*i+u.c*s+u.tx,u.b*i+u.d*s+u.ty,u.a*n+u.c*o+u.tx,u.b*n+u.d*o+u.ty,a),this}closePath(){return this._tick++,this._activePath?.closePath(),this}ellipse(t,e,i,s){return this._tick++,this._activePath.ellipse(t,e,i,s,this._transform.clone()),this}circle(t,e,i){return this._tick++,this._activePath.circle(t,e,i,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,e){this._tick++;let i=this._transform;return this._activePath.lineTo(i.a*t+i.c*e+i.tx,i.b*t+i.d*e+i.ty),this}moveTo(t,e){this._tick++;let i=this._transform,s=this._activePath.instructions,n=i.a*t+i.c*e+i.tx,o=i.b*t+i.d*e+i.ty;return s.length===1&&s[0].action==="moveTo"?(s[0].data[0]=n,s[0].data[1]=o,this):(this._activePath.moveTo(n,o),this)}quadraticCurveTo(t,e,i,s,n){this._tick++;let o=this._transform;return this._activePath.quadraticCurveTo(o.a*t+o.c*e+o.tx,o.b*t+o.d*e+o.ty,o.a*i+o.c*s+o.tx,o.b*i+o.d*s+o.ty,n),this}rect(t,e,i,s){return this._tick++,this._activePath.rect(t,e,i,s,this._transform.clone()),this}roundRect(t,e,i,s,n){return this._tick++,this._activePath.roundRect(t,e,i,s,n,this._transform.clone()),this}poly(t,e){return this._tick++,this._activePath.poly(t,e,this._transform.clone()),this}regularPoly(t,e,i,s,n=0,o){return this._tick++,this._activePath.regularPoly(t,e,i,s,n,o),this}roundPoly(t,e,i,s,n,o){return this._tick++,this._activePath.roundPoly(t,e,i,s,n,o),this}roundShape(t,e,i,s){return this._tick++,this._activePath.roundShape(t,e,i,s),this}filletRect(t,e,i,s,n){return this._tick++,this._activePath.filletRect(t,e,i,s,n),this}chamferRect(t,e,i,s,n,o){return this._tick++,this._activePath.chamferRect(t,e,i,s,n,o),this}star(t,e,i,s,n=0,o=0){return this._tick++,this._activePath.star(t,e,i,s,n,o,this._transform.clone()),this}svg(t){return this._tick++,h0(t,this),this}restore(){let t=this._stateStack.pop();return t&&(this._transform=t.transform,this._fillStyle=t.fillStyle,this._strokeStyle=t.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(t){return this._transform.rotate(t),this}scale(t,e=t){return this._transform.scale(t,e),this}setTransform(t,e,i,s,n,o){return t instanceof G?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,e,i,s,n,o),this)}transform(t,e,i,s,n,o){return t instanceof G?(this._transform.append(t),this):(_0.set(t,e,i,s,n,o),this._transform.append(_0),this)}translate(t,e=t){return this._transform.translate(t,e),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this.dirty||(this.emit("update",this,16),this.dirty=!0,this._boundsDirty=!0)}get bounds(){if(!this._boundsDirty)return this._bounds;let t=this._bounds;t.clear();for(let e=0;e<this.instructions.length;e++){let i=this.instructions[e],s=i.action;if(s==="fill"){let n=i.data;t.addBounds(n.path.bounds)}else if(s==="texture"){let n=i.data;t.addFrame(n.dx,n.dy,n.dx+n.dw,n.dy+n.dh,n.transform)}if(s==="stroke"){let n=i.data,o=n.style.alignment,a=n.style.width*(1-o),u=n.path.bounds;t.addFrame(u.minX-a,u.minY-a,u.maxX+a,u.maxY+a)}}return t}containsPoint(t){if(!this.bounds.containsPoint(t.x,t.y))return!1;let e=this.instructions,i=!1;for(let s=0;s<e.length;s++){let n=e[s],o=n.data,a=o.path;if(!n.action||!a)continue;let u=o.style,l=a.shapePath.shapePrimitives;for(let c=0;c<l.length;c++){let h=l[c].shape;if(!u||!h)continue;let d=l[c].transform,f=d?d.applyInverse(t,VA):t;if(n.action==="fill")i=h.contains(f.x,f.y);else{let g=u;i=h.strokeContains(f.x,f.y,g.width,g.alignment)}let m=o.hole;if(m){let g=m.shapePath?.shapePrimitives;if(g)for(let x=0;x<g.length;x++)g[x].shape.contains(f.x,f.y)&&(i=!1)}if(i)return!0}}return i}destroy(t=!1){if(this._stateStack.length=0,this._transform=null,this.emit("destroy",this),this.removeAllListeners(),typeof t=="boolean"?t:t?.texture){let i=typeof t=="boolean"?t:t?.textureSource;this._fillStyle.texture&&this._fillStyle.texture.destroy(i),this._strokeStyle.texture&&this._strokeStyle.texture.destroy(i)}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};Mh.defaultFillStyle={color:16777215,alpha:1,texture:I.WHITE,matrix:null,fill:null};Mh.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:I.WHITE,matrix:null,fill:null,pixelLine:!1};de=Mh});function au(r){let t=[],e=0;for(let i=0;i<y0.length;i++){let s=`_${y0[i]}`;t[e++]=r[s]}return e=b0(r._fill,t,e),e=XA(r._stroke,t,e),e=$A(r.dropShadow,t,e),t.join("-")}function b0(r,t,e){return r&&(t[e++]=r.color,t[e++]=r.alpha,t[e++]=r.fill?.styleKey),e}function XA(r,t,e){return r&&(e=b0(r,t,e),t[e++]=r.width,t[e++]=r.alignment,t[e++]=r.cap,t[e++]=r.join,t[e++]=r.miterLimit),e}function $A(r,t,e){return r&&(t[e++]=r.alpha,t[e++]=r.angle,t[e++]=r.blur,t[e++]=r.distance,t[e++]=Z.shared.setValue(r.color).toNumber()),e}var y0,Rh=p(()=>{$t();y0=["align","breakWords","cssOverrides","fontVariant","fontWeight","leading","letterSpacing","lineHeight","padding","textBaseline","trim","whiteSpace","wordWrap","wordWrapWidth","fontFamily","fontStyle","fontSize"]});function jA(r){let t=r;if(typeof t.dropShadow=="boolean"&&t.dropShadow){let e=le.defaultDropShadow;r.dropShadow={alpha:t.dropShadowAlpha??e.alpha,angle:t.dropShadowAngle??e.angle,blur:t.dropShadowBlur??e.blur,color:t.dropShadowColor??e.color,distance:t.dropShadowDistance??e.distance}}if(t.strokeThickness!==void 0){X(Y,"strokeThickness is now a part of stroke");let e=t.stroke,i={};if(Z.isColorLike(e))i.color=e;else if(e instanceof Br||e instanceof cr)i.fill=e;else if(Object.hasOwnProperty.call(e,"color")||Object.hasOwnProperty.call(e,"fill"))i=e;else throw new Error("Invalid stroke value.");r.stroke={...i,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){X(Y,"gradient fill is now a fill pattern: `new FillGradient(...)`");let e;r.fontSize==null?r.fontSize=le.defaultTextStyle.fontSize:typeof r.fontSize=="string"?e=parseInt(r.fontSize,10):e=r.fontSize;let i=new Br(0,0,0,e*1.7),s=t.fillGradientStops.map(n=>Z.shared.setValue(n).toNumber());s.forEach((n,o)=>{let a=o/(s.length-1);i.addColorStop(a,n)}),r.fill={fill:i}}}var kh,le,Yi=p(()=>{Xt();$t();vt();Qa();Ja();Fh();Bh();Rh();kh=class ji extends ht{constructor(t={}){super(),jA(t);let e={...ji.defaultTextStyle,...t};for(let i in e){let s=i;this[s]=e[i]}this.update()}get align(){return this._align}set align(t){this._align=t,this.update()}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords=t,this.update()}get dropShadow(){return this._dropShadow}set dropShadow(t){t!==null&&typeof t=="object"?this._dropShadow=this._createProxy({...ji.defaultDropShadow,...t}):this._dropShadow=t?this._createProxy({...ji.defaultDropShadow}):null,this.update()}get fontFamily(){return this._fontFamily}set fontFamily(t){this._fontFamily=t,this.update()}get fontSize(){return this._fontSize}set fontSize(t){typeof t=="string"?this._fontSize=parseInt(t,10):this._fontSize=t,this.update()}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle=t.toLowerCase(),this.update()}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant=t,this.update()}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight=t,this.update()}get leading(){return this._leading}set leading(t){this._leading=t,this.update()}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing=t,this.update()}get lineHeight(){return this._lineHeight}set lineHeight(t){this._lineHeight=t,this.update()}get padding(){return this._padding}set padding(t){this._padding=t,this.update()}get trim(){return this._trim}set trim(t){this._trim=t,this.update()}get textBaseline(){return this._textBaseline}set textBaseline(t){this._textBaseline=t,this.update()}get whiteSpace(){return this._whiteSpace}set whiteSpace(t){this._whiteSpace=t,this.update()}get wordWrap(){return this._wordWrap}set wordWrap(t){this._wordWrap=t,this.update()}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(t){this._wordWrapWidth=t,this.update()}get fill(){return this._originalFill}set fill(t){t!==this._originalFill&&(this._originalFill=t,this._isFillStyle(t)&&(this._originalFill=this._createProxy({...de.defaultFillStyle,...t},()=>{this._fill=hr({...this._originalFill},de.defaultFillStyle)})),this._fill=hr(t===0?"black":t,de.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...de.defaultStrokeStyle,...t},()=>{this._stroke=$i({...this._originalStroke},de.defaultStrokeStyle)})),this._stroke=$i(t,de.defaultStrokeStyle),this.update())}_generateKey(){return this._styleKey=au(this),this._styleKey}update(){this._styleKey=null,this.emit("update",this)}reset(){let t=ji.defaultTextStyle;for(let e in t)this[e]=t[e]}get styleKey(){return this._styleKey||this._generateKey()}clone(){return new ji({align:this.align,breakWords:this.breakWords,dropShadow:this._dropShadow?{...this._dropShadow}:null,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,textBaseline:this.textBaseline,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth})}destroy(t=!1){if(this.removeAllListeners(),typeof t=="boolean"?t:t?.texture){let i=typeof t=="boolean"?t:t?.textureSource;this._fill?.texture&&this._fill.texture.destroy(i),this._originalFill?.texture&&this._originalFill.texture.destroy(i),this._stroke?.texture&&this._stroke.texture.destroy(i),this._originalStroke?.texture&&this._originalStroke.texture.destroy(i)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(t,e){return new Proxy(t,{set:(i,s,n)=>(i[s]=n,e?.(s,n),this.update(),!0)})}_isFillStyle(t){return(t??null)!==null&&!(Z.isColorLike(t)||t instanceof Br||t instanceof cr)}};kh.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};kh.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};le=kh});function uu(r,t,e,i){let s=YA;s.minX=0,s.minY=0,s.maxX=r.width/i|0,s.maxY=r.height/i|0;let n=xt.getOptimalTexture(s.width,s.height,i,!1);return n.source.uploadMethodId="image",n.source.resource=r,n.source.alphaMode="premultiply-alpha-on-upload",n.frame.width=t/i,n.frame.height=e/i,n.source.emit("update",n.source),n.updateUvs(),n}var YA,Gh=p(()=>{yr();ce();YA=new ft});function li(r){let t=typeof r.fontSize=="number"?`${r.fontSize}px`:r.fontSize,e=r.fontFamily;Array.isArray(r.fontFamily)||(e=r.fontFamily.split(","));for(let i=e.length-1;i>=0;i--){let s=e[i].trim();!/([\\"\\\'])[^\\\'\\"]+\\1/.test(s)&&!KA.includes(s)&&(s=`"${s}"`),e[i]=s}return`${r.fontStyle} ${r.fontVariant} ${r.fontWeight} ${t} ${e.join(",")}`}var KA,lu=p(()=>{"use strict";KA=["serif","sans-serif","monospace","cursive","fantasy","system-ui"]});var Ih,Fe,Te,cu=p(()=>{Pt();lu();Ih={willReadFrequently:!0},Fe=class W{static get experimentalLetterSpacingSupported(){let t=W._experimentalLetterSpacingSupported;if(t!==void 0){let e=Q.get().getCanvasRenderingContext2D().prototype;t=W._experimentalLetterSpacingSupported="letterSpacing"in e||"textLetterSpacing"in e}return t}constructor(t,e,i,s,n,o,a,u,l){this.text=t,this.style=e,this.width=i,this.height=s,this.lines=n,this.lineWidths=o,this.lineHeight=a,this.maxLineWidth=u,this.fontProperties=l}static measureText(t=" ",e,i=W._canvas,s=e.wordWrap){let n=`${t}:${e.styleKey}`;if(W._measurementCache[n])return W._measurementCache[n];let o=li(e),a=W.measureFont(o);a.fontSize===0&&(a.fontSize=e.fontSize,a.ascent=e.fontSize);let u=W.__context;u.font=o;let c=(s?W._wordWrap(t,e,i):t).split(/(?:\\r\\n|\\r|\\n)/),h=new Array(c.length),d=0;for(let v=0;v<c.length;v++){let T=W._measureText(c[v],e.letterSpacing,u);h[v]=T,d=Math.max(d,T)}let f=e._stroke?.width||0,m=d+f;e.dropShadow&&(m+=e.dropShadow.distance);let g=e.lineHeight||a.fontSize,x=Math.max(g,a.fontSize+f)+(c.length-1)*(g+e.leading);return e.dropShadow&&(x+=e.dropShadow.distance),new W(t,e,m,x,c,h,g+e.leading,d,a)}static _measureText(t,e,i){let s=!1;W.experimentalLetterSpacingSupported&&(W.experimentalLetterSpacing?(i.letterSpacing=`${e}px`,i.textLetterSpacing=`${e}px`,s=!0):(i.letterSpacing="0px",i.textLetterSpacing="0px"));let n=i.measureText(t),o=n.width,a=-n.actualBoundingBoxLeft,l=n.actualBoundingBoxRight-a;if(o>0)if(s)o-=e,l-=e;else{let c=(W.graphemeSegmenter(t).length-1)*e;o+=c,l+=c}return Math.max(o,l)}static _wordWrap(t,e,i=W._canvas){let s=i.getContext("2d",Ih),n=0,o="",a="",u=Object.create(null),{letterSpacing:l,whiteSpace:c}=e,h=W._collapseSpaces(c),d=W._collapseNewlines(c),f=!h,m=e.wordWrapWidth+l,g=W._tokenize(t);for(let x=0;x<g.length;x++){let _=g[x];if(W._isNewline(_)){if(!d){a+=W._addLine(o),f=!h,o="",n=0;continue}_=" "}if(h){let T=W.isBreakingSpace(_),y=W.isBreakingSpace(o[o.length-1]);if(T&&y)continue}let v=W._getFromCache(_,l,u,s);if(v>m)if(o!==""&&(a+=W._addLine(o),o="",n=0),W.canBreakWords(_,e.breakWords)){let T=W.wordWrapSplit(_);for(let y=0;y<T.length;y++){let C=T[y],S=C,E=1;for(;T[y+E];){let U=T[y+E];if(!W.canBreakChars(S,U,_,y,e.breakWords))C+=U;else break;S=U,E++}y+=E-1;let P=W._getFromCache(C,l,u,s);P+n>m&&(a+=W._addLine(o),f=!1,o="",n=0),o+=C,n+=P}}else{o.length>0&&(a+=W._addLine(o),o="",n=0);let T=x===g.length-1;a+=W._addLine(_,!T),f=!1,o="",n=0}else v+n>m&&(f=!1,a+=W._addLine(o),o="",n=0),(o.length>0||!W.isBreakingSpace(_)||f)&&(o+=_,n+=v)}return a+=W._addLine(o,!1),a}static _addLine(t,e=!0){return t=W._trimRight(t),t=e?`${t}\n`:t,t}static _getFromCache(t,e,i,s){let n=i[t];return typeof n!="number"&&(n=W._measureText(t,e,s)+e,i[t]=n),n}static _collapseSpaces(t){return t==="normal"||t==="pre-line"}static _collapseNewlines(t){return t==="normal"}static _trimRight(t){if(typeof t!="string")return"";for(let e=t.length-1;e>=0;e--){let i=t[e];if(!W.isBreakingSpace(i))break;t=t.slice(0,-1)}return t}static _isNewline(t){return typeof t!="string"?!1:W._newlines.includes(t.charCodeAt(0))}static isBreakingSpace(t,e){return typeof t!="string"?!1:W._breakingSpaces.includes(t.charCodeAt(0))}static _tokenize(t){let e=[],i="";if(typeof t!="string")return e;for(let s=0;s<t.length;s++){let n=t[s],o=t[s+1];if(W.isBreakingSpace(n,o)||W._isNewline(n)){i!==""&&(e.push(i),i=""),e.push(n);continue}i+=n}return i!==""&&e.push(i),e}static canBreakWords(t,e){return e}static canBreakChars(t,e,i,s,n){return!0}static wordWrapSplit(t){return W.graphemeSegmenter(t)}static measureFont(t){if(W._fonts[t])return W._fonts[t];let e=W._context;e.font=t;let i=e.measureText(W.METRICS_STRING+W.BASELINE_SYMBOL),s={ascent:i.actualBoundingBoxAscent,descent:i.actualBoundingBoxDescent,fontSize:i.actualBoundingBoxAscent+i.actualBoundingBoxDescent};return W._fonts[t]=s,s}static clearMetrics(t=""){t?delete W._fonts[t]:W._fonts={}}static get _canvas(){if(!W.__canvas){let t;try{let e=new OffscreenCanvas(0,0);if(e.getContext("2d",Ih)?.measureText)return W.__canvas=e,e;t=Q.get().createCanvas()}catch{t=Q.get().createCanvas()}t.width=t.height=10,W.__canvas=t}return W.__canvas}static get _context(){return W.__context||(W.__context=W._canvas.getContext("2d",Ih)),W.__context}};Fe.METRICS_STRING="|\\xC9q\\xC5";Fe.BASELINE_SYMBOL="M";Fe.BASELINE_MULTIPLIER=1.4;Fe.HEIGHT_MULTIPLIER=2;Fe.graphemeSegmenter=(()=>{if(typeof Intl?.Segmenter=="function"){let r=new Intl.Segmenter;return t=>[...r.segment(t)].map(e=>e.segment)}return r=>[...r]})();Fe.experimentalLetterSpacing=!1;Fe._fonts={};Fe._newlines=[10,13];Fe._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];Fe._measurementCache={};Te=Fe});function Ki(r,t){if(r.texture===I.WHITE&&!r.fill)return Z.shared.setValue(r.color).setAlpha(r.alpha??1).toHexa();if(r.fill){if(r.fill instanceof cr){let e=r.fill,i=t.createPattern(e.texture.source.resource,"repeat"),s=e.transform.copyTo(G.shared);return s.scale(e.texture.frame.width,e.texture.frame.height),i.setTransform(s),i}else if(r.fill instanceof Br){let e=r.fill;if(e.type==="linear"){let i=t.createLinearGradient(e.x0,e.y0,e.x1,e.y1);return e.gradientStops.forEach(s=>{i.addColorStop(s.offset,Z.shared.setValue(s.color).toHex())}),i}}}else{let e=t.createPattern(r.texture.source.resource,"repeat"),i=r.matrix.copyTo(G.shared);return i.scale(r.texture.frame.width,r.texture.frame.height),e.setTransform(i),e}return z("FillStyle not recognised",r),"red"}var Uh=p(()=>{$t();ot();dt();gt();Qa();Ja()});var _n,v0=p(()=>{$t();D();Os();Wi();yr();Ny();vt();Yi();Gh();cu();lu();Uh();_n=class{constructor(t){this._activeTextures={},this._renderer=t}getTextureSize(t,e,i){let s=Te.measureText(t||" ",i),n=Math.ceil(Math.ceil(Math.max(1,s.width)+i.padding*2)*e),o=Math.ceil(Math.ceil(Math.max(1,s.height)+i.padding*2)*e);return n=Math.ceil(n-1e-6),o=Math.ceil(o-1e-6),n=ir(n),o=ir(o),{width:n,height:o}}getTexture(t,e,i,s){typeof t=="string"&&(X("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),t={text:t,style:i,resolution:e}),t.style instanceof le||(t.style=new le(t.style));let{texture:n,canvasAndContext:o}=this.createTextureAndCanvas(t);return this._renderer.texture.initSource(n._source),ue.returnCanvasAndContext(o),n}createTextureAndCanvas(t){let{text:e,style:i}=t,s=t.resolution??this._renderer.resolution,n=Te.measureText(e||" ",i),o=Math.ceil(Math.ceil(Math.max(1,n.width)+i.padding*2)*s),a=Math.ceil(Math.ceil(Math.max(1,n.height)+i.padding*2)*s),u=ue.getOptimalCanvasAndContext(o,a),{canvas:l}=u;this.renderTextToCanvas(e,i,s,u);let c=uu(l,o,a,s);if(i.trim){let h=Ly(l,s);c.frame.copyFrom(h),c.updateUvs()}return{texture:c,canvasAndContext:u}}getManagedTexture(t){t._resolution=t._autoResolution?this._renderer.resolution:t.resolution;let e=t._getKey();if(this._activeTextures[e])return this._increaseReferenceCount(e),this._activeTextures[e].texture;let{texture:i,canvasAndContext:s}=this.createTextureAndCanvas(t);return this._activeTextures[e]={canvasAndContext:s,texture:i,usageCount:1},i}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}decreaseReferenceCount(t){let e=this._activeTextures[t];if(e.usageCount--,e.usageCount===0){ue.returnCanvasAndContext(e.canvasAndContext),xt.returnTexture(e.texture);let i=e.texture.source;i.resource=null,i.uploadMethodId="unknown",i.alphaMode="no-premultiply-alpha",this._activeTextures[t]=null}}getReferenceCount(t){return this._activeTextures[t].usageCount}renderTextToCanvas(t,e,i,s){let{canvas:n,context:o}=s,a=li(e),u=Te.measureText(t||" ",e),l=u.lines,c=u.lineHeight,h=u.lineWidths,d=u.maxLineWidth,f=u.fontProperties,m=n.height;if(o.resetTransform(),o.scale(i,i),o.textBaseline=e.textBaseline,e._stroke?.width){let v=e._stroke;o.lineWidth=v.width,o.miterLimit=v.miterLimit,o.lineJoin=v.join,o.lineCap=v.cap}o.font=a;let g,x,_=e.dropShadow?2:1;for(let v=0;v<_;++v){let T=e.dropShadow&&v===0,y=T?Math.ceil(Math.max(1,m)+e.padding*2):0,C=y*i;if(T){o.fillStyle="black",o.strokeStyle="black";let P=e.dropShadow,U=P.color,M=P.alpha;o.shadowColor=Z.shared.setValue(U).setAlpha(M).toRgbaString();let k=P.blur*i,N=P.distance*i;o.shadowBlur=k,o.shadowOffsetX=Math.cos(P.angle)*N,o.shadowOffsetY=Math.sin(P.angle)*N+C}else o.fillStyle=e._fill?Ki(e._fill,o):null,e._stroke?.width&&(o.strokeStyle=Ki(e._stroke,o)),o.shadowColor="black";let S=(c-f.fontSize)/2;c-f.fontSize<0&&(S=0);let E=e._stroke?.width??0;for(let P=0;P<l.length;P++)g=E/2,x=E/2+P*c+f.ascent+S,e.align==="right"?g+=d-h[P]:e.align==="center"&&(g+=(d-h[P])/2),e._stroke?.width&&this._drawLetterSpacing(l[P],e,s,g+e.padding,x+e.padding-y,!0),e._fill!==void 0&&this._drawLetterSpacing(l[P],e,s,g+e.padding,x+e.padding-y)}}_drawLetterSpacing(t,e,i,s,n,o=!1){let{context:a}=i,u=e.letterSpacing,l=!1;if(Te.experimentalLetterSpacingSupported&&(Te.experimentalLetterSpacing?(a.letterSpacing=`${u}px`,a.textLetterSpacing=`${u}px`,l=!0):(a.letterSpacing="0px",a.textLetterSpacing="0px")),u===0||l){o?a.strokeText(t,s,n):a.fillText(t,s,n);return}let c=s,h=Te.graphemeSegmenter(t),d=a.measureText(t).width,f=0;for(let m=0;m<h.length;++m){let g=h[m];o?a.strokeText(g,c,n):a.fillText(g,c,n);let x="";for(let _=m+1;_<h.length;++_)x+=h[_];f=a.measureText(x).width,c+=d-f+u,d=f}}destroy(){this._activeTextures=null}};_n.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"canvasText"}});var Oh=p(()=>{D();Iy();v0();H.add(_n);H.add(mn)});var Fr,Lh=p(()=>{vt();wa();Fh();Fr=class r extends Sr{constructor(t){t instanceof de&&(t={context:t});let{context:e,roundPixels:i,...s}=t||{};super({label:"Graphics",...s}),this.renderPipeId="graphics",e?this._context=e:this._context=this._ownedContext=new de,this._context.on("update",this.onViewUpdate,this),this.allowChildren=!1,this.roundPixels=i??!1}set context(t){t!==this._context&&(this._context.off("update",this.onViewUpdate,this),this._context=t,this._context.on("update",this.onViewUpdate,this),this.onViewUpdate())}get context(){return this._context}get bounds(){return this._context.bounds}updateBounds(){}containsPoint(t){return this._context.containsPoint(t)}destroy(t){this._ownedContext&&!t?this._ownedContext.destroy(t):(t===!0||t?.context===!0)&&this._context.destroy(t),this._ownedContext=null,this._context=null,super.destroy(t)}_callContextMethod(t,e){return this.context[t](...e),this}setFillStyle(...t){return this._callContextMethod("setFillStyle",t)}setStrokeStyle(...t){return this._callContextMethod("setStrokeStyle",t)}fill(...t){return this._callContextMethod("fill",t)}stroke(...t){return this._callContextMethod("stroke",t)}texture(...t){return this._callContextMethod("texture",t)}beginPath(){return this._callContextMethod("beginPath",[])}cut(){return this._callContextMethod("cut",[])}arc(...t){return this._callContextMethod("arc",t)}arcTo(...t){return this._callContextMethod("arcTo",t)}arcToSvg(...t){return this._callContextMethod("arcToSvg",t)}bezierCurveTo(...t){return this._callContextMethod("bezierCurveTo",t)}closePath(){return this._callContextMethod("closePath",[])}ellipse(...t){return this._callContextMethod("ellipse",t)}circle(...t){return this._callContextMethod("circle",t)}path(...t){return this._callContextMethod("path",t)}lineTo(...t){return this._callContextMethod("lineTo",t)}moveTo(...t){return this._callContextMethod("moveTo",t)}quadraticCurveTo(...t){return this._callContextMethod("quadraticCurveTo",t)}rect(...t){return this._callContextMethod("rect",t)}roundRect(...t){return this._callContextMethod("roundRect",t)}poly(...t){return this._callContextMethod("poly",t)}regularPoly(...t){return this._callContextMethod("regularPoly",t)}roundPoly(...t){return this._callContextMethod("roundPoly",t)}roundShape(...t){return this._callContextMethod("roundShape",t)}filletRect(...t){return this._callContextMethod("filletRect",t)}chamferRect(...t){return this._callContextMethod("chamferRect",t)}star(...t){return this._callContextMethod("star",t)}svg(...t){return this._callContextMethod("svg",t)}restore(...t){return this._callContextMethod("restore",t)}save(){return this._callContextMethod("save",[])}getTransform(){return this.context.getTransform()}resetTransform(){return this._callContextMethod("resetTransform",[])}rotateTransform(...t){return this._callContextMethod("rotate",t)}scaleTransform(...t){return this._callContextMethod("scale",t)}setTransform(...t){return this._callContextMethod("setTransform",t)}transform(...t){return this._callContextMethod("transform",t)}translateTransform(...t){return this._callContextMethod("translate",t)}clear(){return this._callContextMethod("clear",[])}get fillStyle(){return this._context.fillStyle}set fillStyle(t){this._context.fillStyle=t}get strokeStyle(){return this._context.strokeStyle}set strokeStyle(t){this._context.strokeStyle=t}clone(t=!1){return t?new r(this._context.clone()):(this._ownedContext=null,new r(this._context))}lineStyle(t,e,i){X(Y,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");let s={};return t&&(s.width=t),e&&(s.color=e),i&&(s.alpha=i),this.context.strokeStyle=s,this}beginFill(t,e){X(Y,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");let i={};return t!==void 0&&(i.color=t),e!==void 0&&(i.alpha=e),this.context.fillStyle=i,this}endFill(){X(Y,"Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),this.context.fill();let t=this.context.strokeStyle;return(t.width!==de.defaultStrokeStyle.width||t.color!==de.defaultStrokeStyle.color||t.alpha!==de.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return X(Y,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return X(Y,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return X(Y,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return X(Y,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return X(Y,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return X(Y,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}});var T0,S0,w0=p(()=>{"use strict";T0={name:"local-uniform-msdf-bit",vertex:{header:`\n struct LocalUniforms {\n uColor:vec4<f32>,\n uTransformMatrix:mat3x3<f32>,\n uDistance: f32,\n uRound:f32,\n }\n\n @group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;\n `,main:`\n vColor *= localUniforms.uColor;\n modelMatrix *= localUniforms.uTransformMatrix;\n `,end:`\n if(localUniforms.uRound == 1)\n {\n vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);\n }\n `},fragment:{header:`\n struct LocalUniforms {\n uColor:vec4<f32>,\n uTransformMatrix:mat3x3<f32>,\n uDistance: f32\n }\n\n @group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;\n `,main:` \n outColor = vec4<f32>(calculateMSDFAlpha(outColor, localUniforms.uColor, localUniforms.uDistance));\n `}},S0={name:"local-uniform-msdf-bit",vertex:{header:`\n uniform mat3 uTransformMatrix;\n uniform vec4 uColor;\n uniform float uRound;\n `,main:`\n vColor *= uColor;\n modelMatrix *= uTransformMatrix;\n `,end:`\n if(uRound == 1.)\n {\n gl_Position.xy = roundPixels(gl_Position.xy, uResolution);\n }\n `},fragment:{header:`\n uniform float uDistance;\n `,main:` \n outColor = vec4(calculateMSDFAlpha(outColor, vColor, uDistance));\n `}}});var E0,C0,A0=p(()=>{"use strict";E0={name:"msdf-bit",fragment:{header:`\n fn calculateMSDFAlpha(msdfColor:vec4<f32>, shapeColor:vec4<f32>, distance:f32) -> f32 {\n \n // MSDF\n var median = msdfColor.r + msdfColor.g + msdfColor.b -\n min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -\n max(msdfColor.r, max(msdfColor.g, msdfColor.b));\n \n // SDF\n median = min(median, msdfColor.a);\n\n var screenPxDistance = distance * (median - 0.5);\n var alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\n if (median < 0.01) {\n alpha = 0.0;\n } else if (median > 0.99) {\n alpha = 1.0;\n }\n\n // Gamma correction for coverage-like alpha\n var luma: f32 = dot(shapeColor.rgb, vec3<f32>(0.299, 0.587, 0.114));\n var gamma: f32 = mix(1.0, 1.0 / 2.2, luma);\n var coverage: f32 = pow(shapeColor.a * alpha, gamma);\n\n return coverage;\n \n }\n `}},C0={name:"msdf-bit",fragment:{header:`\n float calculateMSDFAlpha(vec4 msdfColor, vec4 shapeColor, float distance) {\n \n // MSDF\n float median = msdfColor.r + msdfColor.g + msdfColor.b -\n min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -\n max(msdfColor.r, max(msdfColor.g, msdfColor.b));\n \n // SDF\n median = min(median, msdfColor.a);\n \n float screenPxDistance = distance * (median - 0.5);\n float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\n \n if (median < 0.01) {\n alpha = 0.0;\n } else if (median > 0.99) {\n alpha = 1.0;\n }\n\n // Gamma correction for coverage-like alpha\n float luma = dot(shapeColor.rgb, vec3(0.299, 0.587, 0.114));\n float gamma = mix(1.0, 1.0 / 2.2, luma);\n float coverage = pow(shapeColor.a * alpha, gamma); \n \n return coverage;\n }\n `}}});var Nh,Hh,hu,D0=p(()=>{ot();ti();Ar();sn();nn();Dr();Oa();Be();ee();w0();A0();hu=class extends St{constructor(){let t=new ct({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uTransformMatrix:{value:new G,type:"mat3x3<f32>"},uDistance:{value:4,type:"f32"},uRound:{value:0,type:"f32"}}),e=_e();Nh??(Nh=Ne({name:"sdf-shader",bits:[Ri,Gi(e),T0,E0,ze]})),Hh??(Hh=He({name:"sdf-shader",bits:[ki,Ii(e),S0,C0,We]})),super({glProgram:Hh,gpuProgram:Nh,resources:{localUniforms:t,batchSamplers:Ui(e)}})}}});var fu,P0=p(()=>{Xt();vt();fu=class extends ht{constructor(){super(...arguments),this.chars=Object.create(null),this.lineHeight=0,this.fontFamily="",this.fontMetrics={fontSize:0,ascent:0,descent:0},this.baseLineOffset=0,this.distanceField={type:"none",range:0},this.pages=[],this.applyFillAsTint=!0,this.baseMeasurementFontSize=100,this.baseRenderedFontSize=100}get font(){return X(Y,"BitmapFont.font is deprecated, please use BitmapFont.fontFamily instead."),this.fontFamily}get pageTextures(){return X(Y,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}get size(){return X(Y,"BitmapFont.size is deprecated, please use BitmapFont.fontMetrics.fontSize instead."),this.fontMetrics.fontSize}get distanceFieldRange(){return X(Y,"BitmapFont.distanceFieldRange is deprecated, please use BitmapFont.distanceField.range instead."),this.distanceField.range}get distanceFieldType(){return X(Y,"BitmapFont.distanceFieldType is deprecated, please use BitmapFont.distanceField.type instead."),this.distanceField.type}destroy(t=!1){this.emit("destroy",this),this.removeAllListeners();for(let e in this.chars)this.chars[e].texture?.destroy();this.chars=null,t&&(this.pages.forEach(e=>e.texture.destroy(!0)),this.pages=null)}}});function du(r){if(r==="")return[];typeof r=="string"&&(r=[r]);let t=[];for(let e=0,i=r.length;e<i;e++){let s=r[e];if(Array.isArray(s)){if(s.length!==2)throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${s.length}.`);if(s[0].length===0||s[1].length===0)throw new Error("[BitmapFont]: Invalid character delimiter.");let n=s[0].charCodeAt(0),o=s[1].charCodeAt(0);if(o<n)throw new Error("[BitmapFont]: Invalid character range.");for(let a=n,u=o;a<=u;a++)t.push(String.fromCharCode(a))}else t.push(...Array.from(s))}if(t.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return t}var zh=p(()=>{"use strict"});var B0,Wh,F0=p(()=>{$t();Yt();Wi();Aa();dt();vt();cu();lu();Uh();Yi();P0();zh();B0=class M0 extends fu{constructor(t){super(),this.resolution=1,this.pages=[],this._padding=0,this._measureCache=Object.create(null),this._currentChars=[],this._currentX=0,this._currentY=0,this._currentPageIndex=-1,this._skipKerning=!1;let e={...M0.defaultOptions,...t};this._textureSize=e.textureSize,this._mipmap=e.mipmap;let i=e.style.clone();e.overrideFill&&(i._fill.color=16777215,i._fill.alpha=1,i._fill.texture=I.WHITE,i._fill.fill=null),this.applyFillAsTint=e.overrideFill;let s=i.fontSize;i.fontSize=this.baseMeasurementFontSize;let n=li(i);e.overrideSize?i._stroke&&(i._stroke.width*=this.baseRenderedFontSize/s):i.fontSize=this.baseRenderedFontSize=s,this._style=i,this._skipKerning=e.skipKerning??!1,this.resolution=e.resolution??1,this._padding=e.padding??4,this.fontMetrics=Te.measureFont(n),this.lineHeight=i.lineHeight||this.fontMetrics.fontSize||i.fontSize}ensureCharacters(t){let e=du(t).filter(x=>!this._currentChars.includes(x)).filter((x,_,v)=>v.indexOf(x)===_);if(!e.length)return;this._currentChars=[...this._currentChars,...e];let i;this._currentPageIndex===-1?i=this._nextPage():i=this.pages[this._currentPageIndex];let{canvas:s,context:n}=i.canvasAndContext,o=i.texture.source,a=this._style,u=this._currentX,l=this._currentY,c=this.baseRenderedFontSize/this.baseMeasurementFontSize,h=this._padding*c,d=0,f=!1,m=s.width/this.resolution,g=s.height/this.resolution;for(let x=0;x<e.length;x++){let _=e[x],v=Te.measureText(_,a,s,!1);v.lineHeight=v.height;let T=v.width*c,y=Math.ceil((a.fontStyle==="italic"?2:1)*T),C=v.height*c,S=y+h*2,E=C+h*2;if(f=!1,_!==`\n`&&_!=="\\r"&&_!==" "&&_!==" "&&(f=!0,d=Math.ceil(Math.max(E,d))),u+S>m&&(l+=d,d=E,u=0,l+d>g)){o.update();let U=this._nextPage();s=U.canvasAndContext.canvas,n=U.canvasAndContext.context,o=U.texture.source,l=0}let P=T/c-(a.dropShadow?.distance??0)-(a._stroke?.width??0);if(this.chars[_]={id:_.codePointAt(0),xOffset:-this._padding,yOffset:-this._padding,xAdvance:P,kerning:{}},f){this._drawGlyph(n,v,u+h,l+h,c,a);let U=o.width*c,M=o.height*c,k=new tt(u/U*o.width,l/M*o.height,S/U*o.width,E/M*o.height);this.chars[_].texture=new I({source:o,frame:k}),u+=Math.ceil(S)}}o.update(),this._currentX=u,this._currentY=l,this._skipKerning&&this._applyKerning(e,n)}get pageTextures(){return X(Y,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}_applyKerning(t,e){let i=this._measureCache;for(let s=0;s<t.length;s++){let n=t[s];for(let o=0;o<this._currentChars.length;o++){let a=this._currentChars[o],u=i[n];u||(u=i[n]=e.measureText(n).width);let l=i[a];l||(l=i[a]=e.measureText(a).width);let c=e.measureText(n+a).width,h=c-(u+l);h&&(this.chars[n].kerning[a]=h),c=e.measureText(n+a).width,h=c-(u+l),h&&(this.chars[a].kerning[n]=h)}}}_nextPage(){this._currentPageIndex++;let t=this.resolution,e=ue.getOptimalCanvasAndContext(this._textureSize,this._textureSize,t);this._setupContext(e.context,this._style,t);let i=t*(this.baseRenderedFontSize/this.baseMeasurementFontSize),s=new I({source:new or({resource:e.canvas,resolution:i,alphaMode:"premultiply-alpha-on-upload",autoGenerateMipmaps:this._mipmap})}),n={canvasAndContext:e,texture:s};return this.pages[this._currentPageIndex]=n,n}_setupContext(t,e,i){e.fontSize=this.baseRenderedFontSize,t.scale(i,i),t.font=li(e),e.fontSize=this.baseMeasurementFontSize,t.textBaseline=e.textBaseline;let s=e._stroke,n=s?.width??0;if(s&&(t.lineWidth=n,t.lineJoin=s.join,t.miterLimit=s.miterLimit,t.strokeStyle=Ki(s,t)),e._fill&&(t.fillStyle=Ki(e._fill,t)),e.dropShadow){let o=e.dropShadow,a=Z.shared.setValue(o.color).toArray(),u=o.blur*i,l=o.distance*i;t.shadowColor=`rgba(${a[0]*255},${a[1]*255},${a[2]*255},${o.alpha})`,t.shadowBlur=u,t.shadowOffsetX=Math.cos(o.angle)*l,t.shadowOffsetY=Math.sin(o.angle)*l}else t.shadowColor="black",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0}_drawGlyph(t,e,i,s,n,o){let a=e.text,u=e.fontProperties,c=(o._stroke?.width??0)*n,h=i+c/2,d=s-c/2,f=u.descent*n,m=e.lineHeight*n;o.stroke&&c&&t.strokeText(a,h,d+m-f),o._fill&&t.fillText(a,h,d+m-f)}destroy(){super.destroy();for(let t=0;t<this.pages.length;t++){let{canvasAndContext:e,texture:i}=this.pages[t];ue.returnCanvasAndContext(e),i.destroy(!0)}this.pages=null}};B0.defaultOptions={textureSize:512,style:new le,mipmap:!0};Wh=B0});function pu(r,t,e,i){let s={width:0,height:0,offsetY:0,scale:t.fontSize/e.baseMeasurementFontSize,lines:[{width:0,charPositions:[],spaceWidth:0,spacesIndex:[],chars:[]}]};s.offsetY=e.baseLineOffset;let n=s.lines[0],o=null,a=!0,u={spaceWord:!1,width:0,start:0,index:0,positions:[],chars:[]},l=m=>{let g=n.width;for(let x=0;x<u.index;x++){let _=m.positions[x];n.chars.push(m.chars[x]),n.charPositions.push(_+g)}n.width+=m.width,a=!1,u.width=0,u.index=0,u.chars.length=0},c=()=>{let m=n.chars.length-1;if(i){let g=n.chars[m];for(;g===" ";)n.width-=e.chars[g].xAdvance,g=n.chars[--m]}s.width=Math.max(s.width,n.width),n={width:0,charPositions:[],chars:[],spaceWidth:0,spacesIndex:[]},a=!0,s.lines.push(n),s.height+=e.lineHeight},h=e.baseMeasurementFontSize/t.fontSize,d=t.letterSpacing*h,f=t.wordWrapWidth*h;for(let m=0;m<r.length+1;m++){let g,x=m===r.length;x||(g=r[m]);let _=e.chars[g]||e.chars[" "];if(/(?:\\s)/.test(g)||g==="\\r"||g===`\n`||x){if(!a&&t.wordWrap&&n.width+u.width-d>f?(c(),l(u),x||n.charPositions.push(0)):(u.start=n.width,l(u),x||n.charPositions.push(0)),g==="\\r"||g===`\n`)n.width!==0&&c();else if(!x){let C=_.xAdvance+(_.kerning[o]||0)+d;n.width+=C,n.spaceWidth=C,n.spacesIndex.push(n.charPositions.length),n.chars.push(g)}}else{let y=_.kerning[o]||0,C=_.xAdvance+y+d;u.positions[u.index++]=u.width+y,u.chars.push(g),u.width+=C}o=g}return c(),t.align==="center"?qA(s):t.align==="right"?ZA(s):t.align==="justify"&&QA(s),s}function qA(r){for(let t=0;t<r.lines.length;t++){let e=r.lines[t],i=r.width/2-e.width/2;for(let s=0;s<e.charPositions.length;s++)e.charPositions[s]+=i}}function ZA(r){for(let t=0;t<r.lines.length;t++){let e=r.lines[t],i=r.width-e.width;for(let s=0;s<e.charPositions.length;s++)e.charPositions[s]+=i}}function QA(r){let t=r.width;for(let e=0;e<r.lines.length;e++){let i=r.lines[e],s=0,n=i.spacesIndex[s++],o=0,a=i.spacesIndex.length,l=(t-i.width)/a;for(let c=0;c<i.charPositions.length;c++)c===n&&(n=i.spacesIndex[s++],o+=l),i.charPositions[c]+=o}}var Vh=p(()=>{"use strict"});var mu,Xh,R0,k0=p(()=>{Qs();vt();gt();Yi();F0();Vh();zh();mu=0,Xh=class{constructor(){this.ALPHA=[["a","z"],["A","Z"]," "],this.NUMERIC=[["0","9"]],this.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],this.ASCII=[[" ","~"]],this.defaultOptions={chars:this.ALPHANUMERIC,resolution:1,padding:4,skipKerning:!1}}getFont(t,e){let i=`${e.fontFamily}-bitmap`,s=!0;if(e._fill.fill&&!e._stroke)i+=e._fill.fill.styleKey,s=!1;else if(e._stroke||e.dropShadow){let o=e.styleKey;o=o.substring(0,o.lastIndexOf("-")),i=`${o}-bitmap`,s=!1}if(!Bt.has(i)){let o=new Wh({style:e,overrideFill:s,overrideSize:!0,...this.defaultOptions});mu++,mu>50&&z("BitmapText",`You have dynamically created ${mu} bitmap fonts, this can be inefficient. Try pre installing your font styles using \\`BitmapFont.install({name:"style1", style})\\``),o.once("destroy",()=>{mu--,Bt.remove(i)}),Bt.set(i,o)}let n=Bt.get(i);return n.ensureCharacters?.(t),n}getLayout(t,e,i=!0){let s=this.getFont(t,e);return pu([...t],e,s,i)}measureText(t,e,i=!0){return this.getLayout(t,e,i)}install(...t){let e=t[0];typeof e=="string"&&(e={name:e,style:t[1],chars:t[2]?.chars,resolution:t[2]?.resolution,padding:t[2]?.padding,skipKerning:t[2]?.skipKerning},X(Y,"BitmapFontManager.install(name, style, options) is deprecated, use BitmapFontManager.install({name, style, ...options})"));let i=e?.name;if(!i)throw new Error("[BitmapFontManager] Property `name` is required.");e={...this.defaultOptions,...e};let s=e.style,n=s instanceof le?s:new le(s),o=n._fill.fill!==null&&n._fill.fill!==void 0,a=new Wh({style:n,overrideFill:o,skipKerning:e.skipKerning,padding:e.padding,resolution:e.resolution,overrideSize:!1}),u=du(e.chars);return a.ensureCharacters(u.join("")),Bt.set(`${i}-bitmap`,a),a.once("destroy",()=>Bt.remove(`${i}-bitmap`)),a}uninstall(t){let e=`${t}-bitmap`,i=Bt.get(e);i&&i.destroy()}},R0=new Xh});function G0(r,t){t.groupTransform=r.groupTransform,t.groupColorAlpha=r.groupColorAlpha,t.groupColor=r.groupColor,t.groupBlendMode=r.groupBlendMode,t.globalDisplayStatus=r.globalDisplayStatus,t.groupTransform=r.groupTransform,t.localDisplayStatus=r.localDisplayStatus,t.groupAlpha=r.groupAlpha,t._roundPixels=r._roundPixels}var yn,I0=p(()=>{Qs();D();Qt();Lh();D0();k0();Vh();yn=class{constructor(t){this._gpuBitmapText={},this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_gpuBitmapText")}validateRenderable(t){let e=this._getGpuBitmapText(t);return t._didTextUpdate&&(t._didTextUpdate=!1,this._updateContext(t,e)),this._renderer.renderPipes.graphics.validateRenderable(e)}addRenderable(t,e){let i=this._getGpuBitmapText(t);G0(t,i),t._didTextUpdate&&(t._didTextUpdate=!1,this._updateContext(t,i)),this._renderer.renderPipes.graphics.addRenderable(i,e),i.context.customShader&&this._updateDistanceField(t)}destroyRenderable(t){t.off("destroyed",this._destroyRenderableBound),this._destroyRenderableByUid(t.uid)}_destroyRenderableByUid(t){let e=this._gpuBitmapText[t].context;e.customShader&&(K.return(e.customShader),e.customShader=null),K.return(this._gpuBitmapText[t]),this._gpuBitmapText[t]=null}updateRenderable(t){let e=this._getGpuBitmapText(t);G0(t,e),this._renderer.renderPipes.graphics.updateRenderable(e),e.context.customShader&&this._updateDistanceField(t)}_updateContext(t,e){let{context:i}=e,s=R0.getFont(t.text,t._style);i.clear(),s.distanceField.type!=="none"&&(i.customShader||(i.customShader=K.get(hu)));let n=Array.from(t.text),o=t._style,a=s.baseLineOffset,u=pu(n,o,s,!0),l=0,c=o.padding,h=u.scale,d=u.width,f=u.height+u.offsetY;o._stroke&&(d+=o._stroke.width/h,f+=o._stroke.width/h),i.translate(-t._anchor._x*d-c,-t._anchor._y*f-c).scale(h,h);let m=s.applyFillAsTint?o._fill.color:16777215;for(let g=0;g<u.lines.length;g++){let x=u.lines[g];for(let _=0;_<x.charPositions.length;_++){let v=n[l++],T=s.chars[v];T?.texture&&i.texture(T.texture,m||"black",Math.round(x.charPositions[_]+T.xOffset),Math.round(a+T.yOffset))}a+=s.lineHeight}}_getGpuBitmapText(t){return this._gpuBitmapText[t.uid]||this.initGpuText(t)}initGpuText(t){let e=K.get(Fr);return this._gpuBitmapText[t.uid]=e,this._updateContext(t,e),t.on("destroyed",this._destroyRenderableBound),this._gpuBitmapText[t.uid]}_updateDistanceField(t){let e=this._getGpuBitmapText(t).context,i=t._style.fontFamily,s=Bt.get(`${i}-bitmap`),{a:n,b:o,c:a,d:u}=t.groupTransform,l=Math.sqrt(n*n+o*o),c=Math.sqrt(a*a+u*u),h=(Math.abs(l)+Math.abs(c))/2,d=s.baseRenderedFontSize/t._style.fontSize,f=h*s.distanceField.range*(1/d);e.customShader.resources.localUniforms.uniforms.uDistance=f}destroy(){for(let t in this._gpuBitmapText)this._destroyRenderableByUid(t);this._gpuBitmapText=null,this._renderer=null}};yn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"bitmapText"}});var $h=p(()=>{D();I0();H.add(yn)});var bn,U0=p(()=>{D();dt();Sa();Qt();pn();bn=class{constructor(t){this._gpuText=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.runners.resolutionChange.add(this),this._renderer.renderableGC.addManagedHash(this,"_gpuText")}resolutionChange(){for(let t in this._gpuText){let e=this._gpuText[t];if(!e)continue;let i=e.batchableSprite.renderable;i._autoResolution&&(i._resolution=this._renderer.resolution,i.onViewUpdate())}}validateRenderable(t){let e=this._getGpuText(t),i=t._getKey();return e.textureNeedsUploading?(e.textureNeedsUploading=!1,!0):e.currentKey!==i}addRenderable(t,e){let s=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),this._renderer.renderPipes.batch.addToBatch(s,e)}updateRenderable(t){let i=this._getGpuText(t).batchableSprite;t._didTextUpdate&&this._updateText(t),i._batcher.updateElement(i)}destroyRenderable(t){t.off("destroyed",this._destroyRenderableBound),this._destroyRenderableById(t.uid)}_destroyRenderableById(t){let e=this._gpuText[t];this._renderer.htmlText.decreaseReferenceCount(e.currentKey),K.return(e.batchableSprite),this._gpuText[t]=null}_updateText(t){let e=t._getKey(),i=this._getGpuText(t),s=i.batchableSprite;i.currentKey!==e&&this._updateGpuText(t).catch(o=>{console.error(o)}),t._didTextUpdate=!1;let n=t._style.padding;Qr(s.bounds,t._anchor,s.texture,n)}async _updateGpuText(t){t._didTextUpdate=!1;let e=this._getGpuText(t);if(e.generatingTexture)return;let i=t._getKey();this._renderer.htmlText.decreaseReferenceCount(e.currentKey),e.generatingTexture=!0,e.currentKey=i;let s=t.resolution??this._renderer.resolution,n=await this._renderer.htmlText.getManagedTexture(t.text,s,t._style,t._getKey()),o=e.batchableSprite;o.texture=e.texture=n,e.generatingTexture=!1,e.textureNeedsUploading=!0,t.onViewUpdate();let a=t._style.padding;Qr(o.bounds,t._anchor,o.texture,a)}_getGpuText(t){return this._gpuText[t.uid]||this.initGpuText(t)}initGpuText(t){let e={texture:I.EMPTY,currentKey:"--",batchableSprite:K.get($e),textureNeedsUploading:!1,generatingTexture:!1},i=e.batchableSprite;return i.renderable=t,i.transform=t.groupTransform,i.texture=I.EMPTY,i.bounds={minX:0,maxX:1,minY:0,maxY:0},i.roundPixels=this._renderer._roundPixels|t._roundPixels,t._resolution=t._autoResolution?this._renderer.resolution:t.resolution,this._gpuText[t.uid]=e,t.on("destroyed",this._destroyRenderableBound),e}destroy(){for(let t in this._gpuText)this._destroyRenderableById(t);this._gpuText=null,this._renderer=null}};bn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"htmlText"}});function O0(){let{userAgent:r}=Q.get().getNavigator();return/^((?!chrome|android).)*safari/i.test(r)}var L0=p(()=>{Pt()});var N0,H0,qi,jh=p(()=>{"use strict";N0="http://www.w3.org/2000/svg",H0="http://www.w3.org/1999/xhtml",qi=class{constructor(){this.svgRoot=document.createElementNS(N0,"svg"),this.foreignObject=document.createElementNS(N0,"foreignObject"),this.domElement=document.createElementNS(H0,"div"),this.styleElement=document.createElementNS(H0,"style"),this.image=new Image;let{foreignObject:t,svgRoot:e,styleElement:i,domElement:s}=this;t.setAttribute("width","10000"),t.setAttribute("height","10000"),t.style.overflow="hidden",e.appendChild(t),t.appendChild(i),t.appendChild(s)}}});function V0(r){let t=r._stroke,e=r._fill,s=[`div { ${[`color: ${Z.shared.setValue(e.color).toHex()}`,`font-size: ${r.fontSize}px`,`font-family: ${r.fontFamily}`,`font-weight: ${r.fontWeight}`,`font-style: ${r.fontStyle}`,`font-variant: ${r.fontVariant}`,`letter-spacing: ${r.letterSpacing}px`,`text-align: ${r.align}`,`padding: ${r.padding}px`,`white-space: ${r.whiteSpace==="pre"&&r.wordWrap?"pre-wrap":r.whiteSpace}`,...r.lineHeight?[`line-height: ${r.lineHeight}px`]:[],...r.wordWrap?[`word-wrap: ${r.breakWords?"break-all":"break-word"}`,`max-width: ${r.wordWrapWidth}px`]:[],...t?[$0(t)]:[],...r.dropShadow?[X0(r.dropShadow)]:[],...r.cssOverrides].join(";")} }`];return JA(r.tagStyles,s),s.join(" ")}function X0(r){let t=Z.shared.setValue(r.color).setAlpha(r.alpha).toHexa(),e=Math.round(Math.cos(r.angle)*r.distance),i=Math.round(Math.sin(r.angle)*r.distance),s=`${e}px ${i}px`;return r.blur>0?`text-shadow: ${s} ${r.blur}px ${t}`:`text-shadow: ${s} ${t}`}function $0(r){return[`-webkit-text-stroke-width: ${r.width}px`,`-webkit-text-stroke-color: ${Z.shared.setValue(r.color).toHex()}`,`text-stroke-width: ${r.width}px`,`text-stroke-color: ${Z.shared.setValue(r.color).toHex()}`,"paint-order: stroke"].join(";")}function JA(r,t){for(let e in r){let i=r[e],s=[];for(let n in i)W0[n]?s.push(W0[n](i[n])):z0[n]&&s.push(z0[n].replace("{{VALUE}}",i[n]));t.push(`${e} { ${s.join(";")} }`)}}var z0,W0,j0=p(()=>{$t();z0={fontSize:"font-size: {{VALUE}}px",fontFamily:"font-family: {{VALUE}}",fontWeight:"font-weight: {{VALUE}}",fontStyle:"font-style: {{VALUE}}",fontVariant:"font-variant: {{VALUE}}",letterSpacing:"letter-spacing: {{VALUE}}px",align:"text-align: {{VALUE}}",padding:"padding: {{VALUE}}px",whiteSpace:"white-space: {{VALUE}}",lineHeight:"line-height: {{VALUE}}px",wordWrapWidth:"max-width: {{VALUE}}px"},W0={fill:r=>`color: ${Z.shared.setValue(r).toHex()}`,breakWords:r=>`word-wrap: ${r?"break-all":"break-word"}`,stroke:$0,dropShadow:X0}});var gu,Y0=p(()=>{gt();Yi();Rh();j0();gu=class r extends le{constructor(t={}){super(t),this._cssOverrides=[],this.cssOverrides??(this.cssOverrides=t.cssOverrides),this.tagStyles=t.tagStyles??{}}set cssOverrides(t){this._cssOverrides=t instanceof Array?t:[t],this.update()}get cssOverrides(){return this._cssOverrides}_generateKey(){return this._styleKey=au(this)+this._cssOverrides.join("-"),this._styleKey}update(){this._cssStyle=null,super.update()}clone(){return new r({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow?{...this.dropShadow}:null,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,cssOverrides:this.cssOverrides})}get cssStyle(){return this._cssStyle||(this._cssStyle=V0(this)),this._cssStyle}addOverride(...t){let e=t.filter(i=>!this.cssOverrides.includes(i));e.length>0&&(this.cssOverrides.push(...e),this.update())}removeOverride(...t){let e=t.filter(i=>this.cssOverrides.includes(i));e.length>0&&(this.cssOverrides=this.cssOverrides.filter(i=>!e.includes(i)),this.update())}set fill(t){typeof t!="string"&&typeof t!="number"&&z("[HTMLTextStyle] only color fill is not supported by HTMLText"),super.fill=t}set stroke(t){t&&typeof t!="string"&&typeof t!="number"&&z("[HTMLTextStyle] only color stroke is not supported by HTMLText"),super.stroke=t}}});function K0(r,t){let e=t.fontFamily,i=[],s={},n=/font-family:([^;"\\s]+)/g,o=r.match(n);function a(u){s[u]||(i.push(u),s[u]=!0)}if(Array.isArray(e))for(let u=0;u<e.length;u++)a(e[u]);else a(e);o&&o.forEach(u=>{let l=u.split(":")[1].trim();a(l)});for(let u in t.tagStyles){let l=t.tagStyles[u].fontFamily;a(l)}return i}var q0=p(()=>{"use strict"});async function Z0(r){let e=await(await Q.get().fetch(r)).blob(),i=new FileReader;return await new Promise((n,o)=>{i.onloadend=()=>n(i.result),i.onerror=o,i.readAsDataURL(e)})}var Q0=p(()=>{Pt()});async function Yh(r,t){let e=await Z0(t);return`@font-face {\n font-family: "${r.fontFamily}";\n src: url(\'${e}\');\n font-weight: ${r.fontWeight};\n font-style: ${r.fontStyle};\n }`}var J0=p(()=>{Q0()});async function tb(r,t,e){let i=r.filter(s=>Bt.has(`${s}-and-url`)).map((s,n)=>{if(!xu.has(s)){let{url:o}=Bt.get(`${s}-and-url`);n===0?xu.set(s,Yh({fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:s},o)):xu.set(s,Yh({fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:s},o))}return xu.get(s)});return(await Promise.all(i)).join(`\n`)}var xu,eb=p(()=>{Qs();J0();xu=new Map});function rb(r,t,e,i,s){let{domElement:n,styleElement:o,svgRoot:a}=s;n.innerHTML=`<style>${t.cssStyle}</style><div style=\'padding:0;\'>${r}</div>`,n.setAttribute("style",`transform: scale(${e});transform-origin: top left; display: inline-block`),o.textContent=i;let{width:u,height:l}=s.image;return a.setAttribute("width",u.toString()),a.setAttribute("height",l.toString()),new XMLSerializer().serializeToString(a)}var ib=p(()=>{"use strict"});function sb(r,t){let e=ue.getOptimalCanvasAndContext(r.width,r.height,t),{context:i}=e;return i.clearRect(0,0,r.width,r.height),i.drawImage(r,0,0),e}var nb=p(()=>{Wi()});function ob(r,t,e){return new Promise(async i=>{e&&await new Promise(s=>setTimeout(s,100)),r.onload=()=>{i()},r.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(t)}`,r.crossOrigin="anonymous"})}var ab=p(()=>{"use strict"});function lb(r,t,e,i){i||(i=ub||(ub=new qi));let{domElement:s,styleElement:n,svgRoot:o}=i;s.innerHTML=`<style>${t.cssStyle};</style><div style=\'padding:0\'>${r}</div>`,s.setAttribute("style","transform-origin: top left; display: inline-block"),e&&(n.textContent=e),document.body.appendChild(o);let a=s.getBoundingClientRect();o.remove();let u=t.padding*2;return{width:a.width-u,height:a.height-u}}var ub,cb=p(()=>{jh()});var Zi,hb=p(()=>{D();Wi();yr();Ve();L0();gt();Qt();Gh();jh();Y0();q0();eb();ib();nb();ab();cb();Zi=class{constructor(t){this._activeTextures={},this._renderer=t,this._createCanvas=t.type===Mt.WEBGPU}getTexture(t){return this._buildTexturePromise(t.text,t.resolution,t.style)}getManagedTexture(t,e,i,s){if(this._activeTextures[s])return this._increaseReferenceCount(s),this._activeTextures[s].promise;let n=this._buildTexturePromise(t,e,i).then(o=>(this._activeTextures[s].texture=o,o));return this._activeTextures[s]={texture:null,promise:n,usageCount:1},n}async _buildTexturePromise(t,e,i){let s=K.get(qi),n=K0(t,i),o=await tb(n,i,gu.defaultTextStyle),a=lb(t,i,o,s),u=Math.ceil(Math.ceil(Math.max(1,a.width)+i.padding*2)*e),l=Math.ceil(Math.ceil(Math.max(1,a.height)+i.padding*2)*e),c=s.image,h=2;c.width=(u|0)+h,c.height=(l|0)+h;let d=rb(t,i,e,o,s);await ob(c,d,O0()&&n.length>0);let f=c,m;this._createCanvas&&(m=sb(c,e));let g=uu(m?m.canvas:f,c.width-h,c.height-h,e);return this._createCanvas&&(this._renderer.texture.initSource(g.source),ue.returnCanvasAndContext(m)),K.return(s),g}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}decreaseReferenceCount(t){let e=this._activeTextures[t];e&&(e.usageCount--,e.usageCount===0&&(e.texture?this._cleanUp(e):e.promise.then(i=>{e.texture=i,this._cleanUp(e)}).catch(()=>{z("HTMLTextSystem: Failed to clean texture")}),this._activeTextures[t]=null))}_cleanUp(t){xt.returnTexture(t.texture),t.texture.source.resource=null,t.texture.source.uploadMethodId="unknown"}getReferenceCount(t){return this._activeTextures[t].usageCount}destroy(){this._activeTextures=null}};Zi.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"htmlText"};Zi.defaultFontOptions={fontFamily:"Arial",fontStyle:"normal",fontWeight:"normal"}});var Kh=p(()=>{D();U0();hb();H.add(Zi);H.add(bn)});var fb,Qi,_u=p(()=>{Er();ur();Bi();vt();fb=class db extends ye{constructor(...t){let e=t[0]??{};e instanceof Float32Array&&(X(Y,"use new MeshGeometry({ positions, uvs, indices }) instead"),e={positions:e,uvs:t[1],indices:t[2]}),e={...db.defaultOptions,...e};let i=e.positions||new Float32Array([0,0,1,0,1,1,0,1]),s=e.uvs||new Float32Array([0,0,1,0,1,1,0,1]),n=e.indices||new Uint32Array([0,1,2,0,2,3]),o=e.shrinkBuffersToFit,a=new Tt({data:i,label:"attribute-mesh-positions",shrinkToFit:o,usage:J.VERTEX|J.COPY_DST}),u=new Tt({data:s,label:"attribute-mesh-uvs",shrinkToFit:o,usage:J.VERTEX|J.COPY_DST}),l=new Tt({data:n,label:"index-mesh-buffer",shrinkToFit:o,usage:J.INDEX|J.COPY_DST});super({attributes:{aPosition:{buffer:a,format:"float32x2",stride:2*4,offset:0},aUV:{buffer:u,format:"float32x2",stride:2*4,offset:0}},indexBuffer:l,topology:e.topology}),this.batchMode="auto"}get positions(){return this.attributes.aPosition.buffer.data}set positions(t){this.attributes.aPosition.buffer.data=t}get uvs(){return this.attributes.aUV.buffer.data}set uvs(t){this.attributes.aUV.buffer.data=t}get indices(){return this.indexBuffer.data}set indices(t){this.indexBuffer.data=t}};fb.defaultOptions={topology:"triangle-list",shrinkBuffersToFit:!1};Qi=fb});var ci,pb,Ji,ts=p(()=>{"use strict";ci={name:"local-uniform-bit",vertex:{header:`\n\n struct LocalUniforms {\n uTransformMatrix:mat3x3<f32>,\n uColor:vec4<f32>,\n uRound:f32,\n }\n\n @group(1) @binding(0) var<uniform> localUniforms : LocalUniforms;\n `,main:`\n vColor *= localUniforms.uColor;\n modelMatrix *= localUniforms.uTransformMatrix;\n `,end:`\n if(localUniforms.uRound == 1)\n {\n vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);\n }\n `}},pb={...ci,vertex:{...ci.vertex,header:ci.vertex.header.replace("group(1)","group(2)")}},Ji={name:"local-uniform-bit",vertex:{header:`\n\n uniform mat3 uTransformMatrix;\n uniform vec4 uColor;\n uniform float uRound;\n `,main:`\n vColor *= uColor;\n modelMatrix = uTransformMatrix;\n `,end:`\n if(uRound == 1.)\n {\n gl_Position.xy = roundPixels(gl_Position.xy, uResolution);\n }\n `}}});var mb,gb,xb=p(()=>{"use strict";mb={name:"tiling-bit",vertex:{header:`\n struct TilingUniforms {\n uMapCoord:mat3x3<f32>,\n uClampFrame:vec4<f32>,\n uClampOffset:vec2<f32>,\n uTextureTransform:mat3x3<f32>,\n uSizeAnchor:vec4<f32>\n };\n\n @group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;\n @group(2) @binding(1) var uTexture: texture_2d<f32>;\n @group(2) @binding(2) var uSampler: sampler;\n `,main:`\n uv = (tilingUniforms.uTextureTransform * vec3(uv, 1.0)).xy;\n\n position = (position - tilingUniforms.uSizeAnchor.zw) * tilingUniforms.uSizeAnchor.xy;\n `},fragment:{header:`\n struct TilingUniforms {\n uMapCoord:mat3x3<f32>,\n uClampFrame:vec4<f32>,\n uClampOffset:vec2<f32>,\n uTextureTransform:mat3x3<f32>,\n uSizeAnchor:vec4<f32>\n };\n\n @group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;\n @group(2) @binding(1) var uTexture: texture_2d<f32>;\n @group(2) @binding(2) var uSampler: sampler;\n `,main:`\n\n var coord = vUV + ceil(tilingUniforms.uClampOffset - vUV);\n coord = (tilingUniforms.uMapCoord * vec3(coord, 1.0)).xy;\n var unclamped = coord;\n coord = clamp(coord, tilingUniforms.uClampFrame.xy, tilingUniforms.uClampFrame.zw);\n\n var bias = 0.;\n\n if(unclamped.x == coord.x && unclamped.y == coord.y)\n {\n bias = -32.;\n } \n\n outColor = textureSampleBias(uTexture, uSampler, coord, bias);\n `}},gb={name:"tiling-bit",vertex:{header:`\n uniform mat3 uTextureTransform;\n uniform vec4 uSizeAnchor;\n \n `,main:`\n uv = (uTextureTransform * vec3(aUV, 1.0)).xy;\n\n position = (position - uSizeAnchor.zw) * uSizeAnchor.xy;\n `},fragment:{header:`\n uniform sampler2D uTexture;\n uniform mat3 uMapCoord;\n uniform vec4 uClampFrame;\n uniform vec2 uClampOffset;\n `,main:`\n\n vec2 coord = vUV + ceil(uClampOffset - vUV);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n vec2 unclamped = coord;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n \n outColor = texture(uTexture, coord, unclamped == coord ? 0.0 : -32.0);// lod-bias very negative to force lod 0\n \n `}}});var qh,Zh,yu,_b=p(()=>{ot();Ar();ts();Dr();Be();ee();dt();xb();yu=class extends St{constructor(){qh??(qh=Ne({name:"tiling-sprite-shader",bits:[ci,mb,ze]})),Zh??(Zh=He({name:"tiling-sprite-shader",bits:[Ji,gb,We]}));let t=new ct({uMapCoord:{value:new G,type:"mat3x3<f32>"},uClampFrame:{value:new Float32Array([0,0,1,1]),type:"vec4<f32>"},uClampOffset:{value:new Float32Array([0,0]),type:"vec2<f32>"},uTextureTransform:{value:new G,type:"mat3x3<f32>"},uSizeAnchor:{value:new Float32Array([100,100,.5,.5]),type:"vec4<f32>"}});super({glProgram:Zh,gpuProgram:qh,resources:{localUniforms:new ct({uTransformMatrix:{value:new G,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),tilingUniforms:t,uTexture:I.EMPTY.source,uSampler:I.EMPTY.source.style}})}updateUniforms(t,e,i,s,n,o){let a=this.resources.tilingUniforms,u=o.width,l=o.height,c=o.textureMatrix,h=a.uniforms.uTextureTransform;h.set(i.a*u/t,i.b*u/e,i.c*l/t,i.d*l/e,i.tx/t,i.ty/e),h.invert(),a.uniforms.uMapCoord=c.mapCoord,a.uniforms.uClampFrame=c.uClampFrame,a.uniforms.uClampOffset=c.uClampOffset,a.uniforms.uTextureTransform=h,a.uniforms.uSizeAnchor[0]=t,a.uniforms.uSizeAnchor[1]=e,a.uniforms.uSizeAnchor[2]=s,a.uniforms.uSizeAnchor[3]=n,o&&(this.resources.uTexture=o.source,this.resources.uSampler=o.source.style)}}});var bu,yb=p(()=>{_u();bu=class extends Qi{constructor(){super({positions:new Float32Array([0,0,1,0,1,1,0,1]),uvs:new Float32Array([0,0,1,0,1,1,0,1]),indices:new Uint32Array([0,1,2,0,2,3])})}}});function bb(r,t){let e=r.anchor.x,i=r.anchor.y;t[0]=-e*r.width,t[1]=-i*r.height,t[2]=(1-e)*r.width,t[3]=-i*r.height,t[4]=(1-e)*r.width,t[5]=(1-i)*r.height,t[6]=-e*r.width,t[7]=(1-i)*r.height}var vb=p(()=>{"use strict"});function Tb(r,t,e,i){let s=0,n=r.length/(t||2),o=i.a,a=i.b,u=i.c,l=i.d,c=i.tx,h=i.ty;for(e*=t;s<n;){let d=r[e],f=r[e+1];r[e]=o*d+u*f+c,r[e+1]=a*d+l*f+h,e+=t,s++}}var Sb=p(()=>{"use strict"});function wb(r,t){let e=r.texture,i=e.frame.width,s=e.frame.height,n=0,o=0;r.applyAnchorToTexture&&(n=r.anchor.x,o=r.anchor.y),t[0]=t[6]=-n,t[2]=t[4]=1-n,t[1]=t[3]=-o,t[5]=t[7]=1-o;let a=G.shared;a.copyFrom(r._tileTransform.matrix),a.tx/=r.width,a.ty/=r.height,a.invert(),a.scale(r.width/i,r.height/s),Tb(t,2,0,a)}var Eb=p(()=>{ot();Sb()});var vu,vn,Cb=p(()=>{D();tn();Me();Ve();Hi();ja();_u();_b();yb();vb();Eb();vu=new bu,vn=class{constructor(t){this._state=Ct.default2d,this._tilingSpriteDataHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_tilingSpriteDataHash")}validateRenderable(t){let e=this._getTilingSpriteData(t),i=e.canBatch;this._updateCanBatch(t);let s=e.canBatch;if(s&&s===i){let{batchableMesh:n}=e;return!n._batcher.checkAndUpdateTexture(n,t.texture)}return i!==s}addRenderable(t,e){let i=this._renderer.renderPipes.batch;this._updateCanBatch(t);let s=this._getTilingSpriteData(t),{geometry:n,canBatch:o}=s;if(o){s.batchableMesh||(s.batchableMesh=new Pr);let a=s.batchableMesh;t.didViewUpdate&&(this._updateBatchableMesh(t),a.geometry=n,a.renderable=t,a.transform=t.groupTransform,a.texture=t._texture),a.roundPixels=this._renderer._roundPixels|t._roundPixels,i.addToBatch(a,e)}else i.break(e),s.shader||(s.shader=new yu),this.updateRenderable(t),e.add(t)}execute(t){let{shader:e}=this._tilingSpriteDataHash[t.uid];e.groups[0]=this._renderer.globalUniforms.bindGroup;let i=e.resources.localUniforms.uniforms;i.uTransformMatrix=t.groupTransform,i.uRound=this._renderer._roundPixels|t._roundPixels,Xe(t.groupColorAlpha,i.uColor,0),this._state.blendMode=ar(t.groupBlendMode,t.texture._source),this._renderer.encoder.draw({geometry:vu,shader:e,state:this._state})}updateRenderable(t){let e=this._getTilingSpriteData(t),{canBatch:i}=e;if(i){let{batchableMesh:s}=e;t.didViewUpdate&&this._updateBatchableMesh(t),s._batcher.updateElement(s)}else if(t.didViewUpdate){let{shader:s}=e;s.updateUniforms(t.width,t.height,t._tileTransform.matrix,t.anchor.x,t.anchor.y,t.texture)}}destroyRenderable(t){let e=this._getTilingSpriteData(t);e.batchableMesh=null,e.shader?.destroy(),this._tilingSpriteDataHash[t.uid]=null,t.off("destroyed",this._destroyRenderableBound)}_getTilingSpriteData(t){return this._tilingSpriteDataHash[t.uid]||this._initTilingSpriteData(t)}_initTilingSpriteData(t){let e=new Qi({indices:vu.indices,positions:vu.positions.slice(),uvs:vu.uvs.slice()});return this._tilingSpriteDataHash[t.uid]={canBatch:!0,renderable:t,geometry:e},t.on("destroyed",this._destroyRenderableBound),this._tilingSpriteDataHash[t.uid]}_updateBatchableMesh(t){let e=this._getTilingSpriteData(t),{geometry:i}=e,s=t.texture.source.style;s.addressMode!=="repeat"&&(s.addressMode="repeat",s.update()),wb(t,i.uvs),bb(t,i.positions)}destroy(){for(let t in this._tilingSpriteDataHash)this.destroyRenderable(this._tilingSpriteDataHash[t].renderable);this._tilingSpriteDataHash=null,this._renderer=null}_updateCanBatch(t){let e=this._getTilingSpriteData(t),i=t.texture,s=!0;return this._renderer.type===Mt.WEBGL&&(s=this._renderer.context.supports.nonPowOf2wrapping),e.canBatch=i.textureMatrix.isSimple&&(s||i.source.isPowerOfTwo),e.canBatch}};vn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"tilingSprite"}});var Qh=p(()=>{D();Cb();H.add(vn)});var Ab,Pb,Bb=p(()=>{vt();_u();Ab=class Db extends Qi{constructor(...t){super({});let e=t[0]??{};typeof e=="number"&&(X(Y,"PlaneGeometry constructor changed please use { width, height, verticesX, verticesY } instead"),e={width:e,height:t[1],verticesX:t[2],verticesY:t[3]}),this.build(e)}build(t){t={...Db.defaultOptions,...t},this.verticesX=this.verticesX??t.verticesX,this.verticesY=this.verticesY??t.verticesY,this.width=this.width??t.width,this.height=this.height??t.height;let e=this.verticesX*this.verticesY,i=[],s=[],n=[],o=this.verticesX-1,a=this.verticesY-1,u=this.width/o,l=this.height/a;for(let h=0;h<e;h++){let d=h%this.verticesX,f=h/this.verticesX|0;i.push(d*u,f*l),s.push(d/o,f/a)}let c=o*a;for(let h=0;h<c;h++){let d=h%o,f=h/o|0,m=f*this.verticesX+d,g=f*this.verticesX+d+1,x=(f+1)*this.verticesX+d,_=(f+1)*this.verticesX+d+1;n.push(m,g,x,g,_,x)}this.buffers[0].data=new Float32Array(i),this.buffers[1].data=new Float32Array(s),this.indexBuffer.data=new Uint32Array(n),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()}};Ab.defaultOptions={width:100,height:100,verticesX:10,verticesY:10};Pb=Ab});var Mb,Rb,kb=p(()=>{Bb();Mb=class Fb extends Pb{constructor(t={}){t={...Fb.defaultOptions,...t},super({width:t.width,height:t.height,verticesX:4,verticesY:4}),this.update(t)}update(t){this.width=t.width??this.width,this.height=t.height??this.height,this._originalWidth=t.originalWidth??this._originalWidth,this._originalHeight=t.originalHeight??this._originalHeight,this._leftWidth=t.leftWidth??this._leftWidth,this._rightWidth=t.rightWidth??this._rightWidth,this._topHeight=t.topHeight??this._topHeight,this._bottomHeight=t.bottomHeight??this._bottomHeight,this.updateUvs(),this.updatePositions()}updatePositions(){let t=this.positions,e=this._leftWidth+this._rightWidth,i=this.width>e?1:this.width/e,s=this._topHeight+this._bottomHeight,n=this.height>s?1:this.height/s,o=Math.min(i,n);t[9]=t[11]=t[13]=t[15]=this._topHeight*o,t[17]=t[19]=t[21]=t[23]=this.height-this._bottomHeight*o,t[25]=t[27]=t[29]=t[31]=this.height,t[2]=t[10]=t[18]=t[26]=this._leftWidth*o,t[4]=t[12]=t[20]=t[28]=this.width-this._rightWidth*o,t[6]=t[14]=t[22]=t[30]=this.width,this.getBuffer("aPosition").update()}updateUvs(){let t=this.uvs;t[0]=t[8]=t[16]=t[24]=0,t[1]=t[3]=t[5]=t[7]=0,t[6]=t[14]=t[22]=t[30]=1,t[25]=t[27]=t[29]=t[31]=1;let e=1/this._originalWidth,i=1/this._originalHeight;t[2]=t[10]=t[18]=t[26]=e*this._leftWidth,t[9]=t[11]=t[13]=t[15]=i*this._topHeight,t[4]=t[12]=t[20]=t[28]=1-e*this._rightWidth,t[17]=t[19]=t[21]=t[23]=1-i*this._bottomHeight,this.getBuffer("aUV").update()}};Mb.defaultOptions={width:100,height:100,leftWidth:10,topHeight:10,rightWidth:10,bottomHeight:10,originalWidth:100,originalHeight:100};Rb=Mb});var Tn,Gb=p(()=>{D();Qt();ja();kb();Tn=class{constructor(t){this._gpuSpriteHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_gpuSpriteHash")}addRenderable(t,e){let i=this._getGpuSprite(t);t.didViewUpdate&&this._updateBatchableSprite(t,i),this._renderer.renderPipes.batch.addToBatch(i,e)}updateRenderable(t){let e=this._gpuSpriteHash[t.uid];t.didViewUpdate&&this._updateBatchableSprite(t,e),e._batcher.updateElement(e)}validateRenderable(t){let e=this._getGpuSprite(t);return!e._batcher.checkAndUpdateTexture(e,t._texture)}destroyRenderable(t){let e=this._gpuSpriteHash[t.uid];K.return(e.geometry),K.return(e),this._gpuSpriteHash[t.uid]=null,t.off("destroyed",this._destroyRenderableBound)}_updateBatchableSprite(t,e){e.geometry.update(t),e.texture=t._texture}_getGpuSprite(t){return this._gpuSpriteHash[t.uid]||this._initGPUSprite(t)}_initGPUSprite(t){let e=K.get(Pr);return e.geometry=K.get(Rb),e.renderable=t,e.transform=t.groupTransform,e.texture=t._texture,e.roundPixels=this._renderer._roundPixels|t._roundPixels,this._gpuSpriteHash[t.uid]=e,t.didViewUpdate||this._updateBatchableSprite(t,e),t.on("destroyed",this._destroyRenderableBound),e}destroy(){for(let t in this._gpuSpriteHash)this._gpuSpriteHash[t].geometry.destroy();this._gpuSpriteHash=null,this._renderer=null}};Tn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"nineSliceSprite"}});var Jh=p(()=>{D();Gb();H.add(Tn)});var Sn,Ib=p(()=>{D();Sn=class{constructor(t){this._renderer=t}push(t,e,i){this._renderer.renderPipes.batch.break(i),i.add({renderPipeId:"filter",canBundle:!1,action:"pushFilter",container:e,filterEffect:t})}pop(t,e,i){this._renderer.renderPipes.batch.break(i),i.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}execute(t){t.action==="pushFilter"?this._renderer.filter.push(t):t.action==="popFilter"&&this._renderer.filter.pop()}destroy(){this._renderer=null}};Sn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"filter"}});function Ub(r,t){t.clear(),Ob(r,t),t.isValid||t.set(0,0,0,0);let e=r.renderGroup||r.parentRenderGroup;return t.applyMatrix(e.worldTransform),t}function Ob(r,t){if(r.localDisplayStatus!==7||!r.measurable)return;let e=!!r.effects.length,i=t;if((r.renderGroup||e)&&(i=he.get().clear()),r.boundsArea)t.addRect(r.boundsArea,r.worldTransform);else{if(r.renderPipeId){let n=r.bounds;i.addFrame(n.minX,n.minY,n.maxX,n.maxY,r.groupTransform)}let s=r.children;for(let n=0;n<s.length;n++)Ob(s[n],i)}if(e){let s=!1,n=r.renderGroup||r.parentRenderGroup;for(let o=0;o<r.effects.length;o++)r.effects[o].addBounds&&(s||(s=!0,i.applyMatrix(n.worldTransform)),r.effects[o].addBounds(i,!0));s&&(i.applyMatrix(n.worldTransform.copyTo(tD).invert()),t.addBounds(i,r.relativeGroupTransform)),t.addBounds(i),he.return(i)}else r.renderGroup&&(t.addBounds(i,r.relativeGroupTransform),he.return(i))}var tD,Lb=p(()=>{ot();Vr();tD=new G});function Nb(r,t){t.clear();let e=t.matrix;for(let i=0;i<r.length;i++){let s=r[i];s.globalDisplayStatus<7||(t.matrix=s.worldTransform,t.addBounds(s.bounds))}return t.matrix=e,t}var Hb=p(()=>{"use strict"});var eD,wn,zb=p(()=>{D();ot();xe();wr();Bi();ee();dt();yr();Ve();ce();Lb();Hb();gt();eD=new ye({attributes:{aPosition:{buffer:new Float32Array([0,0,1,0,1,1,0,1]),format:"float32x2",stride:2*4,offset:0}},indexBuffer:new Uint32Array([0,1,2,0,2,3])}),wn=class{constructor(t){this._filterStackIndex=0,this._filterStack=[],this._filterGlobalUniforms=new ct({uInputSize:{value:new Float32Array(4),type:"vec4<f32>"},uInputPixel:{value:new Float32Array(4),type:"vec4<f32>"},uInputClamp:{value:new Float32Array(4),type:"vec4<f32>"},uOutputFrame:{value:new Float32Array(4),type:"vec4<f32>"},uGlobalFrame:{value:new Float32Array(4),type:"vec4<f32>"},uOutputTexture:{value:new Float32Array(4),type:"vec4<f32>"}}),this._globalFilterBindGroup=new It({}),this.renderer=t}get activeBackTexture(){return this._activeFilterData?.backTexture}push(t){let e=this.renderer,i=t.filterEffect.filters;this._filterStack[this._filterStackIndex]||(this._filterStack[this._filterStackIndex]=this._getFilterData());let s=this._filterStack[this._filterStackIndex];if(this._filterStackIndex++,i.length===0){s.skip=!0;return}let n=s.bounds;if(t.renderables?Nb(t.renderables,n):t.filterEffect.filterArea?(n.clear(),n.addRect(t.filterEffect.filterArea),n.applyMatrix(t.container.worldTransform)):Ub(t.container,n),t.container){let m=(t.container.renderGroup||t.container.parentRenderGroup).cacheToLocalTransform;m&&n.applyMatrix(m)}let o=e.renderTarget.renderTarget.colorTexture.source,a=1/0,u=0,l=!0,c=!1,h=!1,d=!0;for(let f=0;f<i.length;f++){let m=i[f];if(a=Math.min(a,m.resolution==="inherit"?o._resolution:m.resolution),u+=m.padding,m.antialias==="off"?l=!1:m.antialias==="inherit"&&l&&(l=o.antialias),m.clipToViewport||(d=!1),!!!(m.compatibleRenderers&e.type)){h=!1;break}if(m.blendRequired&&!(e.backBuffer?.useBackBuffer??!0)){z("Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options."),h=!1;break}h=m.enabled||h,c||(c=m.blendRequired)}if(!h){s.skip=!0;return}if(d){let f=e.renderTarget.rootViewPort,m=e.renderTarget.renderTarget.resolution;n.fitBounds(0,f.width/m,0,f.height/m)}if(n.scale(a).ceil().scale(1/a).pad(u|0),!n.isPositive){s.skip=!0;return}s.skip=!1,s.bounds=n,s.blendRequired=c,s.container=t.container,s.filterEffect=t.filterEffect,s.previousRenderSurface=e.renderTarget.renderSurface,s.inputTexture=xt.getOptimalTexture(n.width,n.height,a,l),e.renderTarget.bind(s.inputTexture,!0),e.globalUniforms.push({offset:n})}pop(){let t=this.renderer;this._filterStackIndex--;let e=this._filterStack[this._filterStackIndex];if(e.skip)return;this._activeFilterData=e;let i=e.inputTexture,s=e.bounds,n=I.EMPTY;if(t.renderTarget.finishRenderPass(),e.blendRequired){let a=this._filterStackIndex>0?this._filterStack[this._filterStackIndex-1].bounds:null,u=t.renderTarget.getRenderTarget(e.previousRenderSurface);n=this.getBackTexture(u,s,a)}e.backTexture=n;let o=e.filterEffect.filters;if(this._globalFilterBindGroup.setResource(i.source.style,2),this._globalFilterBindGroup.setResource(n.source,3),t.globalUniforms.pop(),o.length===1)o[0].apply(this,i,e.previousRenderSurface,!1),xt.returnTexture(i);else{let a=e.inputTexture,u=xt.getOptimalTexture(s.width,s.height,a.source._resolution,!1),l=0;for(l=0;l<o.length-1;++l){o[l].apply(this,a,u,!0);let h=a;a=u,u=h}o[l].apply(this,a,e.previousRenderSurface,!1),xt.returnTexture(a),xt.returnTexture(u)}e.blendRequired&&xt.returnTexture(n)}getBackTexture(t,e,i){let s=t.colorTexture.source._resolution,n=xt.getOptimalTexture(e.width,e.height,s,!1),o=e.minX,a=e.minY;i&&(o-=i.minX,a-=i.minY),o=Math.floor(o*s),a=Math.floor(a*s);let u=Math.ceil(e.width*s),l=Math.ceil(e.height*s);return this.renderer.renderTarget.copyToTexture(t,n,{x:o,y:a},{width:u,height:l},{x:0,y:0}),n}applyFilter(t,e,i,s){let n=this.renderer,o=this._filterStack[this._filterStackIndex],a=o.bounds,u=et.shared,c=o.previousRenderSurface===i,h=this.renderer.renderTarget.rootRenderTarget.colorTexture.source._resolution,d=this._filterStackIndex-1;for(;d>0&&this._filterStack[d].skip;)--d;d>0&&(h=this._filterStack[d].inputTexture.source._resolution);let f=this._filterGlobalUniforms,m=f.uniforms,g=m.uOutputFrame,x=m.uInputSize,_=m.uInputPixel,v=m.uInputClamp,T=m.uGlobalFrame,y=m.uOutputTexture;if(c){let E=this._filterStackIndex;for(;E>0;){E--;let P=this._filterStack[this._filterStackIndex-1];if(!P.skip){u.x=P.bounds.minX,u.y=P.bounds.minY;break}}g[0]=a.minX-u.x,g[1]=a.minY-u.y}else g[0]=0,g[1]=0;g[2]=e.frame.width,g[3]=e.frame.height,x[0]=e.source.width,x[1]=e.source.height,x[2]=1/x[0],x[3]=1/x[1],_[0]=e.source.pixelWidth,_[1]=e.source.pixelHeight,_[2]=1/_[0],_[3]=1/_[1],v[0]=.5*_[2],v[1]=.5*_[3],v[2]=e.frame.width*x[2]-.5*_[2],v[3]=e.frame.height*x[3]-.5*_[3];let C=this.renderer.renderTarget.rootRenderTarget.colorTexture;T[0]=u.x*h,T[1]=u.y*h,T[2]=C.source.width*h,T[3]=C.source.height*h;let S=this.renderer.renderTarget.getRenderTarget(i);if(n.renderTarget.bind(i,!!s),i instanceof I?(y[0]=i.frame.width,y[1]=i.frame.height):(y[0]=S.width,y[1]=S.height),y[2]=S.isRoot?-1:1,f.update(),n.renderPipes.uniformBatch){let E=n.renderPipes.uniformBatch.getUboResource(f);this._globalFilterBindGroup.setResource(E,0)}else this._globalFilterBindGroup.setResource(f,0);this._globalFilterBindGroup.setResource(e.source,1),this._globalFilterBindGroup.setResource(e.source.style,2),t.groups[0]=this._globalFilterBindGroup,n.encoder.draw({geometry:eD,shader:t,state:t._state,topology:"triangle-list"}),n.type===Mt.WEBGL&&n.renderTarget.finishRenderPass()}_getFilterData(){return{skip:!1,inputTexture:null,bounds:new ft,container:null,filterEffect:null,blendRequired:!1,previousRenderSurface:null}}calculateSpriteMatrix(t,e){let i=this._activeFilterData,s=t.set(i.inputTexture._source.width,0,0,i.inputTexture._source.height,i.bounds.minX,i.bounds.minY),n=e.worldTransform.copyTo(G.shared),o=e.renderGroup||e.parentRenderGroup;return o&&o.cacheToLocalTransform&&n.prepend(o.cacheToLocalTransform),n.invert(),s.prepend(n),s.scale(1/e.texture.frame.width,1/e.texture.frame.height),s.translate(e.anchor.x,e.anchor.y),s}};wn.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"filter"}});var tf=p(()=>{D();Ib();zb();H.add(wn);H.add(Sn)});var rD={};var Wb=p(()=>{Vg();nc();Qg();Ta();Pa();fh();dh();xh();Oh();$h();Kh();Qh();Jh();tf()});var iD={};var Xb=p(()=>{nc();Ta();Pa();fh();dh();xh();Oh();$h();Kh();Qh();Jh();tf()});var jb,Yb,Kb=p(()=>{ri();Fi();Be();Me();jb=class ef extends St{constructor(t){t={...ef.defaultOptions,...t},super(t),this.enabled=!0,this._state=Ct.for2d(),this.blendMode=t.blendMode,this.padding=t.padding,typeof t.antialias=="boolean"?this.antialias=t.antialias?"on":"off":this.antialias=t.antialias,this.resolution=t.resolution,this.blendRequired=t.blendRequired,this.clipToViewport=t.clipToViewport,this.addResource("uTexture",0,1)}apply(t,e,i,s){t.applyFilter(this,e,i,s)}get blendMode(){return this._state.blendMode}set blendMode(t){this._state.blendMode=t}static from(t){let{gpu:e,gl:i,...s}=t,n,o;return e&&(n=ve.from(e)),i&&(o=be.from(i)),new ef({gpuProgram:n,glProgram:o,...s})}};jb.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};Yb=jb});async function qb(r){if(!r)for(let t=0;t<rf.length;t++){let e=rf[t];if(e.value.test()){await e.value.load();return}}}var rf,Zb=p(()=>{D();rf=[];H.handleByNamedList(b.Environment,rf)});function Tu(){if(typeof En=="boolean")return En;try{En=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{En=!1}return En}var En,sf=p(()=>{"use strict"});var Ot,es=p(()=>{"use strict";Ot=(r=>(r[r.NONE=0]="NONE",r[r.COLOR=16384]="COLOR",r[r.STENCIL=1024]="STENCIL",r[r.DEPTH=256]="DEPTH",r[r.COLOR_DEPTH=16640]="COLOR_DEPTH",r[r.COLOR_STENCIL=17408]="COLOR_STENCIL",r[r.DEPTH_STENCIL=1280]="DEPTH_STENCIL",r[r.ALL=17664]="ALL",r))(Ot||{})});var rs,nf=p(()=>{"use strict";rs=class{constructor(t){this.items=[],this._name=t}emit(t,e,i,s,n,o,a,u){let{name:l,items:c}=this;for(let h=0,d=c.length;h<d;h++)c[h][l](t,e,i,s,n,o,a,u);return this}add(t){return t[this._name]&&(this.remove(t),this.items.push(t)),this}remove(t){let e=this.items.indexOf(t);return e!==-1&&this.items.splice(e,1),this}contains(t){return this.items.indexOf(t)!==-1}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}});var sD,Qb,Rr,Cn=p(()=>{$t();Zb();De();sf();vt();es();nf();Xt();sD=["init","destroy","contextChange","resolutionChange","reset","renderEnd","renderStart","render","update","postrender","prerender"],Qb=class Jb extends ht{constructor(t){super(),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=t.type,this.name=t.name,this.config=t;let e=[...sD,...this.config.runners??[]];this._addRunners(...e),this._unsafeEvalCheck()}async init(t={}){let e=t.skipExtensionImports===!0?!0:t.manageImports===!1;await qb(e),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(let i in this._systemsHash)t={...this._systemsHash[i].constructor.defaultOptions,...t};t={...Jb.defaultOptions,...t},this._roundPixels=t.roundPixels?1:0;for(let i=0;i<this.runners.init.items.length;i++)await this.runners.init.items[i].init(t);this._initOptions=t}render(t,e){let i=t;if(i instanceof it&&(i={container:i},e&&(X(Y,"passing a second argument is deprecated, please use render options instead"),i.target=e.renderTexture)),i.target||(i.target=this.view.renderTarget),i.target===this.view.renderTarget&&(this._lastObjectRendered=i.container,i.clearColor=this.background.colorRgba),i.clearColor){let s=Array.isArray(i.clearColor)&&i.clearColor.length===4;i.clearColor=s?i.clearColor:Z.shared.setValue(i.clearColor).toArray()}i.transform||(i.container.updateLocalTransform(),i.transform=i.container.localTransform),i.container.enableRenderGroup(),this.runners.prerender.emit(i),this.runners.renderStart.emit(i),this.runners.render.emit(i),this.runners.renderEnd.emit(i),this.runners.postrender.emit(i)}resize(t,e,i){let s=this.view.resolution;this.view.resize(t,e,i),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),i!==void 0&&i!==s&&this.runners.resolutionChange.emit(i)}clear(t={}){let e=this;t.target||(t.target=e.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=Ot.ALL);let{clear:i,clearColor:s,target:n}=t;Z.shared.setValue(s??this.background.colorRgba),e.renderTarget.clear(n,i,Z.shared.toArray())}get resolution(){return this.view.resolution}set resolution(t){this.view.resolution=t,this.runners.resolutionChange.emit(t)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...t){t.forEach(e=>{this.runners[e]=new rs(e)})}_addSystems(t){let e;for(e in t){let i=t[e];this._addSystem(i.value,i.name)}}_addSystem(t,e){let i=new t(this);if(this[e])throw new Error(`Whoops! The name "${e}" is already in use`);this[e]=i,this._systemsHash[e]=i;for(let s in this.runners)this.runners[s].add(i);return this}_addPipes(t,e){let i=e.reduce((s,n)=>(s[n.name]=n.value,s),{});t.forEach(s=>{let n=s.value,o=s.name,a=i[o];this.renderPipes[o]=new n(this,a?new a:null)})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash=null,this.renderPipes=null}generateTexture(t){return this.textureGenerator.generateTexture(t)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!Tu())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}};Qb.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};Rr=Qb});var An,rv=p(()=>{D();ot();ti();Fa();Ar();sn();nn();ts();Dr();Be();ee();An=class{init(){let t=new ct({uTransformMatrix:{value:new G,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),e=Ne({name:"graphics",bits:[Ri,Gi(_e()),pb,ze]});this.shader=new St({gpuProgram:e,resources:{localUniforms:t}})}execute(t,e){let i=e.context,s=i.customShader||this.shader,n=t.renderer,o=n.graphicsContext,{batcher:a,instructions:u}=o.getContextRenderData(i),l=n.encoder;l.setGeometry(a.geometry,s.gpuProgram);let c=n.globalUniforms.bindGroup;l.setBindGroup(0,c,s.gpuProgram);let h=n.renderPipes.uniformBatch.getUniformBindGroup(s.resources.localUniforms,!0);l.setBindGroup(2,h,s.gpuProgram);let d=u.instructions,f=null;for(let m=0;m<u.instructionSize;m++){let g=d[m];if(g.topology!==f&&(f=g.topology,l.setPipelineFromGeometryProgramAndState(a.geometry,s.gpuProgram,t.state,g.topology)),s.groups[1]=g.bindGroup,!g.gpuBindGroup){let x=g.textures;g.bindGroup=Pi(x.textures,x.count),g.gpuBindGroup=n.bindGroup.getBindGroup(g.bindGroup,s.gpuProgram,1)}l.setBindGroup(1,g.bindGroup,s.gpuProgram),l.renderPassEncoder.drawIndexed(g.size,1,g.start)}}destroy(){this.shader.destroy(!0),this.shader=null}};An.extension={type:[b.WebGPUPipesAdaptor],name:"graphics"}});var iv,sv,of=p(()=>{"use strict";iv={name:"texture-bit",vertex:{header:`\n\n struct TextureUniforms {\n uTextureMatrix:mat3x3<f32>,\n }\n\n @group(2) @binding(2) var<uniform> textureUniforms : TextureUniforms;\n `,main:`\n uv = (textureUniforms.uTextureMatrix * vec3(uv, 1.0)).xy;\n `},fragment:{header:`\n @group(2) @binding(0) var uTexture: texture_2d<f32>;\n @group(2) @binding(1) var uSampler: sampler;\n\n \n `,main:`\n outColor = textureSample(uTexture, uSampler, vUV);\n `}},sv={name:"texture-bit",vertex:{header:`\n uniform mat3 uTextureMatrix;\n `,main:`\n uv = (uTextureMatrix * vec3(uv, 1.0)).xy;\n `},fragment:{header:`\n uniform sampler2D uTexture;\n\n \n `,main:`\n outColor = texture(uTexture, vUV);\n `}}});var Dn,nv=p(()=>{D();ot();Ar();ts();Dr();of();Be();dt();gt();Dn=class{init(){let t=Ne({name:"mesh",bits:[ci,iv,ze]});this._shader=new St({gpuProgram:t,resources:{uTexture:I.EMPTY._source,uSampler:I.EMPTY._source.style,textureUniforms:{uTextureMatrix:{type:"mat3x3<f32>",value:new G}}}})}execute(t,e){let i=t.renderer,s=e._shader;if(!s)s=this._shader,s.groups[2]=i.texture.getTextureBindGroup(e.texture);else if(!s.gpuProgram){z("Mesh shader has no gpuProgram",e.shader);return}let n=s.gpuProgram;if(n.autoAssignGlobalUniforms&&(s.groups[0]=i.globalUniforms.bindGroup),n.autoAssignLocalUniforms){let o=t.localUniforms;s.groups[1]=i.renderPipes.uniformBatch.getUniformBindGroup(o,!0)}i.encoder.draw({geometry:e._geometry,shader:s,state:e.state})}destroy(){this._shader.destroy(!0),this._shader=null}};Dn.extension={type:[b.WebGPUPipesAdaptor],name:"mesh"}});var Eu,Pn,ov=p(()=>{D();Me();Fa();Eu=Ct.for2d(),Pn=class{start(t,e,i){let s=t.renderer,n=s.encoder,o=i.gpuProgram;this._shader=i,this._geometry=e,n.setGeometry(e,o),Eu.blendMode="normal",s.pipeline.getPipeline(e,o,Eu);let a=s.globalUniforms.bindGroup;n.resetBindGroup(1),n.setBindGroup(0,a,o)}execute(t,e){let i=this._shader.gpuProgram,s=t.renderer,n=s.encoder;if(!e.bindGroup){let u=e.textures;e.bindGroup=Pi(u.textures,u.count)}Eu.blendMode=e.blendMode;let o=s.bindGroup.getBindGroup(e.bindGroup,i,1),a=s.pipeline.getPipeline(this._geometry,i,Eu,e.topology);e.bindGroup._touch(s.textureGC.count),n.setPipeline(a),n.renderPassEncoder.setBindGroup(1,o),n.renderPassEncoder.drawIndexed(e.size,1,e.start)}};Pn.extension={type:[b.WebGPUPipesAdaptor],name:"batch"}});var Bn,av=p(()=>{D();Bn=class{constructor(t){this._renderer=t}updateRenderable(){}destroyRenderable(){}validateRenderable(){return!1}addRenderable(t,e){this._renderer.renderPipes.batch.break(e),e.add(t)}execute(t){t.isRenderable&&t.render(this._renderer)}destroy(){this._renderer=null}};Bn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"customRender"}});function Mn(r,t){let e=r.instructionSet,i=e.instructions;for(let s=0;s<e.instructionSize;s++){let n=i[s];t[n.renderPipeId].execute(n)}}var af=p(()=>{"use strict"});var nD,Fn,uv=p(()=>{D();ot();Qt();pn();af();nD=new G,Fn=class{constructor(t){this._renderer=t}addRenderGroup(t,e){t.isCachedAsTexture?this._addRenderableCacheAsTexture(t,e):this._addRenderableDirect(t,e)}execute(t){t.isRenderable&&(t.isCachedAsTexture?this._executeCacheAsTexture(t):this._executeDirect(t))}destroy(){this._renderer=null}_addRenderableDirect(t,e){this._renderer.renderPipes.batch.break(e),t._batchableRenderGroup&&(K.return(t._batchableRenderGroup),t._batchableRenderGroup=null),e.add(t)}_addRenderableCacheAsTexture(t,e){let i=t._batchableRenderGroup??(t._batchableRenderGroup=K.get($e));i.renderable=t.root,i.transform=t.root.relativeGroupTransform,i.texture=t.texture,i.bounds=t._textureBounds,e.add(t),this._renderer.renderPipes.batch.addToBatch(i,e)}_executeCacheAsTexture(t){if(t.textureNeedsUpdate){t.textureNeedsUpdate=!1;let e=nD.identity().translate(-t._textureBounds.x,-t._textureBounds.y);this._renderer.renderTarget.push(t.texture,!0,null,t.texture.frame),this._renderer.globalUniforms.push({worldTransformMatrix:e,worldColor:4294967295}),Mn(t,this._renderer.renderPipes),this._renderer.renderTarget.finishRenderPass(),this._renderer.renderTarget.pop(),this._renderer.globalUniforms.pop()}t._batchableRenderGroup._batcher.updateElement(t._batchableRenderGroup),t._batchableRenderGroup._batcher.geometry.buffers[0].update()}_executeDirect(t){this._renderer.globalUniforms.push({worldTransformMatrix:t.inverseParentTextureTransform,worldColor:t.worldColorAlpha}),Mn(t,this._renderer.renderPipes),this._renderer.globalUniforms.pop()}};Fn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"renderGroup"}});function lv(r,t){let e=r.root,i=r.instructionSet;i.reset();let s=t.renderPipes?t:t.batch.renderer,n=s.renderPipes;n.batch.buildStart(i),n.blendMode.buildStart(),n.colorMask.buildStart(),e.sortableChildren&&e.sortChildren(),cv(e,i,s,!0),n.batch.buildEnd(i),n.blendMode.buildEnd(i)}function is(r,t,e){let i=e.renderPipes?e:e.batch.renderer;r.globalDisplayStatus<7||!r.includeInBuild||(r.sortableChildren&&r.sortChildren(),r.isSimple?oD(r,t,i):cv(r,t,i,!1))}function oD(r,t,e){if(r.renderPipeId){let i=r,{renderPipes:s,renderableGC:n}=e;s.blendMode.setBlendMode(i,r.groupBlendMode,t),s[i.renderPipeId].addRenderable(i,t),n.addRenderable(i),i.didViewUpdate=!1}if(!r.renderGroup){let i=r.children,s=i.length;for(let n=0;n<s;n++)is(i[n],t,e)}}function cv(r,t,e,i){let{renderPipes:s,renderableGC:n}=e;if(!i&&r.renderGroup)s.renderGroup.addRenderGroup(r.renderGroup,t);else{for(let l=0;l<r.effects.length;l++){let c=r.effects[l];s[c.pipe].push(c,r,t)}let o=r,a=o.renderPipeId;a&&(s.blendMode.setBlendMode(o,o.groupBlendMode,t),s[a].addRenderable(o,t),n.addRenderable(o),o.didViewUpdate=!1);let u=r.children;if(u.length)for(let l=0;l<u.length;l++)is(u[l],t,e);for(let l=r.effects.length-1;l>=0;l--){let c=r.effects[l];s[c.pipe].pop(c,r,t)}}}var Cu=p(()=>{"use strict"});function Rn(r,t){t||(t=0);for(let e=t;e<r.length&&r[e];e++)r[e]=null}var uf=p(()=>{"use strict"});function lf(r,t=!1){uD(r);let e=r.childrenToUpdate,i=r.updateTick++;for(let s in e){let n=Number(s),o=e[s],a=o.list,u=o.index;for(let l=0;l<u;l++){let c=a[l];c.parentRenderGroup===r&&c.relativeRenderGroupDepth===n&&dv(c,i,0)}Rn(a,u),o.index=0}if(t)for(let s=0;s<r.renderGroupChildren.length;s++)lf(r.renderGroupChildren[s],t)}function uD(r){let t=r.root,e;if(r.renderGroupParent){let i=r.renderGroupParent;r.worldTransform.appendFrom(t.relativeGroupTransform,i.worldTransform),r.worldColor=bi(t.groupColor,i.worldColor),e=t.groupAlpha*i.worldAlpha}else r.worldTransform.copyFrom(t.localTransform),r.worldColor=t.localColor,e=t.localAlpha;e=e<0?0:e>1?1:e,r.worldAlpha=e,r.worldColorAlpha=r.worldColor+((e*255|0)<<24)}function dv(r,t,e){if(t===r.updateTick)return;r.updateTick=t,r.didChange=!1;let i=r.localTransform;r.updateLocalTransform();let s=r.parent;if(s&&!s.renderGroup?(e|=r._updateFlags,r.relativeGroupTransform.appendFrom(i,s.relativeGroupTransform),e&hv&&fv(r,s,e)):(e=r._updateFlags,r.relativeGroupTransform.copyFrom(i),e&hv&&fv(r,aD,e)),!r.renderGroup){let n=r.children,o=n.length;for(let l=0;l<o;l++)dv(n[l],t,e);let a=r.parentRenderGroup,u=r;u.renderPipeId&&!a.structureDidChange&&a.updateRenderable(u)}}function fv(r,t,e){if(e&wi){r.groupColor=bi(r.localColor,t.groupColor);let i=r.localAlpha*t.groupAlpha;i=i<0?0:i>1?1:i,r.groupAlpha=i,r.groupColorAlpha=r.groupColor+((i*255|0)<<24)}e&Ls&&(r.groupBlendMode=r.localBlendMode==="inherit"?t.groupBlendMode:r.localBlendMode),e&qr&&(r.globalDisplayStatus=r.localDisplayStatus&t.globalDisplayStatus),r._updateFlags=0}var aD,hv,pv=p(()=>{De();uf();zl();aD=new it,hv=qr|wi|Ls});function mv(r,t){let{list:e,index:i}=r.childrenRenderablesToUpdate,s=!1;for(let n=0;n<i;n++){let o=e[n];if(s=t[o.renderPipeId].validateRenderable(o),s)break}return r.structureDidChange=s,s}var gv=p(()=>{"use strict"});var lD,kn,xv=p(()=>{D();ot();yr();ce();Cu();uf();af();pv();gv();lD=new G,kn=class{constructor(t){this._renderer=t}render({container:t,transform:e}){let i=t.parent,s=t.renderGroup.renderGroupParent;t.parent=null,t.renderGroup.renderGroupParent=null;let n=this._renderer,o=lD;e&&(o=o.copyFrom(t.renderGroup.localTransform),t.renderGroup.localTransform.copyFrom(e));let a=n.renderPipes;this._updateCachedRenderGroups(t.renderGroup,null),this._updateRenderGroups(t.renderGroup),n.globalUniforms.start({worldTransformMatrix:e?t.renderGroup.localTransform:t.renderGroup.worldTransform,worldColor:t.renderGroup.worldColorAlpha}),Mn(t.renderGroup,a),a.uniformBatch&&a.uniformBatch.renderEnd(),e&&t.renderGroup.localTransform.copyFrom(o),t.parent=i,t.renderGroup.renderGroupParent=s}destroy(){this._renderer=null}_updateCachedRenderGroups(t,e){if(t.isCachedAsTexture){if(!t.updateCacheTexture)return;e=t}t._parentCacheAsTextureRenderGroup=e;for(let i=t.renderGroupChildren.length-1;i>=0;i--)this._updateCachedRenderGroups(t.renderGroupChildren[i],e);if(t.invalidateMatrices(),t.isCachedAsTexture){if(t.textureNeedsUpdate){let i=t.root.getLocalBounds();i.ceil();let s=t.texture;t.texture&&xt.returnTexture(t.texture);let n=this._renderer,o=t.textureOptions.resolution||n.view.resolution,a=t.textureOptions.antialias??n.view.antialias;t.texture=xt.getOptimalTexture(i.width,i.height,o,a),t._textureBounds||(t._textureBounds=new ft),t._textureBounds.copyFrom(i),s!==t.texture&&t.renderGroupParent&&(t.renderGroupParent.structureDidChange=!0)}}else t.texture&&(xt.returnTexture(t.texture),t.texture=null)}_updateRenderGroups(t){let e=this._renderer,i=e.renderPipes;if(t.runOnRender(),t.instructionSet.renderPipes=i,t.structureDidChange?Rn(t.childrenRenderablesToUpdate.list,0):mv(t,i),lf(t),t.structureDidChange?(t.structureDidChange=!1,lv(t,e)):this._updateRenderables(t),t.childrenRenderablesToUpdate.index=0,e.renderPipes.batch.upload(t.instructionSet),!(t.isCachedAsTexture&&!t.textureNeedsUpdate))for(let s=0;s<t.renderGroupChildren.length;s++)this._updateRenderGroups(t.renderGroupChildren[s])}_updateRenderables(t){let{list:e,index:i}=t.childrenRenderablesToUpdate;for(let s=0;s<i;s++){let n=e[s];n.didViewUpdate&&t.updateRenderable(n)}Rn(e,i)}};kn.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"renderGroup"}});var Gn,_v=p(()=>{D();Qt();pn();Gn=class{constructor(t){this._gpuSpriteHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_gpuSpriteHash")}addRenderable(t,e){let i=this._getGpuSprite(t);t.didViewUpdate&&this._updateBatchableSprite(t,i),this._renderer.renderPipes.batch.addToBatch(i,e)}updateRenderable(t){let e=this._gpuSpriteHash[t.uid];t.didViewUpdate&&this._updateBatchableSprite(t,e),e._batcher.updateElement(e)}validateRenderable(t){let e=this._getGpuSprite(t);return!e._batcher.checkAndUpdateTexture(e,t._texture)}destroyRenderable(t){let e=this._gpuSpriteHash[t.uid];K.return(e),this._gpuSpriteHash[t.uid]=null,t.off("destroyed",this._destroyRenderableBound)}_updateBatchableSprite(t,e){e.bounds=t.visualBounds,e.texture=t._texture}_getGpuSprite(t){return this._gpuSpriteHash[t.uid]||this._initGPUSprite(t)}_initGPUSprite(t){let e=K.get($e);return e.renderable=t,e.transform=t.groupTransform,e.texture=t._texture,e.bounds=t.visualBounds,e.roundPixels=this._renderer._roundPixels|t._roundPixels,this._gpuSpriteHash[t.uid]=e,t.on("destroyed",this._destroyRenderableBound),e}destroy(){for(let t in this._gpuSpriteHash)K.return(this._gpuSpriteHash[t]);this._gpuSpriteHash=null,this._renderer=null}};Gn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"sprite"}});var ss,cf=p(()=>{Xt();ss="8.6.6"});var In,Un,hf=p(()=>{D();cf();In=class{static init(){globalThis.__PIXI_APP_INIT__?.(this,ss)}static destroy(){}};In.extension=b.Application;Un=class{constructor(t){this._renderer=t}init(){globalThis.__PIXI_RENDERER_INIT__?.(this._renderer,ss)}destroy(){this._renderer=null}};Un.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"initHook",priority:-10}});var ff,df,bv=p(()=>{D();Me();$c();ff=class yv{constructor(t,e){this.state=Ct.for2d(),this._batchersByInstructionSet=Object.create(null),this._activeBatches=Object.create(null),this.renderer=t,this._adaptor=e,this._adaptor.init?.(this)}static getBatcher(t){return new this._availableBatchers[t]}buildStart(t){let e=this._batchersByInstructionSet[t.uid];e||(e=this._batchersByInstructionSet[t.uid]=Object.create(null),e.default||(e.default=new on)),this._activeBatches=e,this._activeBatch=this._activeBatches.default;for(let i in this._activeBatches)this._activeBatches[i].begin()}addToBatch(t,e){if(this._activeBatch.name!==t.batcherName){this._activeBatch.break(e);let i=this._activeBatches[t.batcherName];i||(i=this._activeBatches[t.batcherName]=yv.getBatcher(t.batcherName),i.begin()),this._activeBatch=i}this._activeBatch.add(t)}break(t){this._activeBatch.break(t)}buildEnd(t){this._activeBatch.break(t);let e=this._activeBatches;for(let i in e){let s=e[i],n=s.geometry;n.indexBuffer.setDataWithSize(s.indexBuffer,s.indexSize,!0),n.buffers[0].setDataWithSize(s.attributeBuffer.float32View,s.attributeSize,!1)}}upload(t){let e=this._batchersByInstructionSet[t.uid];for(let i in e){let s=e[i],n=s.geometry;s.dirty&&(s.dirty=!1,n.buffers[0].update(s.attributeSize*4))}}execute(t){if(t.action==="startBatch"){let e=t.batcher,i=e.geometry,s=e.shader;this._adaptor.start(this,i,s)}this._adaptor.execute(this,t)}destroy(){this.state=null,this.renderer=null,this._adaptor=null;for(let t in this._activeBatches)this._activeBatches[t].destroy();this._activeBatches=null}};ff.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"batch"};ff._availableBatchers=Object.create(null);df=ff;H.handleByMap(b.Batcher,df._availableBatchers);H.add(on)});var vv,Tv=p(()=>{vv=`in vec2 vMaskCoord;\nin vec2 vTextureCoord;\n\nuniform sampler2D uTexture;\nuniform sampler2D uMaskTexture;\n\nuniform float uAlpha;\nuniform vec4 uMaskClamp;\nuniform float uInverse;\n\nout vec4 finalColor;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(uMaskClamp.x, vMaskCoord.x) +\n step(uMaskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, uMaskClamp.z) +\n step(vMaskCoord.y, uMaskClamp.w));\n\n // TODO look into why this is needed\n float npmAlpha = uAlpha;\n vec4 original = texture(uTexture, vTextureCoord);\n vec4 masky = texture(uMaskTexture, vMaskCoord);\n float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n float a = alphaMul * masky.r * npmAlpha * clip;\n\n if (uInverse == 1.0) {\n a = 1.0 - a;\n }\n\n finalColor = original * a;\n}\n`});var Sv,wv=p(()=>{Sv=`in vec2 aPosition;\n\nout vec2 vTextureCoord;\nout vec2 vMaskCoord;\n\n\nuniform vec4 uInputSize;\nuniform vec4 uOutputFrame;\nuniform vec4 uOutputTexture;\nuniform mat3 uFilterMatrix;\n\nvec4 filterVertexPosition( vec2 aPosition )\n{\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\n \n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( vec2 aPosition )\n{\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\n}\n\nvec2 getFilterCoord( vec2 aPosition )\n{\n return ( uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy;\n} \n\nvoid main(void)\n{\n gl_Position = filterVertexPosition(aPosition);\n vTextureCoord = filterTextureCoord(aPosition);\n vMaskCoord = getFilterCoord(aPosition);\n}\n`});var pf,Ev=p(()=>{pf=`struct GlobalFilterUniforms {\n uInputSize:vec4<f32>,\n uInputPixel:vec4<f32>,\n uInputClamp:vec4<f32>,\n uOutputFrame:vec4<f32>,\n uGlobalFrame:vec4<f32>,\n uOutputTexture:vec4<f32>,\n};\n\nstruct MaskUniforms {\n uFilterMatrix:mat3x3<f32>,\n uMaskClamp:vec4<f32>,\n uAlpha:f32,\n uInverse:f32,\n};\n\n@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;\n@group(0) @binding(1) var uTexture: texture_2d<f32>;\n@group(0) @binding(2) var uSampler : sampler;\n\n@group(1) @binding(0) var<uniform> filterUniforms : MaskUniforms;\n@group(1) @binding(1) var uMaskTexture: texture_2d<f32>;\n\nstruct VSOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>,\n @location(1) filterUv : vec2<f32>,\n};\n\nfn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>\n{\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\n\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nfn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\n{\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\n}\n\nfn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\n{\n return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw);\n}\n\nfn getFilterCoord(aPosition:vec2<f32> ) -> vec2<f32>\n{\n return ( filterUniforms.uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0) ).xy;\n}\n\nfn getSize() -> vec2<f32>\n{\n return gfu.uGlobalFrame.zw;\n}\n\n@vertex\nfn mainVertex(\n @location(0) aPosition : vec2<f32>,\n) -> VSOutput {\n return VSOutput(\n filterVertexPosition(aPosition),\n filterTextureCoord(aPosition),\n getFilterCoord(aPosition)\n );\n}\n\n@fragment\nfn mainFragment(\n @location(0) uv: vec2<f32>,\n @location(1) filterUv: vec2<f32>,\n @builtin(position) position: vec4<f32>\n) -> @location(0) vec4<f32> {\n\n var maskClamp = filterUniforms.uMaskClamp;\n var uAlpha = filterUniforms.uAlpha;\n\n var clip = step(3.5,\n step(maskClamp.x, filterUv.x) +\n step(maskClamp.y, filterUv.y) +\n step(filterUv.x, maskClamp.z) +\n step(filterUv.y, maskClamp.w));\n\n var mask = textureSample(uMaskTexture, uSampler, filterUv);\n var source = textureSample(uTexture, uSampler, uv);\n var alphaMul = 1.0 - uAlpha * (1.0 - mask.a);\n\n var a: f32 = alphaMul * mask.r * uAlpha * clip;\n\n if (filterUniforms.uInverse == 1.0) {\n a = 1.0 - a;\n }\n\n return source * a;\n}\n`});var Au,Cv=p(()=>{ot();ri();Fi();ee();Zl();Kb();Tv();wv();Ev();Au=class extends Yb{constructor(t){let{sprite:e,...i}=t,s=new Si(e.texture),n=new ct({uFilterMatrix:{value:new G,type:"mat3x3<f32>"},uMaskClamp:{value:s.uClampFrame,type:"vec4<f32>"},uAlpha:{value:1,type:"f32"},uInverse:{value:t.inverse?1:0,type:"f32"}}),o=ve.from({vertex:{source:pf,entryPoint:"mainVertex"},fragment:{source:pf,entryPoint:"mainFragment"}}),a=be.from({vertex:Sv,fragment:vv,name:"mask-filter"});super({...i,gpuProgram:o,glProgram:a,resources:{filterUniforms:n,uMaskTexture:e.texture.source}}),this.sprite=e,this._textureMatrix=s}set inverse(t){this.resources.filterUniforms.uniforms.uInverse=t?1:0}get inverse(){return this.resources.filterUniforms.uniforms.uInverse===1}apply(t,e,i,s){this._textureMatrix.texture=this.sprite.texture,t.calculateSpriteMatrix(this.resources.filterUniforms.uniforms.uFilterMatrix,this.sprite).prepend(this._textureMatrix.mapCoord),this.resources.uMaskTexture=this.sprite.texture.source,t.applyFilter(this,e,i,s)}}});var cD,mf,On,Av=p(()=>{D();oa();Cv();ce();Is();Cu();yc();Qt();dt();yr();Ve();cD=new ft,mf=class extends rr{constructor(){super(),this.filters=[new Au({sprite:new Jr(I.EMPTY),inverse:!1,resolution:"inherit",antialias:"inherit"})]}get sprite(){return this.filters[0].sprite}set sprite(t){this.filters[0].sprite=t}get inverse(){return this.filters[0].inverse}set inverse(t){this.filters[0].inverse=t}},On=class{constructor(t){this._activeMaskStage=[],this._renderer=t}push(t,e,i){let s=this._renderer;if(s.renderPipes.batch.break(i),i.add({renderPipeId:"alphaMask",action:"pushMaskBegin",mask:t,inverse:e._maskOptions.inverse,canBundle:!1,maskedContainer:e}),t.inverse=e._maskOptions.inverse,t.renderMaskToTexture){let n=t.mask;n.includeInBuild=!0,is(n,i,s),n.includeInBuild=!1}s.renderPipes.batch.break(i),i.add({renderPipeId:"alphaMask",action:"pushMaskEnd",mask:t,maskedContainer:e,inverse:e._maskOptions.inverse,canBundle:!1})}pop(t,e,i){this._renderer.renderPipes.batch.break(i),i.add({renderPipeId:"alphaMask",action:"popMaskEnd",mask:t,inverse:e._maskOptions.inverse,canBundle:!1})}execute(t){let e=this._renderer,i=t.mask.renderMaskToTexture;if(t.action==="pushMaskBegin"){let s=K.get(mf);if(s.inverse=t.inverse,i){t.mask.mask.measurable=!0;let n=yi(t.mask.mask,!0,cD);t.mask.mask.measurable=!1,n.ceil();let o=e.renderTarget.renderTarget.colorTexture.source,a=xt.getOptimalTexture(n.width,n.height,o._resolution,o.antialias);e.renderTarget.push(a,!0),e.globalUniforms.push({offset:n,worldColor:4294967295});let u=s.sprite;u.texture=a,u.worldTransform.tx=n.minX,u.worldTransform.ty=n.minY,this._activeMaskStage.push({filterEffect:s,maskedContainer:t.maskedContainer,filterTexture:a})}else s.sprite=t.mask.mask,this._activeMaskStage.push({filterEffect:s,maskedContainer:t.maskedContainer})}else if(t.action==="pushMaskEnd"){let s=this._activeMaskStage[this._activeMaskStage.length-1];i&&(e.type===Mt.WEBGL&&e.renderTarget.finishRenderPass(),e.renderTarget.pop(),e.globalUniforms.pop()),e.filter.push({renderPipeId:"filter",action:"pushFilter",container:s.maskedContainer,filterEffect:s.filterEffect,canBundle:!1})}else if(t.action==="popMaskEnd"){e.filter.pop();let s=this._activeMaskStage.pop();i&&xt.returnTexture(s.filterTexture),K.return(s.filterEffect)}}destroy(){this._renderer=null,this._activeMaskStage=null}};On.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"alphaMask"}});var Ln,Dv=p(()=>{D();Ln=class{constructor(t){this._colorStack=[],this._colorStackIndex=0,this._currentColor=0,this._renderer=t}buildStart(){this._colorStack[0]=15,this._colorStackIndex=1,this._currentColor=15}push(t,e,i){this._renderer.renderPipes.batch.break(i);let n=this._colorStack;n[this._colorStackIndex]=n[this._colorStackIndex-1]&t.mask;let o=this._colorStack[this._colorStackIndex];o!==this._currentColor&&(this._currentColor=o,i.add({renderPipeId:"colorMask",colorMask:o,canBundle:!1})),this._colorStackIndex++}pop(t,e,i){this._renderer.renderPipes.batch.break(i);let n=this._colorStack;this._colorStackIndex--;let o=n[this._colorStackIndex-1];o!==this._currentColor&&(this._currentColor=o,i.add({renderPipeId:"colorMask",colorMask:o,canBundle:!1}))}execute(t){this._renderer.colorMask.setMask(t.colorMask)}destroy(){this._colorStack=null}};Ln.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"colorMask"}});var Nn,Pv=p(()=>{D();Cu();es();ei();Nn=class{constructor(t){this._maskStackHash={},this._maskHash=new WeakMap,this._renderer=t}push(t,e,i){var s;let n=t,o=this._renderer;o.renderPipes.batch.break(i),o.renderPipes.blendMode.setBlendMode(n.mask,"none",i),i.add({renderPipeId:"stencilMask",action:"pushMaskBegin",mask:t,inverse:e._maskOptions.inverse,canBundle:!1});let a=n.mask;a.includeInBuild=!0,this._maskHash.has(n)||this._maskHash.set(n,{instructionsStart:0,instructionsLength:0});let u=this._maskHash.get(n);u.instructionsStart=i.instructionSize,is(a,i,o),a.includeInBuild=!1,o.renderPipes.batch.break(i),i.add({renderPipeId:"stencilMask",action:"pushMaskEnd",mask:t,inverse:e._maskOptions.inverse,canBundle:!1});let l=i.instructionSize-u.instructionsStart-1;u.instructionsLength=l;let c=o.renderTarget.renderTarget.uid;(s=this._maskStackHash)[c]??(s[c]=0)}pop(t,e,i){let s=t,n=this._renderer;n.renderPipes.batch.break(i),n.renderPipes.blendMode.setBlendMode(s.mask,"none",i),i.add({renderPipeId:"stencilMask",action:"popMaskBegin",inverse:e._maskOptions.inverse,canBundle:!1});let o=this._maskHash.get(t);for(let a=0;a<o.instructionsLength;a++)i.instructions[i.instructionSize++]=i.instructions[o.instructionsStart++];i.add({renderPipeId:"stencilMask",action:"popMaskEnd",canBundle:!1})}execute(t){var e;let i=this._renderer,s=i.renderTarget.renderTarget.uid,n=(e=this._maskStackHash)[s]??(e[s]=0);t.action==="pushMaskBegin"?(i.renderTarget.ensureDepthStencil(),i.stencil.setStencilMode(pt.RENDERING_MASK_ADD,n),n++,i.colorMask.setMask(0)):t.action==="pushMaskEnd"?(t.inverse?i.stencil.setStencilMode(pt.INVERSE_MASK_ACTIVE,n):i.stencil.setStencilMode(pt.MASK_ACTIVE,n),i.colorMask.setMask(15)):t.action==="popMaskBegin"?(i.colorMask.setMask(0),n!==0?i.stencil.setStencilMode(pt.RENDERING_MASK_REMOVE,n):(i.renderTarget.clear(null,Ot.STENCIL),i.stencil.setStencilMode(pt.DISABLED,n)),n--):t.action==="popMaskEnd"&&(t.inverse?i.stencil.setStencilMode(pt.INVERSE_MASK_ACTIVE,n):i.stencil.setStencilMode(pt.MASK_ACTIVE,n),i.colorMask.setMask(15)),this._maskStackHash[s]=n}destroy(){this._renderer=null,this._maskStackHash=null,this._maskHash=null}};Nn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"stencilMask"}});var gf,Mv,Fv=p(()=>{$t();D();gf=class Bv{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Z(0),this.color=this._backgroundColor,this.alpha=1}init(t){t={...Bv.defaultOptions,...t},this.clearBeforeRender=t.clearBeforeRender,this.color=t.background||t.backgroundColor||this._backgroundColor,this.alpha=t.backgroundAlpha,this._backgroundColor.setAlpha(t.backgroundAlpha)}get color(){return this._backgroundColor}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get colorRgba(){return this._backgroundColor.toArray()}destroy(){}};gf.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"background",priority:0};gf.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0};Mv=gf});var Hn,zn,Rv=p(()=>{D();oa();gt();Hn={};H.handle(b.BlendMode,r=>{if(!r.name)throw new Error("BlendMode extension must have a name property");Hn[r.name]=r.ref},r=>{delete Hn[r.name]});zn=class{constructor(t){this._isAdvanced=!1,this._filterHash=Object.create(null),this._renderer=t}setBlendMode(t,e,i){if(this._activeBlendMode===e){this._isAdvanced&&this._renderableList.push(t);return}this._activeBlendMode=e,this._isAdvanced&&this._endAdvancedBlendMode(i),this._isAdvanced=!!Hn[e],this._isAdvanced&&(this._beginAdvancedBlendMode(i),this._renderableList.push(t))}_beginAdvancedBlendMode(t){this._renderer.renderPipes.batch.break(t);let e=this._activeBlendMode;if(!Hn[e]){z(`Unable to assign BlendMode: \'${e}\'. You may want to include: import \'pixi.js/advanced-blend-modes\'`);return}let i=this._filterHash[e];i||(i=this._filterHash[e]=new rr,i.filters=[new Hn[e]]);let s={renderPipeId:"filter",action:"pushFilter",renderables:[],filterEffect:i,canBundle:!1};this._renderableList=s.renderables,t.add(s)}_endAdvancedBlendMode(t){this._renderableList=null,this._renderer.renderPipes.batch.break(t),t.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}buildStart(){this._isAdvanced=!1}buildEnd(t){this._isAdvanced&&this._endAdvancedBlendMode(t)}destroy(){this._renderer=null,this._renderableList=null;for(let t in this._filterHash)this._filterHash[t].destroy();this._filterHash=null}};zn.extension={type:[b.WebGLPipes,b.WebGPUPipes,b.CanvasPipes],name:"blendMode"}});var xf,_f,Gv,Iv=p(()=>{D();De();dt();xf={png:"image/png",jpg:"image/jpeg",webp:"image/webp"},_f=class kv{constructor(t){this._renderer=t}_normalizeOptions(t,e={}){return t instanceof it||t instanceof I?{target:t,...e}:{...e,...t}}async image(t){let e=new Image;return e.src=await this.base64(t),e}async base64(t){t=this._normalizeOptions(t,kv.defaultImageOptions);let{format:e,quality:i}=t,s=this.canvas(t);if(s.toBlob!==void 0)return new Promise((n,o)=>{s.toBlob(a=>{if(!a){o(new Error("ICanvas.toBlob failed!"));return}let u=new FileReader;u.onload=()=>n(u.result),u.onerror=o,u.readAsDataURL(a)},xf[e],i)});if(s.toDataURL!==void 0)return s.toDataURL(xf[e],i);if(s.convertToBlob!==void 0){let n=await s.convertToBlob({type:xf[e],quality:i});return new Promise((o,a)=>{let u=new FileReader;u.onload=()=>o(u.result),u.onerror=a,u.readAsDataURL(n)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(t){t=this._normalizeOptions(t);let e=t.target,i=this._renderer;if(e instanceof I)return i.texture.generateCanvas(e);let s=i.textureGenerator.generateTexture(t),n=i.texture.generateCanvas(s);return s.destroy(!0),n}pixels(t){t=this._normalizeOptions(t);let e=t.target,i=this._renderer,s=e instanceof I?e:i.textureGenerator.generateTexture(t),n=i.texture.getPixels(s);return e instanceof it&&s.destroy(!0),n}texture(t){return t=this._normalizeOptions(t),t.target instanceof I?t.target:this._renderer.textureGenerator.generateTexture(t)}download(t){t=this._normalizeOptions(t);let e=this.canvas(t),i=document.createElement("a");i.download=t.filename??"image.png",i.href=e.toDataURL("image/png"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}log(t){let e=t.width??200;t=this._normalizeOptions(t);let i=this.canvas(t),s=i.toDataURL();console.log(`[Pixi Texture] ${i.width}px ${i.height}px`);let n=["font-size: 1px;",`padding: ${e}px 300px;`,`background: url(${s}) no-repeat;`,"background-size: contain;"].join(" ");console.log("%c ",n)}destroy(){this._renderer=null}};_f.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"extract"};_f.defaultImageOptions={format:"png",quality:1};Gv=_f});var Du,Uv=p(()=>{ne();dt();Du=class r extends I{static create(t){return new r({source:new ut(t)})}resize(t,e,i){return this.source.resize(t,e,i),this}}});var hD,fD,dD,Wn,Ov=p(()=>{$t();D();ot();Yt();ce();ha();De();Uv();hD=new tt,fD=new ft,dD=[0,0,0,0],Wn=class{constructor(t){this._renderer=t}generateTexture(t){t instanceof it&&(t={target:t,frame:void 0,textureSourceOptions:{},resolution:void 0});let e=t.resolution||this._renderer.resolution,i=t.antialias||this._renderer.view.antialias,s=t.target,n=t.clearColor;n?n=Array.isArray(n)&&n.length===4?n:Z.shared.setValue(n).toArray():n=dD;let o=t.frame?.copyTo(hD)||vi(s,fD).rectangle;o.width=Math.max(o.width,1/e)|0,o.height=Math.max(o.height,1/e)|0;let a=Du.create({...t.textureSourceOptions,width:o.width,height:o.height,resolution:e,antialias:i}),u=G.shared.translate(-o.x,-o.y);return this._renderer.render({container:s,transform:u,target:a,clearColor:n}),a.source.updateMipmaps(),a}destroy(){this._renderer=null}};Wn.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"textureGenerator"}});var Vn,Lv=p(()=>{D();ot();xe();Hi();wr();Ve();ee();Vn=class{constructor(t){this._stackIndex=0,this._globalUniformDataStack=[],this._uniformsPool=[],this._activeUniforms=[],this._bindGroupPool=[],this._activeBindGroups=[],this._renderer=t}reset(){this._stackIndex=0;for(let t=0;t<this._activeUniforms.length;t++)this._uniformsPool.push(this._activeUniforms[t]);for(let t=0;t<this._activeBindGroups.length;t++)this._bindGroupPool.push(this._activeBindGroups[t]);this._activeUniforms.length=0,this._activeBindGroups.length=0}start(t){this.reset(),this.push(t)}bind({size:t,projectionMatrix:e,worldTransformMatrix:i,worldColor:s,offset:n}){let o=this._renderer.renderTarget.renderTarget,a=this._stackIndex?this._globalUniformDataStack[this._stackIndex-1]:{projectionData:o,worldTransformMatrix:new G,worldColor:4294967295,offset:new et},u={projectionMatrix:e||this._renderer.renderTarget.projectionMatrix,resolution:t||o.size,worldTransformMatrix:i||a.worldTransformMatrix,worldColor:s||a.worldColor,offset:n||a.offset,bindGroup:null},l=this._uniformsPool.pop()||this._createUniforms();this._activeUniforms.push(l);let c=l.uniforms;c.uProjectionMatrix=u.projectionMatrix,c.uResolution=u.resolution,c.uWorldTransformMatrix.copyFrom(u.worldTransformMatrix),c.uWorldTransformMatrix.tx-=u.offset.x,c.uWorldTransformMatrix.ty-=u.offset.y,Xe(u.worldColor,c.uWorldColorAlpha,0),l.update();let h;this._renderer.renderPipes.uniformBatch?h=this._renderer.renderPipes.uniformBatch.getUniformBindGroup(l,!1):(h=this._bindGroupPool.pop()||new It,this._activeBindGroups.push(h),h.setResource(l,0)),u.bindGroup=h,this._currentGlobalUniformData=u}push(t){this.bind(t),this._globalUniformDataStack[this._stackIndex++]=this._currentGlobalUniformData}pop(){this._currentGlobalUniformData=this._globalUniformDataStack[--this._stackIndex-1],this._renderer.type===Mt.WEBGL&&this._currentGlobalUniformData.bindGroup.resources[0].update()}get bindGroup(){return this._currentGlobalUniformData.bindGroup}get globalUniformData(){return this._currentGlobalUniformData}get uniformGroup(){return this._currentGlobalUniformData.bindGroup.resources[0]}_createUniforms(){return new ct({uProjectionMatrix:{value:new G,type:"mat3x3<f32>"},uWorldTransformMatrix:{value:new G,type:"mat3x3<f32>"},uWorldColorAlpha:{value:new Float32Array(4),type:"vec4<f32>"},uResolution:{value:[0,0],type:"vec2<f32>"}},{isStatic:!0})}destroy(){this._renderer=null}};Vn.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"globalUniforms"}});var pD,Xn,Nv=p(()=>{D();Ws();pD=1,Xn=class{constructor(){this._tasks=[],this._offset=0}init(){oe.system.add(this._update,this)}repeat(t,e,i=!0){let s=pD++,n=0;return i&&(this._offset+=1e3,n=this._offset),this._tasks.push({func:t,duration:e,start:performance.now(),offset:n,last:performance.now(),repeat:!0,id:s}),s}cancel(t){for(let e=0;e<this._tasks.length;e++)if(this._tasks[e].id===t){this._tasks.splice(e,1);return}}_update(){let t=performance.now();for(let e=0;e<this._tasks.length;e++){let i=this._tasks[e];if(t-i.offset-i.last>=i.duration){let s=t-i.start;i.func(s),i.last=t}}}destroy(){oe.system.remove(this._update,this),this._tasks.length=0}};Xn.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"scheduler",priority:0}});function zv(r){if(!Hv){if(Q.get().getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){let t=[`%c %c %c %c %c PixiJS %c v${ss} (${r}) http://www.pixijs.com/\n\n`,"background: #E72264; padding:5px 0;","background: #6CA2EA; padding:5px 0;","background: #B5D33D; padding:5px 0;","background: #FED23F; padding:5px 0;","color: #FFFFFF; background: #E72264; padding:5px 0;","color: #E72264; background: #FFFFFF; padding:5px 0;"];globalThis.console.log(...t)}else globalThis.console&&globalThis.console.log(`PixiJS ${ss} - ${r} - http://www.pixijs.com/`);Hv=!0}}var Hv,Wv=p(()=>{Pt();cf();Hv=!1});var ns,Vv=p(()=>{D();Wv();Ve();ns=class{constructor(t){this._renderer=t}init(t){if(t.hello){let e=this._renderer.name;this._renderer.type===Mt.WEBGL&&(e+=` ${this._renderer.context.webGLVersion}`),zv(e)}}};ns.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"hello",priority:-2};ns.defaultOptions={hello:!1}});function Xv(r){let t=!1;for(let i in r)if(r[i]==null){t=!0;break}if(!t)return r;let e=Object.create(null);for(let i in r){let s=r[i];s&&(e[i]=s)}return e}function $v(r){let t=0;for(let e=0;e<r.length;e++)r[e]==null?t++:r[e-t]=r[e];return r.length-=t,r}var jv=p(()=>{"use strict"});var mD,yf,Kv,qv=p(()=>{D();jv();mD=0,yf=class Yv{constructor(t){this._managedRenderables=[],this._managedHashes=[],this._managedArrays=[],this._renderer=t}init(t){t={...Yv.defaultOptions,...t},this.maxUnusedTime=t.renderableGCMaxUnusedTime,this._frequency=t.renderableGCFrequency,this.enabled=t.renderableGCActive}get enabled(){return!!this._handler}set enabled(t){this.enabled!==t&&(t?(this._handler=this._renderer.scheduler.repeat(()=>this.run(),this._frequency,!1),this._hashHandler=this._renderer.scheduler.repeat(()=>{for(let e of this._managedHashes)e.context[e.hash]=Xv(e.context[e.hash])},this._frequency),this._arrayHandler=this._renderer.scheduler.repeat(()=>{for(let e of this._managedArrays)$v(e.context[e.hash])},this._frequency)):(this._renderer.scheduler.cancel(this._handler),this._renderer.scheduler.cancel(this._hashHandler),this._renderer.scheduler.cancel(this._arrayHandler)))}addManagedHash(t,e){this._managedHashes.push({context:t,hash:e})}addManagedArray(t,e){this._managedArrays.push({context:t,hash:e})}prerender({container:t}){this._now=performance.now(),t.renderGroup.gcTick=mD++,this._updateInstructionGCTick(t.renderGroup,t.renderGroup.gcTick)}addRenderable(t){this.enabled&&(t._lastUsed===-1&&(this._managedRenderables.push(t),t.once("destroyed",this._removeRenderable,this)),t._lastUsed=this._now)}run(){let t=this._now,e=this._managedRenderables,i=this._renderer.renderPipes,s=0;for(let n=0;n<e.length;n++){let o=e[n];if(o===null){s++;continue}let a=o.renderGroup??o.parentRenderGroup,u=a?.instructionSet?.gcTick??-1;if((a?.gcTick??0)===u&&(o._lastUsed=t),t-o._lastUsed>this.maxUnusedTime){if(!o.destroyed){let l=i;a&&(a.structureDidChange=!0),l[o.renderPipeId].destroyRenderable(o)}o._lastUsed=-1,s++,o.off("destroyed",this._removeRenderable,this)}else e[n-s]=o}e.length-=s}destroy(){this.enabled=!1,this._renderer=null,this._managedRenderables.length=0,this._managedHashes.length=0,this._managedArrays.length=0}_removeRenderable(t){let e=this._managedRenderables.indexOf(t);e>=0&&(t.off("destroyed",this._removeRenderable,this),this._managedRenderables[e]=null)}_updateInstructionGCTick(t,e){t.instructionSet.gcTick=e;for(let i of t.renderGroupChildren)this._updateInstructionGCTick(i,e)}};yf.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"renderableGC",priority:0};yf.defaultOptions={renderableGCActive:!0,renderableGCMaxUnusedTime:6e4,renderableGCFrequency:3e4};Kv=yf});var bf,Qv,Jv=p(()=>{D();bf=class Zv{constructor(t){this._renderer=t,this.count=0,this.checkCount=0}init(t){t={...Zv.defaultOptions,...t},this.checkCountMax=t.textureGCCheckCountMax,this.maxIdle=t.textureGCAMaxIdle??t.textureGCMaxIdle,this.active=t.textureGCActive}postrender(){this._renderer.renderingToScreen&&(this.count++,this.active&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){let t=this._renderer.texture.managedTextures;for(let e=0;e<t.length;e++){let i=t[e];i.autoGarbageCollect&&i.resource&&i._touched>-1&&this.count-i._touched>this.maxIdle&&(i._touched=-1,i.unload())}}destroy(){this._renderer=null}};bf.extension={type:[b.WebGLSystem,b.WebGPUSystem],name:"textureGC"};bf.defaultOptions={textureGCActive:!0,textureGCAMaxIdle:null,textureGCMaxIdle:60*60,textureGCCheckCountMax:600};Qv=bf});var tT,$n,vf=p(()=>{jt();ne();dt();tT=class eT{constructor(t={}){if(this.uid=rt("renderTarget"),this.colorTextures=[],this.dirtyId=0,this.isRoot=!1,this._size=new Float32Array(2),this._managedColorTextures=!1,t={...eT.defaultOptions,...t},this.stencil=t.stencil,this.depth=t.depth,this.isRoot=t.isRoot,typeof t.colorTextures=="number"){this._managedColorTextures=!0;for(let e=0;e<t.colorTextures;e++)this.colorTextures.push(new ut({width:t.width,height:t.height,resolution:t.resolution,antialias:t.antialias}))}else{this.colorTextures=[...t.colorTextures.map(i=>i.source)];let e=this.colorTexture.source;this.resize(e.width,e.height,e._resolution)}this.colorTexture.source.on("resize",this.onSourceResize,this),(t.depthStencilTexture||this.stencil)&&(t.depthStencilTexture instanceof I||t.depthStencilTexture instanceof ut?this.depthStencilTexture=t.depthStencilTexture.source:this.ensureDepthStencilTexture())}get size(){let t=this._size;return t[0]=this.pixelWidth,t[1]=this.pixelHeight,t}get width(){return this.colorTexture.source.width}get height(){return this.colorTexture.source.height}get pixelWidth(){return this.colorTexture.source.pixelWidth}get pixelHeight(){return this.colorTexture.source.pixelHeight}get resolution(){return this.colorTexture.source._resolution}get colorTexture(){return this.colorTextures[0]}onSourceResize(t){this.resize(t.width,t.height,t._resolution,!0)}ensureDepthStencilTexture(){this.depthStencilTexture||(this.depthStencilTexture=new ut({width:this.width,height:this.height,resolution:this.resolution,format:"depth24plus-stencil8",autoGenerateMipmaps:!1,antialias:!1,mipLevelCount:1}))}resize(t,e,i=this.resolution,s=!1){this.dirtyId++,this.colorTextures.forEach((n,o)=>{s&&o===0||n.source.resize(t,e,i)}),this.depthStencilTexture&&this.depthStencilTexture.source.resize(t,e,i)}destroy(){this.colorTexture.source.off("resize",this.onSourceResize,this),this._managedColorTextures&&this.colorTextures.forEach(t=>{t.destroy()}),this.depthStencilTexture&&(this.depthStencilTexture.destroy(),delete this.depthStencilTexture)}};tT.defaultOptions={width:0,height:0,resolution:1,colorTextures:1,stencil:!1,depth:!1,antialias:!1,isRoot:!1};$n=tT});function Pu(r,t){if(!jn.has(r)){let e=new I({source:new te({resource:r,...t})}),i=()=>{jn.get(r)===e&&jn.delete(r)};e.once("destroy",i),e.source.once("destroy",i),jn.set(r,e)}return jn.get(r)}var jn,Tf=p(()=>{Ai();dt();jn=new Map});var Sf,iT,sT=p(()=>{Pt();D();Yt();vt();vf();Tf();Sf=class rT{get autoDensity(){return this.texture.source.autoDensity}set autoDensity(t){this.texture.source.autoDensity=t}get resolution(){return this.texture.source._resolution}set resolution(t){this.texture.source.resize(this.texture.source.width,this.texture.source.height,t)}init(t){t={...rT.defaultOptions,...t},t.view&&(X(Y,"ViewSystem.view has been renamed to ViewSystem.canvas"),t.canvas=t.view),this.screen=new tt(0,0,t.width,t.height),this.canvas=t.canvas||Q.get().createCanvas(),this.antialias=!!t.antialias,this.texture=Pu(this.canvas,t),this.renderTarget=new $n({colorTextures:[this.texture],depth:!!t.depth,isRoot:!0}),this.texture.source.transparent=t.backgroundAlpha<1,this.resolution=t.resolution}resize(t,e,i){this.texture.source.resize(t,e,i),this.screen.width=this.texture.frame.width,this.screen.height=this.texture.frame.height}destroy(t=!1){(typeof t=="boolean"?t:!!t?.removeView)&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)}};Sf.extension={type:[b.WebGLSystem,b.WebGPUSystem,b.CanvasSystem],name:"view",priority:0};Sf.defaultOptions={width:800,height:600,autoDensity:!1,antialias:!1};iT=Sf});var Bu,Mu,wf=p(()=>{av();uv();xv();_v();hf();bv();Av();Dv();Pv();Fv();Rv();Iv();Ov();Lv();Nv();Vv();qv();Jv();sT();Bu=[Mv,Vn,ns,iT,kn,Qv,Wn,Gv,Un,Kv,Xn],Mu=[zn,df,Gn,Fn,On,Nn,Ln,Bn]});var Yn,nT=p(()=>{D();Yn=class{constructor(t){this._hash=Object.create(null),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_hash")}contextChange(t){this._gpu=t}getBindGroup(t,e,i){return t._updateKey(),this._hash[t._key]||this._createBindGroup(t,e,i)}_createBindGroup(t,e,i){let s=this._gpu.device,n=e.layout[i],o=[],a=this._renderer;for(let c in n){let h=t.resources[c]??t.resources[n[c]],d;if(h._resourceType==="uniformGroup"){let f=h;a.ubo.updateUniformGroup(f);let m=f.buffer;d={buffer:a.buffer.getGPUBuffer(m),offset:0,size:m.descriptor.size}}else if(h._resourceType==="buffer"){let f=h;d={buffer:a.buffer.getGPUBuffer(f),offset:0,size:f.descriptor.size}}else if(h._resourceType==="bufferResource"){let f=h;d={buffer:a.buffer.getGPUBuffer(f.buffer),offset:f.offset,size:f.size}}else if(h._resourceType==="textureSampler"){let f=h;d=a.texture.getGpuSampler(f)}else if(h._resourceType==="textureSource"){let f=h;d=a.texture.getGpuSource(f).createView({})}o.push({binding:n[c],resource:d})}let u=a.shader.getProgramData(e).bindGroups[i],l=s.createBindGroup({layout:u,entries:o});return this._hash[t._key]=l,l}destroy(){for(let t of Object.keys(this._hash))this._hash[t]=null;this._hash=null,this._renderer=null}};Yn.extension={type:[b.WebGPUSystem],name:"bindGroup"}});var Kn,oT=p(()=>{D();Pc();Kn=class{constructor(t){this._gpuBuffers=Object.create(null),this._managedBuffers=[],t.renderableGC.addManagedHash(this,"_gpuBuffers")}contextChange(t){this._gpu=t}getGPUBuffer(t){return this._gpuBuffers[t.uid]||this.createGPUBuffer(t)}updateBuffer(t){let e=this._gpuBuffers[t.uid]||this.createGPUBuffer(t),i=t.data;return t._updateID&&i&&(t._updateID=0,this._gpu.device.queue.writeBuffer(e,0,i.buffer,0,(t._updateSize||i.byteLength)+3&-4)),e}destroyAll(){for(let t in this._gpuBuffers)this._gpuBuffers[t].destroy();this._gpuBuffers={}}createGPUBuffer(t){this._gpuBuffers[t.uid]||(t.on("update",this.updateBuffer,this),t.on("change",this.onBufferChange,this),t.on("destroy",this.onBufferDestroy,this),this._managedBuffers.push(t));let e=this._gpu.device.createBuffer(t.descriptor);return t._updateID=0,t.data&&(Js(t.data.buffer,e.getMappedRange()),e.unmap()),this._gpuBuffers[t.uid]=e,e}onBufferChange(t){this._gpuBuffers[t.uid].destroy(),t._updateID=0,this._gpuBuffers[t.uid]=this.createGPUBuffer(t)}onBufferDestroy(t){this._managedBuffers.splice(this._managedBuffers.indexOf(t),1),this._destroyBuffer(t)}destroy(){this._managedBuffers.forEach(t=>this._destroyBuffer(t)),this._managedBuffers=null,this._gpuBuffers=null}_destroyBuffer(t){this._gpuBuffers[t.uid].destroy(),t.off("update",this.updateBuffer,this),t.off("change",this.onBufferChange,this),t.off("destroy",this.onBufferDestroy,this),this._gpuBuffers[t.uid]=null}};Kn.extension={type:[b.WebGPUSystem],name:"buffer"}});var qn,aT=p(()=>{D();qn=class{constructor(t){this._colorMaskCache=15,this._renderer=t}setMask(t){this._colorMaskCache!==t&&(this._colorMaskCache=t,this._renderer.pipeline.setColorMask(t))}destroy(){this._renderer=null,this._colorMaskCache=null}};qn.extension={type:[b.WebGPUSystem],name:"colorMask"}});var os,uT=p(()=>{Pt();D();os=class{constructor(t){this._renderer=t}async init(t){return this._initPromise?this._initPromise:(this._initPromise=this._createDeviceAndAdaptor(t).then(e=>{this.gpu=e,this._renderer.runners.contextChange.emit(this.gpu)}),this._initPromise)}contextChange(t){this._renderer.gpu=t}async _createDeviceAndAdaptor(t){let e=await Q.get().getNavigator().gpu.requestAdapter({powerPreference:t.powerPreference,forceFallbackAdapter:t.forceFallbackAdapter}),i=["texture-compression-bc","texture-compression-astc","texture-compression-etc2"].filter(n=>e.features.has(n)),s=await e.requestDevice({requiredFeatures:i});return{adapter:e,device:s}}destroy(){this.gpu=null,this._renderer=null}};os.extension={type:[b.WebGPUSystem],name:"device"};os.defaultOptions={powerPreference:void 0,forceFallbackAdapter:!1}});var Zn,lT=p(()=>{D();Zn=class{constructor(t){this._boundBindGroup=Object.create(null),this._boundVertexBuffer=Object.create(null),this._renderer=t}renderStart(){this.commandFinished=new Promise(t=>{this._resolveCommandFinished=t}),this.commandEncoder=this._renderer.gpu.device.createCommandEncoder()}beginRenderPass(t){this.endRenderPass(),this._clearCache(),this.renderPassEncoder=this.commandEncoder.beginRenderPass(t.descriptor)}endRenderPass(){this.renderPassEncoder&&this.renderPassEncoder.end(),this.renderPassEncoder=null}setViewport(t){this.renderPassEncoder.setViewport(t.x,t.y,t.width,t.height,0,1)}setPipelineFromGeometryProgramAndState(t,e,i,s){let n=this._renderer.pipeline.getPipeline(t,e,i,s);this.setPipeline(n)}setPipeline(t){this._boundPipeline!==t&&(this._boundPipeline=t,this.renderPassEncoder.setPipeline(t))}_setVertexBuffer(t,e){this._boundVertexBuffer[t]!==e&&(this._boundVertexBuffer[t]=e,this.renderPassEncoder.setVertexBuffer(t,this._renderer.buffer.updateBuffer(e)))}_setIndexBuffer(t){if(this._boundIndexBuffer===t)return;this._boundIndexBuffer=t;let e=t.data.BYTES_PER_ELEMENT===2?"uint16":"uint32";this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(t),e)}resetBindGroup(t){this._boundBindGroup[t]=null}setBindGroup(t,e,i){if(this._boundBindGroup[t]===e)return;this._boundBindGroup[t]=e,e._touch(this._renderer.textureGC.count);let s=this._renderer.bindGroup.getBindGroup(e,i,t);this.renderPassEncoder.setBindGroup(t,s)}setGeometry(t,e){let i=this._renderer.pipeline.getBufferNamesToBind(t,e);for(let s in i)this._setVertexBuffer(s,t.attributes[i[s]].buffer);t.indexBuffer&&this._setIndexBuffer(t.indexBuffer)}_setShaderBindGroups(t,e){for(let i in t.groups){let s=t.groups[i];e||this._syncBindGroup(s),this.setBindGroup(i,s,t.gpuProgram)}}_syncBindGroup(t){for(let e in t.resources){let i=t.resources[e];i.isUniformGroup&&this._renderer.ubo.updateUniformGroup(i)}}draw(t){let{geometry:e,shader:i,state:s,topology:n,size:o,start:a,instanceCount:u,skipSync:l}=t;this.setPipelineFromGeometryProgramAndState(e,i.gpuProgram,s,n),this.setGeometry(e,i.gpuProgram),this._setShaderBindGroups(i,l),e.indexBuffer?this.renderPassEncoder.drawIndexed(o||e.indexBuffer.data.length,u??e.instanceCount,a||0):this.renderPassEncoder.draw(o||e.getSize(),u??e.instanceCount,a||0)}finishRenderPass(){this.renderPassEncoder&&(this.renderPassEncoder.end(),this.renderPassEncoder=null)}postrender(){this.finishRenderPass(),this._gpu.device.queue.submit([this.commandEncoder.finish()]),this._resolveCommandFinished(),this.commandEncoder=null}restoreRenderPass(){let t=this._renderer.renderTarget.adaptor.getDescriptor(this._renderer.renderTarget.renderTarget,!1,[0,0,0,1]);this.renderPassEncoder=this.commandEncoder.beginRenderPass(t);let e=this._boundPipeline,i={...this._boundVertexBuffer},s=this._boundIndexBuffer,n={...this._boundBindGroup};this._clearCache();let o=this._renderer.renderTarget.viewport;this.renderPassEncoder.setViewport(o.x,o.y,o.width,o.height,0,1),this.setPipeline(e);for(let a in i)this._setVertexBuffer(a,i[a]);for(let a in n)this.setBindGroup(a,n[a],null);this._setIndexBuffer(s)}_clearCache(){for(let t=0;t<16;t++)this._boundBindGroup[t]=null,this._boundVertexBuffer[t]=null;this._boundIndexBuffer=null,this._boundPipeline=null}destroy(){this._renderer=null,this._gpu=null,this._boundBindGroup=null,this._boundVertexBuffer=null,this._boundIndexBuffer=null,this._boundPipeline=null}contextChange(t){this._gpu=t}};Zn.extension={type:[b.WebGPUSystem],name:"encoder",priority:1}});var Qn,cT=p(()=>{D();ei();Qn=class{constructor(t){this._renderTargetStencilState=Object.create(null),this._renderer=t,t.renderTarget.onRenderTargetChange.add(this)}onRenderTargetChange(t){let e=this._renderTargetStencilState[t.uid];e||(e=this._renderTargetStencilState[t.uid]={stencilMode:pt.DISABLED,stencilReference:0}),this._activeRenderTarget=t,this.setStencilMode(e.stencilMode,e.stencilReference)}setStencilMode(t,e){let i=this._renderTargetStencilState[this._activeRenderTarget.uid];i.stencilMode=t,i.stencilReference=e;let s=this._renderer;s.pipeline.setStencilMode(t),s.encoder.renderPassEncoder.setStencilReference(e)}destroy(){this._renderer.renderTarget.onRenderTargetChange.remove(this),this._renderer=null,this._activeRenderTarget=null,this._renderTargetStencilState=null}};Qn.extension={type:[b.WebGPUSystem],name:"stencil"}});var as,Ef=p(()=>{sf();Er();ur();as=class{constructor(t){this._syncFunctionHash=Object.create(null),this._adaptor=t,this._systemCheck()}_systemCheck(){if(!Tu())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}ensureUniformGroup(t){let e=this.getUniformGroupData(t);t.buffer||(t.buffer=new Tt({data:new Float32Array(e.layout.size/4),usage:J.UNIFORM|J.COPY_DST}))}getUniformGroupData(t){return this._syncFunctionHash[t._signature]||this._initUniformGroup(t)}_initUniformGroup(t){let e=t._signature,i=this._syncFunctionHash[e];if(!i){let s=Object.keys(t.uniformStructures).map(a=>t.uniformStructures[a]),n=this._adaptor.createUboElements(s),o=this._generateUboSync(n.uboElements);i=this._syncFunctionHash[e]={layout:n,syncFunction:o}}return this._syncFunctionHash[e]}_generateUboSync(t){return this._adaptor.generateUboSync(t)}syncUniformGroup(t,e,i){let s=this.getUniformGroupData(t);t.buffer||(t.buffer=new Tt({data:new Float32Array(s.layout.size/4),usage:J.UNIFORM|J.COPY_DST}));let n=null;return e||(e=t.buffer.data,n=t.buffer.dataInt32),i||(i=0),s.syncFunction(t.uniforms,e,n,i),!0}updateUniformGroup(t){if(t.isStatic&&!t._dirtyId)return!1;t._dirtyId=0;let e=this.syncUniformGroup(t);return t.buffer.update(),e}destroy(){this._syncFunctionHash=null}}});function hT(r){let t=r.map(i=>({data:i,offset:0,size:0})),e=0;for(let i=0;i<t.length;i++){let s=t[i],n=Jn[s.data.type].size,o=Jn[s.data.type].align;if(!Jn[s.data.type])throw new Error(`[Pixi.js] WebGPU UniformBuffer: Unknown type ${s.data.type}`);s.data.size>1&&(n=Math.max(n,o)*s.data.size),e=Math.ceil(e/o)*o,s.size=n,s.offset=e,e+=n}return e=Math.ceil(e/16)*16,{uboElements:t,size:e}}var Jn,Cf=p(()=>{"use strict";Jn={i32:{align:4,size:4},u32:{align:4,size:4},f32:{align:4,size:4},f16:{align:2,size:2},"vec2<i32>":{align:8,size:8},"vec2<u32>":{align:8,size:8},"vec2<f32>":{align:8,size:8},"vec2<f16>":{align:4,size:4},"vec3<i32>":{align:16,size:12},"vec3<u32>":{align:16,size:12},"vec3<f32>":{align:16,size:12},"vec3<f16>":{align:8,size:6},"vec4<i32>":{align:16,size:16},"vec4<u32>":{align:16,size:16},"vec4<f32>":{align:16,size:16},"vec4<f16>":{align:8,size:8},"mat2x2<f32>":{align:8,size:16},"mat2x2<f16>":{align:4,size:8},"mat3x2<f32>":{align:8,size:24},"mat3x2<f16>":{align:4,size:12},"mat4x2<f32>":{align:8,size:32},"mat4x2<f16>":{align:4,size:16},"mat2x3<f32>":{align:16,size:32},"mat2x3<f16>":{align:8,size:16},"mat3x3<f32>":{align:16,size:48},"mat3x3<f16>":{align:8,size:24},"mat4x3<f32>":{align:16,size:64},"mat4x3<f16>":{align:8,size:32},"mat2x4<f32>":{align:16,size:32},"mat2x4<f16>":{align:8,size:16},"mat3x4<f32>":{align:16,size:48},"mat3x4<f16>":{align:8,size:24},"mat4x4<f32>":{align:16,size:64},"mat4x4<f16>":{align:8,size:32}}});var fr,Af=p(()=>{"use strict";fr=[{type:"mat3x3<f32>",test:r=>r.value.a!==void 0,ubo:`\n var matrix = uv[name].toArray(true);\n data[offset] = matrix[0];\n data[offset + 1] = matrix[1];\n data[offset + 2] = matrix[2];\n data[offset + 4] = matrix[3];\n data[offset + 5] = matrix[4];\n data[offset + 6] = matrix[5];\n data[offset + 8] = matrix[6];\n data[offset + 9] = matrix[7];\n data[offset + 10] = matrix[8];\n `,uniform:`\n gl.uniformMatrix3fv(ud[name].location, false, uv[name].toArray(true));\n `},{type:"vec4<f32>",test:r=>r.type==="vec4<f32>"&&r.size===1&&r.value.width!==void 0,ubo:`\n v = uv[name];\n data[offset] = v.x;\n data[offset + 1] = v.y;\n data[offset + 2] = v.width;\n data[offset + 3] = v.height;\n `,uniform:`\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud[name].location, v.x, v.y, v.width, v.height);\n }\n `},{type:"vec2<f32>",test:r=>r.type==="vec2<f32>"&&r.size===1&&r.value.x!==void 0,ubo:`\n v = uv[name];\n data[offset] = v.x;\n data[offset + 1] = v.y;\n `,uniform:`\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.x || cv[1] !== v.y) {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud[name].location, v.x, v.y);\n }\n `},{type:"vec4<f32>",test:r=>r.type==="vec4<f32>"&&r.size===1&&r.value.red!==void 0,ubo:`\n v = uv[name];\n data[offset] = v.red;\n data[offset + 1] = v.green;\n data[offset + 2] = v.blue;\n data[offset + 3] = v.alpha;\n `,uniform:`\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n cv[3] = v.alpha;\n gl.uniform4f(ud[name].location, v.red, v.green, v.blue, v.alpha);\n }\n `},{type:"vec3<f32>",test:r=>r.type==="vec3<f32>"&&r.size===1&&r.value.red!==void 0,ubo:`\n v = uv[name];\n data[offset] = v.red;\n data[offset + 1] = v.green;\n data[offset + 2] = v.blue;\n `,uniform:`\n cv = ud[name].value;\n v = uv[name];\n if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue) {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n gl.uniform3f(ud[name].location, v.red, v.green, v.blue);\n }\n `}]});function Fu(r,t,e,i){let s=[`\n var v = null;\n var v2 = null;\n var t = 0;\n var index = 0;\n var name = null;\n var arrayOffset = null;\n `],n=0;for(let a=0;a<r.length;a++){let u=r[a],l=u.data.name,c=!1,h=0;for(let d=0;d<fr.length;d++)if(fr[d].test(u.data)){h=u.offset/4,s.push(`name = "${l}";`,`offset += ${h-n};`,fr[d][t]||fr[d].ubo),c=!0;break}if(!c)if(u.data.size>1)h=u.offset/4,s.push(e(u,h-n));else{let d=i[u.data.type];h=u.offset/4,s.push(`\n v = uv.${l};\n offset += ${h-n};\n ${d};\n `)}n=h}let o=s.join(`\n`);return new Function("uv","data","dataInt32","offset",o)}var Df=p(()=>{Af()});function us(r,t){return`\n for (let i = 0; i < ${r*t}; i++) {\n data[offset + (((i / ${r})|0) * 4) + (i % ${r})] = v[i];\n }\n `}var Pf,fT,Bf=p(()=>{"use strict";Pf={f32:`\n data[offset] = v;`,i32:`\n dataInt32[offset] = v;`,"vec2<f32>":`\n data[offset] = v[0];\n data[offset + 1] = v[1];`,"vec3<f32>":`\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];`,"vec4<f32>":`\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 3] = v[3];`,"vec2<i32>":`\n dataInt32[offset] = v[0];\n dataInt32[offset + 1] = v[1];`,"vec3<i32>":`\n dataInt32[offset] = v[0];\n dataInt32[offset + 1] = v[1];\n dataInt32[offset + 2] = v[2];`,"vec4<i32>":`\n dataInt32[offset] = v[0];\n dataInt32[offset + 1] = v[1];\n dataInt32[offset + 2] = v[2];\n dataInt32[offset + 3] = v[3];`,"mat2x2<f32>":`\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 4] = v[2];\n data[offset + 5] = v[3];`,"mat3x3<f32>":`\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 4] = v[3];\n data[offset + 5] = v[4];\n data[offset + 6] = v[5];\n data[offset + 8] = v[6];\n data[offset + 9] = v[7];\n data[offset + 10] = v[8];`,"mat4x4<f32>":`\n for (let i = 0; i < 16; i++) {\n data[offset + i] = v[i];\n }`,"mat3x2<f32>":us(3,2),"mat4x2<f32>":us(4,2),"mat2x3<f32>":us(2,3),"mat4x3<f32>":us(4,3),"mat2x4<f32>":us(2,4),"mat3x4<f32>":us(3,4)},fT={...Pf,"mat2x2<f32>":`\n data[offset] = v[0];\n data[offset + 1] = v[1];\n data[offset + 2] = v[2];\n data[offset + 3] = v[3];\n `}});function dT(r,t){let{size:e,align:i}=Jn[r.data.type],s=(i-e)/4,n=r.data.type.indexOf("i32")>=0?"dataInt32":"data";return`\n v = uv.${r.data.name};\n ${t!==0?`offset += ${t};`:""}\n\n arrayOffset = offset;\n\n t = 0;\n\n for(var i=0; i < ${r.data.size*(e/4)}; i++)\n {\n for(var j = 0; j < ${e/4}; j++)\n {\n ${n}[arrayOffset++] = v[t++];\n }\n ${s!==0?`arrayOffset += ${s};`:""}\n }\n `}var pT=p(()=>{Cf()});function mT(r){return Fu(r,"uboWgsl",dT,fT)}var gT=p(()=>{Df();Bf();pT()});var to,xT=p(()=>{D();Ef();Cf();gT();to=class extends as{constructor(){super({createUboElements:hT,generateUboSync:mT})}};to.extension={type:[b.WebGPUSystem],name:"ubo"}});var kr,Ru=p(()=>{Xt();jt();kr=class extends ht{constructor({buffer:t,offset:e,size:i}){super(),this.uid=rt("buffer"),this._resourceType="bufferResource",this._touched=0,this._resourceId=rt("resource"),this._bufferResource=!0,this.destroyed=!1,this.buffer=t,this.offset=e|0,this.size=i,this.buffer.on("change",this.onBufferChange,this)}onBufferChange(){this._resourceId=rt("resource"),this.emit("change",this)}destroy(t=!1){this.destroyed=!0,t&&this.buffer.destroy(),this.emit("change",this),this.buffer=null}}});var ku,_T=p(()=>{"use strict";ku=class{constructor({minUniformOffsetAlignment:t}){this._minUniformOffsetAlignment=256,this.byteIndex=0,this._minUniformOffsetAlignment=t,this.data=new Float32Array(65535)}clear(){this.byteIndex=0}addEmptyGroup(t){if(t>this._minUniformOffsetAlignment/4)throw new Error(`UniformBufferBatch: array is too large: ${t*4}`);let e=this.byteIndex,i=e+t*4;if(i=Math.ceil(i/this._minUniformOffsetAlignment)*this._minUniformOffsetAlignment,i>this.data.length*4)throw new Error("UniformBufferBatch: ubo batch got too big");return this.byteIndex=i,e}addGroup(t){let e=this.addEmptyGroup(t.length);for(let i=0;i<t.length;i++)this.data[e/4+i]=t[i];return e}destroy(){this.data=null}}});var Gr,eo,yT=p(()=>{D();Er();Ru();ur();_T();wr();Gr=128,eo=class{constructor(t){this._bindGroupHash=Object.create(null),this._buffers=[],this._bindGroups=[],this._bufferResources=[],this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_bindGroupHash"),this._batchBuffer=new ku({minUniformOffsetAlignment:Gr});let e=256/Gr;for(let i=0;i<e;i++){let s=J.UNIFORM|J.COPY_DST;i===0&&(s|=J.COPY_SRC),this._buffers.push(new Tt({data:this._batchBuffer.data,usage:s}))}}renderEnd(){this._uploadBindGroups(),this._resetBindGroups()}_resetBindGroups(){for(let t in this._bindGroupHash)this._bindGroupHash[t]=null;this._batchBuffer.clear()}getUniformBindGroup(t,e){if(!e&&this._bindGroupHash[t.uid])return this._bindGroupHash[t.uid];this._renderer.ubo.ensureUniformGroup(t);let i=t.buffer.data,s=this._batchBuffer.addEmptyGroup(i.length);return this._renderer.ubo.syncUniformGroup(t,this._batchBuffer.data,s/4),this._bindGroupHash[t.uid]=this._getBindGroup(s/Gr),this._bindGroupHash[t.uid]}getUboResource(t){this._renderer.ubo.updateUniformGroup(t);let e=t.buffer.data,i=this._batchBuffer.addGroup(e);return this._getBufferResource(i/Gr)}getArrayBindGroup(t){let e=this._batchBuffer.addGroup(t);return this._getBindGroup(e/Gr)}getArrayBufferResource(t){let i=this._batchBuffer.addGroup(t)/Gr;return this._getBufferResource(i)}_getBufferResource(t){if(!this._bufferResources[t]){let e=this._buffers[t%2];this._bufferResources[t]=new kr({buffer:e,offset:(t/2|0)*256,size:Gr})}return this._bufferResources[t]}_getBindGroup(t){if(!this._bindGroups[t]){let e=new It({0:this._getBufferResource(t)});this._bindGroups[t]=e}return this._bindGroups[t]}_uploadBindGroups(){let t=this._renderer.buffer,e=this._buffers[0];e.update(this._batchBuffer.byteIndex),t.updateBuffer(e);let i=this._renderer.gpu.device.createCommandEncoder();for(let s=1;s<this._buffers.length;s++){let n=this._buffers[s];i.copyBufferToBuffer(t.getGPUBuffer(e),Gr,t.getGPUBuffer(n),0,this._batchBuffer.byteIndex)}this._renderer.gpu.device.queue.submit([i.finish()])}destroy(){for(let t=0;t<this._bindGroups.length;t++)this._bindGroups[t].destroy();this._bindGroups=null,this._bindGroupHash=null;for(let t=0;t<this._buffers.length;t++)this._buffers[t].destroy();this._buffers=null;for(let t=0;t<this._bufferResources.length;t++)this._bufferResources[t].destroy();this._bufferResources=null,this._batchBuffer.destroy(),this._bindGroupHash=null,this._renderer=null}};eo.extension={type:[b.WebGPUPipes],name:"uniformBatch"}});function Gu(r,t){for(let e in r.attributes){let i=r.attributes[e],s=t[e];s?(i.format??(i.format=s.format),i.offset??(i.offset=s.offset),i.instance??(i.instance=s.instance)):z(`Attribute ${e} is not present in the shader, but is present in the geometry. Unable to infer attribute details.`)}gD(r)}function gD(r){let{buffers:t,attributes:e}=r,i={},s={};for(let n in t){let o=t[n];i[o.uid]=0,s[o.uid]=0}for(let n in e){let o=e[n];i[o.buffer.uid]+=ae(o.format).stride}for(let n in e){let o=e[n];o.stride??(o.stride=i[o.buffer.uid]),o.start??(o.start=s[o.buffer.uid]),s[o.buffer.uid]+=ae(o.format).stride}}var Mf=p(()=>{gt();ii()});var Ye,Ff=p(()=>{ei();Ye=[];Ye[pt.NONE]=void 0;Ye[pt.DISABLED]={stencilWriteMask:0,stencilReadMask:0};Ye[pt.RENDERING_MASK_ADD]={stencilFront:{compare:"equal",passOp:"increment-clamp"},stencilBack:{compare:"equal",passOp:"increment-clamp"}};Ye[pt.RENDERING_MASK_REMOVE]={stencilFront:{compare:"equal",passOp:"decrement-clamp"},stencilBack:{compare:"equal",passOp:"decrement-clamp"}};Ye[pt.MASK_ACTIVE]={stencilWriteMask:0,stencilFront:{compare:"equal",passOp:"keep"},stencilBack:{compare:"equal",passOp:"keep"}};Ye[pt.INVERSE_MASK_ACTIVE]={stencilWriteMask:0,stencilFront:{compare:"not-equal",passOp:"replace"},stencilBack:{compare:"not-equal",passOp:"replace"}}});function _D(r,t,e,i,s){return r<<24|t<<16|e<<10|i<<5|s}function yD(r,t,e,i){return e<<6|r<<3|i<<1|t}var xD,ro,bT=p(()=>{D();gt();Mf();ei();rn();Ff();xD={"point-list":0,"line-list":1,"line-strip":2,"triangle-list":3,"triangle-strip":4};ro=class{constructor(t){this._moduleCache=Object.create(null),this._bufferLayoutsCache=Object.create(null),this._bindingNamesCache=Object.create(null),this._pipeCache=Object.create(null),this._pipeStateCaches=Object.create(null),this._colorMask=15,this._multisampleCount=1,this._renderer=t}contextChange(t){this._gpu=t,this.setStencilMode(pt.DISABLED),this._updatePipeHash()}setMultisampleCount(t){this._multisampleCount!==t&&(this._multisampleCount=t,this._updatePipeHash())}setRenderTarget(t){this._multisampleCount=t.msaaSamples,this._depthStencilAttachment=t.descriptor.depthStencilAttachment?1:0,this._updatePipeHash()}setColorMask(t){this._colorMask!==t&&(this._colorMask=t,this._updatePipeHash())}setStencilMode(t){this._stencilMode!==t&&(this._stencilMode=t,this._stencilState=Ye[t],this._updatePipeHash())}setPipeline(t,e,i,s){let n=this.getPipeline(t,e,i);s.setPipeline(n)}getPipeline(t,e,i,s){t._layoutKey||(Gu(t,e.attributeData),this._generateBufferKey(t)),s||(s=t.topology);let n=_D(t._layoutKey,e._layoutKey,i.data,i._blendModeId,xD[s]);return this._pipeCache[n]?this._pipeCache[n]:(this._pipeCache[n]=this._createPipeline(t,e,i,s),this._pipeCache[n])}_createPipeline(t,e,i,s){let n=this._gpu.device,o=this._createVertexBufferLayouts(t,e),a=this._renderer.state.getColorTargets(i);a[0].writeMask=this._stencilMode===pt.RENDERING_MASK_ADD?0:this._colorMask;let u=this._renderer.shader.getProgramData(e).pipeline,l={vertex:{module:this._getModule(e.vertex.source),entryPoint:e.vertex.entryPoint,buffers:o},fragment:{module:this._getModule(e.fragment.source),entryPoint:e.fragment.entryPoint,targets:a},primitive:{topology:s,cullMode:i.cullMode},layout:u,multisample:{count:this._multisampleCount},label:"PIXI Pipeline"};return this._depthStencilAttachment&&(l.depthStencil={...this._stencilState,format:"depth24plus-stencil8",depthWriteEnabled:i.depthTest,depthCompare:i.depthTest?"less":"always"}),n.createRenderPipeline(l)}_getModule(t){return this._moduleCache[t]||this._createModule(t)}_createModule(t){let e=this._gpu.device;return this._moduleCache[t]=e.createShaderModule({code:t}),this._moduleCache[t]}_generateBufferKey(t){let e=[],i=0,s=Object.keys(t.attributes).sort();for(let o=0;o<s.length;o++){let a=t.attributes[s[o]];e[i++]=a.offset,e[i++]=a.format,e[i++]=a.stride,e[i++]=a.instance}let n=e.join("|");return t._layoutKey=lr(n,"geometry"),t._layoutKey}_generateAttributeLocationsKey(t){let e=[],i=0,s=Object.keys(t.attributeData).sort();for(let o=0;o<s.length;o++){let a=t.attributeData[s[o]];e[i++]=a.location}let n=e.join("|");return t._attributeLocationsKey=lr(n,"programAttributes"),t._attributeLocationsKey}getBufferNamesToBind(t,e){let i=t._layoutKey<<16|e._attributeLocationsKey;if(this._bindingNamesCache[i])return this._bindingNamesCache[i];let s=this._createVertexBufferLayouts(t,e),n=Object.create(null),o=e.attributeData;for(let a=0;a<s.length;a++){let l=Object.values(s[a].attributes)[0].shaderLocation;for(let c in o)if(o[c].location===l){n[a]=c;break}}return this._bindingNamesCache[i]=n,n}_createVertexBufferLayouts(t,e){e._attributeLocationsKey||this._generateAttributeLocationsKey(e);let i=t._layoutKey<<16|e._attributeLocationsKey;if(this._bufferLayoutsCache[i])return this._bufferLayoutsCache[i];let s=[];return t.buffers.forEach(n=>{let o={arrayStride:0,stepMode:"vertex",attributes:[]},a=o.attributes;for(let u in e.attributeData){let l=t.attributes[u];(l.divisor??1)!==1&&z(`Attribute ${u} has an invalid divisor value of \'${l.divisor}\'. WebGPU only supports a divisor value of 1`),l.buffer===n&&(o.arrayStride=l.stride,o.stepMode=l.instance?"instance":"vertex",a.push({shaderLocation:e.attributeData[u].location,offset:l.offset,format:l.format}))}a.length&&s.push(o)}),this._bufferLayoutsCache[i]=s,s}_updatePipeHash(){let t=yD(this._stencilMode,this._multisampleCount,this._colorMask,this._depthStencilAttachment);this._pipeStateCaches[t]||(this._pipeStateCaches[t]=Object.create(null)),this._pipeCache=this._pipeStateCaches[t]}destroy(){this._renderer=null,this._bufferLayoutsCache=null}};ro.extension={type:[b.WebGPUSystem],name:"pipeline"}});function vT(r,t,e,i,s,n){let o=n?1:-1;return r.identity(),r.a=1/i*2,r.d=o*(1/s*2),r.tx=-1-t*r.a,r.ty=-o-e*r.d,r}var TT=p(()=>{"use strict"});function ST(r){let t=r.colorTexture.source.resource;return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement&&document.body.contains(t)}var wT=p(()=>{"use strict"});var ls,Rf=p(()=>{ot();Yt();es();TT();nf();Ai();ne();dt();Tf();wT();vf();ls=class{constructor(t){this.rootViewPort=new tt,this.viewport=new tt,this.onRenderTargetChange=new rs("onRenderTargetChange"),this.projectionMatrix=new G,this.defaultClearColor=[0,0,0,0],this._renderSurfaceToRenderTargetHash=new Map,this._gpuRenderTargetHash=Object.create(null),this._renderTargetStack=[],this._renderer=t,t.renderableGC.addManagedHash(this,"_gpuRenderTargetHash")}finishRenderPass(){this.adaptor.finishRenderPass(this.renderTarget)}renderStart({target:t,clear:e,clearColor:i,frame:s}){this._renderTargetStack.length=0,this.push(t,e,i,s),this.rootViewPort.copyFrom(this.viewport),this.rootRenderTarget=this.renderTarget,this.renderingToScreen=ST(this.rootRenderTarget),this.adaptor.prerender?.(this.rootRenderTarget)}postrender(){this.adaptor.postrender?.(this.rootRenderTarget)}bind(t,e=!0,i,s){let n=this.getRenderTarget(t),o=this.renderTarget!==n;this.renderTarget=n,this.renderSurface=t;let a=this.getGpuRenderTarget(n);(n.pixelWidth!==a.width||n.pixelHeight!==a.height)&&(this.adaptor.resizeGpuRenderTarget(n),a.width=n.pixelWidth,a.height=n.pixelHeight);let u=n.colorTexture,l=this.viewport,c=u.pixelWidth,h=u.pixelHeight;if(!s&&t instanceof I&&(s=t.frame),s){let d=u._resolution;l.x=s.x*d+.5|0,l.y=s.y*d+.5|0,l.width=s.width*d+.5|0,l.height=s.height*d+.5|0}else l.x=0,l.y=0,l.width=c,l.height=h;return vT(this.projectionMatrix,0,0,l.width/u.resolution,l.height/u.resolution,!n.isRoot),this.adaptor.startRenderPass(n,e,i,l),o&&this.onRenderTargetChange.emit(n),n}clear(t,e=Ot.ALL,i){e&&(t&&(t=this.getRenderTarget(t)),this.adaptor.clear(t||this.renderTarget,e,i,this.viewport))}contextChange(){this._gpuRenderTargetHash=Object.create(null)}push(t,e=Ot.ALL,i,s){let n=this.bind(t,e,i,s);return this._renderTargetStack.push({renderTarget:n,frame:s}),n}pop(){this._renderTargetStack.pop();let t=this._renderTargetStack[this._renderTargetStack.length-1];this.bind(t.renderTarget,!1,null,t.frame)}getRenderTarget(t){return t.isTexture&&(t=t.source),this._renderSurfaceToRenderTargetHash.get(t)??this._initRenderTarget(t)}copyToTexture(t,e,i,s,n){i.x<0&&(s.width+=i.x,n.x-=i.x,i.x=0),i.y<0&&(s.height+=i.y,n.y-=i.y,i.y=0);let{pixelWidth:o,pixelHeight:a}=t;return s.width=Math.min(s.width,o-i.x),s.height=Math.min(s.height,a-i.y),this.adaptor.copyToTexture(t,e,i,s,n)}ensureDepthStencil(){this.renderTarget.stencil||(this.renderTarget.stencil=!0,this.adaptor.startRenderPass(this.renderTarget,!1,null,this.viewport))}destroy(){this._renderer=null,this._renderSurfaceToRenderTargetHash.forEach((t,e)=>{t!==e&&t.destroy()}),this._renderSurfaceToRenderTargetHash.clear(),this._gpuRenderTargetHash=Object.create(null)}_initRenderTarget(t){let e=null;return te.test(t)&&(t=Pu(t).source),t instanceof $n?e=t:t instanceof ut&&(e=new $n({colorTextures:[t]}),te.test(t.source.resource)&&(e.isRoot=!0),t.once("destroy",()=>{e.destroy(),this._renderSurfaceToRenderTargetHash.delete(t);let i=this._gpuRenderTargetHash[e.uid];i&&(this._gpuRenderTargetHash[e.uid]=null,this.adaptor.destroyGpuRenderTarget(i))})),this._renderSurfaceToRenderTargetHash.set(t,e),e}getGpuRenderTarget(t){return this._gpuRenderTargetHash[t.uid]||(this._gpuRenderTargetHash[t.uid]=this.adaptor.initGpuRenderTarget(t))}}});var Iu,ET=p(()=>{"use strict";Iu=class{constructor(){this.contexts=[],this.msaaTextures=[],this.msaaSamples=1}}});var Uu,CT=p(()=>{es();Ai();ne();ET();Uu=class{init(t,e){this._renderer=t,this._renderTargetSystem=e}copyToTexture(t,e,i,s,n){let o=this._renderer,a=this._getGpuColorTexture(t),u=o.texture.getGpuSource(e.source);return o.encoder.commandEncoder.copyTextureToTexture({texture:a,origin:i},{texture:u,origin:n},s),e}startRenderPass(t,e=!0,i,s){let o=this._renderTargetSystem.getGpuRenderTarget(t),a=this.getDescriptor(t,e,i);o.descriptor=a,this._renderer.pipeline.setRenderTarget(o),this._renderer.encoder.beginRenderPass(o),this._renderer.encoder.setViewport(s)}finishRenderPass(){this._renderer.encoder.endRenderPass()}_getGpuColorTexture(t){let e=this._renderTargetSystem.getGpuRenderTarget(t);return e.contexts[0]?e.contexts[0].getCurrentTexture():this._renderer.texture.getGpuSource(t.colorTextures[0].source)}getDescriptor(t,e,i){typeof e=="boolean"&&(e=e?Ot.ALL:Ot.NONE);let s=this._renderTargetSystem,n=s.getGpuRenderTarget(t),o=t.colorTextures.map((l,c)=>{let h=n.contexts[c],d,f;h?d=h.getCurrentTexture().createView():d=this._renderer.texture.getGpuSource(l).createView({mipLevelCount:1}),n.msaaTextures[c]&&(f=d,d=this._renderer.texture.getTextureView(n.msaaTextures[c]));let m=e&Ot.COLOR?"clear":"load";return i??(i=s.defaultClearColor),{view:d,resolveTarget:f,clearValue:i,storeOp:"store",loadOp:m}}),a;if((t.stencil||t.depth)&&!t.depthStencilTexture&&(t.ensureDepthStencilTexture(),t.depthStencilTexture.source.sampleCount=n.msaa?4:1),t.depthStencilTexture){let l=e&Ot.STENCIL?"clear":"load",c=e&Ot.DEPTH?"clear":"load";a={view:this._renderer.texture.getGpuSource(t.depthStencilTexture.source).createView(),stencilStoreOp:"store",stencilLoadOp:l,depthClearValue:1,depthLoadOp:c,depthStoreOp:"store"}}return{colorAttachments:o,depthStencilAttachment:a}}clear(t,e=!0,i,s){if(!e)return;let{gpu:n,encoder:o}=this._renderer,a=n.device;if(o.commandEncoder===null){let l=a.createCommandEncoder(),c=this.getDescriptor(t,e,i),h=l.beginRenderPass(c);h.setViewport(s.x,s.y,s.width,s.height,0,1),h.end();let d=l.finish();a.queue.submit([d])}else this.startRenderPass(t,e,i,s)}initGpuRenderTarget(t){t.isRoot=!0;let e=new Iu;return t.colorTextures.forEach((i,s)=>{if(te.test(i.resource)){let n=i.resource.getContext("webgpu"),o=i.transparent?"premultiplied":"opaque";try{n.configure({device:this._renderer.gpu.device,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC,format:"bgra8unorm",alphaMode:o})}catch(a){console.error(a)}e.contexts[s]=n}if(e.msaa=i.source.antialias,i.source.antialias){let n=new ut({width:0,height:0,sampleCount:4});e.msaaTextures[s]=n}}),e.msaa&&(e.msaaSamples=4,t.depthStencilTexture&&(t.depthStencilTexture.source.sampleCount=4)),e}destroyGpuRenderTarget(t){t.contexts.forEach(e=>{e.unconfigure()}),t.msaaTextures.forEach(e=>{e.destroy()}),t.msaaTextures.length=0,t.contexts.length=0}ensureDepthStencilTexture(t){let e=this._renderTargetSystem.getGpuRenderTarget(t);t.depthStencilTexture&&e.msaa&&(t.depthStencilTexture.source.sampleCount=4)}resizeGpuRenderTarget(t){let e=this._renderTargetSystem.getGpuRenderTarget(t);e.width=t.width,e.height=t.height,e.msaa&&t.colorTextures.forEach((i,s)=>{e.msaaTextures[s]?.resize(i.source.width,i.source.height,i.source._resolution)})}}});var io,AT=p(()=>{D();Rf();CT();io=class extends ls{constructor(t){super(t),this.adaptor=new Uu,this.adaptor.init(t,this)}};io.extension={type:[b.WebGPUSystem],name:"renderTarget"}});var so,DT=p(()=>{D();so=class{constructor(){this._gpuProgramData=Object.create(null)}contextChange(t){this._gpu=t,this.maxTextures=t.device.limits.maxSampledTexturesPerShaderStage}getProgramData(t){return this._gpuProgramData[t._layoutKey]||this._createGPUProgramData(t)}_createGPUProgramData(t){let e=this._gpu.device,i=t.gpuLayout.map(n=>e.createBindGroupLayout({entries:n})),s={bindGroupLayouts:i};return this._gpuProgramData[t._layoutKey]={bindGroups:i,pipeline:e.createPipelineLayout(s)},this._gpuProgramData[t._layoutKey]}destroy(){this._gpu=null,this._gpuProgramData=null}};so.extension={type:[b.WebGPUSystem],name:"shader"}});var re,PT=p(()=>{"use strict";re={};re.normal={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}};re.add={alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one",operation:"add"}};re.multiply={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"dst",dstFactor:"one-minus-src-alpha",operation:"add"}};re.screen={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src",operation:"add"}};re.overlay={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"one",dstFactor:"one-minus-src",operation:"add"}};re.none={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"zero",dstFactor:"zero",operation:"add"}};re["normal-npm"]={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"}};re["add-npm"]={alpha:{srcFactor:"one",dstFactor:"one",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one",operation:"add"}};re["screen-npm"]={alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"src-alpha",dstFactor:"one-minus-src",operation:"add"}};re.erase={alpha:{srcFactor:"zero",dstFactor:"one-minus-src-alpha",operation:"add"},color:{srcFactor:"zero",dstFactor:"one-minus-src",operation:"add"}};re.min={alpha:{srcFactor:"one",dstFactor:"one",operation:"min"},color:{srcFactor:"one",dstFactor:"one",operation:"min"}};re.max={alpha:{srcFactor:"one",dstFactor:"one",operation:"max"},color:{srcFactor:"one",dstFactor:"one",operation:"max"}}});var no,BT=p(()=>{D();Me();PT();no=class{constructor(){this.defaultState=new Ct,this.defaultState.blend=!0}contextChange(t){this.gpu=t}getColorTargets(t){return[{format:"bgra8unorm",writeMask:0,blend:re[t.blendMode]||re.normal}]}destroy(){this.gpu=null}};no.extension={type:[b.WebGPUSystem],name:"state"}});var MT,FT=p(()=>{"use strict";MT={type:"image",upload(r,t,e){let i=r.resource,s=(r.pixelWidth|0)*(r.pixelHeight|0),n=i.byteLength/s;e.device.queue.writeTexture({texture:t},i,{offset:0,rowsPerImage:r.pixelHeight,bytesPerRow:r.pixelHeight*n},{width:r.pixelWidth,height:r.pixelHeight,depthOrArrayLayers:1})}}});var kf,bD,RT,kT=p(()=>{"use strict";kf={"bc1-rgba-unorm":{blockBytes:8,blockWidth:4,blockHeight:4},"bc2-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"bc3-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"bc7-rgba-unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"etc1-rgb-unorm":{blockBytes:8,blockWidth:4,blockHeight:4},"etc2-rgba8unorm":{blockBytes:16,blockWidth:4,blockHeight:4},"astc-4x4-unorm":{blockBytes:16,blockWidth:4,blockHeight:4}},bD={blockBytes:4,blockWidth:1,blockHeight:1},RT={type:"compressed",upload(r,t,e){let i=r.pixelWidth,s=r.pixelHeight,n=kf[r.format]||bD;for(let o=0;o<r.resource.length;o++){let a=r.resource[o],u=Math.ceil(i/n.blockWidth)*n.blockBytes;e.device.queue.writeTexture({texture:t,mipLevel:o},a,{offset:0,bytesPerRow:u},{width:Math.ceil(i/n.blockWidth)*n.blockWidth,height:Math.ceil(s/n.blockHeight)*n.blockHeight,depthOrArrayLayers:1}),i=Math.max(i>>1,1),s=Math.max(s>>1,1)}}}});var Ou,Gf=p(()=>{"use strict";Ou={type:"image",upload(r,t,e){let i=r.resource;if(!i)return;let s=Math.min(t.width,r.resourceWidth||r.pixelWidth),n=Math.min(t.height,r.resourceHeight||r.pixelHeight),o=r.alphaMode==="premultiply-alpha-on-upload";e.device.queue.copyExternalImageToTexture({source:i},{texture:t,premultipliedAlpha:o},{width:s,height:n})}}});var GT,IT=p(()=>{Gf();GT={type:"video",upload(r,t,e){Ou.upload(r,t,e)}}});var Lu,UT=p(()=>{"use strict";Lu=class{constructor(t){this.device=t,this.sampler=t.createSampler({minFilter:"linear"}),this.pipelines={}}_getMipmapPipeline(t){let e=this.pipelines[t];return e||(this.mipmapShaderModule||(this.mipmapShaderModule=this.device.createShaderModule({code:`\n var<private> pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>(\n vec2<f32>(-1.0, -1.0), vec2<f32>(-1.0, 3.0), vec2<f32>(3.0, -1.0));\n\n struct VertexOutput {\n @builtin(position) position : vec4<f32>,\n @location(0) texCoord : vec2<f32>,\n };\n\n @vertex\n fn vertexMain(@builtin(vertex_index) vertexIndex : u32) -> VertexOutput {\n var output : VertexOutput;\n output.texCoord = pos[vertexIndex] * vec2<f32>(0.5, -0.5) + vec2<f32>(0.5);\n output.position = vec4<f32>(pos[vertexIndex], 0.0, 1.0);\n return output;\n }\n\n @group(0) @binding(0) var imgSampler : sampler;\n @group(0) @binding(1) var img : texture_2d<f32>;\n\n @fragment\n fn fragmentMain(@location(0) texCoord : vec2<f32>) -> @location(0) vec4<f32> {\n return textureSample(img, imgSampler, texCoord);\n }\n `})),e=this.device.createRenderPipeline({layout:"auto",vertex:{module:this.mipmapShaderModule,entryPoint:"vertexMain"},fragment:{module:this.mipmapShaderModule,entryPoint:"fragmentMain",targets:[{format:t}]}}),this.pipelines[t]=e),e}generateMipmap(t){let e=this._getMipmapPipeline(t.format);if(t.dimension==="3d"||t.dimension==="1d")throw new Error("Generating mipmaps for non-2d textures is currently unsupported!");let i=t,s=t.depthOrArrayLayers||1,n=t.usage&GPUTextureUsage.RENDER_ATTACHMENT;if(!n){let u={size:{width:Math.ceil(t.width/2),height:Math.ceil(t.height/2),depthOrArrayLayers:s},format:t.format,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC|GPUTextureUsage.RENDER_ATTACHMENT,mipLevelCount:t.mipLevelCount-1};i=this.device.createTexture(u)}let o=this.device.createCommandEncoder({}),a=e.getBindGroupLayout(0);for(let u=0;u<s;++u){let l=t.createView({baseMipLevel:0,mipLevelCount:1,dimension:"2d",baseArrayLayer:u,arrayLayerCount:1}),c=n?1:0;for(let h=1;h<t.mipLevelCount;++h){let d=i.createView({baseMipLevel:c++,mipLevelCount:1,dimension:"2d",baseArrayLayer:u,arrayLayerCount:1}),f=o.beginRenderPass({colorAttachments:[{view:d,storeOp:"store",loadOp:"clear",clearValue:{r:0,g:0,b:0,a:0}}]}),m=this.device.createBindGroup({layout:a,entries:[{binding:0,resource:this.sampler},{binding:1,resource:l}]});f.setPipeline(e),f.setBindGroup(0,m),f.draw(3,1,0,0),f.end(),l=d}}if(!n){let u={width:Math.ceil(t.width/2),height:Math.ceil(t.height/2),depthOrArrayLayers:s};for(let l=1;l<t.mipLevelCount;++l)o.copyTextureToTexture({texture:i,mipLevel:l-1},{texture:t,mipLevel:l},u),u.width=Math.ceil(u.width/2),u.height=Math.ceil(u.height/2)}return this.device.queue.submit([o.finish()]),n||i.destroy(),t}}});var oo,OT=p(()=>{Pt();D();ee();Wi();wr();FT();kT();Gf();IT();UT();oo=class{constructor(t){this.managedTextures=[],this._gpuSources=Object.create(null),this._gpuSamplers=Object.create(null),this._bindGroupHash=Object.create(null),this._textureViewHash=Object.create(null),this._uploads={image:Ou,buffer:MT,video:GT,compressed:RT},this._renderer=t,t.renderableGC.addManagedHash(this,"_gpuSources"),t.renderableGC.addManagedHash(this,"_gpuSamplers"),t.renderableGC.addManagedHash(this,"_bindGroupHash"),t.renderableGC.addManagedHash(this,"_textureViewHash")}contextChange(t){this._gpu=t}initSource(t){if(t.autoGenerateMipmaps){let u=Math.max(t.pixelWidth,t.pixelHeight);t.mipLevelCount=Math.floor(Math.log2(u))+1}let e=GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST;t.uploadMethodId!=="compressed"&&(e|=GPUTextureUsage.RENDER_ATTACHMENT,e|=GPUTextureUsage.COPY_SRC);let i=kf[t.format]||{blockBytes:4,blockWidth:1,blockHeight:1},s=Math.ceil(t.pixelWidth/i.blockWidth)*i.blockWidth,n=Math.ceil(t.pixelHeight/i.blockHeight)*i.blockHeight,o={label:t.label,size:{width:s,height:n},format:t.format,sampleCount:t.sampleCount,mipLevelCount:t.mipLevelCount,dimension:t.dimension,usage:e},a=this._gpu.device.createTexture(o);return this._gpuSources[t.uid]=a,this.managedTextures.includes(t)||(t.on("update",this.onSourceUpdate,this),t.on("resize",this.onSourceResize,this),t.on("destroy",this.onSourceDestroy,this),t.on("unload",this.onSourceUnload,this),t.on("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.push(t)),this.onSourceUpdate(t),a}onSourceUpdate(t){let e=this.getGpuSource(t);e&&(this._uploads[t.uploadMethodId]&&this._uploads[t.uploadMethodId].upload(t,e,this._gpu),t.autoGenerateMipmaps&&t.mipLevelCount>1&&this.onUpdateMipmaps(t))}onSourceUnload(t){let e=this._gpuSources[t.uid];e&&(this._gpuSources[t.uid]=null,e.destroy())}onUpdateMipmaps(t){this._mipmapGenerator||(this._mipmapGenerator=new Lu(this._gpu.device));let e=this.getGpuSource(t);this._mipmapGenerator.generateMipmap(e)}onSourceDestroy(t){t.off("update",this.onSourceUpdate,this),t.off("unload",this.onSourceUnload,this),t.off("destroy",this.onSourceDestroy,this),t.off("resize",this.onSourceResize,this),t.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(t),1),this.onSourceUnload(t)}onSourceResize(t){let e=this._gpuSources[t.uid];e?(e.width!==t.pixelWidth||e.height!==t.pixelHeight)&&(this._textureViewHash[t.uid]=null,this._bindGroupHash[t.uid]=null,this.onSourceUnload(t),this.initSource(t)):this.initSource(t)}_initSampler(t){return this._gpuSamplers[t._resourceId]=this._gpu.device.createSampler(t),this._gpuSamplers[t._resourceId]}getGpuSampler(t){return this._gpuSamplers[t._resourceId]||this._initSampler(t)}getGpuSource(t){return this._gpuSources[t.uid]||this.initSource(t)}getTextureBindGroup(t){return this._bindGroupHash[t.uid]??this._createTextureBindGroup(t)}_createTextureBindGroup(t){let e=t.source;return this._bindGroupHash[t.uid]=new It({0:e,1:e.style,2:new ct({uTextureMatrix:{type:"mat3x3<f32>",value:t.textureMatrix.mapCoord}})}),this._bindGroupHash[t.uid]}getTextureView(t){let e=t.source;return this._textureViewHash[e.uid]??this._createTextureView(e)}_createTextureView(t){return this._textureViewHash[t.uid]=this.getGpuSource(t).createView(),this._textureViewHash[t.uid]}generateCanvas(t){let e=this._renderer,i=e.gpu.device.createCommandEncoder(),s=Q.get().createCanvas();s.width=t.source.pixelWidth,s.height=t.source.pixelHeight;let n=s.getContext("webgpu");return n.configure({device:e.gpu.device,usage:GPUTextureUsage.COPY_DST|GPUTextureUsage.COPY_SRC,format:Q.get().getNavigator().gpu.getPreferredCanvasFormat(),alphaMode:"premultiplied"}),i.copyTextureToTexture({texture:e.texture.getGpuSource(t.source),origin:{x:0,y:0}},{texture:n.getCurrentTexture()},{width:s.width,height:s.height}),e.gpu.device.queue.submit([i.finish()]),s}getPixels(t){let e=this.generateCanvas(t),i=ue.getOptimalCanvasAndContext(e.width,e.height),s=i.context;s.drawImage(e,0,0);let{width:n,height:o}=e,a=s.getImageData(0,0,n,o),u=new Uint8ClampedArray(a.data.buffer);return ue.returnCanvasAndContext(i),{pixels:u,width:n,height:o}}destroy(){this.managedTextures.slice().forEach(t=>this.onSourceDestroy(t)),this.managedTextures=null;for(let t of Object.keys(this._bindGroupHash)){let e=Number(t);this._bindGroupHash[e]?.destroy(),this._bindGroupHash[e]=null}this._gpu=null,this._mipmapGenerator=null,this._gpuSources=null,this._bindGroupHash=null,this._textureViewHash=null,this._gpuSamplers=null}};oo.extension={type:[b.WebGPUSystem],name:"texture"}});var zT={};sd(zT,{WebGPURenderer:()=>If});var vD,TD,SD,LT,NT,HT,If,WT=p(()=>{D();rv();nv();ov();Cn();wf();Ve();nT();oT();aT();uT();lT();cT();xT();yT();bT();AT();DT();BT();OT();vD=[...Bu,to,Zn,os,Kn,oo,io,so,no,ro,qn,Qn,Yn],TD=[...Mu,eo],SD=[Pn,Dn,An],LT=[],NT=[],HT=[];H.handleByNamedList(b.WebGPUSystem,LT);H.handleByNamedList(b.WebGPUPipes,NT);H.handleByNamedList(b.WebGPUPipesAdaptor,HT);H.add(...vD,...TD,...SD);If=class extends Rr{constructor(){let t={name:"webgpu",type:Mt.WEBGPU,systems:LT,renderPipes:NT,renderPipeAdaptors:HT};super(t)}}});var ao,VT=p(()=>{D();ot();ti();Ar();sn();nn();ts();Dr();Oa();Be();ee();ao=class{init(){let t=new ct({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uTransformMatrix:{value:new G,type:"mat3x3<f32>"},uRound:{value:0,type:"f32"}}),e=_e(),i=He({name:"graphics",bits:[ki,Ii(e),Ji,We]});this.shader=new St({glProgram:i,resources:{localUniforms:t,batchSamplers:Ui(e)}})}execute(t,e){let i=e.context,s=i.customShader||this.shader,n=t.renderer,o=n.graphicsContext,{batcher:a,instructions:u}=o.getContextRenderData(i);s.groups[0]=n.globalUniforms.bindGroup,n.state.set(t.state),n.shader.bind(s),n.geometry.bind(a.geometry,s.glProgram);let l=u.instructions;for(let c=0;c<u.instructionSize;c++){let h=l[c];if(h.size){for(let d=0;d<h.textures.count;d++)n.texture.bind(h.textures.textures[d],d);n.geometry.draw(h.topology,h.size,h.start)}}}destroy(){this.shader.destroy(!0),this.shader=null}};ao.extension={type:[b.WebGLPipesAdaptor],name:"graphics"}});var uo,XT=p(()=>{D();ot();Ar();ts();Dr();of();Be();dt();gt();uo=class{init(){let t=He({name:"mesh",bits:[Ji,sv,We]});this._shader=new St({glProgram:t,resources:{uTexture:I.EMPTY.source,textureUniforms:{uTextureMatrix:{type:"mat3x3<f32>",value:new G}}}})}execute(t,e){let i=t.renderer,s=e._shader;if(s){if(!s.glProgram){z("Mesh shader has no glProgram",e.shader);return}}else{s=this._shader;let n=e.texture,o=n.source;s.resources.uTexture=o,s.resources.uSampler=o.style,s.resources.textureUniforms.uniforms.uTextureMatrix=n.textureMatrix.mapCoord}s.groups[100]=i.globalUniforms.bindGroup,s.groups[101]=t.localUniformsBindGroup,i.encoder.draw({geometry:e._geometry,shader:s,state:e.state})}destroy(){this._shader.destroy(!0),this._shader=null}};uo.extension={type:[b.WebGLPipesAdaptor],name:"mesh"}});var lo,$T=p(()=>{D();Me();lo=class{constructor(){this._didUpload=!1,this._tempState=Ct.for2d()}init(t){t.renderer.runners.contextChange.add(this)}contextChange(){this._didUpload=!1}start(t,e,i){let s=t.renderer;s.shader.bind(i,this._didUpload),s.shader.updateUniformGroup(s.globalUniforms.uniformGroup),s.geometry.bind(e,i.glProgram)}execute(t,e){let i=t.renderer;this._didUpload=!0,this._tempState.blendMode=e.blendMode,i.state.set(this._tempState);let s=e.textures.textures;for(let n=0;n<e.textures.count;n++)i.texture.bind(s[n],n);i.geometry.draw(e.topology,e.size,e.start)}};lo.extension={type:[b.WebGLPipesAdaptor],name:"batch"}});var co,jT=p(()=>{"use strict";co=(r=>(r[r.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",r[r.ARRAY_BUFFER=34962]="ARRAY_BUFFER",r[r.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",r))(co||{})});var Nu,YT=p(()=>{"use strict";Nu=class{constructor(t,e){this._lastBindBaseLocation=-1,this._lastBindCallId=-1,this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.type=e}}});var ho,KT=p(()=>{D();ur();jT();YT();ho=class{constructor(t){this._gpuBuffers=Object.create(null),this._boundBufferBases=Object.create(null),this._minBaseLocation=0,this._nextBindBaseIndex=this._minBaseLocation,this._bindCallId=0,this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_gpuBuffers")}destroy(){this._renderer=null,this._gl=null,this._gpuBuffers=null,this._boundBufferBases=null}contextChange(){let t=this._gl=this._renderer.gl;this._gpuBuffers=Object.create(null),this._maxBindings=t.MAX_UNIFORM_BUFFER_BINDINGS?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0}getGlBuffer(t){return this._gpuBuffers[t.uid]||this.createGLBuffer(t)}bind(t){let{_gl:e}=this,i=this.getGlBuffer(t);e.bindBuffer(i.type,i.buffer)}bindBufferBase(t,e){let{_gl:i}=this;this._boundBufferBases[e]!==t&&(this._boundBufferBases[e]=t,t._lastBindBaseLocation=e,i.bindBufferBase(i.UNIFORM_BUFFER,e,t.buffer))}nextBindBase(t){this._bindCallId++,this._minBaseLocation=0,t&&(this._boundBufferBases[0]=null,this._minBaseLocation=1,this._nextBindBaseIndex<1&&(this._nextBindBaseIndex=1))}freeLocationForBufferBase(t){let e=this.getLastBindBaseLocation(t);if(e>=this._minBaseLocation)return t._lastBindCallId=this._bindCallId,e;let i=0,s=this._nextBindBaseIndex;for(;i<2;){s>=this._maxBindings&&(s=this._minBaseLocation,i++);let n=this._boundBufferBases[s];if(n&&n._lastBindCallId===this._bindCallId){s++;continue}break}return e=s,this._nextBindBaseIndex=s+1,i>=2?-1:(t._lastBindCallId=this._bindCallId,this._boundBufferBases[e]=null,e)}getLastBindBaseLocation(t){let e=t._lastBindBaseLocation;return this._boundBufferBases[e]===t?e:-1}bindBufferRange(t,e,i,s){let{_gl:n}=this;i||(i=0),e||(e=0),this._boundBufferBases[e]=null,n.bindBufferRange(n.UNIFORM_BUFFER,e||0,t.buffer,i*256,s||256)}updateBuffer(t){let{_gl:e}=this,i=this.getGlBuffer(t);if(t._updateID===i.updateID)return i;i.updateID=t._updateID,e.bindBuffer(i.type,i.buffer);let s=t.data,n=t.descriptor.usage&J.STATIC?e.STATIC_DRAW:e.DYNAMIC_DRAW;return s?i.byteLength>=s.byteLength?e.bufferSubData(i.type,0,s,0,t._updateSize/s.BYTES_PER_ELEMENT):(i.byteLength=s.byteLength,e.bufferData(i.type,s,n)):(i.byteLength=t.descriptor.size,e.bufferData(i.type,i.byteLength,n)),i}destroyAll(){let t=this._gl;for(let e in this._gpuBuffers)t.deleteBuffer(this._gpuBuffers[e].buffer);this._gpuBuffers=Object.create(null)}onBufferDestroy(t,e){let i=this._gpuBuffers[t.uid],s=this._gl;e||s.deleteBuffer(i.buffer),this._gpuBuffers[t.uid]=null}createGLBuffer(t){let{_gl:e}=this,i=co.ARRAY_BUFFER;t.descriptor.usage&J.INDEX?i=co.ELEMENT_ARRAY_BUFFER:t.descriptor.usage&J.UNIFORM&&(i=co.UNIFORM_BUFFER);let s=new Nu(e.createBuffer(),i);return this._gpuBuffers[t.uid]=s,t.on("destroy",this.onBufferDestroy,this),s}};ho.extension={type:[b.WebGLSystem],name:"buffer"}});var Uf,ZT,QT=p(()=>{Pt();D();gt();Uf=class qT{constructor(t){this.supports={uint32Indices:!0,uniformBufferObject:!0,vertexArrayObject:!0,srgbTextures:!0,nonPowOf2wrapping:!0,msaa:!0,nonPowOf2mipmaps:!0},this._renderer=t,this.extensions=Object.create(null),this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this._renderer.gl=t}init(t){t={...qT.defaultOptions,...t};let e=this.multiView=t.multiView;if(t.context&&e&&(z("Renderer created with both a context and multiview enabled. Disabling multiView as both cannot work together."),e=!1),e?this.canvas=Q.get().createCanvas(this._renderer.canvas.width,this._renderer.canvas.height):this.canvas=this._renderer.view.canvas,t.context)this.initFromContext(t.context);else{let i=this._renderer.background.alpha<1,s=t.premultipliedAlpha??!0,n=t.antialias&&!this._renderer.backBuffer.useBackBuffer;this.createContext(t.preferWebGLVersion,{alpha:i,premultipliedAlpha:s,antialias:n,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference??"default"})}}ensureCanvasSize(t){if(!this.multiView){t!==this.canvas&&z("multiView is disabled, but targetCanvas is not the main canvas");return}let{canvas:e}=this;(e.width<t.width||e.height<t.height)&&(e.width=Math.max(t.width,t.width),e.height=Math.max(t.height,t.height))}initFromContext(t){this.gl=t,this.webGLVersion=t instanceof Q.get().getWebGLRenderingContext()?1:2,this.getExtensions(),this.validateContext(t),this._renderer.runners.contextChange.emit(t);let e=this._renderer.view.canvas;e.addEventListener("webglcontextlost",this.handleContextLost,!1),e.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}createContext(t,e){let i,s=this.canvas;if(t===2&&(i=s.getContext("webgl2",e)),!i&&(i=s.getContext("webgl",e),!i))throw new Error("This browser does not support WebGL. Try using the canvas renderer");this.gl=i,this.initFromContext(this.gl)}getExtensions(){let{gl:t}=this,e={anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc"),bptc:t.getExtension("EXT_texture_compression_bptc"),rgtc:t.getExtension("EXT_texture_compression_rgtc"),loseContext:t.getExtension("WEBGL_lose_context")};if(this.webGLVersion===1)this.extensions={...e,drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear"),vertexAttribDivisorANGLE:t.getExtension("ANGLE_instanced_arrays"),srgb:t.getExtension("EXT_sRGB")};else{this.extensions={...e,colorBufferFloat:t.getExtension("EXT_color_buffer_float")};let i=t.getExtension("WEBGL_provoking_vertex");i&&i.provokingVertexWEBGL(i.FIRST_VERTEX_CONVENTION_WEBGL)}}handleContextLost(t){t.preventDefault(),this._contextLossForced&&(this._contextLossForced=!1,setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext?.restoreContext()},0))}handleContextRestored(){this._renderer.runners.contextChange.emit(this.gl)}destroy(){let t=this._renderer.view.canvas;this._renderer=null,t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext?.loseContext()}forceContextLoss(){this.extensions.loseContext?.loseContext(),this._contextLossForced=!0}validateContext(t){let e=t.getContextAttributes();e&&!e.stencil&&z("Provided WebGL context does not have a stencil buffer, masks may not render correctly");let i=this.supports,s=this.webGLVersion===2,n=this.extensions;i.uint32Indices=s||!!n.uint32ElementIndex,i.uniformBufferObject=s,i.vertexArrayObject=s||!!n.vertexArrayObject,i.srgbTextures=s||!!n.srgb,i.nonPowOf2wrapping=s,i.nonPowOf2mipmaps=s,i.msaa=s,i.uint32Indices||z("Provided WebGL context does not support 32 index buffer, large scenes may not render correctly")}};Uf.extension={type:[b.WebGLSystem],name:"context"};Uf.defaultOptions={context:null,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:void 0,preferWebGLVersion:2,multiView:!1};ZT=Uf});var Hu,Of,at,Lf=p(()=>{"use strict";Hu=(r=>(r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL",r))(Hu||{}),Of=(r=>(r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",r))(Of||{}),at=(r=>(r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT",r))(at||{})});function tS(r){return JT[r]??JT.float32}var JT,eS=p(()=>{Lf();JT={uint8x2:at.UNSIGNED_BYTE,uint8x4:at.UNSIGNED_BYTE,sint8x2:at.BYTE,sint8x4:at.BYTE,unorm8x2:at.UNSIGNED_BYTE,unorm8x4:at.UNSIGNED_BYTE,snorm8x2:at.BYTE,snorm8x4:at.BYTE,uint16x2:at.UNSIGNED_SHORT,uint16x4:at.UNSIGNED_SHORT,sint16x2:at.SHORT,sint16x4:at.SHORT,unorm16x2:at.UNSIGNED_SHORT,unorm16x4:at.UNSIGNED_SHORT,snorm16x2:at.SHORT,snorm16x4:at.SHORT,float16x2:at.HALF_FLOAT,float16x4:at.HALF_FLOAT,float32:at.FLOAT,float32x2:at.FLOAT,float32x3:at.FLOAT,float32x4:at.FLOAT,uint32:at.UNSIGNED_INT,uint32x2:at.UNSIGNED_INT,uint32x3:at.UNSIGNED_INT,uint32x4:at.UNSIGNED_INT,sint32:at.INT,sint32x2:at.INT,sint32x3:at.INT,sint32x4:at.INT}});var wD,fo,rS=p(()=>{D();ii();Mf();eS();wD={"point-list":0,"line-list":1,"line-strip":3,"triangle-list":4,"triangle-strip":5},fo=class{constructor(t){this._geometryVaoHash=Object.create(null),this._renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this._renderer.renderableGC.addManagedHash(this,"_geometryVaoHash")}contextChange(){let t=this.gl=this._renderer.gl;if(!this._renderer.context.supports.vertexArrayObject)throw new Error("[PixiJS] Vertex Array Objects are not supported on this device");let e=this._renderer.context.extensions.vertexArrayObject;e&&(t.createVertexArray=()=>e.createVertexArrayOES(),t.bindVertexArray=s=>e.bindVertexArrayOES(s),t.deleteVertexArray=s=>e.deleteVertexArrayOES(s));let i=this._renderer.context.extensions.vertexAttribDivisorANGLE;i&&(t.drawArraysInstanced=(s,n,o,a)=>{i.drawArraysInstancedANGLE(s,n,o,a)},t.drawElementsInstanced=(s,n,o,a,u)=>{i.drawElementsInstancedANGLE(s,n,o,a,u)},t.vertexAttribDivisor=(s,n)=>i.vertexAttribDivisorANGLE(s,n)),this._activeGeometry=null,this._activeVao=null,this._geometryVaoHash=Object.create(null)}bind(t,e){let i=this.gl;this._activeGeometry=t;let s=this.getVao(t,e);this._activeVao!==s&&(this._activeVao=s,i.bindVertexArray(s)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){let t=this._activeGeometry,e=this._renderer.buffer;for(let i=0;i<t.buffers.length;i++){let s=t.buffers[i];e.updateBuffer(s)}}checkCompatibility(t,e){let i=t.attributes,s=e._attributeData;for(let n in s)if(!i[n])throw new Error(`shader and geometry incompatible, geometry missing the "${n}" attribute`)}getSignature(t,e){let i=t.attributes,s=e._attributeData,n=["g",t.uid];for(let o in i)s[o]&&n.push(o,s[o].location);return n.join("-")}getVao(t,e){return this._geometryVaoHash[t.uid]?.[e._key]||this.initGeometryVao(t,e)}initGeometryVao(t,e,i=!0){let s=this._renderer.gl,n=this._renderer.buffer;this._renderer.shader._getProgramData(e),this.checkCompatibility(t,e);let o=this.getSignature(t,e);this._geometryVaoHash[t.uid]||(this._geometryVaoHash[t.uid]=Object.create(null),t.on("destroy",this.onGeometryDestroy,this));let a=this._geometryVaoHash[t.uid],u=a[o];if(u)return a[e._key]=u,u;Gu(t,e._attributeData);let l=t.buffers;u=s.createVertexArray(),s.bindVertexArray(u);for(let c=0;c<l.length;c++){let h=l[c];n.bind(h)}return this.activateVao(t,e),a[e._key]=u,a[o]=u,s.bindVertexArray(null),u}onGeometryDestroy(t,e){let i=this._geometryVaoHash[t.uid],s=this.gl;if(i){if(e)for(let n in i)this._activeVao!==i[n]&&this.unbind(),s.deleteVertexArray(i[n]);this._geometryVaoHash[t.uid]=null}}destroyAll(t=!1){let e=this.gl;for(let i in this._geometryVaoHash){if(t)for(let s in this._geometryVaoHash[i]){let n=this._geometryVaoHash[i];this._activeVao!==n&&this.unbind(),e.deleteVertexArray(n[s])}this._geometryVaoHash[i]=null}}activateVao(t,e){let i=this._renderer.gl,s=this._renderer.buffer,n=t.attributes;t.indexBuffer&&s.bind(t.indexBuffer);let o=null;for(let a in n){let u=n[a],l=u.buffer,c=s.getGlBuffer(l),h=e._attributeData[a];if(h){o!==c&&(s.bind(l),o=c);let d=h.location;i.enableVertexAttribArray(d);let f=ae(u.format),m=tS(u.format);if(h.format?.substring(1,4)==="int"?i.vertexAttribIPointer(d,f.size,m,u.stride,u.offset):i.vertexAttribPointer(d,f.size,m,f.normalised,u.stride,u.offset),u.instance)if(this.hasInstance){let g=u.divisor??1;i.vertexAttribDivisor(d,g)}else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,e,i,s){let{gl:n}=this._renderer,o=this._activeGeometry,a=wD[t||o.topology];if(s??(s=o.instanceCount),o.indexBuffer){let u=o.indexBuffer.data.BYTES_PER_ELEMENT,l=u===2?n.UNSIGNED_SHORT:n.UNSIGNED_INT;s>1?n.drawElementsInstanced(a,e||o.indexBuffer.data.length,l,(i||0)*u,s):n.drawElements(a,e||o.indexBuffer.data.length,l,(i||0)*u)}else s>1?n.drawArraysInstanced(a,i||0,e||o.getSize(),s):n.drawArrays(a,i||0,e||o.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this._renderer=null,this.gl=null,this._activeVao=null,this._activeGeometry=null}};fo.extension={type:[b.WebGLSystem],name:"geometry"}});var ED,Nf,sS,nS=p(()=>{D();gt();Bi();Be();Me();ne();dt();ri();ED=new ye({attributes:{aPosition:[-1,-1,3,-1,-1,3]}}),Nf=class iS{constructor(t){this.useBackBuffer=!1,this._useBackBufferThisRender=!1,this._renderer=t}init(t={}){let{useBackBuffer:e,antialias:i}={...iS.defaultOptions,...t};this.useBackBuffer=e,this._antialias=i,this._renderer.context.supports.msaa||(z("antialiasing, is not supported on when using the back buffer"),this._antialias=!1),this._state=Ct.for2d();let s=new be({vertex:`\n attribute vec2 aPosition;\n out vec2 vUv;\n\n void main() {\n gl_Position = vec4(aPosition, 0.0, 1.0);\n\n vUv = (aPosition + 1.0) / 2.0;\n\n // flip dem UVs\n vUv.y = 1.0 - vUv.y;\n }`,fragment:`\n in vec2 vUv;\n out vec4 finalColor;\n\n uniform sampler2D uTexture;\n\n void main() {\n finalColor = texture(uTexture, vUv);\n }`,name:"big-triangle"});this._bigTriangleShader=new St({glProgram:s,resources:{uTexture:I.WHITE.source}})}renderStart(t){let e=this._renderer.renderTarget.getRenderTarget(t.target);if(this._useBackBufferThisRender=this.useBackBuffer&&!!e.isRoot,this._useBackBufferThisRender){let i=this._renderer.renderTarget.getRenderTarget(t.target);this._targetTexture=i.colorTexture,t.target=this._getBackBufferTexture(i.colorTexture)}}renderEnd(){this._presentBackBuffer()}_presentBackBuffer(){let t=this._renderer;t.renderTarget.finishRenderPass(),this._useBackBufferThisRender&&(t.renderTarget.bind(this._targetTexture,!1),this._bigTriangleShader.resources.uTexture=this._backBufferTexture.source,t.encoder.draw({geometry:ED,shader:this._bigTriangleShader,state:this._state}))}_getBackBufferTexture(t){return this._backBufferTexture=this._backBufferTexture||new I({source:new ut({width:t.width,height:t.height,resolution:t._resolution,antialias:this._antialias})}),this._backBufferTexture.source.resize(t.width,t.height,t._resolution),this._backBufferTexture}destroy(){this._backBufferTexture&&(this._backBufferTexture.destroy(),this._backBufferTexture=null)}};Nf.extension={type:[b.WebGLSystem],name:"backBuffer",priority:1};Nf.defaultOptions={useBackBuffer:!1};sS=Nf});var po,oS=p(()=>{D();po=class{constructor(t){this._colorMaskCache=15,this._renderer=t}setMask(t){this._colorMaskCache!==t&&(this._colorMaskCache=t,this._renderer.gl.colorMask(!!(t&8),!!(t&4),!!(t&2),!!(t&1)))}};po.extension={type:[b.WebGLSystem],name:"colorMask"}});var mo,aS=p(()=>{D();mo=class{constructor(t){this.commandFinished=Promise.resolve(),this._renderer=t}setGeometry(t,e){this._renderer.geometry.bind(t,e.glProgram)}finishRenderPass(){}draw(t){let e=this._renderer,{geometry:i,shader:s,state:n,skipSync:o,topology:a,size:u,start:l,instanceCount:c}=t;e.shader.bind(s,o),e.geometry.bind(i,e.shader._activeProgram),n&&e.state.set(n),e.geometry.draw(a,u,l,c??i.instanceCount)}destroy(){this._renderer=null}};mo.extension={type:[b.WebGLSystem],name:"encoder"}});var go,uS=p(()=>{D();Ff();ei();go=class{constructor(t){this._stencilCache={enabled:!1,stencilReference:0,stencilMode:pt.NONE},this._renderTargetStencilState=Object.create(null),t.renderTarget.onRenderTargetChange.add(this)}contextChange(t){this._gl=t,this._comparisonFuncMapping={always:t.ALWAYS,never:t.NEVER,equal:t.EQUAL,"not-equal":t.NOTEQUAL,less:t.LESS,"less-equal":t.LEQUAL,greater:t.GREATER,"greater-equal":t.GEQUAL},this._stencilOpsMapping={keep:t.KEEP,zero:t.ZERO,replace:t.REPLACE,invert:t.INVERT,"increment-clamp":t.INCR,"decrement-clamp":t.DECR,"increment-wrap":t.INCR_WRAP,"decrement-wrap":t.DECR_WRAP},this._stencilCache.enabled=!1,this._stencilCache.stencilMode=pt.NONE,this._stencilCache.stencilReference=0}onRenderTargetChange(t){if(this._activeRenderTarget===t)return;this._activeRenderTarget=t;let e=this._renderTargetStencilState[t.uid];e||(e=this._renderTargetStencilState[t.uid]={stencilMode:pt.DISABLED,stencilReference:0}),this.setStencilMode(e.stencilMode,e.stencilReference)}setStencilMode(t,e){let i=this._renderTargetStencilState[this._activeRenderTarget.uid],s=this._gl,n=Ye[t],o=this._stencilCache;if(i.stencilMode=t,i.stencilReference=e,t===pt.DISABLED){this._stencilCache.enabled&&(this._stencilCache.enabled=!1,s.disable(s.STENCIL_TEST));return}this._stencilCache.enabled||(this._stencilCache.enabled=!0,s.enable(s.STENCIL_TEST)),(t!==o.stencilMode||o.stencilReference!==e)&&(o.stencilMode=t,o.stencilReference=e,s.stencilFunc(this._comparisonFuncMapping[n.stencilBack.compare],e,255),s.stencilOp(s.KEEP,s.KEEP,this._stencilOpsMapping[n.stencilBack.passOp]))}};go.extension={type:[b.WebGLSystem],name:"stencil"}});function lS(r){let t=r.map(n=>({data:n,offset:0,size:0})),e=16,i=0,s=0;for(let n=0;n<t.length;n++){let o=t[n];if(i=Hf[o.data.type],!i)throw new Error(`Unknown type ${o.data.type}`);o.data.size>1&&(i=Math.max(i,e)*o.data.size);let a=i===12?16:i;o.size=i;let u=s%e;u>0&&e-u<a?s+=(e-u)%16:s+=(i-u%i)%i,o.offset=s,s+=i}return s=Math.ceil(s/16)*16,{uboElements:t,size:s}}var Hf,zf=p(()=>{"use strict";Hf={f32:4,i32:4,"vec2<f32>":8,"vec3<f32>":12,"vec4<f32>":16,"vec2<i32>":8,"vec3<i32>":12,"vec4<i32>":16,"mat2x2<f32>":32,"mat3x3<f32>":48,"mat4x4<f32>":64}});function cS(r,t){let e=Math.max(Hf[r.data.type]/16,1),i=r.data.value.length/r.data.size,s=(4-i%4)%4,n=r.data.type.indexOf("i32")>=0?"dataInt32":"data";return`\n v = uv.${r.data.name};\n offset += ${t};\n\n arrayOffset = offset;\n\n t = 0;\n\n for(var i=0; i < ${r.data.size*e}; i++)\n {\n for(var j = 0; j < ${i}; j++)\n {\n ${n}[arrayOffset++] = v[t++];\n }\n ${s!==0?`arrayOffset += ${s};`:""}\n }\n `}var hS=p(()=>{zf()});function fS(r){return Fu(r,"uboStd40",cS,Pf)}var dS=p(()=>{Df();Bf();hS()});var xo,pS=p(()=>{D();Ef();zf();dS();xo=class extends as{constructor(){super({createUboElements:lS,generateUboSync:fS})}};xo.extension={type:[b.WebGLSystem],name:"ubo"}});var zu,mS=p(()=>{"use strict";zu=class{constructor(){this.width=-1,this.height=-1,this.msaa=!1,this.msaaRenderBuffer=[]}}});var Wu,gS=p(()=>{Yt();gt();Ai();es();mS();Wu=class{constructor(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new tt}init(t,e){this._renderer=t,this._renderTargetSystem=e,t.runners.contextChange.add(this)}contextChange(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new tt}copyToTexture(t,e,i,s,n){let o=this._renderTargetSystem,a=this._renderer,u=o.getGpuRenderTarget(t),l=a.gl;return this.finishRenderPass(t),l.bindFramebuffer(l.FRAMEBUFFER,u.resolveTargetFramebuffer),a.texture.bind(e,0),l.copyTexSubImage2D(l.TEXTURE_2D,0,n.x,n.y,i.x,i.y,s.width,s.height),e}startRenderPass(t,e=!0,i,s){let n=this._renderTargetSystem,o=t.colorTexture,a=n.getGpuRenderTarget(t),u=s.y;t.isRoot&&(u=o.pixelHeight-s.height),t.colorTextures.forEach(h=>{this._renderer.texture.unbind(h)});let l=this._renderer.gl;l.bindFramebuffer(l.FRAMEBUFFER,a.framebuffer);let c=this._viewPortCache;(c.x!==s.x||c.y!==u||c.width!==s.width||c.height!==s.height)&&(c.x=s.x,c.y=u,c.width=s.width,c.height=s.height,l.viewport(s.x,u,s.width,s.height)),!a.depthStencilRenderBuffer&&(t.stencil||t.depth)&&this._initStencil(a),this.clear(t,e,i)}finishRenderPass(t){let i=this._renderTargetSystem.getGpuRenderTarget(t);if(!i.msaa)return;let s=this._renderer.gl;s.bindFramebuffer(s.FRAMEBUFFER,i.resolveTargetFramebuffer),s.bindFramebuffer(s.READ_FRAMEBUFFER,i.framebuffer),s.blitFramebuffer(0,0,i.width,i.height,0,0,i.width,i.height,s.COLOR_BUFFER_BIT,s.NEAREST),s.bindFramebuffer(s.FRAMEBUFFER,i.framebuffer)}initGpuRenderTarget(t){let e=this._renderer,i=e.gl,s=new zu;return t.colorTexture.resource===e.canvas?(this._renderer.context.ensureCanvasSize(t.colorTexture.resource),s.framebuffer=null,s):(this._initColor(t,s),i.bindFramebuffer(i.FRAMEBUFFER,null),s)}destroyGpuRenderTarget(t){let e=this._renderer.gl;t.framebuffer&&(e.deleteFramebuffer(t.framebuffer),t.framebuffer=null),t.resolveTargetFramebuffer&&(e.deleteFramebuffer(t.resolveTargetFramebuffer),t.resolveTargetFramebuffer=null),t.depthStencilRenderBuffer&&(e.deleteRenderbuffer(t.depthStencilRenderBuffer),t.depthStencilRenderBuffer=null),t.msaaRenderBuffer.forEach(i=>{e.deleteRenderbuffer(i)}),t.msaaRenderBuffer=null}clear(t,e,i){if(!e)return;let s=this._renderTargetSystem;typeof e=="boolean"&&(e=e?Ot.ALL:Ot.NONE);let n=this._renderer.gl;if(e&Ot.COLOR){i??(i=s.defaultClearColor);let o=this._clearColorCache,a=i;(o[0]!==a[0]||o[1]!==a[1]||o[2]!==a[2]||o[3]!==a[3])&&(o[0]=a[0],o[1]=a[1],o[2]=a[2],o[3]=a[3],n.clearColor(a[0],a[1],a[2],a[3]))}n.clear(e)}resizeGpuRenderTarget(t){if(t.isRoot)return;let i=this._renderTargetSystem.getGpuRenderTarget(t);this._resizeColor(t,i),(t.stencil||t.depth)&&this._resizeStencil(i)}_initColor(t,e){let i=this._renderer,s=i.gl,n=s.createFramebuffer();if(e.resolveTargetFramebuffer=n,s.bindFramebuffer(s.FRAMEBUFFER,n),e.width=t.colorTexture.source.pixelWidth,e.height=t.colorTexture.source.pixelHeight,t.colorTextures.forEach((o,a)=>{let u=o.source;u.antialias&&(i.context.supports.msaa?e.msaa=!0:z("[RenderTexture] Antialiasing on textures is not supported in WebGL1")),i.texture.bindSource(u,0);let c=i.texture.getGlSource(u).texture;s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+a,3553,c,0)}),e.msaa){let o=s.createFramebuffer();e.framebuffer=o,s.bindFramebuffer(s.FRAMEBUFFER,o),t.colorTextures.forEach((a,u)=>{let l=s.createRenderbuffer();e.msaaRenderBuffer[u]=l})}else e.framebuffer=n;this._resizeColor(t,e)}_resizeColor(t,e){let i=t.colorTexture.source;if(e.width=i.pixelWidth,e.height=i.pixelHeight,t.colorTextures.forEach((s,n)=>{n!==0&&s.source.resize(i.width,i.height,i._resolution)}),e.msaa){let s=this._renderer,n=s.gl,o=e.framebuffer;n.bindFramebuffer(n.FRAMEBUFFER,o),t.colorTextures.forEach((a,u)=>{let l=a.source;s.texture.bindSource(l,0);let h=s.texture.getGlSource(l).internalFormat,d=e.msaaRenderBuffer[u];n.bindRenderbuffer(n.RENDERBUFFER,d),n.renderbufferStorageMultisample(n.RENDERBUFFER,4,h,l.pixelWidth,l.pixelHeight),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+u,n.RENDERBUFFER,d)})}}_initStencil(t){if(t.framebuffer===null)return;let e=this._renderer.gl,i=e.createRenderbuffer();t.depthStencilRenderBuffer=i,e.bindRenderbuffer(e.RENDERBUFFER,i),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,i),this._resizeStencil(t)}_resizeStencil(t){let e=this._renderer.gl;e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilRenderBuffer),t.msaa?e.renderbufferStorageMultisample(e.RENDERBUFFER,4,e.DEPTH24_STENCIL8,t.width,t.height):e.renderbufferStorage(e.RENDERBUFFER,this._renderer.context.webGLVersion===2?e.DEPTH24_STENCIL8:e.DEPTH_STENCIL,t.width,t.height)}prerender(t){let e=t.colorTexture.resource;this._renderer.context.multiView&&te.test(e)&&this._renderer.context.ensureCanvasSize(e)}postrender(t){if(this._renderer.context.multiView&&te.test(t.colorTexture.resource)){let e=this._renderer.context.canvas,i=t.colorTexture;i.context2D.drawImage(e,0,i.pixelHeight-e.height)}}}});var _o,xS=p(()=>{D();Rf();gS();_o=class extends ls{constructor(t){super(t),this.adaptor=new Wu,this.adaptor.init(t,this)}};_o.extension={type:[b.WebGLSystem],name:"renderTarget"}});function _S(r,t){let e=[],i=[`\n var g = s.groups;\n var sS = r.shader;\n var p = s.glProgram;\n var ugS = r.uniformGroup;\n var resources;\n `],s=!1,n=0,o=t._getProgramData(r.glProgram);for(let u in r.groups){let l=r.groups[u];e.push(`\n resources = g[${u}].resources;\n `);for(let c in l.resources){let h=l.resources[c];if(h instanceof ct)if(h.ubo){let d=r._uniformBindMap[u][Number(c)];e.push(`\n sS.bindUniformBlock(\n resources[${c}],\n \'${d}\',\n ${r.glProgram._uniformBlockData[d].index}\n );\n `)}else e.push(`\n ugS.updateUniformGroup(resources[${c}], p, sD);\n `);else if(h instanceof kr){let d=r._uniformBindMap[u][Number(c)];e.push(`\n sS.bindUniformBlock(\n resources[${c}],\n \'${d}\',\n ${r.glProgram._uniformBlockData[d].index}\n );\n `)}else if(h instanceof ut){let d=r._uniformBindMap[u][c],f=o.uniformData[d];f&&(s||(s=!0,i.push(`\n var tS = r.texture;\n `)),t._gl.uniform1i(f.location,n),e.push(`\n tS.bind(resources[${c}], ${n});\n `),n++)}}}let a=[...i,...e].join(`\n`);return new Function("r","s","sD",a)}var yS=p(()=>{Ru();ee();ne()});var Vu,bS=p(()=>{"use strict";Vu=class{constructor(t,e){this.program=t,this.uniformData=e,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBlockBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBlockBindings=null,this.program=null}}});function Wf(r,t,e){let i=r.createShader(t);return r.shaderSource(i,e),r.compileShader(i),i}var vS=p(()=>{"use strict"});function Vf(r){let t=new Array(r);for(let e=0;e<t.length;e++)t[e]=!1;return t}function Xu(r,t){switch(r){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return Vf(2*t);case"bvec3":return Vf(3*t);case"bvec4":return Vf(4*t);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var Xf=p(()=>{"use strict"});function $f(r,t){if(!$u){let e=Object.keys(TS);$u={};for(let i=0;i<e.length;++i){let s=e[i];$u[r[s]]=TS[s]}}return $u[t]}function SS(r,t){let e=$f(r,t);return CD[e]||"float32"}var $u,TS,CD,jf=p(()=>{"use strict";$u=null,TS={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"},CD={float:"float32",vec2:"float32x2",vec3:"float32x3",vec4:"float32x4",int:"sint32",ivec2:"sint32x2",ivec3:"sint32x3",ivec4:"sint32x4",uint:"uint32",uvec2:"uint32x2",uvec3:"uint32x3",uvec4:"uint32x4",bool:"uint32",bvec2:"uint32x2",bvec3:"uint32x3",bvec4:"uint32x4"}});function wS(r,t,e=!1){let i={},s=t.getProgramParameter(r,t.ACTIVE_ATTRIBUTES);for(let o=0;o<s;o++){let a=t.getActiveAttrib(r,o);if(a.name.startsWith("gl_"))continue;let u=SS(t,a.type);i[a.name]={location:0,format:u,stride:ae(u).stride,offset:0,instance:!1,start:0}}let n=Object.keys(i);if(e){n.sort((o,a)=>o>a?1:-1);for(let o=0;o<n.length;o++)i[n[o]].location=o,t.bindAttribLocation(r,o,n[o]);t.linkProgram(r)}else for(let o=0;o<n.length;o++)i[n[o]].location=t.getAttribLocation(r,n[o]);return i}var ES=p(()=>{ii();jf()});function CS(r,t){if(!t.ACTIVE_UNIFORM_BLOCKS)return{};let e={},i=t.getProgramParameter(r,t.ACTIVE_UNIFORM_BLOCKS);for(let s=0;s<i;s++){let n=t.getActiveUniformBlockName(r,s),o=t.getUniformBlockIndex(r,n),a=t.getActiveUniformBlockParameter(r,s,t.UNIFORM_BLOCK_DATA_SIZE);e[n]={name:n,index:o,size:a}}return e}var AS=p(()=>{"use strict"});function DS(r,t){let e={},i=t.getProgramParameter(r,t.ACTIVE_UNIFORMS);for(let s=0;s<i;s++){let n=t.getActiveUniform(r,s),o=n.name.replace(/\\[.*?\\]$/,""),a=!!n.name.match(/\\[.*?\\]$/),u=$f(t,n.type);e[o]={name:o,index:s,type:u,size:n.size,isArray:a,value:Xu(u,n.size)}}return e}var PS=p(()=>{Xf();jf()});function BS(r,t){let e=r.getShaderSource(t).split(`\n`).map((l,c)=>`${c}: ${l}`),i=r.getShaderInfoLog(t),s=i.split(`\n`),n={},o=s.map(l=>parseFloat(l.replace(/^ERROR\\: 0\\:([\\d]+)\\:.*$/,"$1"))).filter(l=>l&&!n[l]?(n[l]=!0,!0):!1),a=[""];o.forEach(l=>{e[l-1]=`%c${e[l-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});let u=e.join(`\n`);a[0]=u,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function MS(r,t,e,i){r.getProgramParameter(t,r.LINK_STATUS)||(r.getShaderParameter(e,r.COMPILE_STATUS)||BS(r,e),r.getShaderParameter(i,r.COMPILE_STATUS)||BS(r,i),console.error("PixiJS Error: Could not initialize shader."),r.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",r.getProgramInfoLog(t)))}var FS=p(()=>{"use strict"});function RS(r,t){let e=Wf(r,r.VERTEX_SHADER,t.vertex),i=Wf(r,r.FRAGMENT_SHADER,t.fragment),s=r.createProgram();r.attachShader(s,e),r.attachShader(s,i);let n=t.transformFeedbackVaryings;n&&(typeof r.transformFeedbackVaryings!="function"?z("TransformFeedback is not supported but TransformFeedbackVaryings are given."):r.transformFeedbackVaryings(s,n.names,n.bufferMode==="separate"?r.SEPARATE_ATTRIBS:r.INTERLEAVED_ATTRIBS)),r.linkProgram(s),r.getProgramParameter(s,r.LINK_STATUS)||MS(r,s,e,i),t._attributeData=wS(s,r,!/^[ \\t]*#[ \\t]*version[ \\t]+300[ \\t]+es[ \\t]*$/m.test(t.vertex)),t._uniformData=DS(s,r),t._uniformBlockData=CS(s,r),r.deleteShader(e),r.deleteShader(i);let o={};for(let u in t._uniformData){let l=t._uniformData[u];o[u]={location:r.getUniformLocation(s,u),value:Xu(l.type,l.size)}}return new Vu(s,o)}var kS=p(()=>{gt();bS();vS();Xf();ES();AS();PS();FS()});var ju,yo,GS=p(()=>{D();ti();yS();kS();ju={textureCount:0,blockIndex:0},yo=class{constructor(t){this._activeProgram=null,this._programDataHash=Object.create(null),this._shaderSyncFunctions=Object.create(null),this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_programDataHash")}contextChange(t){this._gl=t,this._programDataHash=Object.create(null),this._shaderSyncFunctions=Object.create(null),this._activeProgram=null,this.maxTextures=_e()}bind(t,e){if(this._setProgram(t.glProgram),e)return;ju.textureCount=0,ju.blockIndex=0;let i=this._shaderSyncFunctions[t.glProgram._key];i||(i=this._shaderSyncFunctions[t.glProgram._key]=this._generateShaderSync(t,this)),this._renderer.buffer.nextBindBase(!!t.glProgram.transformFeedbackVaryings),i(this._renderer,t,ju)}updateUniformGroup(t){this._renderer.uniformGroup.updateUniformGroup(t,this._activeProgram,ju)}bindUniformBlock(t,e,i=0){let s=this._renderer.buffer,n=this._getProgramData(this._activeProgram),o=t._bufferResource;o||this._renderer.ubo.updateUniformGroup(t);let a=t.buffer,u=s.updateBuffer(a),l=s.freeLocationForBufferBase(u);if(o){let{offset:h,size:d}=t;h===0&&d===a.data.byteLength?s.bindBufferBase(u,l):s.bindBufferRange(u,l,h)}else s.getLastBindBaseLocation(u)!==l&&s.bindBufferBase(u,l);let c=this._activeProgram._uniformBlockData[e].index;n.uniformBlockBindings[i]!==l&&(n.uniformBlockBindings[i]=l,this._renderer.gl.uniformBlockBinding(n.program,c,l))}_setProgram(t){if(this._activeProgram===t)return;this._activeProgram=t;let e=this._getProgramData(t);this._gl.useProgram(e.program)}_getProgramData(t){return this._programDataHash[t._key]||this._createProgramData(t)}_createProgramData(t){let e=t._key;return this._programDataHash[e]=RS(this._gl,t),this._programDataHash[e]}destroy(){for(let t of Object.keys(this._programDataHash))this._programDataHash[t].destroy(),this._programDataHash[t]=null;this._programDataHash=null}_generateShaderSync(t,e){return _S(t,e)}};yo.extension={type:[b.WebGLSystem],name:"shader"}});var IS,US,OS=p(()=>{"use strict";IS={f32:`if (cv !== v) {\n cu.value = v;\n gl.uniform1f(location, v);\n }`,"vec2<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(location, v[0], v[1]);\n }`,"vec3<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n gl.uniform3f(location, v[0], v[1], v[2]);\n }`,"vec4<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n gl.uniform4f(location, v[0], v[1], v[2], v[3]);\n }`,i32:`if (cv !== v) {\n cu.value = v;\n gl.uniform1i(location, v);\n }`,"vec2<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2i(location, v[0], v[1]);\n }`,"vec3<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n gl.uniform3i(location, v[0], v[1], v[2]);\n }`,"vec4<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }`,u32:`if (cv !== v) {\n cu.value = v;\n gl.uniform1ui(location, v);\n }`,"vec2<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2ui(location, v[0], v[1]);\n }`,"vec3<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n gl.uniform3ui(location, v[0], v[1], v[2]);\n }`,"vec4<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n gl.uniform4ui(location, v[0], v[1], v[2], v[3]);\n }`,bool:`if (cv !== v) {\n cu.value = v;\n gl.uniform1i(location, v);\n }`,"vec2<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2i(location, v[0], v[1]);\n }`,"vec3<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n gl.uniform3i(location, v[0], v[1], v[2]);\n }`,"vec4<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }`,"mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);"},US={f32:"gl.uniform1fv(location, v);","vec2<f32>":"gl.uniform2fv(location, v);","vec3<f32>":"gl.uniform3fv(location, v);","vec4<f32>":"gl.uniform4fv(location, v);","mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);",i32:"gl.uniform1iv(location, v);","vec2<i32>":"gl.uniform2iv(location, v);","vec3<i32>":"gl.uniform3iv(location, v);","vec4<i32>":"gl.uniform4iv(location, v);",u32:"gl.uniform1iv(location, v);","vec2<u32>":"gl.uniform2iv(location, v);","vec3<u32>":"gl.uniform3iv(location, v);","vec4<u32>":"gl.uniform4iv(location, v);",bool:"gl.uniform1iv(location, v);","vec2<bool>":"gl.uniform2iv(location, v);","vec3<bool>":"gl.uniform3iv(location, v);","vec4<bool>":"gl.uniform4iv(location, v);"}});function LS(r,t){let e=[`\n var v = null;\n var cv = null;\n var cu = null;\n var t = 0;\n var gl = renderer.gl;\n var name = null;\n `];for(let i in r.uniforms){if(!t[i]){r.uniforms[i]instanceof ct?r.uniforms[i].ubo?e.push(`\n renderer.shader.bindUniformBlock(uv.${i}, "${i}");\n `):e.push(`\n renderer.shader.updateUniformGroup(uv.${i});\n `):r.uniforms[i]instanceof kr&&e.push(`\n renderer.shader.bindBufferResource(uv.${i}, "${i}");\n `);continue}let s=r.uniformStructures[i],n=!1;for(let o=0;o<fr.length;o++){let a=fr[o];if(s.type===a.type&&a.test(s)){e.push(`name = "${i}";`,fr[o].uniform),n=!0;break}}if(!n){let a=(s.size===1?IS:US)[s.type].replace("location",`ud["${i}"].location`);e.push(`\n cu = ud["${i}"];\n cv = cu.value;\n v = uv["${i}"];\n ${a};`)}}return new Function("ud","uv","renderer","syncData",e.join(`\n`))}var NS=p(()=>{Ru();ee();Af();OS()});var bo,HS=p(()=>{D();NS();bo=class{constructor(t){this._cache={},this._uniformGroupSyncHash={},this._renderer=t,this.gl=null,this._cache={}}contextChange(t){this.gl=t}updateUniformGroup(t,e,i){let s=this._renderer.shader._getProgramData(e);(!t.isStatic||t._dirtyId!==s.uniformDirtyGroups[t.uid])&&(s.uniformDirtyGroups[t.uid]=t._dirtyId,this._getUniformSyncFunction(t,e)(s.uniformData,t.uniforms,this._renderer,i))}_getUniformSyncFunction(t,e){return this._uniformGroupSyncHash[t._signature]?.[e._key]||this._createUniformSyncFunction(t,e)}_createUniformSyncFunction(t,e){let i=this._uniformGroupSyncHash[t._signature]||(this._uniformGroupSyncHash[t._signature]={}),s=this._getSignature(t,e._uniformData,"u");return this._cache[s]||(this._cache[s]=this._generateUniformsSync(t,e._uniformData)),i[e._key]=this._cache[s],i[e._key]}_generateUniformsSync(t,e){return LS(t,e)}_getSignature(t,e,i){let s=t.uniforms,n=[`${i}-`];for(let o in s)n.push(o),e[o]&&n.push(e[o].type);return n.join("-")}destroy(){this._renderer=null,this._cache=null}};bo.extension={type:[b.WebGLSystem],name:"uniformGroup"}});function zS(r){let t={};if(t.normal=[r.ONE,r.ONE_MINUS_SRC_ALPHA],t.add=[r.ONE,r.ONE],t.multiply=[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],t.screen=[r.ONE,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],t.none=[0,0],t["normal-npm"]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],t["add-npm"]=[r.SRC_ALPHA,r.ONE,r.ONE,r.ONE],t["screen-npm"]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],t.erase=[r.ZERO,r.ONE_MINUS_SRC_ALPHA],!(r instanceof Q.get().getWebGLRenderingContext()))t.min=[r.ONE,r.ONE,r.ONE,r.ONE,r.MIN,r.MIN],t.max=[r.ONE,r.ONE,r.ONE,r.ONE,r.MAX,r.MAX];else{let i=r.getExtension("EXT_blend_minmax");i&&(t.min=[r.ONE,r.ONE,r.ONE,r.ONE,i.MIN_EXT,i.MIN_EXT],t.max=[r.ONE,r.ONE,r.ONE,r.ONE,i.MAX_EXT,i.MAX_EXT])}return t}var WS=p(()=>{Pt()});var AD,DD,PD,BD,MD,FD,VS,XS,$S=p(()=>{D();Me();WS();AD=0,DD=1,PD=2,BD=3,MD=4,FD=5,VS=class Yf{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode="none",this._blendEq=!1,this.map=[],this.map[AD]=this.setBlend,this.map[DD]=this.setOffset,this.map[PD]=this.setCullFace,this.map[BD]=this.setDepthTest,this.map[MD]=this.setFrontFace,this.map[FD]=this.setDepthMask,this.checks=[],this.defaultState=Ct.for2d()}contextChange(t){this.gl=t,this.blendModesMap=zS(t),this.reset()}set(t){if(t||(t=this.defaultState),this.stateId!==t.data){let e=this.stateId^t.data,i=0;for(;e;)e&1&&this.map[i].call(this,!!(t.data&1<<i)),e>>=1,i++;this.stateId=t.data}for(let e=0;e<this.checks.length;e++)this.checks[e](this,t)}forceState(t){t||(t=this.defaultState);for(let e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(let e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data}setBlend(t){this._updateCheck(Yf._checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)}setOffset(t){this._updateCheck(Yf._checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(t){this.gl.depthMask(t)}setCullFace(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])}setBlendMode(t){if(this.blendModesMap[t]||(t="normal"),t===this.blendMode)return;this.blendMode=t;let e=this.blendModesMap[t],i=this.gl;e.length===2?i.blendFunc(e[0],e[1]):i.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,i.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,i.blendEquationSeparate(i.FUNC_ADD,i.FUNC_ADD))}setPolygonOffset(t,e){this.gl.polygonOffset(t,e)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode="",this.setBlendMode("normal")}_updateCheck(t,e){let i=this.checks.indexOf(t);e&&i===-1?this.checks.push(t):!e&&i!==-1&&this.checks.splice(i,1)}static _checkBlendMode(t,e){t.setBlendMode(e.blendMode)}static _checkPolygonOffset(t,e){t.setPolygonOffset(1,e.polygonOffset)}destroy(){this.gl=null,this.checks.length=0}};VS.extension={type:[b.WebGLSystem],name:"state"};XS=VS});var Yu,jS=p(()=>{Lf();Yu=class{constructor(t){this.target=Of.TEXTURE_2D,this.texture=t,this.width=-1,this.height=-1,this.type=at.UNSIGNED_BYTE,this.internalFormat=Hu.RGBA,this.format=Hu.RGBA,this.samplerType=0}}});var YS,KS=p(()=>{"use strict";YS={id:"buffer",upload(r,t,e){t.width===r.width||t.height===r.height?e.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,t.format,t.type,r.resource):e.texImage2D(t.target,0,t.internalFormat,r.width,r.height,0,t.format,t.type,r.resource),t.width=r.width,t.height=r.height}}});var RD,qS,ZS=p(()=>{"use strict";RD={"bc1-rgba-unorm":!0,"bc1-rgba-unorm-srgb":!0,"bc2-rgba-unorm":!0,"bc2-rgba-unorm-srgb":!0,"bc3-rgba-unorm":!0,"bc3-rgba-unorm-srgb":!0,"bc4-r-unorm":!0,"bc4-r-snorm":!0,"bc5-rg-unorm":!0,"bc5-rg-snorm":!0,"bc6h-rgb-ufloat":!0,"bc6h-rgb-float":!0,"bc7-rgba-unorm":!0,"bc7-rgba-unorm-srgb":!0,"etc2-rgb8unorm":!0,"etc2-rgb8unorm-srgb":!0,"etc2-rgb8a1unorm":!0,"etc2-rgb8a1unorm-srgb":!0,"etc2-rgba8unorm":!0,"etc2-rgba8unorm-srgb":!0,"eac-r11unorm":!0,"eac-r11snorm":!0,"eac-rg11unorm":!0,"eac-rg11snorm":!0,"astc-4x4-unorm":!0,"astc-4x4-unorm-srgb":!0,"astc-5x4-unorm":!0,"astc-5x4-unorm-srgb":!0,"astc-5x5-unorm":!0,"astc-5x5-unorm-srgb":!0,"astc-6x5-unorm":!0,"astc-6x5-unorm-srgb":!0,"astc-6x6-unorm":!0,"astc-6x6-unorm-srgb":!0,"astc-8x5-unorm":!0,"astc-8x5-unorm-srgb":!0,"astc-8x6-unorm":!0,"astc-8x6-unorm-srgb":!0,"astc-8x8-unorm":!0,"astc-8x8-unorm-srgb":!0,"astc-10x5-unorm":!0,"astc-10x5-unorm-srgb":!0,"astc-10x6-unorm":!0,"astc-10x6-unorm-srgb":!0,"astc-10x8-unorm":!0,"astc-10x8-unorm-srgb":!0,"astc-10x10-unorm":!0,"astc-10x10-unorm-srgb":!0,"astc-12x10-unorm":!0,"astc-12x10-unorm-srgb":!0,"astc-12x12-unorm":!0,"astc-12x12-unorm-srgb":!0},qS={id:"compressed",upload(r,t,e){e.pixelStorei(e.UNPACK_ALIGNMENT,4);let i=r.pixelWidth,s=r.pixelHeight,n=!!RD[r.format];for(let o=0;o<r.resource.length;o++){let a=r.resource[o];n?e.compressedTexImage2D(e.TEXTURE_2D,o,t.internalFormat,i,s,0,a):e.texImage2D(e.TEXTURE_2D,o,t.internalFormat,i,s,0,t.format,t.type,a),i=Math.max(i>>1,1),s=Math.max(s>>1,1)}}}});var Ku,Kf=p(()=>{"use strict";Ku={id:"image",upload(r,t,e,i){let s=r.alphaMode==="premultiply-alpha-on-upload";e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s);let n=t.width,o=t.height,a=r.pixelWidth,u=r.pixelHeight,l=r.resourceWidth,c=r.resourceHeight;l<a||c<u?((n!==a||o!==u)&&e.texImage2D(t.target,0,t.internalFormat,a,u,0,t.format,t.type,null),i===2?e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,c,t.format,t.type,r.resource):e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.format,t.type,r.resource)):n===a||o===u?e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.format,t.type,r.resource):i===2?e.texImage2D(t.target,0,t.internalFormat,a,u,0,t.format,t.type,r.resource):e.texImage2D(t.target,0,t.internalFormat,t.format,t.type,r.resource),t.width=a,t.height=u}}});var QS,JS=p(()=>{Kf();QS={id:"video",upload(r,t,e,i){if(!r.isValid){e.texImage2D(t.target,0,t.internalFormat,1,1,0,t.format,t.type,null);return}Ku.upload(r,t,e,i)}}});var qf,t1,qu,e1,r1=p(()=>{"use strict";qf={linear:9729,nearest:9728},t1={linear:{linear:9987,nearest:9985},nearest:{linear:9986,nearest:9984}},qu={"clamp-to-edge":33071,repeat:10497,"mirror-repeat":33648},e1={never:512,less:513,equal:514,"less-equal":515,greater:516,"not-equal":517,"greater-equal":518,always:519}});function Zf(r,t,e,i,s,n,o,a){let u=n;if(!a||r.addressModeU!=="repeat"||r.addressModeV!=="repeat"||r.addressModeW!=="repeat"){let l=qu[o?"clamp-to-edge":r.addressModeU],c=qu[o?"clamp-to-edge":r.addressModeV],h=qu[o?"clamp-to-edge":r.addressModeW];t[s](u,t.TEXTURE_WRAP_S,l),t[s](u,t.TEXTURE_WRAP_T,c),t.TEXTURE_WRAP_R&&t[s](u,t.TEXTURE_WRAP_R,h)}if((!a||r.magFilter!=="linear")&&t[s](u,t.TEXTURE_MAG_FILTER,qf[r.magFilter]),e){if(!a||r.mipmapFilter!=="linear"){let l=t1[r.minFilter][r.mipmapFilter];t[s](u,t.TEXTURE_MIN_FILTER,l)}}else t[s](u,t.TEXTURE_MIN_FILTER,qf[r.minFilter]);if(i&&r.maxAnisotropy>1){let l=Math.min(r.maxAnisotropy,t.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));t[s](u,i.TEXTURE_MAX_ANISOTROPY_EXT,l)}r.compare&&t[s](u,t.TEXTURE_COMPARE_FUNC,e1[r.compare])}var i1=p(()=>{r1()});function s1(r){return{r8unorm:r.RED,r8snorm:r.RED,r8uint:r.RED,r8sint:r.RED,r16uint:r.RED,r16sint:r.RED,r16float:r.RED,rg8unorm:r.RG,rg8snorm:r.RG,rg8uint:r.RG,rg8sint:r.RG,r32uint:r.RED,r32sint:r.RED,r32float:r.RED,rg16uint:r.RG,rg16sint:r.RG,rg16float:r.RG,rgba8unorm:r.RGBA,"rgba8unorm-srgb":r.RGBA,rgba8snorm:r.RGBA,rgba8uint:r.RGBA,rgba8sint:r.RGBA,bgra8unorm:r.RGBA,"bgra8unorm-srgb":r.RGBA,rgb9e5ufloat:r.RGB,rgb10a2unorm:r.RGBA,rg11b10ufloat:r.RGB,rg32uint:r.RG,rg32sint:r.RG,rg32float:r.RG,rgba16uint:r.RGBA,rgba16sint:r.RGBA,rgba16float:r.RGBA,rgba32uint:r.RGBA,rgba32sint:r.RGBA,rgba32float:r.RGBA,stencil8:r.STENCIL_INDEX8,depth16unorm:r.DEPTH_COMPONENT,depth24plus:r.DEPTH_COMPONENT,"depth24plus-stencil8":r.DEPTH_STENCIL,depth32float:r.DEPTH_COMPONENT,"depth32float-stencil8":r.DEPTH_STENCIL}}var n1=p(()=>{"use strict"});function o1(r,t){let e={},i=r.RGBA;return r instanceof Q.get().getWebGLRenderingContext()?t.srgb&&(e={"rgba8unorm-srgb":t.srgb.SRGB8_ALPHA8_EXT,"bgra8unorm-srgb":t.srgb.SRGB8_ALPHA8_EXT}):(e={"rgba8unorm-srgb":r.SRGB8_ALPHA8,"bgra8unorm-srgb":r.SRGB8_ALPHA8},i=r.RGBA8),{r8unorm:r.R8,r8snorm:r.R8_SNORM,r8uint:r.R8UI,r8sint:r.R8I,r16uint:r.R16UI,r16sint:r.R16I,r16float:r.R16F,rg8unorm:r.RG8,rg8snorm:r.RG8_SNORM,rg8uint:r.RG8UI,rg8sint:r.RG8I,r32uint:r.R32UI,r32sint:r.R32I,r32float:r.R32F,rg16uint:r.RG16UI,rg16sint:r.RG16I,rg16float:r.RG16F,rgba8unorm:r.RGBA,...e,rgba8snorm:r.RGBA8_SNORM,rgba8uint:r.RGBA8UI,rgba8sint:r.RGBA8I,bgra8unorm:i,rgb9e5ufloat:r.RGB9_E5,rgb10a2unorm:r.RGB10_A2,rg11b10ufloat:r.R11F_G11F_B10F,rg32uint:r.RG32UI,rg32sint:r.RG32I,rg32float:r.RG32F,rgba16uint:r.RGBA16UI,rgba16sint:r.RGBA16I,rgba16float:r.RGBA16F,rgba32uint:r.RGBA32UI,rgba32sint:r.RGBA32I,rgba32float:r.RGBA32F,stencil8:r.STENCIL_INDEX8,depth16unorm:r.DEPTH_COMPONENT16,depth24plus:r.DEPTH_COMPONENT24,"depth24plus-stencil8":r.DEPTH24_STENCIL8,depth32float:r.DEPTH_COMPONENT32F,"depth32float-stencil8":r.DEPTH32F_STENCIL8,...t.s3tc?{"bc1-rgba-unorm":t.s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT,"bc2-rgba-unorm":t.s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT,"bc3-rgba-unorm":t.s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{},...t.s3tc_sRGB?{"bc1-rgba-unorm-srgb":t.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,"bc2-rgba-unorm-srgb":t.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,"bc3-rgba-unorm-srgb":t.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}:{},...t.rgtc?{"bc4-r-unorm":t.rgtc.COMPRESSED_RED_RGTC1_EXT,"bc4-r-snorm":t.rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT,"bc5-rg-unorm":t.rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT,"bc5-rg-snorm":t.rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}:{},...t.bptc?{"bc6h-rgb-float":t.bptc.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,"bc6h-rgb-ufloat":t.bptc.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,"bc7-rgba-unorm":t.bptc.COMPRESSED_RGBA_BPTC_UNORM_EXT,"bc7-rgba-unorm-srgb":t.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT}:{},...t.etc?{"etc2-rgb8unorm":t.etc.COMPRESSED_RGB8_ETC2,"etc2-rgb8unorm-srgb":t.etc.COMPRESSED_SRGB8_ETC2,"etc2-rgb8a1unorm":t.etc.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgb8a1unorm-srgb":t.etc.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgba8unorm":t.etc.COMPRESSED_RGBA8_ETC2_EAC,"etc2-rgba8unorm-srgb":t.etc.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,"eac-r11unorm":t.etc.COMPRESSED_R11_EAC,"eac-rg11unorm":t.etc.COMPRESSED_SIGNED_RG11_EAC}:{},...t.astc?{"astc-4x4-unorm":t.astc.COMPRESSED_RGBA_ASTC_4x4_KHR,"astc-4x4-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,"astc-5x4-unorm":t.astc.COMPRESSED_RGBA_ASTC_5x4_KHR,"astc-5x4-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,"astc-5x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_5x5_KHR,"astc-5x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,"astc-6x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_6x5_KHR,"astc-6x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,"astc-6x6-unorm":t.astc.COMPRESSED_RGBA_ASTC_6x6_KHR,"astc-6x6-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,"astc-8x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_8x5_KHR,"astc-8x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,"astc-8x6-unorm":t.astc.COMPRESSED_RGBA_ASTC_8x6_KHR,"astc-8x6-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,"astc-8x8-unorm":t.astc.COMPRESSED_RGBA_ASTC_8x8_KHR,"astc-8x8-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,"astc-10x5-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x5_KHR,"astc-10x5-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,"astc-10x6-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x6_KHR,"astc-10x6-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,"astc-10x8-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x8_KHR,"astc-10x8-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,"astc-10x10-unorm":t.astc.COMPRESSED_RGBA_ASTC_10x10_KHR,"astc-10x10-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,"astc-12x10-unorm":t.astc.COMPRESSED_RGBA_ASTC_12x10_KHR,"astc-12x10-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,"astc-12x12-unorm":t.astc.COMPRESSED_RGBA_ASTC_12x12_KHR,"astc-12x12-unorm-srgb":t.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR}:{}}}var a1=p(()=>{Pt()});function u1(r){return{r8unorm:r.UNSIGNED_BYTE,r8snorm:r.BYTE,r8uint:r.UNSIGNED_BYTE,r8sint:r.BYTE,r16uint:r.UNSIGNED_SHORT,r16sint:r.SHORT,r16float:r.HALF_FLOAT,rg8unorm:r.UNSIGNED_BYTE,rg8snorm:r.BYTE,rg8uint:r.UNSIGNED_BYTE,rg8sint:r.BYTE,r32uint:r.UNSIGNED_INT,r32sint:r.INT,r32float:r.FLOAT,rg16uint:r.UNSIGNED_SHORT,rg16sint:r.SHORT,rg16float:r.HALF_FLOAT,rgba8unorm:r.UNSIGNED_BYTE,"rgba8unorm-srgb":r.UNSIGNED_BYTE,rgba8snorm:r.BYTE,rgba8uint:r.UNSIGNED_BYTE,rgba8sint:r.BYTE,bgra8unorm:r.UNSIGNED_BYTE,"bgra8unorm-srgb":r.UNSIGNED_BYTE,rgb9e5ufloat:r.UNSIGNED_INT_5_9_9_9_REV,rgb10a2unorm:r.UNSIGNED_INT_2_10_10_10_REV,rg11b10ufloat:r.UNSIGNED_INT_10F_11F_11F_REV,rg32uint:r.UNSIGNED_INT,rg32sint:r.INT,rg32float:r.FLOAT,rgba16uint:r.UNSIGNED_SHORT,rgba16sint:r.SHORT,rgba16float:r.HALF_FLOAT,rgba32uint:r.UNSIGNED_INT,rgba32sint:r.INT,rgba32float:r.FLOAT,stencil8:r.UNSIGNED_BYTE,depth16unorm:r.UNSIGNED_SHORT,depth24plus:r.UNSIGNED_INT,"depth24plus-stencil8":r.UNSIGNED_INT_24_8,depth32float:r.FLOAT,"depth32float-stencil8":r.FLOAT_32_UNSIGNED_INT_24_8_REV}}var l1=p(()=>{"use strict"});var kD,vo,c1=p(()=>{Pt();D();dt();jS();KS();ZS();Kf();JS();i1();n1();a1();l1();kD=4,vo=class{constructor(t){this.managedTextures=[],this._glTextures=Object.create(null),this._glSamplers=Object.create(null),this._boundTextures=[],this._activeTextureLocation=-1,this._boundSamplers=Object.create(null),this._uploads={image:Ku,buffer:YS,video:QS,compressed:qS},this._useSeparateSamplers=!1,this._renderer=t,this._renderer.renderableGC.addManagedHash(this,"_glTextures"),this._renderer.renderableGC.addManagedHash(this,"_glSamplers")}contextChange(t){this._gl=t,this._mapFormatToInternalFormat||(this._mapFormatToInternalFormat=o1(t,this._renderer.context.extensions),this._mapFormatToType=u1(t),this._mapFormatToFormat=s1(t)),this._glTextures=Object.create(null),this._glSamplers=Object.create(null),this._boundSamplers=Object.create(null);for(let e=0;e<16;e++)this.bind(I.EMPTY,e)}initSource(t){this.bind(t)}bind(t,e=0){let i=t.source;t?(this.bindSource(i,e),this._useSeparateSamplers&&this._bindSampler(i.style,e)):(this.bindSource(null,e),this._useSeparateSamplers&&this._bindSampler(null,e))}bindSource(t,e=0){let i=this._gl;if(t._touched=this._renderer.textureGC.count,this._boundTextures[e]!==t){this._boundTextures[e]=t,this._activateLocation(e),t||(t=I.EMPTY.source);let s=this.getGlSource(t);i.bindTexture(s.target,s.texture)}}_bindSampler(t,e=0){let i=this._gl;if(!t){this._boundSamplers[e]=null,i.bindSampler(e,null);return}let s=this._getGlSampler(t);this._boundSamplers[e]!==s&&(this._boundSamplers[e]=s,i.bindSampler(e,s))}unbind(t){let e=t.source,i=this._boundTextures,s=this._gl;for(let n=0;n<i.length;n++)if(i[n]===e){this._activateLocation(n);let o=this.getGlSource(e);s.bindTexture(o.target,null),i[n]=null}}_activateLocation(t){this._activeTextureLocation!==t&&(this._activeTextureLocation=t,this._gl.activeTexture(this._gl.TEXTURE0+t))}_initSource(t){let e=this._gl,i=new Yu(e.createTexture());if(i.type=this._mapFormatToType[t.format],i.internalFormat=this._mapFormatToInternalFormat[t.format],i.format=this._mapFormatToFormat[t.format],t.autoGenerateMipmaps&&(this._renderer.context.supports.nonPowOf2mipmaps||t.isPowerOfTwo)){let s=Math.max(t.width,t.height);t.mipLevelCount=Math.floor(Math.log2(s))+1}return this._glTextures[t.uid]=i,this.managedTextures.includes(t)||(t.on("update",this.onSourceUpdate,this),t.on("resize",this.onSourceUpdate,this),t.on("styleChange",this.onStyleChange,this),t.on("destroy",this.onSourceDestroy,this),t.on("unload",this.onSourceUnload,this),t.on("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.push(t)),this.onSourceUpdate(t),this.updateStyle(t,!1),i}onStyleChange(t){this.updateStyle(t,!1)}updateStyle(t,e){let i=this._gl,s=this.getGlSource(t);i.bindTexture(i.TEXTURE_2D,s.texture),this._boundTextures[this._activeTextureLocation]=t,Zf(t.style,i,t.mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"texParameteri",i.TEXTURE_2D,!this._renderer.context.supports.nonPowOf2wrapping&&!t.isPowerOfTwo,e)}onSourceUnload(t){let e=this._glTextures[t.uid];e&&(this.unbind(t),this._glTextures[t.uid]=null,this._gl.deleteTexture(e.texture))}onSourceUpdate(t){let e=this._gl,i=this.getGlSource(t);e.bindTexture(e.TEXTURE_2D,i.texture),this._boundTextures[this._activeTextureLocation]=t,this._uploads[t.uploadMethodId]?this._uploads[t.uploadMethodId].upload(t,i,e,this._renderer.context.webGLVersion):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t.pixelWidth,t.pixelHeight,0,e.RGBA,e.UNSIGNED_BYTE,null),t.autoGenerateMipmaps&&t.mipLevelCount>1&&this.onUpdateMipmaps(t,!1)}onUpdateMipmaps(t,e=!0){e&&this.bindSource(t,0);let i=this.getGlSource(t);this._gl.generateMipmap(i.target)}onSourceDestroy(t){t.off("destroy",this.onSourceDestroy,this),t.off("update",this.onSourceUpdate,this),t.off("resize",this.onSourceUpdate,this),t.off("unload",this.onSourceUnload,this),t.off("styleChange",this.onStyleChange,this),t.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(t),1),this.onSourceUnload(t)}_initSampler(t){let e=this._gl,i=this._gl.createSampler();return this._glSamplers[t._resourceId]=i,Zf(t,e,this._boundTextures[this._activeTextureLocation].mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"samplerParameteri",i,!1,!0),this._glSamplers[t._resourceId]}_getGlSampler(t){return this._glSamplers[t._resourceId]||this._initSampler(t)}getGlSource(t){return this._glTextures[t.uid]||this._initSource(t)}generateCanvas(t){let{pixels:e,width:i,height:s}=this.getPixels(t),n=Q.get().createCanvas();n.width=i,n.height=s;let o=n.getContext("2d");if(o){let a=o.createImageData(i,s);a.data.set(e),o.putImageData(a,0,0)}return n}getPixels(t){let e=t.source.resolution,i=t.frame,s=Math.max(Math.round(i.width*e),1),n=Math.max(Math.round(i.height*e),1),o=new Uint8Array(kD*s*n),a=this._renderer,u=a.renderTarget.getRenderTarget(t),l=a.renderTarget.getGpuRenderTarget(u),c=a.gl;return c.bindFramebuffer(c.FRAMEBUFFER,l.resolveTargetFramebuffer),c.readPixels(Math.round(i.x*e),Math.round(i.y*e),s,n,c.RGBA,c.UNSIGNED_BYTE,o),{pixels:new Uint8ClampedArray(o.buffer),width:s,height:n}}destroy(){this.managedTextures.slice().forEach(t=>this.onSourceDestroy(t)),this.managedTextures=null,this._renderer=null}};vo.extension={type:[b.WebGLSystem],name:"texture"}});var p1={};sd(p1,{WebGLRenderer:()=>Qf});var GD,ID,UD,h1,f1,d1,Qf,m1=p(()=>{D();VT();XT();$T();Cn();wf();Ve();KT();QT();rS();nS();oS();aS();uS();pS();xS();GS();HS();$S();c1();GD=[...Bu,xo,sS,ZT,ho,vo,_o,fo,bo,yo,mo,XS,go,po],ID=[...Mu],UD=[lo,uo,ao],h1=[],f1=[],d1=[];H.handleByNamedList(b.WebGLSystem,h1);H.handleByNamedList(b.WebGLPipes,f1);H.handleByNamedList(b.WebGLPipesAdaptor,d1);H.add(...GD,...ID,...UD);Qf=class extends Rr{constructor(){let t={name:"webgl",type:Mt.WEBGL,systems:h1,renderPipes:f1,renderPipeAdaptors:d1};super(t)}}});var w1=Ao((wtt,S1)=>{"use strict";S1.exports=LD;function hs(r){return r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function LD(r){if(r=r||{},r.circles)return ND(r);let t=new Map;if(t.set(Date,o=>new Date(o)),t.set(Map,(o,a)=>new Map(i(Array.from(o),a))),t.set(Set,(o,a)=>new Set(i(Array.from(o),a))),r.constructorHandlers)for(let o of r.constructorHandlers)t.set(o[0],o[1]);let e=null;return r.proto?n:s;function i(o,a){let u=Object.keys(o),l=new Array(u.length);for(let c=0;c<u.length;c++){let h=u[c],d=o[h];typeof d!="object"||d===null?l[h]=d:d.constructor!==Object&&(e=t.get(d.constructor))?l[h]=e(d,a):ArrayBuffer.isView(d)?l[h]=hs(d):l[h]=a(d)}return l}function s(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return i(o,s);if(o.constructor!==Object&&(e=t.get(o.constructor)))return e(o,s);let a={};for(let u in o){if(Object.hasOwnProperty.call(o,u)===!1)continue;let l=o[u];typeof l!="object"||l===null?a[u]=l:l.constructor!==Object&&(e=t.get(l.constructor))?a[u]=e(l,s):ArrayBuffer.isView(l)?a[u]=hs(l):a[u]=s(l)}return a}function n(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return i(o,n);if(o.constructor!==Object&&(e=t.get(o.constructor)))return e(o,n);let a={};for(let u in o){let l=o[u];typeof l!="object"||l===null?a[u]=l:l.constructor!==Object&&(e=t.get(l.constructor))?a[u]=e(l,n):ArrayBuffer.isView(l)?a[u]=hs(l):a[u]=n(l)}return a}}function ND(r){let t=[],e=[],i=new Map;if(i.set(Date,u=>new Date(u)),i.set(Map,(u,l)=>new Map(n(Array.from(u),l))),i.set(Set,(u,l)=>new Set(n(Array.from(u),l))),r.constructorHandlers)for(let u of r.constructorHandlers)i.set(u[0],u[1]);let s=null;return r.proto?a:o;function n(u,l){let c=Object.keys(u),h=new Array(c.length);for(let d=0;d<c.length;d++){let f=c[d],m=u[f];if(typeof m!="object"||m===null)h[f]=m;else if(m.constructor!==Object&&(s=i.get(m.constructor)))h[f]=s(m,l);else if(ArrayBuffer.isView(m))h[f]=hs(m);else{let g=t.indexOf(m);g!==-1?h[f]=e[g]:h[f]=l(m)}}return h}function o(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return n(u,o);if(u.constructor!==Object&&(s=i.get(u.constructor)))return s(u,o);let l={};t.push(u),e.push(l);for(let c in u){if(Object.hasOwnProperty.call(u,c)===!1)continue;let h=u[c];if(typeof h!="object"||h===null)l[c]=h;else if(h.constructor!==Object&&(s=i.get(h.constructor)))l[c]=s(h,o);else if(ArrayBuffer.isView(h))l[c]=hs(h);else{let d=t.indexOf(h);d!==-1?l[c]=e[d]:l[c]=o(h)}}return t.pop(),e.pop(),l}function a(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return n(u,a);if(u.constructor!==Object&&(s=i.get(u.constructor)))return s(u,a);let l={};t.push(u),e.push(l);for(let c in u){let h=u[c];if(typeof h!="object"||h===null)l[c]=h;else if(h.constructor!==Object&&(s=i.get(h.constructor)))l[c]=s(h,a);else if(ArrayBuffer.isView(h))l[c]=hs(h);else{let d=t.indexOf(h);d!==-1?l[c]=e[d]:l[c]=a(h)}}return t.pop(),e.pop(),l}}});var U1={value:()=>{}};function od(){for(var r=0,t=arguments.length,e={},i;r<t;++r){if(!(i=arguments[r]+"")||i in e||/[\\s.]/.test(i))throw new Error("illegal type: "+i);e[i]=[]}return new Do(e)}function Do(r){this._=r}function O1(r,t){return r.trim().split(/^|\\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0&&(i=e.slice(s+1),e=e.slice(0,s)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}Do.prototype=od.prototype={constructor:Do,on:function(r,t){var e=this._,i=O1(r+"",e),s,n=-1,o=i.length;if(arguments.length<2){for(;++n<o;)if((s=(r=i[n]).type)&&(s=L1(e[s],r.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++n<o;)if(s=(r=i[n]).type)e[s]=nd(e[s],r.name,t);else if(t==null)for(s in e)e[s]=nd(e[s],r.name,null);return this},copy:function(){var r={},t=this._;for(var e in t)r[e]=t[e].slice();return new Do(r)},call:function(r,t){if((s=arguments.length-2)>0)for(var e=new Array(s),i=0,s,n;i<s;++i)e[i]=arguments[i+2];if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(n=this._[r],i=0,s=n.length;i<s;++i)n[i].value.apply(t,e)},apply:function(r,t,e){if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(var i=this._[r],s=0,n=i.length;s<n;++s)i[s].value.apply(t,e)}};function L1(r,t){for(var e=0,i=r.length,s;e<i;++e)if((s=r[e]).name===t)return s.value}function nd(r,t,e){for(var i=0,s=r.length;i<s;++i)if(r[i].name===t){r[i]=U1,r=r.slice(0,i).concat(r.slice(i+1));break}return e!=null&&r.push({name:t,value:e}),r}var Ze=od;var Po="http://www.w3.org/1999/xhtml",tl={svg:"http://www.w3.org/2000/svg",xhtml:Po,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qe(r){var t=r+="",e=t.indexOf(":");return e>=0&&(t=r.slice(0,e))!=="xmlns"&&(r=r.slice(e+1)),tl.hasOwnProperty(t)?{space:tl[t],local:r}:r}function N1(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===Po&&t.documentElement.namespaceURI===Po?t.createElement(r):t.createElementNS(e,r)}}function H1(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Bo(r){var t=Qe(r);return(t.local?H1:N1)(t)}function z1(){}function Ir(r){return r==null?z1:function(){return this.querySelector(r)}}function ad(r){typeof r!="function"&&(r=Ir(r));for(var t=this._groups,e=t.length,i=new Array(e),s=0;s<e;++s)for(var n=t[s],o=n.length,a=i[s]=new Array(o),u,l,c=0;c<o;++c)(u=n[c])&&(l=r.call(u,u.__data__,c,n))&&("__data__"in u&&(l.__data__=u.__data__),a[c]=l);return new bt(i,this._parents)}function el(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function W1(){return[]}function ps(r){return r==null?W1:function(){return this.querySelectorAll(r)}}function V1(r){return function(){return el(r.apply(this,arguments))}}function ud(r){typeof r=="function"?r=V1(r):r=ps(r);for(var t=this._groups,e=t.length,i=[],s=[],n=0;n<e;++n)for(var o=t[n],a=o.length,u,l=0;l<a;++l)(u=o[l])&&(i.push(r.call(u,u.__data__,l,o)),s.push(u));return new bt(i,s)}function ms(r){return function(){return this.matches(r)}}function Mo(r){return function(t){return t.matches(r)}}var X1=Array.prototype.find;function $1(r){return function(){return X1.call(this.children,r)}}function j1(){return this.firstElementChild}function ld(r){return this.select(r==null?j1:$1(typeof r=="function"?r:Mo(r)))}var Y1=Array.prototype.filter;function K1(){return Array.from(this.children)}function q1(r){return function(){return Y1.call(this.children,r)}}function cd(r){return this.selectAll(r==null?K1:q1(typeof r=="function"?r:Mo(r)))}function hd(r){typeof r!="function"&&(r=ms(r));for(var t=this._groups,e=t.length,i=new Array(e),s=0;s<e;++s)for(var n=t[s],o=n.length,a=i[s]=[],u,l=0;l<o;++l)(u=n[l])&&r.call(u,u.__data__,l,n)&&a.push(u);return new bt(i,this._parents)}function Fo(r){return new Array(r.length)}function fd(){return new bt(this._enter||this._groups.map(Fo),this._parents)}function gs(r,t){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=t}gs.prototype={constructor:gs,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,t){return this._parent.insertBefore(r,t)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function dd(r){return function(){return r}}function Z1(r,t,e,i,s,n){for(var o=0,a,u=t.length,l=n.length;o<l;++o)(a=t[o])?(a.__data__=n[o],i[o]=a):e[o]=new gs(r,n[o]);for(;o<u;++o)(a=t[o])&&(s[o]=a)}function Q1(r,t,e,i,s,n,o){var a,u,l=new Map,c=t.length,h=n.length,d=new Array(c),f;for(a=0;a<c;++a)(u=t[a])&&(d[a]=f=o.call(u,u.__data__,a,t)+"",l.has(f)?s[a]=u:l.set(f,u));for(a=0;a<h;++a)f=o.call(r,n[a],a,n)+"",(u=l.get(f))?(i[a]=u,u.__data__=n[a],l.delete(f)):e[a]=new gs(r,n[a]);for(a=0;a<c;++a)(u=t[a])&&l.get(d[a])===u&&(s[a]=u)}function J1(r){return r.__data__}function pd(r,t){if(!arguments.length)return Array.from(this,J1);var e=t?Q1:Z1,i=this._parents,s=this._groups;typeof r!="function"&&(r=dd(r));for(var n=s.length,o=new Array(n),a=new Array(n),u=new Array(n),l=0;l<n;++l){var c=i[l],h=s[l],d=h.length,f=tw(r.call(c,c&&c.__data__,l,i)),m=f.length,g=a[l]=new Array(m),x=o[l]=new Array(m),_=u[l]=new Array(d);e(c,h,g,x,_,f,t);for(var v=0,T=0,y,C;v<m;++v)if(y=g[v]){for(v>=T&&(T=v+1);!(C=x[T])&&++T<m;);y._next=C||null}}return o=new bt(o,i),o._enter=a,o._exit=u,o}function tw(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}function md(){return new bt(this._exit||this._groups.map(Fo),this._parents)}function gd(r,t,e){var i=this.enter(),s=this,n=this.exit();return typeof r=="function"?(i=r(i),i&&(i=i.selection())):i=i.append(r+""),t!=null&&(s=t(s),s&&(s=s.selection())),e==null?n.remove():e(n),i&&s?i.merge(s).order():s}function xd(r){for(var t=r.selection?r.selection():r,e=this._groups,i=t._groups,s=e.length,n=i.length,o=Math.min(s,n),a=new Array(s),u=0;u<o;++u)for(var l=e[u],c=i[u],h=l.length,d=a[u]=new Array(h),f,m=0;m<h;++m)(f=l[m]||c[m])&&(d[m]=f);for(;u<s;++u)a[u]=e[u];return new bt(a,this._parents)}function _d(){for(var r=this._groups,t=-1,e=r.length;++t<e;)for(var i=r[t],s=i.length-1,n=i[s],o;--s>=0;)(o=i[s])&&(n&&o.compareDocumentPosition(n)^4&&n.parentNode.insertBefore(o,n),n=o);return this}function yd(r){r||(r=ew);function t(h,d){return h&&d?r(h.__data__,d.__data__):!h-!d}for(var e=this._groups,i=e.length,s=new Array(i),n=0;n<i;++n){for(var o=e[n],a=o.length,u=s[n]=new Array(a),l,c=0;c<a;++c)(l=o[c])&&(u[c]=l);u.sort(t)}return new bt(s,this._parents).order()}function ew(r,t){return r<t?-1:r>t?1:r>=t?0:NaN}function bd(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function vd(){return Array.from(this)}function Td(){for(var r=this._groups,t=0,e=r.length;t<e;++t)for(var i=r[t],s=0,n=i.length;s<n;++s){var o=i[s];if(o)return o}return null}function Sd(){let r=0;for(let t of this)++r;return r}function wd(){return!this.node()}function Ed(r){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var s=t[e],n=0,o=s.length,a;n<o;++n)(a=s[n])&&r.call(a,a.__data__,n,s);return this}function rw(r){return function(){this.removeAttribute(r)}}function iw(r){return function(){this.removeAttributeNS(r.space,r.local)}}function sw(r,t){return function(){this.setAttribute(r,t)}}function nw(r,t){return function(){this.setAttributeNS(r.space,r.local,t)}}function ow(r,t){return function(){var e=t.apply(this,arguments);e==null?this.removeAttribute(r):this.setAttribute(r,e)}}function aw(r,t){return function(){var e=t.apply(this,arguments);e==null?this.removeAttributeNS(r.space,r.local):this.setAttributeNS(r.space,r.local,e)}}function Cd(r,t){var e=Qe(r);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((t==null?e.local?iw:rw:typeof t=="function"?e.local?aw:ow:e.local?nw:sw)(e,t))}function Ro(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function uw(r){return function(){this.style.removeProperty(r)}}function lw(r,t,e){return function(){this.style.setProperty(r,t,e)}}function cw(r,t,e){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(r):this.style.setProperty(r,i,e)}}function Ad(r,t,e){return arguments.length>1?this.each((t==null?uw:typeof t=="function"?cw:lw)(r,t,e??"")):pr(this.node(),r)}function pr(r,t){return r.style.getPropertyValue(t)||Ro(r).getComputedStyle(r,null).getPropertyValue(t)}function hw(r){return function(){delete this[r]}}function fw(r,t){return function(){this[r]=t}}function dw(r,t){return function(){var e=t.apply(this,arguments);e==null?delete this[r]:this[r]=e}}function Dd(r,t){return arguments.length>1?this.each((t==null?hw:typeof t=="function"?dw:fw)(r,t)):this.node()[r]}function Pd(r){return r.trim().split(/^|\\s+/)}function rl(r){return r.classList||new Bd(r)}function Bd(r){this._node=r,this._names=Pd(r.getAttribute("class")||"")}Bd.prototype={add:function(r){var t=this._names.indexOf(r);t<0&&(this._names.push(r),this._node.setAttribute("class",this._names.join(" ")))},remove:function(r){var t=this._names.indexOf(r);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(r){return this._names.indexOf(r)>=0}};function Md(r,t){for(var e=rl(r),i=-1,s=t.length;++i<s;)e.add(t[i])}function Fd(r,t){for(var e=rl(r),i=-1,s=t.length;++i<s;)e.remove(t[i])}function pw(r){return function(){Md(this,r)}}function mw(r){return function(){Fd(this,r)}}function gw(r,t){return function(){(t.apply(this,arguments)?Md:Fd)(this,r)}}function Rd(r,t){var e=Pd(r+"");if(arguments.length<2){for(var i=rl(this.node()),s=-1,n=e.length;++s<n;)if(!i.contains(e[s]))return!1;return!0}return this.each((typeof t=="function"?gw:t?pw:mw)(e,t))}function xw(){this.textContent=""}function _w(r){return function(){this.textContent=r}}function yw(r){return function(){var t=r.apply(this,arguments);this.textContent=t??""}}function kd(r){return arguments.length?this.each(r==null?xw:(typeof r=="function"?yw:_w)(r)):this.node().textContent}function bw(){this.innerHTML=""}function vw(r){return function(){this.innerHTML=r}}function Tw(r){return function(){var t=r.apply(this,arguments);this.innerHTML=t??""}}function Gd(r){return arguments.length?this.each(r==null?bw:(typeof r=="function"?Tw:vw)(r)):this.node().innerHTML}function Sw(){this.nextSibling&&this.parentNode.appendChild(this)}function Id(){return this.each(Sw)}function ww(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ud(){return this.each(ww)}function Od(r){var t=typeof r=="function"?r:Bo(r);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ew(){return null}function Ld(r,t){var e=typeof r=="function"?r:Bo(r),i=t==null?Ew:typeof t=="function"?t:Ir(t);return this.select(function(){return this.insertBefore(e.apply(this,arguments),i.apply(this,arguments)||null)})}function Cw(){var r=this.parentNode;r&&r.removeChild(this)}function Nd(){return this.each(Cw)}function Aw(){var r=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(r,this.nextSibling):r}function Dw(){var r=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(r,this.nextSibling):r}function Hd(r){return this.select(r?Dw:Aw)}function zd(r){return arguments.length?this.property("__data__",r):this.node().__data__}function Pw(r){return function(t){r.call(this,t,this.__data__)}}function Bw(r){return r.trim().split(/^|\\s+/).map(function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}})}function Mw(r){return function(){var t=this.__on;if(t){for(var e=0,i=-1,s=t.length,n;e<s;++e)n=t[e],(!r.type||n.type===r.type)&&n.name===r.name?this.removeEventListener(n.type,n.listener,n.options):t[++i]=n;++i?t.length=i:delete this.__on}}}function Fw(r,t,e){return function(){var i=this.__on,s,n=Pw(t);if(i){for(var o=0,a=i.length;o<a;++o)if((s=i[o]).type===r.type&&s.name===r.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=n,s.options=e),s.value=t;return}}this.addEventListener(r.type,n,e),s={type:r.type,name:r.name,value:t,listener:n,options:e},i?i.push(s):this.__on=[s]}}function Wd(r,t,e){var i=Bw(r+""),s,n=i.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,l=a.length,c;u<l;++u)for(s=0,c=a[u];s<n;++s)if((o=i[s]).type===c.type&&o.name===c.name)return c.value}return}for(a=t?Fw:Mw,s=0;s<n;++s)this.each(a(i[s],t,e));return this}function Vd(r,t,e){var i=Ro(r),s=i.CustomEvent;typeof s=="function"?s=new s(t,e):(s=i.document.createEvent("Event"),e?(s.initEvent(t,e.bubbles,e.cancelable),s.detail=e.detail):s.initEvent(t,!1,!1)),r.dispatchEvent(s)}function Rw(r,t){return function(){return Vd(this,r,t)}}function kw(r,t){return function(){return Vd(this,r,t.apply(this,arguments))}}function Xd(r,t){return this.each((typeof t=="function"?kw:Rw)(r,t))}function*$d(){for(var r=this._groups,t=0,e=r.length;t<e;++t)for(var i=r[t],s=0,n=i.length,o;s<n;++s)(o=i[s])&&(yield o)}var il=[null];function bt(r,t){this._groups=r,this._parents=t}function jd(){return new bt([[document.documentElement]],il)}function Gw(){return this}bt.prototype=jd.prototype={constructor:bt,select:ad,selectAll:ud,selectChild:ld,selectChildren:cd,filter:hd,data:pd,enter:fd,exit:md,join:gd,merge:xd,selection:Gw,order:_d,sort:yd,call:bd,nodes:vd,node:Td,size:Sd,empty:wd,each:Ed,attr:Cd,style:Ad,property:Dd,classed:Rd,text:kd,html:Gd,raise:Id,lower:Ud,append:Od,insert:Ld,remove:Nd,clone:Hd,datum:zd,on:Wd,dispatch:Xd,[Symbol.iterator]:$d};var Je=jd;function Wt(r){return typeof r=="string"?new bt([[document.querySelector(r)]],[document.documentElement]):new bt([[r]],il)}function Yd(r){let t;for(;t=r.sourceEvent;)r=t;return r}function pe(r,t){if(r=Yd(r),t===void 0&&(t=r.currentTarget),t){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var i=e.createSVGPoint();return i.x=r.clientX,i.y=r.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[r.clientX-s.left-t.clientLeft,r.clientY-s.top-t.clientTop]}}return[r.pageX,r.pageY]}var Kd={passive:!1},Ur={capture:!0,passive:!1};function ko(r){r.stopImmediatePropagation()}function mr(r){r.preventDefault(),r.stopImmediatePropagation()}function xs(r){var t=r.document.documentElement,e=Wt(r).on("dragstart.drag",mr,Ur);"onselectstart"in t?e.on("selectstart.drag",mr,Ur):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function _s(r,t){var e=r.document.documentElement,i=Wt(r).on("dragstart.drag",null);t&&(i.on("click.drag",mr,Ur),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in e?i.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}var ys=r=>()=>r;function bs(r,{sourceEvent:t,subject:e,target:i,identifier:s,active:n,x:o,y:a,dx:u,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:e,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:n,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}bs.prototype.on=function(){var r=this._.on.apply(this._,arguments);return r===this._?this:r};function Iw(r){return!r.ctrlKey&&!r.button}function Uw(){return this.parentNode}function Ow(r,t){return t??{x:r.x,y:r.y}}function Lw(){return navigator.maxTouchPoints||"ontouchstart"in this}function sl(){var r=Iw,t=Uw,e=Ow,i=Lw,s={},n=Ze("start","drag","end"),o=0,a,u,l,c,h=0;function d(y){y.on("mousedown.drag",f).filter(i).on("touchstart.drag",x).on("touchmove.drag",_,Kd).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(y,C){if(!(c||!r.call(this,y,C))){var S=T(this,t.call(this,y,C),y,C,"mouse");S&&(Wt(y.view).on("mousemove.drag",m,Ur).on("mouseup.drag",g,Ur),xs(y.view),ko(y),l=!1,a=y.clientX,u=y.clientY,S("start",y))}}function m(y){if(mr(y),!l){var C=y.clientX-a,S=y.clientY-u;l=C*C+S*S>h}s.mouse("drag",y)}function g(y){Wt(y.view).on("mousemove.drag mouseup.drag",null),_s(y.view,l),mr(y),s.mouse("end",y)}function x(y,C){if(r.call(this,y,C)){var S=y.changedTouches,E=t.call(this,y,C),P=S.length,U,M;for(U=0;U<P;++U)(M=T(this,E,y,C,S[U].identifier,S[U]))&&(ko(y),M("start",y,S[U]))}}function _(y){var C=y.changedTouches,S=C.length,E,P;for(E=0;E<S;++E)(P=s[C[E].identifier])&&(mr(y),P("drag",y,C[E]))}function v(y){var C=y.changedTouches,S=C.length,E,P;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<S;++E)(P=s[C[E].identifier])&&(ko(y),P("end",y,C[E]))}function T(y,C,S,E,P,U){var M=n.copy(),k=pe(U||S,C),N,q,w;if((w=e.call(y,new bs("beforestart",{sourceEvent:S,target:d,identifier:P,active:o,x:k[0],y:k[1],dx:0,dy:0,dispatch:M}),E))!=null)return N=w.x-k[0]||0,q=w.y-k[1]||0,function L(A,B,$){var O=k,V;switch(A){case"start":s[P]=L,V=o++;break;case"end":delete s[P],--o;case"drag":k=pe($||B,C),V=o;break}M.call(A,y,new bs(A,{sourceEvent:B,subject:w,target:d,identifier:P,active:V,x:k[0]+N,y:k[1]+q,dx:k[0]-O[0],dy:k[1]-O[1],dispatch:M}),E)}}return d.filter=function(y){return arguments.length?(r=typeof y=="function"?y:ys(!!y),d):r},d.container=function(y){return arguments.length?(t=typeof y=="function"?y:ys(y),d):t},d.subject=function(y){return arguments.length?(e=typeof y=="function"?y:ys(y),d):e},d.touchable=function(y){return arguments.length?(i=typeof y=="function"?y:ys(!!y),d):i},d.on=function(){var y=n.on.apply(n,arguments);return y===n?d:y},d.clickDistance=function(y){return arguments.length?(h=(y=+y)*y,d):Math.sqrt(h)},d}function Go(r,t,e){r.prototype=t.prototype=e,e.constructor=r}function nl(r,t){var e=Object.create(r.prototype);for(var i in t)e[i]=t[i];return e}function Ss(){}var vs=.7,Oo=1/vs,fi="\\\\s*([+-]?\\\\d+)\\\\s*",Ts="\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*",Ge="\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*",Nw=/^#([0-9a-f]{3,8})$/,Hw=new RegExp(`^rgb\\\\(${fi},${fi},${fi}\\\\)$`),zw=new RegExp(`^rgb\\\\(${Ge},${Ge},${Ge}\\\\)$`),Ww=new RegExp(`^rgba\\\\(${fi},${fi},${fi},${Ts}\\\\)$`),Vw=new RegExp(`^rgba\\\\(${Ge},${Ge},${Ge},${Ts}\\\\)$`),Xw=new RegExp(`^hsl\\\\(${Ts},${Ge},${Ge}\\\\)$`),$w=new RegExp(`^hsla\\\\(${Ts},${Ge},${Ge},${Ts}\\\\)$`),qd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Go(Ss,gr,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:Zd,formatHex:Zd,formatHex8:jw,formatHsl:Yw,formatRgb:Qd,toString:Qd});function Zd(){return this.rgb().formatHex()}function jw(){return this.rgb().formatHex8()}function Yw(){return sp(this).formatHsl()}function Qd(){return this.rgb().formatRgb()}function gr(r){var t,e;return r=(r+"").trim().toLowerCase(),(t=Nw.exec(r))?(e=t[1].length,t=parseInt(t[1],16),e===6?Jd(t):e===3?new se(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):e===8?Io(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):e===4?Io(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Hw.exec(r))?new se(t[1],t[2],t[3],1):(t=zw.exec(r))?new se(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ww.exec(r))?Io(t[1],t[2],t[3],t[4]):(t=Vw.exec(r))?Io(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Xw.exec(r))?rp(t[1],t[2]/100,t[3]/100,1):(t=$w.exec(r))?rp(t[1],t[2]/100,t[3]/100,t[4]):qd.hasOwnProperty(r)?Jd(qd[r]):r==="transparent"?new se(NaN,NaN,NaN,0):null}function Jd(r){return new se(r>>16&255,r>>8&255,r&255,1)}function Io(r,t,e,i){return i<=0&&(r=t=e=NaN),new se(r,t,e,i)}function Kw(r){return r instanceof Ss||(r=gr(r)),r?(r=r.rgb(),new se(r.r,r.g,r.b,r.opacity)):new se}function di(r,t,e,i){return arguments.length===1?Kw(r):new se(r,t,e,i??1)}function se(r,t,e,i){this.r=+r,this.g=+t,this.b=+e,this.opacity=+i}Go(se,di,nl(Ss,{brighter(r){return r=r==null?Oo:Math.pow(Oo,r),new se(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?vs:Math.pow(vs,r),new se(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new se(Lr(this.r),Lr(this.g),Lr(this.b),Lo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tp,formatHex:tp,formatHex8:qw,formatRgb:ep,toString:ep}));function tp(){return`#${Or(this.r)}${Or(this.g)}${Or(this.b)}`}function qw(){return`#${Or(this.r)}${Or(this.g)}${Or(this.b)}${Or((isNaN(this.opacity)?1:this.opacity)*255)}`}function ep(){let r=Lo(this.opacity);return`${r===1?"rgb(":"rgba("}${Lr(this.r)}, ${Lr(this.g)}, ${Lr(this.b)}${r===1?")":`, ${r})`}`}function Lo(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Lr(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Or(r){return r=Lr(r),(r<16?"0":"")+r.toString(16)}function rp(r,t,e,i){return i<=0?r=t=e=NaN:e<=0||e>=1?r=t=NaN:t<=0&&(r=NaN),new we(r,t,e,i)}function sp(r){if(r instanceof we)return new we(r.h,r.s,r.l,r.opacity);if(r instanceof Ss||(r=gr(r)),!r)return new we;if(r instanceof we)return r;r=r.rgb();var t=r.r/255,e=r.g/255,i=r.b/255,s=Math.min(t,e,i),n=Math.max(t,e,i),o=NaN,a=n-s,u=(n+s)/2;return a?(t===n?o=(e-i)/a+(e<i)*6:e===n?o=(i-t)/a+2:o=(t-e)/a+4,a/=u<.5?n+s:2-n-s,o*=60):a=u>0&&u<1?0:o,new we(o,a,u,r.opacity)}function np(r,t,e,i){return arguments.length===1?sp(r):new we(r,t,e,i??1)}function we(r,t,e,i){this.h=+r,this.s=+t,this.l=+e,this.opacity=+i}Go(we,np,nl(Ss,{brighter(r){return r=r==null?Oo:Math.pow(Oo,r),new we(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?vs:Math.pow(vs,r),new we(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,t=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*t,s=2*e-i;return new se(ol(r>=240?r-240:r+120,s,i),ol(r,s,i),ol(r<120?r+240:r-120,s,i),this.opacity)},clamp(){return new we(ip(this.h),Uo(this.s),Uo(this.l),Lo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let r=Lo(this.opacity);return`${r===1?"hsl(":"hsla("}${ip(this.h)}, ${Uo(this.s)*100}%, ${Uo(this.l)*100}%${r===1?")":`, ${r})`}`}}));function ip(r){return r=(r||0)%360,r<0?r+360:r}function Uo(r){return Math.max(0,Math.min(1,r||0))}function ol(r,t,e){return(r<60?t+(e-t)*r/60:r<180?e:r<240?t+(e-t)*(240-r)/60:t)*255}function al(r,t,e,i,s){var n=r*r,o=n*r;return((1-3*r+3*n-o)*t+(4-6*n+3*o)*e+(1+3*r+3*n-3*o)*i+o*s)/6}function op(r){var t=r.length-1;return function(e){var i=e<=0?e=0:e>=1?(e=1,t-1):Math.floor(e*t),s=r[i],n=r[i+1],o=i>0?r[i-1]:2*s-n,a=i<t-1?r[i+2]:2*n-s;return al((e-i/t)*t,o,s,n,a)}}function ap(r){var t=r.length;return function(e){var i=Math.floor(((e%=1)<0?++e:e)*t),s=r[(i+t-1)%t],n=r[i%t],o=r[(i+1)%t],a=r[(i+2)%t];return al((e-i/t)*t,s,n,o,a)}}var ul=r=>()=>r;function Zw(r,t){return function(e){return r+e*t}}function Qw(r,t,e){return r=Math.pow(r,e),t=Math.pow(t,e)-r,e=1/e,function(i){return Math.pow(r+i*t,e)}}function up(r){return(r=+r)==1?No:function(t,e){return e-t?Qw(t,e,r):ul(isNaN(t)?e:t)}}function No(r,t){var e=t-r;return e?Zw(r,e):ul(isNaN(r)?t:r)}var Ho=function r(t){var e=up(t);function i(s,n){var o=e((s=di(s)).r,(n=di(n)).r),a=e(s.g,n.g),u=e(s.b,n.b),l=No(s.opacity,n.opacity);return function(c){return s.r=o(c),s.g=a(c),s.b=u(c),s.opacity=l(c),s+""}}return i.gamma=r,i}(1);function lp(r){return function(t){var e=t.length,i=new Array(e),s=new Array(e),n=new Array(e),o,a;for(o=0;o<e;++o)a=di(t[o]),i[o]=a.r||0,s[o]=a.g||0,n[o]=a.b||0;return i=r(i),s=r(s),n=r(n),a.opacity=1,function(u){return a.r=i(u),a.g=s(u),a.b=n(u),a+""}}}var Jw=lp(op),tE=lp(ap);function me(r,t){return r=+r,t=+t,function(e){return r*(1-e)+t*e}}var cl=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,ll=new RegExp(cl.source,"g");function eE(r){return function(){return r}}function rE(r){return function(t){return r(t)+""}}function hl(r,t){var e=cl.lastIndex=ll.lastIndex=0,i,s,n,o=-1,a=[],u=[];for(r=r+"",t=t+"";(i=cl.exec(r))&&(s=ll.exec(t));)(n=s.index)>e&&(n=t.slice(e,n),a[o]?a[o]+=n:a[++o]=n),(i=i[0])===(s=s[0])?a[o]?a[o]+=s:a[++o]=s:(a[++o]=null,u.push({i:o,x:me(i,s)})),e=ll.lastIndex;return e<t.length&&(n=t.slice(e),a[o]?a[o]+=n:a[++o]=n),a.length<2?u[0]?rE(u[0].x):eE(t):(t=u.length,function(l){for(var c=0,h;c<t;++c)a[(h=u[c]).i]=h.x(l);return a.join("")})}var cp=180/Math.PI,zo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fl(r,t,e,i,s,n){var o,a,u;return(o=Math.sqrt(r*r+t*t))&&(r/=o,t/=o),(u=r*e+t*i)&&(e-=r*u,i-=t*u),(a=Math.sqrt(e*e+i*i))&&(e/=a,i/=a,u/=a),r*i<t*e&&(r=-r,t=-t,u=-u,o=-o),{translateX:s,translateY:n,rotate:Math.atan2(t,r)*cp,skewX:Math.atan(u)*cp,scaleX:o,scaleY:a}}var Wo;function hp(r){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return t.isIdentity?zo:fl(t.a,t.b,t.c,t.d,t.e,t.f)}function fp(r){return r==null?zo:(Wo||(Wo=document.createElementNS("http://www.w3.org/2000/svg","g")),Wo.setAttribute("transform",r),(r=Wo.transform.baseVal.consolidate())?(r=r.matrix,fl(r.a,r.b,r.c,r.d,r.e,r.f)):zo)}function dp(r,t,e,i){function s(l){return l.length?l.pop()+" ":""}function n(l,c,h,d,f,m){if(l!==h||c!==d){var g=f.push("translate(",null,t,null,e);m.push({i:g-4,x:me(l,h)},{i:g-2,x:me(c,d)})}else(h||d)&&f.push("translate("+h+t+d+e)}function o(l,c,h,d){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),d.push({i:h.push(s(h)+"rotate(",null,i)-2,x:me(l,c)})):c&&h.push(s(h)+"rotate("+c+i)}function a(l,c,h,d){l!==c?d.push({i:h.push(s(h)+"skewX(",null,i)-2,x:me(l,c)}):c&&h.push(s(h)+"skewX("+c+i)}function u(l,c,h,d,f,m){if(l!==h||c!==d){var g=f.push(s(f)+"scale(",null,",",null,")");m.push({i:g-4,x:me(l,h)},{i:g-2,x:me(c,d)})}else(h!==1||d!==1)&&f.push(s(f)+"scale("+h+","+d+")")}return function(l,c){var h=[],d=[];return l=r(l),c=r(c),n(l.translateX,l.translateY,c.translateX,c.translateY,h,d),o(l.rotate,c.rotate,h,d),a(l.skewX,c.skewX,h,d),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,d),l=c=null,function(f){for(var m=-1,g=d.length,x;++m<g;)h[(x=d[m]).i]=x.x(f);return h.join("")}}}var dl=dp(hp,"px, ","px)","deg)"),pl=dp(fp,", ",")",")");var iE=1e-12;function pp(r){return((r=Math.exp(r))+1/r)/2}function sE(r){return((r=Math.exp(r))-1/r)/2}function nE(r){return((r=Math.exp(2*r))-1)/(r+1)}var ml=function r(t,e,i){function s(n,o){var a=n[0],u=n[1],l=n[2],c=o[0],h=o[1],d=o[2],f=c-a,m=h-u,g=f*f+m*m,x,_;if(g<iE)_=Math.log(d/l)/t,x=function(E){return[a+E*f,u+E*m,l*Math.exp(t*E*_)]};else{var v=Math.sqrt(g),T=(d*d-l*l+i*g)/(2*l*e*v),y=(d*d-l*l-i*g)/(2*d*e*v),C=Math.log(Math.sqrt(T*T+1)-T),S=Math.log(Math.sqrt(y*y+1)-y);_=(S-C)/t,x=function(E){var P=E*_,U=pp(C),M=l/(e*v)*(U*nE(t*P+C)-sE(C));return[a+M*f,u+M*m,l*U/pp(t*P+C)]}}return x.duration=_*1e3*t/Math.SQRT2,x}return s.rho=function(n){var o=Math.max(.001,+n),a=o*o,u=a*a;return r(o,a,u)},s}(Math.SQRT2,2,4);var pi=0,Es=0,ws=0,gp=1e3,Vo,Cs,Xo=0,Nr=0,$o=0,As=typeof performance=="object"&&performance.now?performance:Date,xp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Ps(){return Nr||(xp(oE),Nr=As.now()+$o)}function oE(){Nr=0}function Ds(){this._call=this._time=this._next=null}Ds.prototype=mi.prototype={constructor:Ds,restart:function(r,t,e){if(typeof r!="function")throw new TypeError("callback is not a function");e=(e==null?Ps():+e)+(t==null?0:+t),!this._next&&Cs!==this&&(Cs?Cs._next=this:Vo=this,Cs=this),this._call=r,this._time=e,gl()},stop:function(){this._call&&(this._call=null,this._time=1/0,gl())}};function mi(r,t,e){var i=new Ds;return i.restart(r,t,e),i}function _p(){Ps(),++pi;for(var r=Vo,t;r;)(t=Nr-r._time)>=0&&r._call.call(void 0,t),r=r._next;--pi}function mp(){Nr=(Xo=As.now())+$o,pi=Es=0;try{_p()}finally{pi=0,uE(),Nr=0}}function aE(){var r=As.now(),t=r-Xo;t>gp&&($o-=t,Xo=r)}function uE(){for(var r,t=Vo,e,i=1/0;t;)t._call?(i>t._time&&(i=t._time),r=t,t=t._next):(e=t._next,t._next=null,t=r?r._next=e:Vo=e);Cs=r,gl(i)}function gl(r){if(!pi){Es&&(Es=clearTimeout(Es));var t=r-Nr;t>24?(r<1/0&&(Es=setTimeout(mp,r-As.now()-$o)),ws&&(ws=clearInterval(ws))):(ws||(Xo=As.now(),ws=setInterval(aE,gp)),pi=1,xp(mp))}}function jo(r,t,e){var i=new Ds;return t=t==null?0:+t,i.restart(s=>{i.stop(),r(s+t)},t,e),i}var lE=Ze("start","end","cancel","interrupt"),cE=[],vp=0,yp=1,Ko=2,Yo=3,bp=4,qo=5,Bs=6;function xr(r,t,e,i,s,n){var o=r.__transition;if(!o)r.__transition={};else if(e in o)return;hE(r,e,{name:t,index:i,group:s,on:lE,tween:cE,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:vp})}function Ms(r,t){var e=Ft(r,t);if(e.state>vp)throw new Error("too late; already scheduled");return e}function Ht(r,t){var e=Ft(r,t);if(e.state>Yo)throw new Error("too late; already running");return e}function Ft(r,t){var e=r.__transition;if(!e||!(e=e[t]))throw new Error("transition not found");return e}function hE(r,t,e){var i=r.__transition,s;i[t]=e,e.timer=mi(n,0,e.time);function n(l){e.state=yp,e.timer.restart(o,e.delay,e.time),e.delay<=l&&o(l-e.delay)}function o(l){var c,h,d,f;if(e.state!==yp)return u();for(c in i)if(f=i[c],f.name===e.name){if(f.state===Yo)return jo(o);f.state===bp?(f.state=Bs,f.timer.stop(),f.on.call("interrupt",r,r.__data__,f.index,f.group),delete i[c]):+c<t&&(f.state=Bs,f.timer.stop(),f.on.call("cancel",r,r.__data__,f.index,f.group),delete i[c])}if(jo(function(){e.state===Yo&&(e.state=bp,e.timer.restart(a,e.delay,e.time),a(l))}),e.state=Ko,e.on.call("start",r,r.__data__,e.index,e.group),e.state===Ko){for(e.state=Yo,s=new Array(d=e.tween.length),c=0,h=-1;c<d;++c)(f=e.tween[c].value.call(r,r.__data__,e.index,e.group))&&(s[++h]=f);s.length=h+1}}function a(l){for(var c=l<e.duration?e.ease.call(null,l/e.duration):(e.timer.restart(u),e.state=qo,1),h=-1,d=s.length;++h<d;)s[h].call(r,c);e.state===qo&&(e.on.call("end",r,r.__data__,e.index,e.group),u())}function u(){e.state=Bs,e.timer.stop(),delete i[t];for(var l in i)return;delete r.__transition}}function _r(r,t){var e=r.__transition,i,s,n=!0,o;if(e){t=t==null?null:t+"";for(o in e){if((i=e[o]).name!==t){n=!1;continue}s=i.state>Ko&&i.state<qo,i.state=Bs,i.timer.stop(),i.on.call(s?"interrupt":"cancel",r,r.__data__,i.index,i.group),delete e[o]}n&&delete r.__transition}}function Tp(r){return this.each(function(){_r(this,r)})}function fE(r,t){var e,i;return function(){var s=Ht(this,r),n=s.tween;if(n!==e){i=e=n;for(var o=0,a=i.length;o<a;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function dE(r,t,e){var i,s;if(typeof e!="function")throw new Error;return function(){var n=Ht(this,r),o=n.tween;if(o!==i){s=(i=o).slice();for(var a={name:t,value:e},u=0,l=s.length;u<l;++u)if(s[u].name===t){s[u]=a;break}u===l&&s.push(a)}n.tween=s}}function Sp(r,t){var e=this._id;if(r+="",arguments.length<2){for(var i=Ft(this.node(),e).tween,s=0,n=i.length,o;s<n;++s)if((o=i[s]).name===r)return o.value;return null}return this.each((t==null?fE:dE)(e,r,t))}function gi(r,t,e){var i=r._id;return r.each(function(){var s=Ht(this,i);(s.value||(s.value={}))[t]=e.apply(this,arguments)}),function(s){return Ft(s,i).value[t]}}function Zo(r,t){var e;return(typeof t=="number"?me:t instanceof gr?Ho:(e=gr(t))?(t=e,Ho):hl)(r,t)}function pE(r){return function(){this.removeAttribute(r)}}function mE(r){return function(){this.removeAttributeNS(r.space,r.local)}}function gE(r,t,e){var i,s=e+"",n;return function(){var o=this.getAttribute(r);return o===s?null:o===i?n:n=t(i=o,e)}}function xE(r,t,e){var i,s=e+"",n;return function(){var o=this.getAttributeNS(r.space,r.local);return o===s?null:o===i?n:n=t(i=o,e)}}function _E(r,t,e){var i,s,n;return function(){var o,a=e(this),u;return a==null?void this.removeAttribute(r):(o=this.getAttribute(r),u=a+"",o===u?null:o===i&&u===s?n:(s=u,n=t(i=o,a)))}}function yE(r,t,e){var i,s,n;return function(){var o,a=e(this),u;return a==null?void this.removeAttributeNS(r.space,r.local):(o=this.getAttributeNS(r.space,r.local),u=a+"",o===u?null:o===i&&u===s?n:(s=u,n=t(i=o,a)))}}function wp(r,t){var e=Qe(r),i=e==="transform"?pl:Zo;return this.attrTween(r,typeof t=="function"?(e.local?yE:_E)(e,i,gi(this,"attr."+r,t)):t==null?(e.local?mE:pE)(e):(e.local?xE:gE)(e,i,t))}function bE(r,t){return function(e){this.setAttribute(r,t.call(this,e))}}function vE(r,t){return function(e){this.setAttributeNS(r.space,r.local,t.call(this,e))}}function TE(r,t){var e,i;function s(){var n=t.apply(this,arguments);return n!==i&&(e=(i=n)&&vE(r,n)),e}return s._value=t,s}function SE(r,t){var e,i;function s(){var n=t.apply(this,arguments);return n!==i&&(e=(i=n)&&bE(r,n)),e}return s._value=t,s}function Ep(r,t){var e="attr."+r;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;var i=Qe(r);return this.tween(e,(i.local?TE:SE)(i,t))}function wE(r,t){return function(){Ms(this,r).delay=+t.apply(this,arguments)}}function EE(r,t){return t=+t,function(){Ms(this,r).delay=t}}function Cp(r){var t=this._id;return arguments.length?this.each((typeof r=="function"?wE:EE)(t,r)):Ft(this.node(),t).delay}function CE(r,t){return function(){Ht(this,r).duration=+t.apply(this,arguments)}}function AE(r,t){return t=+t,function(){Ht(this,r).duration=t}}function Ap(r){var t=this._id;return arguments.length?this.each((typeof r=="function"?CE:AE)(t,r)):Ft(this.node(),t).duration}function DE(r,t){if(typeof t!="function")throw new Error;return function(){Ht(this,r).ease=t}}function Dp(r){var t=this._id;return arguments.length?this.each(DE(t,r)):Ft(this.node(),t).ease}function PE(r,t){return function(){var e=t.apply(this,arguments);if(typeof e!="function")throw new Error;Ht(this,r).ease=e}}function Pp(r){if(typeof r!="function")throw new Error;return this.each(PE(this._id,r))}function Bp(r){typeof r!="function"&&(r=ms(r));for(var t=this._groups,e=t.length,i=new Array(e),s=0;s<e;++s)for(var n=t[s],o=n.length,a=i[s]=[],u,l=0;l<o;++l)(u=n[l])&&r.call(u,u.__data__,l,n)&&a.push(u);return new Kt(i,this._parents,this._name,this._id)}function Mp(r){if(r._id!==this._id)throw new Error;for(var t=this._groups,e=r._groups,i=t.length,s=e.length,n=Math.min(i,s),o=new Array(i),a=0;a<n;++a)for(var u=t[a],l=e[a],c=u.length,h=o[a]=new Array(c),d,f=0;f<c;++f)(d=u[f]||l[f])&&(h[f]=d);for(;a<i;++a)o[a]=t[a];return new Kt(o,this._parents,this._name,this._id)}function BE(r){return(r+"").trim().split(/^|\\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||t==="start"})}function ME(r,t,e){var i,s,n=BE(t)?Ms:Ht;return function(){var o=n(this,r),a=o.on;a!==i&&(s=(i=a).copy()).on(t,e),o.on=s}}function Fp(r,t){var e=this._id;return arguments.length<2?Ft(this.node(),e).on.on(r):this.each(ME(e,r,t))}function FE(r){return function(){var t=this.parentNode;for(var e in this.__transition)if(+e!==r)return;t&&t.removeChild(this)}}function Rp(){return this.on("end.remove",FE(this._id))}function kp(r){var t=this._name,e=this._id;typeof r!="function"&&(r=Ir(r));for(var i=this._groups,s=i.length,n=new Array(s),o=0;o<s;++o)for(var a=i[o],u=a.length,l=n[o]=new Array(u),c,h,d=0;d<u;++d)(c=a[d])&&(h=r.call(c,c.__data__,d,a))&&("__data__"in c&&(h.__data__=c.__data__),l[d]=h,xr(l[d],t,e,d,l,Ft(c,e)));return new Kt(n,this._parents,t,e)}function Gp(r){var t=this._name,e=this._id;typeof r!="function"&&(r=ps(r));for(var i=this._groups,s=i.length,n=[],o=[],a=0;a<s;++a)for(var u=i[a],l=u.length,c,h=0;h<l;++h)if(c=u[h]){for(var d=r.call(c,c.__data__,h,u),f,m=Ft(c,e),g=0,x=d.length;g<x;++g)(f=d[g])&&xr(f,t,e,g,d,m);n.push(d),o.push(c)}return new Kt(n,o,t,e)}var RE=Je.prototype.constructor;function Ip(){return new RE(this._groups,this._parents)}function kE(r,t){var e,i,s;return function(){var n=pr(this,r),o=(this.style.removeProperty(r),pr(this,r));return n===o?null:n===e&&o===i?s:s=t(e=n,i=o)}}function Up(r){return function(){this.style.removeProperty(r)}}function GE(r,t,e){var i,s=e+"",n;return function(){var o=pr(this,r);return o===s?null:o===i?n:n=t(i=o,e)}}function IE(r,t,e){var i,s,n;return function(){var o=pr(this,r),a=e(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(r),pr(this,r))),o===u?null:o===i&&u===s?n:(s=u,n=t(i=o,a))}}function UE(r,t){var e,i,s,n="style."+t,o="end."+n,a;return function(){var u=Ht(this,r),l=u.on,c=u.value[n]==null?a||(a=Up(t)):void 0;(l!==e||s!==c)&&(i=(e=l).copy()).on(o,s=c),u.on=i}}function Op(r,t,e){var i=(r+="")=="transform"?dl:Zo;return t==null?this.styleTween(r,kE(r,i)).on("end.style."+r,Up(r)):typeof t=="function"?this.styleTween(r,IE(r,i,gi(this,"style."+r,t))).each(UE(this._id,r)):this.styleTween(r,GE(r,i,t),e).on("end.style."+r,null)}function OE(r,t,e){return function(i){this.style.setProperty(r,t.call(this,i),e)}}function LE(r,t,e){var i,s;function n(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&OE(r,o,e)),i}return n._value=t,n}function Lp(r,t,e){var i="style."+(r+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,LE(r,t,e??""))}function NE(r){return function(){this.textContent=r}}function HE(r){return function(){var t=r(this);this.textContent=t??""}}function Np(r){return this.tween("text",typeof r=="function"?HE(gi(this,"text",r)):NE(r==null?"":r+""))}function zE(r){return function(t){this.textContent=r.call(this,t)}}function WE(r){var t,e;function i(){var s=r.apply(this,arguments);return s!==e&&(t=(e=s)&&zE(s)),t}return i._value=r,i}function Hp(r){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(r==null)return this.tween(t,null);if(typeof r!="function")throw new Error;return this.tween(t,WE(r))}function zp(){for(var r=this._name,t=this._id,e=Qo(),i=this._groups,s=i.length,n=0;n<s;++n)for(var o=i[n],a=o.length,u,l=0;l<a;++l)if(u=o[l]){var c=Ft(u,t);xr(u,r,e,l,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Kt(i,this._parents,r,e)}function Wp(){var r,t,e=this,i=e._id,s=e.size();return new Promise(function(n,o){var a={value:o},u={value:function(){--s===0&&n()}};e.each(function(){var l=Ht(this,i),c=l.on;c!==r&&(t=(r=c).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(u)),l.on=t}),s===0&&n()})}var VE=0;function Kt(r,t,e,i){this._groups=r,this._parents=t,this._name=e,this._id=i}function Vp(r){return Je().transition(r)}function Qo(){return++VE}var tr=Je.prototype;Kt.prototype=Vp.prototype={constructor:Kt,select:kp,selectAll:Gp,selectChild:tr.selectChild,selectChildren:tr.selectChildren,filter:Bp,merge:Mp,selection:Ip,transition:zp,call:tr.call,nodes:tr.nodes,node:tr.node,size:tr.size,empty:tr.empty,each:tr.each,on:Fp,attr:wp,attrTween:Ep,style:Op,styleTween:Lp,text:Np,textTween:Hp,remove:Rp,tween:Sp,delay:Cp,duration:Ap,ease:Dp,easeVarying:Pp,end:Wp,[Symbol.iterator]:tr[Symbol.iterator]};function Jo(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var XE={time:null,delay:0,duration:250,ease:Jo};function $E(r,t){for(var e;!(e=r.__transition)||!(e=e[t]);)if(!(r=r.parentNode))throw new Error(`transition ${t} not found`);return e}function Xp(r){var t,e;r instanceof Kt?(t=r._id,r=r._name):(t=Qo(),(e=XE).time=Ps(),r=r==null?null:r+"");for(var i=this._groups,s=i.length,n=0;n<s;++n)for(var o=i[n],a=o.length,u,l=0;l<a;++l)(u=o[l])&&xr(u,r,t,l,o,e||$E(u,t));return new Kt(i,this._parents,r,t)}Je.prototype.interrupt=Tp;Je.prototype.transition=Xp;var{abs:cR,max:hR,min:fR}=Math;function $p(r){return[+r[0],+r[1]]}function jE(r){return[$p(r[0]),$p(r[1])]}var dR={name:"x",handles:["w","e"].map(xl),input:function(r,t){return r==null?null:[[+r[0],t[0][1]],[+r[1],t[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},pR={name:"y",handles:["n","s"].map(xl),input:function(r,t){return r==null?null:[[t[0][0],+r[0]],[t[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},mR={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(xl),input:function(r){return r==null?null:jE(r)},output:function(r){return r}};function xl(r){return{type:r}}function _l(r,t){var e,i=1;r==null&&(r=0),t==null&&(t=0);function s(){var n,o=e.length,a,u=0,l=0;for(n=0;n<o;++n)a=e[n],u+=a.x,l+=a.y;for(u=(u/o-r)*i,l=(l/o-t)*i,n=0;n<o;++n)a=e[n],a.x-=u,a.y-=l}return s.initialize=function(n){e=n},s.x=function(n){return arguments.length?(r=+n,s):r},s.y=function(n){return arguments.length?(t=+n,s):t},s.strength=function(n){return arguments.length?(i=+n,s):i},s}function jp(r){let t=+this._x.call(null,r),e=+this._y.call(null,r);return Yp(this.cover(t,e),t,e,r)}function Yp(r,t,e,i){if(isNaN(t)||isNaN(e))return r;var s,n=r._root,o={data:i},a=r._x0,u=r._y0,l=r._x1,c=r._y1,h,d,f,m,g,x,_,v;if(!n)return r._root=o,r;for(;n.length;)if((g=t>=(h=(a+l)/2))?a=h:l=h,(x=e>=(d=(u+c)/2))?u=d:c=d,s=n,!(n=n[_=x<<1|g]))return s[_]=o,r;if(f=+r._x.call(null,n.data),m=+r._y.call(null,n.data),t===f&&e===m)return o.next=n,s?s[_]=o:r._root=o,r;do s=s?s[_]=new Array(4):r._root=new Array(4),(g=t>=(h=(a+l)/2))?a=h:l=h,(x=e>=(d=(u+c)/2))?u=d:c=d;while((_=x<<1|g)===(v=(m>=d)<<1|f>=h));return s[v]=n,s[_]=o,r}function Kp(r){var t,e,i=r.length,s,n,o=new Array(i),a=new Array(i),u=1/0,l=1/0,c=-1/0,h=-1/0;for(e=0;e<i;++e)isNaN(s=+this._x.call(null,t=r[e]))||isNaN(n=+this._y.call(null,t))||(o[e]=s,a[e]=n,s<u&&(u=s),s>c&&(c=s),n<l&&(l=n),n>h&&(h=n));if(u>c||l>h)return this;for(this.cover(u,l).cover(c,h),e=0;e<i;++e)Yp(this,o[e],a[e],r[e]);return this}function qp(r,t){if(isNaN(r=+r)||isNaN(t=+t))return this;var e=this._x0,i=this._y0,s=this._x1,n=this._y1;if(isNaN(e))s=(e=Math.floor(r))+1,n=(i=Math.floor(t))+1;else{for(var o=s-e||1,a=this._root,u,l;e>r||r>=s||i>t||t>=n;)switch(l=(t<i)<<1|r<e,u=new Array(4),u[l]=a,a=u,o*=2,l){case 0:s=e+o,n=i+o;break;case 1:e=s-o,n=i+o;break;case 2:s=e+o,i=n-o;break;case 3:e=s-o,i=n-o;break}this._root&&this._root.length&&(this._root=a)}return this._x0=e,this._y0=i,this._x1=s,this._y1=n,this}function Zp(){var r=[];return this.visit(function(t){if(!t.length)do r.push(t.data);while(t=t.next)}),r}function Qp(r){return arguments.length?this.cover(+r[0][0],+r[0][1]).cover(+r[1][0],+r[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function kt(r,t,e,i,s){this.node=r,this.x0=t,this.y0=e,this.x1=i,this.y1=s}function Jp(r,t,e){var i,s=this._x0,n=this._y0,o,a,u,l,c=this._x1,h=this._y1,d=[],f=this._root,m,g;for(f&&d.push(new kt(f,s,n,c,h)),e==null?e=1/0:(s=r-e,n=t-e,c=r+e,h=t+e,e*=e);m=d.pop();)if(!(!(f=m.node)||(o=m.x0)>c||(a=m.y0)>h||(u=m.x1)<s||(l=m.y1)<n))if(f.length){var x=(o+u)/2,_=(a+l)/2;d.push(new kt(f[3],x,_,u,l),new kt(f[2],o,_,x,l),new kt(f[1],x,a,u,_),new kt(f[0],o,a,x,_)),(g=(t>=_)<<1|r>=x)&&(m=d[d.length-1],d[d.length-1]=d[d.length-1-g],d[d.length-1-g]=m)}else{var v=r-+this._x.call(null,f.data),T=t-+this._y.call(null,f.data),y=v*v+T*T;if(y<e){var C=Math.sqrt(e=y);s=r-C,n=t-C,c=r+C,h=t+C,i=f.data}}return i}function tm(r){if(isNaN(c=+this._x.call(null,r))||isNaN(h=+this._y.call(null,r)))return this;var t,e=this._root,i,s,n,o=this._x0,a=this._y0,u=this._x1,l=this._y1,c,h,d,f,m,g,x,_;if(!e)return this;if(e.length)for(;;){if((m=c>=(d=(o+u)/2))?o=d:u=d,(g=h>=(f=(a+l)/2))?a=f:l=f,t=e,!(e=e[x=g<<1|m]))return this;if(!e.length)break;(t[x+1&3]||t[x+2&3]||t[x+3&3])&&(i=t,_=x)}for(;e.data!==r;)if(s=e,!(e=e.next))return this;return(n=e.next)&&delete e.next,s?(n?s.next=n:delete s.next,this):t?(n?t[x]=n:delete t[x],(e=t[0]||t[1]||t[2]||t[3])&&e===(t[3]||t[2]||t[1]||t[0])&&!e.length&&(i?i[_]=e:this._root=e),this):(this._root=n,this)}function em(r){for(var t=0,e=r.length;t<e;++t)this.remove(r[t]);return this}function rm(){return this._root}function im(){var r=0;return this.visit(function(t){if(!t.length)do++r;while(t=t.next)}),r}function sm(r){var t=[],e,i=this._root,s,n,o,a,u;for(i&&t.push(new kt(i,this._x0,this._y0,this._x1,this._y1));e=t.pop();)if(!r(i=e.node,n=e.x0,o=e.y0,a=e.x1,u=e.y1)&&i.length){var l=(n+a)/2,c=(o+u)/2;(s=i[3])&&t.push(new kt(s,l,c,a,u)),(s=i[2])&&t.push(new kt(s,n,c,l,u)),(s=i[1])&&t.push(new kt(s,l,o,a,c)),(s=i[0])&&t.push(new kt(s,n,o,l,c))}return this}function nm(r){var t=[],e=[],i;for(this._root&&t.push(new kt(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var s=i.node;if(s.length){var n,o=i.x0,a=i.y0,u=i.x1,l=i.y1,c=(o+u)/2,h=(a+l)/2;(n=s[0])&&t.push(new kt(n,o,a,c,h)),(n=s[1])&&t.push(new kt(n,c,a,u,h)),(n=s[2])&&t.push(new kt(n,o,h,c,l)),(n=s[3])&&t.push(new kt(n,c,h,u,l))}e.push(i)}for(;i=e.pop();)r(i.node,i.x0,i.y0,i.x1,i.y1);return this}function om(r){return r[0]}function am(r){return arguments.length?(this._x=r,this):this._x}function um(r){return r[1]}function lm(r){return arguments.length?(this._y=r,this):this._y}function Hr(r,t,e){var i=new yl(t??om,e??um,NaN,NaN,NaN,NaN);return r==null?i:i.addAll(r)}function yl(r,t,e,i,s,n){this._x=r,this._y=t,this._x0=e,this._y0=i,this._x1=s,this._y1=n,this._root=void 0}function cm(r){for(var t={data:r.data},e=t;r=r.next;)e=e.next={data:r.data};return t}var qt=Hr.prototype=yl.prototype;qt.copy=function(){var r=new yl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,e,i;if(!t)return r;if(!t.length)return r._root=cm(t),r;for(e=[{source:t,target:r._root=new Array(4)}];t=e.pop();)for(var s=0;s<4;++s)(i=t.source[s])&&(i.length?e.push({source:i,target:t.target[s]=new Array(4)}):t.target[s]=cm(i));return r};qt.add=jp;qt.addAll=Kp;qt.cover=qp;qt.data=Zp;qt.extent=Qp;qt.find=Jp;qt.remove=tm;qt.removeAll=em;qt.root=rm;qt.size=im;qt.visit=sm;qt.visitAfter=nm;qt.x=am;qt.y=lm;function Ie(r){return function(){return r}}function Ee(r){return(r()-.5)*1e-6}function YE(r){return r.x+r.vx}function KE(r){return r.y+r.vy}function bl(r){var t,e,i,s=1,n=1;typeof r!="function"&&(r=Ie(r==null?1:+r));function o(){for(var l,c=t.length,h,d,f,m,g,x,_=0;_<n;++_)for(h=Hr(t,YE,KE).visitAfter(a),l=0;l<c;++l)d=t[l],g=e[d.index],x=g*g,f=d.x+d.vx,m=d.y+d.vy,h.visit(v);function v(T,y,C,S,E){var P=T.data,U=T.r,M=g+U;if(P){if(P.index>d.index){var k=f-P.x-P.vx,N=m-P.y-P.vy,q=k*k+N*N;q<M*M&&(k===0&&(k=Ee(i),q+=k*k),N===0&&(N=Ee(i),q+=N*N),q=(M-(q=Math.sqrt(q)))/q*s,d.vx+=(k*=q)*(M=(U*=U)/(x+U)),d.vy+=(N*=q)*M,P.vx-=k*(M=1-M),P.vy-=N*M)}return}return y>f+M||S<f-M||C>m+M||E<m-M}}function a(l){if(l.data)return l.r=e[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function u(){if(t){var l,c=t.length,h;for(e=new Array(c),l=0;l<c;++l)h=t[l],e[h.index]=+r(h,l,t)}}return o.initialize=function(l,c){t=l,i=c,u()},o.iterations=function(l){return arguments.length?(n=+l,o):n},o.strength=function(l){return arguments.length?(s=+l,o):s},o.radius=function(l){return arguments.length?(r=typeof l=="function"?l:Ie(+l),u(),o):r},o}function qE(r){return r.index}function hm(r,t){var e=r.get(t);if(!e)throw new Error("node not found: "+t);return e}function vl(r){var t=qE,e=h,i,s=Ie(30),n,o,a,u,l,c=1;r==null&&(r=[]);function h(x){return 1/Math.min(a[x.source.index],a[x.target.index])}function d(x){for(var _=0,v=r.length;_<c;++_)for(var T=0,y,C,S,E,P,U,M;T<v;++T)y=r[T],C=y.source,S=y.target,E=S.x+S.vx-C.x-C.vx||Ee(l),P=S.y+S.vy-C.y-C.vy||Ee(l),U=Math.sqrt(E*E+P*P),U=(U-n[T])/U*x*i[T],E*=U,P*=U,S.vx-=E*(M=u[T]),S.vy-=P*M,C.vx+=E*(M=1-M),C.vy+=P*M}function f(){if(o){var x,_=o.length,v=r.length,T=new Map(o.map((C,S)=>[t(C,S,o),C])),y;for(x=0,a=new Array(_);x<v;++x)y=r[x],y.index=x,typeof y.source!="object"&&(y.source=hm(T,y.source)),typeof y.target!="object"&&(y.target=hm(T,y.target)),a[y.source.index]=(a[y.source.index]||0)+1,a[y.target.index]=(a[y.target.index]||0)+1;for(x=0,u=new Array(v);x<v;++x)y=r[x],u[x]=a[y.source.index]/(a[y.source.index]+a[y.target.index]);i=new Array(v),m(),n=new Array(v),g()}}function m(){if(o)for(var x=0,_=r.length;x<_;++x)i[x]=+e(r[x],x,r)}function g(){if(o)for(var x=0,_=r.length;x<_;++x)n[x]=+s(r[x],x,r)}return d.initialize=function(x,_){o=x,l=_,f()},d.links=function(x){return arguments.length?(r=x,f(),d):r},d.id=function(x){return arguments.length?(t=x,d):t},d.iterations=function(x){return arguments.length?(c=+x,d):c},d.strength=function(x){return arguments.length?(e=typeof x=="function"?x:Ie(+x),m(),d):e},d.distance=function(x){return arguments.length?(s=typeof x=="function"?x:Ie(+x),g(),d):s},d}function fm(){let r=1;return()=>(r=(1664525*r+1013904223)%4294967296)/4294967296}function dm(r){return r.x}function pm(r){return r.y}var ZE=10,QE=Math.PI*(3-Math.sqrt(5));function Tl(r){var t,e=1,i=.001,s=1-Math.pow(i,1/300),n=0,o=.6,a=new Map,u=mi(h),l=Ze("tick","end"),c=fm();r==null&&(r=[]);function h(){d(),l.call("tick",t),e<i&&(u.stop(),l.call("end",t))}function d(g){var x,_=r.length,v;g===void 0&&(g=1);for(var T=0;T<g;++T)for(e+=(n-e)*s,a.forEach(function(y){y(e)}),x=0;x<_;++x)v=r[x],v.fx==null?v.x+=v.vx*=o:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=o:(v.y=v.fy,v.vy=0);return t}function f(){for(var g=0,x=r.length,_;g<x;++g){if(_=r[g],_.index=g,_.fx!=null&&(_.x=_.fx),_.fy!=null&&(_.y=_.fy),isNaN(_.x)||isNaN(_.y)){var v=ZE*Math.sqrt(.5+g),T=g*QE;_.x=v*Math.cos(T),_.y=v*Math.sin(T)}(isNaN(_.vx)||isNaN(_.vy))&&(_.vx=_.vy=0)}}function m(g){return g.initialize&&g.initialize(r,c),g}return f(),t={tick:d,restart:function(){return u.restart(h),t},stop:function(){return u.stop(),t},nodes:function(g){return arguments.length?(r=g,f(),a.forEach(m),t):r},alpha:function(g){return arguments.length?(e=+g,t):e},alphaMin:function(g){return arguments.length?(i=+g,t):i},alphaDecay:function(g){return arguments.length?(s=+g,t):+s},alphaTarget:function(g){return arguments.length?(n=+g,t):n},velocityDecay:function(g){return arguments.length?(o=1-g,t):1-o},randomSource:function(g){return arguments.length?(c=g,a.forEach(m),t):c},force:function(g,x){return arguments.length>1?(x==null?a.delete(g):a.set(g,m(x)),t):a.get(g)},find:function(g,x,_){var v=0,T=r.length,y,C,S,E,P;for(_==null?_=1/0:_*=_,v=0;v<T;++v)E=r[v],y=g-E.x,C=x-E.y,S=y*y+C*C,S<_&&(P=E,_=S);return P},on:function(g,x){return arguments.length>1?(l.on(g,x),t):l.on(g)}}}function Sl(){var r,t,e,i,s=Ie(-30),n,o=1,a=1/0,u=.81;function l(f){var m,g=r.length,x=Hr(r,dm,pm).visitAfter(h);for(i=f,m=0;m<g;++m)t=r[m],x.visit(d)}function c(){if(r){var f,m=r.length,g;for(n=new Array(m),f=0;f<m;++f)g=r[f],n[g.index]=+s(g,f,r)}}function h(f){var m=0,g,x,_=0,v,T,y;if(f.length){for(v=T=y=0;y<4;++y)(g=f[y])&&(x=Math.abs(g.value))&&(m+=g.value,_+=x,v+=x*g.x,T+=x*g.y);f.x=v/_,f.y=T/_}else{g=f,g.x=g.data.x,g.y=g.data.y;do m+=n[g.data.index];while(g=g.next)}f.value=m}function d(f,m,g,x){if(!f.value)return!0;var _=f.x-t.x,v=f.y-t.y,T=x-m,y=_*_+v*v;if(T*T/u<y)return y<a&&(_===0&&(_=Ee(e),y+=_*_),v===0&&(v=Ee(e),y+=v*v),y<o&&(y=Math.sqrt(o*y)),t.vx+=_*f.value*i/y,t.vy+=v*f.value*i/y),!0;if(f.length||y>=a)return;(f.data!==t||f.next)&&(_===0&&(_=Ee(e),y+=_*_),v===0&&(v=Ee(e),y+=v*v),y<o&&(y=Math.sqrt(o*y)));do f.data!==t&&(T=n[f.data.index]*i/y,t.vx+=_*T,t.vy+=v*T);while(f=f.next)}return l.initialize=function(f,m){r=f,e=m,c()},l.strength=function(f){return arguments.length?(s=typeof f=="function"?f:Ie(+f),c(),l):s},l.distanceMin=function(f){return arguments.length?(o=f*f,l):Math.sqrt(o)},l.distanceMax=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.theta=function(f){return arguments.length?(u=f*f,l):Math.sqrt(u)},l}var Fs=r=>()=>r;function wl(r,{sourceEvent:t,target:e,transform:i,dispatch:s}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function Ce(r,t,e){this.k=r,this.x=t,this.y=e}Ce.prototype={constructor:Ce,scale:function(r){return r===1?this:new Ce(this.k*r,this.x,this.y)},translate:function(r,t){return r===0&t===0?this:new Ce(this.k,this.x+this.k*r,this.y+this.k*t)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zr=new Ce(1,0,0);El.prototype=Ce.prototype;function El(r){for(;!r.__zoom;)if(!(r=r.parentNode))return zr;return r.__zoom}function ta(r){r.stopImmediatePropagation()}function xi(r){r.preventDefault(),r.stopImmediatePropagation()}function JE(r){return(!r.ctrlKey||r.type==="wheel")&&!r.button}function tC(){var r=this;return r instanceof SVGElement?(r=r.ownerSVGElement||r,r.hasAttribute("viewBox")?(r=r.viewBox.baseVal,[[r.x,r.y],[r.x+r.width,r.y+r.height]]):[[0,0],[r.width.baseVal.value,r.height.baseVal.value]]):[[0,0],[r.clientWidth,r.clientHeight]]}function mm(){return this.__zoom||zr}function eC(r){return-r.deltaY*(r.deltaMode===1?.05:r.deltaMode?1:.002)*(r.ctrlKey?10:1)}function rC(){return navigator.maxTouchPoints||"ontouchstart"in this}function iC(r,t,e){var i=r.invertX(t[0][0])-e[0][0],s=r.invertX(t[1][0])-e[1][0],n=r.invertY(t[0][1])-e[0][1],o=r.invertY(t[1][1])-e[1][1];return r.translate(s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s),o>n?(n+o)/2:Math.min(0,n)||Math.max(0,o))}function Cl(){var r=JE,t=tC,e=iC,i=eC,s=rC,n=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,u=ml,l=Ze("start","zoom","end"),c,h,d,f=500,m=150,g=0,x=10;function _(w){w.property("__zoom",mm).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",U).on("dblclick.zoom",M).filter(s).on("touchstart.zoom",k).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(w,L,A,B){var $=w.selection?w.selection():w;$.property("__zoom",mm),w!==$?C(w,L,A,B):$.interrupt().each(function(){S(this,arguments).event(B).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},_.scaleBy=function(w,L,A,B){_.scaleTo(w,function(){var $=this.__zoom.k,O=typeof L=="function"?L.apply(this,arguments):L;return $*O},A,B)},_.scaleTo=function(w,L,A,B){_.transform(w,function(){var $=t.apply(this,arguments),O=this.__zoom,V=A==null?y($):typeof A=="function"?A.apply(this,arguments):A,st=O.invert(V),lt=typeof L=="function"?L.apply(this,arguments):L;return e(T(v(O,lt),V,st),$,o)},A,B)},_.translateBy=function(w,L,A,B){_.transform(w,function(){return e(this.__zoom.translate(typeof L=="function"?L.apply(this,arguments):L,typeof A=="function"?A.apply(this,arguments):A),t.apply(this,arguments),o)},null,B)},_.translateTo=function(w,L,A,B,$){_.transform(w,function(){var O=t.apply(this,arguments),V=this.__zoom,st=B==null?y(O):typeof B=="function"?B.apply(this,arguments):B;return e(zr.translate(st[0],st[1]).scale(V.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof A=="function"?-A.apply(this,arguments):-A),O,o)},B,$)};function v(w,L){return L=Math.max(n[0],Math.min(n[1],L)),L===w.k?w:new Ce(L,w.x,w.y)}function T(w,L,A){var B=L[0]-A[0]*w.k,$=L[1]-A[1]*w.k;return B===w.x&&$===w.y?w:new Ce(w.k,B,$)}function y(w){return[(+w[0][0]+ +w[1][0])/2,(+w[0][1]+ +w[1][1])/2]}function C(w,L,A,B){w.on("start.zoom",function(){S(this,arguments).event(B).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(B).end()}).tween("zoom",function(){var $=this,O=arguments,V=S($,O).event(B),st=t.apply($,O),lt=A==null?y(st):typeof A=="function"?A.apply($,O):A,wt=Math.max(st[1][0]-st[0][0],st[1][1]-st[0][1]),yt=$.__zoom,Rt=typeof L=="function"?L.apply($,O):L,Lt=u(yt.invert(lt).concat(wt/yt.k),Rt.invert(lt).concat(wt/Rt.k));return function(Nt){if(Nt===1)Nt=Rt;else{var At=Lt(Nt),ie=wt/At[2];Nt=new Ce(ie,lt[0]-At[0]*ie,lt[1]-At[1]*ie)}V.zoom(null,Nt)}})}function S(w,L,A){return!A&&w.__zooming||new E(w,L)}function E(w,L){this.that=w,this.args=L,this.active=0,this.sourceEvent=null,this.extent=t.apply(w,L),this.taps=0}E.prototype={event:function(w){return w&&(this.sourceEvent=w),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(w,L){return this.mouse&&w!=="mouse"&&(this.mouse[1]=L.invert(this.mouse[0])),this.touch0&&w!=="touch"&&(this.touch0[1]=L.invert(this.touch0[0])),this.touch1&&w!=="touch"&&(this.touch1[1]=L.invert(this.touch1[0])),this.that.__zoom=L,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(w){var L=Wt(this.that).datum();l.call(w,this.that,new wl(w,{sourceEvent:this.sourceEvent,target:_,type:w,transform:this.that.__zoom,dispatch:l}),L)}};function P(w,...L){if(!r.apply(this,arguments))return;var A=S(this,L).event(w),B=this.__zoom,$=Math.max(n[0],Math.min(n[1],B.k*Math.pow(2,i.apply(this,arguments)))),O=pe(w);if(A.wheel)(A.mouse[0][0]!==O[0]||A.mouse[0][1]!==O[1])&&(A.mouse[1]=B.invert(A.mouse[0]=O)),clearTimeout(A.wheel);else{if(B.k===$)return;A.mouse=[O,B.invert(O)],_r(this),A.start()}xi(w),A.wheel=setTimeout(V,m),A.zoom("mouse",e(T(v(B,$),A.mouse[0],A.mouse[1]),A.extent,o));function V(){A.wheel=null,A.end()}}function U(w,...L){if(d||!r.apply(this,arguments))return;var A=w.currentTarget,B=S(this,L,!0).event(w),$=Wt(w.view).on("mousemove.zoom",lt,!0).on("mouseup.zoom",wt,!0),O=pe(w,A),V=w.clientX,st=w.clientY;xs(w.view),ta(w),B.mouse=[O,this.__zoom.invert(O)],_r(this),B.start();function lt(yt){if(xi(yt),!B.moved){var Rt=yt.clientX-V,Lt=yt.clientY-st;B.moved=Rt*Rt+Lt*Lt>g}B.event(yt).zoom("mouse",e(T(B.that.__zoom,B.mouse[0]=pe(yt,A),B.mouse[1]),B.extent,o))}function wt(yt){$.on("mousemove.zoom mouseup.zoom",null),_s(yt.view,B.moved),xi(yt),B.event(yt).end()}}function M(w,...L){if(r.apply(this,arguments)){var A=this.__zoom,B=pe(w.changedTouches?w.changedTouches[0]:w,this),$=A.invert(B),O=A.k*(w.shiftKey?.5:2),V=e(T(v(A,O),B,$),t.apply(this,L),o);xi(w),a>0?Wt(this).transition().duration(a).call(C,V,B,w):Wt(this).call(_.transform,V,B,w)}}function k(w,...L){if(r.apply(this,arguments)){var A=w.touches,B=A.length,$=S(this,L,w.changedTouches.length===B).event(w),O,V,st,lt;for(ta(w),V=0;V<B;++V)st=A[V],lt=pe(st,this),lt=[lt,this.__zoom.invert(lt),st.identifier],$.touch0?!$.touch1&&$.touch0[2]!==lt[2]&&($.touch1=lt,$.taps=0):($.touch0=lt,O=!0,$.taps=1+!!c);c&&(c=clearTimeout(c)),O&&($.taps<2&&(h=lt[0],c=setTimeout(function(){c=null},f)),_r(this),$.start())}}function N(w,...L){if(this.__zooming){var A=S(this,L).event(w),B=w.changedTouches,$=B.length,O,V,st,lt;for(xi(w),O=0;O<$;++O)V=B[O],st=pe(V,this),A.touch0&&A.touch0[2]===V.identifier?A.touch0[0]=st:A.touch1&&A.touch1[2]===V.identifier&&(A.touch1[0]=st);if(V=A.that.__zoom,A.touch1){var wt=A.touch0[0],yt=A.touch0[1],Rt=A.touch1[0],Lt=A.touch1[1],Nt=(Nt=Rt[0]-wt[0])*Nt+(Nt=Rt[1]-wt[1])*Nt,At=(At=Lt[0]-yt[0])*At+(At=Lt[1]-yt[1])*At;V=v(V,Math.sqrt(Nt/At)),st=[(wt[0]+Rt[0])/2,(wt[1]+Rt[1])/2],lt=[(yt[0]+Lt[0])/2,(yt[1]+Lt[1])/2]}else if(A.touch0)st=A.touch0[0],lt=A.touch0[1];else return;A.zoom("touch",e(T(V,st,lt),A.extent,o))}}function q(w,...L){if(this.__zooming){var A=S(this,L).event(w),B=w.changedTouches,$=B.length,O,V;for(ta(w),d&&clearTimeout(d),d=setTimeout(function(){d=null},f),O=0;O<$;++O)V=B[O],A.touch0&&A.touch0[2]===V.identifier?delete A.touch0:A.touch1&&A.touch1[2]===V.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(V=pe(V,this),Math.hypot(h[0]-V[0],h[1]-V[1])<x)){var st=Wt(this).on("dblclick.zoom");st&&st.apply(this,arguments)}}}return _.wheelDelta=function(w){return arguments.length?(i=typeof w=="function"?w:Fs(+w),_):i},_.filter=function(w){return arguments.length?(r=typeof w=="function"?w:Fs(!!w),_):r},_.touchable=function(w){return arguments.length?(s=typeof w=="function"?w:Fs(!!w),_):s},_.extent=function(w){return arguments.length?(t=typeof w=="function"?w:Fs([[+w[0][0],+w[0][1]],[+w[1][0],+w[1][1]]]),_):t},_.scaleExtent=function(w){return arguments.length?(n[0]=+w[0],n[1]=+w[1],_):[n[0],n[1]]},_.translateExtent=function(w){return arguments.length?(o[0][0]=+w[0][0],o[1][0]=+w[1][0],o[0][1]=+w[0][1],o[1][1]=+w[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(w){return arguments.length?(e=w,_):e},_.duration=function(w){return arguments.length?(a=+w,_):a},_.interpolate=function(w){return arguments.length?(u=w,_):u},_.on=function(){var w=l.on.apply(l,arguments);return w===l?_:w},_.clickDistance=function(w){return arguments.length?(g=(w=+w)*w,_):Math.sqrt(g)},_.tapDistance=function(w){return arguments.length?(x=+w,_):x},_}D();var Vb={extension:{type:b.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Promise.resolve().then(()=>(Wb(),rD))}};D();var $b={extension:{type:b.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Promise.resolve().then(()=>(Xb(),iD))}};D();Pa();Ta();D();Pt();Cn();var Su;function tv(r){return Su!==void 0||(Su=(()=>{let t={stencil:!0,failIfMajorPerformanceCaveat:r??Rr.defaultOptions.failIfMajorPerformanceCaveat};try{if(!Q.get().getWebGLRenderingContext())return!1;let i=Q.get().createCanvas().getContext("webgl",t),s=!!i?.getContextAttributes()?.stencil;if(i){let n=i.getExtension("WEBGL_lose_context");n&&n.loseContext()}return i=null,s}catch{return!1}})()),Su}Pt();var wu;async function ev(r={}){return wu!==void 0||(wu=await(async()=>{let t=Q.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(r)).requestDevice(),!0}catch{return!1}})()),wu}Cn();var g1=["webgl","webgpu","canvas"];async function x1(r){let t=[];r.preference?(t.push(r.preference),g1.forEach(n=>{n!==r.preference&&t.push(n)})):t=g1.slice();let e,i={};for(let n=0;n<t.length;n++){let o=t[n];if(o==="webgpu"&&await ev()){let{WebGPURenderer:a}=await Promise.resolve().then(()=>(WT(),zT));e=a,i={...r,...r.webgpu};break}else if(o==="webgl"&&tv(r.failIfMajorPerformanceCaveat??Rr.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:a}=await Promise.resolve().then(()=>(m1(),p1));e=a,i={...r,...r.webgl};break}else if(o==="canvas")throw i={...r},new Error("CanvasRenderer is not yet implemented")}if(delete i.webgpu,delete i.webgl,!e)throw new Error("No available renderer for the current environment");let s=new e;return await s.init(i),s}De();hf();vt();var _1=class Jf{constructor(...t){this.stage=new it,t[0]!==void 0&&X(Y,"Application constructor options are deprecated, please use Application.init() instead.")}async init(t){t={...t},this.renderer=await x1(t),Jf._plugins.forEach(e=>{e.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return X(Y,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,e=!1){let i=Jf._plugins.slice(0);i.reverse(),i.forEach(s=>{s.destroy.call(this)}),this.stage.destroy(e),this.stage=null,this.renderer.destroy(t),this.renderer=null}};_1._plugins=[];var Zu=_1;H.handleByList(b.Application,Zu._plugins);H.add(In);sa();vt();wa();var Qu=class extends Sr{constructor(t,e){let{text:i,resolution:s,style:n,anchor:o,width:a,height:u,roundPixels:l,...c}=t;super({...c}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=e,this.text=i??"",this.style=n,this.resolution=s??null,this.allowChildren=!1,this._anchor=new zt({_onUpdate:()=>{this.onViewUpdate()}}),o&&(this.anchor=o),this.roundPixels=l??!1,a!==void 0&&(this.width=a),u!==void 0&&(this.height=u)}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}set text(t){t=t.toString(),this._text!==t&&(this._text=t,this.onViewUpdate())}get text(){return this._text}set resolution(t){this._autoResolution=t===null,this._resolution=t,this.onViewUpdate()}get resolution(){return this._resolution}get style(){return this._style}set style(t){t||(t={}),this._style?.off("update",this.onViewUpdate,this),t instanceof this._styleClass?this._style=t:this._style=new this._styleClass(t),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(t){this._setWidth(t,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(t){this._setHeight(t,this.bounds.height)}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this.bounds.width,t.height=Math.abs(this.scale.y)*this.bounds.height,t}setSize(t,e){typeof t=="object"?(e=t.height??t.width,t=t.width):e??(e=t),t!==void 0&&this._setWidth(t,this.bounds.width),e!==void 0&&this._setHeight(e,this.bounds.height)}containsPoint(t){let e=this.bounds.width,i=this.bounds.height,s=-e*this.anchor.x,n=0;return t.x>=s&&t.x<=s+e&&(n=-i*this.anchor.y,t.y>=n&&t.y<=n+i)}onViewUpdate(){this.didViewUpdate||(this._didTextUpdate=!0),super.onViewUpdate()}_getKey(){return`${this.text}:${this._style.styleKey}:${this._resolution}`}destroy(t=!1){super.destroy(t),this.owner=null,this._bounds=null,this._anchor=null,(typeof t=="boolean"?t:t?.style)&&this._style.destroy(t),this._style=null,this._text=null}};function y1(r,t){let e=r[0]??{};return(typeof e=="string"||r[1])&&(X(Y,`use new ${t}({ text: "hi!", style }) instead`),e={text:e,style:r[1]}),e}cu();Yi();var To=class extends Qu{constructor(...t){let e=y1(t,"Text");super(e,le),this.renderPipeId="text"}updateBounds(){let t=this._bounds,e=this._anchor,i=Te.measureText(this._text,this._style),{width:s,height:n}=i;t.minX=-e._x*s,t.maxX=t.minX+s,t.minY=-e._y*n,t.maxY=t.minY+n}};vh();Ec();De();Lh();Xt();var OD=ds(Jc(),1);H.add(Vb,$b);var wo=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var t=1.70158;return r===1?1:r*r*((t+1)*r-t)},Out:function(r){var t=1.70158;return r===0?0:--r*r*((t+1)*r+t)+1},InOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)}}),Bounce:Object.freeze({In:function(r){return 1-wo.Bounce.Out(1-r)},Out:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},InOut:function(r){return r<.5?wo.Bounce.In(r*2)*.5:wo.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(t){return Math.pow(t,r)},Out:function(t){return 1-Math.pow(1-t,r)},InOut:function(t){return t<.5?Math.pow(t*2,r)/2:(1-Math.pow(2-t*2,r))/2+.5}}}}),So=function(){return performance.now()},Eo=function(){function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return r.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var t,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var s=0,n=e;s<n.length;s++){var o=n[s];(t=o._group)===null||t===void 0||t.remove(o),o._group=this,this._tweens[o.getId()]=o,this._tweensAddedDuringUpdate[o.getId()]=o}},r.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,s=t;i<s.length;i++){var n=s[i];n._group=void 0,delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]}},r.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},r.prototype.update=function(t,e){t===void 0&&(t=So()),e===void 0&&(e=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var s=0;s<i.length;s++){var n=this._tweens[i[s]],o=!e;n&&n.update(t,o)===!1&&!e&&this.remove(n)}i=Object.keys(this._tweensAddedDuringUpdate)}},r}(),cs={Linear:function(r,t){var e=r.length-1,i=e*t,s=Math.floor(i),n=cs.Utils.Linear;return t<0?n(r[0],r[1],i):t>1?n(r[e],r[e-1],e-i):n(r[s],r[s+1>e?e:s+1],i-s)},Bezier:function(r,t){for(var e=0,i=r.length-1,s=Math.pow,n=cs.Utils.Bernstein,o=0;o<=i;o++)e+=s(1-t,i-o)*s(t,o)*r[o]*n(i,o);return e},CatmullRom:function(r,t){var e=r.length-1,i=e*t,s=Math.floor(i),n=cs.Utils.CatmullRom;return r[0]===r[e]?(t<0&&(s=Math.floor(i=e*(1+t))),n(r[(s-1+e)%e],r[s],r[(s+1)%e],r[(s+2)%e],i-s)):t<0?r[0]-(n(r[0],r[0],r[1],r[1],-i)-r[0]):t>1?r[e]-(n(r[e],r[e],r[e-1],r[e-1],i-e)-r[e]):n(r[s?s-1:0],r[s],r[e<s+1?e:s+1],r[e<s+2?e:s+2],i-s)},Utils:{Linear:function(r,t,e){return(t-r)*e+r},Bernstein:function(r,t){var e=cs.Utils.Factorial;return e(r)/e(t)/e(r-t)},Factorial:function(){var r=[1];return function(t){var e=1;if(r[t])return r[t];for(var i=t;i>1;i--)e*=i;return r[t]=e,e}}(),CatmullRom:function(r,t,e,i,s){var n=(e-r)*.5,o=(i-t)*.5,a=s*s,u=s*a;return(2*t-2*e+n+o)*u+(-3*t+3*e-2*n-o)*a+n*s+t}}},b1=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),td=new Eo,Co=function(){function r(t,e){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=wo.Linear.None,this._interpolationFunction=cs.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=b1.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof e=="object"?(this._group=e,e.add(this)):e===!0&&(this._group=td,td.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},r.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},r.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},r.prototype.start=function(t,e){if(t===void 0&&(t=So()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var s={};for(var n in this._valuesEnd)s[n]=this._valuesEnd[n];this._valuesEnd=s}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},r.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},r.prototype._setupProperties=function(t,e,i,s,n){for(var o in i){var a=t[o],u=Array.isArray(a),l=u?"array":typeof a,c=!u&&Array.isArray(i[o]);if(!(l==="undefined"||l==="function")){if(c){var h=i[o];if(h.length===0)continue;for(var d=[a],f=0,m=h.length;f<m;f+=1){var g=this._handleRelativeValue(a,h[f]);if(isNaN(g)){c=!1,console.warn("Found invalid interpolation list. Skipping.");break}d.push(g)}c&&(i[o]=d)}if((l==="object"||u)&&a&&!c){e[o]=u?[]:{};var x=a;for(var _ in x)e[o][_]=x[_];s[o]=u?[]:{};var h=i[o];if(!this._isDynamic){var v={};for(var _ in h)v[_]=h[_];i[o]=h=v}this._setupProperties(x,e[o],h,s[o],n)}else(typeof e[o]>"u"||n)&&(e[o]=a),u||(e[o]*=1),c?s[o]=i[o].slice().reverse():s[o]=e[o]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(t){return t===void 0&&(t=So()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},r.prototype.resume=function(t){return t===void 0&&(t=So()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},r.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},r.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},r.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},r.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},r.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},r.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},r.prototype.easing=function(t){return t===void 0&&(t=wo.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=cs.Linear),this._interpolationFunction=t,this},r.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},r.prototype.onStart=function(t){return this._onStartCallback=t,this},r.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},r.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},r.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},r.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},r.prototype.onStop=function(t){return this._onStopCallback=t,this},r.prototype.update=function(t,e){var i=this,s;if(t===void 0&&(t=So()),e===void 0&&(e=r.autoStartOnUpdate),this._isPaused)return!0;var n;if(!this._goToEnd&&!this._isPlaying)if(e)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var o=t-this._startTime,a=this._duration+((s=this._repeatDelayTime)!==null&&s!==void 0?s:this._delayTime),u=this._duration+this._repeat*a,l=function(){if(i._duration===0||o>u)return 1;var g=Math.trunc(o/a),x=o-g*a,_=Math.min(x/i._duration,1);return _===0&&o===i._duration?1:_},c=l(),h=this._easingFunction(c);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,h),this._onUpdateCallback&&this._onUpdateCallback(this._object,c),this._duration===0||o>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((o-this._duration)/a)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=d);for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=a*d,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var f=0,m=this._chainedTweens.length;f<m;f++)this._chainedTweens[f].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(t,e,i,s){for(var n in i)if(e[n]!==void 0){var o=e[n]||0,a=i[n],u=Array.isArray(t[n]),l=Array.isArray(a),c=!u&&l;c?t[n]=this._interpolationFunction(a,s):typeof a=="object"&&a?this._updateProperties(t[n],o,a,s):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[n]=o+(a-o)*s))}},r.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},r.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},r.autoStartOnUpdate=!1,r}();var htt=b1.nextId,Ke=td,ftt=Ke.getAll.bind(Ke),dtt=Ke.removeAll.bind(Ke),ptt=Ke.add.bind(Ke),mtt=Ke.remove.bind(Ke),gtt=Ke.update.bind(Ke);function v1(r,t){if(!r)return;function e(s){s.target===this&&(s.preventDefault(),s.stopPropagation(),t())}function i(s){s.key.startsWith("Esc")&&(s.preventDefault(),t())}r?.addEventListener("click",e),window.addCleanup(()=>r?.removeEventListener("click",e)),document.addEventListener("keydown",i),window.addCleanup(()=>document.removeEventListener("keydown",i))}function T1(r){for(;r.firstChild;)r.removeChild(r.firstChild)}var Ttt=Object.hasOwnProperty;var E1=ds(w1(),1),Att=(0,E1.default)();function C1(r){return r.document.body.dataset.slug}function fs(r){let t=XD(VD(r,"index"),!0);return t.length===0?"/":t}function HD(r){let t=r.split("/").filter(e=>e!=="").slice(0,-1).map(e=>"..").join("/");return t.length===0&&(t="."),t}function ed(r,t){return zD(HD(r),fs(t))}function zD(...r){return r.filter(t=>t!=="").join("/").replace(/\\/\\/+/g,"/")}function WD(r,t){return r===t||r.endsWith("/"+t)}function VD(r,t){return WD(r,t)&&(r=r.slice(0,-t.length)),r}function XD(r,t){return r.startsWith("/")&&(r=r.substring(1)),!t&&r.endsWith("/")&&(r=r.slice(0,-1)),r}var A1="graph-visited";function D1(){return new Set(JSON.parse(localStorage.getItem(A1)??"[]"))}function $D(r){let t=D1();t.add(r),localStorage.setItem(A1,JSON.stringify([...t]))}async function rd(r,t){let e=fs(t),i=D1(),s=document.getElementById(r);if(!s)return;T1(s);let{drag:n,zoom:o,depth:a,scale:u,repelForce:l,centerForce:c,linkDistance:h,fontSize:d,opacityScale:f,removeTags:m,showTags:g,focusOnHover:x}=JSON.parse(s.dataset.cfg),_=new Map(Object.entries(await fetchData).map(([F,R])=>[fs(F),R])),v=[],T=[],y=new Set(_.keys()),C=new Map;for(let[F,R]of _.entries()){let j=R.links??[];for(let nt of j)y.has(nt)&&v.push({source:F,target:nt});if(g){let nt=R.tags.filter(Et=>!m.includes(Et)).map(Et=>fs("tags/"+Et));T.push(...nt.filter(Et=>!T.includes(Et)));for(let Et of nt)v.push({source:F,target:Et})}}let S=new Set,E=[e,"__SENTINEL"];if(a>=0)for(;a>=0&&E.length>0;){let F=E.shift();if(F==="__SENTINEL")a--,E.push("__SENTINEL");else{S.add(F);let R=v.filter(nt=>nt.source===F),j=v.filter(nt=>nt.target===F);E.push(...R.map(nt=>nt.target),...j.map(nt=>nt.source))}}else y.forEach(F=>S.add(F)),g&&T.forEach(F=>S.add(F));let P=[...S].map(F=>{let R=F.startsWith("tags/")?"#"+F.substring(5):_.get(F)?.title??F;return{id:F,text:R,tags:_.get(F)?.tags??[]}}),U={nodes:P,links:v.filter(F=>S.has(F.source)&&S.has(F.target)).map(F=>({source:P.find(R=>R.id===F.source),target:P.find(R=>R.id===F.target)}))},M=Tl(U.nodes).force("charge",Sl().strength(-100*l)).force("center",_l().strength(c)).force("link",vl(U.links).distance(h)).force("collide",bl(F=>A(F)).iterations(3)),k=s.offsetWidth,N=Math.max(s.offsetHeight,250),w=["--secondary","--tertiary","--gray","--light","--lightgray","--dark","--darkgray","--bodyFont"].reduce((F,R)=>(F[R]=getComputedStyle(document.documentElement).getPropertyValue(R),F),{}),L=F=>F.id===e?w["--secondary"]:i.has(F.id)||F.id.startsWith("tags/")?w["--tertiary"]:w["--gray"];function A(F){let R=U.links.filter(j=>j.source.id===F.id||j.target.id===F.id).length;return 2+Math.sqrt(R)}let B=null,$=new Set,O=[],V=[];function st(F){if(B=F,F===null){$=new Set;for(let R of V)R.active=!1;for(let R of O)R.active=!1}else{$=new Set;for(let R of O){let j=R.simulationData;(j.source.id===F||j.target.id===F)&&($.add(j.source.id),$.add(j.target.id)),R.active=j.source.id===F||j.target.id===F}for(let R of V)R.active=$.has(R.simulationData.id)}}let lt=0,wt=!1;function yt(){C.get("link")?.stop();let F=new Eo;for(let R of O){let j=1;B&&(j=R.active?1:.2),R.color=R.active?w["--gray"]:w["--lightgray"],F.add(new Co(R).to({alpha:j},200))}F.getAll().forEach(R=>R.start()),C.set("link",{update:F.update.bind(F),stop(){F.getAll().forEach(R=>R.stop())}})}function Rt(){C.get("label")?.stop();let F=new Eo,R=1/u,j=R*1.1;for(let nt of V){let Et=nt.simulationData.id;B===Et?F.add(new Co(nt.label).to({alpha:1,scale:{x:j,y:j}},100)):F.add(new Co(nt.label).to({alpha:nt.label.alpha,scale:{x:R,y:R}},100))}F.getAll().forEach(nt=>nt.start()),C.set("label",{update:F.update.bind(F),stop(){F.getAll().forEach(nt=>nt.stop())}})}function Lt(){C.get("hover")?.stop();let F=new Eo;for(let R of V){let j=1;B!==null&&x&&(j=R.active?1:.2),F.add(new Co(R.gfx,F).to({alpha:j},200))}F.getAll().forEach(R=>R.start()),C.set("hover",{update:F.update.bind(F),stop(){F.getAll().forEach(R=>R.stop())}})}function Nt(){Lt(),yt(),Rt()}C.forEach(F=>F.stop()),C.clear();let At=new Zu;await At.init({width:k,height:N,antialias:!0,autoStart:!1,autoDensity:!0,backgroundAlpha:0,preference:"webgpu",resolution:window.devicePixelRatio,eventMode:"static"}),s.appendChild(At.canvas);let ie=At.stage;ie.interactive=!1;let dr=new it({zIndex:3}),hi=new it({zIndex:2}),Re=new it({zIndex:1});ie.addChild(hi,dr,Re);for(let F of U.nodes){let R=F.id,j=new To({interactive:!1,eventMode:"none",text:F.text,alpha:0,anchor:{x:.5,y:1.2},style:{fontSize:d*15,fill:w["--dark"],fontFamily:w["--bodyFont"]},resolution:window.devicePixelRatio*4});j.scale.set(1/u);let nt=0,Et=R.startsWith("tags/"),id=new Fr({interactive:!0,label:R,eventMode:"static",hitArea:new ai(0,0,A(F)),cursor:"pointer"}).circle(0,0,A(F)).fill({color:Et?w["--light"]:L(F)}).stroke({width:Et?2:0,color:L(F)}).on("pointerover",B1=>{st(B1.target.label),nt=j.alpha,wt||Nt()}).on("pointerleave",()=>{st(null),j.alpha=nt,wt||Nt()});hi.addChild(id),dr.addChild(j);let P1={simulationData:F,gfx:id,label:j,color:L(F),alpha:1,active:!1};V.push(P1)}for(let F of U.links){let R=new Fr({interactive:!1,eventMode:"none"});Re.addChild(R);let j={simulationData:F,gfx:R,color:w["--lightgray"],alpha:1,active:!1};O.push(j)}let Se=zr;if(n)Wt(At.canvas).call(sl().container(()=>At.canvas).subject(()=>U.nodes.find(F=>F.id===B)).on("start",function(R){R.active||M.alphaTarget(1).restart(),R.subject.fx=R.subject.x,R.subject.fy=R.subject.y,R.subject.__initialDragPos={x:R.subject.x,y:R.subject.y,fx:R.subject.fx,fy:R.subject.fy},lt=Date.now(),wt=!0}).on("drag",function(R){let j=R.subject.__initialDragPos;R.subject.fx=j.x+(R.x-j.x)/Se.k,R.subject.fy=j.y+(R.y-j.y)/Se.k}).on("end",function(R){if(R.active||M.alphaTarget(0),R.subject.fx=null,R.subject.fy=null,wt=!1,Date.now()-lt<500){let j=U.nodes.find(Et=>Et.id===R.subject.id),nt=ed(t,j.id);window.spaNavigate(new URL(nt,window.location.toString()))}}));else for(let F of V)F.gfx.on("click",()=>{let R=ed(t,F.simulationData.id);window.spaNavigate(new URL(R,window.location.toString()))});o&&Wt(At.canvas).call(Cl().extent([[0,0],[k,N]]).scaleExtent([.25,4]).on("zoom",({transform:F})=>{Se=F,ie.scale.set(F.k,F.k),ie.position.set(F.x,F.y);let R=F.k*f,j=Math.max((R-1)/3.75,0),nt=V.filter(Et=>Et.active).flatMap(Et=>Et.label);for(let Et of dr.children)nt.includes(Et)||(Et.alpha=j)}));function ke(F){for(let R of V){let{x:j,y:nt}=R.simulationData;!j||!nt||(R.gfx.position.set(j+k/2,nt+N/2),R.label&&R.label.position.set(j+k/2,nt+N/2))}for(let R of O){let j=R.simulationData;R.gfx.clear(),R.gfx.moveTo(j.source.x+k/2,j.source.y+N/2),R.gfx.lineTo(j.target.x+k/2,j.target.y+N/2).stroke({alpha:R.alpha,width:1,color:R.color})}C.forEach(R=>R.update(F)),At.renderer.render(ie),requestAnimationFrame(ke)}let qe=requestAnimationFrame(ke);window.addCleanup(()=>cancelAnimationFrame(qe))}document.addEventListener("nav",async r=>{let t=r.detail.url;$D(fs(t)),await rd("graph-container",t);let e=()=>{rd("graph-container",t)};document.addEventListener("themechange",e),window.addCleanup(()=>{document.removeEventListener("themechange",e)});let i=document.getElementById("global-graph-outer"),s=i?.closest(".sidebar");function n(){let l=C1(window);i?.classList.add("active"),s&&(s.style.zIndex="1"),rd("global-graph-container",l),v1(i,o)}function o(){i?.classList.remove("active"),s&&(s.style.zIndex="")}async function a(l){l.key==="g"&&(l.ctrlKey||l.metaKey)&&!l.shiftKey&&(l.preventDefault(),i?.classList.contains("active")?o():n())}let u=document.getElementById("global-graph-icon");u?.addEventListener("click",n),window.addCleanup(()=>u?.removeEventListener("click",n)),document.addEventListener("keydown",a),window.addCleanup(()=>document.removeEventListener("keydown",a))});\n';var graph_default=`/**
|
||
* Layout breakpoints
|
||
* $mobile: screen width below this value will use mobile styles
|
||
* $desktop: screen width above this value will use desktop styles
|
||
* Screen width between $mobile and $desktop width will use the tablet layout.
|
||
* assuming mobile < desktop
|
||
*/
|
||
.graph > h3 {
|
||
font-size: 1rem;
|
||
margin: 0;
|
||
}
|
||
.graph > .graph-outer {
|
||
border-radius: 5px;
|
||
border: 1px solid var(--lightgray);
|
||
box-sizing: border-box;
|
||
height: 250px;
|
||
margin: 0.5em 0;
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
.graph > .graph-outer > #global-graph-icon {
|
||
cursor: pointer;
|
||
background: none;
|
||
border: none;
|
||
color: var(--dark);
|
||
opacity: 0.5;
|
||
width: 24px;
|
||
height: 24px;
|
||
position: absolute;
|
||
padding: 0.2rem;
|
||
margin: 0.3rem;
|
||
top: 0;
|
||
right: 0;
|
||
border-radius: 4px;
|
||
background-color: transparent;
|
||
transition: background-color 0.5s ease;
|
||
cursor: pointer;
|
||
}
|
||
.graph > .graph-outer > #global-graph-icon:hover {
|
||
background-color: var(--lightgray);
|
||
}
|
||
.graph > #global-graph-outer {
|
||
position: fixed;
|
||
z-index: 9999;
|
||
left: 0;
|
||
top: 0;
|
||
width: 100vw;
|
||
height: 100%;
|
||
backdrop-filter: blur(4px);
|
||
display: none;
|
||
overflow: hidden;
|
||
}
|
||
.graph > #global-graph-outer.active {
|
||
display: inline-block;
|
||
}
|
||
.graph > #global-graph-outer > #global-graph-container {
|
||
border: 1px solid var(--lightgray);
|
||
background-color: var(--light);
|
||
border-radius: 5px;
|
||
box-sizing: border-box;
|
||
position: fixed;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
height: 80vh;
|
||
width: 80vw;
|
||
}
|
||
@media all and not ((min-width: 1200px)) {
|
||
.graph > #global-graph-outer > #global-graph-container {
|
||
width: 90%;
|
||
}
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiLi4vLi4vc3R5bGVzL3ZhcmlhYmxlcy5zY3NzIiwiZ3JhcGguc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQ0dFO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBQ0E7RUFDRTs7QUFLTjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFaRjtJQWFJIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBMYXlvdXQgYnJlYWtwb2ludHNcbiAqICRtb2JpbGU6IHNjcmVlbiB3aWR0aCBiZWxvdyB0aGlzIHZhbHVlIHdpbGwgdXNlIG1vYmlsZSBzdHlsZXNcbiAqICRkZXNrdG9wOiBzY3JlZW4gd2lkdGggYWJvdmUgdGhpcyB2YWx1ZSB3aWxsIHVzZSBkZXNrdG9wIHN0eWxlc1xuICogU2NyZWVuIHdpZHRoIGJldHdlZW4gJG1vYmlsZSBhbmQgJGRlc2t0b3Agd2lkdGggd2lsbCB1c2UgdGhlIHRhYmxldCBsYXlvdXQuXG4gKiBhc3N1bWluZyBtb2JpbGUgPCBkZXNrdG9wXG4gKi9cbiRicmVha3BvaW50czogKFxuICBtb2JpbGU6IDgwMHB4LFxuICBkZXNrdG9wOiAxMjAwcHgsXG4pO1xuXG4kbW9iaWxlOiBcIihtYXgtd2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIG1vYmlsZSl9KVwiO1xuJHRhYmxldDogXCIobWluLXdpZHRoOiAje21hcC1nZXQoJGJyZWFrcG9pbnRzLCBtb2JpbGUpfSkgYW5kIChtYXgtd2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIGRlc2t0b3ApfSlcIjtcbiRkZXNrdG9wOiBcIihtaW4td2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIGRlc2t0b3ApfSlcIjtcblxuJHBhZ2VXaWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgbW9iaWxlKX07XG4kc2lkZVBhbmVsV2lkdGg6IDMyMHB4OyAvLzM4MHB4O1xuJHRvcFNwYWNpbmc6IDZyZW07XG4kYm9sZFdlaWdodDogNzAwO1xuJHNlbWlCb2xkV2VpZ2h0OiA2MDA7XG4kbm9ybWFsV2VpZ2h0OiA0MDA7XG5cbiRtb2JpbGVHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0byBhdXRvIGF1dG9cIixcbiAgdGVtcGxhdGVDb2x1bW5zOiBcImF1dG9cIixcbiAgcm93R2FwOiBcIjVweFwiLFxuICBjb2x1bW5HYXA6IFwiNXB4XCIsXG4gIHRlbXBsYXRlQXJlYXM6XG4gICAgJ1wiZ3JpZC1zaWRlYmFyLWxlZnRcIlxcXG4gICAgICBcImdyaWQtaGVhZGVyXCJcXFxuICAgICAgXCJncmlkLWNlbnRlclwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLXJpZ2h0XCJcXFxuICAgICAgXCJncmlkLWZvb3RlclwiJyxcbik7XG4kdGFibGV0R3JpZDogKFxuICB0ZW1wbGF0ZVJvd3M6IFwiYXV0byBhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiI3skc2lkZVBhbmVsV2lkdGh9IGF1dG9cIixcbiAgcm93R2FwOiBcIjVweFwiLFxuICBjb2x1bW5HYXA6IFwiNXB4XCIsXG4gIHRlbXBsYXRlQXJlYXM6XG4gICAgJ1wiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1oZWFkZXJcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtY2VudGVyXCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItbGVmdCBncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtZm9vdGVyXCInLFxuKTtcbiRkZXNrdG9wR3JpZDogKFxuICB0ZW1wbGF0ZVJvd3M6IFwiYXV0byBhdXRvIGF1dG9cIixcbiAgdGVtcGxhdGVDb2x1bW5zOiBcIiN7JHNpZGVQYW5lbFdpZHRofSBhdXRvICN7JHNpZGVQYW5lbFdpZHRofVwiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWhlYWRlciBncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtY2VudGVyIGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1mb290ZXIgZ3JpZC1zaWRlYmFyLXJpZ2h0XCInLFxuKTtcbiIsIkB1c2UgXCIuLi8uLi9zdHlsZXMvdmFyaWFibGVzLnNjc3NcIiBhcyAqO1xuXG4uZ3JhcGgge1xuICAmID4gaDMge1xuICAgIGZvbnQtc2l6ZTogMXJlbTtcbiAgICBtYXJnaW46IDA7XG4gIH1cblxuICAmID4gLmdyYXBoLW91dGVyIHtcbiAgICBib3JkZXItcmFkaXVzOiA1cHg7XG4gICAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tbGlnaHRncmF5KTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgIGhlaWdodDogMjUwcHg7XG4gICAgbWFyZ2luOiAwLjVlbSAwO1xuICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICBvdmVyZmxvdzogaGlkZGVuO1xuXG4gICAgJiA+ICNnbG9iYWwtZ3JhcGgtaWNvbiB7XG4gICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICBiYWNrZ3JvdW5kOiBub25lO1xuICAgICAgYm9yZGVyOiBub25lO1xuICAgICAgY29sb3I6IHZhcigtLWRhcmspO1xuICAgICAgb3BhY2l0eTogMC41O1xuICAgICAgd2lkdGg6IDI0cHg7XG4gICAgICBoZWlnaHQ6IDI0cHg7XG4gICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICBwYWRkaW5nOiAwLjJyZW07XG4gICAgICBtYXJnaW46IDAuM3JlbTtcbiAgICAgIHRvcDogMDtcbiAgICAgIHJpZ2h0OiAwO1xuICAgICAgYm9yZGVyLXJhZGl1czogNHB4O1xuICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG4gICAgICB0cmFuc2l0aW9uOiBiYWNrZ3JvdW5kLWNvbG9yIDAuNXMgZWFzZTtcbiAgICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICAgICY6aG92ZXIge1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1saWdodGdyYXkpO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gICYgPiAjZ2xvYmFsLWdyYXBoLW91dGVyIHtcbiAgICBwb3NpdGlvbjogZml4ZWQ7XG4gICAgei1pbmRleDogOTk5OTtcbiAgICBsZWZ0OiAwO1xuICAgIHRvcDogMDtcbiAgICB3aWR0aDogMTAwdnc7XG4gICAgaGVpZ2h0OiAxMDAlO1xuICAgIGJhY2tkcm9wLWZpbHRlcjogYmx1cig0cHgpO1xuICAgIGRpc3BsYXk6IG5vbmU7XG4gICAgb3ZlcmZsb3c6IGhpZGRlbjtcblxuICAgICYuYWN0aXZlIHtcbiAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICB9XG5cbiAgICAmID4gI2dsb2JhbC1ncmFwaC1jb250YWluZXIge1xuICAgICAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tbGlnaHRncmF5KTtcbiAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWxpZ2h0KTtcbiAgICAgIGJvcmRlci1yYWRpdXM6IDVweDtcbiAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICAgICBwb3NpdGlvbjogZml4ZWQ7XG4gICAgICB0b3A6IDUwJTtcbiAgICAgIGxlZnQ6IDUwJTtcbiAgICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIC01MCUpO1xuICAgICAgaGVpZ2h0OiA4MHZoO1xuICAgICAgd2lkdGg6IDgwdnc7XG5cbiAgICAgIEBtZWRpYSBhbGwgYW5kIG5vdCAoJGRlc2t0b3ApIHtcbiAgICAgICAgd2lkdGg6IDkwJTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbiJdfQ== */`;import{jsx as jsx24,jsxs as jsxs13}from"preact/jsx-runtime";var defaultOptions15={localGraph:{drag:!0,zoom:!0,depth:1,scale:1.1,repelForce:.5,centerForce:.3,linkDistance:30,fontSize:.6,opacityScale:1,showTags:!0,removeTags:[],focusOnHover:!1},globalGraph:{drag:!0,zoom:!0,depth:-1,scale:.9,repelForce:.5,centerForce:.3,linkDistance:30,fontSize:.6,opacityScale:1,showTags:!0,removeTags:[],focusOnHover:!0}},Graph_default=__name(opts=>{let Graph=__name(({displayClass,cfg})=>{let localGraph={...defaultOptions15.localGraph,...opts?.localGraph},globalGraph={...defaultOptions15.globalGraph,...opts?.globalGraph};return jsxs13("div",{class:classNames(displayClass,"graph"),children:[jsx24("h3",{children:i18n(cfg.locale).components.graph.title}),jsxs13("div",{class:"graph-outer",children:[jsx24("div",{id:"graph-container","data-cfg":JSON.stringify(localGraph)}),jsx24("button",{id:"global-graph-icon","aria-label":"Global Graph",children:jsx24("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 55 55",fill:"currentColor",xmlSpace:"preserve",children:jsx24("path",{d:`M49,0c-3.309,0-6,2.691-6,6c0,1.035,0.263,2.009,0.726,2.86l-9.829,9.829C32.542,17.634,30.846,17,29,17
|
||
s-3.542,0.634-4.898,1.688l-7.669-7.669C16.785,10.424,17,9.74,17,9c0-2.206-1.794-4-4-4S9,6.794,9,9s1.794,4,4,4
|
||
c0.74,0,1.424-0.215,2.019-0.567l7.669,7.669C21.634,21.458,21,23.154,21,25s0.634,3.542,1.688,4.897L10.024,42.562
|
||
C8.958,41.595,7.549,41,6,41c-3.309,0-6,2.691-6,6s2.691,6,6,6s6-2.691,6-6c0-1.035-0.263-2.009-0.726-2.86l12.829-12.829
|
||
c1.106,0.86,2.44,1.436,3.898,1.619v10.16c-2.833,0.478-5,2.942-5,5.91c0,3.309,2.691,6,6,6s6-2.691,6-6c0-2.967-2.167-5.431-5-5.91
|
||
v-10.16c1.458-0.183,2.792-0.759,3.898-1.619l7.669,7.669C41.215,39.576,41,40.26,41,41c0,2.206,1.794,4,4,4s4-1.794,4-4
|
||
s-1.794-4-4-4c-0.74,0-1.424,0.215-2.019,0.567l-7.669-7.669C36.366,28.542,37,26.846,37,25s-0.634-3.542-1.688-4.897l9.665-9.665
|
||
C46.042,11.405,47.451,12,49,12c3.309,0,6-2.691,6-6S52.309,0,49,0z M11,9c0-1.103,0.897-2,2-2s2,0.897,2,2s-0.897,2-2,2
|
||
S11,10.103,11,9z M6,51c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S8.206,51,6,51z M33,49c0,2.206-1.794,4-4,4s-4-1.794-4-4
|
||
s1.794-4,4-4S33,46.794,33,49z M29,31c-3.309,0-6-2.691-6-6s2.691-6,6-6s6,2.691,6,6S32.309,31,29,31z M47,41c0,1.103-0.897,2-2,2
|
||
s-2-0.897-2-2s0.897-2,2-2S47,39.897,47,41z M49,10c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S51.206,10,49,10z`})})})]}),jsx24("div",{id:"global-graph-outer",children:jsx24("div",{id:"global-graph-container","data-cfg":JSON.stringify(globalGraph)})})]})},"Graph");return Graph.css=graph_default,Graph.afterDOMLoaded=graph_inline_default,Graph},"default");var backlinks_default=`/**
|
||
* Layout breakpoints
|
||
* $mobile: screen width below this value will use mobile styles
|
||
* $desktop: screen width above this value will use desktop styles
|
||
* Screen width between $mobile and $desktop width will use the tablet layout.
|
||
* assuming mobile < desktop
|
||
*/
|
||
.backlinks {
|
||
flex-direction: column;
|
||
/*&:after {
|
||
pointer-events: none;
|
||
content: "";
|
||
width: 100%;
|
||
height: 50px;
|
||
position: absolute;
|
||
left: 0;
|
||
bottom: 0;
|
||
opacity: 1;
|
||
transition: opacity 0.3s ease;
|
||
background: linear-gradient(transparent 0px, var(--light));
|
||
}*/
|
||
}
|
||
.backlinks > h3 {
|
||
font-size: 1rem;
|
||
margin: 0;
|
||
}
|
||
.backlinks > ul {
|
||
list-style: none;
|
||
padding: 0;
|
||
margin: 0.5rem 0;
|
||
}
|
||
.backlinks > ul > li > a {
|
||
background-color: transparent;
|
||
}
|
||
.backlinks > .overflow {
|
||
height: auto;
|
||
}
|
||
.backlinks > .overflow:after {
|
||
display: none;
|
||
}
|
||
@media all and not ((min-width: 1200px)) {
|
||
.backlinks > .overflow {
|
||
height: 250px;
|
||
}
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiLi4vLi4vc3R5bGVzL3ZhcmlhYmxlcy5zY3NzIiwiYmFja2xpbmtzLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUNFQTtFQUNFO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQWFBO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0E7RUFDQTs7QUFHRTtFQUNFOztBQUtOO0VBSUU7O0FBSEE7RUFDRTs7QUFHRjtFQUxGO0lBTUkiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIExheW91dCBicmVha3BvaW50c1xuICogJG1vYmlsZTogc2NyZWVuIHdpZHRoIGJlbG93IHRoaXMgdmFsdWUgd2lsbCB1c2UgbW9iaWxlIHN0eWxlc1xuICogJGRlc2t0b3A6IHNjcmVlbiB3aWR0aCBhYm92ZSB0aGlzIHZhbHVlIHdpbGwgdXNlIGRlc2t0b3Agc3R5bGVzXG4gKiBTY3JlZW4gd2lkdGggYmV0d2VlbiAkbW9iaWxlIGFuZCAkZGVza3RvcCB3aWR0aCB3aWxsIHVzZSB0aGUgdGFibGV0IGxheW91dC5cbiAqIGFzc3VtaW5nIG1vYmlsZSA8IGRlc2t0b3BcbiAqL1xuJGJyZWFrcG9pbnRzOiAoXG4gIG1vYmlsZTogODAwcHgsXG4gIGRlc2t0b3A6IDEyMDBweCxcbik7XG5cbiRtb2JpbGU6IFwiKG1heC13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgbW9iaWxlKX0pXCI7XG4kdGFibGV0OiBcIihtaW4td2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIG1vYmlsZSl9KSBhbmQgKG1heC13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9KVwiO1xuJGRlc2t0b3A6IFwiKG1pbi13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9KVwiO1xuXG4kcGFnZVdpZHRoOiAje21hcC1nZXQoJGJyZWFrcG9pbnRzLCBtb2JpbGUpfTtcbiRzaWRlUGFuZWxXaWR0aDogMzIwcHg7IC8vMzgwcHg7XG4kdG9wU3BhY2luZzogNnJlbTtcbiRib2xkV2VpZ2h0OiA3MDA7XG4kc2VtaUJvbGRXZWlnaHQ6IDYwMDtcbiRub3JtYWxXZWlnaHQ6IDQwMDtcblxuJG1vYmlsZUdyaWQ6IChcbiAgdGVtcGxhdGVSb3dzOiBcImF1dG8gYXV0byBhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiYXV0b1wiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdFwiXFxcbiAgICAgIFwiZ3JpZC1oZWFkZXJcIlxcXG4gICAgICBcImdyaWQtY2VudGVyXCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtZm9vdGVyXCInLFxuKTtcbiR0YWJsZXRHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0byBhdXRvXCIsXG4gIHRlbXBsYXRlQ29sdW1uczogXCIjeyRzaWRlUGFuZWxXaWR0aH0gYXV0b1wiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWhlYWRlclwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1jZW50ZXJcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1mb290ZXJcIicsXG4pO1xuJGRlc2t0b3BHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiI3skc2lkZVBhbmVsV2lkdGh9IGF1dG8gI3skc2lkZVBhbmVsV2lkdGh9XCIsXG4gIHJvd0dhcDogXCI1cHhcIixcbiAgY29sdW1uR2FwOiBcIjVweFwiLFxuICB0ZW1wbGF0ZUFyZWFzOlxuICAgICdcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtaGVhZGVyIGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1jZW50ZXIgZ3JpZC1zaWRlYmFyLXJpZ2h0XCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWZvb3RlciBncmlkLXNpZGViYXItcmlnaHRcIicsXG4pO1xuIiwiQHVzZSBcIi4uLy4uL3N0eWxlcy92YXJpYWJsZXMuc2Nzc1wiIGFzICo7XG5cbi5iYWNrbGlua3Mge1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICAvKiY6YWZ0ZXIge1xuICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgICBjb250ZW50OiBcIlwiO1xuICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICBoZWlnaHQ6IDUwcHg7XG4gICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICBsZWZ0OiAwO1xuICAgICAgYm90dG9tOiAwO1xuICAgICAgb3BhY2l0eTogMTtcbiAgICAgIHRyYW5zaXRpb246IG9wYWNpdHkgMC4zcyBlYXNlO1xuICAgICAgYmFja2dyb3VuZDogbGluZWFyLWdyYWRpZW50KHRyYW5zcGFyZW50IDBweCwgdmFyKC0tbGlnaHQpKTtcbiAgICB9Ki9cblxuICAmID4gaDMge1xuICAgIGZvbnQtc2l6ZTogMXJlbTtcbiAgICBtYXJnaW46IDA7XG4gIH1cblxuICAmID4gdWwge1xuICAgIGxpc3Qtc3R5bGU6IG5vbmU7XG4gICAgcGFkZGluZzogMDtcbiAgICBtYXJnaW46IDAuNXJlbSAwO1xuXG4gICAgJiA+IGxpIHtcbiAgICAgICYgPiBhIHtcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgJiA+IC5vdmVyZmxvdyB7XG4gICAgJjphZnRlciB7XG4gICAgICBkaXNwbGF5OiBub25lO1xuICAgIH1cbiAgICBoZWlnaHQ6IGF1dG87XG4gICAgQG1lZGlhIGFsbCBhbmQgbm90ICgkZGVza3RvcCkge1xuICAgICAgaGVpZ2h0OiAyNTBweDtcbiAgICB9XG4gIH1cbn1cbiJdfQ== */`;import{jsx as jsx25,jsxs as jsxs14}from"preact/jsx-runtime";var defaultOptions16={hideWhenEmpty:!0},Backlinks_default=__name(opts=>{let options2={...defaultOptions16,...opts},Backlinks=__name(({fileData,allFiles,displayClass,cfg})=>{let slug=simplifySlug(fileData.slug),backlinkFiles=allFiles.filter(file=>file.links?.includes(slug));return options2.hideWhenEmpty&&backlinkFiles.length==0?null:jsxs14("div",{class:classNames(displayClass,"backlinks"),children:[jsx25("h3",{children:i18n(cfg.locale).components.backlinks.title}),jsx25("ul",{class:"overflow",children:backlinkFiles.length>0?backlinkFiles.map(f=>jsx25("li",{children:jsx25("a",{href:resolveRelative(fileData.slug,f.slug),class:"internal",children:f.frontmatter?.title})})):jsx25("li",{children:i18n(cfg.locale).components.backlinks.noBacklinksFound})})]})},"Backlinks");return Backlinks.css=backlinks_default,Backlinks},"default");var search_default=`/**
|
||
* Layout breakpoints
|
||
* $mobile: screen width below this value will use mobile styles
|
||
* $desktop: screen width above this value will use desktop styles
|
||
* Screen width between $mobile and $desktop width will use the tablet layout.
|
||
* assuming mobile < desktop
|
||
*/
|
||
.search {
|
||
min-width: fit-content;
|
||
max-width: 14rem;
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.search {
|
||
flex-grow: 0.3;
|
||
}
|
||
}
|
||
.search > .search-button {
|
||
background-color: var(--lightgray);
|
||
border: none;
|
||
border-radius: 4px;
|
||
font-family: inherit;
|
||
font-size: inherit;
|
||
height: 2rem;
|
||
padding: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
text-align: inherit;
|
||
cursor: pointer;
|
||
white-space: nowrap;
|
||
width: 100%;
|
||
justify-content: space-between;
|
||
}
|
||
.search > .search-button > p {
|
||
display: inline;
|
||
padding: 0 1rem;
|
||
}
|
||
.search > .search-button svg {
|
||
cursor: pointer;
|
||
width: 18px;
|
||
min-width: 18px;
|
||
margin: 0 0.5rem;
|
||
}
|
||
.search > .search-button svg .search-path {
|
||
stroke: var(--darkgray);
|
||
stroke-width: 2px;
|
||
transition: stroke 0.5s ease;
|
||
}
|
||
.search > #search-container {
|
||
position: fixed;
|
||
contain: layout;
|
||
z-index: 999;
|
||
left: 0;
|
||
top: 0;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
overflow-y: auto;
|
||
display: none;
|
||
backdrop-filter: blur(4px);
|
||
}
|
||
.search > #search-container.active {
|
||
display: inline-block;
|
||
}
|
||
.search > #search-container > #search-space {
|
||
width: 65%;
|
||
margin-top: 12vh;
|
||
margin-left: auto;
|
||
margin-right: auto;
|
||
}
|
||
@media all and not ((min-width: 1200px)) {
|
||
.search > #search-container > #search-space {
|
||
width: 90%;
|
||
}
|
||
}
|
||
.search > #search-container > #search-space > * {
|
||
width: 100%;
|
||
border-radius: 7px;
|
||
background: var(--light);
|
||
box-shadow: 0 14px 50px rgba(27, 33, 48, 0.12), 0 10px 30px rgba(27, 33, 48, 0.16);
|
||
margin-bottom: 2em;
|
||
}
|
||
.search > #search-container > #search-space > input {
|
||
box-sizing: border-box;
|
||
padding: 0.5em 1em;
|
||
font-family: var(--bodyFont);
|
||
color: var(--dark);
|
||
font-size: 1.1em;
|
||
border: 1px solid var(--lightgray);
|
||
}
|
||
.search > #search-container > #search-space > input:focus {
|
||
outline: none;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout {
|
||
display: none;
|
||
flex-direction: row;
|
||
border: 1px solid var(--lightgray);
|
||
flex: 0 0 100%;
|
||
box-sizing: border-box;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout.display-results {
|
||
display: flex;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout[data-preview] > #results-container {
|
||
flex: 0 0 min(30%, 450px);
|
||
}
|
||
@media all and not ((max-width: 800px)) {
|
||
.search > #search-container > #search-space > #search-layout[data-preview] .result-card > p.preview {
|
||
display: none;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout[data-preview] > div:first-child {
|
||
border-right: 1px solid var(--lightgray);
|
||
border-top-right-radius: unset;
|
||
border-bottom-right-radius: unset;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout[data-preview] > div:last-child {
|
||
border-top-left-radius: unset;
|
||
border-bottom-left-radius: unset;
|
||
}
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > div {
|
||
height: 63vh;
|
||
border-radius: 5px;
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.search > #search-container > #search-space > #search-layout > #preview-container {
|
||
display: none !important;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout[data-preview] > #results-container {
|
||
width: 100%;
|
||
height: auto;
|
||
flex: 0 0 100%;
|
||
}
|
||
}
|
||
.search > #search-container > #search-space > #search-layout .highlight {
|
||
background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));
|
||
border-radius: 5px;
|
||
scroll-margin-top: 2rem;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #preview-container {
|
||
display: block;
|
||
overflow: hidden;
|
||
font-family: inherit;
|
||
color: var(--dark);
|
||
line-height: 1.5em;
|
||
font-weight: 400;
|
||
overflow-y: auto;
|
||
padding: 0 2rem;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #preview-container .preview-inner {
|
||
margin: 0 auto;
|
||
width: min(800px, 100%);
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #preview-container a[role=anchor] {
|
||
background-color: transparent;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #results-container {
|
||
overflow-y: auto;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #results-container .result-card {
|
||
overflow: hidden;
|
||
padding: 1em;
|
||
cursor: pointer;
|
||
transition: background 0.2s ease;
|
||
border-bottom: 1px solid var(--lightgray);
|
||
width: 100%;
|
||
display: block;
|
||
box-sizing: border-box;
|
||
font-family: inherit;
|
||
font-size: 100%;
|
||
line-height: 1.15;
|
||
margin: 0;
|
||
text-transform: none;
|
||
text-align: left;
|
||
outline: none;
|
||
font-weight: inherit;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #results-container .result-card:hover, .search > #search-container > #search-space > #search-layout > #results-container .result-card:focus, .search > #search-container > #search-space > #search-layout > #results-container .result-card.focus {
|
||
background: var(--lightgray);
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #results-container .result-card > h3 {
|
||
margin: 0;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #results-container .result-card > ul.tags {
|
||
margin-top: 0.45rem;
|
||
margin-bottom: 0;
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #results-container .result-card > ul > li > p {
|
||
border-radius: 8px;
|
||
background-color: var(--highlight);
|
||
padding: 0.2rem 0.4rem;
|
||
margin: 0 0.1rem;
|
||
line-height: 1.4rem;
|
||
font-weight: 700;
|
||
color: var(--secondary);
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #results-container .result-card > ul > li > p.match-tag {
|
||
color: var(--tertiary);
|
||
}
|
||
.search > #search-container > #search-space > #search-layout > #results-container .result-card > p {
|
||
margin-bottom: 0;
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiLi4vLi4vc3R5bGVzL3ZhcmlhYmxlcy5zY3NzIiwic2VhcmNoLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUNFQTtFQUNFO0VBQ0E7O0FBQ0E7RUFIRjtJQUlJOzs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDRTtFQUNBOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDRTtFQUNBO0VBQ0E7O0FBS047RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFORjtJQU9JOzs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBLFlBQ0U7RUFFRjs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFOztBQUlKO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFOztBQUdGO0VBQ0U7O0FBR0Y7RUFFSTtJQUNFOztFQUlBO0lBQ0U7SUFDQTtJQUNBOztFQUdGO0lBQ0U7SUFDQTs7O0FBTVI7RUFDRTtFQUNBOztBQUdGO0VBQ0U7SUFDRTs7RUFHRjtJQUNFO0lBQ0E7SUFDQTs7O0FBSUo7RUFDRTtFQUNBO0VBQ0E7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0EsYUR6SUs7RUMwSUw7RUFDQTs7QUFFQTtFQUNFO0VBQ0E7O0FBR0Y7RUFDRTs7QUFJSjtFQUNFOztBQUVBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUdBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFHRTs7QUFHRjtFQUNFOztBQUdGO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQSxhRHJNRDtFQ3NNQzs7QUFFQTtFQUNFOztBQUlKO0VBQ0UiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIExheW91dCBicmVha3BvaW50c1xuICogJG1vYmlsZTogc2NyZWVuIHdpZHRoIGJlbG93IHRoaXMgdmFsdWUgd2lsbCB1c2UgbW9iaWxlIHN0eWxlc1xuICogJGRlc2t0b3A6IHNjcmVlbiB3aWR0aCBhYm92ZSB0aGlzIHZhbHVlIHdpbGwgdXNlIGRlc2t0b3Agc3R5bGVzXG4gKiBTY3JlZW4gd2lkdGggYmV0d2VlbiAkbW9iaWxlIGFuZCAkZGVza3RvcCB3aWR0aCB3aWxsIHVzZSB0aGUgdGFibGV0IGxheW91dC5cbiAqIGFzc3VtaW5nIG1vYmlsZSA8IGRlc2t0b3BcbiAqL1xuJGJyZWFrcG9pbnRzOiAoXG4gIG1vYmlsZTogODAwcHgsXG4gIGRlc2t0b3A6IDEyMDBweCxcbik7XG5cbiRtb2JpbGU6IFwiKG1heC13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgbW9iaWxlKX0pXCI7XG4kdGFibGV0OiBcIihtaW4td2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIG1vYmlsZSl9KSBhbmQgKG1heC13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9KVwiO1xuJGRlc2t0b3A6IFwiKG1pbi13aWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9KVwiO1xuXG4kcGFnZVdpZHRoOiAje21hcC1nZXQoJGJyZWFrcG9pbnRzLCBtb2JpbGUpfTtcbiRzaWRlUGFuZWxXaWR0aDogMzIwcHg7IC8vMzgwcHg7XG4kdG9wU3BhY2luZzogNnJlbTtcbiRib2xkV2VpZ2h0OiA3MDA7XG4kc2VtaUJvbGRXZWlnaHQ6IDYwMDtcbiRub3JtYWxXZWlnaHQ6IDQwMDtcblxuJG1vYmlsZUdyaWQ6IChcbiAgdGVtcGxhdGVSb3dzOiBcImF1dG8gYXV0byBhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiYXV0b1wiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdFwiXFxcbiAgICAgIFwiZ3JpZC1oZWFkZXJcIlxcXG4gICAgICBcImdyaWQtY2VudGVyXCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtZm9vdGVyXCInLFxuKTtcbiR0YWJsZXRHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0byBhdXRvXCIsXG4gIHRlbXBsYXRlQ29sdW1uczogXCIjeyRzaWRlUGFuZWxXaWR0aH0gYXV0b1wiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWhlYWRlclwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1jZW50ZXJcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1mb290ZXJcIicsXG4pO1xuJGRlc2t0b3BHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiI3skc2lkZVBhbmVsV2lkdGh9IGF1dG8gI3skc2lkZVBhbmVsV2lkdGh9XCIsXG4gIHJvd0dhcDogXCI1cHhcIixcbiAgY29sdW1uR2FwOiBcIjVweFwiLFxuICB0ZW1wbGF0ZUFyZWFzOlxuICAgICdcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtaGVhZGVyIGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1jZW50ZXIgZ3JpZC1zaWRlYmFyLXJpZ2h0XCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWZvb3RlciBncmlkLXNpZGViYXItcmlnaHRcIicsXG4pO1xuIiwiQHVzZSBcIi4uLy4uL3N0eWxlcy92YXJpYWJsZXMuc2Nzc1wiIGFzICo7XG5cbi5zZWFyY2gge1xuICBtaW4td2lkdGg6IGZpdC1jb250ZW50O1xuICBtYXgtd2lkdGg6IDE0cmVtO1xuICBAbWVkaWEgYWxsIGFuZCAoJG1vYmlsZSkge1xuICAgIGZsZXgtZ3JvdzogMC4zO1xuICB9XG5cbiAgJiA+IC5zZWFyY2gtYnV0dG9uIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1saWdodGdyYXkpO1xuICAgIGJvcmRlcjogbm9uZTtcbiAgICBib3JkZXItcmFkaXVzOiA0cHg7XG4gICAgZm9udC1mYW1pbHk6IGluaGVyaXQ7XG4gICAgZm9udC1zaXplOiBpbmhlcml0O1xuICAgIGhlaWdodDogMnJlbTtcbiAgICBwYWRkaW5nOiAwO1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICB0ZXh0LWFsaWduOiBpbmhlcml0O1xuICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcblxuICAgICYgPiBwIHtcbiAgICAgIGRpc3BsYXk6IGlubGluZTtcbiAgICAgIHBhZGRpbmc6IDAgMXJlbTtcbiAgICB9XG5cbiAgICAmIHN2ZyB7XG4gICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICB3aWR0aDogMThweDtcbiAgICAgIG1pbi13aWR0aDogMThweDtcbiAgICAgIG1hcmdpbjogMCAwLjVyZW07XG5cbiAgICAgIC5zZWFyY2gtcGF0aCB7XG4gICAgICAgIHN0cm9rZTogdmFyKC0tZGFya2dyYXkpO1xuICAgICAgICBzdHJva2Utd2lkdGg6IDJweDtcbiAgICAgICAgdHJhbnNpdGlvbjogc3Ryb2tlIDAuNXMgZWFzZTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICAmID4gI3NlYXJjaC1jb250YWluZXIge1xuICAgIHBvc2l0aW9uOiBmaXhlZDtcbiAgICBjb250YWluOiBsYXlvdXQ7XG4gICAgei1pbmRleDogOTk5O1xuICAgIGxlZnQ6IDA7XG4gICAgdG9wOiAwO1xuICAgIHdpZHRoOiAxMDB2dztcbiAgICBoZWlnaHQ6IDEwMHZoO1xuICAgIG92ZXJmbG93LXk6IGF1dG87XG4gICAgZGlzcGxheTogbm9uZTtcbiAgICBiYWNrZHJvcC1maWx0ZXI6IGJsdXIoNHB4KTtcblxuICAgICYuYWN0aXZlIHtcbiAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICB9XG5cbiAgICAmID4gI3NlYXJjaC1zcGFjZSB7XG4gICAgICB3aWR0aDogNjUlO1xuICAgICAgbWFyZ2luLXRvcDogMTJ2aDtcbiAgICAgIG1hcmdpbi1sZWZ0OiBhdXRvO1xuICAgICAgbWFyZ2luLXJpZ2h0OiBhdXRvO1xuXG4gICAgICBAbWVkaWEgYWxsIGFuZCBub3QgKCRkZXNrdG9wKSB7XG4gICAgICAgIHdpZHRoOiA5MCU7XG4gICAgICB9XG5cbiAgICAgICYgPiAqIHtcbiAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgIGJvcmRlci1yYWRpdXM6IDdweDtcbiAgICAgICAgYmFja2dyb3VuZDogdmFyKC0tbGlnaHQpO1xuICAgICAgICBib3gtc2hhZG93OlxuICAgICAgICAgIDAgMTRweCA1MHB4IHJnYmEoMjcsIDMzLCA0OCwgMC4xMiksXG4gICAgICAgICAgMCAxMHB4IDMwcHggcmdiYSgyNywgMzMsIDQ4LCAwLjE2KTtcbiAgICAgICAgbWFyZ2luLWJvdHRvbTogMmVtO1xuICAgICAgfVxuXG4gICAgICAmID4gaW5wdXQge1xuICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgICAgICBwYWRkaW5nOiAwLjVlbSAxZW07XG4gICAgICAgIGZvbnQtZmFtaWx5OiB2YXIoLS1ib2R5Rm9udCk7XG4gICAgICAgIGNvbG9yOiB2YXIoLS1kYXJrKTtcbiAgICAgICAgZm9udC1zaXplOiAxLjFlbTtcbiAgICAgICAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tbGlnaHRncmF5KTtcblxuICAgICAgICAmOmZvY3VzIHtcbiAgICAgICAgICBvdXRsaW5lOiBub25lO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgICYgPiAjc2VhcmNoLWxheW91dCB7XG4gICAgICAgIGRpc3BsYXk6IG5vbmU7XG4gICAgICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7XG4gICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWxpZ2h0Z3JheSk7XG4gICAgICAgIGZsZXg6IDAgMCAxMDAlO1xuICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXG4gICAgICAgICYuZGlzcGxheS1yZXN1bHRzIHtcbiAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICB9XG5cbiAgICAgICAgJltkYXRhLXByZXZpZXddID4gI3Jlc3VsdHMtY29udGFpbmVyIHtcbiAgICAgICAgICBmbGV4OiAwIDAgbWluKDMwJSwgNDUwcHgpO1xuICAgICAgICB9XG5cbiAgICAgICAgQG1lZGlhIGFsbCBhbmQgbm90ICgkbW9iaWxlKSB7XG4gICAgICAgICAgJltkYXRhLXByZXZpZXddIHtcbiAgICAgICAgICAgICYgLnJlc3VsdC1jYXJkID4gcC5wcmV2aWV3IHtcbiAgICAgICAgICAgICAgZGlzcGxheTogbm9uZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJiA+IGRpdiB7XG4gICAgICAgICAgICAgICY6Zmlyc3QtY2hpbGQge1xuICAgICAgICAgICAgICAgIGJvcmRlci1yaWdodDogMXB4IHNvbGlkIHZhcigtLWxpZ2h0Z3JheSk7XG4gICAgICAgICAgICAgICAgYm9yZGVyLXRvcC1yaWdodC1yYWRpdXM6IHVuc2V0O1xuICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b20tcmlnaHQtcmFkaXVzOiB1bnNldDtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICY6bGFzdC1jaGlsZCB7XG4gICAgICAgICAgICAgICAgYm9yZGVyLXRvcC1sZWZ0LXJhZGl1czogdW5zZXQ7XG4gICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbS1sZWZ0LXJhZGl1czogdW5zZXQ7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAmID4gZGl2IHtcbiAgICAgICAgICBoZWlnaHQ6IGNhbGMoNzV2aCAtIDEydmgpO1xuICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweDtcbiAgICAgICAgfVxuXG4gICAgICAgIEBtZWRpYSBhbGwgYW5kICgkbW9iaWxlKSB7XG4gICAgICAgICAgJiA+ICNwcmV2aWV3LWNvbnRhaW5lciB7XG4gICAgICAgICAgICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgJltkYXRhLXByZXZpZXddID4gI3Jlc3VsdHMtY29udGFpbmVyIHtcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgICAgaGVpZ2h0OiBhdXRvO1xuICAgICAgICAgICAgZmxleDogMCAwIDEwMCU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgJiAuaGlnaGxpZ2h0IHtcbiAgICAgICAgICBiYWNrZ3JvdW5kOiBjb2xvci1taXgoaW4gc3JnYiwgdmFyKC0tdGVydGlhcnkpIDYwJSwgcmdiYSgyNTUsIDI1NSwgMjU1LCAwKSk7XG4gICAgICAgICAgYm9yZGVyLXJhZGl1czogNXB4O1xuICAgICAgICAgIHNjcm9sbC1tYXJnaW4tdG9wOiAycmVtO1xuICAgICAgICB9XG5cbiAgICAgICAgJiA+ICNwcmV2aWV3LWNvbnRhaW5lciB7XG4gICAgICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgICBmb250LWZhbWlseTogaW5oZXJpdDtcbiAgICAgICAgICBjb2xvcjogdmFyKC0tZGFyayk7XG4gICAgICAgICAgbGluZS1oZWlnaHQ6IDEuNWVtO1xuICAgICAgICAgIGZvbnQtd2VpZ2h0OiAkbm9ybWFsV2VpZ2h0O1xuICAgICAgICAgIG92ZXJmbG93LXk6IGF1dG87XG4gICAgICAgICAgcGFkZGluZzogMCAycmVtO1xuXG4gICAgICAgICAgJiAucHJldmlldy1pbm5lciB7XG4gICAgICAgICAgICBtYXJnaW46IDAgYXV0bztcbiAgICAgICAgICAgIHdpZHRoOiBtaW4oJHBhZ2VXaWR0aCwgMTAwJSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYVtyb2xlPVwiYW5jaG9yXCJdIHtcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgICYgPiAjcmVzdWx0cy1jb250YWluZXIge1xuICAgICAgICAgIG92ZXJmbG93LXk6IGF1dG87XG5cbiAgICAgICAgICAmIC5yZXN1bHQtY2FyZCB7XG4gICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICAgICAgcGFkZGluZzogMWVtO1xuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xuICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZCAwLjJzIGVhc2U7XG4gICAgICAgICAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tbGlnaHRncmF5KTtcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXG4gICAgICAgICAgICAvLyBub3JtYWxpemUgY2FyZCBwcm9wc1xuICAgICAgICAgICAgZm9udC1mYW1pbHk6IGluaGVyaXQ7XG4gICAgICAgICAgICBmb250LXNpemU6IDEwMCU7XG4gICAgICAgICAgICBsaW5lLWhlaWdodDogMS4xNTtcbiAgICAgICAgICAgIG1hcmdpbjogMDtcbiAgICAgICAgICAgIHRleHQtdHJhbnNmb3JtOiBub25lO1xuICAgICAgICAgICAgdGV4dC1hbGlnbjogbGVmdDtcbiAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7XG4gICAgICAgICAgICBmb250LXdlaWdodDogaW5oZXJpdDtcblxuICAgICAgICAgICAgJjpob3ZlcixcbiAgICAgICAgICAgICY6Zm9jdXMsXG4gICAgICAgICAgICAmLmZvY3VzIHtcbiAgICAgICAgICAgICAgYmFja2dyb3VuZDogdmFyKC0tbGlnaHRncmF5KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJiA+IGgzIHtcbiAgICAgICAgICAgICAgbWFyZ2luOiAwO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmID4gdWwudGFncyB7XG4gICAgICAgICAgICAgIG1hcmdpbi10b3A6IDAuNDVyZW07XG4gICAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICYgPiB1bCA+IGxpID4gcCB7XG4gICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDhweDtcbiAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0taGlnaGxpZ2h0KTtcbiAgICAgICAgICAgICAgcGFkZGluZzogMC4ycmVtIDAuNHJlbTtcbiAgICAgICAgICAgICAgbWFyZ2luOiAwIDAuMXJlbTtcbiAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDEuNHJlbTtcbiAgICAgICAgICAgICAgZm9udC13ZWlnaHQ6ICRib2xkV2VpZ2h0O1xuICAgICAgICAgICAgICBjb2xvcjogdmFyKC0tc2Vjb25kYXJ5KTtcblxuICAgICAgICAgICAgICAmLm1hdGNoLXRhZyB7XG4gICAgICAgICAgICAgICAgY29sb3I6IHZhcigtLXRlcnRpYXJ5KTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmID4gcCB7XG4gICAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG59XG4iXX0= */`;var search_inline_default='var $t=Object.create;var Ft=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Gt=Object.getOwnPropertyNames;var Jt=Object.getPrototypeOf,Vt=Object.prototype.hasOwnProperty;var ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Zt=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Gt(e))!Vt.call(t,r)&&r!==u&&Ft(t,r,{get:()=>e[r],enumerable:!(n=Kt(e,r))||n.enumerable});return t};var bt=(t,e,u)=>(u=t!=null?$t(Jt(t)):{},Zt(e||!t||!t.__esModule?Ft(u,"default",{value:t,enumerable:!0}):u,t));var ft=ht(()=>{});var It=ht((Ue,Ot)=>{"use strict";Ot.exports=Ee;function q(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Ee(t){if(t=t||{},t.circles)return ge(t);let e=new Map;if(e.set(Date,s=>new Date(s)),e.set(Map,(s,l)=>new Map(n(Array.from(s),l))),e.set(Set,(s,l)=>new Set(n(Array.from(s),l))),t.constructorHandlers)for(let s of t.constructorHandlers)e.set(s[0],s[1]);let u=null;return t.proto?i:r;function n(s,l){let o=Object.keys(s),D=new Array(o.length);for(let h=0;h<o.length;h++){let c=o[h],f=s[c];typeof f!="object"||f===null?D[c]=f:f.constructor!==Object&&(u=e.get(f.constructor))?D[c]=u(f,l):ArrayBuffer.isView(f)?D[c]=q(f):D[c]=l(f)}return D}function r(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return n(s,r);if(s.constructor!==Object&&(u=e.get(s.constructor)))return u(s,r);let l={};for(let o in s){if(Object.hasOwnProperty.call(s,o)===!1)continue;let D=s[o];typeof D!="object"||D===null?l[o]=D:D.constructor!==Object&&(u=e.get(D.constructor))?l[o]=u(D,r):ArrayBuffer.isView(D)?l[o]=q(D):l[o]=r(D)}return l}function i(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return n(s,i);if(s.constructor!==Object&&(u=e.get(s.constructor)))return u(s,i);let l={};for(let o in s){let D=s[o];typeof D!="object"||D===null?l[o]=D:D.constructor!==Object&&(u=e.get(D.constructor))?l[o]=u(D,i):ArrayBuffer.isView(D)?l[o]=q(D):l[o]=i(D)}return l}}function ge(t){let e=[],u=[],n=new Map;if(n.set(Date,o=>new Date(o)),n.set(Map,(o,D)=>new Map(i(Array.from(o),D))),n.set(Set,(o,D)=>new Set(i(Array.from(o),D))),t.constructorHandlers)for(let o of t.constructorHandlers)n.set(o[0],o[1]);let r=null;return t.proto?l:s;function i(o,D){let h=Object.keys(o),c=new Array(h.length);for(let f=0;f<h.length;f++){let a=h[f],F=o[a];if(typeof F!="object"||F===null)c[a]=F;else if(F.constructor!==Object&&(r=n.get(F.constructor)))c[a]=r(F,D);else if(ArrayBuffer.isView(F))c[a]=q(F);else{let g=e.indexOf(F);g!==-1?c[a]=u[g]:c[a]=D(F)}}return c}function s(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return i(o,s);if(o.constructor!==Object&&(r=n.get(o.constructor)))return r(o,s);let D={};e.push(o),u.push(D);for(let h in o){if(Object.hasOwnProperty.call(o,h)===!1)continue;let c=o[h];if(typeof c!="object"||c===null)D[h]=c;else if(c.constructor!==Object&&(r=n.get(c.constructor)))D[h]=r(c,s);else if(ArrayBuffer.isView(c))D[h]=q(c);else{let f=e.indexOf(c);f!==-1?D[h]=u[f]:D[h]=s(c)}}return e.pop(),u.pop(),D}function l(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return i(o,l);if(o.constructor!==Object&&(r=n.get(o.constructor)))return r(o,l);let D={};e.push(o),u.push(D);for(let h in o){let c=o[h];if(typeof c!="object"||c===null)D[h]=c;else if(c.constructor!==Object&&(r=n.get(c.constructor)))D[h]=r(c,l);else if(ArrayBuffer.isView(c))D[h]=q(c);else{let f=e.indexOf(c);f!==-1?D[h]=u[f]:D[h]=l(c)}}return e.pop(),u.pop(),D}}});var B;function Y(t){return typeof t<"u"?t:!0}function at(t){let e=Array(t);for(let u=0;u<t;u++)e[u]=p();return e}function p(){return Object.create(null)}function Qt(t,e){return e.length-t.length}function x(t){return typeof t=="string"}function H(t){return typeof t=="object"}function ot(t){return typeof t=="function"}function pt(t,e){var u=Xt;if(t&&(e&&(t=tt(t,e)),this.H&&(t=tt(t,this.H)),this.J&&1<t.length&&(t=tt(t,this.J)),u||u==="")){if(e=t.split(u),this.filter){t=this.filter,u=e.length;let n=[];for(let r=0,i=0;r<u;r++){let s=e[r];s&&!t[s]&&(n[i++]=s)}t=n}else t=e;return t}return t}var Xt=/[\\p{Z}\\p{S}\\p{P}\\p{C}]+/u,Yt=/[\\u0300-\\u036f]/g;function Et(t,e){let u=Object.keys(t),n=u.length,r=[],i="",s=0;for(let l=0,o,D;l<n;l++)o=u[l],(D=t[o])?(r[s++]=y(e?"(?!\\\\b)"+o+"(\\\\b|_)":o),r[s++]=D):i+=(i?"|":"")+o;return i&&(r[s++]=y(e?"(?!\\\\b)("+i+")(\\\\b|_)":"("+i+")"),r[s]=""),r}function tt(t,e){for(let u=0,n=e.length;u<n&&(t=t.replace(e[u],e[u+1]),t);u+=2);return t}function y(t){return new RegExp(t,"g")}function mt(t){let e="",u="";for(let n=0,r=t.length,i;n<r;n++)(i=t[n])!==u&&(e+=u=i);return e}var te={encode:Bt,F:!1,G:""};function Bt(t){return pt.call(this,(""+t).toLowerCase(),!1)}var yt={},U={};function wt(t){$(t,"add"),$(t,"append"),$(t,"search"),$(t,"update"),$(t,"remove")}function $(t,e){t[e+"Async"]=function(){let u=this,n=arguments;var r=n[n.length-1];let i;return ot(r)&&(i=r,delete n[n.length-1]),r=new Promise(function(s){setTimeout(function(){u.async=!0;let l=u[e].apply(u,n);u.async=!1,s(l)})}),i?(r.then(i),this):r}}function xt(t,e,u,n){let r=t.length,i=[],s,l,o=0;n&&(n=[]);for(let D=r-1;0<=D;D--){let h=t[D],c=h.length,f=p(),a=!s;for(let F=0;F<c;F++){let g=h[F],A=g.length;if(A)for(let k=0,v,w;k<A;k++)if(w=g[k],s){if(s[w]){if(!D){if(u)u--;else if(i[o++]=w,o===e)return i}(D||n)&&(f[w]=1),a=!0}if(n&&(v=(l[w]||0)+1,l[w]=v,v<r)){let R=n[v-2]||(n[v-2]=[]);R[R.length]=w}}else f[w]=1}if(n)s||(l=f);else if(!a)return[];s=f}if(n)for(let D=n.length-1,h,c;0<=D;D--){h=n[D],c=h.length;for(let f=0,a;f<c;f++)if(a=h[f],!s[a]){if(u)u--;else if(i[o++]=a,o===e)return i;s[a]=1}}return i}function ee(t,e){let u=p(),n=p(),r=[];for(let i=0;i<t.length;i++)u[t[i]]=1;for(let i=0,s;i<e.length;i++){s=e[i];for(let l=0,o;l<s.length;l++)o=s[l],u[o]&&!n[o]&&(n[o]=1,r[r.length]=o)}return r}function ut(t){this.l=t!==!0&&t,this.cache=p(),this.h=[]}function vt(t,e,u){H(t)&&(t=t.query);let n=this.cache.get(t);return n||(n=this.search(t,e,u),this.cache.set(t,n)),n}ut.prototype.set=function(t,e){if(!this.cache[t]){var u=this.h.length;for(u===this.l?delete this.cache[this.h[u-1]]:u++,--u;0<u;u--)this.h[u]=this.h[u-1];this.h[0]=t}this.cache[t]=e};ut.prototype.get=function(t){let e=this.cache[t];if(this.l&&e&&(t=this.h.indexOf(t))){let u=this.h[t-1];this.h[t-1]=this.h[t],this.h[t]=u}return e};var ue={memory:{charset:"latin:extra",D:3,B:4,m:!1},performance:{D:3,B:3,s:!1,context:{depth:2,D:1}},match:{charset:"latin:extra",G:"reverse"},score:{charset:"latin:advanced",D:20,B:3,context:{depth:3,D:9}},default:{}};function Lt(t,e,u,n,r,i,s,l){setTimeout(function(){let o=t(u?u+"."+n:n,JSON.stringify(s));o&&o.then?o.then(function(){e.export(t,e,u,r,i+1,l)}):e.export(t,e,u,r,i+1,l)})}function P(t,e){if(!(this instanceof P))return new P(t);var u;if(t){x(t)?t=ue[t]:(u=t.preset)&&(t=Object.assign({},u[u],t)),u=t.charset;var n=t.lang;x(u)&&(u.indexOf(":")===-1&&(u+=":default"),u=U[u]),x(n)&&(n=yt[n])}else t={};let r,i,s=t.context||{};if(this.encode=t.encode||u&&u.encode||Bt,this.register=e||p(),this.D=r=t.resolution||9,this.G=e=u&&u.G||t.tokenize||"strict",this.depth=e==="strict"&&s.depth,this.l=Y(s.bidirectional),this.s=i=Y(t.optimize),this.m=Y(t.fastupdate),this.B=t.minlength||1,this.C=t.boost,this.map=i?at(r):p(),this.A=r=s.resolution||1,this.h=i?at(r):p(),this.F=u&&u.F||t.rtl,this.H=(e=t.matcher||n&&n.H)&&Et(e,!1),this.J=(e=t.stemmer||n&&n.J)&&Et(e,!0),u=e=t.filter||n&&n.filter){u=e,n=p();for(let l=0,o=u.length;l<o;l++)n[u[l]]=1;u=n}this.filter=u,this.cache=(e=t.cache)&&new ut(e)}B=P.prototype;B.append=function(t,e){return this.add(t,e,!0)};B.add=function(t,e,u,n){if(e&&(t||t===0)){if(!n&&!u&&this.register[t])return this.update(t,e);if(e=this.encode(e),n=e.length){let D=p(),h=p(),c=this.depth,f=this.D;for(let a=0;a<n;a++){let F=e[this.F?n-1-a:a];var r=F.length;if(F&&r>=this.B&&(c||!h[F])){var i=Q(f,n,a),s="";switch(this.G){case"full":if(2<r){for(i=0;i<r;i++)for(var l=r;l>i;l--)if(l-i>=this.B){var o=Q(f,n,a,r,i);s=F.substring(i,l),K(this,h,s,o,t,u)}break}case"reverse":if(1<r){for(l=r-1;0<l;l--)s=F[l]+s,s.length>=this.B&&K(this,h,s,Q(f,n,a,r,l),t,u);s=""}case"forward":if(1<r){for(l=0;l<r;l++)s+=F[l],s.length>=this.B&&K(this,h,s,i,t,u);break}default:if(this.C&&(i=Math.min(i/this.C(e,F,a)|0,f-1)),K(this,h,F,i,t,u),c&&1<n&&a<n-1){for(r=p(),s=this.A,i=F,l=Math.min(c+1,n-a),r[i]=1,o=1;o<l;o++)if((F=e[this.F?n-1-a-o:a+o])&&F.length>=this.B&&!r[F]){r[F]=1;let g=this.l&&F>i;K(this,D,g?i:F,Q(s+(n/2>s?0:1),n,a,l-1,o-1),t,u,g?F:i)}}}}}this.m||(this.register[t]=1)}}return this};function Q(t,e,u,n,r){return u&&1<t?e+(n||0)<=t?u+(r||0):(t-1)/(e+(n||0))*(u+(r||0))+1|0:0}function K(t,e,u,n,r,i,s){let l=s?t.h:t.map;(!e[u]||s&&!e[u][s])&&(t.s&&(l=l[n]),s?(e=e[u]||(e[u]=p()),e[s]=1,l=l[s]||(l[s]=p())):e[u]=1,l=l[u]||(l[u]=[]),t.s||(l=l[n]||(l[n]=[])),i&&l.includes(r)||(l[l.length]=r,t.m&&(t=t.register[r]||(t.register[r]=[]),t[t.length]=l)))}B.search=function(t,e,u){u||(!e&&H(t)?(u=t,t=u.query):H(e)&&(u=e));let n=[],r,i,s=0;if(u){t=u.query||t,e=u.limit,s=u.offset||0;var l=u.context;i=u.suggest}if(t&&(t=this.encode(""+t),r=t.length,1<r)){u=p();var o=[];for(let h=0,c=0,f;h<r;h++)if((f=t[h])&&f.length>=this.B&&!u[f])if(this.s||i||this.map[f])o[c++]=f,u[f]=1;else return n;t=o,r=t.length}if(!r)return n;e||(e=100),l=this.depth&&1<r&&l!==!1,u=0;let D;l?(D=t[0],u=1):1<r&&t.sort(Qt);for(let h,c;u<r;u++){if(c=t[u],l?(h=gt(this,n,i,e,s,r===2,c,D),i&&h===!1&&n.length||(D=c)):h=gt(this,n,i,e,s,r===1,c),h)return h;if(i&&u===r-1){if(o=n.length,!o){if(l){l=0,u=-1;continue}return n}if(o===1)return St(n[0],e,s)}}return xt(n,e,s,i)};function gt(t,e,u,n,r,i,s,l){let o=[],D=l?t.h:t.map;if(t.s||(D=dt(D,s,l,t.l)),D){let h=0,c=Math.min(D.length,l?t.A:t.D);for(let f=0,a=0,F,g;f<c&&!((F=D[f])&&(t.s&&(F=dt(F,s,l,t.l)),r&&F&&i&&(g=F.length,g<=r?(r-=g,F=null):(F=F.slice(r),r=0)),F&&(o[h++]=F,i&&(a+=F.length,a>=n))));f++);if(h){if(i)return St(o,n,0);e[e.length]=o;return}}return!u&&o}function St(t,e,u){return t=t.length===1?t[0]:[].concat.apply([],t),u||t.length>e?t.slice(u,u+e):t}function dt(t,e,u,n){return u?(n=n&&e>u,t=(t=t[n?e:u])&&t[n?u:e]):t=t[e],t}B.contain=function(t){return!!this.register[t]};B.update=function(t,e){return this.remove(t).add(t,e)};B.remove=function(t,e){let u=this.register[t];if(u){if(this.m)for(let n=0,r;n<u.length;n++)r=u[n],r.splice(r.indexOf(t),1);else et(this.map,t,this.D,this.s),this.depth&&et(this.h,t,this.A,this.s);if(e||delete this.register[t],this.cache){e=this.cache;for(let n=0,r,i;n<e.h.length;n++)i=e.h[n],r=e.cache[i],r.includes(t)&&(e.h.splice(n--,1),delete e.cache[i])}}return this};function et(t,e,u,n,r){let i=0;if(t.constructor===Array)if(r)e=t.indexOf(e),e!==-1?1<t.length&&(t.splice(e,1),i++):i++;else{r=Math.min(t.length,u);for(let s=0,l;s<r;s++)(l=t[s])&&(i=et(l,e,u,n,r),n||i||delete t[s])}else for(let s in t)(i=et(t[s],e,u,n,r))||delete t[s];return i}B.searchCache=vt;B.export=function(t,e,u,n,r,i){let s=!0;typeof i>"u"&&(s=new Promise(D=>{i=D}));let l,o;switch(r||(r=0)){case 0:if(l="reg",this.m){o=p();for(let D in this.register)o[D]=1}else o=this.register;break;case 1:l="cfg",o={doc:0,opt:this.s?1:0};break;case 2:l="map",o=this.map;break;case 3:l="ctx",o=this.h;break;default:typeof u>"u"&&i&&i();return}return Lt(t,e||this,u,l,n,r,o,i),s};B.import=function(t,e){if(e)switch(x(e)&&(e=JSON.parse(e)),t){case"cfg":this.s=!!e.opt;break;case"reg":this.m=!1,this.register=e;break;case"map":this.map=e;break;case"ctx":this.h=e}};wt(P.prototype);function ne(t){t=t.data;var e=self._index;let u=t.args;var n=t.task;switch(n){case"init":n=t.options||{},t=t.factory,e=n.encode,n.cache=!1,e&&e.indexOf("function")===0&&(n.encode=Function("return "+e)()),t?(Function("return "+t)()(self),self._index=new self.FlexSearch.Index(n),delete self.FlexSearch):self._index=new P(n);break;default:t=t.id,e=e[n].apply(e,u),postMessage(n==="search"?{id:t,msg:e}:{id:t})}}var Ct=0;function N(t){if(!(this instanceof N))return new N(t);var e;t?ot(e=t.encode)&&(t.encode=e.toString()):t={},(e=(self||window)._factory)&&(e=e.toString());let u=typeof window>"u"&&self.exports,n=this;this.o=re(e,u,t.worker),this.h=p(),this.o&&(u?this.o.on("message",function(r){n.h[r.id](r.msg),delete n.h[r.id]}):this.o.onmessage=function(r){r=r.data,n.h[r.id](r.msg),delete n.h[r.id]},this.o.postMessage({task:"init",factory:e,options:t}))}J("add");J("append");J("search");J("update");J("remove");function J(t){N.prototype[t]=N.prototype[t+"Async"]=function(){let e=this,u=[].slice.call(arguments);var n=u[u.length-1];let r;return ot(n)&&(r=n,u.splice(u.length-1,1)),n=new Promise(function(i){setTimeout(function(){e.h[++Ct]=i,e.o.postMessage({task:t,id:Ct,args:u})})}),r?(n.then(r),this):n}}function re(t,e,u){let n;try{n=e?new(ft()).Worker(__dirname+"/node/node.js"):t?new Worker(URL.createObjectURL(new Blob(["onmessage="+ne.toString()],{type:"text/javascript"}))):new Worker(x(u)?u:"worker/worker.js",{type:"module"})}catch{}return n}function G(t){if(!(this instanceof G))return new G(t);var e=t.document||t.doc||t,u;this.K=[],this.h=[],this.A=[],this.register=p(),this.key=(u=e.key||e.id)&&X(u,this.A)||"id",this.m=Y(t.fastupdate),this.C=(u=e.store)&&u!==!0&&[],this.store=u&&p(),this.I=(u=e.tag)&&X(u,this.A),this.l=u&&p(),this.cache=(u=t.cache)&&new ut(u),t.cache=!1,this.o=t.worker,this.async=!1,u=p();let n=e.index||e.field||e;x(n)&&(n=[n]);for(let r=0,i,s;r<n.length;r++)i=n[r],x(i)||(s=i,i=i.field),s=H(s)?Object.assign({},t,s):t,this.o&&(u[i]=new N(s),u[i].o||(this.o=!1)),this.o||(u[i]=new P(s,this.register)),this.K[r]=X(i,this.A),this.h[r]=i;if(this.C)for(t=e.store,x(t)&&(t=[t]),e=0;e<t.length;e++)this.C[e]=X(t[e],this.A);this.index=u}function X(t,e){let u=t.split(":"),n=0;for(let r=0;r<u.length;r++)t=u[r],0<=t.indexOf("[]")&&(t=t.substring(0,t.length-2))&&(e[n]=!0),t&&(u[n++]=t);return n<u.length&&(u.length=n),1<n?u:u[0]}function it(t,e){if(x(e))t=t[e];else for(let u=0;t&&u<e.length;u++)t=t[e[u]];return t}function st(t,e,u,n,r){if(t=t[r],n===u.length-1)e[r]=t;else if(t)if(t.constructor===Array)for(e=e[r]=Array(t.length),r=0;r<t.length;r++)st(t,e,u,n,r);else e=e[r]||(e[r]=p()),r=u[++n],st(t,e,u,n,r)}function lt(t,e,u,n,r,i,s,l){if(t=t[s])if(n===e.length-1){if(t.constructor===Array){if(u[n]){for(e=0;e<t.length;e++)r.add(i,t[e],!0,!0);return}t=t.join(" ")}r.add(i,t,l,!0)}else if(t.constructor===Array)for(s=0;s<t.length;s++)lt(t,e,u,n,r,i,s,l);else s=e[++n],lt(t,e,u,n,r,i,s,l)}B=G.prototype;B.add=function(t,e,u){if(H(t)&&(e=t,t=it(e,this.key)),e&&(t||t===0)){if(!u&&this.register[t])return this.update(t,e);for(let n=0,r,i;n<this.h.length;n++)i=this.h[n],r=this.K[n],x(r)&&(r=[r]),lt(e,r,this.A,0,this.index[i],t,r[0],u);if(this.I){let n=it(e,this.I),r=p();x(n)&&(n=[n]);for(let i=0,s,l;i<n.length;i++)if(s=n[i],!r[s]&&(r[s]=1,l=this.l[s]||(this.l[s]=[]),!u||!l.includes(t))&&(l[l.length]=t,this.m)){let o=this.register[t]||(this.register[t]=[]);o[o.length]=l}}if(this.store&&(!u||!this.store[t])){let n;if(this.C){n=p();for(let r=0,i;r<this.C.length;r++)i=this.C[r],x(i)?n[i]=e[i]:st(e,n,i,0,i[0])}this.store[t]=n||e}}return this};B.append=function(t,e){return this.add(t,e,!0)};B.update=function(t,e){return this.remove(t).add(t,e)};B.remove=function(t){if(H(t)&&(t=it(t,this.key)),this.register[t]){for(var e=0;e<this.h.length&&(this.index[this.h[e]].remove(t,!this.o),!this.m);e++);if(this.I&&!this.m)for(let u in this.l){e=this.l[u];let n=e.indexOf(t);n!==-1&&(1<e.length?e.splice(n,1):delete this.l[u])}this.store&&delete this.store[t],delete this.register[t]}return this};B.search=function(t,e,u,n){u||(!e&&H(t)?(u=t,t=""):H(e)&&(u=e,e=0));let r=[],i=[],s,l,o,D,h,c,f=0;if(u)if(u.constructor===Array)o=u,u=null;else{if(t=u.query||t,o=(s=u.pluck)||u.index||u.field,D=u.tag,l=this.store&&u.enrich,h=u.bool==="and",e=u.limit||e||100,c=u.offset||0,D&&(x(D)&&(D=[D]),!t)){for(let F=0,g;F<D.length;F++)(g=ie.call(this,D[F],e,c,l))&&(r[r.length]=g,f++);return f?r:[]}x(o)&&(o=[o])}o||(o=this.h),h=h&&(1<o.length||D&&1<D.length);let a=!n&&(this.o||this.async)&&[];for(let F=0,g,A,k;F<o.length;F++){let v;if(A=o[F],x(A)||(v=A,A=v.field,t=v.query||t,e=v.limit||e,l=v.enrich||l),a)a[F]=this.index[A].searchAsync(t,e,v||u);else{if(n?g=n[F]:g=this.index[A].search(t,e,v||u),k=g&&g.length,D&&k){let w=[],R=0;h&&(w[0]=[g]);for(let _=0,b,W;_<D.length;_++)b=D[_],(k=(W=this.l[b])&&W.length)&&(R++,w[w.length]=h?[W]:W);R&&(g=h?xt(w,e||100,c||0):ee(g,w),k=g.length)}if(k)i[f]=A,r[f++]=g;else if(h)return[]}}if(a){let F=this;return new Promise(function(g){Promise.all(a).then(function(A){g(F.search(t,e,u,A))})})}if(!f)return[];if(s&&(!l||!this.store))return r[0];for(let F=0,g;F<i.length;F++){if(g=r[F],g.length&&l&&(g=kt.call(this,g)),s)return g;r[F]={field:i[F],result:g}}return r};function ie(t,e,u,n){let r=this.l[t],i=r&&r.length-u;if(i&&0<i)return(i>e||u)&&(r=r.slice(u,u+e)),n&&(r=kt.call(this,r)),{tag:t,result:r}}function kt(t){let e=Array(t.length);for(let u=0,n;u<t.length;u++)n=t[u],e[u]={id:n,doc:this.store[n]};return e}B.contain=function(t){return!!this.register[t]};B.get=function(t){return this.store[t]};B.set=function(t,e){return this.store[t]=e,this};B.searchCache=vt;B.export=function(t,e,u,n,r,i){let s;if(typeof i>"u"&&(s=new Promise(l=>{i=l})),r||(r=0),n||(n=0),n<this.h.length){let l=this.h[n],o=this.index[l];e=this,setTimeout(function(){o.export(t,e,r?l:"",n,r++,i)||(n++,r=1,e.export(t,e,l,n,r,i))})}else{let l,o;switch(r){case 1:l="tag",o=this.l,u=null;break;case 2:l="store",o=this.store,u=null;break;default:i();return}Lt(t,this,u,l,n,r,o,i)}return s};B.import=function(t,e){if(e)switch(x(e)&&(e=JSON.parse(e)),t){case"tag":this.l=e;break;case"reg":this.m=!1,this.register=e;for(let n=0,r;n<this.h.length;n++)r=this.index[this.h[n]],r.register=e,r.m=!1;break;case"store":this.store=e;break;default:t=t.split(".");let u=t[0];t=t[1],u&&t&&this.index[u].import(t,e)}};wt(G.prototype);var se={encode:Tt,F:!1,G:""},le=[y("[\\xE0\\xE1\\xE2\\xE3\\xE4\\xE5]"),"a",y("[\\xE8\\xE9\\xEA\\xEB]"),"e",y("[\\xEC\\xED\\xEE\\xEF]"),"i",y("[\\xF2\\xF3\\xF4\\xF5\\xF6\\u0151]"),"o",y("[\\xF9\\xFA\\xFB\\xFC\\u0171]"),"u",y("[\\xFD\\u0177\\xFF]"),"y",y("\\xF1"),"n",y("[\\xE7c]"),"k",y("\\xDF"),"s",y(" & ")," and "];function Tt(t){var e=t=""+t;return e.normalize&&(e=e.normalize("NFD").replace(Yt,"")),pt.call(this,e.toLowerCase(),!t.normalize&&le)}var oe={encode:Mt,F:!1,G:"strict"},De=/[^a-z0-9]+/,At={b:"p",v:"f",w:"f",z:"s",x:"s",\\u00DF:"s",d:"t",n:"m",c:"k",g:"k",j:"k",q:"k",i:"e",y:"e",u:"o"};function Mt(t){t=Tt.call(this,t).join(" ");let e=[];if(t){let u=t.split(De),n=u.length;for(let r=0,i,s=0;r<n;r++)if((t=u[r])&&(!this.filter||!this.filter[t])){i=t[0];let l=At[i]||i,o=l;for(let D=1;D<t.length;D++){i=t[D];let h=At[i]||i;h&&h!==o&&(l+=h,o=h)}e[s++]=l}}return e}var ce={encode:Rt,F:!1,G:""},Fe=[y("ae"),"a",y("oe"),"o",y("sh"),"s",y("th"),"t",y("ph"),"f",y("pf"),"f",y("(?![aeo])h(?![aeo])"),"",y("(?!^[aeo])h(?!^[aeo])"),""];function Rt(t,e){return t&&(t=Mt.call(this,t).join(" "),2<t.length&&(t=tt(t,Fe)),e||(1<t.length&&(t=mt(t)),t&&(t=t.split(" ")))),t||[]}var he={encode:ae,F:!1,G:""},fe=y("(?!\\\\b)[aeo]");function ae(t){return t&&(t=Rt.call(this,t,!0),1<t.length&&(t=t.replace(fe,"")),1<t.length&&(t=mt(t)),t&&(t=t.split(" "))),t||[]}U["latin:default"]=te;U["latin:simple"]=se;U["latin:balance"]=oe;U["latin:advanced"]=ce;U["latin:extra"]=he;var Ht={Index:P,Document:G,Worker:N,registerCharset:function(t,e){U[t]=e},registerLanguage:function(t,e){yt[t]=e}};function jt(t,e){if(!t)return;function u(r){r.target===this&&(r.preventDefault(),r.stopPropagation(),e())}function n(r){r.key.startsWith("Esc")&&(r.preventDefault(),e())}t?.addEventListener("click",u),window.addCleanup(()=>t?.removeEventListener("click",u)),document.addEventListener("keydown",n),window.addCleanup(()=>document.removeEventListener("keydown",n))}function V(t){for(;t.firstChild;)t.removeChild(t.firstChild)}var Ie=Object.hasOwnProperty;var Ut=bt(It(),1),Ne=(0,Ut.default)();function de(t){let e=Be(me(t,"index"),!0);return e.length===0?"/":e}var Pt=(t,e,u)=>{let n=new URL(t.getAttribute(e),u);t.setAttribute(e,n.pathname+n.hash)};function Wt(t,e){t.querySelectorAll(\'[href^="./"], [href^="../"]\').forEach(u=>Pt(u,"href",e)),t.querySelectorAll(\'[src^="./"], [src^="../"]\').forEach(u=>Pt(u,"src",e))}function Ce(t){let e=t.split("/").filter(u=>u!=="").slice(0,-1).map(u=>"..").join("/");return e.length===0&&(e="."),e}function zt(t,e){return Ae(Ce(t),de(e))}function Ae(...t){return t.filter(e=>e!=="").join("/").replace(/\\/\\/+/g,"/")}function pe(t,e){return t===e||t.endsWith("/"+e)}function me(t,e){return pe(t,e)&&(t=t.slice(0,-e.length)),t}function Be(t,e){return t.startsWith("/")&&(t=t.substring(1)),!e&&t.endsWith("/")&&(t=t.slice(0,-1)),t}var j="basic",S="",ye=t=>t.toLowerCase().split(/([^a-z]|[^\\x00-\\x7F])/),Z=new Ht.Document({charset:"latin:extra",encode:ye,document:{id:"id",tag:"tags",index:[{field:"title",tokenize:"forward"},{field:"content",tokenize:"forward"},{field:"tags",tokenize:"forward"}]}}),we=new DOMParser,Dt=new Map,nt=30,rt=8,xe=5,qt=t=>{let e=t.split(/\\s+/).filter(n=>n.trim()!==""),u=e.length;if(u>1)for(let n=1;n<u;n++)e.push(e.slice(0,n+1).join(" "));return e.sort((n,r)=>r.length-n.length)};function Nt(t,e,u){let n=qt(t),r=e.split(/\\s+/).filter(o=>o!==""),i=0,s=r.length-1;if(u){let o=f=>n.some(a=>f.toLowerCase().startsWith(a.toLowerCase())),D=r.map(o),h=0,c=0;for(let f=0;f<Math.max(r.length-nt,0);f++){let F=D.slice(f,f+nt).reduce((g,A)=>g+(A?1:0),0);F>=h&&(h=F,c=f)}i=Math.max(c-nt,0),s=Math.min(i+2*nt,r.length-1),r=r.slice(i,s)}let l=r.map(o=>{for(let D of n)if(o.toLowerCase().includes(D.toLowerCase())){let h=new RegExp(D.toLowerCase(),"gi");return o.replace(h,\'<span class="highlight">$&</span>\')}return o}).join(" ");return`${i===0?"":"..."}${l}${s===r.length-1?"":"..."}`}function ve(t,e){let u=new DOMParser,n=qt(t),r=u.parseFromString(e.innerHTML,"text/html"),i=l=>{let o=document.createElement("span");return o.className="highlight",o.textContent=l,o},s=(l,o)=>{if(l.nodeType===Node.TEXT_NODE){let D=l.nodeValue??"",h=new RegExp(o.toLowerCase(),"gi"),c=D.match(h);if(!c||c.length===0)return;let f=document.createElement("span"),a=0;for(let F of c){let g=D.indexOf(F,a);f.appendChild(document.createTextNode(D.slice(a,g))),f.appendChild(i(F)),a=g+F.length}f.appendChild(document.createTextNode(D.slice(a))),l.parentNode?.replaceChild(f,l)}else if(l.nodeType===Node.ELEMENT_NODE){if(l.classList.contains("highlight"))return;Array.from(l.childNodes).forEach(D=>s(D,o))}};for(let l of n)s(r.body,l);return r.body}document.addEventListener("nav",async t=>{let e=t.detail.url,u=await fetchData,n=document.getElementById("search-container"),r=n?.closest(".sidebar"),i=document.getElementById("search-button"),s=document.getElementById("search-bar"),l=document.getElementById("search-layout"),o=Object.keys(u),D=E=>{l?.querySelector(`#${E.id}`)===null&&l?.appendChild(E)},h=l?.dataset?.preview==="true",c,f,a=document.createElement("div");a.id="results-container",D(a),h&&(c=document.createElement("div"),c.id="preview-container",D(c));function F(){n?.classList.remove("active"),s&&(s.value=""),r&&(r.style.zIndex=""),a&&V(a),c&&V(c),l&&l.classList.remove("display-results"),j="basic",i?.focus()}function g(E){j=E,r&&(r.style.zIndex="1"),n?.classList.add("active"),s?.focus()}let A=null;async function k(E){if(E.key==="k"&&(E.ctrlKey||E.metaKey)&&!E.shiftKey){E.preventDefault(),n?.classList.contains("active")?F():g("basic");return}else if(E.shiftKey&&(E.ctrlKey||E.metaKey)&&E.key.toLowerCase()==="k"){E.preventDefault(),n?.classList.contains("active")?F():g("tags"),s&&(s.value="#");return}if(A&&A.classList.remove("focus"),!!n?.classList.contains("active")){if(E.key==="Enter")if(a?.contains(document.activeElement)){let d=document.activeElement;if(d.classList.contains("no-match"))return;await z(d),d.click()}else{let d=document.getElementsByClassName("result-card")[0];if(!d||d?.classList.contains("no-match"))return;await z(d),d.click()}else if(E.key==="ArrowUp"||E.shiftKey&&E.key==="Tab"){if(E.preventDefault(),a?.contains(document.activeElement)){let d=A||document.activeElement,C=d?.previousElementSibling;d?.classList.remove("focus"),C?.focus(),C&&(A=C),await z(C)}}else if((E.key==="ArrowDown"||E.key==="Tab")&&(E.preventDefault(),document.activeElement===s||A!==null)){let d=A||document.getElementsByClassName("result-card")[0],C=d?.nextElementSibling;d?.classList.remove("focus"),C?.focus(),C&&(A=C),await z(C)}}}let v=(E,d)=>{let C=o[d];return{id:d,slug:C,title:j==="tags"?u[C].title:Nt(E,u[C].title??""),content:Nt(E,u[C].content??"",!0),tags:w(E.substring(1),u[C].tags)}};function w(E,d){return!d||j!=="tags"?[]:d.map(C=>C.toLowerCase().includes(E.toLowerCase())?`<li><p class="match-tag">#${C}</p></li>`:`<li><p>#${C}</p></li>`).slice(0,xe)}function R(E){return new URL(zt(e,E),location.toString())}let _=({slug:E,title:d,content:C,tags:M})=>{let T=M.length>0?`<ul class="tags">${M.join("")}</ul>`:"",m=document.createElement("a");m.classList.add("result-card"),m.id=E,m.href=R(E).toString(),m.innerHTML=`<h3>${d}</h3>${T}${h&&window.innerWidth>600?"":`<p>${C}</p>`}`,m.addEventListener("click",L=>{L.altKey||L.ctrlKey||L.metaKey||L.shiftKey||F()});let O=L=>{L.altKey||L.ctrlKey||L.metaKey||L.shiftKey||F()};async function I(L){if(!L.target)return;let _t=L.target;await z(_t)}return m.addEventListener("mouseenter",I),window.addCleanup(()=>m.removeEventListener("mouseenter",I)),m.addEventListener("click",O),window.addCleanup(()=>m.removeEventListener("click",O)),m};async function b(E){if(a)if(V(a),E.length===0?a.innerHTML=`<a class="result-card no-match">\n <h3>No results.</h3>\n <p>Try another search term?</p>\n </a>`:a.append(...E.map(_)),E.length===0&&c)V(c);else{let d=a.firstElementChild;d.classList.add("focus"),A=d,await z(d)}}async function W(E){if(Dt.has(E))return Dt.get(E);let d=R(E).toString(),C=await fetch(d).then(M=>M.text()).then(M=>{if(M===void 0)throw new Error(`Could not fetch ${d}`);let T=we.parseFromString(M??"","text/html");return Wt(T,d),[...T.getElementsByClassName("popover-hint")]});return Dt.set(E,C),C}async function z(E){if(!l||!h||!E||!c)return;let d=E.id,C=await W(d).then(T=>T.flatMap(m=>[...ve(S,m).children]));f=document.createElement("div"),f.classList.add("preview-inner"),f.append(...C),c.replaceChildren(f),[...c.querySelectorAll(".highlight")].sort((T,m)=>m.innerHTML.length-T.innerHTML.length)[0]?.scrollIntoView({block:"start"})}async function ct(E){if(!l||!Z)return;S=E.target.value,l.classList.toggle("display-results",S!==""),j=S.startsWith("#")?"tags":"basic";let d;if(j==="tags"){S=S.substring(1).trim();let m=S.indexOf(" ");if(m!=-1){let O=S.substring(0,m),I=S.substring(m+1).trim();d=await Z.searchAsync({query:I,limit:Math.max(rt,1e4),index:["title","content"],tag:O});for(let L of d)L.result=L.result.slice(0,rt);j="basic",S=I}else d=await Z.searchAsync({query:S,limit:rt,index:["tags"]})}else j==="basic"&&(d=await Z.searchAsync({query:S,limit:rt,index:["title","content"]}));let C=m=>{let O=d.filter(I=>I.field===m);return O.length===0?[]:[...O[0].result]},T=[...new Set([...C("title"),...C("content"),...C("tags")])].map(m=>v(S,m));await b(T)}document.addEventListener("keydown",k),window.addCleanup(()=>document.removeEventListener("keydown",k)),i?.addEventListener("click",()=>g("basic")),window.addCleanup(()=>i?.removeEventListener("click",()=>g("basic"))),s?.addEventListener("input",ct),window.addCleanup(()=>s?.removeEventListener("input",ct)),jt(n,F),await Le(u)});async function Le(t){let e=0,u=[];for(let[n,r]of Object.entries(t))u.push(Z.addAsync(e++,{id:e,slug:n,title:r.title,content:r.content,tags:r.tags}));return await Promise.all(u)}\n';import{jsx as jsx26,jsxs as jsxs15}from"preact/jsx-runtime";var defaultOptions17={enablePreview:!0},Search_default=__name(userOpts=>{let Search=__name(({displayClass,cfg})=>{let opts={...defaultOptions17,...userOpts},searchPlaceholder=i18n(cfg.locale).components.search.searchBarPlaceholder;return jsxs15("div",{class:classNames(displayClass,"search"),children:[jsxs15("button",{class:"search-button",id:"search-button",children:[jsx26("p",{children:i18n(cfg.locale).components.search.title}),jsxs15("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 19.9 19.7",children:[jsx26("title",{children:"Search"}),jsxs15("g",{class:"search-path",fill:"none",children:[jsx26("path",{"stroke-linecap":"square",d:"M18.5 18.3l-5.4-5.4"}),jsx26("circle",{cx:"8",cy:"8",r:"7"})]})]})]}),jsx26("div",{id:"search-container",children:jsxs15("div",{id:"search-space",children:[jsx26("input",{autocomplete:"off",id:"search-bar",name:"search",type:"text","aria-label":searchPlaceholder,placeholder:searchPlaceholder}),jsx26("div",{id:"search-layout","data-preview":opts.enablePreview})]})})]})},"Search");return Search.afterDOMLoaded=search_inline_default,Search.css=search_default,Search},"default");var footer_default=`footer {
|
||
text-align: left;
|
||
margin-bottom: 4rem;
|
||
opacity: 0.7;
|
||
}
|
||
footer ul {
|
||
list-style: none;
|
||
margin: 0;
|
||
padding: 0;
|
||
display: flex;
|
||
flex-direction: row;
|
||
gap: 1rem;
|
||
margin-top: -1rem;
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiZm9vdGVyLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRTtFQUNBO0VBQ0E7O0FBRUE7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQSIsInNvdXJjZXNDb250ZW50IjpbImZvb3RlciB7XG4gIHRleHQtYWxpZ246IGxlZnQ7XG4gIG1hcmdpbi1ib3R0b206IDRyZW07XG4gIG9wYWNpdHk6IDAuNztcblxuICAmIHVsIHtcbiAgICBsaXN0LXN0eWxlOiBub25lO1xuICAgIG1hcmdpbjogMDtcbiAgICBwYWRkaW5nOiAwO1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgZmxleC1kaXJlY3Rpb246IHJvdztcbiAgICBnYXA6IDFyZW07XG4gICAgbWFyZ2luLXRvcDogLTFyZW07XG4gIH1cbn1cbiJdfQ== */`;var version="4.4.0";import{jsx as jsx27,jsxs as jsxs16}from"preact/jsx-runtime";var Footer_default=__name(opts=>{let Footer=__name(({displayClass,cfg})=>{let year=new Date().getFullYear(),links=opts?.links??[];return jsxs16("footer",{class:`${displayClass??""}`,children:[jsxs16("p",{children:[i18n(cfg.locale).components.footer.createdWith," ",jsxs16("a",{href:"https://quartz.jzhao.xyz/",children:["Quartz v",version]})," \xA9 ",year]}),jsx27("ul",{children:Object.entries(links).map(([text,link])=>jsx27("li",{children:jsx27("a",{href:link,children:text})}))})]})},"Footer");return Footer.css=footer_default,Footer},"default");import{Fragment as Fragment5,jsx as jsx28}from"preact/jsx-runtime";var DesktopOnly_default=__name(component=>{if(component){let Component=component,DesktopOnly=__name(props=>jsx28(Component,{displayClass:"desktop-only",...props}),"DesktopOnly");return DesktopOnly.displayName=component.displayName,DesktopOnly.afterDOMLoaded=component?.afterDOMLoaded,DesktopOnly.beforeDOMLoaded=component?.beforeDOMLoaded,DesktopOnly.css=component?.css,DesktopOnly}else return()=>jsx28(Fragment5,{})},"default");import{Fragment as Fragment6,jsx as jsx29}from"preact/jsx-runtime";var MobileOnly_default=__name(component=>{if(component){let Component=component,MobileOnly=__name(props=>jsx29(Component,{displayClass:"mobile-only",...props}),"MobileOnly");return MobileOnly.displayName=component.displayName,MobileOnly.afterDOMLoaded=component?.afterDOMLoaded,MobileOnly.beforeDOMLoaded=component?.beforeDOMLoaded,MobileOnly.css=component?.css,MobileOnly}else return()=>jsx29(Fragment6,{})},"default");import{jsx as jsx30,jsxs as jsxs17}from"preact/jsx-runtime";var breadcrumbs_default=`.breadcrumb-container {
|
||
margin: 0;
|
||
margin-top: 0.75rem;
|
||
padding: 0;
|
||
display: flex;
|
||
flex-direction: row;
|
||
flex-wrap: wrap;
|
||
gap: 0.5rem;
|
||
}
|
||
|
||
.breadcrumb-element {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
.breadcrumb-element p {
|
||
margin: 0;
|
||
margin-left: 0.5rem;
|
||
padding: 0;
|
||
line-height: normal;
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiYnJlYWRjcnVtYnMuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOzs7QUFHRjtFQU9FO0VBQ0E7RUFDQTtFQUNBOztBQVRBO0VBQ0U7RUFDQTtFQUNBO0VBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyIuYnJlYWRjcnVtYi1jb250YWluZXIge1xuICBtYXJnaW46IDA7XG4gIG1hcmdpbi10b3A6IDAuNzVyZW07XG4gIHBhZGRpbmc6IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGZsZXgtZGlyZWN0aW9uOiByb3c7XG4gIGZsZXgtd3JhcDogd3JhcDtcbiAgZ2FwOiAwLjVyZW07XG59XG5cbi5icmVhZGNydW1iLWVsZW1lbnQge1xuICBwIHtcbiAgICBtYXJnaW46IDA7XG4gICAgbWFyZ2luLWxlZnQ6IDAuNXJlbTtcbiAgICBwYWRkaW5nOiAwO1xuICAgIGxpbmUtaGVpZ2h0OiBub3JtYWw7XG4gIH1cbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC1kaXJlY3Rpb246IHJvdztcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG59XG4iXX0= */`;import{Fragment as Fragment7,jsx as jsx31,jsxs as jsxs18}from"preact/jsx-runtime";var defaultOptions18={spacerSymbol:"\u276F",rootName:"Home",resolveFrontmatterTitle:!0,hideOnRoot:!0,showCurrentPage:!0};function formatCrumb(displayName,baseSlug,currentSlug){return{displayName:displayName.replaceAll("-"," "),path:resolveRelative(baseSlug,currentSlug)}}__name(formatCrumb,"formatCrumb");var Breadcrumbs_default=__name(opts=>{let options2={...defaultOptions18,...opts},folderIndex,Breadcrumbs=__name(({fileData,allFiles,displayClass})=>{if(options2.hideOnRoot&&fileData.slug==="index")return jsx31(Fragment7,{});let crumbs=[formatCrumb(options2.rootName,fileData.slug,"/")];if(!folderIndex&&options2.resolveFrontmatterTitle){folderIndex=new Map;for(let file of allFiles){let folderParts=file.slug?.split("/");folderParts?.at(-1)==="index"&&folderIndex.set(folderParts.slice(0,-1).join("/"),file)}}let slugParts=fileData.slug?.split("/");if(slugParts){let isTagPath=slugParts[0]==="tags",currentPath="";for(let i=0;i<slugParts.length-1;i++){let curPathSegment=slugParts[i],currentFile=folderIndex?.get(slugParts.slice(0,i+1).join("/"));if(currentFile){let title=currentFile.frontmatter.title;title!=="index"&&(curPathSegment=title)}currentPath=joinSegments(currentPath,slugParts[i]);let includeTrailingSlash=!isTagPath||i<1,crumb=formatCrumb(curPathSegment,fileData.slug,currentPath+(includeTrailingSlash?"/":""));crumbs.push(crumb)}options2.showCurrentPage&&slugParts.at(-1)!=="index"&&crumbs.push({displayName:fileData.frontmatter.title,path:""})}return jsx31("nav",{class:classNames(displayClass,"breadcrumb-container"),"aria-label":"breadcrumbs",children:crumbs.map((crumb,index)=>jsxs18("div",{class:"breadcrumb-element",children:[jsx31("a",{href:crumb.path,children:crumb.displayName}),index!==crumbs.length-1&&jsx31("p",{children:` ${options2.spacerSymbol} `})]}))})},"Breadcrumbs");return Breadcrumbs.css=breadcrumbs_default,Breadcrumbs},"default");import{Fragment as Fragment8,jsx as jsx32}from"preact/jsx-runtime";var sharedPageComponents={head:Head_default(),header:[],afterBody:[],footer:Footer_default({links:{GitHub:"https://github.com/jackyzha0/quartz","Discord Community":"https://discord.gg/cRFFHYye7t"}})},defaultContentPageLayout={beforeBody:[Breadcrumbs_default(),ArticleTitle_default(),ContentMeta_default(),TagList_default()],left:[PageTitle_default(),MobileOnly_default(Spacer_default()),Search_default(),Darkmode_default(),DesktopOnly_default(Explorer_default())],right:[Graph_default(),DesktopOnly_default(TableOfContents_default()),Backlinks_default()]},defaultListPageLayout={beforeBody:[Breadcrumbs_default(),ArticleTitle_default(),ContentMeta_default()],left:[PageTitle_default(),MobileOnly_default(Spacer_default()),Search_default(),Darkmode_default(),DesktopOnly_default(Explorer_default())],right:[]};import chalk4 from"chalk";import path6 from"path";import fs3 from"fs";var write=__name(async({ctx,slug,ext,content})=>{let pathToPage=joinSegments(ctx.argv.output,slug+ext),dir=path6.dirname(pathToPage);return await fs3.promises.mkdir(dir,{recursive:!0}),await fs3.promises.writeFile(pathToPage,content),pathToPage},"write");var DepGraph=class{static{__name(this,"DepGraph")}_graph=new Map;constructor(){this._graph=new Map}export(){return{nodes:this.nodes,edges:this.edges}}toString(){return JSON.stringify(this.export(),null,2)}get nodes(){return Array.from(this._graph.keys())}get edges(){let edges=[];return this.forEachEdge(edge=>edges.push(edge)),edges}hasNode(node){return this._graph.has(node)}addNode(node){this._graph.has(node)||this._graph.set(node,{incoming:new Set,outgoing:new Set})}removeNode(node){if(this._graph.has(node)){for(let target of this._graph.get(node).outgoing)this.removeEdge(node,target);for(let source of this._graph.get(node).incoming)this.removeEdge(source,node);this._graph.delete(node)}}forEachNode(callback){for(let node of this._graph.keys())callback(node)}hasEdge(from,to){return!!this._graph.get(from)?.outgoing.has(to)}addEdge(from,to){this.addNode(from),this.addNode(to),this._graph.get(from).outgoing.add(to),this._graph.get(to).incoming.add(from)}removeEdge(from,to){this._graph.has(from)&&this._graph.has(to)&&(this._graph.get(from).outgoing.delete(to),this._graph.get(to).incoming.delete(from))}outDegree(node){return this.hasNode(node)?this._graph.get(node).outgoing.size:-1}inDegree(node){return this.hasNode(node)?this._graph.get(node).incoming.size:-1}forEachOutNeighbor(node,callback){this._graph.get(node)?.outgoing.forEach(callback)}forEachInNeighbor(node,callback){this._graph.get(node)?.incoming.forEach(callback)}forEachEdge(callback){for(let[source,{outgoing}]of this._graph.entries())for(let target of outgoing)callback([source,target])}mergeGraph(other){other.forEachEdge(([source,target])=>{this.addNode(source),this.addNode(target),this.addEdge(source,target)})}updateIncomingEdgesForNode(other,node){this.addNode(node),other.forEachInNeighbor(node,neighbor=>{this.addEdge(neighbor,node)}),this.forEachEdge(([source,target])=>{target===node&&!other.hasEdge(source,target)&&this.removeEdge(source,target)})}removeOrphanNodes(){let orphanNodes=new Set;return this.forEachNode(node=>{this.inDegree(node)===0&&this.outDegree(node)===0&&orphanNodes.add(node)}),orphanNodes.forEach(node=>{this.removeNode(node)}),orphanNodes}getLeafNodes(node){let stack=[node],visited=new Set,leafNodes=new Set;for(;stack.length>0;){let node2=stack.pop();visited.has(node2)||(visited.add(node2),this.outDegree(node2)===0&&leafNodes.add(node2),this.forEachOutNeighbor(node2,neighbor=>{visited.has(neighbor)||stack.push(neighbor)}))}return leafNodes}getLeafNodeAncestors(node){let leafNodes=this.getLeafNodes(node),visited=new Set,upstreamNodes=new Set;return leafNodes.forEach(leafNode=>{let stack=[leafNode];for(;stack.length>0;){let node2=stack.pop();visited.has(node2)||(visited.add(node2),this.outDegree(node2)!==0&&upstreamNodes.add(node2),this.forEachInNeighbor(node2,parentNode=>{visited.has(parentNode)||stack.push(parentNode)}))}}),upstreamNodes}};var parseDependencies=__name((argv,hast,file)=>{let dependencies=[];return visit7(hast,"element",elem=>{let ref=null;if(["script","img","audio","video","source","iframe"].includes(elem.tagName)&&elem?.properties?.src?ref=elem.properties.src.toString():["a","link"].includes(elem.tagName)&&elem?.properties?.href&&(ref=elem.properties.href.toString()),ref===null||!isRelativeURL(ref))return;let fp=path7.join(file.data.filePath,path7.relative(argv.directory,ref)).replace(/\\/g,"/");fp.split("/").pop()?.includes(".")||(fp+=".md"),dependencies.push(fp)}),dependencies},"parseDependencies"),ContentPage=__name(userOpts=>{let opts={...sharedPageComponents,...defaultContentPageLayout,pageBody:Content_default(),...userOpts},{head:Head,header,beforeBody,pageBody,afterBody,left,right,footer:Footer}=opts,Header2=Header_default(),Body2=Body_default();return{name:"ContentPage",getQuartzComponents(){return[Head,Header2,Body2,...header,...beforeBody,pageBody,...afterBody,...left,...right,Footer]},async getDependencyGraph(ctx,content,_resources){let graph=new DepGraph;for(let[tree,file]of content){let sourcePath=file.data.filePath,slug=file.data.slug;graph.addEdge(sourcePath,joinSegments(ctx.argv.output,slug+".html")),parseDependencies(ctx.argv,tree,file).forEach(dep=>{graph.addEdge(dep,sourcePath)})}return graph},async emit(ctx,content,resources){let cfg=ctx.cfg.configuration,fps=[],allFiles=content.map(c=>c[1].data),containsIndex=!1;for(let[tree,file]of content){let slug=file.data.slug;slug==="index"&&(containsIndex=!0);let externalResources=pageResources(pathToRoot(slug),resources),componentData={ctx,fileData:file.data,externalResources,cfg,children:[],tree,allFiles},content2=renderPage(cfg,slug,componentData,opts,externalResources),fp=await write({ctx,content:content2,slug,ext:".html"});fps.push(fp)}return!containsIndex&&!ctx.argv.fastRebuild&&console.log(chalk4.yellow(`
|
||
Warning: you seem to be missing an \`index.md\` home page file at the root of your \`${ctx.argv.directory}\` folder. This may cause errors when deploying.`)),fps}}},"ContentPage");import{VFile}from"vfile";function defaultProcessedContent(vfileData){let root={type:"root",children:[]},vfile=new VFile("");return vfile.data=vfileData,[root,vfile]}__name(defaultProcessedContent,"defaultProcessedContent");var TagPage=__name(userOpts=>{let opts={...sharedPageComponents,...defaultListPageLayout,pageBody:TagContent_default({sort:userOpts?.sort}),...userOpts},{head:Head,header,beforeBody,pageBody,afterBody,left,right,footer:Footer}=opts,Header2=Header_default(),Body2=Body_default();return{name:"TagPage",getQuartzComponents(){return[Head,Header2,Body2,...header,...beforeBody,pageBody,...afterBody,...left,...right,Footer]},async getDependencyGraph(ctx,content,_resources){let graph=new DepGraph;for(let[_tree,file]of content){let sourcePath=file.data.filePath,tags=(file.data.frontmatter?.tags??[]).flatMap(getAllSegmentPrefixes);tags.length>0&&tags.push("index");for(let tag of tags)graph.addEdge(sourcePath,joinSegments(ctx.argv.output,"tags",tag+".html"))}return graph},async emit(ctx,content,resources){let fps=[],allFiles=content.map(c=>c[1].data),cfg=ctx.cfg.configuration,tags=new Set(allFiles.flatMap(data=>data.frontmatter?.tags??[]).flatMap(getAllSegmentPrefixes));tags.add("index");let tagDescriptions=Object.fromEntries([...tags].map(tag=>{let title=tag==="index"?i18n(cfg.locale).pages.tagContent.tagIndex:`${i18n(cfg.locale).pages.tagContent.tag}: ${tag}`;return[tag,defaultProcessedContent({slug:joinSegments("tags",tag),frontmatter:{title,tags:[]}})]}));for(let[tree,file]of content){let slug=file.data.slug;if(slug.startsWith("tags/")){let tag=slug.slice(5);tags.has(tag)&&(tagDescriptions[tag]=[tree,file],file.data.frontmatter?.title===tag&&(file.data.frontmatter.title=`${i18n(cfg.locale).pages.tagContent.tag}: ${tag}`))}}for(let tag of tags){let slug=joinSegments("tags",tag),externalResources=pageResources(pathToRoot(slug),resources),[tree,file]=tagDescriptions[tag],componentData={ctx,fileData:file.data,externalResources,cfg,children:[],tree,allFiles},content2=renderPage(cfg,slug,componentData,opts,externalResources),fp=await write({ctx,content:content2,slug:file.data.slug,ext:".html"});fps.push(fp)}return fps}}},"TagPage");import path8 from"path";var FolderPage=__name(userOpts=>{let opts={...sharedPageComponents,...defaultListPageLayout,pageBody:FolderContent_default({sort:userOpts?.sort}),...userOpts},{head:Head,header,beforeBody,pageBody,afterBody,left,right,footer:Footer}=opts,Header2=Header_default(),Body2=Body_default();return{name:"FolderPage",getQuartzComponents(){return[Head,Header2,Body2,...header,...beforeBody,pageBody,...afterBody,...left,...right,Footer]},async getDependencyGraph(_ctx,content,_resources){let graph=new DepGraph;return content.map(([_tree,vfile])=>{let slug=vfile.data.slug,folderName=path8.dirname(slug??"");slug&&folderName!=="."&&folderName!=="tags"&&graph.addEdge(vfile.data.filePath,joinSegments(folderName,"index.html"))}),graph},async emit(ctx,content,resources){let fps=[],allFiles=content.map(c=>c[1].data),cfg=ctx.cfg.configuration,folders=new Set(allFiles.flatMap(data=>data.slug?_getFolders(data.slug).filter(folderName=>folderName!=="."&&folderName!=="tags"):[])),folderDescriptions=Object.fromEntries([...folders].map(folder=>[folder,defaultProcessedContent({slug:joinSegments(folder,"index"),frontmatter:{title:`${i18n(cfg.locale).pages.folderContent.folder}: ${folder}`,tags:[]}})]));for(let[tree,file]of content){let slug=stripSlashes(simplifySlug(file.data.slug));folders.has(slug)&&(folderDescriptions[slug]=[tree,file])}for(let folder of folders){let slug=joinSegments(folder,"index"),externalResources=pageResources(pathToRoot(slug),resources),[tree,file]=folderDescriptions[folder],componentData={ctx,fileData:file.data,externalResources,cfg,children:[],tree,allFiles},content2=renderPage(cfg,slug,componentData,opts,externalResources),fp=await write({ctx,content:content2,slug,ext:".html"});fps.push(fp)}return fps}}},"FolderPage");function _getFolders(slug){var folderName=path8.dirname(slug??"");let parentFolderNames=[folderName];for(;folderName!==".";)folderName=path8.dirname(folderName??""),parentFolderNames.push(folderName);return parentFolderNames}__name(_getFolders,"_getFolders");import{toHtml as toHtml2}from"hast-util-to-html";var defaultOptions19={enableSiteMap:!0,enableRSS:!0,rssLimit:10,rssFullHtml:!1,includeEmptyFiles:!0};function generateSiteMap(cfg,idx){let base=cfg.baseUrl??"",createURLEntry=__name((slug,content)=>`<url>
|
||
<loc>https://${joinSegments(base,encodeURI(slug))}</loc>
|
||
${content.date&&`<lastmod>${content.date.toISOString()}</lastmod>`}
|
||
</url>`,"createURLEntry");return`<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">${Array.from(idx).map(([slug,content])=>createURLEntry(simplifySlug(slug),content)).join("")}</urlset>`}__name(generateSiteMap,"generateSiteMap");function generateRSSFeed(cfg,idx,limit){let base=cfg.baseUrl??"",createURLEntry=__name((slug,content)=>`<item>
|
||
<title>${escapeHTML(content.title)}</title>
|
||
<link>https://${joinSegments(base,encodeURI(slug))}</link>
|
||
<guid>https://${joinSegments(base,encodeURI(slug))}</guid>
|
||
<description>${content.richContent??content.description}</description>
|
||
<pubDate>${content.date?.toUTCString()}</pubDate>
|
||
</item>`,"createURLEntry"),items=Array.from(idx).sort(([_,f1],[__,f2])=>f1.date&&f2.date?f2.date.getTime()-f1.date.getTime():f1.date&&!f2.date?-1:!f1.date&&f2.date?1:f1.title.localeCompare(f2.title)).map(([slug,content])=>createURLEntry(simplifySlug(slug),content)).slice(0,limit??idx.size).join("");return`<?xml version="1.0" encoding="UTF-8" ?>
|
||
<rss version="2.0">
|
||
<channel>
|
||
<title>${escapeHTML(cfg.pageTitle)}</title>
|
||
<link>https://${base}</link>
|
||
<description>${limit?i18n(cfg.locale).pages.rss.lastFewNotes({count:limit}):i18n(cfg.locale).pages.rss.recentNotes} on ${escapeHTML(cfg.pageTitle)}</description>
|
||
<generator>Quartz -- quartz.jzhao.xyz</generator>
|
||
${items}
|
||
</channel>
|
||
</rss>`}__name(generateRSSFeed,"generateRSSFeed");var ContentIndex=__name(opts=>(opts={...defaultOptions19,...opts},{name:"ContentIndex",async getDependencyGraph(ctx,content,_resources){let graph=new DepGraph;for(let[_tree,file]of content){let sourcePath=file.data.filePath;graph.addEdge(sourcePath,joinSegments(ctx.argv.output,"static/contentIndex.json")),opts?.enableSiteMap&&graph.addEdge(sourcePath,joinSegments(ctx.argv.output,"sitemap.xml")),opts?.enableRSS&&graph.addEdge(sourcePath,joinSegments(ctx.argv.output,"index.xml"))}return graph},async emit(ctx,content,_resources){let cfg=ctx.cfg.configuration,emitted=[],linkIndex=new Map;for(let[tree,file]of content){let slug=file.data.slug,date=getDate(ctx.cfg.configuration,file.data)??new Date;(opts?.includeEmptyFiles||file.data.text&&file.data.text!=="")&&linkIndex.set(slug,{title:file.data.frontmatter?.title,links:file.data.links??[],tags:file.data.frontmatter?.tags??[],content:file.data.text??"",richContent:opts?.rssFullHtml?escapeHTML(toHtml2(tree,{allowDangerousHtml:!0})):void 0,date,description:file.data.description??""})}opts?.enableSiteMap&&emitted.push(await write({ctx,content:generateSiteMap(cfg,linkIndex),slug:"sitemap",ext:".xml"})),opts?.enableRSS&&emitted.push(await write({ctx,content:generateRSSFeed(cfg,linkIndex,opts.rssLimit),slug:"index",ext:".xml"}));let fp=joinSegments("static","contentIndex"),simplifiedIndex=Object.fromEntries(Array.from(linkIndex).map(([slug,content2])=>(delete content2.description,delete content2.date,[slug,content2])));return emitted.push(await write({ctx,content:JSON.stringify(simplifiedIndex),slug:fp,ext:".json"})),emitted},getQuartzComponents:__name(()=>[],"getQuartzComponents")}),"ContentIndex");import path9 from"path";var AliasRedirects=__name(()=>({name:"AliasRedirects",getQuartzComponents(){return[]},async getDependencyGraph(ctx,content,_resources){let graph=new DepGraph,{argv}=ctx;for(let[_tree,file]of content){let dir=path9.posix.relative(argv.directory,path9.dirname(file.data.filePath)),slugs=(file.data.frontmatter?.aliases??[]).map(alias=>path9.posix.join(dir,alias)),permalink=file.data.frontmatter?.permalink;typeof permalink=="string"&&slugs.push(permalink);for(let slug of slugs)slug.endsWith("/")&&(slug=joinSegments(slug,"index")),graph.addEdge(file.data.filePath,joinSegments(argv.output,slug+".html"))}return graph},async emit(ctx,content,_resources){let{argv}=ctx,fps=[];for(let[_tree,file]of content){let ogSlug=simplifySlug(file.data.slug),dir=path9.posix.relative(argv.directory,path9.dirname(file.data.filePath)),slugs=(file.data.frontmatter?.aliases??[]).map(alias=>path9.posix.join(dir,alias)),permalink=file.data.frontmatter?.permalink;typeof permalink=="string"&&slugs.push(permalink);for(let slug of slugs){slug.endsWith("/")&&(slug=joinSegments(slug,"index"));let redirUrl=resolveRelative(slug,file.data.slug),fp=await write({ctx,content:`
|
||
<!DOCTYPE html>
|
||
<html lang="en-us">
|
||
<head>
|
||
<title>${ogSlug}</title>
|
||
<link rel="canonical" href="${redirUrl}">
|
||
<meta name="robots" content="noindex">
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="refresh" content="0; url=${redirUrl}">
|
||
</head>
|
||
</html>
|
||
`,slug,ext:".html"});fps.push(fp)}}return fps}}),"AliasRedirects");import path11 from"path";import fs4 from"fs";import path10 from"path";import{globby}from"globby";function toPosixPath(fp){return fp.split(path10.sep).join("/")}__name(toPosixPath,"toPosixPath");async function glob(pattern,cwd,ignorePatterns){return(await globby(pattern,{cwd,ignore:ignorePatterns,gitignore:!0})).map(toPosixPath)}__name(glob,"glob");var filesToCopy=__name(async(argv,cfg)=>await glob("**",argv.directory,["**/*.md",...cfg.configuration.ignorePatterns]),"filesToCopy"),Assets=__name(()=>({name:"Assets",getQuartzComponents(){return[]},async getDependencyGraph(ctx,_content,_resources){let{argv,cfg}=ctx,graph=new DepGraph,fps=await filesToCopy(argv,cfg);for(let fp of fps){let ext=path11.extname(fp),src=joinSegments(argv.directory,fp),name=slugifyFilePath(fp,!0)+ext,dest=joinSegments(argv.output,name);graph.addEdge(src,dest)}return graph},async emit({argv,cfg},_content,_resources){let assetsPath=argv.output,fps=await filesToCopy(argv,cfg),res=[];for(let fp of fps){let ext=path11.extname(fp),src=joinSegments(argv.directory,fp),name=slugifyFilePath(fp,!0)+ext,dest=joinSegments(assetsPath,name),dir=path11.dirname(dest);await fs4.promises.mkdir(dir,{recursive:!0}),await fs4.promises.copyFile(src,dest),res.push(dest)}return res}}),"Assets");import fs5 from"fs";var Static=__name(()=>({name:"Static",getQuartzComponents(){return[]},async getDependencyGraph({argv,cfg},_content,_resources){let graph=new DepGraph,staticPath=joinSegments(QUARTZ,"static"),fps=await glob("**",staticPath,cfg.configuration.ignorePatterns);for(let fp of fps)graph.addEdge(joinSegments("static",fp),joinSegments(argv.output,"static",fp));return graph},async emit({argv,cfg},_content,_resources){let staticPath=joinSegments(QUARTZ,"static"),fps=await glob("**",staticPath,cfg.configuration.ignorePatterns);return await fs5.promises.cp(staticPath,joinSegments(argv.output,"static"),{recursive:!0,dereference:!0}),fps.map(fp=>joinSegments(argv.output,"static",fp))}}),"Static");var spa_inline_default='var $=Object.create;var R=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var q=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports);var z=(u,e,t,D)=>{if(e&&typeof e=="object"||typeof e=="function")for(let F of _(e))!V.call(u,F)&&F!==t&&R(u,F,{get:()=>e[F],enumerable:!(D=W(e,F))||D.enumerable});return u};var K=(u,e,t)=>(t=u!=null?$(I(u)):{},z(e||!u||!u.__esModule?R(t,"default",{value:u,enumerable:!0}):t,u));var k=q((Bu,j)=>{"use strict";j.exports=uu;function f(u){return u instanceof Buffer?Buffer.from(u):new u.constructor(u.buffer.slice(),u.byteOffset,u.length)}function uu(u){if(u=u||{},u.circles)return eu(u);let e=new Map;if(e.set(Date,n=>new Date(n)),e.set(Map,(n,i)=>new Map(D(Array.from(n),i))),e.set(Set,(n,i)=>new Set(D(Array.from(n),i))),u.constructorHandlers)for(let n of u.constructorHandlers)e.set(n[0],n[1]);let t=null;return u.proto?l:F;function D(n,i){let r=Object.keys(n),o=new Array(r.length);for(let c=0;c<r.length;c++){let s=r[c],a=n[s];typeof a!="object"||a===null?o[s]=a:a.constructor!==Object&&(t=e.get(a.constructor))?o[s]=t(a,i):ArrayBuffer.isView(a)?o[s]=f(a):o[s]=i(a)}return o}function F(n){if(typeof n!="object"||n===null)return n;if(Array.isArray(n))return D(n,F);if(n.constructor!==Object&&(t=e.get(n.constructor)))return t(n,F);let i={};for(let r in n){if(Object.hasOwnProperty.call(n,r)===!1)continue;let o=n[r];typeof o!="object"||o===null?i[r]=o:o.constructor!==Object&&(t=e.get(o.constructor))?i[r]=t(o,F):ArrayBuffer.isView(o)?i[r]=f(o):i[r]=F(o)}return i}function l(n){if(typeof n!="object"||n===null)return n;if(Array.isArray(n))return D(n,l);if(n.constructor!==Object&&(t=e.get(n.constructor)))return t(n,l);let i={};for(let r in n){let o=n[r];typeof o!="object"||o===null?i[r]=o:o.constructor!==Object&&(t=e.get(o.constructor))?i[r]=t(o,l):ArrayBuffer.isView(o)?i[r]=f(o):i[r]=l(o)}return i}}function eu(u){let e=[],t=[],D=new Map;if(D.set(Date,r=>new Date(r)),D.set(Map,(r,o)=>new Map(l(Array.from(r),o))),D.set(Set,(r,o)=>new Set(l(Array.from(r),o))),u.constructorHandlers)for(let r of u.constructorHandlers)D.set(r[0],r[1]);let F=null;return u.proto?i:n;function l(r,o){let c=Object.keys(r),s=new Array(c.length);for(let a=0;a<c.length;a++){let A=c[a],E=r[A];if(typeof E!="object"||E===null)s[A]=E;else if(E.constructor!==Object&&(F=D.get(E.constructor)))s[A]=F(E,o);else if(ArrayBuffer.isView(E))s[A]=f(E);else{let S=e.indexOf(E);S!==-1?s[A]=t[S]:s[A]=o(E)}}return s}function n(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return l(r,n);if(r.constructor!==Object&&(F=D.get(r.constructor)))return F(r,n);let o={};e.push(r),t.push(o);for(let c in r){if(Object.hasOwnProperty.call(r,c)===!1)continue;let s=r[c];if(typeof s!="object"||s===null)o[c]=s;else if(s.constructor!==Object&&(F=D.get(s.constructor)))o[c]=F(s,n);else if(ArrayBuffer.isView(s))o[c]=f(s);else{let a=e.indexOf(s);a!==-1?o[c]=t[a]:o[c]=n(s)}}return e.pop(),t.pop(),o}function i(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return l(r,i);if(r.constructor!==Object&&(F=D.get(r.constructor)))return F(r,i);let o={};e.push(r),t.push(o);for(let c in r){let s=r[c];if(typeof s!="object"||s===null)o[c]=s;else if(s.constructor!==Object&&(F=D.get(s.constructor)))o[c]=F(s,i);else if(ArrayBuffer.isView(s))o[c]=f(s);else{let a=e.indexOf(s);a!==-1?o[c]=t[a]:o[c]=i(s)}}return e.pop(),t.pop(),o}}});var m=u=>(e,t)=>e[`node${u}`]===t[`node${u}`],Z=m("Name"),Q=m("Type"),Y=m("Value");function L(u,e){if(u.attributes.length===0&&e.attributes.length===0)return[];let t=[],D=new Map,F=new Map;for(let l of u.attributes)D.set(l.name,l.value);for(let l of e.attributes){let n=D.get(l.name);l.value===n?D.delete(l.name):(typeof n<"u"&&D.delete(l.name),F.set(l.name,l.value))}for(let l of D.keys())t.push({type:5,name:l});for(let[l,n]of F.entries())t.push({type:4,name:l,value:n});return t}function g(u,e=!0){let t=`${u.localName}`;for(let{name:D,value:F}of u.attributes)e&&D.startsWith("data-")||(t+=`[${D}=${F}]`);return t+=u.innerHTML,t}function h(u){switch(u.tagName){case"BASE":case"TITLE":return u.localName;case"META":{if(u.hasAttribute("name"))return`meta[name="${u.getAttribute("name")}"]`;if(u.hasAttribute("property"))return`meta[name="${u.getAttribute("property")}"]`;break}case"LINK":{if(u.hasAttribute("rel")&&u.hasAttribute("href"))return`link[rel="${u.getAttribute("rel")}"][href="${u.getAttribute("href")}"]`;if(u.hasAttribute("href"))return`link[href="${u.getAttribute("href")}"]`;break}}return g(u)}function G(u){let[e,t=""]=u.split("?");return`${e}?t=${Date.now()}&${t.replace(/t=\\d+/g,"")}`}function C(u){if(u.nodeType===1&&u.hasAttribute("data-persist"))return u;if(u.nodeType===1&&u.localName==="script"){let e=document.createElement("script");for(let{name:t,value:D}of u.attributes)t==="src"&&(D=G(D)),e.setAttribute(t,D);return e.innerHTML=u.innerHTML,e}return u.cloneNode(!0)}function J(u,e){if(u.children.length===0&&e.children.length===0)return[];let t=[],D=new Map,F=new Map,l=new Map;for(let n of u.children)D.set(h(n),n);for(let n of e.children){let i=h(n),r=D.get(i);r?g(n,!1)!==g(r,!1)&&F.set(i,C(n)):l.set(i,C(n)),D.delete(i)}for(let n of u.childNodes){if(n.nodeType===1){let i=h(n);if(D.has(i)){t.push({type:1});continue}else if(F.has(i)){let r=F.get(i);t.push({type:3,attributes:L(n,r),children:T(n,r)});continue}}t.push(void 0)}for(let n of l.values())t.push({type:0,node:C(n)});return t}function T(u,e){let t=[],D=Math.max(u.childNodes.length,e.childNodes.length);for(let F=0;F<D;F++){let l=u.childNodes.item(F),n=e.childNodes.item(F);t[F]=B(l,n)}return t}function B(u,e){if(!u)return{type:0,node:C(e)};if(!e)return{type:1};if(Q(u,e)){if(u.nodeType===3){let t=u.nodeValue,D=e.nodeValue;if(t.trim().length===0&&D.trim().length===0)return}if(u.nodeType===1){if(Z(u,e)){let t=u.tagName==="HEAD"?J:T;return{type:3,attributes:L(u,e),children:t(u,e)}}return{type:2,node:C(e)}}else return u.nodeType===9?B(u.documentElement,e.documentElement):Y(u,e)?void 0:{type:2,value:e.nodeValue}}return{type:2,node:C(e)}}function X(u,e){if(e.length!==0)for(let{type:t,name:D,value:F}of e)t===5?u.removeAttribute(D):t===4&&u.setAttribute(D,F)}async function y(u,e,t){if(!e)return;let D;switch(u.nodeType===9?(u=u.documentElement,D=u):t?D=t:D=u,e.type){case 0:{let{node:F}=e;u.appendChild(F);return}case 1:{if(!D)return;u.removeChild(D);return}case 2:{if(!D)return;let{node:F,value:l}=e;if(typeof l=="string"){D.nodeValue=l;return}D.replaceWith(F);return}case 3:{if(!D)return;let{attributes:F,children:l}=e;X(D,F);let n=Array.from(D.childNodes);await Promise.all(l.map((i,r)=>y(D,i,n[r])));return}}}function w(u,e){let t=B(u,e);return y(u,t)}var fu=Object.hasOwnProperty;var O=K(k(),1),gu=(0,O.default)();function b(u){return u.document.body.dataset.slug}var U=(u,e,t)=>{let D=new URL(u.getAttribute(e),t);u.setAttribute(e,D.pathname+D.hash)};function M(u,e){u.querySelectorAll(\'[href^="./"], [href^="../"]\').forEach(t=>U(t,"href",e)),u.querySelectorAll(\'[src^="./"], [src^="../"]\').forEach(t=>U(t,"src",e))}var tu=/<link rel="canonical" href="([^"]*)">/;async function N(u){let e=await fetch(`${u}`);if(!e.headers.get("content-type")?.startsWith("text/html"))return e;let t=await e.clone().text(),[D,F]=t.match(tu)??[];return F?fetch(F):e}var Du=1,d=document.createElement("route-announcer"),nu=u=>u?.nodeType===Du,ru=u=>{try{let e=new URL(u);if(window.location.origin===e.origin)return!0}catch{}return!1},Fu=u=>{let e=u.origin===window.location.origin,t=u.pathname===window.location.pathname;return e&&t},P=({target:u})=>{if(!nu(u)||u.attributes.getNamedItem("target")?.value==="_blank")return;let e=u.closest("a");if(!e||"routerIgnore"in e.dataset)return;let{href:t}=e;if(ru(t))return{url:new URL(t),scroll:"routerNoscroll"in e.dataset?!1:void 0}};function H(u){let e=new CustomEvent("nav",{detail:{url:u}});document.dispatchEvent(e)}var v=new Set;window.addCleanup=u=>v.add(u);function iu(){let u=document.createElement("div");u.className="navigation-progress",u.style.width="0",document.body.contains(u)||document.body.appendChild(u),setTimeout(()=>{u.style.width="80%"},100)}var x;async function p(u,e=!1){iu(),x=x||new DOMParser;let t=await N(u).then(i=>{if(i.headers.get("content-type")?.startsWith("text/html"))return i.text();window.location.assign(u)}).catch(()=>{window.location.assign(u)});if(!t)return;v.forEach(i=>i()),v.clear();let D=x.parseFromString(t,"text/html");M(D,u);let F=D.querySelector("title")?.textContent;if(F)document.title=F;else{let i=document.querySelector("h1");F=i?.innerText??i?.textContent??u.pathname}d.textContent!==F&&(d.textContent=F),d.dataset.persist="",D.body.appendChild(d),w(document.body,D.body),e||(u.hash?document.getElementById(decodeURIComponent(u.hash.substring(1)))?.scrollIntoView():window.scrollTo({top:0})),document.head.querySelectorAll(":not([spa-preserve])").forEach(i=>i.remove()),D.head.querySelectorAll(":not([spa-preserve])").forEach(i=>document.head.appendChild(i)),e||history.pushState({},"",u),H(b(window)),delete d.dataset.persist}window.spaNavigate=p;function ou(){return typeof window<"u"&&(window.addEventListener("click",async u=>{let{url:e}=P(u)??{};if(!(!e||u.ctrlKey||u.metaKey)){if(u.preventDefault(),Fu(e)&&e.hash){document.getElementById(decodeURIComponent(e.hash.substring(1)))?.scrollIntoView(),history.pushState({},"",e);return}try{p(e,!1)}catch{window.location.assign(e)}}}),window.addEventListener("popstate",u=>{let{url:e}=P(u)??{};if(!(window.location.hash&&window.location.pathname===e?.pathname))try{p(new URL(window.location.toString()),!0)}catch{window.location.reload()}})),new class{go(e){let t=new URL(e,window.location.toString());return p(t,!1)}back(){return window.history.back()}forward(){return window.history.forward()}}}ou();H(b(window));if(!customElements.get("route-announcer")){let u={"aria-live":"assertive","aria-atomic":"true",style:"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"};customElements.define("route-announcer",class extends HTMLElement{constructor(){super()}connectedCallback(){for(let[t,D]of Object.entries(u))this.setAttribute(t,D)}})}\n';var popover_inline_default='var Jt=Object.create;var ht=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var ue=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty;var oe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ie=(t,e,u,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ee(e))!ne.call(t,o)&&o!==u&&ht(t,o,{get:()=>e[o],enumerable:!(n=te(e,o))||n.enumerable});return t};var re=(t,e,u)=>(u=t!=null?Jt(ue(t)):{},ie(e||!t||!t.__esModule?ht(u,"default",{value:t,enumerable:!0}):u,t));var qt=oe((tu,Yt)=>{"use strict";Yt.exports=ve;function X(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function ve(t){if(t=t||{},t.circles)return be(t);let e=new Map;if(e.set(Date,i=>new Date(i)),e.set(Map,(i,l)=>new Map(n(Array.from(i),l))),e.set(Set,(i,l)=>new Set(n(Array.from(i),l))),t.constructorHandlers)for(let i of t.constructorHandlers)e.set(i[0],i[1]);let u=null;return t.proto?r:o;function n(i,l){let s=Object.keys(i),c=new Array(s.length);for(let a=0;a<s.length;a++){let D=s[a],f=i[D];typeof f!="object"||f===null?c[D]=f:f.constructor!==Object&&(u=e.get(f.constructor))?c[D]=u(f,l):ArrayBuffer.isView(f)?c[D]=X(f):c[D]=l(f)}return c}function o(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return n(i,o);if(i.constructor!==Object&&(u=e.get(i.constructor)))return u(i,o);let l={};for(let s in i){if(Object.hasOwnProperty.call(i,s)===!1)continue;let c=i[s];typeof c!="object"||c===null?l[s]=c:c.constructor!==Object&&(u=e.get(c.constructor))?l[s]=u(c,o):ArrayBuffer.isView(c)?l[s]=X(c):l[s]=o(c)}return l}function r(i){if(typeof i!="object"||i===null)return i;if(Array.isArray(i))return n(i,r);if(i.constructor!==Object&&(u=e.get(i.constructor)))return u(i,r);let l={};for(let s in i){let c=i[s];typeof c!="object"||c===null?l[s]=c:c.constructor!==Object&&(u=e.get(c.constructor))?l[s]=u(c,r):ArrayBuffer.isView(c)?l[s]=X(c):l[s]=r(c)}return l}}function be(t){let e=[],u=[],n=new Map;if(n.set(Date,s=>new Date(s)),n.set(Map,(s,c)=>new Map(r(Array.from(s),c))),n.set(Set,(s,c)=>new Set(r(Array.from(s),c))),t.constructorHandlers)for(let s of t.constructorHandlers)n.set(s[0],s[1]);let o=null;return t.proto?l:i;function r(s,c){let a=Object.keys(s),D=new Array(a.length);for(let f=0;f<a.length;f++){let F=a[f],d=s[F];if(typeof d!="object"||d===null)D[F]=d;else if(d.constructor!==Object&&(o=n.get(d.constructor)))D[F]=o(d,c);else if(ArrayBuffer.isView(d))D[F]=X(d);else{let m=e.indexOf(d);m!==-1?D[F]=u[m]:D[F]=c(d)}}return D}function i(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return r(s,i);if(s.constructor!==Object&&(o=n.get(s.constructor)))return o(s,i);let c={};e.push(s),u.push(c);for(let a in s){if(Object.hasOwnProperty.call(s,a)===!1)continue;let D=s[a];if(typeof D!="object"||D===null)c[a]=D;else if(D.constructor!==Object&&(o=n.get(D.constructor)))c[a]=o(D,i);else if(ArrayBuffer.isView(D))c[a]=X(D);else{let f=e.indexOf(D);f!==-1?c[a]=u[f]:c[a]=i(D)}}return e.pop(),u.pop(),c}function l(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return r(s,l);if(s.constructor!==Object&&(o=n.get(s.constructor)))return o(s,l);let c={};e.push(s),u.push(c);for(let a in s){let D=s[a];if(typeof D!="object"||D===null)c[a]=D;else if(D.constructor!==Object&&(o=n.get(D.constructor)))c[a]=o(D,l);else if(ArrayBuffer.isView(D))c[a]=X(D);else{let f=e.indexOf(D);f!==-1?c[a]=u[f]:c[a]=l(D)}}return e.pop(),u.pop(),c}}});var j=Math.min,v=Math.max,Z=Math.round;var b=t=>({x:t,y:t}),se={left:"right",right:"left",bottom:"top",top:"bottom"},ce={start:"end",end:"start"};function at(t,e,u){return v(t,j(e,u))}function Q(t,e){return typeof t=="function"?t(e):t}function P(t){return t.split("-")[0]}function ot(t){return t.split("-")[1]}function ft(t){return t==="x"?"y":"x"}function Ft(t){return t==="y"?"height":"width"}function G(t){return["top","bottom"].includes(P(t))?"y":"x"}function dt(t){return ft(G(t))}function Et(t,e,u){u===void 0&&(u=!1);let n=ot(t),o=dt(t),r=Ft(o),i=o==="x"?n===(u?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(i=K(i)),[i,K(i)]}function Ct(t){let e=K(t);return[nt(t),e,nt(e)]}function nt(t){return t.replace(/start|end/g,e=>ce[e])}function le(t,e,u){let n=["left","right"],o=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return u?e?o:n:e?n:o;case"left":case"right":return e?r:i;default:return[]}}function xt(t,e,u,n){let o=ot(t),r=le(P(t),u==="start",n);return o&&(r=r.map(i=>i+"-"+o),e&&(r=r.concat(r.map(nt)))),r}function K(t){return t.replace(/left|right|bottom|top/g,e=>se[e])}function De(t){return{top:0,right:0,bottom:0,left:0,...t}}function mt(t){return typeof t!="number"?De(t):{top:t,right:t,bottom:t,left:t}}function k(t){let{x:e,y:u,width:n,height:o}=t;return{width:n,height:o,top:u,left:e,right:e+n,bottom:u+o,x:e,y:u}}function Bt(t,e,u){let{reference:n,floating:o}=t,r=G(e),i=dt(e),l=Ft(i),s=P(e),c=r==="y",a=n.x+n.width/2-o.width/2,D=n.y+n.height/2-o.height/2,f=n[l]/2-o[l]/2,F;switch(s){case"top":F={x:a,y:n.y-o.height};break;case"bottom":F={x:a,y:n.y+n.height};break;case"right":F={x:n.x+n.width,y:D};break;case"left":F={x:n.x-o.width,y:D};break;default:F={x:n.x,y:n.y}}switch(ot(e)){case"start":F[i]-=f*(u&&c?-1:1);break;case"end":F[i]+=f*(u&&c?-1:1);break}return F}var wt=async(t,e,u)=>{let{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:i}=u,l=r.filter(Boolean),s=await(i.isRTL==null?void 0:i.isRTL(e)),c=await i.getElementRects({reference:t,floating:e,strategy:o}),{x:a,y:D}=Bt(c,n,s),f=n,F={},d=0;for(let m=0;m<l.length;m++){let{name:g,fn:A}=l[m],{x:p,y:h,data:C,reset:E}=await A({x:a,y:D,initialPlacement:n,placement:f,strategy:o,middlewareData:F,rects:c,platform:i,elements:{reference:t,floating:e}});a=p??a,D=h??D,F={...F,[g]:{...F[g],...C}},E&&d<=50&&(d++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):E.rects),{x:a,y:D}=Bt(c,f,s)),m=-1)}return{x:a,y:D,placement:f,strategy:o,middlewareData:F}};async function gt(t,e){var u;e===void 0&&(e={});let{x:n,y:o,platform:r,rects:i,elements:l,strategy:s}=t,{boundary:c="clippingAncestors",rootBoundary:a="viewport",elementContext:D="floating",altBoundary:f=!1,padding:F=0}=Q(e,t),d=mt(F),g=l[f?D==="floating"?"reference":"floating":D],A=k(await r.getClippingRect({element:(u=await(r.isElement==null?void 0:r.isElement(g)))==null||u?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:a,strategy:s})),p=D==="floating"?{...i.floating,x:n,y:o}:i.reference,h=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),C=await(r.isElement==null?void 0:r.isElement(h))?await(r.getScale==null?void 0:r.getScale(h))||{x:1,y:1}:{x:1,y:1},E=k(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:p,offsetParent:h,strategy:s}):p);return{top:(A.top-E.top+d.top)/C.y,bottom:(E.bottom-A.bottom+d.bottom)/C.y,left:(A.left-E.left+d.left)/C.x,right:(E.right-A.right+d.right)/C.x}}var yt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var u,n;let{placement:o,middlewareData:r,rects:i,initialPlacement:l,platform:s,elements:c}=e,{mainAxis:a=!0,crossAxis:D=!0,fallbackPlacements:f,fallbackStrategy:F="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:m=!0,...g}=Q(t,e);if((u=r.arrow)!=null&&u.alignmentOffset)return{};let A=P(o),p=P(l)===l,h=await(s.isRTL==null?void 0:s.isRTL(c.floating)),C=f||(p||!m?[K(l)]:Ct(l));!f&&d!=="none"&&C.push(...xt(l,m,d,h));let E=[l,...C],W=await gt(e,g),N=[],U=((n=r.flip)==null?void 0:n.overflows)||[];if(a&&N.push(W[A]),D){let S=Et(o,i,h);N.push(W[S[0]],W[S[1]])}if(U=[...U,{placement:o,overflows:N}],!N.every(S=>S<=0)){var ut,B;let S=(((ut=r.flip)==null?void 0:ut.index)||0)+1,I=E[S];if(I)return{data:{index:S,overflows:U},reset:{placement:I}};let H=(B=U.filter(O=>O.overflows[0]<=0).sort((O,T)=>O.overflows[1]-T.overflows[1])[0])==null?void 0:B.placement;if(!H)switch(F){case"bestFit":{var z;let O=(z=U.map(T=>[T.placement,T.overflows.filter($=>$>0).reduce(($,Dt)=>$+Dt,0)]).sort((T,$)=>T[1]-$[1])[0])==null?void 0:z[0];O&&(H=O);break}case"initialPlacement":H=l;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function vt(t){let e=j(...t.map(r=>r.left)),u=j(...t.map(r=>r.top)),n=v(...t.map(r=>r.right)),o=v(...t.map(r=>r.bottom));return{x:e,y:u,width:n-e,height:o-u}}function ae(t){let e=t.slice().sort((o,r)=>o.y-r.y),u=[],n=null;for(let o=0;o<e.length;o++){let r=e[o];!n||r.y-n.y>n.height/2?u.push([r]):u[u.length-1].push(r),n=r}return u.map(o=>k(vt(o)))}var bt=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){let{placement:u,elements:n,rects:o,platform:r,strategy:i}=e,{padding:l=2,x:s,y:c}=Q(t,e),a=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(n.reference))||[]),D=ae(a),f=k(vt(a)),F=mt(l);function d(){if(D.length===2&&D[0].left>D[1].right&&s!=null&&c!=null)return D.find(g=>s>g.left-F.left&&s<g.right+F.right&&c>g.top-F.top&&c<g.bottom+F.bottom)||f;if(D.length>=2){if(G(u)==="y"){let B=D[0],z=D[D.length-1],S=P(u)==="top",I=B.top,H=z.bottom,O=S?B.left:z.left,T=S?B.right:z.right,$=T-O,Dt=H-I;return{top:I,bottom:H,left:O,right:T,width:$,height:Dt,x:O,y:I}}let g=P(u)==="left",A=v(...D.map(B=>B.right)),p=j(...D.map(B=>B.left)),h=D.filter(B=>g?B.left===p:B.right===A),C=h[0].top,E=h[h.length-1].bottom,W=p,N=A,U=N-W,ut=E-C;return{top:C,bottom:E,left:W,right:N,width:U,height:ut,x:W,y:C}}return f}let m=await r.getElementRects({reference:{getBoundingClientRect:d},floating:n.floating,strategy:i});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}};var Rt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:u,y:n,placement:o}=e,{mainAxis:r=!0,crossAxis:i=!1,limiter:l={fn:g=>{let{x:A,y:p}=g;return{x:A,y:p}}},...s}=Q(t,e),c={x:u,y:n},a=await gt(e,s),D=G(P(o)),f=ft(D),F=c[f],d=c[D];if(r){let g=f==="y"?"top":"left",A=f==="y"?"bottom":"right",p=F+a[g],h=F-a[A];F=at(p,F,h)}if(i){let g=D==="y"?"top":"left",A=D==="y"?"bottom":"right",p=d+a[g],h=d-a[A];d=at(p,d,h)}let m=l.fn({...e,[f]:F,[D]:d});return{...m,data:{x:m.x-u,y:m.y-n}}}}};function rt(){return typeof window<"u"}function V(t){return Ot(t)?(t.nodeName||"").toLowerCase():"#document"}function x(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function L(t){var e;return(e=(Ot(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ot(t){return rt()?t instanceof Node||t instanceof x(t).Node:!1}function w(t){return rt()?t instanceof Element||t instanceof x(t).Element:!1}function R(t){return rt()?t instanceof HTMLElement||t instanceof x(t).HTMLElement:!1}function St(t){return!rt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof x(t).ShadowRoot}function Y(t){let{overflow:e,overflowX:u,overflowY:n,display:o}=y(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+u)&&!["inline","contents"].includes(o)}function Lt(t){return["table","td","th"].includes(V(t))}function J(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function st(t){let e=ct(),u=w(t)?y(t):t;return u.transform!=="none"||u.perspective!=="none"||(u.containerType?u.containerType!=="normal":!1)||!e&&(u.backdropFilter?u.backdropFilter!=="none":!1)||!e&&(u.filter?u.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(u.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(u.contain||"").includes(n))}function Tt(t){let e=M(t);for(;R(e)&&!_(e);){if(st(e))return e;if(J(e))return null;e=M(e)}return null}function ct(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _(t){return["html","body","#document"].includes(V(t))}function y(t){return x(t).getComputedStyle(t)}function tt(t){return w(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function M(t){if(V(t)==="html")return t;let e=t.assignedSlot||t.parentNode||St(t)&&t.host||L(t);return St(e)?e.host:e}function Pt(t){let e=M(t);return _(e)?t.ownerDocument?t.ownerDocument.body:t.body:R(e)&&Y(e)?e:Pt(e)}function it(t,e,u){var n;e===void 0&&(e=[]),u===void 0&&(u=!0);let o=Pt(t),r=o===((n=t.ownerDocument)==null?void 0:n.body),i=x(o);if(r){let l=lt(i);return e.concat(i,i.visualViewport||[],Y(o)?o:[],l&&u?it(l):[])}return e.concat(o,it(o,[],u))}function lt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ht(t){let e=y(t),u=parseFloat(e.width)||0,n=parseFloat(e.height)||0,o=R(t),r=o?t.offsetWidth:u,i=o?t.offsetHeight:n,l=Z(u)!==r||Z(n)!==i;return l&&(u=r,n=i),{width:u,height:n,$:l}}function jt(t){return w(t)?t:t.contextElement}function q(t){let e=jt(t);if(!R(e))return b(1);let u=e.getBoundingClientRect(),{width:n,height:o,$:r}=Ht(e),i=(r?Z(u.width):u.width)/n,l=(r?Z(u.height):u.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}var fe=b(0);function Wt(t){let e=x(t);return!ct()||!e.visualViewport?fe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Fe(t,e,u){return e===void 0&&(e=!1),!u||e&&u!==x(t)?!1:e}function et(t,e,u,n){e===void 0&&(e=!1),u===void 0&&(u=!1);let o=t.getBoundingClientRect(),r=jt(t),i=b(1);e&&(n?w(n)&&(i=q(n)):i=q(t));let l=Fe(r,u,n)?Wt(r):b(0),s=(o.left+l.x)/i.x,c=(o.top+l.y)/i.y,a=o.width/i.x,D=o.height/i.y;if(r){let f=x(r),F=n&&w(n)?x(n):n,d=f,m=lt(d);for(;m&&n&&F!==d;){let g=q(m),A=m.getBoundingClientRect(),p=y(m),h=A.left+(m.clientLeft+parseFloat(p.paddingLeft))*g.x,C=A.top+(m.clientTop+parseFloat(p.paddingTop))*g.y;s*=g.x,c*=g.y,a*=g.x,D*=g.y,s+=h,c+=C,d=x(m),m=lt(d)}}return k({width:a,height:D,x:s,y:c})}function At(t,e){let u=tt(t).scrollLeft;return e?e.left+u:et(L(t)).left+u}function Nt(t,e,u){u===void 0&&(u=!1);let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-(u?0:At(t,n)),r=n.top+e.scrollTop;return{x:o,y:r}}function de(t){let{elements:e,rect:u,offsetParent:n,strategy:o}=t,r=o==="fixed",i=L(n),l=e?J(e.floating):!1;if(n===i||l&&r)return u;let s={scrollLeft:0,scrollTop:0},c=b(1),a=b(0),D=R(n);if((D||!D&&!r)&&((V(n)!=="body"||Y(i))&&(s=tt(n)),R(n))){let F=et(n);c=q(n),a.x=F.x+n.clientLeft,a.y=F.y+n.clientTop}let f=i&&!D&&!r?Nt(i,s,!0):b(0);return{width:u.width*c.x,height:u.height*c.y,x:u.x*c.x-s.scrollLeft*c.x+a.x+f.x,y:u.y*c.y-s.scrollTop*c.y+a.y+f.y}}function me(t){return Array.from(t.getClientRects())}function ge(t){let e=L(t),u=tt(t),n=t.ownerDocument.body,o=v(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=v(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),i=-u.scrollLeft+At(t),l=-u.scrollTop;return y(n).direction==="rtl"&&(i+=v(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:l}}function pe(t,e){let u=x(t),n=L(t),o=u.visualViewport,r=n.clientWidth,i=n.clientHeight,l=0,s=0;if(o){r=o.width,i=o.height;let c=ct();(!c||c&&e==="fixed")&&(l=o.offsetLeft,s=o.offsetTop)}return{width:r,height:i,x:l,y:s}}function Ae(t,e){let u=et(t,!0,e==="fixed"),n=u.top+t.clientTop,o=u.left+t.clientLeft,r=R(t)?q(t):b(1),i=t.clientWidth*r.x,l=t.clientHeight*r.y,s=o*r.x,c=n*r.y;return{width:i,height:l,x:s,y:c}}function kt(t,e,u){let n;if(e==="viewport")n=pe(t,u);else if(e==="document")n=ge(L(t));else if(w(e))n=Ae(e,u);else{let o=Wt(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return k(n)}function Ut(t,e){let u=M(t);return u===e||!w(u)||_(u)?!1:y(u).position==="fixed"||Ut(u,e)}function he(t,e){let u=e.get(t);if(u)return u;let n=it(t,[],!1).filter(l=>w(l)&&V(l)!=="body"),o=null,r=y(t).position==="fixed",i=r?M(t):t;for(;w(i)&&!_(i);){let l=y(i),s=st(i);!s&&l.position==="fixed"&&(o=null),(r?!s&&!o:!s&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Y(i)&&!s&&Ut(t,i))?n=n.filter(a=>a!==i):o=l,i=M(i)}return e.set(t,n),n}function Ee(t){let{element:e,boundary:u,rootBoundary:n,strategy:o}=t,i=[...u==="clippingAncestors"?J(e)?[]:he(e,this._c):[].concat(u),n],l=i[0],s=i.reduce((c,a)=>{let D=kt(e,a,o);return c.top=v(D.top,c.top),c.right=j(D.right,c.right),c.bottom=j(D.bottom,c.bottom),c.left=v(D.left,c.left),c},kt(e,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Ce(t){let{width:e,height:u}=Ht(t);return{width:e,height:u}}function xe(t,e,u){let n=R(e),o=L(e),r=u==="fixed",i=et(t,!0,r,e),l={scrollLeft:0,scrollTop:0},s=b(0);if(n||!n&&!r)if((V(e)!=="body"||Y(o))&&(l=tt(e)),n){let f=et(e,!0,r,e);s.x=f.x+e.clientLeft,s.y=f.y+e.clientTop}else o&&(s.x=At(o));let c=o&&!n&&!r?Nt(o,l):b(0),a=i.left+l.scrollLeft-s.x-c.x,D=i.top+l.scrollTop-s.y-c.y;return{x:a,y:D,width:i.width,height:i.height}}function pt(t){return y(t).position==="static"}function Mt(t,e){if(!R(t)||y(t).position==="fixed")return null;if(e)return e(t);let u=t.offsetParent;return L(t)===u&&(u=u.ownerDocument.body),u}function $t(t,e){let u=x(t);if(J(t))return u;if(!R(t)){let o=M(t);for(;o&&!_(o);){if(w(o)&&!pt(o))return o;o=M(o)}return u}let n=Mt(t,e);for(;n&&Lt(n)&&pt(n);)n=Mt(n,e);return n&&_(n)&&pt(n)&&!st(n)?u:n||Tt(t)||u}var Be=async function(t){let e=this.getOffsetParent||$t,u=this.getDimensions,n=await u(t.floating);return{reference:xe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function we(t){return y(t).direction==="rtl"}var ye={convertOffsetParentRelativeRectToViewportRelativeRect:de,getDocumentElement:L,getClippingRect:Ee,getOffsetParent:$t,getElementRects:Be,getClientRects:me,getDimensions:Ce,getScale:q,isElement:w,isRTL:we};var Vt=Rt,_t=yt;var zt=bt;var It=(t,e,u)=>{let n=new Map,o={platform:ye,...u},r={...o.platform,_c:n};return wt(t,e,{...o,platform:r})};var Ge=Object.hasOwnProperty;var Kt=re(qt(),1),nu=(0,Kt.default)();var Xt=(t,e,u)=>{let n=new URL(t.getAttribute(e),u);t.setAttribute(e,n.pathname+n.hash)};function Zt(t,e){t.querySelectorAll(\'[href^="./"], [href^="../"]\').forEach(u=>Xt(u,"href",e)),t.querySelectorAll(\'[src^="./"], [src^="../"]\').forEach(u=>Xt(u,"src",e))}var Re=/<link rel="canonical" href="([^"]*)">/;async function Qt(t){let e=await fetch(`${t}`);if(!e.headers.get("content-type")?.startsWith("text/html"))return e;let u=await e.clone().text(),[n,o]=u.match(Re)??[];return o?fetch(o):e}var Se=new DOMParser;async function Gt({clientX:t,clientY:e}){let u=this;if(u.dataset.noPopover==="true")return;async function n(d){let{x:m,y:g}=await It(u,d,{middleware:[zt({x:t,y:e}),Vt(),_t()]});Object.assign(d.style,{left:`${m}px`,top:`${g}px`})}let o=()=>[...u.children].some(d=>d.classList.contains("popover"));if(o())return n(u.lastChild);let r=new URL(document.location.href);r.hash="",r.search="";let i=new URL(u.href),l=decodeURIComponent(i.hash);i.hash="",i.search="";let s=await Qt(i).catch(d=>{console.error(d)});if(o()||!s)return;let[c]=s.headers.get("Content-Type").split(";"),[a,D]=c.split("/"),f=document.createElement("div");f.classList.add("popover");let F=document.createElement("div");switch(F.classList.add("popover-inner"),f.appendChild(F),F.dataset.contentType=c??void 0,a){case"image":let d=document.createElement("img");d.src=i.toString(),d.alt=i.pathname,F.appendChild(d);break;case"application":switch(D){case"pdf":let p=document.createElement("iframe");p.src=i.toString(),F.appendChild(p);break;default:break}break;default:let m=await s.text(),g=Se.parseFromString(m,"text/html");Zt(g,i);let A=[...g.getElementsByClassName("popover-hint")];if(A.length===0)return;A.forEach(p=>F.appendChild(p))}if(n(f),u.appendChild(f),l!==""){let d=F.querySelector(l);d&&F.scroll({top:d.offsetTop-12,behavior:"instant"})}}document.addEventListener("nav",()=>{let t=[...document.getElementsByClassName("internal")];for(let e of t)e.addEventListener("mouseenter",Gt),window.addCleanup(()=>e.removeEventListener("mouseenter",Gt))});\n';var custom_default=`/**
|
||
* Layout breakpoints
|
||
* $mobile: screen width below this value will use mobile styles
|
||
* $desktop: screen width above this value will use desktop styles
|
||
* Screen width between $mobile and $desktop width will use the tablet layout.
|
||
* assuming mobile < desktop
|
||
*/
|
||
code[data-theme*=" "] {
|
||
color: var(--shiki-light);
|
||
background-color: var(--shiki-light-bg);
|
||
}
|
||
|
||
code[data-theme*=" "] span {
|
||
color: var(--shiki-light);
|
||
}
|
||
|
||
[saved-theme=dark] code[data-theme*=" "] {
|
||
color: var(--shiki-dark);
|
||
background-color: var(--shiki-dark-bg);
|
||
}
|
||
|
||
[saved-theme=dark] code[data-theme*=" "] span {
|
||
color: var(--shiki-dark);
|
||
}
|
||
|
||
.callout {
|
||
border: 1px solid var(--border);
|
||
background-color: var(--bg);
|
||
border-radius: 5px;
|
||
padding: 0 1rem;
|
||
overflow-y: hidden;
|
||
transition: max-height 0.3s ease;
|
||
box-sizing: border-box;
|
||
--callout-icon-note: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="2" x2="22" y2="6"></line><path d="M7.5 20.5 19 9l-4-4L3.5 16.5 2 22z"></path></svg>');
|
||
--callout-icon-abstract: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><path d="M12 11h4"></path><path d="M12 16h4"></path><path d="M8 11h.01"></path><path d="M8 16h.01"></path></svg>');
|
||
--callout-icon-info: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>');
|
||
--callout-icon-todo: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path><path d="m9 12 2 2 4-4"></path></svg>');
|
||
--callout-icon-tip: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z"></path></svg> ');
|
||
--callout-icon-success: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> ');
|
||
--callout-icon-question: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg> ');
|
||
--callout-icon-warning: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>');
|
||
--callout-icon-failure: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg> ');
|
||
--callout-icon-danger: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg> ');
|
||
--callout-icon-bug: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="14" x="8" y="6" rx="4"></rect><path d="m19 7-3 2"></path><path d="m5 7 3 2"></path><path d="m19 19-3-2"></path><path d="m5 19 3-2"></path><path d="M20 13h-4"></path><path d="M4 13h4"></path><path d="m10 4 1 2"></path><path d="m14 4-1 2"></path></svg>');
|
||
--callout-icon-example: url('data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg> ');
|
||
--callout-icon-quote: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z"></path><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"></path></svg>');
|
||
--callout-icon-fold: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="6 9 12 15 18 9"%3E%3C/polyline%3E%3C/svg%3E');
|
||
}
|
||
.callout > .callout-content > :first-child {
|
||
margin-top: 0;
|
||
}
|
||
.callout[data-callout] {
|
||
--color: #448aff;
|
||
--border: #448aff44;
|
||
--bg: #448aff10;
|
||
--callout-icon: var(--callout-icon-note);
|
||
}
|
||
.callout[data-callout=abstract] {
|
||
--color: #00b0ff;
|
||
--border: #00b0ff44;
|
||
--bg: #00b0ff10;
|
||
--callout-icon: var(--callout-icon-abstract);
|
||
}
|
||
.callout[data-callout=info], .callout[data-callout=todo] {
|
||
--color: #00b8d4;
|
||
--border: #00b8d444;
|
||
--bg: #00b8d410;
|
||
--callout-icon: var(--callout-icon-info);
|
||
}
|
||
.callout[data-callout=todo] {
|
||
--callout-icon: var(--callout-icon-todo);
|
||
}
|
||
.callout[data-callout=tip] {
|
||
--color: #00bfa5;
|
||
--border: #00bfa544;
|
||
--bg: #00bfa510;
|
||
--callout-icon: var(--callout-icon-tip);
|
||
}
|
||
.callout[data-callout=success] {
|
||
--color: #09ad7a;
|
||
--border: #09ad7144;
|
||
--bg: #09ad7110;
|
||
--callout-icon: var(--callout-icon-success);
|
||
}
|
||
.callout[data-callout=question] {
|
||
--color: #dba642;
|
||
--border: #dba64244;
|
||
--bg: #dba64210;
|
||
--callout-icon: var(--callout-icon-question);
|
||
}
|
||
.callout[data-callout=warning] {
|
||
--color: #db8942;
|
||
--border: #db894244;
|
||
--bg: #db894210;
|
||
--callout-icon: var(--callout-icon-warning);
|
||
}
|
||
.callout[data-callout=failure], .callout[data-callout=danger], .callout[data-callout=bug] {
|
||
--color: #db4242;
|
||
--border: #db424244;
|
||
--bg: #db424210;
|
||
--callout-icon: var(--callout-icon-failure);
|
||
}
|
||
.callout[data-callout=bug] {
|
||
--callout-icon: var(--callout-icon-bug);
|
||
}
|
||
.callout[data-callout=danger] {
|
||
--callout-icon: var(--callout-icon-danger);
|
||
}
|
||
.callout[data-callout=example] {
|
||
--color: #7a43b5;
|
||
--border: #7a43b544;
|
||
--bg: #7a43b510;
|
||
--callout-icon: var(--callout-icon-example);
|
||
}
|
||
.callout[data-callout=quote] {
|
||
--color: var(--secondary);
|
||
--border: var(--lightgray);
|
||
--callout-icon: var(--callout-icon-quote);
|
||
}
|
||
.callout.is-collapsed > .callout-title > .fold-callout-icon {
|
||
transform: rotateZ(-90deg);
|
||
}
|
||
|
||
.callout-title {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
gap: 5px;
|
||
padding: 1rem 0;
|
||
color: var(--color);
|
||
--icon-size: 18px;
|
||
}
|
||
.callout-title .fold-callout-icon {
|
||
transition: transform 0.15s ease;
|
||
opacity: 0.8;
|
||
cursor: pointer;
|
||
--callout-icon: var(--callout-icon-fold);
|
||
}
|
||
.callout-title > .callout-title-inner > p {
|
||
color: var(--color);
|
||
margin: 0;
|
||
}
|
||
.callout-title .callout-icon, .callout-title .fold-callout-icon {
|
||
width: var(--icon-size);
|
||
height: var(--icon-size);
|
||
flex: 0 0 var(--icon-size);
|
||
background-size: var(--icon-size) var(--icon-size);
|
||
background-position: center;
|
||
background-color: var(--color);
|
||
mask-image: var(--callout-icon);
|
||
mask-size: var(--icon-size) var(--icon-size);
|
||
mask-position: center;
|
||
mask-repeat: no-repeat;
|
||
padding: 0.2rem 0;
|
||
}
|
||
.callout-title .callout-title-inner {
|
||
font-weight: 600;
|
||
}
|
||
|
||
html {
|
||
scroll-behavior: smooth;
|
||
text-size-adjust: none;
|
||
overflow-x: hidden;
|
||
width: 100vw;
|
||
}
|
||
|
||
body,
|
||
section {
|
||
margin: 0;
|
||
box-sizing: border-box;
|
||
background-color: var(--light);
|
||
font-family: var(--bodyFont);
|
||
color: var(--darkgray);
|
||
}
|
||
|
||
.text-highlight {
|
||
background-color: var(--textHighlight);
|
||
padding: 0 0.1rem;
|
||
border-radius: 5px;
|
||
}
|
||
|
||
::selection {
|
||
background: color-mix(in srgb, var(--tertiary) 60%, rgba(255, 255, 255, 0));
|
||
color: var(--darkgray);
|
||
}
|
||
|
||
p,
|
||
ul,
|
||
text,
|
||
a,
|
||
tr,
|
||
td,
|
||
li,
|
||
ol,
|
||
ul,
|
||
.katex,
|
||
.math {
|
||
color: var(--darkgray);
|
||
fill: var(--darkgray);
|
||
hyphens: auto;
|
||
}
|
||
|
||
p,
|
||
ul,
|
||
text,
|
||
a,
|
||
li,
|
||
ol,
|
||
ul,
|
||
.katex,
|
||
.math {
|
||
overflow-wrap: anywhere;
|
||
/* tr and td removed from list of selectors for overflow-wrap, allowing them to use default 'normal' property value */
|
||
}
|
||
|
||
.math.math-display {
|
||
text-align: center;
|
||
}
|
||
|
||
strong {
|
||
font-weight: 600;
|
||
}
|
||
|
||
a {
|
||
font-weight: 600;
|
||
text-decoration: none;
|
||
transition: color 0.2s ease;
|
||
color: var(--secondary);
|
||
}
|
||
a:hover {
|
||
color: var(--tertiary) !important;
|
||
}
|
||
a.internal {
|
||
text-decoration: none;
|
||
background-color: var(--highlight);
|
||
padding: 0 0.1rem;
|
||
border-radius: 5px;
|
||
line-height: 1.4rem;
|
||
}
|
||
a.internal:has(> img) {
|
||
background-color: transparent;
|
||
border-radius: 0;
|
||
padding: 0;
|
||
}
|
||
a.internal.tag-link::before {
|
||
content: "#";
|
||
}
|
||
a.external .external-icon {
|
||
height: 1ex;
|
||
margin: 0 0.15em;
|
||
}
|
||
a.external .external-icon > path {
|
||
fill: var(--dark);
|
||
}
|
||
|
||
.desktop-only {
|
||
display: initial;
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.desktop-only {
|
||
display: none;
|
||
}
|
||
}
|
||
|
||
.mobile-only {
|
||
display: none;
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.mobile-only {
|
||
display: initial;
|
||
}
|
||
}
|
||
|
||
.page {
|
||
max-width: calc(1200px + 300px);
|
||
margin: 0 auto;
|
||
}
|
||
.page article > h1 {
|
||
font-size: 2rem;
|
||
}
|
||
.page article li:has(> input[type=checkbox]) {
|
||
list-style-type: none;
|
||
padding-left: 0;
|
||
}
|
||
.page article li:has(> input[type=checkbox]:checked) {
|
||
text-decoration: line-through;
|
||
text-decoration-color: var(--gray);
|
||
color: var(--gray);
|
||
}
|
||
.page article li > * {
|
||
margin-top: 0;
|
||
margin-bottom: 0;
|
||
}
|
||
.page article p > strong {
|
||
color: var(--dark);
|
||
}
|
||
.page > #quartz-body {
|
||
display: grid;
|
||
grid-template-columns: 320px auto 320px;
|
||
grid-template-rows: auto auto auto;
|
||
column-gap: 5px;
|
||
row-gap: 5px;
|
||
grid-template-areas: "grid-sidebar-left grid-header grid-sidebar-right" "grid-sidebar-left grid-center grid-sidebar-right" "grid-sidebar-left grid-footer grid-sidebar-right";
|
||
}
|
||
@media all and ((min-width: 800px) and (max-width: 1200px)) {
|
||
.page > #quartz-body {
|
||
grid-template-columns: 320px auto;
|
||
grid-template-rows: auto auto auto auto;
|
||
column-gap: 5px;
|
||
row-gap: 5px;
|
||
grid-template-areas: "grid-sidebar-left grid-header" "grid-sidebar-left grid-center" "grid-sidebar-left grid-sidebar-right" "grid-sidebar-left grid-footer";
|
||
}
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.page > #quartz-body {
|
||
grid-template-columns: auto;
|
||
grid-template-rows: auto auto auto auto auto;
|
||
column-gap: 5px;
|
||
row-gap: 5px;
|
||
grid-template-areas: "grid-sidebar-left" "grid-header" "grid-center" "grid-sidebar-right" "grid-footer";
|
||
}
|
||
}
|
||
@media all and not ((min-width: 1200px)) {
|
||
.page > #quartz-body {
|
||
padding: 0 1rem;
|
||
}
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.page > #quartz-body {
|
||
margin: 0 auto;
|
||
}
|
||
}
|
||
.page > #quartz-body .sidebar {
|
||
gap: 2rem;
|
||
top: 0;
|
||
box-sizing: border-box;
|
||
padding: 6rem 2rem 2rem 2rem;
|
||
display: flex;
|
||
height: 100vh;
|
||
position: sticky;
|
||
}
|
||
.page > #quartz-body .sidebar.left {
|
||
z-index: 1;
|
||
grid-area: grid-sidebar-left;
|
||
flex-direction: column;
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.page > #quartz-body .sidebar.left {
|
||
gap: 0;
|
||
align-items: center;
|
||
position: initial;
|
||
display: flex;
|
||
height: unset;
|
||
flex-direction: row;
|
||
padding: 0;
|
||
padding-top: 2rem;
|
||
}
|
||
}
|
||
.page > #quartz-body .sidebar.right {
|
||
grid-area: grid-sidebar-right;
|
||
margin-right: 0;
|
||
flex-direction: column;
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.page > #quartz-body .sidebar.right {
|
||
margin-left: inherit;
|
||
margin-right: inherit;
|
||
}
|
||
}
|
||
@media all and not ((min-width: 1200px)) {
|
||
.page > #quartz-body .sidebar.right {
|
||
position: initial;
|
||
height: unset;
|
||
width: 100%;
|
||
flex-direction: row;
|
||
padding: 0;
|
||
}
|
||
.page > #quartz-body .sidebar.right > * {
|
||
flex: 1;
|
||
}
|
||
.page > #quartz-body .sidebar.right > .toc {
|
||
display: none;
|
||
}
|
||
}
|
||
.page > #quartz-body .page-header, .page > #quartz-body .page-footer {
|
||
margin-top: 1rem;
|
||
}
|
||
.page > #quartz-body .page-header {
|
||
grid-area: grid-header;
|
||
margin: 6rem 0 0 0;
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.page > #quartz-body .page-header {
|
||
margin-top: 0;
|
||
padding: 0;
|
||
}
|
||
}
|
||
.page > #quartz-body .center > article {
|
||
grid-area: grid-center;
|
||
}
|
||
.page > #quartz-body footer {
|
||
grid-area: grid-footer;
|
||
}
|
||
.page > #quartz-body .center, .page > #quartz-body footer {
|
||
max-width: 100%;
|
||
min-width: 100%;
|
||
margin-left: auto;
|
||
margin-right: auto;
|
||
}
|
||
@media all and ((min-width: 800px) and (max-width: 1200px)) {
|
||
.page > #quartz-body .center, .page > #quartz-body footer {
|
||
margin-right: 0;
|
||
}
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.page > #quartz-body .center, .page > #quartz-body footer {
|
||
margin-right: 0;
|
||
margin-left: 0;
|
||
}
|
||
}
|
||
.page > #quartz-body footer {
|
||
margin-left: 0;
|
||
}
|
||
|
||
.footnotes {
|
||
margin-top: 2rem;
|
||
border-top: 1px solid var(--lightgray);
|
||
}
|
||
|
||
input[type=checkbox] {
|
||
transform: translateY(2px);
|
||
color: var(--secondary);
|
||
border: 1px solid var(--lightgray);
|
||
border-radius: 3px;
|
||
background-color: var(--light);
|
||
position: relative;
|
||
margin-inline-end: 0.2rem;
|
||
margin-inline-start: -1.4rem;
|
||
appearance: none;
|
||
width: 16px;
|
||
height: 16px;
|
||
}
|
||
input[type=checkbox]:checked {
|
||
border-color: var(--secondary);
|
||
background-color: var(--secondary);
|
||
}
|
||
input[type=checkbox]:checked::after {
|
||
content: "";
|
||
position: absolute;
|
||
left: 4px;
|
||
top: 1px;
|
||
width: 4px;
|
||
height: 8px;
|
||
display: block;
|
||
border: solid var(--light);
|
||
border-width: 0 2px 2px 0;
|
||
transform: rotate(45deg);
|
||
}
|
||
|
||
blockquote {
|
||
margin: 1rem 0;
|
||
border-left: 3px solid var(--secondary);
|
||
padding-left: 1rem;
|
||
transition: border-color 0.2s ease;
|
||
}
|
||
|
||
h1,
|
||
h2,
|
||
h3,
|
||
h4,
|
||
h5,
|
||
h6,
|
||
thead {
|
||
font-family: var(--headerFont);
|
||
color: var(--dark);
|
||
font-weight: revert;
|
||
margin-bottom: 0;
|
||
}
|
||
article > h1 > a[role=anchor],
|
||
article > h2 > a[role=anchor],
|
||
article > h3 > a[role=anchor],
|
||
article > h4 > a[role=anchor],
|
||
article > h5 > a[role=anchor],
|
||
article > h6 > a[role=anchor],
|
||
article > thead > a[role=anchor] {
|
||
color: var(--dark);
|
||
background-color: transparent;
|
||
}
|
||
|
||
h1[id] > a[href^="#"],
|
||
h2[id] > a[href^="#"],
|
||
h3[id] > a[href^="#"],
|
||
h4[id] > a[href^="#"],
|
||
h5[id] > a[href^="#"],
|
||
h6[id] > a[href^="#"] {
|
||
margin: 0 0.5rem;
|
||
opacity: 0;
|
||
transition: opacity 0.2s ease;
|
||
transform: translateY(-0.1rem);
|
||
font-family: var(--codeFont);
|
||
user-select: none;
|
||
}
|
||
h1[id]:hover > a,
|
||
h2[id]:hover > a,
|
||
h3[id]:hover > a,
|
||
h4[id]:hover > a,
|
||
h5[id]:hover > a,
|
||
h6[id]:hover > a {
|
||
opacity: 1;
|
||
}
|
||
|
||
h1 {
|
||
font-size: 1.75rem;
|
||
margin-top: 2.25rem;
|
||
margin-bottom: 1rem;
|
||
}
|
||
|
||
h2 {
|
||
font-size: 1.4rem;
|
||
margin-top: 1.9rem;
|
||
margin-bottom: 1rem;
|
||
}
|
||
|
||
h3 {
|
||
font-size: 1.12rem;
|
||
margin-top: 1.62rem;
|
||
margin-bottom: 1rem;
|
||
}
|
||
|
||
h4,
|
||
h5,
|
||
h6 {
|
||
font-size: 1rem;
|
||
margin-top: 1.5rem;
|
||
margin-bottom: 1rem;
|
||
}
|
||
|
||
figure[data-rehype-pretty-code-figure] {
|
||
margin: 0;
|
||
position: relative;
|
||
line-height: 1.6rem;
|
||
position: relative;
|
||
}
|
||
figure[data-rehype-pretty-code-figure] > [data-rehype-pretty-code-title] {
|
||
font-family: var(--codeFont);
|
||
font-size: 0.9rem;
|
||
padding: 0.1rem 0.5rem;
|
||
border: 1px solid var(--lightgray);
|
||
border-radius: 5px;
|
||
margin-bottom: -0.5rem;
|
||
color: var(--darkgray);
|
||
}
|
||
figure[data-rehype-pretty-code-figure] > pre {
|
||
padding: 0;
|
||
}
|
||
|
||
pre {
|
||
font-family: var(--codeFont);
|
||
padding: 0 0.5rem;
|
||
border-radius: 5px;
|
||
overflow-x: auto;
|
||
border: 1px solid var(--lightgray);
|
||
position: relative;
|
||
}
|
||
pre:has(> code.mermaid) {
|
||
border: none;
|
||
}
|
||
pre > code {
|
||
background: none;
|
||
padding: 0;
|
||
font-size: 0.85rem;
|
||
counter-reset: line;
|
||
counter-increment: line 0;
|
||
display: grid;
|
||
padding: 0.5rem 0;
|
||
overflow-x: auto;
|
||
}
|
||
pre > code [data-highlighted-chars] {
|
||
background-color: var(--highlight);
|
||
border-radius: 5px;
|
||
}
|
||
pre > code > [data-line] {
|
||
padding: 0 0.25rem;
|
||
box-sizing: border-box;
|
||
border-left: 3px solid transparent;
|
||
}
|
||
pre > code > [data-line][data-highlighted-line] {
|
||
background-color: var(--highlight);
|
||
border-left: 3px solid var(--secondary);
|
||
}
|
||
pre > code > [data-line]::before {
|
||
content: counter(line);
|
||
counter-increment: line;
|
||
width: 1rem;
|
||
margin-right: 1rem;
|
||
display: inline-block;
|
||
text-align: right;
|
||
color: rgba(115, 138, 148, 0.6);
|
||
}
|
||
pre > code[data-line-numbers-max-digits="2"] > [data-line]::before {
|
||
width: 2rem;
|
||
}
|
||
pre > code[data-line-numbers-max-digits="3"] > [data-line]::before {
|
||
width: 3rem;
|
||
}
|
||
|
||
code {
|
||
font-size: 0.9em;
|
||
color: var(--dark);
|
||
font-family: var(--codeFont);
|
||
border-radius: 5px;
|
||
padding: 0.1rem 0.2rem;
|
||
background: var(--lightgray);
|
||
}
|
||
|
||
tbody,
|
||
li,
|
||
p {
|
||
line-height: 1.6rem;
|
||
}
|
||
|
||
.table-container {
|
||
overflow-x: auto;
|
||
}
|
||
.table-container > table {
|
||
margin: 1rem;
|
||
padding: 1.5rem;
|
||
border-collapse: collapse;
|
||
}
|
||
.table-container > table th,
|
||
.table-container > table td {
|
||
min-width: 75px;
|
||
}
|
||
.table-container > table > * {
|
||
line-height: 2rem;
|
||
}
|
||
|
||
th {
|
||
text-align: left;
|
||
padding: 0.4rem 0.7rem;
|
||
border-bottom: 2px solid var(--gray);
|
||
}
|
||
|
||
td {
|
||
padding: 0.2rem 0.7rem;
|
||
}
|
||
|
||
tr {
|
||
border-bottom: 1px solid var(--lightgray);
|
||
}
|
||
tr:last-child {
|
||
border-bottom: none;
|
||
}
|
||
|
||
img {
|
||
max-width: 100%;
|
||
border-radius: 5px;
|
||
margin: 1rem 0;
|
||
}
|
||
|
||
p > img + em {
|
||
display: block;
|
||
transform: translateY(-1rem);
|
||
}
|
||
|
||
hr {
|
||
width: 100%;
|
||
margin: 2rem auto;
|
||
height: 1px;
|
||
border: none;
|
||
background-color: var(--lightgray);
|
||
}
|
||
|
||
audio,
|
||
video {
|
||
width: 100%;
|
||
border-radius: 5px;
|
||
}
|
||
|
||
.spacer {
|
||
flex: 1 1 auto;
|
||
}
|
||
|
||
div:has(> .overflow) {
|
||
display: flex;
|
||
overflow-y: auto;
|
||
max-height: 100%;
|
||
}
|
||
|
||
ul.overflow,
|
||
ol.overflow {
|
||
max-height: 100%;
|
||
overflow-y: auto;
|
||
content: "";
|
||
clear: both;
|
||
/*&:after {
|
||
pointer-events: none;
|
||
content: "";
|
||
width: 100%;
|
||
height: 50px;
|
||
position: absolute;
|
||
left: 0;
|
||
bottom: 0;
|
||
opacity: 1;
|
||
transition: opacity 0.3s ease;
|
||
background: linear-gradient(transparent 0px, var(--light));
|
||
}*/
|
||
}
|
||
ul.overflow > li:last-of-type,
|
||
ol.overflow > li:last-of-type {
|
||
margin-bottom: 30px;
|
||
}
|
||
|
||
.transclude ul {
|
||
padding-left: 1rem;
|
||
}
|
||
|
||
.katex-display {
|
||
overflow-x: auto;
|
||
overflow-y: hidden;
|
||
}
|
||
|
||
.external-embed.youtube,
|
||
iframe.pdf {
|
||
aspect-ratio: 16/9;
|
||
height: 100%;
|
||
width: 100%;
|
||
border-radius: 5px;
|
||
}
|
||
|
||
.navigation-progress {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 0;
|
||
height: 3px;
|
||
background: var(--secondary);
|
||
transition: width 0.2s ease;
|
||
z-index: 9999;
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9zdHlsZXMiLCJzb3VyY2VzIjpbInZhcmlhYmxlcy5zY3NzIiwic3ludGF4LnNjc3MiLCJjYWxsb3V0cy5zY3NzIiwiYmFzZS5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FDQUE7RUFDRTtFQUNBOzs7QUFHRjtFQUNFOzs7QUFHRjtFQUNFO0VBQ0E7OztBQUdGO0VBQ0U7OztBQ1pGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFNQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQWpCQTtFQUNFOztBQWtCRjtFQUNFO0VBQ0E7RUFDQTtFQUNBOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7O0FBR0Y7RUFFRTtFQUNBO0VBQ0E7RUFDQTs7QUFHRjtFQUNFOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7O0FBR0Y7RUFHRTtFQUNBO0VBQ0E7RUFDQTs7QUFHRjtFQUNFOztBQUdGO0VBQ0U7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTs7QUFHRjtFQUNFO0VBQ0E7RUFDQTs7QUFHRjtFQUNFOzs7QUFJSjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFFQTs7QUFFQTtFQUNFO0VBQ0E7RUFDQTtFQUNBOztBQUdGO0VBQ0U7RUFDQTs7QUFHRjtFQUVFO0VBQ0E7RUFDQTtFQUdBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBR0Y7RUFDRSxhRjNJYTs7O0FHaEJqQjtFQUNFO0VBQ0E7RUFDQTtFQUNBOzs7QUFHRjtBQUFBO0VBRUU7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7OztBQUVGO0VBQ0U7RUFDQTs7O0FBR0Y7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtFQVdFO0VBQ0E7RUFDQTs7O0FBR0Y7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0VBU0U7QUFDQTs7O0FBSUE7RUFDRTs7O0FBSUo7RUFDRSxhSDlDZTs7O0FHaURqQjtFQUNFLGFIbERlO0VHbURmO0VBQ0E7RUFDQTs7QUFFQTtFQUNFOztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFO0VBQ0E7RUFDQTs7QUFHQTtFQUNFOztBQUtOO0VBQ0U7RUFDQTs7QUFFQTtFQUNFOzs7QUFLTjtFQUNFOztBQUNBO0VBRkY7SUFHSTs7OztBQUlKO0VBQ0U7O0FBQ0E7RUFGRjtJQUdJOzs7O0FBSUo7RUFDRTtFQUNBOztBQUVFO0VBQ0U7O0FBR0Y7RUFDRTtFQUNBOztBQUdGO0VBQ0U7RUFDQTtFQUNBOztBQUdGO0VBQ0U7RUFDQTs7QUFHRjtFQUNFOztBQUlKO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUNBO0VBUEY7SUFRSTtJQUNBO0lBQ0E7SUFDQTtJQUNBOzs7QUFFRjtFQWRGO0lBZUk7SUFDQTtJQUNBO0lBQ0E7SUFDQTs7O0FBR0Y7RUF0QkY7SUF1Qkk7OztBQUVGO0VBekJGO0lBMEJJOzs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUdGO0VBQ0U7RUFDQTtFQUNBOztBQUNBO0VBSkY7SUFLSTtJQUNBO0lBQ0E7SUFDQTtJQUNBO0lBQ0E7SUFDQTtJQUNBOzs7QUFJSjtFQUNFO0VBQ0E7RUFDQTs7QUFDQTtFQUpGO0lBS0k7SUFDQTs7O0FBRUY7RUFSRjtJQVNJO0lBQ0E7SUFDQTtJQUNBO0lBQ0E7O0VBQ0E7SUFDRTs7RUFFRjtJQUNFOzs7QUFJTjtFQUVFOztBQUdGO0VBQ0U7RUFDQTs7QUFDQTtFQUhGO0lBSUk7SUFDQTs7O0FBSUo7RUFDRTs7QUFHRjtFQUNFOztBQUdGO0VBRUU7RUFDQTtFQUNBO0VBQ0E7O0FBQ0E7RUFORjtJQU9JOzs7QUFFRjtFQVRGO0lBVUk7SUFDQTs7O0FBR0o7RUFDRTs7O0FBS047RUFDRTtFQUNBOzs7QUFHRjtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7RUFDRTtFQUNBOztBQUVBO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7OztBQUtOO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7OztBQUdGO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0VBT0U7RUFDQTtFQUNBO0VBQ0E7O0FBRUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7RUFDRTtFQUNBOzs7QUFVRjtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7O0FBR0Y7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0VBQ0U7OztBQUtKO0VBQ0U7RUFDQTtFQUNBOzs7QUFHRjtFQUNFO0VBQ0E7RUFDQTs7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7OztBQUdGO0FBQUE7QUFBQTtFQUdFO0VBQ0E7RUFDQTs7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTs7QUFFQTtFQUNFO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUdGO0VBQ0U7OztBQUlKO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUVBO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0E7RUFDQTs7QUFFQTtFQUNFO0VBQ0E7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFJSjtFQUNFOztBQUdGO0VBQ0U7OztBQUtOO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOzs7QUFHRjtBQUFBO0FBQUE7RUFHRTs7O0FBR0Y7RUFDRTs7QUFFQTtFQUNFO0VBQ0E7RUFDQTs7QUFFQTtBQUFBO0VBRUU7O0FBR0Y7RUFDRTs7O0FBS047RUFDRTtFQUNBO0VBQ0E7OztBQUdGO0VBQ0U7OztBQUdGO0VBQ0U7O0FBQ0E7RUFDRTs7O0FBSUo7RUFDRTtFQUNBO0VBQ0E7OztBQUdGO0VBQ0U7RUFDQTs7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBOzs7QUFHRjtBQUFBO0VBRUU7RUFDQTs7O0FBR0Y7RUFDRTs7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7OztBQUdGO0FBQUE7RUFFRTtFQUNBO0VBR0E7RUFDQTtBQUtBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFIQTtBQUFBO0VBQ0U7OztBQWlCRjtFQUNFOzs7QUFJSjtFQUNFO0VBQ0E7OztBQUdGO0FBQUE7RUFFRTtFQUNBO0VBQ0E7RUFDQTs7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBMYXlvdXQgYnJlYWtwb2ludHNcbiAqICRtb2JpbGU6IHNjcmVlbiB3aWR0aCBiZWxvdyB0aGlzIHZhbHVlIHdpbGwgdXNlIG1vYmlsZSBzdHlsZXNcbiAqICRkZXNrdG9wOiBzY3JlZW4gd2lkdGggYWJvdmUgdGhpcyB2YWx1ZSB3aWxsIHVzZSBkZXNrdG9wIHN0eWxlc1xuICogU2NyZWVuIHdpZHRoIGJldHdlZW4gJG1vYmlsZSBhbmQgJGRlc2t0b3Agd2lkdGggd2lsbCB1c2UgdGhlIHRhYmxldCBsYXlvdXQuXG4gKiBhc3N1bWluZyBtb2JpbGUgPCBkZXNrdG9wXG4gKi9cbiRicmVha3BvaW50czogKFxuICBtb2JpbGU6IDgwMHB4LFxuICBkZXNrdG9wOiAxMjAwcHgsXG4pO1xuXG4kbW9iaWxlOiBcIihtYXgtd2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIG1vYmlsZSl9KVwiO1xuJHRhYmxldDogXCIobWluLXdpZHRoOiAje21hcC1nZXQoJGJyZWFrcG9pbnRzLCBtb2JpbGUpfSkgYW5kIChtYXgtd2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIGRlc2t0b3ApfSlcIjtcbiRkZXNrdG9wOiBcIihtaW4td2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIGRlc2t0b3ApfSlcIjtcblxuJHBhZ2VXaWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgbW9iaWxlKX07XG4kc2lkZVBhbmVsV2lkdGg6IDMyMHB4OyAvLzM4MHB4O1xuJHRvcFNwYWNpbmc6IDZyZW07XG4kYm9sZFdlaWdodDogNzAwO1xuJHNlbWlCb2xkV2VpZ2h0OiA2MDA7XG4kbm9ybWFsV2VpZ2h0OiA0MDA7XG5cbiRtb2JpbGVHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0byBhdXRvIGF1dG9cIixcbiAgdGVtcGxhdGVDb2x1bW5zOiBcImF1dG9cIixcbiAgcm93R2FwOiBcIjVweFwiLFxuICBjb2x1bW5HYXA6IFwiNXB4XCIsXG4gIHRlbXBsYXRlQXJlYXM6XG4gICAgJ1wiZ3JpZC1zaWRlYmFyLWxlZnRcIlxcXG4gICAgICBcImdyaWQtaGVhZGVyXCJcXFxuICAgICAgXCJncmlkLWNlbnRlclwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLXJpZ2h0XCJcXFxuICAgICAgXCJncmlkLWZvb3RlclwiJyxcbik7XG4kdGFibGV0R3JpZDogKFxuICB0ZW1wbGF0ZVJvd3M6IFwiYXV0byBhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiI3skc2lkZVBhbmVsV2lkdGh9IGF1dG9cIixcbiAgcm93R2FwOiBcIjVweFwiLFxuICBjb2x1bW5HYXA6IFwiNXB4XCIsXG4gIHRlbXBsYXRlQXJlYXM6XG4gICAgJ1wiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1oZWFkZXJcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtY2VudGVyXCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItbGVmdCBncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtZm9vdGVyXCInLFxuKTtcbiRkZXNrdG9wR3JpZDogKFxuICB0ZW1wbGF0ZVJvd3M6IFwiYXV0byBhdXRvIGF1dG9cIixcbiAgdGVtcGxhdGVDb2x1bW5zOiBcIiN7JHNpZGVQYW5lbFdpZHRofSBhdXRvICN7JHNpZGVQYW5lbFdpZHRofVwiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWhlYWRlciBncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtY2VudGVyIGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1mb290ZXIgZ3JpZC1zaWRlYmFyLXJpZ2h0XCInLFxuKTtcbiIsImNvZGVbZGF0YS10aGVtZSo9XCIgXCJdIHtcbiAgY29sb3I6IHZhcigtLXNoaWtpLWxpZ2h0KTtcbiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tc2hpa2ktbGlnaHQtYmcpO1xufVxuXG5jb2RlW2RhdGEtdGhlbWUqPVwiIFwiXSBzcGFuIHtcbiAgY29sb3I6IHZhcigtLXNoaWtpLWxpZ2h0KTtcbn1cblxuW3NhdmVkLXRoZW1lPVwiZGFya1wiXSBjb2RlW2RhdGEtdGhlbWUqPVwiIFwiXSB7XG4gIGNvbG9yOiB2YXIoLS1zaGlraS1kYXJrKTtcbiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tc2hpa2ktZGFyay1iZyk7XG59XG5cbltzYXZlZC10aGVtZT1cImRhcmtcIl0gY29kZVtkYXRhLXRoZW1lKj1cIiBcIl0gc3BhbiB7XG4gIGNvbG9yOiB2YXIoLS1zaGlraS1kYXJrKTtcbn1cbiIsIkB1c2UgXCIuL3ZhcmlhYmxlcy5zY3NzXCIgYXMgKjtcbkB1c2UgXCJzYXNzOmNvbG9yXCI7XG5cbi5jYWxsb3V0IHtcbiAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tYm9yZGVyKTtcbiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tYmcpO1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG4gIHBhZGRpbmc6IDAgMXJlbTtcbiAgb3ZlcmZsb3cteTogaGlkZGVuO1xuICB0cmFuc2l0aW9uOiBtYXgtaGVpZ2h0IDAuM3MgZWFzZTtcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcblxuICAmID4gLmNhbGxvdXQtY29udGVudCA+IDpmaXJzdC1jaGlsZCB7XG4gICAgbWFyZ2luLXRvcDogMDtcbiAgfVxuXG4gIC0tY2FsbG91dC1pY29uLW5vdGU6IHVybCgnZGF0YTppbWFnZS9zdmcreG1sOyB1dGY4LCA8c3ZnIHhtbG5zPVwiaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmdcIiB3aWR0aD1cIjEwMCVcIiBoZWlnaHQ9XCIxMDAlXCIgdmlld0JveD1cIjAgMCAyNCAyNFwiIGZpbGw9XCJub25lXCIgc3Ryb2tlPVwiY3VycmVudENvbG9yXCIgc3Ryb2tlLXdpZHRoPVwiMlwiIHN0cm9rZS1saW5lY2FwPVwicm91bmRcIiBzdHJva2UtbGluZWpvaW49XCJyb3VuZFwiPjxsaW5lIHgxPVwiMThcIiB5MT1cIjJcIiB4Mj1cIjIyXCIgeTI9XCI2XCI+PC9saW5lPjxwYXRoIGQ9XCJNNy41IDIwLjUgMTkgOWwtNC00TDMuNSAxNi41IDIgMjJ6XCI+PC9wYXRoPjwvc3ZnPicpO1xuICAtLWNhbGxvdXQtaWNvbi1hYnN0cmFjdDogdXJsKCdkYXRhOmltYWdlL3N2Zyt4bWw7IHV0ZjgsIDxzdmcgeG1sbnM9XCJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Z1wiIHdpZHRoPVwiMTAwJVwiIGhlaWdodD1cIjEwMCVcIiB2aWV3Qm94PVwiMCAwIDI0IDI0XCIgZmlsbD1cIm5vbmVcIiBzdHJva2U9XCJjdXJyZW50Q29sb3JcIiBzdHJva2Utd2lkdGg9XCIyXCIgc3Ryb2tlLWxpbmVjYXA9XCJyb3VuZFwiIHN0cm9rZS1saW5lam9pbj1cInJvdW5kXCI+PHJlY3QgeD1cIjhcIiB5PVwiMlwiIHdpZHRoPVwiOFwiIGhlaWdodD1cIjRcIiByeD1cIjFcIiByeT1cIjFcIj48L3JlY3Q+PHBhdGggZD1cIk0xNiA0aDJhMiAyIDAgMCAxIDIgMnYxNGEyIDIgMCAwIDEtMiAySDZhMiAyIDAgMCAxLTItMlY2YTIgMiAwIDAgMSAyLTJoMlwiPjwvcGF0aD48cGF0aCBkPVwiTTEyIDExaDRcIj48L3BhdGg+PHBhdGggZD1cIk0xMiAxNmg0XCI+PC9wYXRoPjxwYXRoIGQ9XCJNOCAxMWguMDFcIj48L3BhdGg+PHBhdGggZD1cIk04IDE2aC4wMVwiPjwvcGF0aD48L3N2Zz4nKTtcbiAgLS1jYWxsb3V0LWljb24taW5mbzogdXJsKCdkYXRhOmltYWdlL3N2Zyt4bWw7IHV0ZjgsIDxzdmcgeG1sbnM9XCJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Z1wiIHdpZHRoPVwiMTAwJVwiIGhlaWdodD1cIjEwMCVcIiB2aWV3Qm94PVwiMCAwIDI0IDI0XCIgZmlsbD1cIm5vbmVcIiBzdHJva2U9XCJjdXJyZW50Q29sb3JcIiBzdHJva2Utd2lkdGg9XCIyXCIgc3Ryb2tlLWxpbmVjYXA9XCJyb3VuZFwiIHN0cm9rZS1saW5lam9pbj1cInJvdW5kXCI+PGNpcmNsZSBjeD1cIjEyXCIgY3k9XCIxMlwiIHI9XCIxMFwiPjwvY2lyY2xlPjxsaW5lIHgxPVwiMTJcIiB5MT1cIjE2XCIgeDI9XCIxMlwiIHkyPVwiMTJcIj48L2xpbmU+PGxpbmUgeDE9XCIxMlwiIHkxPVwiOFwiIHgyPVwiMTIuMDFcIiB5Mj1cIjhcIj48L2xpbmU+PC9zdmc+Jyk7XG4gIC0tY2FsbG91dC1pY29uLXRvZG86IHVybCgnZGF0YTppbWFnZS9zdmcreG1sOyB1dGY4LCA8c3ZnIHhtbG5zPVwiaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmdcIiB3aWR0aD1cIjEwMCVcIiBoZWlnaHQ9XCIxMDAlXCIgdmlld0JveD1cIjAgMCAyNCAyNFwiIGZpbGw9XCJub25lXCIgc3Ryb2tlPVwiY3VycmVudENvbG9yXCIgc3Ryb2tlLXdpZHRoPVwiMlwiIHN0cm9rZS1saW5lY2FwPVwicm91bmRcIiBzdHJva2UtbGluZWpvaW49XCJyb3VuZFwiPjxwYXRoIGQ9XCJNMTIgMjJjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMxNy41MjMgMiAxMiAyIDIgNi40NzcgMiAxMnM0LjQ3NyAxMCAxMCAxMHpcIj48L3BhdGg+PHBhdGggZD1cIm05IDEyIDIgMiA0LTRcIj48L3BhdGg+PC9zdmc+Jyk7XG4gIC0tY2FsbG91dC1pY29uLXRpcDogdXJsKCdkYXRhOmltYWdlL3N2Zyt4bWw7IHV0ZjgsPHN2ZyB4bWxucz1cImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnXCIgd2lkdGg9XCIxMDAlXCIgaGVpZ2h0PVwiMTAwJVwiIHZpZXdCb3g9XCIwIDAgMjQgMjRcIiBmaWxsPVwibm9uZVwiIHN0cm9rZT1cImN1cnJlbnRDb2xvclwiIHN0cm9rZS13aWR0aD1cIjJcIiBzdHJva2UtbGluZWNhcD1cInJvdW5kXCIgc3Ryb2tlLWxpbmVqb2luPVwicm91bmRcIj48cGF0aCBkPVwiTTguNSAxNC41QTIuNSAyLjUgMCAwIDAgMTEgMTJjMC0xLjM4LS41LTItMS0zLTEuMDcyLTIuMTQzLS4yMjQtNC4wNTQgMi02IC41IDIuNSAyIDQuOSA0IDYuNSAyIDEuNiAzIDMuNSAzIDUuNWE3IDcgMCAxIDEtMTQgMGMwLTEuMTUzLjQzMy0yLjI5NCAxLTNhMi41IDIuNSAwIDAgMCAyLjUgMi41elwiPjwvcGF0aD48L3N2Zz4gJyk7XG4gIC0tY2FsbG91dC1pY29uLXN1Y2Nlc3M6IHVybCgnZGF0YTppbWFnZS9zdmcreG1sOyB1dGY4LDxzdmcgeG1sbnM9XCJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Z1wiIHdpZHRoPVwiMTAwJVwiIGhlaWdodD1cIjEwMCVcIiB2aWV3Qm94PVwiMCAwIDI0IDI0XCIgZmlsbD1cIm5vbmVcIiBzdHJva2U9XCJjdXJyZW50Q29sb3JcIiBzdHJva2Utd2lkdGg9XCIyXCIgc3Ryb2tlLWxpbmVjYXA9XCJyb3VuZFwiIHN0cm9rZS1saW5lam9pbj1cInJvdW5kXCI+PHBvbHlsaW5lIHBvaW50cz1cIjIwIDYgOSAxNyA0IDEyXCI+PC9wb2x5bGluZT48L3N2Zz4gJyk7XG4gIC0tY2FsbG91dC1pY29uLXF1ZXN0aW9uOiB1cmwoJ2RhdGE6aW1hZ2Uvc3ZnK3htbDsgdXRmOCw8c3ZnIHhtbG5zPVwiaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmdcIiB3aWR0aD1cIjEwMCVcIiBoZWlnaHQ9XCIxMDAlXCIgdmlld0JveD1cIjAgMCAyNCAyNFwiIGZpbGw9XCJub25lXCIgc3Ryb2tlPVwiY3VycmVudENvbG9yXCIgc3Ryb2tlLXdpZHRoPVwiMlwiIHN0cm9rZS1saW5lY2FwPVwicm91bmRcIiBzdHJva2UtbGluZWpvaW49XCJyb3VuZFwiPjxjaXJjbGUgY3g9XCIxMlwiIGN5PVwiMTJcIiByPVwiMTBcIj48L2NpcmNsZT48cGF0aCBkPVwiTTkuMDkgOWEzIDMgMCAwIDEgNS44MyAxYzAgMi0zIDMtMyAzXCI+PC9wYXRoPjxsaW5lIHgxPVwiMTJcIiB5MT1cIjE3XCIgeDI9XCIxMi4wMVwiIHkyPVwiMTdcIj48L2xpbmU+PC9zdmc+ICcpO1xuICAtLWNhbGxvdXQtaWNvbi13YXJuaW5nOiB1cmwoJ2RhdGE6aW1hZ2Uvc3ZnK3htbDsgdXRmOCwgPHN2ZyB4bWxucz1cImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnXCIgd2lkdGg9XCIxMDAlXCIgaGVpZ2h0PVwiMTAwJVwiIHZpZXdCb3g9XCIwIDAgMjQgMjRcIiBmaWxsPVwibm9uZVwiIHN0cm9rZT1cImN1cnJlbnRDb2xvclwiIHN0cm9rZS13aWR0aD1cIjJcIiBzdHJva2UtbGluZWNhcD1cInJvdW5kXCIgc3Ryb2tlLWxpbmVqb2luPVwicm91bmRcIj48cGF0aCBkPVwibTIxLjczIDE4LTgtMTRhMiAyIDAgMCAwLTMuNDggMGwtOCAxNEEyIDIgMCAwIDAgNCAyMWgxNmEyIDIgMCAwIDAgMS43My0zWlwiPjwvcGF0aD48bGluZSB4MT1cIjEyXCIgeTE9XCI5XCIgeDI9XCIxMlwiIHkyPVwiMTNcIj48L2xpbmU+PGxpbmUgeDE9XCIxMlwiIHkxPVwiMTdcIiB4Mj1cIjEyLjAxXCIgeTI9XCIxN1wiPjwvbGluZT48L3N2Zz4nKTtcbiAgLS1jYWxsb3V0LWljb24tZmFpbHVyZTogdXJsKCdkYXRhOmltYWdlL3N2Zyt4bWw7IHV0ZjgsPHN2ZyB4bWxucz1cImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnXCIgd2lkdGg9XCIxMDAlXCIgaGVpZ2h0PVwiMTAwJVwiIHZpZXdCb3g9XCIwIDAgMjQgMjRcIiBmaWxsPVwibm9uZVwiIHN0cm9rZT1cImN1cnJlbnRDb2xvclwiIHN0cm9rZS13aWR0aD1cIjJcIiBzdHJva2UtbGluZWNhcD1cInJvdW5kXCIgc3Ryb2tlLWxpbmVqb2luPVwicm91bmRcIj48bGluZSB4MT1cIjE4XCIgeTE9XCI2XCIgeDI9XCI2XCIgeTI9XCIxOFwiPjwvbGluZT48bGluZSB4MT1cIjZcIiB5MT1cIjZcIiB4Mj1cIjE4XCIgeTI9XCIxOFwiPjwvbGluZT48L3N2Zz4gJyk7XG4gIC0tY2FsbG91dC1pY29uLWRhbmdlcjogdXJsKCdkYXRhOmltYWdlL3N2Zyt4bWw7IHV0ZjgsPHN2ZyB4bWxucz1cImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnXCIgd2lkdGg9XCIxMDAlXCIgaGVpZ2h0PVwiMTAwJVwiIHZpZXdCb3g9XCIwIDAgMjQgMjRcIiBmaWxsPVwibm9uZVwiIHN0cm9rZT1cImN1cnJlbnRDb2xvclwiIHN0cm9rZS13aWR0aD1cIjJcIiBzdHJva2UtbGluZWNhcD1cInJvdW5kXCIgc3Ryb2tlLWxpbmVqb2luPVwicm91bmRcIj48cG9seWdvbiBwb2ludHM9XCIxMyAyIDMgMTQgMTIgMTQgMTEgMjIgMjEgMTAgMTIgMTAgMTMgMlwiPjwvcG9seWdvbj48L3N2Zz4gJyk7XG4gIC0tY2FsbG91dC1pY29uLWJ1ZzogdXJsKCdkYXRhOmltYWdlL3N2Zyt4bWw7IHV0ZjgsIDxzdmcgeG1sbnM9XCJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Z1wiIHdpZHRoPVwiMTAwJVwiIGhlaWdodD1cIjEwMCVcIiB2aWV3Qm94PVwiMCAwIDI0IDI0XCIgZmlsbD1cIm5vbmVcIiBzdHJva2U9XCJjdXJyZW50Q29sb3JcIiBzdHJva2Utd2lkdGg9XCIyXCIgc3Ryb2tlLWxpbmVjYXA9XCJyb3VuZFwiIHN0cm9rZS1saW5lam9pbj1cInJvdW5kXCI+PHJlY3Qgd2lkdGg9XCI4XCIgaGVpZ2h0PVwiMTRcIiB4PVwiOFwiIHk9XCI2XCIgcng9XCI0XCI+PC9yZWN0PjxwYXRoIGQ9XCJtMTkgNy0zIDJcIj48L3BhdGg+PHBhdGggZD1cIm01IDcgMyAyXCI+PC9wYXRoPjxwYXRoIGQ9XCJtMTkgMTktMy0yXCI+PC9wYXRoPjxwYXRoIGQ9XCJtNSAxOSAzLTJcIj48L3BhdGg+PHBhdGggZD1cIk0yMCAxM2gtNFwiPjwvcGF0aD48cGF0aCBkPVwiTTQgMTNoNFwiPjwvcGF0aD48cGF0aCBkPVwibTEwIDQgMSAyXCI+PC9wYXRoPjxwYXRoIGQ9XCJtMTQgNC0xIDJcIj48L3BhdGg+PC9zdmc+Jyk7XG4gIC0tY2FsbG91dC1pY29uLWV4YW1wbGU6IHVybCgnZGF0YTppbWFnZS9zdmcreG1sOyB1dGY4LDxzdmcgeG1sbnM9XCJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Z1wiIHdpZHRoPVwiMTAwJVwiIGhlaWdodD1cIjEwMCVcIiB2aWV3Qm94PVwiMCAwIDI0IDI0XCIgZmlsbD1cIm5vbmVcIiBzdHJva2U9XCJjdXJyZW50Q29sb3JcIiBzdHJva2Utd2lkdGg9XCIyXCIgc3Ryb2tlLWxpbmVjYXA9XCJyb3VuZFwiIHN0cm9rZS1saW5lam9pbj1cInJvdW5kXCI+PGxpbmUgeDE9XCI4XCIgeTE9XCI2XCIgeDI9XCIyMVwiIHkyPVwiNlwiPjwvbGluZT48bGluZSB4MT1cIjhcIiB5MT1cIjEyXCIgeDI9XCIyMVwiIHkyPVwiMTJcIj48L2xpbmU+PGxpbmUgeDE9XCI4XCIgeTE9XCIxOFwiIHgyPVwiMjFcIiB5Mj1cIjE4XCI+PC9saW5lPjxsaW5lIHgxPVwiM1wiIHkxPVwiNlwiIHgyPVwiMy4wMVwiIHkyPVwiNlwiPjwvbGluZT48bGluZSB4MT1cIjNcIiB5MT1cIjEyXCIgeDI9XCIzLjAxXCIgeTI9XCIxMlwiPjwvbGluZT48bGluZSB4MT1cIjNcIiB5MT1cIjE4XCIgeDI9XCIzLjAxXCIgeTI9XCIxOFwiPjwvbGluZT48L3N2Zz4gJyk7XG4gIC0tY2FsbG91dC1pY29uLXF1b3RlOiB1cmwoJ2RhdGE6aW1hZ2Uvc3ZnK3htbDsgdXRmOCwgPHN2ZyB4bWxucz1cImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnXCIgd2lkdGg9XCIxMDAlXCIgaGVpZ2h0PVwiMTAwJVwiIHZpZXdCb3g9XCIwIDAgMjQgMjRcIiBmaWxsPVwibm9uZVwiIHN0cm9rZT1cImN1cnJlbnRDb2xvclwiIHN0cm9rZS13aWR0aD1cIjJcIiBzdHJva2UtbGluZWNhcD1cInJvdW5kXCIgc3Ryb2tlLWxpbmVqb2luPVwicm91bmRcIj48cGF0aCBkPVwiTTMgMjFjMyAwIDctMSA3LThWNWMwLTEuMjUtLjc1Ni0yLjAxNy0yLTJINGMtMS4yNSAwLTIgLjc1LTIgMS45NzJWMTFjMCAxLjI1Ljc1IDIgMiAyIDEgMCAxIDAgMSAxdjFjMCAxLTEgMi0yIDJzLTEgLjAwOC0xIDEuMDMxVjIwYzAgMSAwIDEgMSAxelwiPjwvcGF0aD48cGF0aCBkPVwiTTE1IDIxYzMgMCA3LTEgNy04VjVjMC0xLjI1LS43NTctMi4wMTctMi0yaC00Yy0xLjI1IDAtMiAuNzUtMiAxLjk3MlYxMWMwIDEuMjUuNzUgMiAyIDJoLjc1YzAgMi4yNS4yNSA0LTIuNzUgNHYzYzAgMSAwIDEgMSAxelwiPjwvcGF0aD48L3N2Zz4nKTtcbiAgLS1jYWxsb3V0LWljb24tZm9sZDogdXJsKCdkYXRhOmltYWdlL3N2Zyt4bWwsJTNDc3ZnIHhtbG5zPVwiaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmdcIiB3aWR0aD1cIjI0XCIgaGVpZ2h0PVwiMjRcIiB2aWV3Qm94PVwiMCAwIDI0IDI0XCIgZmlsbD1cIm5vbmVcIiBzdHJva2U9XCJjdXJyZW50Q29sb3JcIiBzdHJva2Utd2lkdGg9XCIyXCIgc3Ryb2tlLWxpbmVjYXA9XCJyb3VuZFwiIHN0cm9rZS1saW5lam9pbj1cInJvdW5kXCIlM0UlM0Nwb2x5bGluZSBwb2ludHM9XCI2IDkgMTIgMTUgMTggOVwiJTNFJTNDL3BvbHlsaW5lJTNFJTNDL3N2ZyUzRScpO1xuXG4gICZbZGF0YS1jYWxsb3V0XSB7XG4gICAgLS1jb2xvcjogIzQ0OGFmZjtcbiAgICAtLWJvcmRlcjogIzQ0OGFmZjQ0O1xuICAgIC0tYmc6ICM0NDhhZmYxMDtcbiAgICAtLWNhbGxvdXQtaWNvbjogdmFyKC0tY2FsbG91dC1pY29uLW5vdGUpO1xuICB9XG5cbiAgJltkYXRhLWNhbGxvdXQ9XCJhYnN0cmFjdFwiXSB7XG4gICAgLS1jb2xvcjogIzAwYjBmZjtcbiAgICAtLWJvcmRlcjogIzAwYjBmZjQ0O1xuICAgIC0tYmc6ICMwMGIwZmYxMDtcbiAgICAtLWNhbGxvdXQtaWNvbjogdmFyKC0tY2FsbG91dC1pY29uLWFic3RyYWN0KTtcbiAgfVxuXG4gICZbZGF0YS1jYWxsb3V0PVwiaW5mb1wiXSxcbiAgJltkYXRhLWNhbGxvdXQ9XCJ0b2RvXCJdIHtcbiAgICAtLWNvbG9yOiAjMDBiOGQ0O1xuICAgIC0tYm9yZGVyOiAjMDBiOGQ0NDQ7XG4gICAgLS1iZzogIzAwYjhkNDEwO1xuICAgIC0tY2FsbG91dC1pY29uOiB2YXIoLS1jYWxsb3V0LWljb24taW5mbyk7XG4gIH1cblxuICAmW2RhdGEtY2FsbG91dD1cInRvZG9cIl0ge1xuICAgIC0tY2FsbG91dC1pY29uOiB2YXIoLS1jYWxsb3V0LWljb24tdG9kbyk7XG4gIH1cblxuICAmW2RhdGEtY2FsbG91dD1cInRpcFwiXSB7XG4gICAgLS1jb2xvcjogIzAwYmZhNTtcbiAgICAtLWJvcmRlcjogIzAwYmZhNTQ0O1xuICAgIC0tYmc6ICMwMGJmYTUxMDtcbiAgICAtLWNhbGxvdXQtaWNvbjogdmFyKC0tY2FsbG91dC1pY29uLXRpcCk7XG4gIH1cblxuICAmW2RhdGEtY2FsbG91dD1cInN1Y2Nlc3NcIl0ge1xuICAgIC0tY29sb3I6ICMwOWFkN2E7XG4gICAgLS1ib3JkZXI6ICMwOWFkNzE0NDtcbiAgICAtLWJnOiAjMDlhZDcxMTA7XG4gICAgLS1jYWxsb3V0LWljb246IHZhcigtLWNhbGxvdXQtaWNvbi1zdWNjZXNzKTtcbiAgfVxuXG4gICZbZGF0YS1jYWxsb3V0PVwicXVlc3Rpb25cIl0ge1xuICAgIC0tY29sb3I6ICNkYmE2NDI7XG4gICAgLS1ib3JkZXI6ICNkYmE2NDI0NDtcbiAgICAtLWJnOiAjZGJhNjQyMTA7XG4gICAgLS1jYWxsb3V0LWljb246IHZhcigtLWNhbGxvdXQtaWNvbi1xdWVzdGlvbik7XG4gIH1cblxuICAmW2RhdGEtY2FsbG91dD1cIndhcm5pbmdcIl0ge1xuICAgIC0tY29sb3I6ICNkYjg5NDI7XG4gICAgLS1ib3JkZXI6ICNkYjg5NDI0NDtcbiAgICAtLWJnOiAjZGI4OTQyMTA7XG4gICAgLS1jYWxsb3V0LWljb246IHZhcigtLWNhbGxvdXQtaWNvbi13YXJuaW5nKTtcbiAgfVxuXG4gICZbZGF0YS1jYWxsb3V0PVwiZmFpbHVyZVwiXSxcbiAgJltkYXRhLWNhbGxvdXQ9XCJkYW5nZXJcIl0sXG4gICZbZGF0YS1jYWxsb3V0PVwiYnVnXCJdIHtcbiAgICAtLWNvbG9yOiAjZGI0MjQyO1xuICAgIC0tYm9yZGVyOiAjZGI0MjQyNDQ7XG4gICAgLS1iZzogI2RiNDI0MjEwO1xuICAgIC0tY2FsbG91dC1pY29uOiB2YXIoLS1jYWxsb3V0LWljb24tZmFpbHVyZSk7XG4gIH1cblxuICAmW2RhdGEtY2FsbG91dD1cImJ1Z1wiXSB7XG4gICAgLS1jYWxsb3V0LWljb246IHZhcigtLWNhbGxvdXQtaWNvbi1idWcpO1xuICB9XG5cbiAgJltkYXRhLWNhbGxvdXQ9XCJkYW5nZXJcIl0ge1xuICAgIC0tY2FsbG91dC1pY29uOiB2YXIoLS1jYWxsb3V0LWljb24tZGFuZ2VyKTtcbiAgfVxuXG4gICZbZGF0YS1jYWxsb3V0PVwiZXhhbXBsZVwiXSB7XG4gICAgLS1jb2xvcjogIzdhNDNiNTtcbiAgICAtLWJvcmRlcjogIzdhNDNiNTQ0O1xuICAgIC0tYmc6ICM3YTQzYjUxMDtcbiAgICAtLWNhbGxvdXQtaWNvbjogdmFyKC0tY2FsbG91dC1pY29uLWV4YW1wbGUpO1xuICB9XG5cbiAgJltkYXRhLWNhbGxvdXQ9XCJxdW90ZVwiXSB7XG4gICAgLS1jb2xvcjogdmFyKC0tc2Vjb25kYXJ5KTtcbiAgICAtLWJvcmRlcjogdmFyKC0tbGlnaHRncmF5KTtcbiAgICAtLWNhbGxvdXQtaWNvbjogdmFyKC0tY2FsbG91dC1pY29uLXF1b3RlKTtcbiAgfVxuXG4gICYuaXMtY29sbGFwc2VkID4gLmNhbGxvdXQtdGl0bGUgPiAuZm9sZC1jYWxsb3V0LWljb24ge1xuICAgIHRyYW5zZm9ybTogcm90YXRlWigtOTBkZWcpO1xuICB9XG59XG5cbi5jYWxsb3V0LXRpdGxlIHtcbiAgZGlzcGxheTogZmxleDtcbiAgYWxpZ24taXRlbXM6IGZsZXgtc3RhcnQ7XG4gIGdhcDogNXB4O1xuICBwYWRkaW5nOiAxcmVtIDA7XG4gIGNvbG9yOiB2YXIoLS1jb2xvcik7XG5cbiAgLS1pY29uLXNpemU6IDE4cHg7XG5cbiAgJiAuZm9sZC1jYWxsb3V0LWljb24ge1xuICAgIHRyYW5zaXRpb246IHRyYW5zZm9ybSAwLjE1cyBlYXNlO1xuICAgIG9wYWNpdHk6IDAuODtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgLS1jYWxsb3V0LWljb246IHZhcigtLWNhbGxvdXQtaWNvbi1mb2xkKTtcbiAgfVxuXG4gICYgPiAuY2FsbG91dC10aXRsZS1pbm5lciA+IHAge1xuICAgIGNvbG9yOiB2YXIoLS1jb2xvcik7XG4gICAgbWFyZ2luOiAwO1xuICB9XG5cbiAgLmNhbGxvdXQtaWNvbixcbiAgJiAuZm9sZC1jYWxsb3V0LWljb24ge1xuICAgIHdpZHRoOiB2YXIoLS1pY29uLXNpemUpO1xuICAgIGhlaWdodDogdmFyKC0taWNvbi1zaXplKTtcbiAgICBmbGV4OiAwIDAgdmFyKC0taWNvbi1zaXplKTtcblxuICAgIC8vIGljb24gc3VwcG9ydFxuICAgIGJhY2tncm91bmQtc2l6ZTogdmFyKC0taWNvbi1zaXplKSB2YXIoLS1pY29uLXNpemUpO1xuICAgIGJhY2tncm91bmQtcG9zaXRpb246IGNlbnRlcjtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1jb2xvcik7XG4gICAgbWFzay1pbWFnZTogdmFyKC0tY2FsbG91dC1pY29uKTtcbiAgICBtYXNrLXNpemU6IHZhcigtLWljb24tc2l6ZSkgdmFyKC0taWNvbi1zaXplKTtcbiAgICBtYXNrLXBvc2l0aW9uOiBjZW50ZXI7XG4gICAgbWFzay1yZXBlYXQ6IG5vLXJlcGVhdDtcbiAgICBwYWRkaW5nOiAwLjJyZW0gMDtcbiAgfVxuXG4gIC5jYWxsb3V0LXRpdGxlLWlubmVyIHtcbiAgICBmb250LXdlaWdodDogJHNlbWlCb2xkV2VpZ2h0O1xuICB9XG59XG4iLCJAdXNlIFwiLi92YXJpYWJsZXMuc2Nzc1wiIGFzICo7XG5AdXNlIFwiLi9zeW50YXguc2Nzc1wiO1xuQHVzZSBcIi4vY2FsbG91dHMuc2Nzc1wiO1xuXG5odG1sIHtcbiAgc2Nyb2xsLWJlaGF2aW9yOiBzbW9vdGg7XG4gIHRleHQtc2l6ZS1hZGp1c3Q6IG5vbmU7XG4gIG92ZXJmbG93LXg6IGhpZGRlbjtcbiAgd2lkdGg6IDEwMHZ3O1xufVxuXG5ib2R5LFxuc2VjdGlvbiB7XG4gIG1hcmdpbjogMDtcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tbGlnaHQpO1xuICBmb250LWZhbWlseTogdmFyKC0tYm9keUZvbnQpO1xuICBjb2xvcjogdmFyKC0tZGFya2dyYXkpO1xufVxuXG4udGV4dC1oaWdobGlnaHQge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS10ZXh0SGlnaGxpZ2h0KTtcbiAgcGFkZGluZzogMCAwLjFyZW07XG4gIGJvcmRlci1yYWRpdXM6IDVweDtcbn1cbjo6c2VsZWN0aW9uIHtcbiAgYmFja2dyb3VuZDogY29sb3ItbWl4KGluIHNyZ2IsIHZhcigtLXRlcnRpYXJ5KSA2MCUsIHJnYmEoMjU1LCAyNTUsIDI1NSwgMCkpO1xuICBjb2xvcjogdmFyKC0tZGFya2dyYXkpO1xufVxuXG5wLFxudWwsXG50ZXh0LFxuYSxcbnRyLFxudGQsXG5saSxcbm9sLFxudWwsXG4ua2F0ZXgsXG4ubWF0aCB7XG4gIGNvbG9yOiB2YXIoLS1kYXJrZ3JheSk7XG4gIGZpbGw6IHZhcigtLWRhcmtncmF5KTtcbiAgaHlwaGVuczogYXV0bztcbn1cblxucCxcbnVsLFxudGV4dCxcbmEsXG5saSxcbm9sLFxudWwsXG4ua2F0ZXgsXG4ubWF0aCB7XG4gIG92ZXJmbG93LXdyYXA6IGFueXdoZXJlO1xuICAvKiB0ciBhbmQgdGQgcmVtb3ZlZCBmcm9tIGxpc3Qgb2Ygc2VsZWN0b3JzIGZvciBvdmVyZmxvdy13cmFwLCBhbGxvd2luZyB0aGVtIHRvIHVzZSBkZWZhdWx0ICdub3JtYWwnIHByb3BlcnR5IHZhbHVlICovXG59XG5cbi5tYXRoIHtcbiAgJi5tYXRoLWRpc3BsYXkge1xuICAgIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgfVxufVxuXG5zdHJvbmcge1xuICBmb250LXdlaWdodDogJHNlbWlCb2xkV2VpZ2h0O1xufVxuXG5hIHtcbiAgZm9udC13ZWlnaHQ6ICRzZW1pQm9sZFdlaWdodDtcbiAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xuICB0cmFuc2l0aW9uOiBjb2xvciAwLjJzIGVhc2U7XG4gIGNvbG9yOiB2YXIoLS1zZWNvbmRhcnkpO1xuXG4gICY6aG92ZXIge1xuICAgIGNvbG9yOiB2YXIoLS10ZXJ0aWFyeSkgIWltcG9ydGFudDtcbiAgfVxuXG4gICYuaW50ZXJuYWwge1xuICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1oaWdobGlnaHQpO1xuICAgIHBhZGRpbmc6IDAgMC4xcmVtO1xuICAgIGJvcmRlci1yYWRpdXM6IDVweDtcbiAgICBsaW5lLWhlaWdodDogMS40cmVtO1xuXG4gICAgJjpoYXMoPiBpbWcpIHtcbiAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuICAgICAgYm9yZGVyLXJhZGl1czogMDtcbiAgICAgIHBhZGRpbmc6IDA7XG4gICAgfVxuICAgICYudGFnLWxpbmsge1xuICAgICAgJjo6YmVmb3JlIHtcbiAgICAgICAgY29udGVudDogXCIjXCI7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgJi5leHRlcm5hbCAuZXh0ZXJuYWwtaWNvbiB7XG4gICAgaGVpZ2h0OiAxZXg7XG4gICAgbWFyZ2luOiAwIDAuMTVlbTtcblxuICAgID4gcGF0aCB7XG4gICAgICBmaWxsOiB2YXIoLS1kYXJrKTtcbiAgICB9XG4gIH1cbn1cblxuLmRlc2t0b3Atb25seSB7XG4gIGRpc3BsYXk6IGluaXRpYWw7XG4gIEBtZWRpYSBhbGwgYW5kICgkbW9iaWxlKSB7XG4gICAgZGlzcGxheTogbm9uZTtcbiAgfVxufVxuXG4ubW9iaWxlLW9ubHkge1xuICBkaXNwbGF5OiBub25lO1xuICBAbWVkaWEgYWxsIGFuZCAoJG1vYmlsZSkge1xuICAgIGRpc3BsYXk6IGluaXRpYWw7XG4gIH1cbn1cblxuLnBhZ2Uge1xuICBtYXgtd2lkdGg6IGNhbGMoI3ttYXAtZ2V0KCRicmVha3BvaW50cywgZGVza3RvcCl9ICsgMzAwcHgpO1xuICBtYXJnaW46IDAgYXV0bztcbiAgJiBhcnRpY2xlIHtcbiAgICAmID4gaDEge1xuICAgICAgZm9udC1zaXplOiAycmVtO1xuICAgIH1cblxuICAgICYgbGk6aGFzKD4gaW5wdXRbdHlwZT1cImNoZWNrYm94XCJdKSB7XG4gICAgICBsaXN0LXN0eWxlLXR5cGU6IG5vbmU7XG4gICAgICBwYWRkaW5nLWxlZnQ6IDA7XG4gICAgfVxuXG4gICAgJiBsaTpoYXMoPiBpbnB1dFt0eXBlPVwiY2hlY2tib3hcIl06Y2hlY2tlZCkge1xuICAgICAgdGV4dC1kZWNvcmF0aW9uOiBsaW5lLXRocm91Z2g7XG4gICAgICB0ZXh0LWRlY29yYXRpb24tY29sb3I6IHZhcigtLWdyYXkpO1xuICAgICAgY29sb3I6IHZhcigtLWdyYXkpO1xuICAgIH1cblxuICAgICYgbGkgPiAqIHtcbiAgICAgIG1hcmdpbi10b3A6IDA7XG4gICAgICBtYXJnaW4tYm90dG9tOiAwO1xuICAgIH1cblxuICAgIHAgPiBzdHJvbmcge1xuICAgICAgY29sb3I6IHZhcigtLWRhcmspO1xuICAgIH1cbiAgfVxuXG4gICYgPiAjcXVhcnR6LWJvZHkge1xuICAgIGRpc3BsYXk6IGdyaWQ7XG4gICAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAje21hcC1nZXQoJGRlc2t0b3BHcmlkLCB0ZW1wbGF0ZUNvbHVtbnMpfTtcbiAgICBncmlkLXRlbXBsYXRlLXJvd3M6ICN7bWFwLWdldCgkZGVza3RvcEdyaWQsIHRlbXBsYXRlUm93cyl9O1xuICAgIGNvbHVtbi1nYXA6ICN7bWFwLWdldCgkZGVza3RvcEdyaWQsIGNvbHVtbkdhcCl9O1xuICAgIHJvdy1nYXA6ICN7bWFwLWdldCgkZGVza3RvcEdyaWQsIHJvd0dhcCl9O1xuICAgIGdyaWQtdGVtcGxhdGUtYXJlYXM6ICN7bWFwLWdldCgkZGVza3RvcEdyaWQsIHRlbXBsYXRlQXJlYXMpfTtcbiAgICBAbWVkaWEgYWxsIGFuZCAoJHRhYmxldCkge1xuICAgICAgZ3JpZC10ZW1wbGF0ZS1jb2x1bW5zOiAje21hcC1nZXQoJHRhYmxldEdyaWQsIHRlbXBsYXRlQ29sdW1ucyl9O1xuICAgICAgZ3JpZC10ZW1wbGF0ZS1yb3dzOiAje21hcC1nZXQoJHRhYmxldEdyaWQsIHRlbXBsYXRlUm93cyl9O1xuICAgICAgY29sdW1uLWdhcDogI3ttYXAtZ2V0KCR0YWJsZXRHcmlkLCBjb2x1bW5HYXApfTtcbiAgICAgIHJvdy1nYXA6ICN7bWFwLWdldCgkdGFibGV0R3JpZCwgcm93R2FwKX07XG4gICAgICBncmlkLXRlbXBsYXRlLWFyZWFzOiAje21hcC1nZXQoJHRhYmxldEdyaWQsIHRlbXBsYXRlQXJlYXMpfTtcbiAgICB9XG4gICAgQG1lZGlhIGFsbCBhbmQgKCRtb2JpbGUpIHtcbiAgICAgIGdyaWQtdGVtcGxhdGUtY29sdW1uczogI3ttYXAtZ2V0KCRtb2JpbGVHcmlkLCB0ZW1wbGF0ZUNvbHVtbnMpfTtcbiAgICAgIGdyaWQtdGVtcGxhdGUtcm93czogI3ttYXAtZ2V0KCRtb2JpbGVHcmlkLCB0ZW1wbGF0ZVJvd3MpfTtcbiAgICAgIGNvbHVtbi1nYXA6ICN7bWFwLWdldCgkbW9iaWxlR3JpZCwgY29sdW1uR2FwKX07XG4gICAgICByb3ctZ2FwOiAje21hcC1nZXQoJG1vYmlsZUdyaWQsIHJvd0dhcCl9O1xuICAgICAgZ3JpZC10ZW1wbGF0ZS1hcmVhczogI3ttYXAtZ2V0KCRtb2JpbGVHcmlkLCB0ZW1wbGF0ZUFyZWFzKX07XG4gICAgfVxuXG4gICAgQG1lZGlhIGFsbCBhbmQgbm90ICgkZGVza3RvcCkge1xuICAgICAgcGFkZGluZzogMCAxcmVtO1xuICAgIH1cbiAgICBAbWVkaWEgYWxsIGFuZCAoJG1vYmlsZSkge1xuICAgICAgbWFyZ2luOiAwIGF1dG87XG4gICAgfVxuXG4gICAgJiAuc2lkZWJhciB7XG4gICAgICBnYXA6IDJyZW07XG4gICAgICB0b3A6IDA7XG4gICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgICAgcGFkZGluZzogJHRvcFNwYWNpbmcgMnJlbSAycmVtIDJyZW07XG4gICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgaGVpZ2h0OiAxMDB2aDtcbiAgICAgIHBvc2l0aW9uOiBzdGlja3k7XG4gICAgfVxuXG4gICAgJiAuc2lkZWJhci5sZWZ0IHtcbiAgICAgIHotaW5kZXg6IDE7XG4gICAgICBncmlkLWFyZWE6IGdyaWQtc2lkZWJhci1sZWZ0O1xuICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgICAgIEBtZWRpYSBhbGwgYW5kICgkbW9iaWxlKSB7XG4gICAgICAgIGdhcDogMDtcbiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgcG9zaXRpb246IGluaXRpYWw7XG4gICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgIGhlaWdodDogdW5zZXQ7XG4gICAgICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7XG4gICAgICAgIHBhZGRpbmc6IDA7XG4gICAgICAgIHBhZGRpbmctdG9wOiAycmVtO1xuICAgICAgfVxuICAgIH1cblxuICAgICYgLnNpZGViYXIucmlnaHQge1xuICAgICAgZ3JpZC1hcmVhOiBncmlkLXNpZGViYXItcmlnaHQ7XG4gICAgICBtYXJnaW4tcmlnaHQ6IDA7XG4gICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICAgICAgQG1lZGlhIGFsbCBhbmQgKCRtb2JpbGUpIHtcbiAgICAgICAgbWFyZ2luLWxlZnQ6IGluaGVyaXQ7XG4gICAgICAgIG1hcmdpbi1yaWdodDogaW5oZXJpdDtcbiAgICAgIH1cbiAgICAgIEBtZWRpYSBhbGwgYW5kIG5vdCAoJGRlc2t0b3ApIHtcbiAgICAgICAgcG9zaXRpb246IGluaXRpYWw7XG4gICAgICAgIGhlaWdodDogdW5zZXQ7XG4gICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICBmbGV4LWRpcmVjdGlvbjogcm93O1xuICAgICAgICBwYWRkaW5nOiAwO1xuICAgICAgICAmID4gKiB7XG4gICAgICAgICAgZmxleDogMTtcbiAgICAgICAgfVxuICAgICAgICAmID4gLnRvYyB7XG4gICAgICAgICAgZGlzcGxheTogbm9uZTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgICAmIC5wYWdlLWhlYWRlcixcbiAgICAmIC5wYWdlLWZvb3RlciB7XG4gICAgICBtYXJnaW4tdG9wOiAxcmVtO1xuICAgIH1cblxuICAgICYgLnBhZ2UtaGVhZGVyIHtcbiAgICAgIGdyaWQtYXJlYTogZ3JpZC1oZWFkZXI7XG4gICAgICBtYXJnaW46ICR0b3BTcGFjaW5nIDAgMCAwO1xuICAgICAgQG1lZGlhIGFsbCBhbmQgKCRtb2JpbGUpIHtcbiAgICAgICAgbWFyZ2luLXRvcDogMDtcbiAgICAgICAgcGFkZGluZzogMDtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAmIC5jZW50ZXIgPiBhcnRpY2xlIHtcbiAgICAgIGdyaWQtYXJlYTogZ3JpZC1jZW50ZXI7XG4gICAgfVxuXG4gICAgJiBmb290ZXIge1xuICAgICAgZ3JpZC1hcmVhOiBncmlkLWZvb3RlcjtcbiAgICB9XG5cbiAgICAmIC5jZW50ZXIsXG4gICAgJiBmb290ZXIge1xuICAgICAgbWF4LXdpZHRoOiAxMDAlO1xuICAgICAgbWluLXdpZHRoOiAxMDAlO1xuICAgICAgbWFyZ2luLWxlZnQ6IGF1dG87XG4gICAgICBtYXJnaW4tcmlnaHQ6IGF1dG87XG4gICAgICBAbWVkaWEgYWxsIGFuZCAoJHRhYmxldCkge1xuICAgICAgICBtYXJnaW4tcmlnaHQ6IDA7XG4gICAgICB9XG4gICAgICBAbWVkaWEgYWxsIGFuZCAoJG1vYmlsZSkge1xuICAgICAgICBtYXJnaW4tcmlnaHQ6IDA7XG4gICAgICAgIG1hcmdpbi1sZWZ0OiAwO1xuICAgICAgfVxuICAgIH1cbiAgICAmIGZvb3RlciB7XG4gICAgICBtYXJnaW4tbGVmdDogMDtcbiAgICB9XG4gIH1cbn1cblxuLmZvb3Rub3RlcyB7XG4gIG1hcmdpbi10b3A6IDJyZW07XG4gIGJvcmRlci10b3A6IDFweCBzb2xpZCB2YXIoLS1saWdodGdyYXkpO1xufVxuXG5pbnB1dFt0eXBlPVwiY2hlY2tib3hcIl0ge1xuICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMnB4KTtcbiAgY29sb3I6IHZhcigtLXNlY29uZGFyeSk7XG4gIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWxpZ2h0Z3JheSk7XG4gIGJvcmRlci1yYWRpdXM6IDNweDtcbiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tbGlnaHQpO1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gIG1hcmdpbi1pbmxpbmUtZW5kOiAwLjJyZW07XG4gIG1hcmdpbi1pbmxpbmUtc3RhcnQ6IC0xLjRyZW07XG4gIGFwcGVhcmFuY2U6IG5vbmU7XG4gIHdpZHRoOiAxNnB4O1xuICBoZWlnaHQ6IDE2cHg7XG5cbiAgJjpjaGVja2VkIHtcbiAgICBib3JkZXItY29sb3I6IHZhcigtLXNlY29uZGFyeSk7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tc2Vjb25kYXJ5KTtcblxuICAgICY6OmFmdGVyIHtcbiAgICAgIGNvbnRlbnQ6IFwiXCI7XG4gICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICBsZWZ0OiA0cHg7XG4gICAgICB0b3A6IDFweDtcbiAgICAgIHdpZHRoOiA0cHg7XG4gICAgICBoZWlnaHQ6IDhweDtcbiAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgICAgYm9yZGVyOiBzb2xpZCB2YXIoLS1saWdodCk7XG4gICAgICBib3JkZXItd2lkdGg6IDAgMnB4IDJweCAwO1xuICAgICAgdHJhbnNmb3JtOiByb3RhdGUoNDVkZWcpO1xuICAgIH1cbiAgfVxufVxuXG5ibG9ja3F1b3RlIHtcbiAgbWFyZ2luOiAxcmVtIDA7XG4gIGJvcmRlci1sZWZ0OiAzcHggc29saWQgdmFyKC0tc2Vjb25kYXJ5KTtcbiAgcGFkZGluZy1sZWZ0OiAxcmVtO1xuICB0cmFuc2l0aW9uOiBib3JkZXItY29sb3IgMC4ycyBlYXNlO1xufVxuXG5oMSxcbmgyLFxuaDMsXG5oNCxcbmg1LFxuaDYsXG50aGVhZCB7XG4gIGZvbnQtZmFtaWx5OiB2YXIoLS1oZWFkZXJGb250KTtcbiAgY29sb3I6IHZhcigtLWRhcmspO1xuICBmb250LXdlaWdodDogcmV2ZXJ0O1xuICBtYXJnaW4tYm90dG9tOiAwO1xuXG4gIGFydGljbGUgPiAmID4gYVtyb2xlPVwiYW5jaG9yXCJdIHtcbiAgICBjb2xvcjogdmFyKC0tZGFyayk7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG4gIH1cbn1cblxuaDEsXG5oMixcbmgzLFxuaDQsXG5oNSxcbmg2IHtcbiAgJltpZF0gPiBhW2hyZWZePVwiI1wiXSB7XG4gICAgbWFyZ2luOiAwIDAuNXJlbTtcbiAgICBvcGFjaXR5OiAwO1xuICAgIHRyYW5zaXRpb246IG9wYWNpdHkgMC4ycyBlYXNlO1xuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgtMC4xcmVtKTtcbiAgICBmb250LWZhbWlseTogdmFyKC0tY29kZUZvbnQpO1xuICAgIHVzZXItc2VsZWN0OiBub25lO1xuICB9XG5cbiAgJltpZF06aG92ZXIgPiBhIHtcbiAgICBvcGFjaXR5OiAxO1xuICB9XG59XG5cbi8vIHR5cG9ncmFwaHkgaW1wcm92ZW1lbnRzXG5oMSB7XG4gIGZvbnQtc2l6ZTogMS43NXJlbTtcbiAgbWFyZ2luLXRvcDogMi4yNXJlbTtcbiAgbWFyZ2luLWJvdHRvbTogMXJlbTtcbn1cblxuaDIge1xuICBmb250LXNpemU6IDEuNHJlbTtcbiAgbWFyZ2luLXRvcDogMS45cmVtO1xuICBtYXJnaW4tYm90dG9tOiAxcmVtO1xufVxuXG5oMyB7XG4gIGZvbnQtc2l6ZTogMS4xMnJlbTtcbiAgbWFyZ2luLXRvcDogMS42MnJlbTtcbiAgbWFyZ2luLWJvdHRvbTogMXJlbTtcbn1cblxuaDQsXG5oNSxcbmg2IHtcbiAgZm9udC1zaXplOiAxcmVtO1xuICBtYXJnaW4tdG9wOiAxLjVyZW07XG4gIG1hcmdpbi1ib3R0b206IDFyZW07XG59XG5cbmZpZ3VyZVtkYXRhLXJlaHlwZS1wcmV0dHktY29kZS1maWd1cmVdIHtcbiAgbWFyZ2luOiAwO1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gIGxpbmUtaGVpZ2h0OiAxLjZyZW07XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuICAmID4gW2RhdGEtcmVoeXBlLXByZXR0eS1jb2RlLXRpdGxlXSB7XG4gICAgZm9udC1mYW1pbHk6IHZhcigtLWNvZGVGb250KTtcbiAgICBmb250LXNpemU6IDAuOXJlbTtcbiAgICBwYWRkaW5nOiAwLjFyZW0gMC41cmVtO1xuICAgIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWxpZ2h0Z3JheSk7XG4gICAgYm9yZGVyLXJhZGl1czogNXB4O1xuICAgIG1hcmdpbi1ib3R0b206IC0wLjVyZW07XG4gICAgY29sb3I6IHZhcigtLWRhcmtncmF5KTtcbiAgfVxuXG4gICYgPiBwcmUge1xuICAgIHBhZGRpbmc6IDA7XG4gIH1cbn1cblxucHJlIHtcbiAgZm9udC1mYW1pbHk6IHZhcigtLWNvZGVGb250KTtcbiAgcGFkZGluZzogMCAwLjVyZW07XG4gIGJvcmRlci1yYWRpdXM6IDVweDtcbiAgb3ZlcmZsb3cteDogYXV0bztcbiAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tbGlnaHRncmF5KTtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuXG4gICY6aGFzKD4gY29kZS5tZXJtYWlkKSB7XG4gICAgYm9yZGVyOiBub25lO1xuICB9XG5cbiAgJiA+IGNvZGUge1xuICAgIGJhY2tncm91bmQ6IG5vbmU7XG4gICAgcGFkZGluZzogMDtcbiAgICBmb250LXNpemU6IDAuODVyZW07XG4gICAgY291bnRlci1yZXNldDogbGluZTtcbiAgICBjb3VudGVyLWluY3JlbWVudDogbGluZSAwO1xuICAgIGRpc3BsYXk6IGdyaWQ7XG4gICAgcGFkZGluZzogMC41cmVtIDA7XG4gICAgb3ZlcmZsb3cteDogYXV0bztcblxuICAgICYgW2RhdGEtaGlnaGxpZ2h0ZWQtY2hhcnNdIHtcbiAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWhpZ2hsaWdodCk7XG4gICAgICBib3JkZXItcmFkaXVzOiA1cHg7XG4gICAgfVxuXG4gICAgJiA+IFtkYXRhLWxpbmVdIHtcbiAgICAgIHBhZGRpbmc6IDAgMC4yNXJlbTtcbiAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICAgICBib3JkZXItbGVmdDogM3B4IHNvbGlkIHRyYW5zcGFyZW50O1xuXG4gICAgICAmW2RhdGEtaGlnaGxpZ2h0ZWQtbGluZV0ge1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1oaWdobGlnaHQpO1xuICAgICAgICBib3JkZXItbGVmdDogM3B4IHNvbGlkIHZhcigtLXNlY29uZGFyeSk7XG4gICAgICB9XG5cbiAgICAgICY6OmJlZm9yZSB7XG4gICAgICAgIGNvbnRlbnQ6IGNvdW50ZXIobGluZSk7XG4gICAgICAgIGNvdW50ZXItaW5jcmVtZW50OiBsaW5lO1xuICAgICAgICB3aWR0aDogMXJlbTtcbiAgICAgICAgbWFyZ2luLXJpZ2h0OiAxcmVtO1xuICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gICAgICAgIHRleHQtYWxpZ246IHJpZ2h0O1xuICAgICAgICBjb2xvcjogcmdiYSgxMTUsIDEzOCwgMTQ4LCAwLjYpO1xuICAgICAgfVxuICAgIH1cblxuICAgICZbZGF0YS1saW5lLW51bWJlcnMtbWF4LWRpZ2l0cz1cIjJcIl0gPiBbZGF0YS1saW5lXTo6YmVmb3JlIHtcbiAgICAgIHdpZHRoOiAycmVtO1xuICAgIH1cblxuICAgICZbZGF0YS1saW5lLW51bWJlcnMtbWF4LWRpZ2l0cz1cIjNcIl0gPiBbZGF0YS1saW5lXTo6YmVmb3JlIHtcbiAgICAgIHdpZHRoOiAzcmVtO1xuICAgIH1cbiAgfVxufVxuXG5jb2RlIHtcbiAgZm9udC1zaXplOiAwLjllbTtcbiAgY29sb3I6IHZhcigtLWRhcmspO1xuICBmb250LWZhbWlseTogdmFyKC0tY29kZUZvbnQpO1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG4gIHBhZGRpbmc6IDAuMXJlbSAwLjJyZW07XG4gIGJhY2tncm91bmQ6IHZhcigtLWxpZ2h0Z3JheSk7XG59XG5cbnRib2R5LFxubGksXG5wIHtcbiAgbGluZS1oZWlnaHQ6IDEuNnJlbTtcbn1cblxuLnRhYmxlLWNvbnRhaW5lciB7XG4gIG92ZXJmbG93LXg6IGF1dG87XG5cbiAgJiA+IHRhYmxlIHtcbiAgICBtYXJnaW46IDFyZW07XG4gICAgcGFkZGluZzogMS41cmVtO1xuICAgIGJvcmRlci1jb2xsYXBzZTogY29sbGFwc2U7XG5cbiAgICB0aCxcbiAgICB0ZCB7XG4gICAgICBtaW4td2lkdGg6IDc1cHg7XG4gICAgfVxuXG4gICAgJiA+ICoge1xuICAgICAgbGluZS1oZWlnaHQ6IDJyZW07XG4gICAgfVxuICB9XG59XG5cbnRoIHtcbiAgdGV4dC1hbGlnbjogbGVmdDtcbiAgcGFkZGluZzogMC40cmVtIDAuN3JlbTtcbiAgYm9yZGVyLWJvdHRvbTogMnB4IHNvbGlkIHZhcigtLWdyYXkpO1xufVxuXG50ZCB7XG4gIHBhZGRpbmc6IDAuMnJlbSAwLjdyZW07XG59XG5cbnRyIHtcbiAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHZhcigtLWxpZ2h0Z3JheSk7XG4gICY6bGFzdC1jaGlsZCB7XG4gICAgYm9yZGVyLWJvdHRvbTogbm9uZTtcbiAgfVxufVxuXG5pbWcge1xuICBtYXgtd2lkdGg6IDEwMCU7XG4gIGJvcmRlci1yYWRpdXM6IDVweDtcbiAgbWFyZ2luOiAxcmVtIDA7XG59XG5cbnAgPiBpbWcgKyBlbSB7XG4gIGRpc3BsYXk6IGJsb2NrO1xuICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoLTFyZW0pO1xufVxuXG5ociB7XG4gIHdpZHRoOiAxMDAlO1xuICBtYXJnaW46IDJyZW0gYXV0bztcbiAgaGVpZ2h0OiAxcHg7XG4gIGJvcmRlcjogbm9uZTtcbiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tbGlnaHRncmF5KTtcbn1cblxuYXVkaW8sXG52aWRlbyB7XG4gIHdpZHRoOiAxMDAlO1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG59XG5cbi5zcGFjZXIge1xuICBmbGV4OiAxIDEgYXV0bztcbn1cblxuZGl2Omhhcyg+IC5vdmVyZmxvdykge1xuICBkaXNwbGF5OiBmbGV4O1xuICBvdmVyZmxvdy15OiBhdXRvO1xuICBtYXgtaGVpZ2h0OiAxMDAlO1xufVxuXG51bC5vdmVyZmxvdyxcbm9sLm92ZXJmbG93IHtcbiAgbWF4LWhlaWdodDogMTAwJTtcbiAgb3ZlcmZsb3cteTogYXV0bztcblxuICAvLyBjbGVhcmZpeFxuICBjb250ZW50OiBcIlwiO1xuICBjbGVhcjogYm90aDtcblxuICAmID4gbGk6bGFzdC1vZi10eXBlIHtcbiAgICBtYXJnaW4tYm90dG9tOiAzMHB4O1xuICB9XG4gIC8qJjphZnRlciB7XG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgY29udGVudDogXCJcIjtcbiAgICB3aWR0aDogMTAwJTtcbiAgICBoZWlnaHQ6IDUwcHg7XG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIGxlZnQ6IDA7XG4gICAgYm90dG9tOiAwO1xuICAgIG9wYWNpdHk6IDE7XG4gICAgdHJhbnNpdGlvbjogb3BhY2l0eSAwLjNzIGVhc2U7XG4gICAgYmFja2dyb3VuZDogbGluZWFyLWdyYWRpZW50KHRyYW5zcGFyZW50IDBweCwgdmFyKC0tbGlnaHQpKTtcbiAgfSovXG59XG5cbi50cmFuc2NsdWRlIHtcbiAgdWwge1xuICAgIHBhZGRpbmctbGVmdDogMXJlbTtcbiAgfVxufVxuXG4ua2F0ZXgtZGlzcGxheSB7XG4gIG92ZXJmbG93LXg6IGF1dG87XG4gIG92ZXJmbG93LXk6IGhpZGRlbjtcbn1cblxuLmV4dGVybmFsLWVtYmVkLnlvdXR1YmUsXG5pZnJhbWUucGRmIHtcbiAgYXNwZWN0LXJhdGlvOiAxNiAvIDk7XG4gIGhlaWdodDogMTAwJTtcbiAgd2lkdGg6IDEwMCU7XG4gIGJvcmRlci1yYWRpdXM6IDVweDtcbn1cblxuLm5hdmlnYXRpb24tcHJvZ3Jlc3Mge1xuICBwb3NpdGlvbjogZml4ZWQ7XG4gIHRvcDogMDtcbiAgbGVmdDogMDtcbiAgd2lkdGg6IDA7XG4gIGhlaWdodDogM3B4O1xuICBiYWNrZ3JvdW5kOiB2YXIoLS1zZWNvbmRhcnkpO1xuICB0cmFuc2l0aW9uOiB3aWR0aCAwLjJzIGVhc2U7XG4gIHotaW5kZXg6IDk5OTk7XG59XG4iXX0= */`;var popover_default=`/**
|
||
* Layout breakpoints
|
||
* $mobile: screen width below this value will use mobile styles
|
||
* $desktop: screen width above this value will use desktop styles
|
||
* Screen width between $mobile and $desktop width will use the tablet layout.
|
||
* assuming mobile < desktop
|
||
*/
|
||
@keyframes dropin {
|
||
0% {
|
||
opacity: 0;
|
||
visibility: hidden;
|
||
}
|
||
1% {
|
||
opacity: 0;
|
||
}
|
||
100% {
|
||
opacity: 1;
|
||
visibility: visible;
|
||
}
|
||
}
|
||
.popover {
|
||
z-index: 999;
|
||
position: absolute;
|
||
overflow: visible;
|
||
padding: 1rem;
|
||
visibility: hidden;
|
||
opacity: 0;
|
||
transition: opacity 0.3s ease, visibility 0.3s ease;
|
||
}
|
||
.popover > .popover-inner {
|
||
position: relative;
|
||
width: 30rem;
|
||
max-height: 20rem;
|
||
padding: 0 1rem 1rem 1rem;
|
||
font-weight: initial;
|
||
font-style: initial;
|
||
line-height: normal;
|
||
font-size: initial;
|
||
font-family: var(--bodyFont);
|
||
border: 1px solid var(--lightgray);
|
||
background-color: var(--light);
|
||
border-radius: 5px;
|
||
box-shadow: 6px 6px 36px 0 rgba(0, 0, 0, 0.25);
|
||
overflow: auto;
|
||
white-space: normal;
|
||
}
|
||
.popover > .popover-inner[data-content-type][data-content-type*=pdf], .popover > .popover-inner[data-content-type][data-content-type*=image] {
|
||
padding: 0;
|
||
max-height: 100%;
|
||
}
|
||
.popover > .popover-inner[data-content-type][data-content-type*=image] img {
|
||
margin: 0;
|
||
border-radius: 0;
|
||
display: block;
|
||
}
|
||
.popover > .popover-inner[data-content-type][data-content-type*=pdf] iframe {
|
||
width: 100%;
|
||
}
|
||
.popover h1 {
|
||
font-size: 1.5rem;
|
||
}
|
||
@media all and ((max-width: 800px)) {
|
||
.popover {
|
||
display: none !important;
|
||
}
|
||
}
|
||
|
||
a:hover .popover,
|
||
.popover:hover {
|
||
animation: dropin 0.3s ease;
|
||
animation-fill-mode: forwards;
|
||
animation-delay: 0.2s;
|
||
}
|
||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUveW91d2VuL0RvY3VtZW50cy9hbGV4YW5kcmlhL3F1YXJ0ei9jb21wb25lbnRzL3N0eWxlcyIsInNvdXJjZXMiOlsiLi4vLi4vc3R5bGVzL3ZhcmlhYmxlcy5zY3NzIiwicG9wb3Zlci5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FDRUE7RUFDRTtJQUNFO0lBQ0E7O0VBRUY7SUFDRTs7RUFFRjtJQUNFO0lBQ0E7OztBQUlKO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUE4Q0E7RUFDQTtFQUNBLFlBQ0U7O0FBL0NGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBOztBQUlBO0VBRUU7RUFDQTs7QUFJQTtFQUNFO0VBQ0E7RUFDQTs7QUFLRjtFQUNFOztBQUtOO0VBQ0U7O0FBU0Y7RUF4REY7SUF5REk7Ozs7QUFJSjtBQUFBO0VBRUU7RUFDQTtFQUNBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBMYXlvdXQgYnJlYWtwb2ludHNcbiAqICRtb2JpbGU6IHNjcmVlbiB3aWR0aCBiZWxvdyB0aGlzIHZhbHVlIHdpbGwgdXNlIG1vYmlsZSBzdHlsZXNcbiAqICRkZXNrdG9wOiBzY3JlZW4gd2lkdGggYWJvdmUgdGhpcyB2YWx1ZSB3aWxsIHVzZSBkZXNrdG9wIHN0eWxlc1xuICogU2NyZWVuIHdpZHRoIGJldHdlZW4gJG1vYmlsZSBhbmQgJGRlc2t0b3Agd2lkdGggd2lsbCB1c2UgdGhlIHRhYmxldCBsYXlvdXQuXG4gKiBhc3N1bWluZyBtb2JpbGUgPCBkZXNrdG9wXG4gKi9cbiRicmVha3BvaW50czogKFxuICBtb2JpbGU6IDgwMHB4LFxuICBkZXNrdG9wOiAxMjAwcHgsXG4pO1xuXG4kbW9iaWxlOiBcIihtYXgtd2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIG1vYmlsZSl9KVwiO1xuJHRhYmxldDogXCIobWluLXdpZHRoOiAje21hcC1nZXQoJGJyZWFrcG9pbnRzLCBtb2JpbGUpfSkgYW5kIChtYXgtd2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIGRlc2t0b3ApfSlcIjtcbiRkZXNrdG9wOiBcIihtaW4td2lkdGg6ICN7bWFwLWdldCgkYnJlYWtwb2ludHMsIGRlc2t0b3ApfSlcIjtcblxuJHBhZ2VXaWR0aDogI3ttYXAtZ2V0KCRicmVha3BvaW50cywgbW9iaWxlKX07XG4kc2lkZVBhbmVsV2lkdGg6IDMyMHB4OyAvLzM4MHB4O1xuJHRvcFNwYWNpbmc6IDZyZW07XG4kYm9sZFdlaWdodDogNzAwO1xuJHNlbWlCb2xkV2VpZ2h0OiA2MDA7XG4kbm9ybWFsV2VpZ2h0OiA0MDA7XG5cbiRtb2JpbGVHcmlkOiAoXG4gIHRlbXBsYXRlUm93czogXCJhdXRvIGF1dG8gYXV0byBhdXRvIGF1dG9cIixcbiAgdGVtcGxhdGVDb2x1bW5zOiBcImF1dG9cIixcbiAgcm93R2FwOiBcIjVweFwiLFxuICBjb2x1bW5HYXA6IFwiNXB4XCIsXG4gIHRlbXBsYXRlQXJlYXM6XG4gICAgJ1wiZ3JpZC1zaWRlYmFyLWxlZnRcIlxcXG4gICAgICBcImdyaWQtaGVhZGVyXCJcXFxuICAgICAgXCJncmlkLWNlbnRlclwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLXJpZ2h0XCJcXFxuICAgICAgXCJncmlkLWZvb3RlclwiJyxcbik7XG4kdGFibGV0R3JpZDogKFxuICB0ZW1wbGF0ZVJvd3M6IFwiYXV0byBhdXRvIGF1dG8gYXV0b1wiLFxuICB0ZW1wbGF0ZUNvbHVtbnM6IFwiI3skc2lkZVBhbmVsV2lkdGh9IGF1dG9cIixcbiAgcm93R2FwOiBcIjVweFwiLFxuICBjb2x1bW5HYXA6IFwiNXB4XCIsXG4gIHRlbXBsYXRlQXJlYXM6XG4gICAgJ1wiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1oZWFkZXJcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtY2VudGVyXCJcXFxuICAgICAgXCJncmlkLXNpZGViYXItbGVmdCBncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtZm9vdGVyXCInLFxuKTtcbiRkZXNrdG9wR3JpZDogKFxuICB0ZW1wbGF0ZVJvd3M6IFwiYXV0byBhdXRvIGF1dG9cIixcbiAgdGVtcGxhdGVDb2x1bW5zOiBcIiN7JHNpZGVQYW5lbFdpZHRofSBhdXRvICN7JHNpZGVQYW5lbFdpZHRofVwiLFxuICByb3dHYXA6IFwiNXB4XCIsXG4gIGNvbHVtbkdhcDogXCI1cHhcIixcbiAgdGVtcGxhdGVBcmVhczpcbiAgICAnXCJncmlkLXNpZGViYXItbGVmdCBncmlkLWhlYWRlciBncmlkLXNpZGViYXItcmlnaHRcIlxcXG4gICAgICBcImdyaWQtc2lkZWJhci1sZWZ0IGdyaWQtY2VudGVyIGdyaWQtc2lkZWJhci1yaWdodFwiXFxcbiAgICAgIFwiZ3JpZC1zaWRlYmFyLWxlZnQgZ3JpZC1mb290ZXIgZ3JpZC1zaWRlYmFyLXJpZ2h0XCInLFxuKTtcbiIsIkB1c2UgXCIuLi8uLi9zdHlsZXMvdmFyaWFibGVzLnNjc3NcIiBhcyAqO1xuXG5Aa2V5ZnJhbWVzIGRyb3BpbiB7XG4gIDAlIHtcbiAgICBvcGFjaXR5OiAwO1xuICAgIHZpc2liaWxpdHk6IGhpZGRlbjtcbiAgfVxuICAxJSB7XG4gICAgb3BhY2l0eTogMDtcbiAgfVxuICAxMDAlIHtcbiAgICBvcGFjaXR5OiAxO1xuICAgIHZpc2liaWxpdHk6IHZpc2libGU7XG4gIH1cbn1cblxuLnBvcG92ZXIge1xuICB6LWluZGV4OiA5OTk7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgb3ZlcmZsb3c6IHZpc2libGU7XG4gIHBhZGRpbmc6IDFyZW07XG5cbiAgJiA+IC5wb3BvdmVyLWlubmVyIHtcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgd2lkdGg6IDMwcmVtO1xuICAgIG1heC1oZWlnaHQ6IDIwcmVtO1xuICAgIHBhZGRpbmc6IDAgMXJlbSAxcmVtIDFyZW07XG4gICAgZm9udC13ZWlnaHQ6IGluaXRpYWw7XG4gICAgZm9udC1zdHlsZTogaW5pdGlhbDtcbiAgICBsaW5lLWhlaWdodDogbm9ybWFsO1xuICAgIGZvbnQtc2l6ZTogaW5pdGlhbDtcbiAgICBmb250LWZhbWlseTogdmFyKC0tYm9keUZvbnQpO1xuICAgIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWxpZ2h0Z3JheSk7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tbGlnaHQpO1xuICAgIGJvcmRlci1yYWRpdXM6IDVweDtcbiAgICBib3gtc2hhZG93OiA2cHggNnB4IDM2cHggMCByZ2JhKDAsIDAsIDAsIDAuMjUpO1xuICAgIG92ZXJmbG93OiBhdXRvO1xuICAgIHdoaXRlLXNwYWNlOiBub3JtYWw7XG4gIH1cblxuICAmID4gLnBvcG92ZXItaW5uZXJbZGF0YS1jb250ZW50LXR5cGVdIHtcbiAgICAmW2RhdGEtY29udGVudC10eXBlKj1cInBkZlwiXSxcbiAgICAmW2RhdGEtY29udGVudC10eXBlKj1cImltYWdlXCJdIHtcbiAgICAgIHBhZGRpbmc6IDA7XG4gICAgICBtYXgtaGVpZ2h0OiAxMDAlO1xuICAgIH1cblxuICAgICZbZGF0YS1jb250ZW50LXR5cGUqPVwiaW1hZ2VcIl0ge1xuICAgICAgaW1nIHtcbiAgICAgICAgbWFyZ2luOiAwO1xuICAgICAgICBib3JkZXItcmFkaXVzOiAwO1xuICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgIH1cbiAgICB9XG5cbiAgICAmW2RhdGEtY29udGVudC10eXBlKj1cInBkZlwiXSB7XG4gICAgICBpZnJhbWUge1xuICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBoMSB7XG4gICAgZm9udC1zaXplOiAxLjVyZW07XG4gIH1cblxuICB2aXNpYmlsaXR5OiBoaWRkZW47XG4gIG9wYWNpdHk6IDA7XG4gIHRyYW5zaXRpb246XG4gICAgb3BhY2l0eSAwLjNzIGVhc2UsXG4gICAgdmlzaWJpbGl0eSAwLjNzIGVhc2U7XG5cbiAgQG1lZGlhIGFsbCBhbmQgKCRtb2JpbGUpIHtcbiAgICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7XG4gIH1cbn1cblxuYTpob3ZlciAucG9wb3Zlcixcbi5wb3BvdmVyOmhvdmVyIHtcbiAgYW5pbWF0aW9uOiBkcm9waW4gMC4zcyBlYXNlO1xuICBhbmltYXRpb24tZmlsbC1tb2RlOiBmb3J3YXJkcztcbiAgYW5pbWF0aW9uLWRlbGF5OiAwLjJzO1xufVxuIl19 */`;import{Features,transform}from"lightningcss";import{transform as transpile}from"esbuild";function getComponentResources(ctx){let allComponents=new Set;for(let emitter of ctx.cfg.plugins.emitters){let components=emitter.getQuartzComponents(ctx);for(let component of components)allComponents.add(component)}let componentResources={css:new Set,beforeDOMLoaded:new Set,afterDOMLoaded:new Set};for(let component of allComponents){let{css,beforeDOMLoaded,afterDOMLoaded}=component;css&&componentResources.css.add(css),beforeDOMLoaded&&componentResources.beforeDOMLoaded.add(beforeDOMLoaded),afterDOMLoaded&&componentResources.afterDOMLoaded.add(afterDOMLoaded)}return{css:[...componentResources.css],beforeDOMLoaded:[...componentResources.beforeDOMLoaded],afterDOMLoaded:[...componentResources.afterDOMLoaded]}}__name(getComponentResources,"getComponentResources");async function joinScripts(scripts){let script=scripts.map(script2=>`(function () {${script2}})();`).join(`
|
||
`);return(await transpile(script,{minify:!0})).code}__name(joinScripts,"joinScripts");function addGlobalPageResources(ctx,componentResources){let cfg=ctx.cfg.configuration;if(cfg.enablePopovers&&(componentResources.afterDOMLoaded.push(popover_inline_default),componentResources.css.push(popover_default)),cfg.analytics?.provider==="google"){let tagId=cfg.analytics.tagId;componentResources.afterDOMLoaded.push(`
|
||
const gtagScript = document.createElement("script")
|
||
gtagScript.src = "https://www.googletagmanager.com/gtag/js?id=${tagId}"
|
||
gtagScript.async = true
|
||
document.head.appendChild(gtagScript)
|
||
|
||
window.dataLayer = window.dataLayer || [];
|
||
function gtag() { dataLayer.push(arguments); }
|
||
gtag("js", new Date());
|
||
gtag("config", "${tagId}", { send_page_view: false });
|
||
|
||
document.addEventListener("nav", () => {
|
||
gtag("event", "page_view", {
|
||
page_title: document.title,
|
||
page_location: location.href,
|
||
});
|
||
});`)}else if(cfg.analytics?.provider==="plausible"){let plausibleHost=cfg.analytics.host??"https://plausible.io";componentResources.afterDOMLoaded.push(`
|
||
const plausibleScript = document.createElement("script")
|
||
plausibleScript.src = "${plausibleHost}/js/script.manual.js"
|
||
plausibleScript.setAttribute("data-domain", location.hostname)
|
||
plausibleScript.defer = true
|
||
document.head.appendChild(plausibleScript)
|
||
|
||
window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }
|
||
|
||
document.addEventListener("nav", () => {
|
||
plausible("pageview")
|
||
})
|
||
`)}else if(cfg.analytics?.provider==="umami")componentResources.afterDOMLoaded.push(`
|
||
const umamiScript = document.createElement("script")
|
||
umamiScript.src = "${cfg.analytics.host??"https://analytics.umami.is"}/script.js"
|
||
umamiScript.setAttribute("data-website-id", "${cfg.analytics.websiteId}")
|
||
umamiScript.async = true
|
||
|
||
document.head.appendChild(umamiScript)
|
||
`);else if(cfg.analytics?.provider==="goatcounter")componentResources.afterDOMLoaded.push(`
|
||
const goatcounterScript = document.createElement("script")
|
||
goatcounterScript.src = "${cfg.analytics.scriptSrc??"https://gc.zgo.at/count.js"}"
|
||
goatcounterScript.async = true
|
||
goatcounterScript.setAttribute("data-goatcounter",
|
||
"https://${cfg.analytics.websiteId}.${cfg.analytics.host??"goatcounter.com"}/count")
|
||
document.head.appendChild(goatcounterScript)
|
||
`);else if(cfg.analytics?.provider==="posthog")componentResources.afterDOMLoaded.push(`
|
||
const posthogScript = document.createElement("script")
|
||
posthogScript.innerHTML= \`!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
|
||
posthog.init('${cfg.analytics.apiKey}',{api_host:'${cfg.analytics.host??"https://app.posthog.com"}'})\`
|
||
document.head.appendChild(posthogScript)
|
||
`);else if(cfg.analytics?.provider==="tinylytics"){let siteId=cfg.analytics.siteId;componentResources.afterDOMLoaded.push(`
|
||
const tinylyticsScript = document.createElement("script")
|
||
tinylyticsScript.src = "https://tinylytics.app/embed/${siteId}.js"
|
||
tinylyticsScript.defer = true
|
||
document.head.appendChild(tinylyticsScript)
|
||
`)}else cfg.analytics?.provider==="cabin"?componentResources.afterDOMLoaded.push(`
|
||
const cabinScript = document.createElement("script")
|
||
cabinScript.src = "${cfg.analytics.host??"https://scripts.withcabin.com"}/hello.js"
|
||
cabinScript.defer = true
|
||
cabinScript.async = true
|
||
document.head.appendChild(cabinScript)
|
||
`):cfg.analytics?.provider==="clarity"&&componentResources.afterDOMLoaded.push(`
|
||
const clarityScript = document.createElement("script")
|
||
clarityScript.innerHTML= \`(function(c,l,a,r,i,t,y){c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
||
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|
||
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
||
})(window, document, "clarity", "script", "${cfg.analytics.projectId}");\`
|
||
document.head.appendChild(clarityScript)
|
||
`);cfg.enableSPA?componentResources.afterDOMLoaded.push(spa_inline_default):componentResources.afterDOMLoaded.push(`
|
||
window.spaNavigate = (url, _) => window.location.assign(url)
|
||
window.addCleanup = () => {}
|
||
const event = new CustomEvent("nav", { detail: { url: document.body.dataset.slug } })
|
||
document.dispatchEvent(event)
|
||
`)}__name(addGlobalPageResources,"addGlobalPageResources");var ComponentResources=__name(()=>({name:"ComponentResources",getQuartzComponents(){return[]},async getDependencyGraph(_ctx,_content,_resources){return new DepGraph},async emit(ctx,_content,_resources){let promises=[],cfg=ctx.cfg.configuration,componentResources=getComponentResources(ctx),googleFontsStyleSheet="";if(cfg.theme.fontOrigin!=="local"){if(cfg.theme.fontOrigin==="googleFonts"&&!cfg.theme.cdnCaching){let match,fontSourceRegex=/url\((https:\/\/fonts.gstatic.com\/s\/[^)]+\.(woff2|ttf))\)/g;for(googleFontsStyleSheet=await(await fetch(googleFontHref(ctx.cfg.configuration.theme))).text();(match=fontSourceRegex.exec(googleFontsStyleSheet))!==null;){let url=match[1],[filename,ext]=url.split("/").pop().split(".");googleFontsStyleSheet=googleFontsStyleSheet.replace(url,`https://${cfg.baseUrl}/static/fonts/${filename}.ttf`),promises.push(fetch(url).then(res=>{if(!res.ok)throw new Error("Failed to fetch font");return res.arrayBuffer()}).then(buf=>write({ctx,slug:joinSegments("static","fonts",filename),ext:`.${ext}`,content:Buffer.from(buf)})))}}}addGlobalPageResources(ctx,componentResources);let stylesheet=joinStyles(ctx.cfg.configuration.theme,googleFontsStyleSheet,...componentResources.css,custom_default),[prescript,postscript]=await Promise.all([joinScripts(componentResources.beforeDOMLoaded),joinScripts(componentResources.afterDOMLoaded)]);return promises.push(write({ctx,slug:"index",ext:".css",content:transform({filename:"index.css",code:Buffer.from(stylesheet),minify:!0,targets:{safari:984576,ios_saf:984576,edge:7536640,firefox:6684672,chrome:7143424},include:Features.MediaQueries}).code.toString()}),write({ctx,slug:"prescript",ext:".js",content:prescript}),write({ctx,slug:"postscript",ext:".js",content:postscript})),await Promise.all(promises)}}),"ComponentResources");var NotFoundPage=__name(()=>{let opts={...sharedPageComponents,pageBody:__default(),beforeBody:[],left:[],right:[]},{head:Head,pageBody,footer:Footer}=opts,Body2=Body_default();return{name:"404Page",getQuartzComponents(){return[Head,Body2,pageBody,Footer]},async getDependencyGraph(_ctx,_content,_resources){return new DepGraph},async emit(ctx,_content,resources){let cfg=ctx.cfg.configuration,slug="404",path13=new URL(`https://${cfg.baseUrl??"example.com"}`).pathname,externalResources=pageResources(path13,resources),notFound=i18n(cfg.locale).pages.error.title,[tree,vfile]=defaultProcessedContent({slug,text:notFound,description:notFound,frontmatter:{title:notFound,tags:[]}}),componentData={ctx,fileData:vfile.data,externalResources,cfg,children:[],tree,allFiles:[]};return[await write({ctx,content:renderPage(cfg,slug,componentData,opts,externalResources),slug,ext:".html"})]}}},"NotFoundPage");import chalk5 from"chalk";function getStaticResourcesFromPlugins(ctx){let staticResources={css:[],js:[]};for(let transformer of ctx.cfg.plugins.transformers){let res=transformer.externalResources?transformer.externalResources(ctx):{};res?.js&&staticResources.js.push(...res.js),res?.css&&staticResources.css.push(...res.css)}if(ctx.argv.serve){let wsUrl=ctx.argv.remoteDevHost?`wss://${ctx.argv.remoteDevHost}:${ctx.argv.wsPort}`:`ws://localhost:${ctx.argv.wsPort}`;staticResources.js.push({loadTime:"afterDOMReady",contentType:"inline",script:`
|
||
const socket = new WebSocket('${wsUrl}')
|
||
// reload(true) ensures resources like images and scripts are fetched again in firefox
|
||
socket.addEventListener('message', () => document.location.reload(true))
|
||
`})}return staticResources}__name(getStaticResourcesFromPlugins,"getStaticResourcesFromPlugins");async function emitContent(ctx,content){let{argv,cfg}=ctx,perf=new PerfTimer,log=new QuartzLogger(ctx.argv.verbose);log.start("Emitting output files");let emittedFiles=0,staticResources=getStaticResourcesFromPlugins(ctx);for(let emitter of cfg.plugins.emitters)try{let emitted=await emitter.emit(ctx,content,staticResources);if(emittedFiles+=emitted.length,ctx.argv.verbose)for(let file of emitted)console.log(`[emit:${emitter.name}] ${file}`)}catch(err){trace(`Failed to emit from plugin \`${emitter.name}\``,err)}log.end(`Emitted ${emittedFiles} files to \`${argv.output}\` in ${perf.timeSince()}`)}__name(emitContent,"emitContent");var config={configuration:{pageTitle:"\u{1FAB4} Quartz 4.0",pageTitleSuffix:"",enableSPA:!0,enablePopovers:!0,analytics:{provider:"plausible"},locale:"en-US",baseUrl:"quartz.jzhao.xyz",ignorePatterns:["private","templates",".obsidian"],defaultDateType:"created",generateSocialImages:!1,theme:{fontOrigin:"googleFonts",cdnCaching:!0,typography:{header:"Schibsted Grotesk",body:"Source Sans Pro",code:"IBM Plex Mono"},colors:{lightMode:{light:"#faf8f8",lightgray:"#e5e5e5",gray:"#b8b8b8",darkgray:"#4e4e4e",dark:"#2b2b2b",secondary:"#284b63",tertiary:"#84a59d",highlight:"rgba(143, 159, 169, 0.15)",textHighlight:"#fff23688"},darkMode:{light:"#161618",lightgray:"#393639",gray:"#646464",darkgray:"#d4d4d4",dark:"#ebebec",secondary:"#7b97aa",tertiary:"#84a59d",highlight:"rgba(143, 159, 169, 0.15)",textHighlight:"#b3aa0288"}}}},plugins:{transformers:[FrontMatter(),CreatedModifiedDate({priority:["frontmatter","filesystem"]}),SyntaxHighlighting({theme:{light:"github-light",dark:"github-dark"},keepBackground:!1}),ObsidianFlavoredMarkdown({enableInHtmlEmbed:!1}),GitHubFlavoredMarkdown(),TableOfContents(),CrawlLinks({markdownLinkResolution:"shortest"}),Description(),Latex({renderEngine:"katex"})],filters:[RemoveDrafts()],emitters:[AliasRedirects(),ComponentResources(),ContentPage(),FolderPage(),TagPage(),ContentIndex({enableSiteMap:!0,enableRSS:!0}),Assets(),Static(),NotFoundPage()]}},quartz_config_default=config;import chokidar from"chokidar";import fs6 from"fs";import{fileURLToPath}from"url";var options={retrieveSourceMap(source){if(source.includes(".quartz-cache")){let realSource=fileURLToPath(source.split("?",2)[0]+".map");return{map:fs6.readFileSync(realSource,"utf8")}}else return null}};sourceMapSupport.install(options);function newBuildId(){return Math.random().toString(36).substring(2,8)}__name(newBuildId,"newBuildId");async function buildQuartz(argv,mut,clientRefresh){let ctx={buildId:newBuildId(),argv,cfg:quartz_config_default,allSlugs:[]},perf=new PerfTimer,output=argv.output,pluginCount=Object.values(quartz_config_default.plugins).flat().length,pluginNames=__name(key=>quartz_config_default.plugins[key].map(plugin=>plugin.name),"pluginNames");argv.verbose&&(console.log(`Loaded ${pluginCount} plugins`),console.log(` Transformers: ${pluginNames("transformers").join(", ")}`),console.log(` Filters: ${pluginNames("filters").join(", ")}`),console.log(` Emitters: ${pluginNames("emitters").join(", ")}`));let release=await mut.acquire();perf.addEvent("clean"),await rimraf(path12.join(output,"*"),{glob:!0}),console.log(`Cleaned output directory \`${output}\` in ${perf.timeSince("clean")}`),perf.addEvent("glob");let allFiles=await glob("**/*.*",argv.directory,quartz_config_default.configuration.ignorePatterns),fps=allFiles.filter(fp=>fp.endsWith(".md")).sort();console.log(`Found ${fps.length} input files from \`${argv.directory}\` in ${perf.timeSince("glob")}`);let filePaths=fps.map(fp=>joinSegments(argv.directory,fp));ctx.allSlugs=allFiles.map(fp=>slugifyFilePath(fp));let parsedFiles=await parseMarkdown(ctx,filePaths),filteredContent=filterContent(ctx,parsedFiles),dependencies={};if(argv.fastRebuild){let staticResources=getStaticResourcesFromPlugins(ctx);for(let emitter of quartz_config_default.plugins.emitters)dependencies[emitter.name]=await emitter.getDependencyGraph?.(ctx,filteredContent,staticResources)??null}if(await emitContent(ctx,filteredContent),console.log(chalk6.green(`Done processing ${fps.length} files in ${perf.timeSince()}`)),release(),argv.serve)return startServing(ctx,mut,parsedFiles,clientRefresh,dependencies)}__name(buildQuartz,"buildQuartz");async function startServing(ctx,mut,initialContent,clientRefresh,dependencies){let{argv}=ctx,contentMap=new Map;for(let content of initialContent){let[_tree,vfile]=content;contentMap.set(vfile.data.filePath,content)}let buildData={ctx,mut,dependencies,contentMap,ignored:await isGitIgnored(),initialSlugs:ctx.allSlugs,toRebuild:new Set,toRemove:new Set,trackedAssets:new Set,lastBuildMs:0},watcher=chokidar.watch(".",{persistent:!0,cwd:argv.directory,ignoreInitial:!0}),buildFromEntry=argv.fastRebuild?partialRebuildFromEntrypoint:rebuildFromEntrypoint;return watcher.on("add",fp=>buildFromEntry(fp,"add",clientRefresh,buildData)).on("change",fp=>buildFromEntry(fp,"change",clientRefresh,buildData)).on("unlink",fp=>buildFromEntry(fp,"delete",clientRefresh,buildData)),async()=>{await watcher.close()}}__name(startServing,"startServing");async function partialRebuildFromEntrypoint(filepath,action,clientRefresh,buildData){let{ctx,ignored,dependencies,contentMap,mut,toRemove}=buildData,{argv,cfg}=ctx;if(ignored(filepath))return;let buildId=newBuildId();ctx.buildId=buildId,buildData.lastBuildMs=new Date().getTime();let release=await mut.acquire();if(ctx.buildId!==buildId){release();return}let perf=new PerfTimer;console.log(chalk6.yellow("Detected change, rebuilding..."));let fp=joinSegments(argv.directory,toPosixPath(filepath)),staticResources=getStaticResourcesFromPlugins(ctx),processedFiles=[];switch(action){case"add":processedFiles=await parseMarkdown(ctx,[fp]),processedFiles.forEach(([tree,vfile])=>contentMap.set(vfile.data.filePath,[tree,vfile]));for(let emitter of cfg.plugins.emitters){let emitterGraph=await emitter.getDependencyGraph?.(ctx,processedFiles,staticResources)??null;if(emitterGraph){let existingGraph=dependencies[emitter.name];existingGraph!==null?existingGraph.mergeGraph(emitterGraph):dependencies[emitter.name]=emitterGraph}}break;case"change":if(processedFiles=await parseMarkdown(ctx,[fp]),processedFiles.forEach(([tree,vfile])=>contentMap.set(vfile.data.filePath,[tree,vfile])),path12.extname(fp)===".md")for(let emitter of cfg.plugins.emitters){let emitterGraph=await emitter.getDependencyGraph?.(ctx,processedFiles,staticResources)??null;emitterGraph?.hasNode(fp)&&dependencies[emitter.name]?.updateIncomingEdgesForNode(emitterGraph,fp)}break;case"delete":toRemove.add(fp);break}argv.verbose&&console.log(`Updated dependency graphs in ${perf.timeSince()}`),perf.addEvent("rebuild");let emittedFiles=0;for(let emitter of cfg.plugins.emitters){let depGraph=dependencies[emitter.name];if(depGraph===null){argv.verbose&&console.log(`Emitter ${emitter.name} doesn't define a dependency graph. Calling it with all files...`);let files=[...contentMap.values()].filter(([_node,vfile])=>!toRemove.has(vfile.data.filePath)),emittedFps=await emitter.emit(ctx,files,staticResources);if(ctx.argv.verbose)for(let file of emittedFps)console.log(`[emit:${emitter.name}] ${file}`);emittedFiles+=emittedFps.length;continue}if(depGraph.hasNode(fp)){let upstreamContent=[...depGraph.getLeafNodeAncestors(fp)].filter(file=>contentMap.has(file)).filter(file=>!toRemove.has(file)).map(file=>contentMap.get(file)),emittedFps=await emitter.emit(ctx,upstreamContent,staticResources);if(ctx.argv.verbose)for(let file of emittedFps)console.log(`[emit:${emitter.name}] ${file}`);emittedFiles+=emittedFps.length}}console.log(`Emitted ${emittedFiles} files to \`${argv.output}\` in ${perf.timeSince("rebuild")}`);let destinationsToDelete=new Set;for(let file of toRemove)contentMap.delete(file),Object.values(dependencies).forEach(depGraph=>{depGraph?.removeNode(file),depGraph?.removeOrphanNodes()?.forEach(node=>{node.startsWith(argv.output)&&destinationsToDelete.add(node)})});await rimraf([...destinationsToDelete]),console.log(chalk6.green(`Done rebuilding in ${perf.timeSince()}`)),toRemove.clear(),release(),clientRefresh()}__name(partialRebuildFromEntrypoint,"partialRebuildFromEntrypoint");async function rebuildFromEntrypoint(fp,action,clientRefresh,buildData){let{ctx,ignored,mut,initialSlugs,contentMap,toRebuild,toRemove,trackedAssets}=buildData,{argv}=ctx;if(ignored(fp))return;fp=toPosixPath(fp);let filePath=joinSegments(argv.directory,fp);if(path12.extname(fp)!==".md"){action==="add"||action==="change"?trackedAssets.add(filePath):action==="delete"&&trackedAssets.delete(filePath),clientRefresh();return}action==="add"||action==="change"?toRebuild.add(filePath):action==="delete"&&toRemove.add(filePath);let buildId=newBuildId();ctx.buildId=buildId,buildData.lastBuildMs=new Date().getTime();let release=await mut.acquire();if(ctx.buildId!==buildId){release();return}let perf=new PerfTimer;console.log(chalk6.yellow("Detected change, rebuilding..."));try{let filesToRebuild=[...toRebuild].filter(fp2=>!toRemove.has(fp2)),parsedContent=await parseMarkdown(ctx,filesToRebuild);for(let content of parsedContent){let[_tree,vfile]=content;contentMap.set(vfile.data.filePath,content)}for(let fp2 of toRemove)contentMap.delete(fp2);let parsedFiles=[...contentMap.values()],filteredContent=filterContent(ctx,parsedFiles),trackedSlugs=[...new Set([...contentMap.keys(),...toRebuild,...trackedAssets])].filter(fp2=>!toRemove.has(fp2)).map(fp2=>slugifyFilePath(path12.posix.relative(argv.directory,fp2)));ctx.allSlugs=[...new Set([...initialSlugs,...trackedSlugs])],await rimraf(path12.join(argv.output,".*"),{glob:!0}),await emitContent(ctx,filteredContent),console.log(chalk6.green(`Done rebuilding in ${perf.timeSince()}`))}catch(err){console.log(chalk6.yellow("Rebuild failed. Waiting on a change to fix the error...")),argv.verbose&&console.log(chalk6.red(err))}clientRefresh(),toRebuild.clear(),toRemove.clear(),release()}__name(rebuildFromEntrypoint,"rebuildFromEntrypoint");var build_default=__name(async(argv,mut,clientRefresh)=>{try{return await buildQuartz(argv,mut,clientRefresh)}catch(err){trace(`
|
||
Exiting Quartz due to a fatal error`,err)}},"default");export{build_default as default};
|
||
//# sourceMappingURL=transpiled-build.mjs.map
|